@kong-ui-public/entities-plugins 9.215.0 → 9.215.2

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 (90) hide show
  1. package/dist/entities-plugins.es.js +14007 -13883
  2. package/dist/entities-plugins.umd.js +163 -163
  3. package/dist/filler/cypress/index.js +1 -1
  4. package/dist/filler/field-walker-DWTkzht2.js +4883 -0
  5. package/dist/filler/playwright/index.js +1 -1
  6. package/dist/types/components/CustomPluginForm.vue.d.ts.map +1 -1
  7. package/dist/types/components/PluginCatalog.vue.d.ts.map +1 -1
  8. package/dist/types/components/PluginConfigCard.vue.d.ts.map +1 -1
  9. package/dist/types/components/PluginEntityForm.vue.d.ts.map +1 -1
  10. package/dist/types/components/PluginForm.vue.d.ts.map +1 -1
  11. package/dist/types/components/PluginList.vue.d.ts.map +1 -1
  12. package/dist/types/components/PluginSelect.vue.d.ts.map +1 -1
  13. package/dist/types/components/custom-plugins/DeleteCustomPluginSchemaModal.vue.d.ts.map +1 -1
  14. package/dist/types/components/custom-plugins/PluginCustomGrid.vue.d.ts.map +1 -1
  15. package/dist/types/components/fields/key-auth-identity-realms/Base.vue.d.ts.map +1 -1
  16. package/dist/types/components/fields/kong-identity/ConfigFormContent.vue.d.ts.map +1 -1
  17. package/dist/types/components/fields/kong-identity/KongIdentityField.vue.d.ts.map +1 -1
  18. package/dist/types/components/free-form/plugins/acl/ACLModeCard.vue.d.ts.map +1 -1
  19. package/dist/types/components/free-form/plugins/datakit/CodeEditor.vue.d.ts.map +1 -1
  20. package/dist/types/components/free-form/plugins/datakit/DatakitForm.vue.d.ts.map +1 -1
  21. package/dist/types/components/free-form/plugins/datakit/flow-editor/FlowCanvas.vue.d.ts.map +1 -1
  22. package/dist/types/components/free-form/plugins/datakit/flow-editor/FlowEditor.vue.d.ts.map +1 -1
  23. package/dist/types/components/free-form/plugins/datakit/flow-editor/FlowPanels.vue.d.ts.map +1 -1
  24. package/dist/types/components/free-form/plugins/datakit/flow-editor/VaultSecretPicker.vue.d.ts.map +1 -1
  25. package/dist/types/components/free-form/plugins/datakit/flow-editor/modal/ConflictModal.vue.d.ts.map +1 -1
  26. package/dist/types/components/free-form/plugins/datakit/flow-editor/modal/EditorContent.vue.d.ts.map +1 -1
  27. package/dist/types/components/free-form/plugins/datakit/flow-editor/modal/EditorMain.vue.d.ts.map +1 -1
  28. package/dist/types/components/free-form/plugins/datakit/flow-editor/modal/EditorModal.vue.d.ts.map +1 -1
  29. package/dist/types/components/free-form/plugins/datakit/flow-editor/modal/EditorNav.vue.d.ts.map +1 -1
  30. package/dist/types/components/free-form/plugins/datakit/flow-editor/node/FlowNode.vue.d.ts.map +1 -1
  31. package/dist/types/components/free-form/plugins/datakit/flow-editor/node/NodePropertiesPanel.vue.d.ts.map +1 -1
  32. package/dist/types/components/free-form/plugins/datakit/flow-editor/node-forms/InputsField.vue.d.ts.map +1 -1
  33. package/dist/types/components/free-form/plugins/datakit/flow-editor/node-forms/InputsMapField.vue.d.ts.map +1 -1
  34. package/dist/types/components/free-form/plugins/datakit/flow-editor/node-forms/InputsRecordField.vue.d.ts.map +1 -1
  35. package/dist/types/components/free-form/plugins/datakit/flow-editor/node-forms/NameField.vue.d.ts.map +1 -1
  36. package/dist/types/components/free-form/plugins/datakit/flow-editor/node-forms/NodeFormBranch.vue.d.ts.map +1 -1
  37. package/dist/types/components/free-form/plugins/datakit/flow-editor/node-forms/NodeFormCache.vue.d.ts.map +1 -1
  38. package/dist/types/components/free-form/plugins/datakit/flow-editor/node-forms/NodeFormCall.vue.d.ts.map +1 -1
  39. package/dist/types/components/free-form/plugins/datakit/flow-editor/node-forms/NodeFormExit.vue.d.ts.map +1 -1
  40. package/dist/types/components/free-form/plugins/datakit/flow-editor/node-forms/NodeFormJq.vue.d.ts.map +1 -1
  41. package/dist/types/components/free-form/plugins/datakit/flow-editor/node-forms/NodeFormJsonToXml.vue.d.ts.map +1 -1
  42. package/dist/types/components/free-form/plugins/datakit/flow-editor/node-forms/NodeFormJwtDecode.vue.d.ts.map +1 -1
  43. package/dist/types/components/free-form/plugins/datakit/flow-editor/node-forms/NodeFormJwtSign.vue.d.ts.map +1 -1
  44. package/dist/types/components/free-form/plugins/datakit/flow-editor/node-forms/NodeFormJwtVerify.vue.d.ts.map +1 -1
  45. package/dist/types/components/free-form/plugins/datakit/flow-editor/node-forms/NodeFormProperty.vue.d.ts.map +1 -1
  46. package/dist/types/components/free-form/plugins/datakit/flow-editor/node-forms/NodeFormResponse.vue.d.ts.map +1 -1
  47. package/dist/types/components/free-form/plugins/datakit/flow-editor/node-forms/NodeFormServiceRequest.vue.d.ts.map +1 -1
  48. package/dist/types/components/free-form/plugins/datakit/flow-editor/node-forms/NodeFormStatic.vue.d.ts.map +1 -1
  49. package/dist/types/components/free-form/plugins/datakit/flow-editor/node-forms/NodeFormXmlToJson.vue.d.ts.map +1 -1
  50. package/dist/types/components/free-form/plugins/datakit/flow-editor/node-forms/OutputValueField.vue.d.ts.map +1 -1
  51. package/dist/types/components/free-form/plugins/datakit/flow-editor/node-forms/PropertiesField.vue.d.ts.map +1 -1
  52. package/dist/types/components/free-form/plugins/datakit/flow-editor/side-panel/CacheField.vue.d.ts.map +1 -1
  53. package/dist/types/components/free-form/plugins/datakit/flow-editor/side-panel/NodePanel.vue.d.ts.map +1 -1
  54. package/dist/types/components/free-form/plugins/datakit/flow-editor/side-panel/ResourcesPanel.vue.d.ts.map +1 -1
  55. package/dist/types/components/free-form/plugins/datakit/flow-editor/side-panel/VaultField.vue.d.ts.map +1 -1
  56. package/dist/types/components/free-form/plugins/datakit/flow-editor/store/flow.d.ts +1 -1
  57. package/dist/types/components/free-form/plugins/datakit/flow-editor/store/flow.d.ts.map +1 -1
  58. package/dist/types/components/free-form/plugins/rate-limiting-advanced/RequestLimitsForm.vue.d.ts.map +1 -1
  59. package/dist/types/components/free-form/plugins/request-callout/CalloutsForm.vue.d.ts.map +1 -1
  60. package/dist/types/components/free-form/plugins/service-protection/RequestLimitsForm.vue.d.ts.map +1 -1
  61. package/dist/types/components/free-form/shared/ArrayField.vue.d.ts.map +1 -1
  62. package/dist/types/components/free-form/shared/BooleanField.vue.d.ts.map +1 -1
  63. package/dist/types/components/free-form/shared/CodeEditor.vue.d.ts.map +1 -1
  64. package/dist/types/components/free-form/shared/EnhancedInput.vue.d.ts.map +1 -1
  65. package/dist/types/components/free-form/shared/EnumField.vue.d.ts.map +1 -1
  66. package/dist/types/components/free-form/shared/Field.vue.d.ts.map +1 -1
  67. package/dist/types/components/free-form/shared/ForeignField.vue.d.ts.map +1 -1
  68. package/dist/types/components/free-form/shared/Form.vue.d.ts.map +1 -1
  69. package/dist/types/components/free-form/shared/JsonField.vue.d.ts.map +1 -1
  70. package/dist/types/components/free-form/shared/MapField.vue.d.ts.map +1 -1
  71. package/dist/types/components/free-form/shared/NumberField.vue.d.ts.map +1 -1
  72. package/dist/types/components/free-form/shared/ObjectField.vue.d.ts.map +1 -1
  73. package/dist/types/components/free-form/shared/RadioField.vue.d.ts.map +1 -1
  74. package/dist/types/components/free-form/shared/RedisSelector.vue.d.ts.map +1 -1
  75. package/dist/types/components/free-form/shared/ScopeEntityField.vue.d.ts.map +1 -1
  76. package/dist/types/components/free-form/shared/SlideTransition.vue.d.ts.map +1 -1
  77. package/dist/types/components/free-form/shared/StringArrayField.vue.d.ts.map +1 -1
  78. package/dist/types/components/free-form/shared/StringField.vue.d.ts.map +1 -1
  79. package/dist/types/components/free-form/shared/SwitchField.vue.d.ts.map +1 -1
  80. package/dist/types/components/free-form/shared/layout/PluginConfigurationForm.vue.d.ts.map +1 -1
  81. package/dist/types/components/free-form/shared/layout/StandardLayout.vue.d.ts.map +1 -1
  82. package/dist/types/components/select/PluginCatalogCard.vue.d.ts.map +1 -1
  83. package/dist/types/components/select/PluginCatalogGrid.vue.d.ts.map +1 -1
  84. package/dist/types/components/select/PluginCatalogGroup.vue.d.ts.map +1 -1
  85. package/dist/types/components/select/PluginCatalogListView.vue.d.ts.map +1 -1
  86. package/dist/types/components/select/PluginSelectCard.vue.d.ts.map +1 -1
  87. package/dist/types/components/select/PluginSelectGrid.vue.d.ts.map +1 -1
  88. package/dist/types/components/select/PluginSelectGroup.vue.d.ts.map +1 -1
  89. package/package.json +26 -26
  90. package/dist/filler/field-walker-BWTqU3dI.js +0 -3008
@@ -0,0 +1,4883 @@
1
+ var no = Object.defineProperty;
2
+ var ro = (t, e, n) => e in t ? no(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
+ var L = (t, e, n) => ro(t, typeof e != "symbol" ? e + "" : e, n);
4
+ import { get as hr, isEqual as on, omit as so, cloneDeep as ss, set as io, isFunction as is } from "lodash-es";
5
+ const Tc = {
6
+ // Common
7
+ field: (t) => `[data-testid="ff-${t}"]`,
8
+ label: (t) => `[data-testid="ff-label-${t}"]`,
9
+ // EnumField
10
+ selectTrigger: (t) => `[data-testid="ff-enum-${t}-items"]`,
11
+ multiSelectItem: (t) => `[data-testid="multiselect-item-${t}"]`,
12
+ selectItem: (t) => `[data-testid="select-item-${t}"]`,
13
+ // ArrayField
14
+ array: (t) => `[data-testid="ff-array-${t}"]`,
15
+ arrayTabContainer: (t) => `[data-appearance="tabs"][data-testid="ff-array-${t}"]`,
16
+ arrayBasicContainer: (t) => `[data-testid="ff-array-${t}"]:not([data-appearance="tabs"])`,
17
+ arrayTabs: (t) => `[data-testid="ff-array-tabs-${t}"]`,
18
+ arrayItem: (t, e) => `[data-testid="ff-array-item-${t}.${e}"]`,
19
+ arrayAddBtn: (t) => `[data-testid="ff-add-item-btn-${t}"]`,
20
+ arrayRemoveBtns: (t) => `[data-testid^="ff-array-remove-item-btn-${t}"]`,
21
+ arrayRemoveBtn: (t, e) => `[data-testid="ff-array-remove-item-btn-${t}.${e}"]`,
22
+ // ObjectField
23
+ object: (t) => `[data-testid="ff-object-${t}"]`,
24
+ objectToggleBtn: (t) => `[data-testid="ff-object-toggle-btn-${t}"]`,
25
+ objectSwitch: (t) => `[data-testid="ff-object-switch-${t}"]`,
26
+ objectContent: (t) => `[data-testid="ff-object-content-${t}"]`,
27
+ // MapField
28
+ map: (t) => `[data-testid="ff-map-${t}"]`,
29
+ mapContainer: (t, e) => `[data-testid="ff-map-container-${t}.${e}"]`,
30
+ mapKey: (t, e) => `[data-testid="ff-map-key-${t}.${e}"]`,
31
+ mapRemoveBtns: (t) => `[data-testid^="ff-map-remove-btn-${t}"]`,
32
+ mapRemoveBtn: (t, e) => `[data-testid="ff-map-remove-btn-${t}.${e}"]`,
33
+ mapAddBtn: (t) => `[data-testid="ff-map-add-btn-${t}"]`,
34
+ // StringArrayField
35
+ tag: (t) => `[data-testid="ff-tag-${t}"]`,
36
+ tagInput: (t) => `[data-testid="ff-tag-${t}"] input`,
37
+ // JsonField
38
+ json: (t) => `[data-testid="ff-json-${t}"]`
39
+ };
40
+ /**
41
+ * @vue/shared v3.5.35
42
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
43
+ * @license MIT
44
+ **/
45
+ // @__NO_SIDE_EFFECTS__
46
+ function oo(t) {
47
+ const e = /* @__PURE__ */ Object.create(null);
48
+ for (const n of t.split(",")) e[n] = 1;
49
+ return (n) => n in e;
50
+ }
51
+ const Pt = process.env.NODE_ENV !== "production" ? Object.freeze({}) : {};
52
+ process.env.NODE_ENV !== "production" && Object.freeze([]);
53
+ const ct = () => {
54
+ }, lo = (t) => t.charCodeAt(0) === 111 && t.charCodeAt(1) === 110 && // uppercase letter
55
+ (t.charCodeAt(2) > 122 || t.charCodeAt(2) < 97), ao = (t) => t.startsWith("onUpdate:"), Ie = Object.assign, co = Object.prototype.hasOwnProperty, rr = (t, e) => co.call(t, e), W = Array.isArray, ut = (t) => bn(t) === "[object Map]", uo = (t) => bn(t) === "[object Set]", Z = (t) => typeof t == "function", De = (t) => typeof t == "string", Ze = (t) => typeof t == "symbol", le = (t) => t !== null && typeof t == "object", fo = (t) => (le(t) || Z(t)) && Z(t.then) && Z(t.catch), po = Object.prototype.toString, bn = (t) => po.call(t), Ds = (t) => bn(t).slice(8, -1), ho = (t) => bn(t) === "[object Object]", yn = (t) => De(t) && t !== "NaN" && t[0] !== "-" && "" + parseInt(t, 10) === t, Cs = (t) => {
56
+ const e = /* @__PURE__ */ Object.create(null);
57
+ return (n) => e[n] || (e[n] = t(n));
58
+ }, Ms = Cs((t) => t.charAt(0).toUpperCase() + t.slice(1)), go = Cs(
59
+ (t) => t ? `on${Ms(t)}` : ""
60
+ ), Se = (t, e) => !Object.is(t, e);
61
+ let os;
62
+ const wn = () => os || (os = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {});
63
+ function gr(t) {
64
+ if (W(t)) {
65
+ const e = {};
66
+ for (let n = 0; n < t.length; n++) {
67
+ const r = t[n], s = De(r) ? yo(r) : gr(r);
68
+ if (s)
69
+ for (const i in s)
70
+ e[i] = s[i];
71
+ }
72
+ return e;
73
+ } else if (De(t) || le(t))
74
+ return t;
75
+ }
76
+ const mo = /;(?![^(]*\))/g, _o = /:([^]+)/, bo = /\/\*[^]*?\*\//g;
77
+ function yo(t) {
78
+ const e = {};
79
+ return t.replace(bo, "").split(mo).forEach((n) => {
80
+ if (n) {
81
+ const r = n.split(_o);
82
+ r.length > 1 && (e[r[0].trim()] = r[1].trim());
83
+ }
84
+ }), e;
85
+ }
86
+ function mr(t) {
87
+ let e = "";
88
+ if (De(t))
89
+ e = t;
90
+ else if (W(t))
91
+ for (let n = 0; n < t.length; n++) {
92
+ const r = mr(t[n]);
93
+ r && (e += r + " ");
94
+ }
95
+ else if (le(t))
96
+ for (const n in t)
97
+ t[n] && (e += n + " ");
98
+ return e.trim();
99
+ }
100
+ /**
101
+ * @vue/reactivity v3.5.35
102
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
103
+ * @license MIT
104
+ **/
105
+ function ve(t, ...e) {
106
+ console.warn(`[Vue warn] ${t}`, ...e);
107
+ }
108
+ let wo;
109
+ function Ps() {
110
+ return wo;
111
+ }
112
+ let M;
113
+ const Gn = /* @__PURE__ */ new WeakSet();
114
+ class Eo {
115
+ constructor(e) {
116
+ this.fn = e, this.deps = void 0, this.depsTail = void 0, this.flags = 5, this.next = void 0, this.cleanup = void 0, this.scheduler = void 0;
117
+ }
118
+ pause() {
119
+ this.flags |= 64;
120
+ }
121
+ resume() {
122
+ this.flags & 64 && (this.flags &= -65, Gn.has(this) && (Gn.delete(this), this.trigger()));
123
+ }
124
+ /**
125
+ * @internal
126
+ */
127
+ notify() {
128
+ this.flags & 2 && !(this.flags & 32) || this.flags & 8 || Ls(this);
129
+ }
130
+ run() {
131
+ if (!(this.flags & 1))
132
+ return this.fn();
133
+ this.flags |= 2, ls(this), zs(this);
134
+ const e = M, n = ye;
135
+ M = this, ye = !0;
136
+ try {
137
+ return this.fn();
138
+ } finally {
139
+ process.env.NODE_ENV !== "production" && M !== this && ve(
140
+ "Active effect was not restored correctly - this is likely a Vue internal bug."
141
+ ), js(this), M = e, ye = n, this.flags &= -3;
142
+ }
143
+ }
144
+ stop() {
145
+ if (this.flags & 1) {
146
+ for (let e = this.deps; e; e = e.nextDep)
147
+ yr(e);
148
+ this.deps = this.depsTail = void 0, ls(this), this.onStop && this.onStop(), this.flags &= -2;
149
+ }
150
+ }
151
+ trigger() {
152
+ this.flags & 64 ? Gn.add(this) : this.scheduler ? this.scheduler() : this.runIfDirty();
153
+ }
154
+ /**
155
+ * @internal
156
+ */
157
+ runIfDirty() {
158
+ sr(this) && this.run();
159
+ }
160
+ get dirty() {
161
+ return sr(this);
162
+ }
163
+ }
164
+ let $s = 0, It, Dt;
165
+ function Ls(t, e = !1) {
166
+ if (t.flags |= 8, e) {
167
+ t.next = Dt, Dt = t;
168
+ return;
169
+ }
170
+ t.next = It, It = t;
171
+ }
172
+ function _r() {
173
+ $s++;
174
+ }
175
+ function br() {
176
+ if (--$s > 0)
177
+ return;
178
+ if (Dt) {
179
+ let e = Dt;
180
+ for (Dt = void 0; e; ) {
181
+ const n = e.next;
182
+ e.next = void 0, e.flags &= -9, e = n;
183
+ }
184
+ }
185
+ let t;
186
+ for (; It; ) {
187
+ let e = It;
188
+ for (It = void 0; e; ) {
189
+ const n = e.next;
190
+ if (e.next = void 0, e.flags &= -9, e.flags & 1)
191
+ try {
192
+ e.trigger();
193
+ } catch (r) {
194
+ t || (t = r);
195
+ }
196
+ e = n;
197
+ }
198
+ }
199
+ if (t) throw t;
200
+ }
201
+ function zs(t) {
202
+ for (let e = t.deps; e; e = e.nextDep)
203
+ e.version = -1, e.prevActiveLink = e.dep.activeLink, e.dep.activeLink = e;
204
+ }
205
+ function js(t) {
206
+ let e, n = t.depsTail, r = n;
207
+ for (; r; ) {
208
+ const s = r.prevDep;
209
+ r.version === -1 ? (r === n && (n = s), yr(r), To(r)) : e = r, r.dep.activeLink = r.prevActiveLink, r.prevActiveLink = void 0, r = s;
210
+ }
211
+ t.deps = e, t.depsTail = n;
212
+ }
213
+ function sr(t) {
214
+ for (let e = t.deps; e; e = e.nextDep)
215
+ if (e.dep.version !== e.version || e.dep.computed && (Fs(e.dep.computed) || e.dep.version !== e.version))
216
+ return !0;
217
+ return !!t._dirty;
218
+ }
219
+ function Fs(t) {
220
+ if (t.flags & 4 && !(t.flags & 16) || (t.flags &= -17, t.globalVersion === $t) || (t.globalVersion = $t, !t.isSSR && t.flags & 128 && (!t.deps && !t._dirty || !sr(t))))
221
+ return;
222
+ t.flags |= 2;
223
+ const e = t.dep, n = M, r = ye;
224
+ M = t, ye = !0;
225
+ try {
226
+ zs(t);
227
+ const s = t.fn(t._value);
228
+ (e.version === 0 || Se(s, t._value)) && (t.flags |= 128, t._value = s, e.version++);
229
+ } catch (s) {
230
+ throw e.version++, s;
231
+ } finally {
232
+ M = n, ye = r, js(t), t.flags &= -3;
233
+ }
234
+ }
235
+ function yr(t, e = !1) {
236
+ const { dep: n, prevSub: r, nextSub: s } = t;
237
+ if (r && (r.nextSub = s, t.prevSub = void 0), s && (s.prevSub = r, t.nextSub = void 0), process.env.NODE_ENV !== "production" && n.subsHead === t && (n.subsHead = s), n.subs === t && (n.subs = r, !r && n.computed)) {
238
+ n.computed.flags &= -5;
239
+ for (let i = n.computed.deps; i; i = i.nextDep)
240
+ yr(i, !0);
241
+ }
242
+ !e && !--n.sc && n.map && n.map.delete(n.key);
243
+ }
244
+ function To(t) {
245
+ const { prevDep: e, nextDep: n } = t;
246
+ e && (e.nextDep = n, t.prevDep = void 0), n && (n.prevDep = e, t.nextDep = void 0);
247
+ }
248
+ let ye = !0;
249
+ const Vs = [];
250
+ function mt() {
251
+ Vs.push(ye), ye = !1;
252
+ }
253
+ function _t() {
254
+ const t = Vs.pop();
255
+ ye = t === void 0 ? !0 : t;
256
+ }
257
+ function ls(t) {
258
+ const { cleanup: e } = t;
259
+ if (t.cleanup = void 0, e) {
260
+ const n = M;
261
+ M = void 0;
262
+ try {
263
+ e();
264
+ } finally {
265
+ M = n;
266
+ }
267
+ }
268
+ }
269
+ let $t = 0;
270
+ class xo {
271
+ constructor(e, n) {
272
+ this.sub = e, this.dep = n, this.version = n.version, this.nextDep = this.prevDep = this.nextSub = this.prevSub = this.prevActiveLink = void 0;
273
+ }
274
+ }
275
+ class wr {
276
+ // TODO isolatedDeclarations "__v_skip"
277
+ constructor(e) {
278
+ this.computed = e, this.version = 0, this.activeLink = void 0, this.subs = void 0, this.map = void 0, this.key = void 0, this.sc = 0, this.__v_skip = !0, process.env.NODE_ENV !== "production" && (this.subsHead = void 0);
279
+ }
280
+ track(e) {
281
+ if (!M || !ye || M === this.computed)
282
+ return;
283
+ let n = this.activeLink;
284
+ if (n === void 0 || n.sub !== M)
285
+ n = this.activeLink = new xo(M, this), M.deps ? (n.prevDep = M.depsTail, M.depsTail.nextDep = n, M.depsTail = n) : M.deps = M.depsTail = n, Hs(n);
286
+ else if (n.version === -1 && (n.version = this.version, n.nextDep)) {
287
+ const r = n.nextDep;
288
+ r.prevDep = n.prevDep, n.prevDep && (n.prevDep.nextDep = r), n.prevDep = M.depsTail, n.nextDep = void 0, M.depsTail.nextDep = n, M.depsTail = n, M.deps === n && (M.deps = r);
289
+ }
290
+ return process.env.NODE_ENV !== "production" && M.onTrack && M.onTrack(
291
+ Ie(
292
+ {
293
+ effect: M
294
+ },
295
+ e
296
+ )
297
+ ), n;
298
+ }
299
+ trigger(e) {
300
+ this.version++, $t++, this.notify(e);
301
+ }
302
+ notify(e) {
303
+ _r();
304
+ try {
305
+ if (process.env.NODE_ENV !== "production")
306
+ for (let n = this.subsHead; n; n = n.nextSub)
307
+ n.sub.onTrigger && !(n.sub.flags & 8) && n.sub.onTrigger(
308
+ Ie(
309
+ {
310
+ effect: n.sub
311
+ },
312
+ e
313
+ )
314
+ );
315
+ for (let n = this.subs; n; n = n.prevSub)
316
+ n.sub.notify() && n.sub.dep.notify();
317
+ } finally {
318
+ br();
319
+ }
320
+ }
321
+ }
322
+ function Hs(t) {
323
+ if (t.dep.sc++, t.sub.flags & 4) {
324
+ const e = t.dep.computed;
325
+ if (e && !t.dep.subs) {
326
+ e.flags |= 20;
327
+ for (let r = e.deps; r; r = r.nextDep)
328
+ Hs(r);
329
+ }
330
+ const n = t.dep.subs;
331
+ n !== t && (t.prevSub = n, n && (n.nextSub = t)), process.env.NODE_ENV !== "production" && t.dep.subsHead === void 0 && (t.dep.subsHead = t), t.dep.subs = t;
332
+ }
333
+ }
334
+ const an = /* @__PURE__ */ new WeakMap(), Ke = /* @__PURE__ */ Symbol(
335
+ process.env.NODE_ENV !== "production" ? "Object iterate" : ""
336
+ ), ir = /* @__PURE__ */ Symbol(
337
+ process.env.NODE_ENV !== "production" ? "Map keys iterate" : ""
338
+ ), Lt = /* @__PURE__ */ Symbol(
339
+ process.env.NODE_ENV !== "production" ? "Array iterate" : ""
340
+ );
341
+ function Q(t, e, n) {
342
+ if (ye && M) {
343
+ let r = an.get(t);
344
+ r || an.set(t, r = /* @__PURE__ */ new Map());
345
+ let s = r.get(n);
346
+ s || (r.set(n, s = new wr()), s.map = r, s.key = n), process.env.NODE_ENV !== "production" ? s.track({
347
+ target: t,
348
+ type: e,
349
+ key: n
350
+ }) : s.track();
351
+ }
352
+ }
353
+ function Ve(t, e, n, r, s, i) {
354
+ const o = an.get(t);
355
+ if (!o) {
356
+ $t++;
357
+ return;
358
+ }
359
+ const a = (c) => {
360
+ c && (process.env.NODE_ENV !== "production" ? c.trigger({
361
+ target: t,
362
+ type: e,
363
+ key: n,
364
+ newValue: r,
365
+ oldValue: s,
366
+ oldTarget: i
367
+ }) : c.trigger());
368
+ };
369
+ if (_r(), e === "clear")
370
+ o.forEach(a);
371
+ else {
372
+ const c = W(t), p = c && yn(n);
373
+ if (c && n === "length") {
374
+ const d = Number(r);
375
+ o.forEach((u, h) => {
376
+ (h === "length" || h === Lt || !Ze(h) && h >= d) && a(u);
377
+ });
378
+ } else
379
+ switch ((n !== void 0 || o.has(void 0)) && a(o.get(n)), p && a(o.get(Lt)), e) {
380
+ case "add":
381
+ c ? p && a(o.get("length")) : (a(o.get(Ke)), ut(t) && a(o.get(ir)));
382
+ break;
383
+ case "delete":
384
+ c || (a(o.get(Ke)), ut(t) && a(o.get(ir)));
385
+ break;
386
+ case "set":
387
+ ut(t) && a(o.get(Ke));
388
+ break;
389
+ }
390
+ }
391
+ br();
392
+ }
393
+ function ko(t, e) {
394
+ const n = an.get(t);
395
+ return n && n.get(e);
396
+ }
397
+ function st(t) {
398
+ const e = /* @__PURE__ */ N(t);
399
+ return e === t ? e : (Q(e, "iterate", Lt), /* @__PURE__ */ ae(t) ? e : e.map(Ce));
400
+ }
401
+ function Er(t) {
402
+ return Q(t = /* @__PURE__ */ N(t), "iterate", Lt), t;
403
+ }
404
+ function ke(t, e) {
405
+ return /* @__PURE__ */ Ae(t) ? jt(/* @__PURE__ */ ft(t) ? Ce(e) : e) : Ce(e);
406
+ }
407
+ const So = {
408
+ __proto__: null,
409
+ [Symbol.iterator]() {
410
+ return qn(this, Symbol.iterator, (t) => ke(this, t));
411
+ },
412
+ concat(...t) {
413
+ return st(this).concat(
414
+ ...t.map((e) => W(e) ? st(e) : e)
415
+ );
416
+ },
417
+ entries() {
418
+ return qn(this, "entries", (t) => (t[1] = ke(this, t[1]), t));
419
+ },
420
+ every(t, e) {
421
+ return Oe(this, "every", t, e, void 0, arguments);
422
+ },
423
+ filter(t, e) {
424
+ return Oe(
425
+ this,
426
+ "filter",
427
+ t,
428
+ e,
429
+ (n) => n.map((r) => ke(this, r)),
430
+ arguments
431
+ );
432
+ },
433
+ find(t, e) {
434
+ return Oe(
435
+ this,
436
+ "find",
437
+ t,
438
+ e,
439
+ (n) => ke(this, n),
440
+ arguments
441
+ );
442
+ },
443
+ findIndex(t, e) {
444
+ return Oe(this, "findIndex", t, e, void 0, arguments);
445
+ },
446
+ findLast(t, e) {
447
+ return Oe(
448
+ this,
449
+ "findLast",
450
+ t,
451
+ e,
452
+ (n) => ke(this, n),
453
+ arguments
454
+ );
455
+ },
456
+ findLastIndex(t, e) {
457
+ return Oe(this, "findLastIndex", t, e, void 0, arguments);
458
+ },
459
+ // flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement
460
+ forEach(t, e) {
461
+ return Oe(this, "forEach", t, e, void 0, arguments);
462
+ },
463
+ includes(...t) {
464
+ return Kn(this, "includes", t);
465
+ },
466
+ indexOf(...t) {
467
+ return Kn(this, "indexOf", t);
468
+ },
469
+ join(t) {
470
+ return st(this).join(t);
471
+ },
472
+ // keys() iterator only reads `length`, no optimization required
473
+ lastIndexOf(...t) {
474
+ return Kn(this, "lastIndexOf", t);
475
+ },
476
+ map(t, e) {
477
+ return Oe(this, "map", t, e, void 0, arguments);
478
+ },
479
+ pop() {
480
+ return kt(this, "pop");
481
+ },
482
+ push(...t) {
483
+ return kt(this, "push", t);
484
+ },
485
+ reduce(t, ...e) {
486
+ return as(this, "reduce", t, e);
487
+ },
488
+ reduceRight(t, ...e) {
489
+ return as(this, "reduceRight", t, e);
490
+ },
491
+ shift() {
492
+ return kt(this, "shift");
493
+ },
494
+ // slice could use ARRAY_ITERATE but also seems to beg for range tracking
495
+ some(t, e) {
496
+ return Oe(this, "some", t, e, void 0, arguments);
497
+ },
498
+ splice(...t) {
499
+ return kt(this, "splice", t);
500
+ },
501
+ toReversed() {
502
+ return st(this).toReversed();
503
+ },
504
+ toSorted(t) {
505
+ return st(this).toSorted(t);
506
+ },
507
+ toSpliced(...t) {
508
+ return st(this).toSpliced(...t);
509
+ },
510
+ unshift(...t) {
511
+ return kt(this, "unshift", t);
512
+ },
513
+ values() {
514
+ return qn(this, "values", (t) => ke(this, t));
515
+ }
516
+ };
517
+ function qn(t, e, n) {
518
+ const r = Er(t), s = r[e]();
519
+ return r !== t && !/* @__PURE__ */ ae(t) && (s._next = s.next, s.next = () => {
520
+ const i = s._next();
521
+ return i.done || (i.value = n(i.value)), i;
522
+ }), s;
523
+ }
524
+ const vo = Array.prototype;
525
+ function Oe(t, e, n, r, s, i) {
526
+ const o = Er(t), a = o !== t && !/* @__PURE__ */ ae(t), c = o[e];
527
+ if (c !== vo[e]) {
528
+ const u = c.apply(t, i);
529
+ return a ? Ce(u) : u;
530
+ }
531
+ let p = n;
532
+ o !== t && (a ? p = function(u, h) {
533
+ return n.call(this, ke(t, u), h, t);
534
+ } : n.length > 2 && (p = function(u, h) {
535
+ return n.call(this, u, h, t);
536
+ }));
537
+ const d = c.call(o, p, r);
538
+ return a && s ? s(d) : d;
539
+ }
540
+ function as(t, e, n, r) {
541
+ const s = Er(t), i = s !== t && !/* @__PURE__ */ ae(t);
542
+ let o = n, a = !1;
543
+ s !== t && (i ? (a = r.length === 0, o = function(p, d, u) {
544
+ return a && (a = !1, p = ke(t, p)), n.call(this, p, ke(t, d), u, t);
545
+ }) : n.length > 3 && (o = function(p, d, u) {
546
+ return n.call(this, p, d, u, t);
547
+ }));
548
+ const c = s[e](o, ...r);
549
+ return a ? ke(t, c) : c;
550
+ }
551
+ function Kn(t, e, n) {
552
+ const r = /* @__PURE__ */ N(t);
553
+ Q(r, "iterate", Lt);
554
+ const s = r[e](...n);
555
+ return (s === -1 || s === !1) && /* @__PURE__ */ zt(n[0]) ? (n[0] = /* @__PURE__ */ N(n[0]), r[e](...n)) : s;
556
+ }
557
+ function kt(t, e, n = []) {
558
+ mt(), _r();
559
+ const r = (/* @__PURE__ */ N(t))[e].apply(t, n);
560
+ return br(), _t(), r;
561
+ }
562
+ const Ao = /* @__PURE__ */ oo("__proto__,__v_isRef,__isVue"), Us = new Set(
563
+ /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((t) => t !== "arguments" && t !== "caller").map((t) => Symbol[t]).filter(Ze)
564
+ );
565
+ function Ro(t) {
566
+ Ze(t) || (t = String(t));
567
+ const e = /* @__PURE__ */ N(this);
568
+ return Q(e, "has", t), e.hasOwnProperty(t);
569
+ }
570
+ class Bs {
571
+ constructor(e = !1, n = !1) {
572
+ this._isReadonly = e, this._isShallow = n;
573
+ }
574
+ get(e, n, r) {
575
+ if (n === "__v_skip") return e.__v_skip;
576
+ const s = this._isReadonly, i = this._isShallow;
577
+ if (n === "__v_isReactive")
578
+ return !s;
579
+ if (n === "__v_isReadonly")
580
+ return s;
581
+ if (n === "__v_isShallow")
582
+ return i;
583
+ if (n === "__v_raw")
584
+ return r === (s ? i ? zo : qs : i ? Lo : Gs).get(e) || // receiver is not the reactive proxy, but has the same prototype
585
+ // this means the receiver is a user proxy of the reactive proxy
586
+ Object.getPrototypeOf(e) === Object.getPrototypeOf(r) ? e : void 0;
587
+ const o = W(e);
588
+ if (!s) {
589
+ let c;
590
+ if (o && (c = So[n]))
591
+ return c;
592
+ if (n === "hasOwnProperty")
593
+ return Ro;
594
+ }
595
+ const a = Reflect.get(
596
+ e,
597
+ n,
598
+ // if this is a proxy wrapping a ref, return methods using the raw ref
599
+ // as receiver so that we don't have to call `toRaw` on the ref in all
600
+ // its class methods
601
+ /* @__PURE__ */ ee(e) ? e : r
602
+ );
603
+ if ((Ze(n) ? Us.has(n) : Ao(n)) || (s || Q(e, "get", n), i))
604
+ return a;
605
+ if (/* @__PURE__ */ ee(a)) {
606
+ const c = o && yn(n) ? a : a.value;
607
+ return s && le(c) ? /* @__PURE__ */ cn(c) : c;
608
+ }
609
+ return le(a) ? s ? /* @__PURE__ */ cn(a) : /* @__PURE__ */ En(a) : a;
610
+ }
611
+ }
612
+ class Oo extends Bs {
613
+ constructor(e = !1) {
614
+ super(!1, e);
615
+ }
616
+ set(e, n, r, s) {
617
+ let i = e[n];
618
+ const o = W(e) && yn(n);
619
+ if (!this._isShallow) {
620
+ const p = /* @__PURE__ */ Ae(i);
621
+ if (!/* @__PURE__ */ ae(r) && !/* @__PURE__ */ Ae(r) && (i = /* @__PURE__ */ N(i), r = /* @__PURE__ */ N(r)), !o && /* @__PURE__ */ ee(i) && !/* @__PURE__ */ ee(r))
622
+ return p ? (process.env.NODE_ENV !== "production" && ve(
623
+ `Set operation on key "${String(n)}" failed: target is readonly.`,
624
+ e[n]
625
+ ), !0) : (i.value = r, !0);
626
+ }
627
+ const a = o ? Number(n) < e.length : rr(e, n), c = Reflect.set(
628
+ e,
629
+ n,
630
+ r,
631
+ /* @__PURE__ */ ee(e) ? e : s
632
+ );
633
+ return e === /* @__PURE__ */ N(s) && (a ? Se(r, i) && Ve(e, "set", n, r, i) : Ve(e, "add", n, r)), c;
634
+ }
635
+ deleteProperty(e, n) {
636
+ const r = rr(e, n), s = e[n], i = Reflect.deleteProperty(e, n);
637
+ return i && r && Ve(e, "delete", n, void 0, s), i;
638
+ }
639
+ has(e, n) {
640
+ const r = Reflect.has(e, n);
641
+ return (!Ze(n) || !Us.has(n)) && Q(e, "has", n), r;
642
+ }
643
+ ownKeys(e) {
644
+ return Q(
645
+ e,
646
+ "iterate",
647
+ W(e) ? "length" : Ke
648
+ ), Reflect.ownKeys(e);
649
+ }
650
+ }
651
+ class No extends Bs {
652
+ constructor(e = !1) {
653
+ super(!0, e);
654
+ }
655
+ set(e, n) {
656
+ return process.env.NODE_ENV !== "production" && ve(
657
+ `Set operation on key "${String(n)}" failed: target is readonly.`,
658
+ e
659
+ ), !0;
660
+ }
661
+ deleteProperty(e, n) {
662
+ return process.env.NODE_ENV !== "production" && ve(
663
+ `Delete operation on key "${String(n)}" failed: target is readonly.`,
664
+ e
665
+ ), !0;
666
+ }
667
+ }
668
+ const Io = /* @__PURE__ */ new Oo(), Do = /* @__PURE__ */ new No(), or = (t) => t, Jt = (t) => Reflect.getPrototypeOf(t);
669
+ function Co(t, e, n) {
670
+ return function(...r) {
671
+ const s = this.__v_raw, i = /* @__PURE__ */ N(s), o = ut(i), a = t === "entries" || t === Symbol.iterator && o, c = t === "keys" && o, p = s[t](...r), d = n ? or : e ? jt : Ce;
672
+ return !e && Q(
673
+ i,
674
+ "iterate",
675
+ c ? ir : Ke
676
+ ), Ie(
677
+ // inheriting all iterator properties
678
+ Object.create(p),
679
+ {
680
+ // iterator protocol
681
+ next() {
682
+ const { value: u, done: h } = p.next();
683
+ return h ? { value: u, done: h } : {
684
+ value: a ? [d(u[0]), d(u[1])] : d(u),
685
+ done: h
686
+ };
687
+ }
688
+ }
689
+ );
690
+ };
691
+ }
692
+ function en(t) {
693
+ return function(...e) {
694
+ if (process.env.NODE_ENV !== "production") {
695
+ const n = e[0] ? `on key "${e[0]}" ` : "";
696
+ ve(
697
+ `${Ms(t)} operation ${n}failed: target is readonly.`,
698
+ /* @__PURE__ */ N(this)
699
+ );
700
+ }
701
+ return t === "delete" ? !1 : t === "clear" ? void 0 : this;
702
+ };
703
+ }
704
+ function Mo(t, e) {
705
+ const n = {
706
+ get(s) {
707
+ const i = this.__v_raw, o = /* @__PURE__ */ N(i), a = /* @__PURE__ */ N(s);
708
+ t || (Se(s, a) && Q(o, "get", s), Q(o, "get", a));
709
+ const { has: c } = Jt(o), p = e ? or : t ? jt : Ce;
710
+ if (c.call(o, s))
711
+ return p(i.get(s));
712
+ if (c.call(o, a))
713
+ return p(i.get(a));
714
+ i !== o && i.get(s);
715
+ },
716
+ get size() {
717
+ const s = this.__v_raw;
718
+ return !t && Q(/* @__PURE__ */ N(s), "iterate", Ke), s.size;
719
+ },
720
+ has(s) {
721
+ const i = this.__v_raw, o = /* @__PURE__ */ N(i), a = /* @__PURE__ */ N(s);
722
+ return t || (Se(s, a) && Q(o, "has", s), Q(o, "has", a)), s === a ? i.has(s) : i.has(s) || i.has(a);
723
+ },
724
+ forEach(s, i) {
725
+ const o = this, a = o.__v_raw, c = /* @__PURE__ */ N(a), p = e ? or : t ? jt : Ce;
726
+ return !t && Q(c, "iterate", Ke), a.forEach((d, u) => s.call(i, p(d), p(u), o));
727
+ }
728
+ };
729
+ return Ie(
730
+ n,
731
+ t ? {
732
+ add: en("add"),
733
+ set: en("set"),
734
+ delete: en("delete"),
735
+ clear: en("clear")
736
+ } : {
737
+ add(s) {
738
+ const i = /* @__PURE__ */ N(this), o = Jt(i), a = /* @__PURE__ */ N(s), c = !e && !/* @__PURE__ */ ae(s) && !/* @__PURE__ */ Ae(s) ? a : s;
739
+ return o.has.call(i, c) || Se(s, c) && o.has.call(i, s) || Se(a, c) && o.has.call(i, a) || (i.add(c), Ve(i, "add", c, c)), this;
740
+ },
741
+ set(s, i) {
742
+ !e && !/* @__PURE__ */ ae(i) && !/* @__PURE__ */ Ae(i) && (i = /* @__PURE__ */ N(i));
743
+ const o = /* @__PURE__ */ N(this), { has: a, get: c } = Jt(o);
744
+ let p = a.call(o, s);
745
+ p ? process.env.NODE_ENV !== "production" && cs(o, a, s) : (s = /* @__PURE__ */ N(s), p = a.call(o, s));
746
+ const d = c.call(o, s);
747
+ return o.set(s, i), p ? Se(i, d) && Ve(o, "set", s, i, d) : Ve(o, "add", s, i), this;
748
+ },
749
+ delete(s) {
750
+ const i = /* @__PURE__ */ N(this), { has: o, get: a } = Jt(i);
751
+ let c = o.call(i, s);
752
+ c ? process.env.NODE_ENV !== "production" && cs(i, o, s) : (s = /* @__PURE__ */ N(s), c = o.call(i, s));
753
+ const p = a ? a.call(i, s) : void 0, d = i.delete(s);
754
+ return c && Ve(i, "delete", s, void 0, p), d;
755
+ },
756
+ clear() {
757
+ const s = /* @__PURE__ */ N(this), i = s.size !== 0, o = process.env.NODE_ENV !== "production" ? ut(s) ? new Map(s) : new Set(s) : void 0, a = s.clear();
758
+ return i && Ve(
759
+ s,
760
+ "clear",
761
+ void 0,
762
+ void 0,
763
+ o
764
+ ), a;
765
+ }
766
+ }
767
+ ), [
768
+ "keys",
769
+ "values",
770
+ "entries",
771
+ Symbol.iterator
772
+ ].forEach((s) => {
773
+ n[s] = Co(s, t, e);
774
+ }), n;
775
+ }
776
+ function Ws(t, e) {
777
+ const n = Mo(t, e);
778
+ return (r, s, i) => s === "__v_isReactive" ? !t : s === "__v_isReadonly" ? t : s === "__v_raw" ? r : Reflect.get(
779
+ rr(n, s) && s in r ? n : r,
780
+ s,
781
+ i
782
+ );
783
+ }
784
+ const Po = {
785
+ get: /* @__PURE__ */ Ws(!1, !1)
786
+ }, $o = {
787
+ get: /* @__PURE__ */ Ws(!0, !1)
788
+ };
789
+ function cs(t, e, n) {
790
+ const r = /* @__PURE__ */ N(n);
791
+ if (r !== n && e.call(t, r)) {
792
+ const s = Ds(t);
793
+ ve(
794
+ `Reactive ${s} contains both the raw and reactive versions of the same object${s === "Map" ? " as keys" : ""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`
795
+ );
796
+ }
797
+ }
798
+ const Gs = /* @__PURE__ */ new WeakMap(), Lo = /* @__PURE__ */ new WeakMap(), qs = /* @__PURE__ */ new WeakMap(), zo = /* @__PURE__ */ new WeakMap();
799
+ function jo(t) {
800
+ switch (t) {
801
+ case "Object":
802
+ case "Array":
803
+ return 1;
804
+ case "Map":
805
+ case "Set":
806
+ case "WeakMap":
807
+ case "WeakSet":
808
+ return 2;
809
+ default:
810
+ return 0;
811
+ }
812
+ }
813
+ // @__NO_SIDE_EFFECTS__
814
+ function En(t) {
815
+ return /* @__PURE__ */ Ae(t) ? t : Ks(
816
+ t,
817
+ !1,
818
+ Io,
819
+ Po,
820
+ Gs
821
+ );
822
+ }
823
+ // @__NO_SIDE_EFFECTS__
824
+ function cn(t) {
825
+ return Ks(
826
+ t,
827
+ !0,
828
+ Do,
829
+ $o,
830
+ qs
831
+ );
832
+ }
833
+ function Ks(t, e, n, r, s) {
834
+ if (!le(t))
835
+ return process.env.NODE_ENV !== "production" && ve(
836
+ `value cannot be made ${e ? "readonly" : "reactive"}: ${String(
837
+ t
838
+ )}`
839
+ ), t;
840
+ if (t.__v_raw && !(e && t.__v_isReactive) || t.__v_skip || !Object.isExtensible(t))
841
+ return t;
842
+ const i = s.get(t);
843
+ if (i)
844
+ return i;
845
+ const o = jo(Ds(t));
846
+ if (o === 0)
847
+ return t;
848
+ const a = new Proxy(
849
+ t,
850
+ o === 2 ? r : n
851
+ );
852
+ return s.set(t, a), a;
853
+ }
854
+ // @__NO_SIDE_EFFECTS__
855
+ function ft(t) {
856
+ return /* @__PURE__ */ Ae(t) ? /* @__PURE__ */ ft(t.__v_raw) : !!(t && t.__v_isReactive);
857
+ }
858
+ // @__NO_SIDE_EFFECTS__
859
+ function Ae(t) {
860
+ return !!(t && t.__v_isReadonly);
861
+ }
862
+ // @__NO_SIDE_EFFECTS__
863
+ function ae(t) {
864
+ return !!(t && t.__v_isShallow);
865
+ }
866
+ // @__NO_SIDE_EFFECTS__
867
+ function zt(t) {
868
+ return t ? !!t.__v_raw : !1;
869
+ }
870
+ // @__NO_SIDE_EFFECTS__
871
+ function N(t) {
872
+ const e = t && t.__v_raw;
873
+ return e ? /* @__PURE__ */ N(e) : t;
874
+ }
875
+ const Ce = (t) => le(t) ? /* @__PURE__ */ En(t) : t, jt = (t) => le(t) ? /* @__PURE__ */ cn(t) : t;
876
+ // @__NO_SIDE_EFFECTS__
877
+ function ee(t) {
878
+ return t ? t.__v_isRef === !0 : !1;
879
+ }
880
+ // @__NO_SIDE_EFFECTS__
881
+ function lr(t) {
882
+ return Fo(t, !1);
883
+ }
884
+ function Fo(t, e) {
885
+ return /* @__PURE__ */ ee(t) ? t : new Vo(t, e);
886
+ }
887
+ class Vo {
888
+ constructor(e, n) {
889
+ this.dep = new wr(), this.__v_isRef = !0, this.__v_isShallow = !1, this._rawValue = n ? e : /* @__PURE__ */ N(e), this._value = n ? e : Ce(e), this.__v_isShallow = n;
890
+ }
891
+ get value() {
892
+ return process.env.NODE_ENV !== "production" ? this.dep.track({
893
+ target: this,
894
+ type: "get",
895
+ key: "value"
896
+ }) : this.dep.track(), this._value;
897
+ }
898
+ set value(e) {
899
+ const n = this._rawValue, r = this.__v_isShallow || /* @__PURE__ */ ae(e) || /* @__PURE__ */ Ae(e);
900
+ e = r ? e : /* @__PURE__ */ N(e), Se(e, n) && (this._rawValue = e, this._value = r ? e : Ce(e), process.env.NODE_ENV !== "production" ? this.dep.trigger({
901
+ target: this,
902
+ type: "set",
903
+ key: "value",
904
+ newValue: e,
905
+ oldValue: n
906
+ }) : this.dep.trigger());
907
+ }
908
+ }
909
+ function Ys(t) {
910
+ return /* @__PURE__ */ ee(t) ? t.value : t;
911
+ }
912
+ function ce(t) {
913
+ return Z(t) ? t() : Ys(t);
914
+ }
915
+ class Ho {
916
+ constructor(e, n, r) {
917
+ this._object = e, this._defaultValue = r, this.__v_isRef = !0, this._value = void 0, this._key = Ze(n) ? n : String(n), this._raw = /* @__PURE__ */ N(e);
918
+ let s = !0, i = e;
919
+ if (!W(e) || Ze(this._key) || !yn(this._key))
920
+ do
921
+ s = !/* @__PURE__ */ zt(i) || /* @__PURE__ */ ae(i);
922
+ while (s && (i = i.__v_raw));
923
+ this._shallow = s;
924
+ }
925
+ get value() {
926
+ let e = this._object[this._key];
927
+ return this._shallow && (e = Ys(e)), this._value = e === void 0 ? this._defaultValue : e;
928
+ }
929
+ set value(e) {
930
+ if (this._shallow && /* @__PURE__ */ ee(this._raw[this._key])) {
931
+ const n = this._object[this._key];
932
+ if (/* @__PURE__ */ ee(n)) {
933
+ n.value = e;
934
+ return;
935
+ }
936
+ }
937
+ this._object[this._key] = e;
938
+ }
939
+ get dep() {
940
+ return ko(this._raw, this._key);
941
+ }
942
+ }
943
+ class Uo {
944
+ constructor(e) {
945
+ this._getter = e, this.__v_isRef = !0, this.__v_isReadonly = !0, this._value = void 0;
946
+ }
947
+ get value() {
948
+ return this._value = this._getter();
949
+ }
950
+ }
951
+ // @__NO_SIDE_EFFECTS__
952
+ function Bo(t, e, n) {
953
+ return /* @__PURE__ */ ee(t) ? t : Z(t) ? new Uo(t) : le(t) && arguments.length > 1 ? Wo(t, e, n) : /* @__PURE__ */ lr(t);
954
+ }
955
+ function Wo(t, e, n) {
956
+ return new Ho(t, e, n);
957
+ }
958
+ class Go {
959
+ constructor(e, n, r) {
960
+ this.fn = e, this.setter = n, this._value = void 0, this.dep = new wr(this), this.__v_isRef = !0, this.deps = void 0, this.depsTail = void 0, this.flags = 16, this.globalVersion = $t - 1, this.next = void 0, this.effect = this, this.__v_isReadonly = !n, this.isSSR = r;
961
+ }
962
+ /**
963
+ * @internal
964
+ */
965
+ notify() {
966
+ if (this.flags |= 16, !(this.flags & 8) && // avoid infinite self recursion
967
+ M !== this)
968
+ return Ls(this, !0), !0;
969
+ process.env.NODE_ENV;
970
+ }
971
+ get value() {
972
+ const e = process.env.NODE_ENV !== "production" ? this.dep.track({
973
+ target: this,
974
+ type: "get",
975
+ key: "value"
976
+ }) : this.dep.track();
977
+ return Fs(this), e && (e.version = this.dep.version), this._value;
978
+ }
979
+ set value(e) {
980
+ this.setter ? this.setter(e) : process.env.NODE_ENV !== "production" && ve("Write operation failed: computed value is readonly");
981
+ }
982
+ }
983
+ // @__NO_SIDE_EFFECTS__
984
+ function qo(t, e, n = !1) {
985
+ let r, s;
986
+ Z(t) ? r = t : (r = t.get, s = t.set);
987
+ const i = new Go(r, s, n);
988
+ return process.env.NODE_ENV, i;
989
+ }
990
+ const tn = {}, un = /* @__PURE__ */ new WeakMap();
991
+ let qe;
992
+ function Ko(t, e = !1, n = qe) {
993
+ if (n) {
994
+ let r = un.get(n);
995
+ r || un.set(n, r = []), r.push(t);
996
+ } else process.env.NODE_ENV !== "production" && !e && ve(
997
+ "onWatcherCleanup() was called when there was no active watcher to associate with."
998
+ );
999
+ }
1000
+ function Yo(t, e, n = Pt) {
1001
+ const { immediate: r, deep: s, once: i, scheduler: o, augmentJob: a, call: c } = n, p = (w) => {
1002
+ (n.onWarn || ve)(
1003
+ "Invalid watch source: ",
1004
+ w,
1005
+ "A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types."
1006
+ );
1007
+ }, d = (w) => s ? w : /* @__PURE__ */ ae(w) || s === !1 || s === 0 ? He(w, 1) : He(w);
1008
+ let u, h, g, m, b = !1, x = !1;
1009
+ if (/* @__PURE__ */ ee(t) ? (h = () => t.value, b = /* @__PURE__ */ ae(t)) : /* @__PURE__ */ ft(t) ? (h = () => d(t), b = !0) : W(t) ? (x = !0, b = t.some((w) => /* @__PURE__ */ ft(w) || /* @__PURE__ */ ae(w)), h = () => t.map((w) => {
1010
+ if (/* @__PURE__ */ ee(w))
1011
+ return w.value;
1012
+ if (/* @__PURE__ */ ft(w))
1013
+ return d(w);
1014
+ if (Z(w))
1015
+ return c ? c(w, 2) : w();
1016
+ process.env.NODE_ENV !== "production" && p(w);
1017
+ })) : Z(t) ? e ? h = c ? () => c(t, 2) : t : h = () => {
1018
+ if (g) {
1019
+ mt();
1020
+ try {
1021
+ g();
1022
+ } finally {
1023
+ _t();
1024
+ }
1025
+ }
1026
+ const w = qe;
1027
+ qe = u;
1028
+ try {
1029
+ return c ? c(t, 3, [m]) : t(m);
1030
+ } finally {
1031
+ qe = w;
1032
+ }
1033
+ } : (h = ct, process.env.NODE_ENV !== "production" && p(t)), e && s) {
1034
+ const w = h, T = s === !0 ? 1 / 0 : s;
1035
+ h = () => He(w(), T);
1036
+ }
1037
+ const A = () => {
1038
+ u.stop();
1039
+ };
1040
+ if (i && e) {
1041
+ const w = e;
1042
+ e = (...T) => {
1043
+ w(...T), A();
1044
+ };
1045
+ }
1046
+ let R = x ? new Array(t.length).fill(tn) : tn;
1047
+ const S = (w) => {
1048
+ if (!(!(u.flags & 1) || !u.dirty && !w))
1049
+ if (e) {
1050
+ const T = u.run();
1051
+ if (s || b || (x ? T.some((k, v) => Se(k, R[v])) : Se(T, R))) {
1052
+ g && g();
1053
+ const k = qe;
1054
+ qe = u;
1055
+ try {
1056
+ const v = [
1057
+ T,
1058
+ // pass undefined as the old value when it's changed for the first time
1059
+ R === tn ? void 0 : x && R[0] === tn ? [] : R,
1060
+ m
1061
+ ];
1062
+ R = T, c ? c(e, 3, v) : (
1063
+ // @ts-expect-error
1064
+ e(...v)
1065
+ );
1066
+ } finally {
1067
+ qe = k;
1068
+ }
1069
+ }
1070
+ } else
1071
+ u.run();
1072
+ };
1073
+ return a && a(S), u = new Eo(h), u.scheduler = o ? () => o(S, !1) : S, m = (w) => Ko(w, !1, u), g = u.onStop = () => {
1074
+ const w = un.get(u);
1075
+ if (w) {
1076
+ if (c)
1077
+ c(w, 4);
1078
+ else
1079
+ for (const T of w) T();
1080
+ un.delete(u);
1081
+ }
1082
+ }, process.env.NODE_ENV !== "production" && (u.onTrack = n.onTrack, u.onTrigger = n.onTrigger), e ? r ? S(!0) : R = u.run() : o ? o(S.bind(null, !0), !0) : u.run(), A.pause = u.pause.bind(u), A.resume = u.resume.bind(u), A.stop = A, A;
1083
+ }
1084
+ function He(t, e = 1 / 0, n) {
1085
+ if (e <= 0 || !le(t) || t.__v_skip || (n = n || /* @__PURE__ */ new Map(), (n.get(t) || 0) >= e))
1086
+ return t;
1087
+ if (n.set(t, e), e--, /* @__PURE__ */ ee(t))
1088
+ He(t.value, e, n);
1089
+ else if (W(t))
1090
+ for (let r = 0; r < t.length; r++)
1091
+ He(t[r], e, n);
1092
+ else if (uo(t) || ut(t))
1093
+ t.forEach((r) => {
1094
+ He(r, e, n);
1095
+ });
1096
+ else if (ho(t)) {
1097
+ for (const r in t)
1098
+ He(t[r], e, n);
1099
+ for (const r of Object.getOwnPropertySymbols(t))
1100
+ Object.prototype.propertyIsEnumerable.call(t, r) && He(t[r], e, n);
1101
+ }
1102
+ return t;
1103
+ }
1104
+ /**
1105
+ * @vue/runtime-core v3.5.35
1106
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
1107
+ * @license MIT
1108
+ **/
1109
+ const Ye = [];
1110
+ function Zo(t) {
1111
+ Ye.push(t);
1112
+ }
1113
+ function Xo() {
1114
+ Ye.pop();
1115
+ }
1116
+ let Yn = !1;
1117
+ function H(t, ...e) {
1118
+ if (Yn) return;
1119
+ Yn = !0, mt();
1120
+ const n = Ye.length ? Ye[Ye.length - 1].component : null, r = n && n.appContext.config.warnHandler, s = Qo();
1121
+ if (r)
1122
+ Tn(
1123
+ r,
1124
+ n,
1125
+ 11,
1126
+ [
1127
+ // eslint-disable-next-line no-restricted-syntax
1128
+ t + e.map((i) => {
1129
+ var o, a;
1130
+ return (a = (o = i.toString) == null ? void 0 : o.call(i)) != null ? a : JSON.stringify(i);
1131
+ }).join(""),
1132
+ n && n.proxy,
1133
+ s.map(
1134
+ ({ vnode: i }) => `at <${di(n, i.type)}>`
1135
+ ).join(`
1136
+ `),
1137
+ s
1138
+ ]
1139
+ );
1140
+ else {
1141
+ const i = [`[Vue warn]: ${t}`, ...e];
1142
+ s.length && i.push(`
1143
+ `, ...Jo(s)), console.warn(...i);
1144
+ }
1145
+ _t(), Yn = !1;
1146
+ }
1147
+ function Qo() {
1148
+ let t = Ye[Ye.length - 1];
1149
+ if (!t)
1150
+ return [];
1151
+ const e = [];
1152
+ for (; t; ) {
1153
+ const n = e[0];
1154
+ n && n.vnode === t ? n.recurseCount++ : e.push({
1155
+ vnode: t,
1156
+ recurseCount: 0
1157
+ });
1158
+ const r = t.component && t.component.parent;
1159
+ t = r && r.vnode;
1160
+ }
1161
+ return e;
1162
+ }
1163
+ function Jo(t) {
1164
+ const e = [];
1165
+ return t.forEach((n, r) => {
1166
+ e.push(...r === 0 ? [] : [`
1167
+ `], ...el(n));
1168
+ }), e;
1169
+ }
1170
+ function el({ vnode: t, recurseCount: e }) {
1171
+ const n = e > 0 ? `... (${e} recursive calls)` : "", r = t.component ? t.component.parent == null : !1, s = ` at <${di(
1172
+ t.component,
1173
+ t.type,
1174
+ r
1175
+ )}`, i = ">" + n;
1176
+ return t.props ? [s, ...tl(t.props), i] : [s + i];
1177
+ }
1178
+ function tl(t) {
1179
+ const e = [], n = Object.keys(t);
1180
+ return n.slice(0, 3).forEach((r) => {
1181
+ e.push(...Zs(r, t[r]));
1182
+ }), n.length > 3 && e.push(" ..."), e;
1183
+ }
1184
+ function Zs(t, e, n) {
1185
+ return De(e) ? (e = JSON.stringify(e), n ? e : [`${t}=${e}`]) : typeof e == "number" || typeof e == "boolean" || e == null ? n ? e : [`${t}=${e}`] : /* @__PURE__ */ ee(e) ? (e = Zs(t, /* @__PURE__ */ N(e.value), !0), n ? e : [`${t}=Ref<`, e, ">"]) : Z(e) ? [`${t}=fn${e.name ? `<${e.name}>` : ""}`] : (e = /* @__PURE__ */ N(e), n ? e : [`${t}=`, e]);
1186
+ }
1187
+ const Tr = {
1188
+ sp: "serverPrefetch hook",
1189
+ bc: "beforeCreate hook",
1190
+ c: "created hook",
1191
+ bm: "beforeMount hook",
1192
+ m: "mounted hook",
1193
+ bu: "beforeUpdate hook",
1194
+ u: "updated",
1195
+ bum: "beforeUnmount hook",
1196
+ um: "unmounted hook",
1197
+ a: "activated hook",
1198
+ da: "deactivated hook",
1199
+ ec: "errorCaptured hook",
1200
+ rtc: "renderTracked hook",
1201
+ rtg: "renderTriggered hook",
1202
+ 0: "setup function",
1203
+ 1: "render function",
1204
+ 2: "watcher getter",
1205
+ 3: "watcher callback",
1206
+ 4: "watcher cleanup function",
1207
+ 5: "native event handler",
1208
+ 6: "component event handler",
1209
+ 7: "vnode hook",
1210
+ 8: "directive hook",
1211
+ 9: "transition hook",
1212
+ 10: "app errorHandler",
1213
+ 11: "app warnHandler",
1214
+ 12: "ref function",
1215
+ 13: "async component loader",
1216
+ 14: "scheduler flush",
1217
+ 15: "component update",
1218
+ 16: "app unmount cleanup function"
1219
+ };
1220
+ function Tn(t, e, n, r) {
1221
+ try {
1222
+ return r ? t(...r) : t();
1223
+ } catch (s) {
1224
+ kr(s, e, n);
1225
+ }
1226
+ }
1227
+ function xr(t, e, n, r) {
1228
+ if (Z(t)) {
1229
+ const s = Tn(t, e, n, r);
1230
+ return s && fo(s) && s.catch((i) => {
1231
+ kr(i, e, n);
1232
+ }), s;
1233
+ }
1234
+ if (W(t)) {
1235
+ const s = [];
1236
+ for (let i = 0; i < t.length; i++)
1237
+ s.push(xr(t[i], e, n, r));
1238
+ return s;
1239
+ } else process.env.NODE_ENV !== "production" && H(
1240
+ `Invalid value type passed to callWithAsyncErrorHandling(): ${typeof t}`
1241
+ );
1242
+ }
1243
+ function kr(t, e, n, r = !0) {
1244
+ const s = e ? e.vnode : null, { errorHandler: i, throwUnhandledErrorInProduction: o } = e && e.appContext.config || Pt;
1245
+ if (e) {
1246
+ let a = e.parent;
1247
+ const c = e.proxy, p = process.env.NODE_ENV !== "production" ? Tr[n] : `https://vuejs.org/error-reference/#runtime-${n}`;
1248
+ for (; a; ) {
1249
+ const d = a.ec;
1250
+ if (d) {
1251
+ for (let u = 0; u < d.length; u++)
1252
+ if (d[u](t, c, p) === !1)
1253
+ return;
1254
+ }
1255
+ a = a.parent;
1256
+ }
1257
+ if (i) {
1258
+ mt(), Tn(i, null, 10, [
1259
+ t,
1260
+ c,
1261
+ p
1262
+ ]), _t();
1263
+ return;
1264
+ }
1265
+ }
1266
+ nl(t, n, s, r, o);
1267
+ }
1268
+ function nl(t, e, n, r = !0, s = !1) {
1269
+ if (process.env.NODE_ENV !== "production") {
1270
+ const i = Tr[e];
1271
+ if (n && Zo(n), H(`Unhandled error${i ? ` during execution of ${i}` : ""}`), n && Xo(), r)
1272
+ throw t;
1273
+ console.error(t);
1274
+ } else {
1275
+ if (s)
1276
+ throw t;
1277
+ console.error(t);
1278
+ }
1279
+ }
1280
+ const he = [];
1281
+ let Ne = -1;
1282
+ const pt = [];
1283
+ let Fe = null, ot = 0;
1284
+ const rl = /* @__PURE__ */ Promise.resolve();
1285
+ let ar = null;
1286
+ const sl = 100;
1287
+ function il(t) {
1288
+ let e = Ne + 1, n = he.length;
1289
+ for (; e < n; ) {
1290
+ const r = e + n >>> 1, s = he[r], i = Ft(s);
1291
+ i < t || i === t && s.flags & 2 ? e = r + 1 : n = r;
1292
+ }
1293
+ return e;
1294
+ }
1295
+ function Xs(t) {
1296
+ if (!(t.flags & 1)) {
1297
+ const e = Ft(t), n = he[he.length - 1];
1298
+ !n || // fast path when the job id is larger than the tail
1299
+ !(t.flags & 2) && e >= Ft(n) ? he.push(t) : he.splice(il(e), 0, t), t.flags |= 1, Qs();
1300
+ }
1301
+ }
1302
+ function Qs() {
1303
+ ar || (ar = rl.then(ei));
1304
+ }
1305
+ function Js(t) {
1306
+ W(t) ? pt.push(...t) : Fe && t.id === -1 ? Fe.splice(ot + 1, 0, t) : t.flags & 1 || (pt.push(t), t.flags |= 1), Qs();
1307
+ }
1308
+ function ol(t) {
1309
+ if (pt.length) {
1310
+ const e = [...new Set(pt)].sort(
1311
+ (n, r) => Ft(n) - Ft(r)
1312
+ );
1313
+ if (pt.length = 0, Fe) {
1314
+ Fe.push(...e);
1315
+ return;
1316
+ }
1317
+ for (Fe = e, process.env.NODE_ENV !== "production" && (t = t || /* @__PURE__ */ new Map()), ot = 0; ot < Fe.length; ot++) {
1318
+ const n = Fe[ot];
1319
+ process.env.NODE_ENV !== "production" && ti(t, n) || (n.flags & 4 && (n.flags &= -2), n.flags & 8 || n(), n.flags &= -2);
1320
+ }
1321
+ Fe = null, ot = 0;
1322
+ }
1323
+ }
1324
+ const Ft = (t) => t.id == null ? t.flags & 2 ? -1 : 1 / 0 : t.id;
1325
+ function ei(t) {
1326
+ process.env.NODE_ENV !== "production" && (t = t || /* @__PURE__ */ new Map());
1327
+ const e = process.env.NODE_ENV !== "production" ? (n) => ti(t, n) : ct;
1328
+ try {
1329
+ for (Ne = 0; Ne < he.length; Ne++) {
1330
+ const n = he[Ne];
1331
+ if (n && !(n.flags & 8)) {
1332
+ if (process.env.NODE_ENV !== "production" && e(n))
1333
+ continue;
1334
+ n.flags & 4 && (n.flags &= -2), Tn(
1335
+ n,
1336
+ n.i,
1337
+ n.i ? 15 : 14
1338
+ ), n.flags & 4 || (n.flags &= -2);
1339
+ }
1340
+ }
1341
+ } finally {
1342
+ for (; Ne < he.length; Ne++) {
1343
+ const n = he[Ne];
1344
+ n && (n.flags &= -2);
1345
+ }
1346
+ Ne = -1, he.length = 0, ol(t), ar = null, (he.length || pt.length) && ei(t);
1347
+ }
1348
+ }
1349
+ function ti(t, e) {
1350
+ const n = t.get(e) || 0;
1351
+ if (n > sl) {
1352
+ const r = e.i, s = r && pi(r.type);
1353
+ return kr(
1354
+ `Maximum recursive updates exceeded${s ? ` in component <${s}>` : ""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,
1355
+ null,
1356
+ 10
1357
+ ), !0;
1358
+ }
1359
+ return t.set(e, n + 1), !1;
1360
+ }
1361
+ const Zn = /* @__PURE__ */ new Map();
1362
+ process.env.NODE_ENV !== "production" && (wn().__VUE_HMR_RUNTIME__ = {
1363
+ createRecord: Xn(ll),
1364
+ rerender: Xn(al),
1365
+ reload: Xn(cl)
1366
+ });
1367
+ const fn = /* @__PURE__ */ new Map();
1368
+ function ll(t, e) {
1369
+ return fn.has(t) ? !1 : (fn.set(t, {
1370
+ initialDef: pn(e),
1371
+ instances: /* @__PURE__ */ new Set()
1372
+ }), !0);
1373
+ }
1374
+ function pn(t) {
1375
+ return hi(t) ? t.__vccOpts : t;
1376
+ }
1377
+ function al(t, e) {
1378
+ const n = fn.get(t);
1379
+ n && (n.initialDef.render = e, [...n.instances].forEach((r) => {
1380
+ e && (r.render = e, pn(r.type).render = e), r.renderCache = [], r.job.flags & 8 || r.update();
1381
+ }));
1382
+ }
1383
+ function cl(t, e) {
1384
+ const n = fn.get(t);
1385
+ if (!n) return;
1386
+ e = pn(e), us(n.initialDef, e);
1387
+ const r = [...n.instances];
1388
+ for (let s = 0; s < r.length; s++) {
1389
+ const i = r[s], o = pn(i.type);
1390
+ let a = Zn.get(o);
1391
+ a || (o !== n.initialDef && us(o, e), Zn.set(o, a = /* @__PURE__ */ new Set())), a.add(i), i.appContext.propsCache.delete(i.type), i.appContext.emitsCache.delete(i.type), i.appContext.optionsCache.delete(i.type), i.ceReload ? (a.add(i), i.ceReload(e.styles), a.delete(i)) : i.parent ? Xs(() => {
1392
+ i.job.flags & 8 || (i.parent.update(), a.delete(i));
1393
+ }) : i.appContext.reload ? i.appContext.reload() : typeof window < "u" ? window.location.reload() : console.warn(
1394
+ "[HMR] Root or manually mounted instance modified. Full reload required."
1395
+ ), i.root.ce && i !== i.root && i.root.ce._removeChildStyle(o);
1396
+ }
1397
+ Js(() => {
1398
+ Zn.clear();
1399
+ });
1400
+ }
1401
+ function us(t, e) {
1402
+ Ie(t, e);
1403
+ for (const n in t)
1404
+ n !== "__file" && !(n in e) && delete t[n];
1405
+ }
1406
+ function Xn(t) {
1407
+ return (e, n) => {
1408
+ try {
1409
+ return t(e, n);
1410
+ } catch (r) {
1411
+ console.error(r), console.warn(
1412
+ "[HMR] Something went wrong during Vue component hot-reload. Full reload required."
1413
+ );
1414
+ }
1415
+ };
1416
+ }
1417
+ let lt, nn = [];
1418
+ function ni(t, e) {
1419
+ var n, r;
1420
+ lt = t, lt ? (lt.enabled = !0, nn.forEach(({ event: s, args: i }) => lt.emit(s, ...i)), nn = []) : /* handle late devtools injection - only do this if we are in an actual */ /* browser environment to avoid the timer handle stalling test runner exit */ /* (#4815) */ typeof window < "u" && // some envs mock window but not fully
1421
+ window.HTMLElement && // also exclude jsdom
1422
+ // eslint-disable-next-line no-restricted-syntax
1423
+ !((r = (n = window.navigator) == null ? void 0 : n.userAgent) != null && r.includes("jsdom")) ? ((e.__VUE_DEVTOOLS_HOOK_REPLAY__ = e.__VUE_DEVTOOLS_HOOK_REPLAY__ || []).push((i) => {
1424
+ ni(i, e);
1425
+ }), setTimeout(() => {
1426
+ lt || (e.__VUE_DEVTOOLS_HOOK_REPLAY__ = null, nn = []);
1427
+ }, 3e3)) : nn = [];
1428
+ }
1429
+ let Vt = null, ul = null;
1430
+ function ri(t, e) {
1431
+ if (process.env.NODE_ENV !== "production" && (!ue || ue.isMounted) && H("provide() can only be used inside setup()."), ue) {
1432
+ let n = ue.provides;
1433
+ const r = ue.parent && ue.parent.provides;
1434
+ r === n && (n = ue.provides = Object.create(r)), n[t] = e;
1435
+ }
1436
+ }
1437
+ function si(t, e, n = !1) {
1438
+ const r = bt();
1439
+ if (r || oi) {
1440
+ let s = r ? r.parent == null || r.ce ? r.vnode.appContext && r.vnode.appContext.provides : r.parent.provides : void 0;
1441
+ if (s && t in s)
1442
+ return s[t];
1443
+ if (arguments.length > 1)
1444
+ return n && Z(e) ? e.call(r && r.proxy) : e;
1445
+ process.env.NODE_ENV !== "production" && H(`injection "${String(t)}" not found.`);
1446
+ } else process.env.NODE_ENV !== "production" && H("inject() can only be used inside setup() or functional components.");
1447
+ }
1448
+ function fl() {
1449
+ return !!(bt() || oi);
1450
+ }
1451
+ const pl = /* @__PURE__ */ Symbol.for("v-scx"), dl = () => {
1452
+ {
1453
+ const t = si(pl);
1454
+ return t || process.env.NODE_ENV !== "production" && H(
1455
+ "Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build."
1456
+ ), t;
1457
+ }
1458
+ };
1459
+ function dn(t, e, n) {
1460
+ return process.env.NODE_ENV !== "production" && !Z(e) && H(
1461
+ "`watch(fn, options?)` signature has been moved to a separate API. Use `watchEffect(fn, options?)` instead. `watch` now only supports `watch(source, cb, options?) signature."
1462
+ ), hl(t, e, n);
1463
+ }
1464
+ function hl(t, e, n = Pt) {
1465
+ const { immediate: r, deep: s, flush: i, once: o } = n;
1466
+ process.env.NODE_ENV !== "production" && !e && (r !== void 0 && H(
1467
+ 'watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.'
1468
+ ), s !== void 0 && H(
1469
+ 'watch() "deep" option is only respected when using the watch(source, callback, options?) signature.'
1470
+ ), o !== void 0 && H(
1471
+ 'watch() "once" option is only respected when using the watch(source, callback, options?) signature.'
1472
+ ));
1473
+ const a = Ie({}, n);
1474
+ process.env.NODE_ENV !== "production" && (a.onWarn = H);
1475
+ const c = e && r || !e && i !== "post";
1476
+ let p;
1477
+ if (Ht) {
1478
+ if (i === "sync") {
1479
+ const g = dl();
1480
+ p = g.__watcherHandles || (g.__watcherHandles = []);
1481
+ } else if (!c) {
1482
+ const g = () => {
1483
+ };
1484
+ return g.stop = ct, g.resume = ct, g.pause = ct, g;
1485
+ }
1486
+ }
1487
+ const d = ue;
1488
+ a.call = (g, m, b) => xr(g, d, m, b);
1489
+ let u = !1;
1490
+ i === "post" ? a.scheduler = (g) => {
1491
+ kl(g, d && d.suspense);
1492
+ } : i !== "sync" && (u = !0, a.scheduler = (g, m) => {
1493
+ m ? g() : Xs(g);
1494
+ }), a.augmentJob = (g) => {
1495
+ e && (g.flags |= 4), u && (g.flags |= 2, d && (g.id = d.uid, g.i = d));
1496
+ };
1497
+ const h = Yo(t, e, a);
1498
+ return Ht && (p ? p.push(h) : c && h()), h;
1499
+ }
1500
+ const gl = (t) => t.__isTeleport;
1501
+ function ii(t, e) {
1502
+ t.shapeFlag & 6 && t.component ? (t.transition = e, ii(t.component.subTree, e)) : t.shapeFlag & 128 ? (t.ssContent.transition = e.clone(t.ssContent), t.ssFallback.transition = e.clone(t.ssFallback)) : t.transition = e;
1503
+ }
1504
+ wn().requestIdleCallback;
1505
+ wn().cancelIdleCallback;
1506
+ function ml(t, e, n = ue, r = !1) {
1507
+ if (n) {
1508
+ const s = n[t] || (n[t] = []), i = e.__weh || (e.__weh = (...o) => {
1509
+ mt();
1510
+ const a = $l(n), c = xr(e, n, t, o);
1511
+ return a(), _t(), c;
1512
+ });
1513
+ return r ? s.unshift(i) : s.push(i), i;
1514
+ } else if (process.env.NODE_ENV !== "production") {
1515
+ const s = go(Tr[t].replace(/ hook$/, ""));
1516
+ H(
1517
+ `${s} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.`
1518
+ );
1519
+ }
1520
+ }
1521
+ const _l = (t) => (e, n = ue) => {
1522
+ (!Ht || t === "sp") && ml(t, (...r) => e(...r), n);
1523
+ }, bl = _l(
1524
+ "bum"
1525
+ ), yl = /* @__PURE__ */ Symbol.for("v-ndc"), wl = {};
1526
+ process.env.NODE_ENV !== "production" && (wl.ownKeys = (t) => (H(
1527
+ "Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead."
1528
+ ), Reflect.ownKeys(t)));
1529
+ function El() {
1530
+ return Tl("useSlots").slots;
1531
+ }
1532
+ function Tl(t) {
1533
+ const e = bt();
1534
+ return process.env.NODE_ENV !== "production" && !e && H(`${t}() called without active instance.`), e.setupContext || (e.setupContext = zl(e));
1535
+ }
1536
+ let oi = null;
1537
+ const xl = {}, li = (t) => Object.getPrototypeOf(t) === xl, kl = vl, Sl = (t) => t.__isSuspense;
1538
+ function vl(t, e) {
1539
+ e && e.pendingBranch ? W(t) ? e.effects.push(...t) : e.effects.push(t) : Js(t);
1540
+ }
1541
+ const ai = /* @__PURE__ */ Symbol.for("v-fgt"), Al = /* @__PURE__ */ Symbol.for("v-txt"), Rl = /* @__PURE__ */ Symbol.for("v-cmt");
1542
+ function Ol(t) {
1543
+ return t ? t.__v_isVNode === !0 : !1;
1544
+ }
1545
+ const Nl = (...t) => ui(
1546
+ ...t
1547
+ ), ci = ({ key: t }) => t ?? null, ln = ({
1548
+ ref: t,
1549
+ ref_key: e,
1550
+ ref_for: n
1551
+ }) => (typeof t == "number" && (t = "" + t), t != null ? De(t) || /* @__PURE__ */ ee(t) || Z(t) ? { i: Vt, r: t, k: e, f: !!n } : t : null);
1552
+ function Il(t, e = null, n = null, r = 0, s = null, i = t === ai ? 0 : 1, o = !1, a = !1) {
1553
+ const c = {
1554
+ __v_isVNode: !0,
1555
+ __v_skip: !0,
1556
+ type: t,
1557
+ props: e,
1558
+ key: e && ci(e),
1559
+ ref: e && ln(e),
1560
+ scopeId: ul,
1561
+ slotScopeIds: null,
1562
+ children: n,
1563
+ component: null,
1564
+ suspense: null,
1565
+ ssContent: null,
1566
+ ssFallback: null,
1567
+ dirs: null,
1568
+ transition: null,
1569
+ el: null,
1570
+ anchor: null,
1571
+ target: null,
1572
+ targetStart: null,
1573
+ targetAnchor: null,
1574
+ staticCount: 0,
1575
+ shapeFlag: i,
1576
+ patchFlag: r,
1577
+ dynamicProps: s,
1578
+ dynamicChildren: null,
1579
+ appContext: null,
1580
+ ctx: Vt
1581
+ };
1582
+ return a ? (Sr(c, n), i & 128 && t.normalize(c)) : n && (c.shapeFlag |= De(n) ? 8 : 16), process.env.NODE_ENV !== "production" && c.key !== c.key && H("VNode created with invalid key (NaN). VNode type:", c.type), c;
1583
+ }
1584
+ const Dl = process.env.NODE_ENV !== "production" ? Nl : ui;
1585
+ function ui(t, e = null, n = null, r = 0, s = null, i = !1) {
1586
+ if ((!t || t === yl) && (process.env.NODE_ENV !== "production" && !t && H(`Invalid vnode type when creating vnode: ${t}.`), t = Rl), Ol(t)) {
1587
+ const a = hn(
1588
+ t,
1589
+ e,
1590
+ !0
1591
+ /* mergeRef: true */
1592
+ );
1593
+ return n && Sr(a, n), a.patchFlag = -2, a;
1594
+ }
1595
+ if (hi(t) && (t = t.__vccOpts), e) {
1596
+ e = Cl(e);
1597
+ let { class: a, style: c } = e;
1598
+ a && !De(a) && (e.class = mr(a)), le(c) && (/* @__PURE__ */ zt(c) && !W(c) && (c = Ie({}, c)), e.style = gr(c));
1599
+ }
1600
+ const o = De(t) ? 1 : Sl(t) ? 128 : gl(t) ? 64 : le(t) ? 4 : Z(t) ? 2 : 0;
1601
+ return process.env.NODE_ENV !== "production" && o & 4 && /* @__PURE__ */ zt(t) && (t = /* @__PURE__ */ N(t), H(
1602
+ "Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.",
1603
+ `
1604
+ Component that was made reactive: `,
1605
+ t
1606
+ )), Il(
1607
+ t,
1608
+ e,
1609
+ n,
1610
+ r,
1611
+ s,
1612
+ o,
1613
+ i,
1614
+ !0
1615
+ );
1616
+ }
1617
+ function Cl(t) {
1618
+ return t ? /* @__PURE__ */ zt(t) || li(t) ? Ie({}, t) : t : null;
1619
+ }
1620
+ function hn(t, e, n = !1, r = !1) {
1621
+ const { props: s, ref: i, patchFlag: o, children: a, transition: c } = t, p = e ? Pl(s || {}, e) : s, d = {
1622
+ __v_isVNode: !0,
1623
+ __v_skip: !0,
1624
+ type: t.type,
1625
+ props: p,
1626
+ key: p && ci(p),
1627
+ ref: e && e.ref ? (
1628
+ // #2078 in the case of <component :is="vnode" ref="extra"/>
1629
+ // if the vnode itself already has a ref, cloneVNode will need to merge
1630
+ // the refs so the single vnode can be set on multiple refs
1631
+ n && i ? W(i) ? i.concat(ln(e)) : [i, ln(e)] : ln(e)
1632
+ ) : i,
1633
+ scopeId: t.scopeId,
1634
+ slotScopeIds: t.slotScopeIds,
1635
+ children: process.env.NODE_ENV !== "production" && o === -1 && W(a) ? a.map(fi) : a,
1636
+ target: t.target,
1637
+ targetStart: t.targetStart,
1638
+ targetAnchor: t.targetAnchor,
1639
+ staticCount: t.staticCount,
1640
+ shapeFlag: t.shapeFlag,
1641
+ // if the vnode is cloned with extra props, we can no longer assume its
1642
+ // existing patch flag to be reliable and need to add the FULL_PROPS flag.
1643
+ // note: preserve flag for fragments since they use the flag for children
1644
+ // fast paths only.
1645
+ patchFlag: e && t.type !== ai ? o === -1 ? 16 : o | 16 : o,
1646
+ dynamicProps: t.dynamicProps,
1647
+ dynamicChildren: t.dynamicChildren,
1648
+ appContext: t.appContext,
1649
+ dirs: t.dirs,
1650
+ transition: c,
1651
+ // These should technically only be non-null on mounted VNodes. However,
1652
+ // they *should* be copied for kept-alive vnodes. So we just always copy
1653
+ // them since them being non-null during a mount doesn't affect the logic as
1654
+ // they will simply be overwritten.
1655
+ component: t.component,
1656
+ suspense: t.suspense,
1657
+ ssContent: t.ssContent && hn(t.ssContent),
1658
+ ssFallback: t.ssFallback && hn(t.ssFallback),
1659
+ placeholder: t.placeholder,
1660
+ el: t.el,
1661
+ anchor: t.anchor,
1662
+ ctx: t.ctx,
1663
+ ce: t.ce
1664
+ };
1665
+ return c && r && ii(
1666
+ d,
1667
+ c.clone(d)
1668
+ ), d;
1669
+ }
1670
+ function fi(t) {
1671
+ const e = hn(t);
1672
+ return W(t.children) && (e.children = t.children.map(fi)), e;
1673
+ }
1674
+ function Ml(t = " ", e = 0) {
1675
+ return Dl(Al, null, t, e);
1676
+ }
1677
+ function Sr(t, e) {
1678
+ let n = 0;
1679
+ const { shapeFlag: r } = t;
1680
+ if (e == null)
1681
+ e = null;
1682
+ else if (W(e))
1683
+ n = 16;
1684
+ else if (typeof e == "object")
1685
+ if (r & 65) {
1686
+ const s = e.default;
1687
+ s && (s._c && (s._d = !1), Sr(t, s()), s._c && (s._d = !0));
1688
+ return;
1689
+ } else
1690
+ n = 32, !e._ && !li(e) && (e._ctx = Vt);
1691
+ else Z(e) ? (e = { default: e, _ctx: Vt }, n = 32) : (e = String(e), r & 64 ? (n = 16, e = [Ml(e)]) : n = 8);
1692
+ t.children = e, t.shapeFlag |= n;
1693
+ }
1694
+ function Pl(...t) {
1695
+ const e = {};
1696
+ for (let n = 0; n < t.length; n++) {
1697
+ const r = t[n];
1698
+ for (const s in r)
1699
+ if (s === "class")
1700
+ e.class !== r.class && (e.class = mr([e.class, r.class]));
1701
+ else if (s === "style")
1702
+ e.style = gr([e.style, r.style]);
1703
+ else if (lo(s)) {
1704
+ const i = e[s], o = r[s];
1705
+ o && i !== o && !(W(i) && i.includes(o)) ? e[s] = i ? [].concat(i, o) : o : o == null && i == null && // mergeProps({ 'onUpdate:modelValue': undefined }) should not retain
1706
+ // the model listener.
1707
+ !ao(s) && (e[s] = o);
1708
+ } else s !== "" && (e[s] = r[s]);
1709
+ }
1710
+ return e;
1711
+ }
1712
+ let ue = null;
1713
+ const bt = () => ue || Vt;
1714
+ let cr;
1715
+ {
1716
+ const t = wn(), e = (n, r) => {
1717
+ let s;
1718
+ return (s = t[n]) || (s = t[n] = []), s.push(r), (i) => {
1719
+ s.length > 1 ? s.forEach((o) => o(i)) : s[0](i);
1720
+ };
1721
+ };
1722
+ cr = e(
1723
+ "__VUE_INSTANCE_SETTERS__",
1724
+ (n) => ue = n
1725
+ ), e(
1726
+ "__VUE_SSR_SETTERS__",
1727
+ (n) => Ht = n
1728
+ );
1729
+ }
1730
+ const $l = (t) => {
1731
+ const e = ue;
1732
+ return cr(t), t.scope.on(), () => {
1733
+ t.scope.off(), cr(e);
1734
+ };
1735
+ };
1736
+ let Ht = !1;
1737
+ const fs = process.env.NODE_ENV !== "production" ? {
1738
+ get(t, e) {
1739
+ return Q(t, "get", ""), t[e];
1740
+ },
1741
+ set() {
1742
+ return H("setupContext.attrs is readonly."), !1;
1743
+ },
1744
+ deleteProperty() {
1745
+ return H("setupContext.attrs is readonly."), !1;
1746
+ }
1747
+ } : {
1748
+ get(t, e) {
1749
+ return Q(t, "get", ""), t[e];
1750
+ }
1751
+ };
1752
+ function Ll(t) {
1753
+ return new Proxy(t.slots, {
1754
+ get(e, n) {
1755
+ return Q(t, "get", "$slots"), e[n];
1756
+ }
1757
+ });
1758
+ }
1759
+ function zl(t) {
1760
+ const e = (n) => {
1761
+ if (process.env.NODE_ENV !== "production" && (t.exposed && H("expose() should be called only once per setup()."), n != null)) {
1762
+ let r = typeof n;
1763
+ r === "object" && (W(n) ? r = "array" : /* @__PURE__ */ ee(n) && (r = "ref")), r !== "object" && H(
1764
+ `expose() should be passed a plain object, received ${r}.`
1765
+ );
1766
+ }
1767
+ t.exposed = n || {};
1768
+ };
1769
+ if (process.env.NODE_ENV !== "production") {
1770
+ let n, r;
1771
+ return Object.freeze({
1772
+ get attrs() {
1773
+ return n || (n = new Proxy(t.attrs, fs));
1774
+ },
1775
+ get slots() {
1776
+ return r || (r = Ll(t));
1777
+ },
1778
+ get emit() {
1779
+ return (s, ...i) => t.emit(s, ...i);
1780
+ },
1781
+ expose: e
1782
+ });
1783
+ } else
1784
+ return {
1785
+ attrs: new Proxy(t.attrs, fs),
1786
+ slots: t.slots,
1787
+ emit: t.emit,
1788
+ expose: e
1789
+ };
1790
+ }
1791
+ const jl = /(?:^|[-_])\w/g, Fl = (t) => t.replace(jl, (e) => e.toUpperCase()).replace(/[-_]/g, "");
1792
+ function pi(t, e = !0) {
1793
+ return Z(t) ? t.displayName || t.name : t.name || e && t.__name;
1794
+ }
1795
+ function di(t, e, n = !1) {
1796
+ let r = pi(e);
1797
+ if (!r && e.__file) {
1798
+ const s = e.__file.match(/([^/\\]+)\.\w+$/);
1799
+ s && (r = s[1]);
1800
+ }
1801
+ if (!r && t) {
1802
+ const s = (i) => {
1803
+ for (const o in i)
1804
+ if (i[o] === e)
1805
+ return o;
1806
+ };
1807
+ r = s(t.components) || t.parent && s(
1808
+ t.parent.type.components
1809
+ ) || s(t.appContext.components);
1810
+ }
1811
+ return r ? Fl(r) : n ? "App" : "Anonymous";
1812
+ }
1813
+ function hi(t) {
1814
+ return Z(t) && "__vccOpts" in t;
1815
+ }
1816
+ const ur = (t, e) => {
1817
+ const n = /* @__PURE__ */ qo(t, e, Ht);
1818
+ if (process.env.NODE_ENV !== "production") {
1819
+ const r = bt();
1820
+ r && r.appContext.config.warnRecursiveComputed && (n._warnRecursive = !0);
1821
+ }
1822
+ return n;
1823
+ };
1824
+ function Vl() {
1825
+ if (process.env.NODE_ENV === "production" || typeof window > "u")
1826
+ return;
1827
+ const t = { style: "color:#3ba776" }, e = { style: "color:#1677ff" }, n = { style: "color:#f5222d" }, r = { style: "color:#eb2f96" }, s = {
1828
+ __vue_custom_formatter: !0,
1829
+ header(u) {
1830
+ if (!le(u))
1831
+ return null;
1832
+ if (u.__isVue)
1833
+ return ["div", t, "VueInstance"];
1834
+ if (/* @__PURE__ */ ee(u)) {
1835
+ mt();
1836
+ const h = u.value;
1837
+ return _t(), [
1838
+ "div",
1839
+ {},
1840
+ ["span", t, d(u)],
1841
+ "<",
1842
+ a(h),
1843
+ ">"
1844
+ ];
1845
+ } else {
1846
+ if (/* @__PURE__ */ ft(u))
1847
+ return [
1848
+ "div",
1849
+ {},
1850
+ ["span", t, /* @__PURE__ */ ae(u) ? "ShallowReactive" : "Reactive"],
1851
+ "<",
1852
+ a(u),
1853
+ `>${/* @__PURE__ */ Ae(u) ? " (readonly)" : ""}`
1854
+ ];
1855
+ if (/* @__PURE__ */ Ae(u))
1856
+ return [
1857
+ "div",
1858
+ {},
1859
+ ["span", t, /* @__PURE__ */ ae(u) ? "ShallowReadonly" : "Readonly"],
1860
+ "<",
1861
+ a(u),
1862
+ ">"
1863
+ ];
1864
+ }
1865
+ return null;
1866
+ },
1867
+ hasBody(u) {
1868
+ return u && u.__isVue;
1869
+ },
1870
+ body(u) {
1871
+ if (u && u.__isVue)
1872
+ return [
1873
+ "div",
1874
+ {},
1875
+ ...i(u.$)
1876
+ ];
1877
+ }
1878
+ };
1879
+ function i(u) {
1880
+ const h = [];
1881
+ u.type.props && u.props && h.push(o("props", /* @__PURE__ */ N(u.props))), u.setupState !== Pt && h.push(o("setup", u.setupState)), u.data !== Pt && h.push(o("data", /* @__PURE__ */ N(u.data)));
1882
+ const g = c(u, "computed");
1883
+ g && h.push(o("computed", g));
1884
+ const m = c(u, "inject");
1885
+ return m && h.push(o("injected", m)), h.push([
1886
+ "div",
1887
+ {},
1888
+ [
1889
+ "span",
1890
+ {
1891
+ style: r.style + ";opacity:0.66"
1892
+ },
1893
+ "$ (internal): "
1894
+ ],
1895
+ ["object", { object: u }]
1896
+ ]), h;
1897
+ }
1898
+ function o(u, h) {
1899
+ return h = Ie({}, h), Object.keys(h).length ? [
1900
+ "div",
1901
+ { style: "line-height:1.25em;margin-bottom:0.6em" },
1902
+ [
1903
+ "div",
1904
+ {
1905
+ style: "color:#476582"
1906
+ },
1907
+ u
1908
+ ],
1909
+ [
1910
+ "div",
1911
+ {
1912
+ style: "padding-left:1.25em"
1913
+ },
1914
+ ...Object.keys(h).map((g) => [
1915
+ "div",
1916
+ {},
1917
+ ["span", r, g + ": "],
1918
+ a(h[g], !1)
1919
+ ])
1920
+ ]
1921
+ ] : ["span", {}];
1922
+ }
1923
+ function a(u, h = !0) {
1924
+ return typeof u == "number" ? ["span", e, u] : typeof u == "string" ? ["span", n, JSON.stringify(u)] : typeof u == "boolean" ? ["span", r, u] : le(u) ? ["object", { object: h ? /* @__PURE__ */ N(u) : u }] : ["span", n, String(u)];
1925
+ }
1926
+ function c(u, h) {
1927
+ const g = u.type;
1928
+ if (Z(g))
1929
+ return;
1930
+ const m = {};
1931
+ for (const b in u.ctx)
1932
+ p(g, b, h) && (m[b] = u.ctx[b]);
1933
+ return m;
1934
+ }
1935
+ function p(u, h, g) {
1936
+ const m = u[g];
1937
+ if (W(m) && m.includes(h) || le(m) && h in m || u.extends && p(u.extends, h, g) || u.mixins && u.mixins.some((b) => p(b, h, g)))
1938
+ return !0;
1939
+ }
1940
+ function d(u) {
1941
+ return /* @__PURE__ */ ae(u) ? "ShallowRef" : u.effect ? "ComputedRef" : "Ref";
1942
+ }
1943
+ window.devtoolsFormatters ? window.devtoolsFormatters.push(s) : window.devtoolsFormatters = [s];
1944
+ }
1945
+ process.env.NODE_ENV;
1946
+ process.env.NODE_ENV;
1947
+ process.env.NODE_ENV;
1948
+ /**
1949
+ * vue v3.5.35
1950
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
1951
+ * @license MIT
1952
+ **/
1953
+ function Hl() {
1954
+ Vl();
1955
+ }
1956
+ process.env.NODE_ENV !== "production" && Hl();
1957
+ function Ul(t) {
1958
+ return t.map((e) => ({ value: e, label: `${e}` }));
1959
+ }
1960
+ const gi = "*", vr = "#", dt = "$", xn = ".";
1961
+ function V(...t) {
1962
+ return t.join(xn);
1963
+ }
1964
+ function ht(t) {
1965
+ return t.split(xn).filter((e) => e !== "");
1966
+ }
1967
+ function Bl(t) {
1968
+ return t.startsWith(dt) && (t = V(...ht(t).slice(1))), t;
1969
+ }
1970
+ function Wl(t) {
1971
+ const e = ce(t);
1972
+ return e ? e.type === "set" && e.elements.type === "string" && !e.elements.one_of : !1;
1973
+ }
1974
+ function Gl(t) {
1975
+ return "one_of" in t && Array.isArray(t.one_of);
1976
+ }
1977
+ function xc(t) {
1978
+ return t.type === "set" && "elements" in t && "one_of" in t.elements;
1979
+ }
1980
+ const ql = Symbol("free-form-field-renderer-slots"), Kl = "free-form-field-renderers-slot";
1981
+ function Ar() {
1982
+ return {
1983
+ async: !1,
1984
+ breaks: !1,
1985
+ extensions: null,
1986
+ gfm: !0,
1987
+ hooks: null,
1988
+ pedantic: !1,
1989
+ renderer: null,
1990
+ silent: !1,
1991
+ tokenizer: null,
1992
+ walkTokens: null
1993
+ };
1994
+ }
1995
+ let Qe = Ar();
1996
+ function mi(t) {
1997
+ Qe = t;
1998
+ }
1999
+ const _i = /[&<>"']/, Yl = new RegExp(_i.source, "g"), bi = /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, Zl = new RegExp(bi.source, "g"), Xl = {
2000
+ "&": "&amp;",
2001
+ "<": "&lt;",
2002
+ ">": "&gt;",
2003
+ '"': "&quot;",
2004
+ "'": "&#39;"
2005
+ }, ps = (t) => Xl[t];
2006
+ function fe(t, e) {
2007
+ if (e) {
2008
+ if (_i.test(t))
2009
+ return t.replace(Yl, ps);
2010
+ } else if (bi.test(t))
2011
+ return t.replace(Zl, ps);
2012
+ return t;
2013
+ }
2014
+ const Ql = /(^|[^\[])\^/g;
2015
+ function $(t, e) {
2016
+ let n = typeof t == "string" ? t : t.source;
2017
+ e = e || "";
2018
+ const r = {
2019
+ replace: (s, i) => {
2020
+ let o = typeof i == "string" ? i : i.source;
2021
+ return o = o.replace(Ql, "$1"), n = n.replace(s, o), r;
2022
+ },
2023
+ getRegex: () => new RegExp(n, e)
2024
+ };
2025
+ return r;
2026
+ }
2027
+ function ds(t) {
2028
+ try {
2029
+ t = encodeURI(t).replace(/%25/g, "%");
2030
+ } catch {
2031
+ return null;
2032
+ }
2033
+ return t;
2034
+ }
2035
+ const Ct = { exec: () => null };
2036
+ function hs(t, e) {
2037
+ const n = t.replace(/\|/g, (i, o, a) => {
2038
+ let c = !1, p = o;
2039
+ for (; --p >= 0 && a[p] === "\\"; )
2040
+ c = !c;
2041
+ return c ? "|" : " |";
2042
+ }), r = n.split(/ \|/);
2043
+ let s = 0;
2044
+ if (r[0].trim() || r.shift(), r.length > 0 && !r[r.length - 1].trim() && r.pop(), e)
2045
+ if (r.length > e)
2046
+ r.splice(e);
2047
+ else
2048
+ for (; r.length < e; )
2049
+ r.push("");
2050
+ for (; s < r.length; s++)
2051
+ r[s] = r[s].trim().replace(/\\\|/g, "|");
2052
+ return r;
2053
+ }
2054
+ function St(t, e, n) {
2055
+ const r = t.length;
2056
+ if (r === 0)
2057
+ return "";
2058
+ let s = 0;
2059
+ for (; s < r && t.charAt(r - s - 1) === e; )
2060
+ s++;
2061
+ return t.slice(0, r - s);
2062
+ }
2063
+ function Jl(t, e) {
2064
+ if (t.indexOf(e[1]) === -1)
2065
+ return -1;
2066
+ let n = 0;
2067
+ for (let r = 0; r < t.length; r++)
2068
+ if (t[r] === "\\")
2069
+ r++;
2070
+ else if (t[r] === e[0])
2071
+ n++;
2072
+ else if (t[r] === e[1] && (n--, n < 0))
2073
+ return r;
2074
+ return -1;
2075
+ }
2076
+ function gs(t, e, n, r) {
2077
+ const s = e.href, i = e.title ? fe(e.title) : null, o = t[1].replace(/\\([\[\]])/g, "$1");
2078
+ if (t[0].charAt(0) !== "!") {
2079
+ r.state.inLink = !0;
2080
+ const a = {
2081
+ type: "link",
2082
+ raw: n,
2083
+ href: s,
2084
+ title: i,
2085
+ text: o,
2086
+ tokens: r.inlineTokens(o)
2087
+ };
2088
+ return r.state.inLink = !1, a;
2089
+ }
2090
+ return {
2091
+ type: "image",
2092
+ raw: n,
2093
+ href: s,
2094
+ title: i,
2095
+ text: fe(o)
2096
+ };
2097
+ }
2098
+ function ea(t, e) {
2099
+ const n = t.match(/^(\s+)(?:```)/);
2100
+ if (n === null)
2101
+ return e;
2102
+ const r = n[1];
2103
+ return e.split(`
2104
+ `).map((s) => {
2105
+ const i = s.match(/^\s+/);
2106
+ if (i === null)
2107
+ return s;
2108
+ const [o] = i;
2109
+ return o.length >= r.length ? s.slice(r.length) : s;
2110
+ }).join(`
2111
+ `);
2112
+ }
2113
+ class gn {
2114
+ // set by the lexer
2115
+ constructor(e) {
2116
+ L(this, "options");
2117
+ L(this, "rules");
2118
+ // set by the lexer
2119
+ L(this, "lexer");
2120
+ this.options = e || Qe;
2121
+ }
2122
+ space(e) {
2123
+ const n = this.rules.block.newline.exec(e);
2124
+ if (n && n[0].length > 0)
2125
+ return {
2126
+ type: "space",
2127
+ raw: n[0]
2128
+ };
2129
+ }
2130
+ code(e) {
2131
+ const n = this.rules.block.code.exec(e);
2132
+ if (n) {
2133
+ const r = n[0].replace(/^(?: {1,4}| {0,3}\t)/gm, "");
2134
+ return {
2135
+ type: "code",
2136
+ raw: n[0],
2137
+ codeBlockStyle: "indented",
2138
+ text: this.options.pedantic ? r : St(r, `
2139
+ `)
2140
+ };
2141
+ }
2142
+ }
2143
+ fences(e) {
2144
+ const n = this.rules.block.fences.exec(e);
2145
+ if (n) {
2146
+ const r = n[0], s = ea(r, n[3] || "");
2147
+ return {
2148
+ type: "code",
2149
+ raw: r,
2150
+ lang: n[2] ? n[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : n[2],
2151
+ text: s
2152
+ };
2153
+ }
2154
+ }
2155
+ heading(e) {
2156
+ const n = this.rules.block.heading.exec(e);
2157
+ if (n) {
2158
+ let r = n[2].trim();
2159
+ if (/#$/.test(r)) {
2160
+ const s = St(r, "#");
2161
+ (this.options.pedantic || !s || / $/.test(s)) && (r = s.trim());
2162
+ }
2163
+ return {
2164
+ type: "heading",
2165
+ raw: n[0],
2166
+ depth: n[1].length,
2167
+ text: r,
2168
+ tokens: this.lexer.inline(r)
2169
+ };
2170
+ }
2171
+ }
2172
+ hr(e) {
2173
+ const n = this.rules.block.hr.exec(e);
2174
+ if (n)
2175
+ return {
2176
+ type: "hr",
2177
+ raw: St(n[0], `
2178
+ `)
2179
+ };
2180
+ }
2181
+ blockquote(e) {
2182
+ const n = this.rules.block.blockquote.exec(e);
2183
+ if (n) {
2184
+ let r = St(n[0], `
2185
+ `).split(`
2186
+ `), s = "", i = "";
2187
+ const o = [];
2188
+ for (; r.length > 0; ) {
2189
+ let a = !1;
2190
+ const c = [];
2191
+ let p;
2192
+ for (p = 0; p < r.length; p++)
2193
+ if (/^ {0,3}>/.test(r[p]))
2194
+ c.push(r[p]), a = !0;
2195
+ else if (!a)
2196
+ c.push(r[p]);
2197
+ else
2198
+ break;
2199
+ r = r.slice(p);
2200
+ const d = c.join(`
2201
+ `), u = d.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g, `
2202
+ $1`).replace(/^ {0,3}>[ \t]?/gm, "");
2203
+ s = s ? `${s}
2204
+ ${d}` : d, i = i ? `${i}
2205
+ ${u}` : u;
2206
+ const h = this.lexer.state.top;
2207
+ if (this.lexer.state.top = !0, this.lexer.blockTokens(u, o, !0), this.lexer.state.top = h, r.length === 0)
2208
+ break;
2209
+ const g = o[o.length - 1];
2210
+ if ((g == null ? void 0 : g.type) === "code")
2211
+ break;
2212
+ if ((g == null ? void 0 : g.type) === "blockquote") {
2213
+ const m = g, b = m.raw + `
2214
+ ` + r.join(`
2215
+ `), x = this.blockquote(b);
2216
+ o[o.length - 1] = x, s = s.substring(0, s.length - m.raw.length) + x.raw, i = i.substring(0, i.length - m.text.length) + x.text;
2217
+ break;
2218
+ } else if ((g == null ? void 0 : g.type) === "list") {
2219
+ const m = g, b = m.raw + `
2220
+ ` + r.join(`
2221
+ `), x = this.list(b);
2222
+ o[o.length - 1] = x, s = s.substring(0, s.length - g.raw.length) + x.raw, i = i.substring(0, i.length - m.raw.length) + x.raw, r = b.substring(o[o.length - 1].raw.length).split(`
2223
+ `);
2224
+ continue;
2225
+ }
2226
+ }
2227
+ return {
2228
+ type: "blockquote",
2229
+ raw: s,
2230
+ tokens: o,
2231
+ text: i
2232
+ };
2233
+ }
2234
+ }
2235
+ list(e) {
2236
+ let n = this.rules.block.list.exec(e);
2237
+ if (n) {
2238
+ let r = n[1].trim();
2239
+ const s = r.length > 1, i = {
2240
+ type: "list",
2241
+ raw: "",
2242
+ ordered: s,
2243
+ start: s ? +r.slice(0, -1) : "",
2244
+ loose: !1,
2245
+ items: []
2246
+ };
2247
+ r = s ? `\\d{1,9}\\${r.slice(-1)}` : `\\${r}`, this.options.pedantic && (r = s ? r : "[*+-]");
2248
+ const o = new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`);
2249
+ let a = !1;
2250
+ for (; e; ) {
2251
+ let c = !1, p = "", d = "";
2252
+ if (!(n = o.exec(e)) || this.rules.block.hr.test(e))
2253
+ break;
2254
+ p = n[0], e = e.substring(p.length);
2255
+ let u = n[2].split(`
2256
+ `, 1)[0].replace(/^\t+/, (A) => " ".repeat(3 * A.length)), h = e.split(`
2257
+ `, 1)[0], g = !u.trim(), m = 0;
2258
+ if (this.options.pedantic ? (m = 2, d = u.trimStart()) : g ? m = n[1].length + 1 : (m = n[2].search(/[^ ]/), m = m > 4 ? 1 : m, d = u.slice(m), m += n[1].length), g && /^[ \t]*$/.test(h) && (p += h + `
2259
+ `, e = e.substring(h.length + 1), c = !0), !c) {
2260
+ const A = new RegExp(`^ {0,${Math.min(3, m - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), R = new RegExp(`^ {0,${Math.min(3, m - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), S = new RegExp(`^ {0,${Math.min(3, m - 1)}}(?:\`\`\`|~~~)`), w = new RegExp(`^ {0,${Math.min(3, m - 1)}}#`), T = new RegExp(`^ {0,${Math.min(3, m - 1)}}<(?:[a-z].*>|!--)`, "i");
2261
+ for (; e; ) {
2262
+ const k = e.split(`
2263
+ `, 1)[0];
2264
+ let v;
2265
+ if (h = k, this.options.pedantic ? (h = h.replace(/^ {1,4}(?=( {4})*[^ ])/g, " "), v = h) : v = h.replace(/\t/g, " "), S.test(h) || w.test(h) || T.test(h) || A.test(h) || R.test(h))
2266
+ break;
2267
+ if (v.search(/[^ ]/) >= m || !h.trim())
2268
+ d += `
2269
+ ` + v.slice(m);
2270
+ else {
2271
+ if (g || u.replace(/\t/g, " ").search(/[^ ]/) >= 4 || S.test(u) || w.test(u) || R.test(u))
2272
+ break;
2273
+ d += `
2274
+ ` + h;
2275
+ }
2276
+ !g && !h.trim() && (g = !0), p += k + `
2277
+ `, e = e.substring(k.length + 1), u = v.slice(m);
2278
+ }
2279
+ }
2280
+ i.loose || (a ? i.loose = !0 : /\n[ \t]*\n[ \t]*$/.test(p) && (a = !0));
2281
+ let b = null, x;
2282
+ this.options.gfm && (b = /^\[[ xX]\] /.exec(d), b && (x = b[0] !== "[ ] ", d = d.replace(/^\[[ xX]\] +/, ""))), i.items.push({
2283
+ type: "list_item",
2284
+ raw: p,
2285
+ task: !!b,
2286
+ checked: x,
2287
+ loose: !1,
2288
+ text: d,
2289
+ tokens: []
2290
+ }), i.raw += p;
2291
+ }
2292
+ i.items[i.items.length - 1].raw = i.items[i.items.length - 1].raw.trimEnd(), i.items[i.items.length - 1].text = i.items[i.items.length - 1].text.trimEnd(), i.raw = i.raw.trimEnd();
2293
+ for (let c = 0; c < i.items.length; c++)
2294
+ if (this.lexer.state.top = !1, i.items[c].tokens = this.lexer.blockTokens(i.items[c].text, []), !i.loose) {
2295
+ const p = i.items[c].tokens.filter((u) => u.type === "space"), d = p.length > 0 && p.some((u) => /\n.*\n/.test(u.raw));
2296
+ i.loose = d;
2297
+ }
2298
+ if (i.loose)
2299
+ for (let c = 0; c < i.items.length; c++)
2300
+ i.items[c].loose = !0;
2301
+ return i;
2302
+ }
2303
+ }
2304
+ html(e) {
2305
+ const n = this.rules.block.html.exec(e);
2306
+ if (n)
2307
+ return {
2308
+ type: "html",
2309
+ block: !0,
2310
+ raw: n[0],
2311
+ pre: n[1] === "pre" || n[1] === "script" || n[1] === "style",
2312
+ text: n[0]
2313
+ };
2314
+ }
2315
+ def(e) {
2316
+ const n = this.rules.block.def.exec(e);
2317
+ if (n) {
2318
+ const r = n[1].toLowerCase().replace(/\s+/g, " "), s = n[2] ? n[2].replace(/^<(.*)>$/, "$1").replace(this.rules.inline.anyPunctuation, "$1") : "", i = n[3] ? n[3].substring(1, n[3].length - 1).replace(this.rules.inline.anyPunctuation, "$1") : n[3];
2319
+ return {
2320
+ type: "def",
2321
+ tag: r,
2322
+ raw: n[0],
2323
+ href: s,
2324
+ title: i
2325
+ };
2326
+ }
2327
+ }
2328
+ table(e) {
2329
+ const n = this.rules.block.table.exec(e);
2330
+ if (!n || !/[:|]/.test(n[2]))
2331
+ return;
2332
+ const r = hs(n[1]), s = n[2].replace(/^\||\| *$/g, "").split("|"), i = n[3] && n[3].trim() ? n[3].replace(/\n[ \t]*$/, "").split(`
2333
+ `) : [], o = {
2334
+ type: "table",
2335
+ raw: n[0],
2336
+ header: [],
2337
+ align: [],
2338
+ rows: []
2339
+ };
2340
+ if (r.length === s.length) {
2341
+ for (const a of s)
2342
+ /^ *-+: *$/.test(a) ? o.align.push("right") : /^ *:-+: *$/.test(a) ? o.align.push("center") : /^ *:-+ *$/.test(a) ? o.align.push("left") : o.align.push(null);
2343
+ for (let a = 0; a < r.length; a++)
2344
+ o.header.push({
2345
+ text: r[a],
2346
+ tokens: this.lexer.inline(r[a]),
2347
+ header: !0,
2348
+ align: o.align[a]
2349
+ });
2350
+ for (const a of i)
2351
+ o.rows.push(hs(a, o.header.length).map((c, p) => ({
2352
+ text: c,
2353
+ tokens: this.lexer.inline(c),
2354
+ header: !1,
2355
+ align: o.align[p]
2356
+ })));
2357
+ return o;
2358
+ }
2359
+ }
2360
+ lheading(e) {
2361
+ const n = this.rules.block.lheading.exec(e);
2362
+ if (n)
2363
+ return {
2364
+ type: "heading",
2365
+ raw: n[0],
2366
+ depth: n[2].charAt(0) === "=" ? 1 : 2,
2367
+ text: n[1],
2368
+ tokens: this.lexer.inline(n[1])
2369
+ };
2370
+ }
2371
+ paragraph(e) {
2372
+ const n = this.rules.block.paragraph.exec(e);
2373
+ if (n) {
2374
+ const r = n[1].charAt(n[1].length - 1) === `
2375
+ ` ? n[1].slice(0, -1) : n[1];
2376
+ return {
2377
+ type: "paragraph",
2378
+ raw: n[0],
2379
+ text: r,
2380
+ tokens: this.lexer.inline(r)
2381
+ };
2382
+ }
2383
+ }
2384
+ text(e) {
2385
+ const n = this.rules.block.text.exec(e);
2386
+ if (n)
2387
+ return {
2388
+ type: "text",
2389
+ raw: n[0],
2390
+ text: n[0],
2391
+ tokens: this.lexer.inline(n[0])
2392
+ };
2393
+ }
2394
+ escape(e) {
2395
+ const n = this.rules.inline.escape.exec(e);
2396
+ if (n)
2397
+ return {
2398
+ type: "escape",
2399
+ raw: n[0],
2400
+ text: fe(n[1])
2401
+ };
2402
+ }
2403
+ tag(e) {
2404
+ const n = this.rules.inline.tag.exec(e);
2405
+ if (n)
2406
+ return !this.lexer.state.inLink && /^<a /i.test(n[0]) ? this.lexer.state.inLink = !0 : this.lexer.state.inLink && /^<\/a>/i.test(n[0]) && (this.lexer.state.inLink = !1), !this.lexer.state.inRawBlock && /^<(pre|code|kbd|script)(\s|>)/i.test(n[0]) ? this.lexer.state.inRawBlock = !0 : this.lexer.state.inRawBlock && /^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0]) && (this.lexer.state.inRawBlock = !1), {
2407
+ type: "html",
2408
+ raw: n[0],
2409
+ inLink: this.lexer.state.inLink,
2410
+ inRawBlock: this.lexer.state.inRawBlock,
2411
+ block: !1,
2412
+ text: n[0]
2413
+ };
2414
+ }
2415
+ link(e) {
2416
+ const n = this.rules.inline.link.exec(e);
2417
+ if (n) {
2418
+ const r = n[2].trim();
2419
+ if (!this.options.pedantic && /^</.test(r)) {
2420
+ if (!/>$/.test(r))
2421
+ return;
2422
+ const o = St(r.slice(0, -1), "\\");
2423
+ if ((r.length - o.length) % 2 === 0)
2424
+ return;
2425
+ } else {
2426
+ const o = Jl(n[2], "()");
2427
+ if (o > -1) {
2428
+ const c = (n[0].indexOf("!") === 0 ? 5 : 4) + n[1].length + o;
2429
+ n[2] = n[2].substring(0, o), n[0] = n[0].substring(0, c).trim(), n[3] = "";
2430
+ }
2431
+ }
2432
+ let s = n[2], i = "";
2433
+ if (this.options.pedantic) {
2434
+ const o = /^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(s);
2435
+ o && (s = o[1], i = o[3]);
2436
+ } else
2437
+ i = n[3] ? n[3].slice(1, -1) : "";
2438
+ return s = s.trim(), /^</.test(s) && (this.options.pedantic && !/>$/.test(r) ? s = s.slice(1) : s = s.slice(1, -1)), gs(n, {
2439
+ href: s && s.replace(this.rules.inline.anyPunctuation, "$1"),
2440
+ title: i && i.replace(this.rules.inline.anyPunctuation, "$1")
2441
+ }, n[0], this.lexer);
2442
+ }
2443
+ }
2444
+ reflink(e, n) {
2445
+ let r;
2446
+ if ((r = this.rules.inline.reflink.exec(e)) || (r = this.rules.inline.nolink.exec(e))) {
2447
+ const s = (r[2] || r[1]).replace(/\s+/g, " "), i = n[s.toLowerCase()];
2448
+ if (!i) {
2449
+ const o = r[0].charAt(0);
2450
+ return {
2451
+ type: "text",
2452
+ raw: o,
2453
+ text: o
2454
+ };
2455
+ }
2456
+ return gs(r, i, r[0], this.lexer);
2457
+ }
2458
+ }
2459
+ emStrong(e, n, r = "") {
2460
+ let s = this.rules.inline.emStrongLDelim.exec(e);
2461
+ if (!s || s[3] && r.match(/[\p{L}\p{N}]/u))
2462
+ return;
2463
+ if (!(s[1] || s[2] || "") || !r || this.rules.inline.punctuation.exec(r)) {
2464
+ const o = [...s[0]].length - 1;
2465
+ let a, c, p = o, d = 0;
2466
+ const u = s[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
2467
+ for (u.lastIndex = 0, n = n.slice(-1 * e.length + o); (s = u.exec(n)) != null; ) {
2468
+ if (a = s[1] || s[2] || s[3] || s[4] || s[5] || s[6], !a)
2469
+ continue;
2470
+ if (c = [...a].length, s[3] || s[4]) {
2471
+ p += c;
2472
+ continue;
2473
+ } else if ((s[5] || s[6]) && o % 3 && !((o + c) % 3)) {
2474
+ d += c;
2475
+ continue;
2476
+ }
2477
+ if (p -= c, p > 0)
2478
+ continue;
2479
+ c = Math.min(c, c + p + d);
2480
+ const h = [...s[0]][0].length, g = e.slice(0, o + s.index + h + c);
2481
+ if (Math.min(o, c) % 2) {
2482
+ const b = g.slice(1, -1);
2483
+ return {
2484
+ type: "em",
2485
+ raw: g,
2486
+ text: b,
2487
+ tokens: this.lexer.inlineTokens(b)
2488
+ };
2489
+ }
2490
+ const m = g.slice(2, -2);
2491
+ return {
2492
+ type: "strong",
2493
+ raw: g,
2494
+ text: m,
2495
+ tokens: this.lexer.inlineTokens(m)
2496
+ };
2497
+ }
2498
+ }
2499
+ }
2500
+ codespan(e) {
2501
+ const n = this.rules.inline.code.exec(e);
2502
+ if (n) {
2503
+ let r = n[2].replace(/\n/g, " ");
2504
+ const s = /[^ ]/.test(r), i = /^ /.test(r) && / $/.test(r);
2505
+ return s && i && (r = r.substring(1, r.length - 1)), r = fe(r, !0), {
2506
+ type: "codespan",
2507
+ raw: n[0],
2508
+ text: r
2509
+ };
2510
+ }
2511
+ }
2512
+ br(e) {
2513
+ const n = this.rules.inline.br.exec(e);
2514
+ if (n)
2515
+ return {
2516
+ type: "br",
2517
+ raw: n[0]
2518
+ };
2519
+ }
2520
+ del(e) {
2521
+ const n = this.rules.inline.del.exec(e);
2522
+ if (n)
2523
+ return {
2524
+ type: "del",
2525
+ raw: n[0],
2526
+ text: n[2],
2527
+ tokens: this.lexer.inlineTokens(n[2])
2528
+ };
2529
+ }
2530
+ autolink(e) {
2531
+ const n = this.rules.inline.autolink.exec(e);
2532
+ if (n) {
2533
+ let r, s;
2534
+ return n[2] === "@" ? (r = fe(n[1]), s = "mailto:" + r) : (r = fe(n[1]), s = r), {
2535
+ type: "link",
2536
+ raw: n[0],
2537
+ text: r,
2538
+ href: s,
2539
+ tokens: [
2540
+ {
2541
+ type: "text",
2542
+ raw: r,
2543
+ text: r
2544
+ }
2545
+ ]
2546
+ };
2547
+ }
2548
+ }
2549
+ url(e) {
2550
+ var r;
2551
+ let n;
2552
+ if (n = this.rules.inline.url.exec(e)) {
2553
+ let s, i;
2554
+ if (n[2] === "@")
2555
+ s = fe(n[0]), i = "mailto:" + s;
2556
+ else {
2557
+ let o;
2558
+ do
2559
+ o = n[0], n[0] = ((r = this.rules.inline._backpedal.exec(n[0])) == null ? void 0 : r[0]) ?? "";
2560
+ while (o !== n[0]);
2561
+ s = fe(n[0]), n[1] === "www." ? i = "http://" + n[0] : i = n[0];
2562
+ }
2563
+ return {
2564
+ type: "link",
2565
+ raw: n[0],
2566
+ text: s,
2567
+ href: i,
2568
+ tokens: [
2569
+ {
2570
+ type: "text",
2571
+ raw: s,
2572
+ text: s
2573
+ }
2574
+ ]
2575
+ };
2576
+ }
2577
+ }
2578
+ inlineText(e) {
2579
+ const n = this.rules.inline.text.exec(e);
2580
+ if (n) {
2581
+ let r;
2582
+ return this.lexer.state.inRawBlock ? r = n[0] : r = fe(n[0]), {
2583
+ type: "text",
2584
+ raw: n[0],
2585
+ text: r
2586
+ };
2587
+ }
2588
+ }
2589
+ }
2590
+ const ta = /^(?:[ \t]*(?:\n|$))+/, na = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, ra = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, Ut = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, sa = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, yi = /(?:[*+-]|\d{1,9}[.)])/, wi = $(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g, yi).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/).getRegex(), Rr = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, ia = /^[^\n]+/, Or = /(?!\s*\])(?:\\.|[^\[\]\\])+/, oa = $(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Or).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), la = $(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, yi).getRegex(), kn = "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", Nr = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, aa = $("^ {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", Nr).replace("tag", kn).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), Ei = $(Rr).replace("hr", Ut).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", kn).getRegex(), ca = $(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Ei).getRegex(), Ir = {
2591
+ blockquote: ca,
2592
+ code: na,
2593
+ def: oa,
2594
+ fences: ra,
2595
+ heading: sa,
2596
+ hr: Ut,
2597
+ html: aa,
2598
+ lheading: wi,
2599
+ list: la,
2600
+ newline: ta,
2601
+ paragraph: Ei,
2602
+ table: Ct,
2603
+ text: ia
2604
+ }, ms = $("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", Ut).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", kn).getRegex(), ua = {
2605
+ ...Ir,
2606
+ table: ms,
2607
+ paragraph: $(Rr).replace("hr", Ut).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", ms).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", kn).getRegex()
2608
+ }, fa = {
2609
+ ...Ir,
2610
+ html: $(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", Nr).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(),
2611
+ def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
2612
+ heading: /^(#{1,6})(.*)(?:\n+|$)/,
2613
+ fences: Ct,
2614
+ // fences not supported
2615
+ lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
2616
+ paragraph: $(Rr).replace("hr", Ut).replace("heading", ` *#{1,6} *[^
2617
+ ]`).replace("lheading", wi).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
2618
+ }, Ti = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, pa = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, xi = /^( {2,}|\\)\n(?!\s*$)/, da = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Bt = "\\p{P}\\p{S}", ha = $(/^((?![*_])[\spunctuation])/, "u").replace(/punctuation/g, Bt).getRegex(), ga = /\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g, ma = $(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/, "u").replace(/punct/g, Bt).getRegex(), _a = $("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])", "gu").replace(/punct/g, Bt).getRegex(), ba = $("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])", "gu").replace(/punct/g, Bt).getRegex(), ya = $(/\\([punct])/, "gu").replace(/punct/g, Bt).getRegex(), wa = $(/^<(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(), Ea = $(Nr).replace("(?:-->|$)", "-->").getRegex(), Ta = $("^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", Ea).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), mn = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, xa = $(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label", mn).replace("href", /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), ki = $(/^!?\[(label)\]\[(ref)\]/).replace("label", mn).replace("ref", Or).getRegex(), Si = $(/^!?\[(ref)\](?:\[\])?/).replace("ref", Or).getRegex(), ka = $("reflink|nolink(?!\\()", "g").replace("reflink", ki).replace("nolink", Si).getRegex(), Dr = {
2619
+ _backpedal: Ct,
2620
+ // only used for GFM url
2621
+ anyPunctuation: ya,
2622
+ autolink: wa,
2623
+ blockSkip: ga,
2624
+ br: xi,
2625
+ code: pa,
2626
+ del: Ct,
2627
+ emStrongLDelim: ma,
2628
+ emStrongRDelimAst: _a,
2629
+ emStrongRDelimUnd: ba,
2630
+ escape: Ti,
2631
+ link: xa,
2632
+ nolink: Si,
2633
+ punctuation: ha,
2634
+ reflink: ki,
2635
+ reflinkSearch: ka,
2636
+ tag: Ta,
2637
+ text: da,
2638
+ url: Ct
2639
+ }, Sa = {
2640
+ ...Dr,
2641
+ link: $(/^!?\[(label)\]\((.*?)\)/).replace("label", mn).getRegex(),
2642
+ reflink: $(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", mn).getRegex()
2643
+ }, fr = {
2644
+ ...Dr,
2645
+ escape: $(Ti).replace("])", "~|])").getRegex(),
2646
+ url: $(/^((?: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(),
2647
+ _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
2648
+ del: /^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,
2649
+ text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/
2650
+ }, va = {
2651
+ ...fr,
2652
+ br: $(xi).replace("{2,}", "*").getRegex(),
2653
+ text: $(fr.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
2654
+ }, rn = {
2655
+ normal: Ir,
2656
+ gfm: ua,
2657
+ pedantic: fa
2658
+ }, vt = {
2659
+ normal: Dr,
2660
+ gfm: fr,
2661
+ breaks: va,
2662
+ pedantic: Sa
2663
+ };
2664
+ class ge {
2665
+ constructor(e) {
2666
+ L(this, "tokens");
2667
+ L(this, "options");
2668
+ L(this, "state");
2669
+ L(this, "tokenizer");
2670
+ L(this, "inlineQueue");
2671
+ this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || Qe, this.options.tokenizer = this.options.tokenizer || new gn(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
2672
+ inLink: !1,
2673
+ inRawBlock: !1,
2674
+ top: !0
2675
+ };
2676
+ const n = {
2677
+ block: rn.normal,
2678
+ inline: vt.normal
2679
+ };
2680
+ this.options.pedantic ? (n.block = rn.pedantic, n.inline = vt.pedantic) : this.options.gfm && (n.block = rn.gfm, this.options.breaks ? n.inline = vt.breaks : n.inline = vt.gfm), this.tokenizer.rules = n;
2681
+ }
2682
+ /**
2683
+ * Expose Rules
2684
+ */
2685
+ static get rules() {
2686
+ return {
2687
+ block: rn,
2688
+ inline: vt
2689
+ };
2690
+ }
2691
+ /**
2692
+ * Static Lex Method
2693
+ */
2694
+ static lex(e, n) {
2695
+ return new ge(n).lex(e);
2696
+ }
2697
+ /**
2698
+ * Static Lex Inline Method
2699
+ */
2700
+ static lexInline(e, n) {
2701
+ return new ge(n).inlineTokens(e);
2702
+ }
2703
+ /**
2704
+ * Preprocessing
2705
+ */
2706
+ lex(e) {
2707
+ e = e.replace(/\r\n|\r/g, `
2708
+ `), this.blockTokens(e, this.tokens);
2709
+ for (let n = 0; n < this.inlineQueue.length; n++) {
2710
+ const r = this.inlineQueue[n];
2711
+ this.inlineTokens(r.src, r.tokens);
2712
+ }
2713
+ return this.inlineQueue = [], this.tokens;
2714
+ }
2715
+ blockTokens(e, n = [], r = !1) {
2716
+ this.options.pedantic && (e = e.replace(/\t/g, " ").replace(/^ +$/gm, ""));
2717
+ let s, i, o;
2718
+ for (; e; )
2719
+ if (!(this.options.extensions && this.options.extensions.block && this.options.extensions.block.some((a) => (s = a.call({ lexer: this }, e, n)) ? (e = e.substring(s.raw.length), n.push(s), !0) : !1))) {
2720
+ if (s = this.tokenizer.space(e)) {
2721
+ e = e.substring(s.raw.length), s.raw.length === 1 && n.length > 0 ? n[n.length - 1].raw += `
2722
+ ` : n.push(s);
2723
+ continue;
2724
+ }
2725
+ if (s = this.tokenizer.code(e)) {
2726
+ e = e.substring(s.raw.length), i = n[n.length - 1], i && (i.type === "paragraph" || i.type === "text") ? (i.raw += `
2727
+ ` + s.raw, i.text += `
2728
+ ` + s.text, this.inlineQueue[this.inlineQueue.length - 1].src = i.text) : n.push(s);
2729
+ continue;
2730
+ }
2731
+ if (s = this.tokenizer.fences(e)) {
2732
+ e = e.substring(s.raw.length), n.push(s);
2733
+ continue;
2734
+ }
2735
+ if (s = this.tokenizer.heading(e)) {
2736
+ e = e.substring(s.raw.length), n.push(s);
2737
+ continue;
2738
+ }
2739
+ if (s = this.tokenizer.hr(e)) {
2740
+ e = e.substring(s.raw.length), n.push(s);
2741
+ continue;
2742
+ }
2743
+ if (s = this.tokenizer.blockquote(e)) {
2744
+ e = e.substring(s.raw.length), n.push(s);
2745
+ continue;
2746
+ }
2747
+ if (s = this.tokenizer.list(e)) {
2748
+ e = e.substring(s.raw.length), n.push(s);
2749
+ continue;
2750
+ }
2751
+ if (s = this.tokenizer.html(e)) {
2752
+ e = e.substring(s.raw.length), n.push(s);
2753
+ continue;
2754
+ }
2755
+ if (s = this.tokenizer.def(e)) {
2756
+ e = e.substring(s.raw.length), i = n[n.length - 1], i && (i.type === "paragraph" || i.type === "text") ? (i.raw += `
2757
+ ` + s.raw, i.text += `
2758
+ ` + s.raw, this.inlineQueue[this.inlineQueue.length - 1].src = i.text) : this.tokens.links[s.tag] || (this.tokens.links[s.tag] = {
2759
+ href: s.href,
2760
+ title: s.title
2761
+ });
2762
+ continue;
2763
+ }
2764
+ if (s = this.tokenizer.table(e)) {
2765
+ e = e.substring(s.raw.length), n.push(s);
2766
+ continue;
2767
+ }
2768
+ if (s = this.tokenizer.lheading(e)) {
2769
+ e = e.substring(s.raw.length), n.push(s);
2770
+ continue;
2771
+ }
2772
+ if (o = e, this.options.extensions && this.options.extensions.startBlock) {
2773
+ let a = 1 / 0;
2774
+ const c = e.slice(1);
2775
+ let p;
2776
+ this.options.extensions.startBlock.forEach((d) => {
2777
+ p = d.call({ lexer: this }, c), typeof p == "number" && p >= 0 && (a = Math.min(a, p));
2778
+ }), a < 1 / 0 && a >= 0 && (o = e.substring(0, a + 1));
2779
+ }
2780
+ if (this.state.top && (s = this.tokenizer.paragraph(o))) {
2781
+ i = n[n.length - 1], r && (i == null ? void 0 : i.type) === "paragraph" ? (i.raw += `
2782
+ ` + s.raw, i.text += `
2783
+ ` + s.text, this.inlineQueue.pop(), this.inlineQueue[this.inlineQueue.length - 1].src = i.text) : n.push(s), r = o.length !== e.length, e = e.substring(s.raw.length);
2784
+ continue;
2785
+ }
2786
+ if (s = this.tokenizer.text(e)) {
2787
+ e = e.substring(s.raw.length), i = n[n.length - 1], i && i.type === "text" ? (i.raw += `
2788
+ ` + s.raw, i.text += `
2789
+ ` + s.text, this.inlineQueue.pop(), this.inlineQueue[this.inlineQueue.length - 1].src = i.text) : n.push(s);
2790
+ continue;
2791
+ }
2792
+ if (e) {
2793
+ const a = "Infinite loop on byte: " + e.charCodeAt(0);
2794
+ if (this.options.silent) {
2795
+ console.error(a);
2796
+ break;
2797
+ } else
2798
+ throw new Error(a);
2799
+ }
2800
+ }
2801
+ return this.state.top = !0, n;
2802
+ }
2803
+ inline(e, n = []) {
2804
+ return this.inlineQueue.push({ src: e, tokens: n }), n;
2805
+ }
2806
+ /**
2807
+ * Lexing/Compiling
2808
+ */
2809
+ inlineTokens(e, n = []) {
2810
+ let r, s, i, o = e, a, c, p;
2811
+ if (this.tokens.links) {
2812
+ const d = Object.keys(this.tokens.links);
2813
+ if (d.length > 0)
2814
+ for (; (a = this.tokenizer.rules.inline.reflinkSearch.exec(o)) != null; )
2815
+ d.includes(a[0].slice(a[0].lastIndexOf("[") + 1, -1)) && (o = o.slice(0, a.index) + "[" + "a".repeat(a[0].length - 2) + "]" + o.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex));
2816
+ }
2817
+ for (; (a = this.tokenizer.rules.inline.blockSkip.exec(o)) != null; )
2818
+ o = o.slice(0, a.index) + "[" + "a".repeat(a[0].length - 2) + "]" + o.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
2819
+ for (; (a = this.tokenizer.rules.inline.anyPunctuation.exec(o)) != null; )
2820
+ o = o.slice(0, a.index) + "++" + o.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
2821
+ for (; e; )
2822
+ if (c || (p = ""), c = !1, !(this.options.extensions && this.options.extensions.inline && this.options.extensions.inline.some((d) => (r = d.call({ lexer: this }, e, n)) ? (e = e.substring(r.raw.length), n.push(r), !0) : !1))) {
2823
+ if (r = this.tokenizer.escape(e)) {
2824
+ e = e.substring(r.raw.length), n.push(r);
2825
+ continue;
2826
+ }
2827
+ if (r = this.tokenizer.tag(e)) {
2828
+ e = e.substring(r.raw.length), s = n[n.length - 1], s && r.type === "text" && s.type === "text" ? (s.raw += r.raw, s.text += r.text) : n.push(r);
2829
+ continue;
2830
+ }
2831
+ if (r = this.tokenizer.link(e)) {
2832
+ e = e.substring(r.raw.length), n.push(r);
2833
+ continue;
2834
+ }
2835
+ if (r = this.tokenizer.reflink(e, this.tokens.links)) {
2836
+ e = e.substring(r.raw.length), s = n[n.length - 1], s && r.type === "text" && s.type === "text" ? (s.raw += r.raw, s.text += r.text) : n.push(r);
2837
+ continue;
2838
+ }
2839
+ if (r = this.tokenizer.emStrong(e, o, p)) {
2840
+ e = e.substring(r.raw.length), n.push(r);
2841
+ continue;
2842
+ }
2843
+ if (r = this.tokenizer.codespan(e)) {
2844
+ e = e.substring(r.raw.length), n.push(r);
2845
+ continue;
2846
+ }
2847
+ if (r = this.tokenizer.br(e)) {
2848
+ e = e.substring(r.raw.length), n.push(r);
2849
+ continue;
2850
+ }
2851
+ if (r = this.tokenizer.del(e)) {
2852
+ e = e.substring(r.raw.length), n.push(r);
2853
+ continue;
2854
+ }
2855
+ if (r = this.tokenizer.autolink(e)) {
2856
+ e = e.substring(r.raw.length), n.push(r);
2857
+ continue;
2858
+ }
2859
+ if (!this.state.inLink && (r = this.tokenizer.url(e))) {
2860
+ e = e.substring(r.raw.length), n.push(r);
2861
+ continue;
2862
+ }
2863
+ if (i = e, this.options.extensions && this.options.extensions.startInline) {
2864
+ let d = 1 / 0;
2865
+ const u = e.slice(1);
2866
+ let h;
2867
+ this.options.extensions.startInline.forEach((g) => {
2868
+ h = g.call({ lexer: this }, u), typeof h == "number" && h >= 0 && (d = Math.min(d, h));
2869
+ }), d < 1 / 0 && d >= 0 && (i = e.substring(0, d + 1));
2870
+ }
2871
+ if (r = this.tokenizer.inlineText(i)) {
2872
+ e = e.substring(r.raw.length), r.raw.slice(-1) !== "_" && (p = r.raw.slice(-1)), c = !0, s = n[n.length - 1], s && s.type === "text" ? (s.raw += r.raw, s.text += r.text) : n.push(r);
2873
+ continue;
2874
+ }
2875
+ if (e) {
2876
+ const d = "Infinite loop on byte: " + e.charCodeAt(0);
2877
+ if (this.options.silent) {
2878
+ console.error(d);
2879
+ break;
2880
+ } else
2881
+ throw new Error(d);
2882
+ }
2883
+ }
2884
+ return n;
2885
+ }
2886
+ }
2887
+ class _n {
2888
+ // set by the parser
2889
+ constructor(e) {
2890
+ L(this, "options");
2891
+ L(this, "parser");
2892
+ this.options = e || Qe;
2893
+ }
2894
+ space(e) {
2895
+ return "";
2896
+ }
2897
+ code({ text: e, lang: n, escaped: r }) {
2898
+ var o;
2899
+ const s = (o = (n || "").match(/^\S*/)) == null ? void 0 : o[0], i = e.replace(/\n$/, "") + `
2900
+ `;
2901
+ return s ? '<pre><code class="language-' + fe(s) + '">' + (r ? i : fe(i, !0)) + `</code></pre>
2902
+ ` : "<pre><code>" + (r ? i : fe(i, !0)) + `</code></pre>
2903
+ `;
2904
+ }
2905
+ blockquote({ tokens: e }) {
2906
+ return `<blockquote>
2907
+ ${this.parser.parse(e)}</blockquote>
2908
+ `;
2909
+ }
2910
+ html({ text: e }) {
2911
+ return e;
2912
+ }
2913
+ heading({ tokens: e, depth: n }) {
2914
+ return `<h${n}>${this.parser.parseInline(e)}</h${n}>
2915
+ `;
2916
+ }
2917
+ hr(e) {
2918
+ return `<hr>
2919
+ `;
2920
+ }
2921
+ list(e) {
2922
+ const n = e.ordered, r = e.start;
2923
+ let s = "";
2924
+ for (let a = 0; a < e.items.length; a++) {
2925
+ const c = e.items[a];
2926
+ s += this.listitem(c);
2927
+ }
2928
+ const i = n ? "ol" : "ul", o = n && r !== 1 ? ' start="' + r + '"' : "";
2929
+ return "<" + i + o + `>
2930
+ ` + s + "</" + i + `>
2931
+ `;
2932
+ }
2933
+ listitem(e) {
2934
+ let n = "";
2935
+ if (e.task) {
2936
+ const r = this.checkbox({ checked: !!e.checked });
2937
+ e.loose ? e.tokens.length > 0 && e.tokens[0].type === "paragraph" ? (e.tokens[0].text = r + " " + 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 = r + " " + e.tokens[0].tokens[0].text)) : e.tokens.unshift({
2938
+ type: "text",
2939
+ raw: r + " ",
2940
+ text: r + " "
2941
+ }) : n += r + " ";
2942
+ }
2943
+ return n += this.parser.parse(e.tokens, !!e.loose), `<li>${n}</li>
2944
+ `;
2945
+ }
2946
+ checkbox({ checked: e }) {
2947
+ return "<input " + (e ? 'checked="" ' : "") + 'disabled="" type="checkbox">';
2948
+ }
2949
+ paragraph({ tokens: e }) {
2950
+ return `<p>${this.parser.parseInline(e)}</p>
2951
+ `;
2952
+ }
2953
+ table(e) {
2954
+ let n = "", r = "";
2955
+ for (let i = 0; i < e.header.length; i++)
2956
+ r += this.tablecell(e.header[i]);
2957
+ n += this.tablerow({ text: r });
2958
+ let s = "";
2959
+ for (let i = 0; i < e.rows.length; i++) {
2960
+ const o = e.rows[i];
2961
+ r = "";
2962
+ for (let a = 0; a < o.length; a++)
2963
+ r += this.tablecell(o[a]);
2964
+ s += this.tablerow({ text: r });
2965
+ }
2966
+ return s && (s = `<tbody>${s}</tbody>`), `<table>
2967
+ <thead>
2968
+ ` + n + `</thead>
2969
+ ` + s + `</table>
2970
+ `;
2971
+ }
2972
+ tablerow({ text: e }) {
2973
+ return `<tr>
2974
+ ${e}</tr>
2975
+ `;
2976
+ }
2977
+ tablecell(e) {
2978
+ const n = this.parser.parseInline(e.tokens), r = e.header ? "th" : "td";
2979
+ return (e.align ? `<${r} align="${e.align}">` : `<${r}>`) + n + `</${r}>
2980
+ `;
2981
+ }
2982
+ /**
2983
+ * span level renderer
2984
+ */
2985
+ strong({ tokens: e }) {
2986
+ return `<strong>${this.parser.parseInline(e)}</strong>`;
2987
+ }
2988
+ em({ tokens: e }) {
2989
+ return `<em>${this.parser.parseInline(e)}</em>`;
2990
+ }
2991
+ codespan({ text: e }) {
2992
+ return `<code>${e}</code>`;
2993
+ }
2994
+ br(e) {
2995
+ return "<br>";
2996
+ }
2997
+ del({ tokens: e }) {
2998
+ return `<del>${this.parser.parseInline(e)}</del>`;
2999
+ }
3000
+ link({ href: e, title: n, tokens: r }) {
3001
+ const s = this.parser.parseInline(r), i = ds(e);
3002
+ if (i === null)
3003
+ return s;
3004
+ e = i;
3005
+ let o = '<a href="' + e + '"';
3006
+ return n && (o += ' title="' + n + '"'), o += ">" + s + "</a>", o;
3007
+ }
3008
+ image({ href: e, title: n, text: r }) {
3009
+ const s = ds(e);
3010
+ if (s === null)
3011
+ return r;
3012
+ e = s;
3013
+ let i = `<img src="${e}" alt="${r}"`;
3014
+ return n && (i += ` title="${n}"`), i += ">", i;
3015
+ }
3016
+ text(e) {
3017
+ return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : e.text;
3018
+ }
3019
+ }
3020
+ class Cr {
3021
+ // no need for block level renderers
3022
+ strong({ text: e }) {
3023
+ return e;
3024
+ }
3025
+ em({ text: e }) {
3026
+ return e;
3027
+ }
3028
+ codespan({ text: e }) {
3029
+ return e;
3030
+ }
3031
+ del({ text: e }) {
3032
+ return e;
3033
+ }
3034
+ html({ text: e }) {
3035
+ return e;
3036
+ }
3037
+ text({ text: e }) {
3038
+ return e;
3039
+ }
3040
+ link({ text: e }) {
3041
+ return "" + e;
3042
+ }
3043
+ image({ text: e }) {
3044
+ return "" + e;
3045
+ }
3046
+ br() {
3047
+ return "";
3048
+ }
3049
+ }
3050
+ class me {
3051
+ constructor(e) {
3052
+ L(this, "options");
3053
+ L(this, "renderer");
3054
+ L(this, "textRenderer");
3055
+ this.options = e || Qe, this.options.renderer = this.options.renderer || new _n(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new Cr();
3056
+ }
3057
+ /**
3058
+ * Static Parse Method
3059
+ */
3060
+ static parse(e, n) {
3061
+ return new me(n).parse(e);
3062
+ }
3063
+ /**
3064
+ * Static Parse Inline Method
3065
+ */
3066
+ static parseInline(e, n) {
3067
+ return new me(n).parseInline(e);
3068
+ }
3069
+ /**
3070
+ * Parse Loop
3071
+ */
3072
+ parse(e, n = !0) {
3073
+ let r = "";
3074
+ for (let s = 0; s < e.length; s++) {
3075
+ const i = e[s];
3076
+ if (this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[i.type]) {
3077
+ const a = i, c = this.options.extensions.renderers[a.type].call({ parser: this }, a);
3078
+ if (c !== !1 || !["space", "hr", "heading", "code", "table", "blockquote", "list", "html", "paragraph", "text"].includes(a.type)) {
3079
+ r += c || "";
3080
+ continue;
3081
+ }
3082
+ }
3083
+ const o = i;
3084
+ switch (o.type) {
3085
+ case "space": {
3086
+ r += this.renderer.space(o);
3087
+ continue;
3088
+ }
3089
+ case "hr": {
3090
+ r += this.renderer.hr(o);
3091
+ continue;
3092
+ }
3093
+ case "heading": {
3094
+ r += this.renderer.heading(o);
3095
+ continue;
3096
+ }
3097
+ case "code": {
3098
+ r += this.renderer.code(o);
3099
+ continue;
3100
+ }
3101
+ case "table": {
3102
+ r += this.renderer.table(o);
3103
+ continue;
3104
+ }
3105
+ case "blockquote": {
3106
+ r += this.renderer.blockquote(o);
3107
+ continue;
3108
+ }
3109
+ case "list": {
3110
+ r += this.renderer.list(o);
3111
+ continue;
3112
+ }
3113
+ case "html": {
3114
+ r += this.renderer.html(o);
3115
+ continue;
3116
+ }
3117
+ case "paragraph": {
3118
+ r += this.renderer.paragraph(o);
3119
+ continue;
3120
+ }
3121
+ case "text": {
3122
+ let a = o, c = this.renderer.text(a);
3123
+ for (; s + 1 < e.length && e[s + 1].type === "text"; )
3124
+ a = e[++s], c += `
3125
+ ` + this.renderer.text(a);
3126
+ n ? r += this.renderer.paragraph({
3127
+ type: "paragraph",
3128
+ raw: c,
3129
+ text: c,
3130
+ tokens: [{ type: "text", raw: c, text: c }]
3131
+ }) : r += c;
3132
+ continue;
3133
+ }
3134
+ default: {
3135
+ const a = 'Token with "' + o.type + '" type was not found.';
3136
+ if (this.options.silent)
3137
+ return console.error(a), "";
3138
+ throw new Error(a);
3139
+ }
3140
+ }
3141
+ }
3142
+ return r;
3143
+ }
3144
+ /**
3145
+ * Parse Inline Tokens
3146
+ */
3147
+ parseInline(e, n) {
3148
+ n = n || this.renderer;
3149
+ let r = "";
3150
+ for (let s = 0; s < e.length; s++) {
3151
+ const i = e[s];
3152
+ if (this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[i.type]) {
3153
+ const a = this.options.extensions.renderers[i.type].call({ parser: this }, i);
3154
+ if (a !== !1 || !["escape", "html", "link", "image", "strong", "em", "codespan", "br", "del", "text"].includes(i.type)) {
3155
+ r += a || "";
3156
+ continue;
3157
+ }
3158
+ }
3159
+ const o = i;
3160
+ switch (o.type) {
3161
+ case "escape": {
3162
+ r += n.text(o);
3163
+ break;
3164
+ }
3165
+ case "html": {
3166
+ r += n.html(o);
3167
+ break;
3168
+ }
3169
+ case "link": {
3170
+ r += n.link(o);
3171
+ break;
3172
+ }
3173
+ case "image": {
3174
+ r += n.image(o);
3175
+ break;
3176
+ }
3177
+ case "strong": {
3178
+ r += n.strong(o);
3179
+ break;
3180
+ }
3181
+ case "em": {
3182
+ r += n.em(o);
3183
+ break;
3184
+ }
3185
+ case "codespan": {
3186
+ r += n.codespan(o);
3187
+ break;
3188
+ }
3189
+ case "br": {
3190
+ r += n.br(o);
3191
+ break;
3192
+ }
3193
+ case "del": {
3194
+ r += n.del(o);
3195
+ break;
3196
+ }
3197
+ case "text": {
3198
+ r += n.text(o);
3199
+ break;
3200
+ }
3201
+ default: {
3202
+ const a = 'Token with "' + o.type + '" type was not found.';
3203
+ if (this.options.silent)
3204
+ return console.error(a), "";
3205
+ throw new Error(a);
3206
+ }
3207
+ }
3208
+ }
3209
+ return r;
3210
+ }
3211
+ }
3212
+ class Mt {
3213
+ constructor(e) {
3214
+ L(this, "options");
3215
+ L(this, "block");
3216
+ this.options = e || Qe;
3217
+ }
3218
+ /**
3219
+ * Process markdown before marked
3220
+ */
3221
+ preprocess(e) {
3222
+ return e;
3223
+ }
3224
+ /**
3225
+ * Process HTML after marked is finished
3226
+ */
3227
+ postprocess(e) {
3228
+ return e;
3229
+ }
3230
+ /**
3231
+ * Process all tokens before walk tokens
3232
+ */
3233
+ processAllTokens(e) {
3234
+ return e;
3235
+ }
3236
+ /**
3237
+ * Provide function to tokenize markdown
3238
+ */
3239
+ provideLexer() {
3240
+ return this.block ? ge.lex : ge.lexInline;
3241
+ }
3242
+ /**
3243
+ * Provide function to parse tokens
3244
+ */
3245
+ provideParser() {
3246
+ return this.block ? me.parse : me.parseInline;
3247
+ }
3248
+ }
3249
+ L(Mt, "passThroughHooks", /* @__PURE__ */ new Set([
3250
+ "preprocess",
3251
+ "postprocess",
3252
+ "processAllTokens"
3253
+ ]));
3254
+ class Aa {
3255
+ constructor(...e) {
3256
+ L(this, "defaults", Ar());
3257
+ L(this, "options", this.setOptions);
3258
+ L(this, "parse", this.parseMarkdown(!0));
3259
+ L(this, "parseInline", this.parseMarkdown(!1));
3260
+ L(this, "Parser", me);
3261
+ L(this, "Renderer", _n);
3262
+ L(this, "TextRenderer", Cr);
3263
+ L(this, "Lexer", ge);
3264
+ L(this, "Tokenizer", gn);
3265
+ L(this, "Hooks", Mt);
3266
+ this.use(...e);
3267
+ }
3268
+ /**
3269
+ * Run callback for every token
3270
+ */
3271
+ walkTokens(e, n) {
3272
+ var s, i;
3273
+ let r = [];
3274
+ for (const o of e)
3275
+ switch (r = r.concat(n.call(this, o)), o.type) {
3276
+ case "table": {
3277
+ const a = o;
3278
+ for (const c of a.header)
3279
+ r = r.concat(this.walkTokens(c.tokens, n));
3280
+ for (const c of a.rows)
3281
+ for (const p of c)
3282
+ r = r.concat(this.walkTokens(p.tokens, n));
3283
+ break;
3284
+ }
3285
+ case "list": {
3286
+ const a = o;
3287
+ r = r.concat(this.walkTokens(a.items, n));
3288
+ break;
3289
+ }
3290
+ default: {
3291
+ const a = o;
3292
+ (i = (s = this.defaults.extensions) == null ? void 0 : s.childTokens) != null && i[a.type] ? this.defaults.extensions.childTokens[a.type].forEach((c) => {
3293
+ const p = a[c].flat(1 / 0);
3294
+ r = r.concat(this.walkTokens(p, n));
3295
+ }) : a.tokens && (r = r.concat(this.walkTokens(a.tokens, n)));
3296
+ }
3297
+ }
3298
+ return r;
3299
+ }
3300
+ use(...e) {
3301
+ const n = this.defaults.extensions || { renderers: {}, childTokens: {} };
3302
+ return e.forEach((r) => {
3303
+ const s = { ...r };
3304
+ if (s.async = this.defaults.async || s.async || !1, r.extensions && (r.extensions.forEach((i) => {
3305
+ if (!i.name)
3306
+ throw new Error("extension name required");
3307
+ if ("renderer" in i) {
3308
+ const o = n.renderers[i.name];
3309
+ o ? n.renderers[i.name] = function(...a) {
3310
+ let c = i.renderer.apply(this, a);
3311
+ return c === !1 && (c = o.apply(this, a)), c;
3312
+ } : n.renderers[i.name] = i.renderer;
3313
+ }
3314
+ if ("tokenizer" in i) {
3315
+ if (!i.level || i.level !== "block" && i.level !== "inline")
3316
+ throw new Error("extension level must be 'block' or 'inline'");
3317
+ const o = n[i.level];
3318
+ o ? o.unshift(i.tokenizer) : n[i.level] = [i.tokenizer], i.start && (i.level === "block" ? n.startBlock ? n.startBlock.push(i.start) : n.startBlock = [i.start] : i.level === "inline" && (n.startInline ? n.startInline.push(i.start) : n.startInline = [i.start]));
3319
+ }
3320
+ "childTokens" in i && i.childTokens && (n.childTokens[i.name] = i.childTokens);
3321
+ }), s.extensions = n), r.renderer) {
3322
+ const i = this.defaults.renderer || new _n(this.defaults);
3323
+ for (const o in r.renderer) {
3324
+ if (!(o in i))
3325
+ throw new Error(`renderer '${o}' does not exist`);
3326
+ if (["options", "parser"].includes(o))
3327
+ continue;
3328
+ const a = o, c = r.renderer[a], p = i[a];
3329
+ i[a] = (...d) => {
3330
+ let u = c.apply(i, d);
3331
+ return u === !1 && (u = p.apply(i, d)), u || "";
3332
+ };
3333
+ }
3334
+ s.renderer = i;
3335
+ }
3336
+ if (r.tokenizer) {
3337
+ const i = this.defaults.tokenizer || new gn(this.defaults);
3338
+ for (const o in r.tokenizer) {
3339
+ if (!(o in i))
3340
+ throw new Error(`tokenizer '${o}' does not exist`);
3341
+ if (["options", "rules", "lexer"].includes(o))
3342
+ continue;
3343
+ const a = o, c = r.tokenizer[a], p = i[a];
3344
+ i[a] = (...d) => {
3345
+ let u = c.apply(i, d);
3346
+ return u === !1 && (u = p.apply(i, d)), u;
3347
+ };
3348
+ }
3349
+ s.tokenizer = i;
3350
+ }
3351
+ if (r.hooks) {
3352
+ const i = this.defaults.hooks || new Mt();
3353
+ for (const o in r.hooks) {
3354
+ if (!(o in i))
3355
+ throw new Error(`hook '${o}' does not exist`);
3356
+ if (["options", "block"].includes(o))
3357
+ continue;
3358
+ const a = o, c = r.hooks[a], p = i[a];
3359
+ Mt.passThroughHooks.has(o) ? i[a] = (d) => {
3360
+ if (this.defaults.async)
3361
+ return Promise.resolve(c.call(i, d)).then((h) => p.call(i, h));
3362
+ const u = c.call(i, d);
3363
+ return p.call(i, u);
3364
+ } : i[a] = (...d) => {
3365
+ let u = c.apply(i, d);
3366
+ return u === !1 && (u = p.apply(i, d)), u;
3367
+ };
3368
+ }
3369
+ s.hooks = i;
3370
+ }
3371
+ if (r.walkTokens) {
3372
+ const i = this.defaults.walkTokens, o = r.walkTokens;
3373
+ s.walkTokens = function(a) {
3374
+ let c = [];
3375
+ return c.push(o.call(this, a)), i && (c = c.concat(i.call(this, a))), c;
3376
+ };
3377
+ }
3378
+ this.defaults = { ...this.defaults, ...s };
3379
+ }), this;
3380
+ }
3381
+ setOptions(e) {
3382
+ return this.defaults = { ...this.defaults, ...e }, this;
3383
+ }
3384
+ lexer(e, n) {
3385
+ return ge.lex(e, n ?? this.defaults);
3386
+ }
3387
+ parser(e, n) {
3388
+ return me.parse(e, n ?? this.defaults);
3389
+ }
3390
+ parseMarkdown(e) {
3391
+ return (r, s) => {
3392
+ const i = { ...s }, o = { ...this.defaults, ...i }, a = this.onError(!!o.silent, !!o.async);
3393
+ if (this.defaults.async === !0 && i.async === !1)
3394
+ return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));
3395
+ if (typeof r > "u" || r === null)
3396
+ return a(new Error("marked(): input parameter is undefined or null"));
3397
+ if (typeof r != "string")
3398
+ return a(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(r) + ", string expected"));
3399
+ o.hooks && (o.hooks.options = o, o.hooks.block = e);
3400
+ const c = o.hooks ? o.hooks.provideLexer() : e ? ge.lex : ge.lexInline, p = o.hooks ? o.hooks.provideParser() : e ? me.parse : me.parseInline;
3401
+ if (o.async)
3402
+ return Promise.resolve(o.hooks ? o.hooks.preprocess(r) : r).then((d) => c(d, o)).then((d) => o.hooks ? o.hooks.processAllTokens(d) : d).then((d) => o.walkTokens ? Promise.all(this.walkTokens(d, o.walkTokens)).then(() => d) : d).then((d) => p(d, o)).then((d) => o.hooks ? o.hooks.postprocess(d) : d).catch(a);
3403
+ try {
3404
+ o.hooks && (r = o.hooks.preprocess(r));
3405
+ let d = c(r, o);
3406
+ o.hooks && (d = o.hooks.processAllTokens(d)), o.walkTokens && this.walkTokens(d, o.walkTokens);
3407
+ let u = p(d, o);
3408
+ return o.hooks && (u = o.hooks.postprocess(u)), u;
3409
+ } catch (d) {
3410
+ return a(d);
3411
+ }
3412
+ };
3413
+ }
3414
+ onError(e, n) {
3415
+ return (r) => {
3416
+ if (r.message += `
3417
+ Please report this to https://github.com/markedjs/marked.`, e) {
3418
+ const s = "<p>An error occurred:</p><pre>" + fe(r.message + "", !0) + "</pre>";
3419
+ return n ? Promise.resolve(s) : s;
3420
+ }
3421
+ if (n)
3422
+ return Promise.reject(r);
3423
+ throw r;
3424
+ };
3425
+ }
3426
+ }
3427
+ const Xe = new Aa();
3428
+ function P(t, e) {
3429
+ return Xe.parse(t, e);
3430
+ }
3431
+ P.options = P.setOptions = function(t) {
3432
+ return Xe.setOptions(t), P.defaults = Xe.defaults, mi(P.defaults), P;
3433
+ };
3434
+ P.getDefaults = Ar;
3435
+ P.defaults = Qe;
3436
+ P.use = function(...t) {
3437
+ return Xe.use(...t), P.defaults = Xe.defaults, mi(P.defaults), P;
3438
+ };
3439
+ P.walkTokens = function(t, e) {
3440
+ return Xe.walkTokens(t, e);
3441
+ };
3442
+ P.parseInline = Xe.parseInline;
3443
+ P.Parser = me;
3444
+ P.parser = me.parse;
3445
+ P.Renderer = _n;
3446
+ P.TextRenderer = Cr;
3447
+ P.Lexer = ge;
3448
+ P.lexer = ge.lex;
3449
+ P.Tokenizer = gn;
3450
+ P.Hooks = Mt;
3451
+ P.parse = P;
3452
+ P.options;
3453
+ P.setOptions;
3454
+ P.use;
3455
+ P.walkTokens;
3456
+ P.parseInline;
3457
+ me.parse;
3458
+ ge.lex;
3459
+ /*! @license DOMPurify 3.4.10 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.10/LICENSE */
3460
+ function _s(t, e) {
3461
+ (e == null || e > t.length) && (e = t.length);
3462
+ for (var n = 0, r = Array(e); n < e; n++) r[n] = t[n];
3463
+ return r;
3464
+ }
3465
+ function Ra(t) {
3466
+ if (Array.isArray(t)) return t;
3467
+ }
3468
+ function Oa(t, e) {
3469
+ var n = t == null ? null : typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
3470
+ if (n != null) {
3471
+ var r, s, i, o, a = [], c = !0, p = !1;
3472
+ try {
3473
+ if (i = (n = n.call(t)).next, e !== 0) for (; !(c = (r = i.call(n)).done) && (a.push(r.value), a.length !== e); c = !0) ;
3474
+ } catch (d) {
3475
+ p = !0, s = d;
3476
+ } finally {
3477
+ try {
3478
+ if (!c && n.return != null && (o = n.return(), Object(o) !== o)) return;
3479
+ } finally {
3480
+ if (p) throw s;
3481
+ }
3482
+ }
3483
+ return a;
3484
+ }
3485
+ }
3486
+ function Na() {
3487
+ throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3488
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
3489
+ }
3490
+ function Ia(t, e) {
3491
+ return Ra(t) || Oa(t, e) || Da(t, e) || Na();
3492
+ }
3493
+ function Da(t, e) {
3494
+ if (t) {
3495
+ if (typeof t == "string") return _s(t, e);
3496
+ var n = {}.toString.call(t).slice(8, -1);
3497
+ return n === "Object" && t.constructor && (n = t.constructor.name), n === "Map" || n === "Set" ? Array.from(t) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? _s(t, e) : void 0;
3498
+ }
3499
+ }
3500
+ const vi = Object.entries, bs = Object.setPrototypeOf, Ca = Object.isFrozen, Ma = Object.getPrototypeOf, Pa = Object.getOwnPropertyDescriptor;
3501
+ let J = Object.freeze, te = Object.seal, at = Object.create, Ai = typeof Reflect < "u" && Reflect, pr = Ai.apply, dr = Ai.construct;
3502
+ J || (J = function(e) {
3503
+ return e;
3504
+ });
3505
+ te || (te = function(e) {
3506
+ return e;
3507
+ });
3508
+ pr || (pr = function(e, n) {
3509
+ for (var r = arguments.length, s = new Array(r > 2 ? r - 2 : 0), i = 2; i < r; i++)
3510
+ s[i - 2] = arguments[i];
3511
+ return e.apply(n, s);
3512
+ });
3513
+ dr || (dr = function(e) {
3514
+ for (var n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), s = 1; s < n; s++)
3515
+ r[s - 1] = arguments[s];
3516
+ return new e(...r);
3517
+ });
3518
+ const At = q(Array.prototype.forEach), $a = q(Array.prototype.lastIndexOf), ys = q(Array.prototype.pop), it = q(Array.prototype.push), La = q(Array.prototype.splice), Ue = Array.isArray, Nt = q(String.prototype.toLowerCase), Qn = q(String.prototype.toString), ws = q(String.prototype.match), Rt = q(String.prototype.replace), Es = q(String.prototype.indexOf), za = q(String.prototype.trim), ja = q(Number.prototype.toString), Fa = q(Boolean.prototype.toString), Ts = typeof BigInt > "u" ? null : q(BigInt.prototype.toString), xs = typeof Symbol > "u" ? null : q(Symbol.prototype.toString), oe = q(Object.prototype.hasOwnProperty), Ot = q(Object.prototype.toString), X = q(RegExp.prototype.test), Ge = Va(TypeError);
3519
+ function q(t) {
3520
+ return function(e) {
3521
+ e instanceof RegExp && (e.lastIndex = 0);
3522
+ for (var n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), s = 1; s < n; s++)
3523
+ r[s - 1] = arguments[s];
3524
+ return pr(t, e, r);
3525
+ };
3526
+ }
3527
+ function Va(t) {
3528
+ return function() {
3529
+ for (var e = arguments.length, n = new Array(e), r = 0; r < e; r++)
3530
+ n[r] = arguments[r];
3531
+ return dr(t, n);
3532
+ };
3533
+ }
3534
+ function D(t, e) {
3535
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Nt;
3536
+ if (bs && bs(t, null), !Ue(e))
3537
+ return t;
3538
+ let r = e.length;
3539
+ for (; r--; ) {
3540
+ let s = e[r];
3541
+ if (typeof s == "string") {
3542
+ const i = n(s);
3543
+ i !== s && (Ca(e) || (e[r] = i), s = i);
3544
+ }
3545
+ t[s] = !0;
3546
+ }
3547
+ return t;
3548
+ }
3549
+ function Ha(t) {
3550
+ for (let e = 0; e < t.length; e++)
3551
+ oe(t, e) || (t[e] = null);
3552
+ return t;
3553
+ }
3554
+ function ie(t) {
3555
+ const e = at(null);
3556
+ for (const r of vi(t)) {
3557
+ var n = Ia(r, 2);
3558
+ const s = n[0], i = n[1];
3559
+ oe(t, s) && (Ue(i) ? e[s] = Ha(i) : i && typeof i == "object" && i.constructor === Object ? e[s] = ie(i) : e[s] = i);
3560
+ }
3561
+ return e;
3562
+ }
3563
+ function Ua(t) {
3564
+ switch (typeof t) {
3565
+ case "string":
3566
+ return t;
3567
+ case "number":
3568
+ return ja(t);
3569
+ case "boolean":
3570
+ return Fa(t);
3571
+ case "bigint":
3572
+ return Ts ? Ts(t) : "0";
3573
+ case "symbol":
3574
+ return xs ? xs(t) : "Symbol()";
3575
+ case "undefined":
3576
+ return Ot(t);
3577
+ case "function":
3578
+ case "object": {
3579
+ if (t === null)
3580
+ return Ot(t);
3581
+ const e = t, n = xe(e, "toString");
3582
+ if (typeof n == "function") {
3583
+ const r = n(e);
3584
+ return typeof r == "string" ? r : Ot(r);
3585
+ }
3586
+ return Ot(t);
3587
+ }
3588
+ default:
3589
+ return Ot(t);
3590
+ }
3591
+ }
3592
+ function xe(t, e) {
3593
+ for (; t !== null; ) {
3594
+ const r = Pa(t, e);
3595
+ if (r) {
3596
+ if (r.get)
3597
+ return q(r.get);
3598
+ if (typeof r.value == "function")
3599
+ return q(r.value);
3600
+ }
3601
+ t = Ma(t);
3602
+ }
3603
+ function n() {
3604
+ return null;
3605
+ }
3606
+ return n;
3607
+ }
3608
+ function Ba(t) {
3609
+ try {
3610
+ return X(t, ""), !0;
3611
+ } catch {
3612
+ return !1;
3613
+ }
3614
+ }
3615
+ const ks = J(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), Jn = J(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), er = J(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), Wa = J(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), tr = J(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), Ga = J(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Ss = J(["#text"]), vs = J(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "command", "commandfor", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns"]), nr = J(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), As = J(["accent", "accentunder", "align", "bevelled", "close", "columnalign", "columnlines", "columnspacing", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lquote", "lspace", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), sn = J(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), qa = te(/{{[\w\W]*|^[\w\W]*}}/g), Ka = te(/<%[\w\W]*|^[\w\W]*%>/g), Ya = te(/\${[\w\W]*/g), Za = te(/^data-[\-\w.\u00B7-\uFFFF]+$/), Xa = te(/^aria-[\-\w]+$/), Rs = te(
3616
+ /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
3617
+ // eslint-disable-line no-useless-escape
3618
+ ), Qa = te(/^(?:\w+script|data):/i), Ja = te(
3619
+ /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
3620
+ // eslint-disable-line no-control-regex
3621
+ ), ec = te(/^html$/i), tc = te(/^[a-z][.\w]*(-[.\w]+)+$/i), Os = te(/<[/\w!]/g), nc = te(/<[/\w]/g), rc = te(/<\/no(script|embed|frames)/i), sc = te(/\/>/i), Te = {
3622
+ element: 1,
3623
+ attribute: 2,
3624
+ text: 3,
3625
+ cdataSection: 4,
3626
+ entityReference: 5,
3627
+ // Deprecated
3628
+ entityNode: 6,
3629
+ // Deprecated
3630
+ processingInstruction: 7,
3631
+ comment: 8,
3632
+ document: 9,
3633
+ documentType: 10,
3634
+ documentFragment: 11,
3635
+ notation: 12
3636
+ // Deprecated
3637
+ }, ic = function() {
3638
+ return typeof window > "u" ? null : window;
3639
+ }, oc = function(e, n) {
3640
+ if (typeof e != "object" || typeof e.createPolicy != "function")
3641
+ return null;
3642
+ let r = null;
3643
+ const s = "data-tt-policy-suffix";
3644
+ n && n.hasAttribute(s) && (r = n.getAttribute(s));
3645
+ const i = "dompurify" + (r ? "#" + r : "");
3646
+ try {
3647
+ return e.createPolicy(i, {
3648
+ createHTML(o) {
3649
+ return o;
3650
+ },
3651
+ createScriptURL(o) {
3652
+ return o;
3653
+ }
3654
+ });
3655
+ } catch {
3656
+ return console.warn("TrustedTypes policy " + i + " could not be created."), null;
3657
+ }
3658
+ }, Ns = function() {
3659
+ return {
3660
+ afterSanitizeAttributes: [],
3661
+ afterSanitizeElements: [],
3662
+ afterSanitizeShadowDOM: [],
3663
+ beforeSanitizeAttributes: [],
3664
+ beforeSanitizeElements: [],
3665
+ beforeSanitizeShadowDOM: [],
3666
+ uponSanitizeAttribute: [],
3667
+ uponSanitizeElement: [],
3668
+ uponSanitizeShadowNode: []
3669
+ };
3670
+ }, je = function(e, n, r, s) {
3671
+ return oe(e, n) && Ue(e[n]) ? D(s.base ? ie(s.base) : {}, e[n], s.transform) : r;
3672
+ };
3673
+ function Ri() {
3674
+ let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ic();
3675
+ const e = (y) => Ri(y);
3676
+ if (e.version = "3.4.10", e.removed = [], !t || !t.document || t.document.nodeType !== Te.document || !t.Element)
3677
+ return e.isSupported = !1, e;
3678
+ let n = t.document;
3679
+ const r = n, s = r.currentScript;
3680
+ t.DocumentFragment;
3681
+ const i = t.HTMLTemplateElement, o = t.Node, a = t.Element, c = t.NodeFilter, p = t.NamedNodeMap;
3682
+ p === void 0 && (t.NamedNodeMap || t.MozNamedAttrMap), t.HTMLFormElement;
3683
+ const d = t.DOMParser, u = t.trustedTypes, h = a.prototype, g = xe(h, "cloneNode"), m = xe(h, "remove"), b = xe(h, "nextSibling"), x = xe(h, "childNodes"), A = xe(h, "parentNode"), R = xe(h, "shadowRoot"), S = xe(h, "attributes"), w = o && o.prototype ? xe(o.prototype, "nodeType") : null, T = o && o.prototype ? xe(o.prototype, "nodeName") : null;
3684
+ if (typeof i == "function") {
3685
+ const y = n.createElement("template");
3686
+ y.content && y.content.ownerDocument && (n = y.content.ownerDocument);
3687
+ }
3688
+ let k, v = "", z, ne = !1, _e = 0;
3689
+ const pe = function() {
3690
+ if (_e > 0)
3691
+ throw Ge('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.');
3692
+ }, I = function(l) {
3693
+ pe(), _e++;
3694
+ try {
3695
+ return k.createHTML(l);
3696
+ } finally {
3697
+ _e--;
3698
+ }
3699
+ }, re = function(l) {
3700
+ pe(), _e++;
3701
+ try {
3702
+ return k.createScriptURL(l);
3703
+ } finally {
3704
+ _e--;
3705
+ }
3706
+ }, yt = function() {
3707
+ return ne || (z = oc(u, s), ne = !0), z;
3708
+ }, Me = n, Pe = Me.implementation, Rn = Me.createNodeIterator, Ni = Me.createDocumentFragment, Ii = Me.getElementsByTagName, Di = r.importNode;
3709
+ let K = Ns();
3710
+ e.isSupported = typeof vi == "function" && typeof A == "function" && Pe && Pe.createHTMLDocument !== void 0;
3711
+ const Ci = qa, Mi = Ka, Pi = Ya, $i = Za, Li = Xa, zi = Qa, Mr = Ja, ji = tc;
3712
+ let Pr = Rs, U = null;
3713
+ const On = D({}, [...ks, ...Jn, ...er, ...tr, ...Ss]);
3714
+ let B = null;
3715
+ const Nn = D({}, [...vs, ...nr, ...As, ...sn]);
3716
+ let j = Object.seal(at(null, {
3717
+ tagNameCheck: {
3718
+ writable: !0,
3719
+ configurable: !1,
3720
+ enumerable: !0,
3721
+ value: null
3722
+ },
3723
+ attributeNameCheck: {
3724
+ writable: !0,
3725
+ configurable: !1,
3726
+ enumerable: !0,
3727
+ value: null
3728
+ },
3729
+ allowCustomizedBuiltInElements: {
3730
+ writable: !0,
3731
+ configurable: !1,
3732
+ enumerable: !0,
3733
+ value: !1
3734
+ }
3735
+ })), wt = null, $r = null;
3736
+ const $e = Object.seal(at(null, {
3737
+ tagCheck: {
3738
+ writable: !0,
3739
+ configurable: !1,
3740
+ enumerable: !0,
3741
+ value: null
3742
+ },
3743
+ attributeCheck: {
3744
+ writable: !0,
3745
+ configurable: !1,
3746
+ enumerable: !0,
3747
+ value: null
3748
+ }
3749
+ }));
3750
+ let Lr = !0, In = !0, zr = !1, jr = !0, Le = !1, Et = !0, Be = !1, Dn = !1, Cn = !1, Je = !1, Gt = !1, qt = !1, Fr = !0, Vr = !1;
3751
+ const Hr = "user-content-";
3752
+ let Mn = !0, Pn = !1, et = {}, we = null;
3753
+ const $n = D({}, [
3754
+ "annotation-xml",
3755
+ "audio",
3756
+ "colgroup",
3757
+ "desc",
3758
+ "foreignobject",
3759
+ "head",
3760
+ "iframe",
3761
+ "math",
3762
+ "mi",
3763
+ "mn",
3764
+ "mo",
3765
+ "ms",
3766
+ "mtext",
3767
+ "noembed",
3768
+ "noframes",
3769
+ "noscript",
3770
+ "plaintext",
3771
+ "script",
3772
+ // <selectedcontent> mirrors the selected <option>'s subtree, cloned by
3773
+ // the UA (customizable <select>) — including any on* handlers — and the
3774
+ // engine re-mirrors synchronously whenever a removal changes which
3775
+ // option/selectedcontent is current, even inside DOMPurify's inert
3776
+ // DOMParser document. Hoisting its children on removal re-inserts a fresh
3777
+ // mirror target ahead of the walk, which the engine refills, looping
3778
+ // forever (DoS) and amplifying output. Dropping its content on removal
3779
+ // (rather than hoisting) breaks that cascade; the content is a duplicate
3780
+ // of the option, which is sanitized on its own. See campaign-3 F1/F6.
3781
+ "selectedcontent",
3782
+ "style",
3783
+ "svg",
3784
+ "template",
3785
+ "thead",
3786
+ "title",
3787
+ "video",
3788
+ "xmp"
3789
+ ]);
3790
+ let Ur = null;
3791
+ const Br = D({}, ["audio", "video", "img", "source", "image", "track"]);
3792
+ let Ln = null;
3793
+ const Wr = D({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), Kt = "http://www.w3.org/1998/Math/MathML", Yt = "http://www.w3.org/2000/svg", Ee = "http://www.w3.org/1999/xhtml";
3794
+ let tt = Ee, zn = !1, jn = null;
3795
+ const Fi = D({}, [Kt, Yt, Ee], Qn), Gr = J(["mi", "mo", "mn", "ms", "mtext"]);
3796
+ let Fn = D({}, Gr);
3797
+ const qr = J(["annotation-xml"]);
3798
+ let Vn = D({}, qr);
3799
+ const Vi = D({}, ["title", "style", "font", "a", "script"]);
3800
+ let Tt = null;
3801
+ const Hi = ["application/xhtml+xml", "text/html"], Ui = "text/html";
3802
+ let F = null, nt = null;
3803
+ const Bi = n.createElement("form"), Kr = function(l) {
3804
+ return l instanceof RegExp || l instanceof Function;
3805
+ }, Hn = function() {
3806
+ let l = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
3807
+ if (nt && nt === l)
3808
+ return;
3809
+ (!l || typeof l != "object") && (l = {}), l = ie(l), Tt = // eslint-disable-next-line unicorn/prefer-includes
3810
+ Hi.indexOf(l.PARSER_MEDIA_TYPE) === -1 ? Ui : l.PARSER_MEDIA_TYPE, F = Tt === "application/xhtml+xml" ? Qn : Nt, U = je(l, "ALLOWED_TAGS", On, {
3811
+ transform: F
3812
+ }), B = je(l, "ALLOWED_ATTR", Nn, {
3813
+ transform: F
3814
+ }), jn = je(l, "ALLOWED_NAMESPACES", Fi, {
3815
+ transform: Qn
3816
+ }), Ln = je(l, "ADD_URI_SAFE_ATTR", Wr, {
3817
+ transform: F,
3818
+ base: Wr
3819
+ }), Ur = je(l, "ADD_DATA_URI_TAGS", Br, {
3820
+ transform: F,
3821
+ base: Br
3822
+ }), we = je(l, "FORBID_CONTENTS", $n, {
3823
+ transform: F
3824
+ }), wt = je(l, "FORBID_TAGS", ie({}), {
3825
+ transform: F
3826
+ }), $r = je(l, "FORBID_ATTR", ie({}), {
3827
+ transform: F
3828
+ }), et = oe(l, "USE_PROFILES") ? l.USE_PROFILES && typeof l.USE_PROFILES == "object" ? ie(l.USE_PROFILES) : l.USE_PROFILES : !1, Lr = l.ALLOW_ARIA_ATTR !== !1, In = l.ALLOW_DATA_ATTR !== !1, zr = l.ALLOW_UNKNOWN_PROTOCOLS || !1, jr = l.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Le = l.SAFE_FOR_TEMPLATES || !1, Et = l.SAFE_FOR_XML !== !1, Be = l.WHOLE_DOCUMENT || !1, Je = l.RETURN_DOM || !1, Gt = l.RETURN_DOM_FRAGMENT || !1, qt = l.RETURN_TRUSTED_TYPE || !1, Cn = l.FORCE_BODY || !1, Fr = l.SANITIZE_DOM !== !1, Vr = l.SANITIZE_NAMED_PROPS || !1, Mn = l.KEEP_CONTENT !== !1, Pn = l.IN_PLACE || !1, Pr = Ba(l.ALLOWED_URI_REGEXP) ? l.ALLOWED_URI_REGEXP : Rs, tt = typeof l.NAMESPACE == "string" ? l.NAMESPACE : Ee, Fn = oe(l, "MATHML_TEXT_INTEGRATION_POINTS") && l.MATHML_TEXT_INTEGRATION_POINTS && typeof l.MATHML_TEXT_INTEGRATION_POINTS == "object" ? ie(l.MATHML_TEXT_INTEGRATION_POINTS) : D({}, Gr), Vn = oe(l, "HTML_INTEGRATION_POINTS") && l.HTML_INTEGRATION_POINTS && typeof l.HTML_INTEGRATION_POINTS == "object" ? ie(l.HTML_INTEGRATION_POINTS) : D({}, qr);
3829
+ const f = oe(l, "CUSTOM_ELEMENT_HANDLING") && l.CUSTOM_ELEMENT_HANDLING && typeof l.CUSTOM_ELEMENT_HANDLING == "object" ? ie(l.CUSTOM_ELEMENT_HANDLING) : at(null);
3830
+ if (j = at(null), oe(f, "tagNameCheck") && Kr(f.tagNameCheck) && (j.tagNameCheck = f.tagNameCheck), oe(f, "attributeNameCheck") && Kr(f.attributeNameCheck) && (j.attributeNameCheck = f.attributeNameCheck), oe(f, "allowCustomizedBuiltInElements") && typeof f.allowCustomizedBuiltInElements == "boolean" && (j.allowCustomizedBuiltInElements = f.allowCustomizedBuiltInElements), te(j), Le && (In = !1), Gt && (Je = !0), et && (U = D({}, Ss), B = at(null), et.html === !0 && (D(U, ks), D(B, vs)), et.svg === !0 && (D(U, Jn), D(B, nr), D(B, sn)), et.svgFilters === !0 && (D(U, er), D(B, nr), D(B, sn)), et.mathMl === !0 && (D(U, tr), D(B, As), D(B, sn))), $e.tagCheck = null, $e.attributeCheck = null, oe(l, "ADD_TAGS") && (typeof l.ADD_TAGS == "function" ? $e.tagCheck = l.ADD_TAGS : Ue(l.ADD_TAGS) && (U === On && (U = ie(U)), D(U, l.ADD_TAGS, F))), oe(l, "ADD_ATTR") && (typeof l.ADD_ATTR == "function" ? $e.attributeCheck = l.ADD_ATTR : Ue(l.ADD_ATTR) && (B === Nn && (B = ie(B)), D(B, l.ADD_ATTR, F))), oe(l, "ADD_URI_SAFE_ATTR") && Ue(l.ADD_URI_SAFE_ATTR) && D(Ln, l.ADD_URI_SAFE_ATTR, F), oe(l, "FORBID_CONTENTS") && Ue(l.FORBID_CONTENTS) && (we === $n && (we = ie(we)), D(we, l.FORBID_CONTENTS, F)), oe(l, "ADD_FORBID_CONTENTS") && Ue(l.ADD_FORBID_CONTENTS) && (we === $n && (we = ie(we)), D(we, l.ADD_FORBID_CONTENTS, F)), Mn && (U["#text"] = !0), Be && D(U, ["html", "head", "body"]), U.table && (D(U, ["tbody"]), delete wt.tbody), l.TRUSTED_TYPES_POLICY) {
3831
+ if (typeof l.TRUSTED_TYPES_POLICY.createHTML != "function")
3832
+ throw Ge('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
3833
+ if (typeof l.TRUSTED_TYPES_POLICY.createScriptURL != "function")
3834
+ throw Ge('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
3835
+ const _ = k;
3836
+ k = l.TRUSTED_TYPES_POLICY;
3837
+ try {
3838
+ v = I("");
3839
+ } catch (E) {
3840
+ throw k = _, E;
3841
+ }
3842
+ } else l.TRUSTED_TYPES_POLICY === null ? (k = void 0, v = "") : (k === void 0 && (k = yt()), k && typeof v == "string" && (v = I("")));
3843
+ (K.uponSanitizeElement.length > 0 || K.uponSanitizeAttribute.length > 0) && U === On && (U = ie(U)), K.uponSanitizeAttribute.length > 0 && B === Nn && (B = ie(B)), J && J(l), nt = l;
3844
+ }, Yr = D({}, [...Jn, ...er, ...Wa]), Zr = D({}, [...tr, ...Ga]), Wi = function(l, f, _) {
3845
+ return f.namespaceURI === Ee ? l === "svg" : f.namespaceURI === Kt ? l === "svg" && (_ === "annotation-xml" || Fn[_]) : !!Yr[l];
3846
+ }, Gi = function(l, f, _) {
3847
+ return f.namespaceURI === Ee ? l === "math" : f.namespaceURI === Yt ? l === "math" && Vn[_] : !!Zr[l];
3848
+ }, qi = function(l, f, _) {
3849
+ return f.namespaceURI === Yt && !Vn[_] || f.namespaceURI === Kt && !Fn[_] ? !1 : !Zr[l] && (Vi[l] || !Yr[l]);
3850
+ }, Ki = function(l) {
3851
+ let f = A(l);
3852
+ (!f || !f.tagName) && (f = {
3853
+ namespaceURI: tt,
3854
+ tagName: "template"
3855
+ });
3856
+ const _ = Nt(l.tagName), E = Nt(f.tagName);
3857
+ return jn[l.namespaceURI] ? l.namespaceURI === Yt ? Wi(_, f, E) : l.namespaceURI === Kt ? Gi(_, f, E) : l.namespaceURI === Ee ? qi(_, f, E) : !!(Tt === "application/xhtml+xml" && jn[l.namespaceURI]) : !1;
3858
+ }, ze = function(l) {
3859
+ it(e.removed, {
3860
+ element: l
3861
+ });
3862
+ try {
3863
+ A(l).removeChild(l);
3864
+ } catch {
3865
+ if (m(l), !A(l))
3866
+ throw Ge("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
3867
+ }
3868
+ }, Xr = function(l) {
3869
+ const f = x(l);
3870
+ if (f) {
3871
+ const E = [];
3872
+ At(f, (O) => {
3873
+ it(E, O);
3874
+ }), At(E, (O) => {
3875
+ try {
3876
+ m(O);
3877
+ } catch {
3878
+ }
3879
+ });
3880
+ }
3881
+ const _ = S(l);
3882
+ if (_)
3883
+ for (let E = _.length - 1; E >= 0; --E) {
3884
+ const O = _[E], C = O && O.name;
3885
+ if (typeof C == "string")
3886
+ try {
3887
+ l.removeAttribute(C);
3888
+ } catch {
3889
+ }
3890
+ }
3891
+ }, We = function(l, f) {
3892
+ try {
3893
+ it(e.removed, {
3894
+ attribute: f.getAttributeNode(l),
3895
+ from: f
3896
+ });
3897
+ } catch {
3898
+ it(e.removed, {
3899
+ attribute: null,
3900
+ from: f
3901
+ });
3902
+ }
3903
+ if (f.removeAttribute(l), l === "is")
3904
+ if (Je || Gt)
3905
+ try {
3906
+ ze(f);
3907
+ } catch {
3908
+ }
3909
+ else
3910
+ try {
3911
+ f.setAttribute(l, "");
3912
+ } catch {
3913
+ }
3914
+ }, Yi = function(l) {
3915
+ const f = S(l);
3916
+ if (f)
3917
+ for (let _ = f.length - 1; _ >= 0; --_) {
3918
+ const E = f[_], O = E && E.name;
3919
+ if (!(typeof O != "string" || B[F(O)]))
3920
+ try {
3921
+ l.removeAttribute(O);
3922
+ } catch {
3923
+ }
3924
+ }
3925
+ }, Zi = function(l) {
3926
+ const f = [l];
3927
+ for (; f.length > 0; ) {
3928
+ const _ = f.pop();
3929
+ (w ? w(_) : _.nodeType) === Te.element && Yi(_);
3930
+ const O = x(_);
3931
+ if (O)
3932
+ for (let C = O.length - 1; C >= 0; --C)
3933
+ f.push(O[C]);
3934
+ }
3935
+ }, Qr = function(l) {
3936
+ let f = null, _ = null;
3937
+ if (Cn)
3938
+ l = "<remove></remove>" + l;
3939
+ else {
3940
+ const C = ws(l, /^[\r\n\t ]+/);
3941
+ _ = C && C[0];
3942
+ }
3943
+ Tt === "application/xhtml+xml" && tt === Ee && (l = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + l + "</body></html>");
3944
+ const E = k ? I(l) : l;
3945
+ if (tt === Ee)
3946
+ try {
3947
+ f = new d().parseFromString(E, Tt);
3948
+ } catch {
3949
+ }
3950
+ if (!f || !f.documentElement) {
3951
+ f = Pe.createDocument(tt, "template", null);
3952
+ try {
3953
+ f.documentElement.innerHTML = zn ? v : E;
3954
+ } catch {
3955
+ }
3956
+ }
3957
+ const O = f.body || f.documentElement;
3958
+ return l && _ && O.insertBefore(n.createTextNode(_), O.childNodes[0] || null), tt === Ee ? Ii.call(f, Be ? "html" : "body")[0] : Be ? f.documentElement : O;
3959
+ }, Jr = function(l) {
3960
+ return Rn.call(
3961
+ l.ownerDocument || l,
3962
+ l,
3963
+ // eslint-disable-next-line no-bitwise
3964
+ c.SHOW_ELEMENT | c.SHOW_COMMENT | c.SHOW_TEXT | c.SHOW_PROCESSING_INSTRUCTION | c.SHOW_CDATA_SECTION,
3965
+ null
3966
+ );
3967
+ }, Zt = function(l) {
3968
+ return l = Rt(l, Ci, " "), l = Rt(l, Mi, " "), l = Rt(l, Pi, " "), l;
3969
+ }, Un = function(l) {
3970
+ var f;
3971
+ l.normalize();
3972
+ const _ = Rn.call(
3973
+ l.ownerDocument || l,
3974
+ l,
3975
+ // eslint-disable-next-line no-bitwise
3976
+ c.SHOW_TEXT | c.SHOW_COMMENT | c.SHOW_CDATA_SECTION | c.SHOW_PROCESSING_INSTRUCTION,
3977
+ null
3978
+ );
3979
+ let E = _.nextNode();
3980
+ for (; E; )
3981
+ E.data = Zt(E.data), E = _.nextNode();
3982
+ const O = (f = l.querySelectorAll) === null || f === void 0 ? void 0 : f.call(l, "template");
3983
+ O && At(O, (C) => {
3984
+ rt(C.content) && Un(C.content);
3985
+ });
3986
+ }, Xt = function(l) {
3987
+ const f = T ? T(l) : null;
3988
+ return typeof f != "string" || F(f) !== "form" ? !1 : typeof l.nodeName != "string" || typeof l.textContent != "string" || typeof l.removeChild != "function" || // Realm-safe NamedNodeMap detection: equality against the cached
3989
+ // prototype getter. Clobbered .attributes (e.g. <input name="attributes">)
3990
+ // makes the direct read diverge from the cached read; a clean form
3991
+ // (same-realm OR foreign-realm) has both reads pointing at the same
3992
+ // canonical NamedNodeMap.
3993
+ l.attributes !== S(l) || typeof l.removeAttribute != "function" || typeof l.setAttribute != "function" || typeof l.namespaceURI != "string" || typeof l.insertBefore != "function" || typeof l.hasChildNodes != "function" || // NodeType clobbering probe. Cached Node.prototype.nodeType getter
3994
+ // returns the integer 1 for any Element regardless of realm; direct
3995
+ // read on a clobbered form (e.g. <input name="nodeType">) returns
3996
+ // the named child element. Cheap addition — nodeType is read from
3997
+ // an internal slot, no serialization cost — and removes a residual
3998
+ // clobbering surface used by several mXSS / PI / comment branches
3999
+ // in _sanitizeElements that compare currentNode.nodeType directly.
4000
+ l.nodeType !== w(l) || // HTMLFormElement has [LegacyOverrideBuiltIns]: a descendant named
4001
+ // "childNodes" shadows the prototype getter. Direct reads of
4002
+ // form.childNodes from a clobbered form return the named child
4003
+ // instead of the real NodeList, so any walk that reads it directly
4004
+ // skips the form's real children. Compare the direct read to the
4005
+ // cached Node.prototype getter — when the form's named-property
4006
+ // getter intercepts the read, the two values differ and we flag
4007
+ // the form. This catches every clobbering child type (input,
4008
+ // select, etc.) regardless of whether the named child happens to
4009
+ // carry a numeric .length, which a typeof-based probe would miss
4010
+ // (e.g. HTMLSelectElement.length is a defined unsigned-long).
4011
+ l.childNodes !== x(l);
4012
+ }, rt = function(l) {
4013
+ if (!w || typeof l != "object" || l === null)
4014
+ return !1;
4015
+ try {
4016
+ return w(l) === Te.documentFragment;
4017
+ } catch {
4018
+ return !1;
4019
+ }
4020
+ }, xt = function(l) {
4021
+ if (!w || typeof l != "object" || l === null)
4022
+ return !1;
4023
+ try {
4024
+ return typeof w(l) == "number";
4025
+ } catch {
4026
+ return !1;
4027
+ }
4028
+ };
4029
+ function Re(y, l, f) {
4030
+ y.length !== 0 && At(y, (_) => {
4031
+ _.call(e, l, f, nt);
4032
+ });
4033
+ }
4034
+ const Xi = function(l, f) {
4035
+ return !!(Et && l.hasChildNodes() && !xt(l.firstElementChild) && X(Os, l.textContent) && X(Os, l.innerHTML) || Et && l.namespaceURI === Ee && f === "style" && xt(l.firstElementChild) || l.nodeType === Te.processingInstruction || Et && l.nodeType === Te.comment && X(nc, l.data));
4036
+ }, Qi = function(l, f) {
4037
+ if (!wt[f] && ns(f) && (j.tagNameCheck instanceof RegExp && X(j.tagNameCheck, f) || j.tagNameCheck instanceof Function && j.tagNameCheck(f)))
4038
+ return !1;
4039
+ if (Mn && !we[f]) {
4040
+ const _ = A(l), E = x(l);
4041
+ if (E && _) {
4042
+ const O = E.length;
4043
+ for (let C = O - 1; C >= 0; --C) {
4044
+ const Y = Pn ? E[C] : g(E[C], !0);
4045
+ _.insertBefore(Y, b(l));
4046
+ }
4047
+ }
4048
+ }
4049
+ return ze(l), !0;
4050
+ }, es = function(l) {
4051
+ if (Re(K.beforeSanitizeElements, l, null), Xt(l))
4052
+ return ze(l), !0;
4053
+ const f = F(T ? T(l) : l.nodeName);
4054
+ if (Re(K.uponSanitizeElement, l, {
4055
+ tagName: f,
4056
+ allowedTags: U
4057
+ }), Xi(l, f))
4058
+ return ze(l), !0;
4059
+ if (wt[f] || !($e.tagCheck instanceof Function && $e.tagCheck(f)) && !U[f])
4060
+ return Qi(l, f);
4061
+ if ((w ? w(l) : l.nodeType) === Te.element && !Ki(l) || (f === "noscript" || f === "noembed" || f === "noframes") && X(rc, l.innerHTML))
4062
+ return ze(l), !0;
4063
+ if (Le && l.nodeType === Te.text) {
4064
+ const E = Zt(l.textContent);
4065
+ l.textContent !== E && (it(e.removed, {
4066
+ element: l.cloneNode()
4067
+ }), l.textContent = E);
4068
+ }
4069
+ return Re(K.afterSanitizeElements, l, null), !1;
4070
+ }, ts = function(l, f, _) {
4071
+ if ($r[f] || Fr && (f === "id" || f === "name") && (_ in n || _ in Bi))
4072
+ return !1;
4073
+ const E = B[f] || $e.attributeCheck instanceof Function && $e.attributeCheck(f, l);
4074
+ if (!(In && X($i, f))) {
4075
+ if (!(Lr && X(Li, f))) {
4076
+ if (E) {
4077
+ if (!Ln[f]) {
4078
+ if (!X(Pr, Rt(_, Mr, ""))) {
4079
+ if (!((f === "src" || f === "xlink:href" || f === "href") && l !== "script" && Es(_, "data:") === 0 && Ur[l])) {
4080
+ if (!(zr && !X(zi, Rt(_, Mr, "")))) {
4081
+ if (_)
4082
+ return !1;
4083
+ }
4084
+ }
4085
+ }
4086
+ }
4087
+ } else if (
4088
+ // First condition does a very basic check if a) it's basically a valid custom element tagname AND
4089
+ // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
4090
+ // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
4091
+ !(ns(l) && (j.tagNameCheck instanceof RegExp && X(j.tagNameCheck, l) || j.tagNameCheck instanceof Function && j.tagNameCheck(l)) && (j.attributeNameCheck instanceof RegExp && X(j.attributeNameCheck, f) || j.attributeNameCheck instanceof Function && j.attributeNameCheck(f, l)) || // Alternative, second condition checks if it's an `is`-attribute, AND
4092
+ // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
4093
+ f === "is" && j.allowCustomizedBuiltInElements && (j.tagNameCheck instanceof RegExp && X(j.tagNameCheck, _) || j.tagNameCheck instanceof Function && j.tagNameCheck(_)))
4094
+ ) return !1;
4095
+ }
4096
+ }
4097
+ return !0;
4098
+ }, Ji = D({}, ["annotation-xml", "color-profile", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "missing-glyph"]), ns = function(l) {
4099
+ return !Ji[Nt(l)] && X(ji, l);
4100
+ }, eo = function(l, f, _, E) {
4101
+ if (k && typeof u == "object" && typeof u.getAttributeType == "function" && !_)
4102
+ switch (u.getAttributeType(l, f)) {
4103
+ case "TrustedHTML":
4104
+ return I(E);
4105
+ case "TrustedScriptURL":
4106
+ return re(E);
4107
+ }
4108
+ return E;
4109
+ }, to = function(l, f, _, E) {
4110
+ try {
4111
+ _ ? l.setAttributeNS(_, f, E) : l.setAttribute(f, E), Xt(l) ? ze(l) : ys(e.removed);
4112
+ } catch {
4113
+ We(f, l);
4114
+ }
4115
+ }, rs = function(l) {
4116
+ Re(K.beforeSanitizeAttributes, l, null);
4117
+ const f = l.attributes;
4118
+ if (!f || Xt(l))
4119
+ return;
4120
+ const _ = {
4121
+ attrName: "",
4122
+ attrValue: "",
4123
+ keepAttr: !0,
4124
+ allowedAttributes: B,
4125
+ forceKeepAttr: void 0
4126
+ };
4127
+ let E = f.length;
4128
+ const O = F(l.nodeName);
4129
+ for (; E--; ) {
4130
+ const C = f[E], Y = C.name, G = C.namespaceURI, de = C.value, be = F(Y), Wn = de;
4131
+ let se = Y === "value" ? Wn : za(Wn);
4132
+ if (_.attrName = be, _.attrValue = se, _.keepAttr = !0, _.forceKeepAttr = void 0, Re(K.uponSanitizeAttribute, l, _), se = _.attrValue, Vr && (be === "id" || be === "name") && Es(se, Hr) !== 0 && (We(Y, l), se = Hr + se), Et && X(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, se)) {
4133
+ We(Y, l);
4134
+ continue;
4135
+ }
4136
+ if (be === "attributename" && ws(se, "href")) {
4137
+ We(Y, l);
4138
+ continue;
4139
+ }
4140
+ if (!_.forceKeepAttr) {
4141
+ if (!_.keepAttr) {
4142
+ We(Y, l);
4143
+ continue;
4144
+ }
4145
+ if (!jr && X(sc, se)) {
4146
+ We(Y, l);
4147
+ continue;
4148
+ }
4149
+ if (Le && (se = Zt(se)), !ts(O, be, se)) {
4150
+ We(Y, l);
4151
+ continue;
4152
+ }
4153
+ se = eo(O, be, G, se), se !== Wn && to(l, Y, G, se);
4154
+ }
4155
+ }
4156
+ Re(K.afterSanitizeAttributes, l, null);
4157
+ }, Qt = function(l) {
4158
+ let f = null;
4159
+ const _ = Jr(l);
4160
+ for (Re(K.beforeSanitizeShadowDOM, l, null); f = _.nextNode(); )
4161
+ if (Re(K.uponSanitizeShadowNode, f, null), es(f), rs(f), rt(f.content) && Qt(f.content), (w ? w(f) : f.nodeType) === Te.element) {
4162
+ const O = R(f);
4163
+ rt(O) && (Bn(O), Qt(O));
4164
+ }
4165
+ Re(K.afterSanitizeShadowDOM, l, null);
4166
+ }, Bn = function(l) {
4167
+ const f = [{
4168
+ node: l,
4169
+ shadow: null
4170
+ }];
4171
+ for (; f.length > 0; ) {
4172
+ const _ = f.pop();
4173
+ if (_.shadow) {
4174
+ Qt(_.shadow);
4175
+ continue;
4176
+ }
4177
+ const E = _.node, C = (w ? w(E) : E.nodeType) === Te.element, Y = x(E);
4178
+ if (Y)
4179
+ for (let G = Y.length - 1; G >= 0; --G)
4180
+ f.push({
4181
+ node: Y[G],
4182
+ shadow: null
4183
+ });
4184
+ if (C) {
4185
+ const G = T ? T(E) : null;
4186
+ if (typeof G == "string" && F(G) === "template") {
4187
+ const de = E.content;
4188
+ rt(de) && f.push({
4189
+ node: de,
4190
+ shadow: null
4191
+ });
4192
+ }
4193
+ }
4194
+ if (C) {
4195
+ const G = R(E);
4196
+ rt(G) && f.push({
4197
+ node: null,
4198
+ shadow: G
4199
+ }, {
4200
+ node: G,
4201
+ shadow: null
4202
+ });
4203
+ }
4204
+ }
4205
+ };
4206
+ return e.sanitize = function(y) {
4207
+ let l = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, f = null, _ = null, E = null, O = null;
4208
+ if (zn = !y, zn && (y = "<!-->"), typeof y != "string" && !xt(y) && (y = Ua(y), typeof y != "string"))
4209
+ throw Ge("dirty is not a string, aborting");
4210
+ if (!e.isSupported)
4211
+ return y;
4212
+ Dn || Hn(l), e.removed = [];
4213
+ const C = Pn && typeof y != "string" && xt(y);
4214
+ if (C) {
4215
+ const de = T ? T(y) : y.nodeName;
4216
+ if (typeof de == "string") {
4217
+ const be = F(de);
4218
+ if (!U[be] || wt[be])
4219
+ throw Ge("root node is forbidden and cannot be sanitized in-place");
4220
+ }
4221
+ if (Xt(y))
4222
+ throw Ge("root node is clobbered and cannot be sanitized in-place");
4223
+ try {
4224
+ Bn(y);
4225
+ } catch (be) {
4226
+ throw Xr(y), be;
4227
+ }
4228
+ } else if (xt(y))
4229
+ f = Qr("<!---->"), _ = f.ownerDocument.importNode(y, !0), _.nodeType === Te.element && _.nodeName === "BODY" || _.nodeName === "HTML" ? f = _ : f.appendChild(_), Bn(_);
4230
+ else {
4231
+ if (!Je && !Le && !Be && // eslint-disable-next-line unicorn/prefer-includes
4232
+ y.indexOf("<") === -1)
4233
+ return k && qt ? I(y) : y;
4234
+ if (f = Qr(y), !f)
4235
+ return Je ? null : qt ? v : "";
4236
+ }
4237
+ f && Cn && ze(f.firstChild);
4238
+ const Y = Jr(C ? y : f);
4239
+ try {
4240
+ for (; E = Y.nextNode(); )
4241
+ es(E), rs(E), rt(E.content) && Qt(E.content);
4242
+ } catch (de) {
4243
+ throw C && Xr(y), de;
4244
+ }
4245
+ if (C)
4246
+ return At(e.removed, (de) => {
4247
+ de.element && Zi(de.element);
4248
+ }), Le && Un(y), y;
4249
+ if (Je) {
4250
+ if (Le && Un(f), Gt)
4251
+ for (O = Ni.call(f.ownerDocument); f.firstChild; )
4252
+ O.appendChild(f.firstChild);
4253
+ else
4254
+ O = f;
4255
+ return (B.shadowroot || B.shadowrootmode) && (O = Di.call(r, O, !0)), O;
4256
+ }
4257
+ let G = Be ? f.outerHTML : f.innerHTML;
4258
+ return Be && U["!doctype"] && f.ownerDocument && f.ownerDocument.doctype && f.ownerDocument.doctype.name && X(ec, f.ownerDocument.doctype.name) && (G = "<!DOCTYPE " + f.ownerDocument.doctype.name + `>
4259
+ ` + G), Le && (G = Zt(G)), k && qt ? I(G) : G;
4260
+ }, e.setConfig = function() {
4261
+ let y = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
4262
+ Hn(y), Dn = !0;
4263
+ }, e.clearConfig = function() {
4264
+ nt = null, Dn = !1, k = z, v = "";
4265
+ }, e.isValidAttribute = function(y, l, f) {
4266
+ nt || Hn({});
4267
+ const _ = F(y), E = F(l);
4268
+ return ts(_, E, f);
4269
+ }, e.addHook = function(y, l) {
4270
+ typeof l == "function" && it(K[y], l);
4271
+ }, e.removeHook = function(y, l) {
4272
+ if (l !== void 0) {
4273
+ const f = $a(K[y], l);
4274
+ return f === -1 ? void 0 : La(K[y], f, 1)[0];
4275
+ }
4276
+ return ys(K[y]);
4277
+ }, e.removeHooks = function(y) {
4278
+ K[y] = [];
4279
+ }, e.removeAllHooks = function() {
4280
+ K = Ns();
4281
+ }, e;
4282
+ }
4283
+ var lc = Ri();
4284
+ const ac = {
4285
+ tooltipAttributes: {
4286
+ maxWidth: "300px",
4287
+ placement: "top"
4288
+ }
4289
+ };
4290
+ function Oi(t, e = "") {
4291
+ const n = {}, r = t;
4292
+ return Array.isArray(r.fields) ? Object.assign(n, Sn(r, e)) : t.type === "array" && t.elements ? Object.assign(n, vn(t, e)) : t.type === "map" && t.values && Object.assign(n, An(t, e)), n;
4293
+ }
4294
+ function Sn(t, e = "") {
4295
+ const n = {};
4296
+ if (Array.isArray(t.fields))
4297
+ for (const r of t.fields) {
4298
+ const s = Object.keys(r)[0], i = r[s], o = e ? V(e, s) : s;
4299
+ if (n[o] = i, i.type === "record" && Array.isArray(i.fields)) {
4300
+ const a = Sn(i, o);
4301
+ Object.assign(n, a);
4302
+ } else if (i.type === "array" && i.elements) {
4303
+ const a = vn(i, o);
4304
+ Object.assign(n, a);
4305
+ } else if (i.type === "map" && i.values) {
4306
+ const a = An(i, o);
4307
+ Object.assign(n, a);
4308
+ }
4309
+ }
4310
+ return n;
4311
+ }
4312
+ function vn(t, e = "") {
4313
+ const n = {};
4314
+ if (t.elements) {
4315
+ const r = t.elements, s = V(e, gi);
4316
+ if (n[s] = r, r.type === "record" && Array.isArray(r.fields)) {
4317
+ const i = Sn(r, s);
4318
+ Object.assign(n, i);
4319
+ } else if (r.type === "array" && r.elements) {
4320
+ const i = vn(r, s);
4321
+ Object.assign(n, i);
4322
+ } else if (r.type === "map" && r.values) {
4323
+ const i = An(r, s);
4324
+ Object.assign(n, i);
4325
+ }
4326
+ }
4327
+ return n;
4328
+ }
4329
+ function An(t, e = "") {
4330
+ const n = {}, r = V(e, vr);
4331
+ if (n[r] = t.values, t.values.type === "record" && Array.isArray(t.values.fields)) {
4332
+ const s = Sn(t.values, r);
4333
+ Object.assign(n, s);
4334
+ } else if ((t.values.type === "array" || t.values.type === "set") && t.values.elements) {
4335
+ const s = vn(t.values, r);
4336
+ Object.assign(n, s);
4337
+ } else if (t.values.type === "map" && t.values.values) {
4338
+ const s = An(t.values, r);
4339
+ Object.assign(n, s);
4340
+ }
4341
+ return n;
4342
+ }
4343
+ function Wt(t, e) {
4344
+ const n = ht(t), r = [];
4345
+ for (let s = 0; s < n.length; s++) {
4346
+ const i = n[s], o = r.length > 0 ? V(...r) : "", a = o ? e[o] : void 0;
4347
+ (a == null ? void 0 : a.type) === "map" ? r.push(vr) : (a == null ? void 0 : a.type) === "array" ? r.push(gi) : r.push(i);
4348
+ }
4349
+ return V(...r);
4350
+ }
4351
+ function cc(t) {
4352
+ const e = ce(t), n = ur(() => e ? Oi(e) : {});
4353
+ function r(h) {
4354
+ var g;
4355
+ if (h) {
4356
+ let m = Wt(h, n.value || {});
4357
+ return m.startsWith(`${dt}${xn}`) && (m = m.slice(2)), (g = n.value) == null ? void 0 : g[m];
4358
+ }
4359
+ return e;
4360
+ }
4361
+ function s(h, g = !1) {
4362
+ const m = r(h);
4363
+ return m ? m.default !== void 0 ? m.default : g || m.required ? m.type === "record" ? i(m, h) : m.type === "array" ? [] : m.type === "map" ? {} : null : null : null;
4364
+ }
4365
+ function i(h, g) {
4366
+ const m = {};
4367
+ if (Array.isArray(h.fields))
4368
+ for (const b of h.fields) {
4369
+ const x = Object.keys(b)[0], A = g ? `${g}.${x}` : x, R = s(A, !1);
4370
+ R !== void 0 && (m[x] = R);
4371
+ }
4372
+ return m;
4373
+ }
4374
+ function o(h) {
4375
+ return h ? s(h, !0) : i(r(), "");
4376
+ }
4377
+ function a(h) {
4378
+ const g = r(h), m = g != null && g.description ? lc.sanitize(P.parse(g.description, { async: !1 })) : void 0;
4379
+ return {
4380
+ ...ac,
4381
+ "data-testid": `ff-label-${h}`,
4382
+ info: m
4383
+ };
4384
+ }
4385
+ function c(h) {
4386
+ var m;
4387
+ const g = r(h);
4388
+ return Ul((g == null ? void 0 : g.one_of) || ((m = g.elements) == null ? void 0 : m.one_of) || []);
4389
+ }
4390
+ function p(h) {
4391
+ const g = r(h), m = g == null ? void 0 : g.default;
4392
+ let b = null;
4393
+ if ((g == null ? void 0 : g.type) === "foreign" && (m != null && m.id))
4394
+ b = m.id;
4395
+ else {
4396
+ if (m == null || typeof m == "object" || m === "")
4397
+ return null;
4398
+ if (Array.isArray(m)) {
4399
+ if (m.length === 0)
4400
+ return null;
4401
+ b = m.join(", ");
4402
+ } else
4403
+ b = m.toString();
4404
+ }
4405
+ return `Default: ${b}`;
4406
+ }
4407
+ function d() {
4408
+ return n.value;
4409
+ }
4410
+ function u(h) {
4411
+ const g = r(h);
4412
+ return (g == null ? void 0 : g.required) ? o(h) : null;
4413
+ }
4414
+ return {
4415
+ getSchemaMap: d,
4416
+ getSchema: r,
4417
+ getDefault: o,
4418
+ getSelectItems: c,
4419
+ getLabelAttributes: a,
4420
+ getPlaceholder: p,
4421
+ getEmptyOrDefault: u
4422
+ };
4423
+ }
4424
+ const gt = /* @__PURE__ */ new WeakMap(), uc = /* @__NO_SIDE_EFFECTS__ */ (...t) => {
4425
+ var e;
4426
+ const n = t[0], r = (e = bt()) === null || e === void 0 ? void 0 : e.proxy, s = r ?? Ps();
4427
+ if (s == null && !fl()) throw new Error("injectLocal must be called in setup");
4428
+ return s && gt.has(s) && n in gt.get(s) ? gt.get(s)[n] : si(...t);
4429
+ };
4430
+ function fc(t, e) {
4431
+ var n;
4432
+ const r = (n = bt()) === null || n === void 0 ? void 0 : n.proxy, s = r ?? Ps();
4433
+ if (s == null) throw new Error("provideLocal must be called in setup");
4434
+ gt.has(s) || gt.set(s, /* @__PURE__ */ Object.create(null));
4435
+ const i = gt.get(s);
4436
+ return i[t] = e, ri(t, e);
4437
+ }
4438
+ function pc(t, e) {
4439
+ const n = Symbol(t.name || "InjectionState"), r = void 0;
4440
+ return [(...o) => {
4441
+ const a = t(...o);
4442
+ return fc(n, a), a;
4443
+ }, () => /* @__PURE__ */ uc(n, r)];
4444
+ }
4445
+ typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
4446
+ const Is = Symbol("ff-render-rule-exact-match");
4447
+ function dc(t, e) {
4448
+ const n = /* @__PURE__ */ lr({}), r = /* @__PURE__ */ lr(/* @__PURE__ */ new Set());
4449
+ function s(b, x) {
4450
+ const A = b.map((S) => ht(S).length), R = A[0];
4451
+ if (!A.every((S) => S === R)) {
4452
+ const S = b.map((w, T) => ` - '${w}' is at level ${A[T]}`).join(`
4453
+ `);
4454
+ throw new Error(
4455
+ `${x}: Fields must be at the same level. Found mixed levels:
4456
+ ${S}`
4457
+ );
4458
+ }
4459
+ }
4460
+ function i(b) {
4461
+ for (const [x, A] of Object.entries(b)) {
4462
+ if (!A.bundles) continue;
4463
+ for (const S of A.bundles)
4464
+ if (new Set(S).size !== S.length) {
4465
+ const T = S.filter((k, v) => S.indexOf(k) !== v);
4466
+ throw new Error(
4467
+ `Self-cycle detected in bundle: field '${T[0]}' appears multiple times in [${S.join(", ")}]`
4468
+ );
4469
+ }
4470
+ const R = /* @__PURE__ */ new Map();
4471
+ for (const S of A.bundles)
4472
+ for (let w = 1; w < S.length; w++) {
4473
+ const T = S[w], k = S[w - 1];
4474
+ R.has(T) || R.set(T, /* @__PURE__ */ new Set()), R.get(T).add(k);
4475
+ }
4476
+ for (const S of R.keys()) {
4477
+ let w = function(v) {
4478
+ if (k.includes(v)) {
4479
+ const ne = [...k, v].join(" -> ");
4480
+ throw new Error(
4481
+ `Circular bundle detected in path '${x}':
4482
+ ${ne}`
4483
+ );
4484
+ }
4485
+ if (T.has(v)) return;
4486
+ T.add(v), k.push(v);
4487
+ const z = R.get(v);
4488
+ if (z)
4489
+ for (const ne of z)
4490
+ w(ne);
4491
+ k.pop();
4492
+ };
4493
+ const T = /* @__PURE__ */ new Set(), k = [];
4494
+ w(S);
4495
+ }
4496
+ }
4497
+ }
4498
+ function o(b) {
4499
+ for (const [x, A] of Object.entries(b))
4500
+ if (A.dependencies)
4501
+ for (const R of Object.keys(A.dependencies)) {
4502
+ let S = function(k) {
4503
+ if (T.includes(k)) {
4504
+ const z = [...T, k].join(" -> ");
4505
+ throw new Error(
4506
+ `Circular dependency detected in path '${x}':
4507
+ ${z}`
4508
+ );
4509
+ }
4510
+ if (w.has(k)) return;
4511
+ w.add(k), T.push(k);
4512
+ const v = A.dependencies[k];
4513
+ if (v) {
4514
+ const [z] = v;
4515
+ A.dependencies[z] && S(z);
4516
+ }
4517
+ T.pop();
4518
+ };
4519
+ const w = /* @__PURE__ */ new Set(), T = [];
4520
+ S(R);
4521
+ }
4522
+ }
4523
+ function a(b, x) {
4524
+ const A = b.map((S) => x ? V(x, S) : S), R = ht(A[0]);
4525
+ return R.pop(), V(...R);
4526
+ }
4527
+ function c(b, x) {
4528
+ if (!x) return b;
4529
+ const A = `${x}${xn}`;
4530
+ return b.startsWith(A) ? b.slice(A.length) : b;
4531
+ }
4532
+ function p(b) {
4533
+ const x = ht(b);
4534
+ return x.pop(), V(...x);
4535
+ }
4536
+ const d = ur(() => {
4537
+ const b = {};
4538
+ for (const [x, A] of Object.entries(n.value)) {
4539
+ const R = x === dt ? "" : x;
4540
+ if (A.bundles)
4541
+ for (const S of A.bundles) {
4542
+ if (S.length < 2)
4543
+ throw new Error(
4544
+ `Bundle must contain at least 2 fields. Found ${S.length} field(s) in bundle: [${S.join(", ")}]`
4545
+ );
4546
+ const w = S.map((v) => R ? V(R, v) : v);
4547
+ s(w, `Bundle [${S.join(", ")}]`);
4548
+ const T = a(S, R) || dt;
4549
+ b[T] || (b[T] = {}), b[T].bundles || (b[T].bundles = []);
4550
+ const k = w.map((v) => c(v, T));
4551
+ b[T].bundles.push(k);
4552
+ }
4553
+ if (A.dependencies)
4554
+ for (const [S, [w, T]] of Object.entries(A.dependencies)) {
4555
+ const k = R ? V(R, S) : S, v = R ? V(R, w) : w;
4556
+ s(
4557
+ [k, v],
4558
+ `Dependency '${S}' -> '${w}'`
4559
+ );
4560
+ const z = p(k) || dt;
4561
+ b[z] || (b[z] = {}), b[z].dependencies || (b[z].dependencies = {});
4562
+ const ne = c(k, z), _e = c(v, z);
4563
+ b[z].dependencies[ne] = [_e, T];
4564
+ }
4565
+ }
4566
+ return i(b), o(b), b;
4567
+ });
4568
+ function u(b) {
4569
+ if (!b)
4570
+ return d.value;
4571
+ const x = Wt(b, e());
4572
+ return d.value[x];
4573
+ }
4574
+ function h(b) {
4575
+ let x = !1;
4576
+ return ur(() => {
4577
+ if (x) return;
4578
+ const A = ce(b);
4579
+ try {
4580
+ return u(A);
4581
+ } catch (R) {
4582
+ x = !0, console.error(`Failed to get render rules for path: \`${A}\`,`, R instanceof Error ? R.message : "");
4583
+ return;
4584
+ }
4585
+ });
4586
+ }
4587
+ function g(b) {
4588
+ const {
4589
+ fieldPath: x,
4590
+ rules: A,
4591
+ parentValue: R,
4592
+ omittedFields: S
4593
+ } = b;
4594
+ dn([
4595
+ () => ce(A),
4596
+ () => ce(x)
4597
+ ], ([T, k], [, v]) => {
4598
+ T ? n.value[k] = T : delete n.value[k], v && v !== k && delete n.value[v];
4599
+ }, { immediate: !0, deep: !0 });
4600
+ const w = h(x);
4601
+ return dn(
4602
+ [
4603
+ () => ce(R),
4604
+ () => {
4605
+ var T;
4606
+ return (T = ce(w)) == null ? void 0 : T.dependencies;
4607
+ },
4608
+ () => ce(x),
4609
+ () => ce(S)
4610
+ ],
4611
+ ([T, k, v, z]) => {
4612
+ !k || !T || Object.entries(k).forEach(([ne, [_e, pe]]) => {
4613
+ if (z != null && z.includes(ne)) return;
4614
+ const I = hr(T, _e), re = v ? Bl(V(v, ne)) : ne;
4615
+ if (typeof pe == "object" && pe !== null && Is in pe ? on(I, pe[Is]) : Array.isArray(pe) ? pe.some((Pe) => on(I, Pe)) : on(I, pe)) {
4616
+ r.value.delete(re), t();
4617
+ return;
4618
+ }
4619
+ r.value.add(re), t();
4620
+ });
4621
+ },
4622
+ { deep: !0, immediate: !0 }
4623
+ ), bl(() => {
4624
+ const T = ce(x);
4625
+ delete n.value[T];
4626
+ }), w;
4627
+ }
4628
+ function m(b) {
4629
+ return r.value.has(b);
4630
+ }
4631
+ return {
4632
+ useCurrentRules: g,
4633
+ createComputedRules: h,
4634
+ hiddenPaths: /* @__PURE__ */ cn(r),
4635
+ isFieldHidden: m
4636
+ };
4637
+ }
4638
+ let hc = 0;
4639
+ function gc() {
4640
+ return `kid:${++hc}`;
4641
+ }
4642
+ function mc(t) {
4643
+ const e = /* @__PURE__ */ En(/* @__PURE__ */ new Map());
4644
+ function n(p = "") {
4645
+ const d = gc();
4646
+ return e.set(d, p), d;
4647
+ }
4648
+ function r(p) {
4649
+ return e.get(p);
4650
+ }
4651
+ function s(p, d) {
4652
+ e.has(p) && e.set(p, d);
4653
+ }
4654
+ function i(p) {
4655
+ e.delete(p);
4656
+ }
4657
+ function o(p) {
4658
+ return _c(p, t, n);
4659
+ }
4660
+ function a(p) {
4661
+ return bc(p, t, r);
4662
+ }
4663
+ function c() {
4664
+ e.clear();
4665
+ }
4666
+ return {
4667
+ createKey: n,
4668
+ getKey: r,
4669
+ updateKey: s,
4670
+ deleteKey: i,
4671
+ serialize: o,
4672
+ deserialize: a,
4673
+ clear: c
4674
+ };
4675
+ }
4676
+ function _c(t, e, n) {
4677
+ const r = (s, i) => {
4678
+ if (s == null || typeof s != "object")
4679
+ return s;
4680
+ if (Array.isArray(s))
4681
+ return s.map((c, p) => {
4682
+ const d = i ? V(i, `${p}`) : `${p}`;
4683
+ return r(c, d);
4684
+ });
4685
+ const o = i ? e(i) : e();
4686
+ if ((o == null ? void 0 : o.type) === "map") {
4687
+ const c = s, p = {};
4688
+ return Object.keys(c).forEach((d) => {
4689
+ const u = n(d), h = c[d], g = i ? V(i, d) : d;
4690
+ p[u] = r(h, g);
4691
+ }), p;
4692
+ }
4693
+ const a = {};
4694
+ return Object.keys(s).forEach((c) => {
4695
+ const p = i ? V(i, c) : c;
4696
+ a[c] = r(s[c], p);
4697
+ }), a;
4698
+ };
4699
+ return r(t);
4700
+ }
4701
+ function bc(t, e, n) {
4702
+ const r = (s, i) => {
4703
+ if (s == null || typeof s != "object")
4704
+ return s;
4705
+ if (Array.isArray(s))
4706
+ return s.map((c, p) => {
4707
+ const d = i ? V(i, `${p}`) : `${p}`;
4708
+ return r(c, d);
4709
+ });
4710
+ const o = i ? e(i) : e();
4711
+ if ((o == null ? void 0 : o.type) === "map") {
4712
+ const c = s, p = {};
4713
+ return Object.keys(c).forEach((d) => {
4714
+ const u = d, h = c[u], g = n(u);
4715
+ if (g == null) {
4716
+ console.error(`[FreeForm] Missing name for key ID: ${String(u)}`);
4717
+ return;
4718
+ }
4719
+ const m = g || vr, b = i ? V(i, m) : m;
4720
+ p[g] = r(h, b);
4721
+ }), p;
4722
+ }
4723
+ const a = {};
4724
+ return Object.keys(s).forEach((c) => {
4725
+ const p = i ? V(i, c) : c;
4726
+ a[c] = r(s[c], p);
4727
+ }), a;
4728
+ };
4729
+ return r(t);
4730
+ }
4731
+ pc(
4732
+ function(e) {
4733
+ const {
4734
+ schema: n,
4735
+ propsData: r,
4736
+ onChange: s,
4737
+ propsRenderRules: i,
4738
+ propsConfig: o
4739
+ } = e, {
4740
+ getDefault: a,
4741
+ getEmptyOrDefault: c,
4742
+ ...p
4743
+ } = cc(n), d = mc(p.getSchema), u = /* @__PURE__ */ new Map(), h = /* @__PURE__ */ En({}), g = /* @__PURE__ */ Bo(() => o ?? {}), m = El();
4744
+ ri(ql, so(m, "default", Kl));
4745
+ const {
4746
+ useCurrentRules: b,
4747
+ createComputedRules: x,
4748
+ hiddenPaths: A,
4749
+ isFieldHidden: R
4750
+ } = dc(() => s == null ? void 0 : s(v()), p.getSchemaMap), S = b({
4751
+ fieldPath: dt,
4752
+ rules: i,
4753
+ parentValue: h
4754
+ });
4755
+ function w(I) {
4756
+ Object.keys(h).forEach((re) => {
4757
+ delete h[re];
4758
+ }), d.clear(), Object.assign(h, d.serialize(I));
4759
+ }
4760
+ function T(I) {
4761
+ let re;
4762
+ !I || !k(ce(I)) ? re = a() : re = ss(ce(I)), is(g.value.prepareFormData) ? w(g.value.prepareFormData(re)) : w(re);
4763
+ }
4764
+ function k(I) {
4765
+ return is(g.value.hasValue) ? g.value.hasValue(I) : !!I;
4766
+ }
4767
+ function v() {
4768
+ const I = ce(h), re = ss(I);
4769
+ if (A.value.size > 0)
4770
+ for (const yt of A.value) {
4771
+ const Me = ht(yt), Pe = Me.slice(0, -1);
4772
+ (Pe.length === 0 || hr(re, Pe) != null) && io(re, Me, c(yt));
4773
+ }
4774
+ return d.deserialize(re);
4775
+ }
4776
+ dn(h, () => {
4777
+ s == null || s(v());
4778
+ }, { deep: !0 });
4779
+ let z = !1;
4780
+ dn(() => r == null ? void 0 : r.value, (I) => {
4781
+ z && on(v(), ce(I)) || (T(I), z = !0);
4782
+ }, { deep: !0, immediate: !0 });
4783
+ function ne(I) {
4784
+ return I != null && typeof I == "object" && !Array.isArray(I) ? d.serialize(I) : I;
4785
+ }
4786
+ function _e(I) {
4787
+ return ne(a(I));
4788
+ }
4789
+ function pe(I) {
4790
+ return ne(c(I));
4791
+ }
4792
+ return {
4793
+ /**
4794
+ * The reactive form data object
4795
+ */
4796
+ formData: h,
4797
+ schema: n,
4798
+ config: g,
4799
+ fieldRendererRegistry: u,
4800
+ setValue: w,
4801
+ useCurrentRenderRules: b,
4802
+ rootRenderRules: S,
4803
+ createComputedRenderRules: x,
4804
+ ...p,
4805
+ getValue: v,
4806
+ isFieldHidden: R,
4807
+ keyIdMap: d,
4808
+ getDefault: _e,
4809
+ getEmptyOrDefault: pe
4810
+ };
4811
+ }
4812
+ );
4813
+ function yc(t) {
4814
+ if (Gl(t)) return "enum";
4815
+ switch (t.type) {
4816
+ case "string":
4817
+ return "string";
4818
+ case "number":
4819
+ case "integer":
4820
+ return "number";
4821
+ case "boolean":
4822
+ return "boolean";
4823
+ case "set":
4824
+ return Wl(t) ? "tag" : "enum";
4825
+ case "array":
4826
+ return "array";
4827
+ case "record":
4828
+ return "record";
4829
+ case "map":
4830
+ return "map";
4831
+ case "json":
4832
+ return "json";
4833
+ case "foreign":
4834
+ return "foreign";
4835
+ default:
4836
+ throw new Error(`Unknown field type: ${t.type}`);
4837
+ }
4838
+ }
4839
+ function* kc(t, e, n, r = "") {
4840
+ for (const s of t) {
4841
+ const i = Object.keys(s)[0], o = r ? V(r, i) : i, a = hr(e, i);
4842
+ if (a === void 0) continue;
4843
+ const c = Wt(o, n.schemaMap), p = n.schemaMap[c];
4844
+ if (!p)
4845
+ throw new Error(`Field schema for "${o}" not found in schema map`);
4846
+ yield {
4847
+ handlerType: yc(p),
4848
+ fieldKey: o,
4849
+ fieldSchema: p,
4850
+ value: a
4851
+ };
4852
+ }
4853
+ }
4854
+ function Sc(t, e, n) {
4855
+ const r = V(t, String(e)), s = Wt(r, n.schemaMap), i = n.schemaMap[s];
4856
+ if (!i)
4857
+ throw new Error(`Item schema for "${r}" not found in schema map`);
4858
+ return { itemKey: r, itemSchema: i };
4859
+ }
4860
+ function vc(t, e, n) {
4861
+ const r = V(t, e), s = Wt(r, n.schemaMap), i = n.schemaMap[s];
4862
+ if (!i)
4863
+ throw new Error(`Map entry schema for "${r}" not found in schema map`);
4864
+ return { entryKey: r, entrySchema: i };
4865
+ }
4866
+ function Ac(t) {
4867
+ return t.type === "record" && Array.isArray(t.fields);
4868
+ }
4869
+ function Rc(t) {
4870
+ return {
4871
+ schemaMap: Oi(t)
4872
+ };
4873
+ }
4874
+ export {
4875
+ Sc as a,
4876
+ Ac as b,
4877
+ Rc as c,
4878
+ vc as d,
4879
+ yc as g,
4880
+ xc as i,
4881
+ Tc as s,
4882
+ kc as w
4883
+ };