@auldrant/ui 0.11.1 → 0.12.1

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.
@@ -1,104 +1,144 @@
1
- import { jsx as l, jsxs as g, Fragment as ae } from "preact/jsx-runtime";
2
- import { useId as L, useState as ce, useRef as H, useCallback as ie, useEffect as A } from "preact/hooks";
3
- import { h as K, toChildArray as de } from "preact";
4
- import { signal as V, useSignal as M, effect as ue } from "@preact/signals";
1
+ import { jsx as o, jsxs as g, Fragment as ve } from "preact/jsx-runtime";
2
+ import { cloneElement as ye, h as Q, toChildArray as ke } from "preact";
3
+ import { useId as L, useState as we, useRef as q, useCallback as xe, useEffect as k } from "preact/hooks";
4
+ import { signal as D, effect as H, useSignal as M } from "@preact/signals";
5
5
  function m(...t) {
6
6
  return t.filter(Boolean).join(" ");
7
7
  }
8
- function D(...t) {
8
+ function j(...t) {
9
9
  return t.filter(Boolean).join(" ") || void 0;
10
10
  }
11
- const pe = "_button_4gn7y_1 _focus-ring_4u8pk_3 _disabled_4u8pk_8", _e = {
12
- button: pe
13
- }, J = (t) => {
14
- const { label: e, onClick: s, type: n = "button", disabled: r, class: o } = t;
15
- return /* @__PURE__ */ l("button", { type: n, class: m(_e.button, o), onClick: s, disabled: r, children: e });
16
- }, he = "_card_awzw5_1", fe = {
17
- card: he
18
- }, Kt = (t) => {
19
- const { children: e, class: s } = t;
20
- return /* @__PURE__ */ l("div", { class: m(fe.card, s), children: e });
21
- }, ge = "_field_17xwz_1", me = "_input_17xwz_8 _check-input_4u8pk_32 _focus-ring_4u8pk_3 _disabled_4u8pk_8", be = "_error_17xwz_12 _field-error_4u8pk_36", R = {
22
- field: ge,
23
- input: me,
24
- error: be
25
- }, Vt = (t) => {
26
- const { label: e, name: s, checked: n, required: r, disabled: o, error: i, onChange: a, class: c } = t, d = L(), h = `${d}-error`;
27
- return /* @__PURE__ */ g("div", { class: m(R.field, c), children: [
28
- /* @__PURE__ */ l(
11
+ const $e = "_badge_r8so7_1", Ce = "_success_r8so7_13", Ie = "_warning_r8so7_19", Le = "_error_r8so7_24", F = {
12
+ badge: $e,
13
+ success: Ce,
14
+ warning: Ie,
15
+ error: Le
16
+ }, _n = (t) => {
17
+ const { children: e, variant: n = "neutral", class: s } = t;
18
+ return /* @__PURE__ */ o(
19
+ "span",
20
+ {
21
+ class: m(
22
+ F.badge,
23
+ n === "success" && F.success,
24
+ n === "warning" && F.warning,
25
+ n === "error" && F.error,
26
+ s
27
+ ),
28
+ children: e
29
+ }
30
+ );
31
+ }, Ne = "_button_1cabv_1 _focus-ring_4u8pk_3 _disabled_4u8pk_8", Ee = "_iconButton_1cabv_16", Y = {
32
+ button: Ne,
33
+ iconButton: Ee
34
+ };
35
+ function Pe(t) {
36
+ return "icon" in t;
37
+ }
38
+ const se = (t) => {
39
+ const { onClick: e, type: n = "button", disabled: s, class: r } = t;
40
+ if (Pe(t)) {
41
+ const { icon: a, "aria-label": c } = t;
42
+ return /* @__PURE__ */ o(
43
+ "button",
44
+ {
45
+ type: n,
46
+ class: m(Y.button, Y.iconButton, r),
47
+ "aria-label": c,
48
+ onClick: e,
49
+ disabled: s,
50
+ children: ye(a, { "aria-hidden": "true" })
51
+ }
52
+ );
53
+ }
54
+ const { label: l } = t;
55
+ return /* @__PURE__ */ o("button", { type: n, class: m(Y.button, r), onClick: e, disabled: s, children: l });
56
+ }, De = "_card_awzw5_1", je = {
57
+ card: De
58
+ }, hn = (t) => {
59
+ const { children: e, class: n } = t;
60
+ return /* @__PURE__ */ o("div", { class: m(je.card, n), children: e });
61
+ }, Be = "_field_17xwz_1", Se = "_input_17xwz_8 _check-input_4u8pk_32 _focus-ring_4u8pk_3 _disabled_4u8pk_8", He = "_error_17xwz_12 _field-error_4u8pk_36", U = {
62
+ field: Be,
63
+ input: Se,
64
+ error: He
65
+ }, fn = (t) => {
66
+ const { label: e, name: n, checked: s, required: r, disabled: l, error: a, onChange: c, class: i } = t, d = L(), h = `${d}-error`;
67
+ return /* @__PURE__ */ g("div", { class: m(U.field, i), children: [
68
+ /* @__PURE__ */ o(
29
69
  "input",
30
70
  {
31
71
  id: d,
32
- class: R.input,
72
+ class: U.input,
33
73
  type: "checkbox",
34
- name: s,
35
- checked: n,
74
+ name: n,
75
+ checked: s,
36
76
  required: r,
37
- disabled: o,
38
- "aria-invalid": !!i || void 0,
39
- "aria-describedby": D(i && h),
40
- onChange: a && ((u) => a(u.target.checked))
77
+ disabled: l,
78
+ "aria-invalid": !!a || void 0,
79
+ "aria-describedby": j(a && h),
80
+ onChange: c && ((u) => c(u.target.checked))
41
81
  }
42
82
  ),
43
- /* @__PURE__ */ l("label", { for: d, children: e }),
44
- i && /* @__PURE__ */ l("p", { id: h, class: R.error, role: "alert", children: i })
83
+ /* @__PURE__ */ o("label", { for: d, children: e }),
84
+ a && /* @__PURE__ */ o("p", { id: h, class: U.error, role: "alert", children: a })
45
85
  ] });
46
86
  };
47
- function ye(t, e, s) {
48
- const [n, r] = ce(!1), o = H({ x: 0, y: 0, offsetX: 0, offsetY: 0 }), i = ie(() => {
49
- const a = e.current;
50
- a && (a.style.removeProperty("--drag-x"), a.style.removeProperty("--drag-y"));
87
+ function Ae(t, e, n) {
88
+ const [s, r] = we(!1), l = q({ x: 0, y: 0, offsetX: 0, offsetY: 0 }), a = xe(() => {
89
+ const c = e.current;
90
+ c && (c.style.removeProperty("--drag-x"), c.style.removeProperty("--drag-y"));
51
91
  }, [e]);
52
- return A(() => {
53
- const a = t.current, c = e.current;
54
- if (!a || !c || !s)
92
+ return k(() => {
93
+ const c = t.current, i = e.current;
94
+ if (!c || !i || !n)
55
95
  return;
56
96
  const d = (h) => {
57
97
  if (h.target.closest("button"))
58
98
  return;
59
- const u = c.getBoundingClientRect(), p = Number.parseFloat(c.style.getPropertyValue("--drag-x") || "0"), _ = Number.parseFloat(c.style.getPropertyValue("--drag-y") || "0");
60
- o.current = {
99
+ const u = i.getBoundingClientRect(), p = Number.parseFloat(i.style.getPropertyValue("--drag-x") || "0"), _ = Number.parseFloat(i.style.getPropertyValue("--drag-y") || "0");
100
+ l.current = {
61
101
  x: h.clientX,
62
102
  y: h.clientY,
63
103
  offsetX: p,
64
104
  offsetY: _
65
- }, a.setPointerCapture(h.pointerId), r(!0);
66
- const b = -(u.left - p), y = window.innerWidth - u.right + p, v = -(u.top - _), w = window.innerHeight - u.bottom + _, N = (I) => {
67
- const j = I.clientX - o.current.x + o.current.offsetX, P = I.clientY - o.current.y + o.current.offsetY, f = Math.max(b, Math.min(y, j)), $ = Math.max(v, Math.min(w, P));
68
- c.style.setProperty("--drag-x", `${f}px`), c.style.setProperty("--drag-y", `${$}px`);
69
- }, x = () => {
70
- a.removeEventListener("pointermove", N), a.removeEventListener("pointerup", x), r(!1);
105
+ }, c.setPointerCapture(h.pointerId), r(!0);
106
+ const b = -(u.left - p), v = window.innerWidth - u.right + p, w = -(u.top - _), x = window.innerHeight - u.bottom + _, E = (N) => {
107
+ const B = N.clientX - l.current.x + l.current.offsetX, S = N.clientY - l.current.y + l.current.offsetY, f = Math.max(b, Math.min(v, B)), C = Math.max(w, Math.min(x, S));
108
+ i.style.setProperty("--drag-x", `${f}px`), i.style.setProperty("--drag-y", `${C}px`);
109
+ }, $ = () => {
110
+ c.removeEventListener("pointermove", E), c.removeEventListener("pointerup", $), r(!1);
71
111
  };
72
- a.addEventListener("pointermove", N), a.addEventListener("pointerup", x);
112
+ c.addEventListener("pointermove", E), c.addEventListener("pointerup", $);
73
113
  };
74
- return a.addEventListener("pointerdown", d), () => a.removeEventListener("pointerdown", d);
75
- }, [t, e, s]), { isDragging: n, reset: i };
114
+ return c.addEventListener("pointerdown", d), () => c.removeEventListener("pointerdown", d);
115
+ }, [t, e, n]), { isDragging: s, reset: a };
76
116
  }
77
- const ke = "_dialog_k7njf_1", ve = "_panel_k7njf_21", we = "_header_k7njf_30", xe = "_title_k7njf_37", $e = "_close_k7njf_42 _focus-ring_4u8pk_3", Ce = "_body_k7njf_61", Le = "_message_k7njf_66", Ie = "_footer_k7njf_70", Ne = "_action_k7njf_77 _focus-ring_4u8pk_3 _disabled_4u8pk_8", Ee = "_primary_k7njf_92", De = "_draggable_k7njf_103", je = "_dragging_k7njf_109", k = {
78
- dialog: ke,
79
- panel: ve,
80
- header: we,
81
- title: xe,
82
- close: $e,
83
- body: Ce,
84
- message: Le,
85
- footer: Ie,
86
- action: Ne,
87
- primary: Ee,
88
- draggable: De,
89
- dragging: je
117
+ const Te = "_dialog_k7njf_1", qe = "_panel_k7njf_21", Me = "_header_k7njf_30", ze = "_title_k7njf_37", Re = "_close_k7njf_42 _focus-ring_4u8pk_3", Fe = "_body_k7njf_61", Oe = "_message_k7njf_66", Xe = "_footer_k7njf_70", Ye = "_action_k7njf_77 _focus-ring_4u8pk_3 _disabled_4u8pk_8", Ue = "_primary_k7njf_92", Ke = "_draggable_k7njf_103", Ve = "_dragging_k7njf_109", y = {
118
+ dialog: Te,
119
+ panel: qe,
120
+ header: Me,
121
+ title: ze,
122
+ close: Re,
123
+ body: Fe,
124
+ message: Oe,
125
+ footer: Xe,
126
+ action: Ye,
127
+ primary: Ue,
128
+ draggable: Ke,
129
+ dragging: Ve
90
130
  };
91
- const Pe = (...t) => t.filter((e, s, n) => !!e && e.trim() !== "" && n.indexOf(e) === s).join(" ").trim();
92
- const Q = (t) => t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
93
- const Se = (t) => t.replace(
131
+ const We = (...t) => t.filter((e, n, s) => !!e && e.trim() !== "" && s.indexOf(e) === n).join(" ").trim();
132
+ const re = (t) => t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
133
+ const Ge = (t) => t.replace(
94
134
  /^([A-Z])|[\s-_]+(\w)/g,
95
- (e, s, n) => n ? n.toUpperCase() : s.toLowerCase()
135
+ (e, n, s) => s ? s.toUpperCase() : n.toLowerCase()
96
136
  );
97
- const ee = (t) => {
98
- const e = Se(t);
137
+ const oe = (t) => {
138
+ const e = Ge(t);
99
139
  return e.charAt(0).toUpperCase() + e.slice(1);
100
140
  };
101
- var Be = {
141
+ var Ze = {
102
142
  xmlns: "http://www.w3.org/2000/svg",
103
143
  width: 24,
104
144
  height: 24,
@@ -109,53 +149,53 @@ var Be = {
109
149
  "stroke-linecap": "round",
110
150
  "stroke-linejoin": "round"
111
151
  };
112
- const He = (t) => {
152
+ const Je = (t) => {
113
153
  for (const e in t)
114
154
  if (e.startsWith("aria-") || e === "role" || e === "title")
115
155
  return !0;
116
156
  return !1;
117
157
  };
118
- const Ae = ({
158
+ const Qe = ({
119
159
  color: t = "currentColor",
120
160
  size: e = 24,
121
- strokeWidth: s = 2,
122
- absoluteStrokeWidth: n,
161
+ strokeWidth: n = 2,
162
+ absoluteStrokeWidth: s,
123
163
  children: r,
124
- iconNode: o,
125
- class: i = "",
126
- ...a
127
- }) => K(
164
+ iconNode: l,
165
+ class: a = "",
166
+ ...c
167
+ }) => Q(
128
168
  "svg",
129
169
  {
130
- ...Be,
170
+ ...Ze,
131
171
  width: String(e),
132
172
  height: e,
133
173
  stroke: t,
134
- "stroke-width": n ? Number(s) * 24 / Number(e) : s,
135
- class: ["lucide", i].join(" "),
136
- ...!r && !He(a) && { "aria-hidden": "true" },
137
- ...a
174
+ "stroke-width": s ? Number(n) * 24 / Number(e) : n,
175
+ class: ["lucide", a].join(" "),
176
+ ...!r && !Je(c) && { "aria-hidden": "true" },
177
+ ...c
138
178
  },
139
- [...o.map(([c, d]) => K(c, d)), ...de(r)]
179
+ [...l.map(([i, d]) => Q(i, d)), ...ke(r)]
140
180
  );
141
- const W = (t, e) => {
142
- const s = ({ class: n = "", className: r = "", children: o, ...i }) => K(
143
- Ae,
181
+ const ee = (t, e) => {
182
+ const n = ({ class: s = "", className: r = "", children: l, ...a }) => Q(
183
+ Qe,
144
184
  {
145
- ...i,
185
+ ...a,
146
186
  iconNode: e,
147
- class: Pe(
148
- `lucide-${Q(ee(t))}`,
149
- `lucide-${Q(t)}`,
150
- n,
187
+ class: We(
188
+ `lucide-${re(oe(t))}`,
189
+ `lucide-${re(t)}`,
190
+ s,
151
191
  r
152
192
  )
153
193
  },
154
- o
194
+ l
155
195
  );
156
- return s.displayName = ee(t), s;
196
+ return n.displayName = oe(t), n;
157
197
  };
158
- const Me = W("eye", [
198
+ const et = ee("eye", [
159
199
  [
160
200
  "path",
161
201
  {
@@ -165,7 +205,7 @@ const Me = W("eye", [
165
205
  ],
166
206
  ["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
167
207
  ]);
168
- const qe = W("eye-off", [
208
+ const tt = ee("eye-off", [
169
209
  [
170
210
  "path",
171
211
  {
@@ -183,157 +223,157 @@ const qe = W("eye-off", [
183
223
  ],
184
224
  ["path", { d: "m2 2 20 20", key: "1ooewy" }]
185
225
  ]);
186
- const Te = W("x", [
226
+ const nt = ee("x", [
187
227
  ["path", { d: "M18 6 6 18", key: "1bl5f8" }],
188
228
  ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
189
- ]), F = {
229
+ ]), K = {
190
230
  cancel: "Cancel",
191
231
  cancelDescription: "Dismiss this dialog",
192
232
  closeDescription: "Close this dialog"
193
233
  };
194
- function ze(t) {
195
- const e = t.split("+"), s = e.at(-1) ?? "", n = e.slice(0, -1).map((r) => r.toLowerCase());
234
+ function st(t) {
235
+ const e = t.split("+"), n = e.at(-1) ?? "", s = e.slice(0, -1).map((r) => r.toLowerCase());
196
236
  return {
197
- key: s.toLowerCase(),
198
- ctrl: n.includes("ctrl"),
199
- shift: n.includes("shift"),
200
- alt: n.includes("alt")
237
+ key: n.toLowerCase(),
238
+ ctrl: s.includes("ctrl"),
239
+ shift: s.includes("shift"),
240
+ alt: s.includes("alt")
201
241
  };
202
242
  }
203
- function O(t) {
243
+ function V(t) {
204
244
  return `(${t})`;
205
245
  }
206
- const re = (t) => {
246
+ const ie = (t) => {
207
247
  const {
208
248
  open: e,
209
- title: s,
210
- alert: n,
249
+ title: n,
250
+ alert: s,
211
251
  draggable: r,
212
- onDismiss: o,
213
- onBackdropClick: i,
214
- message: a,
215
- defaultAction: c,
252
+ onDismiss: l,
253
+ onBackdropClick: a,
254
+ message: c,
255
+ defaultAction: i,
216
256
  actions: d,
217
257
  cancelLabel: h,
218
258
  onCancel: u,
219
259
  focusCancel: p,
220
260
  children: _,
221
261
  class: b
222
- } = t, y = H(null), v = H(null), w = H(null), N = H(null), x = L(), { isDragging: I, reset: j } = ye(v, y, e && !!r);
223
- A(() => {
224
- const f = y.current;
225
- f && (e && !f.open ? (f.showModal(), p && N.current ? N.current.focus() : w.current && w.current.focus()) : !e && f.open && (f.close(), j()));
226
- }, [e, p, j]), A(() => {
227
- const f = y.current;
262
+ } = t, v = q(null), w = q(null), x = q(null), E = q(null), $ = L(), { isDragging: N, reset: B } = Ae(w, v, e && !!r);
263
+ k(() => {
264
+ const f = v.current;
265
+ f && (e && !f.open ? (f.showModal(), p && E.current ? E.current.focus() : x.current && x.current.focus()) : !e && f.open && (f.close(), B()));
266
+ }, [e, p, B]), k(() => {
267
+ const f = v.current;
228
268
  if (!f)
229
269
  return;
230
- const $ = (S) => {
231
- S.preventDefault(), o();
270
+ const C = (A) => {
271
+ A.preventDefault(), l();
232
272
  };
233
- return f.addEventListener("cancel", $), () => f.removeEventListener("cancel", $);
234
- }, [o]), A(() => {
235
- const f = y.current;
273
+ return f.addEventListener("cancel", C), () => f.removeEventListener("cancel", C);
274
+ }, [l]), k(() => {
275
+ const f = v.current;
236
276
  if (!f || !e)
237
277
  return;
238
- const $ = [...d ?? [], ...c ? [c] : []];
239
- if ($.length === 0)
278
+ const C = [...d ?? [], ...i ? [i] : []];
279
+ if (C.length === 0)
240
280
  return;
241
- const S = $.map((E) => ({
242
- parsed: ze(E.shortcut),
243
- handler: E.onClick
244
- })), Z = (E) => {
245
- for (const { parsed: T, handler: oe } of S)
246
- if (E.key.toLowerCase() === T.key && E.ctrlKey === T.ctrl && E.shiftKey === T.shift && E.altKey === T.alt) {
247
- E.preventDefault(), oe();
281
+ const A = C.map((P) => ({
282
+ parsed: st(P.shortcut),
283
+ handler: P.onClick
284
+ })), ne = (P) => {
285
+ for (const { parsed: R, handler: be } of A)
286
+ if (P.key.toLowerCase() === R.key && P.ctrlKey === R.ctrl && P.shiftKey === R.shift && P.altKey === R.alt) {
287
+ P.preventDefault(), be();
248
288
  return;
249
289
  }
250
290
  };
251
- return f.addEventListener("keydown", Z), () => f.removeEventListener("keydown", Z);
252
- }, [e, d, c]), A(() => {
253
- const f = y.current;
254
- if (!f || !e || !i)
291
+ return f.addEventListener("keydown", ne), () => f.removeEventListener("keydown", ne);
292
+ }, [e, d, i]), k(() => {
293
+ const f = v.current;
294
+ if (!f || !e || !a)
255
295
  return;
256
- const $ = (S) => {
257
- S.target === f && i();
296
+ const C = (A) => {
297
+ A.target === f && a();
258
298
  };
259
- return f.addEventListener("click", $), () => f.removeEventListener("click", $);
260
- }, [e, i]);
261
- const P = c || u || d && d.length > 0;
262
- return /* @__PURE__ */ l(
299
+ return f.addEventListener("click", C), () => f.removeEventListener("click", C);
300
+ }, [e, a]);
301
+ const S = i || u || d && d.length > 0;
302
+ return /* @__PURE__ */ o(
263
303
  "dialog",
264
304
  {
265
- ref: y,
266
- class: m(k.dialog, b),
267
- "aria-labelledby": x,
268
- role: n ? "alertdialog" : void 0,
269
- children: /* @__PURE__ */ g("div", { class: k.panel, children: [
305
+ ref: v,
306
+ class: m(y.dialog, b),
307
+ "aria-labelledby": $,
308
+ role: s ? "alertdialog" : void 0,
309
+ children: /* @__PURE__ */ g("div", { class: y.panel, children: [
270
310
  /* @__PURE__ */ g(
271
311
  "header",
272
312
  {
273
- ref: v,
274
- class: m(k.header, r && k.draggable, I && k.dragging),
313
+ ref: w,
314
+ class: m(y.header, r && y.draggable, N && y.dragging),
275
315
  children: [
276
- /* @__PURE__ */ l("h2", { id: x, class: k.title, children: s }),
277
- !n && /* @__PURE__ */ l(
316
+ /* @__PURE__ */ o("h2", { id: $, class: y.title, children: n }),
317
+ !s && /* @__PURE__ */ o(
278
318
  "button",
279
319
  {
280
320
  type: "button",
281
- class: k.close,
282
- title: F.closeDescription,
283
- onClick: o,
284
- children: /* @__PURE__ */ l(Te, { size: "1.5em", "aria-hidden": "true" })
321
+ class: y.close,
322
+ title: K.closeDescription,
323
+ onClick: l,
324
+ children: /* @__PURE__ */ o(nt, { size: "1.5em", "aria-hidden": "true" })
285
325
  }
286
326
  )
287
327
  ]
288
328
  }
289
329
  ),
290
- /* @__PURE__ */ g("div", { class: k.body, children: [
291
- a && /* @__PURE__ */ l("p", { class: k.message, children: a }),
330
+ /* @__PURE__ */ g("div", { class: y.body, children: [
331
+ c && /* @__PURE__ */ o("p", { class: y.message, children: c }),
292
332
  _
293
333
  ] }),
294
- P && /* @__PURE__ */ g("footer", { class: k.footer, children: [
334
+ S && /* @__PURE__ */ g("footer", { class: y.footer, children: [
295
335
  d?.map((f) => /* @__PURE__ */ g(
296
336
  "button",
297
337
  {
298
338
  type: "button",
299
- class: k.action,
339
+ class: y.action,
300
340
  title: f.description,
301
341
  onClick: f.onClick,
302
342
  children: [
303
343
  f.label,
304
344
  " ",
305
- O(f.shortcut)
345
+ V(f.shortcut)
306
346
  ]
307
347
  },
308
348
  f.label
309
349
  )),
310
- c && /* @__PURE__ */ g(
350
+ i && /* @__PURE__ */ g(
311
351
  "button",
312
352
  {
313
- ref: w,
353
+ ref: x,
314
354
  type: "button",
315
- class: m(k.action, k.primary),
316
- title: c.description,
317
- onClick: c.onClick,
355
+ class: m(y.action, y.primary),
356
+ title: i.description,
357
+ onClick: i.onClick,
318
358
  children: [
319
- c.label,
359
+ i.label,
320
360
  " ",
321
- O(c.shortcut)
361
+ V(i.shortcut)
322
362
  ]
323
363
  }
324
364
  ),
325
365
  u && /* @__PURE__ */ g(
326
366
  "button",
327
367
  {
328
- ref: N,
368
+ ref: E,
329
369
  type: "button",
330
- class: k.action,
331
- title: F.cancelDescription,
370
+ class: y.action,
371
+ title: K.cancelDescription,
332
372
  onClick: u,
333
373
  children: [
334
- h ?? F.cancel,
374
+ h ?? K.cancel,
335
375
  " ",
336
- O("Esc")
376
+ V("Esc")
337
377
  ]
338
378
  }
339
379
  )
@@ -341,592 +381,651 @@ const re = (t) => {
341
381
  ] })
342
382
  }
343
383
  );
344
- }, Wt = (t) => {
384
+ }, gn = (t) => {
345
385
  const {
346
386
  open: e,
347
- title: s,
348
- onClose: n,
387
+ title: n,
388
+ onClose: s,
349
389
  message: r,
350
- defaultAction: o,
351
- actions: i,
352
- draggable: a = !0,
353
- children: c,
390
+ defaultAction: l,
391
+ actions: a,
392
+ draggable: c = !0,
393
+ children: i,
354
394
  class: d
355
395
  } = t;
356
- return /* @__PURE__ */ l(
357
- re,
396
+ return /* @__PURE__ */ o(
397
+ ie,
358
398
  {
359
399
  open: e,
360
- title: s,
361
- draggable: a,
362
- onDismiss: n,
363
- onBackdropClick: n,
400
+ title: n,
401
+ draggable: c,
402
+ onDismiss: s,
403
+ onBackdropClick: s,
364
404
  message: r,
365
- defaultAction: o,
366
- actions: i,
405
+ defaultAction: l,
406
+ actions: a,
367
407
  class: d,
368
- children: c
408
+ children: i
369
409
  }
370
410
  );
371
- }, Re = "_link_7wgic_1 _link_4u8pk_22 _focus-ring_4u8pk_3", Fe = {
372
- link: Re
373
- }, Gt = (t) => {
374
- const { href: e, fileName: s, label: n, class: r } = t;
375
- return /* @__PURE__ */ l("a", { href: e, download: s, class: m(Fe.link, r), children: n });
376
- }, Oe = "_form_jr324_1", Xe = "_actions_jr324_6", Ye = "_status_jr324_13", X = {
377
- form: Oe,
378
- actions: Xe,
379
- status: Ye
380
- }, Zt = (t) => {
411
+ }, rt = "_link_7wgic_1 _link_4u8pk_22 _focus-ring_4u8pk_3", ot = {
412
+ link: rt
413
+ }, mn = (t) => {
414
+ const { href: e, fileName: n, label: s, class: r } = t;
415
+ return /* @__PURE__ */ o("a", { href: e, download: n, class: m(ot.link, r), children: s });
416
+ }, lt = "_form_jr324_1", at = "_actions_jr324_6", ct = "_status_jr324_13", W = {
417
+ form: lt,
418
+ actions: at,
419
+ status: ct
420
+ }, bn = (t) => {
381
421
  const {
382
422
  onSubmit: e,
383
- submitLabel: s = "Submit",
384
- resetLabel: n,
423
+ submitLabel: n = "Submit",
424
+ resetLabel: s,
385
425
  status: r,
386
- children: o,
387
- class: i
426
+ children: l,
427
+ class: a
388
428
  } = t;
389
429
  return /* @__PURE__ */ g(
390
430
  "form",
391
431
  {
392
- class: m(X.form, i),
393
- onSubmit: (a) => {
394
- a.preventDefault();
395
- const c = new FormData(a.currentTarget);
396
- e(c);
432
+ class: m(W.form, a),
433
+ onSubmit: (c) => {
434
+ c.preventDefault();
435
+ const i = new FormData(c.currentTarget);
436
+ e(i);
397
437
  },
398
438
  children: [
399
- o,
400
- /* @__PURE__ */ g("div", { class: X.actions, children: [
401
- /* @__PURE__ */ l(J, { type: "submit", label: s }),
402
- n && /* @__PURE__ */ l(J, { type: "reset", label: n })
439
+ l,
440
+ /* @__PURE__ */ g("div", { class: W.actions, children: [
441
+ /* @__PURE__ */ o(se, { type: "submit", label: n }),
442
+ s && /* @__PURE__ */ o(se, { type: "reset", label: s })
403
443
  ] }),
404
- r && /* @__PURE__ */ l("output", { class: X.status, children: r })
444
+ r && /* @__PURE__ */ o("output", { class: W.status, children: r })
405
445
  ]
406
446
  }
407
447
  );
408
- }, Ue = "_field_7l9ux_1", Ke = "_label_7l9ux_8", Ve = "_required_7l9ux_12", We = "_error_7l9ux_16 _field-error_4u8pk_36", z = {
409
- field: Ue,
410
- label: Ke,
411
- required: Ve,
412
- error: We
413
- }, q = (t) => {
414
- const { for: e, label: s, required: n, error: r, errorId: o, children: i, class: a } = t;
415
- return /* @__PURE__ */ g("div", { class: m(z.field, a), children: [
416
- /* @__PURE__ */ g("label", { class: z.label, for: e, children: [
417
- s,
448
+ }, de = D(document.title), ue = D(""), pe = D(""), _e = D(""), he = D(""), fe = D("");
449
+ H(() => {
450
+ document.title = de.value;
451
+ });
452
+ function X(t, e, n, s) {
453
+ let r = document.querySelector(t);
454
+ s ? (r || (r = document.createElement("meta"), r.setAttribute(e, n), document.head.appendChild(r)), r.content = s) : r && r.remove();
455
+ }
456
+ function it(t) {
457
+ let e = document.querySelector('link[rel="canonical"]');
458
+ t ? (e || (e = document.createElement("link"), e.rel = "canonical", document.head.appendChild(e)), e.href = t) : e && e.remove();
459
+ }
460
+ H(() => X('meta[name="description"]', "name", "description", ue.value));
461
+ H(() => it(pe.value));
462
+ H(() => X('meta[property="og:title"]', "property", "og:title", _e.value));
463
+ H(
464
+ () => X('meta[property="og:description"]', "property", "og:description", he.value)
465
+ );
466
+ H(() => X('meta[property="og:image"]', "property", "og:image", fe.value));
467
+ const vn = (t) => {
468
+ const {
469
+ title: e,
470
+ description: n,
471
+ canonical: s,
472
+ ogTitle: r,
473
+ ogDescription: l,
474
+ ogImage: a
475
+ } = t;
476
+ return k(() => {
477
+ e !== void 0 && (de.value = e);
478
+ }, [e]), k(() => {
479
+ n !== void 0 && (ue.value = n);
480
+ }, [n]), k(() => {
481
+ s !== void 0 && (pe.value = s);
482
+ }, [s]), k(() => {
483
+ r !== void 0 && (_e.value = r);
484
+ }, [r]), k(() => {
485
+ l !== void 0 && (he.value = l);
486
+ }, [l]), k(() => {
487
+ a !== void 0 && (fe.value = a);
488
+ }, [a]), null;
489
+ }, dt = "_field_7l9ux_1", ut = "_label_7l9ux_8", pt = "_required_7l9ux_12", _t = "_error_7l9ux_16 _field-error_4u8pk_36", O = {
490
+ field: dt,
491
+ label: ut,
492
+ required: pt,
493
+ error: _t
494
+ }, z = (t) => {
495
+ const { for: e, label: n, required: s, error: r, errorId: l, children: a, class: c } = t;
496
+ return /* @__PURE__ */ g("div", { class: m(O.field, c), children: [
497
+ /* @__PURE__ */ g("label", { class: O.label, for: e, children: [
498
+ n,
418
499
  ":",
419
- n && /* @__PURE__ */ g("span", { class: z.required, "aria-hidden": "true", children: [
500
+ s && /* @__PURE__ */ g("span", { class: O.required, "aria-hidden": "true", children: [
420
501
  " ",
421
502
  "*"
422
503
  ] })
423
504
  ] }),
424
- i,
425
- r && /* @__PURE__ */ l("p", { id: o, class: z.error, role: "alert", children: r })
505
+ a,
506
+ r && /* @__PURE__ */ o("p", { id: l, class: O.error, role: "alert", children: r })
426
507
  ] });
427
- }, Ge = "_input_1j10x_1 _text-input_4u8pk_13 _focus-ring_4u8pk_3 _disabled_4u8pk_8", Ze = {
428
- input: Ge
429
- }, Je = {
508
+ }, ht = "_input_1j10x_1 _text-input_4u8pk_13 _focus-ring_4u8pk_3 _disabled_4u8pk_8", ft = {
509
+ input: ht
510
+ }, gt = {
430
511
  email: "email",
431
512
  tel: "tel",
432
513
  url: "url"
433
- }, Jt = (t) => {
514
+ }, yn = (t) => {
434
515
  const {
435
516
  label: e,
436
- name: s,
437
- type: n = "text",
517
+ name: n,
518
+ type: s = "text",
438
519
  value: r,
439
- placeholder: o,
440
- maxLength: i,
441
- autocomplete: a,
442
- readOnly: c,
520
+ placeholder: l,
521
+ maxLength: a,
522
+ autocomplete: c,
523
+ readOnly: i,
443
524
  pattern: d,
444
525
  required: h,
445
526
  disabled: u,
446
527
  error: p,
447
528
  onInput: _,
448
529
  class: b
449
- } = t, y = L(), v = `${y}-error`;
450
- return /* @__PURE__ */ l(
451
- q,
530
+ } = t, v = L(), w = `${v}-error`;
531
+ return /* @__PURE__ */ o(
532
+ z,
452
533
  {
453
534
  label: e,
454
- for: y,
535
+ for: v,
455
536
  required: h,
456
537
  error: p,
457
- errorId: v,
538
+ errorId: w,
458
539
  class: b,
459
- children: /* @__PURE__ */ l(
540
+ children: /* @__PURE__ */ o(
460
541
  "input",
461
542
  {
462
- id: y,
463
- class: Ze.input,
464
- type: n,
465
- name: s,
543
+ id: v,
544
+ class: ft.input,
545
+ type: s,
546
+ name: n,
466
547
  value: r,
467
- placeholder: o,
468
- maxLength: i,
469
- autoComplete: a ?? Je[n],
470
- readOnly: c,
548
+ placeholder: l,
549
+ maxLength: a,
550
+ autoComplete: c ?? gt[s],
551
+ readOnly: i,
471
552
  pattern: d,
472
553
  required: h,
473
554
  disabled: u,
474
555
  "aria-invalid": !!p || void 0,
475
- "aria-describedby": D(p && v),
476
- onInput: _ && ((w) => _(w.target.value))
556
+ "aria-describedby": j(p && w),
557
+ onInput: _ && ((x) => _(x.target.value))
477
558
  }
478
559
  )
479
560
  }
480
561
  );
481
- }, G = V(window.location.pathname), le = V(window.location.hash.slice(1));
482
- function Qe(t) {
562
+ }, te = D(window.location.pathname), ge = D(window.location.hash.slice(1));
563
+ function mt(t) {
483
564
  const e = t.indexOf("#");
484
- let s = "", n = t;
485
- e >= 0 && (s = t.slice(e + 1), n = t.slice(0, e));
486
- const r = n.indexOf("?");
487
- let o = "", i = n;
488
- return r >= 0 && (o = n.slice(r), i = n.slice(0, r)), { pathname: i || "/", search: o, hash: s };
565
+ let n = "", s = t;
566
+ e >= 0 && (n = t.slice(e + 1), s = t.slice(0, e));
567
+ const r = s.indexOf("?");
568
+ let l = "", a = s;
569
+ return r >= 0 && (l = s.slice(r), a = s.slice(0, r)), { pathname: a || "/", search: l, hash: n };
489
570
  }
490
- function et(t, e) {
491
- const { pathname: s, search: n, hash: r } = Qe(t), o = s + n + (r ? `#${r}` : "");
492
- e?.replace ? history.replaceState(null, "", o) : history.pushState(null, "", o), G.value = s, le.value = r;
571
+ function bt(t, e) {
572
+ const { pathname: n, search: s, hash: r } = mt(t), l = n + s + (r ? `#${r}` : "");
573
+ e?.replace ? history.replaceState(null, "", l) : history.pushState(null, "", l), te.value = n, ge.value = r;
493
574
  }
494
575
  window.addEventListener("popstate", () => {
495
- G.value = window.location.pathname, le.value = window.location.hash.slice(1);
576
+ te.value = window.location.pathname, ge.value = window.location.hash.slice(1);
496
577
  });
497
- const tt = "_link_7wgic_1 _link_4u8pk_22 _focus-ring_4u8pk_3", te = {
498
- link: tt
578
+ const vt = "_link_7wgic_1 _link_4u8pk_22 _focus-ring_4u8pk_3", le = {
579
+ link: vt
499
580
  };
500
- function nt(t) {
581
+ function yt(t) {
501
582
  try {
502
583
  return new URL(t, window.location.href).origin !== window.location.origin;
503
584
  } catch {
504
585
  return !1;
505
586
  }
506
587
  }
507
- const Qt = (t) => {
508
- const { href: e, children: s, external: n, class: r } = t;
509
- return n ?? nt(e) ? /* @__PURE__ */ l("a", { href: e, class: m(te.link, r), rel: "noopener noreferrer", children: s }) : /* @__PURE__ */ l(
588
+ const kn = (t) => {
589
+ const { href: e, children: n, external: s, class: r } = t;
590
+ return s ?? yt(e) ? /* @__PURE__ */ o("a", { href: e, class: m(le.link, r), rel: "noopener noreferrer", children: n }) : /* @__PURE__ */ o(
510
591
  "a",
511
592
  {
512
593
  href: e,
513
- class: m(te.link, r),
514
- onClick: (i) => {
515
- i.preventDefault(), et(e);
594
+ class: m(le.link, r),
595
+ onClick: (a) => {
596
+ a.preventDefault(), bt(e);
516
597
  },
517
- children: s
598
+ children: n
518
599
  }
519
600
  );
520
- }, en = (t) => {
601
+ }, wn = (t) => {
521
602
  const {
522
603
  open: e,
523
- title: s,
524
- onCancel: n,
604
+ title: n,
605
+ onCancel: s,
525
606
  cancelLabel: r,
526
- message: o,
527
- defaultAction: i,
528
- actions: a,
529
- focusCancel: c,
607
+ message: l,
608
+ defaultAction: a,
609
+ actions: c,
610
+ focusCancel: i,
530
611
  draggable: d = !1,
531
612
  children: h,
532
613
  class: u
533
614
  } = t;
534
- return /* @__PURE__ */ l(
535
- re,
615
+ return /* @__PURE__ */ o(
616
+ ie,
536
617
  {
537
618
  open: e,
538
- title: s,
619
+ title: n,
539
620
  alert: !0,
540
621
  draggable: d,
541
- onDismiss: n,
542
- onCancel: n,
622
+ onDismiss: s,
623
+ onCancel: s,
543
624
  cancelLabel: r,
544
- message: o,
545
- defaultAction: i,
546
- actions: a,
547
- focusCancel: c,
625
+ message: l,
626
+ defaultAction: a,
627
+ actions: c,
628
+ focusCancel: i,
548
629
  class: u,
549
630
  children: h
550
631
  }
551
632
  );
552
- }, st = "_nav_778nl_1", rt = "_title_778nl_6", ne = {
553
- nav: st,
554
- title: rt
555
- }, tn = (t) => {
556
- const { title: e, children: s, class: n } = t, r = L();
557
- return /* @__PURE__ */ g("nav", { class: m(ne.nav, n), "aria-labelledby": e ? r : void 0, children: [
558
- e && /* @__PURE__ */ l("h2", { id: r, class: ne.title, children: e }),
559
- s
633
+ }, kt = "_nav_778nl_1", wt = "_title_778nl_6", ae = {
634
+ nav: kt,
635
+ title: wt
636
+ }, xn = (t) => {
637
+ const { title: e, children: n, class: s } = t, r = L();
638
+ return /* @__PURE__ */ g("nav", { class: m(ae.nav, s), "aria-labelledby": e ? r : void 0, children: [
639
+ e && /* @__PURE__ */ o("h2", { id: r, class: ae.title, children: e }),
640
+ n
560
641
  ] });
561
- }, lt = "_input_1j10x_1 _text-input_4u8pk_13 _focus-ring_4u8pk_3 _disabled_4u8pk_8", ot = {
562
- input: lt
563
- }, nn = (t) => {
642
+ }, xt = "_input_1j10x_1 _text-input_4u8pk_13 _focus-ring_4u8pk_3 _disabled_4u8pk_8", $t = {
643
+ input: xt
644
+ }, $n = (t) => {
564
645
  const {
565
646
  label: e,
566
- name: s,
567
- min: n,
647
+ name: n,
648
+ min: s,
568
649
  max: r,
569
- step: o,
570
- value: i,
571
- placeholder: a,
572
- required: c,
650
+ step: l,
651
+ value: a,
652
+ placeholder: c,
653
+ required: i,
573
654
  disabled: d,
574
655
  error: h,
575
656
  onInput: u,
576
657
  class: p
577
658
  } = t, _ = L(), b = `${_}-error`;
578
- return /* @__PURE__ */ l(
579
- q,
659
+ return /* @__PURE__ */ o(
660
+ z,
580
661
  {
581
662
  label: e,
582
663
  for: _,
583
- required: c,
664
+ required: i,
584
665
  error: h,
585
666
  errorId: b,
586
667
  class: p,
587
- children: /* @__PURE__ */ l(
668
+ children: /* @__PURE__ */ o(
588
669
  "input",
589
670
  {
590
671
  id: _,
591
- class: ot.input,
672
+ class: $t.input,
592
673
  type: "number",
593
- name: s,
594
- min: n,
674
+ name: n,
675
+ min: s,
595
676
  max: r,
596
- step: o,
597
- value: i,
598
- placeholder: a,
599
- required: c,
677
+ step: l,
678
+ value: a,
679
+ placeholder: c,
680
+ required: i,
600
681
  disabled: d,
601
682
  "aria-invalid": !!h || void 0,
602
- "aria-describedby": D(h && b),
603
- onInput: u && ((y) => u(y.target.valueAsNumber))
683
+ "aria-describedby": j(h && b),
684
+ onInput: u && ((v) => u(v.target.valueAsNumber))
604
685
  }
605
686
  )
606
687
  }
607
688
  );
608
- }, at = "_wrapper_16zfv_1", ct = "_input_16zfv_5 _text-input_4u8pk_13 _focus-ring_4u8pk_3 _disabled_4u8pk_8", it = "_toggle_16zfv_11 _focus-ring_4u8pk_3 _disabled_4u8pk_8", Y = {
609
- wrapper: at,
610
- input: ct,
611
- toggle: it
612
- }, dt = {
689
+ }, Ct = "_wrapper_16zfv_1", It = "_input_16zfv_5 _text-input_4u8pk_13 _focus-ring_4u8pk_3 _disabled_4u8pk_8", Lt = "_toggle_16zfv_11 _focus-ring_4u8pk_3 _disabled_4u8pk_8", G = {
690
+ wrapper: Ct,
691
+ input: It,
692
+ toggle: Lt
693
+ }, Nt = {
613
694
  current: "current-password",
614
695
  new: "new-password"
615
- }, sn = (t) => {
696
+ }, Cn = (t) => {
616
697
  const {
617
698
  label: e,
618
- name: s,
619
- purpose: n,
699
+ name: n,
700
+ purpose: s,
620
701
  value: r,
621
- placeholder: o,
622
- required: i,
623
- disabled: a,
624
- error: c,
702
+ placeholder: l,
703
+ required: a,
704
+ disabled: c,
705
+ error: i,
625
706
  onInput: d,
626
707
  class: h
627
708
  } = t, u = L(), p = `${u}-error`, _ = M(!1);
628
- return /* @__PURE__ */ l(
629
- q,
709
+ return /* @__PURE__ */ o(
710
+ z,
630
711
  {
631
712
  label: e,
632
713
  for: u,
633
- required: i,
634
- error: c,
714
+ required: a,
715
+ error: i,
635
716
  errorId: p,
636
717
  class: h,
637
- children: /* @__PURE__ */ g("div", { class: Y.wrapper, children: [
638
- /* @__PURE__ */ l(
718
+ children: /* @__PURE__ */ g("div", { class: G.wrapper, children: [
719
+ /* @__PURE__ */ o(
639
720
  "input",
640
721
  {
641
722
  id: u,
642
- class: Y.input,
723
+ class: G.input,
643
724
  type: _.value ? "text" : "password",
644
- name: s,
725
+ name: n,
645
726
  value: r,
646
- placeholder: o,
647
- autoComplete: dt[n],
648
- required: i,
649
- disabled: a,
650
- "aria-invalid": !!c || void 0,
651
- "aria-describedby": D(c && p),
727
+ placeholder: l,
728
+ autoComplete: Nt[s],
729
+ required: a,
730
+ disabled: c,
731
+ "aria-invalid": !!i || void 0,
732
+ "aria-describedby": j(i && p),
652
733
  onInput: d && ((b) => d(b.target.value))
653
734
  }
654
735
  ),
655
- /* @__PURE__ */ l(
736
+ /* @__PURE__ */ o(
656
737
  "button",
657
738
  {
658
739
  type: "button",
659
- class: Y.toggle,
660
- disabled: a,
740
+ class: G.toggle,
741
+ disabled: c,
661
742
  "aria-label": _.value ? "Hide password" : "Show password",
662
743
  onClick: () => {
663
744
  _.value = !_.value;
664
745
  },
665
- children: _.value ? /* @__PURE__ */ l(qe, { size: "1em" }) : /* @__PURE__ */ l(Me, { size: "1em" })
746
+ children: _.value ? /* @__PURE__ */ o(tt, { size: "1em" }) : /* @__PURE__ */ o(et, { size: "1em" })
666
747
  }
667
748
  )
668
749
  ] })
669
750
  }
670
751
  );
671
- }, ut = "_fieldset_lymkd_1", pt = "_legend_lymkd_6", _t = "_option_lymkd_11", ht = "_input_lymkd_19 _check-input_4u8pk_32 _focus-ring_4u8pk_3", ft = "_error_lymkd_23 _field-error_4u8pk_36", B = {
672
- fieldset: ut,
673
- legend: pt,
674
- option: _t,
675
- input: ht,
676
- error: ft
677
- }, rn = (t) => {
752
+ }, Et = "_fieldset_lymkd_1", Pt = "_legend_lymkd_6", Dt = "_option_lymkd_11", jt = "_input_lymkd_19 _check-input_4u8pk_32 _focus-ring_4u8pk_3", Bt = "_error_lymkd_23 _field-error_4u8pk_36", T = {
753
+ fieldset: Et,
754
+ legend: Pt,
755
+ option: Dt,
756
+ input: jt,
757
+ error: Bt
758
+ }, In = (t) => {
678
759
  const {
679
760
  legend: e,
680
- name: s,
681
- options: n,
761
+ name: n,
762
+ options: s,
682
763
  value: r,
683
- required: o,
684
- disabled: i,
685
- error: a,
686
- onChange: c,
764
+ required: l,
765
+ disabled: a,
766
+ error: c,
767
+ onChange: i,
687
768
  class: d
688
769
  } = t, h = L(), u = `${h}-error`;
689
770
  return /* @__PURE__ */ g(
690
771
  "fieldset",
691
772
  {
692
- class: m(B.fieldset, d),
693
- "aria-invalid": !!a || void 0,
694
- "aria-describedby": D(a && u),
773
+ class: m(T.fieldset, d),
774
+ "aria-invalid": !!c || void 0,
775
+ "aria-describedby": j(c && u),
695
776
  children: [
696
- /* @__PURE__ */ l("legend", { class: B.legend, children: e }),
697
- n.map((p) => {
777
+ /* @__PURE__ */ o("legend", { class: T.legend, children: e }),
778
+ s.map((p) => {
698
779
  const _ = `${h}-${p.value}`;
699
- return /* @__PURE__ */ g("div", { class: B.option, children: [
700
- /* @__PURE__ */ l(
780
+ return /* @__PURE__ */ g("div", { class: T.option, children: [
781
+ /* @__PURE__ */ o(
701
782
  "input",
702
783
  {
703
784
  id: _,
704
- class: B.input,
785
+ class: T.input,
705
786
  type: "radio",
706
- name: s,
787
+ name: n,
707
788
  value: p.value,
708
789
  checked: r === p.value,
709
- required: o,
710
- disabled: i,
711
- onChange: c && (() => c(p.value))
790
+ required: l,
791
+ disabled: a,
792
+ onChange: i && (() => i(p.value))
712
793
  }
713
794
  ),
714
- /* @__PURE__ */ l("label", { for: _, children: p.label })
795
+ /* @__PURE__ */ o("label", { for: _, children: p.label })
715
796
  ] }, p.value);
716
797
  }),
717
- a && /* @__PURE__ */ l("p", { id: u, class: B.error, role: "alert", children: a })
798
+ c && /* @__PURE__ */ o("p", { id: u, class: T.error, role: "alert", children: c })
718
799
  ]
719
800
  }
720
801
  );
721
- }, ln = (t) => {
722
- const { path: e, children: s } = t, n = G.value;
802
+ }, Ln = (t) => {
803
+ const { path: e, children: n } = t, s = te.value;
723
804
  if (e.endsWith("/*")) {
724
805
  const r = e.slice(0, -1);
725
- if (!n.startsWith(r) && n !== r.slice(0, -1))
806
+ if (!s.startsWith(r) && s !== r.slice(0, -1))
726
807
  return null;
727
- } else if (n !== e)
808
+ } else if (s !== e)
728
809
  return null;
729
- return /* @__PURE__ */ l(ae, { children: s });
730
- }, gt = "_section_4nogy_1", mt = {
731
- section: gt
732
- }, on = (t) => {
733
- const { title: e, level: s = 2, children: n, class: r } = t, o = L(), i = `h${s}`;
734
- return /* @__PURE__ */ g("section", { class: m(mt.section, r), "aria-labelledby": o, children: [
735
- /* @__PURE__ */ l(i, { id: o, children: e }),
736
- n
810
+ return /* @__PURE__ */ o(ve, { children: n });
811
+ }, St = "_section_4nogy_1", Ht = {
812
+ section: St
813
+ }, Nn = (t) => {
814
+ const { title: e, level: n = 2, children: s, class: r } = t, l = L(), a = `h${n}`;
815
+ return /* @__PURE__ */ g("section", { class: m(Ht.section, r), "aria-labelledby": l, children: [
816
+ /* @__PURE__ */ o(a, { id: l, children: e }),
817
+ s
737
818
  ] });
738
- }, bt = "_select_1cxnx_1 _text-input_4u8pk_13 _focus-ring_4u8pk_3 _disabled_4u8pk_8", yt = {
739
- select: bt
740
- }, kt = (t) => "options" in t, an = (t) => {
819
+ }, At = "_select_1cxnx_1 _text-input_4u8pk_13 _focus-ring_4u8pk_3 _disabled_4u8pk_8", Tt = {
820
+ select: At
821
+ }, qt = (t) => "options" in t, En = (t) => {
741
822
  const {
742
823
  label: e,
743
- name: s,
744
- value: n,
824
+ name: n,
825
+ value: s,
745
826
  placeholder: r,
746
- options: o,
747
- required: i,
748
- disabled: a,
749
- error: c,
827
+ options: l,
828
+ required: a,
829
+ disabled: c,
830
+ error: i,
750
831
  onChange: d,
751
832
  class: h
752
833
  } = t, u = L(), p = `${u}-error`;
753
- return /* @__PURE__ */ l(
754
- q,
834
+ return /* @__PURE__ */ o(
835
+ z,
755
836
  {
756
837
  label: e,
757
838
  for: u,
758
- required: i,
759
- error: c,
839
+ required: a,
840
+ error: i,
760
841
  errorId: p,
761
842
  class: h,
762
843
  children: /* @__PURE__ */ g(
763
844
  "select",
764
845
  {
765
846
  id: u,
766
- class: yt.select,
767
- name: s,
768
- value: n,
769
- required: i,
770
- disabled: a,
771
- "aria-invalid": !!c || void 0,
772
- "aria-describedby": D(c && p),
847
+ class: Tt.select,
848
+ name: n,
849
+ value: s,
850
+ required: a,
851
+ disabled: c,
852
+ "aria-invalid": !!i || void 0,
853
+ "aria-describedby": j(i && p),
773
854
  onChange: d && ((_) => d(_.target.value)),
774
855
  children: [
775
- r && /* @__PURE__ */ l("option", { value: "", disabled: !0, children: r }),
776
- o.map(
777
- (_) => kt(_) ? /* @__PURE__ */ l("optgroup", { label: _.label, children: _.options.map((b) => /* @__PURE__ */ l("option", { value: b.value, children: b.label }, b.value)) }, _.label) : /* @__PURE__ */ l("option", { value: _.value, children: _.label }, _.value)
856
+ r && /* @__PURE__ */ o("option", { value: "", disabled: !0, children: r }),
857
+ l.map(
858
+ (_) => qt(_) ? /* @__PURE__ */ o("optgroup", { label: _.label, children: _.options.map((b) => /* @__PURE__ */ o("option", { value: b.value, children: b.label }, b.value)) }, _.label) : /* @__PURE__ */ o("option", { value: _.value, children: _.label }, _.value)
778
859
  )
779
860
  ]
780
861
  }
781
862
  )
782
863
  }
783
864
  );
784
- }, vt = "_skip_xbsul_1 _focus-ring_4u8pk_3", wt = {
785
- skip: vt
786
- }, cn = (t) => {
787
- const { target: e = "#main", label: s = "Skip to main content", class: n } = t;
788
- return /* @__PURE__ */ l("a", { href: e, class: m(wt.skip, n), children: s });
789
- }, xt = "_table_185y9_1", $t = "_caption_185y9_6", Ct = "_captionHidden_185y9_12 _visually-hidden_4u8pk_42", Lt = "_headerCell_185y9_16", It = "_cell_185y9_17", Nt = "_head_185y9_16", Et = "_row_185y9_41", Dt = "_striped_185y9_45", jt = "_dense_185y9_53", C = {
790
- table: xt,
791
- caption: $t,
792
- captionHidden: Ct,
793
- headerCell: Lt,
794
- cell: It,
795
- head: Nt,
796
- row: Et,
797
- striped: Dt,
798
- dense: jt
799
- }, dn = (t) => {
865
+ }, Mt = "_skip_xbsul_1 _focus-ring_4u8pk_3", zt = {
866
+ skip: Mt
867
+ }, Pn = (t) => {
868
+ const { target: e = "#main", label: n = "Skip to main content", class: s } = t;
869
+ return /* @__PURE__ */ o("a", { href: e, class: m(zt.skip, s), children: n });
870
+ }, Rt = "_hidden_19nib_1 _visually-hidden_4u8pk_42", Ft = {
871
+ hidden: Rt
872
+ }, me = (t) => {
873
+ const { children: e } = t;
874
+ return /* @__PURE__ */ o("span", { class: Ft.hidden, children: e });
875
+ }, Ot = "_spinner_1ways_7", Xt = "_sm_1ways_18", Yt = "_lg_1ways_23", Z = {
876
+ spinner: Ot,
877
+ sm: Xt,
878
+ lg: Yt
879
+ }, Dn = (t) => {
880
+ const { label: e = "Loading…", size: n = "md", class: s } = t;
881
+ return /* @__PURE__ */ o(
882
+ "output",
883
+ {
884
+ class: m(Z.spinner, n === "sm" && Z.sm, n === "lg" && Z.lg, s),
885
+ children: /* @__PURE__ */ o(me, { children: e })
886
+ }
887
+ );
888
+ }, Ut = "_table_185y9_1", Kt = "_caption_185y9_6", Vt = "_captionHidden_185y9_12 _visually-hidden_4u8pk_42", Wt = "_headerCell_185y9_16", Gt = "_cell_185y9_17", Zt = "_head_185y9_16", Jt = "_row_185y9_41", Qt = "_striped_185y9_45", en = "_dense_185y9_53", I = {
889
+ table: Ut,
890
+ caption: Kt,
891
+ captionHidden: Vt,
892
+ headerCell: Wt,
893
+ cell: Gt,
894
+ head: Zt,
895
+ row: Jt,
896
+ striped: Qt,
897
+ dense: en
898
+ }, jn = (t) => {
800
899
  const {
801
900
  caption: e,
802
- headers: s,
803
- data: n,
901
+ headers: n,
902
+ data: s,
804
903
  rowHeader: r,
805
- striped: o,
806
- dense: i,
807
- captionHidden: a,
808
- class: c
904
+ striped: l,
905
+ dense: a,
906
+ captionHidden: c,
907
+ class: i
809
908
  } = t;
810
- return /* @__PURE__ */ g("table", { class: m(C.table, o && C.striped, i && C.dense, c), children: [
811
- /* @__PURE__ */ l("caption", { class: m(C.caption, a && C.captionHidden), children: e }),
812
- /* @__PURE__ */ l("thead", { class: C.head, children: /* @__PURE__ */ l("tr", { children: s.map((d, h) => /* @__PURE__ */ l("th", { class: C.headerCell, scope: "col", children: d }, `${d}-${h}`)) }) }),
813
- /* @__PURE__ */ l("tbody", { children: n.map((d, h) => /* @__PURE__ */ l("tr", { class: C.row, children: d.map(
814
- (u, p) => r && p === 0 ? /* @__PURE__ */ l("th", { class: C.headerCell, scope: "row", children: u }, `${s[p]}-${h}-${p}`) : /* @__PURE__ */ l("td", { class: C.cell, children: u }, `${s[p]}-${h}-${p}`)
909
+ return /* @__PURE__ */ g("table", { class: m(I.table, l && I.striped, a && I.dense, i), children: [
910
+ /* @__PURE__ */ o("caption", { class: m(I.caption, c && I.captionHidden), children: e }),
911
+ /* @__PURE__ */ o("thead", { class: I.head, children: /* @__PURE__ */ o("tr", { children: n.map((d, h) => /* @__PURE__ */ o("th", { class: I.headerCell, scope: "col", children: d }, `${d}-${h}`)) }) }),
912
+ /* @__PURE__ */ o("tbody", { children: s.map((d, h) => /* @__PURE__ */ o("tr", { class: I.row, children: d.map(
913
+ (u, p) => r && p === 0 ? /* @__PURE__ */ o("th", { class: I.headerCell, scope: "row", children: u }, `${n[p]}-${h}-${p}`) : /* @__PURE__ */ o("td", { class: I.cell, children: u }, `${n[p]}-${h}-${p}`)
815
914
  ) }, h)) })
816
915
  ] });
817
- }, Pt = "_hidden_19nib_1 _visually-hidden_4u8pk_42", St = {
818
- hidden: Pt
819
- }, Bt = (t) => {
820
- const { children: e } = t;
821
- return /* @__PURE__ */ l("span", { class: St.hidden, children: e });
822
- }, Ht = "_wrapper_1kyv1_1", At = "_textarea_1kyv1_6 _text-input_4u8pk_13 _focus-ring_4u8pk_3 _disabled_4u8pk_8", Mt = "_counter_1kyv1_11", U = {
823
- wrapper: Ht,
824
- textarea: At,
825
- counter: Mt
826
- }, se = [75, 90, 100], qt = 10;
827
- function Tt(t) {
828
- for (let e = se.length - 1; e >= 0; e--) {
829
- const s = se[e];
830
- if (s !== void 0 && t >= s)
831
- return s;
916
+ }, tn = "_wrapper_1kyv1_1", nn = "_textarea_1kyv1_6 _text-input_4u8pk_13 _focus-ring_4u8pk_3 _disabled_4u8pk_8", sn = "_counter_1kyv1_11", J = {
917
+ wrapper: tn,
918
+ textarea: nn,
919
+ counter: sn
920
+ }, ce = [75, 90, 100], rn = 10;
921
+ function on(t) {
922
+ for (let e = ce.length - 1; e >= 0; e--) {
923
+ const n = ce[e];
924
+ if (n !== void 0 && t >= n)
925
+ return n;
832
926
  }
833
927
  return 0;
834
928
  }
835
- const un = (t) => {
929
+ const Bn = (t) => {
836
930
  const {
837
931
  label: e,
838
- name: s,
839
- maxChars: n,
932
+ name: n,
933
+ maxChars: s,
840
934
  value: r,
841
- placeholder: o,
842
- required: i,
843
- disabled: a,
844
- error: c,
935
+ placeholder: l,
936
+ required: a,
937
+ disabled: c,
938
+ error: i,
845
939
  onInput: d,
846
940
  class: h
847
- } = t, u = L(), p = `${u}-error`, _ = `${u}-counter`, b = M(r?.length ?? 0), y = M(""), v = M(0), w = M(!1);
848
- return /* @__PURE__ */ l(
849
- q,
941
+ } = t, u = L(), p = `${u}-error`, _ = `${u}-counter`, b = M(r?.length ?? 0), v = M(""), w = M(0), x = M(!1);
942
+ return /* @__PURE__ */ o(
943
+ z,
850
944
  {
851
945
  label: e,
852
946
  for: u,
853
- required: i,
854
- error: c,
947
+ required: a,
948
+ error: i,
855
949
  errorId: p,
856
950
  class: h,
857
- children: /* @__PURE__ */ g("div", { class: U.wrapper, children: [
858
- /* @__PURE__ */ l(
951
+ children: /* @__PURE__ */ g("div", { class: J.wrapper, children: [
952
+ /* @__PURE__ */ o(
859
953
  "textarea",
860
954
  {
861
955
  id: u,
862
- class: U.textarea,
863
- name: s,
864
- maxLength: n,
865
- placeholder: o,
866
- required: i,
867
- disabled: a,
868
- "aria-invalid": !!c || void 0,
869
- "aria-describedby": D(c && p, _),
870
- onInput: (N) => {
871
- const x = N.target.value;
872
- b.value = x.length;
873
- const I = n - x.length, j = x.length / n * 100, P = Tt(j), f = !w.value && I <= qt && I > 0;
874
- (P > v.value || f) && (y.value = `${I} character${I === 1 ? "" : "s"} remaining`, v.value = P, f && (w.value = !0)), d?.(x);
956
+ class: J.textarea,
957
+ name: n,
958
+ maxLength: s,
959
+ placeholder: l,
960
+ required: a,
961
+ disabled: c,
962
+ "aria-invalid": !!i || void 0,
963
+ "aria-describedby": j(i && p, _),
964
+ onInput: (E) => {
965
+ const $ = E.target.value;
966
+ b.value = $.length;
967
+ const N = s - $.length, B = $.length / s * 100, S = on(B), f = !x.value && N <= rn && N > 0;
968
+ (S > w.value || f) && (v.value = `${N} character${N === 1 ? "" : "s"} remaining`, w.value = S, f && (x.value = !0)), d?.($);
875
969
  },
876
970
  children: r
877
971
  }
878
972
  ),
879
- /* @__PURE__ */ g("span", { id: _, class: U.counter, children: [
973
+ /* @__PURE__ */ g("span", { id: _, class: J.counter, children: [
880
974
  b,
881
975
  " / ",
882
- n
976
+ s
883
977
  ] }),
884
- /* @__PURE__ */ l(Bt, { children: /* @__PURE__ */ l("span", { "aria-live": "polite", children: y }) })
978
+ /* @__PURE__ */ o(me, { children: /* @__PURE__ */ o("span", { "aria-live": "polite", children: v }) })
885
979
  ] })
886
980
  }
887
981
  );
888
- }, zt = "_theme_1x47p_11", Rt = {
889
- theme: zt
890
- }, pn = {
982
+ }, ln = "_theme_1x47p_11", an = {
983
+ theme: ln
984
+ }, Sn = {
891
985
  blue: "aui-blue",
892
986
  purple: "aui-purple",
893
987
  teal: "aui-teal",
894
988
  red: "aui-red",
895
989
  orange: "aui-orange",
896
990
  yellow: "aui-yellow"
897
- }, _n = (t) => {
898
- const { children: e, class: s } = t;
899
- return /* @__PURE__ */ l("div", { class: m(Rt.theme, s), children: e });
900
- }, Ft = V(document.title);
901
- ue(() => {
902
- document.title = Ft.value;
903
- });
991
+ }, Hn = (t) => {
992
+ const { children: e, class: n } = t;
993
+ return /* @__PURE__ */ o("div", { class: m(an.theme, n), children: e });
994
+ };
904
995
  export {
905
- J as Button,
906
- Kt as Card,
907
- Vt as Checkbox,
908
- Wt as Dialog,
909
- Gt as DownloadLink,
910
- Zt as Form,
911
- Jt as Input,
912
- Qt as Link,
913
- en as Modal,
914
- tn as Nav,
915
- nn as NumberInput,
916
- pn as Palette,
917
- sn as PasswordInput,
918
- rn as RadioGroup,
919
- ln as Route,
920
- on as Section,
921
- an as Select,
922
- cn as SkipLink,
923
- dn as Table,
924
- un as Textarea,
925
- _n as Theme,
926
- Bt as VisuallyHidden,
996
+ _n as Badge,
997
+ se as Button,
998
+ hn as Card,
999
+ fn as Checkbox,
1000
+ gn as Dialog,
1001
+ mn as DownloadLink,
1002
+ bn as Form,
1003
+ vn as Head,
1004
+ yn as Input,
1005
+ kn as Link,
1006
+ wn as Modal,
1007
+ xn as Nav,
1008
+ $n as NumberInput,
1009
+ Sn as Palette,
1010
+ Cn as PasswordInput,
1011
+ In as RadioGroup,
1012
+ Ln as Route,
1013
+ Nn as Section,
1014
+ En as Select,
1015
+ Pn as SkipLink,
1016
+ Dn as Spinner,
1017
+ jn as Table,
1018
+ Bn as Textarea,
1019
+ Hn as Theme,
1020
+ me as VisuallyHidden,
1021
+ pe as canonical,
927
1022
  m as cx,
928
- le as hash,
929
- G as location,
930
- et as navigate,
931
- Ft as title
1023
+ ue as description,
1024
+ ge as hash,
1025
+ te as location,
1026
+ bt as navigate,
1027
+ he as ogDescription,
1028
+ fe as ogImage,
1029
+ _e as ogTitle,
1030
+ de as title
932
1031
  };