@schalkneethling/miyagi-core 4.4.2 → 4.4.3

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 (115) hide show
  1. package/README.md +7 -2
  2. package/api/app.js +16 -16
  3. package/api/index.js +263 -262
  4. package/bin/miyagi.js +1 -1
  5. package/dist/css/iframe.css +6 -30
  6. package/frontend/assets/css/iframe/accordion-tabs.css +39 -39
  7. package/frontend/assets/css/iframe/jsontree.js.css +149 -149
  8. package/frontend/assets/css/iframe/prism.css +45 -45
  9. package/frontend/assets/css/iframe/styleguide/colors.css +27 -27
  10. package/frontend/assets/css/iframe/styleguide/fonts.css +23 -23
  11. package/frontend/assets/css/iframe/styleguide/index.css +58 -58
  12. package/frontend/assets/css/iframe/styleguide/spacings.css +10 -10
  13. package/frontend/assets/css/iframe.css +191 -191
  14. package/frontend/assets/css/main/menu/config-switcher.css +21 -21
  15. package/frontend/assets/css/main/menu/config-switchers.css +34 -34
  16. package/frontend/assets/css/main/menu/goto.css +16 -16
  17. package/frontend/assets/css/main/menu/nav.css +49 -49
  18. package/frontend/assets/css/main/menu/search.css +34 -34
  19. package/frontend/assets/css/main/menu/title.css +18 -18
  20. package/frontend/assets/css/main/menu.css +89 -89
  21. package/frontend/assets/css/main/reset.css +47 -47
  22. package/frontend/assets/css/main.css +41 -41
  23. package/frontend/assets/css/shared.css +16 -16
  24. package/frontend/assets/css/tokens.css +108 -107
  25. package/frontend/assets/js/_accordion-tabs.js +392 -392
  26. package/frontend/assets/js/_goto.js +59 -59
  27. package/frontend/assets/js/_iframe-links.js +14 -14
  28. package/frontend/assets/js/_is-triggered.js +3 -3
  29. package/frontend/assets/js/_main.js +369 -369
  30. package/frontend/assets/js/_mock-data.js +8 -8
  31. package/frontend/assets/js/_prism.js +1082 -1081
  32. package/frontend/assets/js/_search.js +186 -186
  33. package/frontend/assets/js/_socket.js +44 -44
  34. package/frontend/assets/js/config-switcher/development-mode.js +38 -38
  35. package/frontend/assets/js/config-switcher/index.js +55 -55
  36. package/frontend/assets/js/config-switcher/text-direction.js +22 -22
  37. package/frontend/assets/js/config-switcher/theme.js +68 -68
  38. package/frontend/assets/js/iframe.build.js +25 -25
  39. package/frontend/assets/js/iframe.js +38 -38
  40. package/frontend/assets/js/jsontree.js +979 -976
  41. package/frontend/assets/js/main.build.js +29 -29
  42. package/frontend/assets/js/main.js +31 -31
  43. package/frontend/assets/js/styleguide/color-converter.js +652 -652
  44. package/frontend/assets/js/styleguide/index.js +100 -100
  45. package/lib/build/index.js +1014 -1020
  46. package/lib/cli/app.js +16 -16
  47. package/lib/cli/component.js +50 -50
  48. package/lib/cli/doctor.js +130 -121
  49. package/lib/cli/drupal-assets.js +163 -157
  50. package/lib/cli/lint.js +196 -196
  51. package/lib/cli/run.js +150 -146
  52. package/lib/config.js +86 -86
  53. package/lib/constants/lint-log-levels.js +6 -6
  54. package/lib/drupal/load-assets-config.js +59 -60
  55. package/lib/drupal/resolve-library-assets.js +132 -141
  56. package/lib/errors.js +20 -20
  57. package/lib/generator/component.js +124 -124
  58. package/lib/generator/mocks.js +156 -156
  59. package/lib/helpers.js +68 -68
  60. package/lib/i18n/en.js +93 -93
  61. package/lib/i18n/index.js +8 -8
  62. package/lib/index.js +13 -13
  63. package/lib/init/args.js +153 -153
  64. package/lib/init/config.js +452 -438
  65. package/lib/init/engines.js +41 -41
  66. package/lib/init/index.js +83 -83
  67. package/lib/init/rendering.js +3 -3
  68. package/lib/init/static.js +90 -90
  69. package/lib/init/twing/cache.js +27 -27
  70. package/lib/init/twing/functions.js +37 -37
  71. package/lib/init/views.js +5 -5
  72. package/lib/logger.js +72 -72
  73. package/lib/mocks/get.js +88 -88
  74. package/lib/mocks/index.js +2 -2
  75. package/lib/mocks/resolve/ref.js +447 -447
  76. package/lib/mocks/resolve/tpl.js +218 -218
  77. package/lib/mocks/resolve.js +154 -154
  78. package/lib/render/helpers/resolve-assets.js +29 -39
  79. package/lib/render/helpers.js +27 -27
  80. package/lib/render/index.js +18 -18
  81. package/lib/render/views/iframe/component.docs.js +50 -50
  82. package/lib/render/views/iframe/component.js +249 -248
  83. package/lib/render/views/iframe/design-tokens/colors.js +38 -38
  84. package/lib/render/views/iframe/design-tokens/index.js +3 -3
  85. package/lib/render/views/iframe/design-tokens/sizes.js +35 -35
  86. package/lib/render/views/iframe/design-tokens/typography.js +37 -37
  87. package/lib/render/views/iframe/docs.js +42 -42
  88. package/lib/render/views/iframe/index.js +28 -28
  89. package/lib/render/views/iframe/variation.js +89 -89
  90. package/lib/render/views/iframe/variation.standalone.js +69 -68
  91. package/lib/render/views/main/component.docs.js +38 -38
  92. package/lib/render/views/main/component.js +55 -55
  93. package/lib/render/views/main/design-tokens.js +38 -38
  94. package/lib/render/views/main/docs.js +33 -33
  95. package/lib/render/views/main/index.js +33 -33
  96. package/lib/state/components.js +99 -99
  97. package/lib/state/css.js +33 -33
  98. package/lib/state/docs.js +72 -72
  99. package/lib/state/file-contents.js +154 -154
  100. package/lib/state/helpers.js +53 -53
  101. package/lib/state/index.js +39 -39
  102. package/lib/state/menu/index.js +202 -202
  103. package/lib/state/menu/structure.js +84 -84
  104. package/lib/state/partials.js +12 -12
  105. package/lib/state/source-tree.js +51 -51
  106. package/lib/styleguide/color-names.js +148 -148
  107. package/lib/styleguide/colors.js +113 -113
  108. package/lib/styleguide/helpers.js +33 -33
  109. package/lib/styleguide/index.js +4 -4
  110. package/lib/styleguide/media-queries.js +18 -18
  111. package/lib/styleguide/spacings.js +22 -22
  112. package/lib/styleguide/typography.js +46 -46
  113. package/lib/validator/mocks.js +110 -83
  114. package/lib/validator/schemas.js +236 -227
  115. package/package.json +118 -117
@@ -1,1098 +1,1099 @@
1
1
  /* PrismJS 1.30.0
2
2
  https://prismjs.com/download.html#themes=prism&languages=markup+clike+javascript+handlebars+json+markup-templating+pug+twig+yaml */
3
3
  var _self =
4
- "undefined" != typeof window
5
- ? window
6
- : "undefined" != typeof WorkerGlobalScope &&
7
- self instanceof WorkerGlobalScope
8
- ? self
9
- : {},
10
- Prism = (function (e) {
11
- var n = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,
12
- t = 0,
13
- r = {},
14
- a = {
15
- manual: e.Prism && e.Prism.manual,
16
- disableWorkerMessageHandler:
17
- e.Prism && e.Prism.disableWorkerMessageHandler,
18
- util: {
19
- encode: function e(n) {
20
- return n instanceof i
21
- ? new i(n.type, e(n.content), n.alias)
22
- : Array.isArray(n)
23
- ? n.map(e)
24
- : n
25
- .replace(/&/g, "&")
26
- .replace(/</g, "&lt;")
27
- .replace(/\u00a0/g, " ");
28
- },
29
- type: function (e) {
30
- return Object.prototype.toString.call(e).slice(8, -1);
31
- },
32
- objId: function (e) {
33
- return (
34
- e.__id || Object.defineProperty(e, "__id", { value: ++t }), e.__id
35
- );
36
- },
37
- clone: function e(n, t) {
38
- var r, i;
39
- switch (((t = t || {}), a.util.type(n))) {
40
- case "Object":
41
- if (((i = a.util.objId(n)), t[i])) return t[i];
42
- for (var l in ((r = {}), (t[i] = r), n))
43
- n.hasOwnProperty(l) && (r[l] = e(n[l], t));
44
- return r;
45
- case "Array":
46
- return (
47
- (i = a.util.objId(n)),
48
- t[i]
49
- ? t[i]
50
- : ((r = []),
51
- (t[i] = r),
52
- n.forEach(function (n, a) {
53
- r[a] = e(n, t);
54
- }),
55
- r)
56
- );
57
- default:
58
- return n;
59
- }
60
- },
61
- getLanguage: function (e) {
62
- for (; e; ) {
63
- var t = n.exec(e.className);
64
- if (t) return t[1].toLowerCase();
65
- e = e.parentElement;
66
- }
67
- return "none";
68
- },
69
- setLanguage: function (e, t) {
70
- (e.className = e.className.replace(RegExp(n, "gi"), "")),
71
- e.classList.add("language-" + t);
72
- },
73
- currentScript: function () {
74
- if ("undefined" == typeof document) return null;
75
- if (
76
- document.currentScript &&
77
- "SCRIPT" === document.currentScript.tagName
78
- )
79
- return document.currentScript;
80
- try {
81
- throw new Error();
82
- } catch (r) {
83
- var e = (/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(r.stack) ||
84
- [])[1];
85
- if (e) {
86
- var n = document.getElementsByTagName("script");
87
- for (var t in n) if (n[t].src == e) return n[t];
88
- }
89
- return null;
90
- }
91
- },
92
- isActive: function (e, n, t) {
93
- for (var r = "no-" + n; e; ) {
94
- var a = e.classList;
95
- if (a.contains(n)) return !0;
96
- if (a.contains(r)) return !1;
97
- e = e.parentElement;
98
- }
99
- return !!t;
100
- },
101
- },
102
- languages: {
103
- plain: r,
104
- plaintext: r,
105
- text: r,
106
- txt: r,
107
- extend: function (e, n) {
108
- var t = a.util.clone(a.languages[e]);
109
- for (var r in n) t[r] = n[r];
110
- return t;
111
- },
112
- insertBefore: function (e, n, t, r) {
113
- var i = (r = r || a.languages)[e],
114
- l = {};
115
- for (var o in i)
116
- if (i.hasOwnProperty(o)) {
117
- if (o == n)
118
- for (var s in t) t.hasOwnProperty(s) && (l[s] = t[s]);
119
- t.hasOwnProperty(o) || (l[o] = i[o]);
120
- }
121
- var u = r[e];
122
- return (
123
- (r[e] = l),
124
- a.languages.DFS(a.languages, function (n, t) {
125
- t === u && n != e && (this[n] = l);
126
- }),
127
- l
128
- );
129
- },
130
- DFS: function e(n, t, r, i) {
131
- i = i || {};
132
- var l = a.util.objId;
133
- for (var o in n)
134
- if (n.hasOwnProperty(o)) {
135
- t.call(n, o, n[o], r || o);
136
- var s = n[o],
137
- u = a.util.type(s);
138
- "Object" !== u || i[l(s)]
139
- ? "Array" !== u || i[l(s)] || ((i[l(s)] = !0), e(s, t, o, i))
140
- : ((i[l(s)] = !0), e(s, t, null, i));
141
- }
142
- },
143
- },
144
- plugins: {},
145
- highlightAll: function (e, n) {
146
- a.highlightAllUnder(document, e, n);
147
- },
148
- highlightAllUnder: function (e, n, t) {
149
- var r = {
150
- callback: t,
151
- container: e,
152
- selector:
153
- 'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code',
154
- };
155
- a.hooks.run("before-highlightall", r),
156
- (r.elements = Array.prototype.slice.apply(
157
- r.container.querySelectorAll(r.selector),
158
- )),
159
- a.hooks.run("before-all-elements-highlight", r);
160
- for (var i, l = 0; (i = r.elements[l++]); )
161
- a.highlightElement(i, !0 === n, r.callback);
162
- },
163
- highlightElement: function (n, t, r) {
164
- var i = a.util.getLanguage(n),
165
- l = a.languages[i];
166
- a.util.setLanguage(n, i);
167
- var o = n.parentElement;
168
- o && "pre" === o.nodeName.toLowerCase() && a.util.setLanguage(o, i);
169
- var s = { element: n, language: i, grammar: l, code: n.textContent };
170
- function u(e) {
171
- (s.highlightedCode = e),
172
- a.hooks.run("before-insert", s),
173
- (s.element.innerHTML = s.highlightedCode),
174
- a.hooks.run("after-highlight", s),
175
- a.hooks.run("complete", s),
176
- r && r.call(s.element);
177
- }
178
- if (
179
- (a.hooks.run("before-sanity-check", s),
180
- (o = s.element.parentElement) &&
181
- "pre" === o.nodeName.toLowerCase() &&
182
- !o.hasAttribute("tabindex") &&
183
- o.setAttribute("tabindex", "0"),
184
- !s.code)
185
- )
186
- return a.hooks.run("complete", s), void (r && r.call(s.element));
187
- if ((a.hooks.run("before-highlight", s), s.grammar))
188
- if (t && e.Worker) {
189
- var c = new Worker(a.filename);
190
- (c.onmessage = function (e) {
191
- u(e.data);
192
- }),
193
- c.postMessage(
194
- JSON.stringify({
195
- language: s.language,
196
- code: s.code,
197
- immediateClose: !0,
198
- }),
199
- );
200
- } else u(a.highlight(s.code, s.grammar, s.language));
201
- else u(a.util.encode(s.code));
202
- },
203
- highlight: function (e, n, t) {
204
- var r = { code: e, grammar: n, language: t };
205
- if ((a.hooks.run("before-tokenize", r), !r.grammar))
206
- throw new Error(
207
- 'The language "' + r.language + '" has no grammar.',
208
- );
209
- return (
210
- (r.tokens = a.tokenize(r.code, r.grammar)),
211
- a.hooks.run("after-tokenize", r),
212
- i.stringify(a.util.encode(r.tokens), r.language)
213
- );
214
- },
215
- tokenize: function (e, n) {
216
- var t = n.rest;
217
- if (t) {
218
- for (var r in t) n[r] = t[r];
219
- delete n.rest;
220
- }
221
- var a = new s();
222
- return (
223
- u(a, a.head, e),
224
- o(e, a, n, a.head, 0),
225
- (function (e) {
226
- for (var n = [], t = e.head.next; t !== e.tail; )
227
- n.push(t.value), (t = t.next);
228
- return n;
229
- })(a)
230
- );
231
- },
232
- hooks: {
233
- all: {},
234
- add: function (e, n) {
235
- var t = a.hooks.all;
236
- (t[e] = t[e] || []), t[e].push(n);
237
- },
238
- run: function (e, n) {
239
- var t = a.hooks.all[e];
240
- if (t && t.length) for (var r, i = 0; (r = t[i++]); ) r(n);
241
- },
242
- },
243
- Token: i,
244
- };
245
- function i(e, n, t, r) {
246
- (this.type = e),
247
- (this.content = n),
248
- (this.alias = t),
249
- (this.length = 0 | (r || "").length);
250
- }
251
- function l(e, n, t, r) {
252
- e.lastIndex = n;
253
- var a = e.exec(t);
254
- if (a && r && a[1]) {
255
- var i = a[1].length;
256
- (a.index += i), (a[0] = a[0].slice(i));
257
- }
258
- return a;
259
- }
260
- function o(e, n, t, r, s, g) {
261
- for (var f in t)
262
- if (t.hasOwnProperty(f) && t[f]) {
263
- var h = t[f];
264
- h = Array.isArray(h) ? h : [h];
265
- for (var d = 0; d < h.length; ++d) {
266
- if (g && g.cause == f + "," + d) return;
267
- var v = h[d],
268
- p = v.inside,
269
- m = !!v.lookbehind,
270
- y = !!v.greedy,
271
- k = v.alias;
272
- if (y && !v.pattern.global) {
273
- var x = v.pattern.toString().match(/[imsuy]*$/)[0];
274
- v.pattern = RegExp(v.pattern.source, x + "g");
275
- }
276
- for (
277
- var b = v.pattern || v, w = r.next, A = s;
278
- w !== n.tail && !(g && A >= g.reach);
279
- A += w.value.length, w = w.next
280
- ) {
281
- var P = w.value;
282
- if (n.length > e.length) return;
283
- if (!(P instanceof i)) {
284
- var E,
285
- S = 1;
286
- if (y) {
287
- if (!(E = l(b, A, e, m)) || E.index >= e.length) break;
288
- var L = E.index,
289
- O = E.index + E[0].length,
290
- C = A;
291
- for (C += w.value.length; L >= C; )
292
- C += (w = w.next).value.length;
293
- if (((A = C -= w.value.length), w.value instanceof i))
294
- continue;
295
- for (
296
- var j = w;
297
- j !== n.tail && (C < O || "string" == typeof j.value);
298
- j = j.next
299
- )
300
- S++, (C += j.value.length);
301
- S--, (P = e.slice(A, C)), (E.index -= A);
302
- } else if (!(E = l(b, 0, P, m))) continue;
303
- L = E.index;
304
- var N = E[0],
305
- _ = P.slice(0, L),
306
- M = P.slice(L + N.length),
307
- W = A + P.length;
308
- g && W > g.reach && (g.reach = W);
309
- var I = w.prev;
310
- if (
311
- (_ && ((I = u(n, I, _)), (A += _.length)),
312
- c(n, I, S),
313
- (w = u(n, I, new i(f, p ? a.tokenize(N, p) : N, k, N))),
314
- M && u(n, w, M),
315
- S > 1)
316
- ) {
317
- var T = { cause: f + "," + d, reach: W };
318
- o(e, n, t, w.prev, A, T),
319
- g && T.reach > g.reach && (g.reach = T.reach);
320
- }
321
- }
322
- }
323
- }
324
- }
325
- }
326
- function s() {
327
- var e = { value: null, prev: null, next: null },
328
- n = { value: null, prev: e, next: null };
329
- (e.next = n), (this.head = e), (this.tail = n), (this.length = 0);
330
- }
331
- function u(e, n, t) {
332
- var r = n.next,
333
- a = { value: t, prev: n, next: r };
334
- return (n.next = a), (r.prev = a), e.length++, a;
335
- }
336
- function c(e, n, t) {
337
- for (var r = n.next, a = 0; a < t && r !== e.tail; a++) r = r.next;
338
- (n.next = r), (r.prev = n), (e.length -= a);
339
- }
340
- if (
341
- ((e.Prism = a),
342
- (i.stringify = function e(n, t) {
343
- if ("string" == typeof n) return n;
344
- if (Array.isArray(n)) {
345
- var r = "";
346
- return (
347
- n.forEach(function (n) {
348
- r += e(n, t);
349
- }),
350
- r
351
- );
352
- }
353
- var i = {
354
- type: n.type,
355
- content: e(n.content, t),
356
- tag: "span",
357
- classes: ["token", n.type],
358
- attributes: {},
359
- language: t,
360
- },
361
- l = n.alias;
362
- l &&
363
- (Array.isArray(l)
364
- ? Array.prototype.push.apply(i.classes, l)
365
- : i.classes.push(l)),
366
- a.hooks.run("wrap", i);
367
- var o = "";
368
- for (var s in i.attributes)
369
- o +=
370
- " " +
371
- s +
372
- '="' +
373
- (i.attributes[s] || "").replace(/"/g, "&quot;") +
374
- '"';
375
- return (
376
- "<" +
377
- i.tag +
378
- ' class="' +
379
- i.classes.join(" ") +
380
- '"' +
381
- o +
382
- ">" +
383
- i.content +
384
- "</" +
385
- i.tag +
386
- ">"
387
- );
388
- }),
389
- !e.document)
390
- )
391
- return e.addEventListener
392
- ? (a.disableWorkerMessageHandler ||
393
- e.addEventListener(
394
- "message",
395
- function (n) {
396
- var t = JSON.parse(n.data),
397
- r = t.language,
398
- i = t.code,
399
- l = t.immediateClose;
400
- e.postMessage(a.highlight(i, a.languages[r], r)),
401
- l && e.close();
402
- },
403
- !1,
404
- ),
405
- a)
406
- : a;
407
- var g = a.util.currentScript();
408
- function f() {
409
- a.manual || a.highlightAll();
410
- }
411
- if (
412
- (g &&
413
- ((a.filename = g.src),
414
- g.hasAttribute("data-manual") && (a.manual = !0)),
415
- !a.manual)
416
- ) {
417
- var h = document.readyState;
418
- "loading" === h || ("interactive" === h && g && g.defer)
419
- ? document.addEventListener("DOMContentLoaded", f)
420
- : window.requestAnimationFrame
421
- ? window.requestAnimationFrame(f)
422
- : window.setTimeout(f, 16);
423
- }
424
- return a;
425
- })(_self);
426
- "undefined" != typeof module && module.exports && (module.exports = Prism),
427
- "undefined" != typeof global && (global.Prism = Prism);
428
- (Prism.languages.markup = {
429
- comment: { pattern: /<!--(?:(?!<!--)[\s\S])*?-->/, greedy: !0 },
430
- prolog: { pattern: /<\?[\s\S]+?\?>/, greedy: !0 },
431
- doctype: {
432
- pattern:
433
- /<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,
434
- greedy: !0,
435
- inside: {
436
- "internal-subset": {
437
- pattern: /(^[^\[]*\[)[\s\S]+(?=\]>$)/,
438
- lookbehind: !0,
439
- greedy: !0,
440
- inside: null,
441
- },
442
- string: { pattern: /"[^"]*"|'[^']*'/, greedy: !0 },
443
- punctuation: /^<!|>$|[[\]]/,
444
- "doctype-tag": /^DOCTYPE/i,
445
- name: /[^\s<>'"]+/,
446
- },
447
- },
448
- cdata: { pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i, greedy: !0 },
449
- tag: {
450
- pattern:
451
- /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,
452
- greedy: !0,
453
- inside: {
454
- tag: {
455
- pattern: /^<\/?[^\s>\/]+/,
456
- inside: { punctuation: /^<\/?/, namespace: /^[^\s>\/:]+:/ },
457
- },
458
- "special-attr": [],
459
- "attr-value": {
460
- pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,
461
- inside: {
462
- punctuation: [
463
- { pattern: /^=/, alias: "attr-equals" },
464
- { pattern: /^(\s*)["']|["']$/, lookbehind: !0 },
465
- ],
466
- },
467
- },
468
- punctuation: /\/?>/,
469
- "attr-name": {
470
- pattern: /[^\s>\/]+/,
471
- inside: { namespace: /^[^\s>\/:]+:/ },
472
- },
473
- },
474
- },
475
- entity: [
476
- { pattern: /&[\da-z]{1,8};/i, alias: "named-entity" },
477
- /&#x?[\da-f]{1,8};/i,
478
- ],
4
+ "undefined" != typeof window
5
+ ? window
6
+ : "undefined" != typeof WorkerGlobalScope &&
7
+ self instanceof WorkerGlobalScope
8
+ ? self
9
+ : {},
10
+ Prism = (function (e) {
11
+ var n = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,
12
+ t = 0,
13
+ r = {},
14
+ a = {
15
+ manual: e.Prism && e.Prism.manual,
16
+ disableWorkerMessageHandler:
17
+ e.Prism && e.Prism.disableWorkerMessageHandler,
18
+ util: {
19
+ encode: function e(n) {
20
+ return n instanceof i
21
+ ? new i(n.type, e(n.content), n.alias)
22
+ : Array.isArray(n)
23
+ ? n.map(e)
24
+ : n
25
+ .replace(/&/g, "&amp;")
26
+ .replace(/</g, "&lt;")
27
+ .replace(/\u00a0/g, " ");
28
+ },
29
+ type: function (e) {
30
+ return Object.prototype.toString.call(e).slice(8, -1);
31
+ },
32
+ objId: function (e) {
33
+ return (
34
+ e.__id || Object.defineProperty(e, "__id", { value: ++t }),
35
+ e.__id
36
+ );
37
+ },
38
+ clone: function e(n, t) {
39
+ var r, i;
40
+ switch (((t = t || {}), a.util.type(n))) {
41
+ case "Object":
42
+ if (((i = a.util.objId(n)), t[i])) return t[i];
43
+ for (var l in ((r = {}), (t[i] = r), n))
44
+ n.hasOwnProperty(l) && (r[l] = e(n[l], t));
45
+ return r;
46
+ case "Array":
47
+ return (
48
+ (i = a.util.objId(n)),
49
+ t[i]
50
+ ? t[i]
51
+ : ((r = []),
52
+ (t[i] = r),
53
+ n.forEach(function (n, a) {
54
+ r[a] = e(n, t);
55
+ }),
56
+ r)
57
+ );
58
+ default:
59
+ return n;
60
+ }
61
+ },
62
+ getLanguage: function (e) {
63
+ for (; e; ) {
64
+ var t = n.exec(e.className);
65
+ if (t) return t[1].toLowerCase();
66
+ e = e.parentElement;
67
+ }
68
+ return "none";
69
+ },
70
+ setLanguage: function (e, t) {
71
+ ((e.className = e.className.replace(RegExp(n, "gi"), "")),
72
+ e.classList.add("language-" + t));
73
+ },
74
+ currentScript: function () {
75
+ if ("undefined" == typeof document) return null;
76
+ if (
77
+ document.currentScript &&
78
+ "SCRIPT" === document.currentScript.tagName
79
+ )
80
+ return document.currentScript;
81
+ try {
82
+ throw new Error();
83
+ } catch (r) {
84
+ var e = (/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(r.stack) ||
85
+ [])[1];
86
+ if (e) {
87
+ var n = document.getElementsByTagName("script");
88
+ for (var t in n) if (n[t].src == e) return n[t];
89
+ }
90
+ return null;
91
+ }
92
+ },
93
+ isActive: function (e, n, t) {
94
+ for (var r = "no-" + n; e; ) {
95
+ var a = e.classList;
96
+ if (a.contains(n)) return !0;
97
+ if (a.contains(r)) return !1;
98
+ e = e.parentElement;
99
+ }
100
+ return !!t;
101
+ },
102
+ },
103
+ languages: {
104
+ plain: r,
105
+ plaintext: r,
106
+ text: r,
107
+ txt: r,
108
+ extend: function (e, n) {
109
+ var t = a.util.clone(a.languages[e]);
110
+ for (var r in n) t[r] = n[r];
111
+ return t;
112
+ },
113
+ insertBefore: function (e, n, t, r) {
114
+ var i = (r = r || a.languages)[e],
115
+ l = {};
116
+ for (var o in i)
117
+ if (i.hasOwnProperty(o)) {
118
+ if (o == n)
119
+ for (var s in t) t.hasOwnProperty(s) && (l[s] = t[s]);
120
+ t.hasOwnProperty(o) || (l[o] = i[o]);
121
+ }
122
+ var u = r[e];
123
+ return (
124
+ (r[e] = l),
125
+ a.languages.DFS(a.languages, function (n, t) {
126
+ t === u && n != e && (this[n] = l);
127
+ }),
128
+ l
129
+ );
130
+ },
131
+ DFS: function e(n, t, r, i) {
132
+ i = i || {};
133
+ var l = a.util.objId;
134
+ for (var o in n)
135
+ if (n.hasOwnProperty(o)) {
136
+ t.call(n, o, n[o], r || o);
137
+ var s = n[o],
138
+ u = a.util.type(s);
139
+ "Object" !== u || i[l(s)]
140
+ ? "Array" !== u || i[l(s)] || ((i[l(s)] = !0), e(s, t, o, i))
141
+ : ((i[l(s)] = !0), e(s, t, null, i));
142
+ }
143
+ },
144
+ },
145
+ plugins: {},
146
+ highlightAll: function (e, n) {
147
+ a.highlightAllUnder(document, e, n);
148
+ },
149
+ highlightAllUnder: function (e, n, t) {
150
+ var r = {
151
+ callback: t,
152
+ container: e,
153
+ selector:
154
+ 'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code',
155
+ };
156
+ (a.hooks.run("before-highlightall", r),
157
+ (r.elements = Array.prototype.slice.apply(
158
+ r.container.querySelectorAll(r.selector),
159
+ )),
160
+ a.hooks.run("before-all-elements-highlight", r));
161
+ for (var i, l = 0; (i = r.elements[l++]); )
162
+ a.highlightElement(i, !0 === n, r.callback);
163
+ },
164
+ highlightElement: function (n, t, r) {
165
+ var i = a.util.getLanguage(n),
166
+ l = a.languages[i];
167
+ a.util.setLanguage(n, i);
168
+ var o = n.parentElement;
169
+ o && "pre" === o.nodeName.toLowerCase() && a.util.setLanguage(o, i);
170
+ var s = { element: n, language: i, grammar: l, code: n.textContent };
171
+ function u(e) {
172
+ ((s.highlightedCode = e),
173
+ a.hooks.run("before-insert", s),
174
+ (s.element.innerHTML = s.highlightedCode),
175
+ a.hooks.run("after-highlight", s),
176
+ a.hooks.run("complete", s),
177
+ r && r.call(s.element));
178
+ }
179
+ if (
180
+ (a.hooks.run("before-sanity-check", s),
181
+ (o = s.element.parentElement) &&
182
+ "pre" === o.nodeName.toLowerCase() &&
183
+ !o.hasAttribute("tabindex") &&
184
+ o.setAttribute("tabindex", "0"),
185
+ !s.code)
186
+ )
187
+ return (a.hooks.run("complete", s), void (r && r.call(s.element)));
188
+ if ((a.hooks.run("before-highlight", s), s.grammar))
189
+ if (t && e.Worker) {
190
+ var c = new Worker(a.filename);
191
+ ((c.onmessage = function (e) {
192
+ u(e.data);
193
+ }),
194
+ c.postMessage(
195
+ JSON.stringify({
196
+ language: s.language,
197
+ code: s.code,
198
+ immediateClose: !0,
199
+ }),
200
+ ));
201
+ } else u(a.highlight(s.code, s.grammar, s.language));
202
+ else u(a.util.encode(s.code));
203
+ },
204
+ highlight: function (e, n, t) {
205
+ var r = { code: e, grammar: n, language: t };
206
+ if ((a.hooks.run("before-tokenize", r), !r.grammar))
207
+ throw new Error(
208
+ 'The language "' + r.language + '" has no grammar.',
209
+ );
210
+ return (
211
+ (r.tokens = a.tokenize(r.code, r.grammar)),
212
+ a.hooks.run("after-tokenize", r),
213
+ i.stringify(a.util.encode(r.tokens), r.language)
214
+ );
215
+ },
216
+ tokenize: function (e, n) {
217
+ var t = n.rest;
218
+ if (t) {
219
+ for (var r in t) n[r] = t[r];
220
+ delete n.rest;
221
+ }
222
+ var a = new s();
223
+ return (
224
+ u(a, a.head, e),
225
+ o(e, a, n, a.head, 0),
226
+ (function (e) {
227
+ for (var n = [], t = e.head.next; t !== e.tail; )
228
+ (n.push(t.value), (t = t.next));
229
+ return n;
230
+ })(a)
231
+ );
232
+ },
233
+ hooks: {
234
+ all: {},
235
+ add: function (e, n) {
236
+ var t = a.hooks.all;
237
+ ((t[e] = t[e] || []), t[e].push(n));
238
+ },
239
+ run: function (e, n) {
240
+ var t = a.hooks.all[e];
241
+ if (t && t.length) for (var r, i = 0; (r = t[i++]); ) r(n);
242
+ },
243
+ },
244
+ Token: i,
245
+ };
246
+ function i(e, n, t, r) {
247
+ ((this.type = e),
248
+ (this.content = n),
249
+ (this.alias = t),
250
+ (this.length = 0 | (r || "").length));
251
+ }
252
+ function l(e, n, t, r) {
253
+ e.lastIndex = n;
254
+ var a = e.exec(t);
255
+ if (a && r && a[1]) {
256
+ var i = a[1].length;
257
+ ((a.index += i), (a[0] = a[0].slice(i)));
258
+ }
259
+ return a;
260
+ }
261
+ function o(e, n, t, r, s, g) {
262
+ for (var f in t)
263
+ if (t.hasOwnProperty(f) && t[f]) {
264
+ var h = t[f];
265
+ h = Array.isArray(h) ? h : [h];
266
+ for (var d = 0; d < h.length; ++d) {
267
+ if (g && g.cause == f + "," + d) return;
268
+ var v = h[d],
269
+ p = v.inside,
270
+ m = !!v.lookbehind,
271
+ y = !!v.greedy,
272
+ k = v.alias;
273
+ if (y && !v.pattern.global) {
274
+ var x = v.pattern.toString().match(/[imsuy]*$/)[0];
275
+ v.pattern = RegExp(v.pattern.source, x + "g");
276
+ }
277
+ for (
278
+ var b = v.pattern || v, w = r.next, A = s;
279
+ w !== n.tail && !(g && A >= g.reach);
280
+ A += w.value.length, w = w.next
281
+ ) {
282
+ var P = w.value;
283
+ if (n.length > e.length) return;
284
+ if (!(P instanceof i)) {
285
+ var E,
286
+ S = 1;
287
+ if (y) {
288
+ if (!(E = l(b, A, e, m)) || E.index >= e.length) break;
289
+ var L = E.index,
290
+ O = E.index + E[0].length,
291
+ C = A;
292
+ for (C += w.value.length; L >= C; )
293
+ C += (w = w.next).value.length;
294
+ if (((A = C -= w.value.length), w.value instanceof i))
295
+ continue;
296
+ for (
297
+ var j = w;
298
+ j !== n.tail && (C < O || "string" == typeof j.value);
299
+ j = j.next
300
+ )
301
+ (S++, (C += j.value.length));
302
+ (S--, (P = e.slice(A, C)), (E.index -= A));
303
+ } else if (!(E = l(b, 0, P, m))) continue;
304
+ L = E.index;
305
+ var N = E[0],
306
+ _ = P.slice(0, L),
307
+ M = P.slice(L + N.length),
308
+ W = A + P.length;
309
+ g && W > g.reach && (g.reach = W);
310
+ var I = w.prev;
311
+ if (
312
+ (_ && ((I = u(n, I, _)), (A += _.length)),
313
+ c(n, I, S),
314
+ (w = u(n, I, new i(f, p ? a.tokenize(N, p) : N, k, N))),
315
+ M && u(n, w, M),
316
+ S > 1)
317
+ ) {
318
+ var T = { cause: f + "," + d, reach: W };
319
+ (o(e, n, t, w.prev, A, T),
320
+ g && T.reach > g.reach && (g.reach = T.reach));
321
+ }
322
+ }
323
+ }
324
+ }
325
+ }
326
+ }
327
+ function s() {
328
+ var e = { value: null, prev: null, next: null },
329
+ n = { value: null, prev: e, next: null };
330
+ ((e.next = n), (this.head = e), (this.tail = n), (this.length = 0));
331
+ }
332
+ function u(e, n, t) {
333
+ var r = n.next,
334
+ a = { value: t, prev: n, next: r };
335
+ return ((n.next = a), (r.prev = a), e.length++, a);
336
+ }
337
+ function c(e, n, t) {
338
+ for (var r = n.next, a = 0; a < t && r !== e.tail; a++) r = r.next;
339
+ ((n.next = r), (r.prev = n), (e.length -= a));
340
+ }
341
+ if (
342
+ ((e.Prism = a),
343
+ (i.stringify = function e(n, t) {
344
+ if ("string" == typeof n) return n;
345
+ if (Array.isArray(n)) {
346
+ var r = "";
347
+ return (
348
+ n.forEach(function (n) {
349
+ r += e(n, t);
350
+ }),
351
+ r
352
+ );
353
+ }
354
+ var i = {
355
+ type: n.type,
356
+ content: e(n.content, t),
357
+ tag: "span",
358
+ classes: ["token", n.type],
359
+ attributes: {},
360
+ language: t,
361
+ },
362
+ l = n.alias;
363
+ (l &&
364
+ (Array.isArray(l)
365
+ ? Array.prototype.push.apply(i.classes, l)
366
+ : i.classes.push(l)),
367
+ a.hooks.run("wrap", i));
368
+ var o = "";
369
+ for (var s in i.attributes)
370
+ o +=
371
+ " " +
372
+ s +
373
+ '="' +
374
+ (i.attributes[s] || "").replace(/"/g, "&quot;") +
375
+ '"';
376
+ return (
377
+ "<" +
378
+ i.tag +
379
+ ' class="' +
380
+ i.classes.join(" ") +
381
+ '"' +
382
+ o +
383
+ ">" +
384
+ i.content +
385
+ "</" +
386
+ i.tag +
387
+ ">"
388
+ );
389
+ }),
390
+ !e.document)
391
+ )
392
+ return e.addEventListener
393
+ ? (a.disableWorkerMessageHandler ||
394
+ e.addEventListener(
395
+ "message",
396
+ function (n) {
397
+ var t = JSON.parse(n.data),
398
+ r = t.language,
399
+ i = t.code,
400
+ l = t.immediateClose;
401
+ (e.postMessage(a.highlight(i, a.languages[r], r)),
402
+ l && e.close());
403
+ },
404
+ !1,
405
+ ),
406
+ a)
407
+ : a;
408
+ var g = a.util.currentScript();
409
+ function f() {
410
+ a.manual || a.highlightAll();
411
+ }
412
+ if (
413
+ (g &&
414
+ ((a.filename = g.src),
415
+ g.hasAttribute("data-manual") && (a.manual = !0)),
416
+ !a.manual)
417
+ ) {
418
+ var h = document.readyState;
419
+ "loading" === h || ("interactive" === h && g && g.defer)
420
+ ? document.addEventListener("DOMContentLoaded", f)
421
+ : window.requestAnimationFrame
422
+ ? window.requestAnimationFrame(f)
423
+ : window.setTimeout(f, 16);
424
+ }
425
+ return a;
426
+ })(_self);
427
+ ("undefined" != typeof module && module.exports && (module.exports = Prism),
428
+ "undefined" != typeof global && (global.Prism = Prism));
429
+ ((Prism.languages.markup = {
430
+ comment: { pattern: /<!--(?:(?!<!--)[\s\S])*?-->/, greedy: !0 },
431
+ prolog: { pattern: /<\?[\s\S]+?\?>/, greedy: !0 },
432
+ doctype: {
433
+ pattern:
434
+ /<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,
435
+ greedy: !0,
436
+ inside: {
437
+ "internal-subset": {
438
+ pattern: /(^[^\[]*\[)[\s\S]+(?=\]>$)/,
439
+ lookbehind: !0,
440
+ greedy: !0,
441
+ inside: null,
442
+ },
443
+ string: { pattern: /"[^"]*"|'[^']*'/, greedy: !0 },
444
+ punctuation: /^<!|>$|[[\]]/,
445
+ "doctype-tag": /^DOCTYPE/i,
446
+ name: /[^\s<>'"]+/,
447
+ },
448
+ },
449
+ cdata: { pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i, greedy: !0 },
450
+ tag: {
451
+ pattern:
452
+ /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,
453
+ greedy: !0,
454
+ inside: {
455
+ tag: {
456
+ pattern: /^<\/?[^\s>\/]+/,
457
+ inside: { punctuation: /^<\/?/, namespace: /^[^\s>\/:]+:/ },
458
+ },
459
+ "special-attr": [],
460
+ "attr-value": {
461
+ pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,
462
+ inside: {
463
+ punctuation: [
464
+ { pattern: /^=/, alias: "attr-equals" },
465
+ { pattern: /^(\s*)["']|["']$/, lookbehind: !0 },
466
+ ],
467
+ },
468
+ },
469
+ punctuation: /\/?>/,
470
+ "attr-name": {
471
+ pattern: /[^\s>\/]+/,
472
+ inside: { namespace: /^[^\s>\/:]+:/ },
473
+ },
474
+ },
475
+ },
476
+ entity: [
477
+ { pattern: /&[\da-z]{1,8};/i, alias: "named-entity" },
478
+ /&#x?[\da-f]{1,8};/i,
479
+ ],
479
480
  }),
480
- (Prism.languages.markup.tag.inside["attr-value"].inside.entity =
481
- Prism.languages.markup.entity),
482
- (Prism.languages.markup.doctype.inside["internal-subset"].inside =
483
- Prism.languages.markup),
484
- Prism.hooks.add("wrap", function (a) {
485
- "entity" === a.type &&
486
- (a.attributes.title = a.content.replace(/&amp;/, "&"));
487
- }),
488
- Object.defineProperty(Prism.languages.markup.tag, "addInlined", {
489
- value: function (a, e) {
490
- var s = {};
491
- (s["language-" + e] = {
492
- pattern: /(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,
493
- lookbehind: !0,
494
- inside: Prism.languages[e],
495
- }),
496
- (s.cdata = /^<!\[CDATA\[|\]\]>$/i);
497
- var t = {
498
- "included-cdata": { pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i, inside: s },
499
- };
500
- t["language-" + e] = { pattern: /[\s\S]+/, inside: Prism.languages[e] };
501
- var n = {};
502
- (n[a] = {
503
- pattern: RegExp(
504
- "(<__[^>]*>)(?:<!\\[CDATA\\[(?:[^\\]]|\\](?!\\]>))*\\]\\]>|(?!<!\\[CDATA\\[)[^])*?(?=</__>)".replace(
505
- /__/g,
506
- function () {
507
- return a;
508
- },
509
- ),
510
- "i",
511
- ),
512
- lookbehind: !0,
513
- greedy: !0,
514
- inside: t,
515
- }),
516
- Prism.languages.insertBefore("markup", "cdata", n);
517
- },
518
- }),
519
- Object.defineProperty(Prism.languages.markup.tag, "addAttribute", {
520
- value: function (a, e) {
521
- Prism.languages.markup.tag.inside["special-attr"].push({
522
- pattern: RegExp(
523
- "(^|[\"'\\s])(?:" +
524
- a +
525
- ")\\s*=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s'\">=]+(?=[\\s>]))",
526
- "i",
527
- ),
528
- lookbehind: !0,
529
- inside: {
530
- "attr-name": /^[^\s=]+/,
531
- "attr-value": {
532
- pattern: /=[\s\S]+/,
533
- inside: {
534
- value: {
535
- pattern: /(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,
536
- lookbehind: !0,
537
- alias: [e, "language-" + e],
538
- inside: Prism.languages[e],
539
- },
540
- punctuation: [{ pattern: /^=/, alias: "attr-equals" }, /"|'/],
541
- },
542
- },
543
- },
544
- });
545
- },
546
- }),
547
- (Prism.languages.html = Prism.languages.markup),
548
- (Prism.languages.mathml = Prism.languages.markup),
549
- (Prism.languages.svg = Prism.languages.markup),
550
- (Prism.languages.xml = Prism.languages.extend("markup", {})),
551
- (Prism.languages.ssml = Prism.languages.xml),
552
- (Prism.languages.atom = Prism.languages.xml),
553
- (Prism.languages.rss = Prism.languages.xml);
481
+ (Prism.languages.markup.tag.inside["attr-value"].inside.entity =
482
+ Prism.languages.markup.entity),
483
+ (Prism.languages.markup.doctype.inside["internal-subset"].inside =
484
+ Prism.languages.markup),
485
+ Prism.hooks.add("wrap", function (a) {
486
+ "entity" === a.type &&
487
+ (a.attributes.title = a.content.replace(/&amp;/, "&"));
488
+ }),
489
+ Object.defineProperty(Prism.languages.markup.tag, "addInlined", {
490
+ value: function (a, e) {
491
+ var s = {};
492
+ ((s["language-" + e] = {
493
+ pattern: /(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,
494
+ lookbehind: !0,
495
+ inside: Prism.languages[e],
496
+ }),
497
+ (s.cdata = /^<!\[CDATA\[|\]\]>$/i));
498
+ var t = {
499
+ "included-cdata": { pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i, inside: s },
500
+ };
501
+ t["language-" + e] = { pattern: /[\s\S]+/, inside: Prism.languages[e] };
502
+ var n = {};
503
+ ((n[a] = {
504
+ pattern: RegExp(
505
+ "(<__[^>]*>)(?:<!\\[CDATA\\[(?:[^\\]]|\\](?!\\]>))*\\]\\]>|(?!<!\\[CDATA\\[)[^])*?(?=</__>)".replace(
506
+ /__/g,
507
+ function () {
508
+ return a;
509
+ },
510
+ ),
511
+ "i",
512
+ ),
513
+ lookbehind: !0,
514
+ greedy: !0,
515
+ inside: t,
516
+ }),
517
+ Prism.languages.insertBefore("markup", "cdata", n));
518
+ },
519
+ }),
520
+ Object.defineProperty(Prism.languages.markup.tag, "addAttribute", {
521
+ value: function (a, e) {
522
+ Prism.languages.markup.tag.inside["special-attr"].push({
523
+ pattern: RegExp(
524
+ "(^|[\"'\\s])(?:" +
525
+ a +
526
+ ")\\s*=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s'\">=]+(?=[\\s>]))",
527
+ "i",
528
+ ),
529
+ lookbehind: !0,
530
+ inside: {
531
+ "attr-name": /^[^\s=]+/,
532
+ "attr-value": {
533
+ pattern: /=[\s\S]+/,
534
+ inside: {
535
+ value: {
536
+ pattern: /(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,
537
+ lookbehind: !0,
538
+ alias: [e, "language-" + e],
539
+ inside: Prism.languages[e],
540
+ },
541
+ punctuation: [{ pattern: /^=/, alias: "attr-equals" }, /"|'/],
542
+ },
543
+ },
544
+ },
545
+ });
546
+ },
547
+ }),
548
+ (Prism.languages.html = Prism.languages.markup),
549
+ (Prism.languages.mathml = Prism.languages.markup),
550
+ (Prism.languages.svg = Prism.languages.markup),
551
+ (Prism.languages.xml = Prism.languages.extend("markup", {})),
552
+ (Prism.languages.ssml = Prism.languages.xml),
553
+ (Prism.languages.atom = Prism.languages.xml),
554
+ (Prism.languages.rss = Prism.languages.xml));
554
555
  Prism.languages.clike = {
555
- comment: [
556
- { pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/, lookbehind: !0, greedy: !0 },
557
- { pattern: /(^|[^\\:])\/\/.*/, lookbehind: !0, greedy: !0 },
558
- ],
559
- string: {
560
- pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
561
- greedy: !0,
562
- },
563
- "class-name": {
564
- pattern:
565
- /(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,
566
- lookbehind: !0,
567
- inside: { punctuation: /[.\\]/ },
568
- },
569
- keyword:
570
- /\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,
571
- boolean: /\b(?:false|true)\b/,
572
- function: /\b\w+(?=\()/,
573
- number: /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,
574
- operator: /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,
575
- punctuation: /[{}[\];(),.:]/,
556
+ comment: [
557
+ { pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/, lookbehind: !0, greedy: !0 },
558
+ { pattern: /(^|[^\\:])\/\/.*/, lookbehind: !0, greedy: !0 },
559
+ ],
560
+ string: {
561
+ pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
562
+ greedy: !0,
563
+ },
564
+ "class-name": {
565
+ pattern:
566
+ /(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,
567
+ lookbehind: !0,
568
+ inside: { punctuation: /[.\\]/ },
569
+ },
570
+ keyword:
571
+ /\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,
572
+ boolean: /\b(?:false|true)\b/,
573
+ function: /\b\w+(?=\()/,
574
+ number: /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,
575
+ operator: /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,
576
+ punctuation: /[{}[\];(),.:]/,
576
577
  };
577
- (Prism.languages.javascript = Prism.languages.extend("clike", {
578
- "class-name": [
579
- Prism.languages.clike["class-name"],
580
- {
581
- pattern:
582
- /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,
583
- lookbehind: !0,
584
- },
585
- ],
586
- keyword: [
587
- { pattern: /((?:^|\})\s*)catch\b/, lookbehind: !0 },
588
- {
589
- pattern:
590
- /(^|[^.]|\.\.\.\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/,
591
- lookbehind: !0,
592
- },
593
- ],
594
- function:
595
- /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,
596
- number: {
597
- pattern: RegExp(
598
- "(^|[^\\w$])(?:NaN|Infinity|0[bB][01]+(?:_[01]+)*n?|0[oO][0-7]+(?:_[0-7]+)*n?|0[xX][\\dA-Fa-f]+(?:_[\\dA-Fa-f]+)*n?|\\d+(?:_\\d+)*n|(?:\\d+(?:_\\d+)*(?:\\.(?:\\d+(?:_\\d+)*)?)?|\\.\\d+(?:_\\d+)*)(?:[Ee][+-]?\\d+(?:_\\d+)*)?)(?![\\w$])",
599
- ),
600
- lookbehind: !0,
601
- },
602
- operator:
603
- /--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/,
578
+ ((Prism.languages.javascript = Prism.languages.extend("clike", {
579
+ "class-name": [
580
+ Prism.languages.clike["class-name"],
581
+ {
582
+ pattern:
583
+ /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,
584
+ lookbehind: !0,
585
+ },
586
+ ],
587
+ keyword: [
588
+ { pattern: /((?:^|\})\s*)catch\b/, lookbehind: !0 },
589
+ {
590
+ pattern:
591
+ /(^|[^.]|\.\.\.\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/,
592
+ lookbehind: !0,
593
+ },
594
+ ],
595
+ function:
596
+ /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,
597
+ number: {
598
+ pattern: RegExp(
599
+ "(^|[^\\w$])(?:NaN|Infinity|0[bB][01]+(?:_[01]+)*n?|0[oO][0-7]+(?:_[0-7]+)*n?|0[xX][\\dA-Fa-f]+(?:_[\\dA-Fa-f]+)*n?|\\d+(?:_\\d+)*n|(?:\\d+(?:_\\d+)*(?:\\.(?:\\d+(?:_\\d+)*)?)?|\\.\\d+(?:_\\d+)*)(?:[Ee][+-]?\\d+(?:_\\d+)*)?)(?![\\w$])",
600
+ ),
601
+ lookbehind: !0,
602
+ },
603
+ operator:
604
+ /--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/,
604
605
  })),
605
- (Prism.languages.javascript["class-name"][0].pattern =
606
- /(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/),
607
- Prism.languages.insertBefore("javascript", "keyword", {
608
- regex: {
609
- pattern: RegExp(
610
- "((?:^|[^$\\w\\xA0-\\uFFFF.\"'\\])\\s]|\\b(?:return|yield))\\s*)/(?:(?:\\[(?:[^\\]\\\\\r\n]|\\\\.)*\\]|\\\\.|[^/\\\\\\[\r\n])+/[dgimyus]{0,7}|(?:\\[(?:[^[\\]\\\\\r\n]|\\\\.|\\[(?:[^[\\]\\\\\r\n]|\\\\.|\\[(?:[^[\\]\\\\\r\n]|\\\\.)*\\])*\\])*\\]|\\\\.|[^/\\\\\\[\r\n])+/[dgimyus]{0,7}v[dgimyus]{0,7})(?=(?:\\s|/\\*(?:[^*]|\\*(?!/))*\\*/)*(?:$|[\r\n,.;:})\\]]|//))",
611
- ),
612
- lookbehind: !0,
613
- greedy: !0,
614
- inside: {
615
- "regex-source": {
616
- pattern: /^(\/)[\s\S]+(?=\/[a-z]*$)/,
617
- lookbehind: !0,
618
- alias: "language-regex",
619
- inside: Prism.languages.regex,
620
- },
621
- "regex-delimiter": /^\/|\/$/,
622
- "regex-flags": /^[a-z]+$/,
623
- },
624
- },
625
- "function-variable": {
626
- pattern:
627
- /#?(?!\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*=>))/,
628
- alias: "function",
629
- },
630
- parameter: [
631
- {
632
- pattern:
633
- /(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,
634
- lookbehind: !0,
635
- inside: Prism.languages.javascript,
636
- },
637
- {
638
- pattern:
639
- /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,
640
- lookbehind: !0,
641
- inside: Prism.languages.javascript,
642
- },
643
- {
644
- pattern:
645
- /(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,
646
- lookbehind: !0,
647
- inside: Prism.languages.javascript,
648
- },
649
- {
650
- pattern:
651
- /((?:\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*\{)/,
652
- lookbehind: !0,
653
- inside: Prism.languages.javascript,
654
- },
655
- ],
656
- constant: /\b[A-Z](?:[A-Z_]|\dx?)*\b/,
657
- }),
658
- Prism.languages.insertBefore("javascript", "string", {
659
- hashbang: { pattern: /^#!.*/, greedy: !0, alias: "comment" },
660
- "template-string": {
661
- pattern:
662
- /`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,
663
- greedy: !0,
664
- inside: {
665
- "template-punctuation": { pattern: /^`|`$/, alias: "string" },
666
- interpolation: {
667
- pattern:
668
- /((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,
669
- lookbehind: !0,
670
- inside: {
671
- "interpolation-punctuation": {
672
- pattern: /^\$\{|\}$/,
673
- alias: "punctuation",
674
- },
675
- rest: Prism.languages.javascript,
676
- },
677
- },
678
- string: /[\s\S]+/,
679
- },
680
- },
681
- "string-property": {
682
- pattern:
683
- /((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,
684
- lookbehind: !0,
685
- greedy: !0,
686
- alias: "property",
687
- },
688
- }),
689
- Prism.languages.insertBefore("javascript", "operator", {
690
- "literal-property": {
691
- pattern:
692
- /((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,
693
- lookbehind: !0,
694
- alias: "property",
695
- },
696
- }),
697
- Prism.languages.markup &&
698
- (Prism.languages.markup.tag.addInlined("script", "javascript"),
699
- Prism.languages.markup.tag.addAttribute(
700
- "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)",
701
- "javascript",
702
- )),
703
- (Prism.languages.js = Prism.languages.javascript);
606
+ (Prism.languages.javascript["class-name"][0].pattern =
607
+ /(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/),
608
+ Prism.languages.insertBefore("javascript", "keyword", {
609
+ regex: {
610
+ pattern: RegExp(
611
+ "((?:^|[^$\\w\\xA0-\\uFFFF.\"'\\])\\s]|\\b(?:return|yield))\\s*)/(?:(?:\\[(?:[^\\]\\\\\r\n]|\\\\.)*\\]|\\\\.|[^/\\\\\\[\r\n])+/[dgimyus]{0,7}|(?:\\[(?:[^[\\]\\\\\r\n]|\\\\.|\\[(?:[^[\\]\\\\\r\n]|\\\\.|\\[(?:[^[\\]\\\\\r\n]|\\\\.)*\\])*\\])*\\]|\\\\.|[^/\\\\\\[\r\n])+/[dgimyus]{0,7}v[dgimyus]{0,7})(?=(?:\\s|/\\*(?:[^*]|\\*(?!/))*\\*/)*(?:$|[\r\n,.;:})\\]]|//))",
612
+ ),
613
+ lookbehind: !0,
614
+ greedy: !0,
615
+ inside: {
616
+ "regex-source": {
617
+ pattern: /^(\/)[\s\S]+(?=\/[a-z]*$)/,
618
+ lookbehind: !0,
619
+ alias: "language-regex",
620
+ inside: Prism.languages.regex,
621
+ },
622
+ "regex-delimiter": /^\/|\/$/,
623
+ "regex-flags": /^[a-z]+$/,
624
+ },
625
+ },
626
+ "function-variable": {
627
+ pattern:
628
+ /#?(?!\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*=>))/,
629
+ alias: "function",
630
+ },
631
+ parameter: [
632
+ {
633
+ pattern:
634
+ /(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,
635
+ lookbehind: !0,
636
+ inside: Prism.languages.javascript,
637
+ },
638
+ {
639
+ pattern:
640
+ /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,
641
+ lookbehind: !0,
642
+ inside: Prism.languages.javascript,
643
+ },
644
+ {
645
+ pattern:
646
+ /(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,
647
+ lookbehind: !0,
648
+ inside: Prism.languages.javascript,
649
+ },
650
+ {
651
+ pattern:
652
+ /((?:\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*\{)/,
653
+ lookbehind: !0,
654
+ inside: Prism.languages.javascript,
655
+ },
656
+ ],
657
+ constant: /\b[A-Z](?:[A-Z_]|\dx?)*\b/,
658
+ }),
659
+ Prism.languages.insertBefore("javascript", "string", {
660
+ hashbang: { pattern: /^#!.*/, greedy: !0, alias: "comment" },
661
+ "template-string": {
662
+ pattern:
663
+ /`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,
664
+ greedy: !0,
665
+ inside: {
666
+ "template-punctuation": { pattern: /^`|`$/, alias: "string" },
667
+ interpolation: {
668
+ pattern:
669
+ /((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,
670
+ lookbehind: !0,
671
+ inside: {
672
+ "interpolation-punctuation": {
673
+ pattern: /^\$\{|\}$/,
674
+ alias: "punctuation",
675
+ },
676
+ rest: Prism.languages.javascript,
677
+ },
678
+ },
679
+ string: /[\s\S]+/,
680
+ },
681
+ },
682
+ "string-property": {
683
+ pattern:
684
+ /((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,
685
+ lookbehind: !0,
686
+ greedy: !0,
687
+ alias: "property",
688
+ },
689
+ }),
690
+ Prism.languages.insertBefore("javascript", "operator", {
691
+ "literal-property": {
692
+ pattern:
693
+ /((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,
694
+ lookbehind: !0,
695
+ alias: "property",
696
+ },
697
+ }),
698
+ Prism.languages.markup &&
699
+ (Prism.languages.markup.tag.addInlined("script", "javascript"),
700
+ Prism.languages.markup.tag.addAttribute(
701
+ "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)",
702
+ "javascript",
703
+ )),
704
+ (Prism.languages.js = Prism.languages.javascript));
704
705
  !(function (e) {
705
- function n(e, n) {
706
- return "___" + e.toUpperCase() + n + "___";
707
- }
708
- Object.defineProperties((e.languages["markup-templating"] = {}), {
709
- buildPlaceholders: {
710
- value: function (t, a, r, o) {
711
- if (t.language === a) {
712
- var c = (t.tokenStack = []);
713
- (t.code = t.code.replace(r, function (e) {
714
- if ("function" == typeof o && !o(e)) return e;
715
- for (var r, i = c.length; -1 !== t.code.indexOf((r = n(a, i))); )
716
- ++i;
717
- return (c[i] = e), r;
718
- })),
719
- (t.grammar = e.languages.markup);
720
- }
721
- },
722
- },
723
- tokenizePlaceholders: {
724
- value: function (t, a) {
725
- if (t.language === a && t.tokenStack) {
726
- t.grammar = e.languages[a];
727
- var r = 0,
728
- o = Object.keys(t.tokenStack);
729
- !(function c(i) {
730
- for (var u = 0; u < i.length && !(r >= o.length); u++) {
731
- var g = i[u];
732
- if (
733
- "string" == typeof g ||
734
- (g.content && "string" == typeof g.content)
735
- ) {
736
- var l = o[r],
737
- s = t.tokenStack[l],
738
- f = "string" == typeof g ? g : g.content,
739
- p = n(a, l),
740
- k = f.indexOf(p);
741
- if (k > -1) {
742
- ++r;
743
- var m = f.substring(0, k),
744
- d = new e.Token(
745
- a,
746
- e.tokenize(s, t.grammar),
747
- "language-" + a,
748
- s,
749
- ),
750
- h = f.substring(k + p.length),
751
- v = [];
752
- m && v.push.apply(v, c([m])),
753
- v.push(d),
754
- h && v.push.apply(v, c([h])),
755
- "string" == typeof g
756
- ? i.splice.apply(i, [u, 1].concat(v))
757
- : (g.content = v);
758
- }
759
- } else g.content && c(g.content);
760
- }
761
- return i;
762
- })(t.tokens);
763
- }
764
- },
765
- },
766
- });
706
+ function n(e, n) {
707
+ return "___" + e.toUpperCase() + n + "___";
708
+ }
709
+ Object.defineProperties((e.languages["markup-templating"] = {}), {
710
+ buildPlaceholders: {
711
+ value: function (t, a, r, o) {
712
+ if (t.language === a) {
713
+ var c = (t.tokenStack = []);
714
+ ((t.code = t.code.replace(r, function (e) {
715
+ if ("function" == typeof o && !o(e)) return e;
716
+ for (var r, i = c.length; -1 !== t.code.indexOf((r = n(a, i))); )
717
+ ++i;
718
+ return ((c[i] = e), r);
719
+ })),
720
+ (t.grammar = e.languages.markup));
721
+ }
722
+ },
723
+ },
724
+ tokenizePlaceholders: {
725
+ value: function (t, a) {
726
+ if (t.language === a && t.tokenStack) {
727
+ t.grammar = e.languages[a];
728
+ var r = 0,
729
+ o = Object.keys(t.tokenStack);
730
+ !(function c(i) {
731
+ for (var u = 0; u < i.length && !(r >= o.length); u++) {
732
+ var g = i[u];
733
+ if (
734
+ "string" == typeof g ||
735
+ (g.content && "string" == typeof g.content)
736
+ ) {
737
+ var l = o[r],
738
+ s = t.tokenStack[l],
739
+ f = "string" == typeof g ? g : g.content,
740
+ p = n(a, l),
741
+ k = f.indexOf(p);
742
+ if (k > -1) {
743
+ ++r;
744
+ var m = f.substring(0, k),
745
+ d = new e.Token(
746
+ a,
747
+ e.tokenize(s, t.grammar),
748
+ "language-" + a,
749
+ s,
750
+ ),
751
+ h = f.substring(k + p.length),
752
+ v = [];
753
+ (m && v.push.apply(v, c([m])),
754
+ v.push(d),
755
+ h && v.push.apply(v, c([h])),
756
+ "string" == typeof g
757
+ ? i.splice.apply(i, [u, 1].concat(v))
758
+ : (g.content = v));
759
+ }
760
+ } else g.content && c(g.content);
761
+ }
762
+ return i;
763
+ })(t.tokens);
764
+ }
765
+ },
766
+ },
767
+ });
767
768
  })(Prism);
768
769
  !(function (a) {
769
- (a.languages.handlebars = {
770
- comment: /\{\{![\s\S]*?\}\}/,
771
- delimiter: { pattern: /^\{\{\{?|\}\}\}?$/, alias: "punctuation" },
772
- string: /(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,
773
- number: /\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][+-]?\d+)?/,
774
- boolean: /\b(?:false|true)\b/,
775
- block: {
776
- pattern: /^(\s*(?:~\s*)?)[#\/]\S+?(?=\s*(?:~\s*)?$|\s)/,
777
- lookbehind: !0,
778
- alias: "keyword",
779
- },
780
- brackets: {
781
- pattern: /\[[^\]]+\]/,
782
- inside: { punctuation: /\[|\]/, variable: /[\s\S]+/ },
783
- },
784
- punctuation: /[!"#%&':()*+,.\/;<=>@\[\\\]^`{|}~]/,
785
- variable: /[^!"#%&'()*+,\/;<=>@\[\\\]^`{|}~\s]+/,
786
- }),
787
- a.hooks.add("before-tokenize", function (e) {
788
- a.languages["markup-templating"].buildPlaceholders(
789
- e,
790
- "handlebars",
791
- /\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\}/g,
792
- );
793
- }),
794
- a.hooks.add("after-tokenize", function (e) {
795
- a.languages["markup-templating"].tokenizePlaceholders(e, "handlebars");
796
- }),
797
- (a.languages.hbs = a.languages.handlebars),
798
- (a.languages.mustache = a.languages.handlebars);
770
+ ((a.languages.handlebars = {
771
+ comment: /\{\{![\s\S]*?\}\}/,
772
+ delimiter: { pattern: /^\{\{\{?|\}\}\}?$/, alias: "punctuation" },
773
+ string: /(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,
774
+ number: /\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][+-]?\d+)?/,
775
+ boolean: /\b(?:false|true)\b/,
776
+ block: {
777
+ pattern: /^(\s*(?:~\s*)?)[#\/]\S+?(?=\s*(?:~\s*)?$|\s)/,
778
+ lookbehind: !0,
779
+ alias: "keyword",
780
+ },
781
+ brackets: {
782
+ pattern: /\[[^\]]+\]/,
783
+ inside: { punctuation: /\[|\]/, variable: /[\s\S]+/ },
784
+ },
785
+ punctuation: /[!"#%&':()*+,.\/;<=>@\[\\\]^`{|}~]/,
786
+ variable: /[^!"#%&'()*+,\/;<=>@\[\\\]^`{|}~\s]+/,
787
+ }),
788
+ a.hooks.add("before-tokenize", function (e) {
789
+ a.languages["markup-templating"].buildPlaceholders(
790
+ e,
791
+ "handlebars",
792
+ /\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\}/g,
793
+ );
794
+ }),
795
+ a.hooks.add("after-tokenize", function (e) {
796
+ a.languages["markup-templating"].tokenizePlaceholders(e, "handlebars");
797
+ }),
798
+ (a.languages.hbs = a.languages.handlebars),
799
+ (a.languages.mustache = a.languages.handlebars));
799
800
  })(Prism);
800
- (Prism.languages.json = {
801
- property: {
802
- pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,
803
- lookbehind: !0,
804
- greedy: !0,
805
- },
806
- string: {
807
- pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,
808
- lookbehind: !0,
809
- greedy: !0,
810
- },
811
- comment: { pattern: /\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/, greedy: !0 },
812
- number: /-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,
813
- punctuation: /[{}[\],]/,
814
- operator: /:/,
815
- boolean: /\b(?:false|true)\b/,
816
- null: { pattern: /\bnull\b/, alias: "keyword" },
801
+ ((Prism.languages.json = {
802
+ property: {
803
+ pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,
804
+ lookbehind: !0,
805
+ greedy: !0,
806
+ },
807
+ string: {
808
+ pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,
809
+ lookbehind: !0,
810
+ greedy: !0,
811
+ },
812
+ comment: { pattern: /\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/, greedy: !0 },
813
+ number: /-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,
814
+ punctuation: /[{}[\],]/,
815
+ operator: /:/,
816
+ boolean: /\b(?:false|true)\b/,
817
+ null: { pattern: /\bnull\b/, alias: "keyword" },
817
818
  }),
818
- (Prism.languages.webmanifest = Prism.languages.json);
819
+ (Prism.languages.webmanifest = Prism.languages.json));
819
820
  !(function (e) {
820
- e.languages.pug = {
821
- comment: {
822
- pattern: /(^([\t ]*))\/\/.*(?:(?:\r?\n|\r)\2[\t ].+)*/m,
823
- lookbehind: !0,
824
- },
825
- "multiline-script": {
826
- pattern:
827
- /(^([\t ]*)script\b.*\.[\t ]*)(?:(?:\r?\n|\r(?!\n))(?:\2[\t ].+|\s*?(?=\r?\n|\r)))+/m,
828
- lookbehind: !0,
829
- inside: e.languages.javascript,
830
- },
831
- filter: {
832
- pattern:
833
- /(^([\t ]*)):.+(?:(?:\r?\n|\r(?!\n))(?:\2[\t ].+|\s*?(?=\r?\n|\r)))+/m,
834
- lookbehind: !0,
835
- inside: {
836
- "filter-name": { pattern: /^:[\w-]+/, alias: "variable" },
837
- text: /\S[\s\S]*/,
838
- },
839
- },
840
- "multiline-plain-text": {
841
- pattern:
842
- /(^([\t ]*)[\w\-#.]+\.[\t ]*)(?:(?:\r?\n|\r(?!\n))(?:\2[\t ].+|\s*?(?=\r?\n|\r)))+/m,
843
- lookbehind: !0,
844
- },
845
- markup: {
846
- pattern: /(^[\t ]*)<.+/m,
847
- lookbehind: !0,
848
- inside: e.languages.markup,
849
- },
850
- doctype: { pattern: /((?:^|\n)[\t ]*)doctype(?: .+)?/, lookbehind: !0 },
851
- "flow-control": {
852
- pattern:
853
- /(^[\t ]*)(?:case|default|each|else|if|unless|when|while)\b(?: .+)?/m,
854
- lookbehind: !0,
855
- inside: {
856
- each: {
857
- pattern: /^each .+? in\b/,
858
- inside: { keyword: /\b(?:each|in)\b/, punctuation: /,/ },
859
- },
860
- branch: {
861
- pattern: /^(?:case|default|else|if|unless|when|while)\b/,
862
- alias: "keyword",
863
- },
864
- rest: e.languages.javascript,
865
- },
866
- },
867
- keyword: {
868
- pattern: /(^[\t ]*)(?:append|block|extends|include|prepend)\b.+/m,
869
- lookbehind: !0,
870
- },
871
- mixin: [
872
- {
873
- pattern: /(^[\t ]*)mixin .+/m,
874
- lookbehind: !0,
875
- inside: {
876
- keyword: /^mixin/,
877
- function: /\w+(?=\s*\(|\s*$)/,
878
- punctuation: /[(),.]/,
879
- },
880
- },
881
- {
882
- pattern: /(^[\t ]*)\+.+/m,
883
- lookbehind: !0,
884
- inside: {
885
- name: { pattern: /^\+\w+/, alias: "function" },
886
- rest: e.languages.javascript,
887
- },
888
- },
889
- ],
890
- script: {
891
- pattern: /(^[\t ]*script(?:(?:&[^(]+)?\([^)]+\))*[\t ]).+/m,
892
- lookbehind: !0,
893
- inside: e.languages.javascript,
894
- },
895
- "plain-text": {
896
- pattern:
897
- /(^[\t ]*(?!-)[\w\-#.]*[\w\-](?:(?:&[^(]+)?\([^)]+\))*\/?[\t ]).+/m,
898
- lookbehind: !0,
899
- },
900
- tag: {
901
- pattern: /(^[\t ]*)(?!-)[\w\-#.]*[\w\-](?:(?:&[^(]+)?\([^)]+\))*\/?:?/m,
902
- lookbehind: !0,
903
- inside: {
904
- attributes: [
905
- { pattern: /&[^(]+\([^)]+\)/, inside: e.languages.javascript },
906
- {
907
- pattern: /\([^)]+\)/,
908
- inside: {
909
- "attr-value": {
910
- pattern: /(=\s*(?!\s))(?:\{[^}]*\}|[^,)\r\n]+)/,
911
- lookbehind: !0,
912
- inside: e.languages.javascript,
913
- },
914
- "attr-name": /[\w-]+(?=\s*!?=|\s*[,)])/,
915
- punctuation: /[!=(),]+/,
916
- },
917
- },
918
- ],
919
- punctuation: /:/,
920
- "attr-id": /#[\w\-]+/,
921
- "attr-class": /\.[\w\-]+/,
922
- },
923
- },
924
- code: [
925
- {
926
- pattern: /(^[\t ]*(?:-|!?=)).+/m,
927
- lookbehind: !0,
928
- inside: e.languages.javascript,
929
- },
930
- ],
931
- punctuation: /[.\-!=|]+/,
932
- };
933
- for (
934
- var t = [
935
- { filter: "atpl", language: "twig" },
936
- { filter: "coffee", language: "coffeescript" },
937
- "ejs",
938
- "handlebars",
939
- "less",
940
- "livescript",
941
- "markdown",
942
- { filter: "sass", language: "scss" },
943
- "stylus",
944
- ],
945
- n = {},
946
- a = 0,
947
- i = t.length;
948
- a < i;
949
- a++
950
- ) {
951
- var r = t[a];
952
- (r = "string" == typeof r ? { filter: r, language: r } : r),
953
- e.languages[r.language] &&
954
- (n["filter-" + r.filter] = {
955
- pattern: RegExp(
956
- "(^([\t ]*)):<filter_name>(?:(?:\r?\n|\r(?!\n))(?:\\2[\t ].+|\\s*?(?=\r?\n|\r)))+".replace(
957
- "<filter_name>",
958
- function () {
959
- return r.filter;
960
- },
961
- ),
962
- "m",
963
- ),
964
- lookbehind: !0,
965
- inside: {
966
- "filter-name": { pattern: /^:[\w-]+/, alias: "variable" },
967
- text: {
968
- pattern: /\S[\s\S]*/,
969
- alias: [r.language, "language-" + r.language],
970
- inside: e.languages[r.language],
971
- },
972
- },
973
- });
974
- }
975
- e.languages.insertBefore("pug", "filter", n);
821
+ e.languages.pug = {
822
+ comment: {
823
+ pattern: /(^([\t ]*))\/\/.*(?:(?:\r?\n|\r)\2[\t ].+)*/m,
824
+ lookbehind: !0,
825
+ },
826
+ "multiline-script": {
827
+ pattern:
828
+ /(^([\t ]*)script\b.*\.[\t ]*)(?:(?:\r?\n|\r(?!\n))(?:\2[\t ].+|\s*?(?=\r?\n|\r)))+/m,
829
+ lookbehind: !0,
830
+ inside: e.languages.javascript,
831
+ },
832
+ filter: {
833
+ pattern:
834
+ /(^([\t ]*)):.+(?:(?:\r?\n|\r(?!\n))(?:\2[\t ].+|\s*?(?=\r?\n|\r)))+/m,
835
+ lookbehind: !0,
836
+ inside: {
837
+ "filter-name": { pattern: /^:[\w-]+/, alias: "variable" },
838
+ text: /\S[\s\S]*/,
839
+ },
840
+ },
841
+ "multiline-plain-text": {
842
+ pattern:
843
+ /(^([\t ]*)[\w\-#.]+\.[\t ]*)(?:(?:\r?\n|\r(?!\n))(?:\2[\t ].+|\s*?(?=\r?\n|\r)))+/m,
844
+ lookbehind: !0,
845
+ },
846
+ markup: {
847
+ pattern: /(^[\t ]*)<.+/m,
848
+ lookbehind: !0,
849
+ inside: e.languages.markup,
850
+ },
851
+ doctype: { pattern: /((?:^|\n)[\t ]*)doctype(?: .+)?/, lookbehind: !0 },
852
+ "flow-control": {
853
+ pattern:
854
+ /(^[\t ]*)(?:case|default|each|else|if|unless|when|while)\b(?: .+)?/m,
855
+ lookbehind: !0,
856
+ inside: {
857
+ each: {
858
+ pattern: /^each .+? in\b/,
859
+ inside: { keyword: /\b(?:each|in)\b/, punctuation: /,/ },
860
+ },
861
+ branch: {
862
+ pattern: /^(?:case|default|else|if|unless|when|while)\b/,
863
+ alias: "keyword",
864
+ },
865
+ rest: e.languages.javascript,
866
+ },
867
+ },
868
+ keyword: {
869
+ pattern: /(^[\t ]*)(?:append|block|extends|include|prepend)\b.+/m,
870
+ lookbehind: !0,
871
+ },
872
+ mixin: [
873
+ {
874
+ pattern: /(^[\t ]*)mixin .+/m,
875
+ lookbehind: !0,
876
+ inside: {
877
+ keyword: /^mixin/,
878
+ function: /\w+(?=\s*\(|\s*$)/,
879
+ punctuation: /[(),.]/,
880
+ },
881
+ },
882
+ {
883
+ pattern: /(^[\t ]*)\+.+/m,
884
+ lookbehind: !0,
885
+ inside: {
886
+ name: { pattern: /^\+\w+/, alias: "function" },
887
+ rest: e.languages.javascript,
888
+ },
889
+ },
890
+ ],
891
+ script: {
892
+ pattern: /(^[\t ]*script(?:(?:&[^(]+)?\([^)]+\))*[\t ]).+/m,
893
+ lookbehind: !0,
894
+ inside: e.languages.javascript,
895
+ },
896
+ "plain-text": {
897
+ pattern:
898
+ /(^[\t ]*(?!-)[\w\-#.]*[\w\-](?:(?:&[^(]+)?\([^)]+\))*\/?[\t ]).+/m,
899
+ lookbehind: !0,
900
+ },
901
+ tag: {
902
+ pattern: /(^[\t ]*)(?!-)[\w\-#.]*[\w\-](?:(?:&[^(]+)?\([^)]+\))*\/?:?/m,
903
+ lookbehind: !0,
904
+ inside: {
905
+ attributes: [
906
+ { pattern: /&[^(]+\([^)]+\)/, inside: e.languages.javascript },
907
+ {
908
+ pattern: /\([^)]+\)/,
909
+ inside: {
910
+ "attr-value": {
911
+ pattern: /(=\s*(?!\s))(?:\{[^}]*\}|[^,)\r\n]+)/,
912
+ lookbehind: !0,
913
+ inside: e.languages.javascript,
914
+ },
915
+ "attr-name": /[\w-]+(?=\s*!?=|\s*[,)])/,
916
+ punctuation: /[!=(),]+/,
917
+ },
918
+ },
919
+ ],
920
+ punctuation: /:/,
921
+ "attr-id": /#[\w\-]+/,
922
+ "attr-class": /\.[\w\-]+/,
923
+ },
924
+ },
925
+ code: [
926
+ {
927
+ pattern: /(^[\t ]*(?:-|!?=)).+/m,
928
+ lookbehind: !0,
929
+ inside: e.languages.javascript,
930
+ },
931
+ ],
932
+ punctuation: /[.\-!=|]+/,
933
+ };
934
+ for (
935
+ var t = [
936
+ { filter: "atpl", language: "twig" },
937
+ { filter: "coffee", language: "coffeescript" },
938
+ "ejs",
939
+ "handlebars",
940
+ "less",
941
+ "livescript",
942
+ "markdown",
943
+ { filter: "sass", language: "scss" },
944
+ "stylus",
945
+ ],
946
+ n = {},
947
+ a = 0,
948
+ i = t.length;
949
+ a < i;
950
+ a++
951
+ ) {
952
+ var r = t[a];
953
+ ((r = "string" == typeof r ? { filter: r, language: r } : r),
954
+ e.languages[r.language] &&
955
+ (n["filter-" + r.filter] = {
956
+ pattern: RegExp(
957
+ "(^([\t ]*)):<filter_name>(?:(?:\r?\n|\r(?!\n))(?:\\2[\t ].+|\\s*?(?=\r?\n|\r)))+".replace(
958
+ "<filter_name>",
959
+ function () {
960
+ return r.filter;
961
+ },
962
+ ),
963
+ "m",
964
+ ),
965
+ lookbehind: !0,
966
+ inside: {
967
+ "filter-name": { pattern: /^:[\w-]+/, alias: "variable" },
968
+ text: {
969
+ pattern: /\S[\s\S]*/,
970
+ alias: [r.language, "language-" + r.language],
971
+ inside: e.languages[r.language],
972
+ },
973
+ },
974
+ }));
975
+ }
976
+ e.languages.insertBefore("pug", "filter", n);
976
977
  })(Prism);
977
- (Prism.languages.twig = {
978
- comment: /^\{#[\s\S]*?#\}$/,
979
- "tag-name": { pattern: /(^\{%-?\s*)\w+/, lookbehind: !0, alias: "keyword" },
980
- delimiter: { pattern: /^\{[{%]-?|-?[%}]\}$/, alias: "punctuation" },
981
- string: {
982
- pattern: /("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,
983
- inside: { punctuation: /^['"]|['"]$/ },
984
- },
985
- keyword: /\b(?:even|if|odd)\b/,
986
- boolean: /\b(?:false|null|true)\b/,
987
- number: /\b0x[\dA-Fa-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][-+]?\d+)?/,
988
- operator: [
989
- {
990
- pattern:
991
- /(\s)(?:and|b-and|b-or|b-xor|ends with|in|is|matches|not|or|same as|starts with)(?=\s)/,
992
- lookbehind: !0,
993
- },
994
- /[=<>]=?|!=|\*\*?|\/\/?|\?:?|[-+~%|]/,
995
- ],
996
- punctuation: /[()\[\]{}:.,]/,
978
+ ((Prism.languages.twig = {
979
+ comment: /^\{#[\s\S]*?#\}$/,
980
+ "tag-name": { pattern: /(^\{%-?\s*)\w+/, lookbehind: !0, alias: "keyword" },
981
+ delimiter: { pattern: /^\{[{%]-?|-?[%}]\}$/, alias: "punctuation" },
982
+ string: {
983
+ pattern: /("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,
984
+ inside: { punctuation: /^['"]|['"]$/ },
985
+ },
986
+ keyword: /\b(?:even|if|odd)\b/,
987
+ boolean: /\b(?:false|null|true)\b/,
988
+ number: /\b0x[\dA-Fa-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][-+]?\d+)?/,
989
+ operator: [
990
+ {
991
+ pattern:
992
+ /(\s)(?:and|b-and|b-or|b-xor|ends with|in|is|matches|not|or|same as|starts with)(?=\s)/,
993
+ lookbehind: !0,
994
+ },
995
+ /[=<>]=?|!=|\*\*?|\/\/?|\?:?|[-+~%|]/,
996
+ ],
997
+ punctuation: /[()\[\]{}:.,]/,
997
998
  }),
998
- Prism.hooks.add("before-tokenize", function (e) {
999
- "twig" === e.language &&
1000
- Prism.languages["markup-templating"].buildPlaceholders(
1001
- e,
1002
- "twig",
1003
- /\{(?:#[\s\S]*?#|%[\s\S]*?%|\{[\s\S]*?\})\}/g,
1004
- );
1005
- }),
1006
- Prism.hooks.add("after-tokenize", function (e) {
1007
- Prism.languages["markup-templating"].tokenizePlaceholders(e, "twig");
1008
- });
999
+ Prism.hooks.add("before-tokenize", function (e) {
1000
+ "twig" === e.language &&
1001
+ Prism.languages["markup-templating"].buildPlaceholders(
1002
+ e,
1003
+ "twig",
1004
+ /\{(?:#[\s\S]*?#|%[\s\S]*?%|\{[\s\S]*?\})\}/g,
1005
+ );
1006
+ }),
1007
+ Prism.hooks.add("after-tokenize", function (e) {
1008
+ Prism.languages["markup-templating"].tokenizePlaceholders(e, "twig");
1009
+ }));
1009
1010
  !(function (e) {
1010
- var n = /[*&][^\s[\]{},]+/,
1011
- r =
1012
- /!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,
1013
- t =
1014
- "(?:" +
1015
- r.source +
1016
- "(?:[ \t]+" +
1017
- n.source +
1018
- ")?|" +
1019
- n.source +
1020
- "(?:[ \t]+" +
1021
- r.source +
1022
- ")?)",
1023
- a =
1024
- "(?:[^\\s\\x00-\\x08\\x0e-\\x1f!\"#%&'*,\\-:>?@[\\]`{|}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*".replace(
1025
- /<PLAIN>/g,
1026
- function () {
1027
- return "[^\\s\\x00-\\x08\\x0e-\\x1f,[\\]{}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]";
1028
- },
1029
- ),
1030
- d = "\"(?:[^\"\\\\\r\n]|\\\\.)*\"|'(?:[^'\\\\\r\n]|\\\\.)*'";
1031
- function o(e, n) {
1032
- n = (n || "").replace(/m/g, "") + "m";
1033
- var r =
1034
- "([:\\-,[{]\\s*(?:\\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\\]|\\}|(?:[\r\n]\\s*)?#))"
1035
- .replace(/<<prop>>/g, function () {
1036
- return t;
1037
- })
1038
- .replace(/<<value>>/g, function () {
1039
- return e;
1040
- });
1041
- return RegExp(r, n);
1042
- }
1043
- (e.languages.yaml = {
1044
- scalar: {
1045
- pattern: RegExp(
1046
- "([\\-:]\\s*(?:\\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\\S[^\r\n]*(?:\\2[^\r\n]+)*)".replace(
1047
- /<<prop>>/g,
1048
- function () {
1049
- return t;
1050
- },
1051
- ),
1052
- ),
1053
- lookbehind: !0,
1054
- alias: "string",
1055
- },
1056
- comment: /#.*/,
1057
- key: {
1058
- pattern: RegExp(
1059
- "((?:^|[:\\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\\s*:\\s)"
1060
- .replace(/<<prop>>/g, function () {
1061
- return t;
1062
- })
1063
- .replace(/<<key>>/g, function () {
1064
- return "(?:" + a + "|" + d + ")";
1065
- }),
1066
- ),
1067
- lookbehind: !0,
1068
- greedy: !0,
1069
- alias: "atrule",
1070
- },
1071
- directive: { pattern: /(^[ \t]*)%.+/m, lookbehind: !0, alias: "important" },
1072
- datetime: {
1073
- pattern: o(
1074
- "\\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*)?)?",
1075
- ),
1076
- lookbehind: !0,
1077
- alias: "number",
1078
- },
1079
- boolean: {
1080
- pattern: o("false|true", "i"),
1081
- lookbehind: !0,
1082
- alias: "important",
1083
- },
1084
- null: { pattern: o("null|~", "i"), lookbehind: !0, alias: "important" },
1085
- string: { pattern: o(d), lookbehind: !0, greedy: !0 },
1086
- number: {
1087
- pattern: o(
1088
- "[+-]?(?:0x[\\da-f]+|0o[0-7]+|(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:e[+-]?\\d+)?|\\.inf|\\.nan)",
1089
- "i",
1090
- ),
1091
- lookbehind: !0,
1092
- },
1093
- tag: r,
1094
- important: n,
1095
- punctuation: /---|[:[\]{}\-,|>?]|\.\.\./,
1096
- }),
1097
- (e.languages.yml = e.languages.yaml);
1011
+ var n = /[*&][^\s[\]{},]+/,
1012
+ r =
1013
+ /!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,
1014
+ t =
1015
+ "(?:" +
1016
+ r.source +
1017
+ "(?:[ \t]+" +
1018
+ n.source +
1019
+ ")?|" +
1020
+ n.source +
1021
+ "(?:[ \t]+" +
1022
+ r.source +
1023
+ ")?)",
1024
+ a =
1025
+ "(?:[^\\s\\x00-\\x08\\x0e-\\x1f!\"#%&'*,\\-:>?@[\\]`{|}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*".replace(
1026
+ /<PLAIN>/g,
1027
+ function () {
1028
+ return "[^\\s\\x00-\\x08\\x0e-\\x1f,[\\]{}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]";
1029
+ },
1030
+ ),
1031
+ d = "\"(?:[^\"\\\\\r\n]|\\\\.)*\"|'(?:[^'\\\\\r\n]|\\\\.)*'";
1032
+ function o(e, n) {
1033
+ n = (n || "").replace(/m/g, "") + "m";
1034
+ var r =
1035
+ "([:\\-,[{]\\s*(?:\\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\\]|\\}|(?:[\r\n]\\s*)?#))"
1036
+ .replace(/<<prop>>/g, function () {
1037
+ return t;
1038
+ })
1039
+ .replace(/<<value>>/g, function () {
1040
+ return e;
1041
+ });
1042
+ return RegExp(r, n);
1043
+ }
1044
+ ((e.languages.yaml = {
1045
+ scalar: {
1046
+ pattern: RegExp(
1047
+ "([\\-:]\\s*(?:\\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\\S[^\r\n]*(?:\\2[^\r\n]+)*)".replace(
1048
+ /<<prop>>/g,
1049
+ function () {
1050
+ return t;
1051
+ },
1052
+ ),
1053
+ ),
1054
+ lookbehind: !0,
1055
+ alias: "string",
1056
+ },
1057
+ comment: /#.*/,
1058
+ key: {
1059
+ pattern: RegExp(
1060
+ "((?:^|[:\\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\\s*:\\s)"
1061
+ .replace(/<<prop>>/g, function () {
1062
+ return t;
1063
+ })
1064
+ .replace(/<<key>>/g, function () {
1065
+ return "(?:" + a + "|" + d + ")";
1066
+ }),
1067
+ ),
1068
+ lookbehind: !0,
1069
+ greedy: !0,
1070
+ alias: "atrule",
1071
+ },
1072
+ directive: { pattern: /(^[ \t]*)%.+/m, lookbehind: !0, alias: "important" },
1073
+ datetime: {
1074
+ pattern: o(
1075
+ "\\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*)?)?",
1076
+ ),
1077
+ lookbehind: !0,
1078
+ alias: "number",
1079
+ },
1080
+ boolean: {
1081
+ pattern: o("false|true", "i"),
1082
+ lookbehind: !0,
1083
+ alias: "important",
1084
+ },
1085
+ null: { pattern: o("null|~", "i"), lookbehind: !0, alias: "important" },
1086
+ string: { pattern: o(d), lookbehind: !0, greedy: !0 },
1087
+ number: {
1088
+ pattern: o(
1089
+ "[+-]?(?:0x[\\da-f]+|0o[0-7]+|(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:e[+-]?\\d+)?|\\.inf|\\.nan)",
1090
+ "i",
1091
+ ),
1092
+ lookbehind: !0,
1093
+ },
1094
+ tag: r,
1095
+ important: n,
1096
+ punctuation: /---|[:[\]{}\-,|>?]|\.\.\./,
1097
+ }),
1098
+ (e.languages.yml = e.languages.yaml));
1098
1099
  })(Prism);