@mgdis/stencil-helpers 2.2.5 → 3.0.0

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.
package/dist/index.es.js CHANGED
@@ -1,216 +1,254 @@
1
- var he = Object.defineProperty;
2
- var W = (e) => {
1
+ var Re = Object.defineProperty;
2
+ var ne = (e) => {
3
3
  throw TypeError(e);
4
4
  };
5
- var ve = (e, t, s) => t in e ? he(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
6
- var p = (e, t, s) => ve(e, typeof t != "symbol" ? t + "" : t, s), ye = (e, t, s) => t.has(e) || W("Cannot " + s);
7
- var x = (e, t, s) => (ye(e, t, "read from private field"), s ? s.call(e) : t.get(e)), B = (e, t, s) => t.has(e) ? W("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, s);
8
- const Ge = (e = "", t = 10) => {
9
- const s = new Uint8Array(t);
10
- crypto.getRandomValues(s);
11
- const r = Array.from(s).map((n) => n.toString(16).padStart(2, "0")).join("").slice(0, t);
12
- return e !== "" ? `${e}-${r}` : r;
13
- }, Xe = (e) => me(e) && /^([a-z][a-z0-9]*)(-[a-z0-9]+)*$/.exec(e) !== null;
14
- class Ze {
5
+ var ze = (e, t, r) => t in e ? Re(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
6
+ var d = (e, t, r) => ze(e, typeof t != "symbol" ? t + "" : t, r), Ne = (e, t, r) => t.has(e) || ne("Cannot " + r);
7
+ var O = (e, t, r) => (Ne(e, t, "read from private field"), r ? r.call(e) : t.get(e)), G = (e, t, r) => t.has(e) ? ne("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r);
8
+ const xt = (e = "", t = 10) => {
9
+ const r = new Uint8Array(t);
10
+ crypto.getRandomValues(r);
11
+ const s = Array.from(r).map((n) => n.toString(16).padStart(2, "0")).join("").slice(0, t);
12
+ return e !== "" ? `${e}-${s}` : s;
13
+ }, Ot = (e) => Le(e) && /^([a-z][a-z0-9]*)(-[a-z0-9]+)*$/.exec(e) !== null;
14
+ class kt {
15
15
  constructor(t = []) {
16
16
  /**
17
17
  * Available classes
18
18
  */
19
- p(this, "classes");
19
+ d(this, "classes");
20
20
  /**
21
21
  * Add class
22
22
  * @param className - class name to add
23
23
  */
24
- p(this, "add", (t) => {
24
+ d(this, "add", (t) => {
25
25
  this.has(t) || this.classes.push(t);
26
26
  });
27
27
  /**
28
28
  * Delete class
29
29
  * @param className - class name to delete
30
30
  */
31
- p(this, "delete", (t) => {
32
- const s = this.classes.indexOf(t);
33
- s > -1 && this.classes.splice(s, 1);
31
+ d(this, "delete", (t) => {
32
+ const r = this.classes.indexOf(t);
33
+ r > -1 && this.classes.splice(r, 1);
34
34
  });
35
35
  /**
36
36
  * Check if class exist in list
37
37
  * @param className - class name to check
38
38
  * @returns class name is in the list
39
39
  */
40
- p(this, "has", (t) => this.classes.includes(t));
40
+ d(this, "has", (t) => this.classes.includes(t));
41
41
  /**
42
42
  * Join classes seperated by spaces
43
43
  * @returns joined values
44
44
  */
45
- p(this, "join", () => this.classes.join(" "));
45
+ d(this, "join", () => this.classes.join(" "));
46
46
  this.classes = t;
47
47
  }
48
48
  }
49
- const Je = (e) => Array.isArray(e) && e.every((t) => typeof t == "string"), Ke = (e, t) => t.includes(e == null ? void 0 : e.tagName.toLowerCase()), Qe = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"]), [identifier], mg-button', Ye = (e) => {
50
- const t = Y(e), s = V(e);
51
- return [e, ...t, ...s];
52
- }, Y = (e, t = []) => {
49
+ const At = (e) => Array.isArray(e) && e.every((t) => typeof t == "string"), Tt = (e, t) => t.includes(e == null ? void 0 : e.tagName.toLowerCase()), jt = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"]), [identifier], mg-button', Rt = (e) => {
50
+ const t = ge(e), r = pe(e);
51
+ return [e, ...t, ...r];
52
+ }, ge = (e, t = []) => {
53
53
  if (e.self !== e.top)
54
54
  try {
55
- const s = e.parent;
56
- return s ? (t.push(s), Y(s, t)) : t;
57
- } catch (s) {
58
- return console.error("Different hosts between iframes:", s), t;
55
+ const r = e.parent;
56
+ return r ? (t.push(r), ge(r, t)) : t;
57
+ } catch (r) {
58
+ return console.error("Different hosts between iframes:", r), t;
59
59
  }
60
60
  return t;
61
- }, V = (e, t = []) => {
61
+ }, pe = (e, t = []) => {
62
62
  if (e.frames.length > 0)
63
- for (const s of Array.from(e.frames))
64
- t.push(s), V(s, t);
63
+ for (const r of Array.from(e.frames))
64
+ t.push(r), pe(r, t);
65
65
  return t;
66
- }, me = (e) => typeof e == "string" && e.trim() !== "", Ve = (e) => typeof e == "object" ? JSON.stringify(e) : `${e}`, et = (e) => typeof e == "number" && !Number.isNaN(e), tt = (e) => typeof e == "string" ? e.toLocaleLowerCase().normalize("NFD").replaceAll(/[\u0300-\u036f]/g, "") : e, st = async (e) => e();
67
- var C = {
66
+ }, Le = (e) => typeof e == "string" && e.trim() !== "", zt = (e) => typeof e == "object" ? JSON.stringify(e) : `${e}`, Nt = (e) => typeof e == "number" && !Number.isNaN(e), Lt = (e) => typeof e == "string" ? e.toLocaleLowerCase().normalize("NFD").replaceAll(/[\u0300-\u036f]/g, "") : e, Mt = async (e) => e();
67
+ var B = {
68
68
  updatable: !0,
69
69
  slotRelocation: !0,
70
70
  // TODO(STENCIL-914): remove this option when `experimentalSlotFixes` is the default behavior
71
71
  experimentalSlotFixes: !1
72
- }, be = Object.defineProperty, Se = (e, t) => {
73
- for (var s in t)
74
- be(e, s, { get: t[s], enumerable: !0 });
75
- }, ke = "http://www.w3.org/2000/svg", xe = "http://www.w3.org/1999/xhtml", G = (e, t) => t in e, X = "http://www.w3.org/1999/xlink", ee = typeof window < "u" ? window : {}, L = ee.document || { head: {} }, _ = {
72
+ }, Me = Object.defineProperty, Fe = (e, t) => {
73
+ for (var r in t)
74
+ Me(e, r, { get: t[r], enumerable: !0 });
75
+ }, Ie = "http://www.w3.org/2000/svg", Ce = "http://www.w3.org/1999/xhtml", ie = (e, t) => t in e, oe = "http://www.w3.org/1999/xlink", S = typeof window < "u" ? window : {}, T = {
76
76
  $flags$: 0,
77
77
  $resourcesUrl$: "",
78
78
  jmp: (e) => e(),
79
79
  raf: (e) => requestAnimationFrame(e),
80
- ael: (e, t, s, r) => e.addEventListener(t, s, r),
81
- rel: (e, t, s, r) => e.removeEventListener(t, s, r),
80
+ ael: (e, t, r, s) => e.addEventListener(t, r, s),
81
+ rel: (e, t, r, s) => e.removeEventListener(t, r, s),
82
82
  ce: (e, t) => new CustomEvent(e, t)
83
- }, Te = (e) => e != null && e !== void 0, te = (e) => (e = typeof e, e === "object" || e === "function"), _e = {};
84
- Se(_e, {
85
- err: () => se,
86
- map: () => Ee,
87
- ok: () => P,
88
- unwrap: () => Ae,
89
- unwrapErr: () => je
83
+ }, Ue = (e) => e != null && e !== void 0, $e = (e) => (e = typeof e, e === "object" || e === "function"), De = {};
84
+ Fe(De, {
85
+ err: () => de,
86
+ map: () => Ze,
87
+ ok: () => W,
88
+ unwrap: () => qe,
89
+ unwrapErr: () => Be
90
90
  });
91
- var P = (e) => ({
91
+ var W = (e) => ({
92
92
  isOk: !0,
93
93
  isErr: !1,
94
94
  value: e
95
- }), se = (e) => ({
95
+ }), de = (e) => ({
96
96
  isOk: !1,
97
97
  isErr: !0,
98
98
  value: e
99
99
  });
100
- function Ee(e, t) {
100
+ function Ze(e, t) {
101
101
  if (e.isOk) {
102
- const s = t(e.value);
103
- return s instanceof Promise ? s.then((r) => P(r)) : P(s);
102
+ const r = t(e.value);
103
+ return r instanceof Promise ? r.then((s) => W(s)) : W(r);
104
104
  }
105
105
  if (e.isErr) {
106
- const s = e.value;
107
- return se(s);
106
+ const r = e.value;
107
+ return de(r);
108
108
  }
109
109
  throw "should never get here";
110
110
  }
111
- var Ae = (e) => {
111
+ var qe = (e) => {
112
112
  if (e.isOk)
113
113
  return e.value;
114
114
  throw e.value;
115
- }, je = (e) => {
115
+ }, Be = (e) => {
116
116
  if (e.isErr)
117
117
  return e.value;
118
118
  throw e.value;
119
- }, re = (e) => {
120
- const t = e.__childNodes || e.childNodes;
121
- e.tagName && e.tagName.includes("-") && e["s-cr"] && e.tagName !== "SLOT-FB" && ne(t, e.tagName).forEach((s) => {
122
- var r;
123
- s.nodeType === 1 && s.tagName === "SLOT-FB" && ((r = Oe(s, s["s-sn"], !1)) != null && r.length ? s.hidden = !0 : s.hidden = !1);
119
+ }, ye = (e) => {
120
+ const t = le(e, "childNodes");
121
+ e.tagName && e.tagName.includes("-") && e["s-cr"] && e.tagName !== "SLOT-FB" && be(t, e.tagName).forEach((s) => {
122
+ s.nodeType === 1 && s.tagName === "SLOT-FB" && (Pe(s, ee(s), !1).length ? s.hidden = !0 : s.hidden = !1);
124
123
  });
125
- for (const s of t)
126
- s.nodeType === 1 && (s.__childNodes || s.childNodes).length && re(s);
124
+ let r = 0;
125
+ for (r = 0; r < t.length; r++) {
126
+ const s = t[r];
127
+ s.nodeType === 1 && le(s, "childNodes").length && ye(s);
128
+ }
129
+ }, He = (e) => {
130
+ const t = [];
131
+ for (let r = 0; r < e.length; r++) {
132
+ const s = e[r]["s-nr"] || void 0;
133
+ s && s.isConnected && t.push(s);
134
+ }
135
+ return t;
127
136
  };
128
- function ne(e, t, s) {
129
- let r = 0, n = [], i;
130
- for (; r < e.length; r++)
131
- i = e[r], i["s-sr"] && i["s-hn"] === t && s === void 0 && n.push(i), n = [...n, ...ne(i.childNodes, t, s)];
137
+ function be(e, t, r) {
138
+ let s = 0, n = [], i;
139
+ for (; s < e.length; s++)
140
+ i = e[s], i["s-sr"] && (!t || i["s-hn"] === t) && r === void 0 && n.push(i), n = [...n, ...be(i.childNodes, t, r)];
132
141
  return n;
133
142
  }
134
- var Oe = (e, t, s = !0) => {
135
- const r = [];
136
- for ((s && e["s-sr"] || !e["s-sr"]) && r.push(e); (e = e.nextSibling) && e["s-sn"] === t; )
137
- r.push(e);
138
- return r;
139
- }, Z = (e, t) => e.nodeType === 1 ? e.getAttribute("slot") === null && t === "" || e.getAttribute("slot") === t : e["s-sn"] === t ? !0 : t === "", Re = (e, t, ...s) => {
140
- let r = null, n = null, i = null, o = !1, f = !1;
141
- const c = [], $ = (l) => {
142
- for (let d = 0; d < l.length; d++)
143
- r = l[d], Array.isArray(r) ? $(r) : r != null && typeof r != "boolean" && ((o = !te(r)) && (r = String(r)), o && f ? c[c.length - 1].$text$ += r : c.push(o ? w(null, r) : r), f = o);
143
+ var Pe = (e, t, r = !0) => {
144
+ const s = [];
145
+ (r && e["s-sr"] || !e["s-sr"]) && s.push(e);
146
+ let n = e;
147
+ for (; n = n.nextSibling; )
148
+ ee(n) === t && (r || !n["s-sr"]) && s.push(n);
149
+ return s;
150
+ }, ae = (e, t) => e.nodeType === 1 ? e.getAttribute("slot") === null && t === "" || e.getAttribute("slot") === t : e["s-sn"] === t ? !0 : t === "", ee = (e) => typeof e["s-sn"] == "string" ? e["s-sn"] : e.nodeType === 1 && e.getAttribute("slot") || void 0;
151
+ function Ge(e) {
152
+ if (e.assignedElements || e.assignedNodes || !e["s-sr"]) return;
153
+ const t = (r) => (function(s) {
154
+ const n = [], i = this["s-sn"];
155
+ s != null && s.flatten && console.error(`
156
+ Flattening is not supported for Stencil non-shadow slots.
157
+ You can use \`.childNodes\` to nested slot fallback content.
158
+ If you have a particular use case, please open an issue on the Stencil repo.
159
+ `);
160
+ const o = this["s-cr"].parentElement;
161
+ return (o.__childNodes ? o.childNodes : He(o.childNodes)).forEach((l) => {
162
+ i === ee(l) && n.push(l);
163
+ }), r ? n.filter(
164
+ (l) => l.nodeType === 1
165
+ /* ElementNode */
166
+ ) : n;
167
+ }).bind(e);
168
+ e.assignedElements = t(!0), e.assignedNodes = t(!1);
169
+ }
170
+ function le(e, t) {
171
+ if ("__" + t in e) {
172
+ const r = e["__" + t];
173
+ return typeof r != "function" ? r : r.bind(e);
174
+ } else
175
+ return typeof e[t] != "function" ? e[t] : e[t].bind(e);
176
+ }
177
+ var We = (e, t, ...r) => {
178
+ let s = null, n = null, i = null, o = !1, f = !1;
179
+ const l = [], c = (a) => {
180
+ for (let p = 0; p < a.length; p++)
181
+ s = a[p], Array.isArray(s) ? c(s) : s != null && typeof s != "boolean" && ((o = !$e(s)) && (s = String(s)), o && f ? l[l.length - 1].$text$ += s : l.push(o ? X(null, s) : s), f = o);
144
182
  };
145
- $(s);
146
- const u = w(e, null);
147
- return u.$attrs$ = t, c.length > 0 && (u.$children$ = c), u.$key$ = n, u.$name$ = i, u;
148
- }, w = (e, t) => {
149
- const s = {
183
+ c(r);
184
+ const g = X(e, null);
185
+ return g.$attrs$ = t, l.length > 0 && (g.$children$ = l), g.$key$ = n, g.$name$ = i, g;
186
+ }, X = (e, t) => {
187
+ const r = {
150
188
  $flags$: 0,
151
189
  $tag$: e,
152
190
  $text$: t,
153
191
  $elm$: null,
154
192
  $children$: null
155
193
  };
156
- return s.$attrs$ = null, s.$key$ = null, s.$name$ = null, s;
157
- }, Le = {}, Me = (e) => e && e.$tag$ === Le, J = (e, t, s, r, n, i, o) => {
158
- if (s !== r) {
159
- let f = G(e, t), c = t.toLowerCase();
160
- if (t === "class") {
161
- const $ = e.classList, u = K(s);
162
- let l = K(r);
163
- $.remove(...u.filter((d) => d && !l.includes(d))), $.add(...l.filter((d) => d && !u.includes(d)));
164
- } else if (t === "style") {
165
- for (const $ in s)
166
- (!r || r[$] == null) && ($.includes("-") ? e.style.removeProperty($) : e.style[$] = "");
167
- for (const $ in r)
168
- (!s || r[$] !== s[$]) && ($.includes("-") ? e.style.setProperty($, r[$]) : e.style[$] = r[$]);
169
- } else if (t !== "key") if (t === "ref")
170
- r && r(e);
171
- else if (!e.__lookupSetter__(t) && t[0] === "o" && t[1] === "n") {
172
- if (t[2] === "-" ? t = t.slice(3) : G(ee, c) ? t = c.slice(2) : t = c[2] + t.slice(3), s || r) {
173
- const $ = t.endsWith(ie);
174
- t = t.replace(Ne, ""), s && _.rel(e, t, s, $), r && _.ael(e, t, r, $);
175
- }
176
- } else {
177
- const $ = te(r);
178
- if ((f || $ && r !== null) && !n)
179
- try {
180
- if (e.tagName.includes("-"))
181
- e[t] !== r && (e[t] = r);
182
- else {
183
- const l = r ?? "";
184
- t === "list" ? f = !1 : (s == null || e[t] != l) && (typeof e.__lookupSetter__(t) == "function" ? e[t] = l : e.setAttribute(t, l));
185
- }
186
- } catch {
187
- }
188
- let u = !1;
189
- c !== (c = c.replace(/^xlink\:?/, "")) && (t = c, u = !0), r == null || r === !1 ? (r !== !1 || e.getAttribute(t) === "") && (u ? e.removeAttributeNS(X, t) : e.removeAttribute(t)) : (!f || i & 4 || n) && !$ && (r = r === !0 ? "" : r, u ? e.setAttributeNS(X, t, r) : e.setAttribute(t, r));
194
+ return r.$attrs$ = null, r.$key$ = null, r.$name$ = null, r;
195
+ }, Xe = {}, Je = (e) => e && e.$tag$ === Xe, ce = (e, t, r, s, n, i, o) => {
196
+ if (r === s)
197
+ return;
198
+ let f = ie(e, t), l = t.toLowerCase();
199
+ if (t === "class") {
200
+ const c = e.classList, g = fe(r);
201
+ let a = fe(s);
202
+ c.remove(...g.filter((p) => p && !a.includes(p))), c.add(...a.filter((p) => p && !g.includes(p)));
203
+ } else if (t === "style") {
204
+ for (const c in r)
205
+ (!s || s[c] == null) && (c.includes("-") ? e.style.removeProperty(c) : e.style[c] = "");
206
+ for (const c in s)
207
+ (!r || s[c] !== r[c]) && (c.includes("-") ? e.style.setProperty(c, s[c]) : e.style[c] = s[c]);
208
+ } else if (t !== "key") if (t === "ref")
209
+ s && s(e);
210
+ else if (!e.__lookupSetter__(t) && t[0] === "o" && t[1] === "n") {
211
+ if (t[2] === "-" ? t = t.slice(3) : ie(S, l) ? t = l.slice(2) : t = l[2] + t.slice(3), r || s) {
212
+ const c = t.endsWith(ve);
213
+ t = t.replace(Ke, ""), r && T.rel(e, t, r, c), s && T.ael(e, t, s, c);
190
214
  }
215
+ } else {
216
+ const c = $e(s);
217
+ if ((f || c && s !== null) && !n)
218
+ try {
219
+ if (e.tagName.includes("-"))
220
+ e[t] !== s && (e[t] = s);
221
+ else {
222
+ const a = s ?? "";
223
+ t === "list" ? f = !1 : (r == null || e[t] != a) && (typeof e.__lookupSetter__(t) == "function" ? e[t] = a : e.setAttribute(t, a));
224
+ }
225
+ } catch {
226
+ }
227
+ let g = !1;
228
+ l !== (l = l.replace(/^xlink\:?/, "")) && (t = l, g = !0), s == null || s === !1 ? (s !== !1 || e.getAttribute(t) === "") && (g ? e.removeAttributeNS(oe, t) : e.removeAttribute(t)) : (!f || i & 4 || n) && !c && e.nodeType === 1 && (s = s === !0 ? "" : s, g ? e.setAttributeNS(oe, t, s) : e.setAttribute(t, s));
191
229
  }
192
- }, Fe = /\s/, K = (e) => (typeof e == "object" && e && "baseVal" in e && (e = e.baseVal), !e || typeof e != "string" ? [] : e.split(Fe)), ie = "Capture", Ne = new RegExp(ie + "$"), oe = (e, t, s, r) => {
230
+ }, Ye = /\s/, fe = (e) => (typeof e == "object" && e && "baseVal" in e && (e = e.baseVal), !e || typeof e != "string" ? [] : e.split(Ye)), ve = "Capture", Ke = new RegExp(ve + "$"), J = (e, t, r, s) => {
193
231
  const n = t.$elm$.nodeType === 11 && t.$elm$.host ? t.$elm$.host : t.$elm$, i = e && e.$attrs$ || {}, o = t.$attrs$ || {};
194
- for (const f of Q(Object.keys(i)))
195
- f in o || J(
232
+ for (const f of ue(Object.keys(i)))
233
+ f in o || ce(
196
234
  n,
197
235
  f,
198
236
  i[f],
199
237
  void 0,
200
- s,
238
+ r,
201
239
  t.$flags$
202
240
  );
203
- for (const f of Q(Object.keys(o)))
204
- J(
241
+ for (const f of ue(Object.keys(o)))
242
+ ce(
205
243
  n,
206
244
  f,
207
245
  i[f],
208
246
  o[f],
209
- s,
247
+ r,
210
248
  t.$flags$
211
249
  );
212
250
  };
213
- function Q(e) {
251
+ function ue(e) {
214
252
  return e.includes("ref") ? (
215
253
  // we need to sort these to ensure that `'ref'` is the last attr
216
254
  [...e.filter((t) => t !== "ref"), "ref"]
@@ -219,11 +257,11 @@ function Q(e) {
219
257
  e
220
258
  );
221
259
  }
222
- var M, F, E, N = !1, H = !1, I = !1, v = !1, D = (e, t, s) => {
223
- var r;
224
- const n = t.$children$[s];
225
- let i = 0, o, f, c;
226
- if (N || (I = !0, n.$tag$ === "slot" && (n.$flags$ |= n.$children$ ? (
260
+ var F, C, j, Y = !1, U = !1, te = !1, b = !1, D = (e, t, r) => {
261
+ var s;
262
+ const n = t.$children$[r];
263
+ let i = 0, o, f, l;
264
+ if (Y || (te = !0, n.$tag$ === "slot" && (n.$flags$ |= n.$children$ ? (
227
265
  // slot element has fallback content
228
266
  // still create an element that "mocks" the slot element
229
267
  2
@@ -233,308 +271,452 @@ var M, F, E, N = !1, H = !1, I = !1, v = !1, D = (e, t, s) => {
233
271
  // where actual slot content should sit next to
234
272
  1
235
273
  ))), n.$text$ !== null)
236
- o = n.$elm$ = L.createTextNode(n.$text$);
274
+ o = n.$elm$ = S.document.createTextNode(n.$text$);
237
275
  else if (n.$flags$ & 1)
238
- o = n.$elm$ = L.createTextNode("");
276
+ o = n.$elm$ = S.document.createTextNode(""), J(null, n, b);
239
277
  else {
240
- if (v || (v = n.$tag$ === "svg"), o = n.$elm$ = L.createElementNS(
241
- v ? ke : xe,
242
- !N && C.slotRelocation && n.$flags$ & 2 ? "slot-fb" : n.$tag$
243
- ), v && n.$tag$ === "foreignObject" && (v = !1), oe(null, n, v), Te(M) && o["s-si"] !== M && o.classList.add(o["s-si"] = M), n.$children$)
278
+ if (b || (b = n.$tag$ === "svg"), !S.document)
279
+ throw new Error(
280
+ "You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component."
281
+ );
282
+ if (o = n.$elm$ = S.document.createElementNS(
283
+ b ? Ie : Ce,
284
+ !Y && B.slotRelocation && n.$flags$ & 2 ? "slot-fb" : n.$tag$
285
+ ), b && n.$tag$ === "foreignObject" && (b = !1), J(null, n, b), Ue(F) && o["s-si"] !== F && o.classList.add(o["s-si"] = F), n.$children$)
244
286
  for (i = 0; i < n.$children$.length; ++i)
245
287
  f = D(e, n, i), f && o.appendChild(f);
246
- n.$tag$ === "svg" ? v = !1 : o.tagName === "foreignObject" && (v = !0);
288
+ n.$tag$ === "svg" ? b = !1 : o.tagName === "foreignObject" && (b = !0);
247
289
  }
248
- return o["s-hn"] = E, n.$flags$ & 3 && (o["s-sr"] = !0, o["s-cr"] = F, o["s-sn"] = n.$name$ || "", o["s-rf"] = (r = n.$attrs$) == null ? void 0 : r.ref, c = e && e.$children$ && e.$children$[s], c && c.$tag$ === n.$tag$ && e.$elm$ && A(e.$elm$, !1), $e(F, o, t.$elm$, e == null ? void 0 : e.$elm$)), o;
249
- }, A = (e, t) => {
250
- _.$flags$ |= 1;
251
- const s = Array.from(e.__childNodes || e.childNodes);
252
- e["s-sr"] && C.experimentalSlotFixes;
253
- for (let r = s.length - 1; r >= 0; r--) {
254
- const n = s[r];
255
- n["s-hn"] !== E && n["s-ol"] && (k(j(n).parentNode, n, j(n)), n["s-ol"].remove(), n["s-ol"] = void 0, n["s-sh"] = void 0, I = !0), t && A(n, t);
290
+ return o["s-hn"] = j, n.$flags$ & 3 && (o["s-sr"] = !0, o["s-cr"] = C, o["s-sn"] = n.$name$ || "", o["s-rf"] = (s = n.$attrs$) == null ? void 0 : s.ref, Ge(o), l = e && e.$children$ && e.$children$[r], l && l.$tag$ === n.$tag$ && e.$elm$ && R(e.$elm$, !1), Se(C, o, t.$elm$, e == null ? void 0 : e.$elm$)), o;
291
+ }, R = (e, t) => {
292
+ T.$flags$ |= 1;
293
+ const r = Array.from(e.__childNodes || e.childNodes);
294
+ e["s-sr"] && B.experimentalSlotFixes;
295
+ for (let s = r.length - 1; s >= 0; s--) {
296
+ const n = r[s];
297
+ n["s-hn"] !== j && n["s-ol"] && (x(z(n).parentNode, n, z(n)), n["s-ol"].remove(), n["s-ol"] = void 0, n["s-sh"] = void 0, te = !0), t && R(n, t);
256
298
  }
257
- _.$flags$ &= -2;
258
- }, le = (e, t, s, r, n, i) => {
299
+ T.$flags$ &= -2;
300
+ }, he = (e, t, r, s, n, i) => {
259
301
  let o = e["s-cr"] && e["s-cr"].parentNode || e, f;
260
- for (o.shadowRoot && o.tagName === E && (o = o.shadowRoot); n <= i; ++n)
261
- r[n] && (f = D(null, s, n), f && (r[n].$elm$ = f, k(o, f, j(t))));
262
- }, ae = (e, t, s) => {
263
- for (let r = t; r <= s; ++r) {
264
- const n = e[r];
302
+ for (o.shadowRoot && o.tagName === j && (o = o.shadowRoot); n <= i; ++n)
303
+ s[n] && (f = D(null, r, n), f && (s[n].$elm$ = f, x(o, f, z(t))));
304
+ }, _e = (e, t, r) => {
305
+ for (let s = t; s <= r; ++s) {
306
+ const n = e[s];
265
307
  if (n) {
266
308
  const i = n.$elm$;
267
- fe(n), i && (H = !0, i["s-ol"] ? i["s-ol"].remove() : A(i, !0), i.remove());
309
+ Ee(n), i && (U = !0, i["s-ol"] ? i["s-ol"].remove() : R(i, !0), i.remove());
268
310
  }
269
311
  }
270
- }, He = (e, t, s, r, n = !1) => {
271
- let i = 0, o = 0, f = 0, c = 0, $ = t.length - 1, u = t[0], l = t[$], d = r.length - 1, a = r[0], g = r[d], m, y;
272
- for (; i <= $ && o <= d; )
273
- if (u == null)
274
- u = t[++i];
275
- else if (l == null)
276
- l = t[--$];
312
+ }, Qe = (e, t, r, s, n = !1) => {
313
+ let i = 0, o = 0, f = 0, l = 0, c = t.length - 1, g = t[0], a = t[c], p = s.length - 1, u = s[0], $ = s[p], h, v;
314
+ for (; i <= c && o <= p; )
315
+ if (g == null)
316
+ g = t[++i];
277
317
  else if (a == null)
278
- a = r[++o];
279
- else if (g == null)
280
- g = r[--d];
281
- else if (R(u, a, n))
282
- T(u, a, n), u = t[++i], a = r[++o];
283
- else if (R(l, g, n))
284
- T(l, g, n), l = t[--$], g = r[--d];
285
- else if (R(u, g, n))
286
- (u.$tag$ === "slot" || g.$tag$ === "slot") && A(u.$elm$.parentNode, !1), T(u, g, n), k(e, u.$elm$, l.$elm$.nextSibling), u = t[++i], g = r[--d];
287
- else if (R(l, a, n))
288
- (u.$tag$ === "slot" || g.$tag$ === "slot") && A(l.$elm$.parentNode, !1), T(l, a, n), k(e, l.$elm$, u.$elm$), l = t[--$], a = r[++o];
318
+ a = t[--c];
319
+ else if (u == null)
320
+ u = s[++o];
321
+ else if ($ == null)
322
+ $ = s[--p];
323
+ else if (M(g, u, n))
324
+ k(g, u, n), g = t[++i], u = s[++o];
325
+ else if (M(a, $, n))
326
+ k(a, $, n), a = t[--c], $ = s[--p];
327
+ else if (M(g, $, n))
328
+ (g.$tag$ === "slot" || $.$tag$ === "slot") && R(g.$elm$.parentNode, !1), k(g, $, n), x(e, g.$elm$, a.$elm$.nextSibling), g = t[++i], $ = s[--p];
329
+ else if (M(a, u, n))
330
+ (g.$tag$ === "slot" || $.$tag$ === "slot") && R(a.$elm$.parentNode, !1), k(a, u, n), x(e, a.$elm$, g.$elm$), a = t[--c], u = s[++o];
289
331
  else {
290
- for (f = -1, c = i; c <= $; ++c)
291
- if (t[c] && t[c].$key$ !== null && t[c].$key$ === a.$key$) {
292
- f = c;
332
+ for (f = -1, l = i; l <= c; ++l)
333
+ if (t[l] && t[l].$key$ !== null && t[l].$key$ === u.$key$) {
334
+ f = l;
293
335
  break;
294
336
  }
295
- f >= 0 ? (y = t[f], y.$tag$ !== a.$tag$ ? m = D(t && t[o], s, f) : (T(y, a, n), t[f] = void 0, m = y.$elm$), a = r[++o]) : (m = D(t && t[o], s, o), a = r[++o]), m && k(
296
- j(u.$elm$).parentNode,
297
- m,
298
- j(u.$elm$)
337
+ f >= 0 ? (v = t[f], v.$tag$ !== u.$tag$ ? h = D(t && t[o], r, f) : (k(v, u, n), t[f] = void 0, h = v.$elm$), u = s[++o]) : (h = D(t && t[o], r, o), u = s[++o]), h && x(
338
+ z(g.$elm$).parentNode,
339
+ h,
340
+ z(g.$elm$)
299
341
  );
300
342
  }
301
- i > $ ? le(
343
+ i > c ? he(
302
344
  e,
303
- r[d + 1] == null ? null : r[d + 1].$elm$,
304
- s,
345
+ s[p + 1] == null ? null : s[p + 1].$elm$,
305
346
  r,
347
+ s,
306
348
  o,
307
- d
308
- ) : o > d && ae(t, i, $);
309
- }, R = (e, t, s = !1) => e.$tag$ === t.$tag$ ? e.$tag$ === "slot" ? e.$name$ === t.$name$ : s ? (s && !e.$key$ && t.$key$ && (e.$key$ = t.$key$), !0) : e.$key$ === t.$key$ : !1, j = (e) => e && e["s-ol"] || e, T = (e, t, s = !1) => {
310
- const r = t.$elm$ = e.$elm$, n = e.$children$, i = t.$children$, o = t.$tag$, f = t.$text$;
311
- let c;
312
- f === null ? (v = o === "svg" ? !0 : o === "foreignObject" ? !1 : v, o === "slot" && !N || oe(e, t, v), n !== null && i !== null ? He(r, n, t, i, s) : i !== null ? (e.$text$ !== null && (r.textContent = ""), le(r, null, t, i, 0, i.length - 1)) : (
349
+ p
350
+ ) : o > p && _e(t, i, c);
351
+ }, M = (e, t, r = !1) => e.$tag$ === t.$tag$ ? e.$tag$ === "slot" ? e.$name$ === t.$name$ : r ? (r && !e.$key$ && t.$key$ && (e.$key$ = t.$key$), !0) : e.$key$ === t.$key$ : !1, z = (e) => e && e["s-ol"] || e, k = (e, t, r = !1) => {
352
+ const s = t.$elm$ = e.$elm$, n = e.$children$, i = t.$children$, o = t.$tag$, f = t.$text$;
353
+ let l;
354
+ f === null ? (b = o === "svg" ? !0 : o === "foreignObject" ? !1 : b, J(e, t, b), n !== null && i !== null ? Qe(s, n, t, i, r) : i !== null ? (e.$text$ !== null && (s.textContent = ""), he(s, null, t, i, 0, i.length - 1)) : (
313
355
  // don't do this on initial render as it can cause non-hydrated content to be removed
314
- !s && C.updatable && n !== null && ae(n, 0, n.length - 1)
315
- ), v && o === "svg" && (v = !1)) : (c = r["s-cr"]) ? c.parentNode.textContent = f : e.$text$ !== f && (r.data = f);
316
- }, b = [], ce = (e) => {
317
- let t, s, r;
356
+ !r && B.updatable && n !== null && _e(n, 0, n.length - 1)
357
+ ), b && o === "svg" && (b = !1)) : (l = s["s-cr"]) ? l.parentNode.textContent = f : e.$text$ !== f && (s.data = f);
358
+ }, E = [], we = (e) => {
359
+ let t, r, s;
318
360
  const n = e.__childNodes || e.childNodes;
319
361
  for (const i of n) {
320
362
  if (i["s-sr"] && (t = i["s-cr"]) && t.parentNode) {
321
- s = t.parentNode.__childNodes || t.parentNode.childNodes;
363
+ r = t.parentNode.__childNodes || t.parentNode.childNodes;
322
364
  const o = i["s-sn"];
323
- for (r = s.length - 1; r >= 0; r--)
324
- if (t = s[r], !t["s-cn"] && !t["s-nr"] && t["s-hn"] !== i["s-hn"])
325
- if (Z(t, o)) {
326
- let f = b.find((c) => c.$nodeToRelocate$ === t);
327
- H = !0, t["s-sn"] = t["s-sn"] || o, f ? (f.$nodeToRelocate$["s-sh"] = i["s-hn"], f.$slotRefNode$ = i) : (t["s-sh"] = i["s-hn"], b.push({
365
+ for (s = r.length - 1; s >= 0; s--)
366
+ if (t = r[s], !t["s-cn"] && !t["s-nr"] && t["s-hn"] !== i["s-hn"])
367
+ if (ae(t, o)) {
368
+ let f = E.find((l) => l.$nodeToRelocate$ === t);
369
+ U = !0, t["s-sn"] = t["s-sn"] || o, f ? (f.$nodeToRelocate$["s-sh"] = i["s-hn"], f.$slotRefNode$ = i) : (t["s-sh"] = i["s-hn"], E.push({
328
370
  $slotRefNode$: i,
329
371
  $nodeToRelocate$: t
330
- })), t["s-sr"] && b.map((c) => {
331
- Z(c.$nodeToRelocate$, t["s-sn"]) && (f = b.find(($) => $.$nodeToRelocate$ === t), f && !c.$slotRefNode$ && (c.$slotRefNode$ = f.$slotRefNode$));
372
+ })), t["s-sr"] && E.map((l) => {
373
+ ae(l.$nodeToRelocate$, t["s-sn"]) && (f = E.find((c) => c.$nodeToRelocate$ === t), f && !l.$slotRefNode$ && (l.$slotRefNode$ = f.$slotRefNode$));
332
374
  });
333
- } else b.some((f) => f.$nodeToRelocate$ === t) || b.push({
375
+ } else E.some((f) => f.$nodeToRelocate$ === t) || E.push({
334
376
  $nodeToRelocate$: t
335
377
  });
336
378
  }
337
- i.nodeType === 1 && ce(i);
379
+ i.nodeType === 1 && we(i);
338
380
  }
339
- }, fe = (e) => {
340
- e.$attrs$ && e.$attrs$.ref && e.$attrs$.ref(null), e.$children$ && e.$children$.map(fe);
341
- }, k = (e, t, s) => (typeof t["s-sn"] == "string" && t["s-sr"] && t["s-cr"] && $e(t["s-cr"], t, e, t.parentElement), e == null ? void 0 : e.insertBefore(t, s));
342
- function $e(e, t, s, r) {
343
- var n;
344
- let i;
345
- if (e && typeof t["s-sn"] == "string" && t["s-sr"] && e.parentNode && e.parentNode["s-sc"] && (i = t["s-si"] || e.parentNode["s-sc"])) {
346
- const o = t["s-sn"], f = t["s-hn"];
347
- if ((n = s.classList) == null || n.add(i + "-s"), r && r.classList.contains(i + "-s")) {
348
- let c = (r.__childNodes || r.childNodes)[0], $ = !1;
381
+ }, Ee = (e) => {
382
+ e.$attrs$ && e.$attrs$.ref && e.$attrs$.ref(null), e.$children$ && e.$children$.map(Ee);
383
+ }, x = (e, t, r) => (typeof t["s-sn"] == "string" && t["s-sr"] && t["s-cr"] && Se(t["s-cr"], t, e, t.parentElement), e == null ? void 0 : e.insertBefore(t, r));
384
+ function Se(e, t, r, s) {
385
+ var n, i;
386
+ let o;
387
+ if (e && typeof t["s-sn"] == "string" && t["s-sr"] && e.parentNode && e.parentNode["s-sc"] && (o = t["s-si"] || e.parentNode["s-sc"])) {
388
+ const f = t["s-sn"], l = t["s-hn"];
389
+ if ((n = r.classList) == null || n.add(o + "-s"), s && ((i = s.classList) != null && i.contains(o + "-s"))) {
390
+ let c = (s.__childNodes || s.childNodes)[0], g = !1;
349
391
  for (; c; ) {
350
- if (c["s-sn"] !== o && c["s-hn"] === f && c["s-sr"]) {
351
- $ = !0;
392
+ if (c["s-sn"] !== f && c["s-hn"] === l && c["s-sr"]) {
393
+ g = !0;
352
394
  break;
353
395
  }
354
396
  c = c.nextSibling;
355
397
  }
356
- $ || r.classList.remove(i + "-s");
398
+ g || s.classList.remove(o + "-s");
357
399
  }
358
400
  }
359
401
  }
360
- var De = (e, t, s = !1) => {
361
- var r, n, i, o, f;
362
- const c = e.$hostElement$, $ = e.$cmpMeta$, u = e.$vnode$ || w(null, null), l = Me(t) ? t : Re(null, null, t);
363
- if (E = c.tagName, $.$attrsToReflect$ && (l.$attrs$ = l.$attrs$ || {}, $.$attrsToReflect$.map(
364
- ([d, a]) => l.$attrs$[a] = c[d]
365
- )), s && l.$attrs$)
366
- for (const d of Object.keys(l.$attrs$))
367
- c.hasAttribute(d) && !["key", "ref", "style", "class"].includes(d) && (l.$attrs$[d] = c[d]);
368
- l.$tag$ = null, l.$flags$ |= 4, e.$vnode$ = l, l.$elm$ = u.$elm$ = c.shadowRoot || c, M = c["s-sc"], N = ($.$flags$ & 1) !== 0, F = c["s-cr"], H = !1, T(u, l, s);
402
+ var Ve = (e, t, r = !1) => {
403
+ var s, n, i, o, f;
404
+ const l = e.$hostElement$, c = e.$cmpMeta$, g = e.$vnode$ || X(null, null), a = Je(t) ? t : We(null, null, t);
405
+ if (j = l.tagName, c.$attrsToReflect$ && (a.$attrs$ = a.$attrs$ || {}, c.$attrsToReflect$.map(
406
+ ([p, u]) => a.$attrs$[u] = l[p]
407
+ )), r && a.$attrs$)
408
+ for (const p of Object.keys(a.$attrs$))
409
+ l.hasAttribute(p) && !["key", "ref", "style", "class"].includes(p) && (a.$attrs$[p] = l[p]);
410
+ a.$tag$ = null, a.$flags$ |= 4, e.$vnode$ = a, a.$elm$ = g.$elm$ = l.shadowRoot || l, F = l["s-sc"], Y = !!(c.$flags$ & 1) && !(c.$flags$ & 128), C = l["s-cr"], U = !1, k(g, a, r);
369
411
  {
370
- if (_.$flags$ |= 1, I) {
371
- ce(l.$elm$);
372
- for (const d of b) {
373
- const a = d.$nodeToRelocate$;
374
- if (!a["s-ol"]) {
375
- const g = L.createTextNode("");
376
- g["s-nr"] = a, k(a.parentNode, a["s-ol"] = g, a);
412
+ if (T.$flags$ |= 1, te) {
413
+ we(a.$elm$);
414
+ for (const p of E) {
415
+ const u = p.$nodeToRelocate$;
416
+ if (!u["s-ol"] && S.document) {
417
+ const $ = S.document.createTextNode("");
418
+ $["s-nr"] = u, x(u.parentNode, u["s-ol"] = $, u);
377
419
  }
378
420
  }
379
- for (const d of b) {
380
- const a = d.$nodeToRelocate$, g = d.$slotRefNode$;
381
- if (g) {
382
- const m = g.parentNode;
383
- let y = g.nextSibling;
421
+ for (const p of E) {
422
+ const u = p.$nodeToRelocate$, $ = p.$slotRefNode$;
423
+ if ($) {
424
+ const h = $.parentNode;
425
+ let v = $.nextSibling;
384
426
  {
385
- let O = (r = a["s-ol"]) == null ? void 0 : r.previousSibling;
386
- for (; O; ) {
387
- let h = (n = O["s-nr"]) != null ? n : null;
388
- if (h && h["s-sn"] === a["s-sn"] && m === (h.__parentNode || h.parentNode)) {
389
- for (h = h.nextSibling; h === a || h != null && h["s-sr"]; )
390
- h = h == null ? void 0 : h.nextSibling;
391
- if (!h || !h["s-nr"]) {
392
- y = h;
427
+ let _ = (s = u["s-ol"]) == null ? void 0 : s.previousSibling;
428
+ for (; _; ) {
429
+ let y = (n = _["s-nr"]) != null ? n : null;
430
+ if (y && y["s-sn"] === u["s-sn"] && h === (y.__parentNode || y.parentNode)) {
431
+ for (y = y.nextSibling; y === u || y != null && y["s-sr"]; )
432
+ y = y == null ? void 0 : y.nextSibling;
433
+ if (!y || !y["s-nr"]) {
434
+ v = y;
393
435
  break;
394
436
  }
395
437
  }
396
- O = O.previousSibling;
438
+ _ = _.previousSibling;
397
439
  }
398
440
  }
399
- const ge = a.__parentNode || a.parentNode, pe = a.__nextSibling || a.nextSibling;
400
- (!y && m !== ge || pe !== y) && a !== y && (!a["s-hn"] && a["s-ol"] && (a["s-hn"] = a["s-ol"].parentNode.nodeName), k(m, a, y), a.nodeType === 1 && a.tagName !== "SLOT-FB" && (a.hidden = (i = a["s-ih"]) != null ? i : !1)), a && typeof g["s-rf"] == "function" && g["s-rf"](a);
441
+ const N = u.__parentNode || u.parentNode, L = u.__nextSibling || u.nextSibling;
442
+ (!v && h !== N || L !== v) && u !== v && (!u["s-hn"] && u["s-ol"] && (u["s-hn"] = u["s-ol"].parentNode.nodeName), x(h, u, v), u.nodeType === 1 && u.tagName !== "SLOT-FB" && (u.hidden = (i = u["s-ih"]) != null ? i : !1)), u && typeof $["s-rf"] == "function" && $["s-rf"]($);
401
443
  } else
402
- a.nodeType === 1 && (s && (a["s-ih"] = (o = a.hidden) != null ? o : !1), a.hidden = !0);
444
+ u.nodeType === 1 && (r && (u["s-ih"] = (o = u.hidden) != null ? o : !1), u.hidden = !0);
403
445
  }
404
446
  }
405
- H && re(l.$elm$), _.$flags$ &= -2, b.length = 0;
447
+ U && ye(a.$elm$), T.$flags$ &= -2, E.length = 0;
406
448
  }
407
- if (C.experimentalScopedSlotChanges && $.$flags$ & 2) {
408
- const d = l.$elm$.__childNodes || l.$elm$.childNodes;
409
- for (const a of d)
410
- a["s-hn"] !== E && !a["s-sh"] && (s && a["s-ih"] == null && (a["s-ih"] = (f = a.hidden) != null ? f : !1), a.hidden = !0);
449
+ if (B.experimentalScopedSlotChanges && c.$flags$ & 2) {
450
+ const p = a.$elm$.__childNodes || a.$elm$.childNodes;
451
+ for (const u of p)
452
+ u["s-hn"] !== j && !u["s-sh"] && (r && u["s-ih"] == null && (u["s-ih"] = (f = u.hidden) != null ? f : !1), u.hidden = !0);
411
453
  }
412
- F = void 0;
454
+ C = void 0;
413
455
  };
414
- const Ue = (e, t, s) => {
415
- [null, void 0, "", !1].includes(s) || ["innerHTML", "style"].includes(t) || e.setAttribute(t, ["object", "function"].includes(typeof s) ? "/!\\ Object props are not rendered in the code example" : s);
416
- }, ue = (e, t, s, r, n) => {
456
+ const K = {
457
+ ignore: [],
458
+ ignore_with: "_!i-£___£%_",
459
+ strict: !1,
460
+ tab_size: 2,
461
+ tag_wrap: !1,
462
+ tag_wrap_width: 80,
463
+ trim: []
464
+ }, w = "!i-£___£%_", me = [
465
+ "area",
466
+ "base",
467
+ "br",
468
+ "col",
469
+ "embed",
470
+ "hr",
471
+ "img",
472
+ "input",
473
+ "link",
474
+ "meta",
475
+ "param",
476
+ "source",
477
+ "track",
478
+ "wbr"
479
+ ], re = (e) => /<(?:[A-Za-z]+[A-Za-z0-9]*)(?:\s+.*?)*?\/{0,1}>/.test(e) || /<(?<Element>(?:[A-Za-z]+[A-Za-z0-9]*:)?(?:[A-Za-z]+[A-Za-z0-9]*))(?:\s+.*?)*?>(?:.|\n)*?<\/{1}\k<Element>>/.test(e) || /<(?<Element>(?:[a-z][a-z0-9._]*:)?[a-z][a-z0-9._]*-[a-z0-9._-]+)(?:\s+.*?)*?>(?:.|\n)*?<\/{1}\k<Element>>/.test(e), xe = (e, t) => {
480
+ if (!e || !t)
481
+ throw new Error("Both 'current' and 'updates' must be passed-in to mergeObjects()");
482
+ let r;
483
+ if (Array.isArray(e))
484
+ r = structuredClone(e).concat(t);
485
+ else if (typeof e == "object") {
486
+ r = { ...e };
487
+ for (let s of Object.keys(t))
488
+ typeof t[s] != "object" ? r[s] = t[s] : r[s] = xe(r[s] || {}, t[s]);
489
+ }
490
+ return r;
491
+ }, et = (e, t) => xe(structuredClone(e), t), tt = (e) => (e = e.replace(/<[\w:\-]+([^>]*[^\/])>/g, (t, r) => t.replace(r, (s) => s.replace(/\n/g, w + "nl!").replace(/\r/g, w + "cr!").replace(/\s/g, w + "ws!"))), e), rt = (e) => {
492
+ const t = /<([A-Za-z][A-Za-z0-9]*|[a-z][a-z0-9._]*-[a-z0-9._-]+)((?:\s+[A-Za-z0-9_-]+="[^"]*"|\s*[a-z]*)*)>/g;
493
+ return e = e.replace(t, (r, s, n) => r.replace(n, (i) => i.replace(/</g, w + "lt!").replace(/>/g, w + "gt!"))), e;
494
+ }, st = (e, t) => {
495
+ const r = t.ignore, s = t.ignore_with;
496
+ for (let n = 0; n < r.length; n++) {
497
+ const i = new RegExp(`<${r[n]}[^>]*>((.|
498
+ )*?)</${r[n]}>`, "g");
499
+ e = e.replace(i, (o, f) => o.replace(f, (l) => l.replace(/</g, "-" + s + "lt-").replace(/>/g, "-" + s + "gt-").replace(/\n/g, "-" + s + "nl-").replace(/\r/g, "-" + s + "cr-").replace(/\s/g, "-" + s + "ws-")));
500
+ }
501
+ return e;
502
+ }, nt = (e, t) => {
503
+ for (let r = 0; r < t.length; r++) {
504
+ const s = new RegExp(`(<${t[r]}[^>]*>)\\s+`, "g"), n = new RegExp(`\\s+(</${t[r]}>)`, "g");
505
+ e = e.replace(s, "$1").replace(n, "$1");
506
+ }
507
+ return e;
508
+ }, it = (e) => (e = e.replace(/<[\w:\-]+([^>]*[^\/])>/g, (t, r) => t.replace(r, (s) => s.replace(new RegExp(w + "nl!", "g"), `
509
+ `).replace(new RegExp(w + "cr!", "g"), "\r").replace(new RegExp(w + "ws!", "g"), " "))), e), ot = (e) => (e = e.replace(/<[\w:\-]+([^>]*)>/g, (t, r) => t.replace(r, (s) => s.replace(new RegExp(w + "lt!", "g"), "<").replace(new RegExp(w + "gt!", "g"), ">"))), e), at = (e, t) => {
510
+ const r = t.ignore, s = t.ignore_with;
511
+ for (let n = 0; n < r.length; n++) {
512
+ const i = new RegExp(`<${r[n]}[^>]*>((.|
513
+ )*?)</${r[n]}>`, "g");
514
+ e = e.replace(i, (o, f) => o.replace(f, (l) => l.replace(new RegExp("-" + s + "lt-", "g"), "<").replace(new RegExp("-" + s + "gt-", "g"), ">").replace(new RegExp("-" + s + "nl-", "g"), `
515
+ `).replace(new RegExp("-" + s + "cr-", "g"), "\r").replace(new RegExp("-" + s + "ws-", "g"), " ")));
516
+ }
517
+ return e;
518
+ }, lt = (e) => {
519
+ var s, n;
520
+ if (typeof e != "object") throw new Error("Config must be an object.");
521
+ if (!(Object.hasOwn(e, "ignore") || Object.hasOwn(e, "ignore_with") || Object.hasOwn(e, "strict") || Object.hasOwn(e, "tab_size") || Object.hasOwn(e, "tag_wrap") || Object.hasOwn(e, "tag_wrap_width") || Object.hasOwn(e, "trim"))) return K;
522
+ let r = e.tab_size;
523
+ if (r) {
524
+ if (typeof r != "number") throw new Error(`tab_size must be a number, not ${typeof e.tab_size}.`);
525
+ if (!Number.isSafeInteger(r)) throw new Error(`Tab size ${r} is not safe. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger for more info.`);
526
+ if (r = Math.floor(r), r < 1 || r > 16) throw new Error("Tab size out of range. Expecting 1 to 16.");
527
+ e.tab_size = r;
528
+ }
529
+ if (Object.hasOwn(e, "ignore") && (!Array.isArray(e.ignore) || !((s = e.ignore) != null && s.every((i) => typeof i == "string"))))
530
+ throw new Error("Ignore config must be an array of strings.");
531
+ if (Object.hasOwn(e, "ignore_with") && typeof e.ignore_with != "string")
532
+ throw new Error(`Ignore_with config must be a string, not ${typeof e.ignore_with}.`);
533
+ if (Object.hasOwn(e, "strict") && typeof e.strict != "boolean")
534
+ throw new Error(`Strict config must be a boolean, not ${typeof e.strict}.`);
535
+ if (Object.hasOwn(e, "tag_wrap") && typeof e.tag_wrap != "boolean")
536
+ throw new Error(`tag_wrap config must be a boolean, not ${typeof e.tag_wrap}.`);
537
+ if (Object.hasOwn(e, "tag_wrap_width") && typeof e.tag_wrap_width != "number")
538
+ throw new Error(`tag_wrap_width config must be a number, not ${typeof e.tag_wrap_width}.`);
539
+ if (Object.hasOwn(e, "trim") && (!Array.isArray(e.trim) || !((n = e.trim) != null && n.every((i) => typeof i == "string"))))
540
+ throw new Error("Trim config must be an array of strings.");
541
+ return et(K, e);
542
+ }, ct = (e, t = !0) => t && !re(e) ? e : e.replace(/<([a-zA-Z\-0-9:]+)[^>]*>/g, (r, s) => me.indexOf(s) > -1 ? `${r.substring(0, r.length - 1)} />`.replace(/\/\s\//g, "/") : r.replace(/[\s]?\/>/g, `></${s}>`)), ft = (e, t = !1) => (e = e.replace(/<textarea[^>]*>((.|\n)*?)<\/textarea>/g, (r, s) => r.replace(s, (n) => n.replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&apos;").replace(/\n/g, "&#10;").replace(/\r/g, "&#13;").replace(/\s/g, "&nbsp;"))), t && (e = e.replace(/<textarea[^>]*>((.|\n)*?)<\/textarea>/g, (r, s) => (r = r.replace(s, (n) => n.replace(/\n|\t/g, "").replace(/[a-z]+="\s*"/ig, "").replace(/>\s+</g, "><").replace(/\s+/g, " ")), r = r.replace(/\s+/g, " ").replace(/\s>/g, ">").replace(/>\s/g, ">").replace(/\s</g, "<").replace(/class=["']\s/g, (n) => n.replace(/\s/g, "")).replace(/(class=.*)\s(["'])/g, "$1$2"), r))), e), ut = (e, t = !0) => t && !re(e) ? e : (e = ft(e), e.replace(/\n|\t/g, "").replace(/>\s+</g, "><").replace(/\s+/g, " ").replace(/(.+=)"\s+"/ig, '$1""').replace(/(.+=)'\s+'/ig, "$1''").replace(/\s>/g, ">").replace(/<\s\//g, "</").replace(/class=["']\s/g, (r) => r.replace(/\s/g, "")).replace(/(class=.*)\s(["'])/g, "$1$2"));
543
+ let I, Q;
544
+ const A = {
545
+ line: []
546
+ }, gt = (e) => {
547
+ A.line = [];
548
+ let t = -1;
549
+ const r = /(<[^>]+>)|([^<]+)/g;
550
+ return e = e.replace(r, (s, n, i) => (n ? A.line.push({ type: "tag", value: s }) : i && i.trim().length > 0 && A.line.push({ type: "text", value: s }), t++, `
551
+ [#-# : ${t} : ${s} : #-#]
552
+ `)), e;
553
+ }, pt = (e) => (e = ct(e, !1), Q.length > 0 && (e = nt(e, Q)), e = ut(e, !1), e = gt(e), e), $t = (e, t) => {
554
+ const r = t.tab_size, s = t.tag_wrap, n = t.tag_wrap_width;
555
+ let i = "";
556
+ A.line.forEach((l, c) => {
557
+ e = e.replace(/\n+/g, `
558
+ `).replace(`[#-# : ${c} : ${l.value} : #-#]`, (g) => {
559
+ var v, N;
560
+ let a = 0;
561
+ const p = `[#-# : ${c - 1} : ${(v = A.line[c - 1]) == null ? void 0 : v.value} : #-#]`;
562
+ i += "0", c === 0 && a++, g.indexOf(`#-# : ${c} : </`) > -1 && a++, p.indexOf("<!doctype") > -1 && a++, p.indexOf("<!--") > -1 && a++, p.indexOf("/> : #-#") > -1 && a++, p.indexOf(`#-# : ${c - 1} : </`) > -1 && a++, ((N = A.line[c - 1]) == null ? void 0 : N.type) === "text" && a++;
563
+ const u = i.length - a;
564
+ if (i = i.substring(0, u), I && g.indexOf("<!--") > -1) return "";
565
+ const $ = g.replace(`[#-# : ${c} : `, "").replace(" : #-#]", "");
566
+ if (s && /<[A-Za-z]+\b[^>]*(?:.|\n)*?\/?>/g.test(l.value) && l.value.length > n) {
567
+ const L = /\s{1}[A-Za-z-]+(?:=".*?")?/g, _ = l.value.split(L).filter(Boolean), y = l.value.matchAll(L), H = r * u, Ae = H + r;
568
+ let P = _[0].padStart(_[0].length + H) + `
569
+ `;
570
+ for (const se of y) {
571
+ const je = se[0].trim().padStart(se[0].trim().length + Ae) + `
572
+ `;
573
+ P += je;
574
+ }
575
+ const Te = _[1].padStart(
576
+ _[1].trim().length + H + (I && me.includes(_[0].slice(1)) ? 1 : 0)
577
+ );
578
+ return P += Te, P;
579
+ } else
580
+ return $.padStart($.length + r * u);
581
+ });
582
+ }), s && (e = tt(e)), e = e.replace(
583
+ /<(?<Element>.+).*>[^<]*?[^><\/\s][^<]*?<\/{1}\k<Element>|<script[^>]*>\s+<\/script>|<(\w+)>\s+<\/(\w+)|<(?:([\w:\._-]+)|([\w:\._-]+)[^>]*[^\/])>\s+<\/([\w:\._-]+)>/g,
584
+ (l) => l.replace(/\n|\t|\s{2,}/g, "")
585
+ ), s && (e = it(e)), I && (e = e.replace(/\s\/>|\/>/g, ">"));
586
+ const o = e.substring(0, 1), f = e.substring(e.length - 1);
587
+ return o === `
588
+ ` && (e = e.substring(1, e.length)), f === `
589
+ ` && (e = e.substring(0, e.length - 1)), e;
590
+ }, dt = (e, t) => {
591
+ if (!re(e)) return e;
592
+ const r = t ? lt(t) : K;
593
+ I = r.strict;
594
+ const s = r.ignore.length > 0;
595
+ return Q = r.trim, s && (e = st(e, r)), e = rt(e), e = pt(e), e = $t(e, r), e = ot(e), s && (e = at(e, r)), e;
596
+ }, yt = (e, t, r) => {
597
+ [null, void 0, "", !1].includes(r) || ["innerHTML", "style", ""].includes(t) || e.setAttribute(t, ["object", "function"].includes(typeof r) ? "⚠️ Property must be set through a script or a framework-specific syntax." : r);
598
+ }, Oe = (e, t, r, s, n) => {
417
599
  if (t && typeof t == "string") {
418
600
  const i = document.createElement(t);
419
- Object.keys(s || {}).forEach((o) => {
420
- Ue(i, o, s[o]);
421
- }), r == null || r.forEach((o) => {
422
- ue(i, o.$tag$, o.$attrs$, o.$children$, o.$text$);
423
- }), s != null && s.innerHTML && (i.innerHTML = s.innerHTML), e.appendChild(i);
601
+ Object.keys(r || {}).forEach((o) => {
602
+ yt(i, o, r[o]);
603
+ }), s == null || s.forEach((o) => {
604
+ Oe(i, o.$tag$, o.$attrs$, o.$children$, o.$text$);
605
+ }), r != null && r.innerHTML && (i.innerHTML = r.innerHTML), e.appendChild(i);
424
606
  }
425
607
  n && (e.innerHTML = n);
426
- }, rt = (e, t) => {
608
+ }, Ft = (e, t, r = []) => {
427
609
  const s = {};
428
610
  if (typeof e != "object")
429
611
  throw new Error("filterArgs - args isn't an object.");
430
- for (const r in e)
431
- if (!r.startsWith("slot")) {
432
- const n = e[r], i = r.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
433
- (!t || !Object.keys(t).includes(r) || t[r] !== n) && (s[i] = n);
612
+ for (const n in e)
613
+ if (!r.includes(n)) {
614
+ const i = e[n], o = n.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
615
+ (!t || !Object.keys(t).includes(n) || t[n] !== i) && (s[o] = i);
434
616
  }
435
617
  return s;
436
- }, nt = (e, t) => {
437
- var r, n;
438
- const s = document.getElementById("storybook-root");
439
- if (s !== null)
440
- return (n = document.querySelector("[lang]")) == null || n.setAttribute("lang", ((r = t.globals) == null ? void 0 : r.locale) || "en"), De(
618
+ }, It = (e, t) => {
619
+ var s, n;
620
+ const r = document.getElementById("storybook-root");
621
+ if (r !== null)
622
+ return (n = document.querySelector("[lang]")) == null || n.setAttribute("lang", ((s = t.globals) == null ? void 0 : s.locale) || "en"), Ve(
441
623
  {
442
624
  $cmpMeta$: {
443
625
  $flags$: 0,
444
- $tagName$: s.tagName
626
+ $tagName$: r.tagName
445
627
  },
446
- $hostElement$: s
628
+ $hostElement$: r
447
629
  },
448
630
  e(t)
449
- ), s.children[s.children.length - 1];
450
- }, it = ({ $tag$: e, $attrs$: t, $children$: s, $text$: r }) => {
631
+ ), r.children[r.children.length - 1];
632
+ }, Ct = ({ $tag$: e, $attrs$: t, $children$: r, $text$: s }) => {
451
633
  const n = document.createElement("div");
452
- return ue(n, e, t, s, r), n.innerHTML;
453
- }, U = (e, t) => {
634
+ return Oe(n, e, t, r, s), dt(n.innerHTML, { tag_wrap: !0 }).replace(/="true"/g, "");
635
+ }, Z = (e, t) => {
454
636
  if (!t)
455
637
  return;
456
- const s = t.split("/");
457
- return `${e}${s.slice(2, s.length - 1).join("-")}--docs`;
638
+ const r = t.split("/");
639
+ return `${e}${r.slice(2, r.length - 1).join("-")}--docs`;
458
640
  };
459
- var S, q;
460
- class ot {
641
+ var m, q;
642
+ class Ut {
461
643
  constructor(t) {
462
644
  /**
463
645
  * JsonDocs
464
646
  */
465
- p(this, "jsonDoc");
647
+ d(this, "jsonDoc");
466
648
  /**
467
649
  * Get component data from the jsonDoc
468
650
  * @param tagName - tag name we want to get the data from
469
651
  * @returns component data
470
652
  */
471
- B(this, S, (t) => this.jsonDoc.components.find((s) => s.tag === t));
653
+ G(this, m, (t) => this.jsonDoc.components.find((r) => r.tag === t));
472
654
  /**
473
655
  * Get the control for the given prop
474
656
  * Based on https://storybook.js.org/docs/api/arg-types#controltype
475
657
  * @param prop - prop to get control for
476
658
  * @returns control type and options if applicable
477
659
  */
478
- B(this, q, (t) => {
479
- const s = t.type.replace(/"([^"]+)"/g, "$1").replace(/\s/g, "").replace(/\(.*?\)/g, (r) => r.replace(/\|/g, " OR ")).split("|").map((r) => r.trim().replace(/ OR /g, "|"));
480
- return t.type === "string" ? { control: { type: "text" } } : t.type === "number" ? { control: { type: "number" } } : t.type === "boolean" ? { control: { type: "boolean" } } : t.type.startsWith("{") && t.type.endsWith("}") ? { control: { type: "object" } } : s.length > 1 ? s.includes("string") ? { control: { type: "text" } } : s.every((r) => r == null ? void 0 : r.includes("[]")) ? { control: { type: "object" } } : (s.unshift(void 0), { control: { type: "select" }, options: s }) : { control: { type: "object" } };
660
+ G(this, q, (t) => {
661
+ const r = t.type.replace(/"([^"]+)"/g, "$1").replace(/\s/g, "").replace(/\(.*?\)/g, (s) => s.replace(/\|/g, " OR ")).split("|").map((s) => s.trim().replace(/ OR /g, "|"));
662
+ return t.type === "string" ? { control: { type: "text" } } : t.type === "number" ? { control: { type: "number" } } : t.type === "boolean" ? { control: { type: "boolean" } } : t.type.startsWith("{") && t.type.endsWith("}") ? { control: { type: "object" } } : r.length > 1 ? r.includes("string") ? { control: { type: "text" } } : r.every((s) => s == null ? void 0 : s.includes("[]")) ? { control: { type: "object" } } : (r.unshift(void 0), { control: { type: "select" }, options: r }) : { control: { type: "object" } };
481
663
  });
482
664
  /**
483
665
  * Extract component arg types from the component data
484
666
  * @param tagName - tag name we want to extract the arg types from
485
667
  * @returns component arg types
486
668
  */
487
- p(this, "extractArgTypes", (t) => {
488
- const s = x(this, S).call(this, t), r = s == null ? void 0 : s.props.reduce((u, l) => {
489
- const { control: d, options: a } = x(this, q).call(this, l);
669
+ d(this, "extractArgTypes", (t) => {
670
+ const r = O(this, m).call(this, t), s = r == null ? void 0 : r.props.reduce((g, a) => {
671
+ const { control: p, options: u } = O(this, q).call(this, a);
490
672
  return {
491
- ...u,
492
- [l.name]: {
493
- name: l.attr || l.name,
494
- description: l.docs,
495
- type: { required: l.required },
673
+ ...g,
674
+ [a.name]: {
675
+ name: a.attr || a.name,
676
+ description: a.docs,
677
+ type: { required: a.required },
496
678
  table: {
497
679
  category: "props",
498
- type: { summary: l.type },
499
- defaultValue: { summary: l.default }
680
+ type: { summary: a.type },
681
+ defaultValue: { summary: a.default }
500
682
  },
501
- control: d,
502
- options: a
683
+ control: p,
684
+ options: u
503
685
  }
504
686
  };
505
- }, {}), n = s == null ? void 0 : s.events.reduce(
506
- (u, l) => ({
507
- ...u,
508
- [l.event]: {
509
- name: l.event,
510
- description: l.docs,
687
+ }, {}), n = r == null ? void 0 : r.events.reduce(
688
+ (g, a) => ({
689
+ ...g,
690
+ [a.event]: {
691
+ name: a.event,
692
+ description: a.docs,
511
693
  table: {
512
694
  category: "events",
513
- type: { summary: l.detail }
695
+ type: { summary: a.detail }
514
696
  }
515
697
  }
516
698
  }),
517
699
  {}
518
- ), i = s == null ? void 0 : s.methods.reduce(
519
- (u, l) => ({
520
- ...u,
521
- [l.name]: {
522
- name: l.name,
523
- description: l.docs,
700
+ ), i = r == null ? void 0 : r.methods.reduce(
701
+ (g, a) => ({
702
+ ...g,
703
+ [a.name]: {
704
+ name: a.name,
705
+ description: a.docs,
524
706
  table: {
525
707
  category: "methods",
526
- type: { summary: l.signature }
708
+ type: { summary: a.signature }
527
709
  }
528
710
  }
529
711
  }),
530
712
  {}
531
- ), o = s == null ? void 0 : s.slots.reduce(
532
- (u, l) => ({
533
- ...u,
534
- [l.name]: {
535
- name: l.name !== "" ? l.name : "default",
713
+ ), o = r == null ? void 0 : r.slots.reduce(
714
+ (g, a) => ({
715
+ ...g,
716
+ [a.name]: {
717
+ name: a.name !== "" ? a.name : "default",
536
718
  // default slot are unnamed
537
- description: l.docs,
719
+ description: a.docs,
538
720
  table: {
539
721
  category: "slots",
540
722
  type: { summary: void 0 }
@@ -542,12 +724,12 @@ class ot {
542
724
  }
543
725
  }),
544
726
  {}
545
- ), f = s == null ? void 0 : s.styles.reduce(
546
- (u, l) => ({
547
- ...u,
548
- [l.name]: {
549
- name: l.name,
550
- description: l.docs,
727
+ ), f = r == null ? void 0 : r.styles.reduce(
728
+ (g, a) => ({
729
+ ...g,
730
+ [a.name]: {
731
+ name: a.name,
732
+ description: a.docs,
551
733
  table: {
552
734
  category: "custom properties",
553
735
  type: { summary: void 0 }
@@ -555,41 +737,41 @@ class ot {
555
737
  }
556
738
  }),
557
739
  {}
558
- ), c = s == null ? void 0 : s.dependencies.reduce((u, l) => {
559
- const d = x(this, S).call(this, l);
560
- return {
561
- ...u,
562
- [l]: {
563
- name: l,
564
- description: `<a href="./?path=/docs/${U("", d == null ? void 0 : d.filePath)}">View Component Documentation</a>`,
740
+ ), l = r == null ? void 0 : r.dependencies.reduce((g, a) => {
741
+ const p = O(this, m).call(this, a);
742
+ return p ? {
743
+ ...g,
744
+ [a]: {
745
+ name: a,
746
+ description: `<a href="./?path=/docs/${Z("", p == null ? void 0 : p.filePath)}">View Component Documentation</a>`,
565
747
  table: {
566
748
  category: "depends on",
567
749
  type: { summary: void 0 }
568
750
  }
569
751
  }
570
- };
571
- }, {}), $ = s == null ? void 0 : s.dependents.reduce((u, l) => {
572
- const d = x(this, S).call(this, l);
573
- return {
574
- ...u,
575
- [l]: {
576
- name: l,
577
- description: `<a href="./?path=/docs/${U("", d == null ? void 0 : d.filePath)}">View Component Documentation</a>`,
752
+ } : g;
753
+ }, {}), c = r == null ? void 0 : r.dependents.reduce((g, a) => {
754
+ const p = O(this, m).call(this, a);
755
+ return p ? {
756
+ ...g,
757
+ [a]: {
758
+ name: a,
759
+ description: `<a href="./?path=/docs/${Z("", p == null ? void 0 : p.filePath)}">View Component Documentation</a>`,
578
760
  table: {
579
761
  category: "used by",
580
762
  type: { summary: void 0 }
581
763
  }
582
764
  }
583
- };
765
+ } : g;
584
766
  }, {});
585
767
  return {
586
- ...r,
768
+ ...s,
587
769
  ...n,
588
770
  ...i,
589
771
  ...o,
590
772
  ...f,
591
- ...c,
592
- ...$
773
+ ...l,
774
+ ...c
593
775
  };
594
776
  });
595
777
  /**
@@ -597,29 +779,29 @@ class ot {
597
779
  * @param tagName - tag name we want to extract the description from
598
780
  * @returns component description
599
781
  */
600
- p(this, "extractComponentDescription", (t) => {
601
- const s = x(this, S).call(this, t);
602
- return (s == null ? void 0 : s.readme) || (s == null ? void 0 : s.docs);
782
+ d(this, "extractComponentDescription", (t) => {
783
+ const r = O(this, m).call(this, t);
784
+ return (r == null ? void 0 : r.readme) || (r == null ? void 0 : r.docs);
603
785
  });
604
786
  this.jsonDoc = t;
605
787
  }
606
788
  }
607
- S = new WeakMap(), q = new WeakMap();
608
- const qe = (e, t) => {
789
+ m = new WeakMap(), q = new WeakMap();
790
+ const bt = (e, t) => {
609
791
  if (t)
610
792
  return `${e}${t}`;
611
- }, de = (e) => {
793
+ }, ke = (e) => {
612
794
  let t = e.overview ? `${e.overview}
613
795
 
614
796
  ` : "";
615
- const s = e.props.filter(({ attr: n }) => n !== void 0);
616
- s.length && (t += `Attributes:
617
- `, t += s.map(({ attr: n, docs: i }) => `- \`${n}\`: ${i}
797
+ const r = e.props.filter(({ attr: n }) => n !== void 0);
798
+ r.length && (t += `Attributes:
799
+ `, t += r.map(({ attr: n, docs: i }) => `- \`${n}\`: ${i}
618
800
  `).join(""), t += `
619
801
  `);
620
- const r = e.props.filter(({ attr: n }) => n === void 0);
621
- return r.length && (t += `Properties:
622
- `, t += r.map(({ name: n, docs: i }) => `- \`${n}\`: ${i}
802
+ const s = e.props.filter(({ attr: n }) => n === void 0);
803
+ return s.length && (t += `Properties:
804
+ `, t += s.map(({ name: n, docs: i }) => `- \`${n}\`: ${i}
623
805
  `).join(""), t += `
624
806
  `), e.methods.length && (t += `Methods:
625
807
  `, t += e.methods.map(({ name: n, docs: i }) => `- \`${n}\`: ${i}
@@ -634,24 +816,24 @@ const qe = (e, t) => {
634
816
  `, t += e.slots.map(({ name: n, docs: i }) => `- \`${n}\`: ${i}
635
817
  `).join(""), t += `
636
818
  `), t;
637
- }, z = (e) => `${e.docs}
819
+ }, V = (e) => `${e.docs}
638
820
 
639
- Type: \`${e.type}\``, lt = (e, t, s, r) => ({
821
+ Type: \`${e.type}\``, Dt = (e, t, r, s) => ({
640
822
  $schema: "https://json.schemastore.org/web-types",
641
823
  name: e,
642
824
  version: t,
643
825
  "description-markup": "markdown",
644
826
  contributions: {
645
827
  html: {
646
- elements: s.components.map((n) => {
647
- const i = U(r, n.filePath);
828
+ elements: r.components.map((n) => {
829
+ const i = Z(s, n.filePath);
648
830
  return {
649
831
  name: n.tag,
650
- description: de(n),
832
+ description: ke(n),
651
833
  "doc-url": i,
652
834
  attributes: n.props.filter((o) => o.attr).map((o) => ({
653
835
  name: o.attr,
654
- description: z(o),
836
+ description: V(o),
655
837
  "doc-url": i,
656
838
  value: {
657
839
  type: o.type,
@@ -662,7 +844,7 @@ Type: \`${e.type}\``, lt = (e, t, s, r) => ({
662
844
  js: {
663
845
  properties: n.props.map((o) => ({
664
846
  name: o.name,
665
- description: z(o),
847
+ description: V(o),
666
848
  "doc-url": i,
667
849
  value: {
668
850
  type: o.type,
@@ -685,23 +867,23 @@ Type: \`${e.type}\``, lt = (e, t, s, r) => ({
685
867
  })
686
868
  }
687
869
  }
688
- }), Ce = (e, t, s) => [
689
- { name: "Storybook", url: U(e, s) },
690
- { name: "Sources", url: qe(t, s) }
691
- ], Be = (e) => {
870
+ }), vt = (e, t, r) => [
871
+ { name: "Storybook", url: Z(e, r) },
872
+ { name: "Sources", url: bt(t, r) }
873
+ ], ht = (e) => {
692
874
  if (!e.values.some(({ value: t }) => t === void 0))
693
875
  return e.values.map(({ value: t }) => ({ name: t }));
694
- }, at = (e, t, s) => ({
876
+ }, Zt = (e, t, r) => ({
695
877
  version: 1.1,
696
- tags: e.components.map((r) => {
697
- const n = Ce(t, s, r.filePath);
878
+ tags: e.components.map((s) => {
879
+ const n = vt(t, r, s.filePath);
698
880
  return {
699
- name: r.tag,
700
- description: de(r),
701
- attributes: r.props.map((i) => ({
881
+ name: s.tag,
882
+ description: ke(s),
883
+ attributes: s.props.map((i) => ({
702
884
  name: i.attr || i.name,
703
- description: z(i),
704
- values: Be(i),
885
+ description: V(i),
886
+ values: ht(i),
705
887
  references: n
706
888
  })),
707
889
  references: n
@@ -709,55 +891,55 @@ Type: \`${e.type}\``, lt = (e, t, s, r) => ({
709
891
  }),
710
892
  globalAttributes: [],
711
893
  valueSets: []
712
- }), ct = (e) => ({
894
+ }), qt = (e) => ({
713
895
  version: 1.1,
714
896
  properties: e.components.flatMap(
715
- (t) => t.styles.map((s) => ({
716
- name: s.name,
717
- description: s.docs
897
+ (t) => t.styles.map((r) => ({
898
+ name: r.name,
899
+ description: r.docs
718
900
  }))
719
901
  )
720
- }), ft = (e) => {
721
- const t = { value: "2023", pattern: "yyyy" }, s = { value: "12", pattern: "mm" }, r = { value: "24", pattern: "dd" };
722
- return ze([t.value, s.value, r.value].join("-"), e, { timeZone: "UTC" }).replace(t.value, t.pattern).replace(s.value, s.pattern).replace(r.value, r.pattern);
723
- }, $t = (e) => e.toISOString().split("T")[0], Pe = (e, t, s) => {
724
- const r = e.closest("[lang]"), n = Intl.NumberFormat.supportedLocalesOf(r == null ? void 0 : r.lang), i = n.length > 0 && typeof n[0] == "string" ? n[0] : navigator.language || s, o = i.split("-").shift();
902
+ }), Bt = (e) => {
903
+ const t = { value: "2023", pattern: "yyyy" }, r = { value: "12", pattern: "mm" }, s = { value: "24", pattern: "dd" };
904
+ return Et([t.value, r.value, s.value].join("-"), e, { timeZone: "UTC" }).replace(t.value, t.pattern).replace(r.value, r.pattern).replace(s.value, s.pattern);
905
+ }, Ht = (e) => e.toISOString().split("T")[0], _t = (e, t, r) => {
906
+ const s = e.closest("[lang]"), n = Intl.NumberFormat.supportedLocalesOf(s == null ? void 0 : s.lang), i = n.length > 0 && typeof n[0] == "string" ? n[0] : navigator.language || r, o = i.split("-").shift();
725
907
  return Object.keys(t).length === 0 ? {
726
908
  locale: i,
727
- messages: { lang: s }
909
+ messages: { lang: r }
728
910
  } : {
729
911
  locale: i,
730
- messages: t[o] || t[s] || { lang: s }
912
+ messages: t[o] || t[r] || { lang: r }
731
913
  };
732
- }, ut = (e, t, s) => new Intl.NumberFormat(t, { style: "currency", currency: s }).format(e), dt = (e, t, s = 0) => new Intl.NumberFormat(t, { minimumFractionDigits: s }).format(s > 0 ? Number(e == null ? void 0 : e.toFixed(s)) : e), gt = (e, t, s = 0) => new Intl.NumberFormat(t, {
914
+ }, Pt = (e, t, r) => new Intl.NumberFormat(t, { style: "currency", currency: r }).format(e), Gt = (e, t, r = 0) => new Intl.NumberFormat(t, { minimumFractionDigits: r }).format(Number(e)), Wt = (e, t, r = 0) => new Intl.NumberFormat(t, {
733
915
  style: "percent",
734
- minimumFractionDigits: s,
735
- maximumFractionDigits: s
736
- }).format(e), pt = (e, t, s, r = "short", n = 0) => new Intl.NumberFormat(t, {
916
+ minimumFractionDigits: r,
917
+ maximumFractionDigits: r
918
+ }).format(e), Xt = (e, t, r, s = "short", n = 0) => new Intl.NumberFormat(t, {
737
919
  style: "unit",
738
- unit: s,
739
- unitDisplay: r,
920
+ unit: r,
921
+ unitDisplay: s,
740
922
  minimumFractionDigits: n,
741
923
  maximumFractionDigits: n
742
- }).format(e), we = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/, ze = (e, t, s) => typeof e != "string" || e === "" || !we.test(e) ? "" : new Intl.DateTimeFormat(t, s).format(new Date(e)), ht = (e, t) => (s) => Pe(s, e, t), vt = ({ disconnect: e, observe: t, takeRecords: s }) => {
743
- class r {
924
+ }).format(e), wt = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/, Et = (e, t, r) => typeof e != "string" || e === "" || !wt.test(e) ? "" : new Intl.DateTimeFormat(t, r).format(new Date(e)), Jt = (e, t) => (r) => _t(r, e, t), Yt = ({ disconnect: e, observe: t, takeRecords: r }) => {
925
+ class s {
744
926
  constructor(i) {
745
927
  /**
746
928
  *
747
929
  */
748
- p(this, "disconnect", e);
930
+ d(this, "disconnect", e);
749
931
  /**
750
932
  *
751
933
  */
752
- p(this, "observe", t);
934
+ d(this, "observe", t);
753
935
  /**
754
936
  *
755
937
  */
756
- p(this, "takeRecords", s);
938
+ d(this, "takeRecords", r);
757
939
  /**
758
940
  *
759
941
  */
760
- p(this, "cb");
942
+ d(this, "cb");
761
943
  this.cb = i;
762
944
  }
763
945
  }
@@ -765,51 +947,51 @@ Type: \`${e.type}\``, lt = (e, t, s, r) => ({
765
947
  Object.defineProperty(n, "MutationObserver", {
766
948
  writable: !0,
767
949
  configurable: !0,
768
- value: r
950
+ value: s
769
951
  });
770
- }), r;
771
- }, yt = ({ disconnect: e, observe: t }) => {
772
- class s {
952
+ }), s;
953
+ }, Kt = ({ disconnect: e, observe: t }) => {
954
+ class r {
773
955
  constructor(n) {
774
956
  /**
775
957
  *
776
958
  */
777
- p(this, "disconnect", e);
959
+ d(this, "disconnect", e);
778
960
  /**
779
961
  *
780
962
  */
781
- p(this, "observe", t);
963
+ d(this, "observe", t);
782
964
  /**
783
965
  *
784
966
  */
785
- p(this, "unobserve");
967
+ d(this, "unobserve");
786
968
  /**
787
969
  *
788
970
  */
789
- p(this, "cb");
971
+ d(this, "cb");
790
972
  this.cb = n;
791
973
  }
792
974
  }
793
- return [window, global].forEach((r) => {
794
- Object.defineProperty(r, "ResizeObserver", {
975
+ return [window, global].forEach((s) => {
976
+ Object.defineProperty(s, "ResizeObserver", {
795
977
  writable: !0,
796
978
  configurable: !0,
797
- value: s
979
+ value: r
798
980
  });
799
- }), s;
981
+ }), r;
800
982
  };
801
- class Ie extends Event {
983
+ class St extends Event {
802
984
  constructor() {
803
985
  super(...arguments);
804
986
  /**
805
987
  *
806
988
  */
807
- p(this, "detail");
989
+ d(this, "detail");
808
990
  }
809
991
  // eslint-disable-line @typescript-eslint/no-explicit-any
810
992
  }
811
- const mt = () => {
812
- class e extends Ie {
993
+ const Qt = () => {
994
+ class e extends St {
813
995
  }
814
996
  return [window, global].forEach((t) => {
815
997
  Object.defineProperty(t, "SubmitEvent", {
@@ -818,10 +1000,10 @@ const mt = () => {
818
1000
  value: e
819
1001
  });
820
1002
  }), e;
821
- }, bt = (e) => {
822
- const t = (s) => (setTimeout(s, 1), e(), 0);
823
- return [window, global].forEach((s) => {
824
- Object.defineProperty(s, "requestAnimationFrame", {
1003
+ }, Vt = (e) => {
1004
+ const t = (r) => (setTimeout(r, 1), e(), 0);
1005
+ return [window, global].forEach((r) => {
1006
+ Object.defineProperty(r, "requestAnimationFrame", {
825
1007
  writable: !0,
826
1008
  configurable: !0,
827
1009
  value: t
@@ -829,39 +1011,39 @@ const mt = () => {
829
1011
  }), t;
830
1012
  };
831
1013
  export {
832
- Ze as ClassList,
833
- ot as StorybookPreview,
834
- Je as allItemsAreString,
835
- tt as cleanString,
836
- Ge as createID,
837
- we as dateRegExp,
838
- $t as dateToString,
839
- ht as defineLocales,
840
- rt as filterArgs,
841
- Qe as focusableElements,
842
- ft as getLocaleDatePattern,
843
- Y as getParentWindows,
844
- it as getStoryHTML,
845
- U as getStorybookUrl,
846
- Ye as getWindows,
847
- Ke as isTagName,
848
- et as isValidNumber,
849
- me as isValidString,
850
- Xe as isValideID,
851
- ut as localeCurrency,
852
- ze as localeDate,
853
- dt as localeNumber,
854
- gt as localePercent,
855
- pt as localeUnit,
856
- st as nextTick,
857
- bt as setUpRequestAnimationFrameMock,
858
- vt as setupMutationObserverMock,
859
- yt as setupResizeObserverMock,
860
- mt as setupSubmitEventMock,
861
- nt as stencilWrapper,
862
- Ve as toString,
863
- ct as vsCodeCssGenerator,
864
- at as vsCodeGenerator,
865
- lt as webTypesGenerator
1014
+ kt as ClassList,
1015
+ Ut as StorybookPreview,
1016
+ At as allItemsAreString,
1017
+ Lt as cleanString,
1018
+ xt as createID,
1019
+ wt as dateRegExp,
1020
+ Ht as dateToString,
1021
+ Jt as defineLocales,
1022
+ Ft as filterArgs,
1023
+ jt as focusableElements,
1024
+ Bt as getLocaleDatePattern,
1025
+ ge as getParentWindows,
1026
+ Ct as getStoryHTML,
1027
+ Z as getStorybookUrl,
1028
+ Rt as getWindows,
1029
+ Tt as isTagName,
1030
+ Nt as isValidNumber,
1031
+ Le as isValidString,
1032
+ Ot as isValideID,
1033
+ Pt as localeCurrency,
1034
+ Et as localeDate,
1035
+ Gt as localeNumber,
1036
+ Wt as localePercent,
1037
+ Xt as localeUnit,
1038
+ Mt as nextTick,
1039
+ Vt as setUpRequestAnimationFrameMock,
1040
+ Yt as setupMutationObserverMock,
1041
+ Kt as setupResizeObserverMock,
1042
+ Qt as setupSubmitEventMock,
1043
+ It as stencilWrapper,
1044
+ zt as toString,
1045
+ qt as vsCodeCssGenerator,
1046
+ Zt as vsCodeGenerator,
1047
+ Dt as webTypesGenerator
866
1048
  };
867
1049
  //# sourceMappingURL=index.es.js.map