zudoku 0.65.3 → 0.66.0
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/dist/app/sentry.js +1 -1
- package/dist/config/validators/BuildSchema.js +18 -3
- package/dist/config/validators/BuildSchema.js.map +1 -1
- package/dist/config/validators/validate.d.ts +45 -3
- package/dist/config/validators/validate.js +7 -1
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/flat-config.d.ts +9 -2
- package/dist/lib/components/Mermaid.d.ts +7 -0
- package/dist/lib/components/Mermaid.js +42 -0
- package/dist/lib/components/Mermaid.js.map +1 -0
- package/dist/lib/components/PagefindSearchMeta.d.ts +8 -0
- package/dist/lib/components/PagefindSearchMeta.js +7 -0
- package/dist/lib/components/PagefindSearchMeta.js.map +1 -0
- package/dist/lib/components/Zudoku.js +2 -5
- package/dist/lib/components/Zudoku.js.map +1 -1
- package/dist/lib/core/RouteGuard.js +1 -1
- package/dist/lib/core/RouteGuard.js.map +1 -1
- package/dist/lib/core/plugins.d.ts +3 -3
- package/dist/lib/oas/parser/index.d.ts +1 -0
- package/dist/lib/oas/parser/index.js.map +1 -1
- package/dist/lib/plugins/openapi/DownloadSchemaButton.d.ts +3 -0
- package/dist/lib/plugins/openapi/DownloadSchemaButton.js +47 -0
- package/dist/lib/plugins/openapi/DownloadSchemaButton.js.map +1 -0
- package/dist/lib/plugins/openapi/Endpoint.js +3 -6
- package/dist/lib/plugins/openapi/Endpoint.js.map +1 -1
- package/dist/lib/plugins/openapi/OasProvider.js +22 -13
- package/dist/lib/plugins/openapi/OasProvider.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationList.js +12 -6
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.js +2 -2
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/SchemaList.js +2 -1
- package/dist/lib/plugins/openapi/SchemaList.js.map +1 -1
- package/dist/lib/plugins/openapi/index.js +11 -5
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/openapi/interfaces.d.ts +16 -13
- package/dist/lib/plugins/openapi/playground/Playground.js +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaView.d.ts +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaView.js +14 -6
- package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/utils.d.ts +2 -2
- package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
- package/dist/lib/plugins/openapi/util/getRoutes.d.ts +6 -1
- package/dist/lib/plugins/openapi/util/getRoutes.js +29 -2
- package/dist/lib/plugins/openapi/util/getRoutes.js.map +1 -1
- package/dist/lib/plugins/search-pagefind/IndexingDialog.d.ts +3 -0
- package/dist/lib/plugins/search-pagefind/IndexingDialog.js +64 -0
- package/dist/lib/plugins/search-pagefind/IndexingDialog.js.map +1 -0
- package/dist/lib/plugins/search-pagefind/PagefindSearch.js +22 -5
- package/dist/lib/plugins/search-pagefind/PagefindSearch.js.map +1 -1
- package/dist/lib/plugins/search-pagefind/ResultList.js +5 -4
- package/dist/lib/plugins/search-pagefind/ResultList.js.map +1 -1
- package/dist/lib/shiki.d.ts +1 -1
- package/dist/lib/shiki.js +18 -12
- package/dist/lib/shiki.js.map +1 -1
- package/dist/lib/ui/Button.d.ts +2 -2
- package/dist/lib/ui/Button.js +9 -8
- package/dist/lib/ui/Button.js.map +1 -1
- package/dist/lib/ui/ButtonGroup.d.ts +11 -0
- package/dist/lib/ui/ButtonGroup.js +28 -0
- package/dist/lib/ui/ButtonGroup.js.map +1 -0
- package/dist/lib/ui/Command.js +2 -2
- package/dist/lib/ui/Command.js.map +1 -1
- package/dist/lib/ui/DropdownMenu.d.ts +21 -23
- package/dist/lib/ui/DropdownMenu.js +47 -32
- package/dist/lib/ui/DropdownMenu.js.map +1 -1
- package/dist/lib/ui/Kbd.d.ts +3 -0
- package/dist/lib/ui/Kbd.js +10 -0
- package/dist/lib/ui/Kbd.js.map +1 -0
- package/dist/lib/util/MdxComponents.d.ts +1 -0
- package/dist/lib/util/MdxComponents.js +2 -0
- package/dist/lib/util/MdxComponents.js.map +1 -1
- package/dist/lib/util/flattenAllOf.js +27 -4
- package/dist/lib/util/flattenAllOf.js.map +1 -1
- package/dist/lib/util/flattenAllOf.test.js +67 -12
- package/dist/lib/util/flattenAllOf.test.js.map +1 -1
- package/dist/vite/api/SchemaManager.d.ts +5 -0
- package/dist/vite/api/SchemaManager.js +24 -0
- package/dist/vite/api/SchemaManager.js.map +1 -1
- package/dist/vite/api/SchemaManager.test.js +67 -0
- package/dist/vite/api/SchemaManager.test.js.map +1 -1
- package/dist/vite/config.js +8 -2
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/dev-server.js +25 -0
- package/dist/vite/dev-server.js.map +1 -1
- package/dist/vite/pagefind-dev-index.d.ts +16 -0
- package/dist/vite/pagefind-dev-index.js +68 -0
- package/dist/vite/pagefind-dev-index.js.map +1 -0
- package/dist/vite/plugin-api.js +41 -3
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/prerender/prerender.js +1 -19
- package/dist/vite/prerender/prerender.js.map +1 -1
- package/dist/vite/prerender/utils.d.ts +2 -0
- package/dist/vite/prerender/utils.js +24 -0
- package/dist/vite/prerender/utils.js.map +1 -0
- package/lib/Button-CynVW1JV.js +53 -0
- package/lib/Button-CynVW1JV.js.map +1 -0
- package/lib/ClaudeLogo-PxFjou9w.js +69 -0
- package/lib/ClaudeLogo-PxFjou9w.js.map +1 -0
- package/lib/{Command-CUcrW3qs.js → Command-BpT1iBE6.js} +25 -25
- package/lib/Command-BpT1iBE6.js.map +1 -0
- package/lib/Drawer-Ci7XwhqT.js.map +1 -1
- package/lib/DropdownMenu-C8SX_-S_.js +104 -0
- package/lib/DropdownMenu-C8SX_-S_.js.map +1 -0
- package/lib/{ErrorAlert-D5LKLFOd.js → ErrorAlert-BqjbNHIn.js} +1017 -1015
- package/lib/{ErrorAlert-D5LKLFOd.js.map → ErrorAlert-BqjbNHIn.js.map} +1 -1
- package/lib/IndexingDialog-B5zCiUKr.js +100 -0
- package/lib/IndexingDialog-B5zCiUKr.js.map +1 -0
- package/lib/MdxPage-CVFatbHw.js +210 -0
- package/lib/MdxPage-CVFatbHw.js.map +1 -0
- package/lib/Mermaid-CIFixY6C.js +102 -0
- package/lib/Mermaid-CIFixY6C.js.map +1 -0
- package/lib/{OAuthErrorPage-oXnxcJg4.js → OAuthErrorPage-Dup79DJk.js} +7 -7
- package/lib/{OAuthErrorPage-oXnxcJg4.js.map → OAuthErrorPage-Dup79DJk.js.map} +1 -1
- package/lib/OasProvider-BJeMq29o.js +40 -0
- package/lib/OasProvider-BJeMq29o.js.map +1 -0
- package/lib/{OperationList-CmMoKpGu.js → OperationList-ff3ZvQsO.js} +1701 -1585
- package/lib/OperationList-ff3ZvQsO.js.map +1 -0
- package/lib/{RouteGuard-Brz95MSt.js → RouteGuard-BXy13JSz.js} +19 -19
- package/lib/{RouteGuard-Brz95MSt.js.map → RouteGuard-BXy13JSz.js.map} +1 -1
- package/lib/{RouterError-VGZB_wg4.js → RouterError-CKOZTsDD.js} +3 -3
- package/lib/{RouterError-VGZB_wg4.js.map → RouterError-CKOZTsDD.js.map} +1 -1
- package/lib/{SchemaList-BykD27ga.js → SchemaList-BSC1KM3v.js} +28 -27
- package/lib/SchemaList-BSC1KM3v.js.map +1 -0
- package/lib/{SchemaView-Dt6hbCAt.js → SchemaView-CgwJ9gtb.js} +198 -187
- package/lib/SchemaView-CgwJ9gtb.js.map +1 -0
- package/lib/Select-VmDZ-nKe.js +337 -0
- package/lib/Select-VmDZ-nKe.js.map +1 -0
- package/lib/{SignUp-D2mmQOkg.js → SignUp-Pm_LGm6T.js} +13 -13
- package/lib/{SignUp-D2mmQOkg.js.map → SignUp-Pm_LGm6T.js.map} +1 -1
- package/lib/{SyntaxHighlight-C19vH0V_.js → SyntaxHighlight-bkmst3oV.js} +654 -622
- package/lib/SyntaxHighlight-bkmst3oV.js.map +1 -0
- package/lib/{Toc-CBWfFCVf.js → Toc-TUXNFbKl.js} +2 -2
- package/lib/{Toc-CBWfFCVf.js.map → Toc-TUXNFbKl.js.map} +1 -1
- package/lib/{ZudokuContext-BUZ5hkWB.js → ZudokuContext-np1wheDl.js} +8 -8
- package/lib/{ZudokuContext-BUZ5hkWB.js.map → ZudokuContext-np1wheDl.js.map} +1 -1
- package/lib/___vite-browser-external_commonjs-proxy-Cga3HsWk.js +9 -0
- package/lib/___vite-browser-external_commonjs-proxy-Cga3HsWk.js.map +1 -0
- package/lib/{chunk-PVWAREVJ-BMhpCH5D.js → chunk-PVWAREVJ-dLIqswPy.js} +5 -5
- package/lib/{chunk-PVWAREVJ-BMhpCH5D.js.map → chunk-PVWAREVJ-dLIqswPy.js.map} +1 -1
- package/lib/{circular-CNHs4gAz.js → circular-XPj_dwqA.js} +2 -2
- package/lib/{circular-CNHs4gAz.js.map → circular-XPj_dwqA.js.map} +1 -1
- package/lib/createServer-D01nCTNp.js +16693 -0
- package/lib/createServer-D01nCTNp.js.map +1 -0
- package/lib/{errors-D7xzOd8X.js → errors-B0hNTPFO.js} +3 -3
- package/lib/{errors-D7xzOd8X.js.map → errors-B0hNTPFO.js.map} +1 -1
- package/lib/{hook-CMeoxziF.js → hook-CvSwcbk6.js} +3 -3
- package/lib/{hook-CMeoxziF.js.map → hook-CvSwcbk6.js.map} +1 -1
- package/lib/{index-unv8c40u.js → index-Bjc_QsUR.js} +754 -738
- package/lib/{index-unv8c40u.js.map → index-Bjc_QsUR.js.map} +1 -1
- package/lib/index-CrcNWbel.js.map +1 -1
- package/lib/index-DnMgJWrI.js +133 -0
- package/lib/index-DnMgJWrI.js.map +1 -0
- package/lib/{index-CF7_erXq.js → index-DscsS121.js} +2 -2
- package/lib/{index-CF7_erXq.js.map → index-DscsS121.js.map} +1 -1
- package/lib/{index-CPws05Tb.js → index-mfkNWYG-.js} +10 -10
- package/lib/{index-CPws05Tb.js.map → index-mfkNWYG-.js.map} +1 -1
- package/lib/{index.esm-BnYHxCYC.js → index.esm-DtzT_KoE.js} +20 -20
- package/lib/{index.esm-BnYHxCYC.js.map → index.esm-DtzT_KoE.js.map} +1 -1
- package/lib/{invariant-Bm-FVUQE.js → invariant-CGOLuIIz.js} +3 -3
- package/lib/{invariant-Bm-FVUQE.js.map → invariant-CGOLuIIz.js.map} +1 -1
- package/lib/{mutation-BSU0xu4m.js → mutation-BlmnL5qL.js} +2 -2
- package/lib/{mutation-BSU0xu4m.js.map → mutation-BlmnL5qL.js.map} +1 -1
- package/lib/ui/ActionButton.js +1 -1
- package/lib/ui/Button.js +25 -24
- package/lib/ui/Button.js.map +1 -1
- package/lib/ui/ButtonGroup.js +77 -0
- package/lib/ui/ButtonGroup.js.map +1 -0
- package/lib/ui/Command.js +3 -3
- package/lib/ui/Command.js.map +1 -1
- package/lib/ui/DropdownMenu.js +227 -140
- package/lib/ui/DropdownMenu.js.map +1 -1
- package/lib/ui/Kbd.js +32 -0
- package/lib/ui/Kbd.js.map +1 -0
- package/lib/ui/SyntaxHighlight.js +3 -3
- package/lib/zudoku.__internal.js +8 -8
- package/lib/zudoku.auth-auth0.js +1 -1
- package/lib/zudoku.auth-azureb2c.js +4 -4
- package/lib/zudoku.auth-clerk.js +2 -2
- package/lib/zudoku.auth-openid.js +5 -5
- package/lib/zudoku.auth-supabase.js +5 -5
- package/lib/zudoku.components.js +7 -7
- package/lib/zudoku.hooks.js +11 -24
- package/lib/zudoku.hooks.js.map +1 -1
- package/lib/zudoku.mermaid.js +10 -0
- package/lib/zudoku.mermaid.js.map +1 -0
- package/lib/zudoku.plugin-api-catalog.js +6 -6
- package/lib/zudoku.plugin-api-keys.js +223 -198
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- 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 +184 -226
- package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
- package/lib/zudoku.plugins.js.map +1 -1
- package/lib/zudoku.router.js +2 -2
- package/package.json +29 -21
- package/src/app/sentry.ts +1 -1
- package/src/lib/components/Mermaid.tsx +68 -0
- package/src/lib/components/PagefindSearchMeta.tsx +14 -0
- package/src/lib/components/Zudoku.tsx +4 -7
- package/src/lib/core/RouteGuard.tsx +1 -1
- package/src/lib/core/plugins.ts +2 -2
- package/src/lib/oas/parser/index.ts +2 -0
- package/src/lib/plugins/openapi/DownloadSchemaButton.tsx +115 -0
- package/src/lib/plugins/openapi/Endpoint.tsx +20 -27
- package/src/lib/plugins/openapi/OasProvider.tsx +30 -17
- package/src/lib/plugins/openapi/OperationList.tsx +39 -21
- package/src/lib/plugins/openapi/OperationListItem.tsx +5 -5
- package/src/lib/plugins/openapi/SchemaList.tsx +4 -0
- package/src/lib/plugins/openapi/index.tsx +16 -7
- package/src/lib/plugins/openapi/interfaces.ts +16 -7
- package/src/lib/plugins/openapi/playground/Playground.tsx +1 -1
- package/src/lib/plugins/openapi/schema/SchemaView.tsx +36 -27
- package/src/lib/plugins/openapi/schema/utils.ts +5 -2
- package/src/lib/plugins/openapi/util/getRoutes.tsx +35 -3
- package/src/lib/plugins/search-pagefind/IndexingDialog.tsx +163 -0
- package/src/lib/plugins/search-pagefind/PagefindSearch.tsx +61 -22
- package/src/lib/plugins/search-pagefind/ResultList.tsx +8 -3
- package/src/lib/shiki.ts +21 -12
- package/src/lib/ui/Button.tsx +10 -10
- package/src/lib/ui/ButtonGroup.tsx +82 -0
- package/src/lib/ui/Command.tsx +3 -3
- package/src/lib/ui/DropdownMenu.tsx +226 -170
- package/src/lib/ui/Kbd.tsx +28 -0
- package/src/lib/util/MdxComponents.tsx +2 -0
- package/src/lib/util/flattenAllOf.test.ts +71 -19
- package/src/lib/util/flattenAllOf.ts +29 -8
- package/src/shiki/langs/markdown-nix.js +1 -0
- package/src/shiki/langs/openscad.js +1 -0
- package/dist/vite/create-pagefind-index.d.ts +0 -4
- package/dist/vite/create-pagefind-index.js +0 -12
- package/dist/vite/create-pagefind-index.js.map +0 -1
- package/lib/Button-B3ucvvQw.js +0 -52
- package/lib/Button-B3ucvvQw.js.map +0 -1
- package/lib/Command-CUcrW3qs.js.map +0 -1
- package/lib/DropdownMenu-BZ2NKQ3K.js +0 -126
- package/lib/DropdownMenu-BZ2NKQ3K.js.map +0 -1
- package/lib/MdxPage-hOCN-u-L.js +0 -240
- package/lib/MdxPage-hOCN-u-L.js.map +0 -1
- package/lib/OasProvider-CpniNNrW.js +0 -36
- package/lib/OasProvider-CpniNNrW.js.map +0 -1
- package/lib/OperationList-CmMoKpGu.js.map +0 -1
- package/lib/Pagination-lLSoHnxa.js +0 -37
- package/lib/Pagination-lLSoHnxa.js.map +0 -1
- package/lib/SchemaList-BykD27ga.js.map +0 -1
- package/lib/SchemaView-Dt6hbCAt.js.map +0 -1
- package/lib/Select-DFRCS31-.js +0 -399
- package/lib/Select-DFRCS31-.js.map +0 -1
- package/lib/SyntaxHighlight-C19vH0V_.js.map +0 -1
- package/lib/createServer-BmcVQAOQ.js +0 -13018
- package/lib/createServer-BmcVQAOQ.js.map +0 -1
- package/lib/useExposedProps-U3pmsHaG.js +0 -113
- package/lib/useExposedProps-U3pmsHaG.js.map +0 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { j as at } from "./jsx-runtime-BzflLqGi.js";
|
|
2
2
|
import { createElement as os, Fragment as ss, memo as as } from "react";
|
|
3
|
-
import { a as is } from "./ZudokuContext-
|
|
3
|
+
import { a as is } from "./ZudokuContext-np1wheDl.js";
|
|
4
4
|
import { c as Ir } from "./cn-dYga0KKN.js";
|
|
5
|
-
import {
|
|
5
|
+
import { a as ls, i as us } from "./invariant-CGOLuIIz.js";
|
|
6
6
|
import { CodeBlock as cs } from "./ui/CodeBlock.js";
|
|
7
7
|
import { EmbeddedCodeBlock as hs } from "./ui/EmbeddedCodeBlock.js";
|
|
8
|
-
function oh() {
|
|
9
|
-
}
|
|
10
8
|
function sh() {
|
|
11
9
|
}
|
|
12
|
-
function ah(
|
|
10
|
+
function ah() {
|
|
11
|
+
}
|
|
12
|
+
function ih(t) {
|
|
13
13
|
const e = [], n = String(t || "");
|
|
14
14
|
let r = n.indexOf(","), o = 0, s = !1;
|
|
15
15
|
for (; !s; ) {
|
|
@@ -25,12 +25,12 @@ function Nr(t, e) {
|
|
|
25
25
|
(n.padRight ? " " : "") + "," + (n.padLeft === !1 ? "" : " ")
|
|
26
26
|
).trim();
|
|
27
27
|
}
|
|
28
|
-
const
|
|
28
|
+
const ps = /^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u, fs = /^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u, ds = {};
|
|
29
29
|
function In(t, e) {
|
|
30
|
-
return (ds.jsx ?
|
|
30
|
+
return (ds.jsx ? fs : ps).test(t);
|
|
31
31
|
}
|
|
32
32
|
const gs = /[ \t\n\f\r]/g;
|
|
33
|
-
function
|
|
33
|
+
function wt(t) {
|
|
34
34
|
return typeof t == "object" ? t.type === "text" ? Nn(t.value) : !1 : Nn(t);
|
|
35
35
|
}
|
|
36
36
|
function Nn(t) {
|
|
@@ -89,7 +89,7 @@ W.prototype.property = "";
|
|
|
89
89
|
W.prototype.spaceSeparated = !1;
|
|
90
90
|
W.prototype.space = void 0;
|
|
91
91
|
let ms = 0;
|
|
92
|
-
const x = ye(), $ = ye(), Pr = ye(),
|
|
92
|
+
const x = ye(), $ = ye(), Pr = ye(), C = ye(), I = ye(), xe = ye(), q = ye();
|
|
93
93
|
function ye() {
|
|
94
94
|
return 2 ** ++ms;
|
|
95
95
|
}
|
|
@@ -99,7 +99,7 @@ const Ht = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
99
99
|
booleanish: $,
|
|
100
100
|
commaOrSpaceSeparated: q,
|
|
101
101
|
commaSeparated: xe,
|
|
102
|
-
number:
|
|
102
|
+
number: C,
|
|
103
103
|
overloadedBoolean: Pr,
|
|
104
104
|
spaceSeparated: I
|
|
105
105
|
}, Symbol.toStringTag, { value: "Module" })), At = (
|
|
@@ -153,9 +153,9 @@ const $r = Ie({
|
|
|
153
153
|
ariaAutoComplete: null,
|
|
154
154
|
ariaBusy: $,
|
|
155
155
|
ariaChecked: $,
|
|
156
|
-
ariaColCount:
|
|
157
|
-
ariaColIndex:
|
|
158
|
-
ariaColSpan:
|
|
156
|
+
ariaColCount: C,
|
|
157
|
+
ariaColIndex: C,
|
|
158
|
+
ariaColSpan: C,
|
|
159
159
|
ariaControls: I,
|
|
160
160
|
ariaCurrent: null,
|
|
161
161
|
ariaDescribedBy: I,
|
|
@@ -172,7 +172,7 @@ const $r = Ie({
|
|
|
172
172
|
ariaKeyShortcuts: null,
|
|
173
173
|
ariaLabel: null,
|
|
174
174
|
ariaLabelledBy: I,
|
|
175
|
-
ariaLevel:
|
|
175
|
+
ariaLevel: C,
|
|
176
176
|
ariaLive: null,
|
|
177
177
|
ariaModal: $,
|
|
178
178
|
ariaMultiLine: $,
|
|
@@ -180,21 +180,21 @@ const $r = Ie({
|
|
|
180
180
|
ariaOrientation: null,
|
|
181
181
|
ariaOwns: I,
|
|
182
182
|
ariaPlaceholder: null,
|
|
183
|
-
ariaPosInSet:
|
|
183
|
+
ariaPosInSet: C,
|
|
184
184
|
ariaPressed: $,
|
|
185
185
|
ariaReadOnly: $,
|
|
186
186
|
ariaRelevant: null,
|
|
187
187
|
ariaRequired: $,
|
|
188
188
|
ariaRoleDescription: I,
|
|
189
|
-
ariaRowCount:
|
|
190
|
-
ariaRowIndex:
|
|
191
|
-
ariaRowSpan:
|
|
189
|
+
ariaRowCount: C,
|
|
190
|
+
ariaRowIndex: C,
|
|
191
|
+
ariaRowSpan: C,
|
|
192
192
|
ariaSelected: $,
|
|
193
|
-
ariaSetSize:
|
|
193
|
+
ariaSetSize: C,
|
|
194
194
|
ariaSort: null,
|
|
195
|
-
ariaValueMax:
|
|
196
|
-
ariaValueMin:
|
|
197
|
-
ariaValueNow:
|
|
195
|
+
ariaValueMax: C,
|
|
196
|
+
ariaValueMin: C,
|
|
197
|
+
ariaValueNow: C,
|
|
198
198
|
ariaValueText: null,
|
|
199
199
|
role: null
|
|
200
200
|
},
|
|
@@ -240,13 +240,13 @@ const ys = Ie({
|
|
|
240
240
|
checked: x,
|
|
241
241
|
cite: null,
|
|
242
242
|
className: I,
|
|
243
|
-
cols:
|
|
243
|
+
cols: C,
|
|
244
244
|
colSpan: null,
|
|
245
245
|
content: null,
|
|
246
246
|
contentEditable: $,
|
|
247
247
|
controls: x,
|
|
248
248
|
controlsList: I,
|
|
249
|
-
coords:
|
|
249
|
+
coords: C | xe,
|
|
250
250
|
crossOrigin: null,
|
|
251
251
|
data: null,
|
|
252
252
|
dateTime: null,
|
|
@@ -268,9 +268,9 @@ const ys = Ie({
|
|
|
268
268
|
formNoValidate: x,
|
|
269
269
|
formTarget: null,
|
|
270
270
|
headers: I,
|
|
271
|
-
height:
|
|
271
|
+
height: C,
|
|
272
272
|
hidden: x,
|
|
273
|
-
high:
|
|
273
|
+
high: C,
|
|
274
274
|
href: null,
|
|
275
275
|
hrefLang: null,
|
|
276
276
|
htmlFor: I,
|
|
@@ -295,14 +295,14 @@ const ys = Ie({
|
|
|
295
295
|
list: null,
|
|
296
296
|
loading: null,
|
|
297
297
|
loop: x,
|
|
298
|
-
low:
|
|
298
|
+
low: C,
|
|
299
299
|
manifest: null,
|
|
300
300
|
max: null,
|
|
301
|
-
maxLength:
|
|
301
|
+
maxLength: C,
|
|
302
302
|
media: null,
|
|
303
303
|
method: null,
|
|
304
304
|
min: null,
|
|
305
|
-
minLength:
|
|
305
|
+
minLength: C,
|
|
306
306
|
multiple: x,
|
|
307
307
|
muted: x,
|
|
308
308
|
name: null,
|
|
@@ -398,7 +398,7 @@ const ys = Ie({
|
|
|
398
398
|
onWaiting: null,
|
|
399
399
|
onWheel: null,
|
|
400
400
|
open: x,
|
|
401
|
-
optimum:
|
|
401
|
+
optimum: C,
|
|
402
402
|
pattern: null,
|
|
403
403
|
ping: I,
|
|
404
404
|
placeholder: null,
|
|
@@ -413,8 +413,8 @@ const ys = Ie({
|
|
|
413
413
|
rel: I,
|
|
414
414
|
required: x,
|
|
415
415
|
reversed: x,
|
|
416
|
-
rows:
|
|
417
|
-
rowSpan:
|
|
416
|
+
rows: C,
|
|
417
|
+
rowSpan: C,
|
|
418
418
|
sandbox: I,
|
|
419
419
|
scope: null,
|
|
420
420
|
scoped: x,
|
|
@@ -424,19 +424,19 @@ const ys = Ie({
|
|
|
424
424
|
shadowRootDelegatesFocus: x,
|
|
425
425
|
shadowRootMode: null,
|
|
426
426
|
shape: null,
|
|
427
|
-
size:
|
|
427
|
+
size: C,
|
|
428
428
|
sizes: null,
|
|
429
429
|
slot: null,
|
|
430
|
-
span:
|
|
430
|
+
span: C,
|
|
431
431
|
spellCheck: $,
|
|
432
432
|
src: null,
|
|
433
433
|
srcDoc: null,
|
|
434
434
|
srcLang: null,
|
|
435
435
|
srcSet: null,
|
|
436
|
-
start:
|
|
436
|
+
start: C,
|
|
437
437
|
step: null,
|
|
438
438
|
style: null,
|
|
439
|
-
tabIndex:
|
|
439
|
+
tabIndex: C,
|
|
440
440
|
target: null,
|
|
441
441
|
title: null,
|
|
442
442
|
translate: null,
|
|
@@ -444,7 +444,7 @@ const ys = Ie({
|
|
|
444
444
|
typeMustMatch: x,
|
|
445
445
|
useMap: null,
|
|
446
446
|
value: $,
|
|
447
|
-
width:
|
|
447
|
+
width: C,
|
|
448
448
|
wrap: null,
|
|
449
449
|
writingSuggestions: null,
|
|
450
450
|
// Legacy.
|
|
@@ -461,11 +461,11 @@ const ys = Ie({
|
|
|
461
461
|
// `<body>`. Use CSS `background-image` instead
|
|
462
462
|
bgColor: null,
|
|
463
463
|
// `<body>` and table elements. Use CSS `background-color` instead
|
|
464
|
-
border:
|
|
464
|
+
border: C,
|
|
465
465
|
// `<table>`. Use CSS `border-width` instead,
|
|
466
466
|
borderColor: null,
|
|
467
467
|
// `<table>`. Use CSS `border-color` instead,
|
|
468
|
-
bottomMargin:
|
|
468
|
+
bottomMargin: C,
|
|
469
469
|
// `<body>`
|
|
470
470
|
cellPadding: null,
|
|
471
471
|
// `<table>`
|
|
@@ -499,9 +499,9 @@ const ys = Ie({
|
|
|
499
499
|
// `<table>`
|
|
500
500
|
frameBorder: null,
|
|
501
501
|
// `<iframe>`. Use CSS `border` instead
|
|
502
|
-
hSpace:
|
|
502
|
+
hSpace: C,
|
|
503
503
|
// `<img>` and `<object>`
|
|
504
|
-
leftMargin:
|
|
504
|
+
leftMargin: C,
|
|
505
505
|
// `<body>`
|
|
506
506
|
link: null,
|
|
507
507
|
// `<body>`. Use CSS `a:link {color: *}` instead
|
|
@@ -509,9 +509,9 @@ const ys = Ie({
|
|
|
509
509
|
// `<frame>`, `<iframe>`, and `<img>`. Use an `<a>`
|
|
510
510
|
lowSrc: null,
|
|
511
511
|
// `<img>`. Use a `<picture>`
|
|
512
|
-
marginHeight:
|
|
512
|
+
marginHeight: C,
|
|
513
513
|
// `<body>`
|
|
514
|
-
marginWidth:
|
|
514
|
+
marginWidth: C,
|
|
515
515
|
// `<body>`
|
|
516
516
|
noResize: x,
|
|
517
517
|
// `<frame>`
|
|
@@ -529,7 +529,7 @@ const ys = Ie({
|
|
|
529
529
|
// `<isindex>`
|
|
530
530
|
rev: null,
|
|
531
531
|
// `<link>`
|
|
532
|
-
rightMargin:
|
|
532
|
+
rightMargin: C,
|
|
533
533
|
// `<body>`
|
|
534
534
|
rules: null,
|
|
535
535
|
// `<table>`
|
|
@@ -543,7 +543,7 @@ const ys = Ie({
|
|
|
543
543
|
// `<table>`
|
|
544
544
|
text: null,
|
|
545
545
|
// `<body>`. Use CSS `color` instead
|
|
546
|
-
topMargin:
|
|
546
|
+
topMargin: C,
|
|
547
547
|
// `<body>`
|
|
548
548
|
valueType: null,
|
|
549
549
|
// `<param>`
|
|
@@ -553,7 +553,7 @@ const ys = Ie({
|
|
|
553
553
|
// Several. Use CSS `vertical-align` instead
|
|
554
554
|
vLink: null,
|
|
555
555
|
// `<body>`. Use CSS `a:visited {color}` instead
|
|
556
|
-
vSpace:
|
|
556
|
+
vSpace: C,
|
|
557
557
|
// `<img>` and `<object>`
|
|
558
558
|
// Non-standard Properties.
|
|
559
559
|
allowTransparency: null,
|
|
@@ -563,7 +563,7 @@ const ys = Ie({
|
|
|
563
563
|
disableRemotePlayback: x,
|
|
564
564
|
prefix: null,
|
|
565
565
|
property: null,
|
|
566
|
-
results:
|
|
566
|
+
results: C,
|
|
567
567
|
security: null,
|
|
568
568
|
unselectable: null
|
|
569
569
|
},
|
|
@@ -747,27 +747,27 @@ const ys = Ie({
|
|
|
747
747
|
},
|
|
748
748
|
properties: {
|
|
749
749
|
about: q,
|
|
750
|
-
accentHeight:
|
|
750
|
+
accentHeight: C,
|
|
751
751
|
accumulate: null,
|
|
752
752
|
additive: null,
|
|
753
753
|
alignmentBaseline: null,
|
|
754
|
-
alphabetic:
|
|
755
|
-
amplitude:
|
|
754
|
+
alphabetic: C,
|
|
755
|
+
amplitude: C,
|
|
756
756
|
arabicForm: null,
|
|
757
|
-
ascent:
|
|
757
|
+
ascent: C,
|
|
758
758
|
attributeName: null,
|
|
759
759
|
attributeType: null,
|
|
760
|
-
azimuth:
|
|
760
|
+
azimuth: C,
|
|
761
761
|
bandwidth: null,
|
|
762
762
|
baselineShift: null,
|
|
763
763
|
baseFrequency: null,
|
|
764
764
|
baseProfile: null,
|
|
765
765
|
bbox: null,
|
|
766
766
|
begin: null,
|
|
767
|
-
bias:
|
|
767
|
+
bias: C,
|
|
768
768
|
by: null,
|
|
769
769
|
calcMode: null,
|
|
770
|
-
capHeight:
|
|
770
|
+
capHeight: C,
|
|
771
771
|
className: I,
|
|
772
772
|
clip: null,
|
|
773
773
|
clipPath: null,
|
|
@@ -788,26 +788,26 @@ const ys = Ie({
|
|
|
788
788
|
d: null,
|
|
789
789
|
dataType: null,
|
|
790
790
|
defaultAction: null,
|
|
791
|
-
descent:
|
|
792
|
-
diffuseConstant:
|
|
791
|
+
descent: C,
|
|
792
|
+
diffuseConstant: C,
|
|
793
793
|
direction: null,
|
|
794
794
|
display: null,
|
|
795
795
|
dur: null,
|
|
796
|
-
divisor:
|
|
796
|
+
divisor: C,
|
|
797
797
|
dominantBaseline: null,
|
|
798
798
|
download: x,
|
|
799
799
|
dx: null,
|
|
800
800
|
dy: null,
|
|
801
801
|
edgeMode: null,
|
|
802
802
|
editable: null,
|
|
803
|
-
elevation:
|
|
803
|
+
elevation: C,
|
|
804
804
|
enableBackground: null,
|
|
805
805
|
end: null,
|
|
806
806
|
event: null,
|
|
807
|
-
exponent:
|
|
807
|
+
exponent: C,
|
|
808
808
|
externalResourcesRequired: null,
|
|
809
809
|
fill: null,
|
|
810
|
-
fillOpacity:
|
|
810
|
+
fillOpacity: C,
|
|
811
811
|
fillRule: null,
|
|
812
812
|
filter: null,
|
|
813
813
|
filterRes: null,
|
|
@@ -837,27 +837,27 @@ const ys = Ie({
|
|
|
837
837
|
gradientTransform: null,
|
|
838
838
|
gradientUnits: null,
|
|
839
839
|
handler: null,
|
|
840
|
-
hanging:
|
|
840
|
+
hanging: C,
|
|
841
841
|
hatchContentUnits: null,
|
|
842
842
|
hatchUnits: null,
|
|
843
843
|
height: null,
|
|
844
844
|
href: null,
|
|
845
845
|
hrefLang: null,
|
|
846
|
-
horizAdvX:
|
|
847
|
-
horizOriginX:
|
|
848
|
-
horizOriginY:
|
|
846
|
+
horizAdvX: C,
|
|
847
|
+
horizOriginX: C,
|
|
848
|
+
horizOriginY: C,
|
|
849
849
|
id: null,
|
|
850
|
-
ideographic:
|
|
850
|
+
ideographic: C,
|
|
851
851
|
imageRendering: null,
|
|
852
852
|
initialVisibility: null,
|
|
853
853
|
in: null,
|
|
854
854
|
in2: null,
|
|
855
|
-
intercept:
|
|
856
|
-
k:
|
|
857
|
-
k1:
|
|
858
|
-
k2:
|
|
859
|
-
k3:
|
|
860
|
-
k4:
|
|
855
|
+
intercept: C,
|
|
856
|
+
k: C,
|
|
857
|
+
k1: C,
|
|
858
|
+
k2: C,
|
|
859
|
+
k3: C,
|
|
860
|
+
k4: C,
|
|
861
861
|
kernelMatrix: q,
|
|
862
862
|
kernelUnitLength: null,
|
|
863
863
|
keyPoints: null,
|
|
@@ -871,7 +871,7 @@ const ys = Ie({
|
|
|
871
871
|
lengthAdjust: null,
|
|
872
872
|
letterSpacing: null,
|
|
873
873
|
lightingColor: null,
|
|
874
|
-
limitingConeAngle:
|
|
874
|
+
limitingConeAngle: C,
|
|
875
875
|
local: null,
|
|
876
876
|
markerEnd: null,
|
|
877
877
|
markerMid: null,
|
|
@@ -887,7 +887,7 @@ const ys = Ie({
|
|
|
887
887
|
media: null,
|
|
888
888
|
mediaCharacterEncoding: null,
|
|
889
889
|
mediaContentEncodings: null,
|
|
890
|
-
mediaSize:
|
|
890
|
+
mediaSize: C,
|
|
891
891
|
mediaTime: null,
|
|
892
892
|
method: null,
|
|
893
893
|
min: null,
|
|
@@ -993,12 +993,12 @@ const ys = Ie({
|
|
|
993
993
|
origin: null,
|
|
994
994
|
overflow: null,
|
|
995
995
|
overlay: null,
|
|
996
|
-
overlinePosition:
|
|
997
|
-
overlineThickness:
|
|
996
|
+
overlinePosition: C,
|
|
997
|
+
overlineThickness: C,
|
|
998
998
|
paintOrder: null,
|
|
999
999
|
panose1: null,
|
|
1000
1000
|
path: null,
|
|
1001
|
-
pathLength:
|
|
1001
|
+
pathLength: C,
|
|
1002
1002
|
patternContentUnits: null,
|
|
1003
1003
|
patternTransform: null,
|
|
1004
1004
|
patternUnits: null,
|
|
@@ -1008,9 +1008,9 @@ const ys = Ie({
|
|
|
1008
1008
|
playbackOrder: null,
|
|
1009
1009
|
pointerEvents: null,
|
|
1010
1010
|
points: null,
|
|
1011
|
-
pointsAtX:
|
|
1012
|
-
pointsAtY:
|
|
1013
|
-
pointsAtZ:
|
|
1011
|
+
pointsAtX: C,
|
|
1012
|
+
pointsAtY: C,
|
|
1013
|
+
pointsAtZ: C,
|
|
1014
1014
|
preserveAlpha: null,
|
|
1015
1015
|
preserveAspectRatio: null,
|
|
1016
1016
|
primitiveUnits: null,
|
|
@@ -1042,8 +1042,8 @@ const ys = Ie({
|
|
|
1042
1042
|
side: null,
|
|
1043
1043
|
slope: null,
|
|
1044
1044
|
snapshotTime: null,
|
|
1045
|
-
specularConstant:
|
|
1046
|
-
specularExponent:
|
|
1045
|
+
specularConstant: C,
|
|
1046
|
+
specularExponent: C,
|
|
1047
1047
|
spreadMethod: null,
|
|
1048
1048
|
spacing: null,
|
|
1049
1049
|
startOffset: null,
|
|
@@ -1053,30 +1053,30 @@ const ys = Ie({
|
|
|
1053
1053
|
stitchTiles: null,
|
|
1054
1054
|
stopColor: null,
|
|
1055
1055
|
stopOpacity: null,
|
|
1056
|
-
strikethroughPosition:
|
|
1057
|
-
strikethroughThickness:
|
|
1056
|
+
strikethroughPosition: C,
|
|
1057
|
+
strikethroughThickness: C,
|
|
1058
1058
|
string: null,
|
|
1059
1059
|
stroke: null,
|
|
1060
1060
|
strokeDashArray: q,
|
|
1061
1061
|
strokeDashOffset: null,
|
|
1062
1062
|
strokeLineCap: null,
|
|
1063
1063
|
strokeLineJoin: null,
|
|
1064
|
-
strokeMiterLimit:
|
|
1065
|
-
strokeOpacity:
|
|
1064
|
+
strokeMiterLimit: C,
|
|
1065
|
+
strokeOpacity: C,
|
|
1066
1066
|
strokeWidth: null,
|
|
1067
1067
|
style: null,
|
|
1068
|
-
surfaceScale:
|
|
1068
|
+
surfaceScale: C,
|
|
1069
1069
|
syncBehavior: null,
|
|
1070
1070
|
syncBehaviorDefault: null,
|
|
1071
1071
|
syncMaster: null,
|
|
1072
1072
|
syncTolerance: null,
|
|
1073
1073
|
syncToleranceDefault: null,
|
|
1074
1074
|
systemLanguage: q,
|
|
1075
|
-
tabIndex:
|
|
1075
|
+
tabIndex: C,
|
|
1076
1076
|
tableValues: null,
|
|
1077
1077
|
target: null,
|
|
1078
|
-
targetX:
|
|
1079
|
-
targetY:
|
|
1078
|
+
targetX: C,
|
|
1079
|
+
targetY: C,
|
|
1080
1080
|
textAnchor: null,
|
|
1081
1081
|
textDecoration: null,
|
|
1082
1082
|
textRendering: null,
|
|
@@ -1091,22 +1091,22 @@ const ys = Ie({
|
|
|
1091
1091
|
transformOrigin: null,
|
|
1092
1092
|
u1: null,
|
|
1093
1093
|
u2: null,
|
|
1094
|
-
underlinePosition:
|
|
1095
|
-
underlineThickness:
|
|
1094
|
+
underlinePosition: C,
|
|
1095
|
+
underlineThickness: C,
|
|
1096
1096
|
unicode: null,
|
|
1097
1097
|
unicodeBidi: null,
|
|
1098
1098
|
unicodeRange: null,
|
|
1099
|
-
unitsPerEm:
|
|
1099
|
+
unitsPerEm: C,
|
|
1100
1100
|
values: null,
|
|
1101
|
-
vAlphabetic:
|
|
1102
|
-
vMathematical:
|
|
1101
|
+
vAlphabetic: C,
|
|
1102
|
+
vMathematical: C,
|
|
1103
1103
|
vectorEffect: null,
|
|
1104
|
-
vHanging:
|
|
1105
|
-
vIdeographic:
|
|
1104
|
+
vHanging: C,
|
|
1105
|
+
vIdeographic: C,
|
|
1106
1106
|
version: null,
|
|
1107
|
-
vertAdvY:
|
|
1108
|
-
vertOriginX:
|
|
1109
|
-
vertOriginY:
|
|
1107
|
+
vertAdvY: C,
|
|
1108
|
+
vertOriginX: C,
|
|
1109
|
+
vertOriginY: C,
|
|
1110
1110
|
viewBox: null,
|
|
1111
1111
|
viewTarget: null,
|
|
1112
1112
|
visibility: null,
|
|
@@ -1118,7 +1118,7 @@ const ys = Ie({
|
|
|
1118
1118
|
x1: null,
|
|
1119
1119
|
x2: null,
|
|
1120
1120
|
xChannelSelector: null,
|
|
1121
|
-
xHeight:
|
|
1121
|
+
xHeight: C,
|
|
1122
1122
|
y: null,
|
|
1123
1123
|
y1: null,
|
|
1124
1124
|
y2: null,
|
|
@@ -1153,7 +1153,7 @@ const ys = Ie({
|
|
|
1153
1153
|
transform(t, e) {
|
|
1154
1154
|
return "xml:" + e.slice(3).toLowerCase();
|
|
1155
1155
|
}
|
|
1156
|
-
}),
|
|
1156
|
+
}), Cs = {
|
|
1157
1157
|
classId: "classID",
|
|
1158
1158
|
dataType: "datatype",
|
|
1159
1159
|
itemId: "itemID",
|
|
@@ -1171,7 +1171,7 @@ const ys = Ie({
|
|
|
1171
1171
|
xLinkTitle: "xlinkTitle",
|
|
1172
1172
|
xLinkType: "xlinkType",
|
|
1173
1173
|
xmlnsXLink: "xmlnsXlink"
|
|
1174
|
-
},
|
|
1174
|
+
}, ws = /[A-Z]/g, Pn = /-[a-z]/g, _s = /^data[-\w.:]+$/i;
|
|
1175
1175
|
function Ss(t, e) {
|
|
1176
1176
|
const n = zt(e);
|
|
1177
1177
|
let r = e, o = W;
|
|
@@ -1184,7 +1184,7 @@ function Ss(t, e) {
|
|
|
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(ws, ks);
|
|
1188
1188
|
a.charAt(0) !== "-" && (a = "-" + a), e = "data" + a;
|
|
1189
1189
|
}
|
|
1190
1190
|
}
|
|
@@ -1198,53 +1198,53 @@ function ks(t) {
|
|
|
1198
1198
|
function vs(t) {
|
|
1199
1199
|
return t.charAt(1).toUpperCase();
|
|
1200
1200
|
}
|
|
1201
|
-
const xs = Lr([$r, ys, Or, Dr, Gr], "html"),
|
|
1202
|
-
function
|
|
1201
|
+
const xs = Lr([$r, ys, Or, Dr, Gr], "html"), pn = Lr([$r, bs, Or, Dr, Gr], "svg");
|
|
1202
|
+
function hh(t) {
|
|
1203
1203
|
const e = String(t || "").trim();
|
|
1204
1204
|
return e ? e.split(/[ \t\n\r\f]+/g) : [];
|
|
1205
1205
|
}
|
|
1206
1206
|
function Fr(t) {
|
|
1207
1207
|
return t.join(" ").trim();
|
|
1208
1208
|
}
|
|
1209
|
-
var
|
|
1209
|
+
var Ce = {}, Rt, $n;
|
|
1210
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 = `
|
|
1214
|
-
`, u = "/", c = "*", h = "",
|
|
1215
|
-
Rt = function(
|
|
1216
|
-
if (typeof
|
|
1214
|
+
`, u = "/", c = "*", h = "", p = "comment", d = "declaration";
|
|
1215
|
+
Rt = function(m, b) {
|
|
1216
|
+
if (typeof m != "string")
|
|
1217
1217
|
throw new TypeError("First argument must be a string");
|
|
1218
|
-
if (!
|
|
1219
|
-
|
|
1220
|
-
var y = 1,
|
|
1218
|
+
if (!m) return [];
|
|
1219
|
+
b = b || {};
|
|
1220
|
+
var y = 1, g = 1;
|
|
1221
1221
|
function _(R) {
|
|
1222
1222
|
var k = R.match(e);
|
|
1223
1223
|
k && (y += k.length);
|
|
1224
1224
|
var G = R.lastIndexOf(l);
|
|
1225
|
-
|
|
1225
|
+
g = ~G ? R.length - G : g + R.length;
|
|
1226
1226
|
}
|
|
1227
1227
|
function S() {
|
|
1228
|
-
var R = { line: y, column:
|
|
1228
|
+
var R = { line: y, column: g };
|
|
1229
1229
|
return function(k) {
|
|
1230
1230
|
return k.position = new A(R), j(), k;
|
|
1231
1231
|
};
|
|
1232
1232
|
}
|
|
1233
1233
|
function A(R) {
|
|
1234
|
-
this.start = R, this.end = { line: y, column:
|
|
1234
|
+
this.start = R, this.end = { line: y, column: g }, this.source = b.source;
|
|
1235
1235
|
}
|
|
1236
|
-
A.prototype.content =
|
|
1236
|
+
A.prototype.content = m;
|
|
1237
1237
|
function D(R) {
|
|
1238
1238
|
var k = new Error(
|
|
1239
|
-
|
|
1239
|
+
b.source + ":" + y + ":" + g + ": " + R
|
|
1240
1240
|
);
|
|
1241
|
-
if (k.reason = R, k.filename =
|
|
1241
|
+
if (k.reason = R, k.filename = b.source, k.line = y, k.column = g, k.source = m, !b.silent) throw k;
|
|
1242
1242
|
}
|
|
1243
1243
|
function L(R) {
|
|
1244
|
-
var k = R.exec(
|
|
1244
|
+
var k = R.exec(m);
|
|
1245
1245
|
if (k) {
|
|
1246
1246
|
var G = k[0];
|
|
1247
|
-
return _(G),
|
|
1247
|
+
return _(G), m = m.slice(G.length), k;
|
|
1248
1248
|
}
|
|
1249
1249
|
}
|
|
1250
1250
|
function j() {
|
|
@@ -1258,14 +1258,14 @@ function Es() {
|
|
|
1258
1258
|
}
|
|
1259
1259
|
function ee() {
|
|
1260
1260
|
var R = S();
|
|
1261
|
-
if (!(u !=
|
|
1262
|
-
for (var k = 2; h !=
|
|
1261
|
+
if (!(u != m.charAt(0) || c != m.charAt(1))) {
|
|
1262
|
+
for (var k = 2; h != m.charAt(k) && (c != m.charAt(k) || u != m.charAt(k + 1)); )
|
|
1263
1263
|
++k;
|
|
1264
|
-
if (k += 2, h ===
|
|
1264
|
+
if (k += 2, h === m.charAt(k - 1))
|
|
1265
1265
|
return D("End of comment missing");
|
|
1266
|
-
var G =
|
|
1267
|
-
return
|
|
1268
|
-
type:
|
|
1266
|
+
var G = m.slice(2, k - 2);
|
|
1267
|
+
return g += 2, _(G), m = m.slice(k), g += 2, R({
|
|
1268
|
+
type: p,
|
|
1269
1269
|
comment: G
|
|
1270
1270
|
});
|
|
1271
1271
|
}
|
|
@@ -1276,8 +1276,8 @@ function Es() {
|
|
|
1276
1276
|
if (ee(), !L(o)) return D("property missing ':'");
|
|
1277
1277
|
var G = L(s), Te = R({
|
|
1278
1278
|
type: d,
|
|
1279
|
-
property:
|
|
1280
|
-
value: G ?
|
|
1279
|
+
property: f(k[0].replace(t, h)),
|
|
1280
|
+
value: G ? f(G[0].replace(t, h)) : h
|
|
1281
1281
|
});
|
|
1282
1282
|
return L(a), Te;
|
|
1283
1283
|
}
|
|
@@ -1291,19 +1291,19 @@ function Es() {
|
|
|
1291
1291
|
}
|
|
1292
1292
|
return j(), te();
|
|
1293
1293
|
};
|
|
1294
|
-
function
|
|
1295
|
-
return
|
|
1294
|
+
function f(m) {
|
|
1295
|
+
return m ? m.replace(i, h) : h;
|
|
1296
1296
|
}
|
|
1297
1297
|
return Rt;
|
|
1298
1298
|
}
|
|
1299
1299
|
var Tn;
|
|
1300
1300
|
function As() {
|
|
1301
|
-
if (Tn) return
|
|
1301
|
+
if (Tn) return Ce;
|
|
1302
1302
|
Tn = 1;
|
|
1303
|
-
var t =
|
|
1303
|
+
var t = Ce && Ce.__importDefault || function(r) {
|
|
1304
1304
|
return r && r.__esModule ? r : { default: r };
|
|
1305
1305
|
};
|
|
1306
|
-
Object.defineProperty(
|
|
1306
|
+
Object.defineProperty(Ce, "__esModule", { value: !0 }), Ce.default = n;
|
|
1307
1307
|
var e = t(Es());
|
|
1308
1308
|
function n(r, o) {
|
|
1309
1309
|
var s = null;
|
|
@@ -1317,7 +1317,7 @@ function As() {
|
|
|
1317
1317
|
}
|
|
1318
1318
|
}), s;
|
|
1319
1319
|
}
|
|
1320
|
-
return
|
|
1320
|
+
return Ce;
|
|
1321
1321
|
}
|
|
1322
1322
|
var Me = {}, Mn;
|
|
1323
1323
|
function Rs() {
|
|
@@ -1363,7 +1363,7 @@ function jr(t) {
|
|
|
1363
1363
|
};
|
|
1364
1364
|
}
|
|
1365
1365
|
}
|
|
1366
|
-
function
|
|
1366
|
+
function ph(t) {
|
|
1367
1367
|
const e = Br(t), n = Ps(t);
|
|
1368
1368
|
if (e && n)
|
|
1369
1369
|
return { start: e, end: n };
|
|
@@ -1467,7 +1467,7 @@ 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
|
|
1470
|
+
const fn = {}.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
1471
|
function Gs(t, e) {
|
|
1472
1472
|
if (!e || e.Fragment === void 0)
|
|
1473
1473
|
throw new TypeError("Expected `Fragment` in options");
|
|
@@ -1497,7 +1497,7 @@ function Gs(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" ?
|
|
1500
|
+
schema: e.space === "svg" ? pn : xs,
|
|
1501
1501
|
stylePropertyNameCase: e.stylePropertyNameCase || "dom",
|
|
1502
1502
|
tableCellAlignToStyle: e.tableCellAlignToStyle !== !1
|
|
1503
1503
|
}, s = zr(o, t, void 0);
|
|
@@ -1525,11 +1525,11 @@ function zr(t, e, n) {
|
|
|
1525
1525
|
function Fs(t, e, n) {
|
|
1526
1526
|
const r = t.schema;
|
|
1527
1527
|
let o = r;
|
|
1528
|
-
e.tagName.toLowerCase() === "svg" && r.space === "html" && (o =
|
|
1528
|
+
e.tagName.toLowerCase() === "svg" && r.space === "html" && (o = pn, t.schema = o), t.ancestors.push(e);
|
|
1529
1529
|
const s = Wr(t, e.tagName, !1), a = qs(t, e);
|
|
1530
1530
|
let i = gn(t, e);
|
|
1531
1531
|
return Os.has(e.tagName) && (i = i.filter(function(l) {
|
|
1532
|
-
return typeof l == "string" ? !
|
|
1532
|
+
return typeof l == "string" ? !wt(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
1535
|
function Bs(t, e) {
|
|
@@ -1551,7 +1551,7 @@ function js(t, e) {
|
|
|
1551
1551
|
function Us(t, e, n) {
|
|
1552
1552
|
const r = t.schema;
|
|
1553
1553
|
let o = r;
|
|
1554
|
-
e.name === "svg" && r.space === "html" && (o =
|
|
1554
|
+
e.name === "svg" && r.space === "html" && (o = pn, t.schema = o), t.ancestors.push(e);
|
|
1555
1555
|
const s = e.name === null ? t.Fragment : Wr(t, e.name, !0), a = Xs(t, e), i = gn(t, e);
|
|
1556
1556
|
return Hr(t, a, s, e), dn(a, i), t.ancestors.pop(), t.schema = r, t.create(e, s, a, n);
|
|
1557
1557
|
}
|
|
@@ -1600,7 +1600,7 @@ function qs(t, e) {
|
|
|
1600
1600
|
const n = {};
|
|
1601
1601
|
let r, o;
|
|
1602
1602
|
for (o in e.properties)
|
|
1603
|
-
if (o !== "children" &&
|
|
1603
|
+
if (o !== "children" && fn.call(e.properties, o)) {
|
|
1604
1604
|
const s = Ks(t, o, e.properties[o]);
|
|
1605
1605
|
if (s) {
|
|
1606
1606
|
const [a, i] = s;
|
|
@@ -1675,7 +1675,7 @@ function Ks(t, e, n) {
|
|
|
1675
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 ? Cs[r.property] || r.property : r.attribute,
|
|
1679
1679
|
n
|
|
1680
1680
|
];
|
|
1681
1681
|
}
|
|
@@ -1723,7 +1723,7 @@ function Wr(t, e, n) {
|
|
|
1723
1723
|
/** @type {string | number} */
|
|
1724
1724
|
r.value
|
|
1725
1725
|
);
|
|
1726
|
-
return
|
|
1726
|
+
return fn.call(t.components, o) ? t.components[o] : o;
|
|
1727
1727
|
}
|
|
1728
1728
|
if (t.evaluater)
|
|
1729
1729
|
return t.evaluater.evaluateExpression(r);
|
|
@@ -1745,7 +1745,7 @@ function Js(t) {
|
|
|
1745
1745
|
const e = {};
|
|
1746
1746
|
let n;
|
|
1747
1747
|
for (n in t)
|
|
1748
|
-
|
|
1748
|
+
fn.call(t, n) && (e[Zs(n)] = t[n]);
|
|
1749
1749
|
return e;
|
|
1750
1750
|
}
|
|
1751
1751
|
function Zs(t) {
|
|
@@ -1855,13 +1855,13 @@ function ia(t, e, n, r) {
|
|
|
1855
1855
|
typeof h.name == "string" ? h.name : void 0
|
|
1856
1856
|
)
|
|
1857
1857
|
);
|
|
1858
|
-
Object.defineProperty(
|
|
1858
|
+
Object.defineProperty(p, "name", {
|
|
1859
1859
|
value: "node (" + (l.type + (d ? "<" + d + ">" : "")) + ")"
|
|
1860
1860
|
});
|
|
1861
1861
|
}
|
|
1862
|
-
return
|
|
1863
|
-
function
|
|
1864
|
-
let d = qr,
|
|
1862
|
+
return p;
|
|
1863
|
+
function p() {
|
|
1864
|
+
let d = qr, f, m, b;
|
|
1865
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) {
|
|
@@ -1870,11 +1870,11 @@ function ia(t, e, n, r) {
|
|
|
1870
1870
|
l
|
|
1871
1871
|
);
|
|
1872
1872
|
if (y.children && d[0] !== aa)
|
|
1873
|
-
for (
|
|
1874
|
-
const
|
|
1875
|
-
if (
|
|
1876
|
-
return
|
|
1877
|
-
|
|
1873
|
+
for (m = (r ? y.children.length : -1) + a, b = c.concat(y); m > -1 && m < y.children.length; ) {
|
|
1874
|
+
const g = y.children[m];
|
|
1875
|
+
if (f = i(g, m, b)(), f[0] === Fn)
|
|
1876
|
+
return f;
|
|
1877
|
+
m = typeof f[1] == "number" ? f[1] : m + a;
|
|
1878
1878
|
}
|
|
1879
1879
|
}
|
|
1880
1880
|
return d;
|
|
@@ -1947,15 +1947,15 @@ 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) ? pa(t) : t instanceof RegExp ? t : typeof t == "object" ? fa(t) : t;
|
|
1951
1951
|
}
|
|
1952
|
-
function
|
|
1952
|
+
function pa(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 fa(t) {
|
|
1959
1959
|
let e = {};
|
|
1960
1960
|
for (let n in t)
|
|
1961
1961
|
e[n] = mn(t[n]);
|
|
@@ -2151,8 +2151,8 @@ function ma(t) {
|
|
|
2151
2151
|
if (typeof a.settings.fontStyle == "string") {
|
|
2152
2152
|
l = 0;
|
|
2153
2153
|
let h = a.settings.fontStyle.split(" ");
|
|
2154
|
-
for (let
|
|
2155
|
-
switch (h[
|
|
2154
|
+
for (let p = 0, d = h.length; p < d; p++)
|
|
2155
|
+
switch (h[p]) {
|
|
2156
2156
|
case "italic":
|
|
2157
2157
|
l = l | 1;
|
|
2158
2158
|
break;
|
|
@@ -2171,11 +2171,11 @@ function ma(t) {
|
|
|
2171
2171
|
typeof a.settings.foreground == "string" && Un(a.settings.foreground) && (u = a.settings.foreground);
|
|
2172
2172
|
let c = null;
|
|
2173
2173
|
typeof a.settings.background == "string" && Un(a.settings.background) && (c = a.settings.background);
|
|
2174
|
-
for (let h = 0,
|
|
2175
|
-
let
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2174
|
+
for (let h = 0, p = i.length; h < p; h++) {
|
|
2175
|
+
let f = i[h].trim().split(" "), m = f[f.length - 1], b = null;
|
|
2176
|
+
f.length > 1 && (b = f.slice(0, f.length - 1), b.reverse()), n[r++] = new ya(
|
|
2177
|
+
m,
|
|
2178
|
+
b,
|
|
2179
2179
|
o,
|
|
2180
2180
|
l,
|
|
2181
2181
|
u,
|
|
@@ -2200,14 +2200,14 @@ function ba(t, e) {
|
|
|
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 Ca(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 Ca = class {
|
|
2211
2211
|
_isFrozen;
|
|
2212
2212
|
_lastColorId;
|
|
2213
2213
|
_id2color;
|
|
@@ -2234,14 +2234,14 @@ var wa = class {
|
|
|
2234
2234
|
getColorMap() {
|
|
2235
2235
|
return this._id2color.slice(0);
|
|
2236
2236
|
}
|
|
2237
|
-
},
|
|
2237
|
+
}, wa = 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 || wa, this.fontStyle = r, this.foreground = o, this.background = s;
|
|
2245
2245
|
}
|
|
2246
2246
|
clone() {
|
|
2247
2247
|
return new no(this.scopeDepth, this.parentScopes, this.fontStyle, this.foreground, this.background);
|
|
@@ -2342,8 +2342,8 @@ var wa = class {
|
|
|
2342
2342
|
* A value of `0`, `NotSet` or `null` indicates that the corresponding field should be left as is.
|
|
2343
2343
|
*/
|
|
2344
2344
|
static set(e, n, r, o, s, a, i) {
|
|
2345
|
-
let l = K.getLanguageId(e), u = K.getTokenType(e), c = K.containsBalancedBrackets(e) ? 1 : 0, h = K.getFontStyle(e),
|
|
2346
|
-
return n !== 0 && (l = n), r !== 8 && (u = r), o !== null && (c = o ? 1 : 0), s !== -1 && (h = s), a !== 0 && (
|
|
2345
|
+
let l = K.getLanguageId(e), u = K.getTokenType(e), c = K.containsBalancedBrackets(e) ? 1 : 0, h = K.getFontStyle(e), p = K.getForeground(e), d = K.getBackground(e);
|
|
2346
|
+
return n !== 0 && (l = n), r !== 8 && (u = r), o !== null && (c = o ? 1 : 0), s !== -1 && (h = s), a !== 0 && (p = a), i !== 0 && (d = i), (l << 0 | u << 8 | c << 10 | h << 11 | p << 15 | d << 24) >>> 0;
|
|
2347
2347
|
}
|
|
2348
2348
|
};
|
|
2349
2349
|
function lt(t, e) {
|
|
@@ -2848,11 +2848,11 @@ var Xe = class {
|
|
|
2848
2848
|
break;
|
|
2849
2849
|
case 3:
|
|
2850
2850
|
case 4:
|
|
2851
|
-
const h = u.scopeName,
|
|
2851
|
+
const h = u.scopeName, p = u.kind === 4 ? u.ruleName : null, d = n.getExternalGrammar(h, r);
|
|
2852
2852
|
if (d)
|
|
2853
|
-
if (
|
|
2854
|
-
let
|
|
2855
|
-
|
|
2853
|
+
if (p) {
|
|
2854
|
+
let f = d.repository[p];
|
|
2855
|
+
f && (l = U.getCompiledRuleId(f, n, d.repository));
|
|
2856
2856
|
} else
|
|
2857
2857
|
l = U.getCompiledRuleId(d.repository.$self, n, d.repository);
|
|
2858
2858
|
break;
|
|
@@ -3085,10 +3085,10 @@ function lo(t, e, n, r, o, s, a, i) {
|
|
|
3085
3085
|
for (; !u; ) {
|
|
3086
3086
|
if (i !== 0 && Date.now() - h > i)
|
|
3087
3087
|
return new qn(o, !0);
|
|
3088
|
-
|
|
3088
|
+
p();
|
|
3089
3089
|
}
|
|
3090
3090
|
return new qn(o, !1);
|
|
3091
|
-
function
|
|
3091
|
+
function p() {
|
|
3092
3092
|
const d = Fa(
|
|
3093
3093
|
t,
|
|
3094
3094
|
e,
|
|
@@ -3101,35 +3101,35 @@ function lo(t, e, n, r, o, s, a, i) {
|
|
|
3101
3101
|
s.produce(o, l), u = !0;
|
|
3102
3102
|
return;
|
|
3103
3103
|
}
|
|
3104
|
-
const
|
|
3105
|
-
if (
|
|
3104
|
+
const f = d.captureIndices, m = d.matchedRuleId, b = f && f.length > 0 ? f[0].end > r : !1;
|
|
3105
|
+
if (m === $a) {
|
|
3106
3106
|
const y = o.getRule(t);
|
|
3107
|
-
s.produce(o,
|
|
3107
|
+
s.produce(o, f[0].start), o = o.withContentNameScopesList(o.nameScopesList), Ge(
|
|
3108
3108
|
t,
|
|
3109
3109
|
e,
|
|
3110
3110
|
n,
|
|
3111
3111
|
o,
|
|
3112
3112
|
s,
|
|
3113
3113
|
y.endCaptures,
|
|
3114
|
-
|
|
3115
|
-
), s.produce(o,
|
|
3116
|
-
const
|
|
3117
|
-
if (o = o.parent, c =
|
|
3118
|
-
o =
|
|
3114
|
+
f
|
|
3115
|
+
), s.produce(o, f[0].end);
|
|
3116
|
+
const g = o;
|
|
3117
|
+
if (o = o.parent, c = g.getAnchorPos(), !b && g.getEnterPos() === r) {
|
|
3118
|
+
o = g, s.produce(o, l), u = !0;
|
|
3119
3119
|
return;
|
|
3120
3120
|
}
|
|
3121
3121
|
} else {
|
|
3122
|
-
const y = t.getRule(
|
|
3123
|
-
s.produce(o,
|
|
3124
|
-
const
|
|
3122
|
+
const y = t.getRule(m);
|
|
3123
|
+
s.produce(o, f[0].start);
|
|
3124
|
+
const g = o, _ = y.getName(e.content, f), S = o.contentNameScopesList.pushAttributed(
|
|
3125
3125
|
_,
|
|
3126
3126
|
t
|
|
3127
3127
|
);
|
|
3128
3128
|
if (o = o.push(
|
|
3129
|
-
|
|
3129
|
+
m,
|
|
3130
3130
|
r,
|
|
3131
3131
|
c,
|
|
3132
|
-
|
|
3132
|
+
f[0].end === l,
|
|
3133
3133
|
null,
|
|
3134
3134
|
S,
|
|
3135
3135
|
S
|
|
@@ -3142,11 +3142,11 @@ function lo(t, e, n, r, o, s, a, i) {
|
|
|
3142
3142
|
o,
|
|
3143
3143
|
s,
|
|
3144
3144
|
A.beginCaptures,
|
|
3145
|
-
|
|
3146
|
-
), s.produce(o,
|
|
3145
|
+
f
|
|
3146
|
+
), s.produce(o, f[0].end), c = f[0].end;
|
|
3147
3147
|
const D = A.getContentName(
|
|
3148
3148
|
e.content,
|
|
3149
|
-
|
|
3149
|
+
f
|
|
3150
3150
|
), L = S.pushAttributed(
|
|
3151
3151
|
D,
|
|
3152
3152
|
t
|
|
@@ -3154,9 +3154,9 @@ function lo(t, e, n, r, o, s, a, i) {
|
|
|
3154
3154
|
if (o = o.withContentNameScopesList(L), A.endHasBackReferences && (o = o.withEndRule(
|
|
3155
3155
|
A.getEndWithResolvedBackReferences(
|
|
3156
3156
|
e.content,
|
|
3157
|
-
|
|
3157
|
+
f
|
|
3158
3158
|
)
|
|
3159
|
-
)), !
|
|
3159
|
+
)), !b && g.hasSameRuleAs(o)) {
|
|
3160
3160
|
o = o.pop(), s.produce(o, l), u = !0;
|
|
3161
3161
|
return;
|
|
3162
3162
|
}
|
|
@@ -3169,11 +3169,11 @@ function lo(t, e, n, r, o, s, a, i) {
|
|
|
3169
3169
|
o,
|
|
3170
3170
|
s,
|
|
3171
3171
|
A.beginCaptures,
|
|
3172
|
-
|
|
3173
|
-
), s.produce(o,
|
|
3172
|
+
f
|
|
3173
|
+
), s.produce(o, f[0].end), c = f[0].end;
|
|
3174
3174
|
const D = A.getContentName(
|
|
3175
3175
|
e.content,
|
|
3176
|
-
|
|
3176
|
+
f
|
|
3177
3177
|
), L = S.pushAttributed(
|
|
3178
3178
|
D,
|
|
3179
3179
|
t
|
|
@@ -3181,9 +3181,9 @@ function lo(t, e, n, r, o, s, a, i) {
|
|
|
3181
3181
|
if (o = o.withContentNameScopesList(L), A.whileHasBackReferences && (o = o.withEndRule(
|
|
3182
3182
|
A.getWhileWithResolvedBackReferences(
|
|
3183
3183
|
e.content,
|
|
3184
|
-
|
|
3184
|
+
f
|
|
3185
3185
|
)
|
|
3186
|
-
)), !
|
|
3186
|
+
)), !b && g.hasSameRuleAs(o)) {
|
|
3187
3187
|
o = o.pop(), s.produce(o, l), u = !0;
|
|
3188
3188
|
return;
|
|
3189
3189
|
}
|
|
@@ -3194,13 +3194,13 @@ function lo(t, e, n, r, o, s, a, i) {
|
|
|
3194
3194
|
o,
|
|
3195
3195
|
s,
|
|
3196
3196
|
y.captures,
|
|
3197
|
-
|
|
3198
|
-
), s.produce(o,
|
|
3197
|
+
f
|
|
3198
|
+
), s.produce(o, f[0].end), o = o.pop(), !b) {
|
|
3199
3199
|
o = o.safePop(), s.produce(o, l), u = !0;
|
|
3200
3200
|
return;
|
|
3201
3201
|
}
|
|
3202
3202
|
}
|
|
3203
|
-
|
|
3203
|
+
f[0].end > r && (r = f[0].end, n = !1);
|
|
3204
3204
|
}
|
|
3205
3205
|
}
|
|
3206
3206
|
function Ga(t, e, n, r, o, s) {
|
|
@@ -3250,15 +3250,15 @@ function Ba(t, e, n, r, o, s) {
|
|
|
3250
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
|
-
for (let
|
|
3254
|
-
const
|
|
3255
|
-
if (!
|
|
3253
|
+
for (let p = 0, d = t.length; p < d; p++) {
|
|
3254
|
+
const f = t[p];
|
|
3255
|
+
if (!f.matcher(h))
|
|
3256
3256
|
continue;
|
|
3257
|
-
const
|
|
3258
|
-
if (!
|
|
3257
|
+
const m = e.getRule(f.ruleId), { ruleScanner: b, findOptions: y } = uo(m, e, null, r, o === a), g = b.findNextMatchSync(n, o, y);
|
|
3258
|
+
if (!g)
|
|
3259
3259
|
continue;
|
|
3260
|
-
const _ =
|
|
3261
|
-
if (!(_ >= i) && (i = _, l =
|
|
3260
|
+
const _ = g.captureIndices[0].start;
|
|
3261
|
+
if (!(_ >= i) && (i = _, l = g.captureIndices, u = g.ruleId, c = f.priority, i === o))
|
|
3262
3262
|
break;
|
|
3263
3263
|
}
|
|
3264
3264
|
return l ? {
|
|
@@ -3286,8 +3286,8 @@ function Ge(t, e, n, r, o, s, a) {
|
|
|
3286
3286
|
return;
|
|
3287
3287
|
const i = e.content, l = Math.min(s.length, a.length), u = [], c = a[0].end;
|
|
3288
3288
|
for (let h = 0; h < l; h++) {
|
|
3289
|
-
const
|
|
3290
|
-
if (
|
|
3289
|
+
const p = s[h];
|
|
3290
|
+
if (p === null)
|
|
3291
3291
|
continue;
|
|
3292
3292
|
const d = a[h];
|
|
3293
3293
|
if (d.length === 0)
|
|
@@ -3296,8 +3296,8 @@ function Ge(t, e, n, r, o, s, a) {
|
|
|
3296
3296
|
break;
|
|
3297
3297
|
for (; u.length > 0 && u[u.length - 1].endPos <= d.start; )
|
|
3298
3298
|
o.produceFromScopes(u[u.length - 1].scopes, u[u.length - 1].endPos), u.pop();
|
|
3299
|
-
if (u.length > 0 ? o.produceFromScopes(u[u.length - 1].scopes, d.start) : o.produce(r, d.start),
|
|
3300
|
-
const
|
|
3299
|
+
if (u.length > 0 ? o.produceFromScopes(u[u.length - 1].scopes, d.start) : o.produce(r, d.start), p.retokenizeCapturedWithRuleId) {
|
|
3300
|
+
const m = p.getName(i, a), b = r.contentNameScopesList.pushAttributed(m, t), y = p.getContentName(i, a), g = b.pushAttributed(y, t), _ = r.push(p.retokenizeCapturedWithRuleId, d.start, -1, !1, null, b, g), S = t.createOnigString(i.substring(0, d.end));
|
|
3301
3301
|
lo(
|
|
3302
3302
|
t,
|
|
3303
3303
|
S,
|
|
@@ -3311,10 +3311,10 @@ function Ge(t, e, n, r, o, s, a) {
|
|
|
3311
3311
|
), ro(S);
|
|
3312
3312
|
continue;
|
|
3313
3313
|
}
|
|
3314
|
-
const
|
|
3315
|
-
if (
|
|
3316
|
-
const
|
|
3317
|
-
u.push(new za(
|
|
3314
|
+
const f = p.getName(i, a);
|
|
3315
|
+
if (f !== null) {
|
|
3316
|
+
const b = (u.length > 0 ? u[u.length - 1].scopes : r.contentNameScopesList).pushAttributed(f, t);
|
|
3317
|
+
u.push(new za(b, d.end));
|
|
3318
3318
|
}
|
|
3319
3319
|
}
|
|
3320
3320
|
for (; u.length > 0; )
|
|
@@ -3497,13 +3497,13 @@ var Va = class {
|
|
|
3497
3497
|
c.fontStyle,
|
|
3498
3498
|
c.foregroundId,
|
|
3499
3499
|
c.backgroundId
|
|
3500
|
-
),
|
|
3500
|
+
), p = this.getRule(this._rootId).getName(
|
|
3501
3501
|
null,
|
|
3502
3502
|
null
|
|
3503
3503
|
);
|
|
3504
3504
|
let d;
|
|
3505
|
-
|
|
3506
|
-
|
|
3505
|
+
p ? d = Fe.createRootAndLookUpScopeName(
|
|
3506
|
+
p,
|
|
3507
3507
|
h,
|
|
3508
3508
|
this
|
|
3509
3509
|
) : d = Fe.createRoot(
|
|
@@ -3644,7 +3644,7 @@ var Fe = class ne {
|
|
|
3644
3644
|
}), r = r.parent;
|
|
3645
3645
|
return r === e ? n.reverse() : void 0;
|
|
3646
3646
|
}
|
|
3647
|
-
}, Jt = class
|
|
3647
|
+
}, Jt = class pe {
|
|
3648
3648
|
/**
|
|
3649
3649
|
* Invariant:
|
|
3650
3650
|
* ```
|
|
@@ -3661,7 +3661,7 @@ var Fe = class ne {
|
|
|
3661
3661
|
}
|
|
3662
3662
|
_stackElementBrand = void 0;
|
|
3663
3663
|
// TODO remove me
|
|
3664
|
-
static NULL = new
|
|
3664
|
+
static NULL = new pe(
|
|
3665
3665
|
null,
|
|
3666
3666
|
0,
|
|
3667
3667
|
0,
|
|
@@ -3688,7 +3688,7 @@ var Fe = class ne {
|
|
|
3688
3688
|
*/
|
|
3689
3689
|
depth;
|
|
3690
3690
|
equals(e) {
|
|
3691
|
-
return e === null ? !1 :
|
|
3691
|
+
return e === null ? !1 : pe._equals(this, e);
|
|
3692
3692
|
}
|
|
3693
3693
|
static _equals(e, n) {
|
|
3694
3694
|
return e === n ? !0 : this._structuralEquals(e, n) ? Fe.equals(e.contentNameScopesList, n.contentNameScopesList) : !1;
|
|
@@ -3713,7 +3713,7 @@ var Fe = class ne {
|
|
|
3713
3713
|
e._enterPos = -1, e._anchorPos = -1, e = e.parent;
|
|
3714
3714
|
}
|
|
3715
3715
|
reset() {
|
|
3716
|
-
|
|
3716
|
+
pe._reset(this);
|
|
3717
3717
|
}
|
|
3718
3718
|
pop() {
|
|
3719
3719
|
return this.parent;
|
|
@@ -3722,7 +3722,7 @@ var Fe = class ne {
|
|
|
3722
3722
|
return this.parent ? this.parent : this;
|
|
3723
3723
|
}
|
|
3724
3724
|
push(e, n, r, o, s, a, i) {
|
|
3725
|
-
return new
|
|
3725
|
+
return new pe(
|
|
3726
3726
|
this,
|
|
3727
3727
|
e,
|
|
3728
3728
|
n,
|
|
@@ -3761,7 +3761,7 @@ var Fe = class ne {
|
|
|
3761
3761
|
);
|
|
3762
3762
|
}
|
|
3763
3763
|
withEndRule(e) {
|
|
3764
|
-
return this.endRule === e ? this : new
|
|
3764
|
+
return this.endRule === e ? this : new pe(
|
|
3765
3765
|
this.parent,
|
|
3766
3766
|
this.ruleId,
|
|
3767
3767
|
this._enterPos,
|
|
@@ -3793,7 +3793,7 @@ var Fe = class ne {
|
|
|
3793
3793
|
}
|
|
3794
3794
|
static pushFrame(e, n) {
|
|
3795
3795
|
const r = Fe.fromExtension(e?.nameScopesList ?? null, n.nameScopesList);
|
|
3796
|
-
return new
|
|
3796
|
+
return new pe(
|
|
3797
3797
|
e,
|
|
3798
3798
|
n.ruleId,
|
|
3799
3799
|
n.enterPos ?? -1,
|
|
@@ -4234,11 +4234,11 @@ const ho = Ne({
|
|
|
4234
4234
|
return e === "role" ? e : "aria-" + e.slice(4).toLowerCase();
|
|
4235
4235
|
}
|
|
4236
4236
|
});
|
|
4237
|
-
function
|
|
4237
|
+
function po(t, e) {
|
|
4238
4238
|
return e in t ? t[e] : e;
|
|
4239
4239
|
}
|
|
4240
|
-
function
|
|
4241
|
-
return
|
|
4240
|
+
function fo(t, e) {
|
|
4241
|
+
return po(t, e.toLowerCase());
|
|
4242
4242
|
}
|
|
4243
4243
|
const Za = Ne({
|
|
4244
4244
|
attributes: {
|
|
@@ -4600,7 +4600,7 @@ const Za = Ne({
|
|
|
4600
4600
|
unselectable: null
|
|
4601
4601
|
},
|
|
4602
4602
|
space: "html",
|
|
4603
|
-
transform:
|
|
4603
|
+
transform: fo
|
|
4604
4604
|
}), Qa = Ne({
|
|
4605
4605
|
attributes: {
|
|
4606
4606
|
accentHeight: "accent-height",
|
|
@@ -5159,7 +5159,7 @@ const Za = Ne({
|
|
|
5159
5159
|
zoomAndPan: null
|
|
5160
5160
|
},
|
|
5161
5161
|
space: "svg",
|
|
5162
|
-
transform:
|
|
5162
|
+
transform: po
|
|
5163
5163
|
}), go = Ne({
|
|
5164
5164
|
properties: {
|
|
5165
5165
|
xLinkActuate: null,
|
|
@@ -5178,7 +5178,7 @@ const Za = Ne({
|
|
|
5178
5178
|
attributes: { xmlnsxlink: "xmlns:xlink" },
|
|
5179
5179
|
properties: { xmlnsXLink: null, xmlns: null },
|
|
5180
5180
|
space: "xmlns",
|
|
5181
|
-
transform:
|
|
5181
|
+
transform: fo
|
|
5182
5182
|
}), yo = Ne({
|
|
5183
5183
|
properties: { xmlBase: null, xmlLang: null, xmlSpace: null },
|
|
5184
5184
|
space: "xml",
|
|
@@ -5240,19 +5240,19 @@ function ci(t, e) {
|
|
|
5240
5240
|
}
|
|
5241
5241
|
function hi(t) {
|
|
5242
5242
|
let e = Zn.get(t);
|
|
5243
|
-
return e || (e =
|
|
5243
|
+
return e || (e = pi(t), Zn.set(t, e)), e;
|
|
5244
5244
|
}
|
|
5245
|
-
function
|
|
5245
|
+
function pi(t) {
|
|
5246
5246
|
const e = [];
|
|
5247
5247
|
let n = -1;
|
|
5248
5248
|
for (; ++n < t.length; )
|
|
5249
5249
|
e.push(t[n].replace(ui, "\\$&"));
|
|
5250
5250
|
return new RegExp("(?:" + e.join("|") + ")", "g");
|
|
5251
5251
|
}
|
|
5252
|
-
const
|
|
5252
|
+
const fi = /[\dA-Fa-f]/;
|
|
5253
5253
|
function di(t, e, n) {
|
|
5254
5254
|
const r = "&#x" + t.toString(16).toUpperCase();
|
|
5255
|
-
return n && e && !
|
|
5255
|
+
return n && e && !fi.test(String.fromCharCode(e)) ? r : r + ";";
|
|
5256
5256
|
}
|
|
5257
5257
|
const gi = /\d/;
|
|
5258
5258
|
function mi(t, e, n) {
|
|
@@ -5628,22 +5628,22 @@ const yi = [
|
|
|
5628
5628
|
"not",
|
|
5629
5629
|
"para",
|
|
5630
5630
|
"times"
|
|
5631
|
-
],
|
|
5631
|
+
], Co = {}.hasOwnProperty, nn = {};
|
|
5632
5632
|
let Ze;
|
|
5633
5633
|
for (Ze in $t)
|
|
5634
|
-
|
|
5635
|
-
const
|
|
5636
|
-
function
|
|
5634
|
+
Co.call($t, Ze) && (nn[$t[Ze]] = Ze);
|
|
5635
|
+
const Ci = /[^\dA-Za-z]/;
|
|
5636
|
+
function wi(t, e, n, r) {
|
|
5637
5637
|
const o = String.fromCharCode(t);
|
|
5638
|
-
if (
|
|
5638
|
+
if (Co.call(nn, o)) {
|
|
5639
5639
|
const s = nn[o], a = "&" + s;
|
|
5640
|
-
return n && yi.includes(s) && !bi.includes(s) && (!r || e && e !== 61 &&
|
|
5640
|
+
return n && yi.includes(s) && !bi.includes(s) && (!r || e && e !== 61 && Ci.test(String.fromCharCode(e))) ? a : a + ";";
|
|
5641
5641
|
}
|
|
5642
5642
|
return "";
|
|
5643
5643
|
}
|
|
5644
5644
|
function _i(t, e, n) {
|
|
5645
5645
|
let r = di(t, e, n.omitOptionalSemicolons), o;
|
|
5646
|
-
if ((n.useNamedReferences || n.useShortestReferences) && (o =
|
|
5646
|
+
if ((n.useNamedReferences || n.useShortestReferences) && (o = wi(
|
|
5647
5647
|
t,
|
|
5648
5648
|
e,
|
|
5649
5649
|
n.omitOptionalSemicolons,
|
|
@@ -5677,14 +5677,14 @@ function xi(t, e, n, r) {
|
|
|
5677
5677
|
function Ei(t, e, n, r) {
|
|
5678
5678
|
return "<!" + (r.settings.upperDoctype ? "DOCTYPE" : "doctype") + (r.settings.tightDoctype ? "" : " ") + "html>";
|
|
5679
5679
|
}
|
|
5680
|
-
const O = _o(1),
|
|
5680
|
+
const O = _o(1), wo = _o(-1), Ai = [];
|
|
5681
5681
|
function _o(t) {
|
|
5682
5682
|
return e;
|
|
5683
5683
|
function e(n, r, o) {
|
|
5684
5684
|
const s = n ? n.children : Ai;
|
|
5685
5685
|
let a = (r || 0) + t, i = s[a];
|
|
5686
5686
|
if (!o)
|
|
5687
|
-
for (; i &&
|
|
5687
|
+
for (; i && wt(i); )
|
|
5688
5688
|
a += t, i = s[a];
|
|
5689
5689
|
return i;
|
|
5690
5690
|
}
|
|
@@ -5719,7 +5719,7 @@ const bn = So({
|
|
|
5719
5719
|
});
|
|
5720
5720
|
function Tt(t, e, n) {
|
|
5721
5721
|
const r = O(n, e, !0);
|
|
5722
|
-
return !r || r.type !== "comment" && !(r.type === "text" &&
|
|
5722
|
+
return !r || r.type !== "comment" && !(r.type === "text" && wt(r.value.charAt(0)));
|
|
5723
5723
|
}
|
|
5724
5724
|
function Ii(t, e, n) {
|
|
5725
5725
|
const r = O(n, e);
|
|
@@ -5800,14 +5800,14 @@ function zi(t) {
|
|
|
5800
5800
|
}
|
|
5801
5801
|
function Hi(t) {
|
|
5802
5802
|
const e = O(t, -1, !0);
|
|
5803
|
-
return !e || e.type !== "comment" && !(e.type === "text" &&
|
|
5803
|
+
return !e || e.type !== "comment" && !(e.type === "text" && wt(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
5805
|
function Wi(t, e, n) {
|
|
5806
|
-
const r =
|
|
5806
|
+
const r = wo(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
5809
|
function Vi(t, e, n) {
|
|
5810
|
-
const r =
|
|
5810
|
+
const r = wo(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 = {
|
|
@@ -5972,7 +5972,7 @@ function il(t) {
|
|
|
5972
5972
|
e[r] = this.one(n[r], r, t);
|
|
5973
5973
|
return e.join("");
|
|
5974
5974
|
}
|
|
5975
|
-
function
|
|
5975
|
+
function pt(t, e) {
|
|
5976
5976
|
const n = typeof t == "string" ? {} : { ...t.colorReplacements }, r = typeof t == "string" ? t : t.name;
|
|
5977
5977
|
for (const [o, s] of Object.entries(e?.colorReplacements || {}))
|
|
5978
5978
|
typeof s == "string" ? n[o] = s : o === r && Object.assign(n, s);
|
|
@@ -5987,17 +5987,17 @@ function ll(t) {
|
|
|
5987
5987
|
async function vo(t) {
|
|
5988
5988
|
return Promise.resolve(typeof t == "function" ? t() : t).then((e) => e.default || e);
|
|
5989
5989
|
}
|
|
5990
|
-
function
|
|
5990
|
+
function Cn(t) {
|
|
5991
5991
|
return !t || ["plaintext", "txt", "text", "plain"].includes(t);
|
|
5992
5992
|
}
|
|
5993
5993
|
function xo(t) {
|
|
5994
|
-
return t === "ansi" ||
|
|
5994
|
+
return t === "ansi" || Cn(t);
|
|
5995
5995
|
}
|
|
5996
|
-
function
|
|
5996
|
+
function wn(t) {
|
|
5997
5997
|
return t === "none";
|
|
5998
5998
|
}
|
|
5999
5999
|
function ul(t) {
|
|
6000
|
-
return
|
|
6000
|
+
return wn(t);
|
|
6001
6001
|
}
|
|
6002
6002
|
function Eo(t, e) {
|
|
6003
6003
|
if (!e)
|
|
@@ -6047,7 +6047,7 @@ function cl(t) {
|
|
|
6047
6047
|
};
|
|
6048
6048
|
}
|
|
6049
6049
|
const _n = "light-dark()", hl = ["color", "background-color"];
|
|
6050
|
-
function
|
|
6050
|
+
function pl(t, e) {
|
|
6051
6051
|
let n = 0;
|
|
6052
6052
|
const r = [];
|
|
6053
6053
|
for (const o of e)
|
|
@@ -6062,11 +6062,11 @@ function fl(t, e) {
|
|
|
6062
6062
|
offset: t.offset + n
|
|
6063
6063
|
}), r;
|
|
6064
6064
|
}
|
|
6065
|
-
function
|
|
6065
|
+
function fl(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 ? pl(o, s) : o;
|
|
6070
6070
|
})) : t;
|
|
6071
6071
|
}
|
|
6072
6072
|
function dl(t, e, n, r, o = "css-vars") {
|
|
@@ -6074,28 +6074,28 @@ function dl(t, e, n, r, o = "css-vars") {
|
|
|
6074
6074
|
content: t.content,
|
|
6075
6075
|
explanation: t.explanation,
|
|
6076
6076
|
offset: t.offset
|
|
6077
|
-
}, a = e.map((c) =>
|
|
6078
|
-
const
|
|
6079
|
-
return n + e[c] + (h === "color" ? "" :
|
|
6077
|
+
}, a = e.map((c) => ft(t.variants[c])), i = new Set(a.flatMap((c) => Object.keys(c))), l = {}, u = (c, h) => {
|
|
6078
|
+
const p = h === "color" ? "" : h === "background-color" ? "-bg" : `-${h}`;
|
|
6079
|
+
return n + e[c] + (h === "color" ? "" : p);
|
|
6080
6080
|
};
|
|
6081
6081
|
return a.forEach((c, h) => {
|
|
6082
|
-
for (const
|
|
6083
|
-
const d = c[
|
|
6084
|
-
if (h === 0 && r && hl.includes(
|
|
6082
|
+
for (const p of i) {
|
|
6083
|
+
const d = c[p] || "inherit";
|
|
6084
|
+
if (h === 0 && r && hl.includes(p))
|
|
6085
6085
|
if (r === _n && a.length > 1) {
|
|
6086
|
-
const
|
|
6087
|
-
if (
|
|
6086
|
+
const f = e.findIndex((g) => g === "light"), m = e.findIndex((g) => g === "dark");
|
|
6087
|
+
if (f === -1 || m === -1)
|
|
6088
6088
|
throw new F('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');
|
|
6089
|
-
const
|
|
6090
|
-
l[
|
|
6089
|
+
const b = a[f][p] || "inherit", y = a[m][p] || "inherit";
|
|
6090
|
+
l[p] = `light-dark(${b}, ${y})`, o === "css-vars" && (l[u(h, p)] = d);
|
|
6091
6091
|
} else
|
|
6092
|
-
l[
|
|
6092
|
+
l[p] = d;
|
|
6093
6093
|
else
|
|
6094
|
-
o === "css-vars" && (l[u(h,
|
|
6094
|
+
o === "css-vars" && (l[u(h, p)] = d);
|
|
6095
6095
|
}
|
|
6096
6096
|
}), s.htmlStyle = l, s;
|
|
6097
6097
|
}
|
|
6098
|
-
function
|
|
6098
|
+
function ft(t) {
|
|
6099
6099
|
const e = {};
|
|
6100
6100
|
if (t.color && (e.color = t.color), t.bgColor && (e["background-color"] = t.bgColor), t.fontStyle) {
|
|
6101
6101
|
t.fontStyle & z.Italic && (e["font-style"] = "italic"), t.fontStyle & z.Bold && (e["font-weight"] = "bold");
|
|
@@ -6227,7 +6227,7 @@ function yl() {
|
|
|
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 fl(n, o);
|
|
6231
6231
|
},
|
|
6232
6232
|
code(n) {
|
|
6233
6233
|
if (!this.options.decorations?.length)
|
|
@@ -6235,52 +6235,52 @@ function yl() {
|
|
|
6235
6235
|
const r = e(this), o = Array.from(n.children).filter((c) => c.type === "element" && c.tagName === "span");
|
|
6236
6236
|
if (o.length !== r.converter.lines.length)
|
|
6237
6237
|
throw new F(`Number of lines in code element (${o.length}) does not match the number of lines in the source (${r.converter.lines.length}). Failed to apply decorations.`);
|
|
6238
|
-
function s(c, h,
|
|
6239
|
-
const
|
|
6240
|
-
let
|
|
6241
|
-
if (h === 0 && (
|
|
6242
|
-
for (let _ = 0; _ <
|
|
6243
|
-
|
|
6244
|
-
if (
|
|
6238
|
+
function s(c, h, p, d) {
|
|
6239
|
+
const f = o[c];
|
|
6240
|
+
let m = "", b = -1, y = -1;
|
|
6241
|
+
if (h === 0 && (b = 0), p === 0 && (y = 0), p === Number.POSITIVE_INFINITY && (y = f.children.length), b === -1 || y === -1)
|
|
6242
|
+
for (let _ = 0; _ < f.children.length; _++)
|
|
6243
|
+
m += Ro(f.children[_]), b === -1 && m.length === h && (b = _ + 1), y === -1 && m.length === p && (y = _ + 1);
|
|
6244
|
+
if (b === -1)
|
|
6245
6245
|
throw new F(`Failed to find start index for decoration ${JSON.stringify(d.start)}`);
|
|
6246
6246
|
if (y === -1)
|
|
6247
6247
|
throw new F(`Failed to find end index for decoration ${JSON.stringify(d.end)}`);
|
|
6248
|
-
const
|
|
6249
|
-
if (!d.alwaysWrap &&
|
|
6250
|
-
i(
|
|
6251
|
-
else if (!d.alwaysWrap &&
|
|
6252
|
-
i(
|
|
6248
|
+
const g = f.children.slice(b, y);
|
|
6249
|
+
if (!d.alwaysWrap && g.length === f.children.length)
|
|
6250
|
+
i(f, d, "line");
|
|
6251
|
+
else if (!d.alwaysWrap && g.length === 1 && g[0].type === "element")
|
|
6252
|
+
i(g[0], d, "token");
|
|
6253
6253
|
else {
|
|
6254
6254
|
const _ = {
|
|
6255
6255
|
type: "element",
|
|
6256
6256
|
tagName: "span",
|
|
6257
6257
|
properties: {},
|
|
6258
|
-
children:
|
|
6258
|
+
children: g
|
|
6259
6259
|
};
|
|
6260
|
-
i(_, d, "wrapper"),
|
|
6260
|
+
i(_, d, "wrapper"), f.children.splice(b, g.length, _);
|
|
6261
6261
|
}
|
|
6262
6262
|
}
|
|
6263
6263
|
function a(c, h) {
|
|
6264
6264
|
o[c] = i(o[c], h, "line");
|
|
6265
6265
|
}
|
|
6266
|
-
function i(c, h,
|
|
6267
|
-
const d = h.properties || {},
|
|
6266
|
+
function i(c, h, p) {
|
|
6267
|
+
const d = h.properties || {}, f = h.transform || ((m) => m);
|
|
6268
6268
|
return c.tagName = h.tagName || "span", c.properties = {
|
|
6269
6269
|
...c.properties,
|
|
6270
6270
|
...d,
|
|
6271
6271
|
class: c.properties.class
|
|
6272
|
-
}, h.properties?.class && Eo(c, h.properties.class), c =
|
|
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) {
|
|
6276
|
-
const { start: h, end:
|
|
6277
|
-
if (h.line ===
|
|
6278
|
-
s(h.line, h.character,
|
|
6279
|
-
else if (h.line <
|
|
6276
|
+
const { start: h, end: p } = c;
|
|
6277
|
+
if (h.line === p.line)
|
|
6278
|
+
s(h.line, h.character, p.character, c);
|
|
6279
|
+
else if (h.line < p.line) {
|
|
6280
6280
|
s(h.line, h.character, Number.POSITIVE_INFINITY, c);
|
|
6281
|
-
for (let d = h.line + 1; d <
|
|
6281
|
+
for (let d = h.line + 1; d < p.line; d++)
|
|
6282
6282
|
l.unshift(() => a(d, c));
|
|
6283
|
-
s(
|
|
6283
|
+
s(p.line, 0, p.character, c);
|
|
6284
6284
|
}
|
|
6285
6285
|
}
|
|
6286
6286
|
l.forEach((c) => c());
|
|
@@ -6305,19 +6305,19 @@ function bl(t) {
|
|
|
6305
6305
|
function Ro(t) {
|
|
6306
6306
|
return t.type === "text" ? t.value : t.type === "element" ? t.children.map(Ro).join("") : "";
|
|
6307
6307
|
}
|
|
6308
|
-
const
|
|
6308
|
+
const Cl = [
|
|
6309
6309
|
/* @__PURE__ */ yl()
|
|
6310
6310
|
];
|
|
6311
6311
|
function dt(t) {
|
|
6312
|
-
const e =
|
|
6312
|
+
const e = wl(t.transformers || []);
|
|
6313
6313
|
return [
|
|
6314
6314
|
...e.pre,
|
|
6315
6315
|
...e.normal,
|
|
6316
6316
|
...e.post,
|
|
6317
|
-
...
|
|
6317
|
+
...Cl
|
|
6318
6318
|
];
|
|
6319
6319
|
}
|
|
6320
|
-
function
|
|
6320
|
+
function wl(t) {
|
|
6321
6321
|
const e = [], n = [], r = [];
|
|
6322
6322
|
for (const o of t)
|
|
6323
6323
|
switch (o.enforce) {
|
|
@@ -6559,7 +6559,7 @@ const El = {
|
|
|
6559
6559
|
brightWhite: "#FFFFFF"
|
|
6560
6560
|
};
|
|
6561
6561
|
function Al(t, e, n) {
|
|
6562
|
-
const r =
|
|
6562
|
+
const r = pt(t, n), o = St(e), s = Object.fromEntries(
|
|
6563
6563
|
de.map((l) => {
|
|
6564
6564
|
const u = `terminal.ansi${l[0].toUpperCase()}${l.substring(1)}`, c = t.colors?.[u];
|
|
6565
6565
|
return [l, c || El[l]];
|
|
@@ -6569,14 +6569,14 @@ function Al(t, e, n) {
|
|
|
6569
6569
|
(l) => i.parse(l[0]).map((u) => {
|
|
6570
6570
|
let c, h;
|
|
6571
6571
|
u.decorations.has("reverse") ? (c = u.background ? a.value(u.background) : t.bg, h = u.foreground ? a.value(u.foreground) : t.fg) : (c = u.foreground ? a.value(u.foreground) : t.fg, h = u.background ? a.value(u.background) : void 0), c = ue(c, r), h = ue(h, r), u.decorations.has("dim") && (c = Rl(c));
|
|
6572
|
-
let
|
|
6573
|
-
return u.decorations.has("bold") && (
|
|
6572
|
+
let p = z.None;
|
|
6573
|
+
return u.decorations.has("bold") && (p |= z.Bold), u.decorations.has("italic") && (p |= z.Italic), u.decorations.has("underline") && (p |= z.Underline), u.decorations.has("strikethrough") && (p |= z.Strikethrough), {
|
|
6574
6574
|
content: u.value,
|
|
6575
6575
|
offset: l[1],
|
|
6576
6576
|
// TODO: more accurate offset? might need to fork ansi-sequence-parser
|
|
6577
6577
|
color: c,
|
|
6578
6578
|
bgColor: h,
|
|
6579
|
-
fontStyle:
|
|
6579
|
+
fontStyle: p
|
|
6580
6580
|
};
|
|
6581
6581
|
})
|
|
6582
6582
|
);
|
|
@@ -6596,7 +6596,7 @@ function Sn(t, e, n = {}) {
|
|
|
6596
6596
|
lang: r = "text",
|
|
6597
6597
|
theme: o = t.getLoadedThemes()[0]
|
|
6598
6598
|
} = n;
|
|
6599
|
-
if (
|
|
6599
|
+
if (Cn(r) || wn(o))
|
|
6600
6600
|
return St(e).map((l) => [{ content: l[0], offset: l[1] }]);
|
|
6601
6601
|
const { theme: s, colorMap: a } = t.setTheme(o);
|
|
6602
6602
|
if (r === "ansi")
|
|
@@ -6617,7 +6617,7 @@ function Il(...t) {
|
|
|
6617
6617
|
lang: o = "text",
|
|
6618
6618
|
theme: s = e.getLoadedThemes()[0]
|
|
6619
6619
|
} = r;
|
|
6620
|
-
if (
|
|
6620
|
+
if (Cn(o) || wn(s))
|
|
6621
6621
|
throw new F("Plain language does not have grammar state");
|
|
6622
6622
|
if (o === "ansi")
|
|
6623
6623
|
throw new F("ANSI language does not have grammar state");
|
|
@@ -6637,7 +6637,7 @@ function Nl(t, e, n, r, o) {
|
|
|
6637
6637
|
return kt(s.tokens, a), s.tokens;
|
|
6638
6638
|
}
|
|
6639
6639
|
function gt(t, e, n, r, o) {
|
|
6640
|
-
const s =
|
|
6640
|
+
const s = pt(n, o), {
|
|
6641
6641
|
tokenizeMaxLineLength: a = 0,
|
|
6642
6642
|
tokenizeTimeLimit: i = 500
|
|
6643
6643
|
} = o, l = St(t);
|
|
@@ -6653,34 +6653,34 @@ function gt(t, e, n, r, o) {
|
|
|
6653
6653
|
}
|
|
6654
6654
|
).stateStack : Zt, c = [];
|
|
6655
6655
|
const h = [];
|
|
6656
|
-
for (let
|
|
6657
|
-
const [
|
|
6658
|
-
if (
|
|
6656
|
+
for (let p = 0, d = l.length; p < d; p++) {
|
|
6657
|
+
const [f, m] = l[p];
|
|
6658
|
+
if (f === "") {
|
|
6659
6659
|
c = [], h.push([]);
|
|
6660
6660
|
continue;
|
|
6661
6661
|
}
|
|
6662
|
-
if (a > 0 &&
|
|
6662
|
+
if (a > 0 && f.length >= a) {
|
|
6663
6663
|
c = [], h.push([{
|
|
6664
|
-
content:
|
|
6665
|
-
offset:
|
|
6664
|
+
content: f,
|
|
6665
|
+
offset: m,
|
|
6666
6666
|
color: "",
|
|
6667
6667
|
fontStyle: 0
|
|
6668
6668
|
}]);
|
|
6669
6669
|
continue;
|
|
6670
6670
|
}
|
|
6671
|
-
let
|
|
6672
|
-
o.includeExplanation && (
|
|
6673
|
-
const _ = e.tokenizeLine2(
|
|
6671
|
+
let b, y, g;
|
|
6672
|
+
o.includeExplanation && (b = e.tokenizeLine(f, u, i), y = b.tokens, g = 0);
|
|
6673
|
+
const _ = e.tokenizeLine2(f, u, i), S = _.tokens.length / 2;
|
|
6674
6674
|
for (let A = 0; A < S; A++) {
|
|
6675
|
-
const D = _.tokens[2 * A], L = A + 1 < S ? _.tokens[2 * A + 2] :
|
|
6675
|
+
const D = _.tokens[2 * A], L = A + 1 < S ? _.tokens[2 * A + 2] : f.length;
|
|
6676
6676
|
if (D === L)
|
|
6677
6677
|
continue;
|
|
6678
6678
|
const j = _.tokens[2 * A + 1], Z = ue(
|
|
6679
6679
|
r[Re.getForeground(j)],
|
|
6680
6680
|
s
|
|
6681
6681
|
), ee = Re.getFontStyle(j), ce = {
|
|
6682
|
-
content:
|
|
6683
|
-
offset:
|
|
6682
|
+
content: f.substring(D, L),
|
|
6683
|
+
offset: m + D,
|
|
6684
6684
|
color: Z,
|
|
6685
6685
|
fontStyle: ee
|
|
6686
6686
|
};
|
|
@@ -6707,7 +6707,7 @@ function gt(t, e, n, r, o) {
|
|
|
6707
6707
|
ce.explanation = [];
|
|
6708
6708
|
let R = 0;
|
|
6709
6709
|
for (; D + R < L; ) {
|
|
6710
|
-
const k = y[
|
|
6710
|
+
const k = y[g], G = f.substring(
|
|
6711
6711
|
k.startIndex,
|
|
6712
6712
|
k.endIndex
|
|
6713
6713
|
);
|
|
@@ -6719,7 +6719,7 @@ function gt(t, e, n, r, o) {
|
|
|
6719
6719
|
te,
|
|
6720
6720
|
k.scopes
|
|
6721
6721
|
)
|
|
6722
|
-
}),
|
|
6722
|
+
}), g += 1;
|
|
6723
6723
|
}
|
|
6724
6724
|
}
|
|
6725
6725
|
c.push(ce);
|
|
@@ -6781,20 +6781,20 @@ function Io(t, e, n) {
|
|
|
6781
6781
|
...o.map((l) => l.tokens)
|
|
6782
6782
|
), a = s[0].map(
|
|
6783
6783
|
(l, u) => l.map((c, h) => {
|
|
6784
|
-
const
|
|
6784
|
+
const p = {
|
|
6785
6785
|
content: c.content,
|
|
6786
6786
|
variants: {},
|
|
6787
6787
|
offset: c.offset
|
|
6788
6788
|
};
|
|
6789
|
-
return "includeExplanation" in n && n.includeExplanation && (
|
|
6789
|
+
return "includeExplanation" in n && n.includeExplanation && (p.explanation = c.explanation), s.forEach((d, f) => {
|
|
6790
6790
|
const {
|
|
6791
|
-
content:
|
|
6792
|
-
explanation:
|
|
6791
|
+
content: m,
|
|
6792
|
+
explanation: b,
|
|
6793
6793
|
offset: y,
|
|
6794
|
-
...
|
|
6794
|
+
...g
|
|
6795
6795
|
} = d[u][h];
|
|
6796
|
-
|
|
6797
|
-
}),
|
|
6796
|
+
p.variants[r[f].color] = g;
|
|
6797
|
+
}), p;
|
|
6798
6798
|
})
|
|
6799
6799
|
), i = o[0].state ? new Le(
|
|
6800
6800
|
Object.fromEntries(o.map((l) => [l.theme, l.state?.getInternalStack(l.theme)])),
|
|
@@ -6832,22 +6832,22 @@ function mt(t, e, n) {
|
|
|
6832
6832
|
defaultColor: u = "light",
|
|
6833
6833
|
cssVariablePrefix: c = "--shiki-",
|
|
6834
6834
|
colorsRendering: h = "css-vars"
|
|
6835
|
-
} = n,
|
|
6836
|
-
if (
|
|
6835
|
+
} = n, p = Object.entries(n.themes).filter((y) => y[1]).map((y) => ({ color: y[0], theme: y[1] })).sort((y, g) => y.color === u ? -1 : g.color === u ? 1 : 0);
|
|
6836
|
+
if (p.length === 0)
|
|
6837
6837
|
throw new F("`themes` option must not be empty");
|
|
6838
6838
|
const d = Io(
|
|
6839
6839
|
t,
|
|
6840
6840
|
e,
|
|
6841
6841
|
n
|
|
6842
6842
|
);
|
|
6843
|
-
if (l = We(d), u && _n !== u && !
|
|
6843
|
+
if (l = We(d), u && _n !== u && !p.find((y) => y.color === u))
|
|
6844
6844
|
throw new F(`\`themes\` option must contain the defaultColor key \`${u}\``);
|
|
6845
|
-
const
|
|
6846
|
-
s = d.map((y) => y.map((
|
|
6847
|
-
const
|
|
6848
|
-
o = rr(
|
|
6845
|
+
const f = p.map((y) => t.getTheme(y.theme)), m = p.map((y) => y.color);
|
|
6846
|
+
s = d.map((y) => y.map((g) => dl(g, m, c, u, h))), l && kt(s, l);
|
|
6847
|
+
const b = p.map((y) => pt(y.theme, n));
|
|
6848
|
+
o = rr(p, f, b, c, u, "fg", h), r = rr(p, f, b, c, u, "bg", h), a = `shiki-themes ${f.map((y) => y.name).join(" ")}`, i = u ? void 0 : [o, r].join(";");
|
|
6849
6849
|
} else if ("theme" in n) {
|
|
6850
|
-
const u =
|
|
6850
|
+
const u = pt(n.theme, n);
|
|
6851
6851
|
s = Sn(
|
|
6852
6852
|
t,
|
|
6853
6853
|
e,
|
|
@@ -6871,11 +6871,11 @@ function rr(t, e, n, r, o, s, a) {
|
|
|
6871
6871
|
const u = ue(e[l][s], n[l]) || "inherit", c = `${r + i.color}${s === "bg" ? "-bg" : ""}:${u}`;
|
|
6872
6872
|
if (l === 0 && o) {
|
|
6873
6873
|
if (o === _n && t.length > 1) {
|
|
6874
|
-
const h = t.findIndex((
|
|
6875
|
-
if (h === -1 ||
|
|
6874
|
+
const h = t.findIndex((m) => m.color === "light"), p = t.findIndex((m) => m.color === "dark");
|
|
6875
|
+
if (h === -1 || p === -1)
|
|
6876
6876
|
throw new F('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');
|
|
6877
|
-
const d = ue(e[h][s], n[h]) || "inherit",
|
|
6878
|
-
return `light-dark(${d}, ${
|
|
6877
|
+
const d = ue(e[h][s], n[h]) || "inherit", f = ue(e[p][s], n[p]) || "inherit";
|
|
6878
|
+
return `light-dark(${d}, ${f});${c}`;
|
|
6879
6879
|
}
|
|
6880
6880
|
return u;
|
|
6881
6881
|
}
|
|
@@ -6889,8 +6889,8 @@ function yt(t, e, n, r = {
|
|
|
6889
6889
|
codeToTokens: (o, s) => mt(t, o, s)
|
|
6890
6890
|
}) {
|
|
6891
6891
|
let o = e;
|
|
6892
|
-
for (const
|
|
6893
|
-
o =
|
|
6892
|
+
for (const f of dt(n))
|
|
6893
|
+
o = f.preprocess?.call(r, o, n) || o;
|
|
6894
6894
|
let {
|
|
6895
6895
|
tokens: s,
|
|
6896
6896
|
fg: a,
|
|
@@ -6901,17 +6901,17 @@ function yt(t, e, n, r = {
|
|
|
6901
6901
|
} = mt(t, o, n);
|
|
6902
6902
|
const {
|
|
6903
6903
|
mergeWhitespaces: h = !0,
|
|
6904
|
-
mergeSameStyleTokens:
|
|
6904
|
+
mergeSameStyleTokens: p = !1
|
|
6905
6905
|
} = n;
|
|
6906
|
-
h === !0 ? s = Dl(s) : h === "never" && (s = Gl(s)),
|
|
6906
|
+
h === !0 ? s = Dl(s) : h === "never" && (s = Gl(s)), p && (s = Fl(s));
|
|
6907
6907
|
const d = {
|
|
6908
6908
|
...r,
|
|
6909
6909
|
get source() {
|
|
6910
6910
|
return o;
|
|
6911
6911
|
}
|
|
6912
6912
|
};
|
|
6913
|
-
for (const
|
|
6914
|
-
s =
|
|
6913
|
+
for (const f of dt(n))
|
|
6914
|
+
s = f.tokens?.call(d, s) || s;
|
|
6915
6915
|
return Ol(
|
|
6916
6916
|
s,
|
|
6917
6917
|
{
|
|
@@ -6945,7 +6945,7 @@ function Ol(t, e, n, r = We(t)) {
|
|
|
6945
6945
|
...Object.fromEntries(
|
|
6946
6946
|
Array.from(
|
|
6947
6947
|
Object.entries(e.meta || {})
|
|
6948
|
-
).filter(([
|
|
6948
|
+
).filter(([f]) => !f.startsWith("_"))
|
|
6949
6949
|
)
|
|
6950
6950
|
},
|
|
6951
6951
|
children: []
|
|
@@ -6955,7 +6955,7 @@ function Ol(t, e, n, r = We(t)) {
|
|
|
6955
6955
|
properties: {},
|
|
6956
6956
|
children: s
|
|
6957
6957
|
};
|
|
6958
|
-
const h = [],
|
|
6958
|
+
const h = [], p = {
|
|
6959
6959
|
...n,
|
|
6960
6960
|
structure: i,
|
|
6961
6961
|
addClassToHast: Eo,
|
|
@@ -6981,46 +6981,76 @@ function Ol(t, e, n, r = We(t)) {
|
|
|
6981
6981
|
return h;
|
|
6982
6982
|
}
|
|
6983
6983
|
};
|
|
6984
|
-
if (t.forEach((
|
|
6985
|
-
|
|
6984
|
+
if (t.forEach((f, m) => {
|
|
6985
|
+
m && (i === "inline" ? a.children.push({ type: "element", tagName: "br", properties: {}, children: [] }) : i === "classic" && s.push({ type: "text", value: `
|
|
6986
6986
|
` }));
|
|
6987
|
-
let
|
|
6987
|
+
let b = {
|
|
6988
6988
|
type: "element",
|
|
6989
6989
|
tagName: "span",
|
|
6990
6990
|
properties: { class: "line" },
|
|
6991
6991
|
children: []
|
|
6992
6992
|
}, y = 0;
|
|
6993
|
-
for (const
|
|
6993
|
+
for (const g of f) {
|
|
6994
6994
|
let _ = {
|
|
6995
6995
|
type: "element",
|
|
6996
6996
|
tagName: "span",
|
|
6997
6997
|
properties: {
|
|
6998
|
-
...
|
|
6998
|
+
...g.htmlAttrs
|
|
6999
6999
|
},
|
|
7000
|
-
children: [{ type: "text", value:
|
|
7000
|
+
children: [{ type: "text", value: g.content }]
|
|
7001
7001
|
};
|
|
7002
|
-
const S = rn(
|
|
7002
|
+
const S = rn(g.htmlStyle || ft(g));
|
|
7003
7003
|
S && (_.properties.style = S);
|
|
7004
7004
|
for (const A of o)
|
|
7005
|
-
_ = A?.span?.call(
|
|
7006
|
-
i === "inline" ? a.children.push(_) : i === "classic" &&
|
|
7005
|
+
_ = A?.span?.call(p, _, m + 1, y, b, g) || _;
|
|
7006
|
+
i === "inline" ? a.children.push(_) : i === "classic" && b.children.push(_), y += g.content.length;
|
|
7007
7007
|
}
|
|
7008
7008
|
if (i === "classic") {
|
|
7009
|
-
for (const
|
|
7010
|
-
|
|
7011
|
-
h.push(
|
|
7012
|
-
}
|
|
7009
|
+
for (const g of o)
|
|
7010
|
+
b = g?.line?.call(p, b, m + 1) || b;
|
|
7011
|
+
h.push(b), s.push(b);
|
|
7012
|
+
} else i === "inline" && h.push(b);
|
|
7013
7013
|
}), i === "classic") {
|
|
7014
|
-
for (const
|
|
7015
|
-
c =
|
|
7014
|
+
for (const f of o)
|
|
7015
|
+
c = f?.code?.call(p, c) || c;
|
|
7016
7016
|
u.children.push(c);
|
|
7017
|
-
for (const
|
|
7018
|
-
u =
|
|
7017
|
+
for (const f of o)
|
|
7018
|
+
u = f?.pre?.call(p, u) || u;
|
|
7019
7019
|
a.children.push(u);
|
|
7020
|
+
} else if (i === "inline") {
|
|
7021
|
+
const f = [];
|
|
7022
|
+
let m = {
|
|
7023
|
+
type: "element",
|
|
7024
|
+
tagName: "span",
|
|
7025
|
+
properties: { class: "line" },
|
|
7026
|
+
children: []
|
|
7027
|
+
};
|
|
7028
|
+
for (const g of a.children)
|
|
7029
|
+
g.type === "element" && g.tagName === "br" ? (f.push(m), m = {
|
|
7030
|
+
type: "element",
|
|
7031
|
+
tagName: "span",
|
|
7032
|
+
properties: { class: "line" },
|
|
7033
|
+
children: []
|
|
7034
|
+
}) : (g.type === "element" || g.type === "text") && m.children.push(g);
|
|
7035
|
+
f.push(m);
|
|
7036
|
+
let y = {
|
|
7037
|
+
type: "element",
|
|
7038
|
+
tagName: "code",
|
|
7039
|
+
properties: {},
|
|
7040
|
+
children: f
|
|
7041
|
+
};
|
|
7042
|
+
for (const g of o)
|
|
7043
|
+
y = g?.code?.call(p, y) || y;
|
|
7044
|
+
a.children = [];
|
|
7045
|
+
for (let g = 0; g < y.children.length; g++) {
|
|
7046
|
+
g > 0 && a.children.push({ type: "element", tagName: "br", properties: {}, children: [] });
|
|
7047
|
+
const _ = y.children[g];
|
|
7048
|
+
_.type === "element" && a.children.push(..._.children);
|
|
7049
|
+
}
|
|
7020
7050
|
}
|
|
7021
7051
|
let d = a;
|
|
7022
|
-
for (const
|
|
7023
|
-
d =
|
|
7052
|
+
for (const f of o)
|
|
7053
|
+
d = f?.root?.call(p, d) || d;
|
|
7024
7054
|
return r && kt(d, r), d;
|
|
7025
7055
|
}
|
|
7026
7056
|
function Dl(t) {
|
|
@@ -7075,7 +7105,7 @@ function Fl(t) {
|
|
|
7075
7105
|
n.push({ ...r });
|
|
7076
7106
|
continue;
|
|
7077
7107
|
}
|
|
7078
|
-
const o = n[n.length - 1], s = rn(o.htmlStyle ||
|
|
7108
|
+
const o = n[n.length - 1], s = rn(o.htmlStyle || ft(o)), a = rn(r.htmlStyle || ft(r)), i = o.fontStyle && (o.fontStyle & z.Underline || o.fontStyle & z.Strikethrough), l = r.fontStyle && (r.fontStyle & z.Underline || r.fontStyle & z.Strikethrough);
|
|
7079
7109
|
!i && !l && s === a ? o.content += r.content : n.push({ ...r });
|
|
7080
7110
|
}
|
|
7081
7111
|
return n;
|
|
@@ -7256,9 +7286,11 @@ class Hl extends Ya {
|
|
|
7256
7286
|
]), this._loadedLanguagesCache;
|
|
7257
7287
|
}
|
|
7258
7288
|
resolveEmbeddedLanguages(e) {
|
|
7259
|
-
|
|
7260
|
-
|
|
7261
|
-
|
|
7289
|
+
this._langMap.set(e.name, e), this._langGraph.set(e.name, e);
|
|
7290
|
+
const n = e.embeddedLanguages ?? e.embeddedLangs;
|
|
7291
|
+
if (n)
|
|
7292
|
+
for (const r of n)
|
|
7293
|
+
this._langGraph.set(r, this._langMap.get(r));
|
|
7262
7294
|
}
|
|
7263
7295
|
}
|
|
7264
7296
|
class Wl {
|
|
@@ -7306,26 +7338,26 @@ function Vl(t) {
|
|
|
7306
7338
|
throw new ve("`engine` option is required for synchronous mode");
|
|
7307
7339
|
const n = (t.langs || []).flat(1), r = (t.themes || []).flat(1).map(kn), o = new Wl(t.engine, n), s = new Hl(o, r, n, t.langAlias);
|
|
7308
7340
|
let a;
|
|
7309
|
-
function i(
|
|
7310
|
-
|
|
7311
|
-
const _ = s.getGrammar(typeof
|
|
7341
|
+
function i(g) {
|
|
7342
|
+
b();
|
|
7343
|
+
const _ = s.getGrammar(typeof g == "string" ? g : g.name);
|
|
7312
7344
|
if (!_)
|
|
7313
|
-
throw new ve(`Language \`${
|
|
7345
|
+
throw new ve(`Language \`${g}\` not found, you may need to load it first`);
|
|
7314
7346
|
return _;
|
|
7315
7347
|
}
|
|
7316
|
-
function l(
|
|
7317
|
-
if (
|
|
7348
|
+
function l(g) {
|
|
7349
|
+
if (g === "none")
|
|
7318
7350
|
return { bg: "", fg: "", name: "none", settings: [], type: "dark" };
|
|
7319
|
-
|
|
7320
|
-
const _ = s.getTheme(
|
|
7351
|
+
b();
|
|
7352
|
+
const _ = s.getTheme(g);
|
|
7321
7353
|
if (!_)
|
|
7322
|
-
throw new ve(`Theme \`${
|
|
7354
|
+
throw new ve(`Theme \`${g}\` not found, you may need to load it first`);
|
|
7323
7355
|
return _;
|
|
7324
7356
|
}
|
|
7325
|
-
function u(
|
|
7326
|
-
|
|
7327
|
-
const _ = l(
|
|
7328
|
-
a !==
|
|
7357
|
+
function u(g) {
|
|
7358
|
+
b();
|
|
7359
|
+
const _ = l(g);
|
|
7360
|
+
a !== g && (s.setTheme(_), a = g);
|
|
7329
7361
|
const S = s.getColorMap();
|
|
7330
7362
|
return {
|
|
7331
7363
|
theme: _,
|
|
@@ -7333,26 +7365,26 @@ function Vl(t) {
|
|
|
7333
7365
|
};
|
|
7334
7366
|
}
|
|
7335
7367
|
function c() {
|
|
7336
|
-
return
|
|
7368
|
+
return b(), s.getLoadedThemes();
|
|
7337
7369
|
}
|
|
7338
7370
|
function h() {
|
|
7339
|
-
return
|
|
7371
|
+
return b(), s.getLoadedLanguages();
|
|
7340
7372
|
}
|
|
7341
|
-
function
|
|
7342
|
-
|
|
7373
|
+
function p(...g) {
|
|
7374
|
+
b(), s.loadLanguages(g.flat(1));
|
|
7343
7375
|
}
|
|
7344
|
-
async function d(...
|
|
7345
|
-
return
|
|
7376
|
+
async function d(...g) {
|
|
7377
|
+
return p(await No(g));
|
|
7346
7378
|
}
|
|
7347
|
-
function
|
|
7348
|
-
|
|
7349
|
-
for (const _ of
|
|
7379
|
+
function f(...g) {
|
|
7380
|
+
b();
|
|
7381
|
+
for (const _ of g.flat(1))
|
|
7350
7382
|
s.loadTheme(_);
|
|
7351
7383
|
}
|
|
7352
|
-
async function
|
|
7353
|
-
return
|
|
7384
|
+
async function m(...g) {
|
|
7385
|
+
return b(), f(await Lo(g));
|
|
7354
7386
|
}
|
|
7355
|
-
function
|
|
7387
|
+
function b() {
|
|
7356
7388
|
if (e)
|
|
7357
7389
|
throw new ve("Shiki instance has been disposed");
|
|
7358
7390
|
}
|
|
@@ -7366,9 +7398,9 @@ function Vl(t) {
|
|
|
7366
7398
|
getLoadedThemes: c,
|
|
7367
7399
|
getLoadedLanguages: h,
|
|
7368
7400
|
loadLanguage: d,
|
|
7369
|
-
loadLanguageSync:
|
|
7370
|
-
loadTheme:
|
|
7371
|
-
loadThemeSync:
|
|
7401
|
+
loadLanguageSync: p,
|
|
7402
|
+
loadTheme: m,
|
|
7403
|
+
loadThemeSync: f,
|
|
7372
7404
|
dispose: y,
|
|
7373
7405
|
[Symbol.dispose]: y
|
|
7374
7406
|
};
|
|
@@ -7456,17 +7488,17 @@ function Ql(t, e) {
|
|
|
7456
7488
|
lazy: c = !1,
|
|
7457
7489
|
...h
|
|
7458
7490
|
} = e;
|
|
7459
|
-
function
|
|
7460
|
-
const y = `${d}:${
|
|
7461
|
-
if (
|
|
7462
|
-
return
|
|
7491
|
+
function p(d, f, m = "", b = {}) {
|
|
7492
|
+
const y = `${d}:${m}:${f}`, g = o?.get(y);
|
|
7493
|
+
if (g)
|
|
7494
|
+
return g;
|
|
7463
7495
|
const _ = {
|
|
7464
7496
|
...h,
|
|
7465
7497
|
lang: d,
|
|
7466
7498
|
meta: {
|
|
7467
7499
|
...h.meta,
|
|
7468
|
-
...
|
|
7469
|
-
__raw:
|
|
7500
|
+
...b,
|
|
7501
|
+
__raw: m
|
|
7470
7502
|
}
|
|
7471
7503
|
};
|
|
7472
7504
|
n && (_.transformers = [
|
|
@@ -7477,10 +7509,10 @@ function Ql(t, e) {
|
|
|
7477
7509
|
return this.addClassToHast(S, `${Zl}${d}`), S;
|
|
7478
7510
|
}
|
|
7479
7511
|
}
|
|
7480
|
-
]), l &&
|
|
7481
|
-
`) && (
|
|
7512
|
+
]), l && f.endsWith(`
|
|
7513
|
+
`) && (f = f.slice(0, -1));
|
|
7482
7514
|
try {
|
|
7483
|
-
const S = t.codeToHast(
|
|
7515
|
+
const S = t.codeToHast(f, _);
|
|
7484
7516
|
return o?.set(y, S), S;
|
|
7485
7517
|
} catch (S) {
|
|
7486
7518
|
if (i)
|
|
@@ -7490,36 +7522,36 @@ function Ql(t, e) {
|
|
|
7490
7522
|
}
|
|
7491
7523
|
}
|
|
7492
7524
|
return (d) => {
|
|
7493
|
-
const
|
|
7494
|
-
if (Xr(d, "element", (
|
|
7495
|
-
let
|
|
7496
|
-
if (!y ||
|
|
7525
|
+
const f = [];
|
|
7526
|
+
if (Xr(d, "element", (m, b, y) => {
|
|
7527
|
+
let g;
|
|
7528
|
+
if (!y || b == null)
|
|
7497
7529
|
return;
|
|
7498
|
-
if (
|
|
7499
|
-
|
|
7500
|
-
else if (
|
|
7501
|
-
|
|
7530
|
+
if (m.tagName === "pre")
|
|
7531
|
+
g = Jl;
|
|
7532
|
+
else if (m.tagName === "code" && u)
|
|
7533
|
+
g = Yl[u];
|
|
7502
7534
|
else
|
|
7503
7535
|
return;
|
|
7504
|
-
const _ =
|
|
7536
|
+
const _ = g(d, m);
|
|
7505
7537
|
if (!_)
|
|
7506
7538
|
return;
|
|
7507
7539
|
let S, A = !1;
|
|
7508
7540
|
if (_.lang ? t.getLoadedLanguages().includes(_.lang) || xo(_.lang) ? S = _.lang : c ? (A = !0, S = _.lang) : a && (S = a) : S = s, !S)
|
|
7509
7541
|
return;
|
|
7510
|
-
const D = _.meta ? r?.(_.meta,
|
|
7511
|
-
const Z =
|
|
7542
|
+
const D = _.meta ? r?.(_.meta, m, d) : void 0, L = (j) => {
|
|
7543
|
+
const Z = p(j, _.code, _.meta, D ?? {});
|
|
7512
7544
|
if (Z) {
|
|
7513
7545
|
if (_.type === "inline") {
|
|
7514
7546
|
const ee = Z.children[0];
|
|
7515
7547
|
ee.type === "element" && ee.tagName === "pre" && (ee.tagName = "span");
|
|
7516
7548
|
}
|
|
7517
|
-
y.children[
|
|
7549
|
+
y.children[b] = Z;
|
|
7518
7550
|
}
|
|
7519
7551
|
};
|
|
7520
7552
|
if (A)
|
|
7521
7553
|
try {
|
|
7522
|
-
|
|
7554
|
+
f.push(t.loadLanguage(S).then(() => L(S)));
|
|
7523
7555
|
} catch (j) {
|
|
7524
7556
|
if (a)
|
|
7525
7557
|
return L(a);
|
|
@@ -7530,11 +7562,11 @@ function Ql(t, e) {
|
|
|
7530
7562
|
else
|
|
7531
7563
|
L(S);
|
|
7532
7564
|
return "skip";
|
|
7533
|
-
}),
|
|
7534
|
-
async function
|
|
7535
|
-
await Promise.all(
|
|
7565
|
+
}), f.length > 0) {
|
|
7566
|
+
async function m() {
|
|
7567
|
+
await Promise.all(f);
|
|
7536
7568
|
}
|
|
7537
|
-
return
|
|
7569
|
+
return m();
|
|
7538
7570
|
}
|
|
7539
7571
|
};
|
|
7540
7572
|
}
|
|
@@ -7666,8 +7698,8 @@ function au(t, e = {}) {
|
|
|
7666
7698
|
let u = 0;
|
|
7667
7699
|
a.filter((h) => h.type === "GroupOpen").forEach((h) => {
|
|
7668
7700
|
h.kind === "capturing" ? h.number = ++u : h.raw === "(" && l.push(h);
|
|
7669
|
-
}), u || l.forEach((h,
|
|
7670
|
-
h.kind = "capturing", h.number =
|
|
7701
|
+
}), u || l.forEach((h, p) => {
|
|
7702
|
+
h.kind = "capturing", h.number = p + 1;
|
|
7671
7703
|
});
|
|
7672
7704
|
const c = u || l.length;
|
|
7673
7705
|
return { tokens: a.map((h) => h.type === "EscapedNumber" ? Au(h, c) : h).flat(), flags: r };
|
|
@@ -7758,11 +7790,11 @@ function uu(t) {
|
|
|
7758
7790
|
if (!e || !vn.has(e.groups.name)) throw new Error(`Invalid POSIX class "${t}"`);
|
|
7759
7791
|
return ge("posix", t, { value: e.groups.name, negate: !!e.groups.negate });
|
|
7760
7792
|
}
|
|
7761
|
-
return t === "-" ?
|
|
7793
|
+
return t === "-" ? pu(t) : t === "&&" ? fu(t) : se(Pe(t), t);
|
|
7762
7794
|
}
|
|
7763
7795
|
function Oo(t, { inCharClass: e }) {
|
|
7764
7796
|
const n = t[1];
|
|
7765
|
-
if (n === "c" || n === "C") return
|
|
7797
|
+
if (n === "c" || n === "C") return wu(t);
|
|
7766
7798
|
if ("dDhHsSwW".includes(n)) return ku(t);
|
|
7767
7799
|
if (t.startsWith(B`\o{`)) throw new Error(`Incomplete, invalid, or unsupported octal code point "${t}"`);
|
|
7768
7800
|
if (/^\\[pP]\{/.test(t)) {
|
|
@@ -7801,10 +7833,10 @@ function se(t, e) {
|
|
|
7801
7833
|
function hu(t) {
|
|
7802
7834
|
return { type: "CharacterClassClose", raw: t };
|
|
7803
7835
|
}
|
|
7804
|
-
function
|
|
7836
|
+
function pu(t) {
|
|
7805
7837
|
return { type: "CharacterClassHyphen", raw: t };
|
|
7806
7838
|
}
|
|
7807
|
-
function
|
|
7839
|
+
function fu(t) {
|
|
7808
7840
|
return { type: "CharacterClassIntersector", raw: t };
|
|
7809
7841
|
}
|
|
7810
7842
|
function cr(t, e) {
|
|
@@ -7834,8 +7866,8 @@ function yu(t, e, n, r) {
|
|
|
7834
7866
|
function bu(t) {
|
|
7835
7867
|
return { type: "Subroutine", raw: t };
|
|
7836
7868
|
}
|
|
7837
|
-
const
|
|
7838
|
-
function
|
|
7869
|
+
const Cu = /* @__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]]);
|
|
7870
|
+
function wu(t) {
|
|
7839
7871
|
const e = t[1] === "c" ? t[2] : t[3];
|
|
7840
7872
|
if (!e || !/[A-Za-z]/.test(e)) throw new Error(`Unsupported control character "${t}"`);
|
|
7841
7873
|
return se(Pe(e.toUpperCase()) - 64, t);
|
|
@@ -7843,7 +7875,7 @@ function Cu(t) {
|
|
|
7843
7875
|
function _u(t, e) {
|
|
7844
7876
|
let { on: n, off: r } = /^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(t).groups;
|
|
7845
7877
|
r ??= "";
|
|
7846
|
-
const o = (e.getCurrentModX() || n.includes("x")) && !r.includes("x"), s =
|
|
7878
|
+
const o = (e.getCurrentModX() || n.includes("x")) && !r.includes("x"), s = fr(n), a = fr(r), i = {};
|
|
7847
7879
|
if (s && (i.enable = s), a && (i.disable = a), t.endsWith(")")) return e.replaceCurrentModX(o), Go("flags", t, { flags: i });
|
|
7848
7880
|
if (t.endsWith(":")) return e.pushModX(o), e.numOpenGroups++, Se("group", t, { ...(s || a) && { flags: i } });
|
|
7849
7881
|
throw new Error(`Unexpected flag modifier "${t}"`);
|
|
@@ -7854,7 +7886,7 @@ function Su(t) {
|
|
|
7854
7886
|
const { name: n, tag: r, args: o } = e.groups;
|
|
7855
7887
|
if (!n) throw new Error(`Invalid named callout "${t}"`);
|
|
7856
7888
|
if (r === "") throw new Error(`Named callout tag with empty value not allowed "${t}"`);
|
|
7857
|
-
const s = o ? o.split(",").filter((c) => c !== "").map((c) => /^[+-]?\d+$/.test(c) ? +c : c) : [], [a, i, l] = s, u =
|
|
7889
|
+
const s = o ? o.split(",").filter((c) => c !== "").map((c) => /^[+-]?\d+$/.test(c) ? +c : c) : [], [a, i, l] = s, u = Cu.has(n) ? n.toLowerCase() : "custom";
|
|
7858
7890
|
switch (u) {
|
|
7859
7891
|
case "fail":
|
|
7860
7892
|
case "mismatch":
|
|
@@ -7888,7 +7920,7 @@ function Su(t) {
|
|
|
7888
7920
|
}
|
|
7889
7921
|
return mu(u, r ?? null, o?.split(",") ?? null, t);
|
|
7890
7922
|
}
|
|
7891
|
-
function
|
|
7923
|
+
function pr(t) {
|
|
7892
7924
|
let e = null, n, r;
|
|
7893
7925
|
if (t[0] === "{") {
|
|
7894
7926
|
const { minStr: o, maxStr: s } = /^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(t).groups, a = 1e5;
|
|
@@ -7908,7 +7940,7 @@ function vu(t) {
|
|
|
7908
7940
|
const { p: e, neg: n, value: r } = /^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(t).groups;
|
|
7909
7941
|
return ge("property", t, { value: r, negate: e === "P" && !n || e === "p" && !!n });
|
|
7910
7942
|
}
|
|
7911
|
-
function
|
|
7943
|
+
function fr(t) {
|
|
7912
7944
|
const e = {};
|
|
7913
7945
|
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;
|
|
7914
7946
|
}
|
|
@@ -7955,12 +7987,12 @@ function Ru(t) {
|
|
|
7955
7987
|
if (s) {
|
|
7956
7988
|
const { min: a, max: i } = s.groups;
|
|
7957
7989
|
if (+a > +i && o.endsWith("?")) {
|
|
7958
|
-
n.lastIndex--, e.push(
|
|
7990
|
+
n.lastIndex--, e.push(pr(o.slice(0, -1)));
|
|
7959
7991
|
continue;
|
|
7960
7992
|
}
|
|
7961
7993
|
}
|
|
7962
7994
|
}
|
|
7963
|
-
e.push(
|
|
7995
|
+
e.push(pr(o));
|
|
7964
7996
|
}
|
|
7965
7997
|
return e;
|
|
7966
7998
|
}
|
|
@@ -7975,51 +8007,51 @@ function Iu(t) {
|
|
|
7975
8007
|
}
|
|
7976
8008
|
const Nu = /* @__PURE__ */ new Set(["AbsenceFunction", "Backreference", "CapturingGroup", "Character", "CharacterClass", "CharacterSet", "Group", "Quantifier", "Subroutine"]);
|
|
7977
8009
|
function Bo(t, e = {}) {
|
|
7978
|
-
const n = { flags: "", normalizeUnknownPropertyNames: !1, skipBackrefValidation: !1, skipLookbehindValidation: !1, skipPropertyNameValidation: !1, unicodePropertyMap: null, ...e, rules: { captureGroup: !1, singleline: !1, ...e.rules } }, r = au(t, { flags: n.flags, rules: { captureGroup: n.rules.captureGroup, singleline: n.rules.singleline } }), o = (
|
|
7979
|
-
const
|
|
7980
|
-
switch (s.parent =
|
|
8010
|
+
const n = { flags: "", normalizeUnknownPropertyNames: !1, skipBackrefValidation: !1, skipLookbehindValidation: !1, skipPropertyNameValidation: !1, unicodePropertyMap: null, ...e, rules: { captureGroup: !1, singleline: !1, ...e.rules } }, r = au(t, { flags: n.flags, rules: { captureGroup: n.rules.captureGroup, singleline: n.rules.singleline } }), o = (p, d) => {
|
|
8011
|
+
const f = r.tokens[s.nextIndex];
|
|
8012
|
+
switch (s.parent = p, s.nextIndex++, f.type) {
|
|
7981
8013
|
case "Alternator":
|
|
7982
8014
|
return me();
|
|
7983
8015
|
case "Assertion":
|
|
7984
|
-
return Lu(
|
|
8016
|
+
return Lu(f);
|
|
7985
8017
|
case "Backreference":
|
|
7986
|
-
return Pu(
|
|
8018
|
+
return Pu(f, s);
|
|
7987
8019
|
case "Character":
|
|
7988
|
-
return vt(
|
|
8020
|
+
return vt(f.value, { useLastValid: !!d.isCheckingRangeEnd });
|
|
7989
8021
|
case "CharacterClassHyphen":
|
|
7990
|
-
return $u(
|
|
8022
|
+
return $u(f, s, d);
|
|
7991
8023
|
case "CharacterClassOpen":
|
|
7992
|
-
return Tu(
|
|
8024
|
+
return Tu(f, s, d);
|
|
7993
8025
|
case "CharacterSet":
|
|
7994
|
-
return Mu(
|
|
8026
|
+
return Mu(f, s);
|
|
7995
8027
|
case "Directive":
|
|
7996
|
-
return ju(
|
|
8028
|
+
return ju(f.kind, { flags: f.flags });
|
|
7997
8029
|
case "GroupOpen":
|
|
7998
|
-
return Ou(
|
|
8030
|
+
return Ou(f, s, d);
|
|
7999
8031
|
case "NamedCallout":
|
|
8000
|
-
return zu(
|
|
8032
|
+
return zu(f.kind, f.tag, f.arguments);
|
|
8001
8033
|
case "Quantifier":
|
|
8002
|
-
return Du(
|
|
8034
|
+
return Du(f, s);
|
|
8003
8035
|
case "Subroutine":
|
|
8004
|
-
return Gu(
|
|
8036
|
+
return Gu(f, s);
|
|
8005
8037
|
default:
|
|
8006
|
-
throw new Error(`Unexpected token type "${
|
|
8038
|
+
throw new Error(`Unexpected token type "${f.type}"`);
|
|
8007
8039
|
}
|
|
8008
8040
|
}, 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 = Wu(Uu(r.flags));
|
|
8009
8041
|
let i = a.body[0];
|
|
8010
8042
|
for (; s.nextIndex < r.tokens.length; ) {
|
|
8011
|
-
const
|
|
8012
|
-
|
|
8043
|
+
const p = o(i, {});
|
|
8044
|
+
p.type === "Alternative" ? (a.body.push(p), i = p) : i.body.push(p);
|
|
8013
8045
|
}
|
|
8014
8046
|
const { capturingGroups: l, hasNumberedRef: u, namedGroupsByName: c, subroutines: h } = s;
|
|
8015
8047
|
if (u && c.size && !n.rules.captureGroup) throw new Error("Numbered backref/subroutine not allowed when using named capture");
|
|
8016
|
-
for (const { ref:
|
|
8017
|
-
if (
|
|
8018
|
-
|
|
8019
|
-
} else if (c.has(
|
|
8020
|
-
if (c.get(
|
|
8021
|
-
c.get(
|
|
8022
|
-
} else throw new Error(B`Subroutine uses a group name that's not defined "\g<${
|
|
8048
|
+
for (const { ref: p } of h) if (typeof p == "number") {
|
|
8049
|
+
if (p > l.length) throw new Error("Subroutine uses a group number that's not defined");
|
|
8050
|
+
p && (l[p - 1].isSubroutined = !0);
|
|
8051
|
+
} else if (c.has(p)) {
|
|
8052
|
+
if (c.get(p).length > 1) throw new Error(B`Subroutine uses a duplicate group name "\g<${p}>"`);
|
|
8053
|
+
c.get(p)[0].isSubroutined = !0;
|
|
8054
|
+
} else throw new Error(B`Subroutine uses a group name that's not defined "\g<${p}>"`);
|
|
8023
8055
|
return a;
|
|
8024
8056
|
}
|
|
8025
8057
|
function Lu({ kind: t }) {
|
|
@@ -8077,19 +8109,19 @@ function Mu({ kind: t, negate: e, value: n }, r) {
|
|
|
8077
8109
|
function Ou(t, e, n) {
|
|
8078
8110
|
const { tokens: r, capturingGroups: o, namedGroupsByName: s, skipLookbehindValidation: a, walk: i } = e, l = Vu(t), u = l.type === "AbsenceFunction", c = gr(l), h = c && l.negate;
|
|
8079
8111
|
if (l.type === "CapturingGroup" && (o.push(l), l.name && su(s, l.name, []).push(l)), u && n.isInAbsenceFunction) throw new Error("Nested absence function not supported by Oniguruma");
|
|
8080
|
-
let
|
|
8081
|
-
for (;
|
|
8082
|
-
if (
|
|
8112
|
+
let p = yr(r[e.nextIndex]);
|
|
8113
|
+
for (; p.type !== "GroupClose"; ) {
|
|
8114
|
+
if (p.type === "Alternator") l.body.push(me()), e.nextIndex++;
|
|
8083
8115
|
else {
|
|
8084
|
-
const d = l.body.at(-1),
|
|
8085
|
-
if (d.body.push(
|
|
8086
|
-
const
|
|
8116
|
+
const d = l.body.at(-1), f = i(d, { ...n, isInAbsenceFunction: n.isInAbsenceFunction || u, isInLookbehind: n.isInLookbehind || c, isInNegLookbehind: n.isInNegLookbehind || h });
|
|
8117
|
+
if (d.body.push(f), (c || n.isInLookbehind) && !a) {
|
|
8118
|
+
const m = "Lookbehind includes a pattern not allowed by Oniguruma";
|
|
8087
8119
|
if (h || n.isInNegLookbehind) {
|
|
8088
|
-
if (dr(
|
|
8089
|
-
} else if (dr(
|
|
8120
|
+
if (dr(f) || f.type === "CapturingGroup") throw new Error(m);
|
|
8121
|
+
} else if (dr(f) || gr(f) && f.negate) throw new Error(m);
|
|
8090
8122
|
}
|
|
8091
8123
|
}
|
|
8092
|
-
|
|
8124
|
+
p = yr(r[e.nextIndex]);
|
|
8093
8125
|
}
|
|
8094
8126
|
return e.nextIndex++, l;
|
|
8095
8127
|
}
|
|
@@ -8163,7 +8195,7 @@ function Q(t) {
|
|
|
8163
8195
|
if (e && n) throw new Error("Atomic group cannot have flags");
|
|
8164
8196
|
return { type: "Group", ...e && { atomic: e }, ...n && { flags: n }, body: Ye(t?.body) };
|
|
8165
8197
|
}
|
|
8166
|
-
function
|
|
8198
|
+
function fe(t) {
|
|
8167
8199
|
const e = { behind: !1, negate: !1, ...t };
|
|
8168
8200
|
return { type: "LookaroundAssertion", kind: e.behind ? "lookbehind" : "lookahead", negate: e.negate, body: Ye(t?.body) };
|
|
8169
8201
|
}
|
|
@@ -8206,7 +8238,7 @@ function Vu({ flags: t, kind: e, name: n, negate: r, number: o }) {
|
|
|
8206
8238
|
return Q({ flags: t });
|
|
8207
8239
|
case "lookahead":
|
|
8208
8240
|
case "lookbehind":
|
|
8209
|
-
return
|
|
8241
|
+
return fe({ behind: e === "lookbehind", negate: r });
|
|
8210
8242
|
default:
|
|
8211
8243
|
throw new Error(`Unexpected group kind "${e}"`);
|
|
8212
8244
|
}
|
|
@@ -8252,26 +8284,26 @@ function Be(t, e, n = null) {
|
|
|
8252
8284
|
function o(s, a = null, i = null, l = null) {
|
|
8253
8285
|
let u = 0, c = !1;
|
|
8254
8286
|
const h = { node: s, parent: a, key: i, container: l, root: t, remove() {
|
|
8255
|
-
tt(l).splice(Math.max(0,
|
|
8287
|
+
tt(l).splice(Math.max(0, we(i) + u), 1), u--, c = !0;
|
|
8256
8288
|
}, removeAllNextSiblings() {
|
|
8257
|
-
return tt(l).splice(
|
|
8289
|
+
return tt(l).splice(we(i) + 1);
|
|
8258
8290
|
}, removeAllPrevSiblings() {
|
|
8259
|
-
const y =
|
|
8291
|
+
const y = we(i) + u;
|
|
8260
8292
|
return u -= y, tt(l).splice(0, Math.max(0, y));
|
|
8261
|
-
}, replaceWith(y,
|
|
8262
|
-
const _ = !!
|
|
8263
|
-
l ? l[Math.max(0,
|
|
8264
|
-
}, replaceWithMultiple(y,
|
|
8265
|
-
const _ = !!
|
|
8266
|
-
if (tt(l).splice(Math.max(0,
|
|
8293
|
+
}, replaceWith(y, g = {}) {
|
|
8294
|
+
const _ = !!g.traverse;
|
|
8295
|
+
l ? l[Math.max(0, we(i) + u)] = y : $e(a, "Can't replace root node")[i] = y, _ && o(y, a, i, l), c = !0;
|
|
8296
|
+
}, replaceWithMultiple(y, g = {}) {
|
|
8297
|
+
const _ = !!g.traverse;
|
|
8298
|
+
if (tt(l).splice(Math.max(0, we(i) + u), 1, ...y), u += y.length - 1, _) {
|
|
8267
8299
|
let S = 0;
|
|
8268
|
-
for (let A = 0; A < y.length; A++) S += o(y[A], a,
|
|
8300
|
+
for (let A = 0; A < y.length; A++) S += o(y[A], a, we(i) + A + S, l);
|
|
8269
8301
|
}
|
|
8270
8302
|
c = !0;
|
|
8271
8303
|
}, skip() {
|
|
8272
8304
|
c = !0;
|
|
8273
|
-
} }, { type:
|
|
8274
|
-
if (
|
|
8305
|
+
} }, { type: p } = s, d = e["*"], f = e[p], m = typeof d == "function" ? d : d?.enter, b = typeof f == "function" ? f : f?.enter;
|
|
8306
|
+
if (m?.(h, n), b?.(h, n), !c) switch (p) {
|
|
8275
8307
|
case "AbsenceFunction":
|
|
8276
8308
|
case "CapturingGroup":
|
|
8277
8309
|
case "Group":
|
|
@@ -8303,9 +8335,9 @@ function Be(t, e, n = null) {
|
|
|
8303
8335
|
r(s.body, s), o(s.flags, s, "flags");
|
|
8304
8336
|
break;
|
|
8305
8337
|
default:
|
|
8306
|
-
throw new Error(`Unexpected node type "${
|
|
8338
|
+
throw new Error(`Unexpected node type "${p}"`);
|
|
8307
8339
|
}
|
|
8308
|
-
return
|
|
8340
|
+
return f?.exit?.(h, n), d?.exit?.(h, n), u;
|
|
8309
8341
|
}
|
|
8310
8342
|
return o(t), t;
|
|
8311
8343
|
}
|
|
@@ -8313,7 +8345,7 @@ function tt(t) {
|
|
|
8313
8345
|
if (!Array.isArray(t)) throw new Error("Container expected");
|
|
8314
8346
|
return t;
|
|
8315
8347
|
}
|
|
8316
|
-
function
|
|
8348
|
+
function we(t) {
|
|
8317
8349
|
if (typeof t != "number") throw new Error("Numeric key expected");
|
|
8318
8350
|
return t;
|
|
8319
8351
|
}
|
|
@@ -8398,20 +8430,20 @@ function ec(t, e) {
|
|
|
8398
8430
|
let l = 0, u = 0, c = NaN, h;
|
|
8399
8431
|
do {
|
|
8400
8432
|
h = !1;
|
|
8401
|
-
let
|
|
8402
|
-
for (br.lastIndex = Number.isNaN(c) ? 0 : c + s.length;
|
|
8403
|
-
const { 0:
|
|
8404
|
-
if (
|
|
8405
|
-
|
|
8406
|
-
else if (
|
|
8407
|
-
|
|
8408
|
-
else if (
|
|
8409
|
-
c = y,
|
|
8410
|
-
else if (
|
|
8433
|
+
let p = 0, d = 0, f = !1, m;
|
|
8434
|
+
for (br.lastIndex = Number.isNaN(c) ? 0 : c + s.length; m = br.exec(t); ) {
|
|
8435
|
+
const { 0: b, index: y, groups: { capturingStart: g, noncapturingStart: _ } } = m;
|
|
8436
|
+
if (b === "[")
|
|
8437
|
+
p++;
|
|
8438
|
+
else if (p)
|
|
8439
|
+
b === "]" && p--;
|
|
8440
|
+
else if (b === o && !f)
|
|
8441
|
+
c = y, f = !0;
|
|
8442
|
+
else if (f && _)
|
|
8411
8443
|
d++;
|
|
8412
|
-
else if (
|
|
8413
|
-
|
|
8414
|
-
else if (
|
|
8444
|
+
else if (g)
|
|
8445
|
+
f ? d++ : (l++, a.push(l + u));
|
|
8446
|
+
else if (b === ")" && f) {
|
|
8415
8447
|
if (!d) {
|
|
8416
8448
|
u++;
|
|
8417
8449
|
const S = l + u;
|
|
@@ -8433,14 +8465,14 @@ function ec(t, e) {
|
|
|
8433
8465
|
return n.push(...i), t = En(
|
|
8434
8466
|
t,
|
|
8435
8467
|
String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,
|
|
8436
|
-
({ 0:
|
|
8468
|
+
({ 0: p, groups: { backrefNum: d, wrappedBackrefNum: f } }) => {
|
|
8437
8469
|
if (d) {
|
|
8438
|
-
const
|
|
8439
|
-
if (
|
|
8440
|
-
throw new Error(`Backref "${
|
|
8441
|
-
return `\\${a[
|
|
8470
|
+
const m = +d;
|
|
8471
|
+
if (m > a.length - 1)
|
|
8472
|
+
throw new Error(`Backref "${p}" greater than number of captures`);
|
|
8473
|
+
return `\\${a[m]}`;
|
|
8442
8474
|
}
|
|
8443
|
-
return `\\${
|
|
8475
|
+
return `\\${f}`;
|
|
8444
8476
|
},
|
|
8445
8477
|
J.DEFAULT
|
|
8446
8478
|
), {
|
|
@@ -8482,7 +8514,7 @@ function tc(t) {
|
|
|
8482
8514
|
if (c === "+" && o && !o.startsWith("(")) {
|
|
8483
8515
|
if (h)
|
|
8484
8516
|
throw new Error(`Invalid quantifier "${i}"`);
|
|
8485
|
-
let
|
|
8517
|
+
let p = -1;
|
|
8486
8518
|
if (/^\{\d+\}$/.test(u))
|
|
8487
8519
|
t = Ju(t, l + u.length, c, "");
|
|
8488
8520
|
else {
|
|
@@ -8493,9 +8525,9 @@ function tc(t) {
|
|
|
8493
8525
|
t = `${t.slice(0, d)}(?>${t.slice(d, l)}${u})${t.slice(l + i.length)}`;
|
|
8494
8526
|
} else
|
|
8495
8527
|
t = `${t.slice(0, l - o.length)}(?>${o}${u})${t.slice(l + i.length)}`;
|
|
8496
|
-
|
|
8528
|
+
p += 4;
|
|
8497
8529
|
}
|
|
8498
|
-
Dt.lastIndex +=
|
|
8530
|
+
Dt.lastIndex += p;
|
|
8499
8531
|
} else i[0] === "(" ? e.push(l) : i === ")" && (n = e.length ? e.pop() : null);
|
|
8500
8532
|
o = i;
|
|
8501
8533
|
}
|
|
@@ -8520,15 +8552,15 @@ function rc(t, e) {
|
|
|
8520
8552
|
if (r === "plugin" && nt(t, Y`\(\?\(DEFINE\)`, J.DEFAULT))
|
|
8521
8553
|
throw new Error("DEFINE groups cannot be used with recursion");
|
|
8522
8554
|
const s = [], a = nt(t, Y`\\[1-9]`, J.DEFAULT), i = /* @__PURE__ */ new Map(), l = [];
|
|
8523
|
-
let u = !1, c = 0, h = 0,
|
|
8524
|
-
for (he.lastIndex = 0;
|
|
8525
|
-
const { 0: d, groups: { captureName:
|
|
8555
|
+
let u = !1, c = 0, h = 0, p;
|
|
8556
|
+
for (he.lastIndex = 0; p = he.exec(t); ) {
|
|
8557
|
+
const { 0: d, groups: { captureName: f, rDepth: m, gRNameOrNum: b, gRDepth: y } } = p;
|
|
8526
8558
|
if (d === "[")
|
|
8527
8559
|
c++;
|
|
8528
8560
|
else if (c)
|
|
8529
8561
|
d === "]" && c--;
|
|
8530
|
-
else if (
|
|
8531
|
-
if (
|
|
8562
|
+
else if (m) {
|
|
8563
|
+
if (Cr(m), u)
|
|
8532
8564
|
throw new Error(Gt);
|
|
8533
8565
|
if (a)
|
|
8534
8566
|
throw new Error(
|
|
@@ -8536,12 +8568,12 @@ function rc(t, e) {
|
|
|
8536
8568
|
// gone through conversion from named to numbered, so avoid a misleading error
|
|
8537
8569
|
`${r === "external" ? "Backrefs" : "Numbered backrefs"} cannot be used with global recursion`
|
|
8538
8570
|
);
|
|
8539
|
-
const
|
|
8571
|
+
const g = t.slice(0, p.index), _ = t.slice(he.lastIndex);
|
|
8540
8572
|
if (nt(_, ln, J.DEFAULT))
|
|
8541
8573
|
throw new Error(Gt);
|
|
8542
|
-
const S = +
|
|
8543
|
-
t =
|
|
8544
|
-
|
|
8574
|
+
const S = +m - 1;
|
|
8575
|
+
t = wr(
|
|
8576
|
+
g,
|
|
8545
8577
|
_,
|
|
8546
8578
|
S,
|
|
8547
8579
|
!1,
|
|
@@ -8550,32 +8582,32 @@ function rc(t, e) {
|
|
|
8550
8582
|
h
|
|
8551
8583
|
), o = Sr(
|
|
8552
8584
|
o,
|
|
8553
|
-
|
|
8585
|
+
g,
|
|
8554
8586
|
S,
|
|
8555
8587
|
s.length,
|
|
8556
8588
|
0,
|
|
8557
8589
|
h
|
|
8558
8590
|
);
|
|
8559
8591
|
break;
|
|
8560
|
-
} else if (
|
|
8561
|
-
|
|
8562
|
-
let
|
|
8592
|
+
} else if (b) {
|
|
8593
|
+
Cr(y);
|
|
8594
|
+
let g = !1;
|
|
8563
8595
|
for (const te of l)
|
|
8564
|
-
if (te.name ===
|
|
8565
|
-
if (
|
|
8596
|
+
if (te.name === b || te.num === +b) {
|
|
8597
|
+
if (g = !0, te.hasRecursedWithin)
|
|
8566
8598
|
throw new Error(Gt);
|
|
8567
8599
|
break;
|
|
8568
8600
|
}
|
|
8569
|
-
if (!
|
|
8570
|
-
throw new Error(Y`Recursive \g cannot be used outside the referenced group "${r === "external" ?
|
|
8571
|
-
const _ = i.get(
|
|
8601
|
+
if (!g)
|
|
8602
|
+
throw new Error(Y`Recursive \g cannot be used outside the referenced group "${r === "external" ? b : Y`\g<${b}&R=${y}>`}"`);
|
|
8603
|
+
const _ = i.get(b), S = Qu(t, _);
|
|
8572
8604
|
if (a && nt(S, Y`${Et}|\((?!\?)`, J.DEFAULT))
|
|
8573
8605
|
throw new Error(
|
|
8574
8606
|
// When used in `external` mode by transpilers other than Regex+, backrefs might have
|
|
8575
8607
|
// gone through conversion from named to numbered, so avoid a misleading error
|
|
8576
8608
|
`${r === "external" ? "Backrefs" : "Numbered backrefs"} cannot be used with recursion of capturing groups`
|
|
8577
8609
|
);
|
|
8578
|
-
const A = t.slice(_,
|
|
8610
|
+
const A = t.slice(_, p.index), D = S.slice(A.length + d.length), L = s.length, j = +y - 1, Z = wr(
|
|
8579
8611
|
A,
|
|
8580
8612
|
D,
|
|
8581
8613
|
j,
|
|
@@ -8594,14 +8626,14 @@ function rc(t, e) {
|
|
|
8594
8626
|
);
|
|
8595
8627
|
const ee = t.slice(0, _), ce = t.slice(_ + S.length);
|
|
8596
8628
|
t = `${ee}${Z}${ce}`, he.lastIndex += Z.length - d.length - A.length - D.length, l.forEach((te) => te.hasRecursedWithin = !0), u = !0;
|
|
8597
|
-
} else if (
|
|
8598
|
-
h++, i.set(String(h), he.lastIndex), i.set(
|
|
8629
|
+
} else if (f)
|
|
8630
|
+
h++, i.set(String(h), he.lastIndex), i.set(f, he.lastIndex), l.push({
|
|
8599
8631
|
num: h,
|
|
8600
|
-
name:
|
|
8632
|
+
name: f
|
|
8601
8633
|
});
|
|
8602
8634
|
else if (d[0] === "(") {
|
|
8603
|
-
const
|
|
8604
|
-
|
|
8635
|
+
const g = d === "(";
|
|
8636
|
+
g && (h++, i.set(String(h), he.lastIndex)), l.push(g ? { num: h } : {});
|
|
8605
8637
|
} else d === ")" && l.pop();
|
|
8606
8638
|
}
|
|
8607
8639
|
return n.push(...s), {
|
|
@@ -8610,14 +8642,14 @@ function rc(t, e) {
|
|
|
8610
8642
|
hiddenCaptures: n
|
|
8611
8643
|
};
|
|
8612
8644
|
}
|
|
8613
|
-
function
|
|
8645
|
+
function Cr(t) {
|
|
8614
8646
|
const e = `Max depth must be integer between 2 and 100; used ${t}`;
|
|
8615
8647
|
if (!/^[1-9]\d*$/.test(t))
|
|
8616
8648
|
throw new Error(e);
|
|
8617
8649
|
if (t = +t, t < 2 || t > 100)
|
|
8618
8650
|
throw new Error(e);
|
|
8619
8651
|
}
|
|
8620
|
-
function
|
|
8652
|
+
function wr(t, e, n, r, o, s, a) {
|
|
8621
8653
|
const i = /* @__PURE__ */ new Set();
|
|
8622
8654
|
r && Wo(t + e, Et, ({ groups: { captureName: u } }) => {
|
|
8623
8655
|
i.add(u);
|
|
@@ -8639,15 +8671,15 @@ function _r(t, e, n, r, o, s, a) {
|
|
|
8639
8671
|
u += En(
|
|
8640
8672
|
t,
|
|
8641
8673
|
Y`${qo}|\\k<(?<backref>[^>]+)>`,
|
|
8642
|
-
({ 0:
|
|
8643
|
-
if (
|
|
8644
|
-
return
|
|
8645
|
-
const
|
|
8646
|
-
if (
|
|
8674
|
+
({ 0: p, groups: { captureName: d, unnamed: f, backref: m } }) => {
|
|
8675
|
+
if (m && r && !r.has(m))
|
|
8676
|
+
return p;
|
|
8677
|
+
const b = `_$${h}`;
|
|
8678
|
+
if (f || d) {
|
|
8647
8679
|
const y = a + s.length + 1;
|
|
8648
|
-
return s.push(y), oc(o, y),
|
|
8680
|
+
return s.push(y), oc(o, y), f ? p : `(?<${d}${b}>`;
|
|
8649
8681
|
}
|
|
8650
|
-
return Y`\k<${
|
|
8682
|
+
return Y`\k<${m}${b}>`;
|
|
8651
8683
|
},
|
|
8652
8684
|
J.DEFAULT
|
|
8653
8685
|
);
|
|
@@ -8664,19 +8696,19 @@ function Sr(t, e, n, r, o, s) {
|
|
|
8664
8696
|
Wo(e, qo, () => a++, J.DEFAULT);
|
|
8665
8697
|
const i = s - a + o, l = /* @__PURE__ */ new Map();
|
|
8666
8698
|
return t.forEach((u, c) => {
|
|
8667
|
-
const h = (r - a * n) / n,
|
|
8668
|
-
for (const
|
|
8669
|
-
if (
|
|
8670
|
-
|
|
8671
|
-
else if (
|
|
8672
|
-
|
|
8673
|
-
else if (
|
|
8674
|
-
for (let
|
|
8675
|
-
|
|
8699
|
+
const h = (r - a * n) / n, p = a * n, d = c > i + a ? c + r : c, f = [];
|
|
8700
|
+
for (const m of u)
|
|
8701
|
+
if (m <= i)
|
|
8702
|
+
f.push(m);
|
|
8703
|
+
else if (m > i + a + h)
|
|
8704
|
+
f.push(m + r);
|
|
8705
|
+
else if (m <= i + a)
|
|
8706
|
+
for (let b = 0; b <= n; b++)
|
|
8707
|
+
f.push(m + a * b);
|
|
8676
8708
|
else
|
|
8677
|
-
for (let
|
|
8678
|
-
|
|
8679
|
-
l.set(d,
|
|
8709
|
+
for (let b = 0; b <= n; b++)
|
|
8710
|
+
f.push(m + p + h * b);
|
|
8711
|
+
l.set(d, f);
|
|
8680
8712
|
}), l;
|
|
8681
8713
|
}
|
|
8682
8714
|
return t;
|
|
@@ -8692,7 +8724,7 @@ var M = String.fromCodePoint, v = String.raw, ae = {
|
|
|
8692
8724
|
})(),
|
|
8693
8725
|
unicodeSets: (() => {
|
|
8694
8726
|
try {
|
|
8695
|
-
new RegExp("", "v");
|
|
8727
|
+
new RegExp("[[]]", "v");
|
|
8696
8728
|
} catch {
|
|
8697
8729
|
return !1;
|
|
8698
8730
|
}
|
|
@@ -8914,7 +8946,7 @@ XID_Start XIDS`.split(/\s/).map((t) => [xt(t), t])
|
|
|
8914
8946
|
ie(8124),
|
|
8915
8947
|
ie(8140),
|
|
8916
8948
|
ie(8188)
|
|
8917
|
-
]),
|
|
8949
|
+
]), pc = /* @__PURE__ */ new Map([
|
|
8918
8950
|
["alnum", v`[\p{Alpha}\p{Nd}]`],
|
|
8919
8951
|
["alpha", v`\p{Alpha}`],
|
|
8920
8952
|
["ascii", v`\p{ASCII}`],
|
|
@@ -8931,7 +8963,7 @@ XID_Start XIDS`.split(/\s/).map((t) => [xt(t), t])
|
|
|
8931
8963
|
["word", v`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],
|
|
8932
8964
|
["xdigit", v`\p{AHex}`]
|
|
8933
8965
|
]);
|
|
8934
|
-
function
|
|
8966
|
+
function fc(t, e) {
|
|
8935
8967
|
const n = [];
|
|
8936
8968
|
for (let r = t; r <= e; r++)
|
|
8937
8969
|
n.push(r);
|
|
@@ -8942,7 +8974,7 @@ function ie(t) {
|
|
|
8942
8974
|
return [e.toLowerCase(), e];
|
|
8943
8975
|
}
|
|
8944
8976
|
function Ft(t, e) {
|
|
8945
|
-
return
|
|
8977
|
+
return fc(t, e).map((n) => ie(n));
|
|
8946
8978
|
}
|
|
8947
8979
|
var Yo = /* @__PURE__ */ new Set([
|
|
8948
8980
|
"Lower",
|
|
@@ -9022,7 +9054,7 @@ var gc = {
|
|
|
9022
9054
|
const s = Q();
|
|
9023
9055
|
s.body[0].body.push(
|
|
9024
9056
|
// Insert own alts as `body`
|
|
9025
|
-
|
|
9057
|
+
fe({ negate: !0, body: r }),
|
|
9026
9058
|
ke("Any")
|
|
9027
9059
|
);
|
|
9028
9060
|
const a = Q();
|
|
@@ -9051,11 +9083,11 @@ var gc = {
|
|
|
9051
9083
|
}
|
|
9052
9084
|
},
|
|
9053
9085
|
Assertion({ node: t, parent: e, key: n, container: r, root: o, remove: s, replaceWith: a }, i) {
|
|
9054
|
-
const { kind: l, negate: u } = t, { asciiWordBoundaries: c, avoidSubclass: h, supportedGNodes:
|
|
9086
|
+
const { kind: l, negate: u } = t, { asciiWordBoundaries: c, avoidSubclass: h, supportedGNodes: p, wordIsAscii: d } = i;
|
|
9055
9087
|
if (l === "text_segment_boundary")
|
|
9056
9088
|
throw new Error(`Unsupported text segment boundary "\\${u ? "Y" : "y"}"`);
|
|
9057
9089
|
if (l === "line_end")
|
|
9058
|
-
a(P(
|
|
9090
|
+
a(P(fe({ body: [
|
|
9059
9091
|
me({ body: [on("string_end")] }),
|
|
9060
9092
|
me({ body: [vt(10)] })
|
|
9061
9093
|
// `\n`
|
|
@@ -9063,12 +9095,12 @@ var gc = {
|
|
|
9063
9095
|
else if (l === "line_start")
|
|
9064
9096
|
a(P(oe(v`(?<=\A|\n(?!\z))`, { skipLookbehindValidation: !0 }), e));
|
|
9065
9097
|
else if (l === "search_start")
|
|
9066
|
-
if (
|
|
9098
|
+
if (p.has(t))
|
|
9067
9099
|
o.flags.sticky = !0, s();
|
|
9068
9100
|
else {
|
|
9069
|
-
const
|
|
9070
|
-
if (
|
|
9071
|
-
a(P(
|
|
9101
|
+
const f = r[n - 1];
|
|
9102
|
+
if (f && kc(f))
|
|
9103
|
+
a(P(fe({ negate: !0 }), e));
|
|
9072
9104
|
else {
|
|
9073
9105
|
if (h)
|
|
9074
9106
|
throw new Error(v`Uses "\G" in a way that requires a subclass`);
|
|
@@ -9079,8 +9111,8 @@ var gc = {
|
|
|
9079
9111
|
a(P(oe(v`(?=\n?\z)`), e));
|
|
9080
9112
|
else if (l === "word_boundary") {
|
|
9081
9113
|
if (!d && !c) {
|
|
9082
|
-
const
|
|
9083
|
-
a(P(oe(u ?
|
|
9114
|
+
const f = `(?:(?<=${re})(?!${re})|(?<!${re})(?=${re}))`, m = `(?:(?<=${re})(?=${re})|(?<!${re})(?!${re}))`;
|
|
9115
|
+
a(P(oe(u ? m : f), e));
|
|
9084
9116
|
}
|
|
9085
9117
|
} else
|
|
9086
9118
|
throw new Error(`Unexpected assertion kind "${l}"`);
|
|
@@ -9120,10 +9152,10 @@ var gc = {
|
|
|
9120
9152
|
else if (l !== "dot") if (l === "text_segment") {
|
|
9121
9153
|
if (r === "strict")
|
|
9122
9154
|
throw new Error(v`Use of "\X" requires non-strict accuracy`);
|
|
9123
|
-
const h = "\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",
|
|
9155
|
+
const h = "\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?", p = v`\p{RI}{2}|${h}(?:\u200D${h})*`;
|
|
9124
9156
|
n(P(oe(
|
|
9125
|
-
// Close approximation of an extended grapheme cluster; see
|
|
9126
|
-
v`(?>\r\n|${o ? v`\p{RGI_Emoji}` :
|
|
9157
|
+
// Close approximation of an extended grapheme cluster; see <unicode.org/reports/tr29/>
|
|
9158
|
+
v`(?>\r\n|${o ? v`\p{RGI_Emoji}` : p}|\P{M}\p{M}*)`,
|
|
9127
9159
|
// Allow JS property `RGI_Emoji` through
|
|
9128
9160
|
{ skipPropertyNameValidation: !0 }
|
|
9129
9161
|
), e));
|
|
@@ -9144,7 +9176,7 @@ var gc = {
|
|
|
9144
9176
|
}[c];
|
|
9145
9177
|
u && (h = `\0-${M(h.codePointAt(0) - 1)}${M(h.codePointAt(2) + 1)}-`), n(P(oe(`[${h}]`), e));
|
|
9146
9178
|
} else
|
|
9147
|
-
n(P(Ut(oe(
|
|
9179
|
+
n(P(Ut(oe(pc.get(c)), u), e));
|
|
9148
9180
|
else if (l === "property")
|
|
9149
9181
|
An.has(xt(c)) || (t.key = "sc");
|
|
9150
9182
|
else if (l === "space")
|
|
@@ -9168,8 +9200,8 @@ var gc = {
|
|
|
9168
9200
|
Fo(u, { type: "Group" }) && u.body[0].body.length === 1 ? u.body[0] : n;
|
|
9169
9201
|
if (e.parent !== h || h.body.length > 1)
|
|
9170
9202
|
throw new Error(v`Uses "\K" in a way that's unsupported`);
|
|
9171
|
-
const
|
|
9172
|
-
|
|
9203
|
+
const p = fe({ behind: !0 });
|
|
9204
|
+
p.body[0].body = s(), o(P(p, e));
|
|
9173
9205
|
} else
|
|
9174
9206
|
throw new Error(`Unexpected directive kind "${i}"`);
|
|
9175
9207
|
},
|
|
@@ -9234,7 +9266,7 @@ var gc = {
|
|
|
9234
9266
|
NamedCallout({ node: t, parent: e, replaceWith: n }) {
|
|
9235
9267
|
const { kind: r } = t;
|
|
9236
9268
|
if (r === "fail")
|
|
9237
|
-
n(P(
|
|
9269
|
+
n(P(fe({ negate: !0 }), e));
|
|
9238
9270
|
else
|
|
9239
9271
|
throw new Error(`Unsupported named callout "(*${r.toUpperCase()}"`);
|
|
9240
9272
|
},
|
|
@@ -9293,13 +9325,13 @@ var gc = {
|
|
|
9293
9325
|
i.set(t.number, t), a.set(t.number, []), t.name && Ve(a, t.name, []);
|
|
9294
9326
|
const c = a.get(t.name ?? t.number);
|
|
9295
9327
|
for (let h = 0; h < c.length; h++) {
|
|
9296
|
-
const
|
|
9328
|
+
const p = c[h];
|
|
9297
9329
|
if (
|
|
9298
9330
|
// This group is from subroutine expansion, and there's a multiplex value from either the
|
|
9299
9331
|
// origin node or a prior subroutine expansion group with the same origin
|
|
9300
|
-
u ===
|
|
9332
|
+
u === p.node || u && u === p.origin || // This group is not from subroutine expansion, and it comes after a subroutine expansion
|
|
9301
9333
|
// group that refers to this group
|
|
9302
|
-
t ===
|
|
9334
|
+
t === p.origin
|
|
9303
9335
|
) {
|
|
9304
9336
|
c.splice(h, 1);
|
|
9305
9337
|
break;
|
|
@@ -9307,16 +9339,16 @@ var gc = {
|
|
|
9307
9339
|
}
|
|
9308
9340
|
if (a.get(t.number).push({ node: t, origin: u }), t.name && a.get(t.name).push({ node: t, origin: u }), t.name) {
|
|
9309
9341
|
const h = Ve(s, t.name, /* @__PURE__ */ new Map());
|
|
9310
|
-
let
|
|
9342
|
+
let p = !1;
|
|
9311
9343
|
if (u)
|
|
9312
|
-
|
|
9344
|
+
p = !0;
|
|
9313
9345
|
else
|
|
9314
9346
|
for (const d of h.values())
|
|
9315
9347
|
if (!d.hasDuplicateNameToRemove) {
|
|
9316
|
-
|
|
9348
|
+
p = !0;
|
|
9317
9349
|
break;
|
|
9318
9350
|
}
|
|
9319
|
-
s.get(t.name).set(t, { node: t, hasDuplicateNameToRemove:
|
|
9351
|
+
s.get(t.name).set(t, { node: t, hasDuplicateNameToRemove: p });
|
|
9320
9352
|
}
|
|
9321
9353
|
},
|
|
9322
9354
|
exit({ node: t }, { openRefs: e }) {
|
|
@@ -9346,9 +9378,9 @@ var gc = {
|
|
|
9346
9378
|
);
|
|
9347
9379
|
let u = l;
|
|
9348
9380
|
if (!i) {
|
|
9349
|
-
const c = Qo(
|
|
9381
|
+
const c = Qo(wc(
|
|
9350
9382
|
a,
|
|
9351
|
-
(
|
|
9383
|
+
(p) => p.type === "Group" && !!p.flags
|
|
9352
9384
|
)), h = c ? bt(r.globalFlags, c) : r.globalFlags;
|
|
9353
9385
|
bc(h, r.currentFlags) || (u = Q({
|
|
9354
9386
|
flags: _c(h)
|
|
@@ -9362,9 +9394,9 @@ var gc = {
|
|
|
9362
9394
|
r.highestOrphanBackref = Math.max(r.highestOrphanBackref, t.ref);
|
|
9363
9395
|
return;
|
|
9364
9396
|
}
|
|
9365
|
-
const s = r.reffedNodesByReferencer.get(t).filter((a) =>
|
|
9397
|
+
const s = r.reffedNodesByReferencer.get(t).filter((a) => Cc(a, t));
|
|
9366
9398
|
if (!s.length)
|
|
9367
|
-
n(P(
|
|
9399
|
+
n(P(fe({ negate: !0 }), e));
|
|
9368
9400
|
else if (s.length > 1) {
|
|
9369
9401
|
const a = Q({
|
|
9370
9402
|
atomic: !0,
|
|
@@ -9402,7 +9434,7 @@ function Jo(t) {
|
|
|
9402
9434
|
function bc(t, e) {
|
|
9403
9435
|
return t.dotAll === e.dotAll && t.ignoreCase === e.ignoreCase;
|
|
9404
9436
|
}
|
|
9405
|
-
function
|
|
9437
|
+
function Cc(t, e) {
|
|
9406
9438
|
let n = e;
|
|
9407
9439
|
do {
|
|
9408
9440
|
if (n.type === "Regex")
|
|
@@ -9431,7 +9463,7 @@ function vr(t) {
|
|
|
9431
9463
|
const e = zo(t);
|
|
9432
9464
|
return e.isRecursive = !0, e;
|
|
9433
9465
|
}
|
|
9434
|
-
function
|
|
9466
|
+
function wc(t, e) {
|
|
9435
9467
|
const n = [];
|
|
9436
9468
|
for (; t = t.parent; )
|
|
9437
9469
|
(!e || e(t)) && n.push(t);
|
|
@@ -9542,8 +9574,8 @@ function xc(t, e) {
|
|
|
9542
9574
|
popModI() {
|
|
9543
9575
|
d.pop();
|
|
9544
9576
|
},
|
|
9545
|
-
pushModI(
|
|
9546
|
-
d.push(
|
|
9577
|
+
pushModI(f) {
|
|
9578
|
+
d.push(f);
|
|
9547
9579
|
},
|
|
9548
9580
|
setHasCasedChar() {
|
|
9549
9581
|
d.at(-1) ? a = !0 : i = !0;
|
|
@@ -9579,15 +9611,15 @@ function xc(t, e) {
|
|
|
9579
9611
|
function h(d) {
|
|
9580
9612
|
return c.lastNode = u, u = d, sc(Ac[d.type], `Unexpected node type "${d.type}"`)(d, c, h);
|
|
9581
9613
|
}
|
|
9582
|
-
const
|
|
9614
|
+
const p = {
|
|
9583
9615
|
pattern: t.body.map(h).join("|"),
|
|
9584
9616
|
// Could reset `lastNode` at this point via `lastNode = ast`, but it isn't needed by flags
|
|
9585
9617
|
flags: h(t.flags),
|
|
9586
9618
|
options: { ...t.options }
|
|
9587
9619
|
};
|
|
9588
|
-
return r || (delete
|
|
9589
|
-
d.hidden &&
|
|
9590
|
-
}),
|
|
9620
|
+
return r || (delete p.options.force.v, p.options.disable.v = !0, p.options.unicodeSetsPlugin = null), p._captureTransfers = /* @__PURE__ */ new Map(), p._hiddenCaptures = [], c.captureMap.forEach((d, f) => {
|
|
9621
|
+
d.hidden && p._hiddenCaptures.push(f), d.transferTo && Ve(p._captureTransfers, d.transferTo, []).push(f);
|
|
9622
|
+
}), p;
|
|
9591
9623
|
}
|
|
9592
9624
|
var Ec = {
|
|
9593
9625
|
"*": {
|
|
@@ -9675,7 +9707,7 @@ var Ec = {
|
|
|
9675
9707
|
const { kind: r, negate: o, parent: s } = t;
|
|
9676
9708
|
let { body: a } = t;
|
|
9677
9709
|
if (r === "intersection" && !e.useFlagV)
|
|
9678
|
-
throw new Error("Use of class intersection requires min target ES2024");
|
|
9710
|
+
throw new Error("Use of character class intersection requires min target ES2024");
|
|
9679
9711
|
ae.bugFlagVLiteralHyphenIsRange && e.useFlagV && a.some(Ar) && (a = [vt(45), ...a.filter((u) => !Ar(u))]);
|
|
9680
9712
|
const i = () => `[${o ? "^" : ""}${a.map(n).join(r === "intersection" ? "&&" : "")}]`;
|
|
9681
9713
|
if (!e.inCharClass) {
|
|
@@ -9687,10 +9719,10 @@ var Ec = {
|
|
|
9687
9719
|
(h) => h.type === "CharacterClass" && h.kind === "union" && h.negate
|
|
9688
9720
|
);
|
|
9689
9721
|
if (c.length) {
|
|
9690
|
-
const h = Q(),
|
|
9691
|
-
return h.parent = s,
|
|
9692
|
-
const
|
|
9693
|
-
d.parent =
|
|
9722
|
+
const h = Q(), p = h.body[0];
|
|
9723
|
+
return h.parent = s, p.parent = h, a = a.filter((d) => !c.includes(d)), t.body = a, a.length ? (t.parent = p, p.body.push(t)) : h.body.pop(), c.forEach((d) => {
|
|
9724
|
+
const f = me({ body: [d] });
|
|
9725
|
+
d.parent = f, f.parent = h, h.body.push(f);
|
|
9694
9726
|
}), n(h);
|
|
9695
9727
|
}
|
|
9696
9728
|
}
|
|
@@ -9707,7 +9739,7 @@ var Ec = {
|
|
|
9707
9739
|
)
|
|
9708
9740
|
return a.map(n).join("");
|
|
9709
9741
|
if (!e.useFlagV && s.type === "CharacterClass")
|
|
9710
|
-
throw new Error("
|
|
9742
|
+
throw new Error("Uses nested character class in a way that requires min target ES2024");
|
|
9711
9743
|
return i();
|
|
9712
9744
|
},
|
|
9713
9745
|
/**
|
|
@@ -10112,11 +10144,11 @@ function jc(t, e) {
|
|
|
10112
10144
|
if (n.lazyCompileLength !== 1 / 0)
|
|
10113
10145
|
throw new Error("Lazy compilation requires subclass");
|
|
10114
10146
|
} else {
|
|
10115
|
-
const c = l.hiddenCaptures.sort((
|
|
10116
|
-
(c.length || h.length ||
|
|
10147
|
+
const c = l.hiddenCaptures.sort((f, m) => f - m), h = Array.from(l.captureTransfers), p = o._strategy, d = u.pattern.length >= n.lazyCompileLength;
|
|
10148
|
+
(c.length || h.length || p || d) && (u.options = {
|
|
10117
10149
|
...c.length && { hiddenCaptures: c },
|
|
10118
10150
|
...h.length && { transfers: h },
|
|
10119
|
-
...
|
|
10151
|
+
...p && { strategy: p },
|
|
10120
10152
|
...d && { lazyCompile: d }
|
|
10121
10153
|
});
|
|
10122
10154
|
}
|
|
@@ -10243,7 +10275,7 @@ function Hc(t = {}) {
|
|
|
10243
10275
|
}
|
|
10244
10276
|
};
|
|
10245
10277
|
}
|
|
10246
|
-
const Wc = "overflow-x-auto scrollbar not-inline", Vc = Hc({ forgiving: !0 }), qc =
|
|
10278
|
+
const Wc = "overflow-x-auto scrollbar not-inline", Vc = Hc({ forgiving: !0 }), qc = Xl({
|
|
10247
10279
|
engine: Vc,
|
|
10248
10280
|
langAlias: {
|
|
10249
10281
|
markup: "html",
|
|
@@ -10254,7 +10286,7 @@ const Wc = "overflow-x-auto scrollbar not-inline", Vc = Hc({ forgiving: !0 }), q
|
|
|
10254
10286
|
rss: "xml",
|
|
10255
10287
|
webmanifest: "json"
|
|
10256
10288
|
}
|
|
10257
|
-
}),
|
|
10289
|
+
}), Xc = await qc, Ct = {
|
|
10258
10290
|
themes: {
|
|
10259
10291
|
light: "github-light",
|
|
10260
10292
|
dark: "github-dark"
|
|
@@ -10276,7 +10308,7 @@ const Wc = "overflow-x-auto scrollbar not-inline", Vc = Hc({ forgiving: !0 }), q
|
|
|
10276
10308
|
})
|
|
10277
10309
|
);
|
|
10278
10310
|
}
|
|
10279
|
-
},
|
|
10311
|
+
}, Kc = () => (t) => {
|
|
10280
10312
|
Xr(t, "element", (e, n, r) => {
|
|
10281
10313
|
if (e.tagName !== "code") return;
|
|
10282
10314
|
const o = r?.type === "element" && r.tagName === "pre";
|
|
@@ -10286,17 +10318,17 @@ const Wc = "overflow-x-auto scrollbar not-inline", Vc = Hc({ forgiving: !0 }), q
|
|
|
10286
10318
|
class: Ir(e.properties.class, r.properties.class)
|
|
10287
10319
|
}, r.properties = {});
|
|
10288
10320
|
});
|
|
10289
|
-
},
|
|
10321
|
+
}, gh = (t = Ct.themes, e = Xc) => [
|
|
10290
10322
|
[
|
|
10291
10323
|
Ql,
|
|
10292
10324
|
e,
|
|
10293
|
-
{ ...
|
|
10325
|
+
{ ...Ct, themes: t }
|
|
10294
10326
|
],
|
|
10295
|
-
|
|
10296
|
-
],
|
|
10327
|
+
Kc
|
|
10328
|
+
], Yc = (t, e, n = "text", r = Ct.themes) => {
|
|
10297
10329
|
const o = t.codeToHast(e, {
|
|
10298
10330
|
lang: n,
|
|
10299
|
-
...
|
|
10331
|
+
...Ct,
|
|
10300
10332
|
themes: r
|
|
10301
10333
|
});
|
|
10302
10334
|
return Gs(o, {
|
|
@@ -10310,11 +10342,11 @@ const Wc = "overflow-x-auto scrollbar not-inline", Vc = Hc({ forgiving: !0 }), q
|
|
|
10310
10342
|
})
|
|
10311
10343
|
}
|
|
10312
10344
|
});
|
|
10313
|
-
},
|
|
10345
|
+
}, Jc = as(
|
|
10314
10346
|
({ code: t, children: e, embedded: n, ...r }) => {
|
|
10315
10347
|
const { syntaxHighlighting: o } = is().options;
|
|
10316
10348
|
us(o?.highlighter, "Highlighter not found");
|
|
10317
|
-
const s =
|
|
10349
|
+
const s = Yc(
|
|
10318
10350
|
o.highlighter,
|
|
10319
10351
|
t ?? e,
|
|
10320
10352
|
r.language,
|
|
@@ -10323,30 +10355,30 @@ const Wc = "overflow-x-auto scrollbar not-inline", Vc = Hc({ forgiving: !0 }), q
|
|
|
10323
10355
|
return n ? /* @__PURE__ */ at.jsx(hs, { ...r, children: s }) : /* @__PURE__ */ at.jsx(cs, { ...r, children: s });
|
|
10324
10356
|
}
|
|
10325
10357
|
);
|
|
10326
|
-
|
|
10358
|
+
Jc.displayName = "SyntaxHighlight";
|
|
10327
10359
|
export {
|
|
10328
10360
|
Fn as E,
|
|
10329
10361
|
Wc as H,
|
|
10330
|
-
|
|
10362
|
+
Jc as S,
|
|
10331
10363
|
H as V,
|
|
10332
10364
|
Ps as a,
|
|
10333
|
-
|
|
10334
|
-
|
|
10335
|
-
|
|
10365
|
+
ph as b,
|
|
10366
|
+
hh as c,
|
|
10367
|
+
ih as d,
|
|
10336
10368
|
Nr as e,
|
|
10337
10369
|
Fr as f,
|
|
10338
10370
|
Vr as g,
|
|
10339
10371
|
ca as h,
|
|
10340
10372
|
ia as i,
|
|
10341
10373
|
jn as j,
|
|
10342
|
-
|
|
10343
|
-
|
|
10344
|
-
|
|
10374
|
+
gh as k,
|
|
10375
|
+
Yc as l,
|
|
10376
|
+
sh as o,
|
|
10345
10377
|
Br as p,
|
|
10346
10378
|
$s as s,
|
|
10347
10379
|
Gs as t,
|
|
10348
|
-
|
|
10380
|
+
ah as u,
|
|
10349
10381
|
Xr as v,
|
|
10350
10382
|
ua as z
|
|
10351
10383
|
};
|
|
10352
|
-
//# sourceMappingURL=SyntaxHighlight-
|
|
10384
|
+
//# sourceMappingURL=SyntaxHighlight-bkmst3oV.js.map
|