zudoku 0.32.6 → 0.33.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.
Files changed (186) hide show
  1. package/cli.js +3 -0
  2. package/dist/app/main.js +1 -1
  3. package/dist/app/main.js.map +1 -1
  4. package/dist/cli/build/handler.d.ts +1 -3
  5. package/dist/cli/build/handler.js +7 -0
  6. package/dist/cli/build/handler.js.map +1 -1
  7. package/dist/cli/cli.js +5 -0
  8. package/dist/cli/cli.js.map +1 -1
  9. package/dist/cli/cmds/build.d.ts +11 -3
  10. package/dist/cli/cmds/build.js +20 -13
  11. package/dist/cli/cmds/build.js.map +1 -1
  12. package/dist/cli/cmds/preview.d.ts +16 -0
  13. package/dist/cli/cmds/preview.js +25 -0
  14. package/dist/cli/cmds/preview.js.map +1 -0
  15. package/dist/cli/preview/handler.d.ts +3 -0
  16. package/dist/cli/preview/handler.js +37 -0
  17. package/dist/cli/preview/handler.js.map +1 -0
  18. package/dist/config/common.d.ts +5 -2
  19. package/dist/config/config.d.ts +2 -7
  20. package/dist/config/loader.d.ts +4 -4
  21. package/dist/config/loader.js +7 -4
  22. package/dist/config/loader.js.map +1 -1
  23. package/dist/config/validators/validate.d.ts +1 -1
  24. package/dist/index.d.ts +1 -0
  25. package/dist/index.js +1 -0
  26. package/dist/index.js.map +1 -1
  27. package/dist/lib/authentication/providers/auth0.d.ts +2 -2
  28. package/dist/lib/authentication/providers/auth0.js +1 -0
  29. package/dist/lib/authentication/providers/auth0.js.map +1 -1
  30. package/dist/lib/authentication/providers/openid.d.ts +4 -3
  31. package/dist/lib/authentication/providers/openid.js +4 -2
  32. package/dist/lib/authentication/providers/openid.js.map +1 -1
  33. package/dist/lib/components/ThemeSwitch.js +1 -1
  34. package/dist/lib/components/ThemeSwitch.js.map +1 -1
  35. package/dist/lib/components/Zudoku.d.ts +1 -1
  36. package/dist/lib/components/Zudoku.js +7 -6
  37. package/dist/lib/components/Zudoku.js.map +1 -1
  38. package/dist/lib/components/context/RouterEventsEmitter.d.ts +1 -0
  39. package/dist/lib/components/context/RouterEventsEmitter.js +17 -0
  40. package/dist/lib/components/context/RouterEventsEmitter.js.map +1 -0
  41. package/dist/lib/core/ZudokuContext.d.ts +10 -0
  42. package/dist/lib/core/ZudokuContext.js +17 -1
  43. package/dist/lib/core/ZudokuContext.js.map +1 -1
  44. package/dist/lib/core/plugins.d.ts +8 -2
  45. package/dist/lib/core/plugins.js +1 -0
  46. package/dist/lib/core/plugins.js.map +1 -1
  47. package/dist/lib/hooks/index.d.ts +3 -0
  48. package/dist/lib/hooks/index.js +5 -0
  49. package/dist/lib/hooks/index.js.map +1 -0
  50. package/dist/lib/hooks/useEvent.d.ts +11 -0
  51. package/dist/lib/hooks/useEvent.js +19 -0
  52. package/dist/lib/hooks/useEvent.js.map +1 -0
  53. package/dist/lib/hooks/useEvent.test.d.ts +1 -0
  54. package/dist/lib/hooks/useEvent.test.js +100 -0
  55. package/dist/lib/hooks/useEvent.test.js.map +1 -0
  56. package/dist/lib/ui/Stepper.d.ts +4 -0
  57. package/dist/lib/ui/Stepper.js +7 -0
  58. package/dist/lib/ui/Stepper.js.map +1 -0
  59. package/dist/lib/util/MdxComponents.d.ts +3 -1
  60. package/dist/lib/util/MdxComponents.js +3 -0
  61. package/dist/lib/util/MdxComponents.js.map +1 -1
  62. package/dist/vite/config.d.ts +2 -5
  63. package/dist/vite/config.js +21 -28
  64. package/dist/vite/config.js.map +1 -1
  65. package/dist/vite/config.test.js +1 -1
  66. package/dist/vite/config.test.js.map +1 -1
  67. package/dist/vite/css/plugin.d.ts +2 -2
  68. package/dist/vite/css/plugin.js.map +1 -1
  69. package/dist/vite/dev-server.js.map +1 -1
  70. package/dist/vite/plugin-api-keys.d.ts +2 -2
  71. package/dist/vite/plugin-api-keys.js +3 -3
  72. package/dist/vite/plugin-api-keys.js.map +1 -1
  73. package/dist/vite/plugin-api.d.ts +2 -2
  74. package/dist/vite/plugin-api.js +5 -5
  75. package/dist/vite/plugin-api.js.map +1 -1
  76. package/dist/vite/plugin-auth.d.ts +2 -2
  77. package/dist/vite/plugin-auth.js +3 -3
  78. package/dist/vite/plugin-auth.js.map +1 -1
  79. package/dist/vite/plugin-component.d.ts +2 -2
  80. package/dist/vite/plugin-component.js +3 -2
  81. package/dist/vite/plugin-component.js.map +1 -1
  82. package/dist/vite/plugin-config-reload.d.ts +4 -3
  83. package/dist/vite/plugin-config-reload.js +11 -8
  84. package/dist/vite/plugin-config-reload.js.map +1 -1
  85. package/dist/vite/plugin-config.d.ts +2 -2
  86. package/dist/vite/plugin-config.js +2 -2
  87. package/dist/vite/plugin-config.js.map +1 -1
  88. package/dist/vite/plugin-custom-pages.d.ts +2 -2
  89. package/dist/vite/plugin-custom-pages.js +3 -3
  90. package/dist/vite/plugin-custom-pages.js.map +1 -1
  91. package/dist/vite/plugin-docs.d.ts +2 -2
  92. package/dist/vite/plugin-docs.js +5 -5
  93. package/dist/vite/plugin-docs.js.map +1 -1
  94. package/dist/vite/plugin-frontmatter.d.ts +2 -2
  95. package/dist/vite/plugin-frontmatter.js +5 -4
  96. package/dist/vite/plugin-frontmatter.js.map +1 -1
  97. package/dist/vite/plugin-mdx.d.ts +2 -2
  98. package/dist/vite/plugin-mdx.js +1 -1
  99. package/dist/vite/plugin-mdx.js.map +1 -1
  100. package/dist/vite/plugin-redirect.d.ts +2 -2
  101. package/dist/vite/plugin-redirect.js +3 -3
  102. package/dist/vite/plugin-redirect.js.map +1 -1
  103. package/dist/vite/plugin-search.d.ts +2 -2
  104. package/dist/vite/plugin-search.js +1 -1
  105. package/dist/vite/plugin-search.js.map +1 -1
  106. package/dist/vite/plugin-sidebar.d.ts +2 -2
  107. package/dist/vite/plugin-sidebar.js +2 -2
  108. package/dist/vite/plugin-sidebar.js.map +1 -1
  109. package/dist/vite/plugin-theme-css.d.ts +2 -2
  110. package/dist/vite/plugin-theme-css.js.map +1 -1
  111. package/dist/vite/plugin.d.ts +2 -2
  112. package/dist/vite/plugin.js.map +1 -1
  113. package/dist/vite/prerender/FileWritingResponse.d.ts +2 -1
  114. package/dist/vite/prerender/FileWritingResponse.js +4 -1
  115. package/dist/vite/prerender/FileWritingResponse.js.map +1 -1
  116. package/dist/vite/prerender/worker.d.ts +1 -1
  117. package/dist/vite/prerender/worker.js +3 -0
  118. package/dist/vite/prerender/worker.js.map +1 -1
  119. package/lib/{AuthenticationPlugin-BlxA4Mbn.js → AuthenticationPlugin-_gUMnGxb.js} +2 -2
  120. package/lib/{AuthenticationPlugin-BlxA4Mbn.js.map → AuthenticationPlugin-_gUMnGxb.js.map} +1 -1
  121. package/lib/{Markdown-Cr9sYpR_.js → Markdown-DePfm7oQ.js} +1384 -1381
  122. package/lib/{Markdown-Cr9sYpR_.js.map → Markdown-DePfm7oQ.js.map} +1 -1
  123. package/lib/{MdxPage-Dt-UEQl8.js → MdxPage-DM9mE-G-.js} +4 -4
  124. package/lib/{MdxPage-Dt-UEQl8.js.map → MdxPage-DM9mE-G-.js.map} +1 -1
  125. package/lib/{OasProvider-WVtvHP5H.js → OasProvider-Bvu4dDpX.js} +3 -3
  126. package/lib/{OasProvider-WVtvHP5H.js.map → OasProvider-Bvu4dDpX.js.map} +1 -1
  127. package/lib/{OperationList-DhOwupvv.js → OperationList-DWnNbwVg.js} +241 -240
  128. package/lib/OperationList-DWnNbwVg.js.map +1 -0
  129. package/lib/{Select-D9hI1G-y.js → Select-BmoX1iTH.js} +36 -36
  130. package/lib/{Select-D9hI1G-y.js.map → Select-BmoX1iTH.js.map} +1 -1
  131. package/lib/{SlotletProvider-CEfNOA8i.js → SlotletProvider-DdtIOUi6.js} +2 -2
  132. package/lib/{SlotletProvider-CEfNOA8i.js.map → SlotletProvider-DdtIOUi6.js.map} +1 -1
  133. package/lib/{createServer-DMf6O2Rz.js → createServer-DmusVVsi.js} +987 -967
  134. package/lib/createServer-DmusVVsi.js.map +1 -0
  135. package/lib/{hook-CWwSAAlH.js → hook-4_6pQSo4.js} +29 -29
  136. package/lib/{hook-CWwSAAlH.js.map → hook-4_6pQSo4.js.map} +1 -1
  137. package/lib/{index-Do_30Hpk.js → index-DVBlM15k.js} +83 -82
  138. package/lib/{index-Do_30Hpk.js.map → index-DVBlM15k.js.map} +1 -1
  139. package/lib/index-DwT-v3zK.js +86 -0
  140. package/lib/index-DwT-v3zK.js.map +1 -0
  141. package/lib/{mutation-B0wxqzSN.js → mutation-DTunCQKB.js} +2 -2
  142. package/lib/{mutation-B0wxqzSN.js.map → mutation-DTunCQKB.js.map} +1 -1
  143. package/lib/objectEntries-yMIkr2mI.js +5 -0
  144. package/lib/objectEntries-yMIkr2mI.js.map +1 -0
  145. package/lib/ui/Stepper.js +6 -0
  146. package/lib/ui/Stepper.js.map +1 -0
  147. package/lib/ui/SyntaxHighlight.js +2902 -7
  148. package/lib/ui/SyntaxHighlight.js.map +1 -1
  149. package/lib/{useScrollToAnchor-C-sRxs9o.js → useScrollToAnchor-BW8y_cwU.js} +3 -3
  150. package/lib/{useScrollToAnchor-C-sRxs9o.js.map → useScrollToAnchor-BW8y_cwU.js.map} +1 -1
  151. package/lib/zudoku.auth-auth0.js +15 -14
  152. package/lib/zudoku.auth-auth0.js.map +1 -1
  153. package/lib/zudoku.auth-clerk.js +2 -2
  154. package/lib/zudoku.auth-openid.js +126 -124
  155. package/lib/zudoku.auth-openid.js.map +1 -1
  156. package/lib/zudoku.components.js +489 -454
  157. package/lib/zudoku.components.js.map +1 -1
  158. package/lib/zudoku.css +1 -0
  159. package/lib/zudoku.hooks.js +19 -0
  160. package/lib/zudoku.hooks.js.map +1 -0
  161. package/lib/zudoku.plugin-api-catalog.js +2 -2
  162. package/lib/zudoku.plugin-api-keys.js +5 -5
  163. package/lib/zudoku.plugin-custom-pages.js +1 -1
  164. package/lib/zudoku.plugin-markdown.js +1 -1
  165. package/lib/zudoku.plugin-openapi.js +2 -2
  166. package/lib/zudoku.plugins.js +9 -8
  167. package/lib/zudoku.plugins.js.map +1 -1
  168. package/package.json +12 -4
  169. package/src/app/main.tsx +1 -1
  170. package/src/lib/authentication/providers/auth0.tsx +3 -2
  171. package/src/lib/authentication/providers/openid.tsx +8 -5
  172. package/src/lib/components/ThemeSwitch.tsx +1 -1
  173. package/src/lib/components/Zudoku.tsx +9 -5
  174. package/src/lib/components/context/RouterEventsEmitter.tsx +19 -0
  175. package/src/lib/core/ZudokuContext.ts +31 -0
  176. package/src/lib/core/plugins.ts +16 -2
  177. package/src/lib/hooks/index.ts +5 -0
  178. package/src/lib/hooks/useEvent.test.tsx +149 -0
  179. package/src/lib/hooks/useEvent.ts +41 -0
  180. package/src/lib/ui/Stepper.css +43 -0
  181. package/src/lib/ui/Stepper.tsx +8 -0
  182. package/src/lib/util/MdxComponents.tsx +4 -1
  183. package/lib/OperationList-DhOwupvv.js.map +0 -1
  184. package/lib/SyntaxHighlight-CcnUjERD.js +0 -2986
  185. package/lib/SyntaxHighlight-CcnUjERD.js.map +0 -1
  186. package/lib/createServer-DMf6O2Rz.js.map +0 -1
@@ -1,2986 +0,0 @@
1
- import { j as I } from "./jsx-runtime-CYK1ROHF.js";
2
- import * as _ from "react";
3
- import { createElement as he, useCallback as X, useMemo as ve, useState as ke } from "react";
4
- import { a as ce, c as V } from "./cn-qaFjX9_3.js";
5
- import { CheckIcon as we, CopyIcon as Ee } from "lucide-react";
6
- import { C as xe } from "./ClientOnly-E7hGysn1.js";
7
- var Se = (e, t, a, i, d, m, c, h) => {
8
- let u = document.documentElement, g = ["light", "dark"];
9
- function b(w) {
10
- (Array.isArray(e) ? e : [e]).forEach((n) => {
11
- let r = n === "class", s = r && m ? d.map((p) => m[p] || p) : d;
12
- r ? (u.classList.remove(...s), u.classList.add(w)) : u.setAttribute(n, w);
13
- }), f(w);
14
- }
15
- function f(w) {
16
- h && g.includes(w) && (u.style.colorScheme = w);
17
- }
18
- function v() {
19
- return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
20
- }
21
- if (i) b(i);
22
- else try {
23
- let w = localStorage.getItem(t) || a, n = c && w === "system" ? v() : w;
24
- b(n);
25
- } catch {
26
- }
27
- }, ne = ["light", "dark"], pe = "(prefers-color-scheme: dark)", Ae = typeof window > "u", J = _.createContext(void 0), _e = { setTheme: (e) => {
28
- }, themes: [] }, Fe = () => {
29
- var e;
30
- return (e = _.useContext(J)) != null ? e : _e;
31
- }, Ut = (e) => _.useContext(J) ? _.createElement(_.Fragment, null, e.children) : _.createElement(Re, { ...e }), Te = ["light", "dark"], Re = ({ forcedTheme: e, disableTransitionOnChange: t = !1, enableSystem: a = !0, enableColorScheme: i = !0, storageKey: d = "theme", themes: m = Te, defaultTheme: c = a ? "system" : "light", attribute: h = "data-theme", value: u, children: g, nonce: b, scriptProps: f }) => {
32
- let [v, w] = _.useState(() => re(d, c)), [n, r] = _.useState(() => re(d)), s = u ? Object.values(u) : m, p = _.useCallback((k) => {
33
- let x = k;
34
- if (!x) return;
35
- k === "system" && a && (x = oe());
36
- let S = u ? u[x] : x, F = t ? Le(b) : null, A = document.documentElement, N = (T) => {
37
- T === "class" ? (A.classList.remove(...s), S && A.classList.add(S)) : T.startsWith("data-") && (S ? A.setAttribute(T, S) : A.removeAttribute(T));
38
- };
39
- if (Array.isArray(h) ? h.forEach(N) : N(h), i) {
40
- let T = ne.includes(c) ? c : null, O = ne.includes(x) ? x : T;
41
- A.style.colorScheme = O;
42
- }
43
- F == null || F();
44
- }, [b]), l = _.useCallback((k) => {
45
- let x = typeof k == "function" ? k(v) : k;
46
- w(x);
47
- try {
48
- localStorage.setItem(d, x);
49
- } catch {
50
- }
51
- }, [v]), y = _.useCallback((k) => {
52
- let x = oe(k);
53
- r(x), v === "system" && a && !e && p("system");
54
- }, [v, e]);
55
- _.useEffect(() => {
56
- let k = window.matchMedia(pe);
57
- return k.addListener(y), y(k), () => k.removeListener(y);
58
- }, [y]), _.useEffect(() => {
59
- let k = (x) => {
60
- x.key === d && (x.newValue ? w(x.newValue) : l(c));
61
- };
62
- return window.addEventListener("storage", k), () => window.removeEventListener("storage", k);
63
- }, [l]), _.useEffect(() => {
64
- p(e ?? v);
65
- }, [e, v]);
66
- let E = _.useMemo(() => ({ theme: v, setTheme: l, forcedTheme: e, resolvedTheme: v === "system" ? n : v, themes: a ? [...m, "system"] : m, systemTheme: a ? n : void 0 }), [v, l, e, n, a, m]);
67
- return _.createElement(J.Provider, { value: E }, _.createElement(Ie, { forcedTheme: e, storageKey: d, attribute: h, enableSystem: a, enableColorScheme: i, defaultTheme: c, value: u, themes: m, nonce: b, scriptProps: f }), g);
68
- }, Ie = _.memo(({ forcedTheme: e, storageKey: t, attribute: a, enableSystem: i, enableColorScheme: d, defaultTheme: m, value: c, themes: h, nonce: u, scriptProps: g }) => {
69
- let b = JSON.stringify([a, t, m, e, h, c, i, d]).slice(1, -1);
70
- return _.createElement("script", { ...g, suppressHydrationWarning: !0, nonce: typeof window > "u" ? u : "", dangerouslySetInnerHTML: { __html: `(${Se.toString()})(${b})` } });
71
- }), re = (e, t) => {
72
- if (Ae) return;
73
- let a;
74
- try {
75
- a = localStorage.getItem(e) || void 0;
76
- } catch {
77
- }
78
- return a || t;
79
- }, Le = (e) => {
80
- let t = document.createElement("style");
81
- return e && t.setAttribute("nonce", e), t.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")), document.head.appendChild(t), () => {
82
- window.getComputedStyle(document.body), setTimeout(() => {
83
- document.head.removeChild(t);
84
- }, 1);
85
- };
86
- }, oe = (e) => (e || (e = window.matchMedia(pe)), e.matches ? "dark" : "light"), Oe = Object.create, W = Object.defineProperty, Ne = Object.defineProperties, Ce = Object.getOwnPropertyDescriptor, De = Object.getOwnPropertyDescriptors, de = Object.getOwnPropertyNames, Z = Object.getOwnPropertySymbols, Be = Object.getPrototypeOf, ee = Object.prototype.hasOwnProperty, ge = Object.prototype.propertyIsEnumerable, se = (e, t, a) => t in e ? W(e, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[t] = a, B = (e, t) => {
87
- for (var a in t || (t = {}))
88
- ee.call(t, a) && se(e, a, t[a]);
89
- if (Z)
90
- for (var a of Z(t))
91
- ge.call(t, a) && se(e, a, t[a]);
92
- return e;
93
- }, q = (e, t) => Ne(e, De(t)), ye = (e, t) => {
94
- var a = {};
95
- for (var i in e)
96
- ee.call(e, i) && t.indexOf(i) < 0 && (a[i] = e[i]);
97
- if (e != null && Z)
98
- for (var i of Z(e))
99
- t.indexOf(i) < 0 && ge.call(e, i) && (a[i] = e[i]);
100
- return a;
101
- }, $e = (e, t) => function() {
102
- return t || (0, e[de(e)[0]])((t = { exports: {} }).exports, t), t.exports;
103
- }, Pe = (e, t) => {
104
- for (var a in t)
105
- W(e, a, { get: t[a], enumerable: !0 });
106
- }, je = (e, t, a, i) => {
107
- if (t && typeof t == "object" || typeof t == "function")
108
- for (let d of de(t))
109
- !ee.call(e, d) && d !== a && W(e, d, { get: () => t[d], enumerable: !(i = Ce(t, d)) || i.enumerable });
110
- return e;
111
- }, ze = (e, t, a) => (a = e != null ? Oe(Be(e)) : {}, je(
112
- // If the importer is in node compatibility mode or this is not an ESM
113
- // file that has been converted to a CommonJS file using a Babel-
114
- // compatible transform (i.e. "__esModule" has not been set), then set
115
- // "default" to the CommonJS "module.exports" for node compatibility.
116
- !e || !e.__esModule ? W(a, "default", { value: e, enumerable: !0 }) : a,
117
- e
118
- )), Me = $e({
119
- "../../node_modules/.pnpm/prismjs@1.29.0_patch_hash=vrxx3pzkik6jpmgpayxfjunetu/node_modules/prismjs/prism.js"(e, t) {
120
- var a = function() {
121
- var i = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i, d = 0, m = {}, c = {
122
- /**
123
- * A namespace for utility methods.
124
- *
125
- * All function in this namespace that are not explicitly marked as _public_ are for __internal use only__ and may
126
- * change or disappear at any time.
127
- *
128
- * @namespace
129
- * @memberof Prism
130
- */
131
- util: {
132
- encode: function n(r) {
133
- return r instanceof h ? new h(r.type, n(r.content), r.alias) : Array.isArray(r) ? r.map(n) : r.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/\u00a0/g, " ");
134
- },
135
- /**
136
- * Returns the name of the type of the given value.
137
- *
138
- * @param {any} o
139
- * @returns {string}
140
- * @example
141
- * type(null) === 'Null'
142
- * type(undefined) === 'Undefined'
143
- * type(123) === 'Number'
144
- * type('foo') === 'String'
145
- * type(true) === 'Boolean'
146
- * type([1, 2]) === 'Array'
147
- * type({}) === 'Object'
148
- * type(String) === 'Function'
149
- * type(/abc+/) === 'RegExp'
150
- */
151
- type: function(n) {
152
- return Object.prototype.toString.call(n).slice(8, -1);
153
- },
154
- /**
155
- * Returns a unique number for the given object. Later calls will still return the same number.
156
- *
157
- * @param {Object} obj
158
- * @returns {number}
159
- */
160
- objId: function(n) {
161
- return n.__id || Object.defineProperty(n, "__id", { value: ++d }), n.__id;
162
- },
163
- /**
164
- * Creates a deep clone of the given object.
165
- *
166
- * The main intended use of this function is to clone language definitions.
167
- *
168
- * @param {T} o
169
- * @param {Record<number, any>} [visited]
170
- * @returns {T}
171
- * @template T
172
- */
173
- clone: function n(r, s) {
174
- s = s || {};
175
- var p, l;
176
- switch (c.util.type(r)) {
177
- case "Object":
178
- if (l = c.util.objId(r), s[l])
179
- return s[l];
180
- p = /** @type {Record<string, any>} */
181
- {}, s[l] = p;
182
- for (var y in r)
183
- r.hasOwnProperty(y) && (p[y] = n(r[y], s));
184
- return (
185
- /** @type {any} */
186
- p
187
- );
188
- case "Array":
189
- return l = c.util.objId(r), s[l] ? s[l] : (p = [], s[l] = p, r.forEach(function(E, k) {
190
- p[k] = n(E, s);
191
- }), /** @type {any} */
192
- p);
193
- default:
194
- return r;
195
- }
196
- },
197
- /**
198
- * Returns the Prism language of the given element set by a `language-xxxx` or `lang-xxxx` class.
199
- *
200
- * If no language is set for the element or the element is `null` or `undefined`, `none` will be returned.
201
- *
202
- * @param {Element} element
203
- * @returns {string}
204
- */
205
- getLanguage: function(n) {
206
- for (; n; ) {
207
- var r = i.exec(n.className);
208
- if (r)
209
- return r[1].toLowerCase();
210
- n = n.parentElement;
211
- }
212
- return "none";
213
- },
214
- /**
215
- * Sets the Prism `language-xxxx` class of the given element.
216
- *
217
- * @param {Element} element
218
- * @param {string} language
219
- * @returns {void}
220
- */
221
- setLanguage: function(n, r) {
222
- n.className = n.className.replace(RegExp(i, "gi"), ""), n.classList.add("language-" + r);
223
- },
224
- /**
225
- * Returns whether a given class is active for `element`.
226
- *
227
- * The class can be activated if `element` or one of its ancestors has the given class and it can be deactivated
228
- * if `element` or one of its ancestors has the negated version of the given class. The _negated version_ of the
229
- * given class is just the given class with a `no-` prefix.
230
- *
231
- * Whether the class is active is determined by the closest ancestor of `element` (where `element` itself is
232
- * closest ancestor) that has the given class or the negated version of it. If neither `element` nor any of its
233
- * ancestors have the given class or the negated version of it, then the default activation will be returned.
234
- *
235
- * In the paradoxical situation where the closest ancestor contains __both__ the given class and the negated
236
- * version of it, the class is considered active.
237
- *
238
- * @param {Element} element
239
- * @param {string} className
240
- * @param {boolean} [defaultActivation=false]
241
- * @returns {boolean}
242
- */
243
- isActive: function(n, r, s) {
244
- for (var p = "no-" + r; n; ) {
245
- var l = n.classList;
246
- if (l.contains(r))
247
- return !0;
248
- if (l.contains(p))
249
- return !1;
250
- n = n.parentElement;
251
- }
252
- return !!s;
253
- }
254
- },
255
- /**
256
- * This namespace contains all currently loaded languages and the some helper functions to create and modify languages.
257
- *
258
- * @namespace
259
- * @memberof Prism
260
- * @public
261
- */
262
- languages: {
263
- /**
264
- * The grammar for plain, unformatted text.
265
- */
266
- plain: m,
267
- plaintext: m,
268
- text: m,
269
- txt: m,
270
- /**
271
- * Creates a deep copy of the language with the given id and appends the given tokens.
272
- *
273
- * If a token in `redef` also appears in the copied language, then the existing token in the copied language
274
- * will be overwritten at its original position.
275
- *
276
- * ## Best practices
277
- *
278
- * Since the position of overwriting tokens (token in `redef` that overwrite tokens in the copied language)
279
- * doesn't matter, they can technically be in any order. However, this can be confusing to others that trying to
280
- * understand the language definition because, normally, the order of tokens matters in Prism grammars.
281
- *
282
- * Therefore, it is encouraged to order overwriting tokens according to the positions of the overwritten tokens.
283
- * Furthermore, all non-overwriting tokens should be placed after the overwriting ones.
284
- *
285
- * @param {string} id The id of the language to extend. This has to be a key in `Prism.languages`.
286
- * @param {Grammar} redef The new tokens to append.
287
- * @returns {Grammar} The new language created.
288
- * @public
289
- * @example
290
- * Prism.languages['css-with-colors'] = Prism.languages.extend('css', {
291
- * // Prism.languages.css already has a 'comment' token, so this token will overwrite CSS' 'comment' token
292
- * // at its original position
293
- * 'comment': { ... },
294
- * // CSS doesn't have a 'color' token, so this token will be appended
295
- * 'color': /\b(?:red|green|blue)\b/
296
- * });
297
- */
298
- extend: function(n, r) {
299
- var s = c.util.clone(c.languages[n]);
300
- for (var p in r)
301
- s[p] = r[p];
302
- return s;
303
- },
304
- /**
305
- * Inserts tokens _before_ another token in a language definition or any other grammar.
306
- *
307
- * ## Usage
308
- *
309
- * This helper method makes it easy to modify existing languages. For example, the CSS language definition
310
- * not only defines CSS highlighting for CSS documents, but also needs to define highlighting for CSS embedded
311
- * in HTML through `<style>` elements. To do this, it needs to modify `Prism.languages.markup` and add the
312
- * appropriate tokens. However, `Prism.languages.markup` is a regular JavaScript object literal, so if you do
313
- * this:
314
- *
315
- * ```js
316
- * Prism.languages.markup.style = {
317
- * // token
318
- * };
319
- * ```
320
- *
321
- * then the `style` token will be added (and processed) at the end. `insertBefore` allows you to insert tokens
322
- * before existing tokens. For the CSS example above, you would use it like this:
323
- *
324
- * ```js
325
- * Prism.languages.insertBefore('markup', 'cdata', {
326
- * 'style': {
327
- * // token
328
- * }
329
- * });
330
- * ```
331
- *
332
- * ## Special cases
333
- *
334
- * If the grammars of `inside` and `insert` have tokens with the same name, the tokens in `inside`'s grammar
335
- * will be ignored.
336
- *
337
- * This behavior can be used to insert tokens after `before`:
338
- *
339
- * ```js
340
- * Prism.languages.insertBefore('markup', 'comment', {
341
- * 'comment': Prism.languages.markup.comment,
342
- * // tokens after 'comment'
343
- * });
344
- * ```
345
- *
346
- * ## Limitations
347
- *
348
- * The main problem `insertBefore` has to solve is iteration order. Since ES2015, the iteration order for object
349
- * properties is guaranteed to be the insertion order (except for integer keys) but some browsers behave
350
- * differently when keys are deleted and re-inserted. So `insertBefore` can't be implemented by temporarily
351
- * deleting properties which is necessary to insert at arbitrary positions.
352
- *
353
- * To solve this problem, `insertBefore` doesn't actually insert the given tokens into the target object.
354
- * Instead, it will create a new object and replace all references to the target object with the new one. This
355
- * can be done without temporarily deleting properties, so the iteration order is well-defined.
356
- *
357
- * However, only references that can be reached from `Prism.languages` or `insert` will be replaced. I.e. if
358
- * you hold the target object in a variable, then the value of the variable will not change.
359
- *
360
- * ```js
361
- * var oldMarkup = Prism.languages.markup;
362
- * var newMarkup = Prism.languages.insertBefore('markup', 'comment', { ... });
363
- *
364
- * assert(oldMarkup !== Prism.languages.markup);
365
- * assert(newMarkup === Prism.languages.markup);
366
- * ```
367
- *
368
- * @param {string} inside The property of `root` (e.g. a language id in `Prism.languages`) that contains the
369
- * object to be modified.
370
- * @param {string} before The key to insert before.
371
- * @param {Grammar} insert An object containing the key-value pairs to be inserted.
372
- * @param {Object<string, any>} [root] The object containing `inside`, i.e. the object that contains the
373
- * object to be modified.
374
- *
375
- * Defaults to `Prism.languages`.
376
- * @returns {Grammar} The new grammar object.
377
- * @public
378
- */
379
- insertBefore: function(n, r, s, p) {
380
- p = p || /** @type {any} */
381
- c.languages;
382
- var l = p[n], y = {};
383
- for (var E in l)
384
- if (l.hasOwnProperty(E)) {
385
- if (E == r)
386
- for (var k in s)
387
- s.hasOwnProperty(k) && (y[k] = s[k]);
388
- s.hasOwnProperty(E) || (y[E] = l[E]);
389
- }
390
- var x = p[n];
391
- return p[n] = y, c.languages.DFS(c.languages, function(S, F) {
392
- F === x && S != n && (this[S] = y);
393
- }), y;
394
- },
395
- // Traverse a language definition with Depth First Search
396
- DFS: function n(r, s, p, l) {
397
- l = l || {};
398
- var y = c.util.objId;
399
- for (var E in r)
400
- if (r.hasOwnProperty(E)) {
401
- s.call(r, E, r[E], p || E);
402
- var k = r[E], x = c.util.type(k);
403
- x === "Object" && !l[y(k)] ? (l[y(k)] = !0, n(k, s, null, l)) : x === "Array" && !l[y(k)] && (l[y(k)] = !0, n(k, s, E, l));
404
- }
405
- }
406
- },
407
- plugins: {},
408
- /**
409
- * Low-level function, only use if you know what you’re doing. It accepts a string of text as input
410
- * and the language definitions to use, and returns a string with the HTML produced.
411
- *
412
- * The following hooks will be run:
413
- * 1. `before-tokenize`
414
- * 2. `after-tokenize`
415
- * 3. `wrap`: On each {@link Token}.
416
- *
417
- * @param {string} text A string with the code to be highlighted.
418
- * @param {Grammar} grammar An object containing the tokens to use.
419
- *
420
- * Usually a language definition like `Prism.languages.markup`.
421
- * @param {string} language The name of the language definition passed to `grammar`.
422
- * @returns {string} The highlighted HTML.
423
- * @memberof Prism
424
- * @public
425
- * @example
426
- * Prism.highlight('var foo = true;', Prism.languages.javascript, 'javascript');
427
- */
428
- highlight: function(n, r, s) {
429
- var p = {
430
- code: n,
431
- grammar: r,
432
- language: s
433
- };
434
- if (c.hooks.run("before-tokenize", p), !p.grammar)
435
- throw new Error('The language "' + p.language + '" has no grammar.');
436
- return p.tokens = c.tokenize(p.code, p.grammar), c.hooks.run("after-tokenize", p), h.stringify(c.util.encode(p.tokens), p.language);
437
- },
438
- /**
439
- * This is the heart of Prism, and the most low-level function you can use. It accepts a string of text as input
440
- * and the language definitions to use, and returns an array with the tokenized code.
441
- *
442
- * When the language definition includes nested tokens, the function is called recursively on each of these tokens.
443
- *
444
- * This method could be useful in other contexts as well, as a very crude parser.
445
- *
446
- * @param {string} text A string with the code to be highlighted.
447
- * @param {Grammar} grammar An object containing the tokens to use.
448
- *
449
- * Usually a language definition like `Prism.languages.markup`.
450
- * @returns {TokenStream} An array of strings and tokens, a token stream.
451
- * @memberof Prism
452
- * @public
453
- * @example
454
- * let code = `var foo = 0;`;
455
- * let tokens = Prism.tokenize(code, Prism.languages.javascript);
456
- * tokens.forEach(token => {
457
- * if (token instanceof Prism.Token && token.type === 'number') {
458
- * console.log(`Found numeric literal: ${token.content}`);
459
- * }
460
- * });
461
- */
462
- tokenize: function(n, r) {
463
- var s = r.rest;
464
- if (s) {
465
- for (var p in s)
466
- r[p] = s[p];
467
- delete r.rest;
468
- }
469
- var l = new b();
470
- return f(l, l.head, n), g(n, l, r, l.head, 0), w(l);
471
- },
472
- /**
473
- * @namespace
474
- * @memberof Prism
475
- * @public
476
- */
477
- hooks: {
478
- all: {},
479
- /**
480
- * Adds the given callback to the list of callbacks for the given hook.
481
- *
482
- * The callback will be invoked when the hook it is registered for is run.
483
- * Hooks are usually directly run by a highlight function but you can also run hooks yourself.
484
- *
485
- * One callback function can be registered to multiple hooks and the same hook multiple times.
486
- *
487
- * @param {string} name The name of the hook.
488
- * @param {HookCallback} callback The callback function which is given environment variables.
489
- * @public
490
- */
491
- add: function(n, r) {
492
- var s = c.hooks.all;
493
- s[n] = s[n] || [], s[n].push(r);
494
- },
495
- /**
496
- * Runs a hook invoking all registered callbacks with the given environment variables.
497
- *
498
- * Callbacks will be invoked synchronously and in the order in which they were registered.
499
- *
500
- * @param {string} name The name of the hook.
501
- * @param {Object<string, any>} env The environment variables of the hook passed to all callbacks registered.
502
- * @public
503
- */
504
- run: function(n, r) {
505
- var s = c.hooks.all[n];
506
- if (!(!s || !s.length))
507
- for (var p = 0, l; l = s[p++]; )
508
- l(r);
509
- }
510
- },
511
- Token: h
512
- };
513
- function h(n, r, s, p) {
514
- this.type = n, this.content = r, this.alias = s, this.length = (p || "").length | 0;
515
- }
516
- h.stringify = function n(r, s) {
517
- if (typeof r == "string")
518
- return r;
519
- if (Array.isArray(r)) {
520
- var p = "";
521
- return r.forEach(function(x) {
522
- p += n(x, s);
523
- }), p;
524
- }
525
- var l = {
526
- type: r.type,
527
- content: n(r.content, s),
528
- tag: "span",
529
- classes: ["token", r.type],
530
- attributes: {},
531
- language: s
532
- }, y = r.alias;
533
- y && (Array.isArray(y) ? Array.prototype.push.apply(l.classes, y) : l.classes.push(y)), c.hooks.run("wrap", l);
534
- var E = "";
535
- for (var k in l.attributes)
536
- E += " " + k + '="' + (l.attributes[k] || "").replace(/"/g, "&quot;") + '"';
537
- return "<" + l.tag + ' class="' + l.classes.join(" ") + '"' + E + ">" + l.content + "</" + l.tag + ">";
538
- };
539
- function u(n, r, s, p) {
540
- n.lastIndex = r;
541
- var l = n.exec(s);
542
- if (l && p && l[1]) {
543
- var y = l[1].length;
544
- l.index += y, l[0] = l[0].slice(y);
545
- }
546
- return l;
547
- }
548
- function g(n, r, s, p, l, y) {
549
- for (var E in s)
550
- if (!(!s.hasOwnProperty(E) || !s[E])) {
551
- var k = s[E];
552
- k = Array.isArray(k) ? k : [k];
553
- for (var x = 0; x < k.length; ++x) {
554
- if (y && y.cause == E + "," + x)
555
- return;
556
- var S = k[x], F = S.inside, A = !!S.lookbehind, N = !!S.greedy, T = S.alias;
557
- if (N && !S.pattern.global) {
558
- var O = S.pattern.toString().match(/[imsuy]*$/)[0];
559
- S.pattern = RegExp(S.pattern.source, O + "g");
560
- }
561
- for (var te = S.pattern || S, R = p.next, D = l; R !== r.tail && !(y && D >= y.reach); D += R.value.length, R = R.next) {
562
- var P = R.value;
563
- if (r.length > n.length)
564
- return;
565
- if (!(P instanceof h)) {
566
- var z = 1, C;
567
- if (N) {
568
- if (C = u(te, D, n, A), !C || C.index >= n.length)
569
- break;
570
- var M = C.index, be = C.index + C[0].length, $ = D;
571
- for ($ += R.value.length; M >= $; )
572
- R = R.next, $ += R.value.length;
573
- if ($ -= R.value.length, D = $, R.value instanceof h)
574
- continue;
575
- for (var j = R; j !== r.tail && ($ < be || typeof j.value == "string"); j = j.next)
576
- z++, $ += j.value.length;
577
- z--, P = n.slice(D, $), C.index -= D;
578
- } else if (C = u(te, 0, P, A), !C)
579
- continue;
580
- var M = C.index, U = C[0], H = P.slice(0, M), ae = P.slice(M + U.length), Y = D + P.length;
581
- y && Y > y.reach && (y.reach = Y);
582
- var G = R.prev;
583
- H && (G = f(r, G, H), D += H.length), v(r, G, z);
584
- var me = new h(E, F ? c.tokenize(U, F) : U, T, U);
585
- if (R = f(r, G, me), ae && f(r, R, ae), z > 1) {
586
- var K = {
587
- cause: E + "," + x,
588
- reach: Y
589
- };
590
- g(n, r, s, R.prev, D, K), y && K.reach > y.reach && (y.reach = K.reach);
591
- }
592
- }
593
- }
594
- }
595
- }
596
- }
597
- function b() {
598
- var n = { value: null, prev: null, next: null }, r = { value: null, prev: n, next: null };
599
- n.next = r, this.head = n, this.tail = r, this.length = 0;
600
- }
601
- function f(n, r, s) {
602
- var p = r.next, l = { value: s, prev: r, next: p };
603
- return r.next = l, p.prev = l, n.length++, l;
604
- }
605
- function v(n, r, s) {
606
- for (var p = r.next, l = 0; l < s && p !== n.tail; l++)
607
- p = p.next;
608
- r.next = p, p.prev = r, n.length -= l;
609
- }
610
- function w(n) {
611
- for (var r = [], s = n.head.next; s !== n.tail; )
612
- r.push(s.value), s = s.next;
613
- return r;
614
- }
615
- return c;
616
- }();
617
- t.exports = a, a.default = a;
618
- }
619
- }), o = ze(Me());
620
- 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) {
621
- e.type === "entity" && (e.attributes.title = e.content.replace(/&amp;/, "&"));
622
- }), Object.defineProperty(o.languages.markup.tag, "addInlined", { value: function(e, i) {
623
- var a = {}, a = (a["language-" + i] = { pattern: /(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i, lookbehind: !0, inside: o.languages[i] }, a.cdata = /^<!\[CDATA\[|\]\]>$/i, { "included-cdata": { pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i, inside: a } }), i = (a["language-" + i] = { pattern: /[\s\S]+/, inside: o.languages[i] }, {});
624
- i[e] = { pattern: RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g, function() {
625
- return e;
626
- }), "i"), lookbehind: !0, greedy: !0, inside: a }, o.languages.insertBefore("markup", "cdata", i);
627
- } }), Object.defineProperty(o.languages.markup.tag, "addAttribute", { value: function(e, t) {
628
- 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" }, /"|'/] } } } });
629
- } }), 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) {
630
- var t = { pattern: /\\[\\(){}[\]^$+*?|.]/, alias: "escape" }, a = /\\(?: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 = "(?:[^\\\\-]|" + a.source + ")", i = RegExp(i + "-" + i), d = { pattern: /(<|')[^<>']+(?=[>']$)/, lookbehind: !0, alias: "variable" };
631
- 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: a, "range-punctuation": { pattern: /-/, alias: "operator" } } }, "special-escape": t, "char-set": { pattern: /\\[wsd]|\\p\{[^{}]+\}/i, alias: "class-name" }, escape: a } }, "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": d } }], anchor: { pattern: /[$^]|\\[ABbGZz]/, alias: "function" }, escape: a, group: [{ pattern: /\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/, alias: "punctuation", inside: { "group-name": d } }, { pattern: /\)/, alias: "punctuation" }], quantifier: { pattern: /(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/, alias: "number" }, alternation: { pattern: /\|/, alias: "keyword" } };
632
- }(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) {
633
- var t = /#(?!\{).+/, a = { pattern: /#\{[^}]+\}/, alias: "variable" };
634
- e.languages.coffeescript = e.languages.extend("javascript", { comment: t, string: [{ pattern: /'(?:\\[\s\S]|[^\\'])*'/, greedy: !0 }, { pattern: /"(?:\\[\s\S]|[^\\"])*"/, greedy: !0, inside: { interpolation: a } }], 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: a } } }), 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: a } }] }), e.languages.insertBefore("coffeescript", "keyword", { property: /(?!\d)\w+(?=\s*:(?!:))/ }), delete e.languages.coffeescript["template-string"], e.languages.coffee = e.languages.coffeescript;
635
- }(o), function(e) {
636
- 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: /[{}]/ };
637
- Object.defineProperty(t, "addSupport", { value: function(a, i) {
638
- (a = typeof a == "string" ? [a] : a).forEach(function(d) {
639
- var m = function(f) {
640
- f.inside || (f.inside = {}), f.inside.rest = i;
641
- }, c = "doc-comment";
642
- if (h = e.languages[d]) {
643
- var h, u = h[c];
644
- if ((u = u || (h = e.languages.insertBefore(d, "comment", { "doc-comment": { pattern: /(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/, lookbehind: !0, alias: "comment" } }))[c]) instanceof RegExp && (u = h[c] = { pattern: u }), Array.isArray(u))
645
- for (var g = 0, b = u.length; g < b; g++)
646
- u[g] instanceof RegExp && (u[g] = { pattern: u[g] }), m(u[g]);
647
- else
648
- m(u);
649
- }
650
- });
651
- } }), t.addSupport(["java", "javascript", "php"], t);
652
- }(o), function(e) {
653
- 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);
654
- t && (t.tag.addInlined("style", "css"), t.tag.addAttribute("style", "css"));
655
- }(o), function(e) {
656
- 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 }), a = { pattern: /(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/, lookbehind: !0 };
657
- 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: a, function: /[\w-]+(?=\()/, punctuation: /[(),]/ } }], entity: /\\[\da-f]{1,8}/i, unit: t, number: a });
658
- }(o), function(e) {
659
- var t = /[*&][^\s[\]{},]+/, a = /!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/, i = "(?:" + a.source + "(?:[ ]+" + t.source + ")?|" + t.source + "(?:[ ]+" + a.source + ")?)", d = /(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g, function() {
660
- return /[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source;
661
- }), m = /"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;
662
- function c(h, u) {
663
- u = (u || "").replace(/m/g, "") + "m";
664
- var g = /([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g, function() {
665
- return i;
666
- }).replace(/<<value>>/g, function() {
667
- return h;
668
- });
669
- return RegExp(g, u);
670
- }
671
- 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() {
672
- return i;
673
- })), lookbehind: !0, alias: "string" }, comment: /#.*/, key: { pattern: RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g, function() {
674
- return i;
675
- }).replace(/<<key>>/g, function() {
676
- return "(?:" + d + "|" + m + ")";
677
- })), lookbehind: !0, greedy: !0, alias: "atrule" }, directive: { pattern: /(^[ \t]*)%.+/m, lookbehind: !0, alias: "important" }, datetime: { pattern: c(/\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: c(/false|true/.source, "i"), lookbehind: !0, alias: "important" }, null: { pattern: c(/null|~/.source, "i"), lookbehind: !0, alias: "important" }, string: { pattern: c(m), lookbehind: !0, greedy: !0 }, number: { pattern: c(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source, "i"), lookbehind: !0 }, tag: a, important: t, punctuation: /---|[:[\]{}\-,|>?]|\.\.\./ }, e.languages.yml = e.languages.yaml;
678
- }(o), function(e) {
679
- var t = /(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;
680
- function a(g) {
681
- return g = g.replace(/<inner>/g, function() {
682
- return t;
683
- }), RegExp(/((?:^|[^\\])(?:\\{2})*)/.source + "(?:" + g + ")");
684
- }
685
- var i = /(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source, d = /\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g, function() {
686
- return i;
687
- }), m = /\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source, c = (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("^" + d + m + "(?:" + d + ")*", "m"), inside: { "table-data-rows": { pattern: RegExp("^(" + d + m + ")(?:" + d + ")*$"), lookbehind: !0, inside: { "table-data": { pattern: RegExp(i), inside: e.languages.markdown }, punctuation: /\|/ } }, "table-line": { pattern: RegExp("^(" + d + ")" + m + "$"), lookbehind: !0, inside: { punctuation: /\||:?-{3,}:?/ } }, "table-header-row": { pattern: RegExp("^" + d + "$"), 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: a(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source), lookbehind: !0, greedy: !0, inside: { content: { pattern: /(^..)[\s\S]+(?=..$)/, lookbehind: !0, inside: {} }, punctuation: /\*\*|__/ } }, italic: { pattern: a(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source), lookbehind: !0, greedy: !0, inside: { content: { pattern: /(^.)[\s\S]+(?=.$)/, lookbehind: !0, inside: {} }, punctuation: /[*_]/ } }, strike: { pattern: a(/(~~?)(?:(?!~)<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: a(/!?\[(?:(?!\])<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) {
688
- ["url", "bold", "italic", "strike", "code-snippet"].forEach(function(b) {
689
- g !== b && (e.languages.markdown[g].inside.content.inside[b] = e.languages.markdown[b]);
690
- });
691
- }), e.hooks.add("after-tokenize", function(g) {
692
- g.language !== "markdown" && g.language !== "md" || function b(f) {
693
- if (f && typeof f != "string")
694
- for (var v = 0, w = f.length; v < w; v++) {
695
- var n, r = f[v];
696
- r.type !== "code" ? b(r.content) : (n = r.content[1], r = r.content[3], n && r && n.type === "code-language" && r.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()), r.alias ? typeof r.alias == "string" ? r.alias = [r.alias, n] : r.alias.push(n) : r.alias = [n]));
697
- }
698
- }(g.tokens);
699
- }), e.hooks.add("wrap", function(g) {
700
- if (g.type === "code-block") {
701
- for (var b = "", f = 0, v = g.classes.length; f < v; f++) {
702
- var w = g.classes[f], w = /language-(.+)/.exec(w);
703
- if (w) {
704
- b = w[1];
705
- break;
706
- }
707
- }
708
- var n, r = e.languages[b];
709
- r ? g.content = e.highlight(function(s) {
710
- return s = s.replace(c, ""), s = s.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi, function(p, l) {
711
- var y;
712
- return (l = l.toLowerCase())[0] === "#" ? (y = l[1] === "x" ? parseInt(l.slice(2), 16) : Number(l.slice(1)), u(y)) : h[l] || p;
713
- });
714
- }(g.content), r, 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() {
715
- var s = document.getElementById(n);
716
- s && (s.innerHTML = e.highlight(s.textContent, e.languages[b], b));
717
- }));
718
- }
719
- }), RegExp(e.languages.markup.tag.pattern.source, "gi")), h = { amp: "&", lt: "<", gt: ">", quot: '"' }, u = String.fromCodePoint || String.fromCharCode;
720
- e.languages.md = e.languages.markdown;
721
- }(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) {
722
- if (e.language === "graphql")
723
- for (var t = e.tokens.filter(function(n) {
724
- return typeof n != "string" && n.type !== "comment" && n.type !== "scalar";
725
- }), a = 0; a < t.length; ) {
726
- var i = t[a++];
727
- if (i.type === "keyword" && i.content === "mutation") {
728
- var d = [];
729
- if (f(["definition-mutation", "punctuation"]) && b(1).content === "(") {
730
- a += 2;
731
- var m = v(/^\($/, /^\)$/);
732
- if (m === -1)
733
- continue;
734
- for (; a < m; a++) {
735
- var c = b(0);
736
- c.type === "variable" && (w(c, "variable-input"), d.push(c.content));
737
- }
738
- a = m + 1;
739
- }
740
- if (f(["punctuation", "property-query"]) && b(0).content === "{" && (a++, w(b(0), "property-mutation"), 0 < d.length)) {
741
- var h = v(/^\{$/, /^\}$/);
742
- if (h !== -1)
743
- for (var u = a; u < h; u++) {
744
- var g = t[u];
745
- g.type === "variable" && 0 <= d.indexOf(g.content) && w(g, "variable-input");
746
- }
747
- }
748
- }
749
- }
750
- function b(n) {
751
- return t[a + n];
752
- }
753
- function f(n, r) {
754
- r = r || 0;
755
- for (var s = 0; s < n.length; s++) {
756
- var p = b(s + r);
757
- if (!p || p.type !== n[s])
758
- return;
759
- }
760
- return 1;
761
- }
762
- function v(n, r) {
763
- for (var s = 1, p = a; p < t.length; p++) {
764
- var l = t[p], y = l.content;
765
- if (l.type === "punctuation" && typeof y == "string") {
766
- if (n.test(y))
767
- s++;
768
- else if (r.test(y) && --s === 0)
769
- return p;
770
- }
771
- }
772
- return -1;
773
- }
774
- function w(n, r) {
775
- var s = n.alias;
776
- s ? Array.isArray(s) || (n.alias = s = [s]) : n.alias = s = [], s.push(r);
777
- }
778
- }), 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) {
779
- var t = e.languages.javascript["template-string"], a = t.pattern.source, i = t.inside.interpolation, d = i.inside["interpolation-punctuation"], m = i.pattern.source;
780
- function c(f, v) {
781
- if (e.languages[f])
782
- return { pattern: RegExp("((?:" + v + ")\\s*)" + a), lookbehind: !0, greedy: !0, inside: { "template-punctuation": { pattern: /^`|`$/, alias: "string" }, "embedded-code": { pattern: /[\s\S]+/, alias: f } } };
783
- }
784
- function h(f, v, w) {
785
- return f = { code: f, grammar: v, language: w }, e.hooks.run("before-tokenize", f), f.tokens = e.tokenize(f.code, f.grammar), e.hooks.run("after-tokenize", f), f.tokens;
786
- }
787
- function u(f, v, w) {
788
- var s = e.tokenize(f, { interpolation: { pattern: RegExp(m), lookbehind: !0 } }), n = 0, r = {}, s = h(s.map(function(l) {
789
- if (typeof l == "string")
790
- return l;
791
- for (var y, E, l = l.content; f.indexOf((E = n++, y = "___" + w.toUpperCase() + "_" + E + "___")) !== -1; )
792
- ;
793
- return r[y] = l, y;
794
- }).join(""), v, w), p = Object.keys(r);
795
- return n = 0, function l(y) {
796
- for (var E = 0; E < y.length; E++) {
797
- if (n >= p.length)
798
- return;
799
- var k, x, S, F, A, N, T, O = y[E];
800
- typeof O == "string" || typeof O.content == "string" ? (k = p[n], (T = (N = typeof O == "string" ? O : O.content).indexOf(k)) !== -1 && (++n, x = N.substring(0, T), A = r[k], S = void 0, (F = {})["interpolation-punctuation"] = d, (F = e.tokenize(A, F)).length === 3 && ((S = [1, 1]).push.apply(S, h(F[1], e.languages.javascript, "javascript")), F.splice.apply(F, S)), S = new e.Token("interpolation", F, i.alias, A), F = N.substring(T + k.length), A = [], x && A.push(x), A.push(S), F && (l(N = [F]), A.push.apply(A, N)), typeof O == "string" ? (y.splice.apply(y, [E, 1].concat(A)), E += A.length - 1) : O.content = A)) : (T = O.content, Array.isArray(T) ? l(T) : l([T]));
801
- }
802
- }(s), new e.Token(w, s, "language-" + w, f);
803
- }
804
- e.languages.javascript["template-string"] = [c("css", /\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source), c("html", /\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source), c("svg", /\bsvg/.source), c("markdown", /\b(?:markdown|md)/.source), c("graphql", /\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source), c("sql", /\bsql/.source), t].filter(Boolean);
805
- var g = { javascript: !0, js: !0, typescript: !0, ts: !0, jsx: !0, tsx: !0 };
806
- function b(f) {
807
- return typeof f == "string" ? f : Array.isArray(f) ? f.map(b).join("") : b(f.content);
808
- }
809
- e.hooks.add("after-tokenize", function(f) {
810
- f.language in g && function v(w) {
811
- for (var n = 0, r = w.length; n < r; n++) {
812
- var s, p, l, y = w[n];
813
- typeof y != "string" && (s = y.content, Array.isArray(s) ? y.type === "template-string" ? (y = s[1], s.length === 3 && typeof y != "string" && y.type === "embedded-code" && (p = b(y), y = y.alias, y = Array.isArray(y) ? y[0] : y, l = e.languages[y]) && (s[1] = u(p, l, y))) : v(s) : typeof s != "string" && v([s]));
814
- }
815
- }(f.tokens);
816
- });
817
- }(o), function(e) {
818
- 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"];
819
- var t = e.languages.extend("typescript", {});
820
- 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;
821
- }(o), function(e) {
822
- var t = e.languages.javascript, a = /\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})+\}/.source, i = "(@(?:arg|argument|param|property)\\s+(?:" + a + "\\s+)?)";
823
- 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() {
824
- return a;
825
- })), lookbehind: !0, inside: { punctuation: /\./ } }, { pattern: RegExp("(@[a-z]+\\s+)" + a), 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);
826
- }(o), function(e) {
827
- 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 });
828
- }(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) {
829
- function t(c, h) {
830
- return RegExp(c.replace(/<ID>/g, function() {
831
- return /(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source;
832
- }), h);
833
- }
834
- 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" } });
835
- for (var a = ["function", "function-variable", "method", "method-variable", "property-access"], i = 0; i < a.length; i++) {
836
- var m = a[i], d = e.languages.javascript[m], m = (d = e.util.type(d) === "RegExp" ? e.languages.javascript[m] = { pattern: d } : d).inside || {};
837
- (d.inside = m)["maybe-class-name"] = /^[A-Z][\s\S]*/;
838
- }
839
- }(o), function(e) {
840
- var t = e.util.clone(e.languages.javascript), a = /(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source, i = /(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source, d = /(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;
841
- function m(u, g) {
842
- return u = u.replace(/<S>/g, function() {
843
- return a;
844
- }).replace(/<BRACES>/g, function() {
845
- return i;
846
- }).replace(/<SPREAD>/g, function() {
847
- return d;
848
- }), RegExp(u, g);
849
- }
850
- d = m(d).source, e.languages.jsx = e.languages.extend("markup", t), e.languages.jsx.tag.pattern = m(/<\/?(?:[\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: m(/<SPREAD>/.source), inside: e.languages.jsx } }, e.languages.jsx.tag), e.languages.insertBefore("inside", "special-attr", { script: { pattern: m(/=<BRACES>/.source), alias: "language-javascript", inside: { "script-punctuation": { pattern: /^=(?=\{)/, alias: "punctuation" }, rest: e.languages.jsx } } }, e.languages.jsx.tag);
851
- function c(u) {
852
- for (var g = [], b = 0; b < u.length; b++) {
853
- var f = u[b], v = !1;
854
- typeof f != "string" && (f.type === "tag" && f.content[0] && f.content[0].type === "tag" ? f.content[0].content[0].content === "</" ? 0 < g.length && g[g.length - 1].tagName === h(f.content[0].content[1]) && g.pop() : f.content[f.content.length - 1].content !== "/>" && g.push({ tagName: h(f.content[0].content[1]), openedBraces: 0 }) : 0 < g.length && f.type === "punctuation" && f.content === "{" ? g[g.length - 1].openedBraces++ : 0 < g.length && 0 < g[g.length - 1].openedBraces && f.type === "punctuation" && f.content === "}" ? g[g.length - 1].openedBraces-- : v = !0), (v || typeof f == "string") && 0 < g.length && g[g.length - 1].openedBraces === 0 && (v = h(f), b < u.length - 1 && (typeof u[b + 1] == "string" || u[b + 1].type === "plain-text") && (v += h(u[b + 1]), u.splice(b + 1, 1)), 0 < b && (typeof u[b - 1] == "string" || u[b - 1].type === "plain-text") && (v = h(u[b - 1]) + v, u.splice(b - 1, 1), b--), u[b] = new e.Token("plain-text", v, null, v)), f.content && typeof f.content != "string" && c(f.content);
855
- }
856
- }
857
- var h = function(u) {
858
- return u ? typeof u == "string" ? u : typeof u.content == "string" ? u.content : u.content.map(h).join("") : "";
859
- };
860
- e.hooks.add("after-tokenize", function(u) {
861
- u.language !== "jsx" && u.language !== "tsx" || c(u.tokens);
862
- });
863
- }(o), function(e) {
864
- 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);
865
- t.pattern = RegExp(/(^|[^\w$]|(?=<\/))/.source + "(?:" + t.pattern.source + ")", t.pattern.flags), t.lookbehind = !0;
866
- }(o), o.languages.swift = { comment: { pattern: /(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/, lookbehind: !0, greedy: !0 }, "string-literal": [{ pattern: RegExp(/(^|[^"#])/.source + "(?:" + /"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source + "|" + /"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source + ")" + /(?!["#])/.source), lookbehind: !0, greedy: !0, inside: { interpolation: { pattern: /(\\\()(?:[^()]|\([^()]*\))*(?=\))/, lookbehind: !0, inside: null }, "interpolation-punctuation": { pattern: /^\)|\\\($/, alias: "punctuation" }, punctuation: /\\(?=[\r\n])/, string: /[\s\S]+/ } }, { pattern: RegExp(/(^|[^"#])(#+)/.source + "(?:" + /"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source + "|" + /"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source + ")\\2"), lookbehind: !0, greedy: !0, inside: { interpolation: { pattern: /(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/, lookbehind: !0, inside: null }, "interpolation-punctuation": { pattern: /^\)|\\#+\($/, alias: "punctuation" }, string: /[\s\S]+/ } }], directive: { pattern: RegExp(/#/.source + "(?:" + /(?:elseif|if)\b/.source + "(?:[ ]*" + /(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source + ")+|" + /(?:else|endif)\b/.source + ")"), alias: "property", inside: { "directive-name": /^#\w+/, boolean: /\b(?:false|true)\b/, number: /\b\d+(?:\.\d+)*\b/, operator: /!|&&|\|\||[<>]=?/, punctuation: /[(),]/ } }, literal: { pattern: /#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/, alias: "constant" }, "other-directive": { pattern: /#\w+\b/, alias: "property" }, attribute: { pattern: /@\w+/, alias: "atrule" }, "function-definition": { pattern: /(\bfunc\s+)\w+/, lookbehind: !0, alias: "function" }, label: { pattern: /\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/, lookbehind: !0, alias: "important" }, keyword: /\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/, boolean: /\b(?:false|true)\b/, nil: { pattern: /\bnil\b/, alias: "constant" }, "short-argument": /\$\d+\b/, omit: { pattern: /\b_\b/, alias: "keyword" }, number: /\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i, "class-name": /\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/, function: /\b[a-z_]\w*(?=\s*\()/i, constant: /\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/, operator: /[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/, punctuation: /[{}[\]();,.:\\]/ }, o.languages.swift["string-literal"].forEach(function(e) {
867
- e.inside.interpolation.inside = o.languages.swift;
868
- }), function(e) {
869
- e.languages.kotlin = e.languages.extend("clike", { keyword: { pattern: /(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/, lookbehind: !0 }, function: [{ pattern: /(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/, greedy: !0 }, { pattern: /(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/, lookbehind: !0, greedy: !0 }], number: /\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/, operator: /\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/ }), delete e.languages.kotlin["class-name"];
870
- var t = { "interpolation-punctuation": { pattern: /^\$\{?|\}$/, alias: "punctuation" }, expression: { pattern: /[\s\S]+/, inside: e.languages.kotlin } };
871
- 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;
872
- }(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) {
873
- for (var t = /\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source, a = 0; a < 2; a++)
874
- t = t.replace(/<self>/g, function() {
875
- return t;
876
- });
877
- t = t.replace(/<self>/g, function() {
878
- return /[^\s\S]/.source;
879
- }), 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;
880
- }(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) {
881
- 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/, a = /\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g, function() {
882
- return t.source;
883
- });
884
- 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() {
885
- return t.source;
886
- })), 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() {
887
- return a;
888
- }) + ")"), 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"]);
889
- }(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: /![sra](?=[:}]$)/, 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;
890
- var Q = {};
891
- Pe(Q, {
892
- dracula: () => Ge,
893
- duotoneDark: () => We,
894
- duotoneLight: () => He,
895
- github: () => Ke,
896
- gruvboxMaterialDark: () => St,
897
- gruvboxMaterialLight: () => _t,
898
- jettwaveDark: () => bt,
899
- jettwaveLight: () => ht,
900
- nightOwl: () => Xe,
901
- nightOwlLight: () => Je,
902
- oceanicNext: () => tt,
903
- okaidia: () => nt,
904
- oneDark: () => kt,
905
- oneLight: () => Et,
906
- palenight: () => ot,
907
- shadesOfPurple: () => lt,
908
- synthwave84: () => ut,
909
- ultramin: () => pt,
910
- vsDark: () => fe,
911
- vsLight: () => yt
912
- });
913
- var Ue = {
914
- plain: {
915
- color: "#F8F8F2",
916
- backgroundColor: "#282A36"
917
- },
918
- styles: [
919
- {
920
- types: ["prolog", "constant", "builtin"],
921
- style: {
922
- color: "rgb(189, 147, 249)"
923
- }
924
- },
925
- {
926
- types: ["inserted", "function"],
927
- style: {
928
- color: "rgb(80, 250, 123)"
929
- }
930
- },
931
- {
932
- types: ["deleted"],
933
- style: {
934
- color: "rgb(255, 85, 85)"
935
- }
936
- },
937
- {
938
- types: ["changed"],
939
- style: {
940
- color: "rgb(255, 184, 108)"
941
- }
942
- },
943
- {
944
- types: ["punctuation", "symbol"],
945
- style: {
946
- color: "rgb(248, 248, 242)"
947
- }
948
- },
949
- {
950
- types: ["string", "char", "tag", "selector"],
951
- style: {
952
- color: "rgb(255, 121, 198)"
953
- }
954
- },
955
- {
956
- types: ["keyword", "variable"],
957
- style: {
958
- color: "rgb(189, 147, 249)",
959
- fontStyle: "italic"
960
- }
961
- },
962
- {
963
- types: ["comment"],
964
- style: {
965
- color: "rgb(98, 114, 164)"
966
- }
967
- },
968
- {
969
- types: ["attr-name"],
970
- style: {
971
- color: "rgb(241, 250, 140)"
972
- }
973
- }
974
- ]
975
- }, Ge = Ue, Ze = {
976
- plain: {
977
- backgroundColor: "#2a2734",
978
- color: "#9a86fd"
979
- },
980
- styles: [
981
- {
982
- types: ["comment", "prolog", "doctype", "cdata", "punctuation"],
983
- style: {
984
- color: "#6c6783"
985
- }
986
- },
987
- {
988
- types: ["namespace"],
989
- style: {
990
- opacity: 0.7
991
- }
992
- },
993
- {
994
- types: ["tag", "operator", "number"],
995
- style: {
996
- color: "#e09142"
997
- }
998
- },
999
- {
1000
- types: ["property", "function"],
1001
- style: {
1002
- color: "#9a86fd"
1003
- }
1004
- },
1005
- {
1006
- types: ["tag-id", "selector", "atrule-id"],
1007
- style: {
1008
- color: "#eeebff"
1009
- }
1010
- },
1011
- {
1012
- types: ["attr-name"],
1013
- style: {
1014
- color: "#c4b9fe"
1015
- }
1016
- },
1017
- {
1018
- types: [
1019
- "boolean",
1020
- "string",
1021
- "entity",
1022
- "url",
1023
- "attr-value",
1024
- "keyword",
1025
- "control",
1026
- "directive",
1027
- "unit",
1028
- "statement",
1029
- "regex",
1030
- "atrule",
1031
- "placeholder",
1032
- "variable"
1033
- ],
1034
- style: {
1035
- color: "#ffcc99"
1036
- }
1037
- },
1038
- {
1039
- types: ["deleted"],
1040
- style: {
1041
- textDecorationLine: "line-through"
1042
- }
1043
- },
1044
- {
1045
- types: ["inserted"],
1046
- style: {
1047
- textDecorationLine: "underline"
1048
- }
1049
- },
1050
- {
1051
- types: ["italic"],
1052
- style: {
1053
- fontStyle: "italic"
1054
- }
1055
- },
1056
- {
1057
- types: ["important", "bold"],
1058
- style: {
1059
- fontWeight: "bold"
1060
- }
1061
- },
1062
- {
1063
- types: ["important"],
1064
- style: {
1065
- color: "#c4b9fe"
1066
- }
1067
- }
1068
- ]
1069
- }, We = Ze, qe = {
1070
- plain: {
1071
- backgroundColor: "#faf8f5",
1072
- color: "#728fcb"
1073
- },
1074
- styles: [
1075
- {
1076
- types: ["comment", "prolog", "doctype", "cdata", "punctuation"],
1077
- style: {
1078
- color: "#b6ad9a"
1079
- }
1080
- },
1081
- {
1082
- types: ["namespace"],
1083
- style: {
1084
- opacity: 0.7
1085
- }
1086
- },
1087
- {
1088
- types: ["tag", "operator", "number"],
1089
- style: {
1090
- color: "#063289"
1091
- }
1092
- },
1093
- {
1094
- types: ["property", "function"],
1095
- style: {
1096
- color: "#b29762"
1097
- }
1098
- },
1099
- {
1100
- types: ["tag-id", "selector", "atrule-id"],
1101
- style: {
1102
- color: "#2d2006"
1103
- }
1104
- },
1105
- {
1106
- types: ["attr-name"],
1107
- style: {
1108
- color: "#896724"
1109
- }
1110
- },
1111
- {
1112
- types: [
1113
- "boolean",
1114
- "string",
1115
- "entity",
1116
- "url",
1117
- "attr-value",
1118
- "keyword",
1119
- "control",
1120
- "directive",
1121
- "unit",
1122
- "statement",
1123
- "regex",
1124
- "atrule"
1125
- ],
1126
- style: {
1127
- color: "#728fcb"
1128
- }
1129
- },
1130
- {
1131
- types: ["placeholder", "variable"],
1132
- style: {
1133
- color: "#93abdc"
1134
- }
1135
- },
1136
- {
1137
- types: ["deleted"],
1138
- style: {
1139
- textDecorationLine: "line-through"
1140
- }
1141
- },
1142
- {
1143
- types: ["inserted"],
1144
- style: {
1145
- textDecorationLine: "underline"
1146
- }
1147
- },
1148
- {
1149
- types: ["italic"],
1150
- style: {
1151
- fontStyle: "italic"
1152
- }
1153
- },
1154
- {
1155
- types: ["important", "bold"],
1156
- style: {
1157
- fontWeight: "bold"
1158
- }
1159
- },
1160
- {
1161
- types: ["important"],
1162
- style: {
1163
- color: "#896724"
1164
- }
1165
- }
1166
- ]
1167
- }, He = qe, Ye = {
1168
- plain: {
1169
- color: "#393A34",
1170
- backgroundColor: "#f6f8fa"
1171
- },
1172
- styles: [
1173
- {
1174
- types: ["comment", "prolog", "doctype", "cdata"],
1175
- style: {
1176
- color: "#999988",
1177
- fontStyle: "italic"
1178
- }
1179
- },
1180
- {
1181
- types: ["namespace"],
1182
- style: {
1183
- opacity: 0.7
1184
- }
1185
- },
1186
- {
1187
- types: ["string", "attr-value"],
1188
- style: {
1189
- color: "#e3116c"
1190
- }
1191
- },
1192
- {
1193
- types: ["punctuation", "operator"],
1194
- style: {
1195
- color: "#393A34"
1196
- }
1197
- },
1198
- {
1199
- types: [
1200
- "entity",
1201
- "url",
1202
- "symbol",
1203
- "number",
1204
- "boolean",
1205
- "variable",
1206
- "constant",
1207
- "property",
1208
- "regex",
1209
- "inserted"
1210
- ],
1211
- style: {
1212
- color: "#36acaa"
1213
- }
1214
- },
1215
- {
1216
- types: ["atrule", "keyword", "attr-name", "selector"],
1217
- style: {
1218
- color: "#00a4db"
1219
- }
1220
- },
1221
- {
1222
- types: ["function", "deleted", "tag"],
1223
- style: {
1224
- color: "#d73a49"
1225
- }
1226
- },
1227
- {
1228
- types: ["function-variable"],
1229
- style: {
1230
- color: "#6f42c1"
1231
- }
1232
- },
1233
- {
1234
- types: ["tag", "selector", "keyword"],
1235
- style: {
1236
- color: "#00009f"
1237
- }
1238
- }
1239
- ]
1240
- }, Ke = Ye, Ve = {
1241
- plain: {
1242
- color: "#d6deeb",
1243
- backgroundColor: "#011627"
1244
- },
1245
- styles: [
1246
- {
1247
- types: ["changed"],
1248
- style: {
1249
- color: "rgb(162, 191, 252)",
1250
- fontStyle: "italic"
1251
- }
1252
- },
1253
- {
1254
- types: ["deleted"],
1255
- style: {
1256
- color: "rgba(239, 83, 80, 0.56)",
1257
- fontStyle: "italic"
1258
- }
1259
- },
1260
- {
1261
- types: ["inserted", "attr-name"],
1262
- style: {
1263
- color: "rgb(173, 219, 103)",
1264
- fontStyle: "italic"
1265
- }
1266
- },
1267
- {
1268
- types: ["comment"],
1269
- style: {
1270
- color: "rgb(99, 119, 119)",
1271
- fontStyle: "italic"
1272
- }
1273
- },
1274
- {
1275
- types: ["string", "url"],
1276
- style: {
1277
- color: "rgb(173, 219, 103)"
1278
- }
1279
- },
1280
- {
1281
- types: ["variable"],
1282
- style: {
1283
- color: "rgb(214, 222, 235)"
1284
- }
1285
- },
1286
- {
1287
- types: ["number"],
1288
- style: {
1289
- color: "rgb(247, 140, 108)"
1290
- }
1291
- },
1292
- {
1293
- types: ["builtin", "char", "constant", "function"],
1294
- style: {
1295
- color: "rgb(130, 170, 255)"
1296
- }
1297
- },
1298
- {
1299
- // This was manually added after the auto-generation
1300
- // so that punctuations are not italicised
1301
- types: ["punctuation"],
1302
- style: {
1303
- color: "rgb(199, 146, 234)"
1304
- }
1305
- },
1306
- {
1307
- types: ["selector", "doctype"],
1308
- style: {
1309
- color: "rgb(199, 146, 234)",
1310
- fontStyle: "italic"
1311
- }
1312
- },
1313
- {
1314
- types: ["class-name"],
1315
- style: {
1316
- color: "rgb(255, 203, 139)"
1317
- }
1318
- },
1319
- {
1320
- types: ["tag", "operator", "keyword"],
1321
- style: {
1322
- color: "rgb(127, 219, 202)"
1323
- }
1324
- },
1325
- {
1326
- types: ["boolean"],
1327
- style: {
1328
- color: "rgb(255, 88, 116)"
1329
- }
1330
- },
1331
- {
1332
- types: ["property"],
1333
- style: {
1334
- color: "rgb(128, 203, 196)"
1335
- }
1336
- },
1337
- {
1338
- types: ["namespace"],
1339
- style: {
1340
- color: "rgb(178, 204, 214)"
1341
- }
1342
- }
1343
- ]
1344
- }, Xe = Ve, Qe = {
1345
- plain: {
1346
- color: "#403f53",
1347
- backgroundColor: "#FBFBFB"
1348
- },
1349
- styles: [
1350
- {
1351
- types: ["changed"],
1352
- style: {
1353
- color: "rgb(162, 191, 252)",
1354
- fontStyle: "italic"
1355
- }
1356
- },
1357
- {
1358
- types: ["deleted"],
1359
- style: {
1360
- color: "rgba(239, 83, 80, 0.56)",
1361
- fontStyle: "italic"
1362
- }
1363
- },
1364
- {
1365
- types: ["inserted", "attr-name"],
1366
- style: {
1367
- color: "rgb(72, 118, 214)",
1368
- fontStyle: "italic"
1369
- }
1370
- },
1371
- {
1372
- types: ["comment"],
1373
- style: {
1374
- color: "rgb(152, 159, 177)",
1375
- fontStyle: "italic"
1376
- }
1377
- },
1378
- {
1379
- types: ["string", "builtin", "char", "constant", "url"],
1380
- style: {
1381
- color: "rgb(72, 118, 214)"
1382
- }
1383
- },
1384
- {
1385
- types: ["variable"],
1386
- style: {
1387
- color: "rgb(201, 103, 101)"
1388
- }
1389
- },
1390
- {
1391
- types: ["number"],
1392
- style: {
1393
- color: "rgb(170, 9, 130)"
1394
- }
1395
- },
1396
- {
1397
- // This was manually added after the auto-generation
1398
- // so that punctuations are not italicised
1399
- types: ["punctuation"],
1400
- style: {
1401
- color: "rgb(153, 76, 195)"
1402
- }
1403
- },
1404
- {
1405
- types: ["function", "selector", "doctype"],
1406
- style: {
1407
- color: "rgb(153, 76, 195)",
1408
- fontStyle: "italic"
1409
- }
1410
- },
1411
- {
1412
- types: ["class-name"],
1413
- style: {
1414
- color: "rgb(17, 17, 17)"
1415
- }
1416
- },
1417
- {
1418
- types: ["tag"],
1419
- style: {
1420
- color: "rgb(153, 76, 195)"
1421
- }
1422
- },
1423
- {
1424
- types: ["operator", "property", "keyword", "namespace"],
1425
- style: {
1426
- color: "rgb(12, 150, 155)"
1427
- }
1428
- },
1429
- {
1430
- types: ["boolean"],
1431
- style: {
1432
- color: "rgb(188, 84, 84)"
1433
- }
1434
- }
1435
- ]
1436
- }, Je = Qe, L = {
1437
- char: "#D8DEE9",
1438
- comment: "#999999",
1439
- keyword: "#c5a5c5",
1440
- primitive: "#5a9bcf",
1441
- string: "#8dc891",
1442
- variable: "#d7deea",
1443
- boolean: "#ff8b50",
1444
- tag: "#fc929e",
1445
- function: "#79b6f2",
1446
- className: "#FAC863"
1447
- }, et = {
1448
- plain: {
1449
- backgroundColor: "#282c34",
1450
- color: "#ffffff"
1451
- },
1452
- styles: [
1453
- {
1454
- types: ["attr-name"],
1455
- style: {
1456
- color: L.keyword
1457
- }
1458
- },
1459
- {
1460
- types: ["attr-value"],
1461
- style: {
1462
- color: L.string
1463
- }
1464
- },
1465
- {
1466
- types: [
1467
- "comment",
1468
- "block-comment",
1469
- "prolog",
1470
- "doctype",
1471
- "cdata",
1472
- "shebang"
1473
- ],
1474
- style: {
1475
- color: L.comment
1476
- }
1477
- },
1478
- {
1479
- types: [
1480
- "property",
1481
- "number",
1482
- "function-name",
1483
- "constant",
1484
- "symbol",
1485
- "deleted"
1486
- ],
1487
- style: {
1488
- color: L.primitive
1489
- }
1490
- },
1491
- {
1492
- types: ["boolean"],
1493
- style: {
1494
- color: L.boolean
1495
- }
1496
- },
1497
- {
1498
- types: ["tag"],
1499
- style: {
1500
- color: L.tag
1501
- }
1502
- },
1503
- {
1504
- types: ["string"],
1505
- style: {
1506
- color: L.string
1507
- }
1508
- },
1509
- {
1510
- types: ["punctuation"],
1511
- style: {
1512
- color: L.string
1513
- }
1514
- },
1515
- {
1516
- types: ["selector", "char", "builtin", "inserted"],
1517
- style: {
1518
- color: L.char
1519
- }
1520
- },
1521
- {
1522
- types: ["function"],
1523
- style: {
1524
- color: L.function
1525
- }
1526
- },
1527
- {
1528
- types: ["operator", "entity", "url", "variable"],
1529
- style: {
1530
- color: L.variable
1531
- }
1532
- },
1533
- {
1534
- types: ["keyword"],
1535
- style: {
1536
- color: L.keyword
1537
- }
1538
- },
1539
- {
1540
- types: ["atrule", "class-name"],
1541
- style: {
1542
- color: L.className
1543
- }
1544
- },
1545
- {
1546
- types: ["important"],
1547
- style: {
1548
- fontWeight: "400"
1549
- }
1550
- },
1551
- {
1552
- types: ["bold"],
1553
- style: {
1554
- fontWeight: "bold"
1555
- }
1556
- },
1557
- {
1558
- types: ["italic"],
1559
- style: {
1560
- fontStyle: "italic"
1561
- }
1562
- },
1563
- {
1564
- types: ["namespace"],
1565
- style: {
1566
- opacity: 0.7
1567
- }
1568
- }
1569
- ]
1570
- }, tt = et, at = {
1571
- plain: {
1572
- color: "#f8f8f2",
1573
- backgroundColor: "#272822"
1574
- },
1575
- styles: [
1576
- {
1577
- types: ["changed"],
1578
- style: {
1579
- color: "rgb(162, 191, 252)",
1580
- fontStyle: "italic"
1581
- }
1582
- },
1583
- {
1584
- types: ["deleted"],
1585
- style: {
1586
- color: "#f92672",
1587
- fontStyle: "italic"
1588
- }
1589
- },
1590
- {
1591
- types: ["inserted"],
1592
- style: {
1593
- color: "rgb(173, 219, 103)",
1594
- fontStyle: "italic"
1595
- }
1596
- },
1597
- {
1598
- types: ["comment"],
1599
- style: {
1600
- color: "#8292a2",
1601
- fontStyle: "italic"
1602
- }
1603
- },
1604
- {
1605
- types: ["string", "url"],
1606
- style: {
1607
- color: "#a6e22e"
1608
- }
1609
- },
1610
- {
1611
- types: ["variable"],
1612
- style: {
1613
- color: "#f8f8f2"
1614
- }
1615
- },
1616
- {
1617
- types: ["number"],
1618
- style: {
1619
- color: "#ae81ff"
1620
- }
1621
- },
1622
- {
1623
- types: ["builtin", "char", "constant", "function", "class-name"],
1624
- style: {
1625
- color: "#e6db74"
1626
- }
1627
- },
1628
- {
1629
- types: ["punctuation"],
1630
- style: {
1631
- color: "#f8f8f2"
1632
- }
1633
- },
1634
- {
1635
- types: ["selector", "doctype"],
1636
- style: {
1637
- color: "#a6e22e",
1638
- fontStyle: "italic"
1639
- }
1640
- },
1641
- {
1642
- types: ["tag", "operator", "keyword"],
1643
- style: {
1644
- color: "#66d9ef"
1645
- }
1646
- },
1647
- {
1648
- types: ["boolean"],
1649
- style: {
1650
- color: "#ae81ff"
1651
- }
1652
- },
1653
- {
1654
- types: ["namespace"],
1655
- style: {
1656
- color: "rgb(178, 204, 214)",
1657
- opacity: 0.7
1658
- }
1659
- },
1660
- {
1661
- types: ["tag", "property"],
1662
- style: {
1663
- color: "#f92672"
1664
- }
1665
- },
1666
- {
1667
- types: ["attr-name"],
1668
- style: {
1669
- color: "#a6e22e !important"
1670
- }
1671
- },
1672
- {
1673
- types: ["doctype"],
1674
- style: {
1675
- color: "#8292a2"
1676
- }
1677
- },
1678
- {
1679
- types: ["rule"],
1680
- style: {
1681
- color: "#e6db74"
1682
- }
1683
- }
1684
- ]
1685
- }, nt = at, rt = {
1686
- plain: {
1687
- color: "#bfc7d5",
1688
- backgroundColor: "#292d3e"
1689
- },
1690
- styles: [
1691
- {
1692
- types: ["comment"],
1693
- style: {
1694
- color: "rgb(105, 112, 152)",
1695
- fontStyle: "italic"
1696
- }
1697
- },
1698
- {
1699
- types: ["string", "inserted"],
1700
- style: {
1701
- color: "rgb(195, 232, 141)"
1702
- }
1703
- },
1704
- {
1705
- types: ["number"],
1706
- style: {
1707
- color: "rgb(247, 140, 108)"
1708
- }
1709
- },
1710
- {
1711
- types: ["builtin", "char", "constant", "function"],
1712
- style: {
1713
- color: "rgb(130, 170, 255)"
1714
- }
1715
- },
1716
- {
1717
- types: ["punctuation", "selector"],
1718
- style: {
1719
- color: "rgb(199, 146, 234)"
1720
- }
1721
- },
1722
- {
1723
- types: ["variable"],
1724
- style: {
1725
- color: "rgb(191, 199, 213)"
1726
- }
1727
- },
1728
- {
1729
- types: ["class-name", "attr-name"],
1730
- style: {
1731
- color: "rgb(255, 203, 107)"
1732
- }
1733
- },
1734
- {
1735
- types: ["tag", "deleted"],
1736
- style: {
1737
- color: "rgb(255, 85, 114)"
1738
- }
1739
- },
1740
- {
1741
- types: ["operator"],
1742
- style: {
1743
- color: "rgb(137, 221, 255)"
1744
- }
1745
- },
1746
- {
1747
- types: ["boolean"],
1748
- style: {
1749
- color: "rgb(255, 88, 116)"
1750
- }
1751
- },
1752
- {
1753
- types: ["keyword"],
1754
- style: {
1755
- fontStyle: "italic"
1756
- }
1757
- },
1758
- {
1759
- types: ["doctype"],
1760
- style: {
1761
- color: "rgb(199, 146, 234)",
1762
- fontStyle: "italic"
1763
- }
1764
- },
1765
- {
1766
- types: ["namespace"],
1767
- style: {
1768
- color: "rgb(178, 204, 214)"
1769
- }
1770
- },
1771
- {
1772
- types: ["url"],
1773
- style: {
1774
- color: "rgb(221, 221, 221)"
1775
- }
1776
- }
1777
- ]
1778
- }, ot = rt, st = {
1779
- plain: {
1780
- color: "#9EFEFF",
1781
- backgroundColor: "#2D2A55"
1782
- },
1783
- styles: [
1784
- {
1785
- types: ["changed"],
1786
- style: {
1787
- color: "rgb(255, 238, 128)"
1788
- }
1789
- },
1790
- {
1791
- types: ["deleted"],
1792
- style: {
1793
- color: "rgba(239, 83, 80, 0.56)"
1794
- }
1795
- },
1796
- {
1797
- types: ["inserted"],
1798
- style: {
1799
- color: "rgb(173, 219, 103)"
1800
- }
1801
- },
1802
- {
1803
- types: ["comment"],
1804
- style: {
1805
- color: "rgb(179, 98, 255)",
1806
- fontStyle: "italic"
1807
- }
1808
- },
1809
- {
1810
- types: ["punctuation"],
1811
- style: {
1812
- color: "rgb(255, 255, 255)"
1813
- }
1814
- },
1815
- {
1816
- types: ["constant"],
1817
- style: {
1818
- color: "rgb(255, 98, 140)"
1819
- }
1820
- },
1821
- {
1822
- types: ["string", "url"],
1823
- style: {
1824
- color: "rgb(165, 255, 144)"
1825
- }
1826
- },
1827
- {
1828
- types: ["variable"],
1829
- style: {
1830
- color: "rgb(255, 238, 128)"
1831
- }
1832
- },
1833
- {
1834
- types: ["number", "boolean"],
1835
- style: {
1836
- color: "rgb(255, 98, 140)"
1837
- }
1838
- },
1839
- {
1840
- types: ["attr-name"],
1841
- style: {
1842
- color: "rgb(255, 180, 84)"
1843
- }
1844
- },
1845
- {
1846
- types: [
1847
- "keyword",
1848
- "operator",
1849
- "property",
1850
- "namespace",
1851
- "tag",
1852
- "selector",
1853
- "doctype"
1854
- ],
1855
- style: {
1856
- color: "rgb(255, 157, 0)"
1857
- }
1858
- },
1859
- {
1860
- types: ["builtin", "char", "constant", "function", "class-name"],
1861
- style: {
1862
- color: "rgb(250, 208, 0)"
1863
- }
1864
- }
1865
- ]
1866
- }, lt = st, it = {
1867
- plain: {
1868
- backgroundColor: "linear-gradient(to bottom, #2a2139 75%, #34294f)",
1869
- backgroundImage: "#34294f",
1870
- color: "#f92aad",
1871
- textShadow: "0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"
1872
- },
1873
- styles: [
1874
- {
1875
- types: ["comment", "block-comment", "prolog", "doctype", "cdata"],
1876
- style: {
1877
- color: "#495495",
1878
- fontStyle: "italic"
1879
- }
1880
- },
1881
- {
1882
- types: ["punctuation"],
1883
- style: {
1884
- color: "#ccc"
1885
- }
1886
- },
1887
- {
1888
- types: [
1889
- "tag",
1890
- "attr-name",
1891
- "namespace",
1892
- "number",
1893
- "unit",
1894
- "hexcode",
1895
- "deleted"
1896
- ],
1897
- style: {
1898
- color: "#e2777a"
1899
- }
1900
- },
1901
- {
1902
- types: ["property", "selector"],
1903
- style: {
1904
- color: "#72f1b8",
1905
- textShadow: "0 0 2px #100c0f, 0 0 10px #257c5575, 0 0 35px #21272475"
1906
- }
1907
- },
1908
- {
1909
- types: ["function-name"],
1910
- style: {
1911
- color: "#6196cc"
1912
- }
1913
- },
1914
- {
1915
- types: ["boolean", "selector-id", "function"],
1916
- style: {
1917
- color: "#fdfdfd",
1918
- textShadow: "0 0 2px #001716, 0 0 3px #03edf975, 0 0 5px #03edf975, 0 0 8px #03edf975"
1919
- }
1920
- },
1921
- {
1922
- types: ["class-name", "maybe-class-name", "builtin"],
1923
- style: {
1924
- color: "#fff5f6",
1925
- textShadow: "0 0 2px #000, 0 0 10px #fc1f2c75, 0 0 5px #fc1f2c75, 0 0 25px #fc1f2c75"
1926
- }
1927
- },
1928
- {
1929
- types: ["constant", "symbol"],
1930
- style: {
1931
- color: "#f92aad",
1932
- textShadow: "0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"
1933
- }
1934
- },
1935
- {
1936
- types: ["important", "atrule", "keyword", "selector-class"],
1937
- style: {
1938
- color: "#f4eee4",
1939
- textShadow: "0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575"
1940
- }
1941
- },
1942
- {
1943
- types: ["string", "char", "attr-value", "regex", "variable"],
1944
- style: {
1945
- color: "#f87c32"
1946
- }
1947
- },
1948
- {
1949
- types: ["parameter"],
1950
- style: {
1951
- fontStyle: "italic"
1952
- }
1953
- },
1954
- {
1955
- types: ["entity", "url"],
1956
- style: {
1957
- color: "#67cdcc"
1958
- }
1959
- },
1960
- {
1961
- types: ["operator"],
1962
- style: {
1963
- color: "ffffffee"
1964
- }
1965
- },
1966
- {
1967
- types: ["important", "bold"],
1968
- style: {
1969
- fontWeight: "bold"
1970
- }
1971
- },
1972
- {
1973
- types: ["italic"],
1974
- style: {
1975
- fontStyle: "italic"
1976
- }
1977
- },
1978
- {
1979
- types: ["entity"],
1980
- style: {
1981
- cursor: "help"
1982
- }
1983
- },
1984
- {
1985
- types: ["inserted"],
1986
- style: {
1987
- color: "green"
1988
- }
1989
- }
1990
- ]
1991
- }, ut = it, ct = {
1992
- plain: {
1993
- color: "#282a2e",
1994
- backgroundColor: "#ffffff"
1995
- },
1996
- styles: [
1997
- {
1998
- types: ["comment"],
1999
- style: {
2000
- color: "rgb(197, 200, 198)"
2001
- }
2002
- },
2003
- {
2004
- types: ["string", "number", "builtin", "variable"],
2005
- style: {
2006
- color: "rgb(150, 152, 150)"
2007
- }
2008
- },
2009
- {
2010
- types: ["class-name", "function", "tag", "attr-name"],
2011
- style: {
2012
- color: "rgb(40, 42, 46)"
2013
- }
2014
- }
2015
- ]
2016
- }, pt = ct, dt = {
2017
- plain: {
2018
- color: "#9CDCFE",
2019
- backgroundColor: "#1E1E1E"
2020
- },
2021
- styles: [
2022
- {
2023
- types: ["prolog"],
2024
- style: {
2025
- color: "rgb(0, 0, 128)"
2026
- }
2027
- },
2028
- {
2029
- types: ["comment"],
2030
- style: {
2031
- color: "rgb(106, 153, 85)"
2032
- }
2033
- },
2034
- {
2035
- types: ["builtin", "changed", "keyword", "interpolation-punctuation"],
2036
- style: {
2037
- color: "rgb(86, 156, 214)"
2038
- }
2039
- },
2040
- {
2041
- types: ["number", "inserted"],
2042
- style: {
2043
- color: "rgb(181, 206, 168)"
2044
- }
2045
- },
2046
- {
2047
- types: ["constant"],
2048
- style: {
2049
- color: "rgb(100, 102, 149)"
2050
- }
2051
- },
2052
- {
2053
- types: ["attr-name", "variable"],
2054
- style: {
2055
- color: "rgb(156, 220, 254)"
2056
- }
2057
- },
2058
- {
2059
- types: ["deleted", "string", "attr-value", "template-punctuation"],
2060
- style: {
2061
- color: "rgb(206, 145, 120)"
2062
- }
2063
- },
2064
- {
2065
- types: ["selector"],
2066
- style: {
2067
- color: "rgb(215, 186, 125)"
2068
- }
2069
- },
2070
- {
2071
- // Fix tag color
2072
- types: ["tag"],
2073
- style: {
2074
- color: "rgb(78, 201, 176)"
2075
- }
2076
- },
2077
- {
2078
- // Fix tag color for HTML
2079
- types: ["tag"],
2080
- languages: ["markup"],
2081
- style: {
2082
- color: "rgb(86, 156, 214)"
2083
- }
2084
- },
2085
- {
2086
- types: ["punctuation", "operator"],
2087
- style: {
2088
- color: "rgb(212, 212, 212)"
2089
- }
2090
- },
2091
- {
2092
- // Fix punctuation color for HTML
2093
- types: ["punctuation"],
2094
- languages: ["markup"],
2095
- style: {
2096
- color: "#808080"
2097
- }
2098
- },
2099
- {
2100
- types: ["function"],
2101
- style: {
2102
- color: "rgb(220, 220, 170)"
2103
- }
2104
- },
2105
- {
2106
- types: ["class-name"],
2107
- style: {
2108
- color: "rgb(78, 201, 176)"
2109
- }
2110
- },
2111
- {
2112
- types: ["char"],
2113
- style: {
2114
- color: "rgb(209, 105, 105)"
2115
- }
2116
- }
2117
- ]
2118
- }, fe = dt, gt = {
2119
- plain: {
2120
- color: "#000000",
2121
- backgroundColor: "#ffffff"
2122
- },
2123
- styles: [
2124
- {
2125
- types: ["comment"],
2126
- style: {
2127
- color: "rgb(0, 128, 0)"
2128
- }
2129
- },
2130
- {
2131
- types: ["builtin"],
2132
- style: {
2133
- color: "rgb(0, 112, 193)"
2134
- }
2135
- },
2136
- {
2137
- types: ["number", "variable", "inserted"],
2138
- style: {
2139
- color: "rgb(9, 134, 88)"
2140
- }
2141
- },
2142
- {
2143
- types: ["operator"],
2144
- style: {
2145
- color: "rgb(0, 0, 0)"
2146
- }
2147
- },
2148
- {
2149
- types: ["constant", "char"],
2150
- style: {
2151
- color: "rgb(129, 31, 63)"
2152
- }
2153
- },
2154
- {
2155
- types: ["tag"],
2156
- style: {
2157
- color: "rgb(128, 0, 0)"
2158
- }
2159
- },
2160
- {
2161
- types: ["attr-name"],
2162
- style: {
2163
- color: "rgb(255, 0, 0)"
2164
- }
2165
- },
2166
- {
2167
- types: ["deleted", "string"],
2168
- style: {
2169
- color: "rgb(163, 21, 21)"
2170
- }
2171
- },
2172
- {
2173
- types: ["changed", "punctuation"],
2174
- style: {
2175
- color: "rgb(4, 81, 165)"
2176
- }
2177
- },
2178
- {
2179
- types: ["function", "keyword"],
2180
- style: {
2181
- color: "rgb(0, 0, 255)"
2182
- }
2183
- },
2184
- {
2185
- types: ["class-name"],
2186
- style: {
2187
- color: "rgb(38, 127, 153)"
2188
- }
2189
- }
2190
- ]
2191
- }, yt = gt, ft = {
2192
- plain: {
2193
- color: "#f8fafc",
2194
- backgroundColor: "#011627"
2195
- },
2196
- styles: [
2197
- {
2198
- types: ["prolog"],
2199
- style: {
2200
- color: "#000080"
2201
- }
2202
- },
2203
- {
2204
- types: ["comment"],
2205
- style: {
2206
- color: "#6A9955"
2207
- }
2208
- },
2209
- {
2210
- types: ["builtin", "changed", "keyword", "interpolation-punctuation"],
2211
- style: {
2212
- color: "#569CD6"
2213
- }
2214
- },
2215
- {
2216
- types: ["number", "inserted"],
2217
- style: {
2218
- color: "#B5CEA8"
2219
- }
2220
- },
2221
- {
2222
- types: ["constant"],
2223
- style: {
2224
- color: "#f8fafc"
2225
- }
2226
- },
2227
- {
2228
- types: ["attr-name", "variable"],
2229
- style: {
2230
- color: "#9CDCFE"
2231
- }
2232
- },
2233
- {
2234
- types: ["deleted", "string", "attr-value", "template-punctuation"],
2235
- style: {
2236
- color: "#cbd5e1"
2237
- }
2238
- },
2239
- {
2240
- types: ["selector"],
2241
- style: {
2242
- color: "#D7BA7D"
2243
- }
2244
- },
2245
- {
2246
- types: ["tag"],
2247
- style: {
2248
- color: "#0ea5e9"
2249
- }
2250
- },
2251
- {
2252
- types: ["tag"],
2253
- languages: ["markup"],
2254
- style: {
2255
- color: "#0ea5e9"
2256
- }
2257
- },
2258
- {
2259
- types: ["punctuation", "operator"],
2260
- style: {
2261
- color: "#D4D4D4"
2262
- }
2263
- },
2264
- {
2265
- types: ["punctuation"],
2266
- languages: ["markup"],
2267
- style: {
2268
- color: "#808080"
2269
- }
2270
- },
2271
- {
2272
- types: ["function"],
2273
- style: {
2274
- color: "#7dd3fc"
2275
- }
2276
- },
2277
- {
2278
- types: ["class-name"],
2279
- style: {
2280
- color: "#0ea5e9"
2281
- }
2282
- },
2283
- {
2284
- types: ["char"],
2285
- style: {
2286
- color: "#D16969"
2287
- }
2288
- }
2289
- ]
2290
- }, bt = ft, mt = {
2291
- plain: {
2292
- color: "#0f172a",
2293
- backgroundColor: "#f1f5f9"
2294
- },
2295
- styles: [
2296
- {
2297
- types: ["prolog"],
2298
- style: {
2299
- color: "#000080"
2300
- }
2301
- },
2302
- {
2303
- types: ["comment"],
2304
- style: {
2305
- color: "#6A9955"
2306
- }
2307
- },
2308
- {
2309
- types: ["builtin", "changed", "keyword", "interpolation-punctuation"],
2310
- style: {
2311
- color: "#0c4a6e"
2312
- }
2313
- },
2314
- {
2315
- types: ["number", "inserted"],
2316
- style: {
2317
- color: "#B5CEA8"
2318
- }
2319
- },
2320
- {
2321
- types: ["constant"],
2322
- style: {
2323
- color: "#0f172a"
2324
- }
2325
- },
2326
- {
2327
- types: ["attr-name", "variable"],
2328
- style: {
2329
- color: "#0c4a6e"
2330
- }
2331
- },
2332
- {
2333
- types: ["deleted", "string", "attr-value", "template-punctuation"],
2334
- style: {
2335
- color: "#64748b"
2336
- }
2337
- },
2338
- {
2339
- types: ["selector"],
2340
- style: {
2341
- color: "#D7BA7D"
2342
- }
2343
- },
2344
- {
2345
- types: ["tag"],
2346
- style: {
2347
- color: "#0ea5e9"
2348
- }
2349
- },
2350
- {
2351
- types: ["tag"],
2352
- languages: ["markup"],
2353
- style: {
2354
- color: "#0ea5e9"
2355
- }
2356
- },
2357
- {
2358
- types: ["punctuation", "operator"],
2359
- style: {
2360
- color: "#475569"
2361
- }
2362
- },
2363
- {
2364
- types: ["punctuation"],
2365
- languages: ["markup"],
2366
- style: {
2367
- color: "#808080"
2368
- }
2369
- },
2370
- {
2371
- types: ["function"],
2372
- style: {
2373
- color: "#0e7490"
2374
- }
2375
- },
2376
- {
2377
- types: ["class-name"],
2378
- style: {
2379
- color: "#0ea5e9"
2380
- }
2381
- },
2382
- {
2383
- types: ["char"],
2384
- style: {
2385
- color: "#D16969"
2386
- }
2387
- }
2388
- ]
2389
- }, ht = mt, vt = {
2390
- plain: {
2391
- backgroundColor: "hsl(220, 13%, 18%)",
2392
- color: "hsl(220, 14%, 71%)",
2393
- textShadow: "0 1px rgba(0, 0, 0, 0.3)"
2394
- },
2395
- styles: [
2396
- {
2397
- types: ["comment", "prolog", "cdata"],
2398
- style: {
2399
- color: "hsl(220, 10%, 40%)"
2400
- }
2401
- },
2402
- {
2403
- types: ["doctype", "punctuation", "entity"],
2404
- style: {
2405
- color: "hsl(220, 14%, 71%)"
2406
- }
2407
- },
2408
- {
2409
- types: [
2410
- "attr-name",
2411
- "class-name",
2412
- "maybe-class-name",
2413
- "boolean",
2414
- "constant",
2415
- "number",
2416
- "atrule"
2417
- ],
2418
- style: { color: "hsl(29, 54%, 61%)" }
2419
- },
2420
- {
2421
- types: ["keyword"],
2422
- style: { color: "hsl(286, 60%, 67%)" }
2423
- },
2424
- {
2425
- types: ["property", "tag", "symbol", "deleted", "important"],
2426
- style: {
2427
- color: "hsl(355, 65%, 65%)"
2428
- }
2429
- },
2430
- {
2431
- types: [
2432
- "selector",
2433
- "string",
2434
- "char",
2435
- "builtin",
2436
- "inserted",
2437
- "regex",
2438
- "attr-value"
2439
- ],
2440
- style: {
2441
- color: "hsl(95, 38%, 62%)"
2442
- }
2443
- },
2444
- {
2445
- types: ["variable", "operator", "function"],
2446
- style: {
2447
- color: "hsl(207, 82%, 66%)"
2448
- }
2449
- },
2450
- {
2451
- types: ["url"],
2452
- style: {
2453
- color: "hsl(187, 47%, 55%)"
2454
- }
2455
- },
2456
- {
2457
- types: ["deleted"],
2458
- style: {
2459
- textDecorationLine: "line-through"
2460
- }
2461
- },
2462
- {
2463
- types: ["inserted"],
2464
- style: {
2465
- textDecorationLine: "underline"
2466
- }
2467
- },
2468
- {
2469
- types: ["italic"],
2470
- style: {
2471
- fontStyle: "italic"
2472
- }
2473
- },
2474
- {
2475
- types: ["important", "bold"],
2476
- style: {
2477
- fontWeight: "bold"
2478
- }
2479
- },
2480
- {
2481
- types: ["important"],
2482
- style: {
2483
- color: "hsl(220, 14%, 71%)"
2484
- }
2485
- }
2486
- ]
2487
- }, kt = vt, wt = {
2488
- plain: {
2489
- backgroundColor: "hsl(230, 1%, 98%)",
2490
- color: "hsl(230, 8%, 24%)"
2491
- },
2492
- styles: [
2493
- {
2494
- types: ["comment", "prolog", "cdata"],
2495
- style: {
2496
- color: "hsl(230, 4%, 64%)"
2497
- }
2498
- },
2499
- {
2500
- types: ["doctype", "punctuation", "entity"],
2501
- style: {
2502
- color: "hsl(230, 8%, 24%)"
2503
- }
2504
- },
2505
- {
2506
- types: [
2507
- "attr-name",
2508
- "class-name",
2509
- "boolean",
2510
- "constant",
2511
- "number",
2512
- "atrule"
2513
- ],
2514
- style: {
2515
- color: "hsl(35, 99%, 36%)"
2516
- }
2517
- },
2518
- {
2519
- types: ["keyword"],
2520
- style: {
2521
- color: "hsl(301, 63%, 40%)"
2522
- }
2523
- },
2524
- {
2525
- types: ["property", "tag", "symbol", "deleted", "important"],
2526
- style: {
2527
- color: "hsl(5, 74%, 59%)"
2528
- }
2529
- },
2530
- {
2531
- types: [
2532
- "selector",
2533
- "string",
2534
- "char",
2535
- "builtin",
2536
- "inserted",
2537
- "regex",
2538
- "attr-value",
2539
- "punctuation"
2540
- ],
2541
- style: {
2542
- color: "hsl(119, 34%, 47%)"
2543
- }
2544
- },
2545
- {
2546
- types: ["variable", "operator", "function"],
2547
- style: {
2548
- color: "hsl(221, 87%, 60%)"
2549
- }
2550
- },
2551
- {
2552
- types: ["url"],
2553
- style: {
2554
- color: "hsl(198, 99%, 37%)"
2555
- }
2556
- },
2557
- {
2558
- types: ["deleted"],
2559
- style: {
2560
- textDecorationLine: "line-through"
2561
- }
2562
- },
2563
- {
2564
- types: ["inserted"],
2565
- style: {
2566
- textDecorationLine: "underline"
2567
- }
2568
- },
2569
- {
2570
- types: ["italic"],
2571
- style: {
2572
- fontStyle: "italic"
2573
- }
2574
- },
2575
- {
2576
- types: ["important", "bold"],
2577
- style: {
2578
- fontWeight: "bold"
2579
- }
2580
- },
2581
- {
2582
- types: ["important"],
2583
- style: {
2584
- color: "hsl(230, 8%, 24%)"
2585
- }
2586
- }
2587
- ]
2588
- }, Et = wt, xt = {
2589
- plain: {
2590
- color: "#ebdbb2",
2591
- backgroundColor: "#292828"
2592
- },
2593
- styles: [
2594
- {
2595
- types: [
2596
- "imports",
2597
- "class-name",
2598
- "maybe-class-name",
2599
- "constant",
2600
- "doctype",
2601
- "builtin",
2602
- "function"
2603
- ],
2604
- style: {
2605
- color: "#d8a657"
2606
- }
2607
- },
2608
- {
2609
- types: ["property-access"],
2610
- style: {
2611
- color: "#7daea3"
2612
- }
2613
- },
2614
- {
2615
- types: ["tag"],
2616
- style: {
2617
- color: "#e78a4e"
2618
- }
2619
- },
2620
- {
2621
- types: ["attr-name", "char", "url", "regex"],
2622
- style: {
2623
- color: "#a9b665"
2624
- }
2625
- },
2626
- {
2627
- types: ["attr-value", "string"],
2628
- style: {
2629
- color: "#89b482"
2630
- }
2631
- },
2632
- {
2633
- types: ["comment", "prolog", "cdata", "operator", "inserted"],
2634
- style: {
2635
- color: "#a89984"
2636
- }
2637
- },
2638
- {
2639
- types: [
2640
- "delimiter",
2641
- "boolean",
2642
- "keyword",
2643
- "selector",
2644
- "important",
2645
- "atrule",
2646
- "property",
2647
- "variable",
2648
- "deleted"
2649
- ],
2650
- style: {
2651
- color: "#ea6962"
2652
- }
2653
- },
2654
- {
2655
- types: ["entity", "number", "symbol"],
2656
- style: {
2657
- color: "#d3869b"
2658
- }
2659
- }
2660
- ]
2661
- }, St = xt, At = {
2662
- plain: {
2663
- color: "#654735",
2664
- backgroundColor: "#f9f5d7"
2665
- },
2666
- styles: [
2667
- {
2668
- types: [
2669
- "delimiter",
2670
- "boolean",
2671
- "keyword",
2672
- "selector",
2673
- "important",
2674
- "atrule",
2675
- "property",
2676
- "variable",
2677
- "deleted"
2678
- ],
2679
- style: {
2680
- color: "#af2528"
2681
- }
2682
- },
2683
- {
2684
- types: [
2685
- "imports",
2686
- "class-name",
2687
- "maybe-class-name",
2688
- "constant",
2689
- "doctype",
2690
- "builtin"
2691
- ],
2692
- style: {
2693
- color: "#b4730e"
2694
- }
2695
- },
2696
- {
2697
- types: ["string", "attr-value"],
2698
- style: {
2699
- color: "#477a5b"
2700
- }
2701
- },
2702
- {
2703
- types: ["property-access"],
2704
- style: {
2705
- color: "#266b79"
2706
- }
2707
- },
2708
- {
2709
- types: ["function", "attr-name", "char", "url"],
2710
- style: {
2711
- color: "#72761e"
2712
- }
2713
- },
2714
- {
2715
- types: ["tag"],
2716
- style: {
2717
- color: "#b94c07"
2718
- }
2719
- },
2720
- {
2721
- types: ["comment", "prolog", "cdata", "operator", "inserted"],
2722
- style: {
2723
- color: "#a89984"
2724
- }
2725
- },
2726
- {
2727
- types: ["entity", "number", "symbol"],
2728
- style: {
2729
- color: "#924f79"
2730
- }
2731
- }
2732
- ]
2733
- }, _t = At, Ft = (e) => X(
2734
- (t) => {
2735
- var a = t, { className: i, style: d, line: m } = a, c = ye(a, ["className", "style", "line"]);
2736
- const h = q(B({}, c), {
2737
- className: ce("token-line", i)
2738
- });
2739
- return typeof e == "object" && "plain" in e && (h.style = e.plain), typeof d == "object" && (h.style = B(B({}, h.style || {}), d)), h;
2740
- },
2741
- [e]
2742
- ), Tt = (e) => {
2743
- const t = X(
2744
- ({ types: a, empty: i }) => {
2745
- if (e != null) {
2746
- {
2747
- if (a.length === 1 && a[0] === "plain")
2748
- return i != null ? { display: "inline-block" } : void 0;
2749
- if (a.length === 1 && i != null)
2750
- return e[a[0]];
2751
- }
2752
- return Object.assign(
2753
- i != null ? { display: "inline-block" } : {},
2754
- ...a.map((d) => e[d])
2755
- );
2756
- }
2757
- },
2758
- [e]
2759
- );
2760
- return X(
2761
- (a) => {
2762
- var i = a, { token: d, className: m, style: c } = i, h = ye(i, ["token", "className", "style"]);
2763
- const u = q(B({}, h), {
2764
- className: ce("token", ...d.types, m),
2765
- children: d.content,
2766
- style: t(d)
2767
- });
2768
- return c != null && (u.style = B(B({}, u.style || {}), c)), u;
2769
- },
2770
- [t]
2771
- );
2772
- }, Rt = /\r\n|\r|\n/, le = (e) => {
2773
- e.length === 0 ? e.push({
2774
- types: ["plain"],
2775
- content: `
2776
- `,
2777
- empty: !0
2778
- }) : e.length === 1 && e[0].content === "" && (e[0].content = `
2779
- `, e[0].empty = !0);
2780
- }, ie = (e, t) => {
2781
- const a = e.length;
2782
- return a > 0 && e[a - 1] === t ? e : e.concat(t);
2783
- }, It = (e) => {
2784
- const t = [[]], a = [e], i = [0], d = [e.length];
2785
- let m = 0, c = 0, h = [];
2786
- const u = [h];
2787
- for (; c > -1; ) {
2788
- for (; (m = i[c]++) < d[c]; ) {
2789
- let g, b = t[c];
2790
- const v = a[c][m];
2791
- if (typeof v == "string" ? (b = c > 0 ? b : ["plain"], g = v) : (b = ie(b, v.type), v.alias && (b = ie(b, v.alias)), g = v.content), typeof g != "string") {
2792
- c++, t.push(b), a.push(g), i.push(0), d.push(g.length);
2793
- continue;
2794
- }
2795
- const w = g.split(Rt), n = w.length;
2796
- h.push({
2797
- types: b,
2798
- content: w[0]
2799
- });
2800
- for (let r = 1; r < n; r++)
2801
- le(h), u.push(h = []), h.push({
2802
- types: b,
2803
- content: w[r]
2804
- });
2805
- }
2806
- c--, t.pop(), a.pop(), i.pop(), d.pop();
2807
- }
2808
- return le(h), u;
2809
- }, ue = It, Lt = ({ prism: e, code: t, grammar: a, language: i }) => ve(() => {
2810
- if (a == null)
2811
- return ue([t]);
2812
- const d = {
2813
- code: t,
2814
- grammar: a,
2815
- language: i,
2816
- tokens: []
2817
- };
2818
- return e.hooks.run("before-tokenize", d), d.tokens = e.tokenize(t, a), e.hooks.run("after-tokenize", d), ue(d.tokens);
2819
- }, [
2820
- t,
2821
- a,
2822
- i,
2823
- // prism is a stable import
2824
- e
2825
- ]), Ot = (e, t) => {
2826
- const { plain: a } = e, i = e.styles.reduce((d, m) => {
2827
- const { languages: c, style: h } = m;
2828
- return c && !c.includes(t) || m.types.forEach((u) => {
2829
- const g = B(B({}, d[u]), h);
2830
- d[u] = g;
2831
- }), d;
2832
- }, {});
2833
- return i.root = a, i.plain = q(B({}, a), { backgroundColor: void 0 }), i;
2834
- }, Nt = Ot, Ct = ({
2835
- children: e,
2836
- language: t,
2837
- code: a,
2838
- theme: i,
2839
- prism: d
2840
- }) => {
2841
- const m = t.toLowerCase(), c = Nt(i, m), h = Ft(c), u = Tt(c), g = d.languages[m], b = Lt({ prism: d, language: m, code: a, grammar: g });
2842
- return e({
2843
- tokens: b,
2844
- className: `prism-code language-${m}`,
2845
- style: c != null ? c.root : {},
2846
- getLineProps: h,
2847
- getTokenProps: u
2848
- });
2849
- }, Dt = (e) => he(Ct, q(B({}, e), {
2850
- prism: e.prism || o,
2851
- theme: e.theme || fe,
2852
- code: e.code,
2853
- language: e.language
2854
- }));
2855
- /*! Bundled license information:
2856
-
2857
- prismjs/prism.js:
2858
- (**
2859
- * Prism: Lightweight, robust, elegant syntax highlighting
2860
- *
2861
- * @license MIT <https://opensource.org/licenses/MIT>
2862
- * @author Lea Verou <https://lea.verou.me>
2863
- * @namespace
2864
- * @public
2865
- *)
2866
- */
2867
- globalThis.Prism = o;
2868
- import("./prism-bash.min-HHIMdNJ_.js");
2869
- import("./prism-ruby.min-Dx9KO9ds.js").then((e) => e.p);
2870
- import("./prism-markup-BNGj0Tvm.js");
2871
- import("./prism-json.min-B1GJqK1k.js");
2872
- import("./prism-java.min-BpvsOuIa.js").then((e) => e.p);
2873
- import("./prism-csharp.min-bQAo2pmx.js").then((e) => e.p);
2874
- import("./prism-objectivec.min-BXSWqpJJ.js");
2875
- import("./prism-markdown.min-C0Qn0m-5.js");
2876
- import("./prism-javascript.min-CEqHqgbm.js");
2877
- import("./prism-typescript.min-CD7H2IYQ.js").then((e) => e.p);
2878
- const Bt = {
2879
- mdx: "md"
2880
- }, Gt = ({
2881
- language: e = "plain",
2882
- showCopy: t = "hover",
2883
- showCopyText: a,
2884
- title: i,
2885
- children: d,
2886
- ...m
2887
- }) => {
2888
- const { resolvedTheme: c } = Fe(), [h, u] = ke(!1), g = d ?? m.code;
2889
- if (!g)
2890
- return null;
2891
- const b = c === "dark" ? Q.vsDark : Q.github;
2892
- return /* @__PURE__ */ I.jsx(
2893
- xe,
2894
- {
2895
- fallback: /* @__PURE__ */ I.jsxs("div", { className: "relative group", children: [
2896
- i && /* @__PURE__ */ I.jsx("div", { className: "text-xs text-muted-foreground absolute top-2 font-mono border-b w-full pb-2 px-4 ", children: i }),
2897
- /* @__PURE__ */ I.jsx(
2898
- "pre",
2899
- {
2900
- className: V(
2901
- "relative scrollbar overflow-x-auto",
2902
- m.className,
2903
- m.noBackground ? "!bg-transparent" : "bg-[#f6f8fa] text-[#393a34] dark:bg-[#1e1e1e] dark:text-[#9cdcfe]",
2904
- m.wrapLines && "whitespace-pre-wrap break-words",
2905
- i && "pt-10"
2906
- ),
2907
- children: g
2908
- }
2909
- ),
2910
- m.showLanguageIndicator && /* @__PURE__ */ I.jsx("span", { className: "absolute top-1.5 right-3 text-[11px] font-mono text-muted-foreground transition group-hover:opacity-0", children: e })
2911
- ] }),
2912
- children: /* @__PURE__ */ I.jsx(
2913
- Dt,
2914
- {
2915
- theme: b,
2916
- language: Bt[e] ?? e,
2917
- ...m,
2918
- code: g,
2919
- children: ({ className: v, style: w, tokens: n, getLineProps: r, getTokenProps: s }) => /* @__PURE__ */ I.jsxs("div", { className: "relative group", children: [
2920
- i && /* @__PURE__ */ I.jsx("div", { className: "text-xs text-muted-foreground absolute top-2 font-mono border-b w-full pb-2 px-4 ", children: i }),
2921
- /* @__PURE__ */ I.jsx(
2922
- "pre",
2923
- {
2924
- className: V(
2925
- "relative scrollbar overflow-x-auto",
2926
- v,
2927
- m.className,
2928
- m.noBackground && "!bg-transparent",
2929
- m.wrapLines && "whitespace-pre-wrap break-words",
2930
- i && "pt-10"
2931
- ),
2932
- style: w,
2933
- children: n.map((p, l) => (
2934
- // eslint-disable-next-line react/no-array-index-key
2935
- /* @__PURE__ */ I.jsx("div", { ...r({ line: p }), children: p.map((y, E) => (
2936
- // eslint-disable-next-line react/no-array-index-key
2937
- /* @__PURE__ */ I.jsx("span", { ...s({ token: y }) }, E)
2938
- )) }, l)
2939
- ))
2940
- }
2941
- ),
2942
- m.showLanguageIndicator && /* @__PURE__ */ I.jsx("span", { className: "absolute top-1.5 right-3 text-[11px] font-mono text-muted-foreground transition group-hover:opacity-0", children: e }),
2943
- t !== "never" && /* @__PURE__ */ I.jsxs(
2944
- "button",
2945
- {
2946
- type: "button",
2947
- "aria-label": "Copy code",
2948
- title: "Copy code",
2949
- className: V(
2950
- "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",
2951
- 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",
2952
- a && "flex gap-2 items-center font-medium"
2953
- ),
2954
- disabled: h,
2955
- onClick: () => {
2956
- u(!0), navigator.clipboard.writeText(
2957
- n.map((p) => p.map(({ content: l }) => l).join("")).join(`
2958
- `)
2959
- ), setTimeout(() => u(!1), 2e3);
2960
- },
2961
- children: [
2962
- h ? /* @__PURE__ */ I.jsx(
2963
- we,
2964
- {
2965
- className: "text-emerald-600",
2966
- size: 16,
2967
- strokeWidth: 2.5,
2968
- absoluteStrokeWidth: !0
2969
- }
2970
- ) : /* @__PURE__ */ I.jsx(Ee, { size: 16 }),
2971
- a && "Copy"
2972
- ]
2973
- }
2974
- )
2975
- ] })
2976
- }
2977
- )
2978
- }
2979
- );
2980
- };
2981
- export {
2982
- Ut as J,
2983
- Gt as S,
2984
- Fe as z
2985
- };
2986
- //# sourceMappingURL=SyntaxHighlight-CcnUjERD.js.map