@webority/ui-react 0.7.1 → 0.7.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/ui-react.js CHANGED
@@ -1,34 +1,24 @@
1
1
  import { Fragment as e, jsx as t, jsxs as n } from "react/jsx-runtime";
2
2
  import { forwardRef as r, useCallback as i, useEffect as a, useId as o, useLayoutEffect as s, useMemo as c, useRef as l, useState as u } from "react";
3
- import d from "react-bootstrap/Alert";
4
- import f from "react-bootstrap/Badge";
5
- import p from "react-bootstrap/Button";
6
- import m from "react-bootstrap/Card";
7
- import h from "react-bootstrap/Form";
8
- import { createPortal as g } from "react-dom";
9
- import _ from "react-bootstrap/Modal";
10
- import v from "react-bootstrap/Dropdown";
11
- import y from "react-bootstrap/Offcanvas";
12
- import b from "react-bootstrap/Nav";
13
- import { toast as x } from "react-toastify";
3
+ import { Alert as d, Badge as f, Button as p, Card as m, Dropdown as h, Form as g, Modal as _, Nav as v, Offcanvas as y, OverlayTrigger as b, Popover as x, Toast as S, ToastContainer as C } from "react-bootstrap";
14
4
  //#region src/components/warnUnknownProps.js
15
- var S = /* @__PURE__ */ new Set(/* @__PURE__ */ "id.title.role.style.className.class.tabIndex.lang.dir.hidden.slot.part.draggable.spellCheck.translate.inert.popover.name.type.value.defaultValue.checked.defaultChecked.placeholder.disabled.readOnly.required.autoFocus.autoComplete.form.formAction.formMethod.formNoValidate.formTarget.min.max.step.minLength.maxLength.pattern.multiple.accept.capture.rows.cols.wrap.list.htmlFor.inputMode.enterKeyHint.href.target.rel.download.ping.referrerPolicy.src.srcSet.alt.width.height.loading.decoding.sizes.crossOrigin.useMap.colSpan.rowSpan.headers.scope.span.key.ref.children.dangerouslySetInnerHTML.suppressHydrationWarning".split(".")), C = () => {
5
+ var w = /* @__PURE__ */ new Set(/* @__PURE__ */ "id.title.role.style.className.class.tabIndex.lang.dir.hidden.slot.part.draggable.spellCheck.translate.inert.popover.name.type.value.defaultValue.checked.defaultChecked.placeholder.disabled.readOnly.required.autoFocus.autoComplete.form.formAction.formMethod.formNoValidate.formTarget.min.max.step.minLength.maxLength.pattern.multiple.accept.capture.rows.cols.wrap.list.htmlFor.inputMode.enterKeyHint.href.target.rel.download.ping.referrerPolicy.src.srcSet.alt.width.height.loading.decoding.sizes.crossOrigin.useMap.colSpan.rowSpan.headers.scope.span.key.ref.children.dangerouslySetInnerHTML.suppressHydrationWarning".split(".")), T = () => {
16
6
  try {
17
7
  return process.env.NODE_ENV !== "production";
18
8
  } catch {
19
9
  return !0;
20
10
  }
21
- }, w = (e) => e.startsWith("data-") || e.startsWith("aria-") || /^on[A-Z]/.test(e), T = /* @__PURE__ */ new Set();
22
- function E(e, t) {
23
- if (!(!C() || !t) && !("as" in t)) for (let n of Object.keys(t)) {
24
- if (w(n) || S.has(n)) continue;
11
+ }, E = (e) => e.startsWith("data-") || e.startsWith("aria-") || /^on[A-Z]/.test(e), D = /* @__PURE__ */ new Set();
12
+ function O(e, t) {
13
+ if (!(!T() || !t) && !("as" in t)) for (let n of Object.keys(t)) {
14
+ if (E(n) || w.has(n)) continue;
25
15
  let t = `${e}.${n}`;
26
- T.has(t) || (T.add(t), console.warn(`[@webority/ui-react] <${e}> received an unknown prop "${n}". It is not part of the component's API and is not a valid HTML attribute, so it will either be dropped or land on the DOM — check the prop name against the component catalogue at https://ui.webority.dev.`));
16
+ D.has(t) || (D.add(t), console.warn(`[@webority/ui-react] <${e}> received an unknown prop "${n}". It is not part of the component's API and is not a valid HTML attribute, so it will either be dropped or land on the DOM — check the prop name against the component catalogue at https://ui.webority.dev.`));
27
17
  }
28
18
  }
29
19
  //#endregion
30
20
  //#region src/components/Icon.jsx
31
- var D = {
21
+ var k = {
32
22
  activity: "activity",
33
23
  "alert-circle": "exclamation-circle",
34
24
  "alert-triangle": "exclamation-triangle",
@@ -145,9 +135,20 @@ var D = {
145
135
  "wand-sparkles": "magic",
146
136
  x: "x-lg",
147
137
  zap: "lightning-charge"
148
- }, O = [...Object.keys(D), "hard-hat"].sort();
149
- function k({ name: e, size: r = 16, className: i, color: a, style: o, ...s }) {
150
- if (E("Icon", s), e === "hard-hat") return /* @__PURE__ */ t("svg", {
138
+ }, A = [...Object.keys(k), "hard-hat"].sort(), j = /* @__PURE__ */ new Map();
139
+ function M(e) {
140
+ for (let [t, n] of Object.entries(e)) j.set(t, n);
141
+ }
142
+ function N({ name: e, size: r = 16, className: i, color: a, style: o, ...s }) {
143
+ O("Icon", s);
144
+ let c = j.get(e);
145
+ if (c) return c({
146
+ size: r,
147
+ color: a,
148
+ className: i,
149
+ style: o
150
+ });
151
+ if (e === "hard-hat") return /* @__PURE__ */ t("svg", {
151
152
  width: r,
152
153
  height: r,
153
154
  viewBox: "0 0 24 24",
@@ -169,9 +170,9 @@ function k({ name: e, size: r = 16, className: i, color: a, style: o, ...s }) {
169
170
  }), /* @__PURE__ */ t("path", { d: "M3.2 22.5C3.2 17.4 7.5 14.9 11 14.7L12 17.4l1-2.7C16.5 14.9 20.8 17.4 20.8 22.5z" })]
170
171
  })
171
172
  });
172
- let c = D[e] || e;
173
- return c ? /* @__PURE__ */ t("i", {
174
- className: `bi bi-${c}${i ? ` ${i}` : ""}`,
173
+ let l = k[e] || e;
174
+ return l ? /* @__PURE__ */ t("i", {
175
+ className: `bi bi-${l}${i ? ` ${i}` : ""}`,
175
176
  "data-icon": e,
176
177
  "aria-hidden": "true",
177
178
  style: {
@@ -184,8 +185,8 @@ function k({ name: e, size: r = 16, className: i, color: a, style: o, ...s }) {
184
185
  }
185
186
  //#endregion
186
187
  //#region src/components/ActionIcon.jsx
187
- function A({ icon: e, label: n, danger: r = !1, disabled: i = !1, size: a = 20, onClick: o, className: s = "", as: c, href: l, ...u }) {
188
- E("ActionIcon", u);
188
+ function ee({ icon: e, label: n, danger: r = !1, disabled: i = !1, size: a = 20, onClick: o, className: s = "", as: c, href: l, ...u }) {
189
+ O("ActionIcon", u);
189
190
  let d = [
190
191
  "u-action",
191
192
  r ? "danger" : "",
@@ -202,7 +203,7 @@ function A({ icon: e, label: n, danger: r = !1, disabled: i = !1, size: a = 20,
202
203
  role: !p && i ? "link" : void 0,
203
204
  onClick: o,
204
205
  ...u,
205
- children: /* @__PURE__ */ t(k, {
206
+ children: /* @__PURE__ */ t(N, {
206
207
  name: e,
207
208
  size: a
208
209
  })
@@ -210,8 +211,8 @@ function A({ icon: e, label: n, danger: r = !1, disabled: i = !1, size: a = 20,
210
211
  }
211
212
  //#endregion
212
213
  //#region src/components/AppAccordion.jsx
213
- function j({ items: e = [], multiple: r = !1, id: i, className: a = "", ...s }) {
214
- E("AppAccordion", s);
214
+ function P({ items: e = [], multiple: r = !1, id: i, className: a = "", ...s }) {
215
+ O("AppAccordion", s);
215
216
  let c = o(), l = i || c, [d, f] = u(() => {
216
217
  let t = e.filter((e) => e.open).map((e, t) => e.key ?? String(t));
217
218
  return new Set(r ? t : t.slice(0, 1));
@@ -236,7 +237,7 @@ function j({ items: e = [], multiple: r = !1, id: i, className: a = "", ...s })
236
237
  onClick: () => m(i),
237
238
  children: [e.title, /* @__PURE__ */ t("span", {
238
239
  className: "faq-q-icon",
239
- children: /* @__PURE__ */ t(k, {
240
+ children: /* @__PURE__ */ t(N, {
240
241
  name: "chevron-down",
241
242
  size: 18
242
243
  })
@@ -256,8 +257,8 @@ function j({ items: e = [], multiple: r = !1, id: i, className: a = "", ...s })
256
257
  }
257
258
  //#endregion
258
259
  //#region src/components/AppAlert.jsx
259
- function M({ variant: e = "info", children: n, className: r = "", onClose: i, dismissible: a, role: o = "alert", ...s }) {
260
- return E("AppAlert", s), /* @__PURE__ */ t(d, {
260
+ function te({ variant: e = "info", children: n, className: r = "", onClose: i, dismissible: a, role: o = "alert", ...s }) {
261
+ return O("AppAlert", s), /* @__PURE__ */ t(d, {
261
262
  variant: e,
262
263
  className: r || void 0,
263
264
  onClose: i,
@@ -269,16 +270,148 @@ function M({ variant: e = "info", children: n, className: r = "", onClose: i, di
269
270
  });
270
271
  }
271
272
  //#endregion
273
+ //#region src/components/AppButton.jsx
274
+ var F = {
275
+ primary: "primary",
276
+ secondary: "secondary",
277
+ outline: "outline-primary",
278
+ ghost: "ghost",
279
+ danger: "danger",
280
+ "outline-danger": "outline-danger",
281
+ light: "light",
282
+ warning: "warning"
283
+ };
284
+ function I(e, n) {
285
+ if (!e) return null;
286
+ let r = n === "left" ? "me-2" : "ms-2";
287
+ return typeof e == "string" ? /* @__PURE__ */ t(N, {
288
+ name: e,
289
+ size: 16,
290
+ className: r
291
+ }) : /* @__PURE__ */ t("span", {
292
+ className: `d-inline-flex ${r}`,
293
+ children: e
294
+ });
295
+ }
296
+ function L({ children: e, variant: r = "primary", size: i = "md", type: a = "button", loading: o = !1, disabled: s = !1, block: c = !1, leftIcon: l = null, rightIcon: u = null, className: d = "", ...f }) {
297
+ O("AppButton", f);
298
+ let m = [c ? "w-100" : "", d].filter(Boolean).join(" ");
299
+ return /* @__PURE__ */ n(p, {
300
+ type: (f.as === void 0 || f.as === "button") && f.href === void 0 ? a : void 0,
301
+ variant: F[r] ?? "primary",
302
+ size: i === "md" ? void 0 : i,
303
+ disabled: s || o,
304
+ className: m || void 0,
305
+ ...f,
306
+ children: [
307
+ o && /* @__PURE__ */ t("span", {
308
+ className: "spinner-border spinner-border-sm me-2",
309
+ "aria-hidden": "true"
310
+ }),
311
+ !o && I(l, "left"),
312
+ e,
313
+ !o && I(u, "right")
314
+ ]
315
+ });
316
+ }
317
+ //#endregion
318
+ //#region src/components/AppEmptyState.jsx
319
+ function R({ icon: e, iconSize: r = 24, size: i = "md", title: a, text: o, action: s, className: c = "", style: l, ...u }) {
320
+ return O("AppEmptyState", u), /* @__PURE__ */ n("div", {
321
+ className: [
322
+ "empty-state",
323
+ i === "sm" ? "empty-state-sm" : "",
324
+ c
325
+ ].filter(Boolean).join(" "),
326
+ style: l,
327
+ children: [
328
+ e ? /* @__PURE__ */ t("div", {
329
+ className: "empty-state-icon",
330
+ children: /* @__PURE__ */ t(N, {
331
+ name: e,
332
+ size: r
333
+ })
334
+ }) : null,
335
+ a != null && /* @__PURE__ */ t("div", {
336
+ className: "empty-state-title",
337
+ children: a
338
+ }),
339
+ o != null && /* @__PURE__ */ t("div", {
340
+ className: "empty-state-message",
341
+ children: o
342
+ }),
343
+ s && /* @__PURE__ */ t("div", {
344
+ className: "empty-state-action",
345
+ children: s
346
+ })
347
+ ]
348
+ });
349
+ }
350
+ //#endregion
351
+ //#region src/components/AppSpinner.jsx
352
+ function ne({ size: e = "md", label: n = "Loading", className: r = "", ...i }) {
353
+ O("AppSpinner", i);
354
+ let a = Number(e), o = Number.isFinite(a) && a > 0;
355
+ return /* @__PURE__ */ t("span", {
356
+ className: `spinner-border${!o && e === "sm" ? " spinner-border-sm" : ""}${r ? ` ${r}` : ""}`,
357
+ role: "status",
358
+ "aria-label": n,
359
+ style: o ? {
360
+ width: `${a}px`,
361
+ height: `${a}px`,
362
+ borderWidth: `${Math.max(2, Math.round(a / 8))}px`
363
+ } : void 0
364
+ });
365
+ }
366
+ //#endregion
367
+ //#region src/components/AppAsyncBlock.jsx
368
+ function re({ loading: e = !1, error: n = null, empty: r = !1, children: i, onRetry: a, skeleton: o, className: s = "", ...c }) {
369
+ O("AppAsyncBlock", c);
370
+ let l = `async-block${s ? ` ${s}` : ""}`;
371
+ return e ? /* @__PURE__ */ t("div", {
372
+ className: l,
373
+ "data-state": "loading",
374
+ children: o ?? /* @__PURE__ */ t("div", {
375
+ className: "d-flex align-items-center justify-content-center py-5",
376
+ children: /* @__PURE__ */ t(ne, { label: "Loading" })
377
+ })
378
+ }) : n ? /* @__PURE__ */ t("div", {
379
+ className: l,
380
+ "data-state": "error",
381
+ children: /* @__PURE__ */ t(R, {
382
+ icon: "alert-circle",
383
+ title: "Something went wrong",
384
+ text: n,
385
+ action: a ? /* @__PURE__ */ t(L, {
386
+ variant: "secondary",
387
+ onClick: a,
388
+ children: "Retry"
389
+ }) : null
390
+ })
391
+ }) : r ? /* @__PURE__ */ t("div", {
392
+ className: l,
393
+ "data-state": "empty",
394
+ children: /* @__PURE__ */ t(R, {
395
+ icon: "inbox",
396
+ title: "Nothing to show yet"
397
+ })
398
+ }) : /* @__PURE__ */ t("div", {
399
+ className: l,
400
+ "data-state": "content",
401
+ children: i
402
+ });
403
+ }
404
+ //#endregion
272
405
  //#region ../elements/dist/ui-elements.js
273
- var N = {
406
+ var ie = {
274
407
  success: "<rect width=\"174\" height=\"174\" rx=\"87\" fill=\"var(--wui-success-5)\"/>\n<rect x=\"24\" y=\"24\" width=\"126\" height=\"126\" rx=\"63\" stroke=\"var(--wui-success-20)\" stroke-width=\"16\"/>\n<g clip-path=\"url(#wui_success_clip)\">\n<rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"var(--wui-success-active)\"/>\n<rect x=\"108.758\" y=\"67.5986\" width=\"75.5044\" height=\"49.155\" transform=\"rotate(45 108.758 67.5986)\" fill=\"var(--wui-success)\"/>\n<path d=\"M87.895 96.1046C89.7154 97.9249 89.7154 101.046 87.895 102.866L84.1243 106.637C82.3039 108.457 79.1833 108.457 77.3629 106.637L60.8496 89.9934C59.0293 88.173 59.0293 85.0524 60.8496 83.232L64.6204 79.4613C66.4408 77.6409 69.5614 77.6409 71.3817 79.4613L87.895 96.1046Z\" fill=\"white\"/>\n<path d=\"M102.324 67.3672C104.144 65.5469 107.265 65.5469 109.085 67.3672L112.856 71.138C114.676 72.9583 114.676 76.079 112.856 77.8993L84.2499 106.375C82.4296 108.195 79.3089 108.195 77.4886 106.375L73.7178 102.604C71.8975 100.784 71.8975 97.6633 73.7178 95.8429L102.324 67.3672Z\" fill=\"white\"/>\n</g>\n<defs><clipPath id=\"wui_success_clip\"><rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"white\"/></clipPath></defs>",
275
408
  error: "<rect width=\"174\" height=\"174\" rx=\"87\" fill=\"var(--wui-danger-5)\"/>\n<rect x=\"24\" y=\"24\" width=\"126\" height=\"126\" rx=\"63\" stroke=\"var(--wui-danger-20)\" stroke-width=\"16\"/>\n<g clip-path=\"url(#wui_error_clip0)\">\n<rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"var(--wui-danger)\"/>\n<rect x=\"110.758\" y=\"62\" width=\"75.5044\" height=\"69.9535\" transform=\"rotate(45 110.758 62)\" fill=\"var(--wui-danger-active)\"/>\n<g clip-path=\"url(#wui_error_clip1)\">\n<path d=\"M95.9285 87.0037L112.943 69.9887C114.823 68.1087 114.823 65.0608 112.943 63.1838L110.675 60.9155C108.795 59.0349 105.747 59.0349 103.87 60.9155L86.8552 77.9298L69.8403 60.9119C67.9603 59.032 64.9124 59.032 63.0353 60.9119L60.7635 63.1802C58.8835 65.0608 58.8835 68.1087 60.7635 69.9858L77.7814 87.0037L60.767 104.018C58.8865 105.899 58.8865 108.947 60.767 110.824L63.0353 113.092C64.9153 114.972 67.9632 114.972 69.8403 113.092L86.8552 96.0769L103.87 113.092C105.75 114.972 108.798 114.972 110.675 113.092L112.943 110.824C114.823 108.943 114.823 105.895 112.943 104.018L95.9285 87.0037Z\" fill=\"white\"/>\n</g>\n</g>\n<defs><clipPath id=\"wui_error_clip0\"><rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"white\"/></clipPath><clipPath id=\"wui_error_clip1\"><rect width=\"55\" height=\"55\" fill=\"white\" transform=\"translate(59.3535 59.502)\"/></clipPath></defs>",
276
409
  warning: "<rect width=\"174\" height=\"174\" rx=\"87\" fill=\"var(--wui-warning-5)\"/>\n<rect x=\"24\" y=\"24\" width=\"126\" height=\"126\" rx=\"63\" stroke=\"var(--wui-warning-20)\" stroke-width=\"16\"/>\n<g clip-path=\"url(#wui_warning_clip)\">\n<rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"var(--wui-warning)\"/>\n<path d=\"M93.7812 60.9731L156.173 123.365L113.082 166.456L60 113.5L97 109L93.7812 60.9731Z\" fill=\"var(--wui-warning-active)\"/>\n<path d=\"M116.145 101.611L96.0431 62.7255C94.8912 60.6967 93.0607 59.1479 90.8656 58.3543C88.6768 57.5543 86.2768 57.5607 84.0945 58.3671C83.0001 58.7767 81.9953 59.3655 81.125 60.1079C80.2545 60.8567 79.5122 61.7527 78.9425 62.7703L57.8933 101.554C56.1525 104.594 56.1717 108.331 57.9317 111.358C59.6981 114.392 62.9427 116.248 66.4435 116.242H107.563C111.051 116.248 114.283 114.398 116.049 111.39C116.952 109.854 117.4 108.133 117.4 106.418C117.4 104.76 116.984 103.102 116.145 101.611ZM87.0064 105.714C85.0672 105.714 83.4929 104.146 83.4929 102.207C83.4929 100.267 85.0672 98.6993 87.0064 98.6993C88.9392 98.6993 90.5136 100.267 90.5136 102.207C90.5136 104.146 88.9392 105.714 87.0064 105.714ZM90.9104 78.098L88.0432 95.3266C88.0049 95.8706 87.5504 96.2994 87.0064 96.2994C86.4561 96.2994 86.0016 95.8706 85.9633 95.3266L83.0961 78.098C83.0385 77.8101 83.0065 77.522 83.0065 77.2405C83.0065 76.3125 83.3137 75.4037 83.8833 74.6485C84.6321 73.6629 85.7713 73.0549 87.0064 72.9717C88.2352 73.0549 89.3744 73.6629 90.1232 74.6485C90.872 75.6341 91.16 76.8885 90.9104 78.098Z\" fill=\"white\"/>\n</g>\n<defs><clipPath id=\"wui_warning_clip\"><rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"white\"/></clipPath></defs>",
277
410
  info: "<rect width=\"174\" height=\"174\" rx=\"87\" fill=\"var(--wui-info-5)\"/>\n<rect x=\"24\" y=\"24\" width=\"126\" height=\"126\" rx=\"63\" stroke=\"var(--wui-info-20)\" stroke-width=\"16\"/>\n<g clip-path=\"url(#wui_info_clip)\">\n<rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"var(--wui-info)\"/>\n<path d=\"M104.999 67.5L111.454 64L163.495 116.041L115.739 163.797L62.999 111L101.897 104.102L104.999 67.5Z\" fill=\"var(--wui-info-active)\"/>\n<path d=\"M87 121C105.778 121 121 105.778 121 87C121 68.2223 105.778 53 87 53C68.2223 53 53 68.2223 53 87C53 105.778 68.2223 121 87 121Z\" fill=\"white\"/>\n<path d=\"M87 75.542C89.3472 75.542 91.25 73.6392 91.25 71.292C91.25 68.9448 89.3472 67.042 87 67.042C84.6528 67.042 82.75 68.9448 82.75 71.292C82.75 73.6392 84.6528 75.542 87 75.542Z\" fill=\"var(--wui-info-active)\"/>\n<path d=\"M86.9992 106.992C86.0975 106.992 85.2327 106.634 84.5951 105.996C83.9574 105.359 83.5992 104.494 83.5992 103.592V86.592C82.6975 86.592 81.8327 86.2338 81.1951 85.5962C80.5574 84.9585 80.1992 84.0937 80.1992 83.192C80.1992 82.2903 80.5574 81.4255 81.1951 80.7878C81.8327 80.1502 82.6975 79.792 83.5992 79.792H86.9992C87.901 79.792 88.7658 80.1502 89.4034 80.7878C90.041 81.4255 90.3992 82.2903 90.3992 83.192V103.592C90.3992 104.494 90.041 105.359 89.4034 105.996C88.7658 106.634 87.901 106.992 86.9992 106.992Z\" fill=\"var(--wui-info-active)\"/>\n<path d=\"M90.3992 106.992H83.5992C82.6975 106.992 81.8327 106.634 81.1951 105.996C80.5574 105.358 80.1992 104.494 80.1992 103.592C80.1992 102.69 80.5574 101.825 81.1951 101.188C81.8327 100.55 82.6975 100.192 83.5992 100.192H90.3992C91.301 100.192 92.1658 100.55 92.8034 101.188C93.441 101.825 93.7992 102.69 93.7992 103.592C93.7992 104.494 93.441 105.358 92.8034 105.996C92.1658 106.634 91.301 106.992 90.3992 106.992Z\" fill=\"var(--wui-info-active)\"/>\n</g>\n<defs><clipPath id=\"wui_info_clip\"><rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"white\"/></clipPath></defs>",
278
411
  delete: "<rect width=\"174\" height=\"174\" rx=\"87\" fill=\"var(--wui-danger-5)\"/>\n<rect x=\"24\" y=\"24\" width=\"126\" height=\"126\" rx=\"63\" stroke=\"var(--wui-danger-20)\" stroke-width=\"16\"/>\n<g clip-path=\"url(#wui_delete_clip0)\">\n<rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"var(--wui-danger)\"/>\n<path d=\"M114.529 67.5672L163.249 116.287L116.354 163.183L67.6336 114.463L100.999 81.0975L64.999 77.5L58.999 69.5L114.529 67.5672Z\" fill=\"var(--wui-danger-active)\"/>\n<path d=\"M103.5 79L100.5 105.5L76 113L69.5 83.5L103.5 79Z\" fill=\"var(--wui-danger)\"/>\n<g clip-path=\"url(#wui_delete_clip1)\">\n<path d=\"M113.652 66.9993C108.895 66.5266 104.139 66.1721 99.3522 65.9061V65.8766L98.7022 62.0357C98.259 59.3175 97.609 55.2402 90.6954 55.2402H82.9545C76.0704 55.2402 75.4204 59.1402 74.9477 62.0061L74.3272 65.788C71.5795 65.9652 68.8318 66.1425 66.084 66.4084L60.0568 66.9993C58.8159 67.1175 57.9295 68.2107 58.0477 69.4221C58.1659 70.6334 59.2295 71.5198 60.4704 71.4016L66.4977 70.8107C81.9795 69.2743 97.5795 69.8652 113.239 71.4311C113.327 71.4311 113.386 71.4311 113.475 71.4311C114.598 71.4311 115.573 70.5743 115.691 69.4221C115.779 68.2107 114.893 67.1175 113.652 66.9993Z\" fill=\"white\"/>\n<path d=\"M108.216 75.5971C107.507 74.8585 106.532 74.4448 105.527 74.4448H68.1816C67.177 74.4448 66.1725 74.8585 65.4929 75.5971C64.8134 76.3357 64.4293 77.3403 64.4884 78.3744L66.3202 108.688C66.6452 113.179 67.0588 118.793 77.3702 118.793H96.3384C106.65 118.793 107.063 113.208 107.388 108.688L109.22 78.4039C109.279 77.3403 108.895 76.3357 108.216 75.5971ZM91.7588 103.99H81.9202C80.7088 103.99 79.7043 102.986 79.7043 101.774C79.7043 100.563 80.7088 99.5585 81.9202 99.5585H91.7588C92.9702 99.5585 93.9747 100.563 93.9747 101.774C93.9747 102.986 92.9702 103.99 91.7588 103.99ZM94.2406 92.1721H79.4679C78.2566 92.1721 77.252 91.1676 77.252 89.9562C77.252 88.7448 78.2566 87.7403 79.4679 87.7403H94.2406C95.452 87.7403 96.4566 88.7448 96.4566 89.9562C96.4566 91.1676 95.452 92.1721 94.2406 92.1721Z\" fill=\"white\"/>\n</g>\n</g>\n<defs><clipPath id=\"wui_delete_clip0\"><rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"white\"/></clipPath><clipPath id=\"wui_delete_clip1\"><rect width=\"65\" height=\"65\" fill=\"white\" transform=\"translate(54.3535 54.502)\"/></clipPath></defs>"
279
412
  };
280
- Object.keys(N);
281
- var ee = class extends HTMLElement {
413
+ Object.keys(ie);
414
+ var ae = class extends HTMLElement {
282
415
  static get observedAttributes() {
283
416
  return ["tone", "size"];
284
417
  }
@@ -289,43 +422,43 @@ var ee = class extends HTMLElement {
289
422
  this.isConnected && this.render();
290
423
  }
291
424
  render() {
292
- let e = this.getAttribute("tone"), t = this.getAttribute("size") || "72", n = N[e] || N.info;
425
+ let e = this.getAttribute("tone"), t = this.getAttribute("size") || "72", n = ie[e] || ie.info;
293
426
  this.innerHTML = `<svg width="${t}" height="${t}" viewBox="0 0 174 174" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">${n}</svg>`;
294
427
  }
295
- }, P = 4;
296
- function F(e, t, n = {}) {
428
+ }, z = 4;
429
+ function B(e, t, n = {}) {
297
430
  if (!e || !t) return;
298
- let r = e.getBoundingClientRect(), i = t.offsetHeight, a = window.innerHeight - r.bottom, o = a < i + P && r.top > a;
299
- t.classList.toggle("drop-up", o), t.style.position = "fixed", t.style.top = o ? `${Math.max(P, r.top - i - P)}px` : `${r.bottom + P}px`, n.matchWidth && (t.style.width = `${r.width}px`);
300
- let s = t.offsetWidth, c = Math.min(r.left, window.innerWidth - s - P);
301
- t.style.left = `${Math.max(P, c)}px`;
431
+ let r = e.getBoundingClientRect(), i = t.offsetHeight, a = window.innerHeight - r.bottom, o = a < i + z && r.top > a;
432
+ t.classList.toggle("drop-up", o), t.style.position = "fixed", t.style.top = o ? `${Math.max(z, r.top - i - z)}px` : `${r.bottom + z}px`, n.matchWidth && (t.style.width = `${r.width}px`);
433
+ let s = t.offsetWidth, c = Math.min(r.left, window.innerWidth - s - z);
434
+ t.style.left = `${Math.max(z, c)}px`;
302
435
  }
303
- function I(e, t) {
304
- L(e), e._reanchor = t, window.addEventListener("resize", e._reanchor), window.addEventListener("scroll", e._reanchor, !0);
436
+ function V(e, t) {
437
+ H(e), e._reanchor = t, window.addEventListener("resize", e._reanchor), window.addEventListener("scroll", e._reanchor, !0);
305
438
  }
306
- function L(e) {
439
+ function H(e) {
307
440
  e?._reanchor && (window.removeEventListener("resize", e._reanchor), window.removeEventListener("scroll", e._reanchor, !0), e._reanchor = null);
308
441
  }
309
- var R = "data-wui-mirror";
310
- function z(e, t) {
311
- let n = e.getAttribute("name"), r = e.querySelector(`:scope > input[${R}]`);
442
+ var U = "data-wui-mirror";
443
+ function W(e, t) {
444
+ let n = e.getAttribute("name"), r = e.querySelector(`:scope > input[${U}]`);
312
445
  if (!n) {
313
446
  r?.remove();
314
447
  return;
315
448
  }
316
- r || (r = document.createElement("input"), r.type = "hidden", r.setAttribute(R, ""), e.appendChild(r)), r.name = n, r.value = t == null ? "" : String(t);
449
+ r || (r = document.createElement("input"), r.type = "hidden", r.setAttribute(U, ""), e.appendChild(r)), r.name = n, r.value = t == null ? "" : String(t);
317
450
  for (let t of e.attributes) t.name.startsWith("data-val") && r.setAttribute(t.name, t.value);
318
451
  r.disabled = e.hasAttribute("disabled");
319
452
  }
320
- var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;"), te = (e) => {
453
+ var oe = Symbol("wui.trustedHtml"), G = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;"), K = (e) => {
321
454
  if (!e) return "";
322
455
  let t = String(e).toLowerCase().replace(/[^a-z0-9-]/g, "");
323
456
  return t ? `<i class="bi bi-${t}" aria-hidden="true"></i>` : "";
324
- }, H = (e) => {
457
+ }, q = (e) => {
325
458
  if (e == null) return "";
326
- let t = e[B] ? String(e.label ?? "") : V(e.label), n = te(e.icon);
459
+ let t = e[oe] ? String(e.label ?? "") : G(e.label), n = K(e.icon);
327
460
  return n ? `<span class="wui-opt-label">${n}${t}</span>` : t;
328
- }, ne = class extends HTMLElement {
461
+ }, se = class extends HTMLElement {
329
462
  _accessibleName() {
330
463
  return this.getAttribute("aria-label") || this.getAttribute("placeholder") || "Select";
331
464
  }
@@ -338,7 +471,8 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
338
471
  "debounce",
339
472
  "remote",
340
473
  "size",
341
- "aria-label"
474
+ "aria-label",
475
+ "allow-custom"
342
476
  ];
343
477
  }
344
478
  constructor() {
@@ -354,14 +488,14 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
354
488
  return this._value;
355
489
  }
356
490
  set value(e) {
357
- this._value = e == null ? "" : String(e), z(this, this._value);
491
+ this._value = e == null ? "" : String(e), W(this, this._value);
358
492
  let t = this._readOptions().find((e) => String(e.value) === this._value);
359
- this._label = t ? U(t.label) : "", this._syncInput(), this._renderOptions("");
493
+ this._label = t ? le(t.label) : "", this._syncInput(), this._renderOptions("");
360
494
  }
361
495
  set options(e) {
362
496
  this._optionsProp = Array.isArray(e) ? e : [];
363
497
  let t = this._readOptions().find((e) => String(e.value) === this._value);
364
- t && (this._label = U(t.label)), this._renderOptions(), this._syncInput();
498
+ t && (this._label = le(t.label)), this._renderOptions(), this._syncInput();
365
499
  }
366
500
  get options() {
367
501
  return this._readOptions();
@@ -375,6 +509,13 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
375
509
  get _remote() {
376
510
  return this.hasAttribute("remote");
377
511
  }
512
+ get _allowCustom() {
513
+ return this.hasAttribute("allow-custom");
514
+ }
515
+ _matchesKnownOption(e) {
516
+ let t = e.toLowerCase();
517
+ return this._readOptions().some((e) => le(e.label).toLowerCase() === t || String(e.value ?? "").toLowerCase() === t);
518
+ }
378
519
  get _minChars() {
379
520
  return Math.max(0, Number(this.getAttribute("min-chars")) || +!!this._remote);
380
521
  }
@@ -391,7 +532,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
391
532
  value: e.getAttribute("value") ?? e.textContent.trim(),
392
533
  label: e.innerHTML,
393
534
  icon: e.getAttribute("icon") || void 0,
394
- [B]: !0,
535
+ [oe]: !0,
395
536
  selected: e.hasAttribute("selected")
396
537
  })));
397
538
  }
@@ -403,8 +544,8 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
403
544
  let e = this.getAttribute("placeholder") || "Search…", t = this.getAttribute("size"), n = t === "sm" ? " search-select-sm" : t === "lg" ? " search-select-lg" : "";
404
545
  this.innerHTML = `
405
546
  <div class="search-select${n}">
406
- <div class="input search-select-control search-select-ac" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-label="${re(this._accessibleName())}">
407
- <input class="search-select-input search-select-ac-input" placeholder="${re(e)}" aria-autocomplete="list" autocomplete="off"${this.hasAttribute("disabled") ? " disabled" : ""} />
547
+ <div class="input search-select-control search-select-ac" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-label="${ce(this._accessibleName())}">
548
+ <input class="search-select-input search-select-ac-input" placeholder="${ce(e)}" aria-autocomplete="list" autocomplete="off"${this.hasAttribute("disabled") ? " disabled" : ""} />
408
549
  <span class="search-select-spinner spinner-border spinner-border-sm" role="status" aria-hidden="true" hidden></span>
409
550
  <button type="button" class="search-select-clear" aria-label="Clear" hidden><i class="bi bi-x" aria-hidden="true"></i></button>
410
551
  </div>
@@ -413,7 +554,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
413
554
  <div class="search-select-empty" hidden>No matches</div>
414
555
  <div class="search-select-hint" hidden>Type to search…</div>
415
556
  </div>
416
- </div>`, this._rendered = !0, z(this, this._value), this._wire(), this._syncInput(), this._renderOptions();
557
+ </div>`, this._rendered = !0, W(this, this._value), this._wire(), this._syncInput(), this._renderOptions();
417
558
  }
418
559
  _refs() {
419
560
  return {
@@ -441,18 +582,27 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
441
582
  _renderOptions(e) {
442
583
  let t = this._refs();
443
584
  if (!t.optionsWrap) return;
444
- let n = (e ?? (t.input ? t.input.value : "")).trim().toLowerCase(), r = this._readOptions();
445
- !this._remote && n && (r = r.filter((e) => U(e.label).toLowerCase().includes(n))), t.optionsWrap.innerHTML = r.map((e) => {
585
+ let n = e ?? (t.input ? t.input.value : ""), r = n.trim().toLowerCase(), i = this._readOptions();
586
+ !this._remote && r && (i = i.filter((e) => le(e.label).toLowerCase().includes(r)));
587
+ let a = n.trim(), o = this._allowCustom && a && !this._matchesKnownOption(a) ? [...i, {
588
+ value: a,
589
+ custom: !0
590
+ }] : i;
591
+ t.optionsWrap.innerHTML = o.map((e) => {
592
+ if (e.custom) {
593
+ let t = `Add “${G(e.value)}”`;
594
+ return `<button type="button" role="option" class="search-select-option search-select-option-custom" data-value="${ce(e.value)}" data-custom="true" aria-selected="false">${t}</button>`;
595
+ }
446
596
  let t = String(e.value) === String(this._value);
447
- return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${re(e.value)}" aria-selected="${t}">${H(e)}</button>`;
597
+ return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${ce(e.value)}" aria-selected="${t}">${q(e)}</button>`;
448
598
  }).join(""), this._active = -1;
449
- let i = n.length < this._minChars;
450
- t.hint && (t.hint.hidden = !(this._remote && i && !r.length)), t.empty && (t.empty.hidden = this._loading || r.length > 0 || this._remote && i);
599
+ let s = r.length < this._minChars;
600
+ t.hint && (t.hint.hidden = !(this._remote && s && !i.length)), t.empty && (t.empty.hidden = this._loading || o.length > 0 || this._remote && s);
451
601
  }
452
602
  _wire() {
453
603
  let e = this._refs();
454
604
  if (!e.control || !e.input) return;
455
- let t = () => F(e.control, e.menu, { matchWidth: !0 }), n = () => this._optionEls().filter((e) => !e.hidden), r = (e) => {
605
+ let t = () => B(e.control, e.menu, { matchWidth: !0 }), n = () => this._optionEls().filter((e) => !e.hidden), r = (e) => {
456
606
  let t = n();
457
607
  this._active = e;
458
608
  for (let e of this._optionEls()) e.classList.remove("is-active");
@@ -462,7 +612,16 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
462
612
  }, o = () => {
463
613
  e.menu.hidden = !0, e.control.setAttribute("aria-expanded", "false"), e.control.classList.remove("open"), r(-1), this._syncInput();
464
614
  }, s = (t) => {
465
- this._value = t.dataset.value, this._label = U(t.innerHTML), z(this, this._value), e.input.value = this._label, this.dispatchEvent(new Event("change", { bubbles: !0 })), o(), e.input.focus();
615
+ let n = t.dataset.custom === "true";
616
+ this._value = t.dataset.value, this._label = n ? t.dataset.value : le(t.innerHTML), W(this, this._value), e.input.value = this._label, this.dispatchEvent(new CustomEvent("change", {
617
+ bubbles: !0,
618
+ detail: { isCustom: n }
619
+ })), o(), e.input.focus();
620
+ }, c = (t) => {
621
+ this._value = t, this._label = t, W(this, t), e.input.value = t, this.dispatchEvent(new CustomEvent("change", {
622
+ bubbles: !0,
623
+ detail: { isCustom: !0 }
624
+ })), o();
466
625
  };
467
626
  e.input.addEventListener("focus", () => a()), e.input.addEventListener("input", () => {
468
627
  let t = e.input.value;
@@ -475,9 +634,21 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
475
634
  }));
476
635
  }, this._debounceMs);
477
636
  } else this._renderOptions(t);
478
- }), e.input.addEventListener("keydown", (e) => {
479
- let t = n();
480
- e.key === "ArrowDown" ? (e.preventDefault(), i() || a(), r(Math.min(this._active + 1, t.length - 1))) : e.key === "ArrowUp" ? (e.preventDefault(), r(Math.max(this._active - 1, 0))) : e.key === "Enter" ? t[this._active] && (e.preventDefault(), s(t[this._active])) : e.key === "Escape" && o();
637
+ }), e.input.addEventListener("keydown", (t) => {
638
+ let l = n();
639
+ if (t.key === "ArrowDown") t.preventDefault(), i() || a(), r(Math.min(this._active + 1, l.length - 1));
640
+ else if (t.key === "ArrowUp") t.preventDefault(), r(Math.max(this._active - 1, 0));
641
+ else if (t.key === "Enter") {
642
+ if (l[this._active]) t.preventDefault(), s(l[this._active]);
643
+ else if (this._allowCustom) {
644
+ let n = e.input.value.trim();
645
+ n && !this._matchesKnownOption(n) && (t.preventDefault(), c(n));
646
+ }
647
+ } else t.key === "Escape" && o();
648
+ }), e.input.addEventListener("blur", (t) => {
649
+ if (!this._allowCustom || t.relatedTarget && this.contains(t.relatedTarget)) return;
650
+ let n = e.input.value.trim();
651
+ !n || n === this._label || this._matchesKnownOption(n) || c(n);
481
652
  }), e.optionsWrap.addEventListener("click", (e) => {
482
653
  let t = e.target.closest(".search-select-option");
483
654
  t && s(t);
@@ -485,17 +656,17 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
485
656
  let t = e.target.closest(".search-select-option");
486
657
  t && r(this._optionEls().indexOf(t));
487
658
  }), e.optionsWrap.addEventListener("mouseleave", () => r(-1)), e.clear?.addEventListener("click", () => {
488
- this._value = "", this._label = "", z(this, ""), e.input.value = "", e.clear.hidden = !0, this._renderOptions(""), this.dispatchEvent(new Event("change", { bubbles: !0 })), e.input.focus();
659
+ this._value = "", this._label = "", W(this, ""), e.input.value = "", e.clear.hidden = !0, this._renderOptions(""), this.dispatchEvent(new Event("change", { bubbles: !0 })), e.input.focus();
489
660
  }), this._onDocClick = (e) => {
490
661
  i() && !this.contains(e.target) && o();
491
- }, document.addEventListener("click", this._onDocClick), I(this, () => {
662
+ }, document.addEventListener("click", this._onDocClick), V(this, () => {
492
663
  i() && t();
493
664
  });
494
665
  }
495
666
  disconnectedCallback() {
496
- this._onDocClick && document.removeEventListener("click", this._onDocClick), L(this), clearTimeout(this._timer);
667
+ this._onDocClick && document.removeEventListener("click", this._onDocClick), H(this), clearTimeout(this._timer);
497
668
  }
498
- }, re = (e) => String(e ?? "").replace(/"/g, "&quot;").replace(/</g, "&lt;"), U = (e) => String(e ?? "").replace(/<[^>]*>/g, ""), ie = [
669
+ }, ce = (e) => String(e ?? "").replace(/"/g, "&quot;").replace(/</g, "&lt;"), le = (e) => String(e ?? "").replace(/<[^>]*>/g, ""), ue = [
499
670
  "January",
500
671
  "February",
501
672
  "March",
@@ -508,7 +679,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
508
679
  "October",
509
680
  "November",
510
681
  "December"
511
- ], W = [
682
+ ], de = [
512
683
  "Su",
513
684
  "Mo",
514
685
  "Tu",
@@ -516,24 +687,24 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
516
687
  "Th",
517
688
  "Fr",
518
689
  "Sa"
519
- ], G = (e) => String(e).padStart(2, "0"), K = (e, t, n) => `${e}-${G(t + 1)}-${G(n)}`, q = (e) => {
690
+ ], fe = (e) => String(e).padStart(2, "0"), pe = (e, t, n) => `${e}-${fe(t + 1)}-${fe(n)}`, J = (e) => {
520
691
  let t = /^(\d{4})-(\d{2})-(\d{2})$/.exec(e || "");
521
692
  return t ? {
522
693
  y: +t[1],
523
694
  m: t[2] - 1,
524
695
  d: +t[3]
525
696
  } : null;
526
- }, J = (e) => {
527
- let t = q(e);
528
- return t ? `${G(t.d)} ${ie[t.m].slice(0, 3)} ${t.y}` : "";
529
- }, Y = (e, t) => new Date(e, t + 1, 0).getDate(), X = (e, t) => {
697
+ }, me = (e) => {
698
+ let t = J(e);
699
+ return t ? `${fe(t.d)} ${ue[t.m].slice(0, 3)} ${t.y}` : "";
700
+ }, he = (e, t) => new Date(e, t + 1, 0).getDate(), Y = (e, t) => {
530
701
  for (; t < 0;) t += 12, --e;
531
702
  for (; t > 11;) t -= 12, e += 1;
532
703
  return {
533
704
  y: e,
534
705
  m: t
535
706
  };
536
- }, ae = class extends HTMLElement {
707
+ }, ge = class extends HTMLElement {
537
708
  static get observedAttributes() {
538
709
  return [
539
710
  "value",
@@ -560,7 +731,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
560
731
  return this._value;
561
732
  }
562
733
  set value(e) {
563
- this._value = e || "", z(this, this._value), this._syncTrigger(), this.dispatchEvent(new Event("change", { bubbles: !0 }));
734
+ this._value = e || "", W(this, this._value), this._syncTrigger(), this.dispatchEvent(new Event("change", { bubbles: !0 }));
564
735
  }
565
736
  _firstDay() {
566
737
  let e = Number.parseInt(this.getAttribute("first-day") ?? "", 10);
@@ -568,29 +739,29 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
568
739
  }
569
740
  render() {
570
741
  this._value = this.getAttribute("value") || this._value;
571
- let e = this.getAttribute("placeholder") || "Enter Date", t = q(this._value);
742
+ let e = this.getAttribute("placeholder") || "Enter Date", t = J(this._value);
572
743
  t && (this._viewY = t.y, this._viewM = t.m);
573
744
  let n = this.getAttribute("size"), r = n === "sm" ? " input-sm" : n === "lg" ? " input-lg" : "";
574
745
  this.innerHTML = `
575
746
  <div class="datepicker">
576
747
  <button type="button" class="input datepicker-trigger${r}${t ? " has-value" : ""}" aria-haspopup="dialog" aria-expanded="false"${this.hasAttribute("disabled") ? " disabled" : ""}>
577
- <span data-trigger-label class="${t ? "" : "search-select-placeholder"}">${t ? J(this._value) : e}</span>
748
+ <span data-trigger-label class="${t ? "" : "search-select-placeholder"}">${t ? me(this._value) : e}</span>
578
749
  <i class="bi bi-calendar3" aria-hidden="true"></i>
579
750
  </button>
580
751
  <div class="datepicker-pop" role="dialog" aria-modal="false" hidden></div>
581
- </div>`, this._rendered = !0, z(this, this._value), this._wire();
752
+ </div>`, this._rendered = !0, W(this, this._value), this._wire();
582
753
  }
583
754
  _syncFormValue() {
584
- z(this, this._value);
755
+ W(this, this._value);
585
756
  }
586
757
  _syncTrigger() {
587
758
  let e = this.querySelector(".datepicker-trigger"), t = this.querySelector("[data-trigger-label]");
588
759
  if (!t) return;
589
- let n = q(this._value);
590
- t.textContent = n ? J(this._value) : this.getAttribute("placeholder") || "Enter Date", t.classList.toggle("search-select-placeholder", !n), e?.classList.toggle("has-value", !!n);
760
+ let n = J(this._value);
761
+ t.textContent = n ? me(this._value) : this.getAttribute("placeholder") || "Enter Date", t.classList.toggle("search-select-placeholder", !n), e?.classList.toggle("has-value", !!n);
591
762
  }
592
763
  _limits() {
593
- let e = q(this.getAttribute("min")), t = q(this.getAttribute("max")), n = e ? new Date(e.y, e.m, e.d).getTime() : -Infinity, r = t ? new Date(t.y, t.m, t.d).getTime() : Infinity;
764
+ let e = J(this.getAttribute("min")), t = J(this.getAttribute("max")), n = e ? new Date(e.y, e.m, e.d).getTime() : -Infinity, r = t ? new Date(t.y, t.m, t.d).getTime() : Infinity;
594
765
  return {
595
766
  dayDisabled: (e, t, i) => {
596
767
  let a = new Date(e, t, i).getTime();
@@ -598,7 +769,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
598
769
  },
599
770
  monthDisabled: (e, t) => {
600
771
  let i = new Date(e, t, 1).getTime();
601
- return new Date(e, t, Y(e, t)).getTime() < n || i > r;
772
+ return new Date(e, t, he(e, t)).getTime() < n || i > r;
602
773
  },
603
774
  yearDisabled: (e) => {
604
775
  let t = new Date(e, 0, 1).getTime();
@@ -611,28 +782,28 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
611
782
  e && (this._mode === "months" ? e.innerHTML = this._monthsHtml() : this._mode === "years" ? e.innerHTML = this._yearsHtml() : e.innerHTML = this._daysHtml(), this._focusActive());
612
783
  }
613
784
  _daysHtml() {
614
- let e = this._firstDay(), t = (new Date(this._viewY, this._viewM, 1).getDay() - e + 7) % 7, n = Y(this._viewY, this._viewM), r = q(this._value), i = /* @__PURE__ */ new Date(), { dayDisabled: a } = this._limits(), o = this._focus || r || {
785
+ let e = this._firstDay(), t = (new Date(this._viewY, this._viewM, 1).getDay() - e + 7) % 7, n = he(this._viewY, this._viewM), r = J(this._value), i = /* @__PURE__ */ new Date(), { dayDisabled: a } = this._limits(), o = this._focus || r || {
615
786
  y: this._viewY,
616
787
  m: this._viewM,
617
788
  d: 1
618
789
  }, s = (e, t, n, s) => {
619
- let c = K(e, t, n), l = r && r.y === e && r.m === t && r.d === n, u = i.getFullYear() === e && i.getMonth() === t && i.getDate() === n, d = o.y === e && o.m === t && o.d === n, f = a(e, t, n);
790
+ let c = pe(e, t, n), l = r && r.y === e && r.m === t && r.d === n, u = i.getFullYear() === e && i.getMonth() === t && i.getDate() === n, d = o.y === e && o.m === t && o.d === n, f = a(e, t, n);
620
791
  return `<button type="button" class="${[
621
792
  "datepicker-day",
622
793
  s ? "is-outside" : "",
623
794
  u ? "is-today" : "",
624
795
  l ? "is-selected" : ""
625
796
  ].filter(Boolean).join(" ")}" data-iso="${c}" role="gridcell" tabindex="${d && !f ? "0" : "-1"}"${l ? " aria-selected=\"true\"" : ""}${f ? " disabled aria-disabled=\"true\"" : ""}>${n}</button>`;
626
- }, c = "", l = X(this._viewY, this._viewM - 1), u = Y(l.y, l.m);
797
+ }, c = "", l = Y(this._viewY, this._viewM - 1), u = he(l.y, l.m);
627
798
  for (let e = t - 1; e >= 0; e--) c += s(l.y, l.m, u - e, !0);
628
799
  for (let e = 1; e <= n; e++) c += s(this._viewY, this._viewM, e, !1);
629
- let d = X(this._viewY, this._viewM + 1), f = (7 - (t + n) % 7) % 7;
800
+ let d = Y(this._viewY, this._viewM + 1), f = (7 - (t + n) % 7) % 7;
630
801
  for (let e = 1; e <= f; e++) c += s(d.y, d.m, e, !0);
631
- let p = W.map((t, n) => W[(n + e) % 7]).map((e) => `<span>${e}</span>`).join("");
802
+ let p = de.map((t, n) => de[(n + e) % 7]).map((e) => `<span>${e}</span>`).join("");
632
803
  return `
633
804
  <div class="datepicker-head">
634
805
  <button type="button" class="datepicker-nav-btn" data-nav="-1" aria-label="Previous month"><i class="bi bi-chevron-left" aria-hidden="true"></i></button>
635
- <button type="button" class="datepicker-month" data-view="months" aria-label="Choose month and year">${ie[this._viewM]} ${this._viewY}</button>
806
+ <button type="button" class="datepicker-month" data-view="months" aria-label="Choose month and year">${ue[this._viewM]} ${this._viewY}</button>
636
807
  <button type="button" class="datepicker-nav-btn" data-nav="1" aria-label="Next month"><i class="bi bi-chevron-right" aria-hidden="true"></i></button>
637
808
  </div>
638
809
  <div class="datepicker-weekdays">${p}</div>
@@ -643,14 +814,14 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
643
814
  </div>`;
644
815
  }
645
816
  _monthsHtml() {
646
- let e = q(this._value), t = /* @__PURE__ */ new Date(), { monthDisabled: n } = this._limits(), r = "";
817
+ let e = J(this._value), t = /* @__PURE__ */ new Date(), { monthDisabled: n } = this._limits(), r = "";
647
818
  for (let i = 0; i < 12; i++) {
648
819
  let a = e && e.y === this._viewY && e.m === i, o = t.getFullYear() === this._viewY && t.getMonth() === i, s = n(this._viewY, i), c = [
649
820
  "datepicker-cell",
650
821
  o ? "is-today" : "",
651
822
  a ? "is-selected" : ""
652
823
  ].filter(Boolean).join(" ");
653
- r += `<button type="button" class="${c}" data-month="${i}"${s ? " disabled" : ""}>${ie[i].slice(0, 3)}</button>`;
824
+ r += `<button type="button" class="${c}" data-month="${i}"${s ? " disabled" : ""}>${ue[i].slice(0, 3)}</button>`;
654
825
  }
655
826
  return `
656
827
  <div class="datepicker-head">
@@ -661,7 +832,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
661
832
  <div class="datepicker-cells">${r}</div>`;
662
833
  }
663
834
  _yearsHtml() {
664
- let e = q(this._value), t = (/* @__PURE__ */ new Date()).getFullYear(), { yearDisabled: n } = this._limits(), r = this._viewY - (this._viewY % 10 + 10) % 10 - 1, i = "";
835
+ let e = J(this._value), t = (/* @__PURE__ */ new Date()).getFullYear(), { yearDisabled: n } = this._limits(), r = this._viewY - (this._viewY % 10 + 10) % 10 - 1, i = "";
665
836
  for (let a = 0; a < 12; a++) {
666
837
  let o = r + a, s = e && e.y === o, c = t === o, l = n(o), u = [
667
838
  "datepicker-cell",
@@ -683,24 +854,24 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
683
854
  t && e.contains(document.activeElement) && t.focus();
684
855
  }
685
856
  _position(e, t) {
686
- F(e, t);
857
+ B(e, t);
687
858
  }
688
859
  _setFocus(e, t, n, r) {
689
- let { y: i, m: a } = X(e, t);
860
+ let { y: i, m: a } = Y(e, t);
690
861
  this._focus = {
691
862
  y: i,
692
863
  m: a,
693
864
  d: n
694
865
  };
695
866
  let o = i !== this._viewY || a !== this._viewM;
696
- this._viewY = i, this._viewM = a, this._slide = o && r || "", this._renderView(), this._slide = "", this.querySelector(`.datepicker-day[data-iso="${K(i, a, n)}"]`)?.focus();
867
+ this._viewY = i, this._viewM = a, this._slide = o && r || "", this._renderView(), this._slide = "", this.querySelector(`.datepicker-day[data-iso="${pe(i, a, n)}"]`)?.focus();
697
868
  }
698
869
  _onKey(e) {
699
870
  if (this._mode !== "days") {
700
871
  e.key === "Escape" && this._close();
701
872
  return;
702
873
  }
703
- let t = this._focus || q(this._value) || {
874
+ let t = this._focus || J(this._value) || {
704
875
  y: this._viewY,
705
876
  m: this._viewM,
706
877
  d: 1
@@ -718,17 +889,17 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
718
889
  case "End": return n(6 - (new Date(t.y, t.m, t.d).getDay() - this._firstDay() + 7) % 7, "slide-next");
719
890
  case "PageUp": {
720
891
  e.preventDefault();
721
- let n = X(t.y, t.m - (e.shiftKey ? 12 : 1));
722
- return this._setFocus(n.y, n.m, Math.min(t.d, Y(n.y, n.m)), "slide-prev");
892
+ let n = Y(t.y, t.m - (e.shiftKey ? 12 : 1));
893
+ return this._setFocus(n.y, n.m, Math.min(t.d, he(n.y, n.m)), "slide-prev");
723
894
  }
724
895
  case "PageDown": {
725
896
  e.preventDefault();
726
- let n = X(t.y, t.m + (e.shiftKey ? 12 : 1));
727
- return this._setFocus(n.y, n.m, Math.min(t.d, Y(n.y, n.m)), "slide-next");
897
+ let n = Y(t.y, t.m + (e.shiftKey ? 12 : 1));
898
+ return this._setFocus(n.y, n.m, Math.min(t.d, he(n.y, n.m)), "slide-next");
728
899
  }
729
900
  case "Enter":
730
901
  case " ":
731
- e.preventDefault(), this._limits().dayDisabled(t.y, t.m, t.d) || (this.value = K(t.y, t.m, t.d), this._close());
902
+ e.preventDefault(), this._limits().dayDisabled(t.y, t.m, t.d) || (this.value = pe(t.y, t.m, t.d), this._close());
732
903
  return;
733
904
  case "Escape": return this._close();
734
905
  default:
@@ -739,11 +910,11 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
739
910
  if (!e || !t) return;
740
911
  let r = () => !t.hidden;
741
912
  this._open = () => {
742
- if (!q(this._value) && !this._viewNavigated) {
913
+ if (!J(this._value) && !this._viewNavigated) {
743
914
  let e = /* @__PURE__ */ new Date();
744
915
  this._viewY = e.getFullYear(), this._viewM = e.getMonth();
745
916
  }
746
- let r = q(this._value), i = /* @__PURE__ */ new Date();
917
+ let r = J(this._value), i = /* @__PURE__ */ new Date();
747
918
  this._mode = "days", this._focus = r || {
748
919
  y: this._viewY,
749
920
  m: this._viewM,
@@ -756,7 +927,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
756
927
  let t = e.target.closest("[data-nav]");
757
928
  if (t) {
758
929
  this._viewNavigated = !0, this._slide = Number(t.dataset.nav) < 0 ? "slide-prev" : "slide-next";
759
- let e = X(this._viewY, this._viewM + Number(t.dataset.nav));
930
+ let e = Y(this._viewY, this._viewM + Number(t.dataset.nav));
760
931
  this._viewY = e.y, this._viewM = e.m, this._focus = {
761
932
  y: e.y,
762
933
  m: e.m,
@@ -795,7 +966,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
795
966
  }
796
967
  if (e.target.closest("[data-today]")) {
797
968
  let e = /* @__PURE__ */ new Date();
798
- this.value = K(e.getFullYear(), e.getMonth(), e.getDate()), this._close();
969
+ this.value = pe(e.getFullYear(), e.getMonth(), e.getDate()), this._close();
799
970
  return;
800
971
  }
801
972
  if (e.target.closest("[data-clear]")) {
@@ -809,14 +980,14 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
809
980
  }, t.addEventListener("keydown", this._onKeyBound), this._onDocClick = (e) => {
810
981
  let t = this._popClick;
811
982
  this._popClick = !1, r() && !t && !this.contains(e.target) && this._close();
812
- }, document.addEventListener("click", this._onDocClick), I(this, () => {
983
+ }, document.addEventListener("click", this._onDocClick), V(this, () => {
813
984
  r() && this._position(e, t);
814
985
  }), this._syncFormValue();
815
986
  }
816
987
  disconnectedCallback() {
817
- this._onDocClick && document.removeEventListener("click", this._onDocClick), L(this);
988
+ this._onDocClick && document.removeEventListener("click", this._onDocClick), H(this);
818
989
  }
819
- }, oe = [
990
+ }, _e = [
820
991
  "January",
821
992
  "February",
822
993
  "March",
@@ -829,7 +1000,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
829
1000
  "October",
830
1001
  "November",
831
1002
  "December"
832
- ], se = [
1003
+ ], ve = [
833
1004
  "Su",
834
1005
  "Mo",
835
1006
  "Tu",
@@ -837,24 +1008,24 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
837
1008
  "Th",
838
1009
  "Fr",
839
1010
  "Sa"
840
- ], ce = (e) => String(e).padStart(2, "0"), le = (e, t, n) => `${e}-${ce(t + 1)}-${ce(n)}`, ue = (e) => {
1011
+ ], ye = (e) => String(e).padStart(2, "0"), be = (e, t, n) => `${e}-${ye(t + 1)}-${ye(n)}`, xe = (e) => {
841
1012
  let t = /^(\d{4})-(\d{2})-(\d{2})$/.exec(e || "");
842
1013
  return t ? {
843
1014
  y: +t[1],
844
1015
  m: t[2] - 1,
845
1016
  d: +t[3]
846
1017
  } : null;
847
- }, de = (e) => {
848
- let t = ue(e);
849
- return t ? `${ce(t.d)} ${oe[t.m].slice(0, 3)} ${t.y}` : "";
850
- }, fe = (e, t) => new Date(e, t + 1, 0).getDate(), pe = (e, t) => {
1018
+ }, Se = (e) => {
1019
+ let t = xe(e);
1020
+ return t ? `${ye(t.d)} ${_e[t.m].slice(0, 3)} ${t.y}` : "";
1021
+ }, Ce = (e, t) => new Date(e, t + 1, 0).getDate(), we = (e, t) => {
851
1022
  for (; t < 0;) t += 12, --e;
852
1023
  for (; t > 11;) t -= 12, e += 1;
853
1024
  return {
854
1025
  y: e,
855
1026
  m: t
856
1027
  };
857
- }, me = class extends HTMLElement {
1028
+ }, Te = class extends HTMLElement {
858
1029
  static get observedAttributes() {
859
1030
  return [
860
1031
  "start",
@@ -897,13 +1068,13 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
897
1068
  text: e,
898
1069
  empty: !0
899
1070
  } : {
900
- text: `${de(this._start) || "Start"} – ${de(this._end) || "End"}`,
1071
+ text: `${Se(this._start) || "Start"} – ${Se(this._end) || "End"}`,
901
1072
  empty: !1
902
1073
  };
903
1074
  }
904
1075
  render() {
905
1076
  this._start = this.getAttribute("start") || this._start, this._end = this.getAttribute("end") || this._end;
906
- let e = ue(this._start);
1077
+ let e = xe(this._start);
907
1078
  e && (this._viewY = e.y, this._viewM = e.m);
908
1079
  let t = this.getAttribute("size"), n = t === "sm" ? " input-sm" : t === "lg" ? " input-lg" : "", { text: r, empty: i } = this._label();
909
1080
  this.innerHTML = `
@@ -931,24 +1102,24 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
931
1102
  r || (r = document.createElement("input"), r.type = "hidden", r.setAttribute("data-range-mirror", e), this.appendChild(r)), r.name = t, r.value = n || "";
932
1103
  }
933
1104
  _limits() {
934
- let e = ue(this.getAttribute("min")), t = ue(this.getAttribute("max")), n = e ? new Date(e.y, e.m, e.d).getTime() : -Infinity, r = t ? new Date(t.y, t.m, t.d).getTime() : Infinity;
1105
+ let e = xe(this.getAttribute("min")), t = xe(this.getAttribute("max")), n = e ? new Date(e.y, e.m, e.d).getTime() : -Infinity, r = t ? new Date(t.y, t.m, t.d).getTime() : Infinity;
935
1106
  return (e, t, i) => {
936
1107
  let a = new Date(e, t, i).getTime();
937
1108
  return a < n || a > r;
938
1109
  };
939
1110
  }
940
1111
  _monthHtml(e, t) {
941
- let n = this._firstDay(), r = (new Date(e, t, 1).getDay() - n + 7) % 7, i = fe(e, t), a = this._limits(), o = se.map((e, t) => se[(t + n) % 7]).map((e) => `<span>${e}</span>`).join(""), s = (e, t, n, r) => {
942
- let i = le(e, t, n), o = a(e, t, n);
1112
+ let n = this._firstDay(), r = (new Date(e, t, 1).getDay() - n + 7) % 7, i = Ce(e, t), a = this._limits(), o = ve.map((e, t) => ve[(t + n) % 7]).map((e) => `<span>${e}</span>`).join(""), s = (e, t, n, r) => {
1113
+ let i = be(e, t, n), o = a(e, t, n);
943
1114
  return `<button type="button" class="${["datepicker-day", r ? "is-outside" : ""].filter(Boolean).join(" ")}" data-iso="${i}"${o ? " disabled" : ""}>${n}</button>`;
944
- }, c = "", l = pe(e, t - 1), u = fe(l.y, l.m);
1115
+ }, c = "", l = we(e, t - 1), u = Ce(l.y, l.m);
945
1116
  for (let e = r - 1; e >= 0; e--) c += s(l.y, l.m, u - e, !0);
946
1117
  for (let n = 1; n <= i; n++) c += s(e, t, n, !1);
947
- let d = pe(e, t + 1), f = (7 - (r + i) % 7) % 7;
1118
+ let d = we(e, t + 1), f = (7 - (r + i) % 7) % 7;
948
1119
  for (let e = 1; e <= f; e++) c += s(d.y, d.m, e, !0);
949
1120
  return `
950
1121
  <div class="daterange-cal">
951
- <div class="datepicker-month-label">${oe[t]} ${e}</div>
1122
+ <div class="datepicker-month-label">${_e[t]} ${e}</div>
952
1123
  <div class="datepicker-weekdays">${o}</div>
953
1124
  <div class="datepicker-grid" role="grid">${c}</div>
954
1125
  </div>`;
@@ -956,7 +1127,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
956
1127
  _renderView() {
957
1128
  let e = this.querySelector(".daterange-pop");
958
1129
  if (!e) return;
959
- let t = pe(this._viewY, this._viewM + 1);
1130
+ let t = we(this._viewY, this._viewM + 1);
960
1131
  e.innerHTML = `
961
1132
  <div class="daterange-head">
962
1133
  <button type="button" class="datepicker-nav-btn" data-nav="-1" aria-label="Previous month"><i class="bi bi-chevron-left" aria-hidden="true"></i></button>
@@ -982,10 +1153,10 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
982
1153
  n.classList.toggle("is-range-start", i), n.classList.toggle("is-range-end", a), n.classList.toggle("in-range", o);
983
1154
  }
984
1155
  let i = e.querySelector("[data-range-hint]");
985
- i && (i.textContent = this._start ? this._end ? `${de(this._start)} – ${de(this._end)}` : "Pick an end date" : "Pick a start date");
1156
+ i && (i.textContent = this._start ? this._end ? `${Se(this._start)} – ${Se(this._end)}` : "Pick an end date" : "Pick a start date");
986
1157
  }
987
1158
  _position(e, t) {
988
- F(e, t);
1159
+ B(e, t);
989
1160
  }
990
1161
  _pick(e) {
991
1162
  if (!this._start || this._start && this._end) {
@@ -1003,7 +1174,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
1003
1174
  if (!e || !t) return;
1004
1175
  let r = () => !t.hidden;
1005
1176
  this._open = () => {
1006
- let r = ue(this._start);
1177
+ let r = xe(this._start);
1007
1178
  if (r) this._viewY = r.y, this._viewM = r.m;
1008
1179
  else {
1009
1180
  let e = /* @__PURE__ */ new Date();
@@ -1016,7 +1187,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
1016
1187
  this._popClick = !0;
1017
1188
  let t = e.target.closest("[data-nav]");
1018
1189
  if (t) {
1019
- let e = pe(this._viewY, this._viewM + Number(t.dataset.nav));
1190
+ let e = we(this._viewY, this._viewM + Number(t.dataset.nav));
1020
1191
  this._viewY = e.y, this._viewM = e.m, this._renderView();
1021
1192
  return;
1022
1193
  }
@@ -1034,14 +1205,14 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
1034
1205
  this._popClick = !1, r() && !t && !this.contains(e.target) && this._close();
1035
1206
  }, document.addEventListener("click", this._onDocClick), this._onDocKey = (e) => {
1036
1207
  r() && e.key === "Escape" && this._close();
1037
- }, document.addEventListener("keydown", this._onDocKey), I(this, () => {
1208
+ }, document.addEventListener("keydown", this._onDocKey), V(this, () => {
1038
1209
  r() && this._position(e, t);
1039
1210
  }), this._syncMirrors();
1040
1211
  }
1041
1212
  disconnectedCallback() {
1042
- this._onDocClick && document.removeEventListener("click", this._onDocClick), this._onDocKey && document.removeEventListener("keydown", this._onDocKey), L(this);
1213
+ this._onDocClick && document.removeEventListener("click", this._onDocClick), this._onDocKey && document.removeEventListener("keydown", this._onDocKey), H(this);
1043
1214
  }
1044
- }, he = class extends HTMLElement {
1215
+ }, Ee = class extends HTMLElement {
1045
1216
  _accessibleName() {
1046
1217
  return this.getAttribute("aria-label") || this.getAttribute("placeholder") || "Select";
1047
1218
  }
@@ -1076,7 +1247,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
1076
1247
  return this._values.slice();
1077
1248
  }
1078
1249
  set values(e) {
1079
- this._values = Array.isArray(e) ? e.map(String) : [], z(this, this._values.join(",")), this._rendered && this._renderControl();
1250
+ this._values = Array.isArray(e) ? e.map(String) : [], W(this, this._values.join(",")), this._rendered && this._renderControl();
1080
1251
  }
1081
1252
  set options(e) {
1082
1253
  this._optionsProp = Array.isArray(e) ? e : null, this.isConnected && this.render();
@@ -1091,7 +1262,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
1091
1262
  value: e.getAttribute("value") ?? e.textContent.trim(),
1092
1263
  label: e.innerHTML,
1093
1264
  icon: e.getAttribute("icon") || void 0,
1094
- [B]: !0,
1265
+ [oe]: !0,
1095
1266
  selected: e.hasAttribute("selected")
1096
1267
  })));
1097
1268
  }
@@ -1104,34 +1275,34 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
1104
1275
  }
1105
1276
  _labelHtmlFor(e) {
1106
1277
  let t = this._readOptions().find((t) => String(t.value) === String(e));
1107
- return t ? H(t) : V(e);
1278
+ return t ? q(t) : G(e);
1108
1279
  }
1109
1280
  render() {
1110
1281
  this._snapshotDeclared();
1111
1282
  let e = this.hasAttribute("searchable"), t = this.getAttribute("search-placeholder") || "Search…", n = this.getAttribute("icon"), r = this.getAttribute("size"), i = r === "sm" ? " search-select-sm" : r === "lg" ? " search-select-lg" : "";
1112
- z(this, this._values.join(",")), this.innerHTML = `
1283
+ W(this, this._values.join(",")), this.innerHTML = `
1113
1284
  <div class="search-select${i}">
1114
- <div class="input search-select-control search-select-multi" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-label="${ge(this._accessibleName())}"${this.hasAttribute("disabled") ? " aria-disabled=\"true\"" : ""}>
1115
- ${n ? `<i class="bi bi-${ge(n)} search-select-icon" aria-hidden="true"></i>` : ""}
1285
+ <div class="input search-select-control search-select-multi" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-label="${De(this._accessibleName())}"${this.hasAttribute("disabled") ? " aria-disabled=\"true\"" : ""}>
1286
+ ${n ? `<i class="bi bi-${De(n)} search-select-icon" aria-hidden="true"></i>` : ""}
1116
1287
  <div class="ms-chips" data-chips></div>
1117
1288
  <i class="bi bi-chevron-down search-select-caret" aria-hidden="true"></i>
1118
1289
  </div>
1119
1290
  <div class="search-select-menu search-select-menu-fixed" role="listbox" aria-multiselectable="true" tabindex="-1" hidden>
1120
- ${e ? `<div class="search-select-search"><i class="bi bi-search" aria-hidden="true"></i><input class="search-select-input" placeholder="${ge(t)}" aria-autocomplete="list" /><button type="button" class="search-select-clear" aria-label="Clear search" hidden><i class="bi bi-x" aria-hidden="true"></i></button></div>` : ""}
1291
+ ${e ? `<div class="search-select-search"><i class="bi bi-search" aria-hidden="true"></i><input class="search-select-input" placeholder="${De(t)}" aria-autocomplete="list" /><button type="button" class="search-select-clear" aria-label="Clear search" hidden><i class="bi bi-x" aria-hidden="true"></i></button></div>` : ""}
1121
1292
  <div class="search-select-options"></div>
1122
1293
  <div class="search-select-empty" hidden>No matches</div>
1123
1294
  </div>
1124
- </div>`, this._rendered = !0, z(this, this._values.join(",")), this._renderControl(), this._renderOptions(), this._wire();
1295
+ </div>`, this._rendered = !0, W(this, this._values.join(",")), this._renderControl(), this._renderOptions(), this._wire();
1125
1296
  }
1126
1297
  _renderControl() {
1127
1298
  let e = this.querySelector("[data-chips]");
1128
1299
  if (!e) return;
1129
1300
  let t = this.getAttribute("placeholder") || "Select…";
1130
1301
  if (!this._values.length) {
1131
- e.innerHTML = `<span class="search-select-placeholder">${V(t)}</span>`;
1302
+ e.innerHTML = `<span class="search-select-placeholder">${G(t)}</span>`;
1132
1303
  return;
1133
1304
  }
1134
- e.innerHTML = this._values.map((e) => `<span class="chip chip-sm"><span class="chip-label">${this._labelHtmlFor(e)}</span><button type="button" class="chip-remove" data-remove="${ge(e)}" aria-label="Remove"><i class="bi bi-x" aria-hidden="true"></i></button></span>`).join(""), this._collapseChips();
1305
+ e.innerHTML = this._values.map((e) => `<span class="chip chip-sm"><span class="chip-label">${this._labelHtmlFor(e)}</span><button type="button" class="chip-remove" data-remove="${De(e)}" aria-label="Remove"><i class="bi bi-x" aria-hidden="true"></i></button></span>`).join(""), this._collapseChips();
1135
1306
  }
1136
1307
  _collapseChips() {
1137
1308
  let e = this.querySelector("[data-chips]");
@@ -1155,9 +1326,9 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
1155
1326
  let t = this.querySelector(".search-select-options"), n = this.querySelector(".search-select-empty");
1156
1327
  if (!t) return;
1157
1328
  let r = (e || "").trim().toLowerCase(), i = this._readOptions();
1158
- r && (i = i.filter((e) => _e(e.label).toLowerCase().includes(r))), t.innerHTML = i.map((e) => {
1329
+ r && (i = i.filter((e) => Oe(e.label).toLowerCase().includes(r))), t.innerHTML = i.map((e) => {
1159
1330
  let t = this._values.includes(String(e.value));
1160
- return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${ge(e.value)}" aria-selected="${t}"><span class="ms-opt-label">${H(e)}</span><span class="ms-check"><i class="bi bi-check" aria-hidden="true"></i></span></button>`;
1331
+ return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${De(e.value)}" aria-selected="${t}"><span class="ms-opt-label">${q(e)}</span><span class="ms-check"><i class="bi bi-check" aria-hidden="true"></i></span></button>`;
1161
1332
  }).join(""), n && (n.hidden = i.length > 0), this._active = -1;
1162
1333
  }
1163
1334
  _wire() {
@@ -1165,7 +1336,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
1165
1336
  if (!e || !t) return;
1166
1337
  let a = () => this.hasAttribute("disabled");
1167
1338
  !this._ro && typeof ResizeObserver < "u" && (this._ro = new ResizeObserver(() => this._collapseChips()), this._ro.observe(this));
1168
- let o = () => F(e, t, { matchWidth: !0 }), s = () => [...this.querySelectorAll(".search-select-option")], c = () => s().filter((e) => !e.hidden), l = (e) => {
1339
+ let o = () => B(e, t, { matchWidth: !0 }), s = () => [...this.querySelectorAll(".search-select-option")], c = () => s().filter((e) => !e.hidden), l = (e) => {
1169
1340
  let t = c();
1170
1341
  this._active = e;
1171
1342
  for (let e of s()) e.classList.remove("is-active");
@@ -1175,7 +1346,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
1175
1346
  }, f = () => {
1176
1347
  t.hidden = !0, e.setAttribute("aria-expanded", "false"), e.classList.remove("open"), l(-1);
1177
1348
  }, p = () => {
1178
- z(this, this._values.join(",")), this.dispatchEvent(new Event("change", { bubbles: !0 }));
1349
+ W(this, this._values.join(",")), this.dispatchEvent(new Event("change", { bubbles: !0 }));
1179
1350
  }, m = (e) => {
1180
1351
  let t = String(e);
1181
1352
  this._values.includes(t) ? this._values = this._values.filter((e) => e !== t) : this._values = [...this._values, t], this._renderControl(), this._renderOptions(n ? n.value : ""), p();
@@ -1212,14 +1383,14 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
1212
1383
  (e.key === "ArrowDown" || e.key === "Enter" || e.key === " ") && (e.preventDefault(), d());
1213
1384
  }), this._onDocClick = (e) => {
1214
1385
  u() && !this.contains(e.target) && f();
1215
- }, document.addEventListener("click", this._onDocClick), I(this, () => {
1386
+ }, document.addEventListener("click", this._onDocClick), V(this, () => {
1216
1387
  u() && o();
1217
1388
  });
1218
1389
  }
1219
1390
  disconnectedCallback() {
1220
- this._onDocClick && document.removeEventListener("click", this._onDocClick), L(this), this._ro?.disconnect(), this._ro = null;
1391
+ this._onDocClick && document.removeEventListener("click", this._onDocClick), H(this), this._ro?.disconnect(), this._ro = null;
1221
1392
  }
1222
- }, ge = (e) => String(e ?? "").replace(/"/g, "&quot;").replace(/</g, "&lt;"), _e = (e) => String(e ?? "").replace(/<[^>]*>/g, ""), ve = /[^0-9]/g, ye = /[^0-9a-zA-Z]/g, be = class extends HTMLElement {
1393
+ }, De = (e) => String(e ?? "").replace(/"/g, "&quot;").replace(/</g, "&lt;"), Oe = (e) => String(e ?? "").replace(/<[^>]*>/g, ""), ke = /[^0-9]/g, Ae = /[^0-9a-zA-Z]/g, je = class extends HTMLElement {
1223
1394
  static get observedAttributes() {
1224
1395
  return [
1225
1396
  "value",
@@ -1246,16 +1417,16 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
1246
1417
  return this._value ?? "";
1247
1418
  }
1248
1419
  set value(e) {
1249
- this._value = this._clean(e), z(this, this._value), this._paint();
1420
+ this._value = this._clean(e), W(this, this._value), this._paint();
1250
1421
  }
1251
1422
  _clean(e) {
1252
- return (e == null ? "" : String(e)).replace(this.mode === "alphanumeric" ? ye : ve, "").slice(0, this.length);
1423
+ return (e == null ? "" : String(e)).replace(this.mode === "alphanumeric" ? Ae : ke, "").slice(0, this.length);
1253
1424
  }
1254
1425
  connectedCallback() {
1255
1426
  this._rendered || this.render();
1256
1427
  }
1257
1428
  attributeChangedCallback(e, t, n) {
1258
- this._rendered && (e === "value" ? (this._value = this._clean(n), z(this, this._value), this._paint()) : this.render());
1429
+ this._rendered && (e === "value" ? (this._value = this._clean(n), W(this, this._value), this._paint()) : this.render());
1259
1430
  }
1260
1431
  render() {
1261
1432
  this._value = this._clean(this.getAttribute("value") ?? this._value);
@@ -1273,7 +1444,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
1273
1444
  spellcheck="false"
1274
1445
  ${n ? "disabled" : ""} />
1275
1446
  <div class="otp-slots" aria-hidden="true">${r}</div>
1276
- </div>`, this._rendered = !0, z(this, this._value), this._wire(), this._paint();
1447
+ </div>`, this._rendered = !0, W(this, this._value), this._wire(), this._paint();
1277
1448
  }
1278
1449
  _refs() {
1279
1450
  return {
@@ -1295,7 +1466,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
1295
1466
  if (!e) return;
1296
1467
  let t = (e) => {
1297
1468
  let t = this._clean(e), n = t !== this._value;
1298
- this._value = t, z(this, this._value), this._paint(), n && this.dispatchEvent(new Event("change", { bubbles: !0 })), n && t.length === this.length && this.dispatchEvent(new CustomEvent("complete", {
1469
+ this._value = t, W(this, this._value), this._paint(), n && this.dispatchEvent(new Event("change", { bubbles: !0 })), n && t.length === this.length && this.dispatchEvent(new CustomEvent("complete", {
1299
1470
  bubbles: !0,
1300
1471
  detail: t
1301
1472
  }));
@@ -1315,7 +1486,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
1315
1486
  document.activeElement === e && this._paint();
1316
1487
  });
1317
1488
  }
1318
- }, xe = [
1489
+ }, Me = [
1319
1490
  [
1320
1491
  "AF",
1321
1492
  "Afghanistan",
@@ -2541,56 +2712,56 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
2541
2712
  "Zimbabwe",
2542
2713
  "263"
2543
2714
  ]
2544
- ], Se = (e) => (xe.find((t) => t[0] === e) || [
2715
+ ], Ne = (e) => (Me.find((t) => t[0] === e) || [
2545
2716
  "",
2546
2717
  "",
2547
2718
  ""
2548
- ])[2], Ce = (e) => `wui-flag wui-flag-${String(e).toLowerCase()}`, Z = null, we = null;
2549
- function Te() {
2550
- return Z ? Promise.resolve(Z) : (we ||= Promise.all([import("./libphonenumber-js-BcNT8oq0-DMpMlice.js"), import("./examples.mobile.json-BMXTGiGC-Dl_Tt3py.js")]).then(([e, t]) => (Z = {
2719
+ ])[2], Pe = (e) => `wui-flag wui-flag-${String(e).toLowerCase()}`, X = null, Fe = null;
2720
+ function Ie() {
2721
+ return X ? Promise.resolve(X) : (Fe ||= Promise.all([import("./libphonenumber-js-BcNT8oq0-DMpMlice.js"), import("./examples.mobile.json-BMXTGiGC-Dl_Tt3py.js")]).then(([e, t]) => (X = {
2551
2722
  AsYouType: e.AsYouType,
2552
2723
  getExampleNumber: e.getExampleNumber,
2553
2724
  isValidPhoneNumber: e.isValidPhoneNumber,
2554
2725
  examples: t.default || t
2555
- }, Z)).catch(() => null), we);
2726
+ }, X)).catch(() => null), Fe);
2556
2727
  }
2557
- function Ee(e, t) {
2558
- if (!Z || !t) return t;
2728
+ function Le(e, t) {
2729
+ if (!X || !t) return t;
2559
2730
  try {
2560
- return new Z.AsYouType(e).input(t);
2731
+ return new X.AsYouType(e).input(t);
2561
2732
  } catch {
2562
2733
  return t;
2563
2734
  }
2564
2735
  }
2565
- function De(e) {
2566
- if (!Z) return null;
2736
+ function Re(e) {
2737
+ if (!X) return null;
2567
2738
  try {
2568
- return Z.getExampleNumber(e, Z.examples)?.formatNational() || null;
2739
+ return X.getExampleNumber(e, X.examples)?.formatNational() || null;
2569
2740
  } catch {
2570
2741
  return null;
2571
2742
  }
2572
2743
  }
2573
- function Oe(e) {
2574
- if (!Z || !e) return null;
2744
+ function ze(e) {
2745
+ if (!X || !e) return null;
2575
2746
  try {
2576
- return Z.isValidPhoneNumber(e);
2747
+ return X.isValidPhoneNumber(e);
2577
2748
  } catch {
2578
2749
  return null;
2579
2750
  }
2580
2751
  }
2581
- function ke(e) {
2582
- if (!Z) return null;
2752
+ function Be(e) {
2753
+ if (!X) return null;
2583
2754
  try {
2584
- let t = Z.getExampleNumber(e, Z.examples);
2755
+ let t = X.getExampleNumber(e, X.examples);
2585
2756
  return t?.nationalNumber ? t.nationalNumber.length : null;
2586
2757
  } catch {
2587
2758
  return null;
2588
2759
  }
2589
2760
  }
2590
- function Ae(e) {
2591
- if (!Z || !e?.trim().startsWith("+")) return null;
2761
+ function Ve(e) {
2762
+ if (!X || !e?.trim().startsWith("+")) return null;
2592
2763
  try {
2593
- let t = new Z.AsYouType();
2764
+ let t = new X.AsYouType();
2594
2765
  t.input(e.trim());
2595
2766
  let n = t.getCountry();
2596
2767
  return n ? {
@@ -2601,7 +2772,7 @@ function Ae(e) {
2601
2772
  return null;
2602
2773
  }
2603
2774
  }
2604
- var je = class extends HTMLElement {
2775
+ var He = class extends HTMLElement {
2605
2776
  static get observedAttributes() {
2606
2777
  return [
2607
2778
  "value",
@@ -2620,40 +2791,40 @@ var je = class extends HTMLElement {
2620
2791
  this._rendered && (e === "country" && (this._country = n || "IN"), this.render());
2621
2792
  }
2622
2793
  get value() {
2623
- return `+${Se(this._country)}${this._national}`;
2794
+ return `+${Ne(this._country)}${this._national}`;
2624
2795
  }
2625
2796
  set value(e) {
2626
- let t = String(e ?? "").trim(), n = Ae(t);
2797
+ let t = String(e ?? "").trim(), n = Ve(t);
2627
2798
  if (n) this._country = n.country, this._national = n.national.replace(/[^0-9]/g, "");
2628
2799
  else if (t.startsWith("+")) {
2629
- let e = t.replace(/[^0-9]/g, ""), n = String(Se(this._country));
2800
+ let e = t.replace(/[^0-9]/g, ""), n = String(Ne(this._country));
2630
2801
  n && e.startsWith(n) && (e = e.slice(n.length)), this._national = e;
2631
2802
  } else this._national = t.replace(/[^0-9]/g, "");
2632
2803
  n && this.getAttribute("country") !== this._country ? this.setAttribute("country", this._country) : this._rendered && this.render(), this._commit();
2633
2804
  }
2634
2805
  _commit() {
2635
- z(this, this.value), this.dispatchEvent(new Event("change", { bubbles: !0 }));
2806
+ W(this, this.value), this.dispatchEvent(new Event("change", { bubbles: !0 }));
2636
2807
  }
2637
2808
  render() {
2638
- let e = this.getAttribute("placeholder") || De(this._country) || "Enter phone number";
2809
+ let e = this.getAttribute("placeholder") || Re(this._country) || "Enter phone number";
2639
2810
  this._country = this.getAttribute("country") || this._country;
2640
- let t = xe.map(([e, t, n]) => `<button type="button" role="option" class="country-dropdown-item${e === this._country ? " selected" : ""}" data-iso="${e}"><span class="${Ce(e)}" aria-hidden="true"></span><span class="country-name-text">${t}<span class="country-code-text">+${n}</span></span></button>`).join("");
2811
+ let t = Me.map(([e, t, n]) => `<button type="button" role="option" class="country-dropdown-item${e === this._country ? " selected" : ""}" data-iso="${e}"><span class="${Pe(e)}" aria-hidden="true"></span><span class="country-name-text">${t}<span class="country-code-text">+${n}</span></span></button>`).join("");
2641
2812
  this.innerHTML = `
2642
2813
  <div class="phone-input-wrap">
2643
2814
  <div class="phone-country-adornment">
2644
2815
  <button type="button" class="country-toggle" aria-haspopup="listbox" aria-expanded="false"${this.hasAttribute("disabled") ? " disabled" : ""}>
2645
- <span class="${Ce(this._country)}" data-flag aria-hidden="true"></span>
2816
+ <span class="${Pe(this._country)}" data-flag aria-hidden="true"></span>
2646
2817
  <i class="bi bi-chevron-down phone-chevron" aria-hidden="true"></i>
2647
- <span class="phone-dial" data-dial>+${Se(this._country)}</span>
2818
+ <span class="phone-dial" data-dial>+${Ne(this._country)}</span>
2648
2819
  </button>
2649
2820
  <div class="country-dropdown-menu" role="listbox" hidden>
2650
2821
  <div class="dropdown-search-wrapper"><span class="dropdown-search-icon"><i class="bi bi-search" aria-hidden="true"></i></span><input type="text" class="dropdown-search-input" placeholder="Search country or code" aria-label="Search countries" /></div>
2651
2822
  <div class="country-list-scroll">${t}<div class="country-empty" hidden>No countries found</div></div>
2652
2823
  </div>
2653
2824
  </div>
2654
- <input type="tel" class="input" placeholder="${Me(e)}" value="${Me(Ee(this._country, this._national))}"${this.hasAttribute("disabled") ? " disabled" : ""} />
2825
+ <input type="tel" class="input" placeholder="${Ue(e)}" value="${Ue(Le(this._country, this._national))}"${this.hasAttribute("disabled") ? " disabled" : ""} />
2655
2826
  </div>
2656
- <div class="field-error" data-phone-error hidden></div>`, this._rendered = !0, z(this, this.value), this._wire();
2827
+ <div class="field-error" data-phone-error hidden></div>`, this._rendered = !0, W(this, this.value), this._wire();
2657
2828
  }
2658
2829
  _wire() {
2659
2830
  let e = this.querySelector(".country-toggle"), t = this.querySelector(".phone-input-wrap"), n = this.querySelector(".country-dropdown-menu"), r = this.querySelector(".dropdown-search-input"), i = this.querySelector(".country-list-scroll"), a = this.querySelector(".country-empty"), o = this.querySelector("input[type=tel]"), s = this.querySelector("[data-flag]"), c = this.querySelector("[data-dial]");
@@ -2677,7 +2848,7 @@ var je = class extends HTMLElement {
2677
2848
  }
2678
2849
  a && (a.hidden = n > 0);
2679
2850
  }, m = (e) => {
2680
- this._country = e, this.setAttribute("country", e), s && (s.className = Ce(e)), c && (c.textContent = `+${Se(e)}`);
2851
+ this._country = e, this.setAttribute("country", e), s && (s.className = Pe(e)), c && (c.textContent = `+${Ne(e)}`);
2681
2852
  for (let t of i.querySelectorAll(".country-dropdown-item")) t.classList.toggle("selected", t.dataset.iso === e);
2682
2853
  f(), this._commit();
2683
2854
  };
@@ -2688,35 +2859,35 @@ var je = class extends HTMLElement {
2688
2859
  let h = this.querySelector("[data-phone-error]"), g = (e) => {
2689
2860
  if (o.classList.toggle("is-invalid", e), e ? o.setAttribute("aria-invalid", "true") : o.removeAttribute("aria-invalid"), h) {
2690
2861
  if (e) {
2691
- let e = De(this._country);
2862
+ let e = Re(this._country);
2692
2863
  h.textContent = e ? `Enter a valid phone number, e.g. ${e}` : "Enter a valid phone number";
2693
2864
  }
2694
2865
  h.hidden = !e;
2695
2866
  }
2696
2867
  };
2697
2868
  o.addEventListener("input", () => {
2698
- let e = o.value.replace(/[^0-9]/g, ""), t = ke(this._country);
2869
+ let e = o.value.replace(/[^0-9]/g, ""), t = Be(this._country);
2699
2870
  t && e.length > t && (e = e.slice(0, t)), this._national = e;
2700
- let n = Ee(this._country, this._national);
2701
- o.value !== n && (o.value = n), this._commit(), o.classList.contains("is-invalid") && (!this._national || Oe(this.value) === !0) && g(!1);
2871
+ let n = Le(this._country, this._national);
2872
+ o.value !== n && (o.value = n), this._commit(), o.classList.contains("is-invalid") && (!this._national || ze(this.value) === !0) && g(!1);
2702
2873
  }), o.addEventListener("blur", () => {
2703
- g(this._national.length > 0 && Oe(this.value) === !1);
2874
+ g(this._national.length > 0 && ze(this.value) === !1);
2704
2875
  }), o.addEventListener("paste", (e) => {
2705
- let t = Ae(e.clipboardData?.getData("text"));
2706
- t && (e.preventDefault(), this._national = t.national.replace(/[^0-9]/g, ""), t.country === this._country ? o.value = Ee(this._country, this._national) : this.setAttribute("country", t.country), this._commit(), this.querySelector("input[type=tel]")?.focus());
2876
+ let t = Ve(e.clipboardData?.getData("text"));
2877
+ t && (e.preventDefault(), this._national = t.national.replace(/[^0-9]/g, ""), t.country === this._country ? o.value = Le(this._country, this._national) : this.setAttribute("country", t.country), this._commit(), this.querySelector("input[type=tel]")?.focus());
2707
2878
  }), this._onDocClick = (e) => {
2708
2879
  l() && !this.contains(e.target) && f();
2709
- }, document.addEventListener("click", this._onDocClick), Te().then((e) => {
2710
- if (!(!e || !o) && (this._national && (o.value = Ee(this._country, this._national)), !this.getAttribute("placeholder"))) {
2711
- let e = De(this._country);
2880
+ }, document.addEventListener("click", this._onDocClick), Ie().then((e) => {
2881
+ if (!(!e || !o) && (this._national && (o.value = Le(this._country, this._national)), !this.getAttribute("placeholder"))) {
2882
+ let e = Re(this._country);
2712
2883
  e && (o.placeholder = e);
2713
2884
  }
2714
- }), z(this, this.value);
2885
+ }), W(this, this.value);
2715
2886
  }
2716
2887
  disconnectedCallback() {
2717
2888
  this._reposition && (window.removeEventListener("scroll", this._reposition, !0), window.removeEventListener("resize", this._reposition)), this._onDocClick && document.removeEventListener("click", this._onDocClick);
2718
2889
  }
2719
- }, Me = (e) => String(e ?? "").replace(/"/g, "&quot;").replace(/</g, "&lt;"), Ne = class extends HTMLElement {
2890
+ }, Ue = (e) => String(e ?? "").replace(/"/g, "&quot;").replace(/</g, "&lt;"), We = class extends HTMLElement {
2720
2891
  static get observedAttributes() {
2721
2892
  return [
2722
2893
  "value",
@@ -2752,7 +2923,7 @@ var je = class extends HTMLElement {
2752
2923
  return this._value;
2753
2924
  }
2754
2925
  set value(e) {
2755
- this._value = e == null ? "" : String(e), z(this, this._value), this._syncSelected(), this._syncReset();
2926
+ this._value = e == null ? "" : String(e), W(this, this._value), this._syncSelected(), this._syncReset();
2756
2927
  }
2757
2928
  set options(e) {
2758
2929
  this._optionsProp = Array.isArray(e) ? e : null, this.isConnected && this.render();
@@ -2767,7 +2938,7 @@ var je = class extends HTMLElement {
2767
2938
  value: e.getAttribute("value") ?? e.textContent.trim(),
2768
2939
  label: e.innerHTML,
2769
2940
  icon: e.getAttribute("icon") || void 0,
2770
- [B]: !0,
2941
+ [oe]: !0,
2771
2942
  selected: e.hasAttribute("selected")
2772
2943
  })));
2773
2944
  }
@@ -2777,25 +2948,25 @@ var je = class extends HTMLElement {
2777
2948
  render() {
2778
2949
  this._snapshotDeclared();
2779
2950
  let e = this._readOptions(), t = this.hasAttribute("searchable"), n = this.hasAttribute("clearable"), r = this.getAttribute("size"), i = r === "sm" ? " search-select-sm" : r === "lg" ? " search-select-lg" : "", a = this.getAttribute("icon"), o = this.getAttribute("prefix"), s = this.getAttribute("placeholder") || "Select...", c = this.getAttribute("search-placeholder") || "Search...", l = e.find((e) => String(e.value) === String(this._value)) || e.find((e) => e.selected);
2780
- l && (this._value = String(l.value)), z(this, this._value);
2951
+ l && (this._value = String(l.value)), W(this, this._value);
2781
2952
  let u = e.map((e) => {
2782
2953
  let t = String(e.value) === String(this._value);
2783
- return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${Pe(e.value)}" aria-selected="${t}">${H(e)}</button>`;
2954
+ return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${Ge(e.value)}" aria-selected="${t}">${q(e)}</button>`;
2784
2955
  }).join("");
2785
2956
  this.innerHTML = `
2786
2957
  <div class="search-select${this.hasAttribute("compact") ? " search-select-compact" : ""}${i}">
2787
- <button type="button" role="combobox" class="input search-select-control" aria-haspopup="listbox" aria-expanded="false" aria-label="${Pe(this._accessibleName())}"${this.hasAttribute("disabled") ? " disabled" : ""}>
2788
- ${a ? `<i class="bi bi-${Pe(a)} search-select-icon" aria-hidden="true"></i>` : ""}
2789
- ${o ? `<span class="search-select-prefix">${V(o)}</span>` : ""}
2790
- <span class="${l ? "" : "search-select-placeholder"}" data-label>${l ? H(l) : V(s)}</span>
2958
+ <button type="button" role="combobox" class="input search-select-control" aria-haspopup="listbox" aria-expanded="false" aria-label="${Ge(this._accessibleName())}"${this.hasAttribute("disabled") ? " disabled" : ""}>
2959
+ ${a ? `<i class="bi bi-${Ge(a)} search-select-icon" aria-hidden="true"></i>` : ""}
2960
+ ${o ? `<span class="search-select-prefix">${G(o)}</span>` : ""}
2961
+ <span class="${l ? "" : "search-select-placeholder"}" data-label>${l ? q(l) : G(s)}</span>
2791
2962
  ${n ? "<span class=\"search-select-reset\" role=\"button\" aria-label=\"Clear selection\" hidden><i class=\"bi bi-x-lg\" aria-hidden=\"true\"></i></span>" : ""}
2792
2963
  <i class="bi bi-chevron-down search-select-caret" aria-hidden="true"></i>
2793
2964
  </button>
2794
2965
  <div class="search-select-menu search-select-menu-fixed" role="listbox" tabindex="-1" hidden>
2795
- ${t ? `<div class="search-select-search"><i class="bi bi-search" aria-hidden="true"></i><input class="search-select-input" placeholder="${Pe(c)}" aria-autocomplete="list" /><button type="button" class="search-select-clear" aria-label="Clear search" hidden><i class="bi bi-x" aria-hidden="true"></i></button></div>` : ""}
2966
+ ${t ? `<div class="search-select-search"><i class="bi bi-search" aria-hidden="true"></i><input class="search-select-input" placeholder="${Ge(c)}" aria-autocomplete="list" /><button type="button" class="search-select-clear" aria-label="Clear search" hidden><i class="bi bi-x" aria-hidden="true"></i></button></div>` : ""}
2796
2967
  <div class="search-select-options">${u}<div class="search-select-empty" hidden>No matches</div></div>
2797
2968
  </div>
2798
- </div>`, this._rendered = !0, z(this, this._value), this._wire(), this._syncReset();
2969
+ </div>`, this._rendered = !0, W(this, this._value), this._wire(), this._syncReset();
2799
2970
  }
2800
2971
  _refs() {
2801
2972
  return {
@@ -2821,7 +2992,7 @@ var je = class extends HTMLElement {
2821
2992
  let t = e.dataset.value === String(this._value);
2822
2993
  e.classList.toggle("selected", t), e.setAttribute("aria-selected", String(t));
2823
2994
  }
2824
- e && (e.innerHTML = t ? H(t) : e.innerHTML, e.classList.toggle("search-select-placeholder", !t));
2995
+ e && (e.innerHTML = t ? q(t) : e.innerHTML, e.classList.toggle("search-select-placeholder", !t));
2825
2996
  }
2826
2997
  _syncReset() {
2827
2998
  let { reset: e } = this._refs();
@@ -2833,8 +3004,8 @@ var je = class extends HTMLElement {
2833
3004
  let t = () => {
2834
3005
  if (this.hasAttribute("compact")) {
2835
3006
  let t = e.control.getBoundingClientRect();
2836
- e.menu.style.width = "max-content", e.menu.style.minWidth = `${t.width}px`, e.menu.style.maxWidth = "280px", F(e.control, e.menu);
2837
- } else F(e.control, e.menu, { matchWidth: !0 });
3007
+ e.menu.style.width = "max-content", e.menu.style.minWidth = `${t.width}px`, e.menu.style.maxWidth = "280px", B(e.control, e.menu);
3008
+ } else B(e.control, e.menu, { matchWidth: !0 });
2838
3009
  }, n = (e) => {
2839
3010
  let t = this._visible();
2840
3011
  this._active = e;
@@ -2877,21 +3048,21 @@ var je = class extends HTMLElement {
2877
3048
  e.search.value = "", r(""), e.search.focus();
2878
3049
  }), e.menu.addEventListener("keydown", c), this._onDocClick = (e) => {
2879
3050
  i() && !this.contains(e.target) && o();
2880
- }, document.addEventListener("click", this._onDocClick), I(this, () => {
3051
+ }, document.addEventListener("click", this._onDocClick), V(this, () => {
2881
3052
  i() && t();
2882
3053
  });
2883
3054
  }
2884
3055
  disconnectedCallback() {
2885
- this._onDocClick && document.removeEventListener("click", this._onDocClick), L(this);
3056
+ this._onDocClick && document.removeEventListener("click", this._onDocClick), H(this);
2886
3057
  }
2887
- }, Pe = (e) => String(e ?? "").replace(/"/g, "&quot;").replace(/</g, "&lt;"), Fe = "image/png,image/jpeg,image/webp", Ie = {
3058
+ }, Ge = (e) => String(e ?? "").replace(/"/g, "&quot;").replace(/</g, "&lt;"), Ke = "image/png,image/jpeg,image/webp", qe = {
2888
3059
  "image/png": [".png"],
2889
3060
  "image/jpeg": [".jpg", ".jpeg"],
2890
3061
  "image/webp": [".webp"],
2891
3062
  "image/gif": [".gif"],
2892
3063
  "image/svg+xml": [".svg"],
2893
3064
  "application/pdf": [".pdf"]
2894
- }, Le = {
3065
+ }, Je = {
2895
3066
  "image/png": "PNG",
2896
3067
  "image/jpeg": "JPG",
2897
3068
  "image/webp": "WEBP",
@@ -2905,7 +3076,7 @@ var je = class extends HTMLElement {
2905
3076
  ".gif": "GIF",
2906
3077
  ".svg": "SVG",
2907
3078
  ".pdf": "PDF"
2908
- }, Re = (e) => String(e || "").split(",").map((e) => e.trim().toLowerCase()).filter(Boolean), ze = [
3079
+ }, Ye = (e) => String(e || "").split(",").map((e) => e.trim().toLowerCase()).filter(Boolean), Xe = [
2909
3080
  ".png",
2910
3081
  ".jpg",
2911
3082
  ".jpeg",
@@ -2916,46 +3087,46 @@ var je = class extends HTMLElement {
2916
3087
  ".avif",
2917
3088
  ".heic"
2918
3089
  ];
2919
- function Be(e) {
3090
+ function Ze(e) {
2920
3091
  if (!e) return !1;
2921
3092
  let t = typeof e == "object" && e.type ? String(e.type).toLowerCase() : "";
2922
3093
  if (t) return t.startsWith("image/");
2923
3094
  let n = typeof e == "string" ? e : e.name || e.url || "", r = String(n).toLowerCase();
2924
- return ze.some((e) => r.endsWith(e));
3095
+ return Xe.some((e) => r.endsWith(e));
2925
3096
  }
2926
- function Ve(e) {
2927
- let t = Re(e);
2928
- return t.length ? t.every((e) => e.startsWith(".") ? ze.includes(e) : e === "image/*" || e.startsWith("image/")) : !1;
3097
+ function Qe(e) {
3098
+ let t = Ye(e);
3099
+ return t.length ? t.every((e) => e.startsWith(".") ? Xe.includes(e) : e === "image/*" || e.startsWith("image/")) : !1;
2929
3100
  }
2930
- function He(e) {
3101
+ function $e(e) {
2931
3102
  let t = [];
2932
- for (let n of Re(e)) {
2933
- let e = Le[n] || (n.startsWith(".") ? n.slice(1).toUpperCase() : n.toUpperCase());
3103
+ for (let n of Ye(e)) {
3104
+ let e = Je[n] || (n.startsWith(".") ? n.slice(1).toUpperCase() : n.toUpperCase());
2934
3105
  t.includes(e) || t.push(e);
2935
3106
  }
2936
3107
  return t.length <= 1 ? t[0] || "supported" : `${t.slice(0, -1).join(", ")} or ${t[t.length - 1]}`;
2937
3108
  }
2938
- function Ue(e, t) {
2939
- let n = Re(t);
3109
+ function et(e, t) {
3110
+ let n = Ye(t);
2940
3111
  if (!n.length) return !0;
2941
3112
  let r = (e.type || "").toLowerCase(), i = (e.name || "").toLowerCase();
2942
- return n.some((e) => e.startsWith(".") ? i.endsWith(e) : e.endsWith("/*") ? r.startsWith(e.slice(0, -1)) : r && r === e ? !0 : !r && (Ie[e] || []).some((e) => i.endsWith(e)));
3113
+ return n.some((e) => e.startsWith(".") ? i.endsWith(e) : e.endsWith("/*") ? r.startsWith(e.slice(0, -1)) : r && r === e ? !0 : !r && (qe[e] || []).some((e) => i.endsWith(e)));
2943
3114
  }
2944
- function We(e, t = {}) {
3115
+ function tt(e, t = {}) {
2945
3116
  if (!e) return null;
2946
- let n = t.accept === void 0 ? Fe : t.accept, r = t.maxSizeMb || 5;
2947
- return Ue(e, n) ? e.size > r * 1024 * 1024 ? `Keep the file under ${r} MB.` : null : `Choose a ${He(n)} file.`;
3117
+ let n = t.accept === void 0 ? Ke : t.accept, r = t.maxSizeMb || 5;
3118
+ return et(e, n) ? e.size > r * 1024 * 1024 ? `Keep the file under ${r} MB.` : null : `Choose a ${$e(n)} file.`;
2948
3119
  }
2949
- var Q = (e, t) => {
3120
+ var Z = (e, t) => {
2950
3121
  typeof customElements < "u" && !customElements.get(e) && customElements.define(e, t);
2951
3122
  };
2952
- function Ge() {
2953
- Q("wui-select", Ne), Q("wui-phone", je), Q("wui-datepicker", ae), Q("wui-date-range", me), Q("wui-autocomplete", ne), Q("wui-multiselect", he), Q("wui-otp", be), Q("wui-status-icon", ee);
3123
+ function nt() {
3124
+ Z("wui-select", We), Z("wui-phone", He), Z("wui-datepicker", ge), Z("wui-date-range", Te), Z("wui-autocomplete", se), Z("wui-multiselect", Ee), Z("wui-otp", je), Z("wui-status-icon", ae);
2954
3125
  }
2955
- Ge();
3126
+ nt();
2956
3127
  //#endregion
2957
3128
  //#region src/components/RequiredMark.jsx
2958
- function $() {
3129
+ function Q() {
2959
3130
  return /* @__PURE__ */ t("span", {
2960
3131
  className: "required",
2961
3132
  "aria-hidden": "true",
@@ -2964,23 +3135,23 @@ function $() {
2964
3135
  }
2965
3136
  //#endregion
2966
3137
  //#region src/components/AppAutocomplete.jsx
2967
- function Ke({ value: e, onChange: r, options: i, loadOptions: o, placeholder: s = "Search…", minChars: c, debounce: u, disabled: d = !1, size: f, name: p, label: m, error: h, hint: g, required: _ = !1, fieldClassName: v = "", ...y }) {
2968
- E("AppAutocomplete", y);
2969
- let b = l(null), x = typeof o == "function";
3138
+ function rt({ value: e, onChange: r, options: i, loadOptions: o, placeholder: s = "Search…", minChars: c, debounce: u, disabled: d = !1, size: f, allowCustom: p = !1, name: m, label: h, error: g, hint: _, required: v = !1, fieldClassName: y = "", ...b }) {
3139
+ O("AppAutocomplete", b);
3140
+ let x = l(null), S = typeof o == "function";
2970
3141
  return a(() => {
2971
- let e = b.current;
2972
- e && !x && (e.options = i || []);
2973
- }, [i, x]), a(() => {
2974
- let t = b.current;
3142
+ let e = x.current;
3143
+ e && !S && (e.options = i || []);
3144
+ }, [i, S]), a(() => {
3145
+ let t = x.current;
2975
3146
  t && t.value !== (e ?? "") && (t.value = e ?? "");
2976
3147
  }, [e]), a(() => {
2977
- let e = b.current;
3148
+ let e = x.current;
2978
3149
  if (!e) return;
2979
- let t = () => r?.(e.value);
3150
+ let t = (t) => r?.(e.value, { isCustom: !!t.detail?.isCustom });
2980
3151
  return e.addEventListener("change", t), () => e.removeEventListener("change", t);
2981
3152
  }, [r]), a(() => {
2982
- let e = b.current;
2983
- if (!e || !x) return;
3153
+ let e = x.current;
3154
+ if (!e || !S) return;
2984
3155
  let t = !1, n = async (n) => {
2985
3156
  e.loading = !0;
2986
3157
  try {
@@ -2993,47 +3164,48 @@ function Ke({ value: e, onChange: r, options: i, loadOptions: o, placeholder: s
2993
3164
  return e.addEventListener("search", n), () => {
2994
3165
  t = !0, e.removeEventListener("search", n);
2995
3166
  };
2996
- }, [x, o]), /* @__PURE__ */ n("div", {
2997
- className: `field${v ? ` ${v}` : ""}`,
3167
+ }, [S, o]), /* @__PURE__ */ n("div", {
3168
+ className: `field${y ? ` ${y}` : ""}`,
2998
3169
  children: [
2999
- m && /* @__PURE__ */ n("label", {
3170
+ h && /* @__PURE__ */ n("label", {
3000
3171
  className: "label",
3001
- htmlFor: p,
3002
- children: [m, _ && /* @__PURE__ */ t($, {})]
3172
+ htmlFor: m,
3173
+ children: [h, v && /* @__PURE__ */ t(Q, {})]
3003
3174
  }),
3004
3175
  /* @__PURE__ */ t("wui-autocomplete", {
3005
- "aria-label": typeof m == "string" ? m : void 0,
3006
- id: p,
3007
- ref: b,
3008
- name: p,
3176
+ "aria-label": typeof h == "string" ? h : void 0,
3177
+ id: m,
3178
+ ref: x,
3179
+ name: m,
3009
3180
  placeholder: s,
3010
- remote: x ? "" : void 0,
3181
+ remote: S ? "" : void 0,
3011
3182
  "min-chars": c == null ? void 0 : String(c),
3012
3183
  debounce: u == null ? void 0 : String(u),
3013
3184
  size: f || void 0,
3185
+ "allow-custom": p ? "" : void 0,
3014
3186
  disabled: d ? "" : void 0,
3015
- required: _ ? "" : void 0
3187
+ required: v ? "" : void 0
3016
3188
  }),
3017
- h ? /* @__PURE__ */ t("div", {
3189
+ g ? /* @__PURE__ */ t("div", {
3018
3190
  className: "field-error",
3019
- children: h
3020
- }) : g ? /* @__PURE__ */ t("div", {
3021
- className: "field-hint",
3022
3191
  children: g
3192
+ }) : _ ? /* @__PURE__ */ t("div", {
3193
+ className: "field-hint",
3194
+ children: _
3023
3195
  }) : null
3024
3196
  ]
3025
3197
  });
3026
3198
  }
3027
3199
  //#endregion
3028
3200
  //#region src/components/AppAvatar.jsx
3029
- function qe(e) {
3201
+ function it(e) {
3030
3202
  let t = (e || "").trim();
3031
3203
  if (!t) return "?";
3032
3204
  let n = t.split(/\s+/).filter(Boolean);
3033
3205
  return n.length === 1 ? n[0].slice(0, 2).toUpperCase() : (n[0][0] + n[n.length - 1][0]).toUpperCase();
3034
3206
  }
3035
- function Je({ name: e, src: n, className: r = "", ...i }) {
3036
- E("AppAvatar", i);
3207
+ function at({ name: e, src: n, className: r = "", ...i }) {
3208
+ O("AppAvatar", i);
3037
3209
  let a = ["avatar", r].filter(Boolean).join(" ");
3038
3210
  return n ? /* @__PURE__ */ t("span", {
3039
3211
  className: a,
@@ -3046,13 +3218,13 @@ function Je({ name: e, src: n, className: r = "", ...i }) {
3046
3218
  className: a,
3047
3219
  role: "img",
3048
3220
  "aria-label": e,
3049
- children: qe(e)
3221
+ children: it(e)
3050
3222
  });
3051
3223
  }
3052
3224
  //#endregion
3053
3225
  //#region src/components/AppBadge.jsx
3054
- function Ye({ children: e, tone: n, dot: r = !1, className: i = "", ...a }) {
3055
- return E("AppBadge", a), /* @__PURE__ */ t(f, {
3226
+ function ot({ children: e, tone: n, dot: r = !1, className: i = "", ...a }) {
3227
+ return O("AppBadge", a), /* @__PURE__ */ t(f, {
3056
3228
  bg: !1,
3057
3229
  className: [
3058
3230
  n ? `badge-${n}` : "",
@@ -3064,58 +3236,13 @@ function Ye({ children: e, tone: n, dot: r = !1, className: i = "", ...a }) {
3064
3236
  });
3065
3237
  }
3066
3238
  //#endregion
3067
- //#region src/components/AppButton.jsx
3068
- var Xe = {
3069
- primary: "primary",
3070
- secondary: "secondary",
3071
- outline: "outline-primary",
3072
- ghost: "link",
3073
- danger: "danger",
3074
- "outline-danger": "outline-danger",
3075
- light: "light",
3076
- warning: "warning"
3077
- };
3078
- function Ze(e, n) {
3079
- if (!e) return null;
3080
- let r = n === "left" ? "me-2" : "ms-2";
3081
- return typeof e == "string" ? /* @__PURE__ */ t(k, {
3082
- name: e,
3083
- size: 16,
3084
- className: r
3085
- }) : /* @__PURE__ */ t("span", {
3086
- className: `d-inline-flex ${r}`,
3087
- children: e
3088
- });
3089
- }
3090
- function Qe({ children: e, variant: r = "primary", size: i = "md", type: a = "button", loading: o = !1, disabled: s = !1, block: c = !1, leftIcon: l = null, rightIcon: u = null, className: d = "", ...f }) {
3091
- E("AppButton", f);
3092
- let m = [c ? "w-100" : "", d].filter(Boolean).join(" ");
3093
- return /* @__PURE__ */ n(p, {
3094
- type: (f.as === void 0 || f.as === "button") && f.href === void 0 ? a : void 0,
3095
- variant: Xe[r] ?? "primary",
3096
- size: i === "md" ? void 0 : i,
3097
- disabled: s || o,
3098
- className: m || void 0,
3099
- ...f,
3100
- children: [
3101
- o && /* @__PURE__ */ t("span", {
3102
- className: "spinner-border spinner-border-sm me-2",
3103
- "aria-hidden": "true"
3104
- }),
3105
- !o && Ze(l, "left"),
3106
- e,
3107
- !o && Ze(u, "right")
3108
- ]
3109
- });
3110
- }
3111
- //#endregion
3112
3239
  //#region src/components/AppCallout.jsx
3113
- function $e({ children: e, icon: r = "info", className: i = "", ...a }) {
3114
- return E("AppCallout", a), /* @__PURE__ */ n("div", {
3240
+ function st({ children: e, icon: r = "info", className: i = "", ...a }) {
3241
+ return O("AppCallout", a), /* @__PURE__ */ n("div", {
3115
3242
  className: `info-callout${i ? ` ${i}` : ""}`,
3116
3243
  children: [r && /* @__PURE__ */ t("span", {
3117
3244
  className: "info-callout-icon",
3118
- children: /* @__PURE__ */ t(k, {
3245
+ children: /* @__PURE__ */ t(N, {
3119
3246
  name: r,
3120
3247
  size: 18
3121
3248
  })
@@ -3124,8 +3251,8 @@ function $e({ children: e, icon: r = "info", className: i = "", ...a }) {
3124
3251
  }
3125
3252
  //#endregion
3126
3253
  //#region src/components/AppCard.jsx
3127
- function et({ title: r, titleClassName: i = "", header: a, headerExtra: o, headerActions: s, children: c, className: l = "", bodyClassName: u = "", headerClassName: d = "", body: f = !0, lifted: p = !1, ...h }) {
3128
- E("AppCard", h);
3254
+ function ct({ title: r, titleClassName: i = "", header: a, headerExtra: o, headerActions: s, children: c, className: l = "", bodyClassName: u = "", headerClassName: d = "", body: f = !0, lifted: p = !1, ...h }) {
3255
+ O("AppCard", h);
3129
3256
  let g = a != null || r != null || o != null || s != null;
3130
3257
  return /* @__PURE__ */ n(m, {
3131
3258
  className: [p ? "card-lifted" : "", l].filter(Boolean).join(" ") || void 0,
@@ -3152,8 +3279,8 @@ function et({ title: r, titleClassName: i = "", header: a, headerExtra: o, heade
3152
3279
  }
3153
3280
  //#endregion
3154
3281
  //#region src/components/AppCheckbox.jsx
3155
- var tt = r(function({ label: e, id: r, name: i, error: a, hint: s, className: c = "", ...l }, u) {
3156
- E("AppCheckbox", l);
3282
+ var lt = r(function({ label: e, id: r, name: i, error: a, hint: s, className: c = "", ...l }, u) {
3283
+ O("AppCheckbox", l);
3157
3284
  let d = o(), f = r || i || d;
3158
3285
  return /* @__PURE__ */ n("div", {
3159
3286
  className: `form-check${c ? ` ${c}` : ""}`,
@@ -3184,8 +3311,8 @@ var tt = r(function({ label: e, id: r, name: i, error: a, hint: s, className: c
3184
3311
  });
3185
3312
  //#endregion
3186
3313
  //#region src/components/AppChip.jsx
3187
- function nt({ label: r, children: i, tone: a = "neutral", size: o = "md", leadingIcon: s, avatar: c, onRemove: l, onClick: u, disabled: d = !1, removeLabel: f, className: p = "", ...m }) {
3188
- E("AppChip", m);
3314
+ function ut({ label: r, children: i, tone: a = "neutral", size: o = "md", leadingIcon: s, avatar: c, onRemove: l, onClick: u, disabled: d = !1, removeLabel: f, className: p = "", ...m }) {
3315
+ O("AppChip", m);
3189
3316
  let h = r ?? i, g = [
3190
3317
  "chip",
3191
3318
  a && a !== "neutral" ? a : "",
@@ -3202,7 +3329,7 @@ function nt({ label: r, children: i, tone: a = "neutral", size: o = "md", leadin
3202
3329
  }) : c
3203
3330
  }) : s ? /* @__PURE__ */ t("span", {
3204
3331
  className: "chip-ic",
3205
- children: /* @__PURE__ */ t(k, {
3332
+ children: /* @__PURE__ */ t(N, {
3206
3333
  name: s,
3207
3334
  size: o === "sm" ? 12 : 14
3208
3335
  })
@@ -3227,7 +3354,7 @@ function nt({ label: r, children: i, tone: a = "neutral", size: o = "md", leadin
3227
3354
  onClick: l,
3228
3355
  disabled: d,
3229
3356
  "aria-label": f || (typeof h == "string" ? `Remove ${h}` : "Remove"),
3230
- children: /* @__PURE__ */ t(k, {
3357
+ children: /* @__PURE__ */ t(N, {
3231
3358
  name: "x",
3232
3359
  size: o === "sm" ? 12 : 14
3233
3360
  })
@@ -3236,8 +3363,8 @@ function nt({ label: r, children: i, tone: a = "neutral", size: o = "md", leadin
3236
3363
  }
3237
3364
  //#endregion
3238
3365
  //#region src/components/AppChoiceCard.jsx
3239
- function rt({ name: r, multiple: i = !1, value: a, checked: o, onChange: s, icon: c, iconNode: l, iconSize: u = 18, image: d, imageAlt: f = "", children: p, title: m, description: h, checkIcon: g = "check", checkSize: _ = 12, className: v = "", ...y }) {
3240
- return E("AppChoiceCard", y), /* @__PURE__ */ n("label", {
3366
+ function dt({ name: r, multiple: i = !1, value: a, checked: o, onChange: s, icon: c, iconNode: l, iconSize: u = 18, image: d, imageAlt: f = "", children: p, title: m, description: h, checkIcon: g = "check", checkSize: _ = 12, className: v = "", ...y }) {
3367
+ return O("AppChoiceCard", y), /* @__PURE__ */ n("label", {
3241
3368
  className: `struct-card${d ? " struct-card-img-card" : ""}${o ? " checked" : ""}${v ? ` ${v}` : ""}`,
3242
3369
  children: [
3243
3370
  /* @__PURE__ */ t("input", {
@@ -3257,7 +3384,7 @@ function rt({ name: r, multiple: i = !1, value: a, checked: o, onChange: s, icon
3257
3384
  })
3258
3385
  }) : l || c ? /* @__PURE__ */ t("span", {
3259
3386
  className: "struct-card-ic",
3260
- children: l || /* @__PURE__ */ t(k, {
3387
+ children: l || /* @__PURE__ */ t(N, {
3261
3388
  name: c,
3262
3389
  size: u
3263
3390
  })
@@ -3274,7 +3401,7 @@ function rt({ name: r, multiple: i = !1, value: a, checked: o, onChange: s, icon
3274
3401
  }),
3275
3402
  /* @__PURE__ */ t("span", {
3276
3403
  className: "struct-card-check",
3277
- children: /* @__PURE__ */ t(k, {
3404
+ children: /* @__PURE__ */ t(N, {
3278
3405
  name: g,
3279
3406
  size: _
3280
3407
  })
@@ -3284,8 +3411,8 @@ function rt({ name: r, multiple: i = !1, value: a, checked: o, onChange: s, icon
3284
3411
  }
3285
3412
  //#endregion
3286
3413
  //#region src/components/AppChoiceChip.jsx
3287
- function it({ multiple: e = !0, label: r, name: i, value: a, checked: o, onChange: s, children: c, count: l, className: u = "", ...d }) {
3288
- return E("AppChoiceChip", d), /* @__PURE__ */ n("label", {
3414
+ function ft({ multiple: e = !0, label: r, name: i, value: a, checked: o, onChange: s, children: c, count: l, className: u = "", ...d }) {
3415
+ return O("AppChoiceChip", d), /* @__PURE__ */ n("label", {
3289
3416
  className: `choice-chip${o ? " checked" : ""}${u ? ` ${u}` : ""}`,
3290
3417
  children: [
3291
3418
  /* @__PURE__ */ t("input", {
@@ -3305,8 +3432,8 @@ function it({ multiple: e = !0, label: r, name: i, value: a, checked: o, onChang
3305
3432
  }
3306
3433
  //#endregion
3307
3434
  //#region src/components/AppColorField.jsx
3308
- function at({ value: e = "#000000", onChange: r, label: i, required: a = !1, error: s, hint: c, name: l, id: u, disabled: d = !1, size: f = "md", className: p = "", ...m }) {
3309
- E("AppColorField", m);
3435
+ function pt({ value: e = "#000000", onChange: r, label: i, required: a = !1, error: s, hint: c, name: l, id: u, disabled: d = !1, size: f = "md", className: p = "", ...m }) {
3436
+ O("AppColorField", m);
3310
3437
  let h = o(), g = u || l || h, _ = (e) => /^#[0-9a-f]{6}$/i.test(e), v = f === "sm" ? " color-field-sm" : f === "lg" ? " color-field-lg" : "", y = f === "sm" ? " input-sm" : f === "lg" ? " input-lg" : "";
3311
3438
  return /* @__PURE__ */ n("div", {
3312
3439
  className: `field${p ? ` ${p}` : ""}`,
@@ -3314,7 +3441,7 @@ function at({ value: e = "#000000", onChange: r, label: i, required: a = !1, err
3314
3441
  i && /* @__PURE__ */ n("label", {
3315
3442
  className: "label",
3316
3443
  htmlFor: g,
3317
- children: [i, a && /* @__PURE__ */ t($, {})]
3444
+ children: [i, a && /* @__PURE__ */ t(Q, {})]
3318
3445
  }),
3319
3446
  /* @__PURE__ */ n("div", {
3320
3447
  className: `color-field${v}`,
@@ -3353,11 +3480,11 @@ function at({ value: e = "#000000", onChange: r, label: i, required: a = !1, err
3353
3480
  }
3354
3481
  //#endregion
3355
3482
  //#region src/components/AppCompareTable.jsx
3356
- function ot({ columns: e = [], rows: r = [], caption: i, className: a = "", ...o }) {
3357
- E("AppCompareTable", o);
3483
+ function mt({ columns: e = [], rows: r = [], caption: i, className: a = "", ...o }) {
3484
+ O("AppCompareTable", o);
3358
3485
  let s = (e) => e === !0 ? /* @__PURE__ */ t("span", {
3359
3486
  className: "compare-yes",
3360
- children: /* @__PURE__ */ t(k, {
3487
+ children: /* @__PURE__ */ t(N, {
3361
3488
  name: "check",
3362
3489
  size: 16
3363
3490
  })
@@ -3389,158 +3516,132 @@ function ot({ columns: e = [], rows: r = [], caption: i, className: a = "", ...o
3389
3516
  }
3390
3517
  //#endregion
3391
3518
  //#region src/components/AppInfoTip.jsx
3392
- function st({ label: e, children: r, ...i }) {
3393
- E("AppInfoTip", i);
3394
- let [a, c] = u(!1), [d, f] = u(null), p = l(null), m = l(null), h = o(), _ = l(!1);
3395
- return s(() => {
3396
- if (!a || !p.current || !m.current) return;
3397
- let e = p.current.getBoundingClientRect(), t = m.current.offsetWidth, n = m.current.offsetHeight, r = e.left + e.width / 2 - t / 2;
3398
- r = Math.max(8, Math.min(r, window.innerWidth - t - 8));
3399
- let i = e.top - n - 8;
3400
- i < 8 && (i = e.bottom + 8), f({
3401
- top: i,
3402
- left: r
3403
- });
3404
- }, [a]), r ? /* @__PURE__ */ n("span", {
3519
+ function ht({ label: e, children: r, placement: i = "auto", ...a }) {
3520
+ O("AppInfoTip", a);
3521
+ let s = o(), [c, l] = u(!1), d = !!e, f = !!r;
3522
+ return !d && !f ? null : /* @__PURE__ */ t("span", {
3405
3523
  className: "infotip",
3406
- onMouseLeave: () => c(!1),
3407
- children: [/* @__PURE__ */ t("button", {
3408
- type: "button",
3409
- ref: p,
3410
- className: "infotip-btn",
3411
- "aria-label": e,
3412
- "aria-expanded": a,
3413
- "aria-describedby": a ? h : void 0,
3414
- onMouseEnter: () => c(!0),
3415
- onClick: () => {
3416
- if (_.current) {
3417
- _.current = !1;
3418
- return;
3419
- }
3420
- c((e) => !e);
3421
- },
3422
- onFocus: () => {
3423
- _.current = !0, c(!0);
3424
- },
3425
- onBlur: () => {
3426
- _.current = !1, c(!1);
3427
- },
3428
- children: /* @__PURE__ */ t(k, {
3429
- name: "info",
3430
- size: 16
3524
+ children: /* @__PURE__ */ t(b, {
3525
+ trigger: ["hover", "focus"],
3526
+ placement: i,
3527
+ overlay: /* @__PURE__ */ n(x, {
3528
+ id: s,
3529
+ children: [d && /* @__PURE__ */ t(x.Header, {
3530
+ as: "h3",
3531
+ children: e
3532
+ }), f && /* @__PURE__ */ t(x.Body, { children: r })]
3533
+ }),
3534
+ onToggle: l,
3535
+ children: /* @__PURE__ */ t("button", {
3536
+ type: "button",
3537
+ className: "infotip-btn",
3538
+ "aria-label": e || "More information",
3539
+ "aria-expanded": c,
3540
+ children: /* @__PURE__ */ t(N, {
3541
+ name: "info",
3542
+ size: 16
3543
+ })
3431
3544
  })
3432
- }), a && g(/* @__PURE__ */ t("span", {
3433
- ref: m,
3434
- className: "infotip-pop is-portal",
3435
- role: "tooltip",
3436
- id: h,
3437
- style: {
3438
- position: "fixed",
3439
- top: d ? d.top : 0,
3440
- left: d ? d.left : 0,
3441
- visibility: d ? "visible" : "hidden"
3442
- },
3443
- children: r
3444
- }), document.body)]
3445
- }) : null;
3545
+ })
3546
+ });
3446
3547
  }
3447
3548
  //#endregion
3448
3549
  //#region src/components/AppInput.jsx
3449
- var ct = r(function({ label: e, required: r = !1, error: i, hint: a, help: o, helpLabel: s = "More information", type: c = "text", size: d = "md", leftIcon: f, rightIcon: p, onRightIconClick: m, rightIconLabel: g, unit: _, id: v, name: y, className: b = "", fieldClassName: x = "", disabled: S = !1, clearable: C = !1, showCount: w = !1, maxLength: T, prefix: D, suffix: O, floatingLabel: A = !1, ...j }, M) {
3450
- E("AppInput", j);
3451
- let [N, ee] = u(!1), P = v || y, F = c === "password", I = F && N ? "text" : c, L = l(null), R = (e) => {
3452
- L.current = e, typeof M == "function" ? M(e) : M && (M.current = e);
3453
- }, z = String(j.value ?? j.defaultValue ?? ""), [B, V] = u(() => !!z), [te, H] = u(() => z.length), ne = C && !S, re = C || w, U = (e) => {
3454
- V(!!e.target.value), H(e.target.value.length), j.onInput?.(e);
3455
- }, ie = ne ? /* @__PURE__ */ t("button", {
3550
+ var gt = r(function({ label: e, required: r = !1, error: i, hint: a, help: o, helpLabel: s = "More information", type: c = "text", size: d = "md", leftIcon: f, rightIcon: p, onRightIconClick: m, rightIconLabel: h, unit: _, id: v, name: y, className: b = "", fieldClassName: x = "", disabled: S = !1, clearable: C = !1, showCount: w = !1, maxLength: T, prefix: E, suffix: D, floatingLabel: k = !1, ...A }, j) {
3551
+ O("AppInput", A);
3552
+ let [M, ee] = u(!1), P = v || y, te = c === "password", F = te && M ? "text" : c, I = l(null), L = (e) => {
3553
+ I.current = e, typeof j == "function" ? j(e) : j && (j.current = e);
3554
+ }, R = String(A.value ?? A.defaultValue ?? ""), [ne, re] = u(() => !!R), [ie, ae] = u(() => R.length), z = C && !S, B = C || w, V = (e) => {
3555
+ re(!!e.target.value), ae(e.target.value.length), A.onInput?.(e);
3556
+ }, H = z ? /* @__PURE__ */ t("button", {
3456
3557
  type: "button",
3457
3558
  className: "input-clear",
3458
3559
  onClick: () => {
3459
- let e = L.current;
3560
+ let e = I.current;
3460
3561
  if (!e) return;
3461
3562
  let t = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value")?.set;
3462
- t ? t.call(e, "") : e.value = "", e.dispatchEvent(new Event("input", { bubbles: !0 })), V(!1), e.focus();
3563
+ t ? t.call(e, "") : e.value = "", e.dispatchEvent(new Event("input", { bubbles: !0 })), re(!1), e.focus();
3463
3564
  },
3464
3565
  "aria-label": "Clear",
3465
3566
  tabIndex: -1,
3466
- hidden: !B,
3467
- children: /* @__PURE__ */ t(k, {
3567
+ hidden: !ne,
3568
+ children: /* @__PURE__ */ t(N, {
3468
3569
  name: "x",
3469
3570
  size: 16
3470
3571
  })
3471
- }) : null, W = i && P ? `${P}-error` : void 0, G = a && P ? `${P}-hint` : void 0, K = W || G, q = [
3572
+ }) : null, U = i && P ? `${P}-error` : void 0, W = a && P ? `${P}-hint` : void 0, oe = U || W, G = [
3472
3573
  "input",
3473
3574
  d === "sm" ? "input-sm" : "",
3474
3575
  d === "lg" ? "input-lg" : "",
3475
3576
  i ? "error" : "",
3476
- F ? "pw" : "",
3577
+ te ? "pw" : "",
3477
3578
  _ ? "num-input" : "",
3478
3579
  C ? "has-clear" : "",
3479
3580
  b
3480
- ].filter(Boolean).join(" "), J = /* @__PURE__ */ t(h.Control, {
3581
+ ].filter(Boolean).join(" "), K = /* @__PURE__ */ t(g.Control, {
3481
3582
  id: P,
3482
3583
  name: y,
3483
- type: I,
3484
- className: q,
3584
+ type: F,
3585
+ className: G,
3485
3586
  disabled: S,
3486
3587
  required: r,
3487
3588
  "aria-invalid": i ? "true" : "false",
3488
- "aria-describedby": K,
3589
+ "aria-describedby": oe,
3489
3590
  maxLength: T,
3490
- ...j,
3491
- placeholder: A ? " " : j.placeholder,
3492
- ref: R,
3493
- onInput: re ? U : j.onInput
3494
- }), Y;
3495
- return Y = A && e ? /* @__PURE__ */ n("div", {
3591
+ ...A,
3592
+ placeholder: k ? " " : A.placeholder,
3593
+ ref: L,
3594
+ onInput: B ? V : A.onInput
3595
+ }), q;
3596
+ return q = k && e ? /* @__PURE__ */ n("div", {
3496
3597
  className: "field-float",
3497
- children: [J, /* @__PURE__ */ n("label", {
3598
+ children: [K, /* @__PURE__ */ n("label", {
3498
3599
  className: "float-label",
3499
3600
  htmlFor: P,
3500
- children: [e, r && /* @__PURE__ */ t($, {})]
3601
+ children: [e, r && /* @__PURE__ */ t(Q, {})]
3501
3602
  })]
3502
- }) : D || O ? /* @__PURE__ */ n("div", {
3603
+ }) : E || D ? /* @__PURE__ */ n("div", {
3503
3604
  className: "input-affixed",
3504
3605
  children: [
3505
- D != null && /* @__PURE__ */ t("span", {
3606
+ E != null && /* @__PURE__ */ t("span", {
3506
3607
  className: "affix affix-pre",
3507
- children: D
3608
+ children: E
3508
3609
  }),
3509
- J,
3510
- O != null && /* @__PURE__ */ t("span", {
3610
+ K,
3611
+ D != null && /* @__PURE__ */ t("span", {
3511
3612
  className: "affix affix-suf",
3512
- children: O
3613
+ children: D
3513
3614
  })
3514
3615
  ]
3515
3616
  }) : _ ? /* @__PURE__ */ n("div", {
3516
3617
  className: "input-with-unit",
3517
- children: [J, /* @__PURE__ */ t("span", {
3618
+ children: [K, /* @__PURE__ */ t("span", {
3518
3619
  className: "unit",
3519
3620
  children: _
3520
3621
  })]
3521
- }) : F ? /* @__PURE__ */ n("div", {
3622
+ }) : te ? /* @__PURE__ */ n("div", {
3522
3623
  className: "input-wrap",
3523
- children: [J, /* @__PURE__ */ t("button", {
3624
+ children: [K, /* @__PURE__ */ t("button", {
3524
3625
  type: "button",
3525
3626
  className: "pw-toggle",
3526
3627
  onClick: () => ee((e) => !e),
3527
- "aria-label": N ? "Hide password" : "Show password",
3628
+ "aria-label": M ? "Hide password" : "Show password",
3528
3629
  tabIndex: -1,
3529
- children: /* @__PURE__ */ t(k, {
3530
- name: N ? "eye-off" : "eye",
3630
+ children: /* @__PURE__ */ t(N, {
3631
+ name: M ? "eye-off" : "eye",
3531
3632
  size: 18
3532
3633
  })
3533
3634
  })]
3534
3635
  }) : p ? /* @__PURE__ */ n("div", {
3535
3636
  className: "input-wrap",
3536
- children: [J, /* @__PURE__ */ t("button", {
3637
+ children: [K, /* @__PURE__ */ t("button", {
3537
3638
  type: "button",
3538
3639
  className: "pw-toggle",
3539
3640
  onClick: m,
3540
3641
  disabled: !m,
3541
3642
  tabIndex: -1,
3542
- "aria-label": g || p,
3543
- children: /* @__PURE__ */ t(k, {
3643
+ "aria-label": h || p,
3644
+ children: /* @__PURE__ */ t(N, {
3544
3645
  name: p,
3545
3646
  size: 18
3546
3647
  })
@@ -3550,113 +3651,122 @@ var ct = r(function({ label: e, required: r = !1, error: i, hint: a, help: o, he
3550
3651
  children: [
3551
3652
  f && /* @__PURE__ */ t("span", {
3552
3653
  className: "ic",
3553
- children: /* @__PURE__ */ t(k, {
3654
+ children: /* @__PURE__ */ t(N, {
3554
3655
  name: f,
3555
3656
  size: 16
3556
3657
  })
3557
3658
  }),
3558
- J,
3559
- ie
3659
+ K,
3660
+ H
3560
3661
  ]
3561
3662
  }) : f ? /* @__PURE__ */ n("div", {
3562
3663
  className: "input-icon",
3563
3664
  children: [/* @__PURE__ */ t("span", {
3564
3665
  className: "ic",
3565
- children: /* @__PURE__ */ t(k, {
3666
+ children: /* @__PURE__ */ t(N, {
3566
3667
  name: f,
3567
3668
  size: 16
3568
3669
  })
3569
- }), J]
3570
- }) : J, /* @__PURE__ */ n(h.Group, {
3670
+ }), K]
3671
+ }) : K, /* @__PURE__ */ n(g.Group, {
3571
3672
  className: `field${x ? ` ${x}` : ""}`,
3572
3673
  children: [
3573
- e && !A && /* @__PURE__ */ n(h.Label, {
3674
+ e && !k && /* @__PURE__ */ n(g.Label, {
3574
3675
  className: "label",
3575
3676
  htmlFor: P,
3576
3677
  children: [
3577
3678
  e,
3578
- r && /* @__PURE__ */ t($, {}),
3579
- o && /* @__PURE__ */ t(st, {
3679
+ r && /* @__PURE__ */ t(Q, {}),
3680
+ o && /* @__PURE__ */ t(ht, {
3580
3681
  label: s,
3581
3682
  children: o
3582
3683
  })
3583
3684
  ]
3584
3685
  }),
3585
- Y,
3686
+ q,
3586
3687
  i ? /* @__PURE__ */ t("div", {
3587
3688
  className: "field-error",
3588
- id: W,
3689
+ id: U,
3589
3690
  children: i
3590
3691
  }) : a ? /* @__PURE__ */ t("div", {
3591
3692
  className: "field-hint",
3592
- id: G,
3693
+ id: W,
3593
3694
  children: a
3594
3695
  }) : null,
3595
3696
  w && /* @__PURE__ */ n("div", {
3596
- className: `field-count${T && te >= T ? " at-limit" : ""}`,
3597
- children: [te, T ? ` / ${T}` : ""]
3697
+ className: `field-count${T && ie >= T ? " at-limit" : ""}`,
3698
+ children: [ie, T ? ` / ${T}` : ""]
3598
3699
  })
3599
3700
  ]
3600
3701
  });
3601
- }), lt = "a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex=\"-1\"])";
3602
- function ut({ open: e, title: r, subtitle: i, headerIcon: o, onClose: s, footer: c, size: u, wide: d = !1, side: f = !1, maxWidth: p, hideHeader: m = !1, staticBackdrop: h = !1, className: g = "", children: v, ...y }) {
3603
- E("AppModal", y);
3604
- let b = l(null);
3702
+ }), _t = "a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex=\"-1\"])", vt = {
3703
+ sm: 380,
3704
+ md: 440,
3705
+ lg: 640,
3706
+ xl: 880
3707
+ };
3708
+ function yt({ open: e, eyebrow: r, title: i, subtitle: o, headerIcon: s, tone: c = "default", dismissible: u = !0, onClose: d, footer: f, size: p = "md", placement: m = "center", hideHeader: h = !1, staticBackdrop: g = !1, className: v = "", children: y, ...b }) {
3709
+ O("AppModal", b);
3710
+ let x = l(null);
3605
3711
  a(() => {
3606
3712
  if (!e) return;
3607
- let t = b.current?.closest(".modal-content");
3713
+ let t = x.current?.closest(".modal-content");
3608
3714
  if (!t) return;
3609
- let n = () => Array.from(t.querySelectorAll(lt));
3715
+ let n = () => Array.from(t.querySelectorAll(_t));
3610
3716
  (t.querySelector("[data-autofocus]") || n().find((e) => !e.classList.contains("wui-modal-close")) || n()[0] || t).focus?.();
3611
3717
  }, [e]);
3612
- let x = ["wui-modal-shell", f ? "is-side" : ""].filter(Boolean).join(" "), S = [
3718
+ let S = typeof p == "number" ? p : vt[p] ?? vt.md, C = [
3613
3719
  "wui-modal",
3614
- d ? "wui-modal-wide" : "",
3615
- f ? "wui-modal-side" : "",
3616
- g
3720
+ c === "default" ? "" : `tone-${c}`,
3721
+ v
3617
3722
  ].filter(Boolean).join(" ");
3618
3723
  return /* @__PURE__ */ n(_, {
3619
3724
  show: e,
3620
- onHide: s,
3621
- animation: !1,
3622
- backdrop: !h || "static",
3623
- keyboard: !h,
3725
+ onHide: d,
3726
+ backdrop: !g || "static",
3727
+ keyboard: !g,
3624
3728
  autoFocus: !1,
3625
3729
  enforceFocus: !0,
3626
3730
  restoreFocus: !0,
3627
- size: u,
3628
- centered: !f,
3629
- className: x,
3630
- style: p == null ? void 0 : { "--wui-modal-max-width": typeof p == "number" ? `${p}px` : p },
3731
+ centered: m !== "top",
3732
+ className: "wui-modal-shell",
3733
+ style: { "--wui-modal-max-width": `${S}px` },
3631
3734
  dialogClassName: "wui-rb-dialog",
3632
- contentClassName: S,
3735
+ contentClassName: C,
3633
3736
  backdropClassName: "wui-modal-dim",
3634
- "aria-label": typeof r == "string" ? r : void 0,
3737
+ "aria-label": typeof i == "string" ? i : void 0,
3635
3738
  children: [
3636
- !m && /* @__PURE__ */ n("div", {
3739
+ !h && /* @__PURE__ */ n("div", {
3637
3740
  className: "wui-modal-header",
3638
3741
  children: [/* @__PURE__ */ n("div", {
3639
3742
  className: "wui-modal-heading",
3640
- children: [o && /* @__PURE__ */ t("span", {
3743
+ children: [s && /* @__PURE__ */ t("span", {
3641
3744
  className: "wui-modal-headicon",
3642
- children: /* @__PURE__ */ t(k, {
3643
- name: o,
3745
+ children: /* @__PURE__ */ t(N, {
3746
+ name: s,
3644
3747
  size: 18
3645
3748
  })
3646
3749
  }), /* @__PURE__ */ n("div", {
3647
3750
  className: "wui-modal-headtext",
3648
- children: [/* @__PURE__ */ t("div", {
3649
- className: "wui-modal-title",
3650
- children: r
3651
- }), i && /* @__PURE__ */ t("div", {
3652
- className: "wui-modal-subtitle",
3653
- children: i
3654
- })]
3751
+ children: [
3752
+ r && /* @__PURE__ */ t("div", {
3753
+ className: "wui-modal-eyebrow",
3754
+ children: r
3755
+ }),
3756
+ /* @__PURE__ */ t("div", {
3757
+ className: "wui-modal-title",
3758
+ children: i
3759
+ }),
3760
+ o && /* @__PURE__ */ t("div", {
3761
+ className: "wui-modal-subtitle",
3762
+ children: o
3763
+ })
3764
+ ]
3655
3765
  })]
3656
- }), /* @__PURE__ */ t("button", {
3766
+ }), u && /* @__PURE__ */ t("button", {
3657
3767
  type: "button",
3658
3768
  className: "wui-modal-close",
3659
- onClick: s,
3769
+ onClick: d,
3660
3770
  "aria-label": "Close",
3661
3771
  children: /* @__PURE__ */ t("svg", {
3662
3772
  width: "18",
@@ -3674,58 +3784,59 @@ function ut({ open: e, title: r, subtitle: i, headerIcon: o, onClose: s, footer:
3674
3784
  }),
3675
3785
  /* @__PURE__ */ t("div", {
3676
3786
  className: "wui-modal-body",
3677
- ref: b,
3678
- children: v
3787
+ ref: x,
3788
+ children: y
3679
3789
  }),
3680
- c && /* @__PURE__ */ t("div", {
3790
+ f && /* @__PURE__ */ t("div", {
3681
3791
  className: "wui-modal-footer",
3682
- children: c
3792
+ children: f
3683
3793
  })
3684
3794
  ]
3685
3795
  });
3686
3796
  }
3687
3797
  //#endregion
3688
3798
  //#region src/components/ModalIcons.jsx
3689
- var dt = (e) => function({ size: n = 72 }) {
3799
+ var bt = (e) => function({ size: n = 72 }) {
3690
3800
  return /* @__PURE__ */ t("wui-status-icon", {
3691
3801
  tone: e,
3692
3802
  size: n
3693
3803
  });
3694
- }, ft = {
3695
- success: dt("success"),
3696
- error: dt("error"),
3697
- warning: dt("warning"),
3698
- info: dt("info"),
3699
- delete: dt("delete")
3804
+ }, xt = {
3805
+ success: bt("success"),
3806
+ error: bt("error"),
3807
+ warning: bt("warning"),
3808
+ info: bt("info"),
3809
+ delete: bt("delete")
3700
3810
  };
3701
3811
  //#endregion
3702
3812
  //#region src/components/AppConfirmDialog.jsx
3703
- function pt({ open: r, title: i, message: o, confirmLabel: s = "Confirm", cancelLabel: c = "Cancel", danger: l = !1, tone: d, confirmPhrase: f, onConfirm: p, onClose: m, loading: h = !1, staticBackdrop: g = !1, ..._ }) {
3704
- E("AppConfirmDialog", _);
3705
- let [v, y] = u("");
3813
+ function St({ open: r, title: i, message: o, confirmLabel: s = "Confirm", cancelLabel: c = "Cancel", danger: l = !1, tone: d, confirmPhrase: f, onConfirm: p, onClose: m, loading: h = !1, staticBackdrop: g = !1, placement: _ = "center", ...v }) {
3814
+ O("AppConfirmDialog", v);
3815
+ let [y, b] = u("");
3706
3816
  if (a(() => {
3707
- r || y("");
3817
+ r || b("");
3708
3818
  }, [r]), !r) return null;
3709
- let b = !!f && v.trim() !== f, x = ft[d || (l ? "delete" : "info")], S = () => {
3819
+ let x = !!f && y.trim() !== f, S = xt[d || (l ? "delete" : "info")], C = () => {
3710
3820
  h || m?.();
3711
3821
  };
3712
- return /* @__PURE__ */ t(ut, {
3822
+ return /* @__PURE__ */ t(yt, {
3713
3823
  open: r,
3714
3824
  hideHeader: !0,
3715
3825
  title: i,
3716
- onClose: S,
3826
+ onClose: C,
3717
3827
  staticBackdrop: g,
3828
+ placement: _,
3718
3829
  className: "wui-confirm",
3719
3830
  footer: /* @__PURE__ */ n("div", {
3720
3831
  className: "wui-confirm-actions",
3721
- children: [/* @__PURE__ */ t(Qe, {
3832
+ children: [/* @__PURE__ */ t(L, {
3722
3833
  variant: "secondary",
3723
3834
  disabled: h,
3724
- onClick: S,
3835
+ onClick: C,
3725
3836
  children: c
3726
- }), /* @__PURE__ */ t(Qe, {
3837
+ }), /* @__PURE__ */ t(L, {
3727
3838
  variant: l ? "danger" : "primary",
3728
- disabled: b,
3839
+ disabled: x,
3729
3840
  loading: h,
3730
3841
  onClick: p,
3731
3842
  children: s
@@ -3734,9 +3845,9 @@ function pt({ open: r, title: i, message: o, confirmLabel: s = "Confirm", cancel
3734
3845
  children: /* @__PURE__ */ n("div", {
3735
3846
  className: "wui-confirm-content",
3736
3847
  children: [
3737
- x && /* @__PURE__ */ t("span", {
3848
+ S && /* @__PURE__ */ t("span", {
3738
3849
  className: "wui-confirm-icon",
3739
- children: /* @__PURE__ */ t(x, { size: 104 })
3850
+ children: /* @__PURE__ */ t(S, { size: 104 })
3740
3851
  }),
3741
3852
  /* @__PURE__ */ t("h3", {
3742
3853
  className: "wui-confirm-title",
@@ -3748,15 +3859,15 @@ function pt({ open: r, title: i, message: o, confirmLabel: s = "Confirm", cancel
3748
3859
  className: "wui-confirm-msg",
3749
3860
  children: o
3750
3861
  }),
3751
- f && /* @__PURE__ */ t(ct, {
3862
+ f && /* @__PURE__ */ t(gt, {
3752
3863
  fieldClassName: "mt-3 mb-0 w-100 text-start",
3753
3864
  label: /* @__PURE__ */ n(e, { children: [
3754
3865
  "Type ",
3755
3866
  /* @__PURE__ */ t("strong", { children: f }),
3756
3867
  " to confirm"
3757
3868
  ] }),
3758
- value: v,
3759
- onChange: (e) => y(e.target.value),
3869
+ value: y,
3870
+ onChange: (e) => b(e.target.value),
3760
3871
  "aria-label": `Type ${f} to confirm`,
3761
3872
  disabled: h
3762
3873
  })
@@ -3766,8 +3877,8 @@ function pt({ open: r, title: i, message: o, confirmLabel: s = "Confirm", cancel
3766
3877
  }
3767
3878
  //#endregion
3768
3879
  //#region src/components/AppSkeleton.jsx
3769
- function mt({ width: e = "100%", height: n = 14, radius: r = 6, className: i = "", style: a, ...o }) {
3770
- return E("AppSkeleton", o), /* @__PURE__ */ t("span", {
3880
+ function Ct({ width: e = "100%", height: n = 14, radius: r = 6, className: i = "", style: a, ...o }) {
3881
+ return O("AppSkeleton", o), /* @__PURE__ */ t("span", {
3771
3882
  className: `skeleton${i ? ` ${i}` : ""}`,
3772
3883
  "aria-hidden": "true",
3773
3884
  style: {
@@ -3779,7 +3890,7 @@ function mt({ width: e = "100%", height: n = 14, radius: r = 6, className: i = "
3779
3890
  ...o
3780
3891
  });
3781
3892
  }
3782
- var ht = [
3893
+ var wt = [
3783
3894
  "r0",
3784
3895
  "r1",
3785
3896
  "r2",
@@ -3788,7 +3899,7 @@ var ht = [
3788
3899
  "r5",
3789
3900
  "r6",
3790
3901
  "r7"
3791
- ], gt = [
3902
+ ], Tt = [
3792
3903
  "c0",
3793
3904
  "c1",
3794
3905
  "c2",
@@ -3798,16 +3909,29 @@ var ht = [
3798
3909
  "c6",
3799
3910
  "c7"
3800
3911
  ];
3801
- function _t({ rows: e = 4, cols: n = 5 }) {
3802
- return ht.slice(0, e).map((e) => /* @__PURE__ */ t("tr", { children: gt.slice(0, n).map((e, n) => /* @__PURE__ */ t("td", { children: /* @__PURE__ */ t(mt, {
3912
+ function Et({ rows: e = 4, cols: n = 5 }) {
3913
+ return wt.slice(0, e).map((e) => /* @__PURE__ */ t("tr", { children: Tt.slice(0, n).map((e, n) => /* @__PURE__ */ t("td", { children: /* @__PURE__ */ t(Ct, {
3803
3914
  width: n === 0 ? "70%" : "50%",
3804
3915
  height: 12
3805
3916
  }) }, e)) }, e));
3806
3917
  }
3807
3918
  //#endregion
3919
+ //#region src/lib/pageWindow.js
3920
+ var Dt = (e, t) => {
3921
+ let n = [];
3922
+ for (let r = e; r <= t; r += 1) n.push(r);
3923
+ return n;
3924
+ };
3925
+ function Ot(e, t, { siblingCount: n = 2, boundaryCount: r = 1 } = {}) {
3926
+ let i = Math.max(1, t), a = Math.min(Math.max(1, e), i);
3927
+ if (i <= n * 2 + 3 + r * 2) return Dt(1, i);
3928
+ let o = Math.max(a - n, r + 2), s = Math.min(a + n, i - r - 1), c = o > r + 2, l = s < i - r - 1, u = Dt(1, r);
3929
+ return u.push(...c ? ["ellipsis-left"] : Dt(r + 1, o - 1)), u.push(...Dt(o, s)), u.push(...l ? ["ellipsis-right"] : Dt(s + 1, i - r)), u.push(...Dt(i - r + 1, i)), u;
3930
+ }
3931
+ //#endregion
3808
3932
  //#region src/components/AppSelectMini.jsx
3809
- function vt({ value: e, onChange: n, options: r = [], placeholder: i = "Select...", name: o, ariaLabel: s, id: c, disabled: u, size: d, icon: f, prefix: p, className: m, ...h }) {
3810
- E("AppSelectMini", h);
3933
+ function kt({ value: e, onChange: n, options: r = [], placeholder: i = "Select...", name: o, ariaLabel: s, id: c, disabled: u, size: d, icon: f, prefix: p, className: m, ...h }) {
3934
+ O("AppSelectMini", h);
3811
3935
  let g = l(null);
3812
3936
  return a(() => {
3813
3937
  g.current && (g.current.options = r.map((e) => ({
@@ -3840,19 +3964,21 @@ function vt({ value: e, onChange: n, options: r = [], placeholder: i = "Select..
3840
3964
  }
3841
3965
  //#endregion
3842
3966
  //#region src/components/AppTablePagination.jsx
3843
- var yt = [
3967
+ var At = [
3844
3968
  5,
3845
3969
  10,
3846
3970
  25,
3847
3971
  50
3848
3972
  ];
3849
- function bt({ page: e, totalPages: r, pageSize: i, total: a, firstRow: o, lastRow: s, onPageChange: c, onPageSizeChange: l, pageSizes: u = yt, ...d }) {
3850
- return E("AppTablePagination", d), /* @__PURE__ */ n("div", {
3973
+ function jt({ page: e, totalPages: r, pageSize: i, total: a, firstRow: o, lastRow: s, onPageChange: c, onPageSizeChange: l, pageSizes: u = At, mode: d = "prev-next", ...f }) {
3974
+ O("AppTablePagination", f);
3975
+ let p = d === "numbered", m = p ? Ot(e, r) : null;
3976
+ return /* @__PURE__ */ n("div", {
3851
3977
  className: "table-pagination",
3852
3978
  children: [
3853
3979
  /* @__PURE__ */ n("span", {
3854
3980
  className: "tpg-rows",
3855
- children: ["Rows per page:", /* @__PURE__ */ t(vt, {
3981
+ children: ["Rows per page:", /* @__PURE__ */ t(kt, {
3856
3982
  value: i,
3857
3983
  onChange: (e) => l(Number(e)),
3858
3984
  ariaLabel: "Rows per page",
@@ -3874,44 +4000,59 @@ function bt({ page: e, totalPages: r, pageSize: i, total: a, firstRow: o, lastRo
3874
4000
  }),
3875
4001
  /* @__PURE__ */ n("div", {
3876
4002
  className: "tpg-nav",
3877
- children: [/* @__PURE__ */ t("button", {
3878
- type: "button",
3879
- className: "tpg-arrow",
3880
- onClick: () => c(Math.max(1, e - 1)),
3881
- disabled: e <= 1,
3882
- "aria-label": "Previous page",
3883
- children: /* @__PURE__ */ t(k, {
3884
- name: "arrow-left",
3885
- size: 18
3886
- })
3887
- }), /* @__PURE__ */ t("button", {
3888
- type: "button",
3889
- className: "tpg-arrow",
3890
- onClick: () => c(Math.min(r, e + 1)),
3891
- disabled: e >= r,
3892
- "aria-label": "Next page",
3893
- children: /* @__PURE__ */ t(k, {
3894
- name: "arrow-right",
3895
- size: 18
4003
+ children: [
4004
+ /* @__PURE__ */ t("button", {
4005
+ type: "button",
4006
+ className: "tpg-arrow",
4007
+ onClick: () => c(Math.max(1, e - 1)),
4008
+ disabled: e <= 1,
4009
+ "aria-label": "Previous page",
4010
+ children: /* @__PURE__ */ t(N, {
4011
+ name: "arrow-left",
4012
+ size: 18
4013
+ })
4014
+ }),
4015
+ p && m.map((n) => typeof n == "number" ? /* @__PURE__ */ t("button", {
4016
+ type: "button",
4017
+ className: `tpg-page${n === e ? " is-active" : ""}`,
4018
+ onClick: () => c(n),
4019
+ "aria-current": n === e ? "page" : void 0,
4020
+ "aria-label": `Page ${n}`,
4021
+ children: n
4022
+ }, n) : /* @__PURE__ */ t("span", {
4023
+ className: "tpg-ellipsis",
4024
+ "aria-hidden": "true",
4025
+ children: "…"
4026
+ }, n)),
4027
+ /* @__PURE__ */ t("button", {
4028
+ type: "button",
4029
+ className: "tpg-arrow",
4030
+ onClick: () => c(Math.min(r, e + 1)),
4031
+ disabled: e >= r,
4032
+ "aria-label": "Next page",
4033
+ children: /* @__PURE__ */ t(N, {
4034
+ name: "arrow-right",
4035
+ size: 18
4036
+ })
3896
4037
  })
3897
- })]
4038
+ ]
3898
4039
  })
3899
4040
  ]
3900
4041
  });
3901
4042
  }
3902
4043
  //#endregion
3903
4044
  //#region src/components/AppDataTable.jsx
3904
- function xt(e) {
4045
+ function Mt(e) {
3905
4046
  return e === "end" ? "wui-cell-end" : e === "num" ? "num" : e === "center" ? "text-center" : "";
3906
4047
  }
3907
- function St(e) {
4048
+ function Nt(e) {
3908
4049
  return e == null || e === "" ? "—" : typeof e == "boolean" ? String(e) : e;
3909
4050
  }
3910
- function Ct({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s, loading: c = !1, skeletonRows: l = 5, empty: u = "No records found.", emptyFiltered: d, sourceCount: f, rowActions: p, rowActionsLabel: m, pagination: h, ariaLabel: g, className: _ = "", selectable: v = !1, selectedIds: y, onToggleRow: b, onToggleAll: x, ...S }) {
3911
- E("AppDataTable", S);
3912
- let C = Math.max(1, r.length + +!!p + +!!v), w = v && i ? i.reduce((e, t, n) => e + +!!y?.has(a(t, n)), 0) : 0, T = v && i && i.length > 0 && w === i.length, D = w > 0 && !T, O = (e) => {
3913
- e && (e.indeterminate = D);
3914
- }, A = d !== void 0 && f > 0 ? d : u;
4051
+ function Pt({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s, loading: c = !1, skeletonRows: l = 5, empty: u = "No records found.", emptyFiltered: d, sourceCount: f, rowActions: p, rowActionsLabel: m, pagination: h, ariaLabel: g, className: _ = "", selectable: v = !1, selectedIds: y, onToggleRow: b, onToggleAll: x, ...S }) {
4052
+ O("AppDataTable", S);
4053
+ let C = Math.max(1, r.length + +!!p + +!!v), w = v && i ? i.reduce((e, t, n) => e + +!!y?.has(a(t, n)), 0) : 0, T = v && i && i.length > 0 && w === i.length, E = w > 0 && !T, D = (e) => {
4054
+ e && (e.indeterminate = E);
4055
+ }, k = d !== void 0 && f > 0 ? d : u;
3915
4056
  return /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("div", {
3916
4057
  className: "table-wrap",
3917
4058
  children: /* @__PURE__ */ n("table", {
@@ -3921,7 +4062,7 @@ function Ct({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
3921
4062
  v && /* @__PURE__ */ t("th", {
3922
4063
  className: "wui-select-cell",
3923
4064
  children: /* @__PURE__ */ t("input", {
3924
- ref: O,
4065
+ ref: D,
3925
4066
  type: "checkbox",
3926
4067
  className: "wui-check",
3927
4068
  checked: T,
@@ -3932,7 +4073,7 @@ function Ct({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
3932
4073
  r.map((e, r) => {
3933
4074
  let i = !!(e.sortable && s), a = o && o.key === e.key;
3934
4075
  return /* @__PURE__ */ n("th", {
3935
- className: (i ? "sortable " : "") + (r === 0 ? "wui-name-cell " : "") + xt(e.align),
4076
+ className: (i ? "sortable " : "") + (r === 0 ? "wui-name-cell " : "") + Mt(e.align),
3936
4077
  style: e.width ? { width: e.width } : void 0,
3937
4078
  tabIndex: i ? 0 : void 0,
3938
4079
  "aria-sort": a ? o.dir === "asc" ? "ascending" : "descending" : i ? "none" : void 0,
@@ -3942,7 +4083,7 @@ function Ct({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
3942
4083
  } : void 0,
3943
4084
  children: [e.label, i && /* @__PURE__ */ t("span", {
3944
4085
  className: "sort-icon",
3945
- children: /* @__PURE__ */ t(k, {
4086
+ children: /* @__PURE__ */ t(N, {
3946
4087
  name: "chevrons-up-down",
3947
4088
  size: 14
3948
4089
  })
@@ -3959,7 +4100,7 @@ function Ct({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
3959
4100
  children: "Actions"
3960
4101
  })
3961
4102
  }))
3962
- ] }) }), /* @__PURE__ */ t("tbody", { children: c ? /* @__PURE__ */ t(_t, {
4103
+ ] }) }), /* @__PURE__ */ t("tbody", { children: c ? /* @__PURE__ */ t(Et, {
3963
4104
  rows: l,
3964
4105
  cols: C
3965
4106
  }) : i?.length ? i.map((e, i) => {
@@ -3978,8 +4119,8 @@ function Ct({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
3978
4119
  })
3979
4120
  }),
3980
4121
  r.map((n, r) => /* @__PURE__ */ t("td", {
3981
- className: (r === 0 ? "wui-name-cell " : "") + xt(n.align) + (n.cellClassName ? ` ${n.cellClassName}` : ""),
3982
- children: n.render ? n.render(e) : St(e[n.key])
4122
+ className: (r === 0 ? "wui-name-cell " : "") + Mt(n.align) + (n.cellClassName ? ` ${n.cellClassName}` : ""),
4123
+ children: n.render ? n.render(e) : Nt(e[n.key])
3983
4124
  }, n.key)),
3984
4125
  p && /* @__PURE__ */ t("td", { children: /* @__PURE__ */ t("div", {
3985
4126
  className: "u-row-actions",
@@ -3990,10 +4131,10 @@ function Ct({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
3990
4131
  }) : /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
3991
4132
  colSpan: C,
3992
4133
  className: "wui-table-empty",
3993
- children: A
4134
+ children: k
3994
4135
  }) }) })]
3995
4136
  })
3996
- }), h && !c && h.total > 0 && /* @__PURE__ */ t(bt, {
4137
+ }), h && !c && h.total > 0 && /* @__PURE__ */ t(jt, {
3997
4138
  page: h.page,
3998
4139
  totalPages: h.totalPages,
3999
4140
  pageSize: h.pageSize,
@@ -4006,8 +4147,8 @@ function Ct({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
4006
4147
  }
4007
4148
  //#endregion
4008
4149
  //#region src/components/AppDatePicker.jsx
4009
- function wt({ value: e, onChange: r, label: i, required: s = !1, hint: c, error: u, name: d, min: f, max: p, placeholder: m = "Enter Date", disabled: h, size: g, firstDay: _, id: v, ariaLabel: y, className: b = "", ...x }) {
4010
- E("AppDatePicker", x);
4150
+ function Ft({ value: e, onChange: r, label: i, required: s = !1, hint: c, error: u, name: d, min: f, max: p, placeholder: m = "Enter Date", disabled: h, size: g, firstDay: _, id: v, ariaLabel: y, className: b = "", ...x }) {
4151
+ O("AppDatePicker", x);
4011
4152
  let S = l(null), C = o(), w = v || d || C;
4012
4153
  a(() => {
4013
4154
  let t = S.current;
@@ -4018,7 +4159,7 @@ function wt({ value: e, onChange: r, label: i, required: s = !1, hint: c, error:
4018
4159
  let t = () => r?.(e.value);
4019
4160
  return e.addEventListener("change", t), () => e.removeEventListener("change", t);
4020
4161
  }, [r]);
4021
- let T = !i && !u && !c, D = /* @__PURE__ */ t("wui-datepicker", {
4162
+ let T = !i && !u && !c, E = /* @__PURE__ */ t("wui-datepicker", {
4022
4163
  ref: S,
4023
4164
  id: w,
4024
4165
  name: d,
@@ -4033,7 +4174,7 @@ function wt({ value: e, onChange: r, label: i, required: s = !1, hint: c, error:
4033
4174
  required: s ? "" : void 0,
4034
4175
  className: T && b || void 0
4035
4176
  });
4036
- return T ? D : /* @__PURE__ */ n("div", {
4177
+ return T ? E : /* @__PURE__ */ n("div", {
4037
4178
  className: `field${b ? ` ${b}` : ""}`,
4038
4179
  children: [
4039
4180
  i && /* @__PURE__ */ n("label", {
@@ -4045,7 +4186,7 @@ function wt({ value: e, onChange: r, label: i, required: s = !1, hint: c, error:
4045
4186
  children: "*"
4046
4187
  })]
4047
4188
  }),
4048
- D,
4189
+ E,
4049
4190
  u && /* @__PURE__ */ t("div", {
4050
4191
  className: "field-error",
4051
4192
  children: u
@@ -4059,9 +4200,9 @@ function wt({ value: e, onChange: r, label: i, required: s = !1, hint: c, error:
4059
4200
  }
4060
4201
  //#endregion
4061
4202
  //#region src/components/AppDateRangePicker.jsx
4062
- function Tt({ start: e, end: r, onChange: i, label: s, required: c = !1, hint: u, error: d, startName: f, endName: p, min: m, max: h, placeholder: g = "Start – End", disabled: _, size: v, firstDay: y, id: b, ariaLabel: x, className: S = "", ...C }) {
4063
- E("AppDateRangePicker", C);
4064
- let w = l(null), T = o(), D = b || f || T;
4203
+ function It({ start: e, end: r, onChange: i, label: s, required: c = !1, hint: u, error: d, startName: f, endName: p, min: m, max: h, placeholder: g = "Start – End", disabled: _, size: v, firstDay: y, id: b, ariaLabel: x, className: S = "", ...C }) {
4204
+ O("AppDateRangePicker", C);
4205
+ let w = l(null), T = o(), E = b || f || T;
4065
4206
  a(() => {
4066
4207
  let t = w.current;
4067
4208
  t && t.value.start !== (e ?? "") && t.setAttribute("start", e ?? "");
@@ -4074,9 +4215,9 @@ function Tt({ start: e, end: r, onChange: i, label: s, required: c = !1, hint: u
4074
4215
  let t = () => i?.(e.value);
4075
4216
  return e.addEventListener("change", t), () => e.removeEventListener("change", t);
4076
4217
  }, [i]);
4077
- let O = !s && !d && !u, k = /* @__PURE__ */ t("wui-date-range", {
4218
+ let D = !s && !d && !u, k = /* @__PURE__ */ t("wui-date-range", {
4078
4219
  ref: w,
4079
- id: D,
4220
+ id: E,
4080
4221
  "start-name": f,
4081
4222
  "end-name": p,
4082
4223
  min: m,
@@ -4088,14 +4229,14 @@ function Tt({ start: e, end: r, onChange: i, label: s, required: c = !1, hint: u
4088
4229
  "aria-invalid": d ? "true" : void 0,
4089
4230
  disabled: _ ? "" : void 0,
4090
4231
  required: c ? "" : void 0,
4091
- className: O && S || void 0
4232
+ className: D && S || void 0
4092
4233
  });
4093
- return O ? k : /* @__PURE__ */ n("div", {
4234
+ return D ? k : /* @__PURE__ */ n("div", {
4094
4235
  className: `field${S ? ` ${S}` : ""}`,
4095
4236
  children: [
4096
4237
  s && /* @__PURE__ */ n("label", {
4097
4238
  className: "label",
4098
- htmlFor: D,
4239
+ htmlFor: E,
4099
4240
  children: [s, c && /* @__PURE__ */ t("span", {
4100
4241
  className: "required",
4101
4242
  "aria-hidden": "true",
@@ -4116,7 +4257,7 @@ function Tt({ start: e, end: r, onChange: i, label: s, required: c = !1, hint: u
4116
4257
  }
4117
4258
  //#endregion
4118
4259
  //#region src/components/AppDropdown.jsx
4119
- var Et = r(function({ icon: e, iconSize: n = 20, btnClassName: r = "topbar-icon-btn", label: i, align: a = "end", "aria-label": o, className: s, ...c }, l) {
4260
+ var Lt = r(function({ icon: e, iconSize: n = 20, btnClassName: r = "topbar-icon-btn", label: i, align: a = "end", "aria-label": o, className: s, ...c }, l) {
4120
4261
  return /* @__PURE__ */ t("button", {
4121
4262
  ref: l,
4122
4263
  type: "button",
@@ -4124,27 +4265,27 @@ var Et = r(function({ icon: e, iconSize: n = 20, btnClassName: r = "topbar-icon-
4124
4265
  title: i,
4125
4266
  "aria-label": o,
4126
4267
  ...c,
4127
- children: /* @__PURE__ */ t(k, {
4268
+ children: /* @__PURE__ */ t(N, {
4128
4269
  name: e,
4129
4270
  size: n
4130
4271
  })
4131
4272
  });
4132
4273
  });
4133
- function Dt({ icon: e, iconSize: r, toggleClassName: i = "topbar-icon-btn", label: a, ariaLabel: o, align: s = "end", items: c = [], menuClassName: l = "", linkComponent: u, ...d }) {
4134
- return E("AppDropdown", d), /* @__PURE__ */ n(v, {
4274
+ function Rt({ icon: e, iconSize: r, toggleClassName: i = "topbar-icon-btn", label: a, ariaLabel: o, align: s = "end", items: c = [], menuClassName: l = "", linkComponent: u, children: d, ...f }) {
4275
+ return O("AppDropdown", f), /* @__PURE__ */ n(h, {
4135
4276
  align: s,
4136
- children: [/* @__PURE__ */ t(v.Toggle, {
4137
- as: Et,
4277
+ children: [/* @__PURE__ */ t(h.Toggle, {
4278
+ as: Lt,
4138
4279
  icon: e,
4139
4280
  iconSize: r,
4140
4281
  btnClassName: i,
4141
4282
  title: a,
4142
4283
  "aria-label": o
4143
- }), /* @__PURE__ */ t(v.Menu, {
4284
+ }), /* @__PURE__ */ t(h.Menu, {
4144
4285
  className: l,
4145
4286
  renderOnMount: !0,
4146
- children: c.map((e) => {
4147
- if (e.divider) return /* @__PURE__ */ t(v.Divider, {}, e.key);
4287
+ children: d ?? c.map((e) => {
4288
+ if (e.divider) return /* @__PURE__ */ t(h.Divider, {}, e.key);
4148
4289
  let r = e.to ? u ? {
4149
4290
  as: u,
4150
4291
  to: e.to
@@ -4155,14 +4296,14 @@ function Dt({ icon: e, iconSize: r, toggleClassName: i = "topbar-icon-btn", labe
4155
4296
  as: "button",
4156
4297
  type: "button"
4157
4298
  };
4158
- return /* @__PURE__ */ n(v.Item, {
4299
+ return /* @__PURE__ */ n(h.Item, {
4159
4300
  ...r,
4160
4301
  onClick: e.onClick,
4161
4302
  className: e.danger ? "danger" : void 0,
4162
4303
  children: [e.image ? /* @__PURE__ */ t("img", {
4163
4304
  src: e.image,
4164
4305
  alt: ""
4165
- }) : e.icon && /* @__PURE__ */ t(k, {
4306
+ }) : e.icon && /* @__PURE__ */ t(N, {
4166
4307
  name: e.icon,
4167
4308
  size: 16
4168
4309
  }), e.label]
@@ -4172,49 +4313,16 @@ function Dt({ icon: e, iconSize: r, toggleClassName: i = "topbar-icon-btn", labe
4172
4313
  });
4173
4314
  }
4174
4315
  //#endregion
4175
- //#region src/components/AppEmptyState.jsx
4176
- function Ot({ icon: e, iconSize: r = 24, size: i = "md", title: a, text: o, action: s, className: c = "", style: l, ...u }) {
4177
- return E("AppEmptyState", u), /* @__PURE__ */ n("div", {
4178
- className: [
4179
- "empty-state",
4180
- i === "sm" ? "empty-state-sm" : "",
4181
- c
4182
- ].filter(Boolean).join(" "),
4183
- style: l,
4184
- children: [
4185
- e ? /* @__PURE__ */ t("div", {
4186
- className: "empty-state-icon",
4187
- children: /* @__PURE__ */ t(k, {
4188
- name: e,
4189
- size: r
4190
- })
4191
- }) : null,
4192
- a != null && /* @__PURE__ */ t("div", {
4193
- className: "empty-state-title",
4194
- children: a
4195
- }),
4196
- o != null && /* @__PURE__ */ t("div", {
4197
- className: "empty-state-message",
4198
- children: o
4199
- }),
4200
- s && /* @__PURE__ */ t("div", {
4201
- className: "empty-state-action",
4202
- children: s
4203
- })
4204
- ]
4205
- });
4206
- }
4207
- //#endregion
4208
4316
  //#region src/components/AppFileAttachment.jsx
4209
- function kt({ label: r = "Attachment", value: i, name: a, onChange: s, multiple: c = !1, accept: l = Fe, maxSizeMb: d = 5, optional: f = !1, error: p, id: m, ...h }) {
4210
- E("AppFileAttachment", h);
4211
- let g = o(), _ = m || a || g, [v, y] = u(""), b = c && Array.isArray(i) ? i : i ? [i] : [], x = Ve(l), S = (e) => e instanceof File ? Be(e) : x || Be(e), C = !c && b.length === 1 && S(b[0]);
4317
+ function zt({ label: r = "Attachment", value: i, name: a, onChange: s, multiple: c = !1, accept: l = Ke, maxSizeMb: d = 5, optional: f = !1, error: p, id: m, ...h }) {
4318
+ O("AppFileAttachment", h);
4319
+ let g = o(), _ = m || a || g, [v, y] = u(""), b = c && Array.isArray(i) ? i : i ? [i] : [], x = Qe(l), S = (e) => e instanceof File ? Ze(e) : x || Ze(e), C = !c && b.length === 1 && S(b[0]);
4212
4320
  function w(e) {
4213
4321
  let t = Array.from(e.target.files || []);
4214
4322
  if (e.target.value = "", !t.length) return;
4215
4323
  let n = [], r = "";
4216
4324
  for (let e of t) {
4217
- let t = We(e, {
4325
+ let t = tt(e, {
4218
4326
  accept: l,
4219
4327
  maxSizeMb: d
4220
4328
  });
@@ -4225,14 +4333,14 @@ function kt({ label: r = "Attachment", value: i, name: a, onChange: s, multiple:
4225
4333
  n.push(e);
4226
4334
  }
4227
4335
  if (y(r), n.length) if (c) {
4228
- let e = Array.isArray(i) ? i : i ? [i] : [], t = new Set(e.map(At));
4229
- s(e.concat(n.filter((e) => !t.has(At(e)))));
4336
+ let e = Array.isArray(i) ? i : i ? [i] : [], t = new Set(e.map(Bt));
4337
+ s(e.concat(n.filter((e) => !t.has(Bt(e)))));
4230
4338
  } else s(n[0]);
4231
4339
  }
4232
4340
  function T(e) {
4233
4341
  y(""), s(c ? b.filter((t, n) => n !== e) : null);
4234
4342
  }
4235
- let D = p || v, O = c || b.length === 0, A = x ? "image" : "file", j = c ? `Add ${A}s` : `Add ${x ? "an" : "a"} ${A}`;
4343
+ let E = p || v, D = c || b.length === 0, k = x ? "image" : "file", A = c ? `Add ${k}s` : `Add ${x ? "an" : "a"} ${k}`;
4236
4344
  return /* @__PURE__ */ n("div", {
4237
4345
  className: "field",
4238
4346
  children: [
@@ -4244,13 +4352,13 @@ function kt({ label: r = "Attachment", value: i, name: a, onChange: s, multiple:
4244
4352
  children: " (optional)"
4245
4353
  })]
4246
4354
  }),
4247
- O && /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ n("label", {
4355
+ D && /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ n("label", {
4248
4356
  className: "attach-drop",
4249
4357
  htmlFor: _,
4250
4358
  children: [
4251
4359
  /* @__PURE__ */ t("span", {
4252
4360
  className: "attach-drop-icon",
4253
- children: /* @__PURE__ */ t(k, {
4361
+ children: /* @__PURE__ */ t(N, {
4254
4362
  name: x ? "image" : "file-text",
4255
4363
  size: 18
4256
4364
  })
@@ -4259,11 +4367,11 @@ function kt({ label: r = "Attachment", value: i, name: a, onChange: s, multiple:
4259
4367
  className: "attach-drop-copy",
4260
4368
  children: [/* @__PURE__ */ t("span", {
4261
4369
  className: "attach-drop-title",
4262
- children: j
4370
+ children: A
4263
4371
  }), /* @__PURE__ */ n("span", {
4264
4372
  className: "attach-drop-hint",
4265
4373
  children: [
4266
- He(l),
4374
+ $e(l),
4267
4375
  ", up to ",
4268
4376
  d,
4269
4377
  " MB"
@@ -4284,32 +4392,32 @@ function kt({ label: r = "Attachment", value: i, name: a, onChange: s, multiple:
4284
4392
  multiple: c || void 0,
4285
4393
  onChange: w
4286
4394
  })] }),
4287
- C ? /* @__PURE__ */ t(Nt, {
4395
+ C ? /* @__PURE__ */ t(Ut, {
4288
4396
  item: b[0],
4289
4397
  isImage: !0,
4290
4398
  onRemove: () => T(0)
4291
4399
  }) : b.length > 0 && /* @__PURE__ */ t("div", {
4292
4400
  className: "attach-list",
4293
- children: b.map((e, n) => /* @__PURE__ */ t(Pt, {
4401
+ children: b.map((e, n) => /* @__PURE__ */ t(Wt, {
4294
4402
  item: e,
4295
4403
  isImage: S(e),
4296
4404
  onRemove: () => T(n)
4297
- }, At(e)))
4405
+ }, Bt(e)))
4298
4406
  }),
4299
- D && /* @__PURE__ */ t("div", {
4407
+ E && /* @__PURE__ */ t("div", {
4300
4408
  className: "field-error",
4301
- children: D
4409
+ children: E
4302
4410
  })
4303
4411
  ]
4304
4412
  });
4305
4413
  }
4306
- function At(e) {
4414
+ function Bt(e) {
4307
4415
  return e instanceof File ? `${e.name}:${e.size}` : e?.url || e?.name || "item";
4308
4416
  }
4309
- function jt(e) {
4417
+ function Vt(e) {
4310
4418
  return e instanceof File ? e.name : e?.name;
4311
4419
  }
4312
- function Mt(e, t) {
4420
+ function Ht(e, t) {
4313
4421
  let [n, r] = u(null);
4314
4422
  return a(() => {
4315
4423
  if (!t) {
@@ -4323,8 +4431,8 @@ function Mt(e, t) {
4323
4431
  r(e?.url || null);
4324
4432
  }, [e, t]), n;
4325
4433
  }
4326
- function Nt({ item: e, isImage: r, onRemove: i }) {
4327
- let a = Mt(e, r), o = jt(e), s = e instanceof File ? `${(e.size / 1024).toFixed(0)} KB` : null;
4434
+ function Ut({ item: e, isImage: r, onRemove: i }) {
4435
+ let a = Ht(e, r), o = Vt(e), s = e instanceof File ? `${(e.size / 1024).toFixed(0)} KB` : null;
4328
4436
  return /* @__PURE__ */ n("div", {
4329
4437
  className: "attach-preview",
4330
4438
  children: [/* @__PURE__ */ n("div", {
@@ -4337,7 +4445,7 @@ function Nt({ item: e, isImage: r, onRemove: i }) {
4337
4445
  className: "attach-remove",
4338
4446
  "aria-label": "Remove attachment",
4339
4447
  onClick: i,
4340
- children: /* @__PURE__ */ t(k, {
4448
+ children: /* @__PURE__ */ t(N, {
4341
4449
  name: "x",
4342
4450
  size: 18
4343
4451
  })
@@ -4354,8 +4462,8 @@ function Nt({ item: e, isImage: r, onRemove: i }) {
4354
4462
  })]
4355
4463
  });
4356
4464
  }
4357
- function Pt({ item: e, isImage: r, onRemove: i }) {
4358
- let a = Mt(e, r), o = jt(e), s = e instanceof File ? `${(e.size / 1024).toFixed(0)} KB` : null;
4465
+ function Wt({ item: e, isImage: r, onRemove: i }) {
4466
+ let a = Ht(e, r), o = Vt(e), s = e instanceof File ? `${(e.size / 1024).toFixed(0)} KB` : null;
4359
4467
  return /* @__PURE__ */ n("div", {
4360
4468
  className: "attach-item",
4361
4469
  children: [
@@ -4364,7 +4472,7 @@ function Pt({ item: e, isImage: r, onRemove: i }) {
4364
4472
  children: a ? /* @__PURE__ */ t("img", {
4365
4473
  src: a,
4366
4474
  alt: o
4367
- }) : /* @__PURE__ */ t(k, {
4475
+ }) : /* @__PURE__ */ t(N, {
4368
4476
  name: "file-text",
4369
4477
  size: 18
4370
4478
  })
@@ -4384,7 +4492,7 @@ function Pt({ item: e, isImage: r, onRemove: i }) {
4384
4492
  className: "attach-item-remove",
4385
4493
  "aria-label": `Remove ${o || "attachment"}`,
4386
4494
  onClick: i,
4387
- children: /* @__PURE__ */ t(k, {
4495
+ children: /* @__PURE__ */ t(N, {
4388
4496
  name: "x",
4389
4497
  size: 16
4390
4498
  })
@@ -4394,9 +4502,9 @@ function Pt({ item: e, isImage: r, onRemove: i }) {
4394
4502
  }
4395
4503
  //#endregion
4396
4504
  //#region src/components/AppFilePicker.jsx
4397
- function Ft({ label: e, value: r, name: i, onPick: s, multiple: c = !1, maxFiles: d, accept: f = ".jpg,.jpeg,.png", maxSizeMb: p = 5, required: m, error: h, className: g = "", ..._ }) {
4398
- E("AppFilePicker", _);
4399
- let [v, y] = u(null), [b, x] = u(!1), [S, C] = u(""), w = l(null), T = o(), D = i || T;
4505
+ function Gt({ label: e, value: r, name: i, onPick: s, multiple: c = !1, maxFiles: d, accept: f = ".jpg,.jpeg,.png", maxSizeMb: p = 5, required: m, error: h, className: g = "", ..._ }) {
4506
+ O("AppFilePicker", _);
4507
+ let [v, y] = u(null), [b, x] = u(!1), [S, C] = u(""), w = l(null), T = o(), E = i || T;
4400
4508
  a(() => {
4401
4509
  if (!c && r instanceof File) {
4402
4510
  let e = URL.createObjectURL(r);
@@ -4404,8 +4512,8 @@ function Ft({ label: e, value: r, name: i, onPick: s, multiple: c = !1, maxFiles
4404
4512
  }
4405
4513
  y(null);
4406
4514
  }, [r, c]);
4407
- let O = c ? Array.isArray(r) ? r : r ? [r] : [] : [], A = c ? null : r?.url || v, j = h || S, M = Ve(f), N = (e) => {
4408
- let t = We(e, {
4515
+ let D = c ? Array.isArray(r) ? r : r ? [r] : [] : [], k = c ? null : r?.url || v, A = h || S, j = Qe(f), M = (e) => {
4516
+ let t = tt(e, {
4409
4517
  accept: f,
4410
4518
  maxSizeMb: p
4411
4519
  });
@@ -4413,9 +4521,9 @@ function Ft({ label: e, value: r, name: i, onPick: s, multiple: c = !1, maxFiles
4413
4521
  }, ee = (e) => {
4414
4522
  let t = Array.from(e || []);
4415
4523
  if (!t.length) return;
4416
- let n = Array.isArray(r) ? r : r ? [r] : [], i = new Set(n.map(It)), a = "", o = [];
4524
+ let n = Array.isArray(r) ? r : r ? [r] : [], i = new Set(n.map(Kt)), a = "", o = [];
4417
4525
  for (let e of t) {
4418
- let t = We(e, {
4526
+ let t = tt(e, {
4419
4527
  accept: f,
4420
4528
  maxSizeMb: p
4421
4529
  });
@@ -4423,7 +4531,7 @@ function Ft({ label: e, value: r, name: i, onPick: s, multiple: c = !1, maxFiles
4423
4531
  a ||= t;
4424
4532
  continue;
4425
4533
  }
4426
- i.has(It(e)) || (i.add(It(e)), o.push(e));
4534
+ i.has(Kt(e)) || (i.add(Kt(e)), o.push(e));
4427
4535
  }
4428
4536
  let c = n.concat(o);
4429
4537
  d && c.length > d && (c = c.slice(0, d), a ||= `Up to ${d} files.`), C(a), s(c);
@@ -4433,18 +4541,18 @@ function Ft({ label: e, value: r, name: i, onPick: s, multiple: c = !1, maxFiles
4433
4541
  return;
4434
4542
  }
4435
4543
  let t = e.target.files?.[0] || null;
4436
- t && (N(t) || (e.target.value = ""));
4437
- }, F = (e) => {
4544
+ t && (M(t) || (e.target.value = ""));
4545
+ }, te = (e) => {
4438
4546
  if (e.preventDefault(), x(!1), c) {
4439
4547
  ee(e.dataTransfer.files);
4440
4548
  return;
4441
4549
  }
4442
4550
  let t = e.dataTransfer.files?.[0];
4443
- t && N(t);
4444
- }, I = (e) => {
4445
- C(""), s(O.filter((t, n) => n !== e));
4446
- }, L = () => w.current?.click(), R = /* @__PURE__ */ t("input", {
4447
- id: D,
4551
+ t && M(t);
4552
+ }, F = (e) => {
4553
+ C(""), s(D.filter((t, n) => n !== e));
4554
+ }, I = () => w.current?.click(), L = /* @__PURE__ */ t("input", {
4555
+ id: E,
4448
4556
  name: i,
4449
4557
  ref: w,
4450
4558
  type: "file",
@@ -4461,26 +4569,26 @@ function Ft({ label: e, value: r, name: i, onPick: s, multiple: c = !1, maxFiles
4461
4569
  children: [
4462
4570
  /* @__PURE__ */ n("label", {
4463
4571
  className: "label",
4464
- htmlFor: D,
4465
- children: [e, m && /* @__PURE__ */ t($, {})]
4572
+ htmlFor: E,
4573
+ children: [e, m && /* @__PURE__ */ t(Q, {})]
4466
4574
  }),
4467
- A ? /* @__PURE__ */ n("div", {
4468
- className: `file-preview${j ? " error" : ""}`,
4575
+ k ? /* @__PURE__ */ n("div", {
4576
+ className: `file-preview${A ? " error" : ""}`,
4469
4577
  children: [
4470
4578
  /* @__PURE__ */ n("button", {
4471
4579
  type: "button",
4472
4580
  className: "file-preview-open",
4473
4581
  "aria-label": `Change ${e}`,
4474
- onClick: L,
4582
+ onClick: I,
4475
4583
  children: [/* @__PURE__ */ t("img", {
4476
- src: A,
4584
+ src: k,
4477
4585
  alt: `${e} preview`,
4478
4586
  className: "file-preview-img"
4479
4587
  }), /* @__PURE__ */ t("span", {
4480
4588
  className: "file-preview-overlay",
4481
4589
  children: /* @__PURE__ */ n("span", {
4482
4590
  className: "file-preview-cta",
4483
- children: [/* @__PURE__ */ t(k, {
4591
+ children: [/* @__PURE__ */ t(N, {
4484
4592
  name: "image",
4485
4593
  size: 16
4486
4594
  }), " Change image"]
@@ -4493,30 +4601,30 @@ function Ft({ label: e, value: r, name: i, onPick: s, multiple: c = !1, maxFiles
4493
4601
  "aria-label": `Remove ${e}`,
4494
4602
  title: "Remove image",
4495
4603
  onClick: () => s(null),
4496
- children: /* @__PURE__ */ t(k, {
4604
+ children: /* @__PURE__ */ t(N, {
4497
4605
  name: "x",
4498
4606
  size: 16
4499
4607
  })
4500
4608
  }),
4501
- R
4609
+ L
4502
4610
  ]
4503
4611
  }) : /* @__PURE__ */ n("div", {
4504
- className: `file-input file-input-tall${b ? " dragging" : ""}${j ? " error" : ""}${c && O.length > 0 ? " has-files" : ""}`,
4612
+ className: `file-input file-input-tall${b ? " dragging" : ""}${A ? " error" : ""}${c && D.length > 0 ? " has-files" : ""}`,
4505
4613
  onDragOver: (e) => {
4506
4614
  e.preventDefault(), b || x(!0);
4507
4615
  },
4508
4616
  onDragLeave: (e) => {
4509
4617
  e.preventDefault(), x(!1);
4510
4618
  },
4511
- onDrop: F,
4619
+ onDrop: te,
4512
4620
  children: [
4513
4621
  /* @__PURE__ */ n("label", {
4514
- htmlFor: D,
4622
+ htmlFor: E,
4515
4623
  className: "file-input-zone-label",
4516
4624
  children: [
4517
4625
  /* @__PURE__ */ t("span", {
4518
4626
  className: "file-input-icon",
4519
- children: /* @__PURE__ */ t(k, {
4627
+ children: /* @__PURE__ */ t(N, {
4520
4628
  name: "upload",
4521
4629
  size: 24
4522
4630
  })
@@ -4531,7 +4639,7 @@ function Ft({ label: e, value: r, name: i, onPick: s, multiple: c = !1, maxFiles
4531
4639
  /* @__PURE__ */ n("span", {
4532
4640
  className: "file-input-text",
4533
4641
  children: [
4534
- He(f),
4642
+ $e(f),
4535
4643
  " · up to ",
4536
4644
  p,
4537
4645
  " MB"
@@ -4539,28 +4647,28 @@ function Ft({ label: e, value: r, name: i, onPick: s, multiple: c = !1, maxFiles
4539
4647
  })
4540
4648
  ]
4541
4649
  }),
4542
- R,
4543
- c && O.length > 0 && /* @__PURE__ */ t("div", {
4650
+ L,
4651
+ c && D.length > 0 && /* @__PURE__ */ t("div", {
4544
4652
  className: "attach-list",
4545
- children: O.map((e, n) => /* @__PURE__ */ t(Lt, {
4653
+ children: D.map((e, n) => /* @__PURE__ */ t(qt, {
4546
4654
  item: e,
4547
- isImage: e instanceof File ? Be(e) : M || Be(e),
4548
- onRemove: () => I(n)
4549
- }, It(e)))
4655
+ isImage: e instanceof File ? Ze(e) : j || Ze(e),
4656
+ onRemove: () => F(n)
4657
+ }, Kt(e)))
4550
4658
  })
4551
4659
  ]
4552
4660
  }),
4553
- j && /* @__PURE__ */ t("div", {
4661
+ A && /* @__PURE__ */ t("div", {
4554
4662
  className: "field-error",
4555
- children: j
4663
+ children: A
4556
4664
  })
4557
4665
  ]
4558
4666
  });
4559
4667
  }
4560
- function It(e) {
4668
+ function Kt(e) {
4561
4669
  return e instanceof File ? `${e.name}:${e.size}` : e?.url || e?.name || "item";
4562
4670
  }
4563
- function Lt({ item: e, isImage: r, onRemove: i }) {
4671
+ function qt({ item: e, isImage: r, onRemove: i }) {
4564
4672
  let [o, s] = u(null);
4565
4673
  a(() => {
4566
4674
  if (!r) {
@@ -4582,7 +4690,7 @@ function Lt({ item: e, isImage: r, onRemove: i }) {
4582
4690
  children: o ? /* @__PURE__ */ t("img", {
4583
4691
  src: o,
4584
4692
  alt: c
4585
- }) : /* @__PURE__ */ t(k, {
4693
+ }) : /* @__PURE__ */ t(N, {
4586
4694
  name: "file-text",
4587
4695
  size: 18
4588
4696
  })
@@ -4602,7 +4710,7 @@ function Lt({ item: e, isImage: r, onRemove: i }) {
4602
4710
  className: "attach-item-remove",
4603
4711
  "aria-label": `Remove ${c || "file"}`,
4604
4712
  onClick: i,
4605
- children: /* @__PURE__ */ t(k, {
4713
+ children: /* @__PURE__ */ t(N, {
4606
4714
  name: "x",
4607
4715
  size: 16
4608
4716
  })
@@ -4612,13 +4720,13 @@ function Lt({ item: e, isImage: r, onRemove: i }) {
4612
4720
  }
4613
4721
  //#endregion
4614
4722
  //#region src/components/AppInfoList.jsx
4615
- function Rt({ items: r = [], className: i = "", ...a }) {
4616
- return E("AppInfoList", a), /* @__PURE__ */ t("div", {
4723
+ function Jt({ items: r = [], className: i = "", ...a }) {
4724
+ return O("AppInfoList", a), /* @__PURE__ */ t("div", {
4617
4725
  className: `info-list${i ? ` ${i}` : ""}`,
4618
4726
  children: r.map((r, i) => {
4619
4727
  let a = /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("span", {
4620
4728
  className: "info-icon",
4621
- children: /* @__PURE__ */ t(k, {
4729
+ children: /* @__PURE__ */ t(N, {
4622
4730
  name: r.icon,
4623
4731
  size: 16
4624
4732
  })
@@ -4645,15 +4753,15 @@ function Rt({ items: r = [], className: i = "", ...a }) {
4645
4753
  }
4646
4754
  //#endregion
4647
4755
  //#region src/components/AppKpiTile.jsx
4648
- function zt({ label: e, value: r, icon: i, delta: a, deltaDirection: o = "flat", inline: s = !1, className: c = "", ...l }) {
4649
- E("AppKpiTile", l);
4650
- let u = `kpi${s ? " kpi-inline" : ""}${c ? ` ${c}` : ""}`, d = o === "up" ? "arrow-up" : o === "down" ? "arrow-down" : null;
4756
+ function Yt({ label: e, value: r, icon: i, delta: a, deltaDirection: o = "flat", variant: s = "plain", inline: c = !1, className: l = "", ...u }) {
4757
+ O("AppKpiTile", u);
4758
+ let d = `kpi${c ? " kpi-inline" : ""}${s === "filled" ? " kpi-filled" : s === "accent" ? " kpi-accent" : ""}${l ? ` ${l}` : ""}`, f = o === "up" ? "arrow-up" : o === "down" ? "arrow-down" : null;
4651
4759
  return /* @__PURE__ */ n("div", {
4652
- className: u,
4760
+ className: d,
4653
4761
  children: [
4654
4762
  i && /* @__PURE__ */ t("span", {
4655
4763
  className: "kpi-icon",
4656
- children: /* @__PURE__ */ t(k, {
4764
+ children: /* @__PURE__ */ t(N, {
4657
4765
  name: i,
4658
4766
  size: 20
4659
4767
  })
@@ -4668,8 +4776,8 @@ function zt({ label: e, value: r, icon: i, delta: a, deltaDirection: o = "flat",
4668
4776
  }),
4669
4777
  a && /* @__PURE__ */ n("div", {
4670
4778
  className: `kpi-delta${o === "flat" ? "" : ` ${o}`}`,
4671
- children: [d && /* @__PURE__ */ t(k, {
4672
- name: d,
4779
+ children: [f && /* @__PURE__ */ t(N, {
4780
+ name: f,
4673
4781
  size: 13
4674
4782
  }), a]
4675
4783
  })
@@ -4678,21 +4786,21 @@ function zt({ label: e, value: r, icon: i, delta: a, deltaDirection: o = "flat",
4678
4786
  }
4679
4787
  //#endregion
4680
4788
  //#region src/components/AppLogoPicker.jsx
4681
- var Bt = {
4789
+ var Xt = {
4682
4790
  sm: 72,
4683
4791
  md: 120,
4684
4792
  lg: 160
4685
4793
  };
4686
- function Vt({ value: e, fallback: r, name: i, onPick: s, onRemove: c, loading: d = !1, disabled: f = !1, accept: p = "image/png,image/jpeg,image/webp", maxSizeMb: m = 5, overlayIcon: h = "image", overlayLabel: g = "Update photo", ariaLabel: _ = "Upload photo", label: v, hint: y, error: b, required: x = !1, variant: S = "initials", size: C = "md", shape: w = "circle", className: T = "", ...D }) {
4687
- E("AppLogoPicker", D);
4688
- let O = l(null), A = o(), j = i || A, [M, N] = u(null), [ee, P] = u(""), [F, I] = u(!1), [L, R] = u(!1);
4689
- a(() => () => M && URL.revokeObjectURL(M), [M]), a(() => {
4690
- N(null), I(!1);
4794
+ function Zt({ value: e, fallback: r, name: i, onPick: s, onRemove: c, loading: d = !1, disabled: f = !1, accept: p = "image/png,image/jpeg,image/webp", maxSizeMb: m = 5, overlayIcon: h = "image", overlayLabel: g = "Update photo", ariaLabel: _ = "Upload photo", label: v, hint: y, error: b, required: x = !1, variant: S = "initials", size: C = "md", shape: w = "circle", className: T = "", ...E }) {
4795
+ O("AppLogoPicker", E);
4796
+ let D = l(null), k = o(), A = i || k, [j, M] = u(null), [ee, P] = u(""), [te, F] = u(!1), [I, L] = u(!1);
4797
+ a(() => () => j && URL.revokeObjectURL(j), [j]), a(() => {
4798
+ M(null), F(!1);
4691
4799
  }, [e]);
4692
- let z = d || f, B = M || (e && !F ? e : null), V = b || ee, te = !z && (!!M || !!B && !!c), H = () => {
4693
- z || O.current?.click();
4694
- }, ne = (e) => {
4695
- let t = We(e, {
4800
+ let R = d || f, ne = j || (e && !te ? e : null), re = b || ee, ie = !R && (!!j || !!ne && !!c), ae = () => {
4801
+ R || D.current?.click();
4802
+ }, z = (e) => {
4803
+ let t = tt(e, {
4696
4804
  accept: p,
4697
4805
  maxSizeMb: m
4698
4806
  });
@@ -4700,74 +4808,74 @@ function Vt({ value: e, fallback: r, name: i, onPick: s, onRemove: c, loading: d
4700
4808
  P(t);
4701
4809
  return;
4702
4810
  }
4703
- P(""), I(!1), N(URL.createObjectURL(e)), s(e);
4704
- }, re = (e) => {
4811
+ P(""), F(!1), M(URL.createObjectURL(e)), s(e);
4812
+ }, B = (e) => {
4705
4813
  let t = e.target.files?.[0];
4706
- e.target.value = "", t && ne(t);
4707
- }, U = (e) => {
4708
- if (e.preventDefault(), R(!1), z) return;
4814
+ e.target.value = "", t && z(t);
4815
+ }, V = (e) => {
4816
+ if (e.preventDefault(), L(!1), R) return;
4709
4817
  let t = e.dataTransfer.files?.[0];
4710
- t && ne(t);
4711
- }, ie = () => {
4712
- N(null), P(""), I(!1), O.current && (O.current.value = ""), c?.();
4713
- }, W = typeof C == "number" ? C : Bt[C] ?? Bt.md, G = Math.max(14, Math.round(W * .18)), K = Math.round(W * .5), q = [
4818
+ t && z(t);
4819
+ }, H = () => {
4820
+ M(null), P(""), F(!1), D.current && (D.current.value = ""), c?.();
4821
+ }, U = typeof C == "number" ? C : Xt[C] ?? Xt.md, W = Math.max(14, Math.round(U * .18)), oe = Math.round(U * .5), G = [
4714
4822
  "set-uploader",
4715
4823
  S === "avatar" ? "set-uploader--avatar" : "",
4716
4824
  w === "rounded" ? "set-uploader--rounded" : w === "square" ? "set-uploader--square" : "",
4717
- L && "is-dragging"
4825
+ I && "is-dragging"
4718
4826
  ].filter(Boolean).join(" ");
4719
4827
  return /* @__PURE__ */ n("div", {
4720
4828
  className: `field set-uploader-field${T ? ` ${T}` : ""}`,
4721
4829
  children: [
4722
4830
  v && /* @__PURE__ */ n("label", {
4723
4831
  className: "label",
4724
- htmlFor: j,
4725
- children: [v, x && /* @__PURE__ */ t($, {})]
4832
+ htmlFor: A,
4833
+ children: [v, x && /* @__PURE__ */ t(Q, {})]
4726
4834
  }),
4727
4835
  /* @__PURE__ */ n("div", {
4728
4836
  className: "set-uploader-shell",
4729
4837
  children: [
4730
4838
  /* @__PURE__ */ t("button", {
4731
4839
  type: "button",
4732
- className: q,
4733
- style: { "--wui-logo-size": `${W}px` },
4840
+ className: G,
4841
+ style: { "--wui-logo-size": `${U}px` },
4734
4842
  "aria-busy": d || void 0,
4735
- disabled: z,
4736
- onClick: H,
4843
+ disabled: R,
4844
+ onClick: ae,
4737
4845
  "aria-label": _,
4738
4846
  onDragOver: (e) => {
4739
- e.preventDefault(), !z && !L && R(!0);
4847
+ e.preventDefault(), !R && !I && L(!0);
4740
4848
  },
4741
4849
  onDragLeave: (e) => {
4742
- e.preventDefault(), R(!1);
4850
+ e.preventDefault(), L(!1);
4743
4851
  },
4744
- onDrop: U,
4852
+ onDrop: V,
4745
4853
  children: /* @__PURE__ */ n("span", {
4746
4854
  className: "set-uploader-ring",
4747
- children: [B ? /* @__PURE__ */ t("img", {
4855
+ children: [ne ? /* @__PURE__ */ t("img", {
4748
4856
  className: "set-uploader-img",
4749
- src: B,
4857
+ src: ne,
4750
4858
  alt: "",
4751
- onError: () => I(!0)
4859
+ onError: () => F(!0)
4752
4860
  }) : /* @__PURE__ */ t("span", {
4753
4861
  className: "set-uploader-logo",
4754
- children: r || S === "avatar" && /* @__PURE__ */ t(k, {
4862
+ children: r || S === "avatar" && /* @__PURE__ */ t(N, {
4755
4863
  name: "person",
4756
- size: K
4864
+ size: oe
4757
4865
  })
4758
4866
  }), d ? /* @__PURE__ */ t("span", {
4759
4867
  className: "set-uploader-overlay is-loading",
4760
4868
  "aria-hidden": "true",
4761
- children: /* @__PURE__ */ t(k, {
4869
+ children: /* @__PURE__ */ t(N, {
4762
4870
  name: "refresh-cw",
4763
- size: G,
4871
+ size: W,
4764
4872
  className: "wui-spin"
4765
4873
  })
4766
4874
  }) : !f && /* @__PURE__ */ n("span", {
4767
4875
  className: "set-uploader-overlay",
4768
- children: [/* @__PURE__ */ t(k, {
4876
+ children: [/* @__PURE__ */ t(N, {
4769
4877
  name: h,
4770
- size: G
4878
+ size: W
4771
4879
  }), /* @__PURE__ */ t("span", { children: g })]
4772
4880
  })]
4773
4881
  })
@@ -4775,42 +4883,42 @@ function Vt({ value: e, fallback: r, name: i, onPick: s, onRemove: c, loading: d
4775
4883
  /* @__PURE__ */ t("button", {
4776
4884
  type: "button",
4777
4885
  className: "set-uploader-remove",
4778
- hidden: !te,
4886
+ hidden: !ie,
4779
4887
  "aria-label": "Remove photo",
4780
4888
  title: "Remove photo",
4781
- onClick: ie,
4782
- children: /* @__PURE__ */ t(k, {
4889
+ onClick: H,
4890
+ children: /* @__PURE__ */ t(N, {
4783
4891
  name: "x",
4784
4892
  size: 14
4785
4893
  })
4786
4894
  }),
4787
4895
  /* @__PURE__ */ t("input", {
4788
- id: j,
4789
- ref: O,
4896
+ id: A,
4897
+ ref: D,
4790
4898
  type: "file",
4791
4899
  name: i,
4792
4900
  hidden: !0,
4793
4901
  accept: p,
4794
- onChange: re,
4795
- disabled: z
4902
+ onChange: B,
4903
+ disabled: R
4796
4904
  })
4797
4905
  ]
4798
4906
  }),
4799
- y && !V && /* @__PURE__ */ t("div", {
4907
+ y && !re && /* @__PURE__ */ t("div", {
4800
4908
  className: "set-uploader-hint",
4801
4909
  children: y
4802
4910
  }),
4803
- V && /* @__PURE__ */ t("div", {
4911
+ re && /* @__PURE__ */ t("div", {
4804
4912
  className: "field-error",
4805
- children: V
4913
+ children: re
4806
4914
  })
4807
4915
  ]
4808
4916
  });
4809
4917
  }
4810
4918
  //#endregion
4811
4919
  //#region src/components/AppMultiSelect.jsx
4812
- function Ht({ values: e, onChange: r, options: i, placeholder: o = "Select…", searchPlaceholder: s = "Search…", searchable: c = !0, disabled: u = !1, icon: d, size: f, collapseChips: p = !1, name: m, label: h, error: g, hint: _, required: v = !1, fieldClassName: y = "", ...b }) {
4813
- E("AppMultiSelect", b);
4920
+ function Qt({ values: e, onChange: r, options: i, placeholder: o = "Select…", searchPlaceholder: s = "Search…", searchable: c = !0, disabled: u = !1, icon: d, size: f, collapseChips: p = !1, name: m, label: h, error: g, hint: _, required: v = !1, fieldClassName: y = "", ...b }) {
4921
+ O("AppMultiSelect", b);
4814
4922
  let x = l(null);
4815
4923
  return a(() => {
4816
4924
  let e = x.current;
@@ -4831,7 +4939,7 @@ function Ht({ values: e, onChange: r, options: i, placeholder: o = "Select…",
4831
4939
  h && /* @__PURE__ */ n("label", {
4832
4940
  className: "label",
4833
4941
  htmlFor: m,
4834
- children: [h, v && /* @__PURE__ */ t($, {})]
4942
+ children: [h, v && /* @__PURE__ */ t(Q, {})]
4835
4943
  }),
4836
4944
  /* @__PURE__ */ t("wui-multiselect", {
4837
4945
  "aria-label": typeof h == "string" ? h : void 0,
@@ -4859,8 +4967,8 @@ function Ht({ values: e, onChange: r, options: i, placeholder: o = "Select…",
4859
4967
  }
4860
4968
  //#endregion
4861
4969
  //#region src/components/AppOtpInput.jsx
4862
- var Ut = r(function({ value: e, onChange: r, onComplete: i, length: s = 6, mode: c = "numeric", label: u, required: d = !1, hint: f, error: p, disabled: m = !1, name: h, id: g, className: _ = "", ...v }, y) {
4863
- E("AppOtpInput", v);
4970
+ var $t = r(function({ value: e, onChange: r, onComplete: i, length: s = 6, mode: c = "numeric", label: u, required: d = !1, hint: f, error: p, disabled: m = !1, name: h, id: g, className: _ = "", ...v }, y) {
4971
+ O("AppOtpInput", v);
4864
4972
  let b = l(null), x = o(), S = g || h || x, C = (e) => {
4865
4973
  b.current = e, typeof y == "function" ? y(e) : y && (y.current = e);
4866
4974
  };
@@ -4912,8 +5020,8 @@ var Ut = r(function({ value: e, onChange: r, onComplete: i, length: s = 6, mode:
4912
5020
  });
4913
5021
  //#endregion
4914
5022
  //#region src/components/AppPageHeader.jsx
4915
- function Wt({ title: e, subtitle: r, actions: i, className: a = "", ...o }) {
4916
- return E("AppPageHeader", o), /* @__PURE__ */ n("div", {
5023
+ function en({ title: e, subtitle: r, actions: i, className: a = "", ...o }) {
5024
+ return O("AppPageHeader", o), /* @__PURE__ */ n("div", {
4917
5025
  className: `page-header${i ? " d-flex align-items-end justify-content-between" : ""}${a ? ` ${a}` : ""}`,
4918
5026
  children: [/* @__PURE__ */ n("div", { children: [/* @__PURE__ */ t("div", {
4919
5027
  className: "page-title",
@@ -4929,8 +5037,8 @@ function Wt({ title: e, subtitle: r, actions: i, className: a = "", ...o }) {
4929
5037
  }
4930
5038
  //#endregion
4931
5039
  //#region src/components/AppPhoneNumberInput.jsx
4932
- function Gt({ value: e, onChange: r, country: i, disabled: o = !1, name: s, label: c = "Phone number", placeholder: u, required: d = !1, error: f, fieldClassName: p = "", ...m }) {
4933
- E("AppPhoneNumberInput", m);
5040
+ function tn({ value: e, onChange: r, country: i, disabled: o = !1, name: s, label: c = "Phone number", placeholder: u, required: d = !1, error: f, fieldClassName: p = "", ...m }) {
5041
+ O("AppPhoneNumberInput", m);
4934
5042
  let h = l(null);
4935
5043
  return a(() => {
4936
5044
  let t = h.current;
@@ -4946,7 +5054,7 @@ function Gt({ value: e, onChange: r, country: i, disabled: o = !1, name: s, labe
4946
5054
  c && /* @__PURE__ */ n("label", {
4947
5055
  className: "label",
4948
5056
  htmlFor: s,
4949
- children: [c, d && /* @__PURE__ */ t($, {})]
5057
+ children: [c, d && /* @__PURE__ */ t(Q, {})]
4950
5058
  }),
4951
5059
  /* @__PURE__ */ t("wui-phone", {
4952
5060
  ref: h,
@@ -4964,8 +5072,8 @@ function Gt({ value: e, onChange: r, country: i, disabled: o = !1, name: s, labe
4964
5072
  }
4965
5073
  //#endregion
4966
5074
  //#region src/components/AppPricingCard.jsx
4967
- function Kt({ name: e, price: r, unit: i, tagline: a, features: o = [], cta: s, featured: c = !1, current: l = !1, badge: u = "Most popular", className: d = "", ...f }) {
4968
- return E("AppPricingCard", f), /* @__PURE__ */ n("div", {
5075
+ function nn({ name: e, price: r, unit: i, tagline: a, features: o = [], cta: s, featured: c = !1, current: l = !1, badge: u = "Most popular", className: d = "", ...f }) {
5076
+ return O("AppPricingCard", f), /* @__PURE__ */ n("div", {
4969
5077
  className: [
4970
5078
  "plan-card",
4971
5079
  c ? "featured" : "",
@@ -5000,7 +5108,7 @@ function Kt({ name: e, price: r, unit: i, tagline: a, features: o = [], cta: s,
5000
5108
  className: r ? void 0 : "excluded",
5001
5109
  children: [/* @__PURE__ */ t("span", {
5002
5110
  className: "plan-feature-icon",
5003
- children: /* @__PURE__ */ t(k, {
5111
+ children: /* @__PURE__ */ t(N, {
5004
5112
  name: r ? "check" : "x",
5005
5113
  size: 16
5006
5114
  })
@@ -5017,8 +5125,8 @@ function Kt({ name: e, price: r, unit: i, tagline: a, features: o = [], cta: s,
5017
5125
  }
5018
5126
  //#endregion
5019
5127
  //#region src/components/AppRadio.jsx
5020
- var qt = r(function({ label: e, id: r, name: i, error: a, hint: s, className: c = "", ...l }, u) {
5021
- E("AppRadio", l);
5128
+ var rn = r(function({ label: e, id: r, name: i, error: a, hint: s, className: c = "", ...l }, u) {
5129
+ O("AppRadio", l);
5022
5130
  let d = o(), f = r || d;
5023
5131
  return /* @__PURE__ */ n("div", {
5024
5132
  className: `form-check${c ? ` ${c}` : ""}`,
@@ -5049,8 +5157,8 @@ var qt = r(function({ label: e, id: r, name: i, error: a, hint: s, className: c
5049
5157
  });
5050
5158
  //#endregion
5051
5159
  //#region src/components/AppRepeater.jsx
5052
- function Jt({ rows: e = [], renderRow: r, onAdd: i, onRemove: a, addLabel: o = "Add another", removeLabel: s = "Remove row", emptyText: c, min: l = 0, max: u, numbered: d = !0, className: f = "", ...p }) {
5053
- E("AppRepeater", p);
5160
+ function an({ rows: e = [], renderRow: r, onAdd: i, onRemove: a, addLabel: o = "Add another", removeLabel: s = "Remove row", emptyText: c, min: l = 0, max: u, numbered: d = !0, className: f = "", ...p }) {
5161
+ O("AppRepeater", p);
5054
5162
  let m = typeof u == "number" && e.length >= u, h = !!a && e.length > l;
5055
5163
  return /* @__PURE__ */ n("div", {
5056
5164
  className: `repeater${f ? ` ${f}` : ""}`,
@@ -5070,7 +5178,7 @@ function Jt({ rows: e = [], renderRow: r, onAdd: i, onRemove: a, addLabel: o = "
5070
5178
  className: "repeater-body",
5071
5179
  children: r(e, i)
5072
5180
  }),
5073
- h && /* @__PURE__ */ t(A, {
5181
+ h && /* @__PURE__ */ t(ee, {
5074
5182
  icon: "trash-2",
5075
5183
  label: `${s} ${i + 1}`,
5076
5184
  danger: !0,
@@ -5079,7 +5187,7 @@ function Jt({ rows: e = [], renderRow: r, onAdd: i, onRemove: a, addLabel: o = "
5079
5187
  })
5080
5188
  ]
5081
5189
  }, e.id ?? i)),
5082
- /* @__PURE__ */ t(Qe, {
5190
+ /* @__PURE__ */ t(L, {
5083
5191
  variant: "secondary",
5084
5192
  size: "sm",
5085
5193
  leftIcon: "plus",
@@ -5093,11 +5201,11 @@ function Jt({ rows: e = [], renderRow: r, onAdd: i, onRemove: a, addLabel: o = "
5093
5201
  }
5094
5202
  //#endregion
5095
5203
  //#region src/components/AppResourceCard.jsx
5096
- function Yt({ icon: r, title: i, text: a, href: o, external: s = !1, linkComponent: c, className: l = "", ...u }) {
5097
- E("AppResourceCard", u);
5204
+ function on({ icon: r, title: i, text: a, href: o, external: s = !1, linkComponent: c, className: l = "", ...u }) {
5205
+ O("AppResourceCard", u);
5098
5206
  let d = /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("span", {
5099
5207
  className: "res-card-icon",
5100
- children: /* @__PURE__ */ t(k, {
5208
+ children: /* @__PURE__ */ t(N, {
5101
5209
  name: r,
5102
5210
  size: 18
5103
5211
  })
@@ -5124,9 +5232,21 @@ function Yt({ icon: r, title: i, text: a, href: o, external: s = !1, linkCompone
5124
5232
  });
5125
5233
  }
5126
5234
  //#endregion
5235
+ //#region src/components/AppScrollbar.jsx
5236
+ function sn({ children: e, className: n = "", maxHeight: r, style: i, ...a }) {
5237
+ return O("AppScrollbar", a), /* @__PURE__ */ t("div", {
5238
+ className: n ? `wui-scroll ${n}` : "wui-scroll",
5239
+ style: r == null ? i : {
5240
+ maxHeight: r,
5241
+ ...i
5242
+ },
5243
+ children: e
5244
+ });
5245
+ }
5246
+ //#endregion
5127
5247
  //#region src/components/AppSearch.jsx
5128
- function Xt({ value: e, onValueChange: r, placeholder: i = "Search…", ariaLabel: a, iconSize: o = 18, size: s, loading: c = !1, disabled: l = !1, className: u = "", ...d }) {
5129
- return E("AppSearch", d), /* @__PURE__ */ n("div", {
5248
+ function cn({ value: e, onValueChange: r, placeholder: i = "Search…", ariaLabel: a, iconSize: o = 18, size: s, loading: c = !1, disabled: l = !1, className: u = "", ...d }) {
5249
+ return O("AppSearch", d), /* @__PURE__ */ n("div", {
5130
5250
  className: [
5131
5251
  "search-wrap",
5132
5252
  e ? "has-value" : "",
@@ -5139,12 +5259,12 @@ function Xt({ value: e, onValueChange: r, placeholder: i = "Search…", ariaLabe
5139
5259
  className: "search-spinner",
5140
5260
  "aria-hidden": "true"
5141
5261
  }),
5142
- /* @__PURE__ */ t(k, {
5262
+ /* @__PURE__ */ t(N, {
5143
5263
  name: "search",
5144
5264
  size: o,
5145
5265
  className: "search-icon"
5146
5266
  }),
5147
- /* @__PURE__ */ t(h.Control, {
5267
+ /* @__PURE__ */ t(g.Control, {
5148
5268
  type: "search",
5149
5269
  className: "input search-input",
5150
5270
  placeholder: i,
@@ -5159,7 +5279,7 @@ function Xt({ value: e, onValueChange: r, placeholder: i = "Search…", ariaLabe
5159
5279
  className: "search-clear",
5160
5280
  "aria-label": "Clear search",
5161
5281
  onClick: () => r(""),
5162
- children: /* @__PURE__ */ t(k, {
5282
+ children: /* @__PURE__ */ t(N, {
5163
5283
  name: "x",
5164
5284
  size: 16
5165
5285
  })
@@ -5169,8 +5289,8 @@ function Xt({ value: e, onValueChange: r, placeholder: i = "Search…", ariaLabe
5169
5289
  }
5170
5290
  //#endregion
5171
5291
  //#region src/components/AppSegmented.jsx
5172
- function Zt({ options: e = [], value: r, onChange: i, label: c, name: u, size: d = "md", fullWidth: f = !1, disabled: p = !1, className: m = "", ...h }) {
5173
- E("AppSegmented", h);
5292
+ function ln({ options: e = [], value: r, onChange: i, label: c, name: u, size: d = "md", fullWidth: f = !1, disabled: p = !1, className: m = "", ...h }) {
5293
+ O("AppSegmented", h);
5174
5294
  let g = o(), _ = u || g, v = l(null), y = l(null), b = [
5175
5295
  "segmented",
5176
5296
  d === "sm" ? "segmented-sm" : d === "lg" ? "segmented-lg" : "",
@@ -5223,25 +5343,34 @@ function Zt({ options: e = [], value: r, onChange: i, label: c, name: u, size: d
5223
5343
  disabled: p || e.disabled,
5224
5344
  onChange: () => i?.(e.value)
5225
5345
  }),
5226
- e.icon && /* @__PURE__ */ t(k, {
5346
+ e.icon && /* @__PURE__ */ t(N, {
5227
5347
  name: e.icon,
5228
5348
  size: 13
5229
5349
  }),
5230
- e.label
5350
+ e.note ? /* @__PURE__ */ n("span", {
5351
+ className: "segmented-option-text",
5352
+ children: [/* @__PURE__ */ t("span", {
5353
+ className: "segmented-option-label",
5354
+ children: e.label
5355
+ }), /* @__PURE__ */ t("span", {
5356
+ className: "segmented-option-note",
5357
+ children: e.note
5358
+ })]
5359
+ }) : e.label
5231
5360
  ]
5232
5361
  }, e.value))]
5233
5362
  });
5234
5363
  }
5235
5364
  //#endregion
5236
5365
  //#region src/components/AppSelect.jsx
5237
- var Qt = (e) => e == null ? "" : e.label ?? e.text ?? "";
5238
- function $t({ value: e, onChange: r, options: i = [], placeholder: o = "Select...", searchPlaceholder: s = "Search...", searchable: c = !1, clearable: u = !1, size: d, icon: f, floatingLabel: p = !1, disabled: m, label: h, required: g = !1, error: _, hint: v, help: y, helpLabel: b = "More information", id: x, name: S, className: C = "", fieldClassName: w = "", "aria-label": T, "aria-labelledby": D, "aria-describedby": O, ...k }) {
5239
- E("AppSelect", k);
5366
+ var un = (e) => e == null ? "" : e.label ?? e.text ?? "";
5367
+ function dn({ value: e, onChange: r, options: i = [], placeholder: o = "Select...", searchPlaceholder: s = "Search...", searchable: c = !1, clearable: u = !1, size: d, icon: f, floatingLabel: p = !1, disabled: m, label: h, required: g = !1, error: _, hint: v, help: y, helpLabel: b = "More information", id: x, name: S, className: C = "", fieldClassName: w = "", "aria-label": T, "aria-labelledby": E, "aria-describedby": D, ...k }) {
5368
+ O("AppSelect", k);
5240
5369
  let A = l(null);
5241
5370
  a(() => {
5242
5371
  A.current && (A.current.options = i.map((e) => ({
5243
5372
  value: e.value,
5244
- label: Qt(e),
5373
+ label: un(e),
5245
5374
  icon: e.icon
5246
5375
  })));
5247
5376
  }, [i]), a(() => {
@@ -5255,8 +5384,8 @@ function $t({ value: e, onChange: r, options: i = [], placeholder: o = "Select..
5255
5384
  }, [r]);
5256
5385
  let j = /* @__PURE__ */ t("wui-select", {
5257
5386
  "aria-label": T || (typeof h == "string" ? h : void 0),
5258
- "aria-labelledby": D || void 0,
5259
- "aria-describedby": O || void 0,
5387
+ "aria-labelledby": E || void 0,
5388
+ "aria-describedby": D || void 0,
5260
5389
  ref: A,
5261
5390
  id: x || S,
5262
5391
  name: S,
@@ -5283,8 +5412,8 @@ function $t({ value: e, onChange: r, options: i = [], placeholder: o = "Select..
5283
5412
  htmlFor: M,
5284
5413
  children: [
5285
5414
  h,
5286
- g && /* @__PURE__ */ t($, {}),
5287
- y && /* @__PURE__ */ t(st, {
5415
+ g && /* @__PURE__ */ t(Q, {}),
5416
+ y && /* @__PURE__ */ t(ht, {
5288
5417
  label: b,
5289
5418
  children: y
5290
5419
  })
@@ -5295,7 +5424,7 @@ function $t({ value: e, onChange: r, options: i = [], placeholder: o = "Select..
5295
5424
  children: [j, /* @__PURE__ */ n("label", {
5296
5425
  className: "float-label",
5297
5426
  htmlFor: M,
5298
- children: [h, g && /* @__PURE__ */ t($, {})]
5427
+ children: [h, g && /* @__PURE__ */ t(Q, {})]
5299
5428
  })]
5300
5429
  }) : j,
5301
5430
  _ ? /* @__PURE__ */ t("div", {
@@ -5310,8 +5439,8 @@ function $t({ value: e, onChange: r, options: i = [], placeholder: o = "Select..
5310
5439
  }
5311
5440
  //#endregion
5312
5441
  //#region src/components/AppShell.jsx
5313
- function en({ groups: e = [], brand: r, sidebarFooter: i, topbarStart: o, topbarEnd: s, footer: c, children: l, collapsed: d, onCollapsedChange: f, noSidebar: p = !1, navLabel: m = "Main navigation", linkComponent: h, className: g = "", ..._ }) {
5314
- E("AppShell", _);
5442
+ function fn({ groups: e = [], brand: r, sidebarFooter: i, topbarStart: o, topbarEnd: s, footer: c, children: l, collapsed: d, onCollapsedChange: f, noSidebar: p = !1, navLabel: m = "Main navigation", linkComponent: h, className: g = "", ..._ }) {
5443
+ O("AppShell", _);
5315
5444
  let [v, y] = u(!1), [b, x] = u(!1), [S, C] = u(!1), w = d ?? v;
5316
5445
  return a(() => {
5317
5446
  let e = () => C(window.scrollY > 4);
@@ -5346,7 +5475,7 @@ function en({ groups: e = [], brand: r, sidebarFooter: i, topbarStart: o, topbar
5346
5475
  children: [e.label && /* @__PURE__ */ t("div", {
5347
5476
  className: "app-nav-group-label",
5348
5477
  children: e.label
5349
- }), e.items.map((e) => /* @__PURE__ */ t(tn, {
5478
+ }), e.items.map((e) => /* @__PURE__ */ t(pn, {
5350
5479
  item: e,
5351
5480
  linkComponent: h,
5352
5481
  onNavigate: () => x(!1)
@@ -5368,7 +5497,7 @@ function en({ groups: e = [], brand: r, sidebarFooter: i, topbarStart: o, topbar
5368
5497
  },
5369
5498
  "aria-label": w ? "Expand navigation" : "Collapse navigation",
5370
5499
  "aria-expanded": !w,
5371
- children: /* @__PURE__ */ t(k, {
5500
+ children: /* @__PURE__ */ t(N, {
5372
5501
  name: "chevron-left",
5373
5502
  size: 14
5374
5503
  })
@@ -5386,7 +5515,7 @@ function en({ groups: e = [], brand: r, sidebarFooter: i, topbarStart: o, topbar
5386
5515
  onClick: () => x(!0),
5387
5516
  "aria-label": "Open navigation",
5388
5517
  "aria-expanded": b,
5389
- children: /* @__PURE__ */ t(k, {
5518
+ children: /* @__PURE__ */ t(N, {
5390
5519
  name: "menu",
5391
5520
  size: 18
5392
5521
  })
@@ -5416,41 +5545,84 @@ function en({ groups: e = [], brand: r, sidebarFooter: i, topbarStart: o, topbar
5416
5545
  ]
5417
5546
  });
5418
5547
  }
5419
- function tn({ item: r, linkComponent: i, onNavigate: a }) {
5420
- let o = `app-nav-item${r.active ? " active" : ""}`, s = /* @__PURE__ */ n(e, { children: [
5421
- r.icon && /* @__PURE__ */ t("span", {
5422
- className: "app-nav-icon",
5423
- children: /* @__PURE__ */ t(k, {
5424
- name: r.icon,
5425
- size: 22
5548
+ function pn({ item: r, linkComponent: i, onNavigate: a, sub: o = !1 }) {
5549
+ let s = Array.isArray(r.children) && r.children.length > 0, c = s && r.children.some((e) => e.active), [l, d] = u(c), f = typeof r.label == "string" ? r.label : void 0, p = !o && r.icon && /* @__PURE__ */ t("span", {
5550
+ className: "app-nav-icon",
5551
+ children: /* @__PURE__ */ t(N, {
5552
+ name: r.icon,
5553
+ size: 22
5554
+ })
5555
+ }), m = r.badge != null && /* @__PURE__ */ t("span", {
5556
+ className: `app-nav-badge${r.badgeTone ? ` tone-${r.badgeTone}` : ""}`,
5557
+ children: r.badge
5558
+ });
5559
+ if (s) return /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ n("button", {
5560
+ type: "button",
5561
+ className: `app-nav-item has-children${c ? " active" : ""}`,
5562
+ "aria-expanded": l,
5563
+ "data-label": f,
5564
+ onClick: () => d((e) => !e),
5565
+ children: [
5566
+ p,
5567
+ /* @__PURE__ */ t("span", {
5568
+ className: "app-nav-text",
5569
+ children: r.label
5570
+ }),
5571
+ m,
5572
+ /* @__PURE__ */ t("span", {
5573
+ className: "app-nav-caret",
5574
+ children: /* @__PURE__ */ t(N, {
5575
+ name: "chevron-right",
5576
+ size: 16
5577
+ })
5426
5578
  })
5427
- }),
5579
+ ]
5580
+ }), /* @__PURE__ */ t("div", {
5581
+ className: `app-nav-sub${l ? " expanded" : ""}`,
5582
+ children: /* @__PURE__ */ t("div", {
5583
+ className: "app-nav-sub-inner",
5584
+ children: r.children.map((e) => /* @__PURE__ */ t(pn, {
5585
+ item: e,
5586
+ linkComponent: i,
5587
+ onNavigate: a,
5588
+ sub: !0
5589
+ }, e.key ?? e.href))
5590
+ })
5591
+ })] });
5592
+ let h = `app-nav-item${o ? " app-nav-subitem" : ""}${r.active ? " active" : ""}`, g = /* @__PURE__ */ n(e, { children: [
5593
+ p,
5428
5594
  /* @__PURE__ */ t("span", {
5429
5595
  className: "app-nav-text",
5430
5596
  children: r.label
5431
5597
  }),
5432
- r.badge != null && /* @__PURE__ */ t("span", {
5433
- className: "app-nav-badge",
5434
- children: r.badge
5598
+ m,
5599
+ r.trailingIcon && /* @__PURE__ */ t("span", {
5600
+ className: "app-nav-trailing",
5601
+ children: /* @__PURE__ */ t(N, {
5602
+ name: r.trailingIcon,
5603
+ size: 16
5604
+ })
5435
5605
  })
5436
- ] }), c = r.active ? "page" : void 0;
5606
+ ] }), _ = r.active ? "page" : void 0;
5437
5607
  return i ? /* @__PURE__ */ t(i, {
5438
- className: o,
5608
+ className: h,
5439
5609
  to: r.href,
5440
- "aria-current": c,
5610
+ "aria-current": _,
5611
+ "data-label": f,
5441
5612
  onClick: a,
5442
- children: s
5613
+ children: g
5443
5614
  }) : /* @__PURE__ */ t("a", {
5444
- className: o,
5615
+ className: h,
5445
5616
  href: r.href,
5446
- "aria-current": c,
5617
+ "aria-current": _,
5618
+ "data-label": f,
5447
5619
  onClick: a,
5448
- children: s
5620
+ children: g
5449
5621
  });
5450
5622
  }
5451
5623
  //#endregion
5452
5624
  //#region src/components/AppSidebarMenu.jsx
5453
- var nn = {
5625
+ var mn = {
5454
5626
  left: "start",
5455
5627
  right: "end",
5456
5628
  start: "start",
@@ -5458,11 +5630,11 @@ var nn = {
5458
5630
  top: "top",
5459
5631
  bottom: "bottom"
5460
5632
  };
5461
- function rn({ show: e, onHide: r, side: i = "right", title: a, titleIcon: o, header: s, children: c, footer: l, width: u, maxWidth: d, backdrop: f = !0, scroll: p = !1, keyboard: m = !0, closeButton: h = !0, responsive: g, className: _ = "", bodyClassName: v = "", ariaLabel: b, ...x }) {
5462
- return E("AppSidebarMenu", x), /* @__PURE__ */ n(y, {
5633
+ function hn({ show: e, onHide: r, side: i = "right", title: a, titleIcon: o, header: s, children: c, footer: l, width: u, maxWidth: d, backdrop: f = !0, scroll: p = !1, keyboard: m = !0, closeButton: h = !0, responsive: g, className: _ = "", bodyClassName: v = "", ariaLabel: b, ...x }) {
5634
+ return O("AppSidebarMenu", x), /* @__PURE__ */ n(y, {
5463
5635
  show: e,
5464
5636
  onHide: r,
5465
- placement: nn[i] || "end",
5637
+ placement: mn[i] || "end",
5466
5638
  backdrop: f,
5467
5639
  scroll: p,
5468
5640
  keyboard: m,
@@ -5480,17 +5652,17 @@ function rn({ show: e, onHide: r, side: i = "right", title: a, titleIcon: o, hea
5480
5652
  className: "drawer-title",
5481
5653
  children: [o && /* @__PURE__ */ t("span", {
5482
5654
  className: "drawer-title-ic",
5483
- children: /* @__PURE__ */ t(k, {
5655
+ children: /* @__PURE__ */ t(N, {
5484
5656
  name: o,
5485
5657
  size: 18
5486
5658
  })
5487
5659
  }), a]
5488
- }), h && /* @__PURE__ */ t(Qe, {
5660
+ }), h && /* @__PURE__ */ t(L, {
5489
5661
  variant: "ghost",
5490
5662
  className: "btn-icon",
5491
5663
  onClick: r,
5492
5664
  "aria-label": "Close",
5493
- children: /* @__PURE__ */ t(k, {
5665
+ children: /* @__PURE__ */ t(N, {
5494
5666
  name: "x",
5495
5667
  size: 16
5496
5668
  })
@@ -5508,22 +5680,35 @@ function rn({ show: e, onHide: r, side: i = "right", title: a, titleIcon: o, hea
5508
5680
  });
5509
5681
  }
5510
5682
  //#endregion
5511
- //#region src/components/AppSpinner.jsx
5512
- function an({ size: e = "md", label: n = "Loading", className: r = "", ...i }) {
5513
- return E("AppSpinner", i), /* @__PURE__ */ t("span", {
5514
- className: `spinner-border${e === "sm" ? " spinner-border-sm" : ""}${r ? ` ${r}` : ""}`,
5515
- role: "status",
5516
- "aria-label": n
5517
- });
5518
- }
5519
- //#endregion
5520
5683
  //#region src/components/AppSplash.jsx
5521
- function on({ logo: e, initials: r, text: i, label: a = "Loading", className: o = "", ...s }) {
5522
- return E("AppSplash", s), /* @__PURE__ */ t("div", {
5523
- className: `splash${o ? ` ${o}` : ""}`,
5684
+ var gn = {
5685
+ sm: 44,
5686
+ md: 56,
5687
+ lg: 72
5688
+ };
5689
+ function _n({ logo: e, initials: r, text: i, subtext: a, variant: o = "bar", size: s = "md", label: c = "Loading", className: l = "", ...u }) {
5690
+ O("AppSplash", u);
5691
+ let d = typeof s == "number" ? s : gn[s] ?? gn.md, f = o === "ring" ? /* @__PURE__ */ t("span", {
5692
+ className: "splash-ring",
5693
+ "aria-hidden": "true"
5694
+ }) : o === "dots" ? /* @__PURE__ */ n("span", {
5695
+ className: "splash-dots",
5696
+ "aria-hidden": "true",
5697
+ children: [
5698
+ /* @__PURE__ */ t("i", {}),
5699
+ /* @__PURE__ */ t("i", {}),
5700
+ /* @__PURE__ */ t("i", {})
5701
+ ]
5702
+ }) : /* @__PURE__ */ t("span", {
5703
+ className: "splash-bar",
5704
+ "aria-hidden": "true"
5705
+ });
5706
+ return /* @__PURE__ */ t("div", {
5707
+ className: `splash${l ? ` ${l}` : ""}`,
5524
5708
  role: "status",
5525
5709
  "aria-live": "polite",
5526
- "aria-label": a,
5710
+ "aria-label": c,
5711
+ style: { "--wui-splash-size": `${d}px` },
5527
5712
  children: /* @__PURE__ */ n("div", {
5528
5713
  className: "splash-inner",
5529
5714
  children: [
@@ -5531,13 +5716,14 @@ function on({ logo: e, initials: r, text: i, label: a = "Loading", className: o
5531
5716
  className: "splash-mark",
5532
5717
  children: r
5533
5718
  }),
5534
- /* @__PURE__ */ t("span", {
5535
- className: "splash-bar",
5536
- "aria-hidden": "true"
5537
- }),
5719
+ f,
5538
5720
  i && /* @__PURE__ */ t("span", {
5539
5721
  className: "splash-text",
5540
5722
  children: i
5723
+ }),
5724
+ a && /* @__PURE__ */ t("span", {
5725
+ className: "splash-subtext",
5726
+ children: a
5541
5727
  })
5542
5728
  ]
5543
5729
  })
@@ -5545,8 +5731,8 @@ function on({ logo: e, initials: r, text: i, label: a = "Loading", className: o
5545
5731
  }
5546
5732
  //#endregion
5547
5733
  //#region src/components/AppStatusBadge.jsx
5548
- function sn({ label: e, tone: n = "neutral", className: r = "", ...i }) {
5549
- return E("AppStatusBadge", i), e == null || e === "" ? "—" : /* @__PURE__ */ t("span", {
5734
+ function vn({ label: e, tone: n = "neutral", className: r = "", ...i }) {
5735
+ return O("AppStatusBadge", i), e == null || e === "" ? "—" : /* @__PURE__ */ t("span", {
5550
5736
  className: `status-label ${n}${r ? ` ${r}` : ""}`,
5551
5737
  ...i,
5552
5738
  children: e
@@ -5554,14 +5740,14 @@ function sn({ label: e, tone: n = "neutral", className: r = "", ...i }) {
5554
5740
  }
5555
5741
  //#endregion
5556
5742
  //#region src/components/AppStepper.jsx
5557
- function cn({ steps: r = [], variant: i = "steps", label: a = "Progress", linkComponent: o, className: s = "", ...c }) {
5558
- return E("AppStepper", c), /* @__PURE__ */ t("nav", {
5743
+ function yn({ steps: r = [], variant: i = "steps", label: a = "Progress", linkComponent: o, className: s = "", ...c }) {
5744
+ return O("AppStepper", c), /* @__PURE__ */ t("nav", {
5559
5745
  className: [i === "journey" ? "stepper stepper-journey" : "stepper", s].filter(Boolean).join(" "),
5560
5746
  "aria-label": a,
5561
5747
  children: r.map((a, s) => {
5562
5748
  let c = a.status || "pending", l = `step${c === "pending" ? "" : ` ${c}`}`, u = /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("span", {
5563
5749
  className: "step-circle",
5564
- children: c === "done" ? /* @__PURE__ */ t(k, {
5750
+ children: c === "done" ? /* @__PURE__ */ t(N, {
5565
5751
  name: "check",
5566
5752
  size: 14
5567
5753
  }) : s + 1
@@ -5601,8 +5787,8 @@ function cn({ steps: r = [], variant: i = "steps", label: a = "Progress", linkCo
5601
5787
  }
5602
5788
  //#endregion
5603
5789
  //#region src/components/AppSwitch.jsx
5604
- var ln = r(function({ label: e, id: r, name: i, error: a, hint: s, className: c = "", ...l }, u) {
5605
- E("AppSwitch", l);
5790
+ var bn = r(function({ label: e, id: r, name: i, error: a, hint: s, className: c = "", ...l }, u) {
5791
+ O("AppSwitch", l);
5606
5792
  let d = o(), f = r || i || d;
5607
5793
  return /* @__PURE__ */ n("div", {
5608
5794
  className: `form-check form-switch${c ? ` ${c}` : ""}`,
@@ -5633,13 +5819,13 @@ var ln = r(function({ label: e, id: r, name: i, error: a, hint: s, className: c
5633
5819
  });
5634
5820
  //#endregion
5635
5821
  //#region src/components/AppTableEmptyState.jsx
5636
- function un({ icon: e, title: r, text: i, action: a, ...o }) {
5637
- return E("AppTableEmptyState", o), /* @__PURE__ */ n("div", {
5822
+ function xn({ icon: e, title: r, text: i, action: a, ...o }) {
5823
+ return O("AppTableEmptyState", o), /* @__PURE__ */ n("div", {
5638
5824
  className: "tbl-empty",
5639
5825
  children: [
5640
5826
  /* @__PURE__ */ t("span", {
5641
5827
  className: "tbl-empty-icon",
5642
- children: /* @__PURE__ */ t(k, {
5828
+ children: /* @__PURE__ */ t(N, {
5643
5829
  name: e,
5644
5830
  size: 24
5645
5831
  })
@@ -5661,8 +5847,8 @@ function un({ icon: e, title: r, text: i, action: a, ...o }) {
5661
5847
  }
5662
5848
  //#endregion
5663
5849
  //#region src/components/AppTabs.jsx
5664
- function dn({ tabs: e, value: r, onChange: i, variant: a = "underline", ariaLabel: o, className: s = "", style: c, ...u }) {
5665
- E("AppTabs", u);
5850
+ function Sn({ tabs: e, value: r, onChange: i, variant: a = "underline", ariaLabel: o, className: s = "", style: c, ...u }) {
5851
+ O("AppTabs", u);
5666
5852
  let d = l(null);
5667
5853
  function f(t) {
5668
5854
  let n = e.findIndex((e) => e.key === r);
@@ -5679,7 +5865,7 @@ function dn({ tabs: e, value: r, onChange: i, variant: a = "underline", ariaLabe
5679
5865
  let c = CSS.escape(String(s.key));
5680
5866
  d.current?.querySelector(`[data-rr-ui-event-key="${c}"]`)?.focus();
5681
5867
  }
5682
- return /* @__PURE__ */ t(b, {
5868
+ return /* @__PURE__ */ t(v, {
5683
5869
  as: "div",
5684
5870
  role: "tablist",
5685
5871
  ref: d,
@@ -5692,7 +5878,7 @@ function dn({ tabs: e, value: r, onChange: i, variant: a = "underline", ariaLabe
5692
5878
  className: [a === "pills" ? "app-tabs-pills" : "", s].filter(Boolean).join(" "),
5693
5879
  style: c,
5694
5880
  "aria-label": o,
5695
- children: e.map((e) => /* @__PURE__ */ n(b.Link, {
5881
+ children: e.map((e) => /* @__PURE__ */ n(v.Link, {
5696
5882
  as: "button",
5697
5883
  type: "button",
5698
5884
  eventKey: e.key,
@@ -5713,45 +5899,45 @@ function dn({ tabs: e, value: r, onChange: i, variant: a = "underline", ariaLabe
5713
5899
  }
5714
5900
  //#endregion
5715
5901
  //#region src/components/AppTextarea.jsx
5716
- var fn = r(function({ label: e, required: r = !1, error: a, hint: o, help: c, helpLabel: u = "More information", id: d, name: f, rows: p = 4, autoGrow: m = !1, className: g = "", fieldClassName: _ = "", ...v }, y) {
5717
- E("AppTextarea", v);
5902
+ var Cn = r(function({ label: e, required: r = !1, error: a, hint: o, help: c, helpLabel: u = "More information", id: d, name: f, rows: p = 4, autoGrow: m = !1, className: h = "", fieldClassName: _ = "", ...v }, y) {
5903
+ O("AppTextarea", v);
5718
5904
  let b = d || f, x = [
5719
5905
  "textarea",
5720
5906
  m ? "autosize" : "",
5721
5907
  a ? "error" : "",
5722
- g
5723
- ].filter(Boolean).join(" "), S = a && b ? `${b}-error` : void 0, C = o && b ? `${b}-hint` : void 0, w = S || C, T = l(null), D = (e) => {
5908
+ h
5909
+ ].filter(Boolean).join(" "), S = a && b ? `${b}-error` : void 0, C = o && b ? `${b}-hint` : void 0, w = S || C, T = l(null), E = (e) => {
5724
5910
  T.current = e, typeof y == "function" ? y(e) : y && (y.current = e);
5725
- }, O = i(() => {
5911
+ }, D = i(() => {
5726
5912
  let e = T.current;
5727
5913
  e && (e.style.height = "auto", e.style.height = `${e.scrollHeight}px`);
5728
5914
  }, []);
5729
5915
  s(() => {
5730
- m && O();
5916
+ m && D();
5731
5917
  }, [
5732
5918
  m,
5733
- O,
5919
+ D,
5734
5920
  v.value
5735
5921
  ]);
5736
5922
  let k = (e) => {
5737
- m && O(), v.onInput?.(e);
5923
+ m && D(), v.onInput?.(e);
5738
5924
  };
5739
- return /* @__PURE__ */ n(h.Group, {
5925
+ return /* @__PURE__ */ n(g.Group, {
5740
5926
  className: `field${_ ? ` ${_}` : ""}`,
5741
5927
  children: [
5742
- e && /* @__PURE__ */ n(h.Label, {
5928
+ e && /* @__PURE__ */ n(g.Label, {
5743
5929
  className: "label",
5744
5930
  htmlFor: b,
5745
5931
  children: [
5746
5932
  e,
5747
- r && /* @__PURE__ */ t($, {}),
5748
- c && /* @__PURE__ */ t(st, {
5933
+ r && /* @__PURE__ */ t(Q, {}),
5934
+ c && /* @__PURE__ */ t(ht, {
5749
5935
  label: u,
5750
5936
  children: c
5751
5937
  })
5752
5938
  ]
5753
5939
  }),
5754
- /* @__PURE__ */ t(h.Control, {
5940
+ /* @__PURE__ */ t(g.Control, {
5755
5941
  as: "textarea",
5756
5942
  id: b,
5757
5943
  name: f,
@@ -5761,7 +5947,7 @@ var fn = r(function({ label: e, required: r = !1, error: a, hint: o, help: c, he
5761
5947
  "aria-describedby": w,
5762
5948
  required: r,
5763
5949
  ...v,
5764
- ref: D,
5950
+ ref: E,
5765
5951
  onInput: k
5766
5952
  }),
5767
5953
  a ? /* @__PURE__ */ t("div", {
@@ -5778,14 +5964,14 @@ var fn = r(function({ label: e, required: r = !1, error: a, hint: o, help: c, he
5778
5964
  });
5779
5965
  //#endregion
5780
5966
  //#region src/components/AppTimeline.jsx
5781
- function pn({ items: e = [], className: r = "", ...i }) {
5782
- return E("AppTimeline", i), /* @__PURE__ */ t("ol", {
5967
+ function wn({ items: e = [], className: r = "", ...i }) {
5968
+ return O("AppTimeline", i), /* @__PURE__ */ t("ol", {
5783
5969
  className: `timeline${r ? ` ${r}` : ""}`,
5784
5970
  children: e.map((e, r) => /* @__PURE__ */ n("li", {
5785
5971
  className: `timeline-item${e.tone && e.tone !== "neutral" ? ` ${e.tone}` : ""}`,
5786
5972
  children: [/* @__PURE__ */ t("span", {
5787
5973
  className: "timeline-dot",
5788
- children: /* @__PURE__ */ t(k, {
5974
+ children: /* @__PURE__ */ t(N, {
5789
5975
  name: e.icon || "circle",
5790
5976
  size: 12
5791
5977
  })
@@ -5816,23 +6002,94 @@ function pn({ items: e = [], className: r = "", ...i }) {
5816
6002
  });
5817
6003
  }
5818
6004
  //#endregion
6005
+ //#region src/components/toastStore.js
6006
+ var $ = [], Tn = /* @__PURE__ */ new Set(), En = 0;
6007
+ function Dn() {
6008
+ for (let e of Tn) e($);
6009
+ }
6010
+ function On(e) {
6011
+ return Tn.add(e), e($), () => Tn.delete(e);
6012
+ }
6013
+ function kn(e, t) {
6014
+ let n = `${t}:${e}`;
6015
+ $.some((e) => e.key === n) || ($ = [...$, {
6016
+ id: ++En,
6017
+ message: e,
6018
+ variant: t,
6019
+ key: n
6020
+ }], Dn());
6021
+ }
6022
+ function An(e) {
6023
+ let t = $.filter((t) => t.id !== e);
6024
+ t.length !== $.length && ($ = t, Dn());
6025
+ }
6026
+ //#endregion
6027
+ //#region src/components/AppToastContainer.jsx
6028
+ var jn = {
6029
+ success: {
6030
+ cls: "text-bg-success",
6031
+ closeWhite: !0
6032
+ },
6033
+ info: {
6034
+ cls: "text-bg-info",
6035
+ closeWhite: !1
6036
+ },
6037
+ warning: {
6038
+ cls: "text-bg-warning",
6039
+ closeWhite: !1
6040
+ },
6041
+ error: {
6042
+ cls: "text-bg-danger",
6043
+ closeWhite: !0
6044
+ }
6045
+ };
6046
+ function Mn({ position: e = "bottom-end", autoDismiss: r = 5e3 }) {
6047
+ let [i, o] = u([]);
6048
+ return a(() => On(o), []), /* @__PURE__ */ t(C, {
6049
+ position: e,
6050
+ containerPosition: "fixed",
6051
+ className: "p-3",
6052
+ children: i.map((e) => {
6053
+ let i = jn[e.variant] ?? jn.success;
6054
+ return /* @__PURE__ */ t(S, {
6055
+ className: i.cls,
6056
+ onClose: () => An(e.id),
6057
+ show: !0,
6058
+ delay: r,
6059
+ autohide: !0,
6060
+ children: /* @__PURE__ */ n(S.Body, {
6061
+ className: "d-flex align-items-center gap-3",
6062
+ children: [/* @__PURE__ */ t("span", {
6063
+ className: "flex-grow-1",
6064
+ children: e.message
6065
+ }), /* @__PURE__ */ t("button", {
6066
+ type: "button",
6067
+ className: i.closeWhite ? "btn-close btn-close-white" : "btn-close",
6068
+ "aria-label": "Close",
6069
+ onClick: () => An(e.id)
6070
+ })]
6071
+ })
6072
+ }, e.id);
6073
+ })
6074
+ });
6075
+ }
6076
+ //#endregion
5819
6077
  //#region src/components/toast.js
5820
- var mn = /* @__PURE__ */ new Set([
6078
+ var Nn = /* @__PURE__ */ new Set([
5821
6079
  "success",
5822
6080
  "info",
5823
6081
  "warning",
5824
6082
  "error"
5825
6083
  ]);
5826
- function hn(e, t = "success") {
5827
- let n = mn.has(t) ? t : "success";
5828
- x[n](e, { toastId: `${n}:${e}` });
6084
+ function Pn(e, t = "success") {
6085
+ kn(e, Nn.has(t) ? t : "success");
5829
6086
  }
5830
- function gn(e) {
5831
- x.error(e, { toastId: `error:${e}` });
6087
+ function Fn(e) {
6088
+ kn(e, "error");
5832
6089
  }
5833
6090
  //#endregion
5834
6091
  //#region src/lib/usePagination.js
5835
- function _n(e, t = 10) {
6092
+ function In(e, t = 10) {
5836
6093
  let [n, r] = u(1), [i, o] = u(t), s = e.length, l = Math.max(1, Math.ceil(s / i));
5837
6094
  a(() => {
5838
6095
  n > l && r(l);
@@ -5858,4 +6115,4 @@ function _n(e, t = 10) {
5858
6115
  };
5859
6116
  }
5860
6117
  //#endregion
5861
- export { A as ActionIcon, j as AppAccordion, M as AppAlert, Ke as AppAutocomplete, Je as AppAvatar, Ye as AppBadge, Qe as AppButton, $e as AppCallout, et as AppCard, tt as AppCheckbox, nt as AppChip, rt as AppChoiceCard, it as AppChoiceChip, at as AppColorField, ot as AppCompareTable, pt as AppConfirmDialog, Ct as AppDataTable, wt as AppDatePicker, Tt as AppDateRangePicker, Dt as AppDropdown, Ot as AppEmptyState, kt as AppFileAttachment, Ft as AppFilePicker, Rt as AppInfoList, st as AppInfoTip, ct as AppInput, zt as AppKpiTile, Vt as AppLogoPicker, ut as AppModal, Ht as AppMultiSelect, Ut as AppOtpInput, Wt as AppPageHeader, Gt as AppPhoneNumberInput, Kt as AppPricingCard, qt as AppRadio, Jt as AppRepeater, Yt as AppResourceCard, Xt as AppSearch, Zt as AppSegmented, $t as AppSelect, vt as AppSelectMini, en as AppShell, rn as AppSidebarMenu, mt as AppSkeleton, _t as AppSkeletonRows, an as AppSpinner, on as AppSplash, sn as AppStatusBadge, cn as AppStepper, ln as AppSwitch, un as AppTableEmptyState, bt as AppTablePagination, dn as AppTabs, fn as AppTextarea, pn as AppTimeline, k as Icon, ft as MODAL_ICONS, $ as RequiredMark, gn as errorToast, O as iconNames, hn as toast, _n as usePagination };
6118
+ export { ee as ActionIcon, P as AppAccordion, te as AppAlert, re as AppAsyncBlock, rt as AppAutocomplete, at as AppAvatar, ot as AppBadge, L as AppButton, st as AppCallout, ct as AppCard, lt as AppCheckbox, ut as AppChip, dt as AppChoiceCard, ft as AppChoiceChip, pt as AppColorField, mt as AppCompareTable, St as AppConfirmDialog, Pt as AppDataTable, Ft as AppDatePicker, It as AppDateRangePicker, Rt as AppDropdown, R as AppEmptyState, zt as AppFileAttachment, Gt as AppFilePicker, Jt as AppInfoList, ht as AppInfoTip, gt as AppInput, Yt as AppKpiTile, Zt as AppLogoPicker, yt as AppModal, Qt as AppMultiSelect, $t as AppOtpInput, en as AppPageHeader, tn as AppPhoneNumberInput, nn as AppPricingCard, rn as AppRadio, an as AppRepeater, on as AppResourceCard, sn as AppScrollbar, cn as AppSearch, ln as AppSegmented, dn as AppSelect, kt as AppSelectMini, fn as AppShell, hn as AppSidebarMenu, Ct as AppSkeleton, Et as AppSkeletonRows, ne as AppSpinner, _n as AppSplash, vn as AppStatusBadge, yn as AppStepper, bn as AppSwitch, xn as AppTableEmptyState, jt as AppTablePagination, Sn as AppTabs, Cn as AppTextarea, wn as AppTimeline, Mn as AppToastContainer, N as Icon, xt as MODAL_ICONS, Q as RequiredMark, Fn as errorToast, A as iconNames, M as registerIcons, Pn as toast, In as usePagination };