@vue-skuilder/common-ui 0.2.35 → 0.2.37

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 (190) hide show
  1. package/dist/_virtual/_@oxc-project_runtime@0.115.0/helpers/defineProperty.mjs +13 -0
  2. package/dist/_virtual/_@oxc-project_runtime@0.115.0/helpers/toPrimitive.mjs +15 -0
  3. package/dist/_virtual/_@oxc-project_runtime@0.115.0/helpers/toPropertyKey.mjs +10 -0
  4. package/dist/_virtual/_@oxc-project_runtime@0.115.0/helpers/typeof.mjs +12 -0
  5. package/dist/_virtual/_plugin-vue_export-helper.mjs +9 -0
  6. package/dist/_virtual/_rolldown/runtime.mjs +7 -0
  7. package/dist/admin/common-ui-admin.es.js +259 -23774
  8. package/dist/admin/common-ui-admin.es.js.map +1 -1
  9. package/dist/assets/index.css +2 -1
  10. package/dist/components/CardBrowser.mjs +63 -0
  11. package/dist/components/CardBrowser.mjs.map +1 -0
  12. package/dist/components/CardBrowser.vue_vue_type_script_lang.mjs +50 -0
  13. package/dist/components/CardBrowser.vue_vue_type_script_lang.mjs.map +1 -0
  14. package/dist/components/CardHistoryViewer.mjs +70 -0
  15. package/dist/components/CardHistoryViewer.mjs.map +1 -0
  16. package/dist/components/CardHistoryViewer.vue_vue_type_script_lang.mjs +108 -0
  17. package/dist/components/CardHistoryViewer.vue_vue_type_script_lang.mjs.map +1 -0
  18. package/dist/components/CardSearch.mjs +26 -0
  19. package/dist/components/CardSearch.mjs.map +1 -0
  20. package/dist/components/CardSearch.vue_vue_type_script_lang.mjs +17 -0
  21. package/dist/components/CardSearch.vue_vue_type_script_lang.mjs.map +1 -0
  22. package/dist/components/CardSearchResults.mjs +32 -0
  23. package/dist/components/CardSearchResults.mjs.map +1 -0
  24. package/dist/components/CardSearchResults.vue_vue_type_script_lang.mjs +71 -0
  25. package/dist/components/CardSearchResults.vue_vue_type_script_lang.mjs.map +1 -0
  26. package/dist/components/CourseCardBrowser.mjs +175 -0
  27. package/dist/components/CourseCardBrowser.mjs.map +1 -0
  28. package/dist/components/CourseCardBrowser.vue_vue_type_script_lang.mjs +173 -0
  29. package/dist/components/CourseCardBrowser.vue_vue_type_script_lang.mjs.map +1 -0
  30. package/dist/components/CourseInformation.mjs +132 -0
  31. package/dist/components/CourseInformation.mjs.map +1 -0
  32. package/dist/components/CourseInformation.vue_vue_type_script_lang.mjs +56 -0
  33. package/dist/components/CourseInformation.vue_vue_type_script_lang.mjs.map +1 -0
  34. package/dist/components/CourseTagFilterWidget.mjs +114 -0
  35. package/dist/components/CourseTagFilterWidget.mjs.map +1 -0
  36. package/dist/components/CourseTagFilterWidget.vue_vue_type_script_lang.mjs +65 -0
  37. package/dist/components/CourseTagFilterWidget.vue_vue_type_script_lang.mjs.map +1 -0
  38. package/dist/components/HeatMap.mjs +40 -0
  39. package/dist/components/HeatMap.mjs.map +1 -0
  40. package/dist/components/HeatMap.vue_vue_type_script_lang.mjs +211 -0
  41. package/dist/components/HeatMap.vue_vue_type_script_lang.mjs.map +1 -0
  42. package/dist/components/PaginatingToolbar.mjs +94 -0
  43. package/dist/components/PaginatingToolbar.mjs.map +1 -0
  44. package/dist/components/PaginatingToolbar.vue_vue_type_script_lang.mjs +36 -0
  45. package/dist/components/PaginatingToolbar.vue_vue_type_script_lang.mjs.map +1 -0
  46. package/dist/components/SessionControllerDebug.mjs +130 -0
  47. package/dist/components/SessionControllerDebug.mjs.map +1 -0
  48. package/dist/components/SessionControllerDebug.vue_vue_type_script_lang.mjs +45 -0
  49. package/dist/components/SessionControllerDebug.vue_vue_type_script_lang.mjs.map +1 -0
  50. package/dist/components/SkMouseTrap.mjs +66 -0
  51. package/dist/components/SkMouseTrap.mjs.map +1 -0
  52. package/dist/components/SkMouseTrap.vue_vue_type_script_lang.mjs +31 -0
  53. package/dist/components/SkMouseTrap.vue_vue_type_script_lang.mjs.map +1 -0
  54. package/dist/components/SkMouseTrapToolTip.mjs +28 -0
  55. package/dist/components/SkMouseTrapToolTip.mjs.map +1 -0
  56. package/dist/components/SkMouseTrapToolTip.vue_vue_type_script_lang.mjs +91 -0
  57. package/dist/components/SkMouseTrapToolTip.vue_vue_type_script_lang.mjs.map +1 -0
  58. package/dist/components/SnackbarService.mjs +24 -0
  59. package/dist/components/SnackbarService.mjs.map +1 -0
  60. package/dist/components/SnackbarService.vue_vue_type_script_lang.mjs +34 -0
  61. package/dist/components/SnackbarService.vue_vue_type_script_lang.mjs.map +1 -0
  62. package/dist/components/SnackbarService2.mjs +40 -0
  63. package/dist/components/SnackbarService2.mjs.map +1 -0
  64. package/dist/components/StudySession.mjs +123 -0
  65. package/dist/components/StudySession.mjs.map +1 -0
  66. package/dist/components/StudySession.vue_vue_type_script_lang.mjs +280 -0
  67. package/dist/components/StudySession.vue_vue_type_script_lang.mjs.map +1 -0
  68. package/dist/components/StudySessionTimer.mjs +50 -0
  69. package/dist/components/StudySessionTimer.mjs.map +1 -0
  70. package/dist/components/StudySessionTimer.vue_vue_type_script_lang.mjs +43 -0
  71. package/dist/components/StudySessionTimer.vue_vue_type_script_lang.mjs.map +1 -0
  72. package/dist/components/TagsInput.mjs +45 -0
  73. package/dist/components/TagsInput.mjs.map +1 -0
  74. package/dist/components/TagsInput.vue_vue_type_script_lang.mjs +117 -0
  75. package/dist/components/TagsInput.vue_vue_type_script_lang.mjs.map +1 -0
  76. package/dist/components/UserTagPreferences.mjs +205 -0
  77. package/dist/components/UserTagPreferences.mjs.map +1 -0
  78. package/dist/components/UserTagPreferences.vue_vue_type_script_lang.mjs +139 -0
  79. package/dist/components/UserTagPreferences.vue_vue_type_script_lang.mjs.map +1 -0
  80. package/dist/components/auth/RequestPasswordReset.mjs +96 -0
  81. package/dist/components/auth/RequestPasswordReset.mjs.map +1 -0
  82. package/dist/components/auth/RequestPasswordReset.vue_vue_type_script_lang.mjs +47 -0
  83. package/dist/components/auth/RequestPasswordReset.vue_vue_type_script_lang.mjs.map +1 -0
  84. package/dist/components/auth/ResetPassword.mjs +129 -0
  85. package/dist/components/auth/ResetPassword.mjs.map +1 -0
  86. package/dist/components/auth/ResetPassword.vue_vue_type_script_lang.mjs +69 -0
  87. package/dist/components/auth/ResetPassword.vue_vue_type_script_lang.mjs.map +1 -0
  88. package/dist/components/auth/UserChip.mjs +9 -0
  89. package/dist/components/auth/UserChip.mjs.map +1 -0
  90. package/dist/components/auth/UserChip.vue_vue_type_script_setup_true_lang.mjs +213 -0
  91. package/dist/components/auth/UserChip.vue_vue_type_script_setup_true_lang.mjs.map +1 -0
  92. package/dist/components/auth/UserLogin.mjs +9 -0
  93. package/dist/components/auth/UserLogin.mjs.map +1 -0
  94. package/dist/components/auth/UserLogin.vue_vue_type_script_setup_true_lang.mjs +155 -0
  95. package/dist/components/auth/UserLogin.vue_vue_type_script_setup_true_lang.mjs.map +1 -0
  96. package/dist/components/auth/UserLoginAndRegistrationContainer.mjs +9 -0
  97. package/dist/components/auth/UserLoginAndRegistrationContainer.mjs.map +1 -0
  98. package/dist/components/auth/UserLoginAndRegistrationContainer.vue_vue_type_script_setup_true_lang.mjs +126 -0
  99. package/dist/components/auth/UserLoginAndRegistrationContainer.vue_vue_type_script_setup_true_lang.mjs.map +1 -0
  100. package/dist/components/auth/UserRegistration.mjs +147 -0
  101. package/dist/components/auth/UserRegistration.mjs.map +1 -0
  102. package/dist/components/auth/UserRegistration.vue_vue_type_script_lang.mjs +130 -0
  103. package/dist/components/auth/UserRegistration.vue_vue_type_script_lang.mjs.map +1 -0
  104. package/dist/components/auth/VerifyEmail.mjs +118 -0
  105. package/dist/components/auth/VerifyEmail.mjs.map +1 -0
  106. package/dist/components/auth/VerifyEmail.vue_vue_type_script_lang.mjs +59 -0
  107. package/dist/components/auth/VerifyEmail.vue_vue_type_script_lang.mjs.map +1 -0
  108. package/dist/components/cardRendering/AudioAutoPlayer.mjs +9 -0
  109. package/dist/components/cardRendering/AudioAutoPlayer.mjs.map +1 -0
  110. package/dist/components/cardRendering/AudioAutoPlayer.vue_vue_type_script_setup_true_lang.mjs +69 -0
  111. package/dist/components/cardRendering/AudioAutoPlayer.vue_vue_type_script_setup_true_lang.mjs.map +1 -0
  112. package/dist/components/cardRendering/CardLoader.mjs +31 -0
  113. package/dist/components/cardRendering/CardLoader.mjs.map +1 -0
  114. package/dist/components/cardRendering/CardLoader.vue_vue_type_script_lang.mjs +75 -0
  115. package/dist/components/cardRendering/CardLoader.vue_vue_type_script_lang.mjs.map +1 -0
  116. package/dist/components/cardRendering/CardViewer.mjs +39 -0
  117. package/dist/components/cardRendering/CardViewer.mjs.map +1 -0
  118. package/dist/components/cardRendering/CardViewer.vue_vue_type_script_lang.mjs +66 -0
  119. package/dist/components/cardRendering/CardViewer.vue_vue_type_script_lang.mjs.map +1 -0
  120. package/dist/components/cardRendering/CodeBlockRenderer.mjs +8 -0
  121. package/dist/components/cardRendering/CodeBlockRenderer.mjs.map +1 -0
  122. package/dist/components/cardRendering/CodeBlockRenderer.vue_vue_type_script_setup_true_lang.mjs +44 -0
  123. package/dist/components/cardRendering/CodeBlockRenderer.vue_vue_type_script_setup_true_lang.mjs.map +1 -0
  124. package/dist/components/cardRendering/MarkdownRenderer.mjs +21 -0
  125. package/dist/components/cardRendering/MarkdownRenderer.mjs.map +1 -0
  126. package/dist/components/cardRendering/MarkdownRenderer.vue_vue_type_script_lang.mjs +24 -0
  127. package/dist/components/cardRendering/MarkdownRenderer.vue_vue_type_script_lang.mjs.map +1 -0
  128. package/dist/components/cardRendering/MarkdownRendererHelpers.mjs +79 -0
  129. package/dist/components/cardRendering/MarkdownRendererHelpers.mjs.map +1 -0
  130. package/dist/components/cardRendering/MdTokenRenderer.mjs +9 -0
  131. package/dist/components/cardRendering/MdTokenRenderer.mjs.map +1 -0
  132. package/dist/components/cardRendering/MdTokenRenderer.vue_vue_type_script_setup_true_lang.mjs +176 -0
  133. package/dist/components/cardRendering/MdTokenRenderer.vue_vue_type_script_setup_true_lang.mjs.map +1 -0
  134. package/dist/components/studentInputs/BaseUserInput.mjs +54 -0
  135. package/dist/components/studentInputs/BaseUserInput.mjs.map +1 -0
  136. package/dist/components/studentInputs/MultipleChoiceOption.mjs +26 -0
  137. package/dist/components/studentInputs/MultipleChoiceOption.mjs.map +1 -0
  138. package/dist/components/studentInputs/MultipleChoiceOption.vue_vue_type_script_lang.mjs +76 -0
  139. package/dist/components/studentInputs/MultipleChoiceOption.vue_vue_type_script_lang.mjs.map +1 -0
  140. package/dist/components/studentInputs/RadioMultipleChoice.mjs +33 -0
  141. package/dist/components/studentInputs/RadioMultipleChoice.mjs.map +1 -0
  142. package/dist/components/studentInputs/RadioMultipleChoice.vue_vue_type_script_lang.mjs +105 -0
  143. package/dist/components/studentInputs/RadioMultipleChoice.vue_vue_type_script_lang.mjs.map +1 -0
  144. package/dist/components/studentInputs/TrueFalse.mjs +19 -0
  145. package/dist/components/studentInputs/TrueFalse.mjs.map +1 -0
  146. package/dist/components/studentInputs/TrueFalse.vue_vue_type_script_lang.mjs +21 -0
  147. package/dist/components/studentInputs/TrueFalse.vue_vue_type_script_lang.mjs.map +1 -0
  148. package/dist/components/studentInputs/UserInputNumber.mjs +33 -0
  149. package/dist/components/studentInputs/UserInputNumber.mjs.map +1 -0
  150. package/dist/components/studentInputs/UserInputNumber.vue_vue_type_script_lang.mjs +25 -0
  151. package/dist/components/studentInputs/UserInputNumber.vue_vue_type_script_lang.mjs.map +1 -0
  152. package/dist/components/studentInputs/UserInputString.mjs +22 -0
  153. package/dist/components/studentInputs/UserInputString.mjs.map +1 -0
  154. package/dist/components/studentInputs/UserInputString.vue_vue_type_script_lang.mjs +23 -0
  155. package/dist/components/studentInputs/UserInputString.vue_vue_type_script_lang.mjs.map +1 -0
  156. package/dist/components/studentInputs/fillInInput.mjs +25 -0
  157. package/dist/components/studentInputs/fillInInput.mjs.map +1 -0
  158. package/dist/components/studentInputs/fillInInput.vue_vue_type_script_lang.mjs +26 -0
  159. package/dist/components/studentInputs/fillInInput.vue_vue_type_script_lang.mjs.map +1 -0
  160. package/dist/composables/CompositionViewable.mjs +65 -0
  161. package/dist/composables/CompositionViewable.mjs.map +1 -0
  162. package/dist/composables/Displayable.mjs +36 -0
  163. package/dist/composables/Displayable.mjs.map +1 -0
  164. package/dist/composables/useAuthUI.mjs +38 -0
  165. package/dist/composables/useAuthUI.mjs.map +1 -0
  166. package/dist/composables/useEntitlements.mjs +58 -0
  167. package/dist/composables/useEntitlements.mjs.map +1 -0
  168. package/dist/index.mjs +49 -0
  169. package/dist/plugins/pinia.mjs +12 -0
  170. package/dist/plugins/pinia.mjs.map +1 -0
  171. package/dist/services/authAPI.mjs +159 -0
  172. package/dist/services/authAPI.mjs.map +1 -0
  173. package/dist/stores/useAuthStore.mjs +68 -0
  174. package/dist/stores/useAuthStore.mjs.map +1 -0
  175. package/dist/stores/useCardPreviewModeStore.mjs +20 -0
  176. package/dist/stores/useCardPreviewModeStore.mjs.map +1 -0
  177. package/dist/stores/useConfigStore.mjs +60 -0
  178. package/dist/stores/useConfigStore.mjs.map +1 -0
  179. package/dist/utils/SkldrMouseTrap.mjs +48 -0
  180. package/dist/utils/SkldrMouseTrap.mjs.map +1 -0
  181. package/dist/utils/passwordValidation.mjs +12 -0
  182. package/dist/utils/passwordValidation.mjs.map +1 -0
  183. package/package.json +7 -8
  184. package/dist/MarkdownRenderer-U_iPiA2x.mjs +0 -4966
  185. package/dist/MarkdownRenderer-U_iPiA2x.mjs.map +0 -1
  186. package/dist/assets/MarkdownRenderer.css +0 -1
  187. package/dist/common-ui.es.js +0 -5090
  188. package/dist/common-ui.es.js.map +0 -1
  189. package/dist/common-ui.umd.js +0 -77
  190. package/dist/common-ui.umd.js.map +0 -1
@@ -1,4966 +0,0 @@
1
- import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createTextVNode as o, createVNode as s, customRef as c, defineComponent as l, getCurrentInstance as u, h as d, inject as f, markRaw as p, mergeProps as m, normalizeClass as h, onBeforeUnmount as g, onMounted as _, openBlock as v, ref as y, renderList as b, resolveComponent as x, resolveDynamicComponent as S, toDisplayString as C, vModelText as w, watch as T, withCtx as E, withDirectives as D, withKeys as O } from "vue";
2
- import k from "moment";
3
- import { log as A } from "@vue-skuilder/common";
4
- import { defineStore as ee, setActivePinia as j } from "pinia";
5
- //#region \0rolldown/runtime.js
6
- var M = Object.create, N = Object.defineProperty, __name = (e, t) => N(e, "name", {
7
- value: t,
8
- configurable: !0
9
- }), te = Object.getOwnPropertyDescriptor, P = Object.getOwnPropertyNames, ne = Object.getPrototypeOf, re = Object.prototype.hasOwnProperty, __commonJSMin = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), __exportAll = (e, t) => {
10
- let n = {};
11
- for (var r in e) N(n, r, {
12
- get: e[r],
13
- enumerable: !0
14
- });
15
- return t || N(n, Symbol.toStringTag, { value: "Module" }), n;
16
- }, __copyProps = (e, t, n, r) => {
17
- if (t && typeof t == "object" || typeof t == "function") for (var i = P(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !re.call(e, s) && s !== n && N(e, s, {
18
- get: ((e) => t[e]).bind(null, s),
19
- enumerable: !(r = te(t, s)) || r.enumerable
20
- });
21
- return e;
22
- }, __toESM = (e, t, n) => (n = e == null ? {} : M(ne(e)), __copyProps(t || !e || !e.__esModule ? N(n, "default", {
23
- value: e,
24
- enumerable: !0
25
- }) : n, e)), F = /* @__PURE__ */ __name((e, t) => {
26
- let n = e.__vccOpts || e;
27
- for (let [e, r] of t) n[e] = r;
28
- return n;
29
- }, "default"), ie = /* @__PURE__ */ __commonJSMin(((e, t) => {
30
- (function(e, n, r) {
31
- if (!e) return;
32
- for (var i = {
33
- 8: "backspace",
34
- 9: "tab",
35
- 13: "enter",
36
- 16: "shift",
37
- 17: "ctrl",
38
- 18: "alt",
39
- 20: "capslock",
40
- 27: "esc",
41
- 32: "space",
42
- 33: "pageup",
43
- 34: "pagedown",
44
- 35: "end",
45
- 36: "home",
46
- 37: "left",
47
- 38: "up",
48
- 39: "right",
49
- 40: "down",
50
- 45: "ins",
51
- 46: "del",
52
- 91: "meta",
53
- 93: "meta",
54
- 224: "meta"
55
- }, a = {
56
- 106: "*",
57
- 107: "+",
58
- 109: "-",
59
- 110: ".",
60
- 111: "/",
61
- 186: ";",
62
- 187: "=",
63
- 188: ",",
64
- 189: "-",
65
- 190: ".",
66
- 191: "/",
67
- 192: "`",
68
- 219: "[",
69
- 220: "\\",
70
- 221: "]",
71
- 222: "'"
72
- }, o = {
73
- "~": "`",
74
- "!": "1",
75
- "@": "2",
76
- "#": "3",
77
- $: "4",
78
- "%": "5",
79
- "^": "6",
80
- "&": "7",
81
- "*": "8",
82
- "(": "9",
83
- ")": "0",
84
- _: "-",
85
- "+": "=",
86
- ":": ";",
87
- "\"": "'",
88
- "<": ",",
89
- ">": ".",
90
- "?": "/",
91
- "|": "\\"
92
- }, s = {
93
- option: "alt",
94
- command: "meta",
95
- return: "enter",
96
- escape: "esc",
97
- plus: "+",
98
- mod: /Mac|iPod|iPhone|iPad/.test(navigator.platform) ? "meta" : "ctrl"
99
- }, c, l = 1; l < 20; ++l) i[111 + l] = "f" + l;
100
- for (l = 0; l <= 9; ++l) i[l + 96] = l.toString();
101
- function _addEvent(e, t, n) {
102
- if (e.addEventListener) {
103
- e.addEventListener(t, n, !1);
104
- return;
105
- }
106
- e.attachEvent("on" + t, n);
107
- }
108
- function _characterFromEvent(e) {
109
- if (e.type == "keypress") {
110
- var t = String.fromCharCode(e.which);
111
- return e.shiftKey || (t = t.toLowerCase()), t;
112
- }
113
- return i[e.which] ? i[e.which] : a[e.which] ? a[e.which] : String.fromCharCode(e.which).toLowerCase();
114
- }
115
- function _modifiersMatch(e, t) {
116
- return e.sort().join(",") === t.sort().join(",");
117
- }
118
- function _eventModifiers(e) {
119
- var t = [];
120
- return e.shiftKey && t.push("shift"), e.altKey && t.push("alt"), e.ctrlKey && t.push("ctrl"), e.metaKey && t.push("meta"), t;
121
- }
122
- function _preventDefault(e) {
123
- if (e.preventDefault) {
124
- e.preventDefault();
125
- return;
126
- }
127
- e.returnValue = !1;
128
- }
129
- function _stopPropagation(e) {
130
- if (e.stopPropagation) {
131
- e.stopPropagation();
132
- return;
133
- }
134
- e.cancelBubble = !0;
135
- }
136
- function _isModifier(e) {
137
- return e == "shift" || e == "ctrl" || e == "alt" || e == "meta";
138
- }
139
- function _getReverseMap() {
140
- if (!c) for (var e in c = {}, i) e > 95 && e < 112 || i.hasOwnProperty(e) && (c[i[e]] = e);
141
- return c;
142
- }
143
- function _pickBestAction(e, t, n) {
144
- return n || (n = _getReverseMap()[e] ? "keydown" : "keypress"), n == "keypress" && t.length && (n = "keydown"), n;
145
- }
146
- function _keysFromString(e) {
147
- return e === "+" ? ["+"] : (e = e.replace(/\+{2}/g, "+plus"), e.split("+"));
148
- }
149
- function _getKeyInfo(e, t) {
150
- var n, r, i, a = [];
151
- for (n = _keysFromString(e), i = 0; i < n.length; ++i) r = n[i], s[r] && (r = s[r]), t && t != "keypress" && o[r] && (r = o[r], a.push("shift")), _isModifier(r) && a.push(r);
152
- return t = _pickBestAction(r, a, t), {
153
- key: r,
154
- modifiers: a,
155
- action: t
156
- };
157
- }
158
- function _belongsTo(e, t) {
159
- return e === null || e === n ? !1 : e === t ? !0 : _belongsTo(e.parentNode, t);
160
- }
161
- function Mousetrap(e) {
162
- var t = this;
163
- if (e = e || n, !(t instanceof Mousetrap)) return new Mousetrap(e);
164
- t.target = e, t._callbacks = {}, t._directMap = {};
165
- var r = {}, i, a = !1, o = !1, s = !1;
166
- function _resetSequences(e) {
167
- e = e || {};
168
- var t = !1, n;
169
- for (n in r) {
170
- if (e[n]) {
171
- t = !0;
172
- continue;
173
- }
174
- r[n] = 0;
175
- }
176
- t || (s = !1);
177
- }
178
- function _getMatches(e, n, i, a, o, s) {
179
- var c, l, u = [], d = i.type;
180
- if (!t._callbacks[e]) return [];
181
- for (d == "keyup" && _isModifier(e) && (n = [e]), c = 0; c < t._callbacks[e].length; ++c) if (l = t._callbacks[e][c], !(!a && l.seq && r[l.seq] != l.level) && d == l.action && (d == "keypress" && !i.metaKey && !i.ctrlKey || _modifiersMatch(n, l.modifiers))) {
182
- var f = !a && l.combo == o, p = a && l.seq == a && l.level == s;
183
- (f || p) && t._callbacks[e].splice(c, 1), u.push(l);
184
- }
185
- return u;
186
- }
187
- function _fireCallback(e, n, r, i) {
188
- t.stopCallback(n, n.target || n.srcElement, r, i) || e(n, r) === !1 && (_preventDefault(n), _stopPropagation(n));
189
- }
190
- t._handleKey = function(e, t, n) {
191
- var r = _getMatches(e, t, n), i, a = {}, c = 0, l = !1;
192
- for (i = 0; i < r.length; ++i) r[i].seq && (c = Math.max(c, r[i].level));
193
- for (i = 0; i < r.length; ++i) {
194
- if (r[i].seq) {
195
- if (r[i].level != c) continue;
196
- l = !0, a[r[i].seq] = 1, _fireCallback(r[i].callback, n, r[i].combo, r[i].seq);
197
- continue;
198
- }
199
- l || _fireCallback(r[i].callback, n, r[i].combo);
200
- }
201
- var u = n.type == "keypress" && o;
202
- n.type == s && !_isModifier(e) && !u && _resetSequences(a), o = l && n.type == "keydown";
203
- };
204
- function _handleKeyEvent(e) {
205
- typeof e.which != "number" && (e.which = e.keyCode);
206
- var n = _characterFromEvent(e);
207
- if (n) {
208
- if (e.type == "keyup" && a === n) {
209
- a = !1;
210
- return;
211
- }
212
- t.handleKey(n, _eventModifiers(e), e);
213
- }
214
- }
215
- function _resetSequenceTimer() {
216
- clearTimeout(i), i = setTimeout(_resetSequences, 1e3);
217
- }
218
- function _bindSequence(e, t, n, i) {
219
- r[e] = 0;
220
- function _increaseSequence(t) {
221
- return function() {
222
- s = t, ++r[e], _resetSequenceTimer();
223
- };
224
- }
225
- function _callbackAndReset(t) {
226
- _fireCallback(n, t, e), i !== "keyup" && (a = _characterFromEvent(t)), setTimeout(_resetSequences, 10);
227
- }
228
- for (var o = 0; o < t.length; ++o) {
229
- var c = o + 1 === t.length ? _callbackAndReset : _increaseSequence(i || _getKeyInfo(t[o + 1]).action);
230
- _bindSingle(t[o], c, i, e, o);
231
- }
232
- }
233
- function _bindSingle(e, n, r, i, a) {
234
- t._directMap[e + ":" + r] = n, e = e.replace(/\s+/g, " ");
235
- var o = e.split(" "), s;
236
- if (o.length > 1) {
237
- _bindSequence(e, o, n, r);
238
- return;
239
- }
240
- s = _getKeyInfo(e, r), t._callbacks[s.key] = t._callbacks[s.key] || [], _getMatches(s.key, s.modifiers, { type: s.action }, i, e, a), t._callbacks[s.key][i ? "unshift" : "push"]({
241
- callback: n,
242
- modifiers: s.modifiers,
243
- action: s.action,
244
- seq: i,
245
- level: a,
246
- combo: e
247
- });
248
- }
249
- t._bindMultiple = function(e, t, n) {
250
- for (var r = 0; r < e.length; ++r) _bindSingle(e[r], t, n);
251
- }, _addEvent(e, "keypress", _handleKeyEvent), _addEvent(e, "keydown", _handleKeyEvent), _addEvent(e, "keyup", _handleKeyEvent);
252
- }
253
- Mousetrap.prototype.bind = function(e, t, n) {
254
- var r = this;
255
- return e = e instanceof Array ? e : [e], r._bindMultiple.call(r, e, t, n), r;
256
- }, Mousetrap.prototype.unbind = function(e, t) {
257
- var n = this;
258
- return n.bind.call(n, e, function() {}, t);
259
- }, Mousetrap.prototype.trigger = function(e, t) {
260
- var n = this;
261
- return n._directMap[e + ":" + t] && n._directMap[e + ":" + t]({}, e), n;
262
- }, Mousetrap.prototype.reset = function() {
263
- var e = this;
264
- return e._callbacks = {}, e._directMap = {}, e;
265
- }, Mousetrap.prototype.stopCallback = function(e, t) {
266
- var n = this;
267
- if ((" " + t.className + " ").indexOf(" mousetrap ") > -1 || _belongsTo(t, n.target)) return !1;
268
- if ("composedPath" in e && typeof e.composedPath == "function") {
269
- var r = e.composedPath()[0];
270
- r !== e.target && (t = r);
271
- }
272
- return t.tagName == "INPUT" || t.tagName == "SELECT" || t.tagName == "TEXTAREA" || t.isContentEditable;
273
- }, Mousetrap.prototype.handleKey = function() {
274
- var e = this;
275
- return e._handleKey.apply(e, arguments);
276
- }, Mousetrap.addKeycodes = function(e) {
277
- for (var t in e) e.hasOwnProperty(t) && (i[t] = e[t]);
278
- c = null;
279
- }, Mousetrap.init = function() {
280
- var e = Mousetrap(n);
281
- for (var t in e) t.charAt(0) !== "_" && (Mousetrap[t] = function(t) {
282
- return function() {
283
- return e[t].apply(e, arguments);
284
- };
285
- }(t));
286
- }, Mousetrap.init(), e.Mousetrap = Mousetrap, t !== void 0 && t.exports && (t.exports = Mousetrap), typeof define == "function" && define.amd && define(function() {
287
- return Mousetrap;
288
- });
289
- })(typeof window < "u" ? window : null, typeof window < "u" ? document : null);
290
- }));
291
- //#endregion
292
- //#region \0@oxc-project+runtime@0.115.0/helpers/typeof.js
293
- function _typeof(e) {
294
- "@babel/helpers - typeof";
295
- return _typeof = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
296
- return typeof e;
297
- } : function(e) {
298
- return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
299
- }, _typeof(e);
300
- }
301
- //#endregion
302
- //#region \0@oxc-project+runtime@0.115.0/helpers/toPrimitive.js
303
- function toPrimitive(e, t) {
304
- if (_typeof(e) != "object" || !e) return e;
305
- var n = e[Symbol.toPrimitive];
306
- if (n !== void 0) {
307
- var r = n.call(e, t || "default");
308
- if (_typeof(r) != "object") return r;
309
- throw TypeError("@@toPrimitive must return a primitive value.");
310
- }
311
- return (t === "string" ? String : Number)(e);
312
- }
313
- //#endregion
314
- //#region \0@oxc-project+runtime@0.115.0/helpers/toPropertyKey.js
315
- function toPropertyKey(e) {
316
- var t = toPrimitive(e, "string");
317
- return _typeof(t) == "symbol" ? t : t + "";
318
- }
319
- //#endregion
320
- //#region \0@oxc-project+runtime@0.115.0/helpers/defineProperty.js
321
- function _defineProperty(e, t, n) {
322
- return (t = toPropertyKey(t)) in e ? Object.defineProperty(e, t, {
323
- value: n,
324
- enumerable: !0,
325
- configurable: !0,
326
- writable: !0
327
- }) : e[t] = n, e;
328
- }
329
- //#endregion
330
- //#region src/utils/SkldrMouseTrap.ts
331
- var ae = /* @__PURE__ */ __toESM(ie());
332
- function inputElementIsFocused() {
333
- let e = document.activeElement;
334
- return e instanceof HTMLInputElement && (e.type === "checkbox" || e.type === "radio") ? !1 : e instanceof HTMLElement && (e.tagName === "INPUT" || e.tagName === "TEXTAREA" || e.tagName === "SELECT" || e.isContentEditable);
335
- }
336
- var I = class SkldrMouseTrap {
337
- constructor() {
338
- _defineProperty(this, "mouseTrap", void 0), _defineProperty(this, "hotkeys", void 0), this.mouseTrap = new ae.default(), this.mouseTrap.stopCallback = () => !1, this.hotkeys = [];
339
- }
340
- static get commands() {
341
- return SkldrMouseTrap.instance().hotkeys.map((e) => ({
342
- command: e.command,
343
- hotkey: e.hotkey
344
- }));
345
- }
346
- static addBinding(e) {
347
- let t = Array.isArray(e) ? e : [e], n = SkldrMouseTrap.instance();
348
- n.hotkeys = [...n.hotkeys, ...t], t.forEach((e) => {
349
- n.mouseTrap.bind(e.hotkey, (t, n) => {
350
- if (inputElementIsFocused()) {
351
- console.log(`Ignoring hotkey ${e.hotkey} while input element is focused`);
352
- return;
353
- }
354
- e.callback(t, n);
355
- });
356
- });
357
- }
358
- static removeBinding(e) {
359
- let t = SkldrMouseTrap.instance(), n = [...t.hotkeys];
360
- Array.isArray(e) && !e.every((e) => typeof e == "string" || typeof e == "number") ? e.forEach((e) => {
361
- t.hotkeys = t.hotkeys.filter((t) => JSON.stringify(t.hotkey) !== JSON.stringify(e)), t.mouseTrap.unbind(e);
362
- }) : (t.hotkeys = n.filter((t) => JSON.stringify(t.hotkey) !== JSON.stringify(e)), t.mouseTrap.unbind(e));
363
- }
364
- static reset() {
365
- console.warn("SkldrMouseTrap.reset() may affect hotkeys registered by other components. Consider using removeBinding() with specific hotkeys for better component isolation."), SkldrMouseTrap.instance().mouseTrap.reset(), SkldrMouseTrap.instance().hotkeys = [];
366
- }
367
- static instance() {
368
- return SkldrMouseTrap._instance || (SkldrMouseTrap._instance = new SkldrMouseTrap()), SkldrMouseTrap._instance;
369
- }
370
- };
371
- _defineProperty(I, "_instance", void 0);
372
- //#endregion
373
- //#region src/composables/CompositionViewable.ts
374
- function useViewable(e, t, n) {
375
- let r = y(k.utc()), i = y([]), a = {
376
- log: (e, ...t) => console.log(`[${n}]: `, e, ...t),
377
- error: (e, ...t) => console.error(`[${n}]: `, e, ...t),
378
- warn: (e, ...t) => console.warn(`[${n}]: `, e, ...t)
379
- }, o = c(() => ({
380
- get: () => Math.abs(k.utc().diff(r.value, "milliseconds")),
381
- set: () => {}
382
- })), getURL = (t, n = 0) => {
383
- try {
384
- if (e.data[n]?.[t]) return URL.createObjectURL(e.data[n][t]);
385
- } catch (e) {
386
- a.error("Error creating URL for item:", t, e);
387
- }
388
- return "";
389
- }, emitResponse = (e) => {
390
- t("emitResponse", e);
391
- };
392
- return {
393
- startTime: r,
394
- hotKeys: i,
395
- timeSpent: o,
396
- logger: a,
397
- getURL,
398
- emitResponse
399
- };
400
- }
401
- function useQuestionView(e) {
402
- let t = y(0), n = y(0), r = y([]), i = y(3), a = y(2), o = y(), submitAnswer = (t, i, a) => {
403
- if (e.logger.log("submitAnswer called..."), !o.value) throw Error("Question not initialized");
404
- r.value.push([t, i ?? ""]);
405
- let s = e.timeSpent.value, c = o.value.evaluate(t, s);
406
- e.logger.log(`evaluation of answer ${t}:`, c);
407
- let l = {
408
- ...c,
409
- priorAttemps: n.value,
410
- courseID: "",
411
- cardID: "",
412
- timeSpent: s,
413
- timeStamp: e.startTime.value,
414
- userAnswer: t
415
- };
416
- return a?.deferAdvance !== void 0 && (l.deferAdvance = a.deferAdvance), c.isCorrect || n.value++, e.emitResponse(l), l;
417
- };
418
- return {
419
- priorSessionViews: t,
420
- priorAttempts: n,
421
- priorAnswers: r,
422
- maxAttemptsPerView: i,
423
- maxSessionViews: a,
424
- question: o,
425
- submitAnswer
426
- };
427
- }
428
- function isQuestionView(e) {
429
- return typeof e == "object" && !!e && "submitAnswer" in e && "priorAttempts" in e;
430
- }
431
- //#endregion
432
- //#region src/plugins/pinia.ts
433
- var oe = null, setPinia = (e) => {
434
- oe = e;
435
- }, getPinia = () => oe, se = { install(e, t) {
436
- let n = t?.pinia;
437
- n && setPinia(n);
438
- } }, useCardPreviewModeStore = () => {
439
- let e = getPinia();
440
- return e && j(e), ee("previewMode", {
441
- state: () => ({ previewMode: !1 }),
442
- actions: { setPreviewMode(e) {
443
- this.previewMode = e;
444
- } },
445
- getters: { isPreviewMode() {
446
- return this.previewMode;
447
- } }
448
- })();
449
- }, ce = l({
450
- name: "UserInput",
451
- data() {
452
- return {
453
- answer: "",
454
- previewModeStore: null
455
- };
456
- },
457
- mounted() {
458
- this.previewModeStore = useCardPreviewModeStore();
459
- },
460
- computed: {
461
- autofocus() {
462
- return !this.previewModeStore?.previewMode;
463
- },
464
- autoFocus() {
465
- return this.autofocus;
466
- }
467
- },
468
- methods: {
469
- submitAnswer(e) {
470
- return this.submit(e);
471
- },
472
- submit(e) {
473
- return this.getQuestionViewAncestor().submitAnswer(e, this.$options.name ?? "UserInput");
474
- },
475
- getQuestionViewAncestor() {
476
- let e = this.$parent, t = 0;
477
- for (; e && !isQuestionView(e);) {
478
- let n = e.$parent;
479
- if (!n) {
480
- let e = "\nUserInput.submit() has failed.\nThe input element has no QuestionView ancestor element.";
481
- throw A(e), Error(e);
482
- }
483
- if (e = n, t++, t > 100) {
484
- let e = "\nUserInput.submit() has failed.\nExceeded maximum ancestor lookup depth.";
485
- throw A(e), Error(e);
486
- }
487
- }
488
- if (!e) throw Error("No QuestionView ancestor found");
489
- return e;
490
- }
491
- }
492
- }), le = l({
493
- name: "UserInputString",
494
- extends: ce,
495
- props: { icon: {
496
- type: Boolean,
497
- required: !1
498
- } },
499
- computed: { prependIcon() {
500
- return this.icon ? "edit" : "";
501
- } },
502
- mounted() {
503
- this.$refs.input?.focus();
504
- },
505
- methods: {}
506
- }), ue = { class: "user-input-container" }, de = ["autofocus"];
507
- function _sfc_render$2(e, t, n, r, o, s) {
508
- return v(), i("span", ue, [D(a("input", {
509
- "onUpdate:modelValue": t[0] || (t[0] = (t) => e.answer = t),
510
- autofocus: e.autofocus,
511
- type: "text",
512
- class: "user-input-string",
513
- ref: "input",
514
- onKeyup: t[1] || (t[1] = O((t) => e.submitAnswer(e.answer), ["enter"]))
515
- }, null, 40, de), [[w, e.answer]])]);
516
- }
517
- __name(_sfc_render$2, "_sfc_render");
518
- var fe = /* @__PURE__ */ F(le, [["render", _sfc_render$2], ["__scopeId", "data-v-aa14961f"]]), pe = l({
519
- name: "FillInInput",
520
- components: { UserInputString: fe },
521
- props: { text: {
522
- type: String,
523
- required: !0
524
- } },
525
- setup(e) {
526
- let n = y("text"), r = y(""), i = t(() => e.text.split("||").length > 1);
527
- return _(() => {
528
- console.log(`fillinCreated w/ text: ${e.text}`), r.value = e.text.substring(2, e.text.length - 2), console.log(`fillin text trimmed to: ${r.value}`), r.value.split("||").length > 1 && (n.value = "radio");
529
- }), {
530
- inputType: n,
531
- radioType: i,
532
- processedText: r
533
- };
534
- }
535
- }), me = {
536
- key: 0,
537
- class: "text-h5 underline"
538
- };
539
- function _sfc_render$1(e, t, r, a, o, s) {
540
- let c = x("user-input-string");
541
- return e.radioType ? (v(), i("span", me, "\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0")) : (v(), n(c, {
542
- key: 1,
543
- id: "input",
544
- icon: !1,
545
- type: "text",
546
- value: e.processedText
547
- }, null, 8, ["value"]));
548
- }
549
- __name(_sfc_render$1, "_sfc_render");
550
- var he = /* @__PURE__ */ F(pe, [["render", _sfc_render$1], ["__scopeId", "data-v-486ac035"]]);
551
- //#endregion
552
- //#region ../../node_modules/marked/lib/marked.esm.js
553
- function _getDefaults() {
554
- return {
555
- async: !1,
556
- breaks: !1,
557
- extensions: null,
558
- gfm: !0,
559
- hooks: null,
560
- pedantic: !1,
561
- renderer: null,
562
- silent: !1,
563
- tokenizer: null,
564
- walkTokens: null
565
- };
566
- }
567
- var L = _getDefaults();
568
- function changeDefaults(e) {
569
- L = e;
570
- }
571
- var R = { exec: () => null };
572
- function edit(e, t = "") {
573
- let n = typeof e == "string" ? e : e.source, r = {
574
- replace: (e, t) => {
575
- let i = typeof t == "string" ? t : t.source;
576
- return i = i.replace(z.caret, "$1"), n = n.replace(e, i), r;
577
- },
578
- getRegex: () => new RegExp(n, t)
579
- };
580
- return r;
581
- }
582
- var z = {
583
- codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm,
584
- outputLinkReplace: /\\([\[\]])/g,
585
- indentCodeCompensation: /^(\s+)(?:```)/,
586
- beginningSpace: /^\s+/,
587
- endingHash: /#$/,
588
- startingSpaceChar: /^ /,
589
- endingSpaceChar: / $/,
590
- nonSpaceChar: /[^ ]/,
591
- newLineCharGlobal: /\n/g,
592
- tabCharGlobal: /\t/g,
593
- multipleSpaceGlobal: /\s+/g,
594
- blankLine: /^[ \t]*$/,
595
- doubleBlankLine: /\n[ \t]*\n[ \t]*$/,
596
- blockquoteStart: /^ {0,3}>/,
597
- blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g,
598
- blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm,
599
- listReplaceTabs: /^\t+/,
600
- listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g,
601
- listIsTask: /^\[[ xX]\] /,
602
- listReplaceTask: /^\[[ xX]\] +/,
603
- anyLine: /\n.*\n/,
604
- hrefBrackets: /^<(.*)>$/,
605
- tableDelimiter: /[:|]/,
606
- tableAlignChars: /^\||\| *$/g,
607
- tableRowBlankLine: /\n[ \t]*$/,
608
- tableAlignRight: /^ *-+: *$/,
609
- tableAlignCenter: /^ *:-+: *$/,
610
- tableAlignLeft: /^ *:-+ *$/,
611
- startATag: /^<a /i,
612
- endATag: /^<\/a>/i,
613
- startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i,
614
- endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i,
615
- startAngleBracket: /^</,
616
- endAngleBracket: />$/,
617
- pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/,
618
- unicodeAlphaNumeric: /[\p{L}\p{N}]/u,
619
- escapeTest: /[&<>"']/,
620
- escapeReplace: /[&<>"']/g,
621
- escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,
622
- escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,
623
- unescapeTest: /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,
624
- caret: /(^|[^\[])\^/g,
625
- percentDecode: /%25/g,
626
- findPipe: /\|/g,
627
- splitPipe: / \|/,
628
- slashPipe: /\\\|/g,
629
- carriageReturn: /\r\n|\r/g,
630
- spaceLine: /^ +$/gm,
631
- notSpaceStart: /^\S*/,
632
- endingNewline: /\n$/,
633
- listItemRegex: (e) => RegExp(`^( {0,3}${e})((?:[\t ][^\\n]*)?(?:\\n|$))`),
634
- nextBulletRegex: (e) => RegExp(`^ {0,${Math.min(3, e - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),
635
- hrRegex: (e) => RegExp(`^ {0,${Math.min(3, e - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),
636
- fencesBeginRegex: (e) => RegExp(`^ {0,${Math.min(3, e - 1)}}(?:\`\`\`|~~~)`),
637
- headingBeginRegex: (e) => RegExp(`^ {0,${Math.min(3, e - 1)}}#`),
638
- htmlBeginRegex: (e) => RegExp(`^ {0,${Math.min(3, e - 1)}}<(?:[a-z].*>|!--)`, "i")
639
- }, ge = /^(?:[ \t]*(?:\n|$))+/, _e = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, ve = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, B = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, ye = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, V = /(?:[*+-]|\d{1,9}[.)])/, be = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, xe = edit(be).replace(/bull/g, V).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), Se = edit(be).replace(/bull/g, V).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), H = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Ce = /^[^\n]+/, U = /(?!\s*\])(?:\\.|[^\[\]\\])+/, we = edit(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", U).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Te = edit(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, V).getRegex(), W = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", Ee = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, De = edit("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", Ee).replace("tag", W).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), Oe = edit(H).replace("hr", B).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", W).getRegex(), ke = {
640
- blockquote: edit(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Oe).getRegex(),
641
- code: _e,
642
- def: we,
643
- fences: ve,
644
- heading: ye,
645
- hr: B,
646
- html: De,
647
- lheading: xe,
648
- list: Te,
649
- newline: ge,
650
- paragraph: Oe,
651
- table: R,
652
- text: Ce
653
- }, Ae = edit("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", B).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", W).getRegex(), je = {
654
- ...ke,
655
- lheading: Se,
656
- table: Ae,
657
- paragraph: edit(H).replace("hr", B).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Ae).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", W).getRegex()
658
- }, Me = {
659
- ...ke,
660
- html: edit("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment", Ee).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),
661
- def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
662
- heading: /^(#{1,6})(.*)(?:\n+|$)/,
663
- fences: R,
664
- lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
665
- paragraph: edit(H).replace("hr", B).replace("heading", " *#{1,6} *[^\n]").replace("lheading", xe).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
666
- }, Ne = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Pe = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Fe = /^( {2,}|\\)\n(?!\s*$)/, Ie = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, G = /[\p{P}\p{S}]/u, Le = /[\s\p{P}\p{S}]/u, Re = /[^\s\p{P}\p{S}]/u, ze = edit(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, Le).getRegex(), Be = /(?!~)[\p{P}\p{S}]/u, Ve = /(?!~)[\s\p{P}\p{S}]/u, He = /(?:[^\s\p{P}\p{S}]|~)/u, Ue = /\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g, We = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, Ge = edit(We, "u").replace(/punct/g, G).getRegex(), Ke = edit(We, "u").replace(/punct/g, Be).getRegex(), qe = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Je = edit(qe, "gu").replace(/notPunctSpace/g, Re).replace(/punctSpace/g, Le).replace(/punct/g, G).getRegex(), Ye = edit(qe, "gu").replace(/notPunctSpace/g, He).replace(/punctSpace/g, Ve).replace(/punct/g, Be).getRegex(), Xe = edit("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, Re).replace(/punctSpace/g, Le).replace(/punct/g, G).getRegex(), Ze = edit(/\\(punct)/, "gu").replace(/punct/g, G).getRegex(), Qe = edit(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), $e = edit(Ee).replace("(?:-->|$)", "-->").getRegex(), et = edit("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", $e).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), K = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, tt = edit(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label", K).replace("href", /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), nt = edit(/^!?\[(label)\]\[(ref)\]/).replace("label", K).replace("ref", U).getRegex(), rt = edit(/^!?\[(ref)\](?:\[\])?/).replace("ref", U).getRegex(), it = {
667
- _backpedal: R,
668
- anyPunctuation: Ze,
669
- autolink: Qe,
670
- blockSkip: Ue,
671
- br: Fe,
672
- code: Pe,
673
- del: R,
674
- emStrongLDelim: Ge,
675
- emStrongRDelimAst: Je,
676
- emStrongRDelimUnd: Xe,
677
- escape: Ne,
678
- link: tt,
679
- nolink: rt,
680
- punctuation: ze,
681
- reflink: nt,
682
- reflinkSearch: edit("reflink|nolink(?!\\()", "g").replace("reflink", nt).replace("nolink", rt).getRegex(),
683
- tag: et,
684
- text: Ie,
685
- url: R
686
- }, at = {
687
- ...it,
688
- link: edit(/^!?\[(label)\]\((.*?)\)/).replace("label", K).getRegex(),
689
- reflink: edit(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", K).getRegex()
690
- }, ot = {
691
- ...it,
692
- emStrongRDelimAst: Ye,
693
- emStrongLDelim: Ke,
694
- url: edit(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/, "i").replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
695
- _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
696
- del: /^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,
697
- text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/
698
- }, st = {
699
- ...ot,
700
- br: edit(Fe).replace("{2,}", "*").getRegex(),
701
- text: edit(ot.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
702
- }, q = {
703
- normal: ke,
704
- gfm: je,
705
- pedantic: Me
706
- }, J = {
707
- normal: it,
708
- gfm: ot,
709
- breaks: st,
710
- pedantic: at
711
- }, ct = {
712
- "&": "&amp;",
713
- "<": "&lt;",
714
- ">": "&gt;",
715
- "\"": "&quot;",
716
- "'": "&#39;"
717
- }, getEscapeReplacement = (e) => ct[e];
718
- function escape(e, t) {
719
- if (t) {
720
- if (z.escapeTest.test(e)) return e.replace(z.escapeReplace, getEscapeReplacement);
721
- } else if (z.escapeTestNoEncode.test(e)) return e.replace(z.escapeReplaceNoEncode, getEscapeReplacement);
722
- return e;
723
- }
724
- function cleanUrl(e) {
725
- try {
726
- e = encodeURI(e).replace(z.percentDecode, "%");
727
- } catch {
728
- return null;
729
- }
730
- return e;
731
- }
732
- function splitCells(e, t) {
733
- let n = e.replace(z.findPipe, (e, t, n) => {
734
- let r = !1, i = t;
735
- for (; --i >= 0 && n[i] === "\\";) r = !r;
736
- return r ? "|" : " |";
737
- }).split(z.splitPipe), r = 0;
738
- if (n[0].trim() || n.shift(), n.length > 0 && !n.at(-1)?.trim() && n.pop(), t) if (n.length > t) n.splice(t);
739
- else for (; n.length < t;) n.push("");
740
- for (; r < n.length; r++) n[r] = n[r].trim().replace(z.slashPipe, "|");
741
- return n;
742
- }
743
- function rtrim(e, t, n) {
744
- let r = e.length;
745
- if (r === 0) return "";
746
- let i = 0;
747
- for (; i < r && e.charAt(r - i - 1) === t;) i++;
748
- return e.slice(0, r - i);
749
- }
750
- function findClosingBracket(e, t) {
751
- if (e.indexOf(t[1]) === -1) return -1;
752
- let n = 0;
753
- for (let r = 0; r < e.length; r++) if (e[r] === "\\") r++;
754
- else if (e[r] === t[0]) n++;
755
- else if (e[r] === t[1] && (n--, n < 0)) return r;
756
- return -1;
757
- }
758
- function outputLink(e, t, n, r, i) {
759
- let a = t.href, o = t.title || null, s = e[1].replace(i.other.outputLinkReplace, "$1");
760
- if (e[0].charAt(0) !== "!") {
761
- r.state.inLink = !0;
762
- let e = {
763
- type: "link",
764
- raw: n,
765
- href: a,
766
- title: o,
767
- text: s,
768
- tokens: r.inlineTokens(s)
769
- };
770
- return r.state.inLink = !1, e;
771
- }
772
- return {
773
- type: "image",
774
- raw: n,
775
- href: a,
776
- title: o,
777
- text: s
778
- };
779
- }
780
- function indentCodeCompensation(e, t, n) {
781
- let r = e.match(n.other.indentCodeCompensation);
782
- if (r === null) return t;
783
- let i = r[1];
784
- return t.split("\n").map((e) => {
785
- let t = e.match(n.other.beginningSpace);
786
- if (t === null) return e;
787
- let [r] = t;
788
- return r.length >= i.length ? e.slice(i.length) : e;
789
- }).join("\n");
790
- }
791
- var _Tokenizer = class {
792
- constructor(e) {
793
- _defineProperty(this, "options", void 0), _defineProperty(this, "rules", void 0), _defineProperty(this, "lexer", void 0), this.options = e || L;
794
- }
795
- space(e) {
796
- let t = this.rules.block.newline.exec(e);
797
- if (t && t[0].length > 0) return {
798
- type: "space",
799
- raw: t[0]
800
- };
801
- }
802
- code(e) {
803
- let t = this.rules.block.code.exec(e);
804
- if (t) {
805
- let e = t[0].replace(this.rules.other.codeRemoveIndent, "");
806
- return {
807
- type: "code",
808
- raw: t[0],
809
- codeBlockStyle: "indented",
810
- text: this.options.pedantic ? e : rtrim(e, "\n")
811
- };
812
- }
813
- }
814
- fences(e) {
815
- let t = this.rules.block.fences.exec(e);
816
- if (t) {
817
- let e = t[0], n = indentCodeCompensation(e, t[3] || "", this.rules);
818
- return {
819
- type: "code",
820
- raw: e,
821
- lang: t[2] ? t[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : t[2],
822
- text: n
823
- };
824
- }
825
- }
826
- heading(e) {
827
- let t = this.rules.block.heading.exec(e);
828
- if (t) {
829
- let e = t[2].trim();
830
- if (this.rules.other.endingHash.test(e)) {
831
- let t = rtrim(e, "#");
832
- (this.options.pedantic || !t || this.rules.other.endingSpaceChar.test(t)) && (e = t.trim());
833
- }
834
- return {
835
- type: "heading",
836
- raw: t[0],
837
- depth: t[1].length,
838
- text: e,
839
- tokens: this.lexer.inline(e)
840
- };
841
- }
842
- }
843
- hr(e) {
844
- let t = this.rules.block.hr.exec(e);
845
- if (t) return {
846
- type: "hr",
847
- raw: rtrim(t[0], "\n")
848
- };
849
- }
850
- blockquote(e) {
851
- let t = this.rules.block.blockquote.exec(e);
852
- if (t) {
853
- let e = rtrim(t[0], "\n").split("\n"), n = "", r = "", i = [];
854
- for (; e.length > 0;) {
855
- let t = !1, a = [], o;
856
- for (o = 0; o < e.length; o++) if (this.rules.other.blockquoteStart.test(e[o])) a.push(e[o]), t = !0;
857
- else if (!t) a.push(e[o]);
858
- else break;
859
- e = e.slice(o);
860
- let s = a.join("\n"), c = s.replace(this.rules.other.blockquoteSetextReplace, "\n $1").replace(this.rules.other.blockquoteSetextReplace2, "");
861
- n = n ? `${n}\n${s}` : s, r = r ? `${r}\n${c}` : c;
862
- let l = this.lexer.state.top;
863
- if (this.lexer.state.top = !0, this.lexer.blockTokens(c, i, !0), this.lexer.state.top = l, e.length === 0) break;
864
- let u = i.at(-1);
865
- if (u?.type === "code") break;
866
- if (u?.type === "blockquote") {
867
- let t = u, a = t.raw + "\n" + e.join("\n"), o = this.blockquote(a);
868
- i[i.length - 1] = o, n = n.substring(0, n.length - t.raw.length) + o.raw, r = r.substring(0, r.length - t.text.length) + o.text;
869
- break;
870
- } else if (u?.type === "list") {
871
- let t = u, a = t.raw + "\n" + e.join("\n"), o = this.list(a);
872
- i[i.length - 1] = o, n = n.substring(0, n.length - u.raw.length) + o.raw, r = r.substring(0, r.length - t.raw.length) + o.raw, e = a.substring(i.at(-1).raw.length).split("\n");
873
- continue;
874
- }
875
- }
876
- return {
877
- type: "blockquote",
878
- raw: n,
879
- tokens: i,
880
- text: r
881
- };
882
- }
883
- }
884
- list(e) {
885
- let t = this.rules.block.list.exec(e);
886
- if (t) {
887
- let n = t[1].trim(), r = n.length > 1, i = {
888
- type: "list",
889
- raw: "",
890
- ordered: r,
891
- start: r ? +n.slice(0, -1) : "",
892
- loose: !1,
893
- items: []
894
- };
895
- n = r ? `\\d{1,9}\\${n.slice(-1)}` : `\\${n}`, this.options.pedantic && (n = r ? n : "[*+-]");
896
- let a = this.rules.other.listItemRegex(n), o = !1;
897
- for (; e;) {
898
- let n = !1, r = "", s = "";
899
- if (!(t = a.exec(e)) || this.rules.block.hr.test(e)) break;
900
- r = t[0], e = e.substring(r.length);
901
- let c = t[2].split("\n", 1)[0].replace(this.rules.other.listReplaceTabs, (e) => " ".repeat(3 * e.length)), l = e.split("\n", 1)[0], u = !c.trim(), d = 0;
902
- if (this.options.pedantic ? (d = 2, s = c.trimStart()) : u ? d = t[1].length + 1 : (d = t[2].search(this.rules.other.nonSpaceChar), d = d > 4 ? 1 : d, s = c.slice(d), d += t[1].length), u && this.rules.other.blankLine.test(l) && (r += l + "\n", e = e.substring(l.length + 1), n = !0), !n) {
903
- let t = this.rules.other.nextBulletRegex(d), n = this.rules.other.hrRegex(d), i = this.rules.other.fencesBeginRegex(d), a = this.rules.other.headingBeginRegex(d), o = this.rules.other.htmlBeginRegex(d);
904
- for (; e;) {
905
- let f = e.split("\n", 1)[0], p;
906
- if (l = f, this.options.pedantic ? (l = l.replace(this.rules.other.listReplaceNesting, " "), p = l) : p = l.replace(this.rules.other.tabCharGlobal, " "), i.test(l) || a.test(l) || o.test(l) || t.test(l) || n.test(l)) break;
907
- if (p.search(this.rules.other.nonSpaceChar) >= d || !l.trim()) s += "\n" + p.slice(d);
908
- else {
909
- if (u || c.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || i.test(c) || a.test(c) || n.test(c)) break;
910
- s += "\n" + l;
911
- }
912
- !u && !l.trim() && (u = !0), r += f + "\n", e = e.substring(f.length + 1), c = p.slice(d);
913
- }
914
- }
915
- i.loose || (o ? i.loose = !0 : this.rules.other.doubleBlankLine.test(r) && (o = !0));
916
- let f = null, p;
917
- this.options.gfm && (f = this.rules.other.listIsTask.exec(s), f && (p = f[0] !== "[ ] ", s = s.replace(this.rules.other.listReplaceTask, ""))), i.items.push({
918
- type: "list_item",
919
- raw: r,
920
- task: !!f,
921
- checked: p,
922
- loose: !1,
923
- text: s,
924
- tokens: []
925
- }), i.raw += r;
926
- }
927
- let s = i.items.at(-1);
928
- if (s) s.raw = s.raw.trimEnd(), s.text = s.text.trimEnd();
929
- else return;
930
- i.raw = i.raw.trimEnd();
931
- for (let e = 0; e < i.items.length; e++) if (this.lexer.state.top = !1, i.items[e].tokens = this.lexer.blockTokens(i.items[e].text, []), !i.loose) {
932
- let t = i.items[e].tokens.filter((e) => e.type === "space");
933
- i.loose = t.length > 0 && t.some((e) => this.rules.other.anyLine.test(e.raw));
934
- }
935
- if (i.loose) for (let e = 0; e < i.items.length; e++) i.items[e].loose = !0;
936
- return i;
937
- }
938
- }
939
- html(e) {
940
- let t = this.rules.block.html.exec(e);
941
- if (t) return {
942
- type: "html",
943
- block: !0,
944
- raw: t[0],
945
- pre: t[1] === "pre" || t[1] === "script" || t[1] === "style",
946
- text: t[0]
947
- };
948
- }
949
- def(e) {
950
- let t = this.rules.block.def.exec(e);
951
- if (t) {
952
- let e = t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal, " "), n = t[2] ? t[2].replace(this.rules.other.hrefBrackets, "$1").replace(this.rules.inline.anyPunctuation, "$1") : "", r = t[3] ? t[3].substring(1, t[3].length - 1).replace(this.rules.inline.anyPunctuation, "$1") : t[3];
953
- return {
954
- type: "def",
955
- tag: e,
956
- raw: t[0],
957
- href: n,
958
- title: r
959
- };
960
- }
961
- }
962
- table(e) {
963
- let t = this.rules.block.table.exec(e);
964
- if (!t || !this.rules.other.tableDelimiter.test(t[2])) return;
965
- let n = splitCells(t[1]), r = t[2].replace(this.rules.other.tableAlignChars, "").split("|"), i = t[3]?.trim() ? t[3].replace(this.rules.other.tableRowBlankLine, "").split("\n") : [], a = {
966
- type: "table",
967
- raw: t[0],
968
- header: [],
969
- align: [],
970
- rows: []
971
- };
972
- if (n.length === r.length) {
973
- for (let e of r) this.rules.other.tableAlignRight.test(e) ? a.align.push("right") : this.rules.other.tableAlignCenter.test(e) ? a.align.push("center") : this.rules.other.tableAlignLeft.test(e) ? a.align.push("left") : a.align.push(null);
974
- for (let e = 0; e < n.length; e++) a.header.push({
975
- text: n[e],
976
- tokens: this.lexer.inline(n[e]),
977
- header: !0,
978
- align: a.align[e]
979
- });
980
- for (let e of i) a.rows.push(splitCells(e, a.header.length).map((e, t) => ({
981
- text: e,
982
- tokens: this.lexer.inline(e),
983
- header: !1,
984
- align: a.align[t]
985
- })));
986
- return a;
987
- }
988
- }
989
- lheading(e) {
990
- let t = this.rules.block.lheading.exec(e);
991
- if (t) return {
992
- type: "heading",
993
- raw: t[0],
994
- depth: t[2].charAt(0) === "=" ? 1 : 2,
995
- text: t[1],
996
- tokens: this.lexer.inline(t[1])
997
- };
998
- }
999
- paragraph(e) {
1000
- let t = this.rules.block.paragraph.exec(e);
1001
- if (t) {
1002
- let e = t[1].charAt(t[1].length - 1) === "\n" ? t[1].slice(0, -1) : t[1];
1003
- return {
1004
- type: "paragraph",
1005
- raw: t[0],
1006
- text: e,
1007
- tokens: this.lexer.inline(e)
1008
- };
1009
- }
1010
- }
1011
- text(e) {
1012
- let t = this.rules.block.text.exec(e);
1013
- if (t) return {
1014
- type: "text",
1015
- raw: t[0],
1016
- text: t[0],
1017
- tokens: this.lexer.inline(t[0])
1018
- };
1019
- }
1020
- escape(e) {
1021
- let t = this.rules.inline.escape.exec(e);
1022
- if (t) return {
1023
- type: "escape",
1024
- raw: t[0],
1025
- text: t[1]
1026
- };
1027
- }
1028
- tag(e) {
1029
- let t = this.rules.inline.tag.exec(e);
1030
- if (t) return !this.lexer.state.inLink && this.rules.other.startATag.test(t[0]) ? this.lexer.state.inLink = !0 : this.lexer.state.inLink && this.rules.other.endATag.test(t[0]) && (this.lexer.state.inLink = !1), !this.lexer.state.inRawBlock && this.rules.other.startPreScriptTag.test(t[0]) ? this.lexer.state.inRawBlock = !0 : this.lexer.state.inRawBlock && this.rules.other.endPreScriptTag.test(t[0]) && (this.lexer.state.inRawBlock = !1), {
1031
- type: "html",
1032
- raw: t[0],
1033
- inLink: this.lexer.state.inLink,
1034
- inRawBlock: this.lexer.state.inRawBlock,
1035
- block: !1,
1036
- text: t[0]
1037
- };
1038
- }
1039
- link(e) {
1040
- let t = this.rules.inline.link.exec(e);
1041
- if (t) {
1042
- let e = t[2].trim();
1043
- if (!this.options.pedantic && this.rules.other.startAngleBracket.test(e)) {
1044
- if (!this.rules.other.endAngleBracket.test(e)) return;
1045
- let t = rtrim(e.slice(0, -1), "\\");
1046
- if ((e.length - t.length) % 2 == 0) return;
1047
- } else {
1048
- let e = findClosingBracket(t[2], "()");
1049
- if (e > -1) {
1050
- let n = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + e;
1051
- t[2] = t[2].substring(0, e), t[0] = t[0].substring(0, n).trim(), t[3] = "";
1052
- }
1053
- }
1054
- let n = t[2], r = "";
1055
- if (this.options.pedantic) {
1056
- let e = this.rules.other.pedanticHrefTitle.exec(n);
1057
- e && (n = e[1], r = e[3]);
1058
- } else r = t[3] ? t[3].slice(1, -1) : "";
1059
- return n = n.trim(), this.rules.other.startAngleBracket.test(n) && (n = this.options.pedantic && !this.rules.other.endAngleBracket.test(e) ? n.slice(1) : n.slice(1, -1)), outputLink(t, {
1060
- href: n && n.replace(this.rules.inline.anyPunctuation, "$1"),
1061
- title: r && r.replace(this.rules.inline.anyPunctuation, "$1")
1062
- }, t[0], this.lexer, this.rules);
1063
- }
1064
- }
1065
- reflink(e, t) {
1066
- let n;
1067
- if ((n = this.rules.inline.reflink.exec(e)) || (n = this.rules.inline.nolink.exec(e))) {
1068
- let e = t[(n[2] || n[1]).replace(this.rules.other.multipleSpaceGlobal, " ").toLowerCase()];
1069
- if (!e) {
1070
- let e = n[0].charAt(0);
1071
- return {
1072
- type: "text",
1073
- raw: e,
1074
- text: e
1075
- };
1076
- }
1077
- return outputLink(n, e, n[0], this.lexer, this.rules);
1078
- }
1079
- }
1080
- emStrong(e, t, n = "") {
1081
- let r = this.rules.inline.emStrongLDelim.exec(e);
1082
- if (r && !(r[3] && n.match(this.rules.other.unicodeAlphaNumeric)) && (!(r[1] || r[2]) || !n || this.rules.inline.punctuation.exec(n))) {
1083
- let n = [...r[0]].length - 1, i, a, o = n, s = 0, c = r[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
1084
- for (c.lastIndex = 0, t = t.slice(-1 * e.length + n); (r = c.exec(t)) != null;) {
1085
- if (i = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !i) continue;
1086
- if (a = [...i].length, r[3] || r[4]) {
1087
- o += a;
1088
- continue;
1089
- } else if ((r[5] || r[6]) && n % 3 && !((n + a) % 3)) {
1090
- s += a;
1091
- continue;
1092
- }
1093
- if (o -= a, o > 0) continue;
1094
- a = Math.min(a, a + o + s);
1095
- let t = [...r[0]][0].length, c = e.slice(0, n + r.index + t + a);
1096
- if (Math.min(n, a) % 2) {
1097
- let e = c.slice(1, -1);
1098
- return {
1099
- type: "em",
1100
- raw: c,
1101
- text: e,
1102
- tokens: this.lexer.inlineTokens(e)
1103
- };
1104
- }
1105
- let l = c.slice(2, -2);
1106
- return {
1107
- type: "strong",
1108
- raw: c,
1109
- text: l,
1110
- tokens: this.lexer.inlineTokens(l)
1111
- };
1112
- }
1113
- }
1114
- }
1115
- codespan(e) {
1116
- let t = this.rules.inline.code.exec(e);
1117
- if (t) {
1118
- let e = t[2].replace(this.rules.other.newLineCharGlobal, " "), n = this.rules.other.nonSpaceChar.test(e), r = this.rules.other.startingSpaceChar.test(e) && this.rules.other.endingSpaceChar.test(e);
1119
- return n && r && (e = e.substring(1, e.length - 1)), {
1120
- type: "codespan",
1121
- raw: t[0],
1122
- text: e
1123
- };
1124
- }
1125
- }
1126
- br(e) {
1127
- let t = this.rules.inline.br.exec(e);
1128
- if (t) return {
1129
- type: "br",
1130
- raw: t[0]
1131
- };
1132
- }
1133
- del(e) {
1134
- let t = this.rules.inline.del.exec(e);
1135
- if (t) return {
1136
- type: "del",
1137
- raw: t[0],
1138
- text: t[2],
1139
- tokens: this.lexer.inlineTokens(t[2])
1140
- };
1141
- }
1142
- autolink(e) {
1143
- let t = this.rules.inline.autolink.exec(e);
1144
- if (t) {
1145
- let e, n;
1146
- return t[2] === "@" ? (e = t[1], n = "mailto:" + e) : (e = t[1], n = e), {
1147
- type: "link",
1148
- raw: t[0],
1149
- text: e,
1150
- href: n,
1151
- tokens: [{
1152
- type: "text",
1153
- raw: e,
1154
- text: e
1155
- }]
1156
- };
1157
- }
1158
- }
1159
- url(e) {
1160
- let t;
1161
- if (t = this.rules.inline.url.exec(e)) {
1162
- let e, n;
1163
- if (t[2] === "@") e = t[0], n = "mailto:" + e;
1164
- else {
1165
- let r;
1166
- do
1167
- r = t[0], t[0] = this.rules.inline._backpedal.exec(t[0])?.[0] ?? "";
1168
- while (r !== t[0]);
1169
- e = t[0], n = t[1] === "www." ? "http://" + t[0] : t[0];
1170
- }
1171
- return {
1172
- type: "link",
1173
- raw: t[0],
1174
- text: e,
1175
- href: n,
1176
- tokens: [{
1177
- type: "text",
1178
- raw: e,
1179
- text: e
1180
- }]
1181
- };
1182
- }
1183
- }
1184
- inlineText(e) {
1185
- let t = this.rules.inline.text.exec(e);
1186
- if (t) {
1187
- let e = this.lexer.state.inRawBlock;
1188
- return {
1189
- type: "text",
1190
- raw: t[0],
1191
- text: t[0],
1192
- escaped: e
1193
- };
1194
- }
1195
- }
1196
- }, Y = class _Lexer {
1197
- constructor(e) {
1198
- _defineProperty(this, "tokens", void 0), _defineProperty(this, "options", void 0), _defineProperty(this, "state", void 0), _defineProperty(this, "tokenizer", void 0), _defineProperty(this, "inlineQueue", void 0), this.tokens = [], this.tokens.links = Object.create(null), this.options = e || L, this.options.tokenizer = this.options.tokenizer || new _Tokenizer(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
1199
- inLink: !1,
1200
- inRawBlock: !1,
1201
- top: !0
1202
- };
1203
- let t = {
1204
- other: z,
1205
- block: q.normal,
1206
- inline: J.normal
1207
- };
1208
- this.options.pedantic ? (t.block = q.pedantic, t.inline = J.pedantic) : this.options.gfm && (t.block = q.gfm, this.options.breaks ? t.inline = J.breaks : t.inline = J.gfm), this.tokenizer.rules = t;
1209
- }
1210
- static get rules() {
1211
- return {
1212
- block: q,
1213
- inline: J
1214
- };
1215
- }
1216
- static lex(e, t) {
1217
- return new _Lexer(t).lex(e);
1218
- }
1219
- static lexInline(e, t) {
1220
- return new _Lexer(t).inlineTokens(e);
1221
- }
1222
- lex(e) {
1223
- e = e.replace(z.carriageReturn, "\n"), this.blockTokens(e, this.tokens);
1224
- for (let e = 0; e < this.inlineQueue.length; e++) {
1225
- let t = this.inlineQueue[e];
1226
- this.inlineTokens(t.src, t.tokens);
1227
- }
1228
- return this.inlineQueue = [], this.tokens;
1229
- }
1230
- blockTokens(e, t = [], n = !1) {
1231
- for (this.options.pedantic && (e = e.replace(z.tabCharGlobal, " ").replace(z.spaceLine, "")); e;) {
1232
- let r;
1233
- if (this.options.extensions?.block?.some((n) => (r = n.call({ lexer: this }, e, t)) ? (e = e.substring(r.raw.length), t.push(r), !0) : !1)) continue;
1234
- if (r = this.tokenizer.space(e)) {
1235
- e = e.substring(r.raw.length);
1236
- let n = t.at(-1);
1237
- r.raw.length === 1 && n !== void 0 ? n.raw += "\n" : t.push(r);
1238
- continue;
1239
- }
1240
- if (r = this.tokenizer.code(e)) {
1241
- e = e.substring(r.raw.length);
1242
- let n = t.at(-1);
1243
- n?.type === "paragraph" || n?.type === "text" ? (n.raw += "\n" + r.raw, n.text += "\n" + r.text, this.inlineQueue.at(-1).src = n.text) : t.push(r);
1244
- continue;
1245
- }
1246
- if (r = this.tokenizer.fences(e)) {
1247
- e = e.substring(r.raw.length), t.push(r);
1248
- continue;
1249
- }
1250
- if (r = this.tokenizer.heading(e)) {
1251
- e = e.substring(r.raw.length), t.push(r);
1252
- continue;
1253
- }
1254
- if (r = this.tokenizer.hr(e)) {
1255
- e = e.substring(r.raw.length), t.push(r);
1256
- continue;
1257
- }
1258
- if (r = this.tokenizer.blockquote(e)) {
1259
- e = e.substring(r.raw.length), t.push(r);
1260
- continue;
1261
- }
1262
- if (r = this.tokenizer.list(e)) {
1263
- e = e.substring(r.raw.length), t.push(r);
1264
- continue;
1265
- }
1266
- if (r = this.tokenizer.html(e)) {
1267
- e = e.substring(r.raw.length), t.push(r);
1268
- continue;
1269
- }
1270
- if (r = this.tokenizer.def(e)) {
1271
- e = e.substring(r.raw.length);
1272
- let n = t.at(-1);
1273
- n?.type === "paragraph" || n?.type === "text" ? (n.raw += "\n" + r.raw, n.text += "\n" + r.raw, this.inlineQueue.at(-1).src = n.text) : this.tokens.links[r.tag] || (this.tokens.links[r.tag] = {
1274
- href: r.href,
1275
- title: r.title
1276
- });
1277
- continue;
1278
- }
1279
- if (r = this.tokenizer.table(e)) {
1280
- e = e.substring(r.raw.length), t.push(r);
1281
- continue;
1282
- }
1283
- if (r = this.tokenizer.lheading(e)) {
1284
- e = e.substring(r.raw.length), t.push(r);
1285
- continue;
1286
- }
1287
- let i = e;
1288
- if (this.options.extensions?.startBlock) {
1289
- let t = Infinity, n = e.slice(1), r;
1290
- this.options.extensions.startBlock.forEach((e) => {
1291
- r = e.call({ lexer: this }, n), typeof r == "number" && r >= 0 && (t = Math.min(t, r));
1292
- }), t < Infinity && t >= 0 && (i = e.substring(0, t + 1));
1293
- }
1294
- if (this.state.top && (r = this.tokenizer.paragraph(i))) {
1295
- let a = t.at(-1);
1296
- n && a?.type === "paragraph" ? (a.raw += "\n" + r.raw, a.text += "\n" + r.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = a.text) : t.push(r), n = i.length !== e.length, e = e.substring(r.raw.length);
1297
- continue;
1298
- }
1299
- if (r = this.tokenizer.text(e)) {
1300
- e = e.substring(r.raw.length);
1301
- let n = t.at(-1);
1302
- n?.type === "text" ? (n.raw += "\n" + r.raw, n.text += "\n" + r.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = n.text) : t.push(r);
1303
- continue;
1304
- }
1305
- if (e) {
1306
- let t = "Infinite loop on byte: " + e.charCodeAt(0);
1307
- if (this.options.silent) {
1308
- console.error(t);
1309
- break;
1310
- } else throw Error(t);
1311
- }
1312
- }
1313
- return this.state.top = !0, t;
1314
- }
1315
- inline(e, t = []) {
1316
- return this.inlineQueue.push({
1317
- src: e,
1318
- tokens: t
1319
- }), t;
1320
- }
1321
- inlineTokens(e, t = []) {
1322
- let n = e, r = null;
1323
- if (this.tokens.links) {
1324
- let e = Object.keys(this.tokens.links);
1325
- if (e.length > 0) for (; (r = this.tokenizer.rules.inline.reflinkSearch.exec(n)) != null;) e.includes(r[0].slice(r[0].lastIndexOf("[") + 1, -1)) && (n = n.slice(0, r.index) + "[" + "a".repeat(r[0].length - 2) + "]" + n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex));
1326
- }
1327
- for (; (r = this.tokenizer.rules.inline.blockSkip.exec(n)) != null;) n = n.slice(0, r.index) + "[" + "a".repeat(r[0].length - 2) + "]" + n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
1328
- for (; (r = this.tokenizer.rules.inline.anyPunctuation.exec(n)) != null;) n = n.slice(0, r.index) + "++" + n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
1329
- let i = !1, a = "";
1330
- for (; e;) {
1331
- i || (a = ""), i = !1;
1332
- let r;
1333
- if (this.options.extensions?.inline?.some((n) => (r = n.call({ lexer: this }, e, t)) ? (e = e.substring(r.raw.length), t.push(r), !0) : !1)) continue;
1334
- if (r = this.tokenizer.escape(e)) {
1335
- e = e.substring(r.raw.length), t.push(r);
1336
- continue;
1337
- }
1338
- if (r = this.tokenizer.tag(e)) {
1339
- e = e.substring(r.raw.length), t.push(r);
1340
- continue;
1341
- }
1342
- if (r = this.tokenizer.link(e)) {
1343
- e = e.substring(r.raw.length), t.push(r);
1344
- continue;
1345
- }
1346
- if (r = this.tokenizer.reflink(e, this.tokens.links)) {
1347
- e = e.substring(r.raw.length);
1348
- let n = t.at(-1);
1349
- r.type === "text" && n?.type === "text" ? (n.raw += r.raw, n.text += r.text) : t.push(r);
1350
- continue;
1351
- }
1352
- if (r = this.tokenizer.emStrong(e, n, a)) {
1353
- e = e.substring(r.raw.length), t.push(r);
1354
- continue;
1355
- }
1356
- if (r = this.tokenizer.codespan(e)) {
1357
- e = e.substring(r.raw.length), t.push(r);
1358
- continue;
1359
- }
1360
- if (r = this.tokenizer.br(e)) {
1361
- e = e.substring(r.raw.length), t.push(r);
1362
- continue;
1363
- }
1364
- if (r = this.tokenizer.del(e)) {
1365
- e = e.substring(r.raw.length), t.push(r);
1366
- continue;
1367
- }
1368
- if (r = this.tokenizer.autolink(e)) {
1369
- e = e.substring(r.raw.length), t.push(r);
1370
- continue;
1371
- }
1372
- if (!this.state.inLink && (r = this.tokenizer.url(e))) {
1373
- e = e.substring(r.raw.length), t.push(r);
1374
- continue;
1375
- }
1376
- let o = e;
1377
- if (this.options.extensions?.startInline) {
1378
- let t = Infinity, n = e.slice(1), r;
1379
- this.options.extensions.startInline.forEach((e) => {
1380
- r = e.call({ lexer: this }, n), typeof r == "number" && r >= 0 && (t = Math.min(t, r));
1381
- }), t < Infinity && t >= 0 && (o = e.substring(0, t + 1));
1382
- }
1383
- if (r = this.tokenizer.inlineText(o)) {
1384
- e = e.substring(r.raw.length), r.raw.slice(-1) !== "_" && (a = r.raw.slice(-1)), i = !0;
1385
- let n = t.at(-1);
1386
- n?.type === "text" ? (n.raw += r.raw, n.text += r.text) : t.push(r);
1387
- continue;
1388
- }
1389
- if (e) {
1390
- let t = "Infinite loop on byte: " + e.charCodeAt(0);
1391
- if (this.options.silent) {
1392
- console.error(t);
1393
- break;
1394
- } else throw Error(t);
1395
- }
1396
- }
1397
- return t;
1398
- }
1399
- }, _Renderer = class {
1400
- constructor(e) {
1401
- _defineProperty(this, "options", void 0), _defineProperty(this, "parser", void 0), this.options = e || L;
1402
- }
1403
- space(e) {
1404
- return "";
1405
- }
1406
- code({ text: e, lang: t, escaped: n }) {
1407
- let r = (t || "").match(z.notSpaceStart)?.[0], i = e.replace(z.endingNewline, "") + "\n";
1408
- return r ? "<pre><code class=\"language-" + escape(r) + "\">" + (n ? i : escape(i, !0)) + "</code></pre>\n" : "<pre><code>" + (n ? i : escape(i, !0)) + "</code></pre>\n";
1409
- }
1410
- blockquote({ tokens: e }) {
1411
- return `<blockquote>\n${this.parser.parse(e)}</blockquote>\n`;
1412
- }
1413
- html({ text: e }) {
1414
- return e;
1415
- }
1416
- heading({ tokens: e, depth: t }) {
1417
- return `<h${t}>${this.parser.parseInline(e)}</h${t}>\n`;
1418
- }
1419
- hr(e) {
1420
- return "<hr>\n";
1421
- }
1422
- list(e) {
1423
- let t = e.ordered, n = e.start, r = "";
1424
- for (let t = 0; t < e.items.length; t++) {
1425
- let n = e.items[t];
1426
- r += this.listitem(n);
1427
- }
1428
- let i = t ? "ol" : "ul", a = t && n !== 1 ? " start=\"" + n + "\"" : "";
1429
- return "<" + i + a + ">\n" + r + "</" + i + ">\n";
1430
- }
1431
- listitem(e) {
1432
- let t = "";
1433
- if (e.task) {
1434
- let n = this.checkbox({ checked: !!e.checked });
1435
- e.loose ? e.tokens[0]?.type === "paragraph" ? (e.tokens[0].text = n + " " + e.tokens[0].text, e.tokens[0].tokens && e.tokens[0].tokens.length > 0 && e.tokens[0].tokens[0].type === "text" && (e.tokens[0].tokens[0].text = n + " " + escape(e.tokens[0].tokens[0].text), e.tokens[0].tokens[0].escaped = !0)) : e.tokens.unshift({
1436
- type: "text",
1437
- raw: n + " ",
1438
- text: n + " ",
1439
- escaped: !0
1440
- }) : t += n + " ";
1441
- }
1442
- return t += this.parser.parse(e.tokens, !!e.loose), `<li>${t}</li>\n`;
1443
- }
1444
- checkbox({ checked: e }) {
1445
- return "<input " + (e ? "checked=\"\" " : "") + "disabled=\"\" type=\"checkbox\">";
1446
- }
1447
- paragraph({ tokens: e }) {
1448
- return `<p>${this.parser.parseInline(e)}</p>\n`;
1449
- }
1450
- table(e) {
1451
- let t = "", n = "";
1452
- for (let t = 0; t < e.header.length; t++) n += this.tablecell(e.header[t]);
1453
- t += this.tablerow({ text: n });
1454
- let r = "";
1455
- for (let t = 0; t < e.rows.length; t++) {
1456
- let i = e.rows[t];
1457
- n = "";
1458
- for (let e = 0; e < i.length; e++) n += this.tablecell(i[e]);
1459
- r += this.tablerow({ text: n });
1460
- }
1461
- return r && (r = `<tbody>${r}</tbody>`), "<table>\n<thead>\n" + t + "</thead>\n" + r + "</table>\n";
1462
- }
1463
- tablerow({ text: e }) {
1464
- return `<tr>\n${e}</tr>\n`;
1465
- }
1466
- tablecell(e) {
1467
- let t = this.parser.parseInline(e.tokens), n = e.header ? "th" : "td";
1468
- return (e.align ? `<${n} align="${e.align}">` : `<${n}>`) + t + `</${n}>\n`;
1469
- }
1470
- strong({ tokens: e }) {
1471
- return `<strong>${this.parser.parseInline(e)}</strong>`;
1472
- }
1473
- em({ tokens: e }) {
1474
- return `<em>${this.parser.parseInline(e)}</em>`;
1475
- }
1476
- codespan({ text: e }) {
1477
- return `<code>${escape(e, !0)}</code>`;
1478
- }
1479
- br(e) {
1480
- return "<br>";
1481
- }
1482
- del({ tokens: e }) {
1483
- return `<del>${this.parser.parseInline(e)}</del>`;
1484
- }
1485
- link({ href: e, title: t, tokens: n }) {
1486
- let r = this.parser.parseInline(n), i = cleanUrl(e);
1487
- if (i === null) return r;
1488
- e = i;
1489
- let a = "<a href=\"" + e + "\"";
1490
- return t && (a += " title=\"" + escape(t) + "\""), a += ">" + r + "</a>", a;
1491
- }
1492
- image({ href: e, title: t, text: n }) {
1493
- let r = cleanUrl(e);
1494
- if (r === null) return escape(n);
1495
- e = r;
1496
- let i = `<img src="${e}" alt="${n}"`;
1497
- return t && (i += ` title="${escape(t)}"`), i += ">", i;
1498
- }
1499
- text(e) {
1500
- return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text : escape(e.text);
1501
- }
1502
- }, _TextRenderer = class {
1503
- strong({ text: e }) {
1504
- return e;
1505
- }
1506
- em({ text: e }) {
1507
- return e;
1508
- }
1509
- codespan({ text: e }) {
1510
- return e;
1511
- }
1512
- del({ text: e }) {
1513
- return e;
1514
- }
1515
- html({ text: e }) {
1516
- return e;
1517
- }
1518
- text({ text: e }) {
1519
- return e;
1520
- }
1521
- link({ text: e }) {
1522
- return "" + e;
1523
- }
1524
- image({ text: e }) {
1525
- return "" + e;
1526
- }
1527
- br() {
1528
- return "";
1529
- }
1530
- }, X = class _Parser {
1531
- constructor(e) {
1532
- _defineProperty(this, "options", void 0), _defineProperty(this, "renderer", void 0), _defineProperty(this, "textRenderer", void 0), this.options = e || L, this.options.renderer = this.options.renderer || new _Renderer(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new _TextRenderer();
1533
- }
1534
- static parse(e, t) {
1535
- return new _Parser(t).parse(e);
1536
- }
1537
- static parseInline(e, t) {
1538
- return new _Parser(t).parseInline(e);
1539
- }
1540
- parse(e, t = !0) {
1541
- let n = "";
1542
- for (let r = 0; r < e.length; r++) {
1543
- let i = e[r];
1544
- if (this.options.extensions?.renderers?.[i.type]) {
1545
- let e = i, t = this.options.extensions.renderers[e.type].call({ parser: this }, e);
1546
- if (t !== !1 || ![
1547
- "space",
1548
- "hr",
1549
- "heading",
1550
- "code",
1551
- "table",
1552
- "blockquote",
1553
- "list",
1554
- "html",
1555
- "paragraph",
1556
- "text"
1557
- ].includes(e.type)) {
1558
- n += t || "";
1559
- continue;
1560
- }
1561
- }
1562
- let a = i;
1563
- switch (a.type) {
1564
- case "space":
1565
- n += this.renderer.space(a);
1566
- continue;
1567
- case "hr":
1568
- n += this.renderer.hr(a);
1569
- continue;
1570
- case "heading":
1571
- n += this.renderer.heading(a);
1572
- continue;
1573
- case "code":
1574
- n += this.renderer.code(a);
1575
- continue;
1576
- case "table":
1577
- n += this.renderer.table(a);
1578
- continue;
1579
- case "blockquote":
1580
- n += this.renderer.blockquote(a);
1581
- continue;
1582
- case "list":
1583
- n += this.renderer.list(a);
1584
- continue;
1585
- case "html":
1586
- n += this.renderer.html(a);
1587
- continue;
1588
- case "paragraph":
1589
- n += this.renderer.paragraph(a);
1590
- continue;
1591
- case "text": {
1592
- let i = a, o = this.renderer.text(i);
1593
- for (; r + 1 < e.length && e[r + 1].type === "text";) i = e[++r], o += "\n" + this.renderer.text(i);
1594
- t ? n += this.renderer.paragraph({
1595
- type: "paragraph",
1596
- raw: o,
1597
- text: o,
1598
- tokens: [{
1599
- type: "text",
1600
- raw: o,
1601
- text: o,
1602
- escaped: !0
1603
- }]
1604
- }) : n += o;
1605
- continue;
1606
- }
1607
- default: {
1608
- let e = "Token with \"" + a.type + "\" type was not found.";
1609
- if (this.options.silent) return console.error(e), "";
1610
- throw Error(e);
1611
- }
1612
- }
1613
- }
1614
- return n;
1615
- }
1616
- parseInline(e, t = this.renderer) {
1617
- let n = "";
1618
- for (let r = 0; r < e.length; r++) {
1619
- let i = e[r];
1620
- if (this.options.extensions?.renderers?.[i.type]) {
1621
- let e = this.options.extensions.renderers[i.type].call({ parser: this }, i);
1622
- if (e !== !1 || ![
1623
- "escape",
1624
- "html",
1625
- "link",
1626
- "image",
1627
- "strong",
1628
- "em",
1629
- "codespan",
1630
- "br",
1631
- "del",
1632
- "text"
1633
- ].includes(i.type)) {
1634
- n += e || "";
1635
- continue;
1636
- }
1637
- }
1638
- let a = i;
1639
- switch (a.type) {
1640
- case "escape":
1641
- n += t.text(a);
1642
- break;
1643
- case "html":
1644
- n += t.html(a);
1645
- break;
1646
- case "link":
1647
- n += t.link(a);
1648
- break;
1649
- case "image":
1650
- n += t.image(a);
1651
- break;
1652
- case "strong":
1653
- n += t.strong(a);
1654
- break;
1655
- case "em":
1656
- n += t.em(a);
1657
- break;
1658
- case "codespan":
1659
- n += t.codespan(a);
1660
- break;
1661
- case "br":
1662
- n += t.br(a);
1663
- break;
1664
- case "del":
1665
- n += t.del(a);
1666
- break;
1667
- case "text":
1668
- n += t.text(a);
1669
- break;
1670
- default: {
1671
- let e = "Token with \"" + a.type + "\" type was not found.";
1672
- if (this.options.silent) return console.error(e), "";
1673
- throw Error(e);
1674
- }
1675
- }
1676
- }
1677
- return n;
1678
- }
1679
- }, _Hooks = class {
1680
- constructor(e) {
1681
- _defineProperty(this, "options", void 0), _defineProperty(this, "block", void 0), this.options = e || L;
1682
- }
1683
- preprocess(e) {
1684
- return e;
1685
- }
1686
- postprocess(e) {
1687
- return e;
1688
- }
1689
- processAllTokens(e) {
1690
- return e;
1691
- }
1692
- provideLexer() {
1693
- return this.block ? Y.lex : Y.lexInline;
1694
- }
1695
- provideParser() {
1696
- return this.block ? X.parse : X.parseInline;
1697
- }
1698
- };
1699
- _defineProperty(_Hooks, "passThroughHooks", new Set([
1700
- "preprocess",
1701
- "postprocess",
1702
- "processAllTokens"
1703
- ]));
1704
- var Marked = class {
1705
- constructor(...e) {
1706
- _defineProperty(this, "defaults", _getDefaults()), _defineProperty(this, "options", this.setOptions), _defineProperty(this, "parse", this.parseMarkdown(!0)), _defineProperty(this, "parseInline", this.parseMarkdown(!1)), _defineProperty(this, "Parser", X), _defineProperty(this, "Renderer", _Renderer), _defineProperty(this, "TextRenderer", _TextRenderer), _defineProperty(this, "Lexer", Y), _defineProperty(this, "Tokenizer", _Tokenizer), _defineProperty(this, "Hooks", _Hooks), this.use(...e);
1707
- }
1708
- walkTokens(e, t) {
1709
- let n = [];
1710
- for (let r of e) switch (n = n.concat(t.call(this, r)), r.type) {
1711
- case "table": {
1712
- let e = r;
1713
- for (let r of e.header) n = n.concat(this.walkTokens(r.tokens, t));
1714
- for (let r of e.rows) for (let e of r) n = n.concat(this.walkTokens(e.tokens, t));
1715
- break;
1716
- }
1717
- case "list": {
1718
- let e = r;
1719
- n = n.concat(this.walkTokens(e.items, t));
1720
- break;
1721
- }
1722
- default: {
1723
- let e = r;
1724
- this.defaults.extensions?.childTokens?.[e.type] ? this.defaults.extensions.childTokens[e.type].forEach((r) => {
1725
- let i = e[r].flat(Infinity);
1726
- n = n.concat(this.walkTokens(i, t));
1727
- }) : e.tokens && (n = n.concat(this.walkTokens(e.tokens, t)));
1728
- }
1729
- }
1730
- return n;
1731
- }
1732
- use(...e) {
1733
- let t = this.defaults.extensions || {
1734
- renderers: {},
1735
- childTokens: {}
1736
- };
1737
- return e.forEach((e) => {
1738
- let n = { ...e };
1739
- if (n.async = this.defaults.async || n.async || !1, e.extensions && (e.extensions.forEach((e) => {
1740
- if (!e.name) throw Error("extension name required");
1741
- if ("renderer" in e) {
1742
- let n = t.renderers[e.name];
1743
- n ? t.renderers[e.name] = function(...t) {
1744
- let r = e.renderer.apply(this, t);
1745
- return r === !1 && (r = n.apply(this, t)), r;
1746
- } : t.renderers[e.name] = e.renderer;
1747
- }
1748
- if ("tokenizer" in e) {
1749
- if (!e.level || e.level !== "block" && e.level !== "inline") throw Error("extension level must be 'block' or 'inline'");
1750
- let n = t[e.level];
1751
- n ? n.unshift(e.tokenizer) : t[e.level] = [e.tokenizer], e.start && (e.level === "block" ? t.startBlock ? t.startBlock.push(e.start) : t.startBlock = [e.start] : e.level === "inline" && (t.startInline ? t.startInline.push(e.start) : t.startInline = [e.start]));
1752
- }
1753
- "childTokens" in e && e.childTokens && (t.childTokens[e.name] = e.childTokens);
1754
- }), n.extensions = t), e.renderer) {
1755
- let t = this.defaults.renderer || new _Renderer(this.defaults);
1756
- for (let n in e.renderer) {
1757
- if (!(n in t)) throw Error(`renderer '${n}' does not exist`);
1758
- if (["options", "parser"].includes(n)) continue;
1759
- let r = n, i = e.renderer[r], a = t[r];
1760
- t[r] = (...e) => {
1761
- let n = i.apply(t, e);
1762
- return n === !1 && (n = a.apply(t, e)), n || "";
1763
- };
1764
- }
1765
- n.renderer = t;
1766
- }
1767
- if (e.tokenizer) {
1768
- let t = this.defaults.tokenizer || new _Tokenizer(this.defaults);
1769
- for (let n in e.tokenizer) {
1770
- if (!(n in t)) throw Error(`tokenizer '${n}' does not exist`);
1771
- if ([
1772
- "options",
1773
- "rules",
1774
- "lexer"
1775
- ].includes(n)) continue;
1776
- let r = n, i = e.tokenizer[r], a = t[r];
1777
- t[r] = (...e) => {
1778
- let n = i.apply(t, e);
1779
- return n === !1 && (n = a.apply(t, e)), n;
1780
- };
1781
- }
1782
- n.tokenizer = t;
1783
- }
1784
- if (e.hooks) {
1785
- let t = this.defaults.hooks || new _Hooks();
1786
- for (let n in e.hooks) {
1787
- if (!(n in t)) throw Error(`hook '${n}' does not exist`);
1788
- if (["options", "block"].includes(n)) continue;
1789
- let r = n, i = e.hooks[r], a = t[r];
1790
- _Hooks.passThroughHooks.has(n) ? t[r] = (e) => {
1791
- if (this.defaults.async) return Promise.resolve(i.call(t, e)).then((e) => a.call(t, e));
1792
- let n = i.call(t, e);
1793
- return a.call(t, n);
1794
- } : t[r] = (...e) => {
1795
- let n = i.apply(t, e);
1796
- return n === !1 && (n = a.apply(t, e)), n;
1797
- };
1798
- }
1799
- n.hooks = t;
1800
- }
1801
- if (e.walkTokens) {
1802
- let t = this.defaults.walkTokens, r = e.walkTokens;
1803
- n.walkTokens = function(e) {
1804
- let n = [];
1805
- return n.push(r.call(this, e)), t && (n = n.concat(t.call(this, e))), n;
1806
- };
1807
- }
1808
- this.defaults = {
1809
- ...this.defaults,
1810
- ...n
1811
- };
1812
- }), this;
1813
- }
1814
- setOptions(e) {
1815
- return this.defaults = {
1816
- ...this.defaults,
1817
- ...e
1818
- }, this;
1819
- }
1820
- lexer(e, t) {
1821
- return Y.lex(e, t ?? this.defaults);
1822
- }
1823
- parser(e, t) {
1824
- return X.parse(e, t ?? this.defaults);
1825
- }
1826
- parseMarkdown(e) {
1827
- let parse = (t, n) => {
1828
- let r = { ...n }, i = {
1829
- ...this.defaults,
1830
- ...r
1831
- }, a = this.onError(!!i.silent, !!i.async);
1832
- if (this.defaults.async === !0 && r.async === !1) return a(/* @__PURE__ */ Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));
1833
- if (t == null) return a(/* @__PURE__ */ Error("marked(): input parameter is undefined or null"));
1834
- if (typeof t != "string") return a(/* @__PURE__ */ Error("marked(): input parameter is of type " + Object.prototype.toString.call(t) + ", string expected"));
1835
- i.hooks && (i.hooks.options = i, i.hooks.block = e);
1836
- let o = i.hooks ? i.hooks.provideLexer() : e ? Y.lex : Y.lexInline, s = i.hooks ? i.hooks.provideParser() : e ? X.parse : X.parseInline;
1837
- if (i.async) return Promise.resolve(i.hooks ? i.hooks.preprocess(t) : t).then((e) => o(e, i)).then((e) => i.hooks ? i.hooks.processAllTokens(e) : e).then((e) => i.walkTokens ? Promise.all(this.walkTokens(e, i.walkTokens)).then(() => e) : e).then((e) => s(e, i)).then((e) => i.hooks ? i.hooks.postprocess(e) : e).catch(a);
1838
- try {
1839
- i.hooks && (t = i.hooks.preprocess(t));
1840
- let e = o(t, i);
1841
- i.hooks && (e = i.hooks.processAllTokens(e)), i.walkTokens && this.walkTokens(e, i.walkTokens);
1842
- let n = s(e, i);
1843
- return i.hooks && (n = i.hooks.postprocess(n)), n;
1844
- } catch (e) {
1845
- return a(e);
1846
- }
1847
- };
1848
- return parse;
1849
- }
1850
- onError(e, t) {
1851
- return (n) => {
1852
- if (n.message += "\nPlease report this to https://github.com/markedjs/marked.", e) {
1853
- let e = "<p>An error occurred:</p><pre>" + escape(n.message + "", !0) + "</pre>";
1854
- return t ? Promise.resolve(e) : e;
1855
- }
1856
- if (t) return Promise.reject(n);
1857
- throw n;
1858
- };
1859
- }
1860
- }, Z = new Marked();
1861
- function marked(e, t) {
1862
- return Z.parse(e, t);
1863
- }
1864
- marked.options = marked.setOptions = function(e) {
1865
- return Z.setOptions(e), marked.defaults = Z.defaults, changeDefaults(marked.defaults), marked;
1866
- }, marked.getDefaults = _getDefaults, marked.defaults = L, marked.use = function(...e) {
1867
- return Z.use(...e), marked.defaults = Z.defaults, changeDefaults(marked.defaults), marked;
1868
- }, marked.walkTokens = function(e, t) {
1869
- return Z.walkTokens(e, t);
1870
- }, marked.parseInline = Z.parseInline, marked.Parser = X, marked.parser = X.parse, marked.Renderer = _Renderer, marked.TextRenderer = _TextRenderer, marked.Lexer = Y, marked.lexer = Y.lex, marked.Tokenizer = _Tokenizer, marked.Hooks = _Hooks, marked.parse = marked, marked.options, marked.setOptions, marked.use, marked.walkTokens, marked.parseInline, X.parse;
1871
- var lt = Y.lex;
1872
- //#endregion
1873
- //#region src/components/cardRendering/MarkdownRendererHelpers.ts
1874
- function splitByDelimiters(e, t, n) {
1875
- if (e.length === 0) return [];
1876
- let r = [], i = e.indexOf(t), a = e.indexOf(n, i);
1877
- if (i >= 0 && a > i) r.push(e.substring(0, i)), r.push(e.substring(i, a + n.length)), r = r.concat(splitByDelimiters(e.substring(a + n.length), t, n));
1878
- else return [e];
1879
- return r;
1880
- }
1881
- function stripTrailingNewlines(e) {
1882
- return e.replace(/[\r\n]+$/, "");
1883
- }
1884
- function splitTextToken(e) {
1885
- if (containsComponent(e)) {
1886
- let t = splitByDelimiters(stripTrailingNewlines(e.text), "{{", "}}"), n = splitByDelimiters(stripTrailingNewlines(e.raw), "{{", "}}");
1887
- if (t.length === n.length) return t.map((e, r) => ({
1888
- type: "text",
1889
- text: t[r],
1890
- raw: n[r]
1891
- }));
1892
- throw Error("Error parsing markdown");
1893
- } else return [e];
1894
- }
1895
- function splitParagraphToken(e) {
1896
- let t = [];
1897
- if (containsComponent(e)) {
1898
- let n = splitByDelimiters(stripTrailingNewlines(e.text), "{{", "}}"), r = splitByDelimiters(stripTrailingNewlines(e.raw), "{{", "}}");
1899
- if (n.length === r.length) {
1900
- for (let e = 0; e < n.length; e++) {
1901
- let i = {
1902
- type: "text",
1903
- text: n[e],
1904
- raw: r[e]
1905
- };
1906
- isComponent(i) ? t.push(i) : lt(r[e]).forEach((e) => {
1907
- e.type === "paragraph" ? t = t.concat(e.tokens) : t.push(e);
1908
- });
1909
- }
1910
- return t;
1911
- } else throw Error("Error parsing Markdown");
1912
- } else t.push(e);
1913
- return t;
1914
- }
1915
- function containsComponent(e) {
1916
- if (e.type === "text" || e.type === "paragraph") {
1917
- let t = e.raw.indexOf("{{"), n = e.raw.indexOf("}}");
1918
- return t !== -1 && n !== -1 && n > t;
1919
- } else return !1;
1920
- }
1921
- function isComponent(e) {
1922
- return e.type === "text" && e.text.startsWith("{{") && e.text.endsWith("}}");
1923
- }
1924
- function parseComponentSyntax(e) {
1925
- if (e.length > 1e4) return null;
1926
- let t = e.match(/^\{\{\s*<([\w-]+)((?:\s+[\w-]+="[^"]*")*)\s*\/>\s*\}\}$/);
1927
- if (!t) return null;
1928
- let n = t[1], r = t[2], i = {};
1929
- if (r) {
1930
- let e = /\s+([\w-]+)="([^"]*)"/g, t;
1931
- for (; (t = e.exec(r)) !== null;) i[t[1]] = t[2];
1932
- }
1933
- return {
1934
- componentName: n,
1935
- props: i
1936
- };
1937
- }
1938
- function isInlineComponent(e) {
1939
- if (e.length > 1e4) return !1;
1940
- let t = e.trim();
1941
- return /^<[\w-]+(?:\s+[\w-]+="[^"]*")*\s*\/?>$/.test(t);
1942
- }
1943
- function parseComponentToken(e) {
1944
- return parseComponentSyntax("text" in e ? e.text : "raw" in e ? e.raw : "");
1945
- }
1946
- //#endregion
1947
- //#region src/components/cardRendering/AudioAutoPlayer.vue?vue&type=script&setup=true&lang.ts
1948
- var ut = 500, dt = /* @__PURE__ */ F(/* @__PURE__ */ l({
1949
- __name: "AudioAutoPlayer",
1950
- props: { src: {} },
1951
- setup(e) {
1952
- let t = e, r = y([]), i = y([]), a = y(!1), c = null, stop = () => {
1953
- a.value = !1, setTimeout(() => {
1954
- c = null;
1955
- }, ut), i.value.forEach(clearTimeout), console.log("Audio stopping..."), r.value.forEach((e) => {
1956
- e.paused || (e.pause(), e.currentTime = 0);
1957
- });
1958
- }, downloadFinished = (e) => {
1959
- try {
1960
- return !isNaN(r.value[e].duration);
1961
- } catch (e) {
1962
- throw Error("AudioPlayer does not have an element at this index:", e);
1963
- }
1964
- }, playByIndex = (e) => {
1965
- if (downloadFinished(e)) if (r.value[e].play(), e + 1 < r.value.length) {
1966
- let t = (r.value[e].duration + .7) * 1e3;
1967
- i.value.push(setTimeout(() => {
1968
- a.value && playByIndex(e + 1);
1969
- }, t));
1970
- } else setTimeout(() => {
1971
- a.value = !1;
1972
- }, r.value[e].duration * 1e3), setTimeout(() => {
1973
- c = null;
1974
- }, r.value[e].duration * 1e3 + ut);
1975
- else setTimeout(playByIndex, 100, e);
1976
- }, play = () => {
1977
- c === null || c === u() ? (c = u(), a.value = !0, playByIndex(0)) : setTimeout(play, 100);
1978
- };
1979
- return _(() => {
1980
- c = null, typeof t.src == "string" ? r.value.push(new Audio(t.src)) : t.src.forEach((e) => {
1981
- r.value.push(new Audio(e));
1982
- });
1983
- let e = [{
1984
- hotkey: "up",
1985
- callback: play,
1986
- command: "Replay Audio"
1987
- }];
1988
- I.addBinding(e), play();
1989
- }), g(() => {
1990
- I.removeBinding("up"), stop();
1991
- }), (e, t) => {
1992
- let r = x("v-icon"), i = x("v-btn");
1993
- return v(), n(i, {
1994
- size: "large",
1995
- icon: "",
1996
- color: a.value ? "primary lighten-3" : "primary",
1997
- class: h({ playing: a.value }),
1998
- onClick: play
1999
- }, {
2000
- default: E(() => [s(r, null, {
2001
- default: E(() => t[0] || (t[0] = [o("mdi-volume-high")])),
2002
- _: 1
2003
- })]),
2004
- _: 1
2005
- }, 8, ["color", "class"]);
2006
- };
2007
- }
2008
- }), [["__scopeId", "data-v-e1a0f62c"]]), Q = (/* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((e, t) => {
2009
- function deepFreeze(e) {
2010
- return e instanceof Map ? e.clear = e.delete = e.set = function() {
2011
- throw Error("map is read-only");
2012
- } : e instanceof Set && (e.add = e.clear = e.delete = function() {
2013
- throw Error("set is read-only");
2014
- }), Object.freeze(e), Object.getOwnPropertyNames(e).forEach((t) => {
2015
- let n = e[t], r = typeof n;
2016
- (r === "object" || r === "function") && !Object.isFrozen(n) && deepFreeze(n);
2017
- }), e;
2018
- }
2019
- var Response = class {
2020
- constructor(e) {
2021
- e.data === void 0 && (e.data = {}), this.data = e.data, this.isMatchIgnored = !1;
2022
- }
2023
- ignoreMatch() {
2024
- this.isMatchIgnored = !0;
2025
- }
2026
- };
2027
- function escapeHTML(e) {
2028
- return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#x27;");
2029
- }
2030
- function inherit$1(e, ...t) {
2031
- let n = Object.create(null);
2032
- for (let t in e) n[t] = e[t];
2033
- return t.forEach(function(e) {
2034
- for (let t in e) n[t] = e[t];
2035
- }), n;
2036
- }
2037
- var n = "</span>", emitsWrappingTags = (e) => !!e.scope, scopeToCSSClass = (e, { prefix: t }) => {
2038
- if (e.startsWith("language:")) return e.replace("language:", "language-");
2039
- if (e.includes(".")) {
2040
- let n = e.split(".");
2041
- return [`${t}${n.shift()}`, ...n.map((e, t) => `${e}${"_".repeat(t + 1)}`)].join(" ");
2042
- }
2043
- return `${t}${e}`;
2044
- }, HTMLRenderer = class {
2045
- constructor(e, t) {
2046
- this.buffer = "", this.classPrefix = t.classPrefix, e.walk(this);
2047
- }
2048
- addText(e) {
2049
- this.buffer += escapeHTML(e);
2050
- }
2051
- openNode(e) {
2052
- if (!emitsWrappingTags(e)) return;
2053
- let t = scopeToCSSClass(e.scope, { prefix: this.classPrefix });
2054
- this.span(t);
2055
- }
2056
- closeNode(e) {
2057
- emitsWrappingTags(e) && (this.buffer += n);
2058
- }
2059
- value() {
2060
- return this.buffer;
2061
- }
2062
- span(e) {
2063
- this.buffer += `<span class="${e}">`;
2064
- }
2065
- }, newNode = (e = {}) => {
2066
- let t = { children: [] };
2067
- return Object.assign(t, e), t;
2068
- }, r = class TokenTree {
2069
- constructor() {
2070
- this.rootNode = newNode(), this.stack = [this.rootNode];
2071
- }
2072
- get top() {
2073
- return this.stack[this.stack.length - 1];
2074
- }
2075
- get root() {
2076
- return this.rootNode;
2077
- }
2078
- add(e) {
2079
- this.top.children.push(e);
2080
- }
2081
- openNode(e) {
2082
- let t = newNode({ scope: e });
2083
- this.add(t), this.stack.push(t);
2084
- }
2085
- closeNode() {
2086
- if (this.stack.length > 1) return this.stack.pop();
2087
- }
2088
- closeAllNodes() {
2089
- for (; this.closeNode(););
2090
- }
2091
- toJSON() {
2092
- return JSON.stringify(this.rootNode, null, 4);
2093
- }
2094
- walk(e) {
2095
- return this.constructor._walk(e, this.rootNode);
2096
- }
2097
- static _walk(e, t) {
2098
- return typeof t == "string" ? e.addText(t) : t.children && (e.openNode(t), t.children.forEach((t) => this._walk(e, t)), e.closeNode(t)), e;
2099
- }
2100
- static _collapse(e) {
2101
- typeof e != "string" && e.children && (e.children.every((e) => typeof e == "string") ? e.children = [e.children.join("")] : e.children.forEach((e) => {
2102
- TokenTree._collapse(e);
2103
- }));
2104
- }
2105
- }, TokenTreeEmitter = class extends r {
2106
- constructor(e) {
2107
- super(), this.options = e;
2108
- }
2109
- addText(e) {
2110
- e !== "" && this.add(e);
2111
- }
2112
- startScope(e) {
2113
- this.openNode(e);
2114
- }
2115
- endScope() {
2116
- this.closeNode();
2117
- }
2118
- __addSublanguage(e, t) {
2119
- let n = e.root;
2120
- t && (n.scope = `language:${t}`), this.add(n);
2121
- }
2122
- toHTML() {
2123
- return new HTMLRenderer(this, this.options).value();
2124
- }
2125
- finalize() {
2126
- return this.closeAllNodes(), !0;
2127
- }
2128
- };
2129
- function source(e) {
2130
- return e ? typeof e == "string" ? e : e.source : null;
2131
- }
2132
- function lookahead(e) {
2133
- return concat("(?=", e, ")");
2134
- }
2135
- function anyNumberOfTimes(e) {
2136
- return concat("(?:", e, ")*");
2137
- }
2138
- function optional(e) {
2139
- return concat("(?:", e, ")?");
2140
- }
2141
- function concat(...e) {
2142
- return e.map((e) => source(e)).join("");
2143
- }
2144
- function stripOptionsFromArgs(e) {
2145
- let t = e[e.length - 1];
2146
- return typeof t == "object" && t.constructor === Object ? (e.splice(e.length - 1, 1), t) : {};
2147
- }
2148
- function either(...e) {
2149
- return "(" + (stripOptionsFromArgs(e).capture ? "" : "?:") + e.map((e) => source(e)).join("|") + ")";
2150
- }
2151
- function countMatchGroups(e) {
2152
- return RegExp(e.toString() + "|").exec("").length - 1;
2153
- }
2154
- function startsWith(e, t) {
2155
- let n = e && e.exec(t);
2156
- return n && n.index === 0;
2157
- }
2158
- var i = /\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;
2159
- function _rewriteBackreferences(e, { joinWith: t }) {
2160
- let n = 0;
2161
- return e.map((e) => {
2162
- n += 1;
2163
- let t = n, r = source(e), a = "";
2164
- for (; r.length > 0;) {
2165
- let e = i.exec(r);
2166
- if (!e) {
2167
- a += r;
2168
- break;
2169
- }
2170
- a += r.substring(0, e.index), r = r.substring(e.index + e[0].length), e[0][0] === "\\" && e[1] ? a += "\\" + String(Number(e[1]) + t) : (a += e[0], e[0] === "(" && n++);
2171
- }
2172
- return a;
2173
- }).map((e) => `(${e})`).join(t);
2174
- }
2175
- var a = /\b\B/, o = "[a-zA-Z]\\w*", s = "[a-zA-Z_]\\w*", c = "\\b\\d+(\\.\\d+)?", l = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)", u = "\\b(0b[01]+)", d = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", SHEBANG = (e = {}) => {
2176
- let t = /^#![ ]*\//;
2177
- return e.binary && (e.begin = concat(t, /.*\b/, e.binary, /\b.*/)), inherit$1({
2178
- scope: "meta",
2179
- begin: t,
2180
- end: /$/,
2181
- relevance: 0,
2182
- "on:begin": (e, t) => {
2183
- e.index !== 0 && t.ignoreMatch();
2184
- }
2185
- }, e);
2186
- }, f = {
2187
- begin: "\\\\[\\s\\S]",
2188
- relevance: 0
2189
- }, p = {
2190
- scope: "string",
2191
- begin: "'",
2192
- end: "'",
2193
- illegal: "\\n",
2194
- contains: [f]
2195
- }, m = {
2196
- scope: "string",
2197
- begin: "\"",
2198
- end: "\"",
2199
- illegal: "\\n",
2200
- contains: [f]
2201
- }, h = { begin: /\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/ }, COMMENT = function(e, t, n = {}) {
2202
- let r = inherit$1({
2203
- scope: "comment",
2204
- begin: e,
2205
- end: t,
2206
- contains: []
2207
- }, n);
2208
- r.contains.push({
2209
- scope: "doctag",
2210
- begin: "[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",
2211
- end: /(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,
2212
- excludeBegin: !0,
2213
- relevance: 0
2214
- });
2215
- let i = either("I", "a", "is", "so", "us", "to", "at", "if", "in", "it", "on", /[A-Za-z]+['](d|ve|re|ll|t|s|n)/, /[A-Za-z]+[-][a-z]+/, /[A-Za-z][a-z]{2,}/);
2216
- return r.contains.push({ begin: concat(/[ ]+/, "(", i, /[.]?[:]?([.][ ]|[ ])/, "){3}") }), r;
2217
- }, g = COMMENT("//", "$"), _ = COMMENT("/\\*", "\\*/"), v = COMMENT("#", "$"), y = {
2218
- scope: "number",
2219
- begin: c,
2220
- relevance: 0
2221
- }, b = {
2222
- scope: "number",
2223
- begin: l,
2224
- relevance: 0
2225
- }, x = {
2226
- scope: "number",
2227
- begin: u,
2228
- relevance: 0
2229
- }, S = {
2230
- scope: "regexp",
2231
- begin: /\/(?=[^/\n]*\/)/,
2232
- end: /\/[gimuy]*/,
2233
- contains: [f, {
2234
- begin: /\[/,
2235
- end: /\]/,
2236
- relevance: 0,
2237
- contains: [f]
2238
- }]
2239
- }, C = {
2240
- scope: "title",
2241
- begin: o,
2242
- relevance: 0
2243
- }, w = {
2244
- scope: "title",
2245
- begin: s,
2246
- relevance: 0
2247
- }, T = {
2248
- begin: "\\.\\s*" + s,
2249
- relevance: 0
2250
- }, END_SAME_AS_BEGIN = function(e) {
2251
- return Object.assign(e, {
2252
- "on:begin": (e, t) => {
2253
- t.data._beginMatch = e[1];
2254
- },
2255
- "on:end": (e, t) => {
2256
- t.data._beginMatch !== e[1] && t.ignoreMatch();
2257
- }
2258
- });
2259
- }, E = /* @__PURE__ */ Object.freeze({
2260
- __proto__: null,
2261
- APOS_STRING_MODE: p,
2262
- BACKSLASH_ESCAPE: f,
2263
- BINARY_NUMBER_MODE: x,
2264
- BINARY_NUMBER_RE: u,
2265
- COMMENT,
2266
- C_BLOCK_COMMENT_MODE: _,
2267
- C_LINE_COMMENT_MODE: g,
2268
- C_NUMBER_MODE: b,
2269
- C_NUMBER_RE: l,
2270
- END_SAME_AS_BEGIN,
2271
- HASH_COMMENT_MODE: v,
2272
- IDENT_RE: o,
2273
- MATCH_NOTHING_RE: a,
2274
- METHOD_GUARD: T,
2275
- NUMBER_MODE: y,
2276
- NUMBER_RE: c,
2277
- PHRASAL_WORDS_MODE: h,
2278
- QUOTE_STRING_MODE: m,
2279
- REGEXP_MODE: S,
2280
- RE_STARTERS_RE: d,
2281
- SHEBANG,
2282
- TITLE_MODE: C,
2283
- UNDERSCORE_IDENT_RE: s,
2284
- UNDERSCORE_TITLE_MODE: w
2285
- });
2286
- function skipIfHasPrecedingDot(e, t) {
2287
- e.input[e.index - 1] === "." && t.ignoreMatch();
2288
- }
2289
- function scopeClassName(e, t) {
2290
- e.className !== void 0 && (e.scope = e.className, delete e.className);
2291
- }
2292
- function beginKeywords(e, t) {
2293
- t && e.beginKeywords && (e.begin = "\\b(" + e.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", e.__beforeBegin = skipIfHasPrecedingDot, e.keywords = e.keywords || e.beginKeywords, delete e.beginKeywords, e.relevance === void 0 && (e.relevance = 0));
2294
- }
2295
- function compileIllegal(e, t) {
2296
- Array.isArray(e.illegal) && (e.illegal = either(...e.illegal));
2297
- }
2298
- function compileMatch(e, t) {
2299
- if (e.match) {
2300
- if (e.begin || e.end) throw Error("begin & end are not supported with match");
2301
- e.begin = e.match, delete e.match;
2302
- }
2303
- }
2304
- function compileRelevance(e, t) {
2305
- e.relevance === void 0 && (e.relevance = 1);
2306
- }
2307
- var beforeMatchExt = (e, t) => {
2308
- if (!e.beforeMatch) return;
2309
- if (e.starts) throw Error("beforeMatch cannot be used with starts");
2310
- let n = Object.assign({}, e);
2311
- Object.keys(e).forEach((t) => {
2312
- delete e[t];
2313
- }), e.keywords = n.keywords, e.begin = concat(n.beforeMatch, lookahead(n.begin)), e.starts = {
2314
- relevance: 0,
2315
- contains: [Object.assign(n, { endsParent: !0 })]
2316
- }, e.relevance = 0, delete n.beforeMatch;
2317
- }, D = [
2318
- "of",
2319
- "and",
2320
- "for",
2321
- "in",
2322
- "not",
2323
- "or",
2324
- "if",
2325
- "then",
2326
- "parent",
2327
- "list",
2328
- "value"
2329
- ], O = "keyword";
2330
- function compileKeywords(e, t, n = O) {
2331
- let r = Object.create(null);
2332
- return typeof e == "string" ? compileList(n, e.split(" ")) : Array.isArray(e) ? compileList(n, e) : Object.keys(e).forEach(function(n) {
2333
- Object.assign(r, compileKeywords(e[n], t, n));
2334
- }), r;
2335
- function compileList(e, n) {
2336
- t && (n = n.map((e) => e.toLowerCase())), n.forEach(function(t) {
2337
- let n = t.split("|");
2338
- r[n[0]] = [e, scoreForKeyword(n[0], n[1])];
2339
- });
2340
- }
2341
- }
2342
- function scoreForKeyword(e, t) {
2343
- return t ? Number(t) : commonKeyword(e) ? 0 : 1;
2344
- }
2345
- function commonKeyword(e) {
2346
- return D.includes(e.toLowerCase());
2347
- }
2348
- var k = {}, error = (e) => {
2349
- console.error(e);
2350
- }, warn = (e, ...t) => {
2351
- console.log(`WARN: ${e}`, ...t);
2352
- }, deprecated = (e, t) => {
2353
- k[`${e}/${t}`] || (console.log(`Deprecated as of ${e}. ${t}`), k[`${e}/${t}`] = !0);
2354
- }, A = /* @__PURE__ */ Error();
2355
- function remapScopeNames(e, t, { key: n }) {
2356
- let r = 0, i = e[n], a = {}, o = {};
2357
- for (let e = 1; e <= t.length; e++) o[e + r] = i[e], a[e + r] = !0, r += countMatchGroups(t[e - 1]);
2358
- e[n] = o, e[n]._emit = a, e[n]._multi = !0;
2359
- }
2360
- function beginMultiClass(e) {
2361
- if (Array.isArray(e.begin)) {
2362
- if (e.skip || e.excludeBegin || e.returnBegin) throw error("skip, excludeBegin, returnBegin not compatible with beginScope: {}"), A;
2363
- if (typeof e.beginScope != "object" || e.beginScope === null) throw error("beginScope must be object"), A;
2364
- remapScopeNames(e, e.begin, { key: "beginScope" }), e.begin = _rewriteBackreferences(e.begin, { joinWith: "" });
2365
- }
2366
- }
2367
- function endMultiClass(e) {
2368
- if (Array.isArray(e.end)) {
2369
- if (e.skip || e.excludeEnd || e.returnEnd) throw error("skip, excludeEnd, returnEnd not compatible with endScope: {}"), A;
2370
- if (typeof e.endScope != "object" || e.endScope === null) throw error("endScope must be object"), A;
2371
- remapScopeNames(e, e.end, { key: "endScope" }), e.end = _rewriteBackreferences(e.end, { joinWith: "" });
2372
- }
2373
- }
2374
- function scopeSugar(e) {
2375
- e.scope && typeof e.scope == "object" && e.scope !== null && (e.beginScope = e.scope, delete e.scope);
2376
- }
2377
- function MultiClass(e) {
2378
- scopeSugar(e), typeof e.beginScope == "string" && (e.beginScope = { _wrap: e.beginScope }), typeof e.endScope == "string" && (e.endScope = { _wrap: e.endScope }), beginMultiClass(e), endMultiClass(e);
2379
- }
2380
- function compileLanguage(e) {
2381
- function langRe(t, n) {
2382
- return new RegExp(source(t), "m" + (e.case_insensitive ? "i" : "") + (e.unicodeRegex ? "u" : "") + (n ? "g" : ""));
2383
- }
2384
- class MultiRegex {
2385
- constructor() {
2386
- this.matchIndexes = {}, this.regexes = [], this.matchAt = 1, this.position = 0;
2387
- }
2388
- addRule(e, t) {
2389
- t.position = this.position++, this.matchIndexes[this.matchAt] = t, this.regexes.push([t, e]), this.matchAt += countMatchGroups(e) + 1;
2390
- }
2391
- compile() {
2392
- this.regexes.length === 0 && (this.exec = () => null), this.matcherRe = langRe(_rewriteBackreferences(this.regexes.map((e) => e[1]), { joinWith: "|" }), !0), this.lastIndex = 0;
2393
- }
2394
- exec(e) {
2395
- this.matcherRe.lastIndex = this.lastIndex;
2396
- let t = this.matcherRe.exec(e);
2397
- if (!t) return null;
2398
- let n = t.findIndex((e, t) => t > 0 && e !== void 0), r = this.matchIndexes[n];
2399
- return t.splice(0, n), Object.assign(t, r);
2400
- }
2401
- }
2402
- class ResumableMultiRegex {
2403
- constructor() {
2404
- this.rules = [], this.multiRegexes = [], this.count = 0, this.lastIndex = 0, this.regexIndex = 0;
2405
- }
2406
- getMatcher(e) {
2407
- if (this.multiRegexes[e]) return this.multiRegexes[e];
2408
- let t = new MultiRegex();
2409
- return this.rules.slice(e).forEach(([e, n]) => t.addRule(e, n)), t.compile(), this.multiRegexes[e] = t, t;
2410
- }
2411
- resumingScanAtSamePosition() {
2412
- return this.regexIndex !== 0;
2413
- }
2414
- considerAll() {
2415
- this.regexIndex = 0;
2416
- }
2417
- addRule(e, t) {
2418
- this.rules.push([e, t]), t.type === "begin" && this.count++;
2419
- }
2420
- exec(e) {
2421
- let t = this.getMatcher(this.regexIndex);
2422
- t.lastIndex = this.lastIndex;
2423
- let n = t.exec(e);
2424
- if (this.resumingScanAtSamePosition() && !(n && n.index === this.lastIndex)) {
2425
- let t = this.getMatcher(0);
2426
- t.lastIndex = this.lastIndex + 1, n = t.exec(e);
2427
- }
2428
- return n && (this.regexIndex += n.position + 1, this.regexIndex === this.count && this.considerAll()), n;
2429
- }
2430
- }
2431
- function buildModeRegex(e) {
2432
- let t = new ResumableMultiRegex();
2433
- return e.contains.forEach((e) => t.addRule(e.begin, {
2434
- rule: e,
2435
- type: "begin"
2436
- })), e.terminatorEnd && t.addRule(e.terminatorEnd, { type: "end" }), e.illegal && t.addRule(e.illegal, { type: "illegal" }), t;
2437
- }
2438
- function compileMode(t, n) {
2439
- let r = t;
2440
- if (t.isCompiled) return r;
2441
- [
2442
- scopeClassName,
2443
- compileMatch,
2444
- MultiClass,
2445
- beforeMatchExt
2446
- ].forEach((e) => e(t, n)), e.compilerExtensions.forEach((e) => e(t, n)), t.__beforeBegin = null, [
2447
- beginKeywords,
2448
- compileIllegal,
2449
- compileRelevance
2450
- ].forEach((e) => e(t, n)), t.isCompiled = !0;
2451
- let i = null;
2452
- return typeof t.keywords == "object" && t.keywords.$pattern && (t.keywords = Object.assign({}, t.keywords), i = t.keywords.$pattern, delete t.keywords.$pattern), i = i || /\w+/, t.keywords && (t.keywords = compileKeywords(t.keywords, e.case_insensitive)), r.keywordPatternRe = langRe(i, !0), n && (t.begin || (t.begin = /\B|\b/), r.beginRe = langRe(r.begin), !t.end && !t.endsWithParent && (t.end = /\B|\b/), t.end && (r.endRe = langRe(r.end)), r.terminatorEnd = source(r.end) || "", t.endsWithParent && n.terminatorEnd && (r.terminatorEnd += (t.end ? "|" : "") + n.terminatorEnd)), t.illegal && (r.illegalRe = langRe(t.illegal)), t.contains || (t.contains = []), t.contains = [].concat(...t.contains.map(function(e) {
2453
- return expandOrCloneMode(e === "self" ? t : e);
2454
- })), t.contains.forEach(function(e) {
2455
- compileMode(e, r);
2456
- }), t.starts && compileMode(t.starts, n), r.matcher = buildModeRegex(r), r;
2457
- }
2458
- if (e.compilerExtensions || (e.compilerExtensions = []), e.contains && e.contains.includes("self")) throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");
2459
- return e.classNameAliases = inherit$1(e.classNameAliases || {}), compileMode(e);
2460
- }
2461
- function dependencyOnParent(e) {
2462
- return e ? e.endsWithParent || dependencyOnParent(e.starts) : !1;
2463
- }
2464
- function expandOrCloneMode(e) {
2465
- return e.variants && !e.cachedVariants && (e.cachedVariants = e.variants.map(function(t) {
2466
- return inherit$1(e, { variants: null }, t);
2467
- })), e.cachedVariants ? e.cachedVariants : dependencyOnParent(e) ? inherit$1(e, { starts: e.starts ? inherit$1(e.starts) : null }) : Object.isFrozen(e) ? inherit$1(e) : e;
2468
- }
2469
- var ee = "11.11.1", HTMLInjectionError = class extends Error {
2470
- constructor(e, t) {
2471
- super(e), this.name = "HTMLInjectionError", this.html = t;
2472
- }
2473
- }, j = escapeHTML, M = inherit$1, N = Symbol("nomatch"), te = 7, HLJS = function(e) {
2474
- let t = Object.create(null), n = Object.create(null), r = [], i = !0, a = "Could not find the language '{}', did you forget to load/include a language module?", o = {
2475
- disableAutodetect: !0,
2476
- name: "Plain text",
2477
- contains: []
2478
- }, s = {
2479
- ignoreUnescapedHTML: !1,
2480
- throwUnescapedHTML: !1,
2481
- noHighlightRe: /^(no-?highlight)$/i,
2482
- languageDetectRe: /\blang(?:uage)?-([\w-]+)\b/i,
2483
- classPrefix: "hljs-",
2484
- cssSelector: "pre code",
2485
- languages: null,
2486
- __emitter: TokenTreeEmitter
2487
- };
2488
- function shouldNotHighlight(e) {
2489
- return s.noHighlightRe.test(e);
2490
- }
2491
- function blockLanguage(e) {
2492
- let t = e.className + " ";
2493
- t += e.parentNode ? e.parentNode.className : "";
2494
- let n = s.languageDetectRe.exec(t);
2495
- if (n) {
2496
- let t = getLanguage(n[1]);
2497
- return t || (warn(a.replace("{}", n[1])), warn("Falling back to no-highlight mode for this block.", e)), t ? n[1] : "no-highlight";
2498
- }
2499
- return t.split(/\s+/).find((e) => shouldNotHighlight(e) || getLanguage(e));
2500
- }
2501
- function highlight(e, t, n) {
2502
- let r = "", i = "";
2503
- typeof t == "object" ? (r = e, n = t.ignoreIllegals, i = t.language) : (deprecated("10.7.0", "highlight(lang, code, ...args) has been deprecated."), deprecated("10.7.0", "Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"), i = e, r = t), n === void 0 && (n = !0);
2504
- let a = {
2505
- code: r,
2506
- language: i
2507
- };
2508
- fire("before:highlight", a);
2509
- let o = a.result ? a.result : _highlight(a.language, a.code, n);
2510
- return o.code = a.code, fire("after:highlight", o), o;
2511
- }
2512
- function _highlight(e, n, r, o) {
2513
- let c = Object.create(null);
2514
- function keywordData(e, t) {
2515
- return e.keywords[t];
2516
- }
2517
- function processKeywords() {
2518
- if (!p.keywords) {
2519
- h.addText(g);
2520
- return;
2521
- }
2522
- let e = 0;
2523
- p.keywordPatternRe.lastIndex = 0;
2524
- let t = p.keywordPatternRe.exec(g), n = "";
2525
- for (; t;) {
2526
- n += g.substring(e, t.index);
2527
- let r = u.case_insensitive ? t[0].toLowerCase() : t[0], i = keywordData(p, r);
2528
- if (i) {
2529
- let [e, a] = i;
2530
- if (h.addText(n), n = "", c[r] = (c[r] || 0) + 1, c[r] <= te && (_ += a), e.startsWith("_")) n += t[0];
2531
- else {
2532
- let n = u.classNameAliases[e] || e;
2533
- emitKeyword(t[0], n);
2534
- }
2535
- } else n += t[0];
2536
- e = p.keywordPatternRe.lastIndex, t = p.keywordPatternRe.exec(g);
2537
- }
2538
- n += g.substring(e), h.addText(n);
2539
- }
2540
- function processSubLanguage() {
2541
- if (g === "") return;
2542
- let e = null;
2543
- if (typeof p.subLanguage == "string") {
2544
- if (!t[p.subLanguage]) {
2545
- h.addText(g);
2546
- return;
2547
- }
2548
- e = _highlight(p.subLanguage, g, !0, m[p.subLanguage]), m[p.subLanguage] = e._top;
2549
- } else e = highlightAuto(g, p.subLanguage.length ? p.subLanguage : null);
2550
- p.relevance > 0 && (_ += e.relevance), h.__addSublanguage(e._emitter, e.language);
2551
- }
2552
- function processBuffer() {
2553
- p.subLanguage == null ? processKeywords() : processSubLanguage(), g = "";
2554
- }
2555
- function emitKeyword(e, t) {
2556
- e !== "" && (h.startScope(t), h.addText(e), h.endScope());
2557
- }
2558
- function emitMultiClass(e, t) {
2559
- let n = 1, r = t.length - 1;
2560
- for (; n <= r;) {
2561
- if (!e._emit[n]) {
2562
- n++;
2563
- continue;
2564
- }
2565
- let r = u.classNameAliases[e[n]] || e[n], i = t[n];
2566
- r ? emitKeyword(i, r) : (g = i, processKeywords(), g = ""), n++;
2567
- }
2568
- }
2569
- function startNewMode(e, t) {
2570
- return e.scope && typeof e.scope == "string" && h.openNode(u.classNameAliases[e.scope] || e.scope), e.beginScope && (e.beginScope._wrap ? (emitKeyword(g, u.classNameAliases[e.beginScope._wrap] || e.beginScope._wrap), g = "") : e.beginScope._multi && (emitMultiClass(e.beginScope, t), g = "")), p = Object.create(e, { parent: { value: p } }), p;
2571
- }
2572
- function endOfMode(e, t, n) {
2573
- let r = startsWith(e.endRe, n);
2574
- if (r) {
2575
- if (e["on:end"]) {
2576
- let n = new Response(e);
2577
- e["on:end"](t, n), n.isMatchIgnored && (r = !1);
2578
- }
2579
- if (r) {
2580
- for (; e.endsParent && e.parent;) e = e.parent;
2581
- return e;
2582
- }
2583
- }
2584
- if (e.endsWithParent) return endOfMode(e.parent, t, n);
2585
- }
2586
- function doIgnore(e) {
2587
- return p.matcher.regexIndex === 0 ? (g += e[0], 1) : (b = !0, 0);
2588
- }
2589
- function doBeginMatch(e) {
2590
- let t = e[0], n = e.rule, r = new Response(n), i = [n.__beforeBegin, n["on:begin"]];
2591
- for (let n of i) if (n && (n(e, r), r.isMatchIgnored)) return doIgnore(t);
2592
- return n.skip ? g += t : (n.excludeBegin && (g += t), processBuffer(), !n.returnBegin && !n.excludeBegin && (g = t)), startNewMode(n, e), n.returnBegin ? 0 : t.length;
2593
- }
2594
- function doEndMatch(e) {
2595
- let t = e[0], r = n.substring(e.index), i = endOfMode(p, e, r);
2596
- if (!i) return N;
2597
- let a = p;
2598
- p.endScope && p.endScope._wrap ? (processBuffer(), emitKeyword(t, p.endScope._wrap)) : p.endScope && p.endScope._multi ? (processBuffer(), emitMultiClass(p.endScope, e)) : a.skip ? g += t : (a.returnEnd || a.excludeEnd || (g += t), processBuffer(), a.excludeEnd && (g = t));
2599
- do
2600
- p.scope && h.closeNode(), !p.skip && !p.subLanguage && (_ += p.relevance), p = p.parent;
2601
- while (p !== i.parent);
2602
- return i.starts && startNewMode(i.starts, e), a.returnEnd ? 0 : t.length;
2603
- }
2604
- function processContinuations() {
2605
- let e = [];
2606
- for (let t = p; t !== u; t = t.parent) t.scope && e.unshift(t.scope);
2607
- e.forEach((e) => h.openNode(e));
2608
- }
2609
- let l = {};
2610
- function processLexeme(t, a) {
2611
- let o = a && a[0];
2612
- if (g += t, o == null) return processBuffer(), 0;
2613
- if (l.type === "begin" && a.type === "end" && l.index === a.index && o === "") {
2614
- if (g += n.slice(a.index, a.index + 1), !i) {
2615
- let t = /* @__PURE__ */ Error(`0 width match regex (${e})`);
2616
- throw t.languageName = e, t.badRule = l.rule, t;
2617
- }
2618
- return 1;
2619
- }
2620
- if (l = a, a.type === "begin") return doBeginMatch(a);
2621
- if (a.type === "illegal" && !r) {
2622
- let e = /* @__PURE__ */ Error("Illegal lexeme \"" + o + "\" for mode \"" + (p.scope || "<unnamed>") + "\"");
2623
- throw e.mode = p, e;
2624
- } else if (a.type === "end") {
2625
- let e = doEndMatch(a);
2626
- if (e !== N) return e;
2627
- }
2628
- if (a.type === "illegal" && o === "") return g += "\n", 1;
2629
- if (y > 1e5 && y > a.index * 3) throw /* @__PURE__ */ Error("potential infinite loop, way more iterations than matches");
2630
- return g += o, o.length;
2631
- }
2632
- let u = getLanguage(e);
2633
- if (!u) throw error(a.replace("{}", e)), Error("Unknown language: \"" + e + "\"");
2634
- let d = compileLanguage(u), f = "", p = o || d, m = {}, h = new s.__emitter(s);
2635
- processContinuations();
2636
- let g = "", _ = 0, v = 0, y = 0, b = !1;
2637
- try {
2638
- if (u.__emitTokens) u.__emitTokens(n, h);
2639
- else {
2640
- for (p.matcher.considerAll();;) {
2641
- y++, b ? b = !1 : p.matcher.considerAll(), p.matcher.lastIndex = v;
2642
- let e = p.matcher.exec(n);
2643
- if (!e) break;
2644
- let t = processLexeme(n.substring(v, e.index), e);
2645
- v = e.index + t;
2646
- }
2647
- processLexeme(n.substring(v));
2648
- }
2649
- return h.finalize(), f = h.toHTML(), {
2650
- language: e,
2651
- value: f,
2652
- relevance: _,
2653
- illegal: !1,
2654
- _emitter: h,
2655
- _top: p
2656
- };
2657
- } catch (t) {
2658
- if (t.message && t.message.includes("Illegal")) return {
2659
- language: e,
2660
- value: j(n),
2661
- illegal: !0,
2662
- relevance: 0,
2663
- _illegalBy: {
2664
- message: t.message,
2665
- index: v,
2666
- context: n.slice(v - 100, v + 100),
2667
- mode: t.mode,
2668
- resultSoFar: f
2669
- },
2670
- _emitter: h
2671
- };
2672
- if (i) return {
2673
- language: e,
2674
- value: j(n),
2675
- illegal: !1,
2676
- relevance: 0,
2677
- errorRaised: t,
2678
- _emitter: h,
2679
- _top: p
2680
- };
2681
- throw t;
2682
- }
2683
- }
2684
- function justTextHighlightResult(e) {
2685
- let t = {
2686
- value: j(e),
2687
- illegal: !1,
2688
- relevance: 0,
2689
- _top: o,
2690
- _emitter: new s.__emitter(s)
2691
- };
2692
- return t._emitter.addText(e), t;
2693
- }
2694
- function highlightAuto(e, n) {
2695
- n = n || s.languages || Object.keys(t);
2696
- let r = justTextHighlightResult(e), i = n.filter(getLanguage).filter(autoDetection).map((t) => _highlight(t, e, !1));
2697
- i.unshift(r);
2698
- let [a, o] = i.sort((e, t) => {
2699
- if (e.relevance !== t.relevance) return t.relevance - e.relevance;
2700
- if (e.language && t.language) {
2701
- if (getLanguage(e.language).supersetOf === t.language) return 1;
2702
- if (getLanguage(t.language).supersetOf === e.language) return -1;
2703
- }
2704
- return 0;
2705
- }), c = a;
2706
- return c.secondBest = o, c;
2707
- }
2708
- function updateClassName(e, t, r) {
2709
- let i = t && n[t] || r;
2710
- e.classList.add("hljs"), e.classList.add(`language-${i}`);
2711
- }
2712
- function highlightElement(e) {
2713
- let t = null, n = blockLanguage(e);
2714
- if (shouldNotHighlight(n)) return;
2715
- if (fire("before:highlightElement", {
2716
- el: e,
2717
- language: n
2718
- }), e.dataset.highlighted) {
2719
- console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.", e);
2720
- return;
2721
- }
2722
- if (e.children.length > 0 && (s.ignoreUnescapedHTML || (console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."), console.warn("https://github.com/highlightjs/highlight.js/wiki/security"), console.warn("The element with unescaped HTML:"), console.warn(e)), s.throwUnescapedHTML)) throw new HTMLInjectionError("One of your code blocks includes unescaped HTML.", e.innerHTML);
2723
- t = e;
2724
- let r = t.textContent, i = n ? highlight(r, {
2725
- language: n,
2726
- ignoreIllegals: !0
2727
- }) : highlightAuto(r);
2728
- e.innerHTML = i.value, e.dataset.highlighted = "yes", updateClassName(e, n, i.language), e.result = {
2729
- language: i.language,
2730
- re: i.relevance,
2731
- relevance: i.relevance
2732
- }, i.secondBest && (e.secondBest = {
2733
- language: i.secondBest.language,
2734
- relevance: i.secondBest.relevance
2735
- }), fire("after:highlightElement", {
2736
- el: e,
2737
- result: i,
2738
- text: r
2739
- });
2740
- }
2741
- function configure(e) {
2742
- s = M(s, e);
2743
- }
2744
- let initHighlighting = () => {
2745
- highlightAll(), deprecated("10.6.0", "initHighlighting() deprecated. Use highlightAll() now.");
2746
- };
2747
- function initHighlightingOnLoad() {
2748
- highlightAll(), deprecated("10.6.0", "initHighlightingOnLoad() deprecated. Use highlightAll() now.");
2749
- }
2750
- let c = !1;
2751
- function highlightAll() {
2752
- function boot() {
2753
- highlightAll();
2754
- }
2755
- if (document.readyState === "loading") {
2756
- c || window.addEventListener("DOMContentLoaded", boot, !1), c = !0;
2757
- return;
2758
- }
2759
- document.querySelectorAll(s.cssSelector).forEach(highlightElement);
2760
- }
2761
- function registerLanguage(n, r) {
2762
- let a = null;
2763
- try {
2764
- a = r(e);
2765
- } catch (e) {
2766
- if (error("Language definition for '{}' could not be registered.".replace("{}", n)), i) error(e);
2767
- else throw e;
2768
- a = o;
2769
- }
2770
- a.name || (a.name = n), t[n] = a, a.rawDefinition = r.bind(null, e), a.aliases && registerAliases(a.aliases, { languageName: n });
2771
- }
2772
- function unregisterLanguage(e) {
2773
- delete t[e];
2774
- for (let t of Object.keys(n)) n[t] === e && delete n[t];
2775
- }
2776
- function listLanguages() {
2777
- return Object.keys(t);
2778
- }
2779
- function getLanguage(e) {
2780
- return e = (e || "").toLowerCase(), t[e] || t[n[e]];
2781
- }
2782
- function registerAliases(e, { languageName: t }) {
2783
- typeof e == "string" && (e = [e]), e.forEach((e) => {
2784
- n[e.toLowerCase()] = t;
2785
- });
2786
- }
2787
- function autoDetection(e) {
2788
- let t = getLanguage(e);
2789
- return t && !t.disableAutodetect;
2790
- }
2791
- function upgradePluginAPI(e) {
2792
- e["before:highlightBlock"] && !e["before:highlightElement"] && (e["before:highlightElement"] = (t) => {
2793
- e["before:highlightBlock"](Object.assign({ block: t.el }, t));
2794
- }), e["after:highlightBlock"] && !e["after:highlightElement"] && (e["after:highlightElement"] = (t) => {
2795
- e["after:highlightBlock"](Object.assign({ block: t.el }, t));
2796
- });
2797
- }
2798
- function addPlugin(e) {
2799
- upgradePluginAPI(e), r.push(e);
2800
- }
2801
- function removePlugin(e) {
2802
- let t = r.indexOf(e);
2803
- t !== -1 && r.splice(t, 1);
2804
- }
2805
- function fire(e, t) {
2806
- let n = e;
2807
- r.forEach(function(e) {
2808
- e[n] && e[n](t);
2809
- });
2810
- }
2811
- function deprecateHighlightBlock(e) {
2812
- return deprecated("10.7.0", "highlightBlock will be removed entirely in v12.0"), deprecated("10.7.0", "Please use highlightElement now."), highlightElement(e);
2813
- }
2814
- Object.assign(e, {
2815
- highlight,
2816
- highlightAuto,
2817
- highlightAll,
2818
- highlightElement,
2819
- highlightBlock: deprecateHighlightBlock,
2820
- configure,
2821
- initHighlighting,
2822
- initHighlightingOnLoad,
2823
- registerLanguage,
2824
- unregisterLanguage,
2825
- listLanguages,
2826
- getLanguage,
2827
- registerAliases,
2828
- autoDetection,
2829
- inherit: M,
2830
- addPlugin,
2831
- removePlugin
2832
- }), e.debugMode = function() {
2833
- i = !1;
2834
- }, e.safeMode = function() {
2835
- i = !0;
2836
- }, e.versionString = ee, e.regex = {
2837
- concat,
2838
- lookahead,
2839
- either,
2840
- optional,
2841
- anyNumberOfTimes
2842
- };
2843
- for (let e in E) typeof E[e] == "object" && deepFreeze(E[e]);
2844
- return Object.assign(e, E), e;
2845
- }, P = HLJS({});
2846
- P.newInstance = () => HLJS({}), t.exports = P, P.HighlightJS = P, P.default = P;
2847
- })))())).default, ft = l({
2848
- props: {
2849
- code: {
2850
- type: String,
2851
- required: !0
2852
- },
2853
- language: {
2854
- type: String,
2855
- default: ""
2856
- },
2857
- autodetect: {
2858
- type: Boolean,
2859
- default: !0
2860
- },
2861
- ignoreIllegals: {
2862
- type: Boolean,
2863
- default: !0
2864
- }
2865
- },
2866
- setup: function(e) {
2867
- var n = y(e.language);
2868
- T((function() {
2869
- return e.language;
2870
- }), (function(e) {
2871
- n.value = e;
2872
- }));
2873
- var r = t((function() {
2874
- return e.autodetect || !n.value;
2875
- })), i = t((function() {
2876
- return !r.value && !Q.getLanguage(n.value);
2877
- }));
2878
- return {
2879
- className: t((function() {
2880
- return i.value ? "" : "hljs " + n.value;
2881
- })),
2882
- highlightedCode: t((function() {
2883
- if (i.value) return console.warn("The language \"" + n.value + "\" you specified could not be found."), e.code.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#x27;");
2884
- if (r.value) {
2885
- var t = Q.highlightAuto(e.code);
2886
- return n.value = t.language ?? "", t.value;
2887
- }
2888
- return (t = Q.highlight(e.code, {
2889
- language: n.value,
2890
- ignoreIllegals: e.ignoreIllegals
2891
- })).value;
2892
- }))
2893
- };
2894
- },
2895
- render: function() {
2896
- return d("pre", {}, [d("code", {
2897
- class: this.className,
2898
- innerHTML: this.highlightedCode,
2899
- tabindex: "0"
2900
- })]);
2901
- }
2902
- }), pt = {
2903
- install: function(e) {
2904
- e.component("highlightjs", ft);
2905
- },
2906
- component: ft
2907
- }, mt = "[A-Za-z$_][0-9A-Za-z$_]*", ht = /* @__PURE__ */ "as.in.of.if.for.while.finally.var.new.function.do.return.void.else.break.catch.instanceof.with.throw.case.default.try.switch.continue.typeof.delete.let.yield.const.class.debugger.async.await.static.import.from.export.extends.using".split("."), gt = [
2908
- "true",
2909
- "false",
2910
- "null",
2911
- "undefined",
2912
- "NaN",
2913
- "Infinity"
2914
- ], _t = /* @__PURE__ */ "Object.Function.Boolean.Symbol.Math.Date.Number.BigInt.String.RegExp.Array.Float32Array.Float64Array.Int8Array.Uint8Array.Uint8ClampedArray.Int16Array.Int32Array.Uint16Array.Uint32Array.BigInt64Array.BigUint64Array.Set.Map.WeakSet.WeakMap.ArrayBuffer.SharedArrayBuffer.Atomics.DataView.JSON.Promise.Generator.GeneratorFunction.AsyncFunction.Reflect.Proxy.Intl.WebAssembly".split("."), vt = [
2915
- "Error",
2916
- "EvalError",
2917
- "InternalError",
2918
- "RangeError",
2919
- "ReferenceError",
2920
- "SyntaxError",
2921
- "TypeError",
2922
- "URIError"
2923
- ], yt = [
2924
- "setInterval",
2925
- "setTimeout",
2926
- "clearInterval",
2927
- "clearTimeout",
2928
- "require",
2929
- "exports",
2930
- "eval",
2931
- "isFinite",
2932
- "isNaN",
2933
- "parseFloat",
2934
- "parseInt",
2935
- "decodeURI",
2936
- "decodeURIComponent",
2937
- "encodeURI",
2938
- "encodeURIComponent",
2939
- "escape",
2940
- "unescape"
2941
- ], bt = [
2942
- "arguments",
2943
- "this",
2944
- "super",
2945
- "console",
2946
- "window",
2947
- "document",
2948
- "localStorage",
2949
- "sessionStorage",
2950
- "module",
2951
- "global"
2952
- ], xt = [].concat(yt, _t, vt);
2953
- function javascript$1(e) {
2954
- let t = e.regex, hasClosingTag = (e, { after: t }) => {
2955
- let n = "</" + e[0].slice(1);
2956
- return e.input.indexOf(n, t) !== -1;
2957
- }, n = mt, r = {
2958
- begin: "<>",
2959
- end: "</>"
2960
- }, i = /<[A-Za-z0-9\\._:-]+\s*\/>/, a = {
2961
- begin: /<[A-Za-z0-9\\._:-]+/,
2962
- end: /\/[A-Za-z0-9\\._:-]+>|\/>/,
2963
- isTrulyOpeningTag: (e, t) => {
2964
- let n = e[0].length + e.index, r = e.input[n];
2965
- if (r === "<" || r === ",") {
2966
- t.ignoreMatch();
2967
- return;
2968
- }
2969
- r === ">" && (hasClosingTag(e, { after: n }) || t.ignoreMatch());
2970
- let i, a = e.input.substring(n);
2971
- if (i = a.match(/^\s*=/)) {
2972
- t.ignoreMatch();
2973
- return;
2974
- }
2975
- if ((i = a.match(/^\s+extends\s+/)) && i.index === 0) {
2976
- t.ignoreMatch();
2977
- return;
2978
- }
2979
- }
2980
- }, o = {
2981
- $pattern: mt,
2982
- keyword: ht,
2983
- literal: gt,
2984
- built_in: xt,
2985
- "variable.language": bt
2986
- }, s = "[0-9](_?[0-9])*", c = `\\.(${s})`, l = "0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*", u = {
2987
- className: "number",
2988
- variants: [
2989
- { begin: `(\\b(${l})((${c})|\\.)?|(${c}))[eE][+-]?(${s})\\b` },
2990
- { begin: `\\b(${l})\\b((${c})\\b|\\.)?|(${c})\\b` },
2991
- { begin: "\\b(0|[1-9](_?[0-9])*)n\\b" },
2992
- { begin: "\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b" },
2993
- { begin: "\\b0[bB][0-1](_?[0-1])*n?\\b" },
2994
- { begin: "\\b0[oO][0-7](_?[0-7])*n?\\b" },
2995
- { begin: "\\b0[0-7]+n?\\b" }
2996
- ],
2997
- relevance: 0
2998
- }, d = {
2999
- className: "subst",
3000
- begin: "\\$\\{",
3001
- end: "\\}",
3002
- keywords: o,
3003
- contains: []
3004
- }, f = {
3005
- begin: ".?html`",
3006
- end: "",
3007
- starts: {
3008
- end: "`",
3009
- returnEnd: !1,
3010
- contains: [e.BACKSLASH_ESCAPE, d],
3011
- subLanguage: "xml"
3012
- }
3013
- }, p = {
3014
- begin: ".?css`",
3015
- end: "",
3016
- starts: {
3017
- end: "`",
3018
- returnEnd: !1,
3019
- contains: [e.BACKSLASH_ESCAPE, d],
3020
- subLanguage: "css"
3021
- }
3022
- }, m = {
3023
- begin: ".?gql`",
3024
- end: "",
3025
- starts: {
3026
- end: "`",
3027
- returnEnd: !1,
3028
- contains: [e.BACKSLASH_ESCAPE, d],
3029
- subLanguage: "graphql"
3030
- }
3031
- }, h = {
3032
- className: "string",
3033
- begin: "`",
3034
- end: "`",
3035
- contains: [e.BACKSLASH_ESCAPE, d]
3036
- }, g = {
3037
- className: "comment",
3038
- variants: [
3039
- e.COMMENT(/\/\*\*(?!\/)/, "\\*/", {
3040
- relevance: 0,
3041
- contains: [{
3042
- begin: "(?=@[A-Za-z]+)",
3043
- relevance: 0,
3044
- contains: [
3045
- {
3046
- className: "doctag",
3047
- begin: "@[A-Za-z]+"
3048
- },
3049
- {
3050
- className: "type",
3051
- begin: "\\{",
3052
- end: "\\}",
3053
- excludeEnd: !0,
3054
- excludeBegin: !0,
3055
- relevance: 0
3056
- },
3057
- {
3058
- className: "variable",
3059
- begin: n + "(?=\\s*(-)|$)",
3060
- endsParent: !0,
3061
- relevance: 0
3062
- },
3063
- {
3064
- begin: /(?=[^\n])\s/,
3065
- relevance: 0
3066
- }
3067
- ]
3068
- }]
3069
- }),
3070
- e.C_BLOCK_COMMENT_MODE,
3071
- e.C_LINE_COMMENT_MODE
3072
- ]
3073
- }, _ = [
3074
- e.APOS_STRING_MODE,
3075
- e.QUOTE_STRING_MODE,
3076
- f,
3077
- p,
3078
- m,
3079
- h,
3080
- { match: /\$\d+/ },
3081
- u
3082
- ];
3083
- d.contains = _.concat({
3084
- begin: /\{/,
3085
- end: /\}/,
3086
- keywords: o,
3087
- contains: ["self"].concat(_)
3088
- });
3089
- let v = [].concat(g, d.contains), y = v.concat([{
3090
- begin: /(\s*)\(/,
3091
- end: /\)/,
3092
- keywords: o,
3093
- contains: ["self"].concat(v)
3094
- }]), b = {
3095
- className: "params",
3096
- begin: /(\s*)\(/,
3097
- end: /\)/,
3098
- excludeBegin: !0,
3099
- excludeEnd: !0,
3100
- keywords: o,
3101
- contains: y
3102
- }, x = { variants: [{
3103
- match: [
3104
- /class/,
3105
- /\s+/,
3106
- n,
3107
- /\s+/,
3108
- /extends/,
3109
- /\s+/,
3110
- t.concat(n, "(", t.concat(/\./, n), ")*")
3111
- ],
3112
- scope: {
3113
- 1: "keyword",
3114
- 3: "title.class",
3115
- 5: "keyword",
3116
- 7: "title.class.inherited"
3117
- }
3118
- }, {
3119
- match: [
3120
- /class/,
3121
- /\s+/,
3122
- n
3123
- ],
3124
- scope: {
3125
- 1: "keyword",
3126
- 3: "title.class"
3127
- }
3128
- }] }, S = {
3129
- relevance: 0,
3130
- match: t.either(/\bJSON/, /\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/, /\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/, /\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),
3131
- className: "title.class",
3132
- keywords: { _: [..._t, ...vt] }
3133
- }, C = {
3134
- label: "use_strict",
3135
- className: "meta",
3136
- relevance: 10,
3137
- begin: /^\s*['"]use (strict|asm)['"]/
3138
- }, w = {
3139
- variants: [{ match: [
3140
- /function/,
3141
- /\s+/,
3142
- n,
3143
- /(?=\s*\()/
3144
- ] }, { match: [/function/, /\s*(?=\()/] }],
3145
- className: {
3146
- 1: "keyword",
3147
- 3: "title.function"
3148
- },
3149
- label: "func.def",
3150
- contains: [b],
3151
- illegal: /%/
3152
- }, T = {
3153
- relevance: 0,
3154
- match: /\b[A-Z][A-Z_0-9]+\b/,
3155
- className: "variable.constant"
3156
- };
3157
- function noneOf(e) {
3158
- return t.concat("(?!", e.join("|"), ")");
3159
- }
3160
- let E = {
3161
- match: t.concat(/\b/, noneOf([
3162
- ...yt,
3163
- "super",
3164
- "import"
3165
- ].map((e) => `${e}\\s*\\(`)), n, t.lookahead(/\s*\(/)),
3166
- className: "title.function",
3167
- relevance: 0
3168
- }, D = {
3169
- begin: t.concat(/\./, t.lookahead(t.concat(n, /(?![0-9A-Za-z$_(])/))),
3170
- end: n,
3171
- excludeBegin: !0,
3172
- keywords: "prototype",
3173
- className: "property",
3174
- relevance: 0
3175
- }, O = {
3176
- match: [
3177
- /get|set/,
3178
- /\s+/,
3179
- n,
3180
- /(?=\()/
3181
- ],
3182
- className: {
3183
- 1: "keyword",
3184
- 3: "title.function"
3185
- },
3186
- contains: [{ begin: /\(\)/ }, b]
3187
- }, k = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>", A = {
3188
- match: [
3189
- /const|var|let/,
3190
- /\s+/,
3191
- n,
3192
- /\s*/,
3193
- /=\s*/,
3194
- /(async\s*)?/,
3195
- t.lookahead(k)
3196
- ],
3197
- keywords: "async",
3198
- className: {
3199
- 1: "keyword",
3200
- 3: "title.function"
3201
- },
3202
- contains: [b]
3203
- };
3204
- return {
3205
- name: "JavaScript",
3206
- aliases: [
3207
- "js",
3208
- "jsx",
3209
- "mjs",
3210
- "cjs"
3211
- ],
3212
- keywords: o,
3213
- exports: {
3214
- PARAMS_CONTAINS: y,
3215
- CLASS_REFERENCE: S
3216
- },
3217
- illegal: /#(?![$_A-z])/,
3218
- contains: [
3219
- e.SHEBANG({
3220
- label: "shebang",
3221
- binary: "node",
3222
- relevance: 5
3223
- }),
3224
- C,
3225
- e.APOS_STRING_MODE,
3226
- e.QUOTE_STRING_MODE,
3227
- f,
3228
- p,
3229
- m,
3230
- h,
3231
- g,
3232
- { match: /\$\d+/ },
3233
- u,
3234
- S,
3235
- {
3236
- scope: "attr",
3237
- match: n + t.lookahead(":"),
3238
- relevance: 0
3239
- },
3240
- A,
3241
- {
3242
- begin: "(" + e.RE_STARTERS_RE + "|\\b(case|return|throw)\\b)\\s*",
3243
- keywords: "return throw case",
3244
- relevance: 0,
3245
- contains: [
3246
- g,
3247
- e.REGEXP_MODE,
3248
- {
3249
- className: "function",
3250
- begin: k,
3251
- returnBegin: !0,
3252
- end: "\\s*=>",
3253
- contains: [{
3254
- className: "params",
3255
- variants: [
3256
- {
3257
- begin: e.UNDERSCORE_IDENT_RE,
3258
- relevance: 0
3259
- },
3260
- {
3261
- className: null,
3262
- begin: /\(\s*\)/,
3263
- skip: !0
3264
- },
3265
- {
3266
- begin: /(\s*)\(/,
3267
- end: /\)/,
3268
- excludeBegin: !0,
3269
- excludeEnd: !0,
3270
- keywords: o,
3271
- contains: y
3272
- }
3273
- ]
3274
- }]
3275
- },
3276
- {
3277
- begin: /,/,
3278
- relevance: 0
3279
- },
3280
- {
3281
- match: /\s+/,
3282
- relevance: 0
3283
- },
3284
- {
3285
- variants: [
3286
- {
3287
- begin: r.begin,
3288
- end: r.end
3289
- },
3290
- { match: i },
3291
- {
3292
- begin: a.begin,
3293
- "on:begin": a.isTrulyOpeningTag,
3294
- end: a.end
3295
- }
3296
- ],
3297
- subLanguage: "xml",
3298
- contains: [{
3299
- begin: a.begin,
3300
- end: a.end,
3301
- skip: !0,
3302
- contains: ["self"]
3303
- }]
3304
- }
3305
- ]
3306
- },
3307
- w,
3308
- { beginKeywords: "while if switch catch for" },
3309
- {
3310
- begin: "\\b(?!function)" + e.UNDERSCORE_IDENT_RE + "\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",
3311
- returnBegin: !0,
3312
- label: "func.def",
3313
- contains: [b, e.inherit(e.TITLE_MODE, {
3314
- begin: n,
3315
- className: "title.function"
3316
- })]
3317
- },
3318
- {
3319
- match: /\.\.\./,
3320
- relevance: 0
3321
- },
3322
- D,
3323
- {
3324
- match: "\\$" + n,
3325
- relevance: 0
3326
- },
3327
- {
3328
- match: [/\bconstructor(?=\s*\()/],
3329
- className: { 1: "title.function" },
3330
- contains: [b]
3331
- },
3332
- E,
3333
- T,
3334
- x,
3335
- O,
3336
- { match: /\$[(.]/ }
3337
- ]
3338
- };
3339
- }
3340
- __name(javascript$1, "javascript");
3341
- //#endregion
3342
- //#region ../../node_modules/highlight.js/es/languages/typescript.js
3343
- var $ = "[A-Za-z$_][0-9A-Za-z$_]*", St = /* @__PURE__ */ "as.in.of.if.for.while.finally.var.new.function.do.return.void.else.break.catch.instanceof.with.throw.case.default.try.switch.continue.typeof.delete.let.yield.const.class.debugger.async.await.static.import.from.export.extends.using".split("."), Ct = [
3344
- "true",
3345
- "false",
3346
- "null",
3347
- "undefined",
3348
- "NaN",
3349
- "Infinity"
3350
- ], wt = /* @__PURE__ */ "Object.Function.Boolean.Symbol.Math.Date.Number.BigInt.String.RegExp.Array.Float32Array.Float64Array.Int8Array.Uint8Array.Uint8ClampedArray.Int16Array.Int32Array.Uint16Array.Uint32Array.BigInt64Array.BigUint64Array.Set.Map.WeakSet.WeakMap.ArrayBuffer.SharedArrayBuffer.Atomics.DataView.JSON.Promise.Generator.GeneratorFunction.AsyncFunction.Reflect.Proxy.Intl.WebAssembly".split("."), Tt = [
3351
- "Error",
3352
- "EvalError",
3353
- "InternalError",
3354
- "RangeError",
3355
- "ReferenceError",
3356
- "SyntaxError",
3357
- "TypeError",
3358
- "URIError"
3359
- ], Et = [
3360
- "setInterval",
3361
- "setTimeout",
3362
- "clearInterval",
3363
- "clearTimeout",
3364
- "require",
3365
- "exports",
3366
- "eval",
3367
- "isFinite",
3368
- "isNaN",
3369
- "parseFloat",
3370
- "parseInt",
3371
- "decodeURI",
3372
- "decodeURIComponent",
3373
- "encodeURI",
3374
- "encodeURIComponent",
3375
- "escape",
3376
- "unescape"
3377
- ], Dt = [
3378
- "arguments",
3379
- "this",
3380
- "super",
3381
- "console",
3382
- "window",
3383
- "document",
3384
- "localStorage",
3385
- "sessionStorage",
3386
- "module",
3387
- "global"
3388
- ], Ot = [].concat(Et, wt, Tt);
3389
- function javascript(e) {
3390
- let t = e.regex, hasClosingTag = (e, { after: t }) => {
3391
- let n = "</" + e[0].slice(1);
3392
- return e.input.indexOf(n, t) !== -1;
3393
- }, n = $, r = {
3394
- begin: "<>",
3395
- end: "</>"
3396
- }, i = /<[A-Za-z0-9\\._:-]+\s*\/>/, a = {
3397
- begin: /<[A-Za-z0-9\\._:-]+/,
3398
- end: /\/[A-Za-z0-9\\._:-]+>|\/>/,
3399
- isTrulyOpeningTag: (e, t) => {
3400
- let n = e[0].length + e.index, r = e.input[n];
3401
- if (r === "<" || r === ",") {
3402
- t.ignoreMatch();
3403
- return;
3404
- }
3405
- r === ">" && (hasClosingTag(e, { after: n }) || t.ignoreMatch());
3406
- let i, a = e.input.substring(n);
3407
- if (i = a.match(/^\s*=/)) {
3408
- t.ignoreMatch();
3409
- return;
3410
- }
3411
- if ((i = a.match(/^\s+extends\s+/)) && i.index === 0) {
3412
- t.ignoreMatch();
3413
- return;
3414
- }
3415
- }
3416
- }, o = {
3417
- $pattern: $,
3418
- keyword: St,
3419
- literal: Ct,
3420
- built_in: Ot,
3421
- "variable.language": Dt
3422
- }, s = "[0-9](_?[0-9])*", c = `\\.(${s})`, l = "0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*", u = {
3423
- className: "number",
3424
- variants: [
3425
- { begin: `(\\b(${l})((${c})|\\.)?|(${c}))[eE][+-]?(${s})\\b` },
3426
- { begin: `\\b(${l})\\b((${c})\\b|\\.)?|(${c})\\b` },
3427
- { begin: "\\b(0|[1-9](_?[0-9])*)n\\b" },
3428
- { begin: "\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b" },
3429
- { begin: "\\b0[bB][0-1](_?[0-1])*n?\\b" },
3430
- { begin: "\\b0[oO][0-7](_?[0-7])*n?\\b" },
3431
- { begin: "\\b0[0-7]+n?\\b" }
3432
- ],
3433
- relevance: 0
3434
- }, d = {
3435
- className: "subst",
3436
- begin: "\\$\\{",
3437
- end: "\\}",
3438
- keywords: o,
3439
- contains: []
3440
- }, f = {
3441
- begin: ".?html`",
3442
- end: "",
3443
- starts: {
3444
- end: "`",
3445
- returnEnd: !1,
3446
- contains: [e.BACKSLASH_ESCAPE, d],
3447
- subLanguage: "xml"
3448
- }
3449
- }, p = {
3450
- begin: ".?css`",
3451
- end: "",
3452
- starts: {
3453
- end: "`",
3454
- returnEnd: !1,
3455
- contains: [e.BACKSLASH_ESCAPE, d],
3456
- subLanguage: "css"
3457
- }
3458
- }, m = {
3459
- begin: ".?gql`",
3460
- end: "",
3461
- starts: {
3462
- end: "`",
3463
- returnEnd: !1,
3464
- contains: [e.BACKSLASH_ESCAPE, d],
3465
- subLanguage: "graphql"
3466
- }
3467
- }, h = {
3468
- className: "string",
3469
- begin: "`",
3470
- end: "`",
3471
- contains: [e.BACKSLASH_ESCAPE, d]
3472
- }, g = {
3473
- className: "comment",
3474
- variants: [
3475
- e.COMMENT(/\/\*\*(?!\/)/, "\\*/", {
3476
- relevance: 0,
3477
- contains: [{
3478
- begin: "(?=@[A-Za-z]+)",
3479
- relevance: 0,
3480
- contains: [
3481
- {
3482
- className: "doctag",
3483
- begin: "@[A-Za-z]+"
3484
- },
3485
- {
3486
- className: "type",
3487
- begin: "\\{",
3488
- end: "\\}",
3489
- excludeEnd: !0,
3490
- excludeBegin: !0,
3491
- relevance: 0
3492
- },
3493
- {
3494
- className: "variable",
3495
- begin: n + "(?=\\s*(-)|$)",
3496
- endsParent: !0,
3497
- relevance: 0
3498
- },
3499
- {
3500
- begin: /(?=[^\n])\s/,
3501
- relevance: 0
3502
- }
3503
- ]
3504
- }]
3505
- }),
3506
- e.C_BLOCK_COMMENT_MODE,
3507
- e.C_LINE_COMMENT_MODE
3508
- ]
3509
- }, _ = [
3510
- e.APOS_STRING_MODE,
3511
- e.QUOTE_STRING_MODE,
3512
- f,
3513
- p,
3514
- m,
3515
- h,
3516
- { match: /\$\d+/ },
3517
- u
3518
- ];
3519
- d.contains = _.concat({
3520
- begin: /\{/,
3521
- end: /\}/,
3522
- keywords: o,
3523
- contains: ["self"].concat(_)
3524
- });
3525
- let v = [].concat(g, d.contains), y = v.concat([{
3526
- begin: /(\s*)\(/,
3527
- end: /\)/,
3528
- keywords: o,
3529
- contains: ["self"].concat(v)
3530
- }]), b = {
3531
- className: "params",
3532
- begin: /(\s*)\(/,
3533
- end: /\)/,
3534
- excludeBegin: !0,
3535
- excludeEnd: !0,
3536
- keywords: o,
3537
- contains: y
3538
- }, x = { variants: [{
3539
- match: [
3540
- /class/,
3541
- /\s+/,
3542
- n,
3543
- /\s+/,
3544
- /extends/,
3545
- /\s+/,
3546
- t.concat(n, "(", t.concat(/\./, n), ")*")
3547
- ],
3548
- scope: {
3549
- 1: "keyword",
3550
- 3: "title.class",
3551
- 5: "keyword",
3552
- 7: "title.class.inherited"
3553
- }
3554
- }, {
3555
- match: [
3556
- /class/,
3557
- /\s+/,
3558
- n
3559
- ],
3560
- scope: {
3561
- 1: "keyword",
3562
- 3: "title.class"
3563
- }
3564
- }] }, S = {
3565
- relevance: 0,
3566
- match: t.either(/\bJSON/, /\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/, /\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/, /\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),
3567
- className: "title.class",
3568
- keywords: { _: [...wt, ...Tt] }
3569
- }, C = {
3570
- label: "use_strict",
3571
- className: "meta",
3572
- relevance: 10,
3573
- begin: /^\s*['"]use (strict|asm)['"]/
3574
- }, w = {
3575
- variants: [{ match: [
3576
- /function/,
3577
- /\s+/,
3578
- n,
3579
- /(?=\s*\()/
3580
- ] }, { match: [/function/, /\s*(?=\()/] }],
3581
- className: {
3582
- 1: "keyword",
3583
- 3: "title.function"
3584
- },
3585
- label: "func.def",
3586
- contains: [b],
3587
- illegal: /%/
3588
- }, T = {
3589
- relevance: 0,
3590
- match: /\b[A-Z][A-Z_0-9]+\b/,
3591
- className: "variable.constant"
3592
- };
3593
- function noneOf(e) {
3594
- return t.concat("(?!", e.join("|"), ")");
3595
- }
3596
- let E = {
3597
- match: t.concat(/\b/, noneOf([
3598
- ...Et,
3599
- "super",
3600
- "import"
3601
- ].map((e) => `${e}\\s*\\(`)), n, t.lookahead(/\s*\(/)),
3602
- className: "title.function",
3603
- relevance: 0
3604
- }, D = {
3605
- begin: t.concat(/\./, t.lookahead(t.concat(n, /(?![0-9A-Za-z$_(])/))),
3606
- end: n,
3607
- excludeBegin: !0,
3608
- keywords: "prototype",
3609
- className: "property",
3610
- relevance: 0
3611
- }, O = {
3612
- match: [
3613
- /get|set/,
3614
- /\s+/,
3615
- n,
3616
- /(?=\()/
3617
- ],
3618
- className: {
3619
- 1: "keyword",
3620
- 3: "title.function"
3621
- },
3622
- contains: [{ begin: /\(\)/ }, b]
3623
- }, k = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>", A = {
3624
- match: [
3625
- /const|var|let/,
3626
- /\s+/,
3627
- n,
3628
- /\s*/,
3629
- /=\s*/,
3630
- /(async\s*)?/,
3631
- t.lookahead(k)
3632
- ],
3633
- keywords: "async",
3634
- className: {
3635
- 1: "keyword",
3636
- 3: "title.function"
3637
- },
3638
- contains: [b]
3639
- };
3640
- return {
3641
- name: "JavaScript",
3642
- aliases: [
3643
- "js",
3644
- "jsx",
3645
- "mjs",
3646
- "cjs"
3647
- ],
3648
- keywords: o,
3649
- exports: {
3650
- PARAMS_CONTAINS: y,
3651
- CLASS_REFERENCE: S
3652
- },
3653
- illegal: /#(?![$_A-z])/,
3654
- contains: [
3655
- e.SHEBANG({
3656
- label: "shebang",
3657
- binary: "node",
3658
- relevance: 5
3659
- }),
3660
- C,
3661
- e.APOS_STRING_MODE,
3662
- e.QUOTE_STRING_MODE,
3663
- f,
3664
- p,
3665
- m,
3666
- h,
3667
- g,
3668
- { match: /\$\d+/ },
3669
- u,
3670
- S,
3671
- {
3672
- scope: "attr",
3673
- match: n + t.lookahead(":"),
3674
- relevance: 0
3675
- },
3676
- A,
3677
- {
3678
- begin: "(" + e.RE_STARTERS_RE + "|\\b(case|return|throw)\\b)\\s*",
3679
- keywords: "return throw case",
3680
- relevance: 0,
3681
- contains: [
3682
- g,
3683
- e.REGEXP_MODE,
3684
- {
3685
- className: "function",
3686
- begin: k,
3687
- returnBegin: !0,
3688
- end: "\\s*=>",
3689
- contains: [{
3690
- className: "params",
3691
- variants: [
3692
- {
3693
- begin: e.UNDERSCORE_IDENT_RE,
3694
- relevance: 0
3695
- },
3696
- {
3697
- className: null,
3698
- begin: /\(\s*\)/,
3699
- skip: !0
3700
- },
3701
- {
3702
- begin: /(\s*)\(/,
3703
- end: /\)/,
3704
- excludeBegin: !0,
3705
- excludeEnd: !0,
3706
- keywords: o,
3707
- contains: y
3708
- }
3709
- ]
3710
- }]
3711
- },
3712
- {
3713
- begin: /,/,
3714
- relevance: 0
3715
- },
3716
- {
3717
- match: /\s+/,
3718
- relevance: 0
3719
- },
3720
- {
3721
- variants: [
3722
- {
3723
- begin: r.begin,
3724
- end: r.end
3725
- },
3726
- { match: i },
3727
- {
3728
- begin: a.begin,
3729
- "on:begin": a.isTrulyOpeningTag,
3730
- end: a.end
3731
- }
3732
- ],
3733
- subLanguage: "xml",
3734
- contains: [{
3735
- begin: a.begin,
3736
- end: a.end,
3737
- skip: !0,
3738
- contains: ["self"]
3739
- }]
3740
- }
3741
- ]
3742
- },
3743
- w,
3744
- { beginKeywords: "while if switch catch for" },
3745
- {
3746
- begin: "\\b(?!function)" + e.UNDERSCORE_IDENT_RE + "\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",
3747
- returnBegin: !0,
3748
- label: "func.def",
3749
- contains: [b, e.inherit(e.TITLE_MODE, {
3750
- begin: n,
3751
- className: "title.function"
3752
- })]
3753
- },
3754
- {
3755
- match: /\.\.\./,
3756
- relevance: 0
3757
- },
3758
- D,
3759
- {
3760
- match: "\\$" + n,
3761
- relevance: 0
3762
- },
3763
- {
3764
- match: [/\bconstructor(?=\s*\()/],
3765
- className: { 1: "title.function" },
3766
- contains: [b]
3767
- },
3768
- E,
3769
- T,
3770
- x,
3771
- O,
3772
- { match: /\$[(.]/ }
3773
- ]
3774
- };
3775
- }
3776
- function typescript(e) {
3777
- let t = e.regex, n = javascript(e), r = $, i = [
3778
- "any",
3779
- "void",
3780
- "number",
3781
- "boolean",
3782
- "string",
3783
- "object",
3784
- "never",
3785
- "symbol",
3786
- "bigint",
3787
- "unknown"
3788
- ], a = {
3789
- begin: [
3790
- /namespace/,
3791
- /\s+/,
3792
- e.IDENT_RE
3793
- ],
3794
- beginScope: {
3795
- 1: "keyword",
3796
- 3: "title.class"
3797
- }
3798
- }, o = {
3799
- beginKeywords: "interface",
3800
- end: /\{/,
3801
- excludeEnd: !0,
3802
- keywords: {
3803
- keyword: "interface extends",
3804
- built_in: i
3805
- },
3806
- contains: [n.exports.CLASS_REFERENCE]
3807
- }, s = {
3808
- className: "meta",
3809
- relevance: 10,
3810
- begin: /^\s*['"]use strict['"]/
3811
- }, c = {
3812
- $pattern: $,
3813
- keyword: St.concat([
3814
- "type",
3815
- "interface",
3816
- "public",
3817
- "private",
3818
- "protected",
3819
- "implements",
3820
- "declare",
3821
- "abstract",
3822
- "readonly",
3823
- "enum",
3824
- "override",
3825
- "satisfies"
3826
- ]),
3827
- literal: Ct,
3828
- built_in: Ot.concat(i),
3829
- "variable.language": Dt
3830
- }, l = {
3831
- className: "meta",
3832
- begin: "@" + r
3833
- }, swapMode = (e, t, n) => {
3834
- let r = e.contains.findIndex((e) => e.label === t);
3835
- if (r === -1) throw Error("can not find mode to replace");
3836
- e.contains.splice(r, 1, n);
3837
- };
3838
- Object.assign(n.keywords, c), n.exports.PARAMS_CONTAINS.push(l);
3839
- let u = n.contains.find((e) => e.scope === "attr"), d = Object.assign({}, u, { match: t.concat(r, t.lookahead(/\s*\?:/)) });
3840
- n.exports.PARAMS_CONTAINS.push([
3841
- n.exports.CLASS_REFERENCE,
3842
- u,
3843
- d
3844
- ]), n.contains = n.contains.concat([
3845
- l,
3846
- a,
3847
- o,
3848
- d
3849
- ]), swapMode(n, "shebang", e.SHEBANG()), swapMode(n, "use_strict", s);
3850
- let f = n.contains.find((e) => e.label === "func.def");
3851
- return f.relevance = 0, Object.assign(n, {
3852
- name: "TypeScript",
3853
- aliases: [
3854
- "ts",
3855
- "tsx",
3856
- "mts",
3857
- "cts"
3858
- ]
3859
- }), n;
3860
- }
3861
- //#endregion
3862
- //#region ../../node_modules/highlight.js/es/languages/css.js
3863
- var MODES = (e) => ({
3864
- IMPORTANT: {
3865
- scope: "meta",
3866
- begin: "!important"
3867
- },
3868
- BLOCK_COMMENT: e.C_BLOCK_COMMENT_MODE,
3869
- HEXCOLOR: {
3870
- scope: "number",
3871
- begin: /#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/
3872
- },
3873
- FUNCTION_DISPATCH: {
3874
- className: "built_in",
3875
- begin: /[\w-]+(?=\()/
3876
- },
3877
- ATTRIBUTE_SELECTOR_MODE: {
3878
- scope: "selector-attr",
3879
- begin: /\[/,
3880
- end: /\]/,
3881
- illegal: "$",
3882
- contains: [e.APOS_STRING_MODE, e.QUOTE_STRING_MODE]
3883
- },
3884
- CSS_NUMBER_MODE: {
3885
- scope: "number",
3886
- begin: e.NUMBER_RE + "(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",
3887
- relevance: 0
3888
- },
3889
- CSS_VARIABLE: {
3890
- className: "attr",
3891
- begin: /--[A-Za-z_][A-Za-z0-9_-]*/
3892
- }
3893
- }), kt = /* @__PURE__ */ "a.abbr.address.article.aside.audio.b.blockquote.body.button.canvas.caption.cite.code.dd.del.details.dfn.div.dl.dt.em.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.header.hgroup.html.i.iframe.img.input.ins.kbd.label.legend.li.main.mark.menu.nav.object.ol.optgroup.option.p.picture.q.quote.samp.section.select.source.span.strong.summary.sup.table.tbody.td.textarea.tfoot.th.thead.time.tr.ul.var.video".split("."), At = /* @__PURE__ */ "defs.g.marker.mask.pattern.svg.switch.symbol.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feFlood.feGaussianBlur.feImage.feMerge.feMorphology.feOffset.feSpecularLighting.feTile.feTurbulence.linearGradient.radialGradient.stop.circle.ellipse.image.line.path.polygon.polyline.rect.text.use.textPath.tspan.foreignObject.clipPath".split("."), jt = [...kt, ...At], Mt = (/* @__PURE__ */ "any-hover.any-pointer.aspect-ratio.color.color-gamut.color-index.device-aspect-ratio.device-height.device-width.display-mode.forced-colors.grid.height.hover.inverted-colors.monochrome.orientation.overflow-block.overflow-inline.pointer.prefers-color-scheme.prefers-contrast.prefers-reduced-motion.prefers-reduced-transparency.resolution.scan.scripting.update.width.min-width.max-width.min-height.max-height".split(".")).sort().reverse(), Nt = (/* @__PURE__ */ "active.any-link.blank.checked.current.default.defined.dir.disabled.drop.empty.enabled.first.first-child.first-of-type.fullscreen.future.focus.focus-visible.focus-within.has.host.host-context.hover.indeterminate.in-range.invalid.is.lang.last-child.last-of-type.left.link.local-link.not.nth-child.nth-col.nth-last-child.nth-last-col.nth-last-of-type.nth-of-type.only-child.only-of-type.optional.out-of-range.past.placeholder-shown.read-only.read-write.required.right.root.scope.target.target-within.user-invalid.valid.visited.where".split(".")).sort().reverse(), Pt = [
3894
- "after",
3895
- "backdrop",
3896
- "before",
3897
- "cue",
3898
- "cue-region",
3899
- "first-letter",
3900
- "first-line",
3901
- "grammar-error",
3902
- "marker",
3903
- "part",
3904
- "placeholder",
3905
- "selection",
3906
- "slotted",
3907
- "spelling-error"
3908
- ].sort().reverse(), Ft = (/* @__PURE__ */ "accent-color.align-content.align-items.align-self.alignment-baseline.all.anchor-name.animation.animation-composition.animation-delay.animation-direction.animation-duration.animation-fill-mode.animation-iteration-count.animation-name.animation-play-state.animation-range.animation-range-end.animation-range-start.animation-timeline.animation-timing-function.appearance.aspect-ratio.backdrop-filter.backface-visibility.background.background-attachment.background-blend-mode.background-clip.background-color.background-image.background-origin.background-position.background-position-x.background-position-y.background-repeat.background-size.baseline-shift.block-size.border.border-block.border-block-color.border-block-end.border-block-end-color.border-block-end-style.border-block-end-width.border-block-start.border-block-start-color.border-block-start-style.border-block-start-width.border-block-style.border-block-width.border-bottom.border-bottom-color.border-bottom-left-radius.border-bottom-right-radius.border-bottom-style.border-bottom-width.border-collapse.border-color.border-end-end-radius.border-end-start-radius.border-image.border-image-outset.border-image-repeat.border-image-slice.border-image-source.border-image-width.border-inline.border-inline-color.border-inline-end.border-inline-end-color.border-inline-end-style.border-inline-end-width.border-inline-start.border-inline-start-color.border-inline-start-style.border-inline-start-width.border-inline-style.border-inline-width.border-left.border-left-color.border-left-style.border-left-width.border-radius.border-right.border-right-color.border-right-style.border-right-width.border-spacing.border-start-end-radius.border-start-start-radius.border-style.border-top.border-top-color.border-top-left-radius.border-top-right-radius.border-top-style.border-top-width.border-width.bottom.box-align.box-decoration-break.box-direction.box-flex.box-flex-group.box-lines.box-ordinal-group.box-orient.box-pack.box-shadow.box-sizing.break-after.break-before.break-inside.caption-side.caret-color.clear.clip.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.color-scheme.column-count.column-fill.column-gap.column-rule.column-rule-color.column-rule-style.column-rule-width.column-span.column-width.columns.contain.contain-intrinsic-block-size.contain-intrinsic-height.contain-intrinsic-inline-size.contain-intrinsic-size.contain-intrinsic-width.container.container-name.container-type.content.content-visibility.counter-increment.counter-reset.counter-set.cue.cue-after.cue-before.cursor.cx.cy.direction.display.dominant-baseline.empty-cells.enable-background.field-sizing.fill.fill-opacity.fill-rule.filter.flex.flex-basis.flex-direction.flex-flow.flex-grow.flex-shrink.flex-wrap.float.flood-color.flood-opacity.flow.font.font-display.font-family.font-feature-settings.font-kerning.font-language-override.font-optical-sizing.font-palette.font-size.font-size-adjust.font-smooth.font-smoothing.font-stretch.font-style.font-synthesis.font-synthesis-position.font-synthesis-small-caps.font-synthesis-style.font-synthesis-weight.font-variant.font-variant-alternates.font-variant-caps.font-variant-east-asian.font-variant-emoji.font-variant-ligatures.font-variant-numeric.font-variant-position.font-variation-settings.font-weight.forced-color-adjust.gap.glyph-orientation-horizontal.glyph-orientation-vertical.grid.grid-area.grid-auto-columns.grid-auto-flow.grid-auto-rows.grid-column.grid-column-end.grid-column-start.grid-gap.grid-row.grid-row-end.grid-row-start.grid-template.grid-template-areas.grid-template-columns.grid-template-rows.hanging-punctuation.height.hyphenate-character.hyphenate-limit-chars.hyphens.icon.image-orientation.image-rendering.image-resolution.ime-mode.initial-letter.initial-letter-align.inline-size.inset.inset-area.inset-block.inset-block-end.inset-block-start.inset-inline.inset-inline-end.inset-inline-start.isolation.justify-content.justify-items.justify-self.kerning.left.letter-spacing.lighting-color.line-break.line-height.line-height-step.list-style.list-style-image.list-style-position.list-style-type.margin.margin-block.margin-block-end.margin-block-start.margin-bottom.margin-inline.margin-inline-end.margin-inline-start.margin-left.margin-right.margin-top.margin-trim.marker.marker-end.marker-mid.marker-start.marks.mask.mask-border.mask-border-mode.mask-border-outset.mask-border-repeat.mask-border-slice.mask-border-source.mask-border-width.mask-clip.mask-composite.mask-image.mask-mode.mask-origin.mask-position.mask-repeat.mask-size.mask-type.masonry-auto-flow.math-depth.math-shift.math-style.max-block-size.max-height.max-inline-size.max-width.min-block-size.min-height.min-inline-size.min-width.mix-blend-mode.nav-down.nav-index.nav-left.nav-right.nav-up.none.normal.object-fit.object-position.offset.offset-anchor.offset-distance.offset-path.offset-position.offset-rotate.opacity.order.orphans.outline.outline-color.outline-offset.outline-style.outline-width.overflow.overflow-anchor.overflow-block.overflow-clip-margin.overflow-inline.overflow-wrap.overflow-x.overflow-y.overlay.overscroll-behavior.overscroll-behavior-block.overscroll-behavior-inline.overscroll-behavior-x.overscroll-behavior-y.padding.padding-block.padding-block-end.padding-block-start.padding-bottom.padding-inline.padding-inline-end.padding-inline-start.padding-left.padding-right.padding-top.page.page-break-after.page-break-before.page-break-inside.paint-order.pause.pause-after.pause-before.perspective.perspective-origin.place-content.place-items.place-self.pointer-events.position.position-anchor.position-visibility.print-color-adjust.quotes.r.resize.rest.rest-after.rest-before.right.rotate.row-gap.ruby-align.ruby-position.scale.scroll-behavior.scroll-margin.scroll-margin-block.scroll-margin-block-end.scroll-margin-block-start.scroll-margin-bottom.scroll-margin-inline.scroll-margin-inline-end.scroll-margin-inline-start.scroll-margin-left.scroll-margin-right.scroll-margin-top.scroll-padding.scroll-padding-block.scroll-padding-block-end.scroll-padding-block-start.scroll-padding-bottom.scroll-padding-inline.scroll-padding-inline-end.scroll-padding-inline-start.scroll-padding-left.scroll-padding-right.scroll-padding-top.scroll-snap-align.scroll-snap-stop.scroll-snap-type.scroll-timeline.scroll-timeline-axis.scroll-timeline-name.scrollbar-color.scrollbar-gutter.scrollbar-width.shape-image-threshold.shape-margin.shape-outside.shape-rendering.speak.speak-as.src.stop-color.stop-opacity.stroke.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke-width.tab-size.table-layout.text-align.text-align-all.text-align-last.text-anchor.text-combine-upright.text-decoration.text-decoration-color.text-decoration-line.text-decoration-skip.text-decoration-skip-ink.text-decoration-style.text-decoration-thickness.text-emphasis.text-emphasis-color.text-emphasis-position.text-emphasis-style.text-indent.text-justify.text-orientation.text-overflow.text-rendering.text-shadow.text-size-adjust.text-transform.text-underline-offset.text-underline-position.text-wrap.text-wrap-mode.text-wrap-style.timeline-scope.top.touch-action.transform.transform-box.transform-origin.transform-style.transition.transition-behavior.transition-delay.transition-duration.transition-property.transition-timing-function.translate.unicode-bidi.user-modify.user-select.vector-effect.vertical-align.view-timeline.view-timeline-axis.view-timeline-inset.view-timeline-name.view-transition-name.visibility.voice-balance.voice-duration.voice-family.voice-pitch.voice-range.voice-rate.voice-stress.voice-volume.white-space.white-space-collapse.widows.width.will-change.word-break.word-spacing.word-wrap.writing-mode.x.y.z-index.zoom".split(".")).sort().reverse();
3909
- function css(e) {
3910
- let t = e.regex, n = MODES(e), r = { begin: /-(webkit|moz|ms|o)-(?=[a-z])/ }, i = /@-?\w[\w]*(-\w+)*/, a = [e.APOS_STRING_MODE, e.QUOTE_STRING_MODE];
3911
- return {
3912
- name: "CSS",
3913
- case_insensitive: !0,
3914
- illegal: /[=|'\$]/,
3915
- keywords: { keyframePosition: "from to" },
3916
- classNameAliases: { keyframePosition: "selector-tag" },
3917
- contains: [
3918
- n.BLOCK_COMMENT,
3919
- r,
3920
- n.CSS_NUMBER_MODE,
3921
- {
3922
- className: "selector-id",
3923
- begin: /#[A-Za-z0-9_-]+/,
3924
- relevance: 0
3925
- },
3926
- {
3927
- className: "selector-class",
3928
- begin: "\\.[a-zA-Z-][a-zA-Z0-9_-]*",
3929
- relevance: 0
3930
- },
3931
- n.ATTRIBUTE_SELECTOR_MODE,
3932
- {
3933
- className: "selector-pseudo",
3934
- variants: [{ begin: ":(" + Nt.join("|") + ")" }, { begin: ":(:)?(" + Pt.join("|") + ")" }]
3935
- },
3936
- n.CSS_VARIABLE,
3937
- {
3938
- className: "attribute",
3939
- begin: "\\b(" + Ft.join("|") + ")\\b"
3940
- },
3941
- {
3942
- begin: /:/,
3943
- end: /[;}{]/,
3944
- contains: [
3945
- n.BLOCK_COMMENT,
3946
- n.HEXCOLOR,
3947
- n.IMPORTANT,
3948
- n.CSS_NUMBER_MODE,
3949
- ...a,
3950
- {
3951
- begin: /(url|data-uri)\(/,
3952
- end: /\)/,
3953
- relevance: 0,
3954
- keywords: { built_in: "url data-uri" },
3955
- contains: [...a, {
3956
- className: "string",
3957
- begin: /[^)]/,
3958
- endsWithParent: !0,
3959
- excludeEnd: !0
3960
- }]
3961
- },
3962
- n.FUNCTION_DISPATCH
3963
- ]
3964
- },
3965
- {
3966
- begin: t.lookahead(/@/),
3967
- end: "[{;]",
3968
- relevance: 0,
3969
- illegal: /:/,
3970
- contains: [{
3971
- className: "keyword",
3972
- begin: i
3973
- }, {
3974
- begin: /\s/,
3975
- endsWithParent: !0,
3976
- excludeEnd: !0,
3977
- relevance: 0,
3978
- keywords: {
3979
- $pattern: /[a-z-]+/,
3980
- keyword: "and or not only",
3981
- attribute: Mt.join(" ")
3982
- },
3983
- contains: [
3984
- {
3985
- begin: /[a-z-]+(?=:)/,
3986
- className: "attribute"
3987
- },
3988
- ...a,
3989
- n.CSS_NUMBER_MODE
3990
- ]
3991
- }]
3992
- },
3993
- {
3994
- className: "selector-tag",
3995
- begin: "\\b(" + jt.join("|") + ")\\b"
3996
- }
3997
- ]
3998
- };
3999
- }
4000
- //#endregion
4001
- //#region ../../node_modules/highlight.js/es/languages/xml.js
4002
- function xml(e) {
4003
- let t = e.regex, n = t.concat(/[\p{L}_]/u, t.optional(/[\p{L}0-9_.-]*:/u), /[\p{L}0-9_.-]*/u), r = /[\p{L}0-9._:-]+/u, i = {
4004
- className: "symbol",
4005
- begin: /&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/
4006
- }, a = {
4007
- begin: /\s/,
4008
- contains: [{
4009
- className: "keyword",
4010
- begin: /#?[a-z_][a-z1-9_-]+/,
4011
- illegal: /\n/
4012
- }]
4013
- }, o = e.inherit(a, {
4014
- begin: /\(/,
4015
- end: /\)/
4016
- }), s = e.inherit(e.APOS_STRING_MODE, { className: "string" }), c = e.inherit(e.QUOTE_STRING_MODE, { className: "string" }), l = {
4017
- endsWithParent: !0,
4018
- illegal: /</,
4019
- relevance: 0,
4020
- contains: [{
4021
- className: "attr",
4022
- begin: r,
4023
- relevance: 0
4024
- }, {
4025
- begin: /=\s*/,
4026
- relevance: 0,
4027
- contains: [{
4028
- className: "string",
4029
- endsParent: !0,
4030
- variants: [
4031
- {
4032
- begin: /"/,
4033
- end: /"/,
4034
- contains: [i]
4035
- },
4036
- {
4037
- begin: /'/,
4038
- end: /'/,
4039
- contains: [i]
4040
- },
4041
- { begin: /[^\s"'=<>`]+/ }
4042
- ]
4043
- }]
4044
- }]
4045
- };
4046
- return {
4047
- name: "HTML, XML",
4048
- aliases: [
4049
- "html",
4050
- "xhtml",
4051
- "rss",
4052
- "atom",
4053
- "xjb",
4054
- "xsd",
4055
- "xsl",
4056
- "plist",
4057
- "wsf",
4058
- "svg"
4059
- ],
4060
- case_insensitive: !0,
4061
- unicodeRegex: !0,
4062
- contains: [
4063
- {
4064
- className: "meta",
4065
- begin: /<![a-z]/,
4066
- end: />/,
4067
- relevance: 10,
4068
- contains: [
4069
- a,
4070
- c,
4071
- s,
4072
- o,
4073
- {
4074
- begin: /\[/,
4075
- end: /\]/,
4076
- contains: [{
4077
- className: "meta",
4078
- begin: /<![a-z]/,
4079
- end: />/,
4080
- contains: [
4081
- a,
4082
- o,
4083
- c,
4084
- s
4085
- ]
4086
- }]
4087
- }
4088
- ]
4089
- },
4090
- e.COMMENT(/<!--/, /-->/, { relevance: 10 }),
4091
- {
4092
- begin: /<!\[CDATA\[/,
4093
- end: /\]\]>/,
4094
- relevance: 10
4095
- },
4096
- i,
4097
- {
4098
- className: "meta",
4099
- end: /\?>/,
4100
- variants: [{
4101
- begin: /<\?xml/,
4102
- relevance: 10,
4103
- contains: [c]
4104
- }, { begin: /<\?[a-z][a-z0-9]+/ }]
4105
- },
4106
- {
4107
- className: "tag",
4108
- begin: /<style(?=\s|>)/,
4109
- end: />/,
4110
- keywords: { name: "style" },
4111
- contains: [l],
4112
- starts: {
4113
- end: /<\/style>/,
4114
- returnEnd: !0,
4115
- subLanguage: ["css", "xml"]
4116
- }
4117
- },
4118
- {
4119
- className: "tag",
4120
- begin: /<script(?=\s|>)/,
4121
- end: />/,
4122
- keywords: { name: "script" },
4123
- contains: [l],
4124
- starts: {
4125
- end: /<\/script>/,
4126
- returnEnd: !0,
4127
- subLanguage: [
4128
- "javascript",
4129
- "handlebars",
4130
- "xml"
4131
- ]
4132
- }
4133
- },
4134
- {
4135
- className: "tag",
4136
- begin: /<>|<\/>/
4137
- },
4138
- {
4139
- className: "tag",
4140
- begin: t.concat(/</, t.lookahead(t.concat(n, t.either(/\/>/, />/, /\s/)))),
4141
- end: /\/?>/,
4142
- contains: [{
4143
- className: "name",
4144
- begin: n,
4145
- relevance: 0,
4146
- starts: l
4147
- }]
4148
- },
4149
- {
4150
- className: "tag",
4151
- begin: t.concat(/<\//, t.lookahead(t.concat(n, />/))),
4152
- contains: [{
4153
- className: "name",
4154
- begin: n,
4155
- relevance: 0
4156
- }, {
4157
- begin: />/,
4158
- relevance: 0,
4159
- endsParent: !0
4160
- }]
4161
- }
4162
- ]
4163
- };
4164
- }
4165
- //#endregion
4166
- //#region ../../node_modules/highlight.js/es/languages/bash.js
4167
- function bash(e) {
4168
- let t = e.regex, n = {}, r = {
4169
- begin: /\$\{/,
4170
- end: /\}/,
4171
- contains: ["self", {
4172
- begin: /:-/,
4173
- contains: [n]
4174
- }]
4175
- };
4176
- Object.assign(n, {
4177
- className: "variable",
4178
- variants: [{ begin: t.concat(/\$[\w\d#@][\w\d_]*/, "(?![\\w\\d])(?![$])") }, r]
4179
- });
4180
- let i = {
4181
- className: "subst",
4182
- begin: /\$\(/,
4183
- end: /\)/,
4184
- contains: [e.BACKSLASH_ESCAPE]
4185
- }, a = e.inherit(e.COMMENT(), {
4186
- match: [/(^|\s)/, /#.*$/],
4187
- scope: { 2: "comment" }
4188
- }), o = {
4189
- begin: /<<-?\s*(?=\w+)/,
4190
- starts: { contains: [e.END_SAME_AS_BEGIN({
4191
- begin: /(\w+)/,
4192
- end: /(\w+)/,
4193
- className: "string"
4194
- })] }
4195
- }, s = {
4196
- className: "string",
4197
- begin: /"/,
4198
- end: /"/,
4199
- contains: [
4200
- e.BACKSLASH_ESCAPE,
4201
- n,
4202
- i
4203
- ]
4204
- };
4205
- i.contains.push(s);
4206
- let c = { match: /\\"/ }, l = {
4207
- className: "string",
4208
- begin: /'/,
4209
- end: /'/
4210
- }, u = { match: /\\'/ }, d = {
4211
- begin: /\$?\(\(/,
4212
- end: /\)\)/,
4213
- contains: [
4214
- {
4215
- begin: /\d+#[0-9a-f]+/,
4216
- className: "number"
4217
- },
4218
- e.NUMBER_MODE,
4219
- n
4220
- ]
4221
- }, f = e.SHEBANG({
4222
- binary: `(${[
4223
- "fish",
4224
- "bash",
4225
- "zsh",
4226
- "sh",
4227
- "csh",
4228
- "ksh",
4229
- "tcsh",
4230
- "dash",
4231
- "scsh"
4232
- ].join("|")})`,
4233
- relevance: 10
4234
- }), p = {
4235
- className: "function",
4236
- begin: /\w[\w\d_]*\s*\(\s*\)\s*\{/,
4237
- returnBegin: !0,
4238
- contains: [e.inherit(e.TITLE_MODE, { begin: /\w[\w\d_]*/ })],
4239
- relevance: 0
4240
- }, m = [
4241
- "if",
4242
- "then",
4243
- "else",
4244
- "elif",
4245
- "fi",
4246
- "time",
4247
- "for",
4248
- "while",
4249
- "until",
4250
- "in",
4251
- "do",
4252
- "done",
4253
- "case",
4254
- "esac",
4255
- "coproc",
4256
- "function",
4257
- "select"
4258
- ], h = ["true", "false"], g = { match: /(\/[a-z._-]+)+/ }, _ = [
4259
- "break",
4260
- "cd",
4261
- "continue",
4262
- "eval",
4263
- "exec",
4264
- "exit",
4265
- "export",
4266
- "getopts",
4267
- "hash",
4268
- "pwd",
4269
- "readonly",
4270
- "return",
4271
- "shift",
4272
- "test",
4273
- "times",
4274
- "trap",
4275
- "umask",
4276
- "unset"
4277
- ], v = [
4278
- "alias",
4279
- "bind",
4280
- "builtin",
4281
- "caller",
4282
- "command",
4283
- "declare",
4284
- "echo",
4285
- "enable",
4286
- "help",
4287
- "let",
4288
- "local",
4289
- "logout",
4290
- "mapfile",
4291
- "printf",
4292
- "read",
4293
- "readarray",
4294
- "source",
4295
- "sudo",
4296
- "type",
4297
- "typeset",
4298
- "ulimit",
4299
- "unalias"
4300
- ], y = /* @__PURE__ */ "autoload.bg.bindkey.bye.cap.chdir.clone.comparguments.compcall.compctl.compdescribe.compfiles.compgroups.compquote.comptags.comptry.compvalues.dirs.disable.disown.echotc.echoti.emulate.fc.fg.float.functions.getcap.getln.history.integer.jobs.kill.limit.log.noglob.popd.print.pushd.pushln.rehash.sched.setcap.setopt.stat.suspend.ttyctl.unfunction.unhash.unlimit.unsetopt.vared.wait.whence.where.which.zcompile.zformat.zftp.zle.zmodload.zparseopts.zprof.zpty.zregexparse.zsocket.zstyle.ztcp".split("."), b = /* @__PURE__ */ "chcon.chgrp.chown.chmod.cp.dd.df.dir.dircolors.ln.ls.mkdir.mkfifo.mknod.mktemp.mv.realpath.rm.rmdir.shred.sync.touch.truncate.vdir.b2sum.base32.base64.cat.cksum.comm.csplit.cut.expand.fmt.fold.head.join.md5sum.nl.numfmt.od.paste.ptx.pr.sha1sum.sha224sum.sha256sum.sha384sum.sha512sum.shuf.sort.split.sum.tac.tail.tr.tsort.unexpand.uniq.wc.arch.basename.chroot.date.dirname.du.echo.env.expr.factor.groups.hostid.id.link.logname.nice.nohup.nproc.pathchk.pinky.printenv.printf.pwd.readlink.runcon.seq.sleep.stat.stdbuf.stty.tee.test.timeout.tty.uname.unlink.uptime.users.who.whoami.yes".split(".");
4301
- return {
4302
- name: "Bash",
4303
- aliases: ["sh", "zsh"],
4304
- keywords: {
4305
- $pattern: /\b[a-z][a-z0-9._-]+\b/,
4306
- keyword: m,
4307
- literal: h,
4308
- built_in: [
4309
- ..._,
4310
- ...v,
4311
- "set",
4312
- "shopt",
4313
- ...y,
4314
- ...b
4315
- ]
4316
- },
4317
- contains: [
4318
- f,
4319
- e.SHEBANG(),
4320
- p,
4321
- d,
4322
- a,
4323
- o,
4324
- g,
4325
- s,
4326
- c,
4327
- l,
4328
- u,
4329
- n
4330
- ]
4331
- };
4332
- }
4333
- //#endregion
4334
- //#region ../../node_modules/highlight.js/es/languages/json.js
4335
- function json(e) {
4336
- let t = {
4337
- className: "attr",
4338
- begin: /"(\\.|[^\\"\r\n])*"(?=\s*:)/,
4339
- relevance: 1.01
4340
- }, n = {
4341
- match: /[{}[\],:]/,
4342
- className: "punctuation",
4343
- relevance: 0
4344
- }, r = [
4345
- "true",
4346
- "false",
4347
- "null"
4348
- ], i = {
4349
- scope: "literal",
4350
- beginKeywords: r.join(" ")
4351
- };
4352
- return {
4353
- name: "JSON",
4354
- aliases: ["jsonc"],
4355
- keywords: { literal: r },
4356
- contains: [
4357
- t,
4358
- n,
4359
- e.QUOTE_STRING_MODE,
4360
- i,
4361
- e.C_NUMBER_MODE,
4362
- e.C_LINE_COMMENT_MODE,
4363
- e.C_BLOCK_COMMENT_MODE
4364
- ],
4365
- illegal: "\\S"
4366
- };
4367
- }
4368
- //#endregion
4369
- //#region ../../node_modules/highlight.js/es/languages/go.js
4370
- function go(e) {
4371
- let t = {
4372
- keyword: [
4373
- "break",
4374
- "case",
4375
- "chan",
4376
- "const",
4377
- "continue",
4378
- "default",
4379
- "defer",
4380
- "else",
4381
- "fallthrough",
4382
- "for",
4383
- "func",
4384
- "go",
4385
- "goto",
4386
- "if",
4387
- "import",
4388
- "interface",
4389
- "map",
4390
- "package",
4391
- "range",
4392
- "return",
4393
- "select",
4394
- "struct",
4395
- "switch",
4396
- "type",
4397
- "var"
4398
- ],
4399
- type: [
4400
- "bool",
4401
- "byte",
4402
- "complex64",
4403
- "complex128",
4404
- "error",
4405
- "float32",
4406
- "float64",
4407
- "int8",
4408
- "int16",
4409
- "int32",
4410
- "int64",
4411
- "string",
4412
- "uint8",
4413
- "uint16",
4414
- "uint32",
4415
- "uint64",
4416
- "int",
4417
- "uint",
4418
- "uintptr",
4419
- "rune"
4420
- ],
4421
- literal: [
4422
- "true",
4423
- "false",
4424
- "iota",
4425
- "nil"
4426
- ],
4427
- built_in: [
4428
- "append",
4429
- "cap",
4430
- "close",
4431
- "complex",
4432
- "copy",
4433
- "imag",
4434
- "len",
4435
- "make",
4436
- "new",
4437
- "panic",
4438
- "print",
4439
- "println",
4440
- "real",
4441
- "recover",
4442
- "delete"
4443
- ]
4444
- };
4445
- return {
4446
- name: "Go",
4447
- aliases: ["golang"],
4448
- keywords: t,
4449
- illegal: "</",
4450
- contains: [
4451
- e.C_LINE_COMMENT_MODE,
4452
- e.C_BLOCK_COMMENT_MODE,
4453
- {
4454
- className: "string",
4455
- variants: [
4456
- e.QUOTE_STRING_MODE,
4457
- e.APOS_STRING_MODE,
4458
- {
4459
- begin: "`",
4460
- end: "`"
4461
- }
4462
- ]
4463
- },
4464
- {
4465
- className: "number",
4466
- variants: [
4467
- {
4468
- match: /-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,
4469
- relevance: 0
4470
- },
4471
- {
4472
- match: /-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,
4473
- relevance: 0
4474
- },
4475
- {
4476
- match: /-?\b0[oO](_?[0-7])*i?/,
4477
- relevance: 0
4478
- },
4479
- {
4480
- match: /-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,
4481
- relevance: 0
4482
- },
4483
- {
4484
- match: /-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,
4485
- relevance: 0
4486
- }
4487
- ]
4488
- },
4489
- { begin: /:=/ },
4490
- {
4491
- className: "function",
4492
- beginKeywords: "func",
4493
- end: "\\s*(\\{|$)",
4494
- excludeEnd: !0,
4495
- contains: [e.TITLE_MODE, {
4496
- className: "params",
4497
- begin: /\(/,
4498
- end: /\)/,
4499
- endsParent: !0,
4500
- keywords: t,
4501
- illegal: /["']/
4502
- }]
4503
- }
4504
- ]
4505
- };
4506
- }
4507
- //#endregion
4508
- //#region ../../node_modules/highlight.js/es/languages/python.js
4509
- function python(e) {
4510
- let t = e.regex, n = /[\p{XID_Start}_]\p{XID_Continue}*/u, r = /* @__PURE__ */ "and.as.assert.async.await.break.case.class.continue.def.del.elif.else.except.finally.for.from.global.if.import.in.is.lambda.match.nonlocal|10.not.or.pass.raise.return.try.while.with.yield".split("."), i = {
4511
- $pattern: /[A-Za-z]\w+|__\w+__/,
4512
- keyword: r,
4513
- built_in: /* @__PURE__ */ "__import__.abs.all.any.ascii.bin.bool.breakpoint.bytearray.bytes.callable.chr.classmethod.compile.complex.delattr.dict.dir.divmod.enumerate.eval.exec.filter.float.format.frozenset.getattr.globals.hasattr.hash.help.hex.id.input.int.isinstance.issubclass.iter.len.list.locals.map.max.memoryview.min.next.object.oct.open.ord.pow.print.property.range.repr.reversed.round.set.setattr.slice.sorted.staticmethod.str.sum.super.tuple.type.vars.zip".split("."),
4514
- literal: [
4515
- "__debug__",
4516
- "Ellipsis",
4517
- "False",
4518
- "None",
4519
- "NotImplemented",
4520
- "True"
4521
- ],
4522
- type: [
4523
- "Any",
4524
- "Callable",
4525
- "Coroutine",
4526
- "Dict",
4527
- "List",
4528
- "Literal",
4529
- "Generic",
4530
- "Optional",
4531
- "Sequence",
4532
- "Set",
4533
- "Tuple",
4534
- "Type",
4535
- "Union"
4536
- ]
4537
- }, a = {
4538
- className: "meta",
4539
- begin: /^(>>>|\.\.\.) /
4540
- }, o = {
4541
- className: "subst",
4542
- begin: /\{/,
4543
- end: /\}/,
4544
- keywords: i,
4545
- illegal: /#/
4546
- }, s = {
4547
- begin: /\{\{/,
4548
- relevance: 0
4549
- }, c = {
4550
- className: "string",
4551
- contains: [e.BACKSLASH_ESCAPE],
4552
- variants: [
4553
- {
4554
- begin: /([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,
4555
- end: /'''/,
4556
- contains: [e.BACKSLASH_ESCAPE, a],
4557
- relevance: 10
4558
- },
4559
- {
4560
- begin: /([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,
4561
- end: /"""/,
4562
- contains: [e.BACKSLASH_ESCAPE, a],
4563
- relevance: 10
4564
- },
4565
- {
4566
- begin: /([fF][rR]|[rR][fF]|[fF])'''/,
4567
- end: /'''/,
4568
- contains: [
4569
- e.BACKSLASH_ESCAPE,
4570
- a,
4571
- s,
4572
- o
4573
- ]
4574
- },
4575
- {
4576
- begin: /([fF][rR]|[rR][fF]|[fF])"""/,
4577
- end: /"""/,
4578
- contains: [
4579
- e.BACKSLASH_ESCAPE,
4580
- a,
4581
- s,
4582
- o
4583
- ]
4584
- },
4585
- {
4586
- begin: /([uU]|[rR])'/,
4587
- end: /'/,
4588
- relevance: 10
4589
- },
4590
- {
4591
- begin: /([uU]|[rR])"/,
4592
- end: /"/,
4593
- relevance: 10
4594
- },
4595
- {
4596
- begin: /([bB]|[bB][rR]|[rR][bB])'/,
4597
- end: /'/
4598
- },
4599
- {
4600
- begin: /([bB]|[bB][rR]|[rR][bB])"/,
4601
- end: /"/
4602
- },
4603
- {
4604
- begin: /([fF][rR]|[rR][fF]|[fF])'/,
4605
- end: /'/,
4606
- contains: [
4607
- e.BACKSLASH_ESCAPE,
4608
- s,
4609
- o
4610
- ]
4611
- },
4612
- {
4613
- begin: /([fF][rR]|[rR][fF]|[fF])"/,
4614
- end: /"/,
4615
- contains: [
4616
- e.BACKSLASH_ESCAPE,
4617
- s,
4618
- o
4619
- ]
4620
- },
4621
- e.APOS_STRING_MODE,
4622
- e.QUOTE_STRING_MODE
4623
- ]
4624
- }, l = "[0-9](_?[0-9])*", u = `(\\b(${l}))?\\.(${l})|\\b(${l})\\.`, d = `\\b|${r.join("|")}`, f = {
4625
- className: "number",
4626
- relevance: 0,
4627
- variants: [
4628
- { begin: `(\\b(${l})|(${u}))[eE][+-]?(${l})[jJ]?(?=${d})` },
4629
- { begin: `(${u})[jJ]?` },
4630
- { begin: `\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${d})` },
4631
- { begin: `\\b0[bB](_?[01])+[lL]?(?=${d})` },
4632
- { begin: `\\b0[oO](_?[0-7])+[lL]?(?=${d})` },
4633
- { begin: `\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${d})` },
4634
- { begin: `\\b(${l})[jJ](?=${d})` }
4635
- ]
4636
- }, p = {
4637
- className: "comment",
4638
- begin: t.lookahead(/# type:/),
4639
- end: /$/,
4640
- keywords: i,
4641
- contains: [{ begin: /# type:/ }, {
4642
- begin: /#/,
4643
- end: /\b\B/,
4644
- endsWithParent: !0
4645
- }]
4646
- }, m = {
4647
- className: "params",
4648
- variants: [{
4649
- className: "",
4650
- begin: /\(\s*\)/,
4651
- skip: !0
4652
- }, {
4653
- begin: /\(/,
4654
- end: /\)/,
4655
- excludeBegin: !0,
4656
- excludeEnd: !0,
4657
- keywords: i,
4658
- contains: [
4659
- "self",
4660
- a,
4661
- f,
4662
- c,
4663
- e.HASH_COMMENT_MODE
4664
- ]
4665
- }]
4666
- };
4667
- return o.contains = [
4668
- c,
4669
- f,
4670
- a
4671
- ], {
4672
- name: "Python",
4673
- aliases: [
4674
- "py",
4675
- "gyp",
4676
- "ipython"
4677
- ],
4678
- unicodeRegex: !0,
4679
- keywords: i,
4680
- illegal: /(<\/|\?)|=>/,
4681
- contains: [
4682
- a,
4683
- f,
4684
- {
4685
- scope: "variable.language",
4686
- match: /\bself\b/
4687
- },
4688
- {
4689
- beginKeywords: "if",
4690
- relevance: 0
4691
- },
4692
- {
4693
- match: /\bor\b/,
4694
- scope: "keyword"
4695
- },
4696
- c,
4697
- p,
4698
- e.HASH_COMMENT_MODE,
4699
- {
4700
- match: [
4701
- /\bdef/,
4702
- /\s+/,
4703
- n
4704
- ],
4705
- scope: {
4706
- 1: "keyword",
4707
- 3: "title.function"
4708
- },
4709
- contains: [m]
4710
- },
4711
- {
4712
- variants: [{ match: [
4713
- /\bclass/,
4714
- /\s+/,
4715
- n,
4716
- /\s*/,
4717
- /\(\s*/,
4718
- n,
4719
- /\s*\)/
4720
- ] }, { match: [
4721
- /\bclass/,
4722
- /\s+/,
4723
- n
4724
- ] }],
4725
- scope: {
4726
- 1: "keyword",
4727
- 3: "title.class",
4728
- 6: "title.class.inherited"
4729
- }
4730
- },
4731
- {
4732
- className: "meta",
4733
- begin: /^[\t ]*@/,
4734
- end: /(?=#)|$/,
4735
- contains: [
4736
- f,
4737
- m,
4738
- c
4739
- ]
4740
- }
4741
- ]
4742
- };
4743
- }
4744
- //#endregion
4745
- //#region src/components/cardRendering/CodeBlockRenderer.vue?vue&type=script&setup=true&lang.ts
4746
- var It = { class: "code-block-wrapper pa-2" }, Lt = {
4747
- key: 0,
4748
- class: "language-indicator"
4749
- }, Rt = /* @__PURE__ */ l({
4750
- __name: "CodeBlockRenderer",
4751
- props: {
4752
- code: {
4753
- type: String,
4754
- required: !0
4755
- },
4756
- language: {
4757
- type: String,
4758
- default: ""
4759
- }
4760
- },
4761
- setup(e) {
4762
- Q.registerLanguage("js", javascript$1), Q.registerLanguage("javascript", javascript$1), Q.registerLanguage("ts", typescript), Q.registerLanguage("typescript", typescript), Q.registerLanguage("css", css), Q.registerLanguage("html", xml), Q.registerLanguage("bash", bash), Q.registerLanguage("sh", bash), Q.registerLanguage("json", json), Q.registerLanguage("go", go), Q.registerLanguage("golang", go), Q.registerLanguage("python", python);
4763
- let t = u();
4764
- return t && t.appContext.app.component("highlightjs", pt.component), (t, n) => {
4765
- let a = x("highlightjs");
4766
- return v(), i("div", It, [e.language ? (v(), i("div", Lt, C(e.language), 1)) : r("", !0), s(a, {
4767
- language: e.language,
4768
- code: e.code
4769
- }, null, 8, ["language", "code"])]);
4770
- };
4771
- }
4772
- }), zt = { key: 0 }, Bt = { key: 0 }, Vt = { key: 0 }, Ht = {
4773
- key: 1,
4774
- class: "error--text"
4775
- }, Ut = { key: 1 }, Wt = { key: 2 }, Gt = { key: 1 }, Kt = { key: 1 }, qt = {
4776
- key: 0,
4777
- class: "text-h2"
4778
- }, Jt = {
4779
- key: 1,
4780
- class: "text-h3"
4781
- }, Yt = {
4782
- key: 2,
4783
- class: "text-h4"
4784
- }, Xt = { key: 3 }, Zt = { key: 4 }, Qt = { key: 5 }, $t = { key: 2 }, en = {
4785
- key: 3,
4786
- class: "text-h5"
4787
- }, tn = { key: 0 }, nn = ["href", "title"], rn = { key: 5 }, an = { key: 6 }, on = { key: 7 }, sn = ["src", "alt"], cn = { key: 9 }, ln = { key: 10 }, un = { key: 11 }, dn = ["align"], fn = ["innerHTML"], pn = ["innerHTML"], mn = { key: 16 }, hn = { key: 17 }, gn = { key: 18 }, _n = /* @__PURE__ */ F(/* @__PURE__ */ l({
4788
- __name: "MdTokenRenderer",
4789
- props: {
4790
- token: {
4791
- type: Object,
4792
- required: !0
4793
- },
4794
- last: {
4795
- type: Boolean,
4796
- required: !1,
4797
- default: !1
4798
- }
4799
- },
4800
- setup(t, { expose: o }) {
4801
- let s = f("markdownComponents", {}), c = {
4802
- fillIn: p(he),
4803
- ...s
4804
- };
4805
- function isComponent$1(e) {
4806
- return isComponent(e);
4807
- }
4808
- __name(isComponent$1, "isComponent");
4809
- function containsComponent$1(e) {
4810
- return containsComponent(e);
4811
- }
4812
- __name(containsComponent$1, "containsComponent");
4813
- function splitTextToken$1(e) {
4814
- return splitTextToken(e);
4815
- }
4816
- __name(splitTextToken$1, "splitTextToken");
4817
- function splitParagraphToken$1(e) {
4818
- return splitParagraphToken(e);
4819
- }
4820
- __name(splitParagraphToken$1, "splitParagraphToken");
4821
- function parsedComponent(e) {
4822
- let t = "";
4823
- "text" in e && typeof e.text == "string" ? t = e.text : "raw" in e && typeof e.raw == "string" && (t = e.raw);
4824
- let n = parseComponentSyntax(t);
4825
- return n ? {
4826
- is: n.componentName,
4827
- text: "",
4828
- props: n.props
4829
- } : {
4830
- is: "fillIn",
4831
- text: t,
4832
- props: {}
4833
- };
4834
- }
4835
- function getComponent(e) {
4836
- return c[e] || (console.warn(`[MarkdownRenderer] Unknown component: "${e}". Available components: ${Object.keys(c).join(", ")}`), null);
4837
- }
4838
- function decodeBasicEntities(e) {
4839
- return e.replace(/&#39;/g, "'").replace(/&quot;/g, "\"").replace(/&amp;/g, "&").replace(/&lt;/g, "<").replace(/&gt;/g, ">");
4840
- }
4841
- function isText(e) {
4842
- return e.inLink === void 0 && e.type === "text";
4843
- }
4844
- return o({
4845
- isComponent: isComponent$1,
4846
- containsComponent: containsComponent$1,
4847
- splitTextToken: splitTextToken$1,
4848
- splitParagraphToken: splitParagraphToken$1,
4849
- parsedComponent,
4850
- decodeBasicEntities,
4851
- isText,
4852
- components: c,
4853
- getComponent
4854
- }), (o, s) => {
4855
- let c = x("md-token-renderer", !0);
4856
- return isText(t.token) ? (v(), i("span", zt, [!t.token.tokens || t.token.tokens.length === 0 ? (v(), i("span", Bt, [isComponent$1(t.token) ? (v(), i("span", Vt, [!t.last && getComponent(parsedComponent(t.token).is) ? (v(), n(S(getComponent(parsedComponent(t.token).is)), m({
4857
- key: 0,
4858
- text: parsedComponent(t.token).text
4859
- }, parsedComponent(t.token).props), null, 16, ["text"])) : !t.last && !getComponent(parsedComponent(t.token).is) ? (v(), i("span", Ht, " [Unknown component: " + C(parsedComponent(t.token).is) + "] ", 1)) : r("", !0)])) : containsComponent$1(t.token) ? (v(), i("span", Ut, [(v(!0), i(e, null, b(splitTextToken$1(t.token), (e, t) => (v(), n(c, {
4860
- key: t,
4861
- token: e
4862
- }, null, 8, ["token"]))), 128))])) : (v(), i("span", Wt, C(decodeBasicEntities(t.token.text)), 1))])) : t.token.tokens && t.token.tokens.length !== 0 ? (v(), i("span", Gt, [(v(!0), i(e, null, b(t.token.tokens, (e, t) => (v(), n(c, {
4863
- key: t,
4864
- token: e
4865
- }, null, 8, ["token"]))), 128))])) : r("", !0)])) : t.token.type === "heading" ? (v(), i("span", Kt, [t.token.depth === 1 ? (v(), i("h1", qt, [(v(!0), i(e, null, b(t.token.tokens, (e, t) => (v(), n(c, {
4866
- key: t,
4867
- token: e
4868
- }, null, 8, ["token"]))), 128))])) : t.token.depth === 2 ? (v(), i("h2", Jt, [(v(!0), i(e, null, b(t.token.tokens, (e, t) => (v(), n(c, {
4869
- key: t,
4870
- token: e
4871
- }, null, 8, ["token"]))), 128))])) : t.token.depth === 3 ? (v(), i("h3", Yt, [(v(!0), i(e, null, b(t.token.tokens, (e, t) => (v(), n(c, {
4872
- key: t,
4873
- token: e
4874
- }, null, 8, ["token"]))), 128))])) : t.token.depth === 4 ? (v(), i("h4", Xt, [(v(!0), i(e, null, b(t.token.tokens, (e, t) => (v(), n(c, {
4875
- key: t,
4876
- token: e
4877
- }, null, 8, ["token"]))), 128))])) : t.token.depth === 5 ? (v(), i("h5", Zt, [(v(!0), i(e, null, b(t.token.tokens, (e, t) => (v(), n(c, {
4878
- key: t,
4879
- token: e
4880
- }, null, 8, ["token"]))), 128))])) : t.token.depth === 6 ? (v(), i("h6", Qt, [(v(!0), i(e, null, b(t.token.tokens, (e, t) => (v(), n(c, {
4881
- key: t,
4882
- token: e
4883
- }, null, 8, ["token"]))), 128))])) : r("", !0)])) : t.token.type === "strong" ? (v(), i("strong", $t, [(v(!0), i(e, null, b(t.token.tokens, (e, t) => (v(), n(c, {
4884
- key: t,
4885
- token: e
4886
- }, null, 8, ["token"]))), 128))])) : t.token.type === "paragraph" ? (v(), i("p", en, [containsComponent$1(t.token) ? (v(), i("span", tn, [(v(!0), i(e, null, b(splitParagraphToken$1(t.token), (e, r) => (v(), n(c, {
4887
- key: r,
4888
- token: e,
4889
- last: t.last && t.token.tokens.length === 1 && r === splitParagraphToken$1(t.token).length - 1
4890
- }, null, 8, ["token", "last"]))), 128))])) : (v(!0), i(e, { key: 1 }, b(t.token.tokens, (e, r) => (v(), n(c, {
4891
- key: r,
4892
- token: e,
4893
- last: t.last && t.token.tokens.length === 1
4894
- }, null, 8, ["token", "last"]))), 128))])) : t.token.type === "link" ? (v(), i("a", {
4895
- key: 4,
4896
- href: t.token.href,
4897
- title: t.token.title
4898
- }, [(v(!0), i(e, null, b(t.token.tokens, (e, t) => (v(), n(c, {
4899
- key: t,
4900
- token: e
4901
- }, null, 8, ["token"]))), 128))], 8, nn)) : t.token.type === "list" && t.token.ordered === !1 ? (v(), i("ul", rn, [(v(!0), i(e, null, b(t.token.items, (e, t) => (v(), n(c, {
4902
- key: t,
4903
- token: e
4904
- }, null, 8, ["token"]))), 128))])) : t.token.type === "list" && t.token.ordered === !0 ? (v(), i("ol", an, [(v(!0), i(e, null, b(t.token.items, (e, t) => (v(), n(c, {
4905
- key: t,
4906
- token: e
4907
- }, null, 8, ["token"]))), 128))])) : t.token.type === "list_item" ? (v(), i("li", on, [(v(!0), i(e, null, b(t.token.tokens, (e, t) => (v(), n(c, {
4908
- key: t,
4909
- token: e
4910
- }, null, 8, ["token"]))), 128))])) : t.token.type === "image" ? (v(), i("img", {
4911
- key: 8,
4912
- src: t.token.href,
4913
- alt: t.token.title
4914
- }, null, 8, sn)) : t.token.type === "hr" ? (v(), i("hr", cn)) : t.token.type === "br" ? (v(), i("br", ln)) : t.token.type === "del" ? (v(), i("del", un)) : t.token.type === "table" ? (v(), i("table", {
4915
- key: 12,
4916
- align: t.token.align
4917
- }, [a("thead", null, [(v(!0), i(e, null, b(t.token.header, (e, t) => (v(), i("th", { key: t }, C(e.text), 1))), 128))]), a("tbody", null, [(v(!0), i(e, null, b(t.token.rows, (t, n) => (v(), i("tr", { key: n }, [(v(!0), i(e, null, b(t, (e, t) => (v(), i("td", { key: t }, C(e.text), 1))), 128))]))), 128))])], 8, dn)) : t.token.type === "html" ? (v(), i("span", {
4918
- key: 13,
4919
- innerHTML: t.token.raw
4920
- }, null, 8, fn)) : t.token.type === "code" ? (v(), n(Rt, {
4921
- key: 14,
4922
- code: t.token.text,
4923
- language: t.token.lang
4924
- }, null, 8, ["code", "language"])) : t.token.type === "codespan" ? (v(), i("code", {
4925
- key: 15,
4926
- class: "codespan",
4927
- innerHTML: t.token.text
4928
- }, null, 8, pn)) : t.token.type === "blockquote" ? (v(), i("blockquote", mn, [(v(!0), i(e, null, b(t.token.tokens, (e, t) => (v(), n(c, {
4929
- key: t,
4930
- token: e
4931
- }, null, 8, ["token"]))), 128))])) : t.token.type === "escape" ? (v(), i("span", hn, C(t.token.text), 1)) : t.token.type === "em" ? (v(), i("em", gn, [(v(!0), i(e, null, b(t.token.tokens, (e, t) => (v(), n(c, {
4932
- key: t,
4933
- token: e
4934
- }, null, 8, ["token"]))), 128))])) : r("", !0);
4935
- };
4936
- }
4937
- }), [["__scopeId", "data-v-de3eebd6"]]), vn = l({
4938
- name: "MarkdownRenderer",
4939
- components: {
4940
- MdTokenRenderer: _n,
4941
- AudioAutoPlayer: dt
4942
- },
4943
- props: { md: {
4944
- type: String,
4945
- required: !0
4946
- } },
4947
- computed: { tokens() {
4948
- return lt(this.md);
4949
- } }
4950
- }), yn = /* @__PURE__ */ __exportAll({ default: () => bn });
4951
- function _sfc_render(t, a, o, s, c, l) {
4952
- let u = x("md-token-renderer"), d = x("audio-auto-player");
4953
- return v(), i("div", null, [(v(!0), i(e, null, b(t.tokens, (e, a) => (v(), i("span", { key: a }, [e.type ? (v(), n(u, {
4954
- key: 0,
4955
- token: e,
4956
- last: a === t.tokens.length - 1
4957
- }, null, 8, ["token", "last"])) : e.audio ? (v(), n(d, {
4958
- key: 1,
4959
- src: e.audio
4960
- }, null, 8, ["src"])) : r("", !0)]))), 128))]);
4961
- }
4962
- var bn = /* @__PURE__ */ F(vn, [["render", _sfc_render]]);
4963
- //#endregion
4964
- export { I as C, __name as E, useViewable as S, F as T, useCardPreviewModeStore as _, dt as a, isQuestionView as b, isInlineComponent as c, splitByDelimiters as d, splitParagraphToken as f, ce as g, fe as h, Rt as i, parseComponentSyntax as l, he as m, yn as n, containsComponent as o, splitTextToken as p, _n as r, isComponent as s, bn as t, parseComponentToken as u, getPinia as v, _defineProperty as w, useQuestionView as x, se as y };
4965
-
4966
- //# sourceMappingURL=MarkdownRenderer-U_iPiA2x.mjs.map