@mgdis/stencil-helpers 1.1.4 → 1.1.6

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,30 +1,30 @@
1
- var ae = Object.defineProperty;
2
- var fe = (e, t, s) => t in e ? ae(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
3
- var g = (e, t, s) => (fe(e, typeof t != "symbol" ? t + "" : t, s), s);
4
- const Ne = (e = "", t = 10) => {
1
+ var $e = Object.defineProperty;
2
+ var ue = (e, t, s) => t in e ? $e(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
3
+ var v = (e, t, s) => ue(e, typeof t != "symbol" ? t + "" : t, s);
4
+ const Ce = (e = "", t = 10) => {
5
5
  const s = new Uint8Array(t);
6
6
  crypto.getRandomValues(s);
7
- const r = Array.from(s).map((l) => l.toString(16).padStart(2, "0")).join("").slice(0, t);
7
+ const r = Array.from(s).map((o) => o.toString(16).padStart(2, "0")).join("").slice(0, t);
8
8
  return e !== "" ? `${e}-${r}` : r;
9
9
  };
10
- class Be {
10
+ class He {
11
11
  constructor(t = []) {
12
12
  /**
13
13
  * Available classes
14
14
  */
15
- g(this, "classes");
15
+ v(this, "classes");
16
16
  /**
17
17
  * Add class
18
18
  * @param className - class name to add
19
19
  */
20
- g(this, "add", (t) => {
20
+ v(this, "add", (t) => {
21
21
  this.has(t) || this.classes.push(t);
22
22
  });
23
23
  /**
24
24
  * Delete class
25
25
  * @param className - class name to delete
26
26
  */
27
- g(this, "delete", (t) => {
27
+ v(this, "delete", (t) => {
28
28
  const s = this.classes.indexOf(t);
29
29
  s > -1 && this.classes.splice(s, 1);
30
30
  });
@@ -33,85 +33,85 @@ class Be {
33
33
  * @param className - class name to check
34
34
  * @returns class name is in the list
35
35
  */
36
- g(this, "has", (t) => this.classes.includes(t));
36
+ v(this, "has", (t) => this.classes.includes(t));
37
37
  /**
38
38
  * Join classes seperated by spaces
39
39
  * @returns joined values
40
40
  */
41
- g(this, "join", () => this.classes.join(" "));
41
+ v(this, "join", () => this.classes.join(" "));
42
42
  this.classes = t;
43
43
  }
44
44
  }
45
- const Ue = (e) => Array.isArray(e) && e.every((t) => typeof t == "string"), Ce = (e, t) => t.includes(e == null ? void 0 : e.tagName.toLowerCase()), He = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"]), [identifier], mg-button', we = (e) => {
46
- const t = X(e), s = K(e);
45
+ const Pe = (e) => Array.isArray(e) && e.every((t) => typeof t == "string"), Be = (e, t) => t.includes(e == null ? void 0 : e.tagName.toLowerCase()), We = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"]), [identifier], mg-button', ze = (e) => {
46
+ const t = Q(e), s = Z(e);
47
47
  return [e, ...t, ...s];
48
- }, X = (e, t = []) => {
48
+ }, Q = (e, t = []) => {
49
49
  if (e.self !== e.top)
50
50
  try {
51
51
  const s = e.parent;
52
- return s ? (t.push(s), X(s, t)) : t;
52
+ return s ? (t.push(s), Q(s, t)) : t;
53
53
  } catch (s) {
54
54
  return console.error("Different hosts between iframes:", s), t;
55
55
  }
56
56
  return t;
57
- }, K = (e, t = []) => {
57
+ }, Z = (e, t = []) => {
58
58
  if (e.frames.length > 0)
59
59
  for (const s of Array.from(e.frames))
60
- t.push(s), K(s, t);
60
+ t.push(s), Z(s, t);
61
61
  return t;
62
- }, Pe = (e) => typeof e == "string" && e.trim() !== "", We = (e) => typeof e == "string" ? e.toLocaleLowerCase().normalize("NFD").replaceAll(/[\u0300-\u036f]/g, "") : e, ze = async (e) => e(), Q = (e, t) => {
62
+ }, Ie = (e) => typeof e == "string" && e.trim() !== "", qe = (e) => typeof e == "string" ? e.toLocaleLowerCase().normalize("NFD").replaceAll(/[\u0300-\u036f]/g, "") : e, Ge = async (e) => e(), J = (e, t) => {
63
63
  if (!t)
64
64
  return;
65
65
  const s = t.split("/");
66
66
  return `${e}${s.slice(2, s.length - 1).join("-")}--docs`;
67
- }, ce = (e, t) => {
67
+ }, de = (e, t) => {
68
68
  if (t)
69
69
  return `${e}${t}`;
70
- }, J = (e) => {
70
+ }, Y = (e) => {
71
71
  let t = e.overview ? `${e.overview}
72
72
 
73
73
  ` : "";
74
- const s = e.props.filter(({ attr: l }) => l !== void 0);
74
+ const s = e.props.filter(({ attr: o }) => o !== void 0);
75
75
  s.length && (t += `Attributes:
76
- `, t += s.map(({ attr: l, docs: i }) => `- \`${l}\`: ${i}
76
+ `, t += s.map(({ attr: o, docs: l }) => `- \`${o}\`: ${l}
77
77
  `).join(""), t += `
78
78
  `);
79
- const r = e.props.filter(({ attr: l }) => l === void 0);
79
+ const r = e.props.filter(({ attr: o }) => o === void 0);
80
80
  return r.length && (t += `Properties:
81
- `, t += r.map(({ name: l, docs: i }) => `- \`${l}\`: ${i}
81
+ `, t += r.map(({ name: o, docs: l }) => `- \`${o}\`: ${l}
82
82
  `).join(""), t += `
83
83
  `), e.methods.length && (t += `Methods:
84
- `, t += e.methods.map(({ name: l, docs: i }) => `- \`${l}\`: ${i}
84
+ `, t += e.methods.map(({ name: o, docs: l }) => `- \`${o}\`: ${l}
85
85
  `).join(""), t += `
86
86
  `), e.events.length && (t += `Events:
87
- `, t += e.events.map(({ event: l, docs: i }) => `- \`${l}\`: ${i}
87
+ `, t += e.events.map(({ event: o, docs: l }) => `- \`${o}\`: ${l}
88
88
  `).join(""), t += `
89
89
  `), e.listeners.length && (t += `Listeners:
90
- `, t += e.listeners.map(({ event: l }) => `- \`${l}\`
90
+ `, t += e.listeners.map(({ event: o }) => `- \`${o}\`
91
91
  `).join(""), t += `
92
92
  `), e.slots.length && (t += `Slots:
93
- `, t += e.slots.map(({ name: l, docs: i }) => `- \`${l}\`: ${i}
93
+ `, t += e.slots.map(({ name: o, docs: l }) => `- \`${o}\`: ${l}
94
94
  `).join(""), t += `
95
95
  `), t;
96
- }, M = (e) => `${e.docs}
96
+ }, _ = (e) => `${e.docs}
97
97
 
98
- Type: \`${e.type}\``, qe = (e, t, s, r) => ({
98
+ Type: \`${e.type}\``, Xe = (e, t, s, r) => ({
99
99
  $schema: "https://json.schemastore.org/web-types",
100
100
  name: e,
101
101
  version: t,
102
102
  "description-markup": "markdown",
103
103
  contributions: {
104
104
  html: {
105
- elements: s.components.map((l) => {
106
- const i = Q(r, l.filePath);
105
+ elements: s.components.map((o) => {
106
+ const l = J(r, o.filePath);
107
107
  return {
108
- name: l.tag,
109
- description: J(l),
110
- "doc-url": i,
111
- attributes: l.props.filter((n) => n.attr).map((n) => ({
108
+ name: o.tag,
109
+ description: Y(o),
110
+ "doc-url": l,
111
+ attributes: o.props.filter((n) => n.attr).map((n) => ({
112
112
  name: n.attr,
113
- description: M(n),
114
- "doc-url": i,
113
+ description: _(n),
114
+ "doc-url": l,
115
115
  value: {
116
116
  type: n.type,
117
117
  default: n.default,
@@ -119,17 +119,17 @@ Type: \`${e.type}\``, qe = (e, t, s, r) => ({
119
119
  }
120
120
  })),
121
121
  js: {
122
- properties: l.props.map((n) => ({
122
+ properties: o.props.map((n) => ({
123
123
  name: n.name,
124
- description: M(n),
125
- "doc-url": i,
124
+ description: _(n),
125
+ "doc-url": l,
126
126
  value: {
127
127
  type: n.type,
128
128
  default: n.default,
129
129
  required: n.required
130
130
  }
131
131
  })),
132
- events: l.events.map((n) => ({
132
+ events: o.events.map((n) => ({
133
133
  name: n.event,
134
134
  description: n.docs
135
135
  }))
@@ -138,40 +138,40 @@ Type: \`${e.type}\``, qe = (e, t, s, r) => ({
138
138
  })
139
139
  }
140
140
  }
141
- }), $e = (e, t, s) => [
142
- { name: "Storybook", url: Q(e, s) },
143
- { name: "Sources", url: ce(t, s) }
144
- ], ue = (e) => {
141
+ }), pe = (e, t, s) => [
142
+ { name: "Storybook", url: J(e, s) },
143
+ { name: "Sources", url: de(t, s) }
144
+ ], ve = (e) => {
145
145
  if (!e.values.some(({ value: t }) => t === void 0))
146
146
  return e.values.map(({ value: t }) => ({ name: t }));
147
- }, Ie = (e, t, s, r) => ({
147
+ }, Ke = (e, t, s, r) => ({
148
148
  version: e,
149
- tags: t.components.map((l) => {
150
- const i = $e(s, r, l.filePath);
149
+ tags: t.components.map((o) => {
150
+ const l = pe(s, r, o.filePath);
151
151
  return {
152
- name: l.tag,
153
- description: J(l),
154
- attributes: l.props.map((n) => ({
152
+ name: o.tag,
153
+ description: Y(o),
154
+ attributes: o.props.map((n) => ({
155
155
  name: n.attr || n.name,
156
- description: M(n),
157
- values: ue(n),
158
- references: i
156
+ description: _(n),
157
+ values: ve(n),
158
+ references: l
159
159
  })),
160
- references: i
160
+ references: l
161
161
  };
162
162
  }),
163
163
  globalAttributes: [],
164
164
  valueSets: []
165
- }), Ge = (e) => {
165
+ }), Qe = (e) => {
166
166
  const t = { value: "2023", pattern: "yyyy" }, s = { value: "12", pattern: "mm" }, r = { value: "24", pattern: "dd" };
167
- return ge([t.value, s.value, r.value].join("-"), e).replace(t.value, t.pattern).replace(s.value, s.pattern).replace(r.value, r.pattern);
168
- }, Xe = (e) => e.toISOString().split("T")[0], de = (e, t, s) => {
169
- const r = e.closest("[lang]"), l = Intl.NumberFormat.supportedLocalesOf(r == null ? void 0 : r.lang), i = l.length > 0 && typeof l[0] == "string" ? l[0] : navigator.language || s, n = i.split("-").shift();
167
+ return ye([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);
168
+ }, Ze = (e) => e.toISOString().split("T")[0], ge = (e, t, s) => {
169
+ const r = e.closest("[lang]"), o = Intl.NumberFormat.supportedLocalesOf(r == null ? void 0 : r.lang), l = o.length > 0 && typeof o[0] == "string" ? o[0] : navigator.language || s, n = l.split("-").shift();
170
170
  return {
171
- locale: i,
171
+ locale: l,
172
172
  messages: t[n] || t[s]
173
173
  };
174
- }, Ke = (e, t, s) => new Intl.NumberFormat(t, { style: "currency", currency: s }).format(e), Qe = (e, t, s = 0) => new Intl.NumberFormat(t, { minimumFractionDigits: s }).format(s > 0 ? Number(e == null ? void 0 : e.toFixed(s)) : e), pe = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/, ge = (e, t) => typeof e != "string" || e === "" || !pe.test(e) ? "" : new Intl.DateTimeFormat(t).format(new Date(e)), Je = (e, t) => (s) => de(s, e, t);
174
+ }, Je = (e, t, s) => new Intl.NumberFormat(t, { style: "currency", currency: s }).format(e), Ye = (e, t, s = 0) => new Intl.NumberFormat(t, { minimumFractionDigits: s }).format(s > 0 ? Number(e == null ? void 0 : e.toFixed(s)) : e), he = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/, ye = (e, t, s) => typeof e != "string" || e === "" || !he.test(e) ? "" : new Intl.DateTimeFormat(t, s).format(new Date(e)), Ve = (e, t) => (s) => ge(s, e, t);
175
175
  var N = {
176
176
  allRenderFn: !1,
177
177
  cmpDidLoad: !0,
@@ -238,6 +238,7 @@ var N = {
238
238
  cloneNodeFix: !1,
239
239
  hydratedAttribute: !1,
240
240
  hydratedClass: !0,
241
+ // TODO(STENCIL-1305): remove this option
241
242
  scriptDataOpts: !1,
242
243
  // TODO(STENCIL-914): remove this option when `experimentalSlotFixes` is the default behavior
243
244
  scopedSlotTextContentFix: !1,
@@ -260,55 +261,65 @@ var N = {
260
261
  attachStyles: !0,
261
262
  // TODO(STENCIL-914): remove this option when `experimentalSlotFixes` is the default behavior
262
263
  experimentalSlotFixes: !1
263
- }, ve = Object.defineProperty, he = (e, t) => {
264
+ }, be = Object.defineProperty, Se = (e, t) => {
264
265
  for (var s in t)
265
- ve(e, s, { get: t[s], enumerable: !0 });
266
- }, w = {}, ye = "http://www.w3.org/2000/svg", be = "http://www.w3.org/1999/xhtml", me = (e) => e != null, Y = (e) => (e = typeof e, e === "object" || e === "function"), Se = {};
267
- he(Se, {
268
- err: () => Z,
269
- map: () => ke,
270
- ok: () => D,
271
- unwrap: () => Te,
272
- unwrapErr: () => xe
266
+ be(e, s, { get: t[s], enumerable: !0 });
267
+ }, W = (e, t) => t in e, z = "http://www.w3.org/1999/xlink", C = typeof window < "u" ? window : {}, j = C.document || { head: {} };
268
+ C.HTMLElement;
269
+ var x = {
270
+ $flags$: 0,
271
+ $resourcesUrl$: "",
272
+ jmp: (e) => e(),
273
+ raf: (e) => requestAnimationFrame(e),
274
+ ael: (e, t, s, r) => e.addEventListener(t, s, r),
275
+ rel: (e, t, s, r) => e.removeEventListener(t, s, r),
276
+ ce: (e, t) => new CustomEvent(e, t)
277
+ }, I = {}, me = "http://www.w3.org/2000/svg", Te = "http://www.w3.org/1999/xhtml", ke = (e) => e != null, V = (e) => (e = typeof e, e === "object" || e === "function"), xe = {};
278
+ Se(xe, {
279
+ err: () => ee,
280
+ map: () => Ee,
281
+ ok: () => F,
282
+ unwrap: () => Ae,
283
+ unwrapErr: () => Le
273
284
  });
274
- var D = (e) => ({
285
+ var F = (e) => ({
275
286
  isOk: !0,
276
287
  isErr: !1,
277
288
  value: e
278
- }), Z = (e) => ({
289
+ }), ee = (e) => ({
279
290
  isOk: !1,
280
291
  isErr: !0,
281
292
  value: e
282
293
  });
283
- function ke(e, t) {
294
+ function Ee(e, t) {
284
295
  if (e.isOk) {
285
296
  const s = t(e.value);
286
- return s instanceof Promise ? s.then((r) => D(r)) : D(s);
297
+ return s instanceof Promise ? s.then((r) => F(r)) : F(s);
287
298
  }
288
299
  if (e.isErr) {
289
300
  const s = e.value;
290
- return Z(s);
301
+ return ee(s);
291
302
  }
292
303
  throw "should never get here";
293
304
  }
294
- var Te = (e) => {
305
+ var Ae = (e) => {
295
306
  if (e.isOk)
296
307
  return e.value;
297
308
  throw e.value;
298
- }, xe = (e) => {
309
+ }, Le = (e) => {
299
310
  if (e.isErr)
300
311
  return e.value;
301
312
  throw e.value;
302
- }, P = "http://www.w3.org/1999/xlink", Ee = (e, t, ...s) => {
303
- let r = null, l = null, i = null, n = !1, c = !1;
304
- const o = [], d = ($) => {
305
- for (let u = 0; u < $.length; u++)
306
- r = $[u], Array.isArray(r) ? d(r) : r != null && typeof r != "boolean" && ((n = !Y(r)) && (r = String(r)), n && c ? o[o.length - 1].$text$ += r : o.push(n ? _(null, r) : r), c = n);
313
+ }, Re = (e, t, ...s) => {
314
+ let r = null, o = null, l = null, n = !1, i = !1;
315
+ const a = [], d = (f) => {
316
+ for (let $ = 0; $ < f.length; $++)
317
+ r = f[$], Array.isArray(r) ? d(r) : r != null && typeof r != "boolean" && ((n = !V(r)) && (r = String(r)), n && i ? a[a.length - 1].$text$ += r : a.push(n ? U(null, r) : r), i = n);
307
318
  };
308
319
  d(s);
309
- const a = _(e, null);
310
- return a.$attrs$ = t, o.length > 0 && (a.$children$ = o), a.$key$ = l, a.$name$ = i, a;
311
- }, _ = (e, t) => {
320
+ const u = U(e, null);
321
+ return u.$attrs$ = t, a.length > 0 && (u.$children$ = a), u.$key$ = o, u.$name$ = l, u;
322
+ }, U = (e, t) => {
312
323
  const s = {
313
324
  $flags$: 0,
314
325
  $tag$: e,
@@ -317,49 +328,48 @@ var Te = (e) => {
317
328
  $children$: null
318
329
  };
319
330
  return s.$attrs$ = null, s.$key$ = null, s.$name$ = null, s;
320
- }, Ae = {}, Le = (e) => e && e.$tag$ === Ae, W = (e, t, s, r, l, i) => {
331
+ }, je = {}, Oe = (e) => e && e.$tag$ === je, q = (e, t, s, r, o, l) => {
321
332
  if (s !== r) {
322
- let n = G(e, t), c = t.toLowerCase();
333
+ let n = W(e, t), i = t.toLowerCase();
323
334
  if (t === "class") {
324
- const o = e.classList, d = z(s), a = z(r);
325
- o.remove(...d.filter(($) => $ && !a.includes($))), o.add(...a.filter(($) => $ && !d.includes($)));
335
+ const a = e.classList, d = G(s), u = G(r);
336
+ a.remove(...d.filter((f) => f && !u.includes(f))), a.add(...u.filter((f) => f && !d.includes(f)));
326
337
  } else if (t === "style") {
327
- for (const o in s)
328
- (!r || r[o] == null) && (o.includes("-") ? e.style.removeProperty(o) : e.style[o] = "");
329
- for (const o in r)
330
- (!s || r[o] !== s[o]) && (o.includes("-") ? e.style.setProperty(o, r[o]) : e.style[o] = r[o]);
331
- } else if (t !== "key")
332
- if (t === "ref")
333
- r && r(e);
334
- else if (!e.__lookupSetter__(t) && t[0] === "o" && t[1] === "n") {
335
- if (t[2] === "-" ? t = t.slice(3) : G(H, c) ? t = c.slice(2) : t = c[2] + t.slice(3), s || r) {
336
- const o = t.endsWith(V);
337
- t = t.replace(je, ""), s && x.rel(e, t, s, o), r && x.ael(e, t, r, o);
338
- }
339
- } else {
340
- const o = Y(r);
341
- if ((n || o && r !== null) && !l)
342
- try {
343
- if (e.tagName.includes("-"))
344
- e[t] = r;
345
- else {
346
- const a = r ?? "";
347
- t === "list" ? n = !1 : (s == null || e[t] != a) && (e[t] = a);
348
- }
349
- } catch {
350
- }
351
- let d = !1;
352
- c !== (c = c.replace(/^xlink\:?/, "")) && (t = c, d = !0), r == null || r === !1 ? (r !== !1 || e.getAttribute(t) === "") && (d ? e.removeAttributeNS(P, t) : e.removeAttribute(t)) : (!n || i & 4 || l) && !o && (r = r === !0 ? "" : r, d ? e.setAttributeNS(P, t, r) : e.setAttribute(t, r));
338
+ for (const a in s)
339
+ (!r || r[a] == null) && (a.includes("-") ? e.style.removeProperty(a) : e.style[a] = "");
340
+ for (const a in r)
341
+ (!s || r[a] !== s[a]) && (a.includes("-") ? e.style.setProperty(a, r[a]) : e.style[a] = r[a]);
342
+ } else if (t !== "key") if (t === "ref")
343
+ r && r(e);
344
+ else if (!e.__lookupSetter__(t) && t[0] === "o" && t[1] === "n") {
345
+ if (t[2] === "-" ? t = t.slice(3) : W(C, i) ? t = i.slice(2) : t = i[2] + t.slice(3), s || r) {
346
+ const a = t.endsWith(te);
347
+ t = t.replace(De, ""), s && x.rel(e, t, s, a), r && x.ael(e, t, r, a);
353
348
  }
349
+ } else {
350
+ const a = V(r);
351
+ if ((n || a && r !== null) && !o)
352
+ try {
353
+ if (e.tagName.includes("-"))
354
+ e[t] = r;
355
+ else {
356
+ const u = r ?? "";
357
+ t === "list" ? n = !1 : (s == null || e[t] != u) && (e[t] = u);
358
+ }
359
+ } catch {
360
+ }
361
+ let d = !1;
362
+ i !== (i = i.replace(/^xlink\:?/, "")) && (t = i, d = !0), r == null || r === !1 ? (r !== !1 || e.getAttribute(t) === "") && (d ? e.removeAttributeNS(z, t) : e.removeAttribute(t)) : (!n || l & 4 || o) && !a && (r = r === !0 ? "" : r, d ? e.setAttributeNS(z, t, r) : e.setAttribute(t, r));
363
+ }
354
364
  }
355
- }, Re = /\s/, z = (e) => e ? e.split(Re) : [], V = "Capture", je = new RegExp(V + "$"), ee = (e, t, s) => {
356
- const r = t.$elm$.nodeType === 11 && t.$elm$.host ? t.$elm$.host : t.$elm$, l = e && e.$attrs$ || w, i = t.$attrs$ || w;
357
- for (const n of q(Object.keys(l)))
358
- n in i || W(r, n, l[n], void 0, s, t.$flags$);
359
- for (const n of q(Object.keys(i)))
360
- W(r, n, l[n], i[n], s, t.$flags$);
365
+ }, Me = /\s/, G = (e) => e ? e.split(Me) : [], te = "Capture", De = new RegExp(te + "$"), se = (e, t, s) => {
366
+ const r = t.$elm$.nodeType === 11 && t.$elm$.host ? t.$elm$.host : t.$elm$, o = e && e.$attrs$ || I, l = t.$attrs$ || I;
367
+ for (const n of X(Object.keys(o)))
368
+ n in l || q(r, n, o[n], void 0, s, t.$flags$);
369
+ for (const n of X(Object.keys(l)))
370
+ q(r, n, o[n], l[n], s, t.$flags$);
361
371
  };
362
- function q(e) {
372
+ function X(e) {
363
373
  return e.includes("ref") ? (
364
374
  // we need to sort these to ensure that `'ref'` is the last attr
365
375
  [...e.filter((t) => t !== "ref"), "ref"]
@@ -368,11 +378,11 @@ function q(e) {
368
378
  e
369
379
  );
370
380
  }
371
- var S, F, T, B = !1, j = !1, U = !1, h = !1, O = (e, t, s, r) => {
372
- var l, i, n, c;
373
- const o = t.$children$[s];
374
- let d = 0, a, $, u;
375
- if (B || (U = !0, o.$tag$ === "slot" && (S && r.classList.add(S + "-s"), o.$flags$ |= o.$children$ ? (
381
+ var T, w, E, O = !1, M = !1, H = !1, h = !1, D = (e, t, s, r) => {
382
+ var o;
383
+ const l = t.$children$[s];
384
+ let n = 0, i, a, d;
385
+ if (O || (H = !0, l.$tag$ === "slot" && (T && r.classList.add(T + "-s"), l.$flags$ |= l.$children$ ? (
376
386
  // slot element has fallback content
377
387
  // still create an element that "mocks" the slot element
378
388
  2
@@ -381,224 +391,227 @@ var S, F, T, B = !1, j = !1, U = !1, h = !1, O = (e, t, s, r) => {
381
391
  // create an html comment we'll use to always reference
382
392
  // where actual slot content should sit next to
383
393
  1
384
- ))), o.$text$ !== null)
385
- a = o.$elm$ = R.createTextNode(o.$text$);
386
- else if (o.$flags$ & 1)
387
- a = o.$elm$ = R.createTextNode("");
394
+ ))), l.$text$ !== null)
395
+ i = l.$elm$ = j.createTextNode(l.$text$);
396
+ else if (l.$flags$ & 1)
397
+ i = l.$elm$ = j.createTextNode("");
388
398
  else {
389
- h || (h = o.$tag$ === "svg"), a = o.$elm$ = R.createElementNS(
390
- h ? ye : be,
391
- o.$flags$ & 2 ? "slot-fb" : o.$tag$
392
- ), h && o.$tag$ === "foreignObject" && (h = !1), ee(null, o, h), me(S) && a["s-si"] !== S && a.classList.add(a["s-si"] = S);
393
- {
394
- const f = ((l = t.$elm$) == null ? void 0 : l["s-rsc"]) || ((i = t.$elm$) == null ? void 0 : i["s-si"]) || ((n = t.$elm$) == null ? void 0 : n["s-sc"]);
395
- f && (a["s-rsc"] = f, !a.classList.contains(f) && a.classList.add(f));
396
- }
397
- if (o.$children$)
398
- for (d = 0; d < o.$children$.length; ++d)
399
- $ = O(e, o, d, a), $ && a.appendChild($);
400
- o.$tag$ === "svg" ? h = !1 : a.tagName === "foreignObject" && (h = !0);
399
+ if (h || (h = l.$tag$ === "svg"), i = l.$elm$ = j.createElementNS(
400
+ h ? me : Te,
401
+ !O && N.slotRelocation && l.$flags$ & 2 ? "slot-fb" : l.$tag$
402
+ ), h && l.$tag$ === "foreignObject" && (h = !1), se(null, l, h), ke(T) && i["s-si"] !== T && i.classList.add(i["s-si"] = T), B(i, r), l.$children$)
403
+ for (n = 0; n < l.$children$.length; ++n)
404
+ a = D(e, l, n, i), a && i.appendChild(a);
405
+ l.$tag$ === "svg" ? h = !1 : i.tagName === "foreignObject" && (h = !0);
401
406
  }
402
- return a["s-hn"] = T, o.$flags$ & 3 && (a["s-sr"] = !0, a["s-cr"] = F, a["s-sn"] = o.$name$ || "", a["s-rf"] = (c = o.$attrs$) == null ? void 0 : c.ref, u = e && e.$children$ && e.$children$[s], u && u.$tag$ === o.$tag$ && e.$elm$ && E(e.$elm$, !1)), a;
403
- }, E = (e, t) => {
407
+ return i["s-hn"] = E, l.$flags$ & 3 && (i["s-sr"] = !0, i["s-cr"] = w, i["s-sn"] = l.$name$ || "", i["s-rf"] = (o = l.$attrs$) == null ? void 0 : o.ref, d = e && e.$children$ && e.$children$[s], d && d.$tag$ === l.$tag$ && e.$elm$ && A(e.$elm$, !1)), i;
408
+ }, A = (e, t) => {
404
409
  x.$flags$ |= 1;
405
410
  const s = Array.from(e.childNodes);
406
411
  if (e["s-sr"] && N.experimentalSlotFixes) {
407
412
  let r = e;
408
413
  for (; r = r.nextSibling; )
409
- r && r["s-sn"] === e["s-sn"] && r["s-sh"] === T && s.push(r);
414
+ r && r["s-sn"] === e["s-sn"] && r["s-sh"] === E && s.push(r);
410
415
  }
411
416
  for (let r = s.length - 1; r >= 0; r--) {
412
- const l = s[r];
413
- l["s-hn"] !== T && l["s-ol"] && (re(l).insertBefore(l, C(l)), l["s-ol"].remove(), l["s-ol"] = void 0, l["s-sh"] = void 0, U = !0), t && E(l, t);
417
+ const o = s[r];
418
+ o["s-hn"] !== E && o["s-ol"] && (m(le(o), o, P(o)), o["s-ol"].remove(), o["s-ol"] = void 0, o["s-sh"] = void 0, H = !0), t && A(o, t);
414
419
  }
415
420
  x.$flags$ &= -2;
416
- }, te = (e, t, s, r, l, i) => {
417
- let n = e["s-cr"] && e["s-cr"].parentNode || e, c;
418
- for (n.shadowRoot && n.tagName === T && (n = n.shadowRoot); l <= i; ++l)
419
- r[l] && (c = O(null, s, l, e), c && (r[l].$elm$ = c, n.insertBefore(c, C(t))));
420
- }, se = (e, t, s) => {
421
+ }, re = (e, t, s, r, o, l) => {
422
+ let n = e["s-cr"] && e["s-cr"].parentNode || e, i;
423
+ for (n.shadowRoot && n.tagName === E && (n = n.shadowRoot); o <= l; ++o)
424
+ r[o] && (i = D(null, s, o, e), i && (r[o].$elm$ = i, m(n, i, P(t))));
425
+ }, oe = (e, t, s) => {
421
426
  for (let r = t; r <= s; ++r) {
422
- const l = e[r];
423
- if (l) {
424
- const i = l.$elm$;
425
- oe(l), i && (j = !0, i["s-ol"] ? i["s-ol"].remove() : E(i, !0), i.remove());
427
+ const o = e[r];
428
+ if (o) {
429
+ const l = o.$elm$;
430
+ ae(o), l && (M = !0, l["s-ol"] ? l["s-ol"].remove() : A(l, !0), l.remove());
426
431
  }
427
432
  }
428
- }, Oe = (e, t, s, r, l = !1) => {
429
- let i = 0, n = 0, c = 0, o = 0, d = t.length - 1, a = t[0], $ = t[d], u = r.length - 1, f = r[0], p = r[u], b, y;
430
- for (; i <= d && n <= u; )
431
- if (a == null)
432
- a = t[++i];
433
- else if ($ == null)
434
- $ = t[--d];
433
+ }, Ne = (e, t, s, r, o = !1) => {
434
+ let l = 0, n = 0, i = 0, a = 0, d = t.length - 1, u = t[0], f = t[d], $ = r.length - 1, c = r[0], p = r[$], b, y;
435
+ for (; l <= d && n <= $; )
436
+ if (u == null)
437
+ u = t[++l];
435
438
  else if (f == null)
436
- f = r[++n];
439
+ f = t[--d];
440
+ else if (c == null)
441
+ c = r[++n];
437
442
  else if (p == null)
438
- p = r[--u];
439
- else if (L(a, f, l))
440
- k(a, f, l), a = t[++i], f = r[++n];
441
- else if (L($, p, l))
442
- k($, p, l), $ = t[--d], p = r[--u];
443
- else if (L(a, p, l))
444
- (a.$tag$ === "slot" || p.$tag$ === "slot") && E(a.$elm$.parentNode, !1), k(a, p, l), e.insertBefore(a.$elm$, $.$elm$.nextSibling), a = t[++i], p = r[--u];
445
- else if (L($, f, l))
446
- (a.$tag$ === "slot" || p.$tag$ === "slot") && E($.$elm$.parentNode, !1), k($, f, l), e.insertBefore($.$elm$, a.$elm$), $ = t[--d], f = r[++n];
443
+ p = r[--$];
444
+ else if (R(u, c, o))
445
+ k(u, c, o), u = t[++l], c = r[++n];
446
+ else if (R(f, p, o))
447
+ k(f, p, o), f = t[--d], p = r[--$];
448
+ else if (R(u, p, o))
449
+ (u.$tag$ === "slot" || p.$tag$ === "slot") && A(u.$elm$.parentNode, !1), k(u, p, o), m(e, u.$elm$, f.$elm$.nextSibling), u = t[++l], p = r[--$];
450
+ else if (R(f, c, o))
451
+ (u.$tag$ === "slot" || p.$tag$ === "slot") && A(f.$elm$.parentNode, !1), k(f, c, o), m(e, f.$elm$, u.$elm$), f = t[--d], c = r[++n];
447
452
  else {
448
- for (c = -1, o = i; o <= d; ++o)
449
- if (t[o] && t[o].$key$ !== null && t[o].$key$ === f.$key$) {
450
- c = o;
453
+ for (i = -1, a = l; a <= d; ++a)
454
+ if (t[a] && t[a].$key$ !== null && t[a].$key$ === c.$key$) {
455
+ i = a;
451
456
  break;
452
457
  }
453
- c >= 0 ? (y = t[c], y.$tag$ !== f.$tag$ ? b = O(t && t[n], s, c, e) : (k(y, f, l), t[c] = void 0, b = y.$elm$), f = r[++n]) : (b = O(t && t[n], s, n, e), f = r[++n]), b && re(a.$elm$).insertBefore(b, C(a.$elm$));
458
+ i >= 0 ? (y = t[i], y.$tag$ !== c.$tag$ ? b = D(t && t[n], s, i, e) : (k(y, c, o), t[i] = void 0, b = y.$elm$), c = r[++n]) : (b = D(t && t[n], s, n, e), c = r[++n]), b && m(le(u.$elm$), b, P(u.$elm$));
454
459
  }
455
- i > d ? te(
460
+ l > d ? re(
456
461
  e,
457
- r[u + 1] == null ? null : r[u + 1].$elm$,
462
+ r[$ + 1] == null ? null : r[$ + 1].$elm$,
458
463
  s,
459
464
  r,
460
465
  n,
461
- u
462
- ) : n > u && se(t, i, d);
463
- }, L = (e, t, s = !1) => e.$tag$ === t.$tag$ ? e.$tag$ === "slot" ? e.$name$ === t.$name$ : s ? !0 : e.$key$ === t.$key$ : !1, C = (e) => e && e["s-ol"] || e, re = (e) => (e["s-ol"] ? e["s-ol"] : e).parentNode, k = (e, t, s = !1) => {
464
- const r = t.$elm$ = e.$elm$, l = e.$children$, i = t.$children$, n = t.$tag$, c = t.$text$;
465
- let o;
466
- c === null ? (h = n === "svg" ? !0 : n === "foreignObject" ? !1 : h, n === "slot" && !B || ee(e, t, h), l !== null && i !== null ? Oe(r, l, t, i, s) : i !== null ? (e.$text$ !== null && (r.textContent = ""), te(r, null, t, i, 0, i.length - 1)) : l !== null && se(l, 0, l.length - 1), h && n === "svg" && (h = !1)) : (o = r["s-cr"]) ? o.parentNode.textContent = c : e.$text$ !== c && (r.data = c);
467
- }, le = (e) => {
466
+ $
467
+ ) : n > $ && oe(t, l, d);
468
+ }, R = (e, t, s = !1) => e.$tag$ === t.$tag$ ? e.$tag$ === "slot" ? e.$name$ === t.$name$ : s ? !0 : e.$key$ === t.$key$ : !1, P = (e) => e && e["s-ol"] || e, le = (e) => (e["s-ol"] ? e["s-ol"] : e).parentNode, k = (e, t, s = !1) => {
469
+ const r = t.$elm$ = e.$elm$, o = e.$children$, l = t.$children$, n = t.$tag$, i = t.$text$;
470
+ let a;
471
+ i === null ? (h = n === "svg" ? !0 : n === "foreignObject" ? !1 : h, n === "slot" && !O || se(e, t, h), o !== null && l !== null ? Ne(r, o, t, l, s) : l !== null ? (e.$text$ !== null && (r.textContent = ""), re(r, null, t, l, 0, l.length - 1)) : o !== null && oe(o, 0, o.length - 1), h && n === "svg" && (h = !1)) : (a = r["s-cr"]) ? a.parentNode.textContent = i : e.$text$ !== i && (r.data = i);
472
+ }, ne = (e) => {
468
473
  const t = e.childNodes;
469
474
  for (const s of t)
470
475
  if (s.nodeType === 1) {
471
476
  if (s["s-sr"]) {
472
477
  const r = s["s-sn"];
473
478
  s.hidden = !1;
474
- for (const l of t)
475
- if (l !== s) {
476
- if (l["s-hn"] !== s["s-hn"] || r !== "") {
477
- if (l.nodeType === 1 && (r === l.getAttribute("slot") || r === l["s-sn"]) || l.nodeType === 3 && r === l["s-sn"]) {
479
+ for (const o of t)
480
+ if (o !== s) {
481
+ if (o["s-hn"] !== s["s-hn"] || r !== "") {
482
+ if (o.nodeType === 1 && (r === o.getAttribute("slot") || r === o["s-sn"]) || o.nodeType === 3 && r === o["s-sn"]) {
478
483
  s.hidden = !0;
479
484
  break;
480
485
  }
481
- } else if (l.nodeType === 1 || l.nodeType === 3 && l.textContent.trim() !== "") {
486
+ } else if (o.nodeType === 1 || o.nodeType === 3 && o.textContent.trim() !== "") {
482
487
  s.hidden = !0;
483
488
  break;
484
489
  }
485
490
  }
486
491
  }
487
- le(s);
492
+ ne(s);
488
493
  }
489
- }, m = [], ne = (e) => {
494
+ }, S = [], ie = (e) => {
490
495
  let t, s, r;
491
- for (const l of e.childNodes) {
492
- if (l["s-sr"] && (t = l["s-cr"]) && t.parentNode) {
496
+ for (const o of e.childNodes) {
497
+ if (o["s-sr"] && (t = o["s-cr"]) && t.parentNode) {
493
498
  s = t.parentNode.childNodes;
494
- const i = l["s-sn"];
499
+ const l = o["s-sn"];
495
500
  for (r = s.length - 1; r >= 0; r--)
496
- if (t = s[r], !t["s-cn"] && !t["s-nr"] && t["s-hn"] !== l["s-hn"] && !N.experimentalSlotFixes)
497
- if (I(t, i)) {
498
- let n = m.find((c) => c.$nodeToRelocate$ === t);
499
- j = !0, t["s-sn"] = t["s-sn"] || i, n ? (n.$nodeToRelocate$["s-sh"] = l["s-hn"], n.$slotRefNode$ = l) : (t["s-sh"] = l["s-hn"], m.push({
500
- $slotRefNode$: l,
501
- $nodeToRelocate$: t
502
- })), t["s-sr"] && m.map((c) => {
503
- I(c.$nodeToRelocate$, t["s-sn"]) && (n = m.find((o) => o.$nodeToRelocate$ === t), n && !c.$slotRefNode$ && (c.$slotRefNode$ = n.$slotRefNode$));
504
- });
505
- } else
506
- m.some((n) => n.$nodeToRelocate$ === t) || m.push({
501
+ if (t = s[r], !t["s-cn"] && !t["s-nr"] && t["s-hn"] !== o["s-hn"] && !N.experimentalSlotFixes)
502
+ if (K(t, l)) {
503
+ let n = S.find((i) => i.$nodeToRelocate$ === t);
504
+ M = !0, t["s-sn"] = t["s-sn"] || l, n ? (n.$nodeToRelocate$["s-sh"] = o["s-hn"], n.$slotRefNode$ = o) : (t["s-sh"] = o["s-hn"], S.push({
505
+ $slotRefNode$: o,
507
506
  $nodeToRelocate$: t
507
+ })), t["s-sr"] && S.map((i) => {
508
+ K(i.$nodeToRelocate$, t["s-sn"]) && (n = S.find((a) => a.$nodeToRelocate$ === t), n && !i.$slotRefNode$ && (i.$slotRefNode$ = n.$slotRefNode$));
508
509
  });
510
+ } else S.some((n) => n.$nodeToRelocate$ === t) || S.push({
511
+ $nodeToRelocate$: t
512
+ });
509
513
  }
510
- l.nodeType === 1 && ne(l);
514
+ o.nodeType === 1 && ie(o);
511
515
  }
512
- }, I = (e, t) => e.nodeType === 1 ? e.getAttribute("slot") === null && t === "" || e.getAttribute("slot") === t : e["s-sn"] === t ? !0 : t === "", oe = (e) => {
513
- e.$attrs$ && e.$attrs$.ref && e.$attrs$.ref(null), e.$children$ && e.$children$.map(oe);
514
- }, Me = (e, t, s = !1) => {
515
- var r, l, i, n, c;
516
- const o = e.$hostElement$, d = e.$cmpMeta$, a = e.$vnode$ || _(null, null), $ = Le(t) ? t : Ee(null, null, t);
517
- if (T = o.tagName, d.$attrsToReflect$ && ($.$attrs$ = $.$attrs$ || {}, d.$attrsToReflect$.map(
518
- ([u, f]) => $.$attrs$[f] = o[u]
519
- )), s && $.$attrs$)
520
- for (const u of Object.keys($.$attrs$))
521
- o.hasAttribute(u) && !["key", "ref", "style", "class"].includes(u) && ($.$attrs$[u] = o[u]);
522
- $.$tag$ = null, $.$flags$ |= 4, e.$vnode$ = $, $.$elm$ = a.$elm$ = o.shadowRoot || o, S = o["s-sc"], B = (d.$flags$ & 1) !== 0, F = o["s-cr"], j = !1, k(a, $, s);
516
+ }, K = (e, t) => e.nodeType === 1 ? e.getAttribute("slot") === null && t === "" || e.getAttribute("slot") === t : e["s-sn"] === t ? !0 : t === "", ae = (e) => {
517
+ e.$attrs$ && e.$attrs$.ref && e.$attrs$.ref(null), e.$children$ && e.$children$.map(ae);
518
+ }, m = (e, t, s) => {
519
+ const r = e == null ? void 0 : e.insertBefore(t, s);
520
+ return B(t, e), r;
521
+ }, ce = (e) => {
522
+ const t = [];
523
+ return e && t.push(
524
+ ...e["s-scs"] || [],
525
+ e["s-si"],
526
+ e["s-sc"],
527
+ ...ce(e.parentElement)
528
+ ), t;
529
+ }, B = (e, t, s = !1) => {
530
+ var r;
531
+ if (e && t && e.nodeType === 1) {
532
+ const o = new Set(ce(t).filter(Boolean));
533
+ if (o.size && ((r = e.classList) == null || r.add(...e["s-scs"] = [...o]), e["s-ol"] || s))
534
+ for (const l of Array.from(e.childNodes))
535
+ B(l, e, !0);
536
+ }
537
+ }, _e = (e, t, s = !1) => {
538
+ var r, o, l, n, i;
539
+ const a = e.$hostElement$, d = e.$cmpMeta$, u = e.$vnode$ || U(null, null), f = Oe(t) ? t : Re(null, null, t);
540
+ if (E = a.tagName, d.$attrsToReflect$ && (f.$attrs$ = f.$attrs$ || {}, d.$attrsToReflect$.map(
541
+ ([$, c]) => f.$attrs$[c] = a[$]
542
+ )), s && f.$attrs$)
543
+ for (const $ of Object.keys(f.$attrs$))
544
+ a.hasAttribute($) && !["key", "ref", "style", "class"].includes($) && (f.$attrs$[$] = a[$]);
545
+ f.$tag$ = null, f.$flags$ |= 4, e.$vnode$ = f, f.$elm$ = u.$elm$ = a.shadowRoot || a, T = a["s-sc"], O = (d.$flags$ & 1) !== 0, w = a["s-cr"], M = !1, k(u, f, s);
523
546
  {
524
- if (x.$flags$ |= 1, U) {
525
- ne($.$elm$);
526
- for (const u of m) {
527
- const f = u.$nodeToRelocate$;
528
- if (!f["s-ol"]) {
529
- const p = R.createTextNode("");
530
- p["s-nr"] = f, f.parentNode.insertBefore(f["s-ol"] = p, f);
547
+ if (x.$flags$ |= 1, H) {
548
+ ie(f.$elm$);
549
+ for (const $ of S) {
550
+ const c = $.$nodeToRelocate$;
551
+ if (!c["s-ol"]) {
552
+ const p = j.createTextNode("");
553
+ p["s-nr"] = c, m(c.parentNode, c["s-ol"] = p, c);
531
554
  }
532
555
  }
533
- for (const u of m) {
534
- const f = u.$nodeToRelocate$, p = u.$slotRefNode$;
556
+ for (const $ of S) {
557
+ const c = $.$nodeToRelocate$, p = $.$slotRefNode$;
535
558
  if (p) {
536
559
  const b = p.parentNode;
537
560
  let y = p.nextSibling;
538
561
  {
539
- let A = (r = f["s-ol"]) == null ? void 0 : r.previousSibling;
540
- for (; A; ) {
541
- let v = (l = A["s-nr"]) != null ? l : null;
542
- if (v && v["s-sn"] === f["s-sn"] && b === v.parentNode) {
543
- for (v = v.nextSibling; v === f || v != null && v["s-sr"]; )
544
- v = v == null ? void 0 : v.nextSibling;
545
- if (!v || !v["s-nr"]) {
546
- y = v;
562
+ let L = (r = c["s-ol"]) == null ? void 0 : r.previousSibling;
563
+ for (; L; ) {
564
+ let g = (o = L["s-nr"]) != null ? o : null;
565
+ if (g && g["s-sn"] === c["s-sn"] && b === g.parentNode) {
566
+ for (g = g.nextSibling; g === c || g != null && g["s-sr"]; )
567
+ g = g == null ? void 0 : g.nextSibling;
568
+ if (!g || !g["s-nr"]) {
569
+ y = g;
547
570
  break;
548
571
  }
549
572
  }
550
- A = A.previousSibling;
573
+ L = L.previousSibling;
551
574
  }
552
575
  }
553
- (!y && b !== f.parentNode || f.nextSibling !== y) && f !== y && (!f["s-hn"] && f["s-ol"] && (f["s-hn"] = f["s-ol"].parentNode.nodeName), b.insertBefore(f, y), f.nodeType === 1 && (f.hidden = (i = f["s-ih"]) != null ? i : !1)), f && typeof p["s-rf"] == "function" && p["s-rf"](f);
576
+ (!y && b !== c.parentNode || c.nextSibling !== y) && c !== y && (!c["s-hn"] && c["s-ol"] && (c["s-hn"] = c["s-ol"].parentNode.nodeName), m(b, c, y), c.nodeType === 1 && (c.hidden = (l = c["s-ih"]) != null ? l : !1)), c && typeof p["s-rf"] == "function" && p["s-rf"](c);
554
577
  } else
555
- f.nodeType === 1 && (s && (f["s-ih"] = (n = f.hidden) != null ? n : !1), f.hidden = !0);
578
+ c.nodeType === 1 && (s && (c["s-ih"] = (n = c.hidden) != null ? n : !1), c.hidden = !0);
556
579
  }
557
580
  }
558
- j && le($.$elm$), x.$flags$ &= -2, m.length = 0;
581
+ M && ne(f.$elm$), x.$flags$ &= -2, S.length = 0;
559
582
  }
560
583
  if (N.experimentalScopedSlotChanges && d.$flags$ & 2)
561
- for (const u of $.$elm$.childNodes)
562
- u["s-hn"] !== T && !u["s-sh"] && (s && u["s-ih"] == null && (u["s-ih"] = (c = u.hidden) != null ? c : !1), u.hidden = !0);
563
- F = void 0;
564
- }, G = (e, t) => t in e, H = typeof window < "u" ? window : {}, R = H.document || { head: {} };
565
- H.HTMLElement;
566
- var x = {
567
- $flags$: 0,
568
- $resourcesUrl$: "",
569
- jmp: (e) => e(),
570
- raf: (e) => requestAnimationFrame(e),
571
- ael: (e, t, s, r) => e.addEventListener(t, s, r),
572
- rel: (e, t, s, r) => e.removeEventListener(t, s, r),
573
- ce: (e, t) => new CustomEvent(e, t)
584
+ for (const $ of f.$elm$.childNodes)
585
+ $["s-hn"] !== E && !$["s-sh"] && (s && $["s-ih"] == null && ($["s-ih"] = (i = $.hidden) != null ? i : !1), $.hidden = !0);
586
+ w = void 0;
574
587
  };
575
- const De = (e, t, s) => {
588
+ const Fe = (e, t, s) => {
576
589
  [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);
577
- }, ie = (e, t, s, r, l) => {
590
+ }, fe = (e, t, s, r, o) => {
578
591
  if (t && typeof t == "string") {
579
- const i = document.createElement(t);
592
+ const l = document.createElement(t);
580
593
  Object.keys(s || {}).forEach((n) => {
581
- De(i, n, s[n]);
594
+ Fe(l, n, s[n]);
582
595
  }), r == null || r.forEach((n) => {
583
- ie(i, n.$tag$, n.$attrs$, n.$children$, n.$text$);
584
- }), s != null && s.innerHTML && (i.innerHTML = s.innerHTML), e.appendChild(i);
596
+ fe(l, n.$tag$, n.$attrs$, n.$children$, n.$text$);
597
+ }), s != null && s.innerHTML && (l.innerHTML = s.innerHTML), e.appendChild(l);
585
598
  }
586
- l && (e.innerHTML = l);
587
- }, Ye = (e, t) => {
599
+ o && (e.innerHTML = o);
600
+ }, et = (e, t) => {
588
601
  const s = {};
589
602
  if (typeof e != "object")
590
603
  throw new Error("filterArgs - args isn't an object.");
591
604
  for (const r in e)
592
605
  if (!r.startsWith("slot")) {
593
- const l = e[r], i = r.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
594
- (!t || !Object.keys(t).includes(r) || t[r] !== l) && (s[i] = l);
606
+ const o = e[r], l = r.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
607
+ (!t || !Object.keys(t).includes(r) || t[r] !== o) && (s[l] = o);
595
608
  }
596
609
  return s;
597
- }, Ze = (e, t) => {
598
- var r, l;
610
+ }, tt = (e, t) => {
611
+ var r, o;
599
612
  const s = document.getElementById("storybook-root");
600
613
  if (s)
601
- return (l = document.querySelector("[lang]")) == null || l.setAttribute("lang", ((r = t.globals) == null ? void 0 : r.locale) || "en"), Me(
614
+ return (o = document.querySelector("[lang]")) == null || o.setAttribute("lang", ((r = t.globals) == null ? void 0 : r.locale) || "en"), _e(
602
615
  {
603
616
  $ancestorComponent$: void 0,
604
617
  $flags$: 0,
@@ -611,58 +624,58 @@ const De = (e, t, s) => {
611
624
  },
612
625
  e(t)
613
626
  ), s.children[s.children.length - 1];
614
- }, Ve = ({ $tag$: e, $attrs$: t, $children$: s, $text$: r }) => {
615
- const l = document.createElement("div");
616
- return ie(l, e, t, s, r), l.innerHTML;
617
- }, et = ({ disconnect: e, observe: t, takeRecords: s }) => {
627
+ }, st = ({ $tag$: e, $attrs$: t, $children$: s, $text$: r }) => {
628
+ const o = document.createElement("div");
629
+ return fe(o, e, t, s, r), o.innerHTML;
630
+ }, rt = ({ disconnect: e, observe: t, takeRecords: s }) => {
618
631
  class r {
619
- constructor(i) {
632
+ constructor(l) {
620
633
  /**
621
634
  *
622
635
  */
623
- g(this, "disconnect", e);
636
+ v(this, "disconnect", e);
624
637
  /**
625
638
  *
626
639
  */
627
- g(this, "observe", t);
640
+ v(this, "observe", t);
628
641
  /**
629
642
  *
630
643
  */
631
- g(this, "takeRecords", s);
644
+ v(this, "takeRecords", s);
632
645
  /**
633
646
  *
634
647
  */
635
- g(this, "cb");
636
- this.cb = i;
648
+ v(this, "cb");
649
+ this.cb = l;
637
650
  }
638
651
  }
639
- return [window, global].forEach((l) => {
640
- Object.defineProperty(l, "MutationObserver", {
652
+ return [window, global].forEach((o) => {
653
+ Object.defineProperty(o, "MutationObserver", {
641
654
  writable: !0,
642
655
  configurable: !0,
643
656
  value: r
644
657
  });
645
658
  }), r;
646
- }, tt = ({ disconnect: e, observe: t }) => {
659
+ }, ot = ({ disconnect: e, observe: t }) => {
647
660
  class s {
648
- constructor(l) {
661
+ constructor(o) {
649
662
  /**
650
663
  *
651
664
  */
652
- g(this, "disconnect", e);
665
+ v(this, "disconnect", e);
653
666
  /**
654
667
  *
655
668
  */
656
- g(this, "observe", t);
669
+ v(this, "observe", t);
657
670
  /**
658
671
  *
659
672
  */
660
- g(this, "unobserve");
673
+ v(this, "unobserve");
661
674
  /**
662
675
  *
663
676
  */
664
- g(this, "cb");
665
- this.cb = l;
677
+ v(this, "cb");
678
+ this.cb = o;
666
679
  }
667
680
  }
668
681
  return [window, global].forEach((r) => {
@@ -673,18 +686,18 @@ const De = (e, t, s) => {
673
686
  });
674
687
  }), s;
675
688
  };
676
- class _e extends Event {
689
+ class Ue extends Event {
677
690
  constructor() {
678
691
  super(...arguments);
679
692
  /**
680
693
  *
681
694
  */
682
695
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
683
- g(this, "detail");
696
+ v(this, "detail");
684
697
  }
685
698
  }
686
- const st = () => {
687
- class e extends _e {
699
+ const lt = () => {
700
+ class e extends Ue {
688
701
  }
689
702
  return [window, global].forEach((t) => {
690
703
  Object.defineProperty(t, "SubmitEvent", {
@@ -695,30 +708,30 @@ const st = () => {
695
708
  }), e;
696
709
  };
697
710
  export {
698
- Be as ClassList,
699
- Ue as allItemsAreString,
700
- We as cleanString,
701
- Ne as createID,
702
- pe as dateRegExp,
703
- Xe as dateToString,
704
- Je as defineLocales,
705
- Ye as filterArgs,
706
- He as focusableElements,
707
- Ge as getLocaleDatePattern,
708
- X as getParentWindows,
709
- Ve as getStoryHTML,
710
- we as getWindows,
711
- Ce as isTagName,
712
- Pe as isValidString,
713
- Ke as localeCurrency,
714
- ge as localeDate,
715
- Qe as localeNumber,
716
- ze as nextTick,
717
- et as setupMutationObserverMock,
718
- tt as setupResizeObserverMock,
719
- st as setupSubmitEventMock,
720
- Ze as stencilWrapper,
721
- Ie as vsCodeGenerator,
722
- qe as webTypesGenerator
711
+ He as ClassList,
712
+ Pe as allItemsAreString,
713
+ qe as cleanString,
714
+ Ce as createID,
715
+ he as dateRegExp,
716
+ Ze as dateToString,
717
+ Ve as defineLocales,
718
+ et as filterArgs,
719
+ We as focusableElements,
720
+ Qe as getLocaleDatePattern,
721
+ Q as getParentWindows,
722
+ st as getStoryHTML,
723
+ ze as getWindows,
724
+ Be as isTagName,
725
+ Ie as isValidString,
726
+ Je as localeCurrency,
727
+ ye as localeDate,
728
+ Ye as localeNumber,
729
+ Ge as nextTick,
730
+ rt as setupMutationObserverMock,
731
+ ot as setupResizeObserverMock,
732
+ lt as setupSubmitEventMock,
733
+ tt as stencilWrapper,
734
+ Ke as vsCodeGenerator,
735
+ Xe as webTypesGenerator
723
736
  };
724
737
  //# sourceMappingURL=index.es.js.map