@mgdis/stencil-helpers 1.1.1 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,11 +1,11 @@
1
1
  var ie = Object.defineProperty;
2
- var ce = (t, e, n) => e in t ? ie(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
- var p = (t, e, n) => (ce(t, typeof e != "symbol" ? e + "" : e, n), n);
2
+ var ce = (t, e, s) => e in t ? ie(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s;
3
+ var p = (t, e, s) => (ce(t, typeof e != "symbol" ? e + "" : e, s), s);
4
4
  const Re = (t = "", e = 10) => {
5
- const n = new Uint8Array(e);
6
- crypto.getRandomValues(n);
7
- const s = Array.from(n).map((r) => r.toString(16).padStart(2, "0")).join("").slice(0, e);
8
- return t !== "" ? `${t}-${s}` : s;
5
+ const s = new Uint8Array(e);
6
+ crypto.getRandomValues(s);
7
+ const r = Array.from(s).map((n) => n.toString(16).padStart(2, "0")).join("").slice(0, e);
8
+ return t !== "" ? `${t}-${r}` : r;
9
9
  };
10
10
  class Me {
11
11
  constructor(e = []) {
@@ -25,8 +25,8 @@ class Me {
25
25
  * @param className - class name to delete
26
26
  */
27
27
  p(this, "delete", (e) => {
28
- const n = this.classes.indexOf(e);
29
- n > -1 && this.classes.splice(n, 1);
28
+ const s = this.classes.indexOf(e);
29
+ s > -1 && this.classes.splice(s, 1);
30
30
  });
31
31
  /**
32
32
  * Check if class exist in list
@@ -43,27 +43,27 @@ class Me {
43
43
  }
44
44
  }
45
45
  const Oe = (t) => Array.isArray(t) && t.every((e) => typeof e == "string"), Fe = (t, e) => e.includes(t == null ? void 0 : t.tagName.toLowerCase()), De = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"]), [identifier], mg-button', _e = (t) => {
46
- const e = I(t), n = X(t);
47
- return [t, ...e, ...n];
46
+ const e = I(t), s = X(t);
47
+ return [t, ...e, ...s];
48
48
  }, I = (t, e = []) => {
49
49
  if (t.self !== t.top)
50
50
  try {
51
- const n = t.parent;
52
- return n ? (e.push(n), I(n, e)) : e;
53
- } catch (n) {
54
- return console.error("Different hosts between iframes:", n), e;
51
+ const s = t.parent;
52
+ return s ? (e.push(s), I(s, e)) : e;
53
+ } catch (s) {
54
+ return console.error("Different hosts between iframes:", s), e;
55
55
  }
56
56
  return e;
57
57
  }, X = (t, e = []) => {
58
58
  if (t.frames.length > 0)
59
- for (const n of Array.from(t.frames))
60
- e.push(n), X(n, e);
59
+ for (const s of Array.from(t.frames))
60
+ e.push(s), X(s, e);
61
61
  return e;
62
62
  }, Be = (t) => typeof t == "string" && t.trim() !== "", Ne = (t) => typeof t == "string" ? t.toLocaleLowerCase().normalize("NFD").replaceAll(/[\u0300-\u036f]/g, "") : t, Ue = async (t) => t(), K = (t, e) => {
63
63
  if (!e)
64
64
  return;
65
- const n = e.split("/");
66
- return `${t}${n.slice(2, n.length - 1).join("-")}--docs`;
65
+ const s = e.split("/");
66
+ return `${t}${s.slice(2, s.length - 1).join("-")}--docs`;
67
67
  }, ae = (t, e) => {
68
68
  if (e)
69
69
  return `${t}${e}`;
@@ -71,44 +71,44 @@ const Oe = (t) => Array.isArray(t) && t.every((e) => typeof e == "string"), Fe =
71
71
  let e = t.overview ? `${t.overview}
72
72
 
73
73
  ` : "";
74
- const n = t.props.filter(({ attr: r }) => r !== void 0);
75
- n.length && (e += `Attributes:
76
- `, e += n.map(({ attr: r, docs: l }) => `- \`${r}\`: ${l}
74
+ const s = t.props.filter(({ attr: n }) => n !== void 0);
75
+ s.length && (e += `Attributes:
76
+ `, e += s.map(({ attr: n, docs: l }) => `- \`${n}\`: ${l}
77
77
  `).join(""), e += `
78
78
  `);
79
- const s = t.props.filter(({ attr: r }) => r === void 0);
80
- return s.length && (e += `Properties:
81
- `, e += s.map(({ name: r, docs: l }) => `- \`${r}\`: ${l}
79
+ const r = t.props.filter(({ attr: n }) => n === void 0);
80
+ return r.length && (e += `Properties:
81
+ `, e += r.map(({ name: n, docs: l }) => `- \`${n}\`: ${l}
82
82
  `).join(""), e += `
83
83
  `), t.methods.length && (e += `Methods:
84
- `, e += t.methods.map(({ name: r, docs: l }) => `- \`${r}\`: ${l}
84
+ `, e += t.methods.map(({ name: n, docs: l }) => `- \`${n}\`: ${l}
85
85
  `).join(""), e += `
86
86
  `), t.events.length && (e += `Events:
87
- `, e += t.events.map(({ event: r, docs: l }) => `- \`${r}\`: ${l}
87
+ `, e += t.events.map(({ event: n, docs: l }) => `- \`${n}\`: ${l}
88
88
  `).join(""), e += `
89
89
  `), t.listeners.length && (e += `Listeners:
90
- `, e += t.listeners.map(({ event: r }) => `- \`${r}\`
90
+ `, e += t.listeners.map(({ event: n }) => `- \`${n}\`
91
91
  `).join(""), e += `
92
92
  `), t.slots.length && (e += `Slots:
93
- `, e += t.slots.map(({ name: r, docs: l }) => `- \`${r}\`: ${l}
93
+ `, e += t.slots.map(({ name: n, docs: l }) => `- \`${n}\`: ${l}
94
94
  `).join(""), e += `
95
95
  `), e;
96
96
  }, F = (t) => `${t.docs}
97
97
 
98
- Type: \`${t.type}\``, Ce = (t, e, n, s) => ({
98
+ Type: \`${t.type}\``, Ce = (t, e, s, r) => ({
99
99
  $schema: "https://json.schemastore.org/web-types",
100
100
  name: t,
101
101
  version: e,
102
102
  "description-markup": "markdown",
103
103
  contributions: {
104
104
  html: {
105
- elements: n.components.map((r) => {
106
- const l = K(s, r.filePath);
105
+ elements: s.components.map((n) => {
106
+ const l = K(r, n.filePath);
107
107
  return {
108
- name: r.tag,
109
- description: Q(r),
108
+ name: n.tag,
109
+ description: Q(n),
110
110
  "doc-url": l,
111
- attributes: r.props.filter((o) => o.attr).map((o) => ({
111
+ attributes: n.props.filter((o) => o.attr).map((o) => ({
112
112
  name: o.attr,
113
113
  description: F(o),
114
114
  "doc-url": l,
@@ -119,7 +119,7 @@ Type: \`${t.type}\``, Ce = (t, e, n, s) => ({
119
119
  }
120
120
  })),
121
121
  js: {
122
- properties: r.props.map((o) => ({
122
+ properties: n.props.map((o) => ({
123
123
  name: o.name,
124
124
  description: F(o),
125
125
  "doc-url": l,
@@ -129,7 +129,7 @@ Type: \`${t.type}\``, Ce = (t, e, n, s) => ({
129
129
  required: o.required
130
130
  }
131
131
  })),
132
- events: r.events.map((o) => ({
132
+ events: n.events.map((o) => ({
133
133
  name: o.event,
134
134
  description: o.docs
135
135
  }))
@@ -138,23 +138,23 @@ Type: \`${t.type}\``, Ce = (t, e, n, s) => ({
138
138
  })
139
139
  }
140
140
  }
141
- }), fe = (t, e, n) => {
142
- if (n)
141
+ }), fe = (t, e, s) => {
142
+ if (s)
143
143
  return [
144
- { name: "Storybook", url: K(t, n) },
145
- { name: "Sources", url: ae(e, n) }
144
+ { name: "Storybook", url: K(t, s) },
145
+ { name: "Sources", url: ae(e, s) }
146
146
  ];
147
147
  }, $e = (t) => {
148
148
  if (!t.values.some(({ value: e }) => e === void 0))
149
149
  return t.values.map(({ value: e }) => ({ name: e }));
150
- }, He = (t, e, n, s) => ({
150
+ }, He = (t, e, s, r) => ({
151
151
  version: t,
152
- tags: e.components.map((r) => {
153
- const l = fe(n, s, r.filePath);
152
+ tags: e.components.map((n) => {
153
+ const l = fe(s, r, n.filePath);
154
154
  return {
155
- name: r.tag,
156
- description: Q(r),
157
- attributes: r.props.map((o) => ({
155
+ name: n.tag,
156
+ description: Q(n),
157
+ attributes: n.props.map((o) => ({
158
158
  name: o.attr || o.name,
159
159
  description: F(o),
160
160
  values: $e(o),
@@ -166,15 +166,15 @@ Type: \`${t.type}\``, Ce = (t, e, n, s) => ({
166
166
  globalAttributes: [],
167
167
  valueSets: []
168
168
  }), Pe = (t) => {
169
- const e = { value: "2023", pattern: "yyyy" }, n = { value: "12", pattern: "mm" }, s = { value: "24", pattern: "dd" };
170
- return ge([e.value, n.value, s.value].join("-"), t).replace(e.value, e.pattern).replace(n.value, n.pattern).replace(s.value, s.pattern);
171
- }, We = (t) => t.toISOString().split("T")[0], ue = (t, e, n) => {
172
- const s = t.closest("[lang]"), r = Intl.NumberFormat.supportedLocalesOf(s == null ? void 0 : s.lang), l = r.length > 0 && typeof r[0] == "string" ? r[0] : navigator.language || n, o = l.split("-").shift();
169
+ const e = { value: "2023", pattern: "yyyy" }, s = { value: "12", pattern: "mm" }, r = { value: "24", pattern: "dd" };
170
+ return ge([e.value, s.value, r.value].join("-"), t).replace(e.value, e.pattern).replace(s.value, s.pattern).replace(r.value, r.pattern);
171
+ }, We = (t) => t.toISOString().split("T")[0], ue = (t, e, s) => {
172
+ const r = t.closest("[lang]"), n = Intl.NumberFormat.supportedLocalesOf(r == null ? void 0 : r.lang), l = n.length > 0 && typeof n[0] == "string" ? n[0] : navigator.language || s, o = l.split("-").shift();
173
173
  return {
174
174
  locale: l,
175
- messages: e[o] || e[n]
175
+ messages: e[o] || e[s]
176
176
  };
177
- }, ze = (t, e, n) => new Intl.NumberFormat(e, { style: "currency", currency: n }).format(t), qe = (t, e) => new Intl.NumberFormat(e).format(t), de = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/, ge = (t, e) => typeof t != "string" || t === "" || !de.test(t) ? "" : new Intl.DateTimeFormat(e).format(new Date(t)), we = (t, e) => (n) => ue(n, t, e), _ = {
177
+ }, ze = (t, e, s) => new Intl.NumberFormat(e, { style: "currency", currency: s }).format(t), qe = (t, e, s = 0) => new Intl.NumberFormat(e, { minimumFractionDigits: s }).format(s > 0 ? Number(t == null ? void 0 : t.toFixed(s)) : t), de = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/, ge = (t, e) => typeof t != "string" || t === "" || !de.test(t) ? "" : new Intl.DateTimeFormat(e).format(new Date(t)), we = (t, e) => (s) => ue(s, t, e), _ = {
178
178
  allRenderFn: !1,
179
179
  cmpDidLoad: !0,
180
180
  cmpDidUnload: !1,
@@ -264,33 +264,33 @@ Type: \`${t.type}\``, Ce = (t, e, n, s) => ({
264
264
  experimentalSlotFixes: !1
265
265
  };
266
266
  let k, D, m, B = !1, R = !1, N = !1, h = !1;
267
- const H = "http://www.w3.org/1999/xlink", P = {}, pe = "http://www.w3.org/2000/svg", he = "http://www.w3.org/1999/xhtml", ye = (t) => t != null, J = (t) => (t = typeof t, t === "object" || t === "function"), Y = (t, e, ...n) => {
268
- let s = null, r = null, l = null, o = !1, c = !1;
267
+ const H = "http://www.w3.org/1999/xlink", P = {}, pe = "http://www.w3.org/2000/svg", he = "http://www.w3.org/1999/xhtml", ye = (t) => t != null, J = (t) => (t = typeof t, t === "object" || t === "function"), Y = (t, e, ...s) => {
268
+ let r = null, n = null, l = null, o = !1, c = !1;
269
269
  const i = [], d = (a) => {
270
270
  for (let $ = 0; $ < a.length; $++)
271
- s = a[$], Array.isArray(s) ? d(s) : s != null && typeof s != "boolean" && ((o = typeof t != "function" && !J(s)) && (s = String(s)), o && c ? i[i.length - 1].$text$ += s : i.push(o ? M(null, s) : s), c = o);
271
+ r = a[$], Array.isArray(r) ? d(r) : r != null && typeof r != "boolean" && ((o = typeof t != "function" && !J(r)) && (r = String(r)), o && c ? i[i.length - 1].$text$ += r : i.push(o ? M(null, r) : r), c = o);
272
272
  };
273
- if (d(n), e) {
274
- e.key && (r = e.key), e.name && (l = e.name);
273
+ if (d(s), e) {
274
+ e.key && (n = e.key), e.name && (l = e.name);
275
275
  {
276
276
  const a = e.className || e.class;
277
277
  a && (e.class = typeof a != "object" ? a : Object.keys(a).filter(($) => a[$]).join(" "));
278
278
  }
279
279
  }
280
280
  if (typeof t == "function")
281
- return t(e === null ? {} : e, i, Se);
281
+ return t(e === null ? {} : e, i, be);
282
282
  const u = M(t, null);
283
- return u.$attrs$ = e, i.length > 0 && (u.$children$ = i), u.$key$ = r, u.$name$ = l, u;
283
+ return u.$attrs$ = e, i.length > 0 && (u.$children$ = i), u.$key$ = n, u.$name$ = l, u;
284
284
  }, M = (t, e) => {
285
- const n = {
285
+ const s = {
286
286
  $flags$: 0,
287
287
  $tag$: t,
288
288
  $text$: e,
289
289
  $elm$: null,
290
290
  $children$: null
291
291
  };
292
- return n.$attrs$ = null, n.$key$ = null, n.$name$ = null, n;
293
- }, ve = {}, be = (t) => t && t.$tag$ === ve, Se = {
292
+ return s.$attrs$ = null, s.$key$ = null, s.$name$ = null, s;
293
+ }, ve = {}, Se = (t) => t && t.$tag$ === ve, be = {
294
294
  forEach: (t, e) => t.map(W).forEach(e),
295
295
  map: (t, e) => t.map(W).map(e).map(ke)
296
296
  }, W = (t) => ({
@@ -302,57 +302,57 @@ const H = "http://www.w3.org/1999/xlink", P = {}, pe = "http://www.w3.org/2000/s
302
302
  vtext: t.$text$
303
303
  }), ke = (t) => {
304
304
  if (typeof t.vtag == "function") {
305
- const n = Object.assign({}, t.vattrs);
306
- return t.vkey && (n.key = t.vkey), t.vname && (n.name = t.vname), Y(t.vtag, n, ...t.vchildren || []);
305
+ const s = Object.assign({}, t.vattrs);
306
+ return t.vkey && (s.key = t.vkey), t.vname && (s.name = t.vname), Y(t.vtag, s, ...t.vchildren || []);
307
307
  }
308
308
  const e = M(t.vtag, t.vtext);
309
309
  return e.$attrs$ = t.vattrs, e.$children$ = t.vchildren, e.$key$ = t.vkey, e.$name$ = t.vname, e;
310
- }, z = (t, e, n, s, r, l) => {
311
- if (n !== s) {
310
+ }, z = (t, e, s, r, n, l) => {
311
+ if (s !== r) {
312
312
  let o = G(t, e), c = e.toLowerCase();
313
313
  if (e === "class") {
314
- const i = t.classList, d = q(n), u = q(s);
314
+ const i = t.classList, d = q(s), u = q(r);
315
315
  i.remove(...d.filter((a) => a && !u.includes(a))), i.add(...u.filter((a) => a && !d.includes(a)));
316
316
  } else if (e === "style") {
317
- for (const i in n)
318
- (!s || s[i] == null) && (i.includes("-") ? t.style.removeProperty(i) : t.style[i] = "");
319
317
  for (const i in s)
320
- (!n || s[i] !== n[i]) && (i.includes("-") ? t.style.setProperty(i, s[i]) : t.style[i] = s[i]);
318
+ (!r || r[i] == null) && (i.includes("-") ? t.style.removeProperty(i) : t.style[i] = "");
319
+ for (const i in r)
320
+ (!s || r[i] !== s[i]) && (i.includes("-") ? t.style.setProperty(i, r[i]) : t.style[i] = r[i]);
321
321
  } else if (e !== "key")
322
322
  if (e === "ref")
323
- s && s(t);
323
+ r && r(t);
324
324
  else if (!t.__lookupSetter__(e) && e[0] === "o" && e[1] === "n") {
325
- if (e[2] === "-" ? e = e.slice(3) : G(C, c) ? e = c.slice(2) : e = c[2] + e.slice(3), n || s) {
325
+ if (e[2] === "-" ? e = e.slice(3) : G(C, c) ? e = c.slice(2) : e = c[2] + e.slice(3), s || r) {
326
326
  const i = e.endsWith(Z);
327
- e = e.replace(me, ""), n && x.rel(t, e, n, i), s && x.ael(t, e, s, i);
327
+ e = e.replace(me, ""), s && x.rel(t, e, s, i), r && x.ael(t, e, r, i);
328
328
  }
329
329
  } else {
330
- const i = J(s);
331
- if ((o || i && s !== null) && !r)
330
+ const i = J(r);
331
+ if ((o || i && r !== null) && !n)
332
332
  try {
333
333
  if (t.tagName.includes("-"))
334
- t[e] = s;
334
+ t[e] = r;
335
335
  else {
336
- const u = s ?? "";
337
- e === "list" ? o = !1 : (n == null || t[e] != u) && (t[e] = u);
336
+ const u = r ?? "";
337
+ e === "list" ? o = !1 : (s == null || t[e] != u) && (t[e] = u);
338
338
  }
339
339
  } catch {
340
340
  }
341
341
  let d = !1;
342
- c !== (c = c.replace(/^xlink\:?/, "")) && (e = c, d = !0), s == null || s === !1 ? (s !== !1 || t.getAttribute(e) === "") && (d ? t.removeAttributeNS(H, e) : t.removeAttribute(e)) : (!o || l & 4 || r) && !i && (s = s === !0 ? "" : s, d ? t.setAttributeNS(H, e, s) : t.setAttribute(e, s));
342
+ c !== (c = c.replace(/^xlink\:?/, "")) && (e = c, d = !0), r == null || r === !1 ? (r !== !1 || t.getAttribute(e) === "") && (d ? t.removeAttributeNS(H, e) : t.removeAttribute(e)) : (!o || l & 4 || n) && !i && (r = r === !0 ? "" : r, d ? t.setAttributeNS(H, e, r) : t.setAttribute(e, r));
343
343
  }
344
344
  }
345
- }, Te = /\s/, q = (t) => t ? t.split(Te) : [], Z = "Capture", me = new RegExp(Z + "$"), V = (t, e, n, s) => {
346
- const r = e.$elm$.nodeType === 11 && e.$elm$.host ? e.$elm$.host : e.$elm$, l = t && t.$attrs$ || P, o = e.$attrs$ || P;
347
- for (s in l)
348
- s in o || z(r, s, l[s], void 0, n, e.$flags$);
349
- for (s in o)
350
- z(r, s, l[s], o[s], n, e.$flags$);
351
- }, O = (t, e, n, s) => {
352
- var r;
353
- const l = e.$children$[n];
345
+ }, Te = /\s/, q = (t) => t ? t.split(Te) : [], Z = "Capture", me = new RegExp(Z + "$"), V = (t, e, s, r) => {
346
+ const n = e.$elm$.nodeType === 11 && e.$elm$.host ? e.$elm$.host : e.$elm$, l = t && t.$attrs$ || P, o = e.$attrs$ || P;
347
+ for (r in l)
348
+ r in o || z(n, r, l[r], void 0, s, e.$flags$);
349
+ for (r in o)
350
+ z(n, r, l[r], o[r], s, e.$flags$);
351
+ }, O = (t, e, s, r) => {
352
+ var n;
353
+ const l = e.$children$[s];
354
354
  let o = 0, c, i, d;
355
- if (B || (N = !0, l.$tag$ === "slot" && (k && s.classList.add(k + "-s"), l.$flags$ |= l.$children$ ? (
355
+ if (B || (N = !0, l.$tag$ === "slot" && (k && r.classList.add(k + "-s"), l.$flags$ |= l.$children$ ? (
356
356
  // slot element has fallback content
357
357
  2
358
358
  ) : (
@@ -368,154 +368,154 @@ const H = "http://www.w3.org/1999/xlink", P = {}, pe = "http://www.w3.org/2000/s
368
368
  i = O(t, l, o, c), i && c.appendChild(i);
369
369
  l.$tag$ === "svg" ? h = !1 : c.tagName === "foreignObject" && (h = !0);
370
370
  }
371
- return c["s-hn"] = m, l.$flags$ & 3 && (c["s-sr"] = !0, c["s-cr"] = D, c["s-sn"] = l.$name$ || "", c["s-rf"] = (r = l.$attrs$) === null || r === void 0 ? void 0 : r.ref, d = t && t.$children$ && t.$children$[n], d && d.$tag$ === l.$tag$ && t.$elm$ && L(t.$elm$, !1)), c;
372
- }, L = (t, e) => {
371
+ return c["s-hn"] = m, l.$flags$ & 3 && (c["s-sr"] = !0, c["s-cr"] = D, c["s-sn"] = l.$name$ || "", c["s-rf"] = (n = l.$attrs$) === null || n === void 0 ? void 0 : n.ref, d = t && t.$children$ && t.$children$[s], d && d.$tag$ === l.$tag$ && t.$elm$ && A(t.$elm$, !1)), c;
372
+ }, A = (t, e) => {
373
373
  x.$flags$ |= 1;
374
- const n = Array.from(t.childNodes);
374
+ const s = Array.from(t.childNodes);
375
375
  if (t["s-sr"] && _.experimentalSlotFixes) {
376
- let s = t;
377
- for (; s = s.nextSibling; )
378
- s && s["s-sn"] === t["s-sn"] && s["s-sh"] === m && n.push(s);
376
+ let r = t;
377
+ for (; r = r.nextSibling; )
378
+ r && r["s-sn"] === t["s-sn"] && r["s-sh"] === m && s.push(r);
379
379
  }
380
- for (let s = n.length - 1; s >= 0; s--) {
381
- const r = n[s];
382
- r["s-hn"] !== m && r["s-ol"] && (se(r).insertBefore(r, U(r)), r["s-ol"].remove(), r["s-ol"] = void 0, r["s-sh"] = void 0, N = !0), e && L(r, e);
380
+ for (let r = s.length - 1; r >= 0; r--) {
381
+ const n = s[r];
382
+ n["s-hn"] !== m && n["s-ol"] && (se(n).insertBefore(n, U(n)), n["s-ol"].remove(), n["s-ol"] = void 0, n["s-sh"] = void 0, N = !0), e && A(n, e);
383
383
  }
384
384
  x.$flags$ &= -2;
385
- }, ee = (t, e, n, s, r, l) => {
385
+ }, ee = (t, e, s, r, n, l) => {
386
386
  let o = t["s-cr"] && t["s-cr"].parentNode || t, c;
387
- for (o.shadowRoot && o.tagName === m && (o = o.shadowRoot); r <= l; ++r)
388
- s[r] && (c = O(null, n, r, t), c && (s[r].$elm$ = c, o.insertBefore(c, U(e))));
389
- }, te = (t, e, n) => {
390
- for (let s = e; s <= n; ++s) {
391
- const r = t[s];
392
- if (r) {
393
- const l = r.$elm$;
394
- le(r), l && (R = !0, l["s-ol"] ? l["s-ol"].remove() : L(l, !0), l.remove());
387
+ for (o.shadowRoot && o.tagName === m && (o = o.shadowRoot); n <= l; ++n)
388
+ r[n] && (c = O(null, s, n, t), c && (r[n].$elm$ = c, o.insertBefore(c, U(e))));
389
+ }, te = (t, e, s) => {
390
+ for (let r = e; r <= s; ++r) {
391
+ const n = t[r];
392
+ if (n) {
393
+ const l = n.$elm$;
394
+ le(n), l && (R = !0, l["s-ol"] ? l["s-ol"].remove() : A(l, !0), l.remove());
395
395
  }
396
396
  }
397
- }, xe = (t, e, n, s, r = !1) => {
398
- let l = 0, o = 0, c = 0, i = 0, d = e.length - 1, u = e[0], a = e[d], $ = s.length - 1, f = s[0], g = s[$], v, y;
397
+ }, xe = (t, e, s, r, n = !1) => {
398
+ let l = 0, o = 0, c = 0, i = 0, d = e.length - 1, u = e[0], a = e[d], $ = r.length - 1, f = r[0], g = r[$], v, y;
399
399
  for (; l <= d && o <= $; )
400
400
  if (u == null)
401
401
  u = e[++l];
402
402
  else if (a == null)
403
403
  a = e[--d];
404
404
  else if (f == null)
405
- f = s[++o];
405
+ f = r[++o];
406
406
  else if (g == null)
407
- g = s[--$];
408
- else if (E(u, f, r))
409
- T(u, f, r), u = e[++l], f = s[++o];
410
- else if (E(a, g, r))
411
- T(a, g, r), a = e[--d], g = s[--$];
412
- else if (E(u, g, r))
413
- (u.$tag$ === "slot" || g.$tag$ === "slot") && L(u.$elm$.parentNode, !1), T(u, g, r), t.insertBefore(u.$elm$, a.$elm$.nextSibling), u = e[++l], g = s[--$];
414
- else if (E(a, f, r))
415
- (u.$tag$ === "slot" || g.$tag$ === "slot") && L(a.$elm$.parentNode, !1), T(a, f, r), t.insertBefore(a.$elm$, u.$elm$), a = e[--d], f = s[++o];
407
+ g = r[--$];
408
+ else if (E(u, f, n))
409
+ T(u, f, n), u = e[++l], f = r[++o];
410
+ else if (E(a, g, n))
411
+ T(a, g, n), a = e[--d], g = r[--$];
412
+ else if (E(u, g, n))
413
+ (u.$tag$ === "slot" || g.$tag$ === "slot") && A(u.$elm$.parentNode, !1), T(u, g, n), t.insertBefore(u.$elm$, a.$elm$.nextSibling), u = e[++l], g = r[--$];
414
+ else if (E(a, f, n))
415
+ (u.$tag$ === "slot" || g.$tag$ === "slot") && A(a.$elm$.parentNode, !1), T(a, f, n), t.insertBefore(a.$elm$, u.$elm$), a = e[--d], f = r[++o];
416
416
  else {
417
417
  for (c = -1, i = l; i <= d; ++i)
418
418
  if (e[i] && e[i].$key$ !== null && e[i].$key$ === f.$key$) {
419
419
  c = i;
420
420
  break;
421
421
  }
422
- c >= 0 ? (y = e[c], y.$tag$ !== f.$tag$ ? v = O(e && e[o], n, c, t) : (T(y, f, r), e[c] = void 0, v = y.$elm$), f = s[++o]) : (v = O(e && e[o], n, o, t), f = s[++o]), v && se(u.$elm$).insertBefore(v, U(u.$elm$));
422
+ c >= 0 ? (y = e[c], y.$tag$ !== f.$tag$ ? v = O(e && e[o], s, c, t) : (T(y, f, n), e[c] = void 0, v = y.$elm$), f = r[++o]) : (v = O(e && e[o], s, o, t), f = r[++o]), v && se(u.$elm$).insertBefore(v, U(u.$elm$));
423
423
  }
424
- l > d ? ee(t, s[$ + 1] == null ? null : s[$ + 1].$elm$, n, s, o, $) : o > $ && te(e, l, d);
425
- }, E = (t, e, n = !1) => t.$tag$ === e.$tag$ ? t.$tag$ === "slot" ? t.$name$ === e.$name$ : n ? !0 : t.$key$ === e.$key$ : !1, U = (t) => t && t["s-ol"] || t, se = (t) => (t["s-ol"] ? t["s-ol"] : t).parentNode, T = (t, e, n = !1) => {
426
- const s = e.$elm$ = t.$elm$, r = t.$children$, l = e.$children$, o = e.$tag$, c = e.$text$;
424
+ l > d ? ee(t, r[$ + 1] == null ? null : r[$ + 1].$elm$, s, r, o, $) : o > $ && te(e, l, d);
425
+ }, E = (t, e, s = !1) => t.$tag$ === e.$tag$ ? t.$tag$ === "slot" ? t.$name$ === e.$name$ : s ? !0 : t.$key$ === e.$key$ : !1, U = (t) => t && t["s-ol"] || t, se = (t) => (t["s-ol"] ? t["s-ol"] : t).parentNode, T = (t, e, s = !1) => {
426
+ const r = e.$elm$ = t.$elm$, n = t.$children$, l = e.$children$, o = e.$tag$, c = e.$text$;
427
427
  let i;
428
- c === null ? (h = o === "svg" ? !0 : o === "foreignObject" ? !1 : h, o === "slot" && !B || V(t, e, h), r !== null && l !== null ? xe(s, r, e, l, n) : l !== null ? (t.$text$ !== null && (s.textContent = ""), ee(s, null, e, l, 0, l.length - 1)) : r !== null && te(r, 0, r.length - 1), h && o === "svg" && (h = !1)) : (i = s["s-cr"]) ? i.parentNode.textContent = c : t.$text$ !== c && (s.data = c);
429
- }, ne = (t) => {
428
+ c === null ? (h = o === "svg" ? !0 : o === "foreignObject" ? !1 : h, o === "slot" && !B || V(t, e, h), n !== null && l !== null ? xe(r, n, e, l, s) : l !== null ? (t.$text$ !== null && (r.textContent = ""), ee(r, null, e, l, 0, l.length - 1)) : n !== null && te(n, 0, n.length - 1), h && o === "svg" && (h = !1)) : (i = r["s-cr"]) ? i.parentNode.textContent = c : t.$text$ !== c && (r.data = c);
429
+ }, re = (t) => {
430
430
  const e = t.childNodes;
431
- for (const n of e)
432
- if (n.nodeType === 1) {
433
- if (n["s-sr"]) {
434
- const s = n["s-sn"];
435
- n.hidden = !1;
436
- for (const r of e)
437
- if (r !== n) {
438
- if (r["s-hn"] !== n["s-hn"] || s !== "") {
439
- if (r.nodeType === 1 && (s === r.getAttribute("slot") || s === r["s-sn"])) {
440
- n.hidden = !0;
431
+ for (const s of e)
432
+ if (s.nodeType === 1) {
433
+ if (s["s-sr"]) {
434
+ const r = s["s-sn"];
435
+ s.hidden = !1;
436
+ for (const n of e)
437
+ if (n !== s) {
438
+ if (n["s-hn"] !== s["s-hn"] || r !== "") {
439
+ if (n.nodeType === 1 && (r === n.getAttribute("slot") || r === n["s-sn"])) {
440
+ s.hidden = !0;
441
441
  break;
442
442
  }
443
- } else if (r.nodeType === 1 || r.nodeType === 3 && r.textContent.trim() !== "") {
444
- n.hidden = !0;
443
+ } else if (n.nodeType === 1 || n.nodeType === 3 && n.textContent.trim() !== "") {
444
+ s.hidden = !0;
445
445
  break;
446
446
  }
447
447
  }
448
448
  }
449
- ne(n);
449
+ re(s);
450
450
  }
451
- }, b = [], re = (t) => {
452
- let e, n, s;
453
- for (const r of t.childNodes) {
454
- if (r["s-sr"] && (e = r["s-cr"]) && e.parentNode) {
455
- n = e.parentNode.childNodes;
456
- const l = r["s-sn"];
457
- for (s = n.length - 1; s >= 0; s--)
458
- if (e = n[s], !e["s-cn"] && !e["s-nr"] && e["s-hn"] !== r["s-hn"] && !_.experimentalSlotFixes)
451
+ }, S = [], ne = (t) => {
452
+ let e, s, r;
453
+ for (const n of t.childNodes) {
454
+ if (n["s-sr"] && (e = n["s-cr"]) && e.parentNode) {
455
+ s = e.parentNode.childNodes;
456
+ const l = n["s-sn"];
457
+ for (r = s.length - 1; r >= 0; r--)
458
+ if (e = s[r], !e["s-cn"] && !e["s-nr"] && e["s-hn"] !== n["s-hn"] && !_.experimentalSlotFixes)
459
459
  if (w(e, l)) {
460
- let o = b.find((c) => c.$nodeToRelocate$ === e);
461
- R = !0, e["s-sn"] = e["s-sn"] || l, o ? (o.$nodeToRelocate$["s-sh"] = r["s-hn"], o.$slotRefNode$ = r) : (e["s-sh"] = r["s-hn"], b.push({
462
- $slotRefNode$: r,
460
+ let o = S.find((c) => c.$nodeToRelocate$ === e);
461
+ R = !0, e["s-sn"] = e["s-sn"] || l, o ? (o.$nodeToRelocate$["s-sh"] = n["s-hn"], o.$slotRefNode$ = n) : (e["s-sh"] = n["s-hn"], S.push({
462
+ $slotRefNode$: n,
463
463
  $nodeToRelocate$: e
464
- })), e["s-sr"] && b.map((c) => {
465
- w(c.$nodeToRelocate$, e["s-sn"]) && (o = b.find((i) => i.$nodeToRelocate$ === e), o && !c.$slotRefNode$ && (c.$slotRefNode$ = o.$slotRefNode$));
464
+ })), e["s-sr"] && S.map((c) => {
465
+ w(c.$nodeToRelocate$, e["s-sn"]) && (o = S.find((i) => i.$nodeToRelocate$ === e), o && !c.$slotRefNode$ && (c.$slotRefNode$ = o.$slotRefNode$));
466
466
  });
467
467
  } else
468
- b.some((o) => o.$nodeToRelocate$ === e) || b.push({
468
+ S.some((o) => o.$nodeToRelocate$ === e) || S.push({
469
469
  $nodeToRelocate$: e
470
470
  });
471
471
  }
472
- r.nodeType === 1 && re(r);
472
+ n.nodeType === 1 && ne(n);
473
473
  }
474
474
  }, w = (t, e) => t.nodeType === 1 ? t.getAttribute("slot") === null && e === "" || t.getAttribute("slot") === e : t["s-sn"] === e ? !0 : e === "", le = (t) => {
475
475
  t.$attrs$ && t.$attrs$.ref && t.$attrs$.ref(null), t.$children$ && t.$children$.map(le);
476
- }, Le = (t, e, n = !1) => {
477
- var s, r, l, o, c;
478
- const i = t.$hostElement$, d = t.$cmpMeta$, u = t.$vnode$ || M(null, null), a = be(e) ? e : Y(null, null, e);
479
- if (m = i.tagName, d.$attrsToReflect$ && (a.$attrs$ = a.$attrs$ || {}, d.$attrsToReflect$.map(([$, f]) => a.$attrs$[f] = i[$])), n && a.$attrs$)
476
+ }, Ae = (t, e, s = !1) => {
477
+ var r, n, l, o, c;
478
+ const i = t.$hostElement$, d = t.$cmpMeta$, u = t.$vnode$ || M(null, null), a = Se(e) ? e : Y(null, null, e);
479
+ if (m = i.tagName, d.$attrsToReflect$ && (a.$attrs$ = a.$attrs$ || {}, d.$attrsToReflect$.map(([$, f]) => a.$attrs$[f] = i[$])), s && a.$attrs$)
480
480
  for (const $ of Object.keys(a.$attrs$))
481
481
  i.hasAttribute($) && !["key", "ref", "style", "class"].includes($) && (a.$attrs$[$] = i[$]);
482
- a.$tag$ = null, a.$flags$ |= 4, t.$vnode$ = a, a.$elm$ = u.$elm$ = i.shadowRoot || i, k = i["s-sc"], B = (d.$flags$ & 1) !== 0, D = i["s-cr"], R = !1, T(u, a, n);
482
+ a.$tag$ = null, a.$flags$ |= 4, t.$vnode$ = a, a.$elm$ = u.$elm$ = i.shadowRoot || i, k = i["s-sc"], B = (d.$flags$ & 1) !== 0, D = i["s-cr"], R = !1, T(u, a, s);
483
483
  {
484
484
  if (x.$flags$ |= 1, N) {
485
- re(a.$elm$);
486
- for (const $ of b) {
485
+ ne(a.$elm$);
486
+ for (const $ of S) {
487
487
  const f = $.$nodeToRelocate$;
488
488
  if (!f["s-ol"]) {
489
489
  const g = j.createTextNode("");
490
490
  g["s-nr"] = f, f.parentNode.insertBefore(f["s-ol"] = g, f);
491
491
  }
492
492
  }
493
- for (const $ of b) {
493
+ for (const $ of S) {
494
494
  const f = $.$nodeToRelocate$, g = $.$slotRefNode$;
495
495
  if (g) {
496
496
  const v = g.parentNode;
497
497
  let y = g.nextSibling;
498
498
  {
499
- let A = (s = f["s-ol"]) === null || s === void 0 ? void 0 : s.previousSibling;
500
- for (; A; ) {
501
- let S = (r = A["s-nr"]) !== null && r !== void 0 ? r : null;
502
- if (S && S["s-sn"] === f["s-sn"] && v === S.parentNode && (S = S.nextSibling, !S || !S["s-nr"])) {
503
- y = S;
499
+ let L = (r = f["s-ol"]) === null || r === void 0 ? void 0 : r.previousSibling;
500
+ for (; L; ) {
501
+ let b = (n = L["s-nr"]) !== null && n !== void 0 ? n : null;
502
+ if (b && b["s-sn"] === f["s-sn"] && v === b.parentNode && (b = b.nextSibling, !b || !b["s-nr"])) {
503
+ y = b;
504
504
  break;
505
505
  }
506
- A = A.previousSibling;
506
+ L = L.previousSibling;
507
507
  }
508
508
  }
509
509
  (!y && v !== f.parentNode || f.nextSibling !== y) && f !== y && (!f["s-hn"] && f["s-ol"] && (f["s-hn"] = f["s-ol"].parentNode.nodeName), v.insertBefore(f, y), f.nodeType === 1 && (f.hidden = (l = f["s-ih"]) !== null && l !== void 0 ? l : !1)), f && typeof g["s-rf"] == "function" && g["s-rf"](f);
510
510
  } else
511
- f.nodeType === 1 && (n && (f["s-ih"] = (o = f.hidden) !== null && o !== void 0 ? o : !1), f.hidden = !0);
511
+ f.nodeType === 1 && (s && (f["s-ih"] = (o = f.hidden) !== null && o !== void 0 ? o : !1), f.hidden = !0);
512
512
  }
513
513
  }
514
- R && ne(a.$elm$), x.$flags$ &= -2, b.length = 0;
514
+ R && re(a.$elm$), x.$flags$ &= -2, S.length = 0;
515
515
  }
516
516
  if (_.experimentalScopedSlotChanges && d.$flags$ & 2)
517
517
  for (const $ of a.$elm$.childNodes)
518
- $["s-hn"] !== m && !$["s-sh"] && (n && $["s-ih"] == null && ($["s-ih"] = (c = $.hidden) !== null && c !== void 0 ? c : !1), $.hidden = !0);
518
+ $["s-hn"] !== m && !$["s-sh"] && (s && $["s-ih"] == null && ($["s-ih"] = (c = $.hidden) !== null && c !== void 0 ? c : !1), $.hidden = !0);
519
519
  D = void 0;
520
520
  }, G = (t, e) => e in t, C = typeof window < "u" ? window : {}, j = C.document || { head: {} };
521
521
  C.HTMLElement;
@@ -524,53 +524,53 @@ const x = {
524
524
  $resourcesUrl$: "",
525
525
  jmp: (t) => t(),
526
526
  raf: (t) => requestAnimationFrame(t),
527
- ael: (t, e, n, s) => t.addEventListener(e, n, s),
528
- rel: (t, e, n, s) => t.removeEventListener(e, n, s),
527
+ ael: (t, e, s, r) => t.addEventListener(e, s, r),
528
+ rel: (t, e, s, r) => t.removeEventListener(e, s, r),
529
529
  ce: (t, e) => new CustomEvent(t, e)
530
- }, Ae = (t, e, n) => {
531
- [null, void 0, "", !1].includes(n) || ["innerHTML", "style"].includes(e) || t.setAttribute(e, ["object", "function"].includes(typeof n) ? "/!\\ Object props are not rendered in the code example" : n);
532
- }, oe = (t, e, n, s, r) => {
530
+ }, Le = (t, e, s) => {
531
+ [null, void 0, "", !1].includes(s) || ["innerHTML", "style"].includes(e) || t.setAttribute(e, ["object", "function"].includes(typeof s) ? "/!\\ Object props are not rendered in the code example" : s);
532
+ }, oe = (t, e, s, r, n) => {
533
533
  if (e && typeof e == "string") {
534
534
  const l = document.createElement(e);
535
- Object.keys(n || {}).forEach((o) => {
536
- Ae(l, o, n[o]);
537
- }), s == null || s.forEach((o) => {
535
+ Object.keys(s || {}).forEach((o) => {
536
+ Le(l, o, s[o]);
537
+ }), r == null || r.forEach((o) => {
538
538
  oe(l, o.$tag$, o.$attrs$, o.$children$, o.$text$);
539
- }), n != null && n.innerHTML && (l.innerHTML = n.innerHTML), t.appendChild(l);
539
+ }), s != null && s.innerHTML && (l.innerHTML = s.innerHTML), t.appendChild(l);
540
540
  }
541
- r && (t.innerHTML = r);
541
+ n && (t.innerHTML = n);
542
542
  }, Ge = (t, e) => {
543
- const n = {};
543
+ const s = {};
544
544
  if (typeof t != "object")
545
545
  throw new Error("filterArgs - args isn't an object.");
546
- for (const s in t)
547
- if (!s.startsWith("slot")) {
548
- const r = t[s], l = s.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
549
- (!e || !Object.keys(e).includes(s) || e[s] !== r) && (n[l] = r);
546
+ for (const r in t)
547
+ if (!r.startsWith("slot")) {
548
+ const n = t[r], l = r.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
549
+ (!e || !Object.keys(e).includes(r) || e[r] !== n) && (s[l] = n);
550
550
  }
551
- return n;
551
+ return s;
552
552
  }, Ie = (t, e) => {
553
- var s, r;
554
- const n = document.getElementById("storybook-root");
555
- if (n)
556
- return (r = document.querySelector("[lang]")) == null || r.setAttribute("lang", ((s = e.globals) == null ? void 0 : s.locale) || "en"), Le(
553
+ var r, n;
554
+ const s = document.getElementById("storybook-root");
555
+ if (s)
556
+ return (n = document.querySelector("[lang]")) == null || n.setAttribute("lang", ((r = e.globals) == null ? void 0 : r.locale) || "en"), Ae(
557
557
  {
558
558
  $ancestorComponent$: void 0,
559
559
  $flags$: 0,
560
560
  $modeName$: void 0,
561
561
  $cmpMeta$: {
562
562
  $flags$: 0,
563
- $tagName$: n.tagName
563
+ $tagName$: s.tagName
564
564
  },
565
- $hostElement$: n
565
+ $hostElement$: s
566
566
  },
567
567
  t(e)
568
- ), n.children[n.children.length - 1];
569
- }, Xe = ({ $tag$: t, $attrs$: e, $children$: n, $text$: s }) => {
570
- const r = document.createElement("div");
571
- return oe(r, t, e, n, s), r.innerHTML;
572
- }, Ke = ({ disconnect: t, observe: e, takeRecords: n }) => {
573
- class s {
568
+ ), s.children[s.children.length - 1];
569
+ }, Xe = ({ $tag$: t, $attrs$: e, $children$: s, $text$: r }) => {
570
+ const n = document.createElement("div");
571
+ return oe(n, t, e, s, r), n.innerHTML;
572
+ }, Ke = ({ disconnect: t, observe: e, takeRecords: s }) => {
573
+ class r {
574
574
  constructor(l) {
575
575
  /**
576
576
  *
@@ -583,7 +583,7 @@ const x = {
583
583
  /**
584
584
  *
585
585
  */
586
- p(this, "takeRecords", n);
586
+ p(this, "takeRecords", s);
587
587
  /**
588
588
  *
589
589
  */
@@ -591,16 +591,16 @@ const x = {
591
591
  this.cb = l;
592
592
  }
593
593
  }
594
- return [window, global].forEach((r) => {
595
- Object.defineProperty(r, "MutationObserver", {
594
+ return [window, global].forEach((n) => {
595
+ Object.defineProperty(n, "MutationObserver", {
596
596
  writable: !0,
597
597
  configurable: !0,
598
- value: s
598
+ value: r
599
599
  });
600
- }), s;
600
+ }), r;
601
601
  }, Qe = ({ disconnect: t, observe: e }) => {
602
- class n {
603
- constructor(r) {
602
+ class s {
603
+ constructor(n) {
604
604
  /**
605
605
  *
606
606
  */
@@ -617,16 +617,16 @@ const x = {
617
617
  *
618
618
  */
619
619
  p(this, "cb");
620
- this.cb = r;
620
+ this.cb = n;
621
621
  }
622
622
  }
623
- return [window, global].forEach((s) => {
624
- Object.defineProperty(s, "ResizeObserver", {
623
+ return [window, global].forEach((r) => {
624
+ Object.defineProperty(r, "ResizeObserver", {
625
625
  writable: !0,
626
626
  configurable: !0,
627
- value: n
627
+ value: s
628
628
  });
629
- }), n;
629
+ }), s;
630
630
  };
631
631
  class Ee extends Event {
632
632
  constructor() {