zudoku 0.63.1 → 0.64.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client.d.ts +8 -0
- package/dist/config/config.d.ts +3 -1
- package/dist/config/validators/BuildSchema.d.ts +5 -4
- package/dist/config/validators/BuildSchema.js +5 -2
- package/dist/config/validators/BuildSchema.js.map +1 -1
- package/dist/config/validators/InputNavigationSchema.d.ts +20 -20
- package/dist/config/validators/validate.d.ts +10 -12
- package/dist/config/validators/validate.js +8 -8
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/flat-config.d.ts +6 -1
- package/dist/lib/authentication/authentication.d.ts +14 -9
- package/dist/lib/authentication/components/OAuthErrorPage.js +1 -1
- package/dist/lib/authentication/components/OAuthErrorPage.js.map +1 -1
- package/dist/lib/authentication/components/SignIn.js +6 -5
- package/dist/lib/authentication/components/SignIn.js.map +1 -1
- package/dist/lib/authentication/components/SignOut.js +6 -6
- package/dist/lib/authentication/components/SignOut.js.map +1 -1
- package/dist/lib/authentication/components/SignUp.js +5 -5
- package/dist/lib/authentication/components/SignUp.js.map +1 -1
- package/dist/lib/authentication/hook.d.ts +3 -2
- package/dist/lib/authentication/hook.js +12 -8
- package/dist/lib/authentication/hook.js.map +1 -1
- package/dist/lib/authentication/providers/auth0.js +1 -1
- package/dist/lib/authentication/providers/auth0.js.map +1 -1
- package/dist/lib/authentication/providers/azureb2c.d.ts +4 -4
- package/dist/lib/authentication/providers/azureb2c.js +3 -3
- package/dist/lib/authentication/providers/azureb2c.js.map +1 -1
- package/dist/lib/authentication/providers/clerk.js +2 -2
- package/dist/lib/authentication/providers/clerk.js.map +1 -1
- package/dist/lib/authentication/providers/openid.d.ts +7 -7
- package/dist/lib/authentication/providers/openid.js +5 -3
- package/dist/lib/authentication/providers/openid.js.map +1 -1
- package/dist/lib/authentication/providers/supabase/SupabaseAuthUI.d.ts +8 -0
- package/dist/lib/authentication/providers/supabase/SupabaseAuthUI.js +39 -0
- package/dist/lib/authentication/providers/supabase/SupabaseAuthUI.js.map +1 -0
- package/dist/lib/authentication/providers/supabase.js +35 -31
- package/dist/lib/authentication/providers/supabase.js.map +1 -1
- package/dist/lib/authentication/state.d.ts +1 -5
- package/dist/lib/authentication/state.js +2 -14
- package/dist/lib/authentication/state.js.map +1 -1
- package/dist/lib/components/Zudoku.js +3 -3
- package/dist/lib/components/index.d.ts +2 -2
- package/dist/lib/components/navigation/Toc.js +1 -1
- package/dist/lib/components/navigation/Toc.js.map +1 -1
- package/dist/lib/core/RouteGuard.d.ts +1 -1
- package/dist/lib/core/RouteGuard.js +6 -14
- package/dist/lib/core/RouteGuard.js.map +1 -1
- package/dist/lib/core/__internal.d.ts +1 -1
- package/dist/lib/hooks/index.d.ts +2 -2
- package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js +1 -1
- package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.js +12 -2
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/RequestLoginDialog.d.ts +2 -1
- package/dist/lib/plugins/openapi/playground/RequestLoginDialog.js +10 -2
- package/dist/lib/plugins/openapi/playground/RequestLoginDialog.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/Highlight.d.ts +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.js +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +23 -21
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/useRememberSkipLoginDialog.js +2 -0
- package/dist/lib/plugins/openapi/playground/useRememberSkipLoginDialog.js.map +1 -1
- package/dist/lib/plugins/openapi/util/generateSchemaExample.js +7 -0
- package/dist/lib/plugins/openapi/util/generateSchemaExample.js.map +1 -1
- package/dist/lib/shiki.d.ts +1 -1
- package/dist/lib/shiki.js +13 -2
- package/dist/lib/shiki.js.map +1 -1
- package/dist/lib/ui/Callout.d.ts +5 -5
- package/dist/lib/ui/Callout.js +5 -5
- package/dist/lib/ui/Callout.js.map +1 -1
- package/dist/lib/ui/EmbeddedCodeBlock.d.ts +3 -1
- package/dist/lib/ui/EmbeddedCodeBlock.js +2 -2
- package/dist/lib/ui/EmbeddedCodeBlock.js.map +1 -1
- package/dist/lib/ui/ReactComponentDoc.d.ts +1 -1
- package/dist/lib/ui/ReactComponentDoc.js +2 -2
- package/dist/lib/ui/ReactComponentDoc.js.map +1 -1
- package/dist/lib/ui/SyntaxHighlight.d.ts +1 -0
- package/dist/lib/ui/SyntaxHighlight.js.map +1 -1
- package/dist/lib/util/MdxComponents.d.ts +2 -1
- package/dist/lib/util/MdxComponents.js +3 -2
- package/dist/lib/util/MdxComponents.js.map +1 -1
- package/dist/lib/util/syncZustandState.d.ts +5 -0
- package/dist/lib/util/syncZustandState.js +14 -0
- package/dist/lib/util/syncZustandState.js.map +1 -0
- package/dist/vite/api/SchemaManager.d.ts +3 -1
- package/dist/vite/api/SchemaManager.js +22 -3
- package/dist/vite/api/SchemaManager.js.map +1 -1
- package/dist/vite/api/SchemaManager.test.js +2 -2
- package/dist/vite/api/SchemaManager.test.js.map +1 -1
- package/dist/vite/plugin-api.js +14 -5
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/plugin-mdx.js +36 -30
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/lib/{ErrorAlert-VBJ8aHH7.js → ErrorAlert-DE3Sf66a.js} +1711 -1772
- package/lib/ErrorAlert-DE3Sf66a.js.map +1 -0
- package/lib/{MdxPage-1xaNI6q_.js → MdxPage-DZfeC0QY.js} +8 -8
- package/lib/{MdxPage-1xaNI6q_.js.map → MdxPage-DZfeC0QY.js.map} +1 -1
- package/lib/{OAuthErrorPage-Du_4sFER.js → OAuthErrorPage-BycMozgn.js} +8 -8
- package/lib/{OAuthErrorPage-Du_4sFER.js.map → OAuthErrorPage-BycMozgn.js.map} +1 -1
- package/lib/{OasProvider-0xiB5cKH.js → OasProvider-1XEOsIiW.js} +3 -3
- package/lib/{OasProvider-0xiB5cKH.js.map → OasProvider-1XEOsIiW.js.map} +1 -1
- package/lib/{OperationList-BzWKTkNq.js → OperationList-DCJw6wXL.js} +113 -109
- package/lib/OperationList-DCJw6wXL.js.map +1 -0
- package/lib/{Pagination-DOcPyfy_.js → Pagination-CJszmeSA.js} +3 -3
- package/lib/{Pagination-DOcPyfy_.js.map → Pagination-CJszmeSA.js.map} +1 -1
- package/lib/RouteGuard-DhU3LRr1.js +81 -0
- package/lib/RouteGuard-DhU3LRr1.js.map +1 -0
- package/lib/{RouterError-fm21cqlj.js → RouterError-VDLnrFqF.js} +5 -5
- package/lib/{RouterError-fm21cqlj.js.map → RouterError-VDLnrFqF.js.map} +1 -1
- package/lib/{SchemaList-Dea2Skqv.js → SchemaList-qOHkDzSz.js} +7 -7
- package/lib/{SchemaList-Dea2Skqv.js.map → SchemaList-qOHkDzSz.js.map} +1 -1
- package/lib/{SchemaView-H9glU5P7.js → SchemaView-D3hm65cc.js} +3 -3
- package/lib/{SchemaView-H9glU5P7.js.map → SchemaView-D3hm65cc.js.map} +1 -1
- package/lib/{Select-CPoGZU_V.js → Select-C1DeCqKv.js} +3 -3
- package/lib/{Select-CPoGZU_V.js.map → Select-C1DeCqKv.js.map} +1 -1
- package/lib/SignUp-6SGx9Yyq.js +50 -0
- package/lib/SignUp-6SGx9Yyq.js.map +1 -0
- package/lib/{SyntaxHighlight-B0laqAqK.js → SyntaxHighlight-zvlnSnHB.js} +789 -778
- package/lib/{SyntaxHighlight-B0laqAqK.js.map → SyntaxHighlight-zvlnSnHB.js.map} +1 -1
- package/lib/{Toc-KzXCRqrX.js → Toc-Da9yp7lo.js} +5 -5
- package/lib/Toc-Da9yp7lo.js.map +1 -0
- package/lib/{ZudokuContext-BXTZApgy.js → ZudokuContext-BUZ5hkWB.js} +33 -31
- package/lib/ZudokuContext-BUZ5hkWB.js.map +1 -0
- package/lib/{chunk-PVWAREVJ-BO6B-RAk.js → chunk-PVWAREVJ-BMhpCH5D.js} +7 -7
- package/lib/{chunk-PVWAREVJ-BO6B-RAk.js.map → chunk-PVWAREVJ-BMhpCH5D.js.map} +1 -1
- package/lib/{circular-OGtD_zFg.js → circular-CSSuz-LS.js} +2 -2
- package/lib/{circular-OGtD_zFg.js.map → circular-CSSuz-LS.js.map} +1 -1
- package/lib/{createServer-DyUc5BPr.js → createServer-CLbcVLbK.js} +4 -4
- package/lib/{createServer-DyUc5BPr.js.map → createServer-CLbcVLbK.js.map} +1 -1
- package/lib/{errors-7_i0Oyw4.js → errors-CuGgh3hf.js} +2 -2
- package/lib/{errors-7_i0Oyw4.js.map → errors-CuGgh3hf.js.map} +1 -1
- package/lib/hook-CMeoxziF.js +40 -0
- package/lib/hook-CMeoxziF.js.map +1 -0
- package/lib/{index-CLJGtw_S.js → index-B1rmok4X.js} +7 -7
- package/lib/{index-CLJGtw_S.js.map → index-B1rmok4X.js.map} +1 -1
- package/lib/{index-PdgTSEkk.js → index-RNAxx6IF.js} +853 -793
- package/lib/index-RNAxx6IF.js.map +1 -0
- package/lib/{index-C5L4favO.js → index-rYHsvtTo.js} +2 -2
- package/lib/{index-C5L4favO.js.map → index-rYHsvtTo.js.map} +1 -1
- package/lib/{mutation-CdGPxHNX.js → mutation-BSU0xu4m.js} +2 -2
- package/lib/{mutation-CdGPxHNX.js.map → mutation-BSU0xu4m.js.map} +1 -1
- package/lib/ui/Callout.js +18 -18
- package/lib/ui/Callout.js.map +1 -1
- package/lib/ui/CodeBlock.js +217 -7
- package/lib/ui/CodeBlock.js.map +1 -1
- package/lib/ui/EmbeddedCodeBlock.js +22 -19
- package/lib/ui/EmbeddedCodeBlock.js.map +1 -1
- package/lib/ui/ReactComponentDoc.js +13 -13
- package/lib/ui/ReactComponentDoc.js.map +1 -1
- package/lib/ui/SyntaxHighlight.js +3 -3
- package/lib/{useExposedProps-Cd7Yg_uG.js → useExposedProps-U3pmsHaG.js} +2 -2
- package/lib/{useExposedProps-Cd7Yg_uG.js.map → useExposedProps-U3pmsHaG.js.map} +1 -1
- package/lib/zudoku.__internal.js +7 -7
- package/lib/zudoku.auth-auth0.js +13 -13
- package/lib/zudoku.auth-auth0.js.map +1 -1
- package/lib/zudoku.auth-azureb2c.js +28 -28
- package/lib/zudoku.auth-azureb2c.js.map +1 -1
- package/lib/zudoku.auth-clerk.js +40 -40
- package/lib/zudoku.auth-clerk.js.map +1 -1
- package/lib/zudoku.auth-openid.js +53 -56
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.auth-supabase.js +111 -52
- package/lib/zudoku.auth-supabase.js.map +1 -1
- package/lib/zudoku.components.js +6 -6
- package/lib/zudoku.hooks.js +4 -4
- package/lib/zudoku.plugin-api-catalog.js +5 -5
- package/lib/zudoku.plugin-api-keys.js +99 -99
- package/lib/zudoku.plugin-custom-pages.js +1 -1
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-openapi.js +3 -3
- package/lib/zudoku.plugin-redirect.js +1 -1
- package/lib/zudoku.plugin-search-pagefind.js +38 -38
- package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
- package/lib/zudoku.router.js +2 -2
- package/package.json +16 -8
- package/src/app/main.css +19 -9
- package/src/lib/authentication/authentication.ts +19 -3
- package/src/lib/authentication/components/OAuthErrorPage.tsx +1 -1
- package/src/lib/authentication/components/SignIn.tsx +7 -5
- package/src/lib/authentication/components/SignOut.tsx +7 -6
- package/src/lib/authentication/components/SignUp.tsx +5 -8
- package/src/lib/authentication/hook.ts +21 -10
- package/src/lib/authentication/providers/auth0.tsx +2 -1
- package/src/lib/authentication/providers/azureb2c.tsx +10 -3
- package/src/lib/authentication/providers/clerk.tsx +9 -2
- package/src/lib/authentication/providers/openid.tsx +20 -15
- package/src/lib/authentication/providers/supabase/SupabaseAuthUI.tsx +75 -0
- package/src/lib/authentication/providers/supabase.tsx +59 -43
- package/src/lib/authentication/state.ts +3 -23
- package/src/lib/components/Zudoku.tsx +3 -3
- package/src/lib/components/navigation/Toc.tsx +3 -3
- package/src/lib/core/RouteGuard.tsx +33 -13
- package/src/lib/plugins/openapi/playground/CollapsibleHeader.tsx +2 -2
- package/src/lib/plugins/openapi/playground/Playground.tsx +13 -2
- package/src/lib/plugins/openapi/playground/RequestLoginDialog.tsx +20 -1
- package/src/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.tsx +2 -2
- package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +102 -58
- package/src/lib/plugins/openapi/playground/result-panel/ResultPanel.tsx +1 -1
- package/src/lib/plugins/openapi/playground/useRememberSkipLoginDialog.tsx +3 -0
- package/src/lib/plugins/openapi/util/generateSchemaExample.ts +10 -0
- package/src/lib/shiki.ts +16 -2
- package/src/lib/ui/Callout.tsx +10 -5
- package/src/lib/ui/EmbeddedCodeBlock.tsx +6 -3
- package/src/lib/ui/ReactComponentDoc.tsx +17 -17
- package/src/lib/ui/SyntaxHighlight.tsx +6 -1
- package/src/lib/util/MdxComponents.tsx +3 -5
- package/src/lib/util/syncZustandState.ts +22 -0
- package/lib/CodeBlock-CanTUJLl.js +0 -221
- package/lib/CodeBlock-CanTUJLl.js.map +0 -1
- package/lib/ErrorAlert-VBJ8aHH7.js.map +0 -1
- package/lib/OperationList-BzWKTkNq.js.map +0 -1
- package/lib/RouteGuard-Bg0Lu0OU.js +0 -56
- package/lib/RouteGuard-Bg0Lu0OU.js.map +0 -1
- package/lib/SignUp-DUZ4yUmQ.js +0 -56
- package/lib/SignUp-DUZ4yUmQ.js.map +0 -1
- package/lib/Toc-KzXCRqrX.js.map +0 -1
- package/lib/ZudokuContext-BXTZApgy.js.map +0 -1
- package/lib/hook-CAebs2rv.js +0 -31
- package/lib/hook-CAebs2rv.js.map +0 -1
- package/lib/index-PdgTSEkk.js.map +0 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { j as at } from "./jsx-runtime-BzflLqGi.js";
|
|
2
|
-
import { Fragment as
|
|
3
|
-
import { a as
|
|
4
|
-
import { c as
|
|
5
|
-
import { g as
|
|
6
|
-
import {
|
|
7
|
-
import { EmbeddedCodeBlock as
|
|
8
|
-
function
|
|
2
|
+
import { createElement as os, Fragment as ss, memo as as } from "react";
|
|
3
|
+
import { a as is } from "./ZudokuContext-BUZ5hkWB.js";
|
|
4
|
+
import { c as Ir } from "./cn-dYga0KKN.js";
|
|
5
|
+
import { g as ls, i as us } from "./invariant-Bm-FVUQE.js";
|
|
6
|
+
import { CodeBlock as cs } from "./ui/CodeBlock.js";
|
|
7
|
+
import { EmbeddedCodeBlock as hs } from "./ui/EmbeddedCodeBlock.js";
|
|
8
|
+
function rh() {
|
|
9
9
|
}
|
|
10
|
-
function
|
|
10
|
+
function oh() {
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function sh(t) {
|
|
13
13
|
const e = [], n = String(t || "");
|
|
14
14
|
let r = n.indexOf(","), o = 0, s = !1;
|
|
15
15
|
for (; !s; ) {
|
|
@@ -19,22 +19,22 @@ function rh(t) {
|
|
|
19
19
|
}
|
|
20
20
|
return e;
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function Nr(t, e) {
|
|
23
23
|
const n = e || {};
|
|
24
24
|
return (t[t.length - 1] === "" ? [...t, ""] : t).join(
|
|
25
25
|
(n.padRight ? " " : "") + "," + (n.padLeft === !1 ? "" : " ")
|
|
26
26
|
).trim();
|
|
27
27
|
}
|
|
28
|
-
const
|
|
28
|
+
const fs = /^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u, ps = /^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u, ds = {};
|
|
29
29
|
function In(t, e) {
|
|
30
|
-
return (
|
|
30
|
+
return (ds.jsx ? ps : fs).test(t);
|
|
31
31
|
}
|
|
32
|
-
const
|
|
32
|
+
const gs = /[ \t\n\f\r]/g;
|
|
33
33
|
function Ct(t) {
|
|
34
34
|
return typeof t == "object" ? t.type === "text" ? Nn(t.value) : !1 : Nn(t);
|
|
35
35
|
}
|
|
36
36
|
function Nn(t) {
|
|
37
|
-
return t.replace(
|
|
37
|
+
return t.replace(gs, "") === "";
|
|
38
38
|
}
|
|
39
39
|
let qe = class {
|
|
40
40
|
/**
|
|
@@ -54,7 +54,7 @@ let qe = class {
|
|
|
54
54
|
qe.prototype.normal = {};
|
|
55
55
|
qe.prototype.property = {};
|
|
56
56
|
qe.prototype.space = void 0;
|
|
57
|
-
function
|
|
57
|
+
function Lr(t, e) {
|
|
58
58
|
const n = {}, r = {};
|
|
59
59
|
for (const o of t)
|
|
60
60
|
Object.assign(n, o.property), Object.assign(r, o.normal);
|
|
@@ -88,10 +88,10 @@ W.prototype.overloadedBoolean = !1;
|
|
|
88
88
|
W.prototype.property = "";
|
|
89
89
|
W.prototype.spaceSeparated = !1;
|
|
90
90
|
W.prototype.space = void 0;
|
|
91
|
-
let
|
|
92
|
-
const x = ye(), $ = ye(),
|
|
91
|
+
let ms = 0;
|
|
92
|
+
const x = ye(), $ = ye(), Pr = ye(), b = ye(), I = ye(), xe = ye(), q = ye();
|
|
93
93
|
function ye() {
|
|
94
|
-
return 2 ** ++
|
|
94
|
+
return 2 ** ++ms;
|
|
95
95
|
}
|
|
96
96
|
const Ht = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
97
97
|
__proto__: null,
|
|
@@ -100,7 +100,7 @@ const Ht = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
100
100
|
commaOrSpaceSeparated: q,
|
|
101
101
|
commaSeparated: xe,
|
|
102
102
|
number: b,
|
|
103
|
-
overloadedBoolean:
|
|
103
|
+
overloadedBoolean: Pr,
|
|
104
104
|
spaceSeparated: I
|
|
105
105
|
}, Symbol.toStringTag, { value: "Module" })), At = (
|
|
106
106
|
/** @type {ReadonlyArray<keyof typeof types>} */
|
|
@@ -146,7 +146,7 @@ function Ie(t) {
|
|
|
146
146
|
}
|
|
147
147
|
return new qe(e, n, t.space);
|
|
148
148
|
}
|
|
149
|
-
const
|
|
149
|
+
const $r = Ie({
|
|
150
150
|
properties: {
|
|
151
151
|
ariaActiveDescendant: null,
|
|
152
152
|
ariaAtomic: $,
|
|
@@ -202,13 +202,13 @@ const Pr = Ie({
|
|
|
202
202
|
return e === "role" ? e : "aria-" + e.slice(4).toLowerCase();
|
|
203
203
|
}
|
|
204
204
|
});
|
|
205
|
-
function
|
|
205
|
+
function Tr(t, e) {
|
|
206
206
|
return e in t ? t[e] : e;
|
|
207
207
|
}
|
|
208
|
-
function
|
|
209
|
-
return
|
|
208
|
+
function Mr(t, e) {
|
|
209
|
+
return Tr(t, e.toLowerCase());
|
|
210
210
|
}
|
|
211
|
-
const
|
|
211
|
+
const ys = Ie({
|
|
212
212
|
attributes: {
|
|
213
213
|
acceptcharset: "accept-charset",
|
|
214
214
|
classname: "class",
|
|
@@ -256,7 +256,7 @@ const ms = Ie({
|
|
|
256
256
|
dir: null,
|
|
257
257
|
dirName: null,
|
|
258
258
|
disabled: x,
|
|
259
|
-
download:
|
|
259
|
+
download: Pr,
|
|
260
260
|
draggable: $,
|
|
261
261
|
encType: null,
|
|
262
262
|
enterKeyHint: null,
|
|
@@ -568,8 +568,8 @@ const ms = Ie({
|
|
|
568
568
|
unselectable: null
|
|
569
569
|
},
|
|
570
570
|
space: "html",
|
|
571
|
-
transform:
|
|
572
|
-
}),
|
|
571
|
+
transform: Mr
|
|
572
|
+
}), bs = Ie({
|
|
573
573
|
attributes: {
|
|
574
574
|
accentHeight: "accent-height",
|
|
575
575
|
alignmentBaseline: "alignment-baseline",
|
|
@@ -1127,8 +1127,8 @@ const ms = Ie({
|
|
|
1127
1127
|
zoomAndPan: null
|
|
1128
1128
|
},
|
|
1129
1129
|
space: "svg",
|
|
1130
|
-
transform:
|
|
1131
|
-
}),
|
|
1130
|
+
transform: Tr
|
|
1131
|
+
}), Or = Ie({
|
|
1132
1132
|
properties: {
|
|
1133
1133
|
xLinkActuate: null,
|
|
1134
1134
|
xLinkArcRole: null,
|
|
@@ -1142,18 +1142,18 @@ const ms = Ie({
|
|
|
1142
1142
|
transform(t, e) {
|
|
1143
1143
|
return "xlink:" + e.slice(5).toLowerCase();
|
|
1144
1144
|
}
|
|
1145
|
-
}),
|
|
1145
|
+
}), Dr = Ie({
|
|
1146
1146
|
attributes: { xmlnsxlink: "xmlns:xlink" },
|
|
1147
1147
|
properties: { xmlnsXLink: null, xmlns: null },
|
|
1148
1148
|
space: "xmlns",
|
|
1149
|
-
transform:
|
|
1150
|
-
}),
|
|
1149
|
+
transform: Mr
|
|
1150
|
+
}), Gr = Ie({
|
|
1151
1151
|
properties: { xmlBase: null, xmlLang: null, xmlSpace: null },
|
|
1152
1152
|
space: "xml",
|
|
1153
1153
|
transform(t, e) {
|
|
1154
1154
|
return "xml:" + e.slice(3).toLowerCase();
|
|
1155
1155
|
}
|
|
1156
|
-
}),
|
|
1156
|
+
}), ws = {
|
|
1157
1157
|
classId: "classID",
|
|
1158
1158
|
dataType: "datatype",
|
|
1159
1159
|
itemId: "itemID",
|
|
@@ -1171,20 +1171,20 @@ const ms = Ie({
|
|
|
1171
1171
|
xLinkTitle: "xlinkTitle",
|
|
1172
1172
|
xLinkType: "xlinkType",
|
|
1173
1173
|
xmlnsXLink: "xmlnsXlink"
|
|
1174
|
-
},
|
|
1175
|
-
function
|
|
1174
|
+
}, Cs = /[A-Z]/g, Pn = /-[a-z]/g, _s = /^data[-\w.:]+$/i;
|
|
1175
|
+
function Ss(t, e) {
|
|
1176
1176
|
const n = zt(e);
|
|
1177
1177
|
let r = e, o = W;
|
|
1178
1178
|
if (n in t.normal)
|
|
1179
1179
|
return t.property[t.normal[n]];
|
|
1180
|
-
if (n.length > 4 && n.slice(0, 4) === "data" &&
|
|
1180
|
+
if (n.length > 4 && n.slice(0, 4) === "data" && _s.test(e)) {
|
|
1181
1181
|
if (e.charAt(4) === "-") {
|
|
1182
|
-
const s = e.slice(5).replace(Pn,
|
|
1182
|
+
const s = e.slice(5).replace(Pn, vs);
|
|
1183
1183
|
r = "data" + s.charAt(0).toUpperCase() + s.slice(1);
|
|
1184
1184
|
} else {
|
|
1185
1185
|
const s = e.slice(4);
|
|
1186
1186
|
if (!Pn.test(s)) {
|
|
1187
|
-
let a = s.replace(
|
|
1187
|
+
let a = s.replace(Cs, ks);
|
|
1188
1188
|
a.charAt(0) !== "-" && (a = "-" + a), e = "data" + a;
|
|
1189
1189
|
}
|
|
1190
1190
|
}
|
|
@@ -1192,22 +1192,22 @@ function _s(t, e) {
|
|
|
1192
1192
|
}
|
|
1193
1193
|
return new o(r, e);
|
|
1194
1194
|
}
|
|
1195
|
-
function
|
|
1195
|
+
function ks(t) {
|
|
1196
1196
|
return "-" + t.toLowerCase();
|
|
1197
1197
|
}
|
|
1198
|
-
function
|
|
1198
|
+
function vs(t) {
|
|
1199
1199
|
return t.charAt(1).toUpperCase();
|
|
1200
1200
|
}
|
|
1201
|
-
const
|
|
1202
|
-
function
|
|
1201
|
+
const xs = Lr([$r, ys, Or, Dr, Gr], "html"), fn = Lr([$r, bs, Or, Dr, Gr], "svg");
|
|
1202
|
+
function uh(t) {
|
|
1203
1203
|
const e = String(t || "").trim();
|
|
1204
1204
|
return e ? e.split(/[ \t\n\r\f]+/g) : [];
|
|
1205
1205
|
}
|
|
1206
|
-
function
|
|
1206
|
+
function Fr(t) {
|
|
1207
1207
|
return t.join(" ").trim();
|
|
1208
1208
|
}
|
|
1209
1209
|
var we = {}, Rt, $n;
|
|
1210
|
-
function
|
|
1210
|
+
function Es() {
|
|
1211
1211
|
if ($n) return Rt;
|
|
1212
1212
|
$n = 1;
|
|
1213
1213
|
var t = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g, e = /\n/g, n = /^\s*/, r = /^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/, o = /^:\s*/, s = /^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/, a = /^[;\s]*/, i = /^\s+|\s+$/g, l = `
|
|
@@ -1297,14 +1297,14 @@ function xs() {
|
|
|
1297
1297
|
return Rt;
|
|
1298
1298
|
}
|
|
1299
1299
|
var Tn;
|
|
1300
|
-
function
|
|
1300
|
+
function As() {
|
|
1301
1301
|
if (Tn) return we;
|
|
1302
1302
|
Tn = 1;
|
|
1303
1303
|
var t = we && we.__importDefault || function(r) {
|
|
1304
1304
|
return r && r.__esModule ? r : { default: r };
|
|
1305
1305
|
};
|
|
1306
1306
|
Object.defineProperty(we, "__esModule", { value: !0 }), we.default = n;
|
|
1307
|
-
var e = t(
|
|
1307
|
+
var e = t(Es());
|
|
1308
1308
|
function n(r, o) {
|
|
1309
1309
|
var s = null;
|
|
1310
1310
|
if (!r || typeof r != "string")
|
|
@@ -1320,7 +1320,7 @@ function Es() {
|
|
|
1320
1320
|
return we;
|
|
1321
1321
|
}
|
|
1322
1322
|
var Me = {}, Mn;
|
|
1323
|
-
function
|
|
1323
|
+
function Rs() {
|
|
1324
1324
|
if (Mn) return Me;
|
|
1325
1325
|
Mn = 1, Object.defineProperty(Me, "__esModule", { value: !0 }), Me.camelCase = void 0;
|
|
1326
1326
|
var t = /^--[a-zA-Z0-9_-]+$/, e = /-([a-z])/g, n = /^[^-]+$/, r = /^-(webkit|moz|ms|o|khtml)-/, o = /^-(ms)-/, s = function(u) {
|
|
@@ -1335,12 +1335,12 @@ function As() {
|
|
|
1335
1335
|
return Me.camelCase = l, Me;
|
|
1336
1336
|
}
|
|
1337
1337
|
var Oe, On;
|
|
1338
|
-
function
|
|
1338
|
+
function Is() {
|
|
1339
1339
|
if (On) return Oe;
|
|
1340
1340
|
On = 1;
|
|
1341
1341
|
var t = Oe && Oe.__importDefault || function(o) {
|
|
1342
1342
|
return o && o.__esModule ? o : { default: o };
|
|
1343
|
-
}, e = t(
|
|
1343
|
+
}, e = t(As()), n = Rs();
|
|
1344
1344
|
function r(o, s) {
|
|
1345
1345
|
var a = {};
|
|
1346
1346
|
return !o || typeof o != "string" || (0, e.default)(o, function(i, l) {
|
|
@@ -1349,9 +1349,9 @@ function Rs() {
|
|
|
1349
1349
|
}
|
|
1350
1350
|
return r.default = r, Oe = r, Oe;
|
|
1351
1351
|
}
|
|
1352
|
-
var
|
|
1353
|
-
const
|
|
1354
|
-
function
|
|
1352
|
+
var Ns = Is();
|
|
1353
|
+
const Ls = /* @__PURE__ */ ls(Ns), Ps = jr("end"), Br = jr("start");
|
|
1354
|
+
function jr(t) {
|
|
1355
1355
|
return e;
|
|
1356
1356
|
function e(n) {
|
|
1357
1357
|
const r = n && n.position && n.position[t] || {};
|
|
@@ -1363,12 +1363,12 @@ function Br(t) {
|
|
|
1363
1363
|
};
|
|
1364
1364
|
}
|
|
1365
1365
|
}
|
|
1366
|
-
function
|
|
1367
|
-
const e =
|
|
1366
|
+
function ch(t) {
|
|
1367
|
+
const e = Br(t), n = Ps(t);
|
|
1368
1368
|
if (e && n)
|
|
1369
1369
|
return { start: e, end: n };
|
|
1370
1370
|
}
|
|
1371
|
-
function
|
|
1371
|
+
function $s(t) {
|
|
1372
1372
|
return !t || typeof t != "object" ? "" : "position" in t || "type" in t ? Dn(t.position) : "start" in t || "end" in t ? Dn(t) : "line" in t || "column" in t ? Wt(t) : "";
|
|
1373
1373
|
}
|
|
1374
1374
|
function Wt(t) {
|
|
@@ -1451,7 +1451,7 @@ class H extends Error {
|
|
|
1451
1451
|
l && (s.place = l.position);
|
|
1452
1452
|
}
|
|
1453
1453
|
const i = s.place && "start" in s.place ? s.place.start : s.place;
|
|
1454
|
-
this.ancestors = s.ancestors || void 0, this.cause = s.cause || void 0, this.column = i ? i.column : void 0, this.fatal = void 0, this.file, this.message = o, this.line = i ? i.line : void 0, this.name =
|
|
1454
|
+
this.ancestors = s.ancestors || void 0, this.cause = s.cause || void 0, this.column = i ? i.column : void 0, this.fatal = void 0, this.file, this.message = o, this.line = i ? i.line : void 0, this.name = $s(s.place) || "1:1", this.place = s.place || void 0, this.reason = this.message, this.ruleId = s.ruleId || void 0, this.source = s.source || void 0, this.stack = a && s.cause && typeof s.cause.stack == "string" ? s.cause.stack : "", this.actual, this.expected, this.note, this.url;
|
|
1455
1455
|
}
|
|
1456
1456
|
}
|
|
1457
1457
|
H.prototype.file = "";
|
|
@@ -1467,8 +1467,8 @@ H.prototype.fatal = void 0;
|
|
|
1467
1467
|
H.prototype.place = void 0;
|
|
1468
1468
|
H.prototype.ruleId = void 0;
|
|
1469
1469
|
H.prototype.source = void 0;
|
|
1470
|
-
const pn = {}.hasOwnProperty,
|
|
1471
|
-
function
|
|
1470
|
+
const pn = {}.hasOwnProperty, Ts = /* @__PURE__ */ new Map(), Ms = /[A-Z]/g, Os = /* @__PURE__ */ new Set(["table", "tbody", "thead", "tfoot", "tr"]), Ds = /* @__PURE__ */ new Set(["td", "th"]), Ur = "https://github.com/syntax-tree/hast-util-to-jsx-runtime";
|
|
1471
|
+
function Gs(t, e) {
|
|
1472
1472
|
if (!e || e.Fragment === void 0)
|
|
1473
1473
|
throw new TypeError("Expected `Fragment` in options");
|
|
1474
1474
|
const n = e.filePath || void 0;
|
|
@@ -1478,13 +1478,13 @@ function Ds(t, e) {
|
|
|
1478
1478
|
throw new TypeError(
|
|
1479
1479
|
"Expected `jsxDEV` in options when `development: true`"
|
|
1480
1480
|
);
|
|
1481
|
-
r =
|
|
1481
|
+
r = Vs(n, e.jsxDEV);
|
|
1482
1482
|
} else {
|
|
1483
1483
|
if (typeof e.jsx != "function")
|
|
1484
1484
|
throw new TypeError("Expected `jsx` in production options");
|
|
1485
1485
|
if (typeof e.jsxs != "function")
|
|
1486
1486
|
throw new TypeError("Expected `jsxs` in production options");
|
|
1487
|
-
r =
|
|
1487
|
+
r = Ws(n, e.jsx, e.jsxs);
|
|
1488
1488
|
}
|
|
1489
1489
|
const o = {
|
|
1490
1490
|
Fragment: e.Fragment,
|
|
@@ -1497,10 +1497,10 @@ function Ds(t, e) {
|
|
|
1497
1497
|
ignoreInvalidStyle: e.ignoreInvalidStyle || !1,
|
|
1498
1498
|
passKeys: e.passKeys !== !1,
|
|
1499
1499
|
passNode: e.passNode || !1,
|
|
1500
|
-
schema: e.space === "svg" ? fn :
|
|
1500
|
+
schema: e.space === "svg" ? fn : xs,
|
|
1501
1501
|
stylePropertyNameCase: e.stylePropertyNameCase || "dom",
|
|
1502
1502
|
tableCellAlignToStyle: e.tableCellAlignToStyle !== !1
|
|
1503
|
-
}, s =
|
|
1503
|
+
}, s = zr(o, t, void 0);
|
|
1504
1504
|
return s && typeof s != "string" ? s : o.create(
|
|
1505
1505
|
t,
|
|
1506
1506
|
o.Fragment,
|
|
@@ -1508,31 +1508,31 @@ function Ds(t, e) {
|
|
|
1508
1508
|
void 0
|
|
1509
1509
|
);
|
|
1510
1510
|
}
|
|
1511
|
-
function
|
|
1511
|
+
function zr(t, e, n) {
|
|
1512
1512
|
if (e.type === "element")
|
|
1513
|
-
return
|
|
1513
|
+
return Fs(t, e, n);
|
|
1514
1514
|
if (e.type === "mdxFlowExpression" || e.type === "mdxTextExpression")
|
|
1515
|
-
return
|
|
1515
|
+
return Bs(t, e);
|
|
1516
1516
|
if (e.type === "mdxJsxFlowElement" || e.type === "mdxJsxTextElement")
|
|
1517
|
-
return
|
|
1517
|
+
return Us(t, e, n);
|
|
1518
1518
|
if (e.type === "mdxjsEsm")
|
|
1519
|
-
return
|
|
1519
|
+
return js(t, e);
|
|
1520
1520
|
if (e.type === "root")
|
|
1521
|
-
return
|
|
1521
|
+
return zs(t, e, n);
|
|
1522
1522
|
if (e.type === "text")
|
|
1523
|
-
return
|
|
1523
|
+
return Hs(t, e);
|
|
1524
1524
|
}
|
|
1525
|
-
function
|
|
1525
|
+
function Fs(t, e, n) {
|
|
1526
1526
|
const r = t.schema;
|
|
1527
1527
|
let o = r;
|
|
1528
1528
|
e.tagName.toLowerCase() === "svg" && r.space === "html" && (o = fn, t.schema = o), t.ancestors.push(e);
|
|
1529
|
-
const s =
|
|
1529
|
+
const s = Wr(t, e.tagName, !1), a = qs(t, e);
|
|
1530
1530
|
let i = gn(t, e);
|
|
1531
|
-
return
|
|
1531
|
+
return Os.has(e.tagName) && (i = i.filter(function(l) {
|
|
1532
1532
|
return typeof l == "string" ? !Ct(l) : !0;
|
|
1533
|
-
})),
|
|
1533
|
+
})), Hr(t, a, s, e), dn(a, i), t.ancestors.pop(), t.schema = r, t.create(e, s, a, n);
|
|
1534
1534
|
}
|
|
1535
|
-
function
|
|
1535
|
+
function Bs(t, e) {
|
|
1536
1536
|
if (e.data && e.data.estree && t.evaluater) {
|
|
1537
1537
|
const r = e.data.estree.body[0];
|
|
1538
1538
|
return r.type, /** @type {Child | undefined} */
|
|
@@ -1540,7 +1540,7 @@ function Fs(t, e) {
|
|
|
1540
1540
|
}
|
|
1541
1541
|
je(t, e.position);
|
|
1542
1542
|
}
|
|
1543
|
-
function
|
|
1543
|
+
function js(t, e) {
|
|
1544
1544
|
if (e.data && e.data.estree && t.evaluater)
|
|
1545
1545
|
return (
|
|
1546
1546
|
/** @type {Child | undefined} */
|
|
@@ -1548,21 +1548,21 @@ function Bs(t, e) {
|
|
|
1548
1548
|
);
|
|
1549
1549
|
je(t, e.position);
|
|
1550
1550
|
}
|
|
1551
|
-
function
|
|
1551
|
+
function Us(t, e, n) {
|
|
1552
1552
|
const r = t.schema;
|
|
1553
1553
|
let o = r;
|
|
1554
1554
|
e.name === "svg" && r.space === "html" && (o = fn, t.schema = o), t.ancestors.push(e);
|
|
1555
|
-
const s = e.name === null ? t.Fragment :
|
|
1556
|
-
return
|
|
1555
|
+
const s = e.name === null ? t.Fragment : Wr(t, e.name, !0), a = Xs(t, e), i = gn(t, e);
|
|
1556
|
+
return Hr(t, a, s, e), dn(a, i), t.ancestors.pop(), t.schema = r, t.create(e, s, a, n);
|
|
1557
1557
|
}
|
|
1558
|
-
function
|
|
1558
|
+
function zs(t, e, n) {
|
|
1559
1559
|
const r = {};
|
|
1560
1560
|
return dn(r, gn(t, e)), t.create(e, t.Fragment, r, n);
|
|
1561
1561
|
}
|
|
1562
|
-
function
|
|
1562
|
+
function Hs(t, e) {
|
|
1563
1563
|
return e.value;
|
|
1564
1564
|
}
|
|
1565
|
-
function
|
|
1565
|
+
function Hr(t, e, n, r) {
|
|
1566
1566
|
typeof n != "string" && n !== t.Fragment && t.passNode && (e.node = r);
|
|
1567
1567
|
}
|
|
1568
1568
|
function dn(t, e) {
|
|
@@ -1571,17 +1571,17 @@ function dn(t, e) {
|
|
|
1571
1571
|
n && (t.children = n);
|
|
1572
1572
|
}
|
|
1573
1573
|
}
|
|
1574
|
-
function
|
|
1574
|
+
function Ws(t, e, n) {
|
|
1575
1575
|
return r;
|
|
1576
1576
|
function r(o, s, a, i) {
|
|
1577
1577
|
const u = Array.isArray(a.children) ? n : e;
|
|
1578
1578
|
return i ? u(s, a, i) : u(s, a);
|
|
1579
1579
|
}
|
|
1580
1580
|
}
|
|
1581
|
-
function
|
|
1581
|
+
function Vs(t, e) {
|
|
1582
1582
|
return n;
|
|
1583
1583
|
function n(r, o, s, a) {
|
|
1584
|
-
const i = Array.isArray(s.children), l =
|
|
1584
|
+
const i = Array.isArray(s.children), l = Br(r);
|
|
1585
1585
|
return e(
|
|
1586
1586
|
o,
|
|
1587
1587
|
s,
|
|
@@ -1596,15 +1596,15 @@ function Ws(t, e) {
|
|
|
1596
1596
|
);
|
|
1597
1597
|
}
|
|
1598
1598
|
}
|
|
1599
|
-
function
|
|
1599
|
+
function qs(t, e) {
|
|
1600
1600
|
const n = {};
|
|
1601
1601
|
let r, o;
|
|
1602
1602
|
for (o in e.properties)
|
|
1603
1603
|
if (o !== "children" && pn.call(e.properties, o)) {
|
|
1604
|
-
const s =
|
|
1604
|
+
const s = Ks(t, o, e.properties[o]);
|
|
1605
1605
|
if (s) {
|
|
1606
1606
|
const [a, i] = s;
|
|
1607
|
-
t.tableCellAlignToStyle && a === "align" && typeof i == "string" &&
|
|
1607
|
+
t.tableCellAlignToStyle && a === "align" && typeof i == "string" && Ds.has(e.tagName) ? r = i : n[a] = i;
|
|
1608
1608
|
}
|
|
1609
1609
|
}
|
|
1610
1610
|
if (r) {
|
|
@@ -1616,7 +1616,7 @@ function Vs(t, e) {
|
|
|
1616
1616
|
}
|
|
1617
1617
|
return n;
|
|
1618
1618
|
}
|
|
1619
|
-
function
|
|
1619
|
+
function Xs(t, e) {
|
|
1620
1620
|
const n = {};
|
|
1621
1621
|
for (const r of e.attributes)
|
|
1622
1622
|
if (r.type === "mdxJsxExpressionAttribute")
|
|
@@ -1651,7 +1651,7 @@ function qs(t, e) {
|
|
|
1651
1651
|
function gn(t, e) {
|
|
1652
1652
|
const n = [];
|
|
1653
1653
|
let r = -1;
|
|
1654
|
-
const o = t.passKeys ? /* @__PURE__ */ new Map() :
|
|
1654
|
+
const o = t.passKeys ? /* @__PURE__ */ new Map() : Ts;
|
|
1655
1655
|
for (; ++r < e.children.length; ) {
|
|
1656
1656
|
const s = e.children[r];
|
|
1657
1657
|
let a;
|
|
@@ -1662,27 +1662,27 @@ function gn(t, e) {
|
|
|
1662
1662
|
a = l + "-" + u, o.set(l, u + 1);
|
|
1663
1663
|
}
|
|
1664
1664
|
}
|
|
1665
|
-
const i =
|
|
1665
|
+
const i = zr(t, s, a);
|
|
1666
1666
|
i !== void 0 && n.push(i);
|
|
1667
1667
|
}
|
|
1668
1668
|
return n;
|
|
1669
1669
|
}
|
|
1670
|
-
function
|
|
1671
|
-
const r =
|
|
1670
|
+
function Ks(t, e, n) {
|
|
1671
|
+
const r = Ss(t.schema, e);
|
|
1672
1672
|
if (!(n == null || typeof n == "number" && Number.isNaN(n))) {
|
|
1673
|
-
if (Array.isArray(n) && (n = r.commaSeparated ?
|
|
1674
|
-
let o = typeof n == "object" ? n :
|
|
1675
|
-
return t.stylePropertyNameCase === "css" && (o =
|
|
1673
|
+
if (Array.isArray(n) && (n = r.commaSeparated ? Nr(n) : Fr(n)), r.property === "style") {
|
|
1674
|
+
let o = typeof n == "object" ? n : Ys(t, String(n));
|
|
1675
|
+
return t.stylePropertyNameCase === "css" && (o = Js(o)), ["style", o];
|
|
1676
1676
|
}
|
|
1677
1677
|
return [
|
|
1678
|
-
t.elementAttributeNameCase === "react" && r.space ?
|
|
1678
|
+
t.elementAttributeNameCase === "react" && r.space ? ws[r.property] || r.property : r.attribute,
|
|
1679
1679
|
n
|
|
1680
1680
|
];
|
|
1681
1681
|
}
|
|
1682
1682
|
}
|
|
1683
|
-
function
|
|
1683
|
+
function Ys(t, e) {
|
|
1684
1684
|
try {
|
|
1685
|
-
return
|
|
1685
|
+
return Ls(e, { reactCompat: !0 });
|
|
1686
1686
|
} catch (n) {
|
|
1687
1687
|
if (t.ignoreInvalidStyle)
|
|
1688
1688
|
return {};
|
|
@@ -1695,10 +1695,10 @@ function Ks(t, e) {
|
|
|
1695
1695
|
ruleId: "style",
|
|
1696
1696
|
source: "hast-util-to-jsx-runtime"
|
|
1697
1697
|
});
|
|
1698
|
-
throw o.file = t.filePath || void 0, o.url =
|
|
1698
|
+
throw o.file = t.filePath || void 0, o.url = Ur + "#cannot-parse-style-attribute", o;
|
|
1699
1699
|
}
|
|
1700
1700
|
}
|
|
1701
|
-
function
|
|
1701
|
+
function Wr(t, e, n) {
|
|
1702
1702
|
let r;
|
|
1703
1703
|
if (!n)
|
|
1704
1704
|
r = { type: "Literal", value: e };
|
|
@@ -1739,23 +1739,23 @@ function je(t, e) {
|
|
|
1739
1739
|
source: "hast-util-to-jsx-runtime"
|
|
1740
1740
|
}
|
|
1741
1741
|
);
|
|
1742
|
-
throw n.file = t.filePath || void 0, n.url =
|
|
1742
|
+
throw n.file = t.filePath || void 0, n.url = Ur + "#cannot-handle-mdx-estrees-without-createevaluater", n;
|
|
1743
1743
|
}
|
|
1744
|
-
function
|
|
1744
|
+
function Js(t) {
|
|
1745
1745
|
const e = {};
|
|
1746
1746
|
let n;
|
|
1747
1747
|
for (n in t)
|
|
1748
|
-
pn.call(t, n) && (e[
|
|
1748
|
+
pn.call(t, n) && (e[Zs(n)] = t[n]);
|
|
1749
1749
|
return e;
|
|
1750
1750
|
}
|
|
1751
|
-
function
|
|
1752
|
-
let e = t.replace(
|
|
1751
|
+
function Zs(t) {
|
|
1752
|
+
let e = t.replace(Ms, Qs);
|
|
1753
1753
|
return e.slice(0, 3) === "ms-" && (e = "-" + e), e;
|
|
1754
1754
|
}
|
|
1755
|
-
function
|
|
1755
|
+
function Qs(t) {
|
|
1756
1756
|
return "-" + t.toLowerCase();
|
|
1757
1757
|
}
|
|
1758
|
-
const
|
|
1758
|
+
const Vr = (
|
|
1759
1759
|
// Note: overloads in JSDoc can’t yet use different `@template`s.
|
|
1760
1760
|
/**
|
|
1761
1761
|
* @type {(
|
|
@@ -1772,21 +1772,21 @@ const Wr = (
|
|
|
1772
1772
|
*/
|
|
1773
1773
|
(function(t) {
|
|
1774
1774
|
if (t == null)
|
|
1775
|
-
return
|
|
1775
|
+
return ra;
|
|
1776
1776
|
if (typeof t == "function")
|
|
1777
1777
|
return _t(t);
|
|
1778
1778
|
if (typeof t == "object")
|
|
1779
|
-
return Array.isArray(t) ?
|
|
1779
|
+
return Array.isArray(t) ? ea(t) : ta(t);
|
|
1780
1780
|
if (typeof t == "string")
|
|
1781
|
-
return
|
|
1781
|
+
return na(t);
|
|
1782
1782
|
throw new Error("Expected function, string, or object as test");
|
|
1783
1783
|
})
|
|
1784
1784
|
);
|
|
1785
|
-
function
|
|
1785
|
+
function ea(t) {
|
|
1786
1786
|
const e = [];
|
|
1787
1787
|
let n = -1;
|
|
1788
1788
|
for (; ++n < t.length; )
|
|
1789
|
-
e[n] =
|
|
1789
|
+
e[n] = Vr(t[n]);
|
|
1790
1790
|
return _t(r);
|
|
1791
1791
|
function r(...o) {
|
|
1792
1792
|
let s = -1;
|
|
@@ -1795,7 +1795,7 @@ function Qs(t) {
|
|
|
1795
1795
|
return !1;
|
|
1796
1796
|
}
|
|
1797
1797
|
}
|
|
1798
|
-
function
|
|
1798
|
+
function ta(t) {
|
|
1799
1799
|
const e = (
|
|
1800
1800
|
/** @type {Record<string, unknown>} */
|
|
1801
1801
|
t
|
|
@@ -1813,7 +1813,7 @@ function ea(t) {
|
|
|
1813
1813
|
return !0;
|
|
1814
1814
|
}
|
|
1815
1815
|
}
|
|
1816
|
-
function
|
|
1816
|
+
function na(t) {
|
|
1817
1817
|
return _t(e);
|
|
1818
1818
|
function e(n) {
|
|
1819
1819
|
return n && n.type === t;
|
|
@@ -1822,7 +1822,7 @@ function ta(t) {
|
|
|
1822
1822
|
function _t(t) {
|
|
1823
1823
|
return e;
|
|
1824
1824
|
function e(n, r, o) {
|
|
1825
|
-
return !!(
|
|
1825
|
+
return !!(oa(n) && t.call(
|
|
1826
1826
|
this,
|
|
1827
1827
|
n,
|
|
1828
1828
|
typeof r == "number" ? r : void 0,
|
|
@@ -1830,17 +1830,17 @@ function _t(t) {
|
|
|
1830
1830
|
));
|
|
1831
1831
|
}
|
|
1832
1832
|
}
|
|
1833
|
-
function
|
|
1833
|
+
function ra() {
|
|
1834
1834
|
return !0;
|
|
1835
1835
|
}
|
|
1836
|
-
function
|
|
1836
|
+
function oa(t) {
|
|
1837
1837
|
return t !== null && typeof t == "object" && "type" in t;
|
|
1838
1838
|
}
|
|
1839
|
-
const
|
|
1840
|
-
function
|
|
1839
|
+
const qr = [], sa = !0, Fn = !1, aa = "skip";
|
|
1840
|
+
function ia(t, e, n, r) {
|
|
1841
1841
|
let o;
|
|
1842
1842
|
typeof e == "function" && typeof n != "function" ? (r = n, n = e) : o = e;
|
|
1843
|
-
const s =
|
|
1843
|
+
const s = Vr(o), a = r ? -1 : 1;
|
|
1844
1844
|
i(t, void 0, [])();
|
|
1845
1845
|
function i(l, u, c) {
|
|
1846
1846
|
const h = (
|
|
@@ -1861,15 +1861,15 @@ function aa(t, e, n, r) {
|
|
|
1861
1861
|
}
|
|
1862
1862
|
return p;
|
|
1863
1863
|
function p() {
|
|
1864
|
-
let d =
|
|
1865
|
-
if ((!e || s(l, u, c[c.length - 1] || void 0)) && (d =
|
|
1864
|
+
let d = qr, f, g, C;
|
|
1865
|
+
if ((!e || s(l, u, c[c.length - 1] || void 0)) && (d = la(n(l, c)), d[0] === Fn))
|
|
1866
1866
|
return d;
|
|
1867
1867
|
if ("children" in l && l.children) {
|
|
1868
1868
|
const y = (
|
|
1869
1869
|
/** @type {UnistParent} */
|
|
1870
1870
|
l
|
|
1871
1871
|
);
|
|
1872
|
-
if (y.children && d[0] !==
|
|
1872
|
+
if (y.children && d[0] !== aa)
|
|
1873
1873
|
for (g = (r ? y.children.length : -1) + a, C = c.concat(y); g > -1 && g < y.children.length; ) {
|
|
1874
1874
|
const m = y.children[g];
|
|
1875
1875
|
if (f = i(m, g, C)(), f[0] === Fn)
|
|
@@ -1881,19 +1881,19 @@ function aa(t, e, n, r) {
|
|
|
1881
1881
|
}
|
|
1882
1882
|
}
|
|
1883
1883
|
}
|
|
1884
|
-
function
|
|
1885
|
-
return Array.isArray(t) ? t : typeof t == "number" ? [
|
|
1884
|
+
function la(t) {
|
|
1885
|
+
return Array.isArray(t) ? t : typeof t == "number" ? [sa, t] : t == null ? qr : [t];
|
|
1886
1886
|
}
|
|
1887
|
-
function
|
|
1887
|
+
function Xr(t, e, n, r) {
|
|
1888
1888
|
let o, s, a;
|
|
1889
|
-
typeof e == "function" && typeof n != "function" ? (s = void 0, a = e, o = n) : (s = e, a = n, o = r),
|
|
1889
|
+
typeof e == "function" && typeof n != "function" ? (s = void 0, a = e, o = n) : (s = e, a = n, o = r), ia(t, s, i, o);
|
|
1890
1890
|
function i(l, u) {
|
|
1891
1891
|
const c = u[u.length - 1], h = c ? c.children.indexOf(l) : void 0;
|
|
1892
1892
|
return a(l, h, c);
|
|
1893
1893
|
}
|
|
1894
1894
|
}
|
|
1895
1895
|
const Bn = {}.hasOwnProperty;
|
|
1896
|
-
function
|
|
1896
|
+
function ua(t, e) {
|
|
1897
1897
|
const n = e || {};
|
|
1898
1898
|
function r(o, ...s) {
|
|
1899
1899
|
let a = r.invalid;
|
|
@@ -1907,7 +1907,7 @@ function la(t, e) {
|
|
|
1907
1907
|
}
|
|
1908
1908
|
return r.handlers = n.handlers || {}, r.invalid = n.invalid, r.unknown = n.unknown, r;
|
|
1909
1909
|
}
|
|
1910
|
-
const
|
|
1910
|
+
const ca = [
|
|
1911
1911
|
"area",
|
|
1912
1912
|
"base",
|
|
1913
1913
|
"basefont",
|
|
@@ -1943,33 +1943,33 @@ let F = class extends Error {
|
|
|
1943
1943
|
super(e), this.name = "ShikiError";
|
|
1944
1944
|
}
|
|
1945
1945
|
};
|
|
1946
|
-
function
|
|
1946
|
+
function ha(t) {
|
|
1947
1947
|
return mn(t);
|
|
1948
1948
|
}
|
|
1949
1949
|
function mn(t) {
|
|
1950
|
-
return Array.isArray(t) ?
|
|
1950
|
+
return Array.isArray(t) ? fa(t) : t instanceof RegExp ? t : typeof t == "object" ? pa(t) : t;
|
|
1951
1951
|
}
|
|
1952
|
-
function
|
|
1952
|
+
function fa(t) {
|
|
1953
1953
|
let e = [];
|
|
1954
1954
|
for (let n = 0, r = t.length; n < r; n++)
|
|
1955
1955
|
e[n] = mn(t[n]);
|
|
1956
1956
|
return e;
|
|
1957
1957
|
}
|
|
1958
|
-
function
|
|
1958
|
+
function pa(t) {
|
|
1959
1959
|
let e = {};
|
|
1960
1960
|
for (let n in t)
|
|
1961
1961
|
e[n] = mn(t[n]);
|
|
1962
1962
|
return e;
|
|
1963
1963
|
}
|
|
1964
|
-
function
|
|
1964
|
+
function Kr(t, ...e) {
|
|
1965
1965
|
return e.forEach((n) => {
|
|
1966
1966
|
for (let r in n)
|
|
1967
1967
|
t[r] = n[r];
|
|
1968
1968
|
}), t;
|
|
1969
1969
|
}
|
|
1970
|
-
function
|
|
1970
|
+
function Yr(t) {
|
|
1971
1971
|
const e = ~t.lastIndexOf("/") || ~t.lastIndexOf("\\");
|
|
1972
|
-
return e === 0 ? t : ~e === t.length - 1 ?
|
|
1972
|
+
return e === 0 ? t : ~e === t.length - 1 ? Yr(t.substring(0, t.length - 1)) : t.substr(~e + 1);
|
|
1973
1973
|
}
|
|
1974
1974
|
var It = /\$(\d+)|\${(\d+):\/(downcase|upcase)}/g, Je = class {
|
|
1975
1975
|
static hasCaptures(t) {
|
|
@@ -1995,10 +1995,10 @@ var It = /\$(\d+)|\${(\d+):\/(downcase|upcase)}/g, Je = class {
|
|
|
1995
1995
|
});
|
|
1996
1996
|
}
|
|
1997
1997
|
};
|
|
1998
|
-
function
|
|
1998
|
+
function Jr(t, e) {
|
|
1999
1999
|
return t < e ? -1 : t > e ? 1 : 0;
|
|
2000
2000
|
}
|
|
2001
|
-
function
|
|
2001
|
+
function Zr(t, e) {
|
|
2002
2002
|
if (t === null && e === null)
|
|
2003
2003
|
return 0;
|
|
2004
2004
|
if (!t)
|
|
@@ -2008,7 +2008,7 @@ function Jr(t, e) {
|
|
|
2008
2008
|
let n = t.length, r = e.length;
|
|
2009
2009
|
if (n === r) {
|
|
2010
2010
|
for (let o = 0; o < n; o++) {
|
|
2011
|
-
let s =
|
|
2011
|
+
let s = Jr(t[o], e[o]);
|
|
2012
2012
|
if (s !== 0)
|
|
2013
2013
|
return s;
|
|
2014
2014
|
}
|
|
@@ -2019,10 +2019,10 @@ function Jr(t, e) {
|
|
|
2019
2019
|
function Un(t) {
|
|
2020
2020
|
return !!(/^#[0-9a-f]{6}$/i.test(t) || /^#[0-9a-f]{8}$/i.test(t) || /^#[0-9a-f]{3}$/i.test(t) || /^#[0-9a-f]{4}$/i.test(t));
|
|
2021
2021
|
}
|
|
2022
|
-
function
|
|
2022
|
+
function Qr(t) {
|
|
2023
2023
|
return t.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g, "\\$&");
|
|
2024
2024
|
}
|
|
2025
|
-
var
|
|
2025
|
+
var eo = class {
|
|
2026
2026
|
constructor(t) {
|
|
2027
2027
|
this.fn = t;
|
|
2028
2028
|
}
|
|
@@ -2038,12 +2038,12 @@ var Qr = class {
|
|
|
2038
2038
|
this._colorMap = t, this._defaults = e, this._root = n;
|
|
2039
2039
|
}
|
|
2040
2040
|
static createFromRawTheme(t, e) {
|
|
2041
|
-
return this.createFromParsedTheme(
|
|
2041
|
+
return this.createFromParsedTheme(ma(t), e);
|
|
2042
2042
|
}
|
|
2043
2043
|
static createFromParsedTheme(t, e) {
|
|
2044
|
-
return
|
|
2044
|
+
return ba(t, e);
|
|
2045
2045
|
}
|
|
2046
|
-
_cachedMatchRoot = new
|
|
2046
|
+
_cachedMatchRoot = new eo(
|
|
2047
2047
|
(t) => this._root.match(t)
|
|
2048
2048
|
);
|
|
2049
2049
|
getColorMap() {
|
|
@@ -2056,9 +2056,9 @@ var Qr = class {
|
|
|
2056
2056
|
if (t === null)
|
|
2057
2057
|
return this._defaults;
|
|
2058
2058
|
const e = t.scopeName, r = this._cachedMatchRoot.get(e).find(
|
|
2059
|
-
(o) =>
|
|
2059
|
+
(o) => da(t.parent, o.parentScopes)
|
|
2060
2060
|
);
|
|
2061
|
-
return r ? new
|
|
2061
|
+
return r ? new to(
|
|
2062
2062
|
r.fontStyle,
|
|
2063
2063
|
r.foreground,
|
|
2064
2064
|
r.background
|
|
@@ -2103,7 +2103,7 @@ var Qr = class {
|
|
|
2103
2103
|
return r === e ? n.reverse() : void 0;
|
|
2104
2104
|
}
|
|
2105
2105
|
};
|
|
2106
|
-
function
|
|
2106
|
+
function da(t, e) {
|
|
2107
2107
|
if (e.length === 0)
|
|
2108
2108
|
return !0;
|
|
2109
2109
|
for (let n = 0; n < e.length; n++) {
|
|
@@ -2113,7 +2113,7 @@ function pa(t, e) {
|
|
|
2113
2113
|
return !1;
|
|
2114
2114
|
r = e[++n], o = !0;
|
|
2115
2115
|
}
|
|
2116
|
-
for (; t && !
|
|
2116
|
+
for (; t && !ga(t.scopeName, r); ) {
|
|
2117
2117
|
if (o)
|
|
2118
2118
|
return !1;
|
|
2119
2119
|
t = t.parent;
|
|
@@ -2124,15 +2124,15 @@ function pa(t, e) {
|
|
|
2124
2124
|
}
|
|
2125
2125
|
return !0;
|
|
2126
2126
|
}
|
|
2127
|
-
function
|
|
2127
|
+
function ga(t, e) {
|
|
2128
2128
|
return e === t || t.startsWith(e) && t[e.length] === ".";
|
|
2129
2129
|
}
|
|
2130
|
-
var
|
|
2130
|
+
var to = class {
|
|
2131
2131
|
constructor(t, e, n) {
|
|
2132
2132
|
this.fontStyle = t, this.foregroundId = e, this.backgroundId = n;
|
|
2133
2133
|
}
|
|
2134
2134
|
};
|
|
2135
|
-
function
|
|
2135
|
+
function ma(t) {
|
|
2136
2136
|
if (!t)
|
|
2137
2137
|
return [];
|
|
2138
2138
|
if (!t.settings || !Array.isArray(t.settings))
|
|
@@ -2173,7 +2173,7 @@ function ga(t) {
|
|
|
2173
2173
|
typeof a.settings.background == "string" && Un(a.settings.background) && (c = a.settings.background);
|
|
2174
2174
|
for (let h = 0, p = i.length; h < p; h++) {
|
|
2175
2175
|
let f = i[h].trim().split(" "), g = f[f.length - 1], C = null;
|
|
2176
|
-
f.length > 1 && (C = f.slice(0, f.length - 1), C.reverse()), n[r++] = new
|
|
2176
|
+
f.length > 1 && (C = f.slice(0, f.length - 1), C.reverse()), n[r++] = new ya(
|
|
2177
2177
|
g,
|
|
2178
2178
|
C,
|
|
2179
2179
|
o,
|
|
@@ -2185,29 +2185,29 @@ function ga(t) {
|
|
|
2185
2185
|
}
|
|
2186
2186
|
return n;
|
|
2187
2187
|
}
|
|
2188
|
-
var
|
|
2188
|
+
var ya = class {
|
|
2189
2189
|
constructor(t, e, n, r, o, s) {
|
|
2190
2190
|
this.scope = t, this.parentScopes = e, this.index = n, this.fontStyle = r, this.foreground = o, this.background = s;
|
|
2191
2191
|
}
|
|
2192
2192
|
}, z = /* @__PURE__ */ ((t) => (t[t.NotSet = -1] = "NotSet", t[t.None = 0] = "None", t[t.Italic = 1] = "Italic", t[t.Bold = 2] = "Bold", t[t.Underline = 4] = "Underline", t[t.Strikethrough = 8] = "Strikethrough", t))(z || {});
|
|
2193
|
-
function
|
|
2193
|
+
function ba(t, e) {
|
|
2194
2194
|
t.sort((l, u) => {
|
|
2195
|
-
let c =
|
|
2196
|
-
return c !== 0 || (c =
|
|
2195
|
+
let c = Jr(l.scope, u.scope);
|
|
2196
|
+
return c !== 0 || (c = Zr(l.parentScopes, u.parentScopes), c !== 0) ? c : l.index - u.index;
|
|
2197
2197
|
});
|
|
2198
2198
|
let n = 0, r = "#000000", o = "#ffffff";
|
|
2199
2199
|
for (; t.length >= 1 && t[0].scope === ""; ) {
|
|
2200
2200
|
let l = t.shift();
|
|
2201
2201
|
l.fontStyle !== -1 && (n = l.fontStyle), l.foreground !== null && (r = l.foreground), l.background !== null && (o = l.background);
|
|
2202
2202
|
}
|
|
2203
|
-
let s = new
|
|
2203
|
+
let s = new wa(e), a = new to(n, s.getId(r), s.getId(o)), i = new _a(new Vt(0, null, -1, 0, 0), []);
|
|
2204
2204
|
for (let l = 0, u = t.length; l < u; l++) {
|
|
2205
2205
|
let c = t[l];
|
|
2206
2206
|
i.insert(0, c.scope, c.parentScopes, c.fontStyle, s.getId(c.foreground), s.getId(c.background));
|
|
2207
2207
|
}
|
|
2208
2208
|
return new it(s, a, i);
|
|
2209
2209
|
}
|
|
2210
|
-
var
|
|
2210
|
+
var wa = class {
|
|
2211
2211
|
_isFrozen;
|
|
2212
2212
|
_lastColorId;
|
|
2213
2213
|
_id2color;
|
|
@@ -2234,17 +2234,17 @@ var ba = class {
|
|
|
2234
2234
|
getColorMap() {
|
|
2235
2235
|
return this._id2color.slice(0);
|
|
2236
2236
|
}
|
|
2237
|
-
},
|
|
2237
|
+
}, Ca = Object.freeze([]), Vt = class no {
|
|
2238
2238
|
scopeDepth;
|
|
2239
2239
|
parentScopes;
|
|
2240
2240
|
fontStyle;
|
|
2241
2241
|
foreground;
|
|
2242
2242
|
background;
|
|
2243
2243
|
constructor(e, n, r, o, s) {
|
|
2244
|
-
this.scopeDepth = e, this.parentScopes = n ||
|
|
2244
|
+
this.scopeDepth = e, this.parentScopes = n || Ca, this.fontStyle = r, this.foreground = o, this.background = s;
|
|
2245
2245
|
}
|
|
2246
2246
|
clone() {
|
|
2247
|
-
return new
|
|
2247
|
+
return new no(this.scopeDepth, this.parentScopes, this.fontStyle, this.foreground, this.background);
|
|
2248
2248
|
}
|
|
2249
2249
|
static cloneArr(e) {
|
|
2250
2250
|
let n = [];
|
|
@@ -2255,7 +2255,7 @@ var ba = class {
|
|
|
2255
2255
|
acceptOverwrite(e, n, r, o) {
|
|
2256
2256
|
this.scopeDepth > e ? console.log("how did this happen?") : this.scopeDepth = e, n !== -1 && (this.fontStyle = n), r !== 0 && (this.foreground = r), o !== 0 && (this.background = o);
|
|
2257
2257
|
}
|
|
2258
|
-
},
|
|
2258
|
+
}, _a = class qt {
|
|
2259
2259
|
constructor(e, n = [], r = {}) {
|
|
2260
2260
|
this._mainRule = e, this._children = r, this._rulesWithParentScopes = n;
|
|
2261
2261
|
}
|
|
@@ -2298,7 +2298,7 @@ var ba = class {
|
|
|
2298
2298
|
}
|
|
2299
2299
|
for (let a = 0, i = this._rulesWithParentScopes.length; a < i; a++) {
|
|
2300
2300
|
let l = this._rulesWithParentScopes[a];
|
|
2301
|
-
if (
|
|
2301
|
+
if (Zr(l.parentScopes, n) === 0) {
|
|
2302
2302
|
l.acceptOverwrite(e, r, o, s);
|
|
2303
2303
|
return;
|
|
2304
2304
|
}
|
|
@@ -2347,7 +2347,7 @@ var ba = class {
|
|
|
2347
2347
|
}
|
|
2348
2348
|
};
|
|
2349
2349
|
function lt(t, e) {
|
|
2350
|
-
const n = [], r =
|
|
2350
|
+
const n = [], r = Sa(t);
|
|
2351
2351
|
let o = r.next();
|
|
2352
2352
|
for (; o !== null; ) {
|
|
2353
2353
|
let l = 0;
|
|
@@ -2412,7 +2412,7 @@ function lt(t, e) {
|
|
|
2412
2412
|
function zn(t) {
|
|
2413
2413
|
return !!t && !!t.match(/[\w\.:]+/);
|
|
2414
2414
|
}
|
|
2415
|
-
function
|
|
2415
|
+
function Sa(t) {
|
|
2416
2416
|
let e = /([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g, n = e.exec(t);
|
|
2417
2417
|
return {
|
|
2418
2418
|
next: () => {
|
|
@@ -2423,7 +2423,7 @@ function _a(t) {
|
|
|
2423
2423
|
}
|
|
2424
2424
|
};
|
|
2425
2425
|
}
|
|
2426
|
-
function
|
|
2426
|
+
function ro(t) {
|
|
2427
2427
|
typeof t.dispose == "function" && t.dispose();
|
|
2428
2428
|
}
|
|
2429
2429
|
var Ue = class {
|
|
@@ -2433,14 +2433,14 @@ var Ue = class {
|
|
|
2433
2433
|
toKey() {
|
|
2434
2434
|
return this.scopeName;
|
|
2435
2435
|
}
|
|
2436
|
-
},
|
|
2436
|
+
}, ka = class {
|
|
2437
2437
|
constructor(t, e) {
|
|
2438
2438
|
this.scopeName = t, this.ruleName = e;
|
|
2439
2439
|
}
|
|
2440
2440
|
toKey() {
|
|
2441
2441
|
return `${this.scopeName}#${this.ruleName}`;
|
|
2442
2442
|
}
|
|
2443
|
-
},
|
|
2443
|
+
}, va = class {
|
|
2444
2444
|
_references = [];
|
|
2445
2445
|
_seenReferenceKeys = /* @__PURE__ */ new Set();
|
|
2446
2446
|
get references() {
|
|
@@ -2451,7 +2451,7 @@ var Ue = class {
|
|
|
2451
2451
|
const e = t.toKey();
|
|
2452
2452
|
this._seenReferenceKeys.has(e) || (this._seenReferenceKeys.add(e), this._references.push(t));
|
|
2453
2453
|
}
|
|
2454
|
-
},
|
|
2454
|
+
}, xa = class {
|
|
2455
2455
|
constructor(t, e) {
|
|
2456
2456
|
this.repo = t, this.initialScopeName = e, this.seenFullScopeRequests.add(this.initialScopeName), this.Q = [new Ue(this.initialScopeName)];
|
|
2457
2457
|
}
|
|
@@ -2461,9 +2461,9 @@ var Ue = class {
|
|
|
2461
2461
|
processQueue() {
|
|
2462
2462
|
const t = this.Q;
|
|
2463
2463
|
this.Q = [];
|
|
2464
|
-
const e = new
|
|
2464
|
+
const e = new va();
|
|
2465
2465
|
for (const n of t)
|
|
2466
|
-
|
|
2466
|
+
Ea(n, this.initialScopeName, this.repo, e);
|
|
2467
2467
|
for (const n of e.references)
|
|
2468
2468
|
if (n instanceof Ue) {
|
|
2469
2469
|
if (this.seenFullScopeRequests.has(n.scopeName))
|
|
@@ -2476,7 +2476,7 @@ var Ue = class {
|
|
|
2476
2476
|
}
|
|
2477
2477
|
}
|
|
2478
2478
|
};
|
|
2479
|
-
function
|
|
2479
|
+
function Ea(t, e, n, r) {
|
|
2480
2480
|
const o = n.lookup(t.scopeName);
|
|
2481
2481
|
if (!o) {
|
|
2482
2482
|
if (t.scopeName === e)
|
|
@@ -2516,12 +2516,12 @@ function ut(t, e, n) {
|
|
|
2516
2516
|
if (n.visitedRule.has(r))
|
|
2517
2517
|
continue;
|
|
2518
2518
|
n.visitedRule.add(r);
|
|
2519
|
-
const o = r.repository ?
|
|
2519
|
+
const o = r.repository ? Kr({}, e.repository, r.repository) : e.repository;
|
|
2520
2520
|
Array.isArray(r.patterns) && ut(r.patterns, { ...e, repository: o }, n);
|
|
2521
2521
|
const s = r.include;
|
|
2522
2522
|
if (!s)
|
|
2523
2523
|
continue;
|
|
2524
|
-
const a =
|
|
2524
|
+
const a = oo(s);
|
|
2525
2525
|
switch (a.kind) {
|
|
2526
2526
|
case 0:
|
|
2527
2527
|
ot({ ...e, selfGrammar: e.baseGrammar }, n);
|
|
@@ -2539,47 +2539,47 @@ function ut(t, e, n) {
|
|
|
2539
2539
|
const l = { baseGrammar: e.baseGrammar, selfGrammar: i, repository: o };
|
|
2540
2540
|
a.kind === 4 ? Xt(a.ruleName, l, n) : ot(l, n);
|
|
2541
2541
|
} else
|
|
2542
|
-
a.kind === 4 ? n.add(new
|
|
2542
|
+
a.kind === 4 ? n.add(new ka(a.scopeName, a.ruleName)) : n.add(new Ue(a.scopeName));
|
|
2543
2543
|
break;
|
|
2544
2544
|
}
|
|
2545
2545
|
}
|
|
2546
2546
|
}
|
|
2547
|
-
var
|
|
2547
|
+
var Aa = class {
|
|
2548
2548
|
kind = 0;
|
|
2549
|
-
}, Aa = class {
|
|
2550
|
-
kind = 1;
|
|
2551
2549
|
}, Ra = class {
|
|
2550
|
+
kind = 1;
|
|
2551
|
+
}, Ia = class {
|
|
2552
2552
|
constructor(t) {
|
|
2553
2553
|
this.ruleName = t;
|
|
2554
2554
|
}
|
|
2555
2555
|
kind = 2;
|
|
2556
|
-
},
|
|
2556
|
+
}, Na = class {
|
|
2557
2557
|
constructor(t) {
|
|
2558
2558
|
this.scopeName = t;
|
|
2559
2559
|
}
|
|
2560
2560
|
kind = 3;
|
|
2561
|
-
},
|
|
2561
|
+
}, La = class {
|
|
2562
2562
|
constructor(t, e) {
|
|
2563
2563
|
this.scopeName = t, this.ruleName = e;
|
|
2564
2564
|
}
|
|
2565
2565
|
kind = 4;
|
|
2566
2566
|
};
|
|
2567
|
-
function
|
|
2567
|
+
function oo(t) {
|
|
2568
2568
|
if (t === "$base")
|
|
2569
|
-
return new Ea();
|
|
2570
|
-
if (t === "$self")
|
|
2571
2569
|
return new Aa();
|
|
2570
|
+
if (t === "$self")
|
|
2571
|
+
return new Ra();
|
|
2572
2572
|
const e = t.indexOf("#");
|
|
2573
2573
|
if (e === -1)
|
|
2574
|
-
return new
|
|
2574
|
+
return new Na(t);
|
|
2575
2575
|
if (e === 0)
|
|
2576
|
-
return new
|
|
2576
|
+
return new Ia(t.substring(1));
|
|
2577
2577
|
{
|
|
2578
2578
|
const n = t.substring(0, e), r = t.substring(e + 1);
|
|
2579
|
-
return new
|
|
2579
|
+
return new La(n, r);
|
|
2580
2580
|
}
|
|
2581
2581
|
}
|
|
2582
|
-
var
|
|
2582
|
+
var Pa = /\\(\d+)/, Hn = /\\(\d+)/g, $a = -1, so = -2;
|
|
2583
2583
|
var Xe = class {
|
|
2584
2584
|
$location;
|
|
2585
2585
|
id;
|
|
@@ -2591,7 +2591,7 @@ var Xe = class {
|
|
|
2591
2591
|
this.$location = t, this.id = e, this._name = n || null, this._nameIsCapturing = Je.hasCaptures(this._name), this._contentName = r || null, this._contentNameIsCapturing = Je.hasCaptures(this._contentName);
|
|
2592
2592
|
}
|
|
2593
2593
|
get debugName() {
|
|
2594
|
-
const t = this.$location ? `${
|
|
2594
|
+
const t = this.$location ? `${Yr(this.$location.filename)}:${this.$location.line}` : "unknown";
|
|
2595
2595
|
return `${this.constructor.name}#${this.id} @ ${t}`;
|
|
2596
2596
|
}
|
|
2597
2597
|
getName(t, e) {
|
|
@@ -2600,7 +2600,7 @@ var Xe = class {
|
|
|
2600
2600
|
getContentName(t, e) {
|
|
2601
2601
|
return !this._contentNameIsCapturing || this._contentName === null ? this._contentName : Je.replaceCaptures(this._contentName, t, e);
|
|
2602
2602
|
}
|
|
2603
|
-
},
|
|
2603
|
+
}, Ta = class extends Xe {
|
|
2604
2604
|
retokenizeCapturedWithRuleId;
|
|
2605
2605
|
constructor(t, e, n, r, o) {
|
|
2606
2606
|
super(t, e, n, r), this.retokenizeCapturedWithRuleId = o;
|
|
@@ -2616,7 +2616,7 @@ var Xe = class {
|
|
|
2616
2616
|
compileAG(t, e, n, r) {
|
|
2617
2617
|
throw new Error("Not supported!");
|
|
2618
2618
|
}
|
|
2619
|
-
},
|
|
2619
|
+
}, Ma = class extends Xe {
|
|
2620
2620
|
_match;
|
|
2621
2621
|
captures;
|
|
2622
2622
|
_cachedCompiledPatterns;
|
|
@@ -2718,7 +2718,7 @@ var Xe = class {
|
|
|
2718
2718
|
_cachedCompiledPatterns;
|
|
2719
2719
|
_cachedCompiledWhilePatterns;
|
|
2720
2720
|
constructor(t, e, n, r, o, s, a, i, l) {
|
|
2721
|
-
super(t, e, n, r), this._begin = new ze(o, this.id), this.beginCaptures = s, this.whileCaptures = i, this._while = new ze(a,
|
|
2721
|
+
super(t, e, n, r), this._begin = new ze(o, this.id), this.beginCaptures = s, this.whileCaptures = i, this._while = new ze(a, so), this.whileHasBackReferences = this._while.hasBackReferences, this.patterns = l.patterns, this.hasMissingPatterns = l.hasMissingPatterns, this._cachedCompiledPatterns = null, this._cachedCompiledWhilePatterns = null;
|
|
2722
2722
|
}
|
|
2723
2723
|
dispose() {
|
|
2724
2724
|
this._cachedCompiledPatterns && (this._cachedCompiledPatterns.dispose(), this._cachedCompiledPatterns = null), this._cachedCompiledWhilePatterns && (this._cachedCompiledWhilePatterns.dispose(), this._cachedCompiledWhilePatterns = null);
|
|
@@ -2758,14 +2758,14 @@ var Xe = class {
|
|
|
2758
2758
|
_getCachedCompiledWhilePatterns(t, e) {
|
|
2759
2759
|
return this._cachedCompiledWhilePatterns || (this._cachedCompiledWhilePatterns = new He(), this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences ? this._while.clone() : this._while)), this._while.hasBackReferences && this._cachedCompiledWhilePatterns.setSource(0, e || ""), this._cachedCompiledWhilePatterns;
|
|
2760
2760
|
}
|
|
2761
|
-
},
|
|
2761
|
+
}, ao = class U {
|
|
2762
2762
|
static createCaptureRule(e, n, r, o, s) {
|
|
2763
|
-
return e.registerRule((a) => new
|
|
2763
|
+
return e.registerRule((a) => new Ta(n, a, r, o, s));
|
|
2764
2764
|
}
|
|
2765
2765
|
static getCompiledRuleId(e, n, r) {
|
|
2766
2766
|
return e.id || n.registerRule((o) => {
|
|
2767
2767
|
if (e.id = o, e.match)
|
|
2768
|
-
return new
|
|
2768
|
+
return new Ma(
|
|
2769
2769
|
e.$vscodeTextmateLocation,
|
|
2770
2770
|
e.id,
|
|
2771
2771
|
e.name,
|
|
@@ -2773,7 +2773,7 @@ var Xe = class {
|
|
|
2773
2773
|
U._compileCaptures(e.captures, n, r)
|
|
2774
2774
|
);
|
|
2775
2775
|
if (typeof e.begin > "u") {
|
|
2776
|
-
e.repository && (r =
|
|
2776
|
+
e.repository && (r = Kr({}, r, e.repository));
|
|
2777
2777
|
let s = e.patterns;
|
|
2778
2778
|
return typeof s > "u" && e.include && (s = [{ include: e.include }]), new Wn(
|
|
2779
2779
|
e.$vscodeTextmateLocation,
|
|
@@ -2836,7 +2836,7 @@ var Xe = class {
|
|
|
2836
2836
|
const i = e[s];
|
|
2837
2837
|
let l = -1;
|
|
2838
2838
|
if (i.include) {
|
|
2839
|
-
const u =
|
|
2839
|
+
const u = oo(i.include);
|
|
2840
2840
|
switch (u.kind) {
|
|
2841
2841
|
case 0:
|
|
2842
2842
|
case 1:
|
|
@@ -2872,7 +2872,7 @@ var Xe = class {
|
|
|
2872
2872
|
hasMissingPatterns: (e ? e.length : 0) !== o.length
|
|
2873
2873
|
};
|
|
2874
2874
|
}
|
|
2875
|
-
}, ze = class
|
|
2875
|
+
}, ze = class io {
|
|
2876
2876
|
source;
|
|
2877
2877
|
ruleId;
|
|
2878
2878
|
hasAnchor;
|
|
@@ -2890,10 +2890,10 @@ var Xe = class {
|
|
|
2890
2890
|
this.hasAnchor = a, o === 0 ? this.source = e : (s.push(e.substring(o, r)), this.source = s.join(""));
|
|
2891
2891
|
} else
|
|
2892
2892
|
this.hasAnchor = !1, this.source = e;
|
|
2893
|
-
this.hasAnchor ? this._anchorCache = this._buildAnchorCache() : this._anchorCache = null, this.ruleId = n, typeof this.source == "string" ? this.hasBackReferences =
|
|
2893
|
+
this.hasAnchor ? this._anchorCache = this._buildAnchorCache() : this._anchorCache = null, this.ruleId = n, typeof this.source == "string" ? this.hasBackReferences = Pa.test(this.source) : this.hasBackReferences = !1;
|
|
2894
2894
|
}
|
|
2895
2895
|
clone() {
|
|
2896
|
-
return new
|
|
2896
|
+
return new io(this.source, this.ruleId);
|
|
2897
2897
|
}
|
|
2898
2898
|
setSource(e) {
|
|
2899
2899
|
this.source !== e && (this.source = e, this.hasAnchor && (this._anchorCache = this._buildAnchorCache()));
|
|
@@ -2902,7 +2902,7 @@ var Xe = class {
|
|
|
2902
2902
|
if (typeof this.source != "string")
|
|
2903
2903
|
throw new Error("This method should only be called if the source is a string");
|
|
2904
2904
|
let r = n.map((o) => e.substring(o.start, o.end));
|
|
2905
|
-
return Hn.lastIndex = 0, this.source.replace(Hn, (o, s) =>
|
|
2905
|
+
return Hn.lastIndex = 0, this.source.replace(Hn, (o, s) => Qr(r[parseInt(s, 10)] || ""));
|
|
2906
2906
|
}
|
|
2907
2907
|
_buildAnchorCache() {
|
|
2908
2908
|
if (typeof this.source != "string")
|
|
@@ -2991,7 +2991,7 @@ var Xe = class {
|
|
|
2991
2991
|
constructor(t, e) {
|
|
2992
2992
|
this.languageId = t, this.tokenType = e;
|
|
2993
2993
|
}
|
|
2994
|
-
},
|
|
2994
|
+
}, Oa = class Yt {
|
|
2995
2995
|
_defaultAttributes;
|
|
2996
2996
|
_embeddedLanguagesMatcher;
|
|
2997
2997
|
constructor(e, n) {
|
|
@@ -2999,7 +2999,7 @@ var Xe = class {
|
|
|
2999
2999
|
e,
|
|
3000
3000
|
8
|
|
3001
3001
|
/* NotSet */
|
|
3002
|
-
), this._embeddedLanguagesMatcher = new
|
|
3002
|
+
), this._embeddedLanguagesMatcher = new Da(Object.entries(n || {}));
|
|
3003
3003
|
}
|
|
3004
3004
|
getDefaultAttributes() {
|
|
3005
3005
|
return this._defaultAttributes;
|
|
@@ -3008,7 +3008,7 @@ var Xe = class {
|
|
|
3008
3008
|
return e === null ? Yt._NULL_SCOPE_METADATA : this._getBasicScopeAttributes.get(e);
|
|
3009
3009
|
}
|
|
3010
3010
|
static _NULL_SCOPE_METADATA = new Lt(0, 0);
|
|
3011
|
-
_getBasicScopeAttributes = new
|
|
3011
|
+
_getBasicScopeAttributes = new eo((e) => {
|
|
3012
3012
|
const n = this._scopeToLanguage(e), r = this._toStandardTokenType(e);
|
|
3013
3013
|
return new Lt(n, r);
|
|
3014
3014
|
});
|
|
@@ -3036,7 +3036,7 @@ var Xe = class {
|
|
|
3036
3036
|
throw new Error("Unexpected match for standard token type!");
|
|
3037
3037
|
}
|
|
3038
3038
|
static STANDARD_TOKEN_TYPE_REGEXP = /\b(comment|string|regex|meta\.embedded)\b/;
|
|
3039
|
-
},
|
|
3039
|
+
}, Da = class {
|
|
3040
3040
|
values;
|
|
3041
3041
|
scopesRegExp;
|
|
3042
3042
|
constructor(t) {
|
|
@@ -3045,7 +3045,7 @@ var Xe = class {
|
|
|
3045
3045
|
else {
|
|
3046
3046
|
this.values = new Map(t);
|
|
3047
3047
|
const e = t.map(
|
|
3048
|
-
([n, r]) =>
|
|
3048
|
+
([n, r]) => Qr(n)
|
|
3049
3049
|
);
|
|
3050
3050
|
e.sort(), e.reverse(), this.scopesRegExp = new RegExp(
|
|
3051
3051
|
`^((${e.join(")|(")}))($|\\.)`,
|
|
@@ -3067,11 +3067,11 @@ var qn = class {
|
|
|
3067
3067
|
this.stack = t, this.stoppedEarly = e;
|
|
3068
3068
|
}
|
|
3069
3069
|
};
|
|
3070
|
-
function
|
|
3070
|
+
function lo(t, e, n, r, o, s, a, i) {
|
|
3071
3071
|
const l = e.content.length;
|
|
3072
3072
|
let u = !1, c = -1;
|
|
3073
3073
|
if (a) {
|
|
3074
|
-
const d =
|
|
3074
|
+
const d = Ga(
|
|
3075
3075
|
t,
|
|
3076
3076
|
e,
|
|
3077
3077
|
n,
|
|
@@ -3089,7 +3089,7 @@ function io(t, e, n, r, o, s, a, i) {
|
|
|
3089
3089
|
}
|
|
3090
3090
|
return new qn(o, !1);
|
|
3091
3091
|
function p() {
|
|
3092
|
-
const d =
|
|
3092
|
+
const d = Fa(
|
|
3093
3093
|
t,
|
|
3094
3094
|
e,
|
|
3095
3095
|
n,
|
|
@@ -3102,7 +3102,7 @@ function io(t, e, n, r, o, s, a, i) {
|
|
|
3102
3102
|
return;
|
|
3103
3103
|
}
|
|
3104
3104
|
const f = d.captureIndices, g = d.matchedRuleId, C = f && f.length > 0 ? f[0].end > r : !1;
|
|
3105
|
-
if (g ===
|
|
3105
|
+
if (g === $a) {
|
|
3106
3106
|
const y = o.getRule(t);
|
|
3107
3107
|
s.produce(o, f[0].start), o = o.withContentNameScopesList(o.nameScopesList), Ge(
|
|
3108
3108
|
t,
|
|
@@ -3203,7 +3203,7 @@ function io(t, e, n, r, o, s, a, i) {
|
|
|
3203
3203
|
f[0].end > r && (r = f[0].end, n = !1);
|
|
3204
3204
|
}
|
|
3205
3205
|
}
|
|
3206
|
-
function
|
|
3206
|
+
function Ga(t, e, n, r, o, s) {
|
|
3207
3207
|
let a = o.beginRuleCapturedEOL ? 0 : -1;
|
|
3208
3208
|
const i = [];
|
|
3209
3209
|
for (let l = o; l; l = l.pop()) {
|
|
@@ -3214,9 +3214,9 @@ function Da(t, e, n, r, o, s) {
|
|
|
3214
3214
|
});
|
|
3215
3215
|
}
|
|
3216
3216
|
for (let l = i.pop(); l; l = i.pop()) {
|
|
3217
|
-
const { ruleScanner: u, findOptions: c } =
|
|
3217
|
+
const { ruleScanner: u, findOptions: c } = Ua(l.rule, t, l.stack.endRule, n, r === a), h = u.findNextMatchSync(e, r, c);
|
|
3218
3218
|
if (h) {
|
|
3219
|
-
if (h.ruleId !==
|
|
3219
|
+
if (h.ruleId !== so) {
|
|
3220
3220
|
o = l.stack.pop();
|
|
3221
3221
|
break;
|
|
3222
3222
|
}
|
|
@@ -3228,11 +3228,11 @@ function Da(t, e, n, r, o, s) {
|
|
|
3228
3228
|
}
|
|
3229
3229
|
return { stack: o, linePos: r, anchorPosition: a, isFirstLine: n };
|
|
3230
3230
|
}
|
|
3231
|
-
function
|
|
3232
|
-
const a =
|
|
3231
|
+
function Fa(t, e, n, r, o, s) {
|
|
3232
|
+
const a = Ba(t, e, n, r, o, s), i = t.getInjections();
|
|
3233
3233
|
if (i.length === 0)
|
|
3234
3234
|
return a;
|
|
3235
|
-
const l =
|
|
3235
|
+
const l = ja(i, t, e, n, r, o, s);
|
|
3236
3236
|
if (!l)
|
|
3237
3237
|
return a;
|
|
3238
3238
|
if (!a)
|
|
@@ -3240,21 +3240,21 @@ function Ga(t, e, n, r, o, s) {
|
|
|
3240
3240
|
const u = a.captureIndices[0].start, c = l.captureIndices[0].start;
|
|
3241
3241
|
return c < u || l.priorityMatch && c === u ? l : a;
|
|
3242
3242
|
}
|
|
3243
|
-
function
|
|
3244
|
-
const a = o.getRule(t), { ruleScanner: i, findOptions: l } =
|
|
3243
|
+
function Ba(t, e, n, r, o, s) {
|
|
3244
|
+
const a = o.getRule(t), { ruleScanner: i, findOptions: l } = uo(a, t, o.endRule, n, r === s), u = i.findNextMatchSync(e, r, l);
|
|
3245
3245
|
return u ? {
|
|
3246
3246
|
captureIndices: u.captureIndices,
|
|
3247
3247
|
matchedRuleId: u.ruleId
|
|
3248
3248
|
} : null;
|
|
3249
3249
|
}
|
|
3250
|
-
function
|
|
3250
|
+
function ja(t, e, n, r, o, s, a) {
|
|
3251
3251
|
let i = Number.MAX_VALUE, l = null, u, c = 0;
|
|
3252
3252
|
const h = s.contentNameScopesList.getScopeNames();
|
|
3253
3253
|
for (let p = 0, d = t.length; p < d; p++) {
|
|
3254
3254
|
const f = t[p];
|
|
3255
3255
|
if (!f.matcher(h))
|
|
3256
3256
|
continue;
|
|
3257
|
-
const g = e.getRule(f.ruleId), { ruleScanner: C, findOptions: y } =
|
|
3257
|
+
const g = e.getRule(f.ruleId), { ruleScanner: C, findOptions: y } = uo(g, e, null, r, o === a), m = C.findNextMatchSync(n, o, y);
|
|
3258
3258
|
if (!m)
|
|
3259
3259
|
continue;
|
|
3260
3260
|
const _ = m.captureIndices[0].start;
|
|
@@ -3267,14 +3267,14 @@ function Ba(t, e, n, r, o, s, a) {
|
|
|
3267
3267
|
matchedRuleId: u
|
|
3268
3268
|
} : null;
|
|
3269
3269
|
}
|
|
3270
|
-
function
|
|
3270
|
+
function uo(t, e, n, r, o) {
|
|
3271
3271
|
return {
|
|
3272
3272
|
ruleScanner: t.compileAG(e, n, r, o),
|
|
3273
3273
|
findOptions: 0
|
|
3274
3274
|
/* None */
|
|
3275
3275
|
};
|
|
3276
3276
|
}
|
|
3277
|
-
function
|
|
3277
|
+
function Ua(t, e, n, r, o) {
|
|
3278
3278
|
return {
|
|
3279
3279
|
ruleScanner: t.compileWhileAG(e, n, r, o),
|
|
3280
3280
|
findOptions: 0
|
|
@@ -3298,7 +3298,7 @@ function Ge(t, e, n, r, o, s, a) {
|
|
|
3298
3298
|
o.produceFromScopes(u[u.length - 1].scopes, u[u.length - 1].endPos), u.pop();
|
|
3299
3299
|
if (u.length > 0 ? o.produceFromScopes(u[u.length - 1].scopes, d.start) : o.produce(r, d.start), p.retokenizeCapturedWithRuleId) {
|
|
3300
3300
|
const g = p.getName(i, a), C = r.contentNameScopesList.pushAttributed(g, t), y = p.getContentName(i, a), m = C.pushAttributed(y, t), _ = r.push(p.retokenizeCapturedWithRuleId, d.start, -1, !1, null, C, m), S = t.createOnigString(i.substring(0, d.end));
|
|
3301
|
-
|
|
3301
|
+
lo(
|
|
3302
3302
|
t,
|
|
3303
3303
|
S,
|
|
3304
3304
|
n && d.start === 0,
|
|
@@ -3308,27 +3308,27 @@ function Ge(t, e, n, r, o, s, a) {
|
|
|
3308
3308
|
!1,
|
|
3309
3309
|
/* no time limit */
|
|
3310
3310
|
0
|
|
3311
|
-
),
|
|
3311
|
+
), ro(S);
|
|
3312
3312
|
continue;
|
|
3313
3313
|
}
|
|
3314
3314
|
const f = p.getName(i, a);
|
|
3315
3315
|
if (f !== null) {
|
|
3316
3316
|
const C = (u.length > 0 ? u[u.length - 1].scopes : r.contentNameScopesList).pushAttributed(f, t);
|
|
3317
|
-
u.push(new
|
|
3317
|
+
u.push(new za(C, d.end));
|
|
3318
3318
|
}
|
|
3319
3319
|
}
|
|
3320
3320
|
for (; u.length > 0; )
|
|
3321
3321
|
o.produceFromScopes(u[u.length - 1].scopes, u[u.length - 1].endPos), u.pop();
|
|
3322
3322
|
}
|
|
3323
|
-
var
|
|
3323
|
+
var za = class {
|
|
3324
3324
|
scopes;
|
|
3325
3325
|
endPos;
|
|
3326
3326
|
constructor(t, e) {
|
|
3327
3327
|
this.scopes = t, this.endPos = e;
|
|
3328
3328
|
}
|
|
3329
3329
|
};
|
|
3330
|
-
function
|
|
3331
|
-
return new
|
|
3330
|
+
function Ha(t, e, n, r, o, s, a, i) {
|
|
3331
|
+
return new Va(
|
|
3332
3332
|
t,
|
|
3333
3333
|
e,
|
|
3334
3334
|
n,
|
|
@@ -3340,7 +3340,7 @@ function za(t, e, n, r, o, s, a, i) {
|
|
|
3340
3340
|
);
|
|
3341
3341
|
}
|
|
3342
3342
|
function Xn(t, e, n, r, o) {
|
|
3343
|
-
const s = lt(e, ht), a =
|
|
3343
|
+
const s = lt(e, ht), a = ao.getCompiledRuleId(n, r, o.repository);
|
|
3344
3344
|
for (const i of s)
|
|
3345
3345
|
t.push({
|
|
3346
3346
|
debugSelector: e,
|
|
@@ -3356,12 +3356,12 @@ function ht(t, e) {
|
|
|
3356
3356
|
let n = 0;
|
|
3357
3357
|
return t.every((r) => {
|
|
3358
3358
|
for (let o = n; o < e.length; o++)
|
|
3359
|
-
if (
|
|
3359
|
+
if (Wa(e[o], r))
|
|
3360
3360
|
return n = o + 1, !0;
|
|
3361
3361
|
return !1;
|
|
3362
3362
|
});
|
|
3363
3363
|
}
|
|
3364
|
-
function
|
|
3364
|
+
function Wa(t, e) {
|
|
3365
3365
|
if (!t)
|
|
3366
3366
|
return !1;
|
|
3367
3367
|
if (t === e)
|
|
@@ -3369,9 +3369,9 @@ function Ha(t, e) {
|
|
|
3369
3369
|
const n = e.length;
|
|
3370
3370
|
return t.length > n && t.substr(0, n) === e && t[n] === ".";
|
|
3371
3371
|
}
|
|
3372
|
-
var
|
|
3372
|
+
var Va = class {
|
|
3373
3373
|
constructor(t, e, n, r, o, s, a, i) {
|
|
3374
|
-
if (this._rootScopeName = t, this.balancedBracketSelectors = s, this._onigLib = i, this._basicScopeAttributesProvider = new
|
|
3374
|
+
if (this._rootScopeName = t, this.balancedBracketSelectors = s, this._onigLib = i, this._basicScopeAttributesProvider = new Oa(
|
|
3375
3375
|
n,
|
|
3376
3376
|
r
|
|
3377
3377
|
), this._rootId = -1, this._lastRuleId = 0, this._ruleId2desc = [null], this._includedGrammars = {}, this._grammarRepository = a, this._grammar = Kn(e, null), this._injections = null, this._tokenTypeMatchers = [], o)
|
|
@@ -3481,7 +3481,7 @@ var Wa = class {
|
|
|
3481
3481
|
};
|
|
3482
3482
|
}
|
|
3483
3483
|
_tokenize(t, e, n, r) {
|
|
3484
|
-
this._rootId === -1 && (this._rootId =
|
|
3484
|
+
this._rootId === -1 && (this._rootId = ao.getCompiledRuleId(
|
|
3485
3485
|
this._grammar.repository.$self,
|
|
3486
3486
|
this,
|
|
3487
3487
|
this._grammar.repository
|
|
@@ -3523,12 +3523,12 @@ var Wa = class {
|
|
|
3523
3523
|
o = !1, e.reset();
|
|
3524
3524
|
t = t + `
|
|
3525
3525
|
`;
|
|
3526
|
-
const s = this.createOnigString(t), a = s.content.length, i = new
|
|
3526
|
+
const s = this.createOnigString(t), a = s.content.length, i = new Xa(
|
|
3527
3527
|
n,
|
|
3528
3528
|
t,
|
|
3529
3529
|
this._tokenTypeMatchers,
|
|
3530
3530
|
this.balancedBracketSelectors
|
|
3531
|
-
), l =
|
|
3531
|
+
), l = lo(
|
|
3532
3532
|
this,
|
|
3533
3533
|
s,
|
|
3534
3534
|
o,
|
|
@@ -3538,7 +3538,7 @@ var Wa = class {
|
|
|
3538
3538
|
!0,
|
|
3539
3539
|
r
|
|
3540
3540
|
);
|
|
3541
|
-
return
|
|
3541
|
+
return ro(s), {
|
|
3542
3542
|
lineLength: a,
|
|
3543
3543
|
lineTokens: i,
|
|
3544
3544
|
ruleStack: l.stack,
|
|
@@ -3547,7 +3547,7 @@ var Wa = class {
|
|
|
3547
3547
|
}
|
|
3548
3548
|
};
|
|
3549
3549
|
function Kn(t, e) {
|
|
3550
|
-
return t =
|
|
3550
|
+
return t = ha(t), t.repository = t.repository || {}, t.repository.$self = {
|
|
3551
3551
|
$vscodeTextmateLocation: t.$vscodeTextmateLocation,
|
|
3552
3552
|
patterns: t.patterns,
|
|
3553
3553
|
name: t.scopeName
|
|
@@ -3804,7 +3804,7 @@ var Fe = class ne {
|
|
|
3804
3804
|
Fe.fromExtension(r, n.contentNameScopesList)
|
|
3805
3805
|
);
|
|
3806
3806
|
}
|
|
3807
|
-
},
|
|
3807
|
+
}, qa = class {
|
|
3808
3808
|
balancedBracketScopes;
|
|
3809
3809
|
unbalancedBracketScopes;
|
|
3810
3810
|
allowAny = !1;
|
|
@@ -3830,7 +3830,7 @@ var Fe = class ne {
|
|
|
3830
3830
|
return !0;
|
|
3831
3831
|
return this.allowAny;
|
|
3832
3832
|
}
|
|
3833
|
-
},
|
|
3833
|
+
}, Xa = class {
|
|
3834
3834
|
constructor(t, e, n, r) {
|
|
3835
3835
|
this.balancedBracketSelectors = r, this._emitBinaryTokens = t, this._tokenTypeOverrides = n, this._lineText = null, this._tokens = [], this._binaryTokens = [], this._lastTokenEndIndex = 0;
|
|
3836
3836
|
}
|
|
@@ -3904,7 +3904,7 @@ var Fe = class ne {
|
|
|
3904
3904
|
n[r] = this._binaryTokens[r];
|
|
3905
3905
|
return n;
|
|
3906
3906
|
}
|
|
3907
|
-
},
|
|
3907
|
+
}, Ka = class {
|
|
3908
3908
|
constructor(t, e) {
|
|
3909
3909
|
this._onigLib = e, this._theme = t;
|
|
3910
3910
|
}
|
|
@@ -3960,7 +3960,7 @@ var Fe = class ne {
|
|
|
3960
3960
|
let s = this._rawGrammars.get(t);
|
|
3961
3961
|
if (!s)
|
|
3962
3962
|
return null;
|
|
3963
|
-
this._grammars.set(t,
|
|
3963
|
+
this._grammars.set(t, Ha(
|
|
3964
3964
|
t,
|
|
3965
3965
|
s,
|
|
3966
3966
|
e,
|
|
@@ -3973,12 +3973,12 @@ var Fe = class ne {
|
|
|
3973
3973
|
}
|
|
3974
3974
|
return this._grammars.get(t);
|
|
3975
3975
|
}
|
|
3976
|
-
},
|
|
3976
|
+
}, Ya = class {
|
|
3977
3977
|
_options;
|
|
3978
3978
|
_syncRegistry;
|
|
3979
3979
|
_ensureGrammarCache;
|
|
3980
3980
|
constructor(e) {
|
|
3981
|
-
this._options = e, this._syncRegistry = new
|
|
3981
|
+
this._options = e, this._syncRegistry = new Ka(
|
|
3982
3982
|
it.createFromRawTheme(e.theme, e.colorMap),
|
|
3983
3983
|
e.onigLib
|
|
3984
3984
|
), this._ensureGrammarCache = /* @__PURE__ */ new Map();
|
|
@@ -4015,7 +4015,7 @@ var Fe = class ne {
|
|
|
4015
4015
|
n,
|
|
4016
4016
|
r.embeddedLanguages,
|
|
4017
4017
|
r.tokenTypes,
|
|
4018
|
-
new
|
|
4018
|
+
new qa(
|
|
4019
4019
|
r.balancedBracketSelectors || [],
|
|
4020
4020
|
r.unbalancedBracketSelectors || []
|
|
4021
4021
|
)
|
|
@@ -4028,7 +4028,7 @@ var Fe = class ne {
|
|
|
4028
4028
|
return this._loadGrammar(e, 0, null, null, null);
|
|
4029
4029
|
}
|
|
4030
4030
|
_loadGrammar(e, n, r, o, s) {
|
|
4031
|
-
const a = new
|
|
4031
|
+
const a = new xa(this._syncRegistry, e);
|
|
4032
4032
|
for (; a.Q.length > 0; )
|
|
4033
4033
|
a.Q.map((i) => this._loadSingleGrammar(i.scopeName)), a.processQueue();
|
|
4034
4034
|
return this._grammarForScopeName(
|
|
@@ -4086,7 +4086,7 @@ class Ke {
|
|
|
4086
4086
|
Ke.prototype.normal = {};
|
|
4087
4087
|
Ke.prototype.property = {};
|
|
4088
4088
|
Ke.prototype.space = void 0;
|
|
4089
|
-
function
|
|
4089
|
+
function co(t, e) {
|
|
4090
4090
|
const n = {}, r = {};
|
|
4091
4091
|
for (const o of t)
|
|
4092
4092
|
Object.assign(n, o.property), Object.assign(r, o.normal);
|
|
@@ -4120,10 +4120,10 @@ V.prototype.overloadedBoolean = !1;
|
|
|
4120
4120
|
V.prototype.property = "";
|
|
4121
4121
|
V.prototype.spaceSeparated = !1;
|
|
4122
4122
|
V.prototype.space = void 0;
|
|
4123
|
-
let
|
|
4123
|
+
let Ja = 0;
|
|
4124
4124
|
const E = be(), T = be(), en = be(), w = be(), N = be(), Ee = be(), X = be();
|
|
4125
4125
|
function be() {
|
|
4126
|
-
return 2 ** ++
|
|
4126
|
+
return 2 ** ++Ja;
|
|
4127
4127
|
}
|
|
4128
4128
|
const tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4129
4129
|
__proto__: null,
|
|
@@ -4178,7 +4178,7 @@ function Ne(t) {
|
|
|
4178
4178
|
}
|
|
4179
4179
|
return new Ke(e, n, t.space);
|
|
4180
4180
|
}
|
|
4181
|
-
const
|
|
4181
|
+
const ho = Ne({
|
|
4182
4182
|
properties: {
|
|
4183
4183
|
ariaActiveDescendant: null,
|
|
4184
4184
|
ariaAtomic: T,
|
|
@@ -4234,13 +4234,13 @@ const co = Ne({
|
|
|
4234
4234
|
return e === "role" ? e : "aria-" + e.slice(4).toLowerCase();
|
|
4235
4235
|
}
|
|
4236
4236
|
});
|
|
4237
|
-
function
|
|
4237
|
+
function fo(t, e) {
|
|
4238
4238
|
return e in t ? t[e] : e;
|
|
4239
4239
|
}
|
|
4240
|
-
function
|
|
4241
|
-
return
|
|
4240
|
+
function po(t, e) {
|
|
4241
|
+
return fo(t, e.toLowerCase());
|
|
4242
4242
|
}
|
|
4243
|
-
const
|
|
4243
|
+
const Za = Ne({
|
|
4244
4244
|
attributes: {
|
|
4245
4245
|
acceptcharset: "accept-charset",
|
|
4246
4246
|
classname: "class",
|
|
@@ -4600,8 +4600,8 @@ const Ja = Ne({
|
|
|
4600
4600
|
unselectable: null
|
|
4601
4601
|
},
|
|
4602
4602
|
space: "html",
|
|
4603
|
-
transform:
|
|
4604
|
-
}),
|
|
4603
|
+
transform: po
|
|
4604
|
+
}), Qa = Ne({
|
|
4605
4605
|
attributes: {
|
|
4606
4606
|
accentHeight: "accent-height",
|
|
4607
4607
|
alignmentBaseline: "alignment-baseline",
|
|
@@ -5159,8 +5159,8 @@ const Ja = Ne({
|
|
|
5159
5159
|
zoomAndPan: null
|
|
5160
5160
|
},
|
|
5161
5161
|
space: "svg",
|
|
5162
|
-
transform:
|
|
5163
|
-
}),
|
|
5162
|
+
transform: fo
|
|
5163
|
+
}), go = Ne({
|
|
5164
5164
|
properties: {
|
|
5165
5165
|
xLinkActuate: null,
|
|
5166
5166
|
xLinkArcRole: null,
|
|
@@ -5174,31 +5174,31 @@ const Ja = Ne({
|
|
|
5174
5174
|
transform(t, e) {
|
|
5175
5175
|
return "xlink:" + e.slice(5).toLowerCase();
|
|
5176
5176
|
}
|
|
5177
|
-
}),
|
|
5177
|
+
}), mo = Ne({
|
|
5178
5178
|
attributes: { xmlnsxlink: "xmlns:xlink" },
|
|
5179
5179
|
properties: { xmlnsXLink: null, xmlns: null },
|
|
5180
5180
|
space: "xmlns",
|
|
5181
|
-
transform:
|
|
5182
|
-
}),
|
|
5181
|
+
transform: po
|
|
5182
|
+
}), yo = Ne({
|
|
5183
5183
|
properties: { xmlBase: null, xmlLang: null, xmlSpace: null },
|
|
5184
5184
|
space: "xml",
|
|
5185
5185
|
transform(t, e) {
|
|
5186
5186
|
return "xml:" + e.slice(3).toLowerCase();
|
|
5187
5187
|
}
|
|
5188
|
-
}),
|
|
5189
|
-
function
|
|
5188
|
+
}), ei = /[A-Z]/g, Jn = /-[a-z]/g, ti = /^data[-\w.:]+$/i;
|
|
5189
|
+
function ni(t, e) {
|
|
5190
5190
|
const n = Qt(e);
|
|
5191
5191
|
let r = e, o = V;
|
|
5192
5192
|
if (n in t.normal)
|
|
5193
5193
|
return t.property[t.normal[n]];
|
|
5194
|
-
if (n.length > 4 && n.slice(0, 4) === "data" &&
|
|
5194
|
+
if (n.length > 4 && n.slice(0, 4) === "data" && ti.test(e)) {
|
|
5195
5195
|
if (e.charAt(4) === "-") {
|
|
5196
|
-
const s = e.slice(5).replace(Jn,
|
|
5196
|
+
const s = e.slice(5).replace(Jn, oi);
|
|
5197
5197
|
r = "data" + s.charAt(0).toUpperCase() + s.slice(1);
|
|
5198
5198
|
} else {
|
|
5199
5199
|
const s = e.slice(4);
|
|
5200
5200
|
if (!Jn.test(s)) {
|
|
5201
|
-
let a = s.replace(
|
|
5201
|
+
let a = s.replace(ei, ri);
|
|
5202
5202
|
a.charAt(0) !== "-" && (a = "-" + a), e = "data" + a;
|
|
5203
5203
|
}
|
|
5204
5204
|
}
|
|
@@ -5206,23 +5206,23 @@ function ti(t, e) {
|
|
|
5206
5206
|
}
|
|
5207
5207
|
return new o(r, e);
|
|
5208
5208
|
}
|
|
5209
|
-
function
|
|
5209
|
+
function ri(t) {
|
|
5210
5210
|
return "-" + t.toLowerCase();
|
|
5211
5211
|
}
|
|
5212
|
-
function
|
|
5212
|
+
function oi(t) {
|
|
5213
5213
|
return t.charAt(1).toUpperCase();
|
|
5214
5214
|
}
|
|
5215
|
-
const
|
|
5215
|
+
const si = co([ho, Za, go, mo, yo], "html"), bo = co([ho, Qa, go, mo, yo], "svg"), ai = /["&'<>`]/g, ii = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, li = (
|
|
5216
5216
|
// eslint-disable-next-line no-control-regex, unicorn/no-hex-escape
|
|
5217
5217
|
/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g
|
|
5218
|
-
),
|
|
5219
|
-
function
|
|
5218
|
+
), ui = /[|\\{}()[\]^$+*?.]/g, Zn = /* @__PURE__ */ new WeakMap();
|
|
5219
|
+
function ci(t, e) {
|
|
5220
5220
|
if (t = t.replace(
|
|
5221
|
-
e.subset ?
|
|
5221
|
+
e.subset ? hi(e.subset) : ai,
|
|
5222
5222
|
r
|
|
5223
5223
|
), e.subset || e.escapeOnly)
|
|
5224
5224
|
return t;
|
|
5225
|
-
return t.replace(
|
|
5225
|
+
return t.replace(ii, n).replace(li, r);
|
|
5226
5226
|
function n(o, s, a) {
|
|
5227
5227
|
return e.format(
|
|
5228
5228
|
(o.charCodeAt(0) - 55296) * 1024 + o.charCodeAt(1) - 56320 + 65536,
|
|
@@ -5238,28 +5238,28 @@ function ui(t, e) {
|
|
|
5238
5238
|
);
|
|
5239
5239
|
}
|
|
5240
5240
|
}
|
|
5241
|
-
function
|
|
5241
|
+
function hi(t) {
|
|
5242
5242
|
let e = Zn.get(t);
|
|
5243
|
-
return e || (e =
|
|
5243
|
+
return e || (e = fi(t), Zn.set(t, e)), e;
|
|
5244
5244
|
}
|
|
5245
|
-
function
|
|
5245
|
+
function fi(t) {
|
|
5246
5246
|
const e = [];
|
|
5247
5247
|
let n = -1;
|
|
5248
5248
|
for (; ++n < t.length; )
|
|
5249
|
-
e.push(t[n].replace(
|
|
5249
|
+
e.push(t[n].replace(ui, "\\$&"));
|
|
5250
5250
|
return new RegExp("(?:" + e.join("|") + ")", "g");
|
|
5251
5251
|
}
|
|
5252
|
-
const
|
|
5253
|
-
function
|
|
5252
|
+
const pi = /[\dA-Fa-f]/;
|
|
5253
|
+
function di(t, e, n) {
|
|
5254
5254
|
const r = "&#x" + t.toString(16).toUpperCase();
|
|
5255
|
-
return n && e && !
|
|
5255
|
+
return n && e && !pi.test(String.fromCharCode(e)) ? r : r + ";";
|
|
5256
5256
|
}
|
|
5257
|
-
const
|
|
5258
|
-
function
|
|
5257
|
+
const gi = /\d/;
|
|
5258
|
+
function mi(t, e, n) {
|
|
5259
5259
|
const r = "&#" + String(t);
|
|
5260
|
-
return n && e && !
|
|
5260
|
+
return n && e && !gi.test(String.fromCharCode(e)) ? r : r + ";";
|
|
5261
5261
|
}
|
|
5262
|
-
const
|
|
5262
|
+
const yi = [
|
|
5263
5263
|
"AElig",
|
|
5264
5264
|
"AMP",
|
|
5265
5265
|
"Aacute",
|
|
@@ -5619,7 +5619,7 @@ const mi = [
|
|
|
5619
5619
|
lsaquo: "‹",
|
|
5620
5620
|
rsaquo: "›",
|
|
5621
5621
|
euro: "€"
|
|
5622
|
-
},
|
|
5622
|
+
}, bi = [
|
|
5623
5623
|
"cent",
|
|
5624
5624
|
"copy",
|
|
5625
5625
|
"divide",
|
|
@@ -5628,60 +5628,60 @@ const mi = [
|
|
|
5628
5628
|
"not",
|
|
5629
5629
|
"para",
|
|
5630
5630
|
"times"
|
|
5631
|
-
],
|
|
5631
|
+
], wo = {}.hasOwnProperty, nn = {};
|
|
5632
5632
|
let Ze;
|
|
5633
5633
|
for (Ze in $t)
|
|
5634
|
-
|
|
5635
|
-
const
|
|
5636
|
-
function
|
|
5634
|
+
wo.call($t, Ze) && (nn[$t[Ze]] = Ze);
|
|
5635
|
+
const wi = /[^\dA-Za-z]/;
|
|
5636
|
+
function Ci(t, e, n, r) {
|
|
5637
5637
|
const o = String.fromCharCode(t);
|
|
5638
|
-
if (
|
|
5638
|
+
if (wo.call(nn, o)) {
|
|
5639
5639
|
const s = nn[o], a = "&" + s;
|
|
5640
|
-
return n &&
|
|
5640
|
+
return n && yi.includes(s) && !bi.includes(s) && (!r || e && e !== 61 && wi.test(String.fromCharCode(e))) ? a : a + ";";
|
|
5641
5641
|
}
|
|
5642
5642
|
return "";
|
|
5643
5643
|
}
|
|
5644
|
-
function
|
|
5645
|
-
let r =
|
|
5646
|
-
if ((n.useNamedReferences || n.useShortestReferences) && (o =
|
|
5644
|
+
function _i(t, e, n) {
|
|
5645
|
+
let r = di(t, e, n.omitOptionalSemicolons), o;
|
|
5646
|
+
if ((n.useNamedReferences || n.useShortestReferences) && (o = Ci(
|
|
5647
5647
|
t,
|
|
5648
5648
|
e,
|
|
5649
5649
|
n.omitOptionalSemicolons,
|
|
5650
5650
|
n.attribute
|
|
5651
5651
|
)), (n.useShortestReferences || !o) && n.useShortestReferences) {
|
|
5652
|
-
const s =
|
|
5652
|
+
const s = mi(t, e, n.omitOptionalSemicolons);
|
|
5653
5653
|
s.length < r.length && (r = s);
|
|
5654
5654
|
}
|
|
5655
5655
|
return o && (!n.useShortestReferences || o.length < r.length) ? o : r;
|
|
5656
5656
|
}
|
|
5657
5657
|
function Ae(t, e) {
|
|
5658
|
-
return
|
|
5658
|
+
return ci(t, Object.assign({ format: _i }, e));
|
|
5659
5659
|
}
|
|
5660
|
-
const
|
|
5661
|
-
function
|
|
5660
|
+
const Si = /^>|^->|<!--|-->|--!>|<!-$/g, ki = [">"], vi = ["<", ">"];
|
|
5661
|
+
function xi(t, e, n, r) {
|
|
5662
5662
|
return r.settings.bogusComments ? "<?" + Ae(
|
|
5663
5663
|
t.value,
|
|
5664
5664
|
Object.assign({}, r.settings.characterReferences, {
|
|
5665
|
-
subset:
|
|
5665
|
+
subset: ki
|
|
5666
5666
|
})
|
|
5667
|
-
) + ">" : "<!--" + t.value.replace(
|
|
5667
|
+
) + ">" : "<!--" + t.value.replace(Si, o) + "-->";
|
|
5668
5668
|
function o(s) {
|
|
5669
5669
|
return Ae(
|
|
5670
5670
|
s,
|
|
5671
5671
|
Object.assign({}, r.settings.characterReferences, {
|
|
5672
|
-
subset:
|
|
5672
|
+
subset: vi
|
|
5673
5673
|
})
|
|
5674
5674
|
);
|
|
5675
5675
|
}
|
|
5676
5676
|
}
|
|
5677
|
-
function
|
|
5677
|
+
function Ei(t, e, n, r) {
|
|
5678
5678
|
return "<!" + (r.settings.upperDoctype ? "DOCTYPE" : "doctype") + (r.settings.tightDoctype ? "" : " ") + "html>";
|
|
5679
5679
|
}
|
|
5680
|
-
const O =
|
|
5681
|
-
function
|
|
5680
|
+
const O = _o(1), Co = _o(-1), Ai = [];
|
|
5681
|
+
function _o(t) {
|
|
5682
5682
|
return e;
|
|
5683
5683
|
function e(n, r, o) {
|
|
5684
|
-
const s = n ? n.children :
|
|
5684
|
+
const s = n ? n.children : Ai;
|
|
5685
5685
|
let a = (r || 0) + t, i = s[a];
|
|
5686
5686
|
if (!o)
|
|
5687
5687
|
for (; i && Ct(i); )
|
|
@@ -5689,60 +5689,60 @@ function Co(t) {
|
|
|
5689
5689
|
return i;
|
|
5690
5690
|
}
|
|
5691
5691
|
}
|
|
5692
|
-
const
|
|
5693
|
-
function
|
|
5692
|
+
const Ri = {}.hasOwnProperty;
|
|
5693
|
+
function So(t) {
|
|
5694
5694
|
return e;
|
|
5695
5695
|
function e(n, r, o) {
|
|
5696
|
-
return
|
|
5696
|
+
return Ri.call(t, n.tagName) && t[n.tagName](n, r, o);
|
|
5697
5697
|
}
|
|
5698
5698
|
}
|
|
5699
|
-
const bn =
|
|
5700
|
-
body:
|
|
5699
|
+
const bn = So({
|
|
5700
|
+
body: Ni,
|
|
5701
5701
|
caption: Tt,
|
|
5702
5702
|
colgroup: Tt,
|
|
5703
|
-
dd:
|
|
5704
|
-
dt:
|
|
5703
|
+
dd: Ti,
|
|
5704
|
+
dt: $i,
|
|
5705
5705
|
head: Tt,
|
|
5706
|
-
html:
|
|
5707
|
-
li:
|
|
5708
|
-
optgroup:
|
|
5709
|
-
option:
|
|
5710
|
-
p:
|
|
5706
|
+
html: Ii,
|
|
5707
|
+
li: Pi,
|
|
5708
|
+
optgroup: Mi,
|
|
5709
|
+
option: Oi,
|
|
5710
|
+
p: Li,
|
|
5711
5711
|
rp: Qn,
|
|
5712
5712
|
rt: Qn,
|
|
5713
|
-
tbody:
|
|
5713
|
+
tbody: Gi,
|
|
5714
5714
|
td: er,
|
|
5715
|
-
tfoot:
|
|
5715
|
+
tfoot: Fi,
|
|
5716
5716
|
th: er,
|
|
5717
|
-
thead:
|
|
5718
|
-
tr:
|
|
5717
|
+
thead: Di,
|
|
5718
|
+
tr: Bi
|
|
5719
5719
|
});
|
|
5720
5720
|
function Tt(t, e, n) {
|
|
5721
5721
|
const r = O(n, e, !0);
|
|
5722
5722
|
return !r || r.type !== "comment" && !(r.type === "text" && Ct(r.value.charAt(0)));
|
|
5723
5723
|
}
|
|
5724
|
-
function
|
|
5724
|
+
function Ii(t, e, n) {
|
|
5725
5725
|
const r = O(n, e);
|
|
5726
5726
|
return !r || r.type !== "comment";
|
|
5727
5727
|
}
|
|
5728
|
-
function
|
|
5728
|
+
function Ni(t, e, n) {
|
|
5729
5729
|
const r = O(n, e);
|
|
5730
5730
|
return !r || r.type !== "comment";
|
|
5731
5731
|
}
|
|
5732
|
-
function
|
|
5732
|
+
function Li(t, e, n) {
|
|
5733
5733
|
const r = O(n, e);
|
|
5734
5734
|
return r ? r.type === "element" && (r.tagName === "address" || r.tagName === "article" || r.tagName === "aside" || r.tagName === "blockquote" || r.tagName === "details" || r.tagName === "div" || r.tagName === "dl" || r.tagName === "fieldset" || r.tagName === "figcaption" || r.tagName === "figure" || r.tagName === "footer" || r.tagName === "form" || r.tagName === "h1" || r.tagName === "h2" || r.tagName === "h3" || r.tagName === "h4" || r.tagName === "h5" || r.tagName === "h6" || r.tagName === "header" || r.tagName === "hgroup" || r.tagName === "hr" || r.tagName === "main" || r.tagName === "menu" || r.tagName === "nav" || r.tagName === "ol" || r.tagName === "p" || r.tagName === "pre" || r.tagName === "section" || r.tagName === "table" || r.tagName === "ul") : !n || // Confusing parent.
|
|
5735
5735
|
!(n.type === "element" && (n.tagName === "a" || n.tagName === "audio" || n.tagName === "del" || n.tagName === "ins" || n.tagName === "map" || n.tagName === "noscript" || n.tagName === "video"));
|
|
5736
5736
|
}
|
|
5737
|
-
function
|
|
5737
|
+
function Pi(t, e, n) {
|
|
5738
5738
|
const r = O(n, e);
|
|
5739
5739
|
return !r || r.type === "element" && r.tagName === "li";
|
|
5740
5740
|
}
|
|
5741
|
-
function
|
|
5741
|
+
function $i(t, e, n) {
|
|
5742
5742
|
const r = O(n, e);
|
|
5743
5743
|
return !!(r && r.type === "element" && (r.tagName === "dt" || r.tagName === "dd"));
|
|
5744
5744
|
}
|
|
5745
|
-
function
|
|
5745
|
+
function Ti(t, e, n) {
|
|
5746
5746
|
const r = O(n, e);
|
|
5747
5747
|
return !r || r.type === "element" && (r.tagName === "dt" || r.tagName === "dd");
|
|
5748
5748
|
}
|
|
@@ -5750,26 +5750,26 @@ function Qn(t, e, n) {
|
|
|
5750
5750
|
const r = O(n, e);
|
|
5751
5751
|
return !r || r.type === "element" && (r.tagName === "rp" || r.tagName === "rt");
|
|
5752
5752
|
}
|
|
5753
|
-
function
|
|
5753
|
+
function Mi(t, e, n) {
|
|
5754
5754
|
const r = O(n, e);
|
|
5755
5755
|
return !r || r.type === "element" && r.tagName === "optgroup";
|
|
5756
5756
|
}
|
|
5757
|
-
function
|
|
5757
|
+
function Oi(t, e, n) {
|
|
5758
5758
|
const r = O(n, e);
|
|
5759
5759
|
return !r || r.type === "element" && (r.tagName === "option" || r.tagName === "optgroup");
|
|
5760
5760
|
}
|
|
5761
|
-
function
|
|
5761
|
+
function Di(t, e, n) {
|
|
5762
5762
|
const r = O(n, e);
|
|
5763
5763
|
return !!(r && r.type === "element" && (r.tagName === "tbody" || r.tagName === "tfoot"));
|
|
5764
5764
|
}
|
|
5765
|
-
function
|
|
5765
|
+
function Gi(t, e, n) {
|
|
5766
5766
|
const r = O(n, e);
|
|
5767
5767
|
return !r || r.type === "element" && (r.tagName === "tbody" || r.tagName === "tfoot");
|
|
5768
5768
|
}
|
|
5769
|
-
function
|
|
5769
|
+
function Fi(t, e, n) {
|
|
5770
5770
|
return !O(n, e);
|
|
5771
5771
|
}
|
|
5772
|
-
function
|
|
5772
|
+
function Bi(t, e, n) {
|
|
5773
5773
|
const r = O(n, e);
|
|
5774
5774
|
return !r || r.type === "element" && r.tagName === "tr";
|
|
5775
5775
|
}
|
|
@@ -5777,18 +5777,18 @@ function er(t, e, n) {
|
|
|
5777
5777
|
const r = O(n, e);
|
|
5778
5778
|
return !r || r.type === "element" && (r.tagName === "td" || r.tagName === "th");
|
|
5779
5779
|
}
|
|
5780
|
-
const
|
|
5781
|
-
body:
|
|
5782
|
-
colgroup:
|
|
5783
|
-
head:
|
|
5784
|
-
html:
|
|
5785
|
-
tbody:
|
|
5780
|
+
const ji = So({
|
|
5781
|
+
body: Hi,
|
|
5782
|
+
colgroup: Wi,
|
|
5783
|
+
head: zi,
|
|
5784
|
+
html: Ui,
|
|
5785
|
+
tbody: Vi
|
|
5786
5786
|
});
|
|
5787
|
-
function
|
|
5787
|
+
function Ui(t) {
|
|
5788
5788
|
const e = O(t, -1);
|
|
5789
5789
|
return !e || e.type !== "comment";
|
|
5790
5790
|
}
|
|
5791
|
-
function
|
|
5791
|
+
function zi(t) {
|
|
5792
5792
|
const e = /* @__PURE__ */ new Set();
|
|
5793
5793
|
for (const r of t.children)
|
|
5794
5794
|
if (r.type === "element" && (r.tagName === "base" || r.tagName === "title")) {
|
|
@@ -5798,16 +5798,16 @@ function Ui(t) {
|
|
|
5798
5798
|
const n = t.children[0];
|
|
5799
5799
|
return !n || n.type === "element";
|
|
5800
5800
|
}
|
|
5801
|
-
function
|
|
5801
|
+
function Hi(t) {
|
|
5802
5802
|
const e = O(t, -1, !0);
|
|
5803
5803
|
return !e || e.type !== "comment" && !(e.type === "text" && Ct(e.value.charAt(0))) && !(e.type === "element" && (e.tagName === "meta" || e.tagName === "link" || e.tagName === "script" || e.tagName === "style" || e.tagName === "template"));
|
|
5804
5804
|
}
|
|
5805
|
-
function
|
|
5806
|
-
const r =
|
|
5805
|
+
function Wi(t, e, n) {
|
|
5806
|
+
const r = Co(n, e), o = O(t, -1, !0);
|
|
5807
5807
|
return n && r && r.type === "element" && r.tagName === "colgroup" && bn(r, n.children.indexOf(r), n) ? !1 : !!(o && o.type === "element" && o.tagName === "col");
|
|
5808
5808
|
}
|
|
5809
|
-
function
|
|
5810
|
-
const r =
|
|
5809
|
+
function Vi(t, e, n) {
|
|
5810
|
+
const r = Co(n, e), o = O(t, -1);
|
|
5811
5811
|
return n && r && r.type === "element" && (r.tagName === "thead" || r.tagName === "tbody") && bn(r, n.children.indexOf(r), n) ? !1 : !!(o && o.type === "element" && o.tagName === "tr");
|
|
5812
5812
|
}
|
|
5813
5813
|
const Qe = {
|
|
@@ -5840,24 +5840,24 @@ const Qe = {
|
|
|
5840
5840
|
['\0"&'.split(""), "\0\"&'`".split("")]
|
|
5841
5841
|
]
|
|
5842
5842
|
};
|
|
5843
|
-
function
|
|
5843
|
+
function qi(t, e, n, r) {
|
|
5844
5844
|
const o = r.schema, s = o.space === "svg" ? !1 : r.settings.omitOptionalTags;
|
|
5845
5845
|
let a = o.space === "svg" ? r.settings.closeEmptyElements : r.settings.voids.includes(t.tagName.toLowerCase());
|
|
5846
5846
|
const i = [];
|
|
5847
5847
|
let l;
|
|
5848
|
-
o.space === "html" && t.tagName === "svg" && (r.schema =
|
|
5849
|
-
const u =
|
|
5848
|
+
o.space === "html" && t.tagName === "svg" && (r.schema = bo);
|
|
5849
|
+
const u = Xi(r, t.properties), c = r.all(
|
|
5850
5850
|
o.space === "html" && t.tagName === "template" ? t.content : t
|
|
5851
5851
|
);
|
|
5852
|
-
return r.schema = o, c && (a = !1), (u || !s || !
|
|
5852
|
+
return r.schema = o, c && (a = !1), (u || !s || !ji(t, e, n)) && (i.push("<", t.tagName, u ? " " + u : ""), a && (o.space === "svg" || r.settings.closeSelfClosing) && (l = u.charAt(u.length - 1), (!r.settings.tightSelfClosing || l === "/" || l && l !== '"' && l !== "'") && i.push(" "), i.push("/")), i.push(">")), i.push(c), !a && (!s || !bn(t, e, n)) && i.push("</" + t.tagName + ">"), i.join("");
|
|
5853
5853
|
}
|
|
5854
|
-
function
|
|
5854
|
+
function Xi(t, e) {
|
|
5855
5855
|
const n = [];
|
|
5856
5856
|
let r = -1, o;
|
|
5857
5857
|
if (e) {
|
|
5858
5858
|
for (o in e)
|
|
5859
5859
|
if (e[o] !== null && e[o] !== void 0) {
|
|
5860
|
-
const s =
|
|
5860
|
+
const s = Ki(t, o, e[o]);
|
|
5861
5861
|
s && n.push(s);
|
|
5862
5862
|
}
|
|
5863
5863
|
}
|
|
@@ -5867,8 +5867,8 @@ function qi(t, e) {
|
|
|
5867
5867
|
}
|
|
5868
5868
|
return n.join("");
|
|
5869
5869
|
}
|
|
5870
|
-
function
|
|
5871
|
-
const r =
|
|
5870
|
+
function Ki(t, e, n) {
|
|
5871
|
+
const r = ni(t.schema, e), o = t.settings.allowParseErrors && t.schema.space === "html" ? 0 : 1, s = t.settings.allowDangerousCharacters ? 0 : 1;
|
|
5872
5872
|
let a = t.quote, i;
|
|
5873
5873
|
if (r.overloadedBoolean && (n === r.attribute || n === "") ? n = !0 : (r.boolean || r.overloadedBoolean) && (typeof n != "string" || n === r.attribute || n === "") && (n = !!n), n == null || n === !1 || typeof n == "number" && Number.isNaN(n))
|
|
5874
5874
|
return "";
|
|
@@ -5879,7 +5879,7 @@ function Xi(t, e, n) {
|
|
|
5879
5879
|
subset: Qe.name[o][s]
|
|
5880
5880
|
})
|
|
5881
5881
|
);
|
|
5882
|
-
return n === !0 || (n = Array.isArray(n) ? (r.commaSeparated ?
|
|
5882
|
+
return n === !0 || (n = Array.isArray(n) ? (r.commaSeparated ? Nr : Fr)(n, {
|
|
5883
5883
|
padLeft: !t.settings.tightCommaSeparatedLists
|
|
5884
5884
|
}) : String(n), t.settings.collapseEmptyAttributes && !n) ? l : (t.settings.preferUnquoted && (i = Ae(
|
|
5885
5885
|
n,
|
|
@@ -5896,44 +5896,44 @@ function Xi(t, e, n) {
|
|
|
5896
5896
|
})
|
|
5897
5897
|
) + a), l + (i && "=" + i));
|
|
5898
5898
|
}
|
|
5899
|
-
const
|
|
5900
|
-
function
|
|
5899
|
+
const Yi = ["<", "&"];
|
|
5900
|
+
function ko(t, e, n, r) {
|
|
5901
5901
|
return n && n.type === "element" && (n.tagName === "script" || n.tagName === "style") ? t.value : Ae(
|
|
5902
5902
|
t.value,
|
|
5903
5903
|
Object.assign({}, r.settings.characterReferences, {
|
|
5904
|
-
subset:
|
|
5904
|
+
subset: Yi
|
|
5905
5905
|
})
|
|
5906
5906
|
);
|
|
5907
5907
|
}
|
|
5908
|
-
function Yi(t, e, n, r) {
|
|
5909
|
-
return r.settings.allowDangerousHtml ? t.value : So(t, e, n, r);
|
|
5910
|
-
}
|
|
5911
5908
|
function Ji(t, e, n, r) {
|
|
5909
|
+
return r.settings.allowDangerousHtml ? t.value : ko(t, e, n, r);
|
|
5910
|
+
}
|
|
5911
|
+
function Zi(t, e, n, r) {
|
|
5912
5912
|
return r.all(t);
|
|
5913
5913
|
}
|
|
5914
|
-
const
|
|
5915
|
-
invalid:
|
|
5916
|
-
unknown:
|
|
5917
|
-
handlers: { comment:
|
|
5914
|
+
const Qi = ua("type", {
|
|
5915
|
+
invalid: el,
|
|
5916
|
+
unknown: tl,
|
|
5917
|
+
handlers: { comment: xi, doctype: Ei, element: qi, raw: Ji, root: Zi, text: ko }
|
|
5918
5918
|
});
|
|
5919
|
-
function
|
|
5919
|
+
function el(t) {
|
|
5920
5920
|
throw new Error("Expected node, not `" + t + "`");
|
|
5921
5921
|
}
|
|
5922
|
-
function
|
|
5922
|
+
function tl(t) {
|
|
5923
5923
|
const e = (
|
|
5924
5924
|
/** @type {Nodes} */
|
|
5925
5925
|
t
|
|
5926
5926
|
);
|
|
5927
5927
|
throw new Error("Cannot compile unknown node `" + e.type + "`");
|
|
5928
5928
|
}
|
|
5929
|
-
const
|
|
5930
|
-
function
|
|
5931
|
-
const n = e ||
|
|
5929
|
+
const nl = {}, rl = {}, ol = [];
|
|
5930
|
+
function sl(t, e) {
|
|
5931
|
+
const n = e || nl, r = n.quote || '"', o = r === '"' ? "'" : '"';
|
|
5932
5932
|
if (r !== '"' && r !== "'")
|
|
5933
5933
|
throw new Error("Invalid quote `" + r + "`, expected `'` or `\"`");
|
|
5934
5934
|
return {
|
|
5935
|
-
one:
|
|
5936
|
-
all:
|
|
5935
|
+
one: al,
|
|
5936
|
+
all: il,
|
|
5937
5937
|
settings: {
|
|
5938
5938
|
omitOptionalTags: n.omitOptionalTags || !1,
|
|
5939
5939
|
allowParseErrors: n.allowParseErrors || !1,
|
|
@@ -5948,12 +5948,12 @@ function ol(t, e) {
|
|
|
5948
5948
|
tightSelfClosing: n.tightSelfClosing || !1,
|
|
5949
5949
|
collapseEmptyAttributes: n.collapseEmptyAttributes || !1,
|
|
5950
5950
|
allowDangerousHtml: n.allowDangerousHtml || !1,
|
|
5951
|
-
voids: n.voids ||
|
|
5952
|
-
characterReferences: n.characterReferences ||
|
|
5951
|
+
voids: n.voids || ca,
|
|
5952
|
+
characterReferences: n.characterReferences || rl,
|
|
5953
5953
|
closeSelfClosing: n.closeSelfClosing || !1,
|
|
5954
5954
|
closeEmptyElements: n.closeEmptyElements || !1
|
|
5955
5955
|
},
|
|
5956
|
-
schema: n.space === "svg" ?
|
|
5956
|
+
schema: n.space === "svg" ? bo : si,
|
|
5957
5957
|
quote: r,
|
|
5958
5958
|
alternative: o
|
|
5959
5959
|
}.one(
|
|
@@ -5962,11 +5962,11 @@ function ol(t, e) {
|
|
|
5962
5962
|
void 0
|
|
5963
5963
|
);
|
|
5964
5964
|
}
|
|
5965
|
-
function
|
|
5966
|
-
return
|
|
5965
|
+
function al(t, e, n) {
|
|
5966
|
+
return Qi(t, e, n, this);
|
|
5967
5967
|
}
|
|
5968
|
-
function
|
|
5969
|
-
const e = [], n = t && t.children ||
|
|
5968
|
+
function il(t) {
|
|
5969
|
+
const e = [], n = t && t.children || ol;
|
|
5970
5970
|
let r = -1;
|
|
5971
5971
|
for (; ++r < n.length; )
|
|
5972
5972
|
e[r] = this.one(n[r], r, t);
|
|
@@ -5981,25 +5981,25 @@ function ft(t, e) {
|
|
|
5981
5981
|
function ue(t, e) {
|
|
5982
5982
|
return t && (e?.[t?.toLowerCase()] || t);
|
|
5983
5983
|
}
|
|
5984
|
-
function
|
|
5984
|
+
function ll(t) {
|
|
5985
5985
|
return Array.isArray(t) ? t : [t];
|
|
5986
5986
|
}
|
|
5987
|
-
async function
|
|
5987
|
+
async function vo(t) {
|
|
5988
5988
|
return Promise.resolve(typeof t == "function" ? t() : t).then((e) => e.default || e);
|
|
5989
5989
|
}
|
|
5990
5990
|
function wn(t) {
|
|
5991
5991
|
return !t || ["plaintext", "txt", "text", "plain"].includes(t);
|
|
5992
5992
|
}
|
|
5993
|
-
function
|
|
5993
|
+
function xo(t) {
|
|
5994
5994
|
return t === "ansi" || wn(t);
|
|
5995
5995
|
}
|
|
5996
5996
|
function Cn(t) {
|
|
5997
5997
|
return t === "none";
|
|
5998
5998
|
}
|
|
5999
|
-
function
|
|
5999
|
+
function ul(t) {
|
|
6000
6000
|
return Cn(t);
|
|
6001
6001
|
}
|
|
6002
|
-
function
|
|
6002
|
+
function Eo(t, e) {
|
|
6003
6003
|
if (!e)
|
|
6004
6004
|
return t;
|
|
6005
6005
|
t.properties ||= {}, t.properties.class ||= [], typeof t.properties.class == "string" && (t.properties.class = t.properties.class.split(/\s+/g)), Array.isArray(t.properties.class) || (t.properties.class = []);
|
|
@@ -6018,7 +6018,7 @@ function St(t, e = !1) {
|
|
|
6018
6018
|
}
|
|
6019
6019
|
return o;
|
|
6020
6020
|
}
|
|
6021
|
-
function
|
|
6021
|
+
function cl(t) {
|
|
6022
6022
|
const e = St(t, !0).map(([o]) => o);
|
|
6023
6023
|
function n(o) {
|
|
6024
6024
|
if (o === t.length)
|
|
@@ -6046,8 +6046,8 @@ function ul(t) {
|
|
|
6046
6046
|
posToIndex: r
|
|
6047
6047
|
};
|
|
6048
6048
|
}
|
|
6049
|
-
const _n = "light-dark()",
|
|
6050
|
-
function
|
|
6049
|
+
const _n = "light-dark()", hl = ["color", "background-color"];
|
|
6050
|
+
function fl(t, e) {
|
|
6051
6051
|
let n = 0;
|
|
6052
6052
|
const r = [];
|
|
6053
6053
|
for (const o of e)
|
|
@@ -6062,14 +6062,14 @@ function hl(t, e) {
|
|
|
6062
6062
|
offset: t.offset + n
|
|
6063
6063
|
}), r;
|
|
6064
6064
|
}
|
|
6065
|
-
function
|
|
6065
|
+
function pl(t, e) {
|
|
6066
6066
|
const n = Array.from(e instanceof Set ? e : new Set(e)).sort((r, o) => r - o);
|
|
6067
6067
|
return n.length ? t.map((r) => r.flatMap((o) => {
|
|
6068
6068
|
const s = n.filter((a) => o.offset < a && a < o.offset + o.content.length).map((a) => a - o.offset).sort((a, i) => a - i);
|
|
6069
|
-
return s.length ?
|
|
6069
|
+
return s.length ? fl(o, s) : o;
|
|
6070
6070
|
})) : t;
|
|
6071
6071
|
}
|
|
6072
|
-
function
|
|
6072
|
+
function dl(t, e, n, r, o = "css-vars") {
|
|
6073
6073
|
const s = {
|
|
6074
6074
|
content: t.content,
|
|
6075
6075
|
explanation: t.explanation,
|
|
@@ -6081,7 +6081,7 @@ function pl(t, e, n, r, o = "css-vars") {
|
|
|
6081
6081
|
return a.forEach((c, h) => {
|
|
6082
6082
|
for (const p of i) {
|
|
6083
6083
|
const d = c[p] || "inherit";
|
|
6084
|
-
if (h === 0 && r &&
|
|
6084
|
+
if (h === 0 && r && hl.includes(p))
|
|
6085
6085
|
if (r === _n && a.length > 1) {
|
|
6086
6086
|
const f = e.findIndex((m) => m === "light"), g = e.findIndex((m) => m === "dark");
|
|
6087
6087
|
if (f === -1 || g === -1)
|
|
@@ -6107,12 +6107,12 @@ function pt(t) {
|
|
|
6107
6107
|
function rn(t) {
|
|
6108
6108
|
return typeof t == "string" ? t : Object.entries(t).map(([e, n]) => `${e}:${n}`).join(";");
|
|
6109
6109
|
}
|
|
6110
|
-
const
|
|
6110
|
+
const Ao = /* @__PURE__ */ new WeakMap();
|
|
6111
6111
|
function kt(t, e) {
|
|
6112
|
-
|
|
6112
|
+
Ao.set(t, e);
|
|
6113
6113
|
}
|
|
6114
6114
|
function We(t) {
|
|
6115
|
-
return
|
|
6115
|
+
return Ao.get(t);
|
|
6116
6116
|
}
|
|
6117
6117
|
class Le {
|
|
6118
6118
|
/**
|
|
@@ -6134,7 +6134,7 @@ class Le {
|
|
|
6134
6134
|
*/
|
|
6135
6135
|
static initial(e, n) {
|
|
6136
6136
|
return new Le(
|
|
6137
|
-
Object.fromEntries(
|
|
6137
|
+
Object.fromEntries(ll(n).map((r) => [r, Zt])),
|
|
6138
6138
|
e
|
|
6139
6139
|
);
|
|
6140
6140
|
}
|
|
@@ -6155,7 +6155,7 @@ class Le {
|
|
|
6155
6155
|
return this._stacks[e];
|
|
6156
6156
|
}
|
|
6157
6157
|
getScopes(e = this.theme) {
|
|
6158
|
-
return
|
|
6158
|
+
return gl(this._stacks[e]);
|
|
6159
6159
|
}
|
|
6160
6160
|
toJSON() {
|
|
6161
6161
|
return {
|
|
@@ -6166,7 +6166,7 @@ class Le {
|
|
|
6166
6166
|
};
|
|
6167
6167
|
}
|
|
6168
6168
|
}
|
|
6169
|
-
function
|
|
6169
|
+
function gl(t) {
|
|
6170
6170
|
const e = [], n = /* @__PURE__ */ new Set();
|
|
6171
6171
|
function r(o) {
|
|
6172
6172
|
if (n.has(o))
|
|
@@ -6177,12 +6177,12 @@ function dl(t) {
|
|
|
6177
6177
|
}
|
|
6178
6178
|
return r(t), e;
|
|
6179
6179
|
}
|
|
6180
|
-
function
|
|
6180
|
+
function ml(t, e) {
|
|
6181
6181
|
if (!(t instanceof Le))
|
|
6182
6182
|
throw new F("Invalid grammar state");
|
|
6183
6183
|
return t.getInternalStack(e);
|
|
6184
6184
|
}
|
|
6185
|
-
function
|
|
6185
|
+
function yl() {
|
|
6186
6186
|
const t = /* @__PURE__ */ new WeakMap();
|
|
6187
6187
|
function e(n) {
|
|
6188
6188
|
if (!t.has(n.meta)) {
|
|
@@ -6208,12 +6208,12 @@ function ml() {
|
|
|
6208
6208
|
};
|
|
6209
6209
|
}
|
|
6210
6210
|
};
|
|
6211
|
-
const o =
|
|
6211
|
+
const o = cl(n.source), s = (n.options.decorations || []).map((a) => ({
|
|
6212
6212
|
...a,
|
|
6213
6213
|
start: r(a.start),
|
|
6214
6214
|
end: r(a.end)
|
|
6215
6215
|
}));
|
|
6216
|
-
|
|
6216
|
+
bl(s), t.set(n.meta, {
|
|
6217
6217
|
decorations: s,
|
|
6218
6218
|
converter: o,
|
|
6219
6219
|
source: n.source
|
|
@@ -6227,7 +6227,7 @@ function ml() {
|
|
|
6227
6227
|
if (!this.options.decorations?.length)
|
|
6228
6228
|
return;
|
|
6229
6229
|
const o = e(this).decorations.flatMap((a) => [a.start.offset, a.end.offset]);
|
|
6230
|
-
return
|
|
6230
|
+
return pl(n, o);
|
|
6231
6231
|
},
|
|
6232
6232
|
code(n) {
|
|
6233
6233
|
if (!this.options.decorations?.length)
|
|
@@ -6240,7 +6240,7 @@ function ml() {
|
|
|
6240
6240
|
let g = "", C = -1, y = -1;
|
|
6241
6241
|
if (h === 0 && (C = 0), p === 0 && (y = 0), p === Number.POSITIVE_INFINITY && (y = f.children.length), C === -1 || y === -1)
|
|
6242
6242
|
for (let _ = 0; _ < f.children.length; _++)
|
|
6243
|
-
g +=
|
|
6243
|
+
g += Ro(f.children[_]), C === -1 && g.length === h && (C = _ + 1), y === -1 && g.length === p && (y = _ + 1);
|
|
6244
6244
|
if (C === -1)
|
|
6245
6245
|
throw new F(`Failed to find start index for decoration ${JSON.stringify(d.start)}`);
|
|
6246
6246
|
if (y === -1)
|
|
@@ -6269,7 +6269,7 @@ function ml() {
|
|
|
6269
6269
|
...c.properties,
|
|
6270
6270
|
...d,
|
|
6271
6271
|
class: c.properties.class
|
|
6272
|
-
}, h.properties?.class &&
|
|
6272
|
+
}, h.properties?.class && Eo(c, h.properties.class), c = f(c, p) || c, c;
|
|
6273
6273
|
}
|
|
6274
6274
|
const l = [], u = r.decorations.sort((c, h) => h.start.offset - c.start.offset || c.end.offset - h.end.offset);
|
|
6275
6275
|
for (const c of u) {
|
|
@@ -6287,7 +6287,7 @@ function ml() {
|
|
|
6287
6287
|
}
|
|
6288
6288
|
};
|
|
6289
6289
|
}
|
|
6290
|
-
function
|
|
6290
|
+
function bl(t) {
|
|
6291
6291
|
for (let e = 0; e < t.length; e++) {
|
|
6292
6292
|
const n = t[e];
|
|
6293
6293
|
if (n.start.offset > n.end.offset)
|
|
@@ -6302,22 +6302,22 @@ function yl(t) {
|
|
|
6302
6302
|
}
|
|
6303
6303
|
}
|
|
6304
6304
|
}
|
|
6305
|
-
function
|
|
6306
|
-
return t.type === "text" ? t.value : t.type === "element" ? t.children.map(
|
|
6305
|
+
function Ro(t) {
|
|
6306
|
+
return t.type === "text" ? t.value : t.type === "element" ? t.children.map(Ro).join("") : "";
|
|
6307
6307
|
}
|
|
6308
|
-
const
|
|
6309
|
-
/* @__PURE__ */
|
|
6308
|
+
const wl = [
|
|
6309
|
+
/* @__PURE__ */ yl()
|
|
6310
6310
|
];
|
|
6311
6311
|
function dt(t) {
|
|
6312
|
-
const e =
|
|
6312
|
+
const e = Cl(t.transformers || []);
|
|
6313
6313
|
return [
|
|
6314
6314
|
...e.pre,
|
|
6315
6315
|
...e.normal,
|
|
6316
6316
|
...e.post,
|
|
6317
|
-
...
|
|
6317
|
+
...wl
|
|
6318
6318
|
];
|
|
6319
6319
|
}
|
|
6320
|
-
function
|
|
6320
|
+
function Cl(t) {
|
|
6321
6321
|
const e = [], n = [], r = [];
|
|
6322
6322
|
for (const o of t)
|
|
6323
6323
|
switch (o.enforce) {
|
|
@@ -6358,7 +6358,7 @@ var de = [
|
|
|
6358
6358
|
8: "hidden",
|
|
6359
6359
|
9: "strikethrough"
|
|
6360
6360
|
};
|
|
6361
|
-
function
|
|
6361
|
+
function _l(t, e) {
|
|
6362
6362
|
const n = t.indexOf("\x1B", e);
|
|
6363
6363
|
if (n !== -1 && t[n + 1] === "[") {
|
|
6364
6364
|
const r = t.indexOf("m", n);
|
|
@@ -6387,7 +6387,7 @@ function tr(t) {
|
|
|
6387
6387
|
return { type: "table", index: Number(n) };
|
|
6388
6388
|
}
|
|
6389
6389
|
}
|
|
6390
|
-
function
|
|
6390
|
+
function Sl(t) {
|
|
6391
6391
|
const e = [];
|
|
6392
6392
|
for (; t.length > 0; ) {
|
|
6393
6393
|
const n = t.shift();
|
|
@@ -6455,21 +6455,21 @@ function _l(t) {
|
|
|
6455
6455
|
}
|
|
6456
6456
|
return e;
|
|
6457
6457
|
}
|
|
6458
|
-
function
|
|
6458
|
+
function kl() {
|
|
6459
6459
|
let t = null, e = null, n = /* @__PURE__ */ new Set();
|
|
6460
6460
|
return {
|
|
6461
6461
|
parse(r) {
|
|
6462
6462
|
const o = [];
|
|
6463
6463
|
let s = 0;
|
|
6464
6464
|
do {
|
|
6465
|
-
const a =
|
|
6465
|
+
const a = _l(r, s), i = a.sequence ? r.substring(s, a.startPosition) : r.substring(s);
|
|
6466
6466
|
if (i.length > 0 && o.push({
|
|
6467
6467
|
value: i,
|
|
6468
6468
|
foreground: t,
|
|
6469
6469
|
background: e,
|
|
6470
6470
|
decorations: new Set(n)
|
|
6471
6471
|
}), a.sequence) {
|
|
6472
|
-
const l =
|
|
6472
|
+
const l = Sl(a.sequence);
|
|
6473
6473
|
for (const u of l)
|
|
6474
6474
|
u.type === "resetAll" ? (t = null, e = null, n.clear()) : u.type === "resetForegroundColor" ? t = null : u.type === "resetBackgroundColor" ? e = null : u.type === "resetDecoration" && n.delete(u.value);
|
|
6475
6475
|
for (const u of l)
|
|
@@ -6481,7 +6481,7 @@ function Sl() {
|
|
|
6481
6481
|
}
|
|
6482
6482
|
};
|
|
6483
6483
|
}
|
|
6484
|
-
var
|
|
6484
|
+
var vl = {
|
|
6485
6485
|
black: "#000000",
|
|
6486
6486
|
red: "#bb0000",
|
|
6487
6487
|
green: "#00bb00",
|
|
@@ -6499,7 +6499,7 @@ var kl = {
|
|
|
6499
6499
|
brightCyan: "#55ffff",
|
|
6500
6500
|
brightWhite: "#ffffff"
|
|
6501
6501
|
};
|
|
6502
|
-
function
|
|
6502
|
+
function xl(t = vl) {
|
|
6503
6503
|
function e(i) {
|
|
6504
6504
|
return t[i];
|
|
6505
6505
|
}
|
|
@@ -6540,19 +6540,19 @@ function vl(t = kl) {
|
|
|
6540
6540
|
value: a
|
|
6541
6541
|
};
|
|
6542
6542
|
}
|
|
6543
|
-
function
|
|
6544
|
-
const r = ft(t, n), o = St(e), s =
|
|
6543
|
+
function El(t, e, n) {
|
|
6544
|
+
const r = ft(t, n), o = St(e), s = xl(
|
|
6545
6545
|
Object.fromEntries(
|
|
6546
6546
|
de.map((i) => [
|
|
6547
6547
|
i,
|
|
6548
6548
|
t.colors?.[`terminal.ansi${i[0].toUpperCase()}${i.substring(1)}`]
|
|
6549
6549
|
])
|
|
6550
6550
|
)
|
|
6551
|
-
), a =
|
|
6551
|
+
), a = kl();
|
|
6552
6552
|
return o.map(
|
|
6553
6553
|
(i) => a.parse(i[0]).map((l) => {
|
|
6554
6554
|
let u, c;
|
|
6555
|
-
l.decorations.has("reverse") ? (u = l.background ? s.value(l.background) : t.bg, c = l.foreground ? s.value(l.foreground) : t.fg) : (u = l.foreground ? s.value(l.foreground) : t.fg, c = l.background ? s.value(l.background) : void 0), u = ue(u, r), c = ue(c, r), l.decorations.has("dim") && (u =
|
|
6555
|
+
l.decorations.has("reverse") ? (u = l.background ? s.value(l.background) : t.bg, c = l.foreground ? s.value(l.foreground) : t.fg) : (u = l.foreground ? s.value(l.foreground) : t.fg, c = l.background ? s.value(l.background) : void 0), u = ue(u, r), c = ue(c, r), l.decorations.has("dim") && (u = Al(u));
|
|
6556
6556
|
let h = z.None;
|
|
6557
6557
|
return l.decorations.has("bold") && (h |= z.Bold), l.decorations.has("italic") && (h |= z.Italic), l.decorations.has("underline") && (h |= z.Underline), l.decorations.has("strikethrough") && (h |= z.Strikethrough), {
|
|
6558
6558
|
content: l.value,
|
|
@@ -6565,7 +6565,7 @@ function xl(t, e, n) {
|
|
|
6565
6565
|
})
|
|
6566
6566
|
);
|
|
6567
6567
|
}
|
|
6568
|
-
function
|
|
6568
|
+
function Al(t) {
|
|
6569
6569
|
const e = t.match(/#([0-9a-f]{3})([0-9a-f]{3})?([0-9a-f]{2})?/);
|
|
6570
6570
|
if (e)
|
|
6571
6571
|
if (e[3]) {
|
|
@@ -6584,7 +6584,7 @@ function Sn(t, e, n = {}) {
|
|
|
6584
6584
|
return St(e).map((l) => [{ content: l[0], offset: l[1] }]);
|
|
6585
6585
|
const { theme: s, colorMap: a } = t.setTheme(o);
|
|
6586
6586
|
if (r === "ansi")
|
|
6587
|
-
return
|
|
6587
|
+
return El(s, e, n);
|
|
6588
6588
|
const i = t.getLanguage(r);
|
|
6589
6589
|
if (n.grammarState) {
|
|
6590
6590
|
if (n.grammarState.lang !== i.name)
|
|
@@ -6592,9 +6592,9 @@ function Sn(t, e, n = {}) {
|
|
|
6592
6592
|
if (!n.grammarState.themes.includes(s.name))
|
|
6593
6593
|
throw new F(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${s.name}"`);
|
|
6594
6594
|
}
|
|
6595
|
-
return
|
|
6595
|
+
return Il(e, i, s, a, n);
|
|
6596
6596
|
}
|
|
6597
|
-
function
|
|
6597
|
+
function Rl(...t) {
|
|
6598
6598
|
if (t.length === 2)
|
|
6599
6599
|
return We(t[1]);
|
|
6600
6600
|
const [e, n, r = {}] = t, {
|
|
@@ -6612,7 +6612,7 @@ function Al(...t) {
|
|
|
6612
6612
|
a.name
|
|
6613
6613
|
);
|
|
6614
6614
|
}
|
|
6615
|
-
function
|
|
6615
|
+
function Il(t, e, n, r, o) {
|
|
6616
6616
|
const s = gt(t, e, n, r, o), a = new Le(
|
|
6617
6617
|
gt(t, e, n, r, o).stateStack,
|
|
6618
6618
|
e.name,
|
|
@@ -6625,7 +6625,7 @@ function gt(t, e, n, r, o) {
|
|
|
6625
6625
|
tokenizeMaxLineLength: a = 0,
|
|
6626
6626
|
tokenizeTimeLimit: i = 500
|
|
6627
6627
|
} = o, l = St(t);
|
|
6628
|
-
let u = o.grammarState ?
|
|
6628
|
+
let u = o.grammarState ? ml(o.grammarState, n.name) ?? Zt : o.grammarContextCode != null ? gt(
|
|
6629
6629
|
o.grammarContextCode,
|
|
6630
6630
|
e,
|
|
6631
6631
|
n,
|
|
@@ -6697,9 +6697,9 @@ function gt(t, e, n, r, o) {
|
|
|
6697
6697
|
);
|
|
6698
6698
|
R += G.length, ce.explanation.push({
|
|
6699
6699
|
content: G,
|
|
6700
|
-
scopes: o.includeExplanation === "scopeName" ?
|
|
6700
|
+
scopes: o.includeExplanation === "scopeName" ? Nl(
|
|
6701
6701
|
k.scopes
|
|
6702
|
-
) :
|
|
6702
|
+
) : Ll(
|
|
6703
6703
|
te,
|
|
6704
6704
|
k.scopes
|
|
6705
6705
|
)
|
|
@@ -6715,16 +6715,16 @@ function gt(t, e, n, r, o) {
|
|
|
6715
6715
|
stateStack: u
|
|
6716
6716
|
};
|
|
6717
6717
|
}
|
|
6718
|
-
function
|
|
6718
|
+
function Nl(t) {
|
|
6719
6719
|
return t.map((e) => ({ scopeName: e }));
|
|
6720
6720
|
}
|
|
6721
|
-
function
|
|
6721
|
+
function Ll(t, e) {
|
|
6722
6722
|
const n = [];
|
|
6723
6723
|
for (let r = 0, o = e.length; r < o; r++) {
|
|
6724
6724
|
const s = e[r];
|
|
6725
6725
|
n[r] = {
|
|
6726
6726
|
scopeName: s,
|
|
6727
|
-
themeMatches:
|
|
6727
|
+
themeMatches: $l(t, s, e.slice(0, r))
|
|
6728
6728
|
};
|
|
6729
6729
|
}
|
|
6730
6730
|
return n;
|
|
@@ -6732,7 +6732,7 @@ function Nl(t, e) {
|
|
|
6732
6732
|
function nr(t, e) {
|
|
6733
6733
|
return t === e || e.substring(0, t.length) === t && e[t.length] === ".";
|
|
6734
6734
|
}
|
|
6735
|
-
function
|
|
6735
|
+
function Pl(t, e, n) {
|
|
6736
6736
|
if (!nr(t[t.length - 1], e))
|
|
6737
6737
|
return !1;
|
|
6738
6738
|
let r = t.length - 2, o = n.length - 1;
|
|
@@ -6740,17 +6740,17 @@ function Ll(t, e, n) {
|
|
|
6740
6740
|
nr(t[r], n[o]) && (r -= 1), o -= 1;
|
|
6741
6741
|
return r === -1;
|
|
6742
6742
|
}
|
|
6743
|
-
function
|
|
6743
|
+
function $l(t, e, n) {
|
|
6744
6744
|
const r = [];
|
|
6745
6745
|
for (const { selectors: o, settings: s } of t)
|
|
6746
6746
|
for (const a of o)
|
|
6747
|
-
if (
|
|
6747
|
+
if (Pl(a, e, n)) {
|
|
6748
6748
|
r.push(s);
|
|
6749
6749
|
break;
|
|
6750
6750
|
}
|
|
6751
6751
|
return r;
|
|
6752
6752
|
}
|
|
6753
|
-
function
|
|
6753
|
+
function Io(t, e, n) {
|
|
6754
6754
|
const r = Object.entries(n.themes).filter((l) => l[1]).map((l) => ({ color: l[0], theme: l[1] })), o = r.map((l) => {
|
|
6755
6755
|
const u = Sn(t, e, {
|
|
6756
6756
|
...n,
|
|
@@ -6761,7 +6761,7 @@ function Ro(t, e, n) {
|
|
|
6761
6761
|
state: c,
|
|
6762
6762
|
theme: h
|
|
6763
6763
|
};
|
|
6764
|
-
}), s =
|
|
6764
|
+
}), s = Tl(
|
|
6765
6765
|
...o.map((l) => l.tokens)
|
|
6766
6766
|
), a = s[0].map(
|
|
6767
6767
|
(l, u) => l.map((c, h) => {
|
|
@@ -6786,7 +6786,7 @@ function Ro(t, e, n) {
|
|
|
6786
6786
|
) : void 0;
|
|
6787
6787
|
return i && kt(a, i), a;
|
|
6788
6788
|
}
|
|
6789
|
-
function
|
|
6789
|
+
function Tl(...t) {
|
|
6790
6790
|
const e = t.map(() => []), n = t.length;
|
|
6791
6791
|
for (let r = 0; r < t[0].length; r++) {
|
|
6792
6792
|
const o = t.map((l) => l[r]), s = e.map(() => []);
|
|
@@ -6819,7 +6819,7 @@ function mt(t, e, n) {
|
|
|
6819
6819
|
} = n, p = Object.entries(n.themes).filter((y) => y[1]).map((y) => ({ color: y[0], theme: y[1] })).sort((y, m) => y.color === u ? -1 : m.color === u ? 1 : 0);
|
|
6820
6820
|
if (p.length === 0)
|
|
6821
6821
|
throw new F("`themes` option must not be empty");
|
|
6822
|
-
const d =
|
|
6822
|
+
const d = Io(
|
|
6823
6823
|
t,
|
|
6824
6824
|
e,
|
|
6825
6825
|
n
|
|
@@ -6827,7 +6827,7 @@ function mt(t, e, n) {
|
|
|
6827
6827
|
if (l = We(d), u && _n !== u && !p.find((y) => y.color === u))
|
|
6828
6828
|
throw new F(`\`themes\` option must contain the defaultColor key \`${u}\``);
|
|
6829
6829
|
const f = p.map((y) => t.getTheme(y.theme)), g = p.map((y) => y.color);
|
|
6830
|
-
s = d.map((y) => y.map((m) =>
|
|
6830
|
+
s = d.map((y) => y.map((m) => dl(m, g, c, u, h))), l && kt(s, l);
|
|
6831
6831
|
const C = p.map((y) => ft(y.theme, n));
|
|
6832
6832
|
o = rr(p, f, C, c, u, "fg", h), r = rr(p, f, C, c, u, "bg", h), a = `shiki-themes ${f.map((y) => y.name).join(" ")}`, i = u ? void 0 : [o, r].join(";");
|
|
6833
6833
|
} else if ("theme" in n) {
|
|
@@ -6887,7 +6887,7 @@ function yt(t, e, n, r = {
|
|
|
6887
6887
|
mergeWhitespaces: h = !0,
|
|
6888
6888
|
mergeSameStyleTokens: p = !1
|
|
6889
6889
|
} = n;
|
|
6890
|
-
h === !0 ? s =
|
|
6890
|
+
h === !0 ? s = Ol(s) : h === "never" && (s = Dl(s)), p && (s = Gl(s));
|
|
6891
6891
|
const d = {
|
|
6892
6892
|
...r,
|
|
6893
6893
|
get source() {
|
|
@@ -6896,7 +6896,7 @@ function yt(t, e, n, r = {
|
|
|
6896
6896
|
};
|
|
6897
6897
|
for (const f of dt(n))
|
|
6898
6898
|
s = f.tokens?.call(d, s) || s;
|
|
6899
|
-
return
|
|
6899
|
+
return Ml(
|
|
6900
6900
|
s,
|
|
6901
6901
|
{
|
|
6902
6902
|
...n,
|
|
@@ -6909,7 +6909,7 @@ function yt(t, e, n, r = {
|
|
|
6909
6909
|
c
|
|
6910
6910
|
);
|
|
6911
6911
|
}
|
|
6912
|
-
function
|
|
6912
|
+
function Ml(t, e, n, r = We(t)) {
|
|
6913
6913
|
const o = dt(e), s = [], a = {
|
|
6914
6914
|
type: "root",
|
|
6915
6915
|
children: []
|
|
@@ -6942,7 +6942,7 @@ function Tl(t, e, n, r = We(t)) {
|
|
|
6942
6942
|
const h = [], p = {
|
|
6943
6943
|
...n,
|
|
6944
6944
|
structure: i,
|
|
6945
|
-
addClassToHast:
|
|
6945
|
+
addClassToHast: Eo,
|
|
6946
6946
|
get source() {
|
|
6947
6947
|
return n.source;
|
|
6948
6948
|
},
|
|
@@ -7007,7 +7007,7 @@ function Tl(t, e, n, r = We(t)) {
|
|
|
7007
7007
|
d = f?.root?.call(p, d) || d;
|
|
7008
7008
|
return r && kt(d, r), d;
|
|
7009
7009
|
}
|
|
7010
|
-
function
|
|
7010
|
+
function Ol(t) {
|
|
7011
7011
|
return t.map((e) => {
|
|
7012
7012
|
const n = [];
|
|
7013
7013
|
let r = "", o = 0;
|
|
@@ -7027,7 +7027,7 @@ function Ml(t) {
|
|
|
7027
7027
|
}), n;
|
|
7028
7028
|
});
|
|
7029
7029
|
}
|
|
7030
|
-
function
|
|
7030
|
+
function Dl(t) {
|
|
7031
7031
|
return t.map((e) => e.flatMap((n) => {
|
|
7032
7032
|
if (n.content.match(/^\s+$/))
|
|
7033
7033
|
return n;
|
|
@@ -7051,7 +7051,7 @@ function Ol(t) {
|
|
|
7051
7051
|
}), i;
|
|
7052
7052
|
}));
|
|
7053
7053
|
}
|
|
7054
|
-
function
|
|
7054
|
+
function Gl(t) {
|
|
7055
7055
|
return t.map((e) => {
|
|
7056
7056
|
const n = [];
|
|
7057
7057
|
for (const r of e) {
|
|
@@ -7065,15 +7065,15 @@ function Dl(t) {
|
|
|
7065
7065
|
return n;
|
|
7066
7066
|
});
|
|
7067
7067
|
}
|
|
7068
|
-
const
|
|
7069
|
-
function
|
|
7068
|
+
const Fl = sl;
|
|
7069
|
+
function Bl(t, e, n) {
|
|
7070
7070
|
const r = {
|
|
7071
7071
|
meta: {},
|
|
7072
7072
|
options: n,
|
|
7073
7073
|
codeToHast: (s, a) => yt(t, s, a),
|
|
7074
7074
|
codeToTokens: (s, a) => mt(t, s, a)
|
|
7075
7075
|
};
|
|
7076
|
-
let o =
|
|
7076
|
+
let o = Fl(yt(t, e, n, r));
|
|
7077
7077
|
for (const s of dt(n))
|
|
7078
7078
|
o = s.postprocess?.call(r, o, n) || o;
|
|
7079
7079
|
return o;
|
|
@@ -7137,28 +7137,28 @@ function kn(t) {
|
|
|
7137
7137
|
value: !0
|
|
7138
7138
|
}), e;
|
|
7139
7139
|
}
|
|
7140
|
-
async function
|
|
7140
|
+
async function No(t) {
|
|
7141
7141
|
return Array.from(new Set((await Promise.all(
|
|
7142
|
-
t.filter((e) => !
|
|
7142
|
+
t.filter((e) => !xo(e)).map(async (e) => await vo(e).then((n) => Array.isArray(n) ? n : [n]))
|
|
7143
7143
|
)).flat()));
|
|
7144
7144
|
}
|
|
7145
|
-
async function
|
|
7145
|
+
async function Lo(t) {
|
|
7146
7146
|
return (await Promise.all(
|
|
7147
7147
|
t.map(
|
|
7148
|
-
async (n) =>
|
|
7148
|
+
async (n) => ul(n) ? null : kn(await vo(n))
|
|
7149
7149
|
)
|
|
7150
7150
|
)).filter((n) => !!n);
|
|
7151
7151
|
}
|
|
7152
|
-
let
|
|
7153
|
-
function
|
|
7154
|
-
e >
|
|
7152
|
+
let jl = 3;
|
|
7153
|
+
function Ul(t, e = 3) {
|
|
7154
|
+
e > jl || console.trace(`[SHIKI DEPRECATE]: ${t}`);
|
|
7155
7155
|
}
|
|
7156
7156
|
class ve extends Error {
|
|
7157
7157
|
constructor(e) {
|
|
7158
7158
|
super(e), this.name = "ShikiError";
|
|
7159
7159
|
}
|
|
7160
7160
|
}
|
|
7161
|
-
class
|
|
7161
|
+
class zl extends Ya {
|
|
7162
7162
|
constructor(e, n, r, o = {}) {
|
|
7163
7163
|
super(e), this._resolver = e, this._themes = n, this._langs = r, this._alias = o, this._themes.map((s) => this.loadTheme(s)), this.loadLanguages(this._langs);
|
|
7164
7164
|
}
|
|
@@ -7245,7 +7245,7 @@ class Ul extends Ka {
|
|
|
7245
7245
|
this._langGraph.set(n, this._langMap.get(n));
|
|
7246
7246
|
}
|
|
7247
7247
|
}
|
|
7248
|
-
class
|
|
7248
|
+
class Hl {
|
|
7249
7249
|
_langs = /* @__PURE__ */ new Map();
|
|
7250
7250
|
_scopeToLang = /* @__PURE__ */ new Map();
|
|
7251
7251
|
_injections = /* @__PURE__ */ new Map();
|
|
@@ -7283,12 +7283,12 @@ class zl {
|
|
|
7283
7283
|
}
|
|
7284
7284
|
}
|
|
7285
7285
|
let De = 0;
|
|
7286
|
-
function
|
|
7286
|
+
function Wl(t) {
|
|
7287
7287
|
De += 1, t.warnings !== !1 && De >= 10 && De % 10 === 0 && console.warn(`[Shiki] ${De} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);
|
|
7288
7288
|
let e = !1;
|
|
7289
7289
|
if (!t.engine)
|
|
7290
7290
|
throw new ve("`engine` option is required for synchronous mode");
|
|
7291
|
-
const n = (t.langs || []).flat(1), r = (t.themes || []).flat(1).map(kn), o = new
|
|
7291
|
+
const n = (t.langs || []).flat(1), r = (t.themes || []).flat(1).map(kn), o = new Hl(t.engine, n), s = new zl(o, r, n, t.langAlias);
|
|
7292
7292
|
let a;
|
|
7293
7293
|
function i(m) {
|
|
7294
7294
|
C();
|
|
@@ -7326,7 +7326,7 @@ function Hl(t) {
|
|
|
7326
7326
|
C(), s.loadLanguages(m.flat(1));
|
|
7327
7327
|
}
|
|
7328
7328
|
async function d(...m) {
|
|
7329
|
-
return p(await
|
|
7329
|
+
return p(await No(m));
|
|
7330
7330
|
}
|
|
7331
7331
|
function f(...m) {
|
|
7332
7332
|
C();
|
|
@@ -7334,7 +7334,7 @@ function Hl(t) {
|
|
|
7334
7334
|
s.loadTheme(_);
|
|
7335
7335
|
}
|
|
7336
7336
|
async function g(...m) {
|
|
7337
|
-
return C(), f(await
|
|
7337
|
+
return C(), f(await Lo(m));
|
|
7338
7338
|
}
|
|
7339
7339
|
function C() {
|
|
7340
7340
|
if (e)
|
|
@@ -7357,55 +7357,55 @@ function Hl(t) {
|
|
|
7357
7357
|
[Symbol.dispose]: y
|
|
7358
7358
|
};
|
|
7359
7359
|
}
|
|
7360
|
-
async function
|
|
7361
|
-
t.engine ||
|
|
7360
|
+
async function Vl(t) {
|
|
7361
|
+
t.engine || Ul("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");
|
|
7362
7362
|
const [
|
|
7363
7363
|
e,
|
|
7364
7364
|
n,
|
|
7365
7365
|
r
|
|
7366
7366
|
] = await Promise.all([
|
|
7367
|
-
|
|
7368
|
-
|
|
7367
|
+
Lo(t.themes || []),
|
|
7368
|
+
No(t.langs || []),
|
|
7369
7369
|
t.engine
|
|
7370
7370
|
]);
|
|
7371
|
-
return
|
|
7371
|
+
return Wl({
|
|
7372
7372
|
...t,
|
|
7373
7373
|
themes: e,
|
|
7374
7374
|
langs: n,
|
|
7375
7375
|
engine: r
|
|
7376
7376
|
});
|
|
7377
7377
|
}
|
|
7378
|
-
async function
|
|
7379
|
-
const e = await
|
|
7378
|
+
async function ql(t) {
|
|
7379
|
+
const e = await Vl(t);
|
|
7380
7380
|
return {
|
|
7381
|
-
getLastGrammarState: (...n) =>
|
|
7381
|
+
getLastGrammarState: (...n) => Rl(e, ...n),
|
|
7382
7382
|
codeToTokensBase: (n, r) => Sn(e, n, r),
|
|
7383
|
-
codeToTokensWithThemes: (n, r) =>
|
|
7383
|
+
codeToTokensWithThemes: (n, r) => Io(e, n, r),
|
|
7384
7384
|
codeToTokens: (n, r) => mt(e, n, r),
|
|
7385
7385
|
codeToHast: (n, r) => yt(e, n, r),
|
|
7386
|
-
codeToHtml: (n, r) =>
|
|
7386
|
+
codeToHtml: (n, r) => Bl(e, n, r),
|
|
7387
7387
|
getBundledLanguages: () => ({}),
|
|
7388
7388
|
getBundledThemes: () => ({}),
|
|
7389
7389
|
...e,
|
|
7390
7390
|
getInternalContext: () => e
|
|
7391
7391
|
};
|
|
7392
7392
|
}
|
|
7393
|
-
function
|
|
7394
|
-
return "children" in t ?
|
|
7393
|
+
function Po(t) {
|
|
7394
|
+
return "children" in t ? $o(t) : "value" in t ? t.value : "";
|
|
7395
7395
|
}
|
|
7396
|
-
function
|
|
7397
|
-
return t.type === "text" ? t.value : "children" in t ?
|
|
7396
|
+
function Xl(t) {
|
|
7397
|
+
return t.type === "text" ? t.value : "children" in t ? $o(t) : "";
|
|
7398
7398
|
}
|
|
7399
|
-
function
|
|
7399
|
+
function $o(t) {
|
|
7400
7400
|
let e = -1;
|
|
7401
7401
|
const n = [];
|
|
7402
7402
|
for (; ++e < t.children.length; )
|
|
7403
|
-
n[e] =
|
|
7403
|
+
n[e] = Xl(t.children[e]);
|
|
7404
7404
|
return n.join("");
|
|
7405
7405
|
}
|
|
7406
|
-
const
|
|
7406
|
+
const Kl = {
|
|
7407
7407
|
"tailing-curly-colon": (t, e) => {
|
|
7408
|
-
const n =
|
|
7408
|
+
const n = Po(e), r = n.match(/(.+)\{:([\w-]+)\}$/);
|
|
7409
7409
|
if (r)
|
|
7410
7410
|
return {
|
|
7411
7411
|
type: "inline",
|
|
@@ -7413,7 +7413,7 @@ const Xl = {
|
|
|
7413
7413
|
lang: r.at(2)
|
|
7414
7414
|
};
|
|
7415
7415
|
}
|
|
7416
|
-
}, ir = "language-",
|
|
7416
|
+
}, ir = "language-", Yl = (t, e) => {
|
|
7417
7417
|
const n = e.children[0];
|
|
7418
7418
|
if (!n || n.type !== "element" || n.tagName !== "code" || !n.properties)
|
|
7419
7419
|
return;
|
|
@@ -7423,11 +7423,11 @@ const Xl = {
|
|
|
7423
7423
|
return {
|
|
7424
7424
|
type: "pre",
|
|
7425
7425
|
lang: typeof o == "string" ? o.slice(ir.length) : void 0,
|
|
7426
|
-
code:
|
|
7426
|
+
code: Po(n),
|
|
7427
7427
|
meta: n.data?.meta ?? n.properties.metastring?.toString() ?? ""
|
|
7428
7428
|
};
|
|
7429
|
-
},
|
|
7430
|
-
function
|
|
7429
|
+
}, Jl = "language-";
|
|
7430
|
+
function Zl(t, e) {
|
|
7431
7431
|
const {
|
|
7432
7432
|
addLanguageClass: n = !1,
|
|
7433
7433
|
parseMetaString: r,
|
|
@@ -7458,7 +7458,7 @@ function Jl(t, e) {
|
|
|
7458
7458
|
{
|
|
7459
7459
|
name: "rehype-shiki:code-language-class",
|
|
7460
7460
|
code(S) {
|
|
7461
|
-
return this.addClassToHast(S, `${
|
|
7461
|
+
return this.addClassToHast(S, `${Jl}${d}`), S;
|
|
7462
7462
|
}
|
|
7463
7463
|
}
|
|
7464
7464
|
]), l && f.endsWith(`
|
|
@@ -7475,21 +7475,21 @@ function Jl(t, e) {
|
|
|
7475
7475
|
}
|
|
7476
7476
|
return (d) => {
|
|
7477
7477
|
const f = [];
|
|
7478
|
-
if (
|
|
7478
|
+
if (Xr(d, "element", (g, C, y) => {
|
|
7479
7479
|
let m;
|
|
7480
7480
|
if (!y || C == null)
|
|
7481
7481
|
return;
|
|
7482
7482
|
if (g.tagName === "pre")
|
|
7483
|
-
m =
|
|
7483
|
+
m = Yl;
|
|
7484
7484
|
else if (g.tagName === "code" && u)
|
|
7485
|
-
m =
|
|
7485
|
+
m = Kl[u];
|
|
7486
7486
|
else
|
|
7487
7487
|
return;
|
|
7488
7488
|
const _ = m(d, g);
|
|
7489
7489
|
if (!_)
|
|
7490
7490
|
return;
|
|
7491
7491
|
let S, A = !1;
|
|
7492
|
-
if (_.lang ? t.getLoadedLanguages().includes(_.lang) ||
|
|
7492
|
+
if (_.lang ? t.getLoadedLanguages().includes(_.lang) || xo(_.lang) ? S = _.lang : c ? (A = !0, S = _.lang) : a && (S = a) : S = s, !S)
|
|
7493
7493
|
return;
|
|
7494
7494
|
const D = _.meta ? r?.(_.meta, g, d) : void 0, L = (j) => {
|
|
7495
7495
|
const Z = p(j, _.code, _.meta, D ?? {});
|
|
@@ -7522,7 +7522,7 @@ function Jl(t, e) {
|
|
|
7522
7522
|
}
|
|
7523
7523
|
};
|
|
7524
7524
|
}
|
|
7525
|
-
function
|
|
7525
|
+
function Ql(t) {
|
|
7526
7526
|
if (!t)
|
|
7527
7527
|
return null;
|
|
7528
7528
|
const e = t.match(/\{([\d,-]+)\}/);
|
|
@@ -7532,7 +7532,7 @@ function Zl(t) {
|
|
|
7532
7532
|
}) : null;
|
|
7533
7533
|
}
|
|
7534
7534
|
const lr = Symbol("highlighted-lines");
|
|
7535
|
-
function
|
|
7535
|
+
function eu(t = {}) {
|
|
7536
7536
|
const {
|
|
7537
7537
|
className: e = "highlighted"
|
|
7538
7538
|
} = t;
|
|
@@ -7542,14 +7542,14 @@ function Ql(t = {}) {
|
|
|
7542
7542
|
if (!this.options.meta?.__raw)
|
|
7543
7543
|
return;
|
|
7544
7544
|
const o = this.meta;
|
|
7545
|
-
return o[lr] ??=
|
|
7545
|
+
return o[lr] ??= Ql(this.options.meta.__raw), (o[lr] ?? []).includes(r) && this.addClassToHast(n, e), n;
|
|
7546
7546
|
}
|
|
7547
7547
|
};
|
|
7548
7548
|
}
|
|
7549
|
-
function
|
|
7549
|
+
function tu(t) {
|
|
7550
7550
|
return t ? Array.from(t.matchAll(/\/((?:\\.|[^/])+)\//g)).map((n) => n[1].replace(/\\(.)/g, "$1")) : [];
|
|
7551
7551
|
}
|
|
7552
|
-
function
|
|
7552
|
+
function nu(t = {}) {
|
|
7553
7553
|
const {
|
|
7554
7554
|
className: e = "highlighted-word"
|
|
7555
7555
|
} = t;
|
|
@@ -7558,10 +7558,10 @@ function tu(t = {}) {
|
|
|
7558
7558
|
preprocess(n, r) {
|
|
7559
7559
|
if (!this.options.meta?.__raw)
|
|
7560
7560
|
return;
|
|
7561
|
-
const o =
|
|
7561
|
+
const o = tu(this.options.meta.__raw);
|
|
7562
7562
|
r.decorations ||= [];
|
|
7563
7563
|
for (const s of o) {
|
|
7564
|
-
const a =
|
|
7564
|
+
const a = ru(n, s);
|
|
7565
7565
|
for (const i of a)
|
|
7566
7566
|
r.decorations.push({
|
|
7567
7567
|
start: i,
|
|
@@ -7574,7 +7574,7 @@ function tu(t = {}) {
|
|
|
7574
7574
|
}
|
|
7575
7575
|
};
|
|
7576
7576
|
}
|
|
7577
|
-
function
|
|
7577
|
+
function ru(t, e) {
|
|
7578
7578
|
const n = [];
|
|
7579
7579
|
let r = 0;
|
|
7580
7580
|
for (; ; ) {
|
|
@@ -7589,7 +7589,7 @@ function Pe(t) {
|
|
|
7589
7589
|
if ([...t].length !== 1) throw new Error(`Expected "${t}" to be a single code point`);
|
|
7590
7590
|
return t.codePointAt(0);
|
|
7591
7591
|
}
|
|
7592
|
-
function
|
|
7592
|
+
function ou(t, e, n) {
|
|
7593
7593
|
return t.has(e) || t.set(e, n), t.get(e);
|
|
7594
7594
|
}
|
|
7595
7595
|
const vn = /* @__PURE__ */ new Set(["alnum", "alpha", "ascii", "blank", "cntrl", "digit", "graph", "lower", "print", "punct", "space", "upper", "word", "xdigit"]), B = String.raw;
|
|
@@ -7597,9 +7597,9 @@ function $e(t, e) {
|
|
|
7597
7597
|
if (t == null) throw new Error(e ?? "Value expected");
|
|
7598
7598
|
return t;
|
|
7599
7599
|
}
|
|
7600
|
-
const
|
|
7600
|
+
const To = B`\[\^?`, Mo = `c.? | C(?:-.?)?|${B`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${B`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${B`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${B`o\{[^\}]*\}?`}|${B`\d{1,3}`}`, xn = /[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/, et = new RegExp(B`
|
|
7601
7601
|
\\ (?:
|
|
7602
|
-
${
|
|
7602
|
+
${Mo}
|
|
7603
7603
|
| [gk]<[^>]*>?
|
|
7604
7604
|
| [gk]'[^']*'?
|
|
7605
7605
|
| .
|
|
@@ -7617,22 +7617,22 @@ const $o = B`\[\^?`, To = `c.? | C(?:-.?)?|${B`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x
|
|
|
7617
7617
|
| \*[^\)]*\)?
|
|
7618
7618
|
)?
|
|
7619
7619
|
| (?:${xn.source})+
|
|
7620
|
-
| ${
|
|
7620
|
+
| ${To}
|
|
7621
7621
|
| .
|
|
7622
7622
|
`.replace(/\s+/g, ""), "gsu"), Ot = new RegExp(B`
|
|
7623
7623
|
\\ (?:
|
|
7624
|
-
${
|
|
7624
|
+
${Mo}
|
|
7625
7625
|
| .
|
|
7626
7626
|
)
|
|
7627
7627
|
| \[:(?:\^?\p{Alpha}+|\^):\]
|
|
7628
|
-
| ${
|
|
7628
|
+
| ${To}
|
|
7629
7629
|
| &&
|
|
7630
7630
|
| .
|
|
7631
7631
|
`.replace(/\s+/g, ""), "gsu");
|
|
7632
|
-
function
|
|
7632
|
+
function su(t, e = {}) {
|
|
7633
7633
|
const n = { flags: "", ...e, rules: { captureGroup: !1, singleline: !1, ...e.rules } };
|
|
7634
7634
|
if (typeof t != "string") throw new Error("String expected as pattern");
|
|
7635
|
-
const r =
|
|
7635
|
+
const r = vu(n.flags), o = [r.extended], s = { captureGroup: n.rules.captureGroup, getCurrentModX() {
|
|
7636
7636
|
return o.at(-1);
|
|
7637
7637
|
}, numOpenGroups: 0, popModX() {
|
|
7638
7638
|
o.pop();
|
|
@@ -7643,7 +7643,7 @@ function ou(t, e = {}) {
|
|
|
7643
7643
|
}, singleline: n.rules.singleline };
|
|
7644
7644
|
let a = [], i;
|
|
7645
7645
|
for (et.lastIndex = 0; i = et.exec(t); ) {
|
|
7646
|
-
const h =
|
|
7646
|
+
const h = au(s, t, i[0], et.lastIndex);
|
|
7647
7647
|
h.tokens ? a.push(...h.tokens) : h.token && a.push(h.token), h.lastIndex !== void 0 && (et.lastIndex = h.lastIndex);
|
|
7648
7648
|
}
|
|
7649
7649
|
const l = [];
|
|
@@ -7654,39 +7654,39 @@ function ou(t, e = {}) {
|
|
|
7654
7654
|
h.kind = "capturing", h.number = p + 1;
|
|
7655
7655
|
});
|
|
7656
7656
|
const c = u || l.length;
|
|
7657
|
-
return { tokens: a.map((h) => h.type === "EscapedNumber" ?
|
|
7657
|
+
return { tokens: a.map((h) => h.type === "EscapedNumber" ? Eu(h, c) : h).flat(), flags: r };
|
|
7658
7658
|
}
|
|
7659
|
-
function
|
|
7659
|
+
function au(t, e, n, r) {
|
|
7660
7660
|
const [o, s] = n;
|
|
7661
7661
|
if (n === "[" || n === "[^") {
|
|
7662
|
-
const a =
|
|
7662
|
+
const a = iu(e, n, r);
|
|
7663
7663
|
return { tokens: a.tokens, lastIndex: a.lastIndex };
|
|
7664
7664
|
}
|
|
7665
7665
|
if (o === "\\") {
|
|
7666
7666
|
if ("AbBGyYzZ".includes(s)) return { token: ur(n, n) };
|
|
7667
7667
|
if (/^\\g[<']/.test(n)) {
|
|
7668
7668
|
if (!/^\\g(?:<[^>]+>|'[^']+')$/.test(n)) throw new Error(`Invalid group name "${n}"`);
|
|
7669
|
-
return { token:
|
|
7669
|
+
return { token: yu(n) };
|
|
7670
7670
|
}
|
|
7671
7671
|
if (/^\\k[<']/.test(n)) {
|
|
7672
7672
|
if (!/^\\k(?:<[^>]+>|'[^']+')$/.test(n)) throw new Error(`Invalid group name "${n}"`);
|
|
7673
|
-
return { token:
|
|
7673
|
+
return { token: Do(n) };
|
|
7674
7674
|
}
|
|
7675
|
-
if (s === "K") return { token:
|
|
7675
|
+
if (s === "K") return { token: Go("keep", n) };
|
|
7676
7676
|
if (s === "N" || s === "R") return { token: ge("newline", n, { negate: s === "N" }) };
|
|
7677
7677
|
if (s === "O") return { token: ge("any", n) };
|
|
7678
7678
|
if (s === "X") return { token: ge("text_segment", n) };
|
|
7679
|
-
const a =
|
|
7679
|
+
const a = Oo(n, { inCharClass: !1 });
|
|
7680
7680
|
return Array.isArray(a) ? { tokens: a } : { token: a };
|
|
7681
7681
|
}
|
|
7682
7682
|
if (o === "(") {
|
|
7683
|
-
if (s === "*") return { token:
|
|
7683
|
+
if (s === "*") return { token: _u(n) };
|
|
7684
7684
|
if (n === "(?{") throw new Error(`Unsupported callout "${n}"`);
|
|
7685
7685
|
if (n.startsWith("(?#")) {
|
|
7686
7686
|
if (e[r] !== ")") throw new Error('Unclosed comment group "(?#"');
|
|
7687
7687
|
return { lastIndex: r + 1 };
|
|
7688
7688
|
}
|
|
7689
|
-
if (/^\(\?[-imx]+[:)]$/.test(n)) return { token:
|
|
7689
|
+
if (/^\(\?[-imx]+[:)]$/.test(n)) return { token: Cu(n, t) };
|
|
7690
7690
|
if (t.pushModX(t.getCurrentModX()), t.numOpenGroups++, n === "(" && !t.captureGroup || n === "(?:") return { token: Se("group", n) };
|
|
7691
7691
|
if (n === "(?>") return { token: Se("atomic", n) };
|
|
7692
7692
|
if (n === "(?=" || n === "(?!" || n === "(?<=" || n === "(?<!") return { token: Se(n[2] === "<" ? "lookbehind" : "lookahead", n, { negate: n.endsWith("!") }) };
|
|
@@ -7699,7 +7699,7 @@ function su(t, e, n, r) {
|
|
|
7699
7699
|
}
|
|
7700
7700
|
if (n === ")") {
|
|
7701
7701
|
if (t.popModX(), t.numOpenGroups--, t.numOpenGroups < 0) throw new Error('Unmatched ")"');
|
|
7702
|
-
return { token:
|
|
7702
|
+
return { token: du(n) };
|
|
7703
7703
|
}
|
|
7704
7704
|
if (t.getCurrentModX()) {
|
|
7705
7705
|
if (n === "#") {
|
|
@@ -7717,9 +7717,9 @@ function su(t, e, n, r) {
|
|
|
7717
7717
|
const a = t.singleline ? { "^": B`\A`, $: B`\Z` }[n] : n;
|
|
7718
7718
|
return { token: ur(a, n) };
|
|
7719
7719
|
}
|
|
7720
|
-
return n === "|" ? { token:
|
|
7720
|
+
return n === "|" ? { token: uu(n) } : xn.test(n) ? { tokens: Au(n) } : { token: se(Pe(n), n) };
|
|
7721
7721
|
}
|
|
7722
|
-
function
|
|
7722
|
+
function iu(t, e, n) {
|
|
7723
7723
|
const r = [cr(e[1] === "^", e)];
|
|
7724
7724
|
let o = 1, s;
|
|
7725
7725
|
for (Ot.lastIndex = n; s = Ot.exec(t); ) {
|
|
@@ -7727,31 +7727,31 @@ function au(t, e, n) {
|
|
|
7727
7727
|
if (a[0] === "[" && a[1] !== ":") o++, r.push(cr(a[1] === "^", a));
|
|
7728
7728
|
else if (a === "]") {
|
|
7729
7729
|
if (r.at(-1).type === "CharacterClassOpen") r.push(se(93, a));
|
|
7730
|
-
else if (o--, r.push(
|
|
7730
|
+
else if (o--, r.push(cu(a)), !o) break;
|
|
7731
7731
|
} else {
|
|
7732
|
-
const i =
|
|
7732
|
+
const i = lu(a);
|
|
7733
7733
|
Array.isArray(i) ? r.push(...i) : r.push(i);
|
|
7734
7734
|
}
|
|
7735
7735
|
}
|
|
7736
7736
|
return { tokens: r, lastIndex: Ot.lastIndex || t.length };
|
|
7737
7737
|
}
|
|
7738
|
-
function
|
|
7739
|
-
if (t[0] === "\\") return
|
|
7738
|
+
function lu(t) {
|
|
7739
|
+
if (t[0] === "\\") return Oo(t, { inCharClass: !0 });
|
|
7740
7740
|
if (t[0] === "[") {
|
|
7741
7741
|
const e = /\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(t);
|
|
7742
7742
|
if (!e || !vn.has(e.groups.name)) throw new Error(`Invalid POSIX class "${t}"`);
|
|
7743
7743
|
return ge("posix", t, { value: e.groups.name, negate: !!e.groups.negate });
|
|
7744
7744
|
}
|
|
7745
|
-
return t === "-" ?
|
|
7745
|
+
return t === "-" ? hu(t) : t === "&&" ? fu(t) : se(Pe(t), t);
|
|
7746
7746
|
}
|
|
7747
|
-
function
|
|
7747
|
+
function Oo(t, { inCharClass: e }) {
|
|
7748
7748
|
const n = t[1];
|
|
7749
|
-
if (n === "c" || n === "C") return
|
|
7750
|
-
if ("dDhHsSwW".includes(n)) return
|
|
7749
|
+
if (n === "c" || n === "C") return wu(t);
|
|
7750
|
+
if ("dDhHsSwW".includes(n)) return Su(t);
|
|
7751
7751
|
if (t.startsWith(B`\o{`)) throw new Error(`Incomplete, invalid, or unsupported octal code point "${t}"`);
|
|
7752
7752
|
if (/^\\[pP]\{/.test(t)) {
|
|
7753
7753
|
if (t.length === 3) throw new Error(`Incomplete or invalid Unicode property "${t}"`);
|
|
7754
|
-
return
|
|
7754
|
+
return ku(t);
|
|
7755
7755
|
}
|
|
7756
7756
|
if (/^\\x[89A-Fa-f]\p{AHex}/u.test(t)) try {
|
|
7757
7757
|
const r = t.split(/\\x/).slice(1).map((a) => parseInt(a, 16)), o = new TextDecoder("utf-8", { ignoreBOM: !0, fatal: !0 }).decode(new Uint8Array(r)), s = new TextEncoder();
|
|
@@ -7762,33 +7762,33 @@ function Mo(t, { inCharClass: e }) {
|
|
|
7762
7762
|
} catch {
|
|
7763
7763
|
throw new Error(`Multibyte code "${t}" incomplete or invalid in Oniguruma`);
|
|
7764
7764
|
}
|
|
7765
|
-
if (n === "u" || n === "x") return se(
|
|
7765
|
+
if (n === "u" || n === "x") return se(xu(t), t);
|
|
7766
7766
|
if (hr.has(n)) return se(hr.get(n), t);
|
|
7767
|
-
if (/\d/.test(n)) return
|
|
7767
|
+
if (/\d/.test(n)) return pu(e, t);
|
|
7768
7768
|
if (t === "\\") throw new Error(B`Incomplete escape "\"`);
|
|
7769
7769
|
if (n === "M") throw new Error(`Unsupported meta "${t}"`);
|
|
7770
7770
|
if ([...t].length === 2) return se(t.codePointAt(1), t);
|
|
7771
7771
|
throw new Error(`Unexpected escape "${t}"`);
|
|
7772
7772
|
}
|
|
7773
|
-
function
|
|
7773
|
+
function uu(t) {
|
|
7774
7774
|
return { type: "Alternator", raw: t };
|
|
7775
7775
|
}
|
|
7776
7776
|
function ur(t, e) {
|
|
7777
7777
|
return { type: "Assertion", kind: t, raw: e };
|
|
7778
7778
|
}
|
|
7779
|
-
function
|
|
7779
|
+
function Do(t) {
|
|
7780
7780
|
return { type: "Backreference", raw: t };
|
|
7781
7781
|
}
|
|
7782
7782
|
function se(t, e) {
|
|
7783
7783
|
return { type: "Character", value: t, raw: e };
|
|
7784
7784
|
}
|
|
7785
|
-
function
|
|
7785
|
+
function cu(t) {
|
|
7786
7786
|
return { type: "CharacterClassClose", raw: t };
|
|
7787
7787
|
}
|
|
7788
|
-
function
|
|
7788
|
+
function hu(t) {
|
|
7789
7789
|
return { type: "CharacterClassHyphen", raw: t };
|
|
7790
7790
|
}
|
|
7791
|
-
function
|
|
7791
|
+
function fu(t) {
|
|
7792
7792
|
return { type: "CharacterClassIntersector", raw: t };
|
|
7793
7793
|
}
|
|
7794
7794
|
function cr(t, e) {
|
|
@@ -7797,48 +7797,48 @@ function cr(t, e) {
|
|
|
7797
7797
|
function ge(t, e, n = {}) {
|
|
7798
7798
|
return { type: "CharacterSet", kind: t, ...n, raw: e };
|
|
7799
7799
|
}
|
|
7800
|
-
function
|
|
7800
|
+
function Go(t, e, n = {}) {
|
|
7801
7801
|
return t === "keep" ? { type: "Directive", kind: t, raw: e } : { type: "Directive", kind: t, flags: $e(n.flags), raw: e };
|
|
7802
7802
|
}
|
|
7803
|
-
function
|
|
7803
|
+
function pu(t, e) {
|
|
7804
7804
|
return { type: "EscapedNumber", inCharClass: t, raw: e };
|
|
7805
7805
|
}
|
|
7806
|
-
function
|
|
7806
|
+
function du(t) {
|
|
7807
7807
|
return { type: "GroupClose", raw: t };
|
|
7808
7808
|
}
|
|
7809
7809
|
function Se(t, e, n = {}) {
|
|
7810
7810
|
return { type: "GroupOpen", kind: t, ...n, raw: e };
|
|
7811
7811
|
}
|
|
7812
|
-
function
|
|
7812
|
+
function gu(t, e, n, r) {
|
|
7813
7813
|
return { type: "NamedCallout", kind: t, tag: e, arguments: n, raw: r };
|
|
7814
7814
|
}
|
|
7815
|
-
function
|
|
7815
|
+
function mu(t, e, n, r) {
|
|
7816
7816
|
return { type: "Quantifier", kind: t, min: e, max: n, raw: r };
|
|
7817
7817
|
}
|
|
7818
|
-
function
|
|
7818
|
+
function yu(t) {
|
|
7819
7819
|
return { type: "Subroutine", raw: t };
|
|
7820
7820
|
}
|
|
7821
|
-
const
|
|
7822
|
-
function
|
|
7821
|
+
const bu = /* @__PURE__ */ new Set(["COUNT", "CMP", "ERROR", "FAIL", "MAX", "MISMATCH", "SKIP", "TOTAL_COUNT"]), hr = /* @__PURE__ */ new Map([["a", 7], ["b", 8], ["e", 27], ["f", 12], ["n", 10], ["r", 13], ["t", 9], ["v", 11]]);
|
|
7822
|
+
function wu(t) {
|
|
7823
7823
|
const e = t[1] === "c" ? t[2] : t[3];
|
|
7824
7824
|
if (!e || !/[A-Za-z]/.test(e)) throw new Error(`Unsupported control character "${t}"`);
|
|
7825
7825
|
return se(Pe(e.toUpperCase()) - 64, t);
|
|
7826
7826
|
}
|
|
7827
|
-
function
|
|
7827
|
+
function Cu(t, e) {
|
|
7828
7828
|
let { on: n, off: r } = /^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(t).groups;
|
|
7829
7829
|
r ??= "";
|
|
7830
7830
|
const o = (e.getCurrentModX() || n.includes("x")) && !r.includes("x"), s = pr(n), a = pr(r), i = {};
|
|
7831
|
-
if (s && (i.enable = s), a && (i.disable = a), t.endsWith(")")) return e.replaceCurrentModX(o),
|
|
7831
|
+
if (s && (i.enable = s), a && (i.disable = a), t.endsWith(")")) return e.replaceCurrentModX(o), Go("flags", t, { flags: i });
|
|
7832
7832
|
if (t.endsWith(":")) return e.pushModX(o), e.numOpenGroups++, Se("group", t, { ...(s || a) && { flags: i } });
|
|
7833
7833
|
throw new Error(`Unexpected flag modifier "${t}"`);
|
|
7834
7834
|
}
|
|
7835
|
-
function
|
|
7835
|
+
function _u(t) {
|
|
7836
7836
|
const e = /\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(t);
|
|
7837
7837
|
if (!e) throw new Error(`Incomplete or invalid named callout "${t}"`);
|
|
7838
7838
|
const { name: n, tag: r, args: o } = e.groups;
|
|
7839
7839
|
if (!n) throw new Error(`Invalid named callout "${t}"`);
|
|
7840
7840
|
if (r === "") throw new Error(`Named callout tag with empty value not allowed "${t}"`);
|
|
7841
|
-
const s = o ? o.split(",").filter((c) => c !== "").map((c) => /^[+-]?\d+$/.test(c) ? +c : c) : [], [a, i, l] = s, u =
|
|
7841
|
+
const s = o ? o.split(",").filter((c) => c !== "").map((c) => /^[+-]?\d+$/.test(c) ? +c : c) : [], [a, i, l] = s, u = bu.has(n) ? n.toLowerCase() : "custom";
|
|
7842
7842
|
switch (u) {
|
|
7843
7843
|
case "fail":
|
|
7844
7844
|
case "mismatch":
|
|
@@ -7870,7 +7870,7 @@ function Cu(t) {
|
|
|
7870
7870
|
default:
|
|
7871
7871
|
throw new Error(`Unexpected named callout kind "${u}"`);
|
|
7872
7872
|
}
|
|
7873
|
-
return
|
|
7873
|
+
return gu(u, r ?? null, o?.split(",") ?? null, t);
|
|
7874
7874
|
}
|
|
7875
7875
|
function fr(t) {
|
|
7876
7876
|
let e = null, n, r;
|
|
@@ -7882,13 +7882,13 @@ function fr(t) {
|
|
|
7882
7882
|
e = "lazy";
|
|
7883
7883
|
} else e || (e = "greedy");
|
|
7884
7884
|
} else n = t[0] === "+" ? 1 : 0, r = t[0] === "?" ? 1 : 1 / 0, e = t[1] === "+" ? "possessive" : t[1] === "?" ? "lazy" : "greedy";
|
|
7885
|
-
return
|
|
7885
|
+
return mu(e, n, r, t);
|
|
7886
7886
|
}
|
|
7887
|
-
function
|
|
7887
|
+
function Su(t) {
|
|
7888
7888
|
const e = t[1].toLowerCase();
|
|
7889
7889
|
return ge({ d: "digit", h: "hex", s: "space", w: "word" }[e], t, { negate: t[1] !== e });
|
|
7890
7890
|
}
|
|
7891
|
-
function
|
|
7891
|
+
function ku(t) {
|
|
7892
7892
|
const { p: e, neg: n, value: r } = /^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(t).groups;
|
|
7893
7893
|
return ge("property", t, { value: r, negate: e === "P" && !n || e === "p" && !!n });
|
|
7894
7894
|
}
|
|
@@ -7896,7 +7896,7 @@ function pr(t) {
|
|
|
7896
7896
|
const e = {};
|
|
7897
7897
|
return t.includes("i") && (e.ignoreCase = !0), t.includes("m") && (e.dotAll = !0), t.includes("x") && (e.extended = !0), Object.keys(e).length ? e : null;
|
|
7898
7898
|
}
|
|
7899
|
-
function
|
|
7899
|
+
function vu(t) {
|
|
7900
7900
|
const e = { ignoreCase: !1, dotAll: !1, extended: !1, digitIsAscii: !1, posixIsAscii: !1, spaceIsAscii: !1, wordIsAscii: !1, textSegmentMode: null };
|
|
7901
7901
|
for (let n = 0; n < t.length; n++) {
|
|
7902
7902
|
const r = t[n];
|
|
@@ -7910,14 +7910,14 @@ function ku(t) {
|
|
|
7910
7910
|
}
|
|
7911
7911
|
return e;
|
|
7912
7912
|
}
|
|
7913
|
-
function
|
|
7913
|
+
function xu(t) {
|
|
7914
7914
|
if (/^(?:\\u(?!\p{AHex}{4})|\\x(?!\p{AHex}{1,2}|\{\p{AHex}{1,8}\}))/u.test(t)) throw new Error(`Incomplete or invalid escape "${t}"`);
|
|
7915
7915
|
const e = t[2] === "{" ? /^\\x\{\s*(?<hex>\p{AHex}+)/u.exec(t).groups.hex : t.slice(2);
|
|
7916
7916
|
return parseInt(e, 16);
|
|
7917
7917
|
}
|
|
7918
|
-
function
|
|
7918
|
+
function Eu(t, e) {
|
|
7919
7919
|
const { raw: n, inCharClass: r } = t, o = n.slice(1);
|
|
7920
|
-
if (!r && (o !== "0" && o.length === 1 || o[0] !== "0" && +o <= e)) return [
|
|
7920
|
+
if (!r && (o !== "0" && o.length === 1 || o[0] !== "0" && +o <= e)) return [Do(n)];
|
|
7921
7921
|
const s = [], a = o.match(/^[0-7]+|\d/g);
|
|
7922
7922
|
for (let i = 0; i < a.length; i++) {
|
|
7923
7923
|
const l = a[i];
|
|
@@ -7929,7 +7929,7 @@ function xu(t, e) {
|
|
|
7929
7929
|
}
|
|
7930
7930
|
return s;
|
|
7931
7931
|
}
|
|
7932
|
-
function
|
|
7932
|
+
function Au(t) {
|
|
7933
7933
|
const e = [], n = new RegExp(xn, "gy");
|
|
7934
7934
|
let r;
|
|
7935
7935
|
for (; r = n.exec(t); ) {
|
|
@@ -7948,48 +7948,48 @@ function Eu(t) {
|
|
|
7948
7948
|
}
|
|
7949
7949
|
return e;
|
|
7950
7950
|
}
|
|
7951
|
-
function
|
|
7951
|
+
function Fo(t, e) {
|
|
7952
7952
|
if (!Array.isArray(t.body)) throw new Error("Expected node with body array");
|
|
7953
7953
|
if (t.body.length !== 1) return !1;
|
|
7954
7954
|
const n = t.body[0];
|
|
7955
7955
|
return !e || Object.keys(e).every((r) => e[r] === n[r]);
|
|
7956
7956
|
}
|
|
7957
|
-
function
|
|
7958
|
-
return
|
|
7957
|
+
function Ru(t) {
|
|
7958
|
+
return Iu.has(t.type);
|
|
7959
7959
|
}
|
|
7960
|
-
const
|
|
7961
|
-
function
|
|
7962
|
-
const n = { flags: "", normalizeUnknownPropertyNames: !1, skipBackrefValidation: !1, skipLookbehindValidation: !1, skipPropertyNameValidation: !1, unicodePropertyMap: null, ...e, rules: { captureGroup: !1, singleline: !1, ...e.rules } }, r =
|
|
7960
|
+
const Iu = /* @__PURE__ */ new Set(["AbsenceFunction", "Backreference", "CapturingGroup", "Character", "CharacterClass", "CharacterSet", "Group", "Quantifier", "Subroutine"]);
|
|
7961
|
+
function Bo(t, e = {}) {
|
|
7962
|
+
const n = { flags: "", normalizeUnknownPropertyNames: !1, skipBackrefValidation: !1, skipLookbehindValidation: !1, skipPropertyNameValidation: !1, unicodePropertyMap: null, ...e, rules: { captureGroup: !1, singleline: !1, ...e.rules } }, r = su(t, { flags: n.flags, rules: { captureGroup: n.rules.captureGroup, singleline: n.rules.singleline } }), o = (p, d) => {
|
|
7963
7963
|
const f = r.tokens[s.nextIndex];
|
|
7964
7964
|
switch (s.parent = p, s.nextIndex++, f.type) {
|
|
7965
7965
|
case "Alternator":
|
|
7966
7966
|
return me();
|
|
7967
7967
|
case "Assertion":
|
|
7968
|
-
return
|
|
7968
|
+
return Nu(f);
|
|
7969
7969
|
case "Backreference":
|
|
7970
|
-
return
|
|
7970
|
+
return Lu(f, s);
|
|
7971
7971
|
case "Character":
|
|
7972
7972
|
return vt(f.value, { useLastValid: !!d.isCheckingRangeEnd });
|
|
7973
7973
|
case "CharacterClassHyphen":
|
|
7974
|
-
return Lu(f, s, d);
|
|
7975
|
-
case "CharacterClassOpen":
|
|
7976
7974
|
return Pu(f, s, d);
|
|
7975
|
+
case "CharacterClassOpen":
|
|
7976
|
+
return $u(f, s, d);
|
|
7977
7977
|
case "CharacterSet":
|
|
7978
|
-
return
|
|
7978
|
+
return Tu(f, s);
|
|
7979
7979
|
case "Directive":
|
|
7980
|
-
return
|
|
7980
|
+
return Bu(f.kind, { flags: f.flags });
|
|
7981
7981
|
case "GroupOpen":
|
|
7982
|
-
return
|
|
7982
|
+
return Mu(f, s, d);
|
|
7983
7983
|
case "NamedCallout":
|
|
7984
|
-
return
|
|
7984
|
+
return Uu(f.kind, f.tag, f.arguments);
|
|
7985
7985
|
case "Quantifier":
|
|
7986
|
-
return Mu(f, s);
|
|
7987
|
-
case "Subroutine":
|
|
7988
7986
|
return Ou(f, s);
|
|
7987
|
+
case "Subroutine":
|
|
7988
|
+
return Du(f, s);
|
|
7989
7989
|
default:
|
|
7990
7990
|
throw new Error(`Unexpected token type "${f.type}"`);
|
|
7991
7991
|
}
|
|
7992
|
-
}, s = { capturingGroups: [], hasNumberedRef: !1, namedGroupsByName: /* @__PURE__ */ new Map(), nextIndex: 0, normalizeUnknownPropertyNames: n.normalizeUnknownPropertyNames, parent: null, skipBackrefValidation: n.skipBackrefValidation, skipLookbehindValidation: n.skipLookbehindValidation, skipPropertyNameValidation: n.skipPropertyNameValidation, subroutines: [], tokens: r.tokens, unicodePropertyMap: n.unicodePropertyMap, walk: o }, a =
|
|
7992
|
+
}, s = { capturingGroups: [], hasNumberedRef: !1, namedGroupsByName: /* @__PURE__ */ new Map(), nextIndex: 0, normalizeUnknownPropertyNames: n.normalizeUnknownPropertyNames, parent: null, skipBackrefValidation: n.skipBackrefValidation, skipLookbehindValidation: n.skipLookbehindValidation, skipPropertyNameValidation: n.skipPropertyNameValidation, subroutines: [], tokens: r.tokens, unicodePropertyMap: n.unicodePropertyMap, walk: o }, a = Hu(ju(r.flags));
|
|
7993
7993
|
let i = a.body[0];
|
|
7994
7994
|
for (; s.nextIndex < r.tokens.length; ) {
|
|
7995
7995
|
const p = o(i, {});
|
|
@@ -8006,10 +8006,10 @@ function Fo(t, e = {}) {
|
|
|
8006
8006
|
} else throw new Error(B`Subroutine uses a group name that's not defined "\g<${p}>"`);
|
|
8007
8007
|
return a;
|
|
8008
8008
|
}
|
|
8009
|
-
function
|
|
8009
|
+
function Nu({ kind: t }) {
|
|
8010
8010
|
return on($e({ "^": "line_start", $: "line_end", "\\A": "string_start", "\\b": "word_boundary", "\\B": "word_boundary", "\\G": "search_start", "\\y": "text_segment_boundary", "\\Y": "text_segment_boundary", "\\z": "string_end", "\\Z": "string_end_newline" }[t], `Unexpected assertion kind "${t}"`), { negate: t === B`\B` || t === B`\Y` });
|
|
8011
8011
|
}
|
|
8012
|
-
function
|
|
8012
|
+
function Lu({ raw: t }, e) {
|
|
8013
8013
|
const n = /^\\k[<']/.test(t), r = n ? t.slice(3, -1) : t.slice(1), o = (s, a = !1) => {
|
|
8014
8014
|
const i = e.capturingGroups.length;
|
|
8015
8015
|
let l = !1;
|
|
@@ -8026,16 +8026,16 @@ function Nu({ raw: t }, e) {
|
|
|
8026
8026
|
}
|
|
8027
8027
|
return o(+r);
|
|
8028
8028
|
}
|
|
8029
|
-
function
|
|
8029
|
+
function Pu(t, e, n) {
|
|
8030
8030
|
const { tokens: r, walk: o } = e, s = e.parent, a = s.body.at(-1), i = r[e.nextIndex];
|
|
8031
8031
|
if (!n.isCheckingRangeEnd && a && a.type !== "CharacterClass" && a.type !== "CharacterClassRange" && i && i.type !== "CharacterClassOpen" && i.type !== "CharacterClassClose" && i.type !== "CharacterClassIntersector") {
|
|
8032
8032
|
const l = o(s, { ...n, isCheckingRangeEnd: !0 });
|
|
8033
|
-
if (a.type === "Character" && l.type === "Character") return s.body.pop(),
|
|
8033
|
+
if (a.type === "Character" && l.type === "Character") return s.body.pop(), Fu(a, l);
|
|
8034
8034
|
throw new Error("Invalid character class range");
|
|
8035
8035
|
}
|
|
8036
8036
|
return vt(Pe("-"));
|
|
8037
8037
|
}
|
|
8038
|
-
function
|
|
8038
|
+
function $u({ negate: t }, e, n) {
|
|
8039
8039
|
const { tokens: r, walk: o } = e, s = r[e.nextIndex], a = [st()];
|
|
8040
8040
|
let i = mr(s);
|
|
8041
8041
|
for (; i.type !== "CharacterClassClose"; ) {
|
|
@@ -8049,18 +8049,18 @@ function Pu({ negate: t }, e, n) {
|
|
|
8049
8049
|
const l = st({ negate: t });
|
|
8050
8050
|
return a.length === 1 ? l.body = a[0].body : (l.kind = "intersection", l.body = a.map((u) => u.body.length === 1 ? u.body[0] : u)), e.nextIndex++, l;
|
|
8051
8051
|
}
|
|
8052
|
-
function
|
|
8052
|
+
function Tu({ kind: t, negate: e, value: n }, r) {
|
|
8053
8053
|
const { normalizeUnknownPropertyNames: o, skipPropertyNameValidation: s, unicodePropertyMap: a } = r;
|
|
8054
8054
|
if (t === "property") {
|
|
8055
8055
|
const i = xt(n);
|
|
8056
8056
|
if (vn.has(i) && !a?.has(i)) t = "posix", n = i;
|
|
8057
8057
|
else return ke(n, { negate: e, normalizeUnknownPropertyNames: o, skipPropertyNameValidation: s, unicodePropertyMap: a });
|
|
8058
8058
|
}
|
|
8059
|
-
return t === "posix" ?
|
|
8059
|
+
return t === "posix" ? zu(n, { negate: e }) : an(t, { negate: e });
|
|
8060
8060
|
}
|
|
8061
|
-
function
|
|
8062
|
-
const { tokens: r, capturingGroups: o, namedGroupsByName: s, skipLookbehindValidation: a, walk: i } = e, l =
|
|
8063
|
-
if (l.type === "CapturingGroup" && (o.push(l), l.name &&
|
|
8061
|
+
function Mu(t, e, n) {
|
|
8062
|
+
const { tokens: r, capturingGroups: o, namedGroupsByName: s, skipLookbehindValidation: a, walk: i } = e, l = Wu(t), u = l.type === "AbsenceFunction", c = gr(l), h = c && l.negate;
|
|
8063
|
+
if (l.type === "CapturingGroup" && (o.push(l), l.name && ou(s, l.name, []).push(l)), u && n.isInAbsenceFunction) throw new Error("Nested absence function not supported by Oniguruma");
|
|
8064
8064
|
let p = yr(r[e.nextIndex]);
|
|
8065
8065
|
for (; p.type !== "GroupClose"; ) {
|
|
8066
8066
|
if (p.type === "Alternator") l.body.push(me()), e.nextIndex++;
|
|
@@ -8077,13 +8077,13 @@ function Tu(t, e, n) {
|
|
|
8077
8077
|
}
|
|
8078
8078
|
return e.nextIndex++, l;
|
|
8079
8079
|
}
|
|
8080
|
-
function
|
|
8080
|
+
function Ou({ kind: t, min: e, max: n }, r) {
|
|
8081
8081
|
const o = r.parent, s = o.body.at(-1);
|
|
8082
|
-
if (!s || !
|
|
8083
|
-
const a =
|
|
8082
|
+
if (!s || !Ru(s)) throw new Error("Quantifier requires a repeatable token");
|
|
8083
|
+
const a = Uo(t, e, n, s);
|
|
8084
8084
|
return o.body.pop(), a;
|
|
8085
8085
|
}
|
|
8086
|
-
function
|
|
8086
|
+
function Du({ raw: t }, e) {
|
|
8087
8087
|
const { capturingGroups: n, subroutines: r } = e;
|
|
8088
8088
|
let o = t.slice(3, -1);
|
|
8089
8089
|
const s = /^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(o);
|
|
@@ -8091,14 +8091,14 @@ function Ou({ raw: t }, e) {
|
|
|
8091
8091
|
const i = +s.groups.num, l = n.length;
|
|
8092
8092
|
if (e.hasNumberedRef = !0, o = { "": i, "+": l + i, "-": l + 1 - i }[s.groups.sign], o < 1) throw new Error("Invalid subroutine number");
|
|
8093
8093
|
} else o === "0" && (o = 0);
|
|
8094
|
-
const a =
|
|
8094
|
+
const a = zo(o);
|
|
8095
8095
|
return r.push(a), a;
|
|
8096
8096
|
}
|
|
8097
|
-
function
|
|
8097
|
+
function Gu(t, e) {
|
|
8098
8098
|
return { type: "AbsenceFunction", kind: t, body: Ye(e?.body) };
|
|
8099
8099
|
}
|
|
8100
8100
|
function me(t) {
|
|
8101
|
-
return { type: "Alternative", body:
|
|
8101
|
+
return { type: "Alternative", body: Ho(t?.body) };
|
|
8102
8102
|
}
|
|
8103
8103
|
function on(t, e) {
|
|
8104
8104
|
const n = { type: "Assertion", kind: t };
|
|
@@ -8108,9 +8108,9 @@ function sn(t, e) {
|
|
|
8108
8108
|
const n = !!e?.orphan;
|
|
8109
8109
|
return { type: "Backreference", ref: t, ...n && { orphan: n } };
|
|
8110
8110
|
}
|
|
8111
|
-
function
|
|
8111
|
+
function jo(t, e) {
|
|
8112
8112
|
const n = { name: void 0, isSubroutined: !1, ...e };
|
|
8113
|
-
if (n.name !== void 0 && !
|
|
8113
|
+
if (n.name !== void 0 && !Vu(n.name)) throw new Error(`Group name "${n.name}" invalid in Oniguruma`);
|
|
8114
8114
|
return { type: "CapturingGroup", number: t, ...n.name && { name: n.name }, ...n.isSubroutined && { isSubroutined: n.isSubroutined }, body: Ye(e?.body) };
|
|
8115
8115
|
}
|
|
8116
8116
|
function vt(t, e) {
|
|
@@ -8124,9 +8124,9 @@ function vt(t, e) {
|
|
|
8124
8124
|
}
|
|
8125
8125
|
function st(t) {
|
|
8126
8126
|
const e = { kind: "union", negate: !1, ...t };
|
|
8127
|
-
return { type: "CharacterClass", kind: e.kind, negate: e.negate, body:
|
|
8127
|
+
return { type: "CharacterClass", kind: e.kind, negate: e.negate, body: Ho(t?.body) };
|
|
8128
8128
|
}
|
|
8129
|
-
function
|
|
8129
|
+
function Fu(t, e) {
|
|
8130
8130
|
if (e.value < t.value) throw new Error("Character class range out of order");
|
|
8131
8131
|
return { type: "CharacterClassRange", min: t, max: e };
|
|
8132
8132
|
}
|
|
@@ -8134,12 +8134,12 @@ function an(t, e) {
|
|
|
8134
8134
|
const n = !!e?.negate, r = { type: "CharacterSet", kind: t };
|
|
8135
8135
|
return (t === "digit" || t === "hex" || t === "newline" || t === "space" || t === "word") && (r.negate = n), (t === "text_segment" || t === "newline" && !n) && (r.variableLength = !0), r;
|
|
8136
8136
|
}
|
|
8137
|
-
function
|
|
8137
|
+
function Bu(t, e = {}) {
|
|
8138
8138
|
if (t === "keep") return { type: "Directive", kind: t };
|
|
8139
8139
|
if (t === "flags") return { type: "Directive", kind: t, flags: $e(e.flags) };
|
|
8140
8140
|
throw new Error(`Unexpected directive kind "${t}"`);
|
|
8141
8141
|
}
|
|
8142
|
-
function
|
|
8142
|
+
function ju(t) {
|
|
8143
8143
|
return { type: "Flags", ...t };
|
|
8144
8144
|
}
|
|
8145
8145
|
function Q(t) {
|
|
@@ -8151,41 +8151,41 @@ function pe(t) {
|
|
|
8151
8151
|
const e = { behind: !1, negate: !1, ...t };
|
|
8152
8152
|
return { type: "LookaroundAssertion", kind: e.behind ? "lookbehind" : "lookahead", negate: e.negate, body: Ye(t?.body) };
|
|
8153
8153
|
}
|
|
8154
|
-
function
|
|
8154
|
+
function Uu(t, e, n) {
|
|
8155
8155
|
return { type: "NamedCallout", kind: t, tag: e, arguments: n };
|
|
8156
8156
|
}
|
|
8157
|
-
function
|
|
8157
|
+
function zu(t, e) {
|
|
8158
8158
|
const n = !!e?.negate;
|
|
8159
8159
|
if (!vn.has(t)) throw new Error(`Invalid POSIX class "${t}"`);
|
|
8160
8160
|
return { type: "CharacterSet", kind: "posix", value: t, negate: n };
|
|
8161
8161
|
}
|
|
8162
|
-
function
|
|
8162
|
+
function Uo(t, e, n, r) {
|
|
8163
8163
|
if (e > n) throw new Error("Invalid reversed quantifier range");
|
|
8164
8164
|
return { type: "Quantifier", kind: t, min: e, max: n, body: r };
|
|
8165
8165
|
}
|
|
8166
|
-
function
|
|
8166
|
+
function Hu(t, e) {
|
|
8167
8167
|
return { type: "Regex", body: Ye(e?.body), flags: t };
|
|
8168
8168
|
}
|
|
8169
|
-
function
|
|
8169
|
+
function zo(t) {
|
|
8170
8170
|
return { type: "Subroutine", ref: t };
|
|
8171
8171
|
}
|
|
8172
8172
|
function ke(t, e) {
|
|
8173
8173
|
const n = { negate: !1, normalizeUnknownPropertyNames: !1, skipPropertyNameValidation: !1, unicodePropertyMap: null, ...e };
|
|
8174
8174
|
let r = n.unicodePropertyMap?.get(xt(t));
|
|
8175
8175
|
if (!r) {
|
|
8176
|
-
if (n.normalizeUnknownPropertyNames) r =
|
|
8176
|
+
if (n.normalizeUnknownPropertyNames) r = qu(t);
|
|
8177
8177
|
else if (n.unicodePropertyMap && !n.skipPropertyNameValidation) throw new Error(B`Invalid Unicode property "\p{${t}}"`);
|
|
8178
8178
|
}
|
|
8179
8179
|
return { type: "CharacterSet", kind: "property", value: r ?? t, negate: n.negate };
|
|
8180
8180
|
}
|
|
8181
|
-
function
|
|
8181
|
+
function Wu({ flags: t, kind: e, name: n, negate: r, number: o }) {
|
|
8182
8182
|
switch (e) {
|
|
8183
8183
|
case "absence_repeater":
|
|
8184
|
-
return
|
|
8184
|
+
return Gu("repeater");
|
|
8185
8185
|
case "atomic":
|
|
8186
8186
|
return Q({ atomic: !0 });
|
|
8187
8187
|
case "capturing":
|
|
8188
|
-
return
|
|
8188
|
+
return jo(o, { name: n });
|
|
8189
8189
|
case "group":
|
|
8190
8190
|
return Q({ flags: t });
|
|
8191
8191
|
case "lookahead":
|
|
@@ -8200,7 +8200,7 @@ function Ye(t) {
|
|
|
8200
8200
|
else if (!Array.isArray(t) || !t.length || !t.every((e) => e.type === "Alternative")) throw new Error("Invalid body; expected array of one or more Alternative nodes");
|
|
8201
8201
|
return t;
|
|
8202
8202
|
}
|
|
8203
|
-
function
|
|
8203
|
+
function Ho(t) {
|
|
8204
8204
|
if (t === void 0) t = [];
|
|
8205
8205
|
else if (!Array.isArray(t) || !t.every((e) => !!e.type)) throw new Error("Invalid body; expected array of nodes");
|
|
8206
8206
|
return t;
|
|
@@ -8211,10 +8211,10 @@ function dr(t) {
|
|
|
8211
8211
|
function gr(t) {
|
|
8212
8212
|
return t.type === "LookaroundAssertion" && t.kind === "lookbehind";
|
|
8213
8213
|
}
|
|
8214
|
-
function
|
|
8214
|
+
function Vu(t) {
|
|
8215
8215
|
return /^[\p{Alpha}\p{Pc}][^)]*$/u.test(t);
|
|
8216
8216
|
}
|
|
8217
|
-
function
|
|
8217
|
+
function qu(t) {
|
|
8218
8218
|
return t.trim().replace(/[- _]+/g, "_").replace(/[A-Z][a-z]+(?=[A-Z])/g, "$&_").replace(/[A-Za-z]+/g, (e) => e[0].toUpperCase() + e.slice(1).toLowerCase());
|
|
8219
8219
|
}
|
|
8220
8220
|
function xt(t) {
|
|
@@ -8301,12 +8301,12 @@ function Ce(t) {
|
|
|
8301
8301
|
if (typeof t != "number") throw new Error("Numeric key expected");
|
|
8302
8302
|
return t;
|
|
8303
8303
|
}
|
|
8304
|
-
const
|
|
8305
|
-
function
|
|
8304
|
+
const Xu = String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;
|
|
8305
|
+
function Ku(t, e) {
|
|
8306
8306
|
for (let n = 0; n < t.length; n++)
|
|
8307
8307
|
t[n] >= e && t[n]++;
|
|
8308
8308
|
}
|
|
8309
|
-
function
|
|
8309
|
+
function Yu(t, e, n, r) {
|
|
8310
8310
|
return t.slice(0, e) + r + t.slice(e + n.length);
|
|
8311
8311
|
}
|
|
8312
8312
|
const J = Object.freeze({
|
|
@@ -8329,10 +8329,10 @@ function En(t, e, n, r) {
|
|
|
8329
8329
|
}
|
|
8330
8330
|
return i;
|
|
8331
8331
|
}
|
|
8332
|
-
function
|
|
8332
|
+
function Wo(t, e, n, r) {
|
|
8333
8333
|
En(t, e, n, r);
|
|
8334
8334
|
}
|
|
8335
|
-
function
|
|
8335
|
+
function Ju(t, e, n = 0, r) {
|
|
8336
8336
|
if (!new RegExp(e, "su").test(t))
|
|
8337
8337
|
return null;
|
|
8338
8338
|
const o = new RegExp(`${e}|(?<$skip>\\\\?.)`, "gsu");
|
|
@@ -8347,9 +8347,9 @@ function Yu(t, e, n = 0, r) {
|
|
|
8347
8347
|
return null;
|
|
8348
8348
|
}
|
|
8349
8349
|
function nt(t, e, n) {
|
|
8350
|
-
return !!
|
|
8350
|
+
return !!Ju(t, e, 0, n);
|
|
8351
8351
|
}
|
|
8352
|
-
function
|
|
8352
|
+
function Zu(t, e) {
|
|
8353
8353
|
const n = /\\?./gsu;
|
|
8354
8354
|
n.lastIndex = e;
|
|
8355
8355
|
let r = t.length, o = 0, s = 1, a;
|
|
@@ -8368,8 +8368,8 @@ function Ju(t, e) {
|
|
|
8368
8368
|
}
|
|
8369
8369
|
return t.slice(e, r);
|
|
8370
8370
|
}
|
|
8371
|
-
const br = new RegExp(String.raw`(?<noncapturingStart>${
|
|
8372
|
-
function
|
|
8371
|
+
const br = new RegExp(String.raw`(?<noncapturingStart>${Xu})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`, "gsu");
|
|
8372
|
+
function Qu(t, e) {
|
|
8373
8373
|
const n = e?.hiddenCaptures ?? [];
|
|
8374
8374
|
let r = e?.captureTransfers ?? /* @__PURE__ */ new Map();
|
|
8375
8375
|
if (!/\(\?>/.test(t))
|
|
@@ -8399,7 +8399,7 @@ function Zu(t, e) {
|
|
|
8399
8399
|
if (!d) {
|
|
8400
8400
|
u++;
|
|
8401
8401
|
const S = l + u;
|
|
8402
|
-
if (t = `${t.slice(0, c)}${s}${t.slice(c + o.length, y)}))<$$${S}>)${t.slice(y + 1)}`, h = !0, i.push(S),
|
|
8402
|
+
if (t = `${t.slice(0, c)}${s}${t.slice(c + o.length, y)}))<$$${S}>)${t.slice(y + 1)}`, h = !0, i.push(S), Ku(n, S), r.size) {
|
|
8403
8403
|
const A = /* @__PURE__ */ new Map();
|
|
8404
8404
|
r.forEach((D, L) => {
|
|
8405
8405
|
A.set(
|
|
@@ -8433,7 +8433,7 @@ function Zu(t, e) {
|
|
|
8433
8433
|
hiddenCaptures: n
|
|
8434
8434
|
};
|
|
8435
8435
|
}
|
|
8436
|
-
const
|
|
8436
|
+
const Vo = String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`, Dt = new RegExp(String.raw`
|
|
8437
8437
|
\\(?: \d+
|
|
8438
8438
|
| c[A-Za-z]
|
|
8439
8439
|
| [gk]<[^>]+>
|
|
@@ -8446,11 +8446,11 @@ const Wo = String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`, Dt = new RegExp(String.raw`
|
|
|
8446
8446
|
| [A-Za-z\-]+:
|
|
8447
8447
|
| \(DEFINE\)
|
|
8448
8448
|
))?
|
|
8449
|
-
| (?<qBase>${
|
|
8449
|
+
| (?<qBase>${Vo})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
|
|
8450
8450
|
| \\?.
|
|
8451
8451
|
`.replace(/\s+/g, ""), "gsu");
|
|
8452
|
-
function
|
|
8453
|
-
if (!new RegExp(`${
|
|
8452
|
+
function ec(t) {
|
|
8453
|
+
if (!new RegExp(`${Vo}\\+`).test(t))
|
|
8454
8454
|
return {
|
|
8455
8455
|
pattern: t
|
|
8456
8456
|
};
|
|
@@ -8468,7 +8468,7 @@ function Qu(t) {
|
|
|
8468
8468
|
throw new Error(`Invalid quantifier "${i}"`);
|
|
8469
8469
|
let p = -1;
|
|
8470
8470
|
if (/^\{\d+\}$/.test(u))
|
|
8471
|
-
t =
|
|
8471
|
+
t = Yu(t, l + u.length, c, "");
|
|
8472
8472
|
else {
|
|
8473
8473
|
if (o === ")" || o === "]") {
|
|
8474
8474
|
const d = o === ")" ? n : r;
|
|
@@ -8487,8 +8487,8 @@ function Qu(t) {
|
|
|
8487
8487
|
pattern: t
|
|
8488
8488
|
};
|
|
8489
8489
|
}
|
|
8490
|
-
const Y = String.raw,
|
|
8491
|
-
function
|
|
8490
|
+
const Y = String.raw, tc = Y`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`, ln = Y`\(\?R=(?<rDepth>[^\)]+)\)|${tc}`, Et = Y`\(\?<(?![=!])(?<captureName>[^>]+)>`, qo = Y`${Et}|(?<unnamed>\()(?!\?)`, he = new RegExp(Y`${Et}|${ln}|\(\?|\\?.`, "gsu"), Gt = "Cannot use multiple overlapping recursions";
|
|
8491
|
+
function nc(t, e) {
|
|
8492
8492
|
const { hiddenCaptures: n, mode: r } = {
|
|
8493
8493
|
hiddenCaptures: [],
|
|
8494
8494
|
mode: "plugin",
|
|
@@ -8552,7 +8552,7 @@ function tc(t, e) {
|
|
|
8552
8552
|
}
|
|
8553
8553
|
if (!m)
|
|
8554
8554
|
throw new Error(Y`Recursive \g cannot be used outside the referenced group "${r === "external" ? C : Y`\g<${C}&R=${y}>`}"`);
|
|
8555
|
-
const _ = i.get(C), S =
|
|
8555
|
+
const _ = i.get(C), S = Zu(t, _);
|
|
8556
8556
|
if (a && nt(S, Y`${Et}|\((?!\?)`, J.DEFAULT))
|
|
8557
8557
|
throw new Error(
|
|
8558
8558
|
// When used in `external` mode by transpilers other than Regex+, backrefs might have
|
|
@@ -8603,7 +8603,7 @@ function wr(t) {
|
|
|
8603
8603
|
}
|
|
8604
8604
|
function Cr(t, e, n, r, o, s, a) {
|
|
8605
8605
|
const i = /* @__PURE__ */ new Set();
|
|
8606
|
-
r &&
|
|
8606
|
+
r && Wo(t + e, Et, ({ groups: { captureName: u } }) => {
|
|
8607
8607
|
i.add(u);
|
|
8608
8608
|
}, J.DEFAULT);
|
|
8609
8609
|
const l = [
|
|
@@ -8622,14 +8622,14 @@ function _r(t, e, n, r, o, s, a) {
|
|
|
8622
8622
|
const h = l(c);
|
|
8623
8623
|
u += En(
|
|
8624
8624
|
t,
|
|
8625
|
-
Y`${
|
|
8625
|
+
Y`${qo}|\\k<(?<backref>[^>]+)>`,
|
|
8626
8626
|
({ 0: p, groups: { captureName: d, unnamed: f, backref: g } }) => {
|
|
8627
8627
|
if (g && r && !r.has(g))
|
|
8628
8628
|
return p;
|
|
8629
8629
|
const C = `_$${h}`;
|
|
8630
8630
|
if (f || d) {
|
|
8631
8631
|
const y = a + s.length + 1;
|
|
8632
|
-
return s.push(y),
|
|
8632
|
+
return s.push(y), rc(o, y), f ? p : `(?<${d}${C}>`;
|
|
8633
8633
|
}
|
|
8634
8634
|
return Y`\k<${g}${C}>`;
|
|
8635
8635
|
},
|
|
@@ -8638,14 +8638,14 @@ function _r(t, e, n, r, o, s, a) {
|
|
|
8638
8638
|
}
|
|
8639
8639
|
return u;
|
|
8640
8640
|
}
|
|
8641
|
-
function
|
|
8641
|
+
function rc(t, e) {
|
|
8642
8642
|
for (let n = 0; n < t.length; n++)
|
|
8643
8643
|
t[n] >= e && t[n]++;
|
|
8644
8644
|
}
|
|
8645
8645
|
function Sr(t, e, n, r, o, s) {
|
|
8646
8646
|
if (t.size && r) {
|
|
8647
8647
|
let a = 0;
|
|
8648
|
-
|
|
8648
|
+
Wo(e, qo, () => a++, J.DEFAULT);
|
|
8649
8649
|
const i = s - a + o, l = /* @__PURE__ */ new Map();
|
|
8650
8650
|
return t.forEach((u, c) => {
|
|
8651
8651
|
const h = (r - a * n) / n, p = a * n, d = c > i + a ? c + r : c, f = [];
|
|
@@ -8704,7 +8704,7 @@ function Ve(t, e, n) {
|
|
|
8704
8704
|
function un(t, e) {
|
|
8705
8705
|
return kr[t] >= kr[e];
|
|
8706
8706
|
}
|
|
8707
|
-
function
|
|
8707
|
+
function oc(t, e) {
|
|
8708
8708
|
if (t == null)
|
|
8709
8709
|
throw new Error(e ?? "Value expected");
|
|
8710
8710
|
return t;
|
|
@@ -8713,7 +8713,7 @@ var kr = {
|
|
|
8713
8713
|
ES2025: 2025,
|
|
8714
8714
|
ES2024: 2024,
|
|
8715
8715
|
ES2018: 2018
|
|
8716
|
-
},
|
|
8716
|
+
}, sc = (
|
|
8717
8717
|
/** @type {const} */
|
|
8718
8718
|
{
|
|
8719
8719
|
auto: "auto",
|
|
@@ -8722,10 +8722,10 @@ var kr = {
|
|
|
8722
8722
|
ES2018: "ES2018"
|
|
8723
8723
|
}
|
|
8724
8724
|
);
|
|
8725
|
-
function
|
|
8725
|
+
function Xo(t = {}) {
|
|
8726
8726
|
if ({}.toString.call(t) !== "[object Object]")
|
|
8727
8727
|
throw new Error("Unexpected options");
|
|
8728
|
-
if (t.target !== void 0 && !
|
|
8728
|
+
if (t.target !== void 0 && !sc[t.target])
|
|
8729
8729
|
throw new Error(`Unexpected target "${t.target}"`);
|
|
8730
8730
|
const e = {
|
|
8731
8731
|
// Sets the level of emulation rigor/strictness.
|
|
@@ -8769,16 +8769,16 @@ function qo(t = {}) {
|
|
|
8769
8769
|
};
|
|
8770
8770
|
return e.target === "auto" && (e.target = ae.flagGroups ? "ES2025" : ae.unicodeSets ? "ES2024" : "ES2018"), e;
|
|
8771
8771
|
}
|
|
8772
|
-
var
|
|
8772
|
+
var ac = "[ -\r ]", ic = /* @__PURE__ */ new Set([
|
|
8773
8773
|
M(304),
|
|
8774
8774
|
// İ
|
|
8775
8775
|
M(305)
|
|
8776
8776
|
// ı
|
|
8777
8777
|
]), re = v`[\p{L}\p{M}\p{N}\p{Pc}]`;
|
|
8778
|
-
function
|
|
8779
|
-
if (
|
|
8778
|
+
function Ko(t) {
|
|
8779
|
+
if (ic.has(t))
|
|
8780
8780
|
return [t];
|
|
8781
|
-
const e = /* @__PURE__ */ new Set(), n = t.toLowerCase(), r = n.toUpperCase(), o =
|
|
8781
|
+
const e = /* @__PURE__ */ new Set(), n = t.toLowerCase(), r = n.toUpperCase(), o = cc.get(n), s = lc.get(n), a = uc.get(n);
|
|
8782
8782
|
return [...r].length === 1 && e.add(r), a && e.add(a), o && e.add(o), e.add(n), s && e.add(s), [...e];
|
|
8783
8783
|
}
|
|
8784
8784
|
var An = /* @__PURE__ */ new Map(
|
|
@@ -8873,12 +8873,12 @@ Variation_Selector VS
|
|
|
8873
8873
|
White_Space space
|
|
8874
8874
|
XID_Continue XIDC
|
|
8875
8875
|
XID_Start XIDS`.split(/\s/).map((t) => [xt(t), t])
|
|
8876
|
-
),
|
|
8876
|
+
), lc = /* @__PURE__ */ new Map([
|
|
8877
8877
|
["s", M(383)],
|
|
8878
8878
|
// s, ſ
|
|
8879
8879
|
[M(383), "s"]
|
|
8880
8880
|
// ſ, s
|
|
8881
|
-
]),
|
|
8881
|
+
]), uc = /* @__PURE__ */ new Map([
|
|
8882
8882
|
[M(223), M(7838)],
|
|
8883
8883
|
// ß, ẞ
|
|
8884
8884
|
[M(107), M(8490)],
|
|
@@ -8887,7 +8887,7 @@ XID_Start XIDS`.split(/\s/).map((t) => [xt(t), t])
|
|
|
8887
8887
|
// å, Å (Angstrom)
|
|
8888
8888
|
[M(969), M(8486)]
|
|
8889
8889
|
// ω, Ω (Ohm)
|
|
8890
|
-
]),
|
|
8890
|
+
]), cc = new Map([
|
|
8891
8891
|
ie(453),
|
|
8892
8892
|
ie(456),
|
|
8893
8893
|
ie(459),
|
|
@@ -8898,7 +8898,7 @@ XID_Start XIDS`.split(/\s/).map((t) => [xt(t), t])
|
|
|
8898
8898
|
ie(8124),
|
|
8899
8899
|
ie(8140),
|
|
8900
8900
|
ie(8188)
|
|
8901
|
-
]),
|
|
8901
|
+
]), hc = /* @__PURE__ */ new Map([
|
|
8902
8902
|
["alnum", v`[\p{Alpha}\p{Nd}]`],
|
|
8903
8903
|
["alpha", v`\p{Alpha}`],
|
|
8904
8904
|
["ascii", v`\p{ASCII}`],
|
|
@@ -8915,7 +8915,7 @@ XID_Start XIDS`.split(/\s/).map((t) => [xt(t), t])
|
|
|
8915
8915
|
["word", v`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],
|
|
8916
8916
|
["xdigit", v`\p{AHex}`]
|
|
8917
8917
|
]);
|
|
8918
|
-
function
|
|
8918
|
+
function fc(t, e) {
|
|
8919
8919
|
const n = [];
|
|
8920
8920
|
for (let r = t; r <= e; r++)
|
|
8921
8921
|
n.push(r);
|
|
@@ -8926,9 +8926,9 @@ function ie(t) {
|
|
|
8926
8926
|
return [e.toLowerCase(), e];
|
|
8927
8927
|
}
|
|
8928
8928
|
function Ft(t, e) {
|
|
8929
|
-
return
|
|
8929
|
+
return fc(t, e).map((n) => ie(n));
|
|
8930
8930
|
}
|
|
8931
|
-
var
|
|
8931
|
+
var Yo = /* @__PURE__ */ new Set([
|
|
8932
8932
|
"Lower",
|
|
8933
8933
|
"Lowercase",
|
|
8934
8934
|
"Upper",
|
|
@@ -8944,7 +8944,7 @@ var Ko = /* @__PURE__ */ new Set([
|
|
|
8944
8944
|
// generally extreme edge cases and using such properties case insensitively generally produces
|
|
8945
8945
|
// undesired behavior anyway
|
|
8946
8946
|
]);
|
|
8947
|
-
function
|
|
8947
|
+
function pc(t, e) {
|
|
8948
8948
|
const n = {
|
|
8949
8949
|
// A couple edge cases exist where options `accuracy` and `bestEffortTarget` are used:
|
|
8950
8950
|
// - `CharacterSet` kind `text_segment` (`\X`): An exact representation would require heavy
|
|
@@ -8958,7 +8958,7 @@ function fc(t, e) {
|
|
|
8958
8958
|
bestEffortTarget: "ES2025",
|
|
8959
8959
|
...e
|
|
8960
8960
|
};
|
|
8961
|
-
|
|
8961
|
+
Jo(t);
|
|
8962
8962
|
const r = {
|
|
8963
8963
|
accuracy: n.accuracy,
|
|
8964
8964
|
asciiWordBoundaries: n.asciiWordBoundaries,
|
|
@@ -8975,7 +8975,7 @@ function fc(t, e) {
|
|
|
8975
8975
|
spaceIsAscii: t.flags.spaceIsAscii,
|
|
8976
8976
|
wordIsAscii: t.flags.wordIsAscii
|
|
8977
8977
|
};
|
|
8978
|
-
Be(t,
|
|
8978
|
+
Be(t, dc, r);
|
|
8979
8979
|
const o = {
|
|
8980
8980
|
dotAll: t.flags.dotAll,
|
|
8981
8981
|
ignoreCase: t.flags.ignoreCase
|
|
@@ -8990,16 +8990,16 @@ function fc(t, e) {
|
|
|
8990
8990
|
reffedNodesByReferencer: /* @__PURE__ */ new Map(),
|
|
8991
8991
|
subroutineRefMap: r.subroutineRefMap
|
|
8992
8992
|
};
|
|
8993
|
-
Be(t,
|
|
8993
|
+
Be(t, gc, s);
|
|
8994
8994
|
const a = {
|
|
8995
8995
|
groupsByName: s.groupsByName,
|
|
8996
8996
|
highestOrphanBackref: 0,
|
|
8997
8997
|
numCapturesToLeft: 0,
|
|
8998
8998
|
reffedNodesByReferencer: s.reffedNodesByReferencer
|
|
8999
8999
|
};
|
|
9000
|
-
return Be(t,
|
|
9000
|
+
return Be(t, mc, a), t._originMap = s.groupOriginByCopy, t._strategy = r.strategy, t;
|
|
9001
9001
|
}
|
|
9002
|
-
var
|
|
9002
|
+
var dc = {
|
|
9003
9003
|
AbsenceFunction({ node: t, parent: e, replaceWith: n }) {
|
|
9004
9004
|
const { body: r, kind: o } = t;
|
|
9005
9005
|
if (o === "repeater") {
|
|
@@ -9011,7 +9011,7 @@ var pc = {
|
|
|
9011
9011
|
);
|
|
9012
9012
|
const a = Q();
|
|
9013
9013
|
a.body[0].body.push(
|
|
9014
|
-
|
|
9014
|
+
Uo("greedy", 0, 1 / 0, s)
|
|
9015
9015
|
), n(P(a, e), { traverse: !0 });
|
|
9016
9016
|
} else
|
|
9017
9017
|
throw new Error('Unsupported absence function "(?~|"');
|
|
@@ -9026,7 +9026,7 @@ var pc = {
|
|
|
9026
9026
|
},
|
|
9027
9027
|
exit({ node: t }, { flagDirectivesByAlt: e }) {
|
|
9028
9028
|
if (e.get(t)?.length) {
|
|
9029
|
-
const n =
|
|
9029
|
+
const n = Qo(e.get(t));
|
|
9030
9030
|
if (n) {
|
|
9031
9031
|
const r = Q({ flags: n });
|
|
9032
9032
|
r.body[0].body = t.body, t.body = [P(r, t)];
|
|
@@ -9051,7 +9051,7 @@ var pc = {
|
|
|
9051
9051
|
o.flags.sticky = !0, s();
|
|
9052
9052
|
else {
|
|
9053
9053
|
const f = r[n - 1];
|
|
9054
|
-
if (f &&
|
|
9054
|
+
if (f && Sc(f))
|
|
9055
9055
|
a(P(pe({ negate: !0 }), e));
|
|
9056
9056
|
else {
|
|
9057
9057
|
if (h)
|
|
@@ -9090,7 +9090,7 @@ var pc = {
|
|
|
9090
9090
|
return;
|
|
9091
9091
|
}
|
|
9092
9092
|
if (a && (l === "space" || c === "space")) {
|
|
9093
|
-
n(P(Ut(oe(
|
|
9093
|
+
n(P(Ut(oe(ac), u), e));
|
|
9094
9094
|
return;
|
|
9095
9095
|
}
|
|
9096
9096
|
if (i && (l === "word" || c === "word")) {
|
|
@@ -9128,7 +9128,7 @@ var pc = {
|
|
|
9128
9128
|
}[c];
|
|
9129
9129
|
u && (h = `\0-${M(h.codePointAt(0) - 1)}${M(h.codePointAt(2) + 1)}-`), n(P(oe(`[${h}]`), e));
|
|
9130
9130
|
} else
|
|
9131
|
-
n(P(Ut(oe(
|
|
9131
|
+
n(P(Ut(oe(hc.get(c)), u), e));
|
|
9132
9132
|
else if (l === "property")
|
|
9133
9133
|
An.has(xt(c)) || (t.key = "sc");
|
|
9134
9134
|
else if (l === "space")
|
|
@@ -9149,7 +9149,7 @@ var pc = {
|
|
|
9149
9149
|
}
|
|
9150
9150
|
else if (i === "keep") {
|
|
9151
9151
|
const u = n.body[0], h = n.body.length === 1 && // Not emulatable if within a `CapturingGroup`
|
|
9152
|
-
|
|
9152
|
+
Fo(u, { type: "Group" }) && u.body[0].body.length === 1 ? u.body[0] : n;
|
|
9153
9153
|
if (e.parent !== h || h.body.length > 1)
|
|
9154
9154
|
throw new Error(v`Uses "\K" in a way that's unsupported`);
|
|
9155
9155
|
const p = pe({ behind: !0 });
|
|
@@ -9236,7 +9236,7 @@ var pc = {
|
|
|
9236
9236
|
if (s.body.length === 1 && s.body[0].kind === "search_start")
|
|
9237
9237
|
s.body.pop();
|
|
9238
9238
|
else {
|
|
9239
|
-
const a =
|
|
9239
|
+
const a = ts(s.body);
|
|
9240
9240
|
a ? (r = !0, Array.isArray(a) ? n.push(...a) : n.push(a)) : o = !0;
|
|
9241
9241
|
}
|
|
9242
9242
|
r && !o && n.forEach((s) => e.add(s));
|
|
@@ -9250,7 +9250,7 @@ var pc = {
|
|
|
9250
9250
|
let { ref: n } = t;
|
|
9251
9251
|
typeof n == "string" && !jt(n) && (n = Bt(n, e), t.ref = n);
|
|
9252
9252
|
}
|
|
9253
|
-
},
|
|
9253
|
+
}, gc = {
|
|
9254
9254
|
Backreference({ node: t }, { multiplexCapturesToLeftByRef: e, reffedNodesByReferencer: n }) {
|
|
9255
9255
|
const { orphan: r, ref: o } = t;
|
|
9256
9256
|
r || n.set(t, [...e.get(o).map(({ node: s }) => s)]);
|
|
@@ -9326,27 +9326,27 @@ var pc = {
|
|
|
9326
9326
|
}
|
|
9327
9327
|
const a = r.subroutineRefMap.get(s), i = s === 0, l = i ? vr(0) : (
|
|
9328
9328
|
// The reffed group might itself contain subroutines, which are expanded during sub-traversal
|
|
9329
|
-
|
|
9329
|
+
Zo(a, r.groupOriginByCopy, null)
|
|
9330
9330
|
);
|
|
9331
9331
|
let u = l;
|
|
9332
9332
|
if (!i) {
|
|
9333
|
-
const c =
|
|
9333
|
+
const c = Qo(wc(
|
|
9334
9334
|
a,
|
|
9335
9335
|
(p) => p.type === "Group" && !!p.flags
|
|
9336
9336
|
)), h = c ? bt(r.globalFlags, c) : r.globalFlags;
|
|
9337
|
-
|
|
9338
|
-
flags:
|
|
9337
|
+
yc(h, r.currentFlags) || (u = Q({
|
|
9338
|
+
flags: Cc(h)
|
|
9339
9339
|
}), u.body[0].body.push(l));
|
|
9340
9340
|
}
|
|
9341
9341
|
n(P(u, e), { traverse: !i });
|
|
9342
9342
|
}
|
|
9343
|
-
},
|
|
9343
|
+
}, mc = {
|
|
9344
9344
|
Backreference({ node: t, parent: e, replaceWith: n }, r) {
|
|
9345
9345
|
if (t.orphan) {
|
|
9346
9346
|
r.highestOrphanBackref = Math.max(r.highestOrphanBackref, t.ref);
|
|
9347
9347
|
return;
|
|
9348
9348
|
}
|
|
9349
|
-
const s = r.reffedNodesByReferencer.get(t).filter((a) =>
|
|
9349
|
+
const s = r.reffedNodesByReferencer.get(t).filter((a) => bc(a, t));
|
|
9350
9350
|
if (!s.length)
|
|
9351
9351
|
n(P(pe({ negate: !0 }), e));
|
|
9352
9352
|
else if (s.length > 1) {
|
|
@@ -9367,7 +9367,7 @@ var pc = {
|
|
|
9367
9367
|
exit({ node: t }, e) {
|
|
9368
9368
|
const n = Math.max(e.highestOrphanBackref - e.numCapturesToLeft, 0);
|
|
9369
9369
|
for (let r = 0; r < n; r++) {
|
|
9370
|
-
const o =
|
|
9370
|
+
const o = jo();
|
|
9371
9371
|
t.body.at(-1).body.push(o);
|
|
9372
9372
|
}
|
|
9373
9373
|
}
|
|
@@ -9376,17 +9376,17 @@ var pc = {
|
|
|
9376
9376
|
!t.isRecursive || t.ref === 0 || (t.ref = e.reffedNodesByReferencer.get(t).number);
|
|
9377
9377
|
}
|
|
9378
9378
|
};
|
|
9379
|
-
function
|
|
9379
|
+
function Jo(t) {
|
|
9380
9380
|
Be(t, {
|
|
9381
9381
|
"*"({ node: e, parent: n }) {
|
|
9382
9382
|
e.parent = n;
|
|
9383
9383
|
}
|
|
9384
9384
|
});
|
|
9385
9385
|
}
|
|
9386
|
-
function
|
|
9386
|
+
function yc(t, e) {
|
|
9387
9387
|
return t.dotAll === e.dotAll && t.ignoreCase === e.ignoreCase;
|
|
9388
9388
|
}
|
|
9389
|
-
function
|
|
9389
|
+
function bc(t, e) {
|
|
9390
9390
|
let n = e;
|
|
9391
9391
|
do {
|
|
9392
9392
|
if (n.type === "Regex")
|
|
@@ -9395,27 +9395,27 @@ function yc(t, e) {
|
|
|
9395
9395
|
continue;
|
|
9396
9396
|
if (n === t)
|
|
9397
9397
|
return !1;
|
|
9398
|
-
const r =
|
|
9398
|
+
const r = es(n.parent);
|
|
9399
9399
|
for (const o of r) {
|
|
9400
9400
|
if (o === n)
|
|
9401
9401
|
break;
|
|
9402
|
-
if (o === t ||
|
|
9402
|
+
if (o === t || ns(o, t))
|
|
9403
9403
|
return !0;
|
|
9404
9404
|
}
|
|
9405
9405
|
} while (n = n.parent);
|
|
9406
9406
|
throw new Error("Unexpected path");
|
|
9407
9407
|
}
|
|
9408
|
-
function
|
|
9408
|
+
function Zo(t, e, n, r) {
|
|
9409
9409
|
const o = Array.isArray(t) ? [] : {};
|
|
9410
9410
|
for (const [s, a] of Object.entries(t))
|
|
9411
|
-
s === "parent" ? o.parent = Array.isArray(n) ? r : n : a && typeof a == "object" ? o[s] =
|
|
9411
|
+
s === "parent" ? o.parent = Array.isArray(n) ? r : n : a && typeof a == "object" ? o[s] = Zo(a, e, o, n) : (s === "type" && a === "CapturingGroup" && e.set(o, e.get(t) ?? t), o[s] = a);
|
|
9412
9412
|
return o;
|
|
9413
9413
|
}
|
|
9414
9414
|
function vr(t) {
|
|
9415
|
-
const e =
|
|
9415
|
+
const e = zo(t);
|
|
9416
9416
|
return e.isRecursive = !0, e;
|
|
9417
9417
|
}
|
|
9418
|
-
function
|
|
9418
|
+
function wc(t, e) {
|
|
9419
9419
|
const n = [];
|
|
9420
9420
|
for (; t = t.parent; )
|
|
9421
9421
|
(!e || e(t)) && n.push(t);
|
|
@@ -9427,7 +9427,7 @@ function Bt(t, e) {
|
|
|
9427
9427
|
const n = `$${e.size}_${t.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug, "_")}`;
|
|
9428
9428
|
return e.set(t, n), n;
|
|
9429
9429
|
}
|
|
9430
|
-
function
|
|
9430
|
+
function Qo(t) {
|
|
9431
9431
|
const e = ["dotAll", "ignoreCase"], n = { enable: {}, disable: {} };
|
|
9432
9432
|
return t.forEach(({ flags: r }) => {
|
|
9433
9433
|
e.forEach((o) => {
|
|
@@ -9435,18 +9435,18 @@ function Zo(t) {
|
|
|
9435
9435
|
});
|
|
9436
9436
|
}), Object.keys(n.enable).length || delete n.enable, Object.keys(n.disable).length || delete n.disable, n.enable || n.disable ? n : null;
|
|
9437
9437
|
}
|
|
9438
|
-
function
|
|
9438
|
+
function Cc({ dotAll: t, ignoreCase: e }) {
|
|
9439
9439
|
const n = {};
|
|
9440
9440
|
return (t || e) && (n.enable = {}, t && (n.enable.dotAll = !0), e && (n.enable.ignoreCase = !0)), (!t || !e) && (n.disable = {}, !t && (n.disable.dotAll = !0), !e && (n.disable.ignoreCase = !0)), n;
|
|
9441
9441
|
}
|
|
9442
|
-
function
|
|
9442
|
+
function es(t) {
|
|
9443
9443
|
if (!t)
|
|
9444
9444
|
throw new Error("Node expected");
|
|
9445
9445
|
const { body: e } = t;
|
|
9446
9446
|
return Array.isArray(e) ? e : e ? [e] : null;
|
|
9447
9447
|
}
|
|
9448
|
-
function
|
|
9449
|
-
const e = t.find((n) => n.kind === "search_start" ||
|
|
9448
|
+
function ts(t) {
|
|
9449
|
+
const e = t.find((n) => n.kind === "search_start" || kc(n, { negate: !1 }) || !_c(n));
|
|
9450
9450
|
if (!e)
|
|
9451
9451
|
return null;
|
|
9452
9452
|
if (e.kind === "search_start")
|
|
@@ -9456,7 +9456,7 @@ function es(t) {
|
|
|
9456
9456
|
if (e.type === "CapturingGroup" || e.type === "Group") {
|
|
9457
9457
|
const n = [];
|
|
9458
9458
|
for (const r of e.body) {
|
|
9459
|
-
const o =
|
|
9459
|
+
const o = ts(r.body);
|
|
9460
9460
|
if (!o)
|
|
9461
9461
|
return null;
|
|
9462
9462
|
Array.isArray(o) ? n.push(...o) : n.push(o);
|
|
@@ -9465,17 +9465,17 @@ function es(t) {
|
|
|
9465
9465
|
}
|
|
9466
9466
|
return null;
|
|
9467
9467
|
}
|
|
9468
|
-
function
|
|
9469
|
-
const n =
|
|
9468
|
+
function ns(t, e) {
|
|
9469
|
+
const n = es(t) ?? [];
|
|
9470
9470
|
for (const r of n)
|
|
9471
|
-
if (r === e ||
|
|
9471
|
+
if (r === e || ns(r, e))
|
|
9472
9472
|
return !0;
|
|
9473
9473
|
return !1;
|
|
9474
9474
|
}
|
|
9475
|
-
function
|
|
9475
|
+
function _c({ type: t }) {
|
|
9476
9476
|
return t === "Assertion" || t === "Directive" || t === "LookaroundAssertion";
|
|
9477
9477
|
}
|
|
9478
|
-
function
|
|
9478
|
+
function Sc(t) {
|
|
9479
9479
|
const e = [
|
|
9480
9480
|
"Character",
|
|
9481
9481
|
"CharacterClass",
|
|
@@ -9483,12 +9483,12 @@ function _c(t) {
|
|
|
9483
9483
|
];
|
|
9484
9484
|
return e.includes(t.type) || t.type === "Quantifier" && t.min && e.includes(t.body.type);
|
|
9485
9485
|
}
|
|
9486
|
-
function
|
|
9486
|
+
function kc(t, e) {
|
|
9487
9487
|
const n = {
|
|
9488
9488
|
negate: null,
|
|
9489
9489
|
...e
|
|
9490
9490
|
};
|
|
9491
|
-
return t.type === "LookaroundAssertion" && (n.negate === null || t.negate === n.negate) && t.body.length === 1 &&
|
|
9491
|
+
return t.type === "LookaroundAssertion" && (n.negate === null || t.negate === n.negate) && t.body.length === 1 && Fo(t.body[0], {
|
|
9492
9492
|
type: "Assertion",
|
|
9493
9493
|
kind: "search_start"
|
|
9494
9494
|
});
|
|
@@ -9497,7 +9497,7 @@ function jt(t) {
|
|
|
9497
9497
|
return /^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(t);
|
|
9498
9498
|
}
|
|
9499
9499
|
function oe(t, e) {
|
|
9500
|
-
const r =
|
|
9500
|
+
const r = Bo(t, {
|
|
9501
9501
|
...e,
|
|
9502
9502
|
// Providing a custom set of Unicode property names avoids converting some JS Unicode
|
|
9503
9503
|
// properties (ex: `\p{Alpha}`) to Onig POSIX classes
|
|
@@ -9512,16 +9512,16 @@ function le(t, e) {
|
|
|
9512
9512
|
return t.parent = e, t;
|
|
9513
9513
|
}
|
|
9514
9514
|
function P(t, e) {
|
|
9515
|
-
return
|
|
9515
|
+
return Jo(t), t.parent = e, t;
|
|
9516
9516
|
}
|
|
9517
|
-
function
|
|
9518
|
-
const n =
|
|
9517
|
+
function vc(t, e) {
|
|
9518
|
+
const n = Xo(e), r = un(n.target, "ES2024"), o = un(n.target, "ES2025"), s = n.rules.recursionLimit;
|
|
9519
9519
|
if (!Number.isInteger(s) || s < 2 || s > 20)
|
|
9520
9520
|
throw new Error("Invalid recursionLimit; use 2-20");
|
|
9521
9521
|
let a = null, i = null;
|
|
9522
9522
|
if (!o) {
|
|
9523
9523
|
const d = [t.flags.ignoreCase];
|
|
9524
|
-
Be(t,
|
|
9524
|
+
Be(t, xc, {
|
|
9525
9525
|
getCurrentModI: () => d.at(-1),
|
|
9526
9526
|
popModI() {
|
|
9527
9527
|
d.pop();
|
|
@@ -9561,7 +9561,7 @@ function kc(t, e) {
|
|
|
9561
9561
|
verbose: n.verbose
|
|
9562
9562
|
};
|
|
9563
9563
|
function h(d) {
|
|
9564
|
-
return c.lastNode = u, u = d,
|
|
9564
|
+
return c.lastNode = u, u = d, oc(Ec[d.type], `Unexpected node type "${d.type}"`)(d, c, h);
|
|
9565
9565
|
}
|
|
9566
9566
|
const p = {
|
|
9567
9567
|
pattern: t.body.map(h).join("|"),
|
|
@@ -9573,7 +9573,7 @@ function kc(t, e) {
|
|
|
9573
9573
|
d.hidden && p._hiddenCaptures.push(f), d.transferTo && Ve(p._captureTransfers, d.transferTo, []).push(f);
|
|
9574
9574
|
}), p;
|
|
9575
9575
|
}
|
|
9576
|
-
var
|
|
9576
|
+
var xc = {
|
|
9577
9577
|
"*": {
|
|
9578
9578
|
enter({ node: t }, e) {
|
|
9579
9579
|
if (Er(t)) {
|
|
@@ -9594,12 +9594,12 @@ var vc = {
|
|
|
9594
9594
|
Rn(M(t.value)) && e.setHasCasedChar();
|
|
9595
9595
|
},
|
|
9596
9596
|
CharacterClassRange({ node: t, skip: e }, n) {
|
|
9597
|
-
e(),
|
|
9597
|
+
e(), rs(t, { firstOnly: !0 }).length && n.setHasCasedChar();
|
|
9598
9598
|
},
|
|
9599
9599
|
CharacterSet({ node: t }, e) {
|
|
9600
|
-
t.kind === "property" &&
|
|
9600
|
+
t.kind === "property" && Yo.has(t.value) && e.setHasCasedChar();
|
|
9601
9601
|
}
|
|
9602
|
-
},
|
|
9602
|
+
}, Ec = {
|
|
9603
9603
|
/**
|
|
9604
9604
|
@param {AlternativeNode} node
|
|
9605
9605
|
*/
|
|
@@ -9647,7 +9647,7 @@ var vc = {
|
|
|
9647
9647
|
if (r !== n)
|
|
9648
9648
|
return r;
|
|
9649
9649
|
if (e.useAppliedIgnoreCase && e.currentFlags.ignoreCase && Rn(n)) {
|
|
9650
|
-
const o =
|
|
9650
|
+
const o = Ko(n);
|
|
9651
9651
|
return e.inCharClass ? o.join("") : o.length > 1 ? `[${o.join("")}]` : o[0];
|
|
9652
9652
|
}
|
|
9653
9653
|
return n;
|
|
@@ -9704,8 +9704,8 @@ var vc = {
|
|
|
9704
9704
|
useFlagV: e.useFlagV
|
|
9705
9705
|
}, s = _e(n, o), a = _e(r, o), i = /* @__PURE__ */ new Set();
|
|
9706
9706
|
if (e.useAppliedIgnoreCase && e.currentFlags.ignoreCase) {
|
|
9707
|
-
const l =
|
|
9708
|
-
|
|
9707
|
+
const l = rs(t);
|
|
9708
|
+
Lc(l).forEach((c) => {
|
|
9709
9709
|
i.add(
|
|
9710
9710
|
Array.isArray(c) ? `${_e(c[0], o)}-${_e(c[1], o)}` : _e(c, o)
|
|
9711
9711
|
);
|
|
@@ -9725,7 +9725,7 @@ var vc = {
|
|
|
9725
9725
|
if (t === "digit")
|
|
9726
9726
|
return e ? v`\D` : v`\d`;
|
|
9727
9727
|
if (t === "property") {
|
|
9728
|
-
if (o.useAppliedIgnoreCase && o.currentFlags.ignoreCase &&
|
|
9728
|
+
if (o.useAppliedIgnoreCase && o.currentFlags.ignoreCase && Yo.has(n))
|
|
9729
9729
|
throw new Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);
|
|
9730
9730
|
return `${e ? v`\P` : v`\p`}{${r ? `${r}=` : ""}${n}}`;
|
|
9731
9731
|
}
|
|
@@ -9753,7 +9753,7 @@ var vc = {
|
|
|
9753
9753
|
const a = o.currentFlags;
|
|
9754
9754
|
n && (o.currentFlags = bt(a, n));
|
|
9755
9755
|
const i = e.map(s).join("|"), l = !o.verbose && e.length === 1 && // Single alt
|
|
9756
|
-
r.type !== "Quantifier" && !t && (!o.useFlagMods || !n) ? i : `(?${
|
|
9756
|
+
r.type !== "Quantifier" && !t && (!o.useFlagMods || !n) ? i : `(?${Pc(t, n, o.useFlagMods)}${i})`;
|
|
9757
9757
|
return o.currentFlags = a, l;
|
|
9758
9758
|
},
|
|
9759
9759
|
/**
|
|
@@ -9766,7 +9766,7 @@ var vc = {
|
|
|
9766
9766
|
@param {QuantifierNode} node
|
|
9767
9767
|
*/
|
|
9768
9768
|
Quantifier(t, e, n) {
|
|
9769
|
-
return n(t.body) +
|
|
9769
|
+
return n(t.body) + $c(t);
|
|
9770
9770
|
},
|
|
9771
9771
|
/**
|
|
9772
9772
|
@param {SubroutineNode & {isRecursive: true}} node
|
|
@@ -9777,7 +9777,7 @@ var vc = {
|
|
|
9777
9777
|
const r = n.recursionLimit;
|
|
9778
9778
|
return e === 0 ? `(?R=${r})` : v`\g<${e}&R=${r}>`;
|
|
9779
9779
|
}
|
|
9780
|
-
},
|
|
9780
|
+
}, Ac = /* @__PURE__ */ new Set([
|
|
9781
9781
|
"$",
|
|
9782
9782
|
"(",
|
|
9783
9783
|
")",
|
|
@@ -9792,7 +9792,7 @@ var vc = {
|
|
|
9792
9792
|
"{",
|
|
9793
9793
|
"|",
|
|
9794
9794
|
"}"
|
|
9795
|
-
]),
|
|
9795
|
+
]), Rc = /* @__PURE__ */ new Set([
|
|
9796
9796
|
"-",
|
|
9797
9797
|
"\\",
|
|
9798
9798
|
"]",
|
|
@@ -9800,7 +9800,7 @@ var vc = {
|
|
|
9800
9800
|
// Literal `[` doesn't require escaping with flag u, but this can help work around regex source
|
|
9801
9801
|
// linters and regex syntax processors that expect unescaped `[` to create a nested class
|
|
9802
9802
|
"["
|
|
9803
|
-
]),
|
|
9803
|
+
]), Ic = /* @__PURE__ */ new Set([
|
|
9804
9804
|
"(",
|
|
9805
9805
|
")",
|
|
9806
9806
|
"-",
|
|
@@ -9848,11 +9848,11 @@ var vc = {
|
|
|
9848
9848
|
// paragraph separator
|
|
9849
9849
|
[65279, v`\uFEFF`]
|
|
9850
9850
|
// ZWNBSP/BOM
|
|
9851
|
-
]),
|
|
9851
|
+
]), Nc = /^\p{Cased}$/u;
|
|
9852
9852
|
function Rn(t) {
|
|
9853
|
-
return
|
|
9853
|
+
return Nc.test(t);
|
|
9854
9854
|
}
|
|
9855
|
-
function
|
|
9855
|
+
function rs(t, e) {
|
|
9856
9856
|
const n = !!e?.firstOnly, r = t.min.value, o = t.max.value, s = [];
|
|
9857
9857
|
if (r < 65 && (o === 65535 || o >= 131071) || r === 65536 && o >= 131071)
|
|
9858
9858
|
return s;
|
|
@@ -9860,7 +9860,7 @@ function ns(t, e) {
|
|
|
9860
9860
|
const i = M(a);
|
|
9861
9861
|
if (!Rn(i))
|
|
9862
9862
|
continue;
|
|
9863
|
-
const l =
|
|
9863
|
+
const l = Ko(i).filter((u) => {
|
|
9864
9864
|
const c = u.codePointAt(0);
|
|
9865
9865
|
return c < r || c > o;
|
|
9866
9866
|
});
|
|
@@ -9876,20 +9876,20 @@ function _e(t, { escDigit: e, inCharClass: n, useFlagV: r }) {
|
|
|
9876
9876
|
// Control chars, etc.; condition modeled on the Chrome developer console's display for strings
|
|
9877
9877
|
t < 32 || t > 126 && t < 160 || // Unicode planes 4-16; unassigned, special purpose, and private use area
|
|
9878
9878
|
t > 262143 || // Avoid corrupting a preceding backref by immediately following it with a literal digit
|
|
9879
|
-
e &&
|
|
9879
|
+
e && Tc(t)
|
|
9880
9880
|
)
|
|
9881
9881
|
return t > 255 ? `\\u{${t.toString(16).toUpperCase()}}` : `\\x${t.toString(16).toUpperCase().padStart(2, "0")}`;
|
|
9882
|
-
const o = n ? r ?
|
|
9882
|
+
const o = n ? r ? Ic : Rc : Ac, s = M(t);
|
|
9883
9883
|
return (o.has(s) ? "\\" : "") + s;
|
|
9884
9884
|
}
|
|
9885
|
-
function
|
|
9885
|
+
function Lc(t) {
|
|
9886
9886
|
const e = t.map((o) => o.codePointAt(0)).sort((o, s) => o - s), n = [];
|
|
9887
9887
|
let r = null;
|
|
9888
9888
|
for (let o = 0; o < e.length; o++)
|
|
9889
9889
|
e[o + 1] === e[o] + 1 ? r ??= e[o] : r === null ? n.push(e[o]) : (n.push([r, e[o]]), r = null);
|
|
9890
9890
|
return n;
|
|
9891
9891
|
}
|
|
9892
|
-
function
|
|
9892
|
+
function Pc(t, e, n) {
|
|
9893
9893
|
if (t)
|
|
9894
9894
|
return ">";
|
|
9895
9895
|
let r = "";
|
|
@@ -9899,7 +9899,7 @@ function Lc(t, e, n) {
|
|
|
9899
9899
|
}
|
|
9900
9900
|
return `${r}:`;
|
|
9901
9901
|
}
|
|
9902
|
-
function
|
|
9902
|
+
function $c({ kind: t, max: e, min: n }) {
|
|
9903
9903
|
let r;
|
|
9904
9904
|
return !n && e === 1 ? r = "?" : !n && e === 1 / 0 ? r = "*" : n === 1 && e === 1 / 0 ? r = "+" : n === e ? r = `{${n}}` : r = `{${n},${e === 1 / 0 ? "" : e}}`, r + {
|
|
9905
9905
|
greedy: "",
|
|
@@ -9910,13 +9910,13 @@ function Pc({ kind: t, max: e, min: n }) {
|
|
|
9910
9910
|
function Er({ type: t }) {
|
|
9911
9911
|
return t === "CapturingGroup" || t === "Group" || t === "LookaroundAssertion";
|
|
9912
9912
|
}
|
|
9913
|
-
function
|
|
9913
|
+
function Tc(t) {
|
|
9914
9914
|
return t > 47 && t < 58;
|
|
9915
9915
|
}
|
|
9916
9916
|
function Ar({ type: t, value: e }) {
|
|
9917
9917
|
return t === "Character" && e === 45;
|
|
9918
9918
|
}
|
|
9919
|
-
var
|
|
9919
|
+
var Mc = class cn extends RegExp {
|
|
9920
9920
|
/**
|
|
9921
9921
|
@type {Map<number, {
|
|
9922
9922
|
hidden?: true;
|
|
@@ -9974,7 +9974,7 @@ var Tc = class cn extends RegExp {
|
|
|
9974
9974
|
transfers: [],
|
|
9975
9975
|
...r
|
|
9976
9976
|
};
|
|
9977
|
-
super(o ? "" : e, n), this.#r = e, this.#t =
|
|
9977
|
+
super(o ? "" : e, n), this.#r = e, this.#t = Dc(s.hiddenCaptures, s.transfers), this.#o = s.strategy, this.rawOptions = r ?? {};
|
|
9978
9978
|
}
|
|
9979
9979
|
o || (this.#e = this);
|
|
9980
9980
|
}
|
|
@@ -9993,7 +9993,7 @@ var Tc = class cn extends RegExp {
|
|
|
9993
9993
|
if (this.#o === "clip_search" && n && r) {
|
|
9994
9994
|
this.lastIndex = 0;
|
|
9995
9995
|
const o = this.#s(e.slice(r));
|
|
9996
|
-
return o && (
|
|
9996
|
+
return o && (Oc(o, r, e, this.hasIndices), this.lastIndex += r), o;
|
|
9997
9997
|
}
|
|
9998
9998
|
return this.#s(e);
|
|
9999
9999
|
}
|
|
@@ -10019,7 +10019,7 @@ var Tc = class cn extends RegExp {
|
|
|
10019
10019
|
if (!u)
|
|
10020
10020
|
throw new Error(`Invalid capture transfer to "${u}"`);
|
|
10021
10021
|
if (n[u] = r[a], this.hasIndices && (n.indices[u] = o[a]), n.groups) {
|
|
10022
|
-
this.#n || (this.#n =
|
|
10022
|
+
this.#n || (this.#n = Gc(this.source));
|
|
10023
10023
|
const c = this.#n.get(l);
|
|
10024
10024
|
c && (n.groups[c] = r[a], this.hasIndices && (n.indices.groups[c] = o[a]));
|
|
10025
10025
|
}
|
|
@@ -10028,7 +10028,7 @@ var Tc = class cn extends RegExp {
|
|
|
10028
10028
|
return n;
|
|
10029
10029
|
}
|
|
10030
10030
|
};
|
|
10031
|
-
function
|
|
10031
|
+
function Oc(t, e, n, r) {
|
|
10032
10032
|
if (t.index += e, t.input = n, r) {
|
|
10033
10033
|
const o = t.indices;
|
|
10034
10034
|
for (let a = 0; a < o.length; a++) {
|
|
@@ -10042,7 +10042,7 @@ function Mc(t, e, n, r) {
|
|
|
10042
10042
|
});
|
|
10043
10043
|
}
|
|
10044
10044
|
}
|
|
10045
|
-
function
|
|
10045
|
+
function Dc(t, e) {
|
|
10046
10046
|
const n = /* @__PURE__ */ new Map();
|
|
10047
10047
|
for (const r of t)
|
|
10048
10048
|
n.set(r, {
|
|
@@ -10053,7 +10053,7 @@ function Oc(t, e) {
|
|
|
10053
10053
|
Ve(n, s, {}).transferTo = r;
|
|
10054
10054
|
return n;
|
|
10055
10055
|
}
|
|
10056
|
-
function
|
|
10056
|
+
function Gc(t) {
|
|
10057
10057
|
const e = /(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu, n = /* @__PURE__ */ new Map();
|
|
10058
10058
|
let r = 0, o = 0, s;
|
|
10059
10059
|
for (; s = e.exec(t); ) {
|
|
@@ -10062,12 +10062,12 @@ function Dc(t) {
|
|
|
10062
10062
|
}
|
|
10063
10063
|
return n;
|
|
10064
10064
|
}
|
|
10065
|
-
function Gc(t, e) {
|
|
10066
|
-
const n = Fc(t, e);
|
|
10067
|
-
return n.options ? new Tc(n.pattern, n.flags, n.options) : new RegExp(n.pattern, n.flags);
|
|
10068
|
-
}
|
|
10069
10065
|
function Fc(t, e) {
|
|
10070
|
-
const n =
|
|
10066
|
+
const n = Bc(t, e);
|
|
10067
|
+
return n.options ? new Mc(n.pattern, n.flags, n.options) : new RegExp(n.pattern, n.flags);
|
|
10068
|
+
}
|
|
10069
|
+
function Bc(t, e) {
|
|
10070
|
+
const n = Xo(e), r = Bo(t, {
|
|
10071
10071
|
flags: n.flags,
|
|
10072
10072
|
normalizeUnknownPropertyNames: !0,
|
|
10073
10073
|
rules: {
|
|
@@ -10076,16 +10076,16 @@ function Fc(t, e) {
|
|
|
10076
10076
|
},
|
|
10077
10077
|
skipBackrefValidation: n.rules.allowOrphanBackrefs,
|
|
10078
10078
|
unicodePropertyMap: An
|
|
10079
|
-
}), o =
|
|
10079
|
+
}), o = pc(r, {
|
|
10080
10080
|
accuracy: n.accuracy,
|
|
10081
10081
|
asciiWordBoundaries: n.rules.asciiWordBoundaries,
|
|
10082
10082
|
avoidSubclass: n.avoidSubclass,
|
|
10083
10083
|
bestEffortTarget: n.target
|
|
10084
|
-
}), s =
|
|
10084
|
+
}), s = vc(o, n), a = nc(s.pattern, {
|
|
10085
10085
|
captureTransfers: s._captureTransfers,
|
|
10086
10086
|
hiddenCaptures: s._hiddenCaptures,
|
|
10087
10087
|
mode: "external"
|
|
10088
|
-
}), i =
|
|
10088
|
+
}), i = ec(a.pattern), l = Qu(i.pattern, {
|
|
10089
10089
|
captureTransfers: a.captureTransfers,
|
|
10090
10090
|
hiddenCaptures: a.hiddenCaptures
|
|
10091
10091
|
}), u = {
|
|
@@ -10107,7 +10107,7 @@ function Fc(t, e) {
|
|
|
10107
10107
|
return u;
|
|
10108
10108
|
}
|
|
10109
10109
|
const Rr = 4294967295;
|
|
10110
|
-
class
|
|
10110
|
+
class jc {
|
|
10111
10111
|
constructor(e, n = {}) {
|
|
10112
10112
|
this.patterns = e, this.options = n;
|
|
10113
10113
|
const {
|
|
@@ -10181,8 +10181,8 @@ class Bc {
|
|
|
10181
10181
|
return null;
|
|
10182
10182
|
}
|
|
10183
10183
|
}
|
|
10184
|
-
function
|
|
10185
|
-
return
|
|
10184
|
+
function Uc(t, e) {
|
|
10185
|
+
return Fc(
|
|
10186
10186
|
t,
|
|
10187
10187
|
{
|
|
10188
10188
|
global: !0,
|
|
@@ -10208,7 +10208,7 @@ function jc(t, e) {
|
|
|
10208
10208
|
}
|
|
10209
10209
|
);
|
|
10210
10210
|
}
|
|
10211
|
-
function
|
|
10211
|
+
function zc(t = {}) {
|
|
10212
10212
|
const e = Object.assign(
|
|
10213
10213
|
{
|
|
10214
10214
|
target: "auto",
|
|
@@ -10216,9 +10216,9 @@ function Uc(t = {}) {
|
|
|
10216
10216
|
},
|
|
10217
10217
|
t
|
|
10218
10218
|
);
|
|
10219
|
-
return e.regexConstructor ||= (n) =>
|
|
10219
|
+
return e.regexConstructor ||= (n) => Uc(n, { target: e.target }), {
|
|
10220
10220
|
createScanner(n) {
|
|
10221
|
-
return new
|
|
10221
|
+
return new jc(n, e);
|
|
10222
10222
|
},
|
|
10223
10223
|
createString(n) {
|
|
10224
10224
|
return {
|
|
@@ -10227,8 +10227,8 @@ function Uc(t = {}) {
|
|
|
10227
10227
|
}
|
|
10228
10228
|
};
|
|
10229
10229
|
}
|
|
10230
|
-
const
|
|
10231
|
-
engine:
|
|
10230
|
+
const Hc = "overflow-x-auto scrollbar not-inline", Wc = zc({ forgiving: !0 }), Vc = await ql({
|
|
10231
|
+
engine: Wc,
|
|
10232
10232
|
langAlias: {
|
|
10233
10233
|
markup: "html",
|
|
10234
10234
|
svg: "xml",
|
|
@@ -10248,7 +10248,7 @@ const zc = Uc({ forgiving: !0 }), Hc = await Vl({
|
|
|
10248
10248
|
fallbackLanguage: "text",
|
|
10249
10249
|
inline: "tailing-curly-colon",
|
|
10250
10250
|
addLanguageClass: !0,
|
|
10251
|
-
transformers: [
|
|
10251
|
+
transformers: [eu(), nu()],
|
|
10252
10252
|
parseMetaString: (t) => {
|
|
10253
10253
|
const e = t.matchAll(
|
|
10254
10254
|
/([a-z0-9]+)(?:=(["'])(.*?)\2|=(.*?)(?:\s|$)|(?:\s|$))/gi
|
|
@@ -10260,66 +10260,77 @@ const zc = Uc({ forgiving: !0 }), Hc = await Vl({
|
|
|
10260
10260
|
})
|
|
10261
10261
|
);
|
|
10262
10262
|
}
|
|
10263
|
-
},
|
|
10264
|
-
|
|
10263
|
+
}, qc = () => (t) => {
|
|
10264
|
+
Xr(t, "element", (e, n, r) => {
|
|
10265
10265
|
if (e.tagName !== "code") return;
|
|
10266
10266
|
const o = r?.type === "element" && r.tagName === "pre";
|
|
10267
10267
|
e.properties.inline = JSON.stringify(!o), o && (e.properties = {
|
|
10268
10268
|
...e.properties,
|
|
10269
10269
|
...structuredClone(r.properties),
|
|
10270
|
-
class:
|
|
10270
|
+
class: Ir(e.properties.class, r.properties.class)
|
|
10271
10271
|
}, r.properties = {});
|
|
10272
10272
|
});
|
|
10273
|
-
},
|
|
10273
|
+
}, ph = (t = wt.themes, e = Vc) => [
|
|
10274
10274
|
[
|
|
10275
|
-
|
|
10275
|
+
Zl,
|
|
10276
10276
|
e,
|
|
10277
10277
|
{ ...wt, themes: t }
|
|
10278
10278
|
],
|
|
10279
|
-
|
|
10280
|
-
],
|
|
10279
|
+
qc
|
|
10280
|
+
], Xc = (t, e, n = "text", r = wt.themes) => {
|
|
10281
10281
|
const o = t.codeToHast(e, {
|
|
10282
10282
|
lang: n,
|
|
10283
10283
|
...wt,
|
|
10284
10284
|
themes: r
|
|
10285
10285
|
});
|
|
10286
|
-
return
|
|
10287
|
-
|
|
10286
|
+
return Gs(o, {
|
|
10287
|
+
Fragment: ss,
|
|
10288
|
+
jsx: at.jsx,
|
|
10289
|
+
jsxs: at.jsxs,
|
|
10290
|
+
components: {
|
|
10291
|
+
code: (s) => os("code", {
|
|
10292
|
+
...s,
|
|
10293
|
+
className: Ir(s.className, Hc)
|
|
10294
|
+
})
|
|
10295
|
+
}
|
|
10296
|
+
});
|
|
10297
|
+
}, Kc = as(
|
|
10288
10298
|
({ code: t, children: e, embedded: n, ...r }) => {
|
|
10289
|
-
const { syntaxHighlighting: o } =
|
|
10290
|
-
|
|
10291
|
-
const s =
|
|
10299
|
+
const { syntaxHighlighting: o } = is().options;
|
|
10300
|
+
us(o?.highlighter, "Highlighter not found");
|
|
10301
|
+
const s = Xc(
|
|
10292
10302
|
o.highlighter,
|
|
10293
10303
|
t ?? e,
|
|
10294
10304
|
r.language,
|
|
10295
10305
|
o.themes
|
|
10296
10306
|
);
|
|
10297
|
-
return n ? /* @__PURE__ */ at.jsx(
|
|
10307
|
+
return n ? /* @__PURE__ */ at.jsx(hs, { ...r, children: s }) : /* @__PURE__ */ at.jsx(cs, { ...r, children: s });
|
|
10298
10308
|
}
|
|
10299
10309
|
);
|
|
10300
|
-
|
|
10310
|
+
Kc.displayName = "SyntaxHighlight";
|
|
10301
10311
|
export {
|
|
10302
10312
|
Fn as E,
|
|
10303
|
-
|
|
10313
|
+
Hc as H,
|
|
10314
|
+
Kc as S,
|
|
10304
10315
|
H as V,
|
|
10305
|
-
|
|
10306
|
-
|
|
10307
|
-
|
|
10308
|
-
|
|
10309
|
-
|
|
10310
|
-
|
|
10311
|
-
|
|
10312
|
-
|
|
10313
|
-
|
|
10314
|
-
|
|
10315
|
-
|
|
10316
|
-
|
|
10317
|
-
|
|
10318
|
-
|
|
10319
|
-
|
|
10320
|
-
|
|
10321
|
-
|
|
10322
|
-
|
|
10323
|
-
|
|
10316
|
+
Ps as a,
|
|
10317
|
+
ch as b,
|
|
10318
|
+
uh as c,
|
|
10319
|
+
sh as d,
|
|
10320
|
+
Nr as e,
|
|
10321
|
+
Fr as f,
|
|
10322
|
+
Vr as g,
|
|
10323
|
+
ca as h,
|
|
10324
|
+
ia as i,
|
|
10325
|
+
jn as j,
|
|
10326
|
+
ph as k,
|
|
10327
|
+
Xc as l,
|
|
10328
|
+
rh as o,
|
|
10329
|
+
Br as p,
|
|
10330
|
+
$s as s,
|
|
10331
|
+
Gs as t,
|
|
10332
|
+
oh as u,
|
|
10333
|
+
Xr as v,
|
|
10334
|
+
ua as z
|
|
10324
10335
|
};
|
|
10325
|
-
//# sourceMappingURL=SyntaxHighlight-
|
|
10336
|
+
//# sourceMappingURL=SyntaxHighlight-zvlnSnHB.js.map
|