"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("shiki"),t=require("@typescript/twoslash");function i(){return(i=Object.assign||function(e){for(var t=1;t\n '+d+"\n

'+a+"

\n"}})),n},r=function(e){var t=e.flipped?"M27 39C26.5 32.7511 21.9 17.5173 7.5 6.57333M16.5 4.04L0.999999 0.999998C3.16667 4.88444 7.5 13.16 7.5 15.1867":"M1 39C1.5 32.7511 6.1 17.5173 20.5 6.57333M11.5 4.04L27 0.999998C24.8333 4.88444 20.5 13.16 20.5 15.1867",i=e.arrowRot.split(" ");return"\n \n'};function o(e){return e.replace(//g,">")}var a=function(e){return!!Object.keys(e||{}).find((function(e){return!!e.includes("-")||!isNaN(parseInt(e))}))},s=function(e){var t=[];return Object.keys(e||{}).find((function(e){if(isNaN(parseInt(e))||t.push(parseInt(e)),e.includes("-"))for(var i=e.split("-"),n=i[0],r=parseInt(i[1])+1,o=parseInt(n);o"};function c(e,t,i){var n="";return n+=l(t,i,[]),i.title&&(n+="
"+i.title+"
"),t.langId&&(n+='
'+t.langId+"
"),n+="
",(n=(n+=o(e)).replace(/\n*$/,""))+"
"}function p(e,t,i,r){var c="",p=r.highlight&&a(r.highlight),g=s(r.highlight);i.tags&&i.tags.length&&(c+="
"),c+=l(t,r,["twoslash","lsp"]),r.title&&(c+="
"+r.title+"
"),t.langId&&(c+='
'+t.langId+"
"),c+="
";var m,y=d(i.errors,(function(e){return e.line}))||new Map,v=d(i.staticQuickInfos,(function(e){return e.line}))||new Map,w=d(i.queries,(function(e){return e.line-1}))||new Map,b=d(i.tags,(function(e){return e.line-1}))||new Map,S=0;return e.forEach((function(e,i){var n=y.get(i)||[],r=v.get(i)||[],a=w.get(i)||[],s=b.get(i)||[],l="
";if(0===e.length&&0===i)S+=1;else if(0===e.length)c+=l+" 
",S+=1;else{c+=l;var d=0;e.forEach((function(e){var i,o="",s=function(t){return function(i){return t<=i.character&&t+e.content.length>=i.character+i.length}},l=n.filter(s(d)),p=r.filter(s(d)),u=a.filter(s(d));i=i||p.find((function(e){return e.text===(a.length&&a[0].text)}));var f,h=[].concat(l,p,u).sort((function(e,t){return(e.start||0)-(t.start||0)}));o+=h.length?function(e,t,i){void 0===i&&(i="");var n=function(e){return"⇍"+e+"⇏"},r=function(e,t){switch(e.classes){case"lsp":var r=function(e){return e.replace(/"/g,"⃟")}(e.lsp||"");return n(t?"/data-lsp":"data-lsp lsp=¿"+r+"¿ "+(e.lsp===i?"style=⇯border-bottom: solid 2px lightgrey;⇯":""));case"query":return n((t?"/":"")+"data-highlight");case"err":default:return n((t?"/":"")+"data-err")}};e.sort((function(e,t){var i=function(e){return["err","query","lsp"].indexOf(null!=e?e:"")},n=0;return!(n=e.begin-t.begin)&&!(n=t.end-e.end)&&(n=i(e.classes)-i(t.classes)),n}));var o=0;return function(e){return e.replace(/⃟/g,'"')}(function(e){return e.replace(/⇍/g,"<").replace(/⇏/g,">").replace(/⇯/g,"'").replace(/¿/g,"'")}(function(e){var t={"<":"lt",'"':"quot","'":"apos","&":"amp","\r":"#13","\n":"#10"};return e.toString().replace(/[<"'\r\n&]/g,(function(e){return"&"+t[e]+";"}))}(function e(i){var n="",a=i.shift();return n+=t.substring(o,a.begin),o=a.begin,n+=r(a),i.some((function(e){return e.begin/g,"⇏").replace(/'/g,"⇯"),c+=''+o+"",d+=e.content.length,S+=e.content.length})),c+="
",S+=1}if(n.length){var m=n.map((function(e){return o(e.renderedMessage)})).join("
"),x=n.map((function(e){return e.code})).join("
");c+=''+m+''+x+"",c+=''+m+""}a.length&&a.forEach((function(e){switch(c+="
",e.kind){case"query":var t=o(e.text),n=(v.get(i)||[]).find((function(e){return e.text===(a.length&&a[0].text)}));c+=""+" ".repeat((n&&n.character+(null==n?void 0:n.length)/2)-1||0)+"
"+t+"
";break;case"completions":if(e.completions){var r=e.completions.filter((function(t){return t.name.startsWith(e.completionsPrefix||"____")})).sort((function(e,t){return e.name.localeCompare(t.name)})).map((function(t){var i,n,r=t.name.substr((null==(i=e.completionsPrefix)?void 0:i.length)||0),o=""+(e.completionsPrefix||"")+""+r+"";return"
  • "+o+"
  • "})).join("");c+=" ".repeat(e.offset)+""}else c+="//"+"".padStart(e.offset-2)+"^ - No completions found"}c+="
    "})),s.length&&s.forEach((function(e){if(["error","warn","log"].includes(e.name)){switch(c+="
    ",e.name){case"error":c+=u+""+(e.annotation||"N/A")+"";break;case"warn":c+=f+""+(e.annotation||"N/A")+"";break;case"log":c+=h+""+(e.annotation||"N/A")+""}c+="
    "}}))})),m=c.replace(/\n*$/,""),c=m.replace(/⇍/g,"<").replace(/⇏/g,">").replace(/⇯/g,"'"),c+=t.addTryButton?"
    Try":"",c+="
    ",i.tags&&i.tags.length&&(c+=n(i.tags),c+=""),c}function d(e,t){var i=new Map;return e.forEach((function(e){var n=t(e),r=i.get(n);r?r.push(e):i.set(n,[e])})),i}var u='',f='',h='';function g(e,t,i){var n="",r=i.highlight&&a(i.highlight),c=s(i.highlight);return n+=l(t,i,[]),i.title&&(n+="
    "+i.title+"
    "),t.langId&&(n+='
    '+t.langId+"
    "),n+="
    ",e.forEach((function(e,t){if(0===e.length)n+="
    ";else{var i=r?c(t)?" highlight":" dim":"";n+="
    ",e.forEach((function(e){n+=''+o(e.content)+""})),n+="
    "}})),n=n.replace(/\n*$/,""),n+="
    "}var m={compilerOptions:"The set of compiler options for your project",allowJs:"Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files.",allowSyntheticDefaultImports:"Allow 'import x from y' when a module doesn't have a default export.",allowUmdGlobalAccess:"Allow accessing UMD globals from modules.",allowUnreachableCode:"Disable error reporting for unreachable code.",allowUnusedLabels:"Disable error reporting for unused labels.",alwaysStrict:"Ensure 'use strict' is always emitted.",assumeChangesOnlyAffectDirectDependencies:"Have recompiles in projects that use [`incremental`](#incremental) and `watch` mode assume that changes within a file will only affect files directly depending on it.",baseUrl:"Specify the base directory to resolve non-relative module names.",charset:"No longer supported. In early versions, manually set the text encoding for reading files.",checkJs:"Enable error reporting in type-checked JavaScript files.",clean:"Delete the outputs of all projects.",composite:"Enable constraints that allow a TypeScript project to be used with project references.",declaration:"Generate .d.ts files from TypeScript and JavaScript files in your project.",declarationDir:"Specify the output directory for generated declaration files.",declarationMap:"Create sourcemaps for d.ts files.",diagnostics:"Output compiler performance information after building.",disableFilenameBasedTypeAcquisition:"Disables inference for type acquisition by looking at filenames in a project.",disableReferencedProjectLoad:"Reduce the number of projects loaded automatically by TypeScript.",disableSizeLimit:"Remove the 20mb cap on total source code size for JavaScript files in the TypeScript language server.",disableSolutionSearching:"Opt a project out of multi-project reference checking when editing.",disableSourceOfProjectReferenceRedirect:"Disable preferring source files instead of declaration files when referencing composite projects.",downlevelIteration:"Emit more compliant, but verbose and less performant JavaScript for iteration.",emitBOM:"Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files.",emitDeclarationOnly:"Only output d.ts files and not JavaScript files.",emitDecoratorMetadata:"Emit design-type metadata for decorated declarations in source files.",enable:"Disable the type acquisition for JavaScript projects.",esModuleInterop:"Emit additional JavaScript to ease support for importing CommonJS modules. This enables [`allowSyntheticDefaultImports`](#allowSyntheticDefaultImports) for type compatibility.",exactOptionalPropertyTypes:"Interpret optional property types as written, rather than adding `undefined`.",exclude:"Filters results from the [`include`](#include) option.",excludeDirectories:"Remove a list of directories from the watch process.",excludeFiles:"Remove a list of files from the watch mode's processing.",experimentalDecorators:"Enable experimental support for TC39 stage 2 draft decorators.",explainFiles:"Print files read during the compilation including why it was included.",extendedDiagnostics:"Output more detailed compiler performance information after building.",extends:"Specify one or more path or node module references to base configuration files from which settings are inherited.",fallbackPolling:"Specify what approach the watcher should use if the system runs out of native file watchers.",files:"Include a list of files. This does not support glob patterns, as opposed to [`include`](#include).",force:"Build all projects, including those that appear to be up to date.",forceConsistentCasingInFileNames:"Ensure that casing is correct in imports.",generateCpuProfile:"Emit a v8 CPU profile of the compiler run for debugging.",importHelpers:"Allow importing helper functions from tslib once per project, instead of including them per-file.",importsNotUsedAsValues:"Specify emit/checking behavior for imports that are only used for types.",include:"Specify a list of glob patterns that match files to be included in compilation.",incremental:"Save .tsbuildinfo files to allow for incremental compilation of projects.",inlineSourceMap:"Include sourcemap files inside the emitted JavaScript.",inlineSources:"Include source code in the sourcemaps inside the emitted JavaScript.",isolatedModules:"Ensure that each file can be safely transpiled without relying on other imports.",jsx:"Specify what JSX code is generated.",jsxFactory:"Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'.",jsxFragmentFactory:"Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'.",jsxImportSource:"Specify module specifier used to import the JSX factory functions when using `jsx: react-jsx*`.",keyofStringsOnly:"Make keyof only return strings instead of string, numbers or symbols. Legacy option.",lib:"Specify a set of bundled library declaration files that describe the target runtime environment.",listEmittedFiles:"Print the names of emitted files after a compilation.",listFiles:"Print all of the files read during the compilation.",locale:"Set the language of the messaging from TypeScript. This does not affect emit.",mapRoot:"Specify the location where debugger should locate map files instead of generated locations.",maxNodeModuleJsDepth:"Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with [`allowJs`](#allowJs).",module:"Specify what module code is generated.",moduleDetection:"Control what method is used to detect the whether a JS file is a module.",moduleResolution:"Specify how TypeScript looks up a file from a given module specifier.",moduleSuffixes:"List of file name suffixes to search when resolving a module.",newLine:"Set the newline character for emitting files.",noEmit:"Disable emitting files from a compilation.",noEmitHelpers:"Disable generating custom helper functions like `__extends` in compiled output.",noEmitOnError:"Disable emitting files if any type checking errors are reported.",noErrorTruncation:"Disable truncating types in error messages.",noFallthroughCasesInSwitch:"Enable error reporting for fallthrough cases in switch statements.",noImplicitAny:"Enable error reporting for expressions and declarations with an implied `any` type.",noImplicitOverride:"Ensure overriding members in derived classes are marked with an override modifier.",noImplicitReturns:"Enable error reporting for codepaths that do not explicitly return in a function.",noImplicitThis:"Enable error reporting when `this` is given the type `any`.",noImplicitUseStrict:"Disable adding 'use strict' directives in emitted JavaScript files.",noLib:"Disable including any library files, including the default lib.d.ts.",noPropertyAccessFromIndexSignature:"Enforces using indexed accessors for keys declared using an indexed type.",noResolve:"Disallow `import`s, `require`s or ``s from expanding the number of files TypeScript should add to a project.",noStrictGenericChecks:"Disable strict checking of generic signatures in function types.",noUncheckedIndexedAccess:"Add `undefined` to a type when accessed using an index.",noUnusedLocals:"Enable error reporting when local variables aren't read.",noUnusedParameters:"Raise an error when a function parameter isn't read.",out:"Deprecated setting. Use [`outFile`](#outFile) instead.",outDir:"Specify an output folder for all emitted files.",outFile:"Specify a file that bundles all outputs into one JavaScript file. If [`declaration`](#declaration) is true, also designates a file that bundles all .d.ts output.",paths:"Specify a set of entries that re-map imports to additional lookup locations.",plugins:"Specify a list of language service plugins to include.",preserveConstEnums:"Disable erasing `const enum` declarations in generated code.",preserveSymlinks:"Disable resolving symlinks to their realpath. This correlates to the same flag in node.",preserveValueImports:"Preserve unused imported values in the JavaScript output that would otherwise be removed.",preserveWatchOutput:"Disable wiping the console in watch mode.",pretty:"Enable color and formatting in TypeScript's output to make compiler errors easier to read.",reactNamespace:"Specify the object invoked for `createElement`. This only applies when targeting `react` JSX emit.",references:"Specify an array of objects that specify paths for projects. Used in project references.",removeComments:"Disable emitting comments.",resolveJsonModule:"Enable importing .json files.",rootDir:"Specify the root folder within your source files.",rootDirs:"Allow multiple folders to be treated as one when resolving modules.",skipDefaultLibCheck:"Skip type checking .d.ts files that are included with TypeScript.",skipLibCheck:"Skip type checking all .d.ts files.",sourceMap:"Create source map files for emitted JavaScript files.",sourceRoot:"Specify the root path for debuggers to find the reference source code.",strict:"Enable all strict type-checking options.",strictBindCallApply:"Check that the arguments for `bind`, `call`, and `apply` methods match the original function.",strictFunctionTypes:"When assigning functions, check to ensure parameters and the return values are subtype-compatible.",strictNullChecks:"When type checking, take into account `null` and `undefined`.",strictPropertyInitialization:"Check for class properties that are declared but not set in the constructor.",stripInternal:"Disable emitting declarations that have `@internal` in their JSDoc comments.",suppressExcessPropertyErrors:"Disable reporting of excess property errors during the creation of object literals.",suppressImplicitAnyIndexErrors:"Suppress [`noImplicitAny`](#noImplicitAny) errors when indexing objects that lack index signatures.",synchronousWatchDirectory:"Synchronously call callbacks and update the state of directory watchers on platforms that don`t support recursive watching natively.",target:"Set the JavaScript language version for emitted JavaScript and include compatible library declarations.",traceResolution:"Log paths used during the [`moduleResolution`](#moduleResolution) process.",tsBuildInfoFile:"Specify the folder for .tsbuildinfo incremental compilation files.",typeAcquisition:"Specify options for automatic acquisition of declaration files.",typeRoots:"Specify multiple folders that act like `./node_modules/@types`.",types:"Specify type package names to be included without being referenced in a source file.",useDefineForClassFields:"Emit ECMAScript-standard-compliant class fields.",useUnknownInCatchVariables:"Default catch clause variables as `unknown` instead of `any`.",verbose:"Enable verbose logging.",watchDirectory:"Specify how directories are watched on systems that lack recursive file-watching functionality.",watchFile:"Specify how the TypeScript watch mode works."};function y(e,t,i){var n="";return n+=l(t,i,["tsconfig","lsp"]),i.title&&(n+='
    '+i.title+"
    "),t.langId&&(n+='
    '+t.langId+"
    "),n+="
    ",e.forEach((function(e){0===e.length?n+="
    ":(n+="
    ",e.forEach((function(e){if(function(e){return!!e.explanation&&e.explanation.find((function(e){return e.scopes.find((function(e){return e.scopeName.includes("support.type.property-name")}))}))}(e)&&function(e){if('"'!==e.content)return e.content.slice(1,e.content.length-1)in m}(e)){var t=e.content.slice(1,e.content.length-1);n+='""'}else n+=''+o(e.content)+""})),n+="
    ")})),n=n.replace(/\n*$/,""),n+="
    "}var v=null,w={plainTextRenderer:c,defaultShikiRenderer:g,twoslashRenderer:p,tsconfigJSONRenderer:y};exports.createShikiHighlighter=function(t){return v?Promise.resolve(v):e.getHighlighter(t).then((function(e){return v=e}))},exports.renderCodeToHTML=function(e,t,n,r,o,a){if(!o&&!v)throw new Error("The highlighter object hasn't been initialised via `setupHighLighter` yet in shiki-twoslash");var s,l=o||v,d=i({fg:l.getForegroundColor(),bg:l.getBackgroundColor()},r);try{s=l.codeToThemedTokens(e,"jsx"===t?"tsx":t)}catch(i){var u="\x3c!-- Note from shiki-twoslash: the language "+t+" was not set up for Shiki to use, and so there is no code highlighting --\x3e";return c(e,d,n)+u}return t&&n.twoslash&&a?p(s,i({},d,{langId:t}),a,n):t&&t.startsWith("json")&&n.tsconfig?y(s,d,n):g(s,i({},d,{langId:t}),n)},exports.renderers=w,exports.runTwoSlash=function(e,i,n){void 0===n&&(n={});var r=e,o={json5:"json",yml:"yaml"};if(o[i]&&(i=o[i]),["tsx","jsx"].includes(i)&&!n.disableImplicitReactImport&&!/^import\s+React(?:.*)\s+from\s+('|")react\1/gm.test(r)){var a="import React from 'react'\n",s="// ---cut---\n";r=r.includes(s)?r.split(s).map((function(e,t){return 0==t?a.concat(e):e})).join(s):[a,s,r].join("")}return n.customTags=["annotate","log","warn","error"],t.twoslasher(r,i,n)}; //# sourceMappingURL=shiki-twoslash.cjs.production.min.js.map