@raystack/apsara 0.52.0 → 0.53.1

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