@trishchuk/coolors-mcp 1.0.0 → 1.0.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 (66) hide show
  1. package/.claude/settings.local.json +2 -6
  2. package/.github/ISSUE_TEMPLATE/bug_report.md +20 -8
  3. package/.github/ISSUE_TEMPLATE/feature_request.md +22 -8
  4. package/.github/pull_request_template.md +33 -8
  5. package/.github/workflows/ci.yml +97 -97
  6. package/.github/workflows/deploy-docs.yml +9 -9
  7. package/.github/workflows/release.yml +15 -15
  8. package/README.md +26 -1
  9. package/TOOLS_UK.md +233 -0
  10. package/docs/.vitepress/cache/deps/@braintree_sanitize-url.js +30 -12
  11. package/docs/.vitepress/cache/deps/_metadata.json +1 -1
  12. package/docs/.vitepress/cache/deps/chunk-BUSYA2B4.js +9 -6
  13. package/docs/.vitepress/cache/deps/chunk-JD3CXNQ6.js +2543 -1612
  14. package/docs/.vitepress/cache/deps/chunk-SYPOPCWC.js +3508 -2529
  15. package/docs/.vitepress/cache/deps/cytoscape-cose-bilkent.js +1902 -1003
  16. package/docs/.vitepress/cache/deps/cytoscape.js +13303 -7347
  17. package/docs/.vitepress/cache/deps/dayjs.js +494 -272
  18. package/docs/.vitepress/cache/deps/debug.js +82 -38
  19. package/docs/.vitepress/cache/deps/prismjs.js +444 -272
  20. package/docs/.vitepress/cache/deps/prismjs_components_prism-bash.js +80 -73
  21. package/docs/.vitepress/cache/deps/prismjs_components_prism-javascript.js +93 -62
  22. package/docs/.vitepress/cache/deps/prismjs_components_prism-json.js +13 -13
  23. package/docs/.vitepress/cache/deps/prismjs_components_prism-python.js +34 -27
  24. package/docs/.vitepress/cache/deps/prismjs_components_prism-typescript.js +20 -17
  25. package/docs/.vitepress/cache/deps/prismjs_components_prism-yaml.js +75 -41
  26. package/docs/.vitepress/cache/deps/vitepress___@vue_devtools-api.js +2005 -1438
  27. package/docs/.vitepress/cache/deps/vitepress___@vueuse_core.js +2 -2
  28. package/docs/.vitepress/cache/deps/vitepress___@vueuse_integrations_useFocusTrap.js +566 -229
  29. package/docs/.vitepress/cache/deps/vitepress___mark__js_src_vanilla__js.js +382 -270
  30. package/docs/.vitepress/cache/deps/vitepress___minisearch.js +334 -125
  31. package/docs/.vitepress/cache/deps/vue.js +2 -2
  32. package/docs/.vitepress/components/ClientGrid.vue +9 -3
  33. package/docs/.vitepress/components/CodeBlock.vue +51 -44
  34. package/docs/.vitepress/components/ConfigModal.vue +151 -67
  35. package/docs/.vitepress/components/DiagramModal.vue +186 -154
  36. package/docs/.vitepress/components/TroubleshootingModal.vue +101 -96
  37. package/docs/.vitepress/config.js +171 -141
  38. package/docs/.vitepress/theme/FundingLayout.vue +65 -54
  39. package/docs/.vitepress/theme/Layout.vue +21 -21
  40. package/docs/.vitepress/theme/components/AdBanner.vue +73 -52
  41. package/docs/.vitepress/theme/components/AdPlaceholder.vue +3 -3
  42. package/docs/.vitepress/theme/components/FundingEffects.vue +77 -53
  43. package/docs/.vitepress/theme/components/FundingHero.vue +78 -63
  44. package/docs/.vitepress/theme/components/SupportSection.vue +106 -89
  45. package/docs/.vitepress/theme/custom-app.css +19 -12
  46. package/docs/.vitepress/theme/custom.css +33 -25
  47. package/docs/.vitepress/theme/index.js +19 -16
  48. package/docs/concepts/accessibility.md +59 -47
  49. package/docs/concepts/color-spaces.md +28 -6
  50. package/docs/concepts/distance-metrics.md +45 -30
  51. package/docs/concepts/hct.md +30 -27
  52. package/docs/concepts/image-analysis.md +52 -21
  53. package/docs/concepts/material-design.md +43 -17
  54. package/docs/concepts/theme-matching.md +64 -40
  55. package/docs/examples/basic-colors.md +92 -108
  56. package/docs/examples/creating-themes.md +104 -108
  57. package/docs/examples/css-refactoring.md +33 -29
  58. package/docs/examples/image-extraction.md +145 -138
  59. package/docs/getting-started.md +45 -34
  60. package/docs/index.md +5 -1
  61. package/docs/installation.md +15 -1
  62. package/docs/tools/accessibility.md +74 -68
  63. package/docs/tools/image-extraction.md +62 -54
  64. package/docs/tools/theme-matching.md +45 -42
  65. package/note.md +1 -2
  66. package/package.json +2 -2
@@ -1,12 +1,16 @@
1
- import {
2
- __commonJS
3
- } from "./chunk-BUSYA2B4.js";
1
+ import { __commonJS } from "./chunk-BUSYA2B4.js";
4
2
 
5
3
  // node_modules/prismjs/prism.js
6
4
  var require_prism = __commonJS({
7
5
  "node_modules/prismjs/prism.js"(exports, module) {
8
- var _self = typeof window !== "undefined" ? window : typeof WorkerGlobalScope !== "undefined" && self instanceof WorkerGlobalScope ? self : {};
9
- var Prism = function(_self2) {
6
+ var _self =
7
+ typeof window !== "undefined"
8
+ ? window
9
+ : typeof WorkerGlobalScope !== "undefined" &&
10
+ self instanceof WorkerGlobalScope
11
+ ? self
12
+ : {};
13
+ var Prism = (function (_self2) {
10
14
  var lang = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i;
11
15
  var uniqueId = 0;
12
16
  var plainTextGrammar = {};
@@ -54,7 +58,8 @@ var require_prism = __commonJS({
54
58
  * @memberof Prism
55
59
  * @public
56
60
  */
57
- disableWorkerMessageHandler: _self2.Prism && _self2.Prism.disableWorkerMessageHandler,
61
+ disableWorkerMessageHandler:
62
+ _self2.Prism && _self2.Prism.disableWorkerMessageHandler,
58
63
  /**
59
64
  * A namespace for utility methods.
60
65
  *
@@ -67,11 +72,18 @@ var require_prism = __commonJS({
67
72
  util: {
68
73
  encode: function encode(tokens) {
69
74
  if (tokens instanceof Token) {
70
- return new Token(tokens.type, encode(tokens.content), tokens.alias);
75
+ return new Token(
76
+ tokens.type,
77
+ encode(tokens.content),
78
+ tokens.alias,
79
+ );
71
80
  } else if (Array.isArray(tokens)) {
72
81
  return tokens.map(encode);
73
82
  } else {
74
- return tokens.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/\u00a0/g, " ");
83
+ return tokens
84
+ .replace(/&/g, "&amp;")
85
+ .replace(/</g, "&lt;")
86
+ .replace(/\u00a0/g, " ");
75
87
  }
76
88
  },
77
89
  /**
@@ -90,7 +102,7 @@ var require_prism = __commonJS({
90
102
  * type(String) === 'Function'
91
103
  * type(/abc+/) === 'RegExp'
92
104
  */
93
- type: function(o) {
105
+ type: function (o) {
94
106
  return Object.prototype.toString.call(o).slice(8, -1);
95
107
  },
96
108
  /**
@@ -99,7 +111,7 @@ var require_prism = __commonJS({
99
111
  * @param {Object} obj
100
112
  * @returns {number}
101
113
  */
102
- objId: function(obj) {
114
+ objId: function (obj) {
103
115
  if (!obj["__id"]) {
104
116
  Object.defineProperty(obj, "__id", { value: ++uniqueId });
105
117
  }
@@ -125,8 +137,7 @@ var require_prism = __commonJS({
125
137
  if (visited[id]) {
126
138
  return visited[id];
127
139
  }
128
- clone = /** @type {Record<string, any>} */
129
- {};
140
+ clone = /** @type {Record<string, any>} */ {};
130
141
  visited[id] = clone;
131
142
  for (var key in o) {
132
143
  if (o.hasOwnProperty(key)) {
@@ -146,7 +157,7 @@ var require_prism = __commonJS({
146
157
  visited[id] = clone;
147
158
  /** @type {Array} */
148
159
  /** @type {any} */
149
- o.forEach(function(v, i) {
160
+ o.forEach(function (v, i) {
150
161
  clone[i] = deepClone(v, visited);
151
162
  });
152
163
  return (
@@ -165,7 +176,7 @@ var require_prism = __commonJS({
165
176
  * @param {Element} element
166
177
  * @returns {string}
167
178
  */
168
- getLanguage: function(element) {
179
+ getLanguage: function (element) {
169
180
  while (element) {
170
181
  var m = lang.exec(element.className);
171
182
  if (m) {
@@ -182,8 +193,11 @@ var require_prism = __commonJS({
182
193
  * @param {string} language
183
194
  * @returns {void}
184
195
  */
185
- setLanguage: function(element, language) {
186
- element.className = element.className.replace(RegExp(lang, "gi"), "");
196
+ setLanguage: function (element, language) {
197
+ element.className = element.className.replace(
198
+ RegExp(lang, "gi"),
199
+ "",
200
+ );
187
201
  element.classList.add("language-" + language);
188
202
  },
189
203
  /**
@@ -193,11 +207,15 @@ var require_prism = __commonJS({
193
207
  *
194
208
  * @returns {HTMLScriptElement | null}
195
209
  */
196
- currentScript: function() {
210
+ currentScript: function () {
197
211
  if (typeof document === "undefined") {
198
212
  return null;
199
213
  }
200
- if (document.currentScript && document.currentScript.tagName === "SCRIPT" && 1 < 2) {
214
+ if (
215
+ document.currentScript &&
216
+ document.currentScript.tagName === "SCRIPT" &&
217
+ 1 < 2
218
+ ) {
201
219
  return (
202
220
  /** @type {any} */
203
221
  document.currentScript
@@ -206,7 +224,8 @@ var require_prism = __commonJS({
206
224
  try {
207
225
  throw new Error();
208
226
  } catch (err) {
209
- var src = (/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(err.stack) || [])[1];
227
+ var src = (/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(err.stack) ||
228
+ [])[1];
210
229
  if (src) {
211
230
  var scripts = document.getElementsByTagName("script");
212
231
  for (var i in scripts) {
@@ -237,7 +256,7 @@ var require_prism = __commonJS({
237
256
  * @param {boolean} [defaultActivation=false]
238
257
  * @returns {boolean}
239
258
  */
240
- isActive: function(element, className, defaultActivation) {
259
+ isActive: function (element, className, defaultActivation) {
241
260
  var no = "no-" + className;
242
261
  while (element) {
243
262
  var classList = element.classList;
@@ -250,7 +269,7 @@ var require_prism = __commonJS({
250
269
  element = element.parentElement;
251
270
  }
252
271
  return !!defaultActivation;
253
- }
272
+ },
254
273
  },
255
274
  /**
256
275
  * This namespace contains all currently loaded languages and the some helper functions to create and modify languages.
@@ -295,7 +314,7 @@ var require_prism = __commonJS({
295
314
  * 'color': /\b(?:red|green|blue)\b/
296
315
  * });
297
316
  */
298
- extend: function(id, redef) {
317
+ extend: function (id, redef) {
299
318
  var lang2 = _.util.clone(_.languages[id]);
300
319
  for (var key in redef) {
301
320
  lang2[key] = redef[key];
@@ -377,9 +396,8 @@ var require_prism = __commonJS({
377
396
  * @returns {Grammar} The new grammar object.
378
397
  * @public
379
398
  */
380
- insertBefore: function(inside, before, insert, root) {
381
- root = root || /** @type {any} */
382
- _.languages;
399
+ insertBefore: function (inside, before, insert, root) {
400
+ root = root || /** @type {any} */ _.languages;
383
401
  var grammar = root[inside];
384
402
  var ret = {};
385
403
  for (var token in grammar) {
@@ -398,7 +416,7 @@ var require_prism = __commonJS({
398
416
  }
399
417
  var old = root[inside];
400
418
  root[inside] = ret;
401
- _.languages.DFS(_.languages, function(key, value) {
419
+ _.languages.DFS(_.languages, function (key, value) {
402
420
  if (value === old && key != inside) {
403
421
  this[key] = ret;
404
422
  }
@@ -417,13 +435,16 @@ var require_prism = __commonJS({
417
435
  if (propertyType === "Object" && !visited[objId(property)]) {
418
436
  visited[objId(property)] = true;
419
437
  DFS(property, callback, null, visited);
420
- } else if (propertyType === "Array" && !visited[objId(property)]) {
438
+ } else if (
439
+ propertyType === "Array" &&
440
+ !visited[objId(property)]
441
+ ) {
421
442
  visited[objId(property)] = true;
422
443
  DFS(property, callback, i, visited);
423
444
  }
424
445
  }
425
446
  }
426
- }
447
+ },
427
448
  },
428
449
  plugins: {},
429
450
  /**
@@ -438,7 +459,7 @@ var require_prism = __commonJS({
438
459
  * @memberof Prism
439
460
  * @public
440
461
  */
441
- highlightAll: function(async, callback) {
462
+ highlightAll: function (async, callback) {
442
463
  _.highlightAllUnder(document, async, callback);
443
464
  },
444
465
  /**
@@ -456,16 +477,19 @@ var require_prism = __commonJS({
456
477
  * @memberof Prism
457
478
  * @public
458
479
  */
459
- highlightAllUnder: function(container, async, callback) {
480
+ highlightAllUnder: function (container, async, callback) {
460
481
  var env = {
461
482
  callback,
462
483
  container,
463
- selector: 'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'
484
+ selector:
485
+ 'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code',
464
486
  };
465
487
  _.hooks.run("before-highlightall", env);
466
- env.elements = Array.prototype.slice.apply(env.container.querySelectorAll(env.selector));
488
+ env.elements = Array.prototype.slice.apply(
489
+ env.container.querySelectorAll(env.selector),
490
+ );
467
491
  _.hooks.run("before-all-elements-highlight", env);
468
- for (var i = 0, element; element = env.elements[i++]; ) {
492
+ for (var i = 0, element; (element = env.elements[i++]); ) {
469
493
  _.highlightElement(element, async === true, env.callback);
470
494
  }
471
495
  },
@@ -497,7 +521,7 @@ var require_prism = __commonJS({
497
521
  * @memberof Prism
498
522
  * @public
499
523
  */
500
- highlightElement: function(element, async, callback) {
524
+ highlightElement: function (element, async, callback) {
501
525
  var language = _.util.getLanguage(element);
502
526
  var grammar = _.languages[language];
503
527
  _.util.setLanguage(element, language);
@@ -510,7 +534,7 @@ var require_prism = __commonJS({
510
534
  element,
511
535
  language,
512
536
  grammar,
513
- code
537
+ code,
514
538
  };
515
539
  function insertHighlightedCode(highlightedCode) {
516
540
  env.highlightedCode = highlightedCode;
@@ -522,7 +546,11 @@ var require_prism = __commonJS({
522
546
  }
523
547
  _.hooks.run("before-sanity-check", env);
524
548
  parent = env.element.parentElement;
525
- if (parent && parent.nodeName.toLowerCase() === "pre" && !parent.hasAttribute("tabindex")) {
549
+ if (
550
+ parent &&
551
+ parent.nodeName.toLowerCase() === "pre" &&
552
+ !parent.hasAttribute("tabindex")
553
+ ) {
526
554
  parent.setAttribute("tabindex", "0");
527
555
  }
528
556
  if (!env.code) {
@@ -537,16 +565,20 @@ var require_prism = __commonJS({
537
565
  }
538
566
  if (async && _self2.Worker) {
539
567
  var worker = new Worker(_.filename);
540
- worker.onmessage = function(evt) {
568
+ worker.onmessage = function (evt) {
541
569
  insertHighlightedCode(evt.data);
542
570
  };
543
- worker.postMessage(JSON.stringify({
544
- language: env.language,
545
- code: env.code,
546
- immediateClose: true
547
- }));
571
+ worker.postMessage(
572
+ JSON.stringify({
573
+ language: env.language,
574
+ code: env.code,
575
+ immediateClose: true,
576
+ }),
577
+ );
548
578
  } else {
549
- insertHighlightedCode(_.highlight(env.code, env.grammar, env.language));
579
+ insertHighlightedCode(
580
+ _.highlight(env.code, env.grammar, env.language),
581
+ );
550
582
  }
551
583
  },
552
584
  /**
@@ -569,15 +601,17 @@ var require_prism = __commonJS({
569
601
  * @example
570
602
  * Prism.highlight('var foo = true;', Prism.languages.javascript, 'javascript');
571
603
  */
572
- highlight: function(text, grammar, language) {
604
+ highlight: function (text, grammar, language) {
573
605
  var env = {
574
606
  code: text,
575
607
  grammar,
576
- language
608
+ language,
577
609
  };
578
610
  _.hooks.run("before-tokenize", env);
579
611
  if (!env.grammar) {
580
- throw new Error('The language "' + env.language + '" has no grammar.');
612
+ throw new Error(
613
+ 'The language "' + env.language + '" has no grammar.',
614
+ );
581
615
  }
582
616
  env.tokens = _.tokenize(env.code, env.grammar);
583
617
  _.hooks.run("after-tokenize", env);
@@ -607,7 +641,7 @@ var require_prism = __commonJS({
607
641
  * }
608
642
  * });
609
643
  */
610
- tokenize: function(text, grammar) {
644
+ tokenize: function (text, grammar) {
611
645
  var rest = grammar.rest;
612
646
  if (rest) {
613
647
  for (var token in rest) {
@@ -639,7 +673,7 @@ var require_prism = __commonJS({
639
673
  * @param {HookCallback} callback The callback function which is given environment variables.
640
674
  * @public
641
675
  */
642
- add: function(name, callback) {
676
+ add: function (name, callback) {
643
677
  var hooks = _.hooks.all;
644
678
  hooks[name] = hooks[name] || [];
645
679
  hooks[name].push(callback);
@@ -653,17 +687,17 @@ var require_prism = __commonJS({
653
687
  * @param {Object<string, any>} env The environment variables of the hook passed to all callbacks registered.
654
688
  * @public
655
689
  */
656
- run: function(name, env) {
690
+ run: function (name, env) {
657
691
  var callbacks = _.hooks.all[name];
658
692
  if (!callbacks || !callbacks.length) {
659
693
  return;
660
694
  }
661
- for (var i = 0, callback; callback = callbacks[i++]; ) {
695
+ for (var i = 0, callback; (callback = callbacks[i++]); ) {
662
696
  callback(env);
663
697
  }
664
- }
698
+ },
665
699
  },
666
- Token
700
+ Token,
667
701
  };
668
702
  _self2.Prism = _;
669
703
  function Token(type, content, alias, matchedStr) {
@@ -678,7 +712,7 @@ var require_prism = __commonJS({
678
712
  }
679
713
  if (Array.isArray(o)) {
680
714
  var s = "";
681
- o.forEach(function(e) {
715
+ o.forEach(function (e) {
682
716
  s += stringify(e, language);
683
717
  });
684
718
  return s;
@@ -689,7 +723,7 @@ var require_prism = __commonJS({
689
723
  tag: "span",
690
724
  classes: ["token", o.type],
691
725
  attributes: {},
692
- language
726
+ language,
693
727
  };
694
728
  var aliases = o.alias;
695
729
  if (aliases) {
@@ -702,9 +736,26 @@ var require_prism = __commonJS({
702
736
  _.hooks.run("wrap", env);
703
737
  var attributes = "";
704
738
  for (var name in env.attributes) {
705
- attributes += " " + name + '="' + (env.attributes[name] || "").replace(/"/g, "&quot;") + '"';
739
+ attributes +=
740
+ " " +
741
+ name +
742
+ '="' +
743
+ (env.attributes[name] || "").replace(/"/g, "&quot;") +
744
+ '"';
706
745
  }
707
- return "<" + env.tag + ' class="' + env.classes.join(" ") + '"' + attributes + ">" + env.content + "</" + env.tag + ">";
746
+ return (
747
+ "<" +
748
+ env.tag +
749
+ ' class="' +
750
+ env.classes.join(" ") +
751
+ '"' +
752
+ attributes +
753
+ ">" +
754
+ env.content +
755
+ "</" +
756
+ env.tag +
757
+ ">"
758
+ );
708
759
  };
709
760
  function matchPattern(pattern, pos, text, lookbehind) {
710
761
  pattern.lastIndex = pos;
@@ -716,7 +767,14 @@ var require_prism = __commonJS({
716
767
  }
717
768
  return match;
718
769
  }
719
- function matchGrammar(text, tokenList, grammar, startNode, startPos, rematch) {
770
+ function matchGrammar(
771
+ text,
772
+ tokenList,
773
+ grammar,
774
+ startNode,
775
+ startPos,
776
+ rematch,
777
+ ) {
720
778
  for (var token in grammar) {
721
779
  if (!grammar.hasOwnProperty(token) || !grammar[token]) {
722
780
  continue;
@@ -734,10 +792,17 @@ var require_prism = __commonJS({
734
792
  var alias = patternObj.alias;
735
793
  if (greedy && !patternObj.pattern.global) {
736
794
  var flags = patternObj.pattern.toString().match(/[imsuy]*$/)[0];
737
- patternObj.pattern = RegExp(patternObj.pattern.source, flags + "g");
795
+ patternObj.pattern = RegExp(
796
+ patternObj.pattern.source,
797
+ flags + "g",
798
+ );
738
799
  }
739
800
  var pattern = patternObj.pattern || patternObj;
740
- for (var currentNode = startNode.next, pos = startPos; currentNode !== tokenList.tail; pos += currentNode.value.length, currentNode = currentNode.next) {
801
+ for (
802
+ var currentNode = startNode.next, pos = startPos;
803
+ currentNode !== tokenList.tail;
804
+ pos += currentNode.value.length, currentNode = currentNode.next
805
+ ) {
741
806
  if (rematch && pos >= rematch.reach) {
742
807
  break;
743
808
  }
@@ -768,7 +833,12 @@ var require_prism = __commonJS({
768
833
  if (currentNode.value instanceof Token) {
769
834
  continue;
770
835
  }
771
- for (var k = currentNode; k !== tokenList.tail && (p < to || typeof k.value === "string"); k = k.next) {
836
+ for (
837
+ var k = currentNode;
838
+ k !== tokenList.tail &&
839
+ (p < to || typeof k.value === "string");
840
+ k = k.next
841
+ ) {
772
842
  removeCount++;
773
843
  p += k.value.length;
774
844
  }
@@ -795,7 +865,12 @@ var require_prism = __commonJS({
795
865
  pos += before.length;
796
866
  }
797
867
  removeRange(tokenList, removeFrom, removeCount);
798
- var wrapped = new Token(token, inside ? _.tokenize(matchStr, inside) : matchStr, alias, matchStr);
868
+ var wrapped = new Token(
869
+ token,
870
+ inside ? _.tokenize(matchStr, inside) : matchStr,
871
+ alias,
872
+ matchStr,
873
+ );
799
874
  currentNode = addAfter(tokenList, removeFrom, wrapped);
800
875
  if (after) {
801
876
  addAfter(tokenList, currentNode, after);
@@ -803,9 +878,16 @@ var require_prism = __commonJS({
803
878
  if (removeCount > 1) {
804
879
  var nestedRematch = {
805
880
  cause: token + "," + j,
806
- reach
881
+ reach,
807
882
  };
808
- matchGrammar(text, tokenList, grammar, currentNode.prev, pos, nestedRematch);
883
+ matchGrammar(
884
+ text,
885
+ tokenList,
886
+ grammar,
887
+ currentNode.prev,
888
+ pos,
889
+ nestedRematch,
890
+ );
809
891
  if (rematch && nestedRematch.reach > rematch.reach) {
810
892
  rematch.reach = nestedRematch.reach;
811
893
  }
@@ -853,16 +935,20 @@ var require_prism = __commonJS({
853
935
  return _;
854
936
  }
855
937
  if (!_.disableWorkerMessageHandler) {
856
- _self2.addEventListener("message", function(evt) {
857
- var message = JSON.parse(evt.data);
858
- var lang2 = message.language;
859
- var code = message.code;
860
- var immediateClose = message.immediateClose;
861
- _self2.postMessage(_.highlight(code, _.languages[lang2], lang2));
862
- if (immediateClose) {
863
- _self2.close();
864
- }
865
- }, false);
938
+ _self2.addEventListener(
939
+ "message",
940
+ function (evt) {
941
+ var message = JSON.parse(evt.data);
942
+ var lang2 = message.language;
943
+ var code = message.code;
944
+ var immediateClose = message.immediateClose;
945
+ _self2.postMessage(_.highlight(code, _.languages[lang2], lang2));
946
+ if (immediateClose) {
947
+ _self2.close();
948
+ }
949
+ },
950
+ false,
951
+ );
866
952
  }
867
953
  return _;
868
954
  }
@@ -880,8 +966,14 @@ var require_prism = __commonJS({
880
966
  }
881
967
  if (!_.manual) {
882
968
  var readyState = document.readyState;
883
- if (readyState === "loading" || readyState === "interactive" && script && script.defer) {
884
- document.addEventListener("DOMContentLoaded", highlightAutomaticallyCallback);
969
+ if (
970
+ readyState === "loading" ||
971
+ (readyState === "interactive" && script && script.defer)
972
+ ) {
973
+ document.addEventListener(
974
+ "DOMContentLoaded",
975
+ highlightAutomaticallyCallback,
976
+ );
885
977
  } else {
886
978
  if (window.requestAnimationFrame) {
887
979
  window.requestAnimationFrame(highlightAutomaticallyCallback);
@@ -891,7 +983,7 @@ var require_prism = __commonJS({
891
983
  }
892
984
  }
893
985
  return _;
894
- }(_self);
986
+ })(_self);
895
987
  if (typeof module !== "undefined" && module.exports) {
896
988
  module.exports = Prism;
897
989
  }
@@ -899,86 +991,90 @@ var require_prism = __commonJS({
899
991
  global.Prism = Prism;
900
992
  }
901
993
  Prism.languages.markup = {
902
- "comment": {
994
+ comment: {
903
995
  pattern: /<!--(?:(?!<!--)[\s\S])*?-->/,
904
- greedy: true
996
+ greedy: true,
905
997
  },
906
- "prolog": {
998
+ prolog: {
907
999
  pattern: /<\?[\s\S]+?\?>/,
908
- greedy: true
1000
+ greedy: true,
909
1001
  },
910
- "doctype": {
1002
+ doctype: {
911
1003
  // https://www.w3.org/TR/xml/#NT-doctypedecl
912
- pattern: /<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,
1004
+ pattern:
1005
+ /<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,
913
1006
  greedy: true,
914
1007
  inside: {
915
1008
  "internal-subset": {
916
1009
  pattern: /(^[^\[]*\[)[\s\S]+(?=\]>$)/,
917
1010
  lookbehind: true,
918
1011
  greedy: true,
919
- inside: null
1012
+ inside: null,
920
1013
  // see below
921
1014
  },
922
- "string": {
1015
+ string: {
923
1016
  pattern: /"[^"]*"|'[^']*'/,
924
- greedy: true
1017
+ greedy: true,
925
1018
  },
926
- "punctuation": /^<!|>$|[[\]]/,
1019
+ punctuation: /^<!|>$|[[\]]/,
927
1020
  "doctype-tag": /^DOCTYPE/i,
928
- "name": /[^\s<>'"]+/
929
- }
1021
+ name: /[^\s<>'"]+/,
1022
+ },
930
1023
  },
931
- "cdata": {
1024
+ cdata: {
932
1025
  pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i,
933
- greedy: true
1026
+ greedy: true,
934
1027
  },
935
- "tag": {
936
- pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,
1028
+ tag: {
1029
+ pattern:
1030
+ /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,
937
1031
  greedy: true,
938
1032
  inside: {
939
- "tag": {
1033
+ tag: {
940
1034
  pattern: /^<\/?[^\s>\/]+/,
941
1035
  inside: {
942
- "punctuation": /^<\/?/,
943
- "namespace": /^[^\s>\/:]+:/
944
- }
1036
+ punctuation: /^<\/?/,
1037
+ namespace: /^[^\s>\/:]+:/,
1038
+ },
945
1039
  },
946
1040
  "special-attr": [],
947
1041
  "attr-value": {
948
1042
  pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,
949
1043
  inside: {
950
- "punctuation": [
1044
+ punctuation: [
951
1045
  {
952
1046
  pattern: /^=/,
953
- alias: "attr-equals"
1047
+ alias: "attr-equals",
954
1048
  },
955
1049
  {
956
1050
  pattern: /^(\s*)["']|["']$/,
957
- lookbehind: true
958
- }
959
- ]
960
- }
1051
+ lookbehind: true,
1052
+ },
1053
+ ],
1054
+ },
961
1055
  },
962
- "punctuation": /\/?>/,
1056
+ punctuation: /\/?>/,
963
1057
  "attr-name": {
964
1058
  pattern: /[^\s>\/]+/,
965
1059
  inside: {
966
- "namespace": /^[^\s>\/:]+:/
967
- }
968
- }
969
- }
1060
+ namespace: /^[^\s>\/:]+:/,
1061
+ },
1062
+ },
1063
+ },
970
1064
  },
971
- "entity": [
1065
+ entity: [
972
1066
  {
973
1067
  pattern: /&[\da-z]{1,8};/i,
974
- alias: "named-entity"
1068
+ alias: "named-entity",
975
1069
  },
976
- /&#x?[\da-f]{1,8};/i
977
- ]
1070
+ /&#x?[\da-f]{1,8};/i,
1071
+ ],
978
1072
  };
979
- Prism.languages.markup["tag"].inside["attr-value"].inside["entity"] = Prism.languages.markup["entity"];
980
- Prism.languages.markup["doctype"].inside["internal-subset"].inside = Prism.languages.markup;
981
- Prism.hooks.add("wrap", function(env) {
1073
+ Prism.languages.markup["tag"].inside["attr-value"].inside["entity"] =
1074
+ Prism.languages.markup["entity"];
1075
+ Prism.languages.markup["doctype"].inside["internal-subset"].inside =
1076
+ Prism.languages.markup;
1077
+ Prism.hooks.add("wrap", function (env) {
982
1078
  if (env.type === "entity") {
983
1079
  env.attributes["title"] = env.content.replace(/&amp;/, "&");
984
1080
  }
@@ -1000,30 +1096,36 @@ var require_prism = __commonJS({
1000
1096
  includedCdataInside["language-" + lang] = {
1001
1097
  pattern: /(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,
1002
1098
  lookbehind: true,
1003
- inside: Prism.languages[lang]
1099
+ inside: Prism.languages[lang],
1004
1100
  };
1005
1101
  includedCdataInside["cdata"] = /^<!\[CDATA\[|\]\]>$/i;
1006
1102
  var inside = {
1007
1103
  "included-cdata": {
1008
1104
  pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i,
1009
- inside: includedCdataInside
1010
- }
1105
+ inside: includedCdataInside,
1106
+ },
1011
1107
  };
1012
1108
  inside["language-" + lang] = {
1013
1109
  pattern: /[\s\S]+/,
1014
- inside: Prism.languages[lang]
1110
+ inside: Prism.languages[lang],
1015
1111
  };
1016
1112
  var def = {};
1017
1113
  def[tagName] = {
1018
- pattern: RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g, function() {
1019
- return tagName;
1020
- }), "i"),
1114
+ pattern: RegExp(
1115
+ /(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(
1116
+ /__/g,
1117
+ function () {
1118
+ return tagName;
1119
+ },
1120
+ ),
1121
+ "i",
1122
+ ),
1021
1123
  lookbehind: true,
1022
1124
  greedy: true,
1023
- inside
1125
+ inside,
1024
1126
  };
1025
1127
  Prism.languages.insertBefore("markup", "cdata", def);
1026
- }
1128
+ },
1027
1129
  });
1028
1130
  Object.defineProperty(Prism.languages.markup.tag, "addAttribute", {
1029
1131
  /**
@@ -1037,11 +1139,15 @@ var require_prism = __commonJS({
1037
1139
  * @example
1038
1140
  * addAttribute('style', 'css');
1039
1141
  */
1040
- value: function(attrName, lang) {
1142
+ value: function (attrName, lang) {
1041
1143
  Prism.languages.markup.tag.inside["special-attr"].push({
1042
1144
  pattern: RegExp(
1043
- /(^|["'\s])/.source + "(?:" + attrName + ")" + /\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,
1044
- "i"
1145
+ /(^|["'\s])/.source +
1146
+ "(?:" +
1147
+ attrName +
1148
+ ")" +
1149
+ /\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,
1150
+ "i",
1045
1151
  ),
1046
1152
  lookbehind: true,
1047
1153
  inside: {
@@ -1049,24 +1155,24 @@ var require_prism = __commonJS({
1049
1155
  "attr-value": {
1050
1156
  pattern: /=[\s\S]+/,
1051
1157
  inside: {
1052
- "value": {
1158
+ value: {
1053
1159
  pattern: /(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,
1054
1160
  lookbehind: true,
1055
1161
  alias: [lang, "language-" + lang],
1056
- inside: Prism.languages[lang]
1162
+ inside: Prism.languages[lang],
1057
1163
  },
1058
- "punctuation": [
1164
+ punctuation: [
1059
1165
  {
1060
1166
  pattern: /^=/,
1061
- alias: "attr-equals"
1167
+ alias: "attr-equals",
1062
1168
  },
1063
- /"|'/
1064
- ]
1065
- }
1066
- }
1067
- }
1169
+ /"|'/,
1170
+ ],
1171
+ },
1172
+ },
1173
+ },
1068
1174
  });
1069
- }
1175
+ },
1070
1176
  });
1071
1177
  Prism.languages.html = Prism.languages.markup;
1072
1178
  Prism.languages.mathml = Prism.languages.markup;
@@ -1075,57 +1181,78 @@ var require_prism = __commonJS({
1075
1181
  Prism.languages.ssml = Prism.languages.xml;
1076
1182
  Prism.languages.atom = Prism.languages.xml;
1077
1183
  Prism.languages.rss = Prism.languages.xml;
1078
- (function(Prism2) {
1079
- var string = /(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;
1184
+ (function (Prism2) {
1185
+ var string =
1186
+ /(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;
1080
1187
  Prism2.languages.css = {
1081
- "comment": /\/\*[\s\S]*?\*\//,
1082
- "atrule": {
1083
- pattern: RegExp("@[\\w-](?:" + /[^;{\s"']|\s+(?!\s)/.source + "|" + string.source + ")*?" + /(?:;|(?=\s*\{))/.source),
1188
+ comment: /\/\*[\s\S]*?\*\//,
1189
+ atrule: {
1190
+ pattern: RegExp(
1191
+ "@[\\w-](?:" +
1192
+ /[^;{\s"']|\s+(?!\s)/.source +
1193
+ "|" +
1194
+ string.source +
1195
+ ")*?" +
1196
+ /(?:;|(?=\s*\{))/.source,
1197
+ ),
1084
1198
  inside: {
1085
- "rule": /^@[\w-]+/,
1199
+ rule: /^@[\w-]+/,
1086
1200
  "selector-function-argument": {
1087
- pattern: /(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,
1201
+ pattern:
1202
+ /(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,
1088
1203
  lookbehind: true,
1089
- alias: "selector"
1204
+ alias: "selector",
1090
1205
  },
1091
- "keyword": {
1206
+ keyword: {
1092
1207
  pattern: /(^|[^\w-])(?:and|not|only|or)(?![\w-])/,
1093
- lookbehind: true
1094
- }
1208
+ lookbehind: true,
1209
+ },
1095
1210
  // See rest below
1096
- }
1211
+ },
1097
1212
  },
1098
- "url": {
1213
+ url: {
1099
1214
  // https://drafts.csswg.org/css-values-3/#urls
1100
- pattern: RegExp("\\burl\\((?:" + string.source + "|" + /(?:[^\\\r\n()"']|\\[\s\S])*/.source + ")\\)", "i"),
1215
+ pattern: RegExp(
1216
+ "\\burl\\((?:" +
1217
+ string.source +
1218
+ "|" +
1219
+ /(?:[^\\\r\n()"']|\\[\s\S])*/.source +
1220
+ ")\\)",
1221
+ "i",
1222
+ ),
1101
1223
  greedy: true,
1102
1224
  inside: {
1103
- "function": /^url/i,
1104
- "punctuation": /^\(|\)$/,
1105
- "string": {
1225
+ function: /^url/i,
1226
+ punctuation: /^\(|\)$/,
1227
+ string: {
1106
1228
  pattern: RegExp("^" + string.source + "$"),
1107
- alias: "url"
1108
- }
1109
- }
1229
+ alias: "url",
1230
+ },
1231
+ },
1110
1232
  },
1111
- "selector": {
1112
- pattern: RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|` + string.source + ")*(?=\\s*\\{)"),
1113
- lookbehind: true
1233
+ selector: {
1234
+ pattern: RegExp(
1235
+ `(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|` +
1236
+ string.source +
1237
+ ")*(?=\\s*\\{)",
1238
+ ),
1239
+ lookbehind: true,
1114
1240
  },
1115
- "string": {
1241
+ string: {
1116
1242
  pattern: string,
1117
- greedy: true
1243
+ greedy: true,
1118
1244
  },
1119
- "property": {
1120
- pattern: /(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,
1121
- lookbehind: true
1245
+ property: {
1246
+ pattern:
1247
+ /(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,
1248
+ lookbehind: true,
1122
1249
  },
1123
- "important": /!important\b/i,
1124
- "function": {
1250
+ important: /!important\b/i,
1251
+ function: {
1125
1252
  pattern: /(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,
1126
- lookbehind: true
1253
+ lookbehind: true,
1127
1254
  },
1128
- "punctuation": /[(){};:,]/
1255
+ punctuation: /[(){};:,]/,
1129
1256
  };
1130
1257
  Prism2.languages.css["atrule"].inside.rest = Prism2.languages.css;
1131
1258
  var markup = Prism2.languages.markup;
@@ -1135,83 +1262,106 @@ var require_prism = __commonJS({
1135
1262
  }
1136
1263
  })(Prism);
1137
1264
  Prism.languages.clike = {
1138
- "comment": [
1265
+ comment: [
1139
1266
  {
1140
1267
  pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,
1141
1268
  lookbehind: true,
1142
- greedy: true
1269
+ greedy: true,
1143
1270
  },
1144
1271
  {
1145
1272
  pattern: /(^|[^\\:])\/\/.*/,
1146
1273
  lookbehind: true,
1147
- greedy: true
1148
- }
1274
+ greedy: true,
1275
+ },
1149
1276
  ],
1150
- "string": {
1277
+ string: {
1151
1278
  pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
1152
- greedy: true
1279
+ greedy: true,
1153
1280
  },
1154
1281
  "class-name": {
1155
- pattern: /(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,
1282
+ pattern:
1283
+ /(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,
1156
1284
  lookbehind: true,
1157
1285
  inside: {
1158
- "punctuation": /[.\\]/
1159
- }
1286
+ punctuation: /[.\\]/,
1287
+ },
1160
1288
  },
1161
- "keyword": /\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,
1162
- "boolean": /\b(?:false|true)\b/,
1163
- "function": /\b\w+(?=\()/,
1164
- "number": /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,
1165
- "operator": /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,
1166
- "punctuation": /[{}[\];(),.:]/
1289
+ keyword:
1290
+ /\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,
1291
+ boolean: /\b(?:false|true)\b/,
1292
+ function: /\b\w+(?=\()/,
1293
+ number: /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,
1294
+ operator: /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,
1295
+ punctuation: /[{}[\];(),.:]/,
1167
1296
  };
1168
1297
  Prism.languages.javascript = Prism.languages.extend("clike", {
1169
1298
  "class-name": [
1170
1299
  Prism.languages.clike["class-name"],
1171
1300
  {
1172
- pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,
1173
- lookbehind: true
1174
- }
1301
+ pattern:
1302
+ /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,
1303
+ lookbehind: true,
1304
+ },
1175
1305
  ],
1176
- "keyword": [
1306
+ keyword: [
1177
1307
  {
1178
1308
  pattern: /((?:^|\})\s*)catch\b/,
1179
- lookbehind: true
1309
+ lookbehind: true,
1180
1310
  },
1181
1311
  {
1182
- 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/,
1183
- lookbehind: true
1184
- }
1312
+ pattern:
1313
+ /(^|[^.]|\.\.\.\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/,
1314
+ lookbehind: true,
1315
+ },
1185
1316
  ],
1186
1317
  // Allow for all non-ASCII characters (See http://stackoverflow.com/a/2008444)
1187
- "function": /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,
1188
- "number": {
1318
+ function:
1319
+ /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,
1320
+ number: {
1189
1321
  pattern: RegExp(
1190
- /(^|[^\w$])/.source + "(?:" + // constant
1191
- (/NaN|Infinity/.source + "|" + // binary integer
1192
- /0[bB][01]+(?:_[01]+)*n?/.source + "|" + // octal integer
1193
- /0[oO][0-7]+(?:_[0-7]+)*n?/.source + "|" + // hexadecimal integer
1194
- /0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source + "|" + // decimal bigint
1195
- /\d+(?:_\d+)*n/.source + "|" + // decimal number (integer or float) but no bigint
1196
- /(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source) + ")" + /(?![\w$])/.source
1322
+ /(^|[^\w$])/.source +
1323
+ "(?:" + // constant
1324
+ (/NaN|Infinity/.source +
1325
+ "|" + // binary integer
1326
+ /0[bB][01]+(?:_[01]+)*n?/.source +
1327
+ "|" + // octal integer
1328
+ /0[oO][0-7]+(?:_[0-7]+)*n?/.source +
1329
+ "|" + // hexadecimal integer
1330
+ /0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source +
1331
+ "|" + // decimal bigint
1332
+ /\d+(?:_\d+)*n/.source +
1333
+ "|" + // decimal number (integer or float) but no bigint
1334
+ /(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/
1335
+ .source) +
1336
+ ")" +
1337
+ /(?![\w$])/.source,
1197
1338
  ),
1198
- lookbehind: true
1339
+ lookbehind: true,
1199
1340
  },
1200
- "operator": /--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/
1341
+ operator:
1342
+ /--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/,
1201
1343
  });
1202
- Prism.languages.javascript["class-name"][0].pattern = /(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;
1344
+ Prism.languages.javascript["class-name"][0].pattern =
1345
+ /(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;
1203
1346
  Prism.languages.insertBefore("javascript", "keyword", {
1204
- "regex": {
1347
+ regex: {
1205
1348
  pattern: RegExp(
1206
1349
  // lookbehind
1207
1350
  // eslint-disable-next-line regexp/no-dupe-characters-character-class
1208
1351
  /((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source + // Regex pattern:
1209
- // There are 2 regex patterns here. The RegExp set notation proposal added support for nested character
1210
- // classes if the `v` flag is present. Unfortunately, nested CCs are both context-free and incompatible
1211
- // with the only syntax, so we have to define 2 different regex patterns.
1212
- /\//.source + "(?:" + /(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source + "|" + // `v` flag syntax. This supports 3 levels of nested character classes.
1213
- /(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source + ")" + // lookahead
1214
- /(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source
1352
+ // There are 2 regex patterns here. The RegExp set notation proposal added support for nested character
1353
+ // classes if the `v` flag is present. Unfortunately, nested CCs are both context-free and incompatible
1354
+ // with the only syntax, so we have to define 2 different regex patterns.
1355
+ /\//.source +
1356
+ "(?:" +
1357
+ /(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/
1358
+ .source +
1359
+ "|" + // `v` flag syntax. This supports 3 levels of nested character classes.
1360
+ /(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/
1361
+ .source +
1362
+ ")" + // lookahead
1363
+ /(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/
1364
+ .source,
1215
1365
  ),
1216
1366
  lookbehind: true,
1217
1367
  greedy: true,
@@ -1220,123 +1370,144 @@ var require_prism = __commonJS({
1220
1370
  pattern: /^(\/)[\s\S]+(?=\/[a-z]*$)/,
1221
1371
  lookbehind: true,
1222
1372
  alias: "language-regex",
1223
- inside: Prism.languages.regex
1373
+ inside: Prism.languages.regex,
1224
1374
  },
1225
1375
  "regex-delimiter": /^\/|\/$/,
1226
- "regex-flags": /^[a-z]+$/
1227
- }
1376
+ "regex-flags": /^[a-z]+$/,
1377
+ },
1228
1378
  },
1229
1379
  // This must be declared before keyword because we use "function" inside the look-forward
1230
1380
  "function-variable": {
1231
- 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*=>))/,
1232
- alias: "function"
1381
+ pattern:
1382
+ /#?(?!\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*=>))/,
1383
+ alias: "function",
1233
1384
  },
1234
- "parameter": [
1385
+ parameter: [
1235
1386
  {
1236
- pattern: /(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,
1387
+ pattern:
1388
+ /(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,
1237
1389
  lookbehind: true,
1238
- inside: Prism.languages.javascript
1390
+ inside: Prism.languages.javascript,
1239
1391
  },
1240
1392
  {
1241
- pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,
1393
+ pattern:
1394
+ /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,
1242
1395
  lookbehind: true,
1243
- inside: Prism.languages.javascript
1396
+ inside: Prism.languages.javascript,
1244
1397
  },
1245
1398
  {
1246
- pattern: /(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,
1399
+ pattern:
1400
+ /(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,
1247
1401
  lookbehind: true,
1248
- inside: Prism.languages.javascript
1402
+ inside: Prism.languages.javascript,
1249
1403
  },
1250
1404
  {
1251
- 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*\{)/,
1405
+ pattern:
1406
+ /((?:\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*\{)/,
1252
1407
  lookbehind: true,
1253
- inside: Prism.languages.javascript
1254
- }
1408
+ inside: Prism.languages.javascript,
1409
+ },
1255
1410
  ],
1256
- "constant": /\b[A-Z](?:[A-Z_]|\dx?)*\b/
1411
+ constant: /\b[A-Z](?:[A-Z_]|\dx?)*\b/,
1257
1412
  });
1258
1413
  Prism.languages.insertBefore("javascript", "string", {
1259
- "hashbang": {
1414
+ hashbang: {
1260
1415
  pattern: /^#!.*/,
1261
1416
  greedy: true,
1262
- alias: "comment"
1417
+ alias: "comment",
1263
1418
  },
1264
1419
  "template-string": {
1265
- pattern: /`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,
1420
+ pattern:
1421
+ /`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,
1266
1422
  greedy: true,
1267
1423
  inside: {
1268
1424
  "template-punctuation": {
1269
1425
  pattern: /^`|`$/,
1270
- alias: "string"
1426
+ alias: "string",
1271
1427
  },
1272
- "interpolation": {
1273
- pattern: /((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,
1428
+ interpolation: {
1429
+ pattern:
1430
+ /((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,
1274
1431
  lookbehind: true,
1275
1432
  inside: {
1276
1433
  "interpolation-punctuation": {
1277
1434
  pattern: /^\$\{|\}$/,
1278
- alias: "punctuation"
1435
+ alias: "punctuation",
1279
1436
  },
1280
- rest: Prism.languages.javascript
1281
- }
1437
+ rest: Prism.languages.javascript,
1438
+ },
1282
1439
  },
1283
- "string": /[\s\S]+/
1284
- }
1440
+ string: /[\s\S]+/,
1441
+ },
1285
1442
  },
1286
1443
  "string-property": {
1287
- pattern: /((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,
1444
+ pattern:
1445
+ /((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,
1288
1446
  lookbehind: true,
1289
1447
  greedy: true,
1290
- alias: "property"
1291
- }
1448
+ alias: "property",
1449
+ },
1292
1450
  });
1293
1451
  Prism.languages.insertBefore("javascript", "operator", {
1294
1452
  "literal-property": {
1295
- pattern: /((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,
1453
+ pattern:
1454
+ /((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,
1296
1455
  lookbehind: true,
1297
- alias: "property"
1298
- }
1456
+ alias: "property",
1457
+ },
1299
1458
  });
1300
1459
  if (Prism.languages.markup) {
1301
1460
  Prism.languages.markup.tag.addInlined("script", "javascript");
1302
1461
  Prism.languages.markup.tag.addAttribute(
1303
- /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,
1304
- "javascript"
1462
+ /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)/
1463
+ .source,
1464
+ "javascript",
1305
1465
  );
1306
1466
  }
1307
1467
  Prism.languages.js = Prism.languages.javascript;
1308
- (function() {
1468
+ (function () {
1309
1469
  if (typeof Prism === "undefined" || typeof document === "undefined") {
1310
1470
  return;
1311
1471
  }
1312
1472
  if (!Element.prototype.matches) {
1313
- Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
1473
+ Element.prototype.matches =
1474
+ Element.prototype.msMatchesSelector ||
1475
+ Element.prototype.webkitMatchesSelector;
1314
1476
  }
1315
1477
  var LOADING_MESSAGE = "Loading…";
1316
- var FAILURE_MESSAGE = function(status, message) {
1478
+ var FAILURE_MESSAGE = function (status, message) {
1317
1479
  return "✖ Error " + status + " while fetching file: " + message;
1318
1480
  };
1319
1481
  var FAILURE_EMPTY_MESSAGE = "✖ Error: File does not exist or is empty";
1320
1482
  var EXTENSIONS = {
1321
- "js": "javascript",
1322
- "py": "python",
1323
- "rb": "ruby",
1324
- "ps1": "powershell",
1325
- "psm1": "powershell",
1326
- "sh": "bash",
1327
- "bat": "batch",
1328
- "h": "c",
1329
- "tex": "latex"
1483
+ js: "javascript",
1484
+ py: "python",
1485
+ rb: "ruby",
1486
+ ps1: "powershell",
1487
+ psm1: "powershell",
1488
+ sh: "bash",
1489
+ bat: "batch",
1490
+ h: "c",
1491
+ tex: "latex",
1330
1492
  };
1331
1493
  var STATUS_ATTR = "data-src-status";
1332
1494
  var STATUS_LOADING = "loading";
1333
1495
  var STATUS_LOADED = "loaded";
1334
1496
  var STATUS_FAILED = "failed";
1335
- var SELECTOR = "pre[data-src]:not([" + STATUS_ATTR + '="' + STATUS_LOADED + '"]):not([' + STATUS_ATTR + '="' + STATUS_LOADING + '"])';
1497
+ var SELECTOR =
1498
+ "pre[data-src]:not([" +
1499
+ STATUS_ATTR +
1500
+ '="' +
1501
+ STATUS_LOADED +
1502
+ '"]):not([' +
1503
+ STATUS_ATTR +
1504
+ '="' +
1505
+ STATUS_LOADING +
1506
+ '"])';
1336
1507
  function loadFile(src, success, error) {
1337
1508
  var xhr = new XMLHttpRequest();
1338
1509
  xhr.open("GET", src, true);
1339
- xhr.onreadystatechange = function() {
1510
+ xhr.onreadystatechange = function () {
1340
1511
  if (xhr.readyState == 4) {
1341
1512
  if (xhr.status < 400 && xhr.responseText) {
1342
1513
  success(xhr.responseText);
@@ -1367,14 +1538,13 @@ var require_prism = __commonJS({
1367
1538
  }
1368
1539
  return void 0;
1369
1540
  }
1370
- Prism.hooks.add("before-highlightall", function(env) {
1541
+ Prism.hooks.add("before-highlightall", function (env) {
1371
1542
  env.selector += ", " + SELECTOR;
1372
1543
  });
1373
- Prism.hooks.add("before-sanity-check", function(env) {
1374
- var pre = (
1544
+ Prism.hooks.add("before-sanity-check", function (env) {
1545
+ var pre =
1375
1546
  /** @type {HTMLPreElement} */
1376
- env.element
1377
- );
1547
+ env.element;
1378
1548
  if (pre.matches(SELECTOR)) {
1379
1549
  env.code = "";
1380
1550
  pre.setAttribute(STATUS_ATTR, STATUS_LOADING);
@@ -1394,7 +1564,7 @@ var require_prism = __commonJS({
1394
1564
  }
1395
1565
  loadFile(
1396
1566
  src,
1397
- function(text) {
1567
+ function (text) {
1398
1568
  pre.setAttribute(STATUS_ATTR, STATUS_LOADED);
1399
1569
  var range = parseRange(pre.getAttribute("data-range"));
1400
1570
  if (range) {
@@ -1417,10 +1587,10 @@ var require_prism = __commonJS({
1417
1587
  code.textContent = text;
1418
1588
  Prism.highlightElement(code);
1419
1589
  },
1420
- function(error) {
1590
+ function (error) {
1421
1591
  pre.setAttribute(STATUS_ATTR, STATUS_FAILED);
1422
1592
  code.textContent = error;
1423
- }
1593
+ },
1424
1594
  );
1425
1595
  }
1426
1596
  });
@@ -1434,21 +1604,23 @@ var require_prism = __commonJS({
1434
1604
  */
1435
1605
  highlight: function highlight(container) {
1436
1606
  var elements = (container || document).querySelectorAll(SELECTOR);
1437
- for (var i = 0, element; element = elements[i++]; ) {
1607
+ for (var i = 0, element; (element = elements[i++]); ) {
1438
1608
  Prism.highlightElement(element);
1439
1609
  }
1440
- }
1610
+ },
1441
1611
  };
1442
1612
  var logged = false;
1443
- Prism.fileHighlight = function() {
1613
+ Prism.fileHighlight = function () {
1444
1614
  if (!logged) {
1445
- console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead.");
1615
+ console.warn(
1616
+ "Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead.",
1617
+ );
1446
1618
  logged = true;
1447
1619
  }
1448
1620
  Prism.plugins.fileHighlight.highlight.apply(this, arguments);
1449
1621
  };
1450
1622
  })();
1451
- }
1623
+ },
1452
1624
  });
1453
1625
  export default require_prism();
1454
1626
  /*! Bundled license information: