zudoku 0.33.1 → 0.34.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/config/validators/common.d.ts +572 -354
- package/dist/config/validators/common.js +26 -8
- package/dist/config/validators/common.js.map +1 -1
- package/dist/config/validators/validate.d.ts +254 -167
- package/dist/lib/authentication/hook.d.ts +1 -0
- package/dist/lib/authentication/hook.js +11 -1
- package/dist/lib/authentication/hook.js.map +1 -1
- package/dist/lib/authentication/providers/clerk.js +6 -6
- package/dist/lib/authentication/providers/clerk.js.map +1 -1
- package/dist/lib/components/AnchorLink.d.ts +2 -2
- package/dist/lib/components/AnchorLink.js +4 -4
- package/dist/lib/components/AnchorLink.js.map +1 -1
- package/dist/lib/components/Banner.js +1 -1
- package/dist/lib/components/Banner.js.map +1 -1
- package/dist/lib/components/Heading.d.ts +2 -2
- package/dist/lib/components/Layout.js +1 -1
- package/dist/lib/components/Layout.js.map +1 -1
- package/dist/lib/components/context/ZudokuContext.d.ts +1 -1
- package/dist/lib/components/index.d.ts +1 -0
- package/dist/lib/components/navigation/SidebarItem.js +6 -5
- package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
- package/dist/lib/core/RouteGuard.js +2 -1
- package/dist/lib/core/RouteGuard.js.map +1 -1
- package/dist/lib/core/ZudokuContext.d.ts +4 -0
- package/dist/lib/core/ZudokuContext.js.map +1 -1
- package/dist/lib/plugins/api-catalog/Catalog.d.ts +3 -1
- package/dist/lib/plugins/api-catalog/Catalog.js +7 -4
- package/dist/lib/plugins/api-catalog/Catalog.js.map +1 -1
- package/dist/lib/plugins/api-catalog/index.js +1 -1
- package/dist/lib/plugins/api-catalog/index.js.map +1 -1
- package/dist/lib/plugins/markdown/MdxPage.js +1 -1
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationList.d.ts +1 -1
- package/dist/lib/plugins/openapi/OperationList.js +5 -1
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.d.ts +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.js +6 -3
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/ParameterList.d.ts +2 -1
- package/dist/lib/plugins/openapi/ParameterList.js +3 -2
- package/dist/lib/plugins/openapi/ParameterList.js.map +1 -1
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +3 -1
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.d.ts +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.js +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/graphql.d.ts +1 -0
- package/dist/lib/plugins/openapi/graphql/graphql.js +2 -0
- package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.d.ts +2 -2
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js +1 -5
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Headers.js +1 -1
- package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/IdentityDialog.d.ts +11 -0
- package/dist/lib/plugins/openapi/playground/IdentityDialog.js +14 -0
- package/dist/lib/plugins/openapi/playground/IdentityDialog.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/IdentitySelector.d.ts +7 -0
- package/dist/lib/plugins/openapi/playground/IdentitySelector.js +10 -0
- package/dist/lib/plugins/openapi/playground/IdentitySelector.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/PathParams.d.ts +3 -2
- package/dist/lib/plugins/openapi/playground/PathParams.js +3 -2
- package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.d.ts +13 -2
- package/dist/lib/plugins/openapi/playground/Playground.js +80 -26
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/QueryParams.js +1 -1
- package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/RequestLoginDialog.d.ts +7 -0
- package/dist/lib/plugins/openapi/playground/RequestLoginDialog.js +8 -0
- package/dist/lib/plugins/openapi/playground/RequestLoginDialog.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/rememberedIdentity.d.ts +17 -0
- package/dist/lib/plugins/openapi/playground/rememberedIdentity.js +11 -0
- package/dist/lib/plugins/openapi/playground/rememberedIdentity.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +19 -13
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.d.ts +6 -4
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js +4 -3
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js.map +1 -1
- package/dist/lib/plugins/search-pagefind/PagefindSearch.d.ts +6 -0
- package/dist/lib/plugins/search-pagefind/PagefindSearch.js +66 -0
- package/dist/lib/plugins/search-pagefind/PagefindSearch.js.map +1 -0
- package/dist/lib/plugins/search-pagefind/ResultList.d.ts +8 -0
- package/dist/lib/plugins/search-pagefind/ResultList.js +31 -0
- package/dist/lib/plugins/search-pagefind/ResultList.js.map +1 -0
- package/dist/lib/plugins/search-pagefind/get-results.d.ts +3 -0
- package/dist/lib/plugins/search-pagefind/get-results.js +37 -0
- package/dist/lib/plugins/search-pagefind/get-results.js.map +1 -0
- package/dist/lib/plugins/search-pagefind/index.d.ts +8 -0
- package/dist/lib/plugins/search-pagefind/index.js +9 -0
- package/dist/lib/plugins/search-pagefind/index.js.map +1 -0
- package/dist/lib/plugins/search-pagefind/types.d.ts +85 -0
- package/dist/lib/plugins/search-pagefind/types.js +2 -0
- package/dist/lib/plugins/search-pagefind/types.js.map +1 -0
- package/dist/lib/ui/Checkbox.d.ts +2 -8
- package/dist/lib/ui/Checkbox.js +1 -13
- package/dist/lib/ui/Checkbox.js.map +1 -1
- package/dist/lib/ui/Command.d.ts +13 -7
- package/dist/lib/ui/Command.js +2 -2
- package/dist/lib/ui/Command.js.map +1 -1
- package/dist/lib/ui/Select.js +1 -1
- package/dist/lib/ui/Select.js.map +1 -1
- package/dist/lib/ui/SyntaxHighlight.d.ts +2 -1
- package/dist/lib/ui/SyntaxHighlight.js +19 -15
- package/dist/lib/ui/SyntaxHighlight.js.map +1 -1
- package/dist/lib/util/MdxComponents.d.ts +1 -1
- package/dist/lib/util/MdxComponents.js +2 -2
- package/dist/lib/util/MdxComponents.js.map +1 -1
- package/dist/lib/util/useScrollToAnchor.js +6 -8
- package/dist/lib/util/useScrollToAnchor.js.map +1 -1
- package/dist/vite/build.js +4 -0
- package/dist/vite/build.js.map +1 -1
- package/dist/vite/config.js +7 -2
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/dev-server.js +8 -0
- package/dist/vite/dev-server.js.map +1 -1
- package/dist/vite/pagefind.d.ts +4 -0
- package/dist/vite/pagefind.js +15 -0
- package/dist/vite/pagefind.js.map +1 -0
- package/dist/vite/plugin-component.js +4 -0
- package/dist/vite/plugin-component.js.map +1 -1
- package/dist/vite/plugin-search.js +4 -0
- package/dist/vite/plugin-search.js.map +1 -1
- package/dist/vite/prerender/prerender.js +1 -1
- package/dist/vite/prerender/prerender.js.map +1 -1
- package/dist/vite/sitemap.js +2 -1
- package/dist/vite/sitemap.js.map +1 -1
- package/lib/{AuthenticationPlugin-CiO1FM6Q.js → AuthenticationPlugin-4ip08maU.js} +3 -3
- package/lib/{AuthenticationPlugin-CiO1FM6Q.js.map → AuthenticationPlugin-4ip08maU.js.map} +1 -1
- package/lib/Callout-B_sEhkYd.js +211 -0
- package/lib/Callout-B_sEhkYd.js.map +1 -0
- package/lib/{Dialog-DIKGQxQc.js → Dialog-sbgekbjb.js} +47 -32
- package/lib/{Dialog-DIKGQxQc.js.map → Dialog-sbgekbjb.js.map} +1 -1
- package/lib/{Markdown-DePfm7oQ.js → Markdown-DZXjQjpH.js} +4099 -3848
- package/lib/Markdown-DZXjQjpH.js.map +1 -0
- package/lib/MdxPage-52vRwa_7.js +200 -0
- package/lib/MdxPage-52vRwa_7.js.map +1 -0
- package/lib/{OasProvider-SzD9mHJc.js → OasProvider-CR2nG1Eg.js} +4 -4
- package/lib/{OasProvider-SzD9mHJc.js.map → OasProvider-CR2nG1Eg.js.map} +1 -1
- package/lib/{OperationList-DDs9NblY.js → OperationList-DndcCJUG.js} +2069 -1983
- package/lib/OperationList-DndcCJUG.js.map +1 -0
- package/lib/{Select-Dqtcn53H.js → Select-FAYHOYTy.js} +4 -4
- package/lib/{Select-Dqtcn53H.js.map → Select-FAYHOYTy.js.map} +1 -1
- package/lib/{SlotletProvider-DdtIOUi6.js → SlotletProvider-TydSHROc.js} +4 -4
- package/lib/{SlotletProvider-DdtIOUi6.js.map → SlotletProvider-TydSHROc.js.map} +1 -1
- package/lib/{chunk-IR6S3I6Y-D_3UmFIn.js → chunk-HA7DTUK3-ZGg2W6yV.js} +277 -277
- package/lib/chunk-HA7DTUK3-ZGg2W6yV.js.map +1 -0
- package/lib/hook-CfCFKZ-2.js +350 -0
- package/lib/hook-CfCFKZ-2.js.map +1 -0
- package/lib/index-DK7IuUyR.js +2201 -0
- package/lib/index-DK7IuUyR.js.map +1 -0
- package/lib/{index.esm-CQHE3GEU.js → index.esm-CltAN0Tf.js} +259 -239
- package/lib/index.esm-CltAN0Tf.js.map +1 -0
- package/lib/{mutation-EclmI0is.js → mutation-B81DztCT.js} +2 -2
- package/lib/{mutation-EclmI0is.js.map → mutation-B81DztCT.js.map} +1 -1
- package/lib/objectEntries-BS7aAgOm.js +12 -0
- package/lib/objectEntries-BS7aAgOm.js.map +1 -0
- package/lib/ui/Checkbox.js +15 -25
- package/lib/ui/Checkbox.js.map +1 -1
- package/lib/ui/Command.js +96 -70
- package/lib/ui/Command.js.map +1 -1
- package/lib/ui/Select.js +1 -1
- package/lib/ui/Select.js.map +1 -1
- package/lib/ui/SyntaxHighlight.js +483 -502
- package/lib/ui/SyntaxHighlight.js.map +1 -1
- package/lib/{useExposedProps-RIvey2Oy.js → useExposedProps-BslIn-FE.js} +2 -2
- package/lib/{useExposedProps-RIvey2Oy.js.map → useExposedProps-BslIn-FE.js.map} +1 -1
- package/lib/useQuery-CQUwWR9i.js +1137 -0
- package/lib/useQuery-CQUwWR9i.js.map +1 -0
- package/lib/zudoku.auth-auth0.js +1 -1
- package/lib/zudoku.auth-clerk.js +29 -29
- package/lib/zudoku.auth-clerk.js.map +1 -1
- package/lib/zudoku.auth-openid.js +3 -3
- package/lib/zudoku.components.js +146 -149
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.hooks.js +1 -1
- package/lib/zudoku.plugin-api-catalog.js +87 -71
- package/lib/zudoku.plugin-api-catalog.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +16 -15
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-custom-pages.js +2 -2
- 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 +204 -0
- package/lib/zudoku.plugin-search-pagefind.js.map +1 -0
- package/package.json +10 -5
- package/src/lib/authentication/hook.ts +12 -1
- package/src/lib/authentication/providers/clerk.tsx +10 -6
- package/src/lib/components/AnchorLink.tsx +7 -7
- package/src/lib/components/Banner.tsx +1 -0
- package/src/lib/components/Heading.tsx +1 -1
- package/src/lib/components/Layout.tsx +1 -0
- package/src/lib/components/navigation/SidebarItem.tsx +8 -23
- package/src/lib/core/RouteGuard.tsx +2 -1
- package/src/lib/core/ZudokuContext.ts +4 -0
- package/src/lib/plugins/api-catalog/Catalog.tsx +23 -7
- package/src/lib/plugins/api-catalog/index.tsx +1 -0
- package/src/lib/plugins/markdown/MdxPage.tsx +5 -1
- package/src/lib/plugins/openapi/OperationList.tsx +83 -31
- package/src/lib/plugins/openapi/OperationListItem.tsx +107 -86
- package/src/lib/plugins/openapi/ParameterList.tsx +4 -0
- package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +7 -0
- package/src/lib/plugins/openapi/Sidecar.tsx +1 -0
- package/src/lib/plugins/openapi/graphql/gql.ts +3 -3
- package/src/lib/plugins/openapi/graphql/graphql.ts +3 -0
- package/src/lib/plugins/openapi/playground/ExamplesDropdown.tsx +30 -32
- package/src/lib/plugins/openapi/playground/Headers.tsx +0 -1
- package/src/lib/plugins/openapi/playground/IdentityDialog.tsx +74 -0
- package/src/lib/plugins/openapi/playground/IdentitySelector.tsx +54 -0
- package/src/lib/plugins/openapi/playground/PathParams.tsx +8 -2
- package/src/lib/plugins/openapi/playground/Playground.tsx +175 -88
- package/src/lib/plugins/openapi/playground/QueryParams.tsx +0 -1
- package/src/lib/plugins/openapi/playground/RequestLoginDialog.tsx +51 -0
- package/src/lib/plugins/openapi/playground/rememberedIdentity.ts +26 -0
- package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +24 -4
- package/src/lib/plugins/openapi/playground/result-panel/ResultPanel.tsx +66 -45
- package/src/lib/plugins/search-pagefind/PagefindSearch.tsx +135 -0
- package/src/lib/plugins/search-pagefind/ResultList.tsx +104 -0
- package/src/lib/plugins/search-pagefind/get-results.tsx +54 -0
- package/src/lib/plugins/search-pagefind/index.tsx +21 -0
- package/src/lib/plugins/search-pagefind/types.ts +118 -0
- package/src/lib/ui/Checkbox.tsx +8 -24
- package/src/lib/ui/Command.tsx +25 -3
- package/src/lib/ui/Select.tsx +1 -1
- package/src/lib/ui/SyntaxHighlight.tsx +94 -96
- package/src/lib/util/MdxComponents.tsx +2 -2
- package/src/lib/util/useScrollToAnchor.ts +8 -8
- package/lib/Markdown-DePfm7oQ.js.map +0 -1
- package/lib/MdxPage-DZTt9ld7.js +0 -193
- package/lib/MdxPage-DZTt9ld7.js.map +0 -1
- package/lib/OperationList-DDs9NblY.js.map +0 -1
- package/lib/chunk-IR6S3I6Y-D_3UmFIn.js.map +0 -1
- package/lib/hook-CN__aZIt.js +0 -1464
- package/lib/hook-CN__aZIt.js.map +0 -1
- package/lib/index-CibzSNks.js +0 -2100
- package/lib/index-CibzSNks.js.map +0 -1
- package/lib/index.esm-CQHE3GEU.js.map +0 -1
- package/lib/objectEntries-yMIkr2mI.js +0 -5
- package/lib/objectEntries-yMIkr2mI.js.map +0 -1
- package/lib/useScrollToAnchor-C7ilRSts.js +0 -290
- package/lib/useScrollToAnchor-C7ilRSts.js.map +0 -1
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { createElement as de, useCallback as
|
|
3
|
-
import { a as
|
|
4
|
-
import { CheckIcon as
|
|
5
|
-
import { z as
|
|
6
|
-
import { C as
|
|
7
|
-
var
|
|
8
|
-
for (var
|
|
9
|
-
|
|
1
|
+
import { j as _ } from "../jsx-runtime-CYK1ROHF.js";
|
|
2
|
+
import { createElement as de, useCallback as K, useMemo as ye, memo as fe, useState as be } from "react";
|
|
3
|
+
import { a as se, c as ee } from "../cn-qaFjX9_3.js";
|
|
4
|
+
import { CheckIcon as me, CopyIcon as he } from "lucide-react";
|
|
5
|
+
import { z as ve } from "../index-DwT-v3zK.js";
|
|
6
|
+
import { C as te } from "../ClientOnly-E7hGysn1.js";
|
|
7
|
+
var ke = Object.create, Z = Object.defineProperty, we = Object.defineProperties, Ee = Object.getOwnPropertyDescriptor, xe = Object.getOwnPropertyDescriptors, le = Object.getOwnPropertyNames, G = Object.getOwnPropertySymbols, Ae = Object.getPrototypeOf, X = Object.prototype.hasOwnProperty, ie = Object.prototype.propertyIsEnumerable, ae = (e, t, r) => t in e ? Z(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, N = (e, t) => {
|
|
8
|
+
for (var r in t || (t = {}))
|
|
9
|
+
X.call(t, r) && ae(e, r, t[r]);
|
|
10
10
|
if (G)
|
|
11
|
-
for (var
|
|
12
|
-
|
|
11
|
+
for (var r of G(t))
|
|
12
|
+
ie.call(t, r) && ae(e, r, t[r]);
|
|
13
13
|
return e;
|
|
14
|
-
}, q = (e, t) =>
|
|
15
|
-
var
|
|
14
|
+
}, q = (e, t) => we(e, xe(t)), ue = (e, t) => {
|
|
15
|
+
var r = {};
|
|
16
16
|
for (var i in e)
|
|
17
|
-
|
|
17
|
+
X.call(e, i) && t.indexOf(i) < 0 && (r[i] = e[i]);
|
|
18
18
|
if (e != null && G)
|
|
19
19
|
for (var i of G(e))
|
|
20
|
-
t.indexOf(i) < 0 &&
|
|
21
|
-
return
|
|
22
|
-
},
|
|
23
|
-
return t || (0, e[
|
|
24
|
-
},
|
|
25
|
-
for (var
|
|
26
|
-
Z(e,
|
|
27
|
-
},
|
|
20
|
+
t.indexOf(i) < 0 && ie.call(e, i) && (r[i] = e[i]);
|
|
21
|
+
return r;
|
|
22
|
+
}, Se = (e, t) => function() {
|
|
23
|
+
return t || (0, e[le(e)[0]])((t = { exports: {} }).exports, t), t.exports;
|
|
24
|
+
}, _e = (e, t) => {
|
|
25
|
+
for (var r in t)
|
|
26
|
+
Z(e, r, { get: t[r], enumerable: !0 });
|
|
27
|
+
}, Fe = (e, t, r, i) => {
|
|
28
28
|
if (t && typeof t == "object" || typeof t == "function")
|
|
29
|
-
for (let
|
|
30
|
-
!
|
|
29
|
+
for (let f of le(t))
|
|
30
|
+
!X.call(e, f) && f !== r && Z(e, f, { get: () => t[f], enumerable: !(i = Ee(t, f)) || i.enumerable });
|
|
31
31
|
return e;
|
|
32
|
-
},
|
|
32
|
+
}, Te = (e, t, r) => (r = e != null ? ke(Ae(e)) : {}, Fe(
|
|
33
33
|
// If the importer is in node compatibility mode or this is not an ESM
|
|
34
34
|
// file that has been converted to a CommonJS file using a Babel-
|
|
35
35
|
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
36
36
|
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
37
|
-
!e || !e.__esModule ? Z(
|
|
37
|
+
!e || !e.__esModule ? Z(r, "default", { value: e, enumerable: !0 }) : r,
|
|
38
38
|
e
|
|
39
|
-
)),
|
|
39
|
+
)), Re = Se({
|
|
40
40
|
"../../node_modules/.pnpm/prismjs@1.29.0_patch_hash=vrxx3pzkik6jpmgpayxfjunetu/node_modules/prismjs/prism.js"(e, t) {
|
|
41
|
-
var
|
|
42
|
-
var i = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,
|
|
41
|
+
var r = function() {
|
|
42
|
+
var i = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i, f = 0, h = {}, u = {
|
|
43
43
|
/**
|
|
44
44
|
* A namespace for utility methods.
|
|
45
45
|
*
|
|
@@ -50,8 +50,8 @@ var ve = Object.create, Z = Object.defineProperty, ke = Object.defineProperties,
|
|
|
50
50
|
* @memberof Prism
|
|
51
51
|
*/
|
|
52
52
|
util: {
|
|
53
|
-
encode: function n(
|
|
54
|
-
return
|
|
53
|
+
encode: function n(a) {
|
|
54
|
+
return a instanceof m ? new m(a.type, n(a.content), a.alias) : Array.isArray(a) ? a.map(n) : a.replace(/&/g, "&").replace(/</g, "<").replace(/\u00a0/g, " ");
|
|
55
55
|
},
|
|
56
56
|
/**
|
|
57
57
|
* Returns the name of the type of the given value.
|
|
@@ -79,7 +79,7 @@ var ve = Object.create, Z = Object.defineProperty, ke = Object.defineProperties,
|
|
|
79
79
|
* @returns {number}
|
|
80
80
|
*/
|
|
81
81
|
objId: function(n) {
|
|
82
|
-
return n.__id || Object.defineProperty(n, "__id", { value: ++
|
|
82
|
+
return n.__id || Object.defineProperty(n, "__id", { value: ++f }), n.__id;
|
|
83
83
|
},
|
|
84
84
|
/**
|
|
85
85
|
* Creates a deep clone of the given object.
|
|
@@ -91,28 +91,28 @@ var ve = Object.create, Z = Object.defineProperty, ke = Object.defineProperties,
|
|
|
91
91
|
* @returns {T}
|
|
92
92
|
* @template T
|
|
93
93
|
*/
|
|
94
|
-
clone: function n(
|
|
94
|
+
clone: function n(a, s) {
|
|
95
95
|
s = s || {};
|
|
96
|
-
var
|
|
97
|
-
switch (
|
|
96
|
+
var c, l;
|
|
97
|
+
switch (u.util.type(a)) {
|
|
98
98
|
case "Object":
|
|
99
|
-
if (l =
|
|
99
|
+
if (l = u.util.objId(a), s[l])
|
|
100
100
|
return s[l];
|
|
101
|
-
|
|
102
|
-
{}, s[l] =
|
|
103
|
-
for (var
|
|
104
|
-
|
|
101
|
+
c = /** @type {Record<string, any>} */
|
|
102
|
+
{}, s[l] = c;
|
|
103
|
+
for (var d in a)
|
|
104
|
+
a.hasOwnProperty(d) && (c[d] = n(a[d], s));
|
|
105
105
|
return (
|
|
106
106
|
/** @type {any} */
|
|
107
|
-
|
|
107
|
+
c
|
|
108
108
|
);
|
|
109
109
|
case "Array":
|
|
110
|
-
return l =
|
|
111
|
-
|
|
110
|
+
return l = u.util.objId(a), s[l] ? s[l] : (c = [], s[l] = c, a.forEach(function(k, E) {
|
|
111
|
+
c[E] = n(k, s);
|
|
112
112
|
}), /** @type {any} */
|
|
113
|
-
|
|
113
|
+
c);
|
|
114
114
|
default:
|
|
115
|
-
return
|
|
115
|
+
return a;
|
|
116
116
|
}
|
|
117
117
|
},
|
|
118
118
|
/**
|
|
@@ -125,9 +125,9 @@ var ve = Object.create, Z = Object.defineProperty, ke = Object.defineProperties,
|
|
|
125
125
|
*/
|
|
126
126
|
getLanguage: function(n) {
|
|
127
127
|
for (; n; ) {
|
|
128
|
-
var
|
|
129
|
-
if (
|
|
130
|
-
return
|
|
128
|
+
var a = i.exec(n.className);
|
|
129
|
+
if (a)
|
|
130
|
+
return a[1].toLowerCase();
|
|
131
131
|
n = n.parentElement;
|
|
132
132
|
}
|
|
133
133
|
return "none";
|
|
@@ -139,8 +139,8 @@ var ve = Object.create, Z = Object.defineProperty, ke = Object.defineProperties,
|
|
|
139
139
|
* @param {string} language
|
|
140
140
|
* @returns {void}
|
|
141
141
|
*/
|
|
142
|
-
setLanguage: function(n,
|
|
143
|
-
n.className = n.className.replace(RegExp(i, "gi"), ""), n.classList.add("language-" +
|
|
142
|
+
setLanguage: function(n, a) {
|
|
143
|
+
n.className = n.className.replace(RegExp(i, "gi"), ""), n.classList.add("language-" + a);
|
|
144
144
|
},
|
|
145
145
|
/**
|
|
146
146
|
* Returns whether a given class is active for `element`.
|
|
@@ -161,12 +161,12 @@ var ve = Object.create, Z = Object.defineProperty, ke = Object.defineProperties,
|
|
|
161
161
|
* @param {boolean} [defaultActivation=false]
|
|
162
162
|
* @returns {boolean}
|
|
163
163
|
*/
|
|
164
|
-
isActive: function(n,
|
|
165
|
-
for (var
|
|
164
|
+
isActive: function(n, a, s) {
|
|
165
|
+
for (var c = "no-" + a; n; ) {
|
|
166
166
|
var l = n.classList;
|
|
167
|
-
if (l.contains(
|
|
167
|
+
if (l.contains(a))
|
|
168
168
|
return !0;
|
|
169
|
-
if (l.contains(
|
|
169
|
+
if (l.contains(c))
|
|
170
170
|
return !1;
|
|
171
171
|
n = n.parentElement;
|
|
172
172
|
}
|
|
@@ -184,10 +184,10 @@ var ve = Object.create, Z = Object.defineProperty, ke = Object.defineProperties,
|
|
|
184
184
|
/**
|
|
185
185
|
* The grammar for plain, unformatted text.
|
|
186
186
|
*/
|
|
187
|
-
plain:
|
|
188
|
-
plaintext:
|
|
189
|
-
text:
|
|
190
|
-
txt:
|
|
187
|
+
plain: h,
|
|
188
|
+
plaintext: h,
|
|
189
|
+
text: h,
|
|
190
|
+
txt: h,
|
|
191
191
|
/**
|
|
192
192
|
* Creates a deep copy of the language with the given id and appends the given tokens.
|
|
193
193
|
*
|
|
@@ -216,10 +216,10 @@ var ve = Object.create, Z = Object.defineProperty, ke = Object.defineProperties,
|
|
|
216
216
|
* 'color': /\b(?:red|green|blue)\b/
|
|
217
217
|
* });
|
|
218
218
|
*/
|
|
219
|
-
extend: function(n,
|
|
220
|
-
var s =
|
|
221
|
-
for (var
|
|
222
|
-
s[
|
|
219
|
+
extend: function(n, a) {
|
|
220
|
+
var s = u.util.clone(u.languages[n]);
|
|
221
|
+
for (var c in a)
|
|
222
|
+
s[c] = a[c];
|
|
223
223
|
return s;
|
|
224
224
|
},
|
|
225
225
|
/**
|
|
@@ -297,31 +297,31 @@ var ve = Object.create, Z = Object.defineProperty, ke = Object.defineProperties,
|
|
|
297
297
|
* @returns {Grammar} The new grammar object.
|
|
298
298
|
* @public
|
|
299
299
|
*/
|
|
300
|
-
insertBefore: function(n,
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
var l =
|
|
300
|
+
insertBefore: function(n, a, s, c) {
|
|
301
|
+
c = c || /** @type {any} */
|
|
302
|
+
u.languages;
|
|
303
|
+
var l = c[n], d = {};
|
|
304
304
|
for (var k in l)
|
|
305
305
|
if (l.hasOwnProperty(k)) {
|
|
306
|
-
if (k ==
|
|
307
|
-
for (var
|
|
308
|
-
s.hasOwnProperty(
|
|
309
|
-
s.hasOwnProperty(k) || (
|
|
306
|
+
if (k == a)
|
|
307
|
+
for (var E in s)
|
|
308
|
+
s.hasOwnProperty(E) && (d[E] = s[E]);
|
|
309
|
+
s.hasOwnProperty(k) || (d[k] = l[k]);
|
|
310
310
|
}
|
|
311
|
-
var A =
|
|
312
|
-
return
|
|
313
|
-
|
|
314
|
-
}),
|
|
311
|
+
var A = c[n];
|
|
312
|
+
return c[n] = d, u.languages.DFS(u.languages, function(x, F) {
|
|
313
|
+
F === A && x != n && (this[x] = d);
|
|
314
|
+
}), d;
|
|
315
315
|
},
|
|
316
316
|
// Traverse a language definition with Depth First Search
|
|
317
|
-
DFS: function n(
|
|
317
|
+
DFS: function n(a, s, c, l) {
|
|
318
318
|
l = l || {};
|
|
319
|
-
var
|
|
320
|
-
for (var k in
|
|
321
|
-
if (
|
|
322
|
-
s.call(
|
|
323
|
-
var
|
|
324
|
-
A === "Object" && !l[
|
|
319
|
+
var d = u.util.objId;
|
|
320
|
+
for (var k in a)
|
|
321
|
+
if (a.hasOwnProperty(k)) {
|
|
322
|
+
s.call(a, k, a[k], c || k);
|
|
323
|
+
var E = a[k], A = u.util.type(E);
|
|
324
|
+
A === "Object" && !l[d(E)] ? (l[d(E)] = !0, n(E, s, null, l)) : A === "Array" && !l[d(E)] && (l[d(E)] = !0, n(E, s, k, l));
|
|
325
325
|
}
|
|
326
326
|
}
|
|
327
327
|
},
|
|
@@ -346,15 +346,15 @@ var ve = Object.create, Z = Object.defineProperty, ke = Object.defineProperties,
|
|
|
346
346
|
* @example
|
|
347
347
|
* Prism.highlight('var foo = true;', Prism.languages.javascript, 'javascript');
|
|
348
348
|
*/
|
|
349
|
-
highlight: function(n,
|
|
350
|
-
var
|
|
349
|
+
highlight: function(n, a, s) {
|
|
350
|
+
var c = {
|
|
351
351
|
code: n,
|
|
352
|
-
grammar:
|
|
352
|
+
grammar: a,
|
|
353
353
|
language: s
|
|
354
354
|
};
|
|
355
|
-
if (
|
|
356
|
-
throw new Error('The language "' +
|
|
357
|
-
return
|
|
355
|
+
if (u.hooks.run("before-tokenize", c), !c.grammar)
|
|
356
|
+
throw new Error('The language "' + c.language + '" has no grammar.');
|
|
357
|
+
return c.tokens = u.tokenize(c.code, c.grammar), u.hooks.run("after-tokenize", c), m.stringify(u.util.encode(c.tokens), c.language);
|
|
358
358
|
},
|
|
359
359
|
/**
|
|
360
360
|
* This is the heart of Prism, and the most low-level function you can use. It accepts a string of text as input
|
|
@@ -380,15 +380,15 @@ var ve = Object.create, Z = Object.defineProperty, ke = Object.defineProperties,
|
|
|
380
380
|
* }
|
|
381
381
|
* });
|
|
382
382
|
*/
|
|
383
|
-
tokenize: function(n,
|
|
384
|
-
var s =
|
|
383
|
+
tokenize: function(n, a) {
|
|
384
|
+
var s = a.rest;
|
|
385
385
|
if (s) {
|
|
386
|
-
for (var
|
|
387
|
-
|
|
388
|
-
delete
|
|
386
|
+
for (var c in s)
|
|
387
|
+
a[c] = s[c];
|
|
388
|
+
delete a.rest;
|
|
389
389
|
}
|
|
390
390
|
var l = new b();
|
|
391
|
-
return
|
|
391
|
+
return y(l, l.head, n), g(n, l, a, l.head, 0), w(l);
|
|
392
392
|
},
|
|
393
393
|
/**
|
|
394
394
|
* @namespace
|
|
@@ -409,9 +409,9 @@ var ve = Object.create, Z = Object.defineProperty, ke = Object.defineProperties,
|
|
|
409
409
|
* @param {HookCallback} callback The callback function which is given environment variables.
|
|
410
410
|
* @public
|
|
411
411
|
*/
|
|
412
|
-
add: function(n,
|
|
413
|
-
var s =
|
|
414
|
-
s[n] = s[n] || [], s[n].push(
|
|
412
|
+
add: function(n, a) {
|
|
413
|
+
var s = u.hooks.all;
|
|
414
|
+
s[n] = s[n] || [], s[n].push(a);
|
|
415
415
|
},
|
|
416
416
|
/**
|
|
417
417
|
* Runs a hook invoking all registered callbacks with the given environment variables.
|
|
@@ -422,93 +422,93 @@ var ve = Object.create, Z = Object.defineProperty, ke = Object.defineProperties,
|
|
|
422
422
|
* @param {Object<string, any>} env The environment variables of the hook passed to all callbacks registered.
|
|
423
423
|
* @public
|
|
424
424
|
*/
|
|
425
|
-
run: function(n,
|
|
426
|
-
var s =
|
|
425
|
+
run: function(n, a) {
|
|
426
|
+
var s = u.hooks.all[n];
|
|
427
427
|
if (!(!s || !s.length))
|
|
428
|
-
for (var
|
|
429
|
-
l(
|
|
428
|
+
for (var c = 0, l; l = s[c++]; )
|
|
429
|
+
l(a);
|
|
430
430
|
}
|
|
431
431
|
},
|
|
432
|
-
Token:
|
|
432
|
+
Token: m
|
|
433
433
|
};
|
|
434
|
-
function
|
|
435
|
-
this.type = n, this.content =
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
if (typeof
|
|
439
|
-
return
|
|
440
|
-
if (Array.isArray(
|
|
441
|
-
var
|
|
442
|
-
return
|
|
443
|
-
|
|
444
|
-
}),
|
|
434
|
+
function m(n, a, s, c) {
|
|
435
|
+
this.type = n, this.content = a, this.alias = s, this.length = (c || "").length | 0;
|
|
436
|
+
}
|
|
437
|
+
m.stringify = function n(a, s) {
|
|
438
|
+
if (typeof a == "string")
|
|
439
|
+
return a;
|
|
440
|
+
if (Array.isArray(a)) {
|
|
441
|
+
var c = "";
|
|
442
|
+
return a.forEach(function(A) {
|
|
443
|
+
c += n(A, s);
|
|
444
|
+
}), c;
|
|
445
445
|
}
|
|
446
446
|
var l = {
|
|
447
|
-
type:
|
|
448
|
-
content: n(
|
|
447
|
+
type: a.type,
|
|
448
|
+
content: n(a.content, s),
|
|
449
449
|
tag: "span",
|
|
450
|
-
classes: ["token",
|
|
450
|
+
classes: ["token", a.type],
|
|
451
451
|
attributes: {},
|
|
452
452
|
language: s
|
|
453
|
-
},
|
|
454
|
-
|
|
453
|
+
}, d = a.alias;
|
|
454
|
+
d && (Array.isArray(d) ? Array.prototype.push.apply(l.classes, d) : l.classes.push(d)), u.hooks.run("wrap", l);
|
|
455
455
|
var k = "";
|
|
456
|
-
for (var
|
|
457
|
-
k += " " +
|
|
456
|
+
for (var E in l.attributes)
|
|
457
|
+
k += " " + E + '="' + (l.attributes[E] || "").replace(/"/g, """) + '"';
|
|
458
458
|
return "<" + l.tag + ' class="' + l.classes.join(" ") + '"' + k + ">" + l.content + "</" + l.tag + ">";
|
|
459
459
|
};
|
|
460
|
-
function p(n,
|
|
461
|
-
n.lastIndex =
|
|
460
|
+
function p(n, a, s, c) {
|
|
461
|
+
n.lastIndex = a;
|
|
462
462
|
var l = n.exec(s);
|
|
463
|
-
if (l &&
|
|
464
|
-
var
|
|
465
|
-
l.index +=
|
|
463
|
+
if (l && c && l[1]) {
|
|
464
|
+
var d = l[1].length;
|
|
465
|
+
l.index += d, l[0] = l[0].slice(d);
|
|
466
466
|
}
|
|
467
467
|
return l;
|
|
468
468
|
}
|
|
469
|
-
function
|
|
469
|
+
function g(n, a, s, c, l, d) {
|
|
470
470
|
for (var k in s)
|
|
471
471
|
if (!(!s.hasOwnProperty(k) || !s[k])) {
|
|
472
|
-
var
|
|
473
|
-
|
|
474
|
-
for (var A = 0; A <
|
|
475
|
-
if (
|
|
472
|
+
var E = s[k];
|
|
473
|
+
E = Array.isArray(E) ? E : [E];
|
|
474
|
+
for (var A = 0; A < E.length; ++A) {
|
|
475
|
+
if (d && d.cause == k + "," + A)
|
|
476
476
|
return;
|
|
477
|
-
var
|
|
478
|
-
if (D && !
|
|
479
|
-
var L =
|
|
480
|
-
|
|
477
|
+
var x = E[A], F = x.inside, T = !!x.lookbehind, D = !!x.greedy, C = x.alias;
|
|
478
|
+
if (D && !x.pattern.global) {
|
|
479
|
+
var L = x.pattern.toString().match(/[imsuy]*$/)[0];
|
|
480
|
+
x.pattern = RegExp(x.pattern.source, L + "g");
|
|
481
481
|
}
|
|
482
|
-
for (var
|
|
482
|
+
for (var Q = x.pattern || x, S = c.next, O = l; S !== a.tail && !(d && O >= d.reach); O += S.value.length, S = S.next) {
|
|
483
483
|
var $ = S.value;
|
|
484
|
-
if (
|
|
484
|
+
if (a.length > n.length)
|
|
485
485
|
return;
|
|
486
|
-
if (!($ instanceof
|
|
487
|
-
var
|
|
486
|
+
if (!($ instanceof m)) {
|
|
487
|
+
var j = 1, I;
|
|
488
488
|
if (D) {
|
|
489
|
-
if (I = p(
|
|
489
|
+
if (I = p(Q, O, n, T), !I || I.index >= n.length)
|
|
490
490
|
break;
|
|
491
|
-
var z = I.index,
|
|
491
|
+
var z = I.index, pe = I.index + I[0].length, B = O;
|
|
492
492
|
for (B += S.value.length; z >= B; )
|
|
493
493
|
S = S.next, B += S.value.length;
|
|
494
|
-
if (B -= S.value.length, O = B, S.value instanceof
|
|
494
|
+
if (B -= S.value.length, O = B, S.value instanceof m)
|
|
495
495
|
continue;
|
|
496
|
-
for (var
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
} else if (I = p(
|
|
496
|
+
for (var P = S; P !== a.tail && (B < pe || typeof P.value == "string"); P = P.next)
|
|
497
|
+
j++, B += P.value.length;
|
|
498
|
+
j--, $ = n.slice(O, B), I.index -= O;
|
|
499
|
+
} else if (I = p(Q, 0, $, T), !I)
|
|
500
500
|
continue;
|
|
501
|
-
var z = I.index, M = I[0], W = $.slice(0, z),
|
|
502
|
-
|
|
501
|
+
var z = I.index, M = I[0], W = $.slice(0, z), J = $.slice(z + M.length), H = O + $.length;
|
|
502
|
+
d && H > d.reach && (d.reach = H);
|
|
503
503
|
var U = S.prev;
|
|
504
|
-
W && (U =
|
|
505
|
-
var
|
|
506
|
-
if (S =
|
|
504
|
+
W && (U = y(a, U, W), O += W.length), v(a, U, j);
|
|
505
|
+
var ge = new m(k, F ? u.tokenize(M, F) : M, C, M);
|
|
506
|
+
if (S = y(a, U, ge), J && y(a, S, J), j > 1) {
|
|
507
507
|
var Y = {
|
|
508
508
|
cause: k + "," + A,
|
|
509
509
|
reach: H
|
|
510
510
|
};
|
|
511
|
-
|
|
511
|
+
g(n, a, s, S.prev, O, Y), d && Y.reach > d.reach && (d.reach = Y.reach);
|
|
512
512
|
}
|
|
513
513
|
}
|
|
514
514
|
}
|
|
@@ -516,57 +516,57 @@ var ve = Object.create, Z = Object.defineProperty, ke = Object.defineProperties,
|
|
|
516
516
|
}
|
|
517
517
|
}
|
|
518
518
|
function b() {
|
|
519
|
-
var n = { value: null, prev: null, next: null },
|
|
520
|
-
n.next =
|
|
519
|
+
var n = { value: null, prev: null, next: null }, a = { value: null, prev: n, next: null };
|
|
520
|
+
n.next = a, this.head = n, this.tail = a, this.length = 0;
|
|
521
521
|
}
|
|
522
|
-
function
|
|
523
|
-
var
|
|
524
|
-
return
|
|
522
|
+
function y(n, a, s) {
|
|
523
|
+
var c = a.next, l = { value: s, prev: a, next: c };
|
|
524
|
+
return a.next = l, c.prev = l, n.length++, l;
|
|
525
525
|
}
|
|
526
|
-
function v(n,
|
|
527
|
-
for (var
|
|
528
|
-
|
|
529
|
-
|
|
526
|
+
function v(n, a, s) {
|
|
527
|
+
for (var c = a.next, l = 0; l < s && c !== n.tail; l++)
|
|
528
|
+
c = c.next;
|
|
529
|
+
a.next = c, c.prev = a, n.length -= l;
|
|
530
530
|
}
|
|
531
531
|
function w(n) {
|
|
532
|
-
for (var
|
|
533
|
-
|
|
534
|
-
return
|
|
532
|
+
for (var a = [], s = n.head.next; s !== n.tail; )
|
|
533
|
+
a.push(s.value), s = s.next;
|
|
534
|
+
return a;
|
|
535
535
|
}
|
|
536
|
-
return
|
|
536
|
+
return u;
|
|
537
537
|
}();
|
|
538
|
-
t.exports =
|
|
538
|
+
t.exports = r, r.default = r;
|
|
539
539
|
}
|
|
540
|
-
}), o =
|
|
540
|
+
}), o = Te(Re());
|
|
541
541
|
o.languages.markup = { comment: { pattern: /<!--(?:(?!<!--)[\s\S])*?-->/, greedy: !0 }, prolog: { pattern: /<\?[\s\S]+?\?>/, greedy: !0 }, doctype: { pattern: /<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i, greedy: !0, inside: { "internal-subset": { pattern: /(^[^\[]*\[)[\s\S]+(?=\]>$)/, lookbehind: !0, greedy: !0, inside: null }, string: { pattern: /"[^"]*"|'[^']*'/, greedy: !0 }, punctuation: /^<!|>$|[[\]]/, "doctype-tag": /^DOCTYPE/i, name: /[^\s<>'"]+/ } }, cdata: { pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i, greedy: !0 }, tag: { pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/, greedy: !0, inside: { tag: { pattern: /^<\/?[^\s>\/]+/, inside: { punctuation: /^<\/?/, namespace: /^[^\s>\/:]+:/ } }, "special-attr": [], "attr-value": { pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/, inside: { punctuation: [{ pattern: /^=/, alias: "attr-equals" }, { pattern: /^(\s*)["']|["']$/, lookbehind: !0 }] } }, punctuation: /\/?>/, "attr-name": { pattern: /[^\s>\/]+/, inside: { namespace: /^[^\s>\/:]+:/ } } } }, entity: [{ pattern: /&[\da-z]{1,8};/i, alias: "named-entity" }, /&#x?[\da-f]{1,8};/i] }, o.languages.markup.tag.inside["attr-value"].inside.entity = o.languages.markup.entity, o.languages.markup.doctype.inside["internal-subset"].inside = o.languages.markup, o.hooks.add("wrap", function(e) {
|
|
542
542
|
e.type === "entity" && (e.attributes.title = e.content.replace(/&/, "&"));
|
|
543
543
|
}), Object.defineProperty(o.languages.markup.tag, "addInlined", { value: function(e, i) {
|
|
544
|
-
var
|
|
544
|
+
var r = {}, r = (r["language-" + i] = { pattern: /(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i, lookbehind: !0, inside: o.languages[i] }, r.cdata = /^<!\[CDATA\[|\]\]>$/i, { "included-cdata": { pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i, inside: r } }), i = (r["language-" + i] = { pattern: /[\s\S]+/, inside: o.languages[i] }, {});
|
|
545
545
|
i[e] = { pattern: RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g, function() {
|
|
546
546
|
return e;
|
|
547
|
-
}), "i"), lookbehind: !0, greedy: !0, inside:
|
|
547
|
+
}), "i"), lookbehind: !0, greedy: !0, inside: r }, o.languages.insertBefore("markup", "cdata", i);
|
|
548
548
|
} }), Object.defineProperty(o.languages.markup.tag, "addAttribute", { value: function(e, t) {
|
|
549
549
|
o.languages.markup.tag.inside["special-attr"].push({ pattern: RegExp(/(^|["'\s])/.source + "(?:" + e + ")" + /\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source, "i"), lookbehind: !0, inside: { "attr-name": /^[^\s=]+/, "attr-value": { pattern: /=[\s\S]+/, inside: { value: { pattern: /(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/, lookbehind: !0, alias: [t, "language-" + t], inside: o.languages[t] }, punctuation: [{ pattern: /^=/, alias: "attr-equals" }, /"|'/] } } } });
|
|
550
550
|
} }), o.languages.html = o.languages.markup, o.languages.mathml = o.languages.markup, o.languages.svg = o.languages.markup, o.languages.xml = o.languages.extend("markup", {}), o.languages.ssml = o.languages.xml, o.languages.atom = o.languages.xml, o.languages.rss = o.languages.xml, function(e) {
|
|
551
|
-
var t = { pattern: /\\[\\(){}[\]^$+*?|.]/, alias: "escape" },
|
|
552
|
-
e.languages.regex = { "char-class": { pattern: /((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/, lookbehind: !0, inside: { "char-class-negation": { pattern: /(^\[)\^/, lookbehind: !0, alias: "operator" }, "char-class-punctuation": { pattern: /^\[|\]$/, alias: "punctuation" }, range: { pattern: i, inside: { escape:
|
|
551
|
+
var t = { pattern: /\\[\\(){}[\]^$+*?|.]/, alias: "escape" }, r = /\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/, i = "(?:[^\\\\-]|" + r.source + ")", i = RegExp(i + "-" + i), f = { pattern: /(<|')[^<>']+(?=[>']$)/, lookbehind: !0, alias: "variable" };
|
|
552
|
+
e.languages.regex = { "char-class": { pattern: /((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/, lookbehind: !0, inside: { "char-class-negation": { pattern: /(^\[)\^/, lookbehind: !0, alias: "operator" }, "char-class-punctuation": { pattern: /^\[|\]$/, alias: "punctuation" }, range: { pattern: i, inside: { escape: r, "range-punctuation": { pattern: /-/, alias: "operator" } } }, "special-escape": t, "char-set": { pattern: /\\[wsd]|\\p\{[^{}]+\}/i, alias: "class-name" }, escape: r } }, "special-escape": t, "char-set": { pattern: /\.|\\[wsd]|\\p\{[^{}]+\}/i, alias: "class-name" }, backreference: [{ pattern: /\\(?![123][0-7]{2})[1-9]/, alias: "keyword" }, { pattern: /\\k<[^<>']+>/, alias: "keyword", inside: { "group-name": f } }], anchor: { pattern: /[$^]|\\[ABbGZz]/, alias: "function" }, escape: r, group: [{ pattern: /\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/, alias: "punctuation", inside: { "group-name": f } }, { pattern: /\)/, alias: "punctuation" }], quantifier: { pattern: /(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/, alias: "number" }, alternation: { pattern: /\|/, alias: "keyword" } };
|
|
553
553
|
}(o), o.languages.clike = { comment: [{ pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/, lookbehind: !0, greedy: !0 }, { pattern: /(^|[^\\:])\/\/.*/, lookbehind: !0, greedy: !0 }], string: { pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, greedy: !0 }, "class-name": { pattern: /(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i, lookbehind: !0, inside: { punctuation: /[.\\]/ } }, keyword: /\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/, boolean: /\b(?:false|true)\b/, function: /\b\w+(?=\()/, number: /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i, operator: /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/, punctuation: /[{}[\];(),.:]/ }, o.languages.javascript = o.languages.extend("clike", { "class-name": [o.languages.clike["class-name"], { pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/, lookbehind: !0 }], keyword: [{ pattern: /((?:^|\})\s*)catch\b/, lookbehind: !0 }, { pattern: /(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/, lookbehind: !0 }], function: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/, number: { pattern: RegExp(/(^|[^\w$])/.source + "(?:" + /NaN|Infinity/.source + "|" + /0[bB][01]+(?:_[01]+)*n?/.source + "|" + /0[oO][0-7]+(?:_[0-7]+)*n?/.source + "|" + /0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source + "|" + /\d+(?:_\d+)*n/.source + "|" + /(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source + ")" + /(?![\w$])/.source), lookbehind: !0 }, operator: /--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/ }), o.languages.javascript["class-name"][0].pattern = /(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/, o.languages.insertBefore("javascript", "keyword", { regex: { pattern: RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source + /\//.source + "(?:" + /(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source + "|" + /(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source + ")" + /(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source), lookbehind: !0, greedy: !0, inside: { "regex-source": { pattern: /^(\/)[\s\S]+(?=\/[a-z]*$)/, lookbehind: !0, alias: "language-regex", inside: o.languages.regex }, "regex-delimiter": /^\/|\/$/, "regex-flags": /^[a-z]+$/ } }, "function-variable": { pattern: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/, alias: "function" }, parameter: [{ pattern: /(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/, lookbehind: !0, inside: o.languages.javascript }, { pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i, lookbehind: !0, inside: o.languages.javascript }, { pattern: /(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/, lookbehind: !0, inside: o.languages.javascript }, { pattern: /((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/, lookbehind: !0, inside: o.languages.javascript }], constant: /\b[A-Z](?:[A-Z_]|\dx?)*\b/ }), o.languages.insertBefore("javascript", "string", { hashbang: { pattern: /^#!.*/, greedy: !0, alias: "comment" }, "template-string": { pattern: /`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/, greedy: !0, inside: { "template-punctuation": { pattern: /^`|`$/, alias: "string" }, interpolation: { pattern: /((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/, lookbehind: !0, inside: { "interpolation-punctuation": { pattern: /^\$\{|\}$/, alias: "punctuation" }, rest: o.languages.javascript } }, string: /[\s\S]+/ } }, "string-property": { pattern: /((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m, lookbehind: !0, greedy: !0, alias: "property" } }), o.languages.insertBefore("javascript", "operator", { "literal-property": { pattern: /((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m, lookbehind: !0, alias: "property" } }), o.languages.markup && (o.languages.markup.tag.addInlined("script", "javascript"), o.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source, "javascript")), o.languages.js = o.languages.javascript, o.languages.actionscript = o.languages.extend("javascript", { keyword: /\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/, operator: /\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]/ }), o.languages.actionscript["class-name"].alias = "function", delete o.languages.actionscript.parameter, delete o.languages.actionscript["literal-property"], o.languages.markup && o.languages.insertBefore("actionscript", "string", { xml: { pattern: /(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/, lookbehind: !0, inside: o.languages.markup } }), function(e) {
|
|
554
|
-
var t = /#(?!\{).+/,
|
|
555
|
-
e.languages.coffeescript = e.languages.extend("javascript", { comment: t, string: [{ pattern: /'(?:\\[\s\S]|[^\\'])*'/, greedy: !0 }, { pattern: /"(?:\\[\s\S]|[^\\"])*"/, greedy: !0, inside: { interpolation:
|
|
554
|
+
var t = /#(?!\{).+/, r = { pattern: /#\{[^}]+\}/, alias: "variable" };
|
|
555
|
+
e.languages.coffeescript = e.languages.extend("javascript", { comment: t, string: [{ pattern: /'(?:\\[\s\S]|[^\\'])*'/, greedy: !0 }, { pattern: /"(?:\\[\s\S]|[^\\"])*"/, greedy: !0, inside: { interpolation: r } }], keyword: /\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/, "class-member": { pattern: /@(?!\d)\w+/, alias: "variable" } }), e.languages.insertBefore("coffeescript", "comment", { "multiline-comment": { pattern: /###[\s\S]+?###/, alias: "comment" }, "block-regex": { pattern: /\/{3}[\s\S]*?\/{3}/, alias: "regex", inside: { comment: t, interpolation: r } } }), e.languages.insertBefore("coffeescript", "string", { "inline-javascript": { pattern: /`(?:\\[\s\S]|[^\\`])*`/, inside: { delimiter: { pattern: /^`|`$/, alias: "punctuation" }, script: { pattern: /[\s\S]+/, alias: "language-javascript", inside: e.languages.javascript } } }, "multiline-string": [{ pattern: /'''[\s\S]*?'''/, greedy: !0, alias: "string" }, { pattern: /"""[\s\S]*?"""/, greedy: !0, alias: "string", inside: { interpolation: r } }] }), e.languages.insertBefore("coffeescript", "keyword", { property: /(?!\d)\w+(?=\s*:(?!:))/ }), delete e.languages.coffeescript["template-string"], e.languages.coffee = e.languages.coffeescript;
|
|
556
556
|
}(o), function(e) {
|
|
557
557
|
var t = e.languages.javadoclike = { parameter: { pattern: /(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*@(?:arg|arguments|param)\s+)\w+/m, lookbehind: !0 }, keyword: { pattern: /(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*|\{)@[a-z][a-zA-Z-]+\b/m, lookbehind: !0 }, punctuation: /[{}]/ };
|
|
558
|
-
Object.defineProperty(t, "addSupport", { value: function(
|
|
559
|
-
(
|
|
560
|
-
var
|
|
561
|
-
|
|
562
|
-
},
|
|
563
|
-
if (
|
|
564
|
-
var
|
|
565
|
-
if ((p = p || (
|
|
566
|
-
for (var
|
|
567
|
-
p[
|
|
558
|
+
Object.defineProperty(t, "addSupport", { value: function(r, i) {
|
|
559
|
+
(r = typeof r == "string" ? [r] : r).forEach(function(f) {
|
|
560
|
+
var h = function(y) {
|
|
561
|
+
y.inside || (y.inside = {}), y.inside.rest = i;
|
|
562
|
+
}, u = "doc-comment";
|
|
563
|
+
if (m = e.languages[f]) {
|
|
564
|
+
var m, p = m[u];
|
|
565
|
+
if ((p = p || (m = e.languages.insertBefore(f, "comment", { "doc-comment": { pattern: /(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/, lookbehind: !0, alias: "comment" } }))[u]) instanceof RegExp && (p = m[u] = { pattern: p }), Array.isArray(p))
|
|
566
|
+
for (var g = 0, b = p.length; g < b; g++)
|
|
567
|
+
p[g] instanceof RegExp && (p[g] = { pattern: p[g] }), h(p[g]);
|
|
568
568
|
else
|
|
569
|
-
|
|
569
|
+
h(p);
|
|
570
570
|
}
|
|
571
571
|
});
|
|
572
572
|
} }), t.addSupport(["java", "javascript", "php"], t);
|
|
@@ -574,212 +574,212 @@ o.languages.markup = { comment: { pattern: /<!--(?:(?!<!--)[\s\S])*?-->/, greedy
|
|
|
574
574
|
var t = /(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/, t = (e.languages.css = { comment: /\/\*[\s\S]*?\*\//, atrule: { pattern: RegExp("@[\\w-](?:" + /[^;{\s"']|\s+(?!\s)/.source + "|" + t.source + ")*?" + /(?:;|(?=\s*\{))/.source), inside: { rule: /^@[\w-]+/, "selector-function-argument": { pattern: /(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/, lookbehind: !0, alias: "selector" }, keyword: { pattern: /(^|[^\w-])(?:and|not|only|or)(?![\w-])/, lookbehind: !0 } } }, url: { pattern: RegExp("\\burl\\((?:" + t.source + "|" + /(?:[^\\\r\n()"']|\\[\s\S])*/.source + ")\\)", "i"), greedy: !0, inside: { function: /^url/i, punctuation: /^\(|\)$/, string: { pattern: RegExp("^" + t.source + "$"), alias: "url" } } }, selector: { pattern: RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|` + t.source + ")*(?=\\s*\\{)"), lookbehind: !0 }, string: { pattern: t, greedy: !0 }, property: { pattern: /(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i, lookbehind: !0 }, important: /!important\b/i, function: { pattern: /(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i, lookbehind: !0 }, punctuation: /[(){};:,]/ }, e.languages.css.atrule.inside.rest = e.languages.css, e.languages.markup);
|
|
575
575
|
t && (t.tag.addInlined("style", "css"), t.tag.addAttribute("style", "css"));
|
|
576
576
|
}(o), function(e) {
|
|
577
|
-
var t = /("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, t = (e.languages.css.selector = { pattern: e.languages.css.selector.pattern, lookbehind: !0, inside: t = { "pseudo-element": /:(?:after|before|first-letter|first-line|selection)|::[-\w]+/, "pseudo-class": /:[-\w]+/, class: /\.[-\w]+/, id: /#[-\w]+/, attribute: { pattern: RegExp(`\\[(?:[^[\\]"']|` + t.source + ")*\\]"), greedy: !0, inside: { punctuation: /^\[|\]$/, "case-sensitivity": { pattern: /(\s)[si]$/i, lookbehind: !0, alias: "keyword" }, namespace: { pattern: /^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/, lookbehind: !0, inside: { punctuation: /\|$/ } }, "attr-name": { pattern: /^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/, lookbehind: !0 }, "attr-value": [t, { pattern: /(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/, lookbehind: !0 }], operator: /[|~*^$]?=/ } }, "n-th": [{ pattern: /(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/, lookbehind: !0, inside: { number: /[\dn]+/, operator: /[+-]/ } }, { pattern: /(\(\s*)(?:even|odd)(?=\s*\))/i, lookbehind: !0 }], combinator: />|\+|~|\|\|/, punctuation: /[(),]/ } }, e.languages.css.atrule.inside["selector-function-argument"].inside = t, e.languages.insertBefore("css", "property", { variable: { pattern: /(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i, lookbehind: !0 } }), { pattern: /(\b\d+)(?:%|[a-z]+(?![\w-]))/, lookbehind: !0 }),
|
|
578
|
-
e.languages.insertBefore("css", "function", { operator: { pattern: /(\s)[+\-*\/](?=\s)/, lookbehind: !0 }, hexcode: { pattern: /\B#[\da-f]{3,8}\b/i, alias: "color" }, color: [{ pattern: /(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|RebeccaPurple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i, lookbehind: !0 }, { pattern: /\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i, inside: { unit: t, number:
|
|
577
|
+
var t = /("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, t = (e.languages.css.selector = { pattern: e.languages.css.selector.pattern, lookbehind: !0, inside: t = { "pseudo-element": /:(?:after|before|first-letter|first-line|selection)|::[-\w]+/, "pseudo-class": /:[-\w]+/, class: /\.[-\w]+/, id: /#[-\w]+/, attribute: { pattern: RegExp(`\\[(?:[^[\\]"']|` + t.source + ")*\\]"), greedy: !0, inside: { punctuation: /^\[|\]$/, "case-sensitivity": { pattern: /(\s)[si]$/i, lookbehind: !0, alias: "keyword" }, namespace: { pattern: /^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/, lookbehind: !0, inside: { punctuation: /\|$/ } }, "attr-name": { pattern: /^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/, lookbehind: !0 }, "attr-value": [t, { pattern: /(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/, lookbehind: !0 }], operator: /[|~*^$]?=/ } }, "n-th": [{ pattern: /(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/, lookbehind: !0, inside: { number: /[\dn]+/, operator: /[+-]/ } }, { pattern: /(\(\s*)(?:even|odd)(?=\s*\))/i, lookbehind: !0 }], combinator: />|\+|~|\|\|/, punctuation: /[(),]/ } }, e.languages.css.atrule.inside["selector-function-argument"].inside = t, e.languages.insertBefore("css", "property", { variable: { pattern: /(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i, lookbehind: !0 } }), { pattern: /(\b\d+)(?:%|[a-z]+(?![\w-]))/, lookbehind: !0 }), r = { pattern: /(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/, lookbehind: !0 };
|
|
578
|
+
e.languages.insertBefore("css", "function", { operator: { pattern: /(\s)[+\-*\/](?=\s)/, lookbehind: !0 }, hexcode: { pattern: /\B#[\da-f]{3,8}\b/i, alias: "color" }, color: [{ pattern: /(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|RebeccaPurple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i, lookbehind: !0 }, { pattern: /\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i, inside: { unit: t, number: r, function: /[\w-]+(?=\()/, punctuation: /[(),]/ } }], entity: /\\[\da-f]{1,8}/i, unit: t, number: r });
|
|
579
579
|
}(o), function(e) {
|
|
580
|
-
var t = /[*&][^\s[\]{},]+/,
|
|
580
|
+
var t = /[*&][^\s[\]{},]+/, r = /!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/, i = "(?:" + r.source + "(?:[ ]+" + t.source + ")?|" + t.source + "(?:[ ]+" + r.source + ")?)", f = /(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g, function() {
|
|
581
581
|
return /[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source;
|
|
582
|
-
}),
|
|
583
|
-
function
|
|
582
|
+
}), h = /"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;
|
|
583
|
+
function u(m, p) {
|
|
584
584
|
p = (p || "").replace(/m/g, "") + "m";
|
|
585
|
-
var
|
|
585
|
+
var g = /([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g, function() {
|
|
586
586
|
return i;
|
|
587
587
|
}).replace(/<<value>>/g, function() {
|
|
588
|
-
return
|
|
588
|
+
return m;
|
|
589
589
|
});
|
|
590
|
-
return RegExp(
|
|
590
|
+
return RegExp(g, p);
|
|
591
591
|
}
|
|
592
592
|
e.languages.yaml = { scalar: { pattern: RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g, function() {
|
|
593
593
|
return i;
|
|
594
594
|
})), lookbehind: !0, alias: "string" }, comment: /#.*/, key: { pattern: RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g, function() {
|
|
595
595
|
return i;
|
|
596
596
|
}).replace(/<<key>>/g, function() {
|
|
597
|
-
return "(?:" +
|
|
598
|
-
})), lookbehind: !0, greedy: !0, alias: "atrule" }, directive: { pattern: /(^[ \t]*)%.+/m, lookbehind: !0, alias: "important" }, datetime: { pattern:
|
|
597
|
+
return "(?:" + f + "|" + h + ")";
|
|
598
|
+
})), lookbehind: !0, greedy: !0, alias: "atrule" }, directive: { pattern: /(^[ \t]*)%.+/m, lookbehind: !0, alias: "important" }, datetime: { pattern: u(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source), lookbehind: !0, alias: "number" }, boolean: { pattern: u(/false|true/.source, "i"), lookbehind: !0, alias: "important" }, null: { pattern: u(/null|~/.source, "i"), lookbehind: !0, alias: "important" }, string: { pattern: u(h), lookbehind: !0, greedy: !0 }, number: { pattern: u(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source, "i"), lookbehind: !0 }, tag: r, important: t, punctuation: /---|[:[\]{}\-,|>?]|\.\.\./ }, e.languages.yml = e.languages.yaml;
|
|
599
599
|
}(o), function(e) {
|
|
600
600
|
var t = /(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;
|
|
601
|
-
function
|
|
602
|
-
return
|
|
601
|
+
function r(g) {
|
|
602
|
+
return g = g.replace(/<inner>/g, function() {
|
|
603
603
|
return t;
|
|
604
|
-
}), RegExp(/((?:^|[^\\])(?:\\{2})*)/.source + "(?:" +
|
|
604
|
+
}), RegExp(/((?:^|[^\\])(?:\\{2})*)/.source + "(?:" + g + ")");
|
|
605
605
|
}
|
|
606
|
-
var i = /(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,
|
|
606
|
+
var i = /(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source, f = /\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g, function() {
|
|
607
607
|
return i;
|
|
608
|
-
}),
|
|
608
|
+
}), h = /\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source, u = (e.languages.markdown = e.languages.extend("markup", {}), e.languages.insertBefore("markdown", "prolog", { "front-matter-block": { pattern: /(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/, lookbehind: !0, greedy: !0, inside: { punctuation: /^---|---$/, "front-matter": { pattern: /\S+(?:\s+\S+)*/, alias: ["yaml", "language-yaml"], inside: e.languages.yaml } } }, blockquote: { pattern: /^>(?:[\t ]*>)*/m, alias: "punctuation" }, table: { pattern: RegExp("^" + f + h + "(?:" + f + ")*", "m"), inside: { "table-data-rows": { pattern: RegExp("^(" + f + h + ")(?:" + f + ")*$"), lookbehind: !0, inside: { "table-data": { pattern: RegExp(i), inside: e.languages.markdown }, punctuation: /\|/ } }, "table-line": { pattern: RegExp("^(" + f + ")" + h + "$"), lookbehind: !0, inside: { punctuation: /\||:?-{3,}:?/ } }, "table-header-row": { pattern: RegExp("^" + f + "$"), inside: { "table-header": { pattern: RegExp(i), alias: "important", inside: e.languages.markdown }, punctuation: /\|/ } } } }, code: [{ pattern: /((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/, lookbehind: !0, alias: "keyword" }, { pattern: /^```[\s\S]*?^```$/m, greedy: !0, inside: { "code-block": { pattern: /^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m, lookbehind: !0 }, "code-language": { pattern: /^(```).+/, lookbehind: !0 }, punctuation: /```/ } }], title: [{ pattern: /\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m, alias: "important", inside: { punctuation: /==+$|--+$/ } }, { pattern: /(^\s*)#.+/m, lookbehind: !0, alias: "important", inside: { punctuation: /^#+|#+$/ } }], hr: { pattern: /(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m, lookbehind: !0, alias: "punctuation" }, list: { pattern: /(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m, lookbehind: !0, alias: "punctuation" }, "url-reference": { pattern: /!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/, inside: { variable: { pattern: /^(!?\[)[^\]]+/, lookbehind: !0 }, string: /(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/, punctuation: /^[\[\]!:]|[<>]/ }, alias: "url" }, bold: { pattern: r(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source), lookbehind: !0, greedy: !0, inside: { content: { pattern: /(^..)[\s\S]+(?=..$)/, lookbehind: !0, inside: {} }, punctuation: /\*\*|__/ } }, italic: { pattern: r(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source), lookbehind: !0, greedy: !0, inside: { content: { pattern: /(^.)[\s\S]+(?=.$)/, lookbehind: !0, inside: {} }, punctuation: /[*_]/ } }, strike: { pattern: r(/(~~?)(?:(?!~)<inner>)+\2/.source), lookbehind: !0, greedy: !0, inside: { content: { pattern: /(^~~?)[\s\S]+(?=\1$)/, lookbehind: !0, inside: {} }, punctuation: /~~?/ } }, "code-snippet": { pattern: /(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/, lookbehind: !0, greedy: !0, alias: ["code", "keyword"] }, url: { pattern: r(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source), lookbehind: !0, greedy: !0, inside: { operator: /^!/, content: { pattern: /(^\[)[^\]]+(?=\])/, lookbehind: !0, inside: {} }, variable: { pattern: /(^\][ \t]?\[)[^\]]+(?=\]$)/, lookbehind: !0 }, url: { pattern: /(^\]\()[^\s)]+/, lookbehind: !0 }, string: { pattern: /(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/, lookbehind: !0 } } } }), ["url", "bold", "italic", "strike"].forEach(function(g) {
|
|
609
609
|
["url", "bold", "italic", "strike", "code-snippet"].forEach(function(b) {
|
|
610
|
-
|
|
610
|
+
g !== b && (e.languages.markdown[g].inside.content.inside[b] = e.languages.markdown[b]);
|
|
611
611
|
});
|
|
612
|
-
}), e.hooks.add("after-tokenize", function(
|
|
613
|
-
|
|
614
|
-
if (
|
|
615
|
-
for (var v = 0, w =
|
|
616
|
-
var n,
|
|
617
|
-
|
|
612
|
+
}), e.hooks.add("after-tokenize", function(g) {
|
|
613
|
+
g.language !== "markdown" && g.language !== "md" || function b(y) {
|
|
614
|
+
if (y && typeof y != "string")
|
|
615
|
+
for (var v = 0, w = y.length; v < w; v++) {
|
|
616
|
+
var n, a = y[v];
|
|
617
|
+
a.type !== "code" ? b(a.content) : (n = a.content[1], a = a.content[3], n && a && n.type === "code-language" && a.type === "code-block" && typeof n.content == "string" && (n = n.content.replace(/\b#/g, "sharp").replace(/\b\+\+/g, "pp"), n = "language-" + (n = (/[a-z][\w-]*/i.exec(n) || [""])[0].toLowerCase()), a.alias ? typeof a.alias == "string" ? a.alias = [a.alias, n] : a.alias.push(n) : a.alias = [n]));
|
|
618
618
|
}
|
|
619
|
-
}(
|
|
620
|
-
}), e.hooks.add("wrap", function(
|
|
621
|
-
if (
|
|
622
|
-
for (var b = "",
|
|
623
|
-
var w =
|
|
619
|
+
}(g.tokens);
|
|
620
|
+
}), e.hooks.add("wrap", function(g) {
|
|
621
|
+
if (g.type === "code-block") {
|
|
622
|
+
for (var b = "", y = 0, v = g.classes.length; y < v; y++) {
|
|
623
|
+
var w = g.classes[y], w = /language-(.+)/.exec(w);
|
|
624
624
|
if (w) {
|
|
625
625
|
b = w[1];
|
|
626
626
|
break;
|
|
627
627
|
}
|
|
628
628
|
}
|
|
629
|
-
var n,
|
|
630
|
-
|
|
631
|
-
return s = s.replace(
|
|
632
|
-
var
|
|
633
|
-
return (l = l.toLowerCase())[0] === "#" ? (
|
|
629
|
+
var n, a = e.languages[b];
|
|
630
|
+
a ? g.content = e.highlight(function(s) {
|
|
631
|
+
return s = s.replace(u, ""), s = s.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi, function(c, l) {
|
|
632
|
+
var d;
|
|
633
|
+
return (l = l.toLowerCase())[0] === "#" ? (d = l[1] === "x" ? parseInt(l.slice(2), 16) : Number(l.slice(1)), p(d)) : m[l] || c;
|
|
634
634
|
});
|
|
635
|
-
}(
|
|
635
|
+
}(g.content), a, b) : b && b !== "none" && e.plugins.autoloader && (n = "md-" + (/* @__PURE__ */ new Date()).valueOf() + "-" + Math.floor(1e16 * Math.random()), g.attributes.id = n, e.plugins.autoloader.loadLanguages(b, function() {
|
|
636
636
|
var s = document.getElementById(n);
|
|
637
637
|
s && (s.innerHTML = e.highlight(s.textContent, e.languages[b], b));
|
|
638
638
|
}));
|
|
639
639
|
}
|
|
640
|
-
}), RegExp(e.languages.markup.tag.pattern.source, "gi")),
|
|
640
|
+
}), RegExp(e.languages.markup.tag.pattern.source, "gi")), m = { amp: "&", lt: "<", gt: ">", quot: '"' }, p = String.fromCodePoint || String.fromCharCode;
|
|
641
641
|
e.languages.md = e.languages.markdown;
|
|
642
642
|
}(o), o.languages.graphql = { comment: /#.*/, description: { pattern: /(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i, greedy: !0, alias: "string", inside: { "language-markdown": { pattern: /(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/, lookbehind: !0, inside: o.languages.markdown } } }, string: { pattern: /"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/, greedy: !0 }, number: /(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i, boolean: /\b(?:false|true)\b/, variable: /\$[a-z_]\w*/i, directive: { pattern: /@[a-z_]\w*/i, alias: "function" }, "attr-name": { pattern: /\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i, greedy: !0 }, "atom-input": { pattern: /\b[A-Z]\w*Input\b/, alias: "class-name" }, scalar: /\b(?:Boolean|Float|ID|Int|String)\b/, constant: /\b[A-Z][A-Z_\d]*\b/, "class-name": { pattern: /(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/, lookbehind: !0 }, fragment: { pattern: /(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/, lookbehind: !0, alias: "function" }, "definition-mutation": { pattern: /(\bmutation\s+)[a-zA-Z_]\w*/, lookbehind: !0, alias: "function" }, "definition-query": { pattern: /(\bquery\s+)[a-zA-Z_]\w*/, lookbehind: !0, alias: "function" }, keyword: /\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/, operator: /[!=|&]|\.{3}/, "property-query": /\w+(?=\s*\()/, object: /\w+(?=\s*\{)/, punctuation: /[!(){}\[\]:=,]/, property: /\w+/ }, o.hooks.add("after-tokenize", function(e) {
|
|
643
643
|
if (e.language === "graphql")
|
|
644
644
|
for (var t = e.tokens.filter(function(n) {
|
|
645
645
|
return typeof n != "string" && n.type !== "comment" && n.type !== "scalar";
|
|
646
|
-
}),
|
|
647
|
-
var i = t[
|
|
646
|
+
}), r = 0; r < t.length; ) {
|
|
647
|
+
var i = t[r++];
|
|
648
648
|
if (i.type === "keyword" && i.content === "mutation") {
|
|
649
|
-
var
|
|
650
|
-
if (
|
|
651
|
-
|
|
652
|
-
var
|
|
653
|
-
if (
|
|
649
|
+
var f = [];
|
|
650
|
+
if (y(["definition-mutation", "punctuation"]) && b(1).content === "(") {
|
|
651
|
+
r += 2;
|
|
652
|
+
var h = v(/^\($/, /^\)$/);
|
|
653
|
+
if (h === -1)
|
|
654
654
|
continue;
|
|
655
|
-
for (;
|
|
656
|
-
var
|
|
657
|
-
|
|
655
|
+
for (; r < h; r++) {
|
|
656
|
+
var u = b(0);
|
|
657
|
+
u.type === "variable" && (w(u, "variable-input"), f.push(u.content));
|
|
658
658
|
}
|
|
659
|
-
|
|
659
|
+
r = h + 1;
|
|
660
660
|
}
|
|
661
|
-
if (
|
|
662
|
-
var
|
|
663
|
-
if (
|
|
664
|
-
for (var p =
|
|
665
|
-
var
|
|
666
|
-
|
|
661
|
+
if (y(["punctuation", "property-query"]) && b(0).content === "{" && (r++, w(b(0), "property-mutation"), 0 < f.length)) {
|
|
662
|
+
var m = v(/^\{$/, /^\}$/);
|
|
663
|
+
if (m !== -1)
|
|
664
|
+
for (var p = r; p < m; p++) {
|
|
665
|
+
var g = t[p];
|
|
666
|
+
g.type === "variable" && 0 <= f.indexOf(g.content) && w(g, "variable-input");
|
|
667
667
|
}
|
|
668
668
|
}
|
|
669
669
|
}
|
|
670
670
|
}
|
|
671
671
|
function b(n) {
|
|
672
|
-
return t[
|
|
672
|
+
return t[r + n];
|
|
673
673
|
}
|
|
674
|
-
function
|
|
675
|
-
|
|
674
|
+
function y(n, a) {
|
|
675
|
+
a = a || 0;
|
|
676
676
|
for (var s = 0; s < n.length; s++) {
|
|
677
|
-
var
|
|
678
|
-
if (!
|
|
677
|
+
var c = b(s + a);
|
|
678
|
+
if (!c || c.type !== n[s])
|
|
679
679
|
return;
|
|
680
680
|
}
|
|
681
681
|
return 1;
|
|
682
682
|
}
|
|
683
|
-
function v(n,
|
|
684
|
-
for (var s = 1,
|
|
685
|
-
var l = t[
|
|
686
|
-
if (l.type === "punctuation" && typeof
|
|
687
|
-
if (n.test(
|
|
683
|
+
function v(n, a) {
|
|
684
|
+
for (var s = 1, c = r; c < t.length; c++) {
|
|
685
|
+
var l = t[c], d = l.content;
|
|
686
|
+
if (l.type === "punctuation" && typeof d == "string") {
|
|
687
|
+
if (n.test(d))
|
|
688
688
|
s++;
|
|
689
|
-
else if (
|
|
690
|
-
return
|
|
689
|
+
else if (a.test(d) && --s === 0)
|
|
690
|
+
return c;
|
|
691
691
|
}
|
|
692
692
|
}
|
|
693
693
|
return -1;
|
|
694
694
|
}
|
|
695
|
-
function w(n,
|
|
695
|
+
function w(n, a) {
|
|
696
696
|
var s = n.alias;
|
|
697
|
-
s ? Array.isArray(s) || (n.alias = s = [s]) : n.alias = s = [], s.push(
|
|
697
|
+
s ? Array.isArray(s) || (n.alias = s = [s]) : n.alias = s = [], s.push(a);
|
|
698
698
|
}
|
|
699
699
|
}), o.languages.sql = { comment: { pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/, lookbehind: !0 }, variable: [{ pattern: /@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/, greedy: !0 }, /@[\w.$]+/], string: { pattern: /(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/, greedy: !0, lookbehind: !0 }, identifier: { pattern: /(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/, greedy: !0, lookbehind: !0, inside: { punctuation: /^`|`$/ } }, function: /\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i, keyword: /\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i, boolean: /\b(?:FALSE|NULL|TRUE)\b/i, number: /\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i, operator: /[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i, punctuation: /[;[\]()`,.]/ }, function(e) {
|
|
700
|
-
var t = e.languages.javascript["template-string"],
|
|
701
|
-
function
|
|
702
|
-
if (e.languages[
|
|
703
|
-
return { pattern: RegExp("((?:" + v + ")\\s*)" +
|
|
700
|
+
var t = e.languages.javascript["template-string"], r = t.pattern.source, i = t.inside.interpolation, f = i.inside["interpolation-punctuation"], h = i.pattern.source;
|
|
701
|
+
function u(y, v) {
|
|
702
|
+
if (e.languages[y])
|
|
703
|
+
return { pattern: RegExp("((?:" + v + ")\\s*)" + r), lookbehind: !0, greedy: !0, inside: { "template-punctuation": { pattern: /^`|`$/, alias: "string" }, "embedded-code": { pattern: /[\s\S]+/, alias: y } } };
|
|
704
704
|
}
|
|
705
|
-
function
|
|
706
|
-
return
|
|
705
|
+
function m(y, v, w) {
|
|
706
|
+
return y = { code: y, grammar: v, language: w }, e.hooks.run("before-tokenize", y), y.tokens = e.tokenize(y.code, y.grammar), e.hooks.run("after-tokenize", y), y.tokens;
|
|
707
707
|
}
|
|
708
|
-
function p(
|
|
709
|
-
var s = e.tokenize(
|
|
708
|
+
function p(y, v, w) {
|
|
709
|
+
var s = e.tokenize(y, { interpolation: { pattern: RegExp(h), lookbehind: !0 } }), n = 0, a = {}, s = m(s.map(function(l) {
|
|
710
710
|
if (typeof l == "string")
|
|
711
711
|
return l;
|
|
712
|
-
for (var
|
|
712
|
+
for (var d, k, l = l.content; y.indexOf((k = n++, d = "___" + w.toUpperCase() + "_" + k + "___")) !== -1; )
|
|
713
713
|
;
|
|
714
|
-
return
|
|
715
|
-
}).join(""), v, w),
|
|
716
|
-
return n = 0, function l(
|
|
717
|
-
for (var k = 0; k <
|
|
718
|
-
if (n >=
|
|
714
|
+
return a[d] = l, d;
|
|
715
|
+
}).join(""), v, w), c = Object.keys(a);
|
|
716
|
+
return n = 0, function l(d) {
|
|
717
|
+
for (var k = 0; k < d.length; k++) {
|
|
718
|
+
if (n >= c.length)
|
|
719
719
|
return;
|
|
720
|
-
var
|
|
721
|
-
typeof L == "string" || typeof L.content == "string" ? (
|
|
720
|
+
var E, A, x, F, T, D, C, L = d[k];
|
|
721
|
+
typeof L == "string" || typeof L.content == "string" ? (E = c[n], (C = (D = typeof L == "string" ? L : L.content).indexOf(E)) !== -1 && (++n, A = D.substring(0, C), T = a[E], x = void 0, (F = {})["interpolation-punctuation"] = f, (F = e.tokenize(T, F)).length === 3 && ((x = [1, 1]).push.apply(x, m(F[1], e.languages.javascript, "javascript")), F.splice.apply(F, x)), x = new e.Token("interpolation", F, i.alias, T), F = D.substring(C + E.length), T = [], A && T.push(A), T.push(x), F && (l(D = [F]), T.push.apply(T, D)), typeof L == "string" ? (d.splice.apply(d, [k, 1].concat(T)), k += T.length - 1) : L.content = T)) : (C = L.content, Array.isArray(C) ? l(C) : l([C]));
|
|
722
722
|
}
|
|
723
|
-
}(s), new e.Token(w, s, "language-" + w,
|
|
723
|
+
}(s), new e.Token(w, s, "language-" + w, y);
|
|
724
724
|
}
|
|
725
|
-
e.languages.javascript["template-string"] = [
|
|
726
|
-
var
|
|
727
|
-
function b(
|
|
728
|
-
return typeof
|
|
725
|
+
e.languages.javascript["template-string"] = [u("css", /\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source), u("html", /\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source), u("svg", /\bsvg/.source), u("markdown", /\b(?:markdown|md)/.source), u("graphql", /\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source), u("sql", /\bsql/.source), t].filter(Boolean);
|
|
726
|
+
var g = { javascript: !0, js: !0, typescript: !0, ts: !0, jsx: !0, tsx: !0 };
|
|
727
|
+
function b(y) {
|
|
728
|
+
return typeof y == "string" ? y : Array.isArray(y) ? y.map(b).join("") : b(y.content);
|
|
729
729
|
}
|
|
730
|
-
e.hooks.add("after-tokenize", function(
|
|
731
|
-
|
|
732
|
-
for (var n = 0,
|
|
733
|
-
var s,
|
|
734
|
-
typeof
|
|
730
|
+
e.hooks.add("after-tokenize", function(y) {
|
|
731
|
+
y.language in g && function v(w) {
|
|
732
|
+
for (var n = 0, a = w.length; n < a; n++) {
|
|
733
|
+
var s, c, l, d = w[n];
|
|
734
|
+
typeof d != "string" && (s = d.content, Array.isArray(s) ? d.type === "template-string" ? (d = s[1], s.length === 3 && typeof d != "string" && d.type === "embedded-code" && (c = b(d), d = d.alias, d = Array.isArray(d) ? d[0] : d, l = e.languages[d]) && (s[1] = p(c, l, d))) : v(s) : typeof s != "string" && v([s]));
|
|
735
735
|
}
|
|
736
|
-
}(
|
|
736
|
+
}(y.tokens);
|
|
737
737
|
});
|
|
738
738
|
}(o), function(e) {
|
|
739
739
|
e.languages.typescript = e.languages.extend("javascript", { "class-name": { pattern: /(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/, lookbehind: !0, greedy: !0, inside: null }, builtin: /\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/ }), e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/, /\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/, /\btype\b(?=\s*(?:[\{*]|$))/), delete e.languages.typescript.parameter, delete e.languages.typescript["literal-property"];
|
|
740
740
|
var t = e.languages.extend("typescript", {});
|
|
741
741
|
delete t["class-name"], e.languages.typescript["class-name"].inside = t, e.languages.insertBefore("typescript", "function", { decorator: { pattern: /@[$\w\xA0-\uFFFF]+/, inside: { at: { pattern: /^@/, alias: "operator" }, function: /^[\s\S]+/ } }, "generic-function": { pattern: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/, greedy: !0, inside: { function: /^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/, generic: { pattern: /<[\s\S]+/, alias: "class-name", inside: t } } } }), e.languages.ts = e.languages.typescript;
|
|
742
742
|
}(o), function(e) {
|
|
743
|
-
var t = e.languages.javascript,
|
|
743
|
+
var t = e.languages.javascript, r = /\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})+\}/.source, i = "(@(?:arg|argument|param|property)\\s+(?:" + r + "\\s+)?)";
|
|
744
744
|
e.languages.jsdoc = e.languages.extend("javadoclike", { parameter: { pattern: RegExp(i + /(?:(?!\s)[$\w\xA0-\uFFFF.])+(?=\s|$)/.source), lookbehind: !0, inside: { punctuation: /\./ } } }), e.languages.insertBefore("jsdoc", "keyword", { "optional-parameter": { pattern: RegExp(i + /\[(?:(?!\s)[$\w\xA0-\uFFFF.])+(?:=[^[\]]+)?\](?=\s|$)/.source), lookbehind: !0, inside: { parameter: { pattern: /(^\[)[$\w\xA0-\uFFFF\.]+/, lookbehind: !0, inside: { punctuation: /\./ } }, code: { pattern: /(=)[\s\S]*(?=\]$)/, lookbehind: !0, inside: t, alias: "language-javascript" }, punctuation: /[=[\]]/ } }, "class-name": [{ pattern: RegExp(/(@(?:augments|class|extends|interface|memberof!?|template|this|typedef)\s+(?:<TYPE>\s+)?)[A-Z]\w*(?:\.[A-Z]\w*)*/.source.replace(/<TYPE>/g, function() {
|
|
745
|
-
return
|
|
746
|
-
})), lookbehind: !0, inside: { punctuation: /\./ } }, { pattern: RegExp("(@[a-z]+\\s+)" +
|
|
745
|
+
return r;
|
|
746
|
+
})), lookbehind: !0, inside: { punctuation: /\./ } }, { pattern: RegExp("(@[a-z]+\\s+)" + r), lookbehind: !0, inside: { string: t.string, number: t.number, boolean: t.boolean, keyword: e.languages.typescript.keyword, operator: /=>|\.\.\.|[&|?:*]/, punctuation: /[.,;=<>{}()[\]]/ } }], example: { pattern: /(@example\s+(?!\s))(?:[^@\s]|\s+(?!\s))+?(?=\s*(?:\*\s*)?(?:@\w|\*\/))/, lookbehind: !0, inside: { code: { pattern: /^([\t ]*(?:\*\s*)?)\S.*$/m, lookbehind: !0, inside: t, alias: "language-javascript" } } } }), e.languages.javadoclike.addSupport("javascript", e.languages.jsdoc);
|
|
747
747
|
}(o), function(e) {
|
|
748
748
|
e.languages.flow = e.languages.extend("javascript", {}), e.languages.insertBefore("flow", "keyword", { type: [{ pattern: /\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|[Ss]ymbol|any|mixed|null|void)\b/, alias: "class-name" }] }), e.languages.flow["function-variable"].pattern = /(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/i, delete e.languages.flow.parameter, e.languages.insertBefore("flow", "operator", { "flow-punctuation": { pattern: /\{\||\|\}/, alias: "punctuation" } }), Array.isArray(e.languages.flow.keyword) || (e.languages.flow.keyword = [e.languages.flow.keyword]), e.languages.flow.keyword.unshift({ pattern: /(^|[^$]\b)(?:Class|declare|opaque|type)\b(?!\$)/, lookbehind: !0 }, { pattern: /(^|[^$]\B)\$(?:Diff|Enum|Exact|Keys|ObjMap|PropertyType|Record|Shape|Subtype|Supertype|await)\b(?!\$)/, lookbehind: !0 });
|
|
749
749
|
}(o), o.languages.n4js = o.languages.extend("javascript", { keyword: /\b(?:Array|any|boolean|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|module|new|null|number|package|private|protected|public|return|set|static|string|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/ }), o.languages.insertBefore("n4js", "constant", { annotation: { pattern: /@+\w+/, alias: "operator" } }), o.languages.n4jsd = o.languages.n4js, function(e) {
|
|
750
|
-
function t(
|
|
751
|
-
return RegExp(
|
|
750
|
+
function t(u, m) {
|
|
751
|
+
return RegExp(u.replace(/<ID>/g, function() {
|
|
752
752
|
return /(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source;
|
|
753
|
-
}),
|
|
753
|
+
}), m);
|
|
754
754
|
}
|
|
755
755
|
e.languages.insertBefore("javascript", "function-variable", { "method-variable": { pattern: RegExp("(\\.\\s*)" + e.languages.javascript["function-variable"].pattern.source), lookbehind: !0, alias: ["function-variable", "method", "function", "property-access"] } }), e.languages.insertBefore("javascript", "function", { method: { pattern: RegExp("(\\.\\s*)" + e.languages.javascript.function.source), lookbehind: !0, alias: ["function", "property-access"] } }), e.languages.insertBefore("javascript", "constant", { "known-class-name": [{ pattern: /\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/, alias: "class-name" }, { pattern: /\b(?:[A-Z]\w*)Error\b/, alias: "class-name" }] }), e.languages.insertBefore("javascript", "keyword", { imports: { pattern: t(/(\bimport\b\s*)(?:<ID>(?:\s*,\s*(?:\*\s*as\s+<ID>|\{[^{}]*\}))?|\*\s*as\s+<ID>|\{[^{}]*\})(?=\s*\bfrom\b)/.source), lookbehind: !0, inside: e.languages.javascript }, exports: { pattern: t(/(\bexport\b\s*)(?:\*(?:\s*as\s+<ID>)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source), lookbehind: !0, inside: e.languages.javascript } }), e.languages.javascript.keyword.unshift({ pattern: /\b(?:as|default|export|from|import)\b/, alias: "module" }, { pattern: /\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/, alias: "control-flow" }, { pattern: /\bnull\b/, alias: ["null", "nil"] }, { pattern: /\bundefined\b/, alias: "nil" }), e.languages.insertBefore("javascript", "operator", { spread: { pattern: /\.{3}/, alias: "operator" }, arrow: { pattern: /=>/, alias: "operator" } }), e.languages.insertBefore("javascript", "punctuation", { "property-access": { pattern: t(/(\.\s*)#?<ID>/.source), lookbehind: !0 }, "maybe-class-name": { pattern: /(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/, lookbehind: !0 }, dom: { pattern: /\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/, alias: "variable" }, console: { pattern: /\bconsole(?=\s*\.)/, alias: "class-name" } });
|
|
756
|
-
for (var
|
|
757
|
-
var
|
|
758
|
-
(
|
|
756
|
+
for (var r = ["function", "function-variable", "method", "method-variable", "property-access"], i = 0; i < r.length; i++) {
|
|
757
|
+
var h = r[i], f = e.languages.javascript[h], h = (f = e.util.type(f) === "RegExp" ? e.languages.javascript[h] = { pattern: f } : f).inside || {};
|
|
758
|
+
(f.inside = h)["maybe-class-name"] = /^[A-Z][\s\S]*/;
|
|
759
759
|
}
|
|
760
760
|
}(o), function(e) {
|
|
761
|
-
var t = e.util.clone(e.languages.javascript),
|
|
762
|
-
function
|
|
761
|
+
var t = e.util.clone(e.languages.javascript), r = /(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source, i = /(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source, f = /(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;
|
|
762
|
+
function h(p, g) {
|
|
763
763
|
return p = p.replace(/<S>/g, function() {
|
|
764
|
-
return
|
|
764
|
+
return r;
|
|
765
765
|
}).replace(/<BRACES>/g, function() {
|
|
766
766
|
return i;
|
|
767
767
|
}).replace(/<SPREAD>/g, function() {
|
|
768
|
-
return
|
|
769
|
-
}), RegExp(p,
|
|
768
|
+
return f;
|
|
769
|
+
}), RegExp(p, g);
|
|
770
770
|
}
|
|
771
|
-
|
|
772
|
-
function
|
|
773
|
-
for (var
|
|
774
|
-
var
|
|
775
|
-
typeof
|
|
771
|
+
f = h(f).source, e.languages.jsx = e.languages.extend("markup", t), e.languages.jsx.tag.pattern = h(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source), e.languages.jsx.tag.inside.tag.pattern = /^<\/?[^\s>\/]*/, e.languages.jsx.tag.inside["attr-value"].pattern = /=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/, e.languages.jsx.tag.inside.tag.inside["class-name"] = /^[A-Z]\w*(?:\.[A-Z]\w*)*$/, e.languages.jsx.tag.inside.comment = t.comment, e.languages.insertBefore("inside", "attr-name", { spread: { pattern: h(/<SPREAD>/.source), inside: e.languages.jsx } }, e.languages.jsx.tag), e.languages.insertBefore("inside", "special-attr", { script: { pattern: h(/=<BRACES>/.source), alias: "language-javascript", inside: { "script-punctuation": { pattern: /^=(?=\{)/, alias: "punctuation" }, rest: e.languages.jsx } } }, e.languages.jsx.tag);
|
|
772
|
+
function u(p) {
|
|
773
|
+
for (var g = [], b = 0; b < p.length; b++) {
|
|
774
|
+
var y = p[b], v = !1;
|
|
775
|
+
typeof y != "string" && (y.type === "tag" && y.content[0] && y.content[0].type === "tag" ? y.content[0].content[0].content === "</" ? 0 < g.length && g[g.length - 1].tagName === m(y.content[0].content[1]) && g.pop() : y.content[y.content.length - 1].content !== "/>" && g.push({ tagName: m(y.content[0].content[1]), openedBraces: 0 }) : 0 < g.length && y.type === "punctuation" && y.content === "{" ? g[g.length - 1].openedBraces++ : 0 < g.length && 0 < g[g.length - 1].openedBraces && y.type === "punctuation" && y.content === "}" ? g[g.length - 1].openedBraces-- : v = !0), (v || typeof y == "string") && 0 < g.length && g[g.length - 1].openedBraces === 0 && (v = m(y), b < p.length - 1 && (typeof p[b + 1] == "string" || p[b + 1].type === "plain-text") && (v += m(p[b + 1]), p.splice(b + 1, 1)), 0 < b && (typeof p[b - 1] == "string" || p[b - 1].type === "plain-text") && (v = m(p[b - 1]) + v, p.splice(b - 1, 1), b--), p[b] = new e.Token("plain-text", v, null, v)), y.content && typeof y.content != "string" && u(y.content);
|
|
776
776
|
}
|
|
777
777
|
}
|
|
778
|
-
var
|
|
779
|
-
return p ? typeof p == "string" ? p : typeof p.content == "string" ? p.content : p.content.map(
|
|
778
|
+
var m = function(p) {
|
|
779
|
+
return p ? typeof p == "string" ? p : typeof p.content == "string" ? p.content : p.content.map(m).join("") : "";
|
|
780
780
|
};
|
|
781
781
|
e.hooks.add("after-tokenize", function(p) {
|
|
782
|
-
p.language !== "jsx" && p.language !== "tsx" ||
|
|
782
|
+
p.language !== "jsx" && p.language !== "tsx" || u(p.tokens);
|
|
783
783
|
});
|
|
784
784
|
}(o), function(e) {
|
|
785
785
|
var t = e.util.clone(e.languages.typescript), t = (e.languages.tsx = e.languages.extend("jsx", t), delete e.languages.tsx.parameter, delete e.languages.tsx["literal-property"], e.languages.tsx.tag);
|
|
@@ -791,7 +791,7 @@ o.languages.markup = { comment: { pattern: /<!--(?:(?!<!--)[\s\S])*?-->/, greedy
|
|
|
791
791
|
var t = { "interpolation-punctuation": { pattern: /^\$\{?|\}$/, alias: "punctuation" }, expression: { pattern: /[\s\S]+/, inside: e.languages.kotlin } };
|
|
792
792
|
e.languages.insertBefore("kotlin", "string", { "string-literal": [{ pattern: /"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/, alias: "multiline", inside: { interpolation: { pattern: /\$(?:[a-z_]\w*|\{[^{}]*\})/i, inside: t }, string: /[\s\S]+/ } }, { pattern: /"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/, alias: "singleline", inside: { interpolation: { pattern: /((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i, lookbehind: !0, inside: t }, string: /[\s\S]+/ } }], char: { pattern: /'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/, greedy: !0 } }), delete e.languages.kotlin.string, e.languages.insertBefore("kotlin", "keyword", { annotation: { pattern: /\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/, alias: "builtin" } }), e.languages.insertBefore("kotlin", "function", { label: { pattern: /\b\w+@|@\w+\b/, alias: "symbol" } }), e.languages.kt = e.languages.kotlin, e.languages.kts = e.languages.kotlin;
|
|
793
793
|
}(o), o.languages.c = o.languages.extend("clike", { comment: { pattern: /\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/, greedy: !0 }, string: { pattern: /"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/, greedy: !0 }, "class-name": { pattern: /(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/, lookbehind: !0 }, keyword: /\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/, function: /\b[a-z_]\w*(?=\s*\()/i, number: /(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i, operator: />>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/ }), o.languages.insertBefore("c", "string", { char: { pattern: /'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/, greedy: !0 } }), o.languages.insertBefore("c", "string", { macro: { pattern: /(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im, lookbehind: !0, greedy: !0, alias: "property", inside: { string: [{ pattern: /^(#\s*include\s*)<[^>]+>/, lookbehind: !0 }, o.languages.c.string], char: o.languages.c.char, comment: o.languages.c.comment, "macro-name": [{ pattern: /(^#\s*define\s+)\w+\b(?!\()/i, lookbehind: !0 }, { pattern: /(^#\s*define\s+)\w+\b(?=\()/i, lookbehind: !0, alias: "function" }], directive: { pattern: /^(#\s*)[a-z]+/, lookbehind: !0, alias: "keyword" }, "directive-hash": /^#/, punctuation: /##|\\(?=[\r\n])/, expression: { pattern: /\S[\s\S]*/, inside: o.languages.c } } } }), o.languages.insertBefore("c", "function", { constant: /\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/ }), delete o.languages.c.boolean, o.languages.objectivec = o.languages.extend("c", { string: { pattern: /@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/, greedy: !0 }, keyword: /\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/, operator: /-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/ }), delete o.languages.objectivec["class-name"], o.languages.objc = o.languages.objectivec, o.languages.reason = o.languages.extend("clike", { string: { pattern: /"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/, greedy: !0 }, "class-name": /\b[A-Z]\w*/, keyword: /\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/, operator: /\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/ }), o.languages.insertBefore("reason", "class-name", { char: { pattern: /'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/, greedy: !0 }, constructor: /\b[A-Z]\w*\b(?!\s*\.)/, label: { pattern: /\b[a-z]\w*(?=::)/, alias: "symbol" } }), delete o.languages.reason.function, function(e) {
|
|
794
|
-
for (var t = /\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,
|
|
794
|
+
for (var t = /\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source, r = 0; r < 2; r++)
|
|
795
795
|
t = t.replace(/<self>/g, function() {
|
|
796
796
|
return t;
|
|
797
797
|
});
|
|
@@ -799,39 +799,39 @@ o.languages.markup = { comment: { pattern: /<!--(?:(?!<!--)[\s\S])*?-->/, greedy
|
|
|
799
799
|
return /[^\s\S]/.source;
|
|
800
800
|
}), e.languages.rust = { comment: [{ pattern: RegExp(/(^|[^\\])/.source + t), lookbehind: !0, greedy: !0 }, { pattern: /(^|[^\\:])\/\/.*/, lookbehind: !0, greedy: !0 }], string: { pattern: /b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/, greedy: !0 }, char: { pattern: /b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/, greedy: !0 }, attribute: { pattern: /#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/, greedy: !0, alias: "attr-name", inside: { string: null } }, "closure-params": { pattern: /([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/, lookbehind: !0, greedy: !0, inside: { "closure-punctuation": { pattern: /^\||\|$/, alias: "punctuation" }, rest: null } }, "lifetime-annotation": { pattern: /'\w+/, alias: "symbol" }, "fragment-specifier": { pattern: /(\$\w+:)[a-z]+/, lookbehind: !0, alias: "punctuation" }, variable: /\$\w+/, "function-definition": { pattern: /(\bfn\s+)\w+/, lookbehind: !0, alias: "function" }, "type-definition": { pattern: /(\b(?:enum|struct|trait|type|union)\s+)\w+/, lookbehind: !0, alias: "class-name" }, "module-declaration": [{ pattern: /(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/, lookbehind: !0, alias: "namespace" }, { pattern: /(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/, lookbehind: !0, alias: "namespace", inside: { punctuation: /::/ } }], keyword: [/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/, /\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/], function: /\b[a-z_]\w*(?=\s*(?:::\s*<|\())/, macro: { pattern: /\b\w+!/, alias: "property" }, constant: /\b[A-Z_][A-Z_\d]+\b/, "class-name": /\b[A-Z]\w*\b/, namespace: { pattern: /(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/, inside: { punctuation: /::/ } }, number: /\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/, boolean: /\b(?:false|true)\b/, punctuation: /->|\.\.=|\.{1,3}|::|[{}[\];(),:]/, operator: /[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/ }, e.languages.rust["closure-params"].inside.rest = e.languages.rust, e.languages.rust.attribute.inside.string = e.languages.rust.string;
|
|
801
801
|
}(o), o.languages.go = o.languages.extend("clike", { string: { pattern: /(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/, lookbehind: !0, greedy: !0 }, keyword: /\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/, boolean: /\b(?:_|false|iota|nil|true)\b/, number: [/\b0(?:b[01_]+|o[0-7_]+)i?\b/i, /\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i, /(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i], operator: /[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./, builtin: /\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/ }), o.languages.insertBefore("go", "string", { char: { pattern: /'(?:\\.|[^'\\\r\n]){0,10}'/, greedy: !0 } }), delete o.languages.go["class-name"], function(e) {
|
|
802
|
-
var t = /\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,
|
|
802
|
+
var t = /\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/, r = /\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g, function() {
|
|
803
803
|
return t.source;
|
|
804
804
|
});
|
|
805
805
|
e.languages.cpp = e.languages.extend("c", { "class-name": [{ pattern: RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g, function() {
|
|
806
806
|
return t.source;
|
|
807
807
|
})), lookbehind: !0 }, /\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/, /\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i, /\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/], keyword: t, number: { pattern: /(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i, greedy: !0 }, operator: />>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/, boolean: /\b(?:false|true)\b/ }), e.languages.insertBefore("cpp", "string", { module: { pattern: RegExp(/(\b(?:import|module)\s+)/.source + "(?:" + /"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source + "|" + /<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g, function() {
|
|
808
|
-
return
|
|
808
|
+
return r;
|
|
809
809
|
}) + ")"), lookbehind: !0, greedy: !0, inside: { string: /^[<"][\s\S]+/, operator: /:/, punctuation: /\./ } }, "raw-string": { pattern: /R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/, alias: "string", greedy: !0 } }), e.languages.insertBefore("cpp", "keyword", { "generic-function": { pattern: /\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i, inside: { function: /^\w+/, generic: { pattern: /<[\s\S]+/, alias: "class-name", inside: e.languages.cpp } } } }), e.languages.insertBefore("cpp", "operator", { "double-colon": { pattern: /::/, alias: "punctuation" } }), e.languages.insertBefore("cpp", "class-name", { "base-clause": { pattern: /(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/, lookbehind: !0, greedy: !0, inside: e.languages.extend("cpp", {}) } }), e.languages.insertBefore("inside", "double-colon", { "class-name": /\b[a-z_]\w*\b(?!\s*::)/i }, e.languages.cpp["base-clause"]);
|
|
810
810
|
}(o), o.languages.python = { comment: { pattern: /(^|[^\\])#.*/, lookbehind: !0, greedy: !0 }, "string-interpolation": { pattern: /(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i, greedy: !0, inside: { interpolation: { pattern: /((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/, lookbehind: !0, inside: { "format-spec": { pattern: /(:)[^:(){}]+(?=\}$)/, lookbehind: !0 }, "conversion-option": { pattern: //, alias: "punctuation" }, rest: null } }, string: /[\s\S]+/ } }, "triple-quoted-string": { pattern: /(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i, greedy: !0, alias: "string" }, string: { pattern: /(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i, greedy: !0 }, function: { pattern: /((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g, lookbehind: !0 }, "class-name": { pattern: /(\bclass\s+)\w+/i, lookbehind: !0 }, decorator: { pattern: /(^[\t ]*)@\w+(?:\.\w+)*/m, lookbehind: !0, alias: ["annotation", "punctuation"], inside: { punctuation: /\./ } }, keyword: /\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/, builtin: /\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/, boolean: /\b(?:False|None|True)\b/, number: /\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i, operator: /[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/, punctuation: /[{}[\];(),.:]/ }, o.languages.python["string-interpolation"].inside.interpolation.inside.rest = o.languages.python, o.languages.py = o.languages.python, o.languages.json = { property: { pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/, lookbehind: !0, greedy: !0 }, string: { pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/, lookbehind: !0, greedy: !0 }, comment: { pattern: /\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/, greedy: !0 }, number: /-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i, punctuation: /[{}[\],]/, operator: /:/, boolean: /\b(?:false|true)\b/, null: { pattern: /\bnull\b/, alias: "keyword" } }, o.languages.webmanifest = o.languages.json;
|
|
811
|
-
var
|
|
812
|
-
|
|
813
|
-
dracula: () =>
|
|
814
|
-
duotoneDark: () =>
|
|
815
|
-
duotoneLight: () =>
|
|
816
|
-
github: () =>
|
|
817
|
-
gruvboxMaterialDark: () =>
|
|
818
|
-
gruvboxMaterialLight: () =>
|
|
819
|
-
jettwaveDark: () =>
|
|
820
|
-
jettwaveLight: () =>
|
|
811
|
+
var V = {};
|
|
812
|
+
_e(V, {
|
|
813
|
+
dracula: () => Le,
|
|
814
|
+
duotoneDark: () => Ne,
|
|
815
|
+
duotoneLight: () => De,
|
|
816
|
+
github: () => $e,
|
|
817
|
+
gruvboxMaterialDark: () => gt,
|
|
818
|
+
gruvboxMaterialLight: () => yt,
|
|
819
|
+
jettwaveDark: () => rt,
|
|
820
|
+
jettwaveLight: () => st,
|
|
821
821
|
nightOwl: () => je,
|
|
822
|
-
nightOwlLight: () =>
|
|
823
|
-
oceanicNext: () =>
|
|
824
|
-
okaidia: () =>
|
|
825
|
-
oneDark: () =>
|
|
826
|
-
oneLight: () =>
|
|
827
|
-
palenight: () =>
|
|
828
|
-
shadesOfPurple: () =>
|
|
829
|
-
synthwave84: () =>
|
|
830
|
-
ultramin: () =>
|
|
831
|
-
vsDark: () =>
|
|
832
|
-
vsLight: () =>
|
|
822
|
+
nightOwlLight: () => Me,
|
|
823
|
+
oceanicNext: () => Ge,
|
|
824
|
+
okaidia: () => qe,
|
|
825
|
+
oneDark: () => it,
|
|
826
|
+
oneLight: () => ct,
|
|
827
|
+
palenight: () => He,
|
|
828
|
+
shadesOfPurple: () => Ke,
|
|
829
|
+
synthwave84: () => Xe,
|
|
830
|
+
ultramin: () => Je,
|
|
831
|
+
vsDark: () => ce,
|
|
832
|
+
vsLight: () => at
|
|
833
833
|
});
|
|
834
|
-
var
|
|
834
|
+
var Ie = {
|
|
835
835
|
plain: {
|
|
836
836
|
color: "#F8F8F2",
|
|
837
837
|
backgroundColor: "#282A36"
|
|
@@ -893,7 +893,7 @@ var Re = {
|
|
|
893
893
|
}
|
|
894
894
|
}
|
|
895
895
|
]
|
|
896
|
-
},
|
|
896
|
+
}, Le = Ie, Oe = {
|
|
897
897
|
plain: {
|
|
898
898
|
backgroundColor: "#2a2734",
|
|
899
899
|
color: "#9a86fd"
|
|
@@ -987,7 +987,7 @@ var Re = {
|
|
|
987
987
|
}
|
|
988
988
|
}
|
|
989
989
|
]
|
|
990
|
-
},
|
|
990
|
+
}, Ne = Oe, Ce = {
|
|
991
991
|
plain: {
|
|
992
992
|
backgroundColor: "#faf8f5",
|
|
993
993
|
color: "#728fcb"
|
|
@@ -1085,7 +1085,7 @@ var Re = {
|
|
|
1085
1085
|
}
|
|
1086
1086
|
}
|
|
1087
1087
|
]
|
|
1088
|
-
},
|
|
1088
|
+
}, De = Ce, Be = {
|
|
1089
1089
|
plain: {
|
|
1090
1090
|
color: "#393A34",
|
|
1091
1091
|
backgroundColor: "#f6f8fa"
|
|
@@ -1158,7 +1158,7 @@ var Re = {
|
|
|
1158
1158
|
}
|
|
1159
1159
|
}
|
|
1160
1160
|
]
|
|
1161
|
-
},
|
|
1161
|
+
}, $e = Be, Pe = {
|
|
1162
1162
|
plain: {
|
|
1163
1163
|
color: "#d6deeb",
|
|
1164
1164
|
backgroundColor: "#011627"
|
|
@@ -1262,7 +1262,7 @@ var Re = {
|
|
|
1262
1262
|
}
|
|
1263
1263
|
}
|
|
1264
1264
|
]
|
|
1265
|
-
}, je =
|
|
1265
|
+
}, je = Pe, ze = {
|
|
1266
1266
|
plain: {
|
|
1267
1267
|
color: "#403f53",
|
|
1268
1268
|
backgroundColor: "#FBFBFB"
|
|
@@ -1354,7 +1354,7 @@ var Re = {
|
|
|
1354
1354
|
}
|
|
1355
1355
|
}
|
|
1356
1356
|
]
|
|
1357
|
-
},
|
|
1357
|
+
}, Me = ze, R = {
|
|
1358
1358
|
char: "#D8DEE9",
|
|
1359
1359
|
comment: "#999999",
|
|
1360
1360
|
keyword: "#c5a5c5",
|
|
@@ -1365,7 +1365,7 @@ var Re = {
|
|
|
1365
1365
|
tag: "#fc929e",
|
|
1366
1366
|
function: "#79b6f2",
|
|
1367
1367
|
className: "#FAC863"
|
|
1368
|
-
},
|
|
1368
|
+
}, Ue = {
|
|
1369
1369
|
plain: {
|
|
1370
1370
|
backgroundColor: "#282c34",
|
|
1371
1371
|
color: "#ffffff"
|
|
@@ -1488,7 +1488,7 @@ var Re = {
|
|
|
1488
1488
|
}
|
|
1489
1489
|
}
|
|
1490
1490
|
]
|
|
1491
|
-
},
|
|
1491
|
+
}, Ge = Ue, Ze = {
|
|
1492
1492
|
plain: {
|
|
1493
1493
|
color: "#f8f8f2",
|
|
1494
1494
|
backgroundColor: "#272822"
|
|
@@ -1603,7 +1603,7 @@ var Re = {
|
|
|
1603
1603
|
}
|
|
1604
1604
|
}
|
|
1605
1605
|
]
|
|
1606
|
-
},
|
|
1606
|
+
}, qe = Ze, We = {
|
|
1607
1607
|
plain: {
|
|
1608
1608
|
color: "#bfc7d5",
|
|
1609
1609
|
backgroundColor: "#292d3e"
|
|
@@ -1696,7 +1696,7 @@ var Re = {
|
|
|
1696
1696
|
}
|
|
1697
1697
|
}
|
|
1698
1698
|
]
|
|
1699
|
-
},
|
|
1699
|
+
}, He = We, Ye = {
|
|
1700
1700
|
plain: {
|
|
1701
1701
|
color: "#9EFEFF",
|
|
1702
1702
|
backgroundColor: "#2D2A55"
|
|
@@ -1784,7 +1784,7 @@ var Re = {
|
|
|
1784
1784
|
}
|
|
1785
1785
|
}
|
|
1786
1786
|
]
|
|
1787
|
-
},
|
|
1787
|
+
}, Ke = Ye, Ve = {
|
|
1788
1788
|
plain: {
|
|
1789
1789
|
backgroundColor: "linear-gradient(to bottom, #2a2139 75%, #34294f)",
|
|
1790
1790
|
backgroundImage: "#34294f",
|
|
@@ -1909,7 +1909,7 @@ var Re = {
|
|
|
1909
1909
|
}
|
|
1910
1910
|
}
|
|
1911
1911
|
]
|
|
1912
|
-
},
|
|
1912
|
+
}, Xe = Ve, Qe = {
|
|
1913
1913
|
plain: {
|
|
1914
1914
|
color: "#282a2e",
|
|
1915
1915
|
backgroundColor: "#ffffff"
|
|
@@ -1934,7 +1934,7 @@ var Re = {
|
|
|
1934
1934
|
}
|
|
1935
1935
|
}
|
|
1936
1936
|
]
|
|
1937
|
-
},
|
|
1937
|
+
}, Je = Qe, et = {
|
|
1938
1938
|
plain: {
|
|
1939
1939
|
color: "#9CDCFE",
|
|
1940
1940
|
backgroundColor: "#1E1E1E"
|
|
@@ -2036,7 +2036,7 @@ var Re = {
|
|
|
2036
2036
|
}
|
|
2037
2037
|
}
|
|
2038
2038
|
]
|
|
2039
|
-
},
|
|
2039
|
+
}, ce = et, tt = {
|
|
2040
2040
|
plain: {
|
|
2041
2041
|
color: "#000000",
|
|
2042
2042
|
backgroundColor: "#ffffff"
|
|
@@ -2109,7 +2109,7 @@ var Re = {
|
|
|
2109
2109
|
}
|
|
2110
2110
|
}
|
|
2111
2111
|
]
|
|
2112
|
-
},
|
|
2112
|
+
}, at = tt, nt = {
|
|
2113
2113
|
plain: {
|
|
2114
2114
|
color: "#f8fafc",
|
|
2115
2115
|
backgroundColor: "#011627"
|
|
@@ -2208,7 +2208,7 @@ var Re = {
|
|
|
2208
2208
|
}
|
|
2209
2209
|
}
|
|
2210
2210
|
]
|
|
2211
|
-
},
|
|
2211
|
+
}, rt = nt, ot = {
|
|
2212
2212
|
plain: {
|
|
2213
2213
|
color: "#0f172a",
|
|
2214
2214
|
backgroundColor: "#f1f5f9"
|
|
@@ -2307,7 +2307,7 @@ var Re = {
|
|
|
2307
2307
|
}
|
|
2308
2308
|
}
|
|
2309
2309
|
]
|
|
2310
|
-
},
|
|
2310
|
+
}, st = ot, lt = {
|
|
2311
2311
|
plain: {
|
|
2312
2312
|
backgroundColor: "hsl(220, 13%, 18%)",
|
|
2313
2313
|
color: "hsl(220, 14%, 71%)",
|
|
@@ -2405,7 +2405,7 @@ var Re = {
|
|
|
2405
2405
|
}
|
|
2406
2406
|
}
|
|
2407
2407
|
]
|
|
2408
|
-
},
|
|
2408
|
+
}, it = lt, ut = {
|
|
2409
2409
|
plain: {
|
|
2410
2410
|
backgroundColor: "hsl(230, 1%, 98%)",
|
|
2411
2411
|
color: "hsl(230, 8%, 24%)"
|
|
@@ -2506,7 +2506,7 @@ var Re = {
|
|
|
2506
2506
|
}
|
|
2507
2507
|
}
|
|
2508
2508
|
]
|
|
2509
|
-
},
|
|
2509
|
+
}, ct = ut, pt = {
|
|
2510
2510
|
plain: {
|
|
2511
2511
|
color: "#ebdbb2",
|
|
2512
2512
|
backgroundColor: "#292828"
|
|
@@ -2579,7 +2579,7 @@ var Re = {
|
|
|
2579
2579
|
}
|
|
2580
2580
|
}
|
|
2581
2581
|
]
|
|
2582
|
-
},
|
|
2582
|
+
}, gt = pt, dt = {
|
|
2583
2583
|
plain: {
|
|
2584
2584
|
color: "#654735",
|
|
2585
2585
|
backgroundColor: "#f9f5d7"
|
|
@@ -2651,46 +2651,46 @@ var Re = {
|
|
|
2651
2651
|
}
|
|
2652
2652
|
}
|
|
2653
2653
|
]
|
|
2654
|
-
},
|
|
2654
|
+
}, yt = dt, ft = (e) => K(
|
|
2655
2655
|
(t) => {
|
|
2656
|
-
var
|
|
2657
|
-
const
|
|
2658
|
-
className:
|
|
2656
|
+
var r = t, { className: i, style: f, line: h } = r, u = ue(r, ["className", "style", "line"]);
|
|
2657
|
+
const m = q(N({}, u), {
|
|
2658
|
+
className: se("token-line", i)
|
|
2659
2659
|
});
|
|
2660
|
-
return typeof e == "object" && "plain" in e && (
|
|
2660
|
+
return typeof e == "object" && "plain" in e && (m.style = e.plain), typeof f == "object" && (m.style = N(N({}, m.style || {}), f)), m;
|
|
2661
2661
|
},
|
|
2662
2662
|
[e]
|
|
2663
|
-
),
|
|
2664
|
-
const t =
|
|
2665
|
-
({ types:
|
|
2663
|
+
), bt = (e) => {
|
|
2664
|
+
const t = K(
|
|
2665
|
+
({ types: r, empty: i }) => {
|
|
2666
2666
|
if (e != null) {
|
|
2667
2667
|
{
|
|
2668
|
-
if (
|
|
2668
|
+
if (r.length === 1 && r[0] === "plain")
|
|
2669
2669
|
return i != null ? { display: "inline-block" } : void 0;
|
|
2670
|
-
if (
|
|
2671
|
-
return e[
|
|
2670
|
+
if (r.length === 1 && i != null)
|
|
2671
|
+
return e[r[0]];
|
|
2672
2672
|
}
|
|
2673
2673
|
return Object.assign(
|
|
2674
2674
|
i != null ? { display: "inline-block" } : {},
|
|
2675
|
-
...
|
|
2675
|
+
...r.map((f) => e[f])
|
|
2676
2676
|
);
|
|
2677
2677
|
}
|
|
2678
2678
|
},
|
|
2679
2679
|
[e]
|
|
2680
2680
|
);
|
|
2681
|
-
return
|
|
2682
|
-
(
|
|
2683
|
-
var i =
|
|
2684
|
-
const p = q(N({},
|
|
2685
|
-
className:
|
|
2686
|
-
children:
|
|
2687
|
-
style: t(
|
|
2681
|
+
return K(
|
|
2682
|
+
(r) => {
|
|
2683
|
+
var i = r, { token: f, className: h, style: u } = i, m = ue(i, ["token", "className", "style"]);
|
|
2684
|
+
const p = q(N({}, m), {
|
|
2685
|
+
className: se("token", ...f.types, h),
|
|
2686
|
+
children: f.content,
|
|
2687
|
+
style: t(f)
|
|
2688
2688
|
});
|
|
2689
|
-
return
|
|
2689
|
+
return u != null && (p.style = N(N({}, p.style || {}), u)), p;
|
|
2690
2690
|
},
|
|
2691
2691
|
[t]
|
|
2692
2692
|
);
|
|
2693
|
-
},
|
|
2693
|
+
}, mt = /\r\n|\r|\n/, ne = (e) => {
|
|
2694
2694
|
e.length === 0 ? e.push({
|
|
2695
2695
|
types: ["plain"],
|
|
2696
2696
|
content: `
|
|
@@ -2698,78 +2698,78 @@ var Re = {
|
|
|
2698
2698
|
empty: !0
|
|
2699
2699
|
}) : e.length === 1 && e[0].content === "" && (e[0].content = `
|
|
2700
2700
|
`, e[0].empty = !0);
|
|
2701
|
-
},
|
|
2702
|
-
const
|
|
2703
|
-
return
|
|
2704
|
-
},
|
|
2705
|
-
const t = [[]],
|
|
2706
|
-
let
|
|
2707
|
-
const p = [
|
|
2708
|
-
for (;
|
|
2709
|
-
for (; (
|
|
2710
|
-
let
|
|
2711
|
-
const v =
|
|
2712
|
-
if (typeof v == "string" ? (b =
|
|
2713
|
-
|
|
2701
|
+
}, re = (e, t) => {
|
|
2702
|
+
const r = e.length;
|
|
2703
|
+
return r > 0 && e[r - 1] === t ? e : e.concat(t);
|
|
2704
|
+
}, ht = (e) => {
|
|
2705
|
+
const t = [[]], r = [e], i = [0], f = [e.length];
|
|
2706
|
+
let h = 0, u = 0, m = [];
|
|
2707
|
+
const p = [m];
|
|
2708
|
+
for (; u > -1; ) {
|
|
2709
|
+
for (; (h = i[u]++) < f[u]; ) {
|
|
2710
|
+
let g, b = t[u];
|
|
2711
|
+
const v = r[u][h];
|
|
2712
|
+
if (typeof v == "string" ? (b = u > 0 ? b : ["plain"], g = v) : (b = re(b, v.type), v.alias && (b = re(b, v.alias)), g = v.content), typeof g != "string") {
|
|
2713
|
+
u++, t.push(b), r.push(g), i.push(0), f.push(g.length);
|
|
2714
2714
|
continue;
|
|
2715
2715
|
}
|
|
2716
|
-
const w =
|
|
2717
|
-
|
|
2716
|
+
const w = g.split(mt), n = w.length;
|
|
2717
|
+
m.push({
|
|
2718
2718
|
types: b,
|
|
2719
2719
|
content: w[0]
|
|
2720
2720
|
});
|
|
2721
|
-
for (let
|
|
2722
|
-
|
|
2721
|
+
for (let a = 1; a < n; a++)
|
|
2722
|
+
ne(m), p.push(m = []), m.push({
|
|
2723
2723
|
types: b,
|
|
2724
|
-
content: w[
|
|
2724
|
+
content: w[a]
|
|
2725
2725
|
});
|
|
2726
2726
|
}
|
|
2727
|
-
|
|
2727
|
+
u--, t.pop(), r.pop(), i.pop(), f.pop();
|
|
2728
2728
|
}
|
|
2729
|
-
return
|
|
2730
|
-
},
|
|
2731
|
-
if (
|
|
2732
|
-
return
|
|
2733
|
-
const
|
|
2729
|
+
return ne(m), p;
|
|
2730
|
+
}, oe = ht, vt = ({ prism: e, code: t, grammar: r, language: i }) => ye(() => {
|
|
2731
|
+
if (r == null)
|
|
2732
|
+
return oe([t]);
|
|
2733
|
+
const f = {
|
|
2734
2734
|
code: t,
|
|
2735
|
-
grammar:
|
|
2735
|
+
grammar: r,
|
|
2736
2736
|
language: i,
|
|
2737
2737
|
tokens: []
|
|
2738
2738
|
};
|
|
2739
|
-
return e.hooks.run("before-tokenize",
|
|
2739
|
+
return e.hooks.run("before-tokenize", f), f.tokens = e.tokenize(t, r), e.hooks.run("after-tokenize", f), oe(f.tokens);
|
|
2740
2740
|
}, [
|
|
2741
2741
|
t,
|
|
2742
|
-
|
|
2742
|
+
r,
|
|
2743
2743
|
i,
|
|
2744
2744
|
// prism is a stable import
|
|
2745
2745
|
e
|
|
2746
|
-
]),
|
|
2747
|
-
const { plain:
|
|
2748
|
-
const { languages:
|
|
2749
|
-
return
|
|
2750
|
-
const
|
|
2751
|
-
|
|
2752
|
-
}),
|
|
2746
|
+
]), kt = (e, t) => {
|
|
2747
|
+
const { plain: r } = e, i = e.styles.reduce((f, h) => {
|
|
2748
|
+
const { languages: u, style: m } = h;
|
|
2749
|
+
return u && !u.includes(t) || h.types.forEach((p) => {
|
|
2750
|
+
const g = N(N({}, f[p]), m);
|
|
2751
|
+
f[p] = g;
|
|
2752
|
+
}), f;
|
|
2753
2753
|
}, {});
|
|
2754
|
-
return i.root =
|
|
2755
|
-
},
|
|
2754
|
+
return i.root = r, i.plain = q(N({}, r), { backgroundColor: void 0 }), i;
|
|
2755
|
+
}, wt = kt, Et = ({
|
|
2756
2756
|
children: e,
|
|
2757
2757
|
language: t,
|
|
2758
|
-
code:
|
|
2758
|
+
code: r,
|
|
2759
2759
|
theme: i,
|
|
2760
|
-
prism:
|
|
2760
|
+
prism: f
|
|
2761
2761
|
}) => {
|
|
2762
|
-
const
|
|
2762
|
+
const h = t.toLowerCase(), u = wt(i, h), m = ft(u), p = bt(u), g = f.languages[h], b = vt({ prism: f, language: h, code: r, grammar: g });
|
|
2763
2763
|
return e({
|
|
2764
2764
|
tokens: b,
|
|
2765
|
-
className: `prism-code language-${
|
|
2766
|
-
style:
|
|
2767
|
-
getLineProps:
|
|
2765
|
+
className: `prism-code language-${h}`,
|
|
2766
|
+
style: u != null ? u.root : {},
|
|
2767
|
+
getLineProps: m,
|
|
2768
2768
|
getTokenProps: p
|
|
2769
2769
|
});
|
|
2770
|
-
}, xt = (e) => de(
|
|
2770
|
+
}, xt = (e) => de(Et, q(N({}, e), {
|
|
2771
2771
|
prism: e.prism || o,
|
|
2772
|
-
theme: e.theme ||
|
|
2772
|
+
theme: e.theme || ce,
|
|
2773
2773
|
code: e.code,
|
|
2774
2774
|
language: e.language
|
|
2775
2775
|
}));
|
|
@@ -2796,110 +2796,91 @@ import("../prism-objectivec.min-BXSWqpJJ.js");
|
|
|
2796
2796
|
import("../prism-markdown.min-C0Qn0m-5.js");
|
|
2797
2797
|
import("../prism-javascript.min-CEqHqgbm.js");
|
|
2798
2798
|
import("../prism-typescript.min-CD7H2IYQ.js").then((e) => e.p);
|
|
2799
|
-
const
|
|
2799
|
+
const At = {
|
|
2800
2800
|
mdx: "md"
|
|
2801
|
-
},
|
|
2801
|
+
}, St = ({
|
|
2802
2802
|
language: e = "plain",
|
|
2803
2803
|
showCopy: t = "hover",
|
|
2804
|
-
showCopyText:
|
|
2804
|
+
showCopyText: r,
|
|
2805
2805
|
title: i,
|
|
2806
|
-
children:
|
|
2807
|
-
|
|
2806
|
+
children: f,
|
|
2807
|
+
disabled: h,
|
|
2808
|
+
...u
|
|
2808
2809
|
}) => {
|
|
2809
|
-
const { resolvedTheme:
|
|
2810
|
-
if (!
|
|
2810
|
+
const { resolvedTheme: m } = ve(), [p, g] = be(!1), b = f ?? u.code;
|
|
2811
|
+
if (!b)
|
|
2811
2812
|
return null;
|
|
2812
|
-
const
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
children: d
|
|
2829
|
-
}
|
|
2813
|
+
const y = m === "dark" ? V.vsDark : V.github, v = "bg-[#f6f8fa] text-[#393a34] dark:bg-[#1e1e1e] dark:text-[#9cdcfe]", w = ({
|
|
2814
|
+
children: n,
|
|
2815
|
+
className: a,
|
|
2816
|
+
style: s
|
|
2817
|
+
}) => /* @__PURE__ */ _.jsxs("div", { className: "relative group", children: [
|
|
2818
|
+
i && /* @__PURE__ */ _.jsx("div", { className: "text-xs text-muted-foreground absolute top-2 font-mono border-b w-full pb-2 px-4 ", children: i }),
|
|
2819
|
+
/* @__PURE__ */ _.jsx(
|
|
2820
|
+
"pre",
|
|
2821
|
+
{
|
|
2822
|
+
className: ee(
|
|
2823
|
+
"relative scrollbar overflow-x-auto",
|
|
2824
|
+
u.className,
|
|
2825
|
+
u.noBackground ? "!bg-transparent" : v,
|
|
2826
|
+
u.wrapLines && "whitespace-pre-wrap break-words",
|
|
2827
|
+
i && "pt-10",
|
|
2828
|
+
a
|
|
2830
2829
|
),
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
), setTimeout(() => p(!1), 2e3);
|
|
2881
|
-
},
|
|
2882
|
-
children: [
|
|
2883
|
-
h ? /* @__PURE__ */ F.jsx(
|
|
2884
|
-
fe,
|
|
2885
|
-
{
|
|
2886
|
-
className: "text-emerald-600",
|
|
2887
|
-
size: 16,
|
|
2888
|
-
strokeWidth: 2.5,
|
|
2889
|
-
absoluteStrokeWidth: !0
|
|
2890
|
-
}
|
|
2891
|
-
) : /* @__PURE__ */ F.jsx(be, { size: 16 }),
|
|
2892
|
-
a && "Copy"
|
|
2893
|
-
]
|
|
2894
|
-
}
|
|
2895
|
-
)
|
|
2896
|
-
] })
|
|
2897
|
-
}
|
|
2898
|
-
)
|
|
2830
|
+
style: s,
|
|
2831
|
+
children: n
|
|
2832
|
+
}
|
|
2833
|
+
),
|
|
2834
|
+
u.showLanguageIndicator && /* @__PURE__ */ _.jsx("span", { className: "absolute top-1.5 right-3 text-[11px] font-mono text-muted-foreground transition group-hover:opacity-0", children: e }),
|
|
2835
|
+
t !== "never" && /* @__PURE__ */ _.jsxs(
|
|
2836
|
+
"button",
|
|
2837
|
+
{
|
|
2838
|
+
type: "button",
|
|
2839
|
+
"aria-label": "Copy code",
|
|
2840
|
+
title: "Copy code",
|
|
2841
|
+
className: ee(
|
|
2842
|
+
"absolute top-2 right-2 p-2 hover:outline hover:outline-border/75 dark:hover:outline-border rounded-md text-sm text-muted-foreground transition",
|
|
2843
|
+
t === "hover" ? "opacity-0 group-hover:opacity-100 group-hover:bg-zinc-100 group-hover:dark:bg-zinc-700" : "bg-zinc-100 dark:bg-zinc-700",
|
|
2844
|
+
r && "flex gap-2 items-center font-medium"
|
|
2845
|
+
),
|
|
2846
|
+
disabled: p,
|
|
2847
|
+
onClick: () => {
|
|
2848
|
+
g(!0), navigator.clipboard.writeText(b), setTimeout(() => g(!1), 2e3);
|
|
2849
|
+
},
|
|
2850
|
+
children: [
|
|
2851
|
+
p ? /* @__PURE__ */ _.jsx(
|
|
2852
|
+
me,
|
|
2853
|
+
{
|
|
2854
|
+
className: "text-emerald-600",
|
|
2855
|
+
size: 16,
|
|
2856
|
+
strokeWidth: 2.5,
|
|
2857
|
+
absoluteStrokeWidth: !0
|
|
2858
|
+
}
|
|
2859
|
+
) : /* @__PURE__ */ _.jsx(he, { size: 16 }),
|
|
2860
|
+
r && "Copy"
|
|
2861
|
+
]
|
|
2862
|
+
}
|
|
2863
|
+
)
|
|
2864
|
+
] });
|
|
2865
|
+
return h ? /* @__PURE__ */ _.jsx(te, { fallback: /* @__PURE__ */ _.jsx(w, { children: b }), children: /* @__PURE__ */ _.jsx(w, { children: b }) }) : /* @__PURE__ */ _.jsx(te, { fallback: /* @__PURE__ */ _.jsx(w, { children: b }), children: /* @__PURE__ */ _.jsx(
|
|
2866
|
+
xt,
|
|
2867
|
+
{
|
|
2868
|
+
theme: y,
|
|
2869
|
+
language: At[e] ?? e,
|
|
2870
|
+
...u,
|
|
2871
|
+
code: b,
|
|
2872
|
+
children: ({ className: n, style: a, tokens: s, getLineProps: c, getTokenProps: l }) => /* @__PURE__ */ _.jsx(w, { className: n, style: a, children: s.map((d, k) => (
|
|
2873
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
2874
|
+
/* @__PURE__ */ _.jsx("div", { ...c({ line: d }), children: d.map((E, A) => (
|
|
2875
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
2876
|
+
/* @__PURE__ */ _.jsx("span", { ...l({ token: E }) }, A)
|
|
2877
|
+
)) }, k)
|
|
2878
|
+
)) })
|
|
2899
2879
|
}
|
|
2900
|
-
);
|
|
2901
|
-
};
|
|
2880
|
+
) });
|
|
2881
|
+
}, _t = fe(St);
|
|
2882
|
+
_t.displayName = "SyntaxHighlight";
|
|
2902
2883
|
export {
|
|
2903
|
-
|
|
2884
|
+
_t as SyntaxHighlight
|
|
2904
2885
|
};
|
|
2905
2886
|
//# sourceMappingURL=SyntaxHighlight.js.map
|