@webority/ui-react 0.6.13 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/ui-react.js CHANGED
@@ -1,34 +1,34 @@
1
1
  import { Fragment as e, jsx as t, jsxs as n } from "react/jsx-runtime";
2
- import { forwardRef as r, useCallback as i, useEffect as a, useId as o, useLayoutEffect as s, useRef as c, useState as l } from "react";
3
- import u from "react-bootstrap/Alert";
4
- import d from "react-bootstrap/Badge";
5
- import f from "react-bootstrap/Button";
6
- import p from "react-bootstrap/Card";
7
- import m from "react-bootstrap/Form";
8
- import { createPortal as h } from "react-dom";
9
- import g from "react-bootstrap/Modal";
10
- import _ from "react-bootstrap/Dropdown";
11
- import { toast as v } from "react-toastify";
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";
12
11
  import y from "react-bootstrap/Offcanvas";
13
12
  import b from "react-bootstrap/Nav";
13
+ import { toast as x } from "react-toastify";
14
14
  //#region src/components/warnUnknownProps.js
15
- var x = /* @__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(".")), S = () => {
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 = () => {
16
16
  try {
17
17
  return process.env.NODE_ENV !== "production";
18
18
  } catch {
19
19
  return !0;
20
20
  }
21
- }, C = (e) => e.startsWith("data-") || e.startsWith("aria-") || /^on[A-Z]/.test(e), w = /* @__PURE__ */ new Set();
22
- function T(e, t) {
23
- if (!(!S() || !t) && !("as" in t)) for (let n of Object.keys(t)) {
24
- if (C(n) || x.has(n)) continue;
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;
25
25
  let t = `${e}.${n}`;
26
- w.has(t) || (w.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.`));
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.`));
27
27
  }
28
28
  }
29
29
  //#endregion
30
30
  //#region src/components/Icon.jsx
31
- var E = {
31
+ var D = {
32
32
  activity: "activity",
33
33
  "alert-circle": "exclamation-circle",
34
34
  "alert-triangle": "exclamation-triangle",
@@ -36,15 +36,20 @@ var E = {
36
36
  "arrow-right": "arrow-right",
37
37
  "rotate-ccw": "arrow-counterclockwise",
38
38
  "arrow-up-right": "arrow-up-right",
39
+ "arrow-down-up": "arrow-down-up",
39
40
  "badge-check": "patch-check",
40
41
  bell: "bell",
42
+ "box-seam": "box-seam",
41
43
  briefcase: "briefcase",
44
+ bug: "bug",
42
45
  building: "building",
43
46
  "building-2": "buildings",
47
+ bullseye: "bullseye",
44
48
  calculator: "calculator",
45
49
  calendar: "calendar",
46
50
  "calendar-check": "calendar-check",
47
51
  "calendar-dots": "calendar3",
52
+ "cash-stack": "cash-stack",
48
53
  "chart-column": "bar-chart",
49
54
  check: "check-lg",
50
55
  "check-check": "check-all",
@@ -55,12 +60,17 @@ var E = {
55
60
  circle: "circle-fill",
56
61
  "circle-help": "question-circle",
57
62
  "clipboard-check": "clipboard-check",
63
+ clock: "clock",
64
+ cloud: "cloud",
58
65
  coins: "coin",
59
66
  contact: "person-vcard",
60
67
  copy: "copy",
61
68
  "credit-card": "credit-card",
69
+ "diagram-3": "diagram-3",
70
+ display: "display",
62
71
  download: "download",
63
72
  edit: "pencil-square",
73
+ "emoji-smile": "emoji-smile",
64
74
  "external-link": "box-arrow-up-right",
65
75
  eye: "eye",
66
76
  "eye-off": "eye-slash",
@@ -73,10 +83,13 @@ var E = {
73
83
  gauge: "speedometer2",
74
84
  gift: "gift",
75
85
  globe: "globe2",
86
+ globe2: "globe2",
87
+ grid: "grid",
76
88
  history: "clock-history",
77
89
  house: "house",
78
90
  image: "image",
79
91
  info: "info-circle",
92
+ key: "key",
80
93
  "layout-dashboard": "grid-1x2",
81
94
  "layout-grid": "grid-3x3-gap",
82
95
  lightbulb: "lightbulb",
@@ -102,6 +115,7 @@ var E = {
102
115
  "zoom-out": "zoom-out",
103
116
  "two-page": "layout-split",
104
117
  "plus-circle": "plus-circle",
118
+ receipt: "receipt",
105
119
  "refresh-cw": "arrow-clockwise",
106
120
  repeat: "arrow-repeat",
107
121
  search: "search",
@@ -111,9 +125,13 @@ var E = {
111
125
  "share-2": "share",
112
126
  shield: "shield",
113
127
  "shield-check": "shield-check",
128
+ "shield-lock": "shield-lock",
114
129
  "shield-plus": "shield-plus",
130
+ shop: "shop",
115
131
  sparkles: "stars",
132
+ stars: "stars",
116
133
  sun: "sun",
134
+ telephone: "telephone",
117
135
  "trash-2": "trash",
118
136
  "trending-up": "graph-up-arrow",
119
137
  triangle: "triangle",
@@ -123,12 +141,13 @@ var E = {
123
141
  "user-minus": "person-dash",
124
142
  "user-plus": "person-plus",
125
143
  users: "people",
144
+ wallet2: "wallet2",
126
145
  "wand-sparkles": "magic",
127
146
  x: "x-lg",
128
147
  zap: "lightning-charge"
129
- }, D = [...Object.keys(E), "hard-hat"].sort();
130
- function O({ name: e, size: r = 16, className: i, color: a, style: o, ...s }) {
131
- if (T("Icon", s), e === "hard-hat") return /* @__PURE__ */ t("svg", {
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", {
132
151
  width: r,
133
152
  height: r,
134
153
  viewBox: "0 0 24 24",
@@ -150,7 +169,7 @@ function O({ name: e, size: r = 16, className: i, color: a, style: o, ...s }) {
150
169
  }), /* @__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" })]
151
170
  })
152
171
  });
153
- let c = E[e] || e;
172
+ let c = D[e] || e;
154
173
  return c ? /* @__PURE__ */ t("i", {
155
174
  className: `bi bi-${c}${i ? ` ${i}` : ""}`,
156
175
  "data-icon": e,
@@ -165,8 +184,8 @@ function O({ name: e, size: r = 16, className: i, color: a, style: o, ...s }) {
165
184
  }
166
185
  //#endregion
167
186
  //#region src/components/ActionIcon.jsx
168
- function k({ icon: e, label: n, danger: r = !1, disabled: i = !1, size: a = 20, onClick: o, className: s = "", as: c, href: l, ...u }) {
169
- T("ActionIcon", u);
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);
170
189
  let d = [
171
190
  "u-action",
172
191
  r ? "danger" : "",
@@ -183,7 +202,7 @@ function k({ icon: e, label: n, danger: r = !1, disabled: i = !1, size: a = 20,
183
202
  role: !p && i ? "link" : void 0,
184
203
  onClick: o,
185
204
  ...u,
186
- children: /* @__PURE__ */ t(O, {
205
+ children: /* @__PURE__ */ t(k, {
187
206
  name: e,
188
207
  size: a
189
208
  })
@@ -191,9 +210,9 @@ function k({ icon: e, label: n, danger: r = !1, disabled: i = !1, size: a = 20,
191
210
  }
192
211
  //#endregion
193
212
  //#region src/components/AppAccordion.jsx
194
- function A({ items: e = [], multiple: r = !1, id: i, className: a = "", ...s }) {
195
- T("AppAccordion", s);
196
- let c = o(), u = i || c, [d, f] = l(() => {
213
+ function j({ items: e = [], multiple: r = !1, id: i, className: a = "", ...s }) {
214
+ E("AppAccordion", s);
215
+ let c = o(), l = i || c, [d, f] = u(() => {
197
216
  let t = e.filter((e) => e.open).map((e, t) => e.key ?? String(t));
198
217
  return new Set(r ? t : t.slice(0, 1));
199
218
  }), p = (e, t) => e.key ?? String(t), m = (e) => {
@@ -205,7 +224,7 @@ function A({ items: e = [], multiple: r = !1, id: i, className: a = "", ...s })
205
224
  return /* @__PURE__ */ t("div", {
206
225
  className: `faq-list${a ? ` ${a}` : ""}`,
207
226
  children: e.map((e, r) => {
208
- let i = p(e, r), a = d.has(i), o = `${u}-${r}`, s = `${o}-q`;
227
+ let i = p(e, r), a = d.has(i), o = `${l}-${r}`, s = `${o}-q`;
209
228
  return /* @__PURE__ */ n("div", {
210
229
  className: `faq-item${a ? " open" : ""}`,
211
230
  children: [/* @__PURE__ */ n("button", {
@@ -217,7 +236,7 @@ function A({ items: e = [], multiple: r = !1, id: i, className: a = "", ...s })
217
236
  onClick: () => m(i),
218
237
  children: [e.title, /* @__PURE__ */ t("span", {
219
238
  className: "faq-q-icon",
220
- children: /* @__PURE__ */ t(O, {
239
+ children: /* @__PURE__ */ t(k, {
221
240
  name: "chevron-down",
222
241
  size: 18
223
242
  })
@@ -237,8 +256,8 @@ function A({ items: e = [], multiple: r = !1, id: i, className: a = "", ...s })
237
256
  }
238
257
  //#endregion
239
258
  //#region src/components/AppAlert.jsx
240
- function j({ variant: e = "info", children: n, className: r = "", onClose: i, dismissible: a, role: o = "alert", ...s }) {
241
- return T("AppAlert", s), /* @__PURE__ */ t(u, {
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, {
242
261
  variant: e,
243
262
  className: r || void 0,
244
263
  onClose: i,
@@ -251,14 +270,14 @@ function j({ variant: e = "info", children: n, className: r = "", onClose: i, di
251
270
  }
252
271
  //#endregion
253
272
  //#region ../elements/dist/ui-elements.js
254
- var M = {
273
+ var N = {
255
274
  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>",
256
275
  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>",
257
276
  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>",
258
277
  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>",
259
278
  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>"
260
279
  };
261
- Object.keys(M);
280
+ Object.keys(N);
262
281
  var ee = class extends HTMLElement {
263
282
  static get observedAttributes() {
264
283
  return ["tone", "size"];
@@ -270,43 +289,43 @@ var ee = class extends HTMLElement {
270
289
  this.isConnected && this.render();
271
290
  }
272
291
  render() {
273
- let e = this.getAttribute("tone"), t = this.getAttribute("size") || "72", n = M[e] || M.info;
292
+ let e = this.getAttribute("tone"), t = this.getAttribute("size") || "72", n = N[e] || N.info;
274
293
  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>`;
275
294
  }
276
- }, N = 4;
277
- function P(e, t, n = {}) {
295
+ }, P = 4;
296
+ function F(e, t, n = {}) {
278
297
  if (!e || !t) return;
279
- let r = e.getBoundingClientRect(), i = t.offsetHeight, a = window.innerHeight - r.bottom, o = a < i + N && r.top > a;
280
- t.classList.toggle("drop-up", o), t.style.position = "fixed", t.style.top = o ? `${Math.max(N, r.top - i - N)}px` : `${r.bottom + N}px`, n.matchWidth && (t.style.width = `${r.width}px`);
281
- let s = t.offsetWidth, c = Math.min(r.left, window.innerWidth - s - N);
282
- t.style.left = `${Math.max(N, c)}px`;
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`;
283
302
  }
284
- function F(e, t) {
285
- I(e), e._reanchor = t, window.addEventListener("resize", e._reanchor), window.addEventListener("scroll", e._reanchor, !0);
303
+ function I(e, t) {
304
+ L(e), e._reanchor = t, window.addEventListener("resize", e._reanchor), window.addEventListener("scroll", e._reanchor, !0);
286
305
  }
287
- function I(e) {
306
+ function L(e) {
288
307
  e?._reanchor && (window.removeEventListener("resize", e._reanchor), window.removeEventListener("scroll", e._reanchor, !0), e._reanchor = null);
289
308
  }
290
- var te = "data-wui-mirror";
291
- function L(e, t) {
292
- let n = e.getAttribute("name"), r = e.querySelector(`:scope > input[${te}]`);
309
+ var R = "data-wui-mirror";
310
+ function z(e, t) {
311
+ let n = e.getAttribute("name"), r = e.querySelector(`:scope > input[${R}]`);
293
312
  if (!n) {
294
313
  r?.remove();
295
314
  return;
296
315
  }
297
- r || (r = document.createElement("input"), r.type = "hidden", r.setAttribute(te, ""), e.appendChild(r)), r.name = n, r.value = t == null ? "" : String(t);
316
+ r || (r = document.createElement("input"), r.type = "hidden", r.setAttribute(R, ""), e.appendChild(r)), r.name = n, r.value = t == null ? "" : String(t);
298
317
  for (let t of e.attributes) t.name.startsWith("data-val") && r.setAttribute(t.name, t.value);
299
318
  r.disabled = e.hasAttribute("disabled");
300
319
  }
301
- var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;"), ne = (e) => {
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) => {
302
321
  if (!e) return "";
303
322
  let t = String(e).toLowerCase().replace(/[^a-z0-9-]/g, "");
304
323
  return t ? `<i class="bi bi-${t}" aria-hidden="true"></i>` : "";
305
- }, B = (e) => {
324
+ }, H = (e) => {
306
325
  if (e == null) return "";
307
- let t = e[R] ? String(e.label ?? "") : z(e.label), n = ne(e.icon);
326
+ let t = e[B] ? String(e.label ?? "") : V(e.label), n = te(e.icon);
308
327
  return n ? `<span class="wui-opt-label">${n}${t}</span>` : t;
309
- }, re = class extends HTMLElement {
328
+ }, ne = class extends HTMLElement {
310
329
  _accessibleName() {
311
330
  return this.getAttribute("aria-label") || this.getAttribute("placeholder") || "Select";
312
331
  }
@@ -335,18 +354,20 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
335
354
  return this._value;
336
355
  }
337
356
  set value(e) {
338
- this._value = e == null ? "" : String(e), L(this, this._value);
357
+ this._value = e == null ? "" : String(e), z(this, this._value);
339
358
  let t = this._readOptions().find((e) => String(e.value) === this._value);
340
- t && (this._label = H(t.label)), this._syncInput();
359
+ this._label = t ? U(t.label) : "", this._syncInput(), this._renderOptions("");
341
360
  }
342
361
  set options(e) {
343
- this._optionsProp = Array.isArray(e) ? e : [], this._renderOptions();
362
+ this._optionsProp = Array.isArray(e) ? e : [];
363
+ let t = this._readOptions().find((e) => String(e.value) === this._value);
364
+ t && (this._label = U(t.label)), this._renderOptions(), this._syncInput();
344
365
  }
345
366
  get options() {
346
367
  return this._readOptions();
347
368
  }
348
369
  set loading(e) {
349
- this._loading = !!e, this._renderLoading();
370
+ this._loading = !!e, this._renderLoading(), this._renderOptions();
350
371
  }
351
372
  get loading() {
352
373
  return this._loading;
@@ -358,8 +379,10 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
358
379
  return Math.max(0, Number(this.getAttribute("min-chars")) || +!!this._remote);
359
380
  }
360
381
  get _debounceMs() {
361
- let e = Number(this.getAttribute("debounce"));
362
- return Number.isFinite(e) && e >= 0 ? e : 250;
382
+ let e = this.getAttribute("debounce");
383
+ if (e == null || e === "") return 250;
384
+ let t = Number(e);
385
+ return Number.isFinite(t) && t >= 0 ? t : 250;
363
386
  }
364
387
  _snapshotDeclared() {
365
388
  if (this._declared) return;
@@ -368,7 +391,7 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
368
391
  value: e.getAttribute("value") ?? e.textContent.trim(),
369
392
  label: e.innerHTML,
370
393
  icon: e.getAttribute("icon") || void 0,
371
- [R]: !0,
394
+ [B]: !0,
372
395
  selected: e.hasAttribute("selected")
373
396
  })));
374
397
  }
@@ -380,8 +403,8 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
380
403
  let e = this.getAttribute("placeholder") || "Search…", t = this.getAttribute("size"), n = t === "sm" ? " search-select-sm" : t === "lg" ? " search-select-lg" : "";
381
404
  this.innerHTML = `
382
405
  <div class="search-select${n}">
383
- <div class="input search-select-control search-select-ac" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-label="${V(this._accessibleName())}">
384
- <input class="search-select-input search-select-ac-input" placeholder="${V(e)}" aria-autocomplete="list" autocomplete="off"${this.hasAttribute("disabled") ? " disabled" : ""} />
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" : ""} />
385
408
  <span class="search-select-spinner spinner-border spinner-border-sm" role="status" aria-hidden="true" hidden></span>
386
409
  <button type="button" class="search-select-clear" aria-label="Clear" hidden><i class="bi bi-x" aria-hidden="true"></i></button>
387
410
  </div>
@@ -390,7 +413,7 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
390
413
  <div class="search-select-empty" hidden>No matches</div>
391
414
  <div class="search-select-hint" hidden>Type to search…</div>
392
415
  </div>
393
- </div>`, this._rendered = !0, L(this, this._value), this._wire(), this._syncInput(), this._renderOptions();
416
+ </div>`, this._rendered = !0, z(this, this._value), this._wire(), this._syncInput(), this._renderOptions();
394
417
  }
395
418
  _refs() {
396
419
  return {
@@ -419,9 +442,9 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
419
442
  let t = this._refs();
420
443
  if (!t.optionsWrap) return;
421
444
  let n = (e ?? (t.input ? t.input.value : "")).trim().toLowerCase(), r = this._readOptions();
422
- !this._remote && n && (r = r.filter((e) => H(e.label).toLowerCase().includes(n))), t.optionsWrap.innerHTML = r.map((e) => {
445
+ !this._remote && n && (r = r.filter((e) => U(e.label).toLowerCase().includes(n))), t.optionsWrap.innerHTML = r.map((e) => {
423
446
  let t = String(e.value) === String(this._value);
424
- return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${V(e.value)}" aria-selected="${t}">${B(e)}</button>`;
447
+ return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${re(e.value)}" aria-selected="${t}">${H(e)}</button>`;
425
448
  }).join(""), this._active = -1;
426
449
  let i = n.length < this._minChars;
427
450
  t.hint && (t.hint.hidden = !(this._remote && i && !r.length)), t.empty && (t.empty.hidden = this._loading || r.length > 0 || this._remote && i);
@@ -429,7 +452,7 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
429
452
  _wire() {
430
453
  let e = this._refs();
431
454
  if (!e.control || !e.input) return;
432
- let t = () => P(e.control, e.menu, { matchWidth: !0 }), n = () => this._optionEls().filter((e) => !e.hidden), r = (e) => {
455
+ let t = () => F(e.control, e.menu, { matchWidth: !0 }), n = () => this._optionEls().filter((e) => !e.hidden), r = (e) => {
433
456
  let t = n();
434
457
  this._active = e;
435
458
  for (let e of this._optionEls()) e.classList.remove("is-active");
@@ -439,7 +462,7 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
439
462
  }, o = () => {
440
463
  e.menu.hidden = !0, e.control.setAttribute("aria-expanded", "false"), e.control.classList.remove("open"), r(-1), this._syncInput();
441
464
  }, s = (t) => {
442
- this._value = t.dataset.value, this._label = H(t.innerHTML), L(this, this._value), e.input.value = this._label, this.dispatchEvent(new Event("change", { bubbles: !0 })), o(), e.input.focus();
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();
443
466
  };
444
467
  e.input.addEventListener("focus", () => a()), e.input.addEventListener("input", () => {
445
468
  let t = e.input.value;
@@ -462,17 +485,17 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
462
485
  let t = e.target.closest(".search-select-option");
463
486
  t && r(this._optionEls().indexOf(t));
464
487
  }), e.optionsWrap.addEventListener("mouseleave", () => r(-1)), e.clear?.addEventListener("click", () => {
465
- this._value = "", this._label = "", L(this, ""), e.input.value = "", e.clear.hidden = !0, this._renderOptions(""), this.dispatchEvent(new Event("change", { bubbles: !0 })), e.input.focus();
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();
466
489
  }), this._onDocClick = (e) => {
467
490
  i() && !this.contains(e.target) && o();
468
- }, document.addEventListener("click", this._onDocClick), F(this, () => {
491
+ }, document.addEventListener("click", this._onDocClick), I(this, () => {
469
492
  i() && t();
470
493
  });
471
494
  }
472
495
  disconnectedCallback() {
473
- this._onDocClick && document.removeEventListener("click", this._onDocClick), I(this), clearTimeout(this._timer);
496
+ this._onDocClick && document.removeEventListener("click", this._onDocClick), L(this), clearTimeout(this._timer);
474
497
  }
475
- }, V = (e) => String(e ?? "").replace(/"/g, "&quot;").replace(/</g, "&lt;"), H = (e) => String(e ?? "").replace(/<[^>]*>/g, ""), ie = [
498
+ }, re = (e) => String(e ?? "").replace(/"/g, "&quot;").replace(/</g, "&lt;"), U = (e) => String(e ?? "").replace(/<[^>]*>/g, ""), ie = [
476
499
  "January",
477
500
  "February",
478
501
  "March",
@@ -485,7 +508,7 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
485
508
  "October",
486
509
  "November",
487
510
  "December"
488
- ], ae = [
511
+ ], W = [
489
512
  "Su",
490
513
  "Mo",
491
514
  "Tu",
@@ -493,24 +516,24 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
493
516
  "Th",
494
517
  "Fr",
495
518
  "Sa"
496
- ], oe = (e) => String(e).padStart(2, "0"), U = (e, t, n) => `${e}-${oe(t + 1)}-${oe(n)}`, W = (e) => {
519
+ ], G = (e) => String(e).padStart(2, "0"), K = (e, t, n) => `${e}-${G(t + 1)}-${G(n)}`, q = (e) => {
497
520
  let t = /^(\d{4})-(\d{2})-(\d{2})$/.exec(e || "");
498
521
  return t ? {
499
522
  y: +t[1],
500
523
  m: t[2] - 1,
501
524
  d: +t[3]
502
525
  } : null;
503
- }, se = (e) => {
504
- let t = W(e);
505
- return t ? `${oe(t.d)} ${ie[t.m].slice(0, 3)} ${t.y}` : "";
506
- }, G = (e, t) => new Date(e, t + 1, 0).getDate(), K = (e, t) => {
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) => {
507
530
  for (; t < 0;) t += 12, --e;
508
531
  for (; t > 11;) t -= 12, e += 1;
509
532
  return {
510
533
  y: e,
511
534
  m: t
512
535
  };
513
- }, ce = class extends HTMLElement {
536
+ }, ae = class extends HTMLElement {
514
537
  static get observedAttributes() {
515
538
  return [
516
539
  "value",
@@ -537,7 +560,7 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
537
560
  return this._value;
538
561
  }
539
562
  set value(e) {
540
- this._value = e || "", L(this, this._value), this._syncTrigger(), this.dispatchEvent(new Event("change", { bubbles: !0 }));
563
+ this._value = e || "", z(this, this._value), this._syncTrigger(), this.dispatchEvent(new Event("change", { bubbles: !0 }));
541
564
  }
542
565
  _firstDay() {
543
566
  let e = Number.parseInt(this.getAttribute("first-day") ?? "", 10);
@@ -545,29 +568,29 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
545
568
  }
546
569
  render() {
547
570
  this._value = this.getAttribute("value") || this._value;
548
- let e = this.getAttribute("placeholder") || "Enter Date", t = W(this._value);
571
+ let e = this.getAttribute("placeholder") || "Enter Date", t = q(this._value);
549
572
  t && (this._viewY = t.y, this._viewM = t.m);
550
573
  let n = this.getAttribute("size"), r = n === "sm" ? " input-sm" : n === "lg" ? " input-lg" : "";
551
574
  this.innerHTML = `
552
575
  <div class="datepicker">
553
576
  <button type="button" class="input datepicker-trigger${r}${t ? " has-value" : ""}" aria-haspopup="dialog" aria-expanded="false"${this.hasAttribute("disabled") ? " disabled" : ""}>
554
- <span data-trigger-label class="${t ? "" : "search-select-placeholder"}">${t ? se(this._value) : e}</span>
577
+ <span data-trigger-label class="${t ? "" : "search-select-placeholder"}">${t ? J(this._value) : e}</span>
555
578
  <i class="bi bi-calendar3" aria-hidden="true"></i>
556
579
  </button>
557
580
  <div class="datepicker-pop" role="dialog" aria-modal="false" hidden></div>
558
- </div>`, this._rendered = !0, L(this, this._value), this._wire();
581
+ </div>`, this._rendered = !0, z(this, this._value), this._wire();
559
582
  }
560
583
  _syncFormValue() {
561
- L(this, this._value);
584
+ z(this, this._value);
562
585
  }
563
586
  _syncTrigger() {
564
587
  let e = this.querySelector(".datepicker-trigger"), t = this.querySelector("[data-trigger-label]");
565
588
  if (!t) return;
566
- let n = W(this._value);
567
- t.textContent = n ? se(this._value) : this.getAttribute("placeholder") || "Enter Date", t.classList.toggle("search-select-placeholder", !n), e?.classList.toggle("has-value", !!n);
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);
568
591
  }
569
592
  _limits() {
570
- let e = W(this.getAttribute("min")), t = W(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;
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;
571
594
  return {
572
595
  dayDisabled: (e, t, i) => {
573
596
  let a = new Date(e, t, i).getTime();
@@ -575,7 +598,7 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
575
598
  },
576
599
  monthDisabled: (e, t) => {
577
600
  let i = new Date(e, t, 1).getTime();
578
- return new Date(e, t, G(e, t)).getTime() < n || i > r;
601
+ return new Date(e, t, Y(e, t)).getTime() < n || i > r;
579
602
  },
580
603
  yearDisabled: (e) => {
581
604
  let t = new Date(e, 0, 1).getTime();
@@ -588,24 +611,24 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
588
611
  e && (this._mode === "months" ? e.innerHTML = this._monthsHtml() : this._mode === "years" ? e.innerHTML = this._yearsHtml() : e.innerHTML = this._daysHtml(), this._focusActive());
589
612
  }
590
613
  _daysHtml() {
591
- let e = this._firstDay(), t = (new Date(this._viewY, this._viewM, 1).getDay() - e + 7) % 7, n = G(this._viewY, this._viewM), r = W(this._value), i = /* @__PURE__ */ new Date(), { dayDisabled: a } = this._limits(), o = this._focus || r || {
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 || {
592
615
  y: this._viewY,
593
616
  m: this._viewM,
594
617
  d: 1
595
618
  }, s = (e, t, n, s) => {
596
- let c = U(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);
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);
597
620
  return `<button type="button" class="${[
598
621
  "datepicker-day",
599
622
  s ? "is-outside" : "",
600
623
  u ? "is-today" : "",
601
624
  l ? "is-selected" : ""
602
625
  ].filter(Boolean).join(" ")}" data-iso="${c}" role="gridcell" tabindex="${d && !f ? "0" : "-1"}"${l ? " aria-selected=\"true\"" : ""}${f ? " disabled aria-disabled=\"true\"" : ""}>${n}</button>`;
603
- }, c = "", l = K(this._viewY, this._viewM - 1), u = G(l.y, l.m);
626
+ }, c = "", l = X(this._viewY, this._viewM - 1), u = Y(l.y, l.m);
604
627
  for (let e = t - 1; e >= 0; e--) c += s(l.y, l.m, u - e, !0);
605
628
  for (let e = 1; e <= n; e++) c += s(this._viewY, this._viewM, e, !1);
606
- let d = K(this._viewY, this._viewM + 1), f = (7 - (t + n) % 7) % 7;
629
+ let d = X(this._viewY, this._viewM + 1), f = (7 - (t + n) % 7) % 7;
607
630
  for (let e = 1; e <= f; e++) c += s(d.y, d.m, e, !0);
608
- let p = ae.map((t, n) => ae[(n + e) % 7]).map((e) => `<span>${e}</span>`).join("");
631
+ let p = W.map((t, n) => W[(n + e) % 7]).map((e) => `<span>${e}</span>`).join("");
609
632
  return `
610
633
  <div class="datepicker-head">
611
634
  <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>
@@ -620,7 +643,7 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
620
643
  </div>`;
621
644
  }
622
645
  _monthsHtml() {
623
- let e = W(this._value), t = /* @__PURE__ */ new Date(), { monthDisabled: n } = this._limits(), r = "";
646
+ let e = q(this._value), t = /* @__PURE__ */ new Date(), { monthDisabled: n } = this._limits(), r = "";
624
647
  for (let i = 0; i < 12; i++) {
625
648
  let a = e && e.y === this._viewY && e.m === i, o = t.getFullYear() === this._viewY && t.getMonth() === i, s = n(this._viewY, i), c = [
626
649
  "datepicker-cell",
@@ -638,7 +661,7 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
638
661
  <div class="datepicker-cells">${r}</div>`;
639
662
  }
640
663
  _yearsHtml() {
641
- let e = W(this._value), t = (/* @__PURE__ */ new Date()).getFullYear(), { yearDisabled: n } = this._limits(), r = this._viewY - (this._viewY % 10 + 10) % 10 - 1, i = "";
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 = "";
642
665
  for (let a = 0; a < 12; a++) {
643
666
  let o = r + a, s = e && e.y === o, c = t === o, l = n(o), u = [
644
667
  "datepicker-cell",
@@ -660,24 +683,24 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
660
683
  t && e.contains(document.activeElement) && t.focus();
661
684
  }
662
685
  _position(e, t) {
663
- P(e, t);
686
+ F(e, t);
664
687
  }
665
688
  _setFocus(e, t, n, r) {
666
- let { y: i, m: a } = K(e, t);
689
+ let { y: i, m: a } = X(e, t);
667
690
  this._focus = {
668
691
  y: i,
669
692
  m: a,
670
693
  d: n
671
694
  };
672
695
  let o = i !== this._viewY || a !== this._viewM;
673
- this._viewY = i, this._viewM = a, this._slide = o && r || "", this._renderView(), this._slide = "", this.querySelector(`.datepicker-day[data-iso="${U(i, a, n)}"]`)?.focus();
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();
674
697
  }
675
698
  _onKey(e) {
676
699
  if (this._mode !== "days") {
677
700
  e.key === "Escape" && this._close();
678
701
  return;
679
702
  }
680
- let t = this._focus || W(this._value) || {
703
+ let t = this._focus || q(this._value) || {
681
704
  y: this._viewY,
682
705
  m: this._viewM,
683
706
  d: 1
@@ -695,17 +718,17 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
695
718
  case "End": return n(6 - (new Date(t.y, t.m, t.d).getDay() - this._firstDay() + 7) % 7, "slide-next");
696
719
  case "PageUp": {
697
720
  e.preventDefault();
698
- let n = K(t.y, t.m - (e.shiftKey ? 12 : 1));
699
- return this._setFocus(n.y, n.m, Math.min(t.d, G(n.y, n.m)), "slide-prev");
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");
700
723
  }
701
724
  case "PageDown": {
702
725
  e.preventDefault();
703
- let n = K(t.y, t.m + (e.shiftKey ? 12 : 1));
704
- return this._setFocus(n.y, n.m, Math.min(t.d, G(n.y, n.m)), "slide-next");
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");
705
728
  }
706
729
  case "Enter":
707
730
  case " ":
708
- e.preventDefault(), this._limits().dayDisabled(t.y, t.m, t.d) || (this.value = U(t.y, t.m, t.d), this._close());
731
+ e.preventDefault(), this._limits().dayDisabled(t.y, t.m, t.d) || (this.value = K(t.y, t.m, t.d), this._close());
709
732
  return;
710
733
  case "Escape": return this._close();
711
734
  default:
@@ -716,11 +739,11 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
716
739
  if (!e || !t) return;
717
740
  let r = () => !t.hidden;
718
741
  this._open = () => {
719
- if (!W(this._value) && !this._viewNavigated) {
742
+ if (!q(this._value) && !this._viewNavigated) {
720
743
  let e = /* @__PURE__ */ new Date();
721
744
  this._viewY = e.getFullYear(), this._viewM = e.getMonth();
722
745
  }
723
- let r = W(this._value), i = /* @__PURE__ */ new Date();
746
+ let r = q(this._value), i = /* @__PURE__ */ new Date();
724
747
  this._mode = "days", this._focus = r || {
725
748
  y: this._viewY,
726
749
  m: this._viewM,
@@ -733,7 +756,7 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
733
756
  let t = e.target.closest("[data-nav]");
734
757
  if (t) {
735
758
  this._viewNavigated = !0, this._slide = Number(t.dataset.nav) < 0 ? "slide-prev" : "slide-next";
736
- let e = K(this._viewY, this._viewM + Number(t.dataset.nav));
759
+ let e = X(this._viewY, this._viewM + Number(t.dataset.nav));
737
760
  this._viewY = e.y, this._viewM = e.m, this._focus = {
738
761
  y: e.y,
739
762
  m: e.m,
@@ -772,7 +795,7 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
772
795
  }
773
796
  if (e.target.closest("[data-today]")) {
774
797
  let e = /* @__PURE__ */ new Date();
775
- this.value = U(e.getFullYear(), e.getMonth(), e.getDate()), this._close();
798
+ this.value = K(e.getFullYear(), e.getMonth(), e.getDate()), this._close();
776
799
  return;
777
800
  }
778
801
  if (e.target.closest("[data-clear]")) {
@@ -786,14 +809,14 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
786
809
  }, t.addEventListener("keydown", this._onKeyBound), this._onDocClick = (e) => {
787
810
  let t = this._popClick;
788
811
  this._popClick = !1, r() && !t && !this.contains(e.target) && this._close();
789
- }, document.addEventListener("click", this._onDocClick), F(this, () => {
812
+ }, document.addEventListener("click", this._onDocClick), I(this, () => {
790
813
  r() && this._position(e, t);
791
814
  }), this._syncFormValue();
792
815
  }
793
816
  disconnectedCallback() {
794
- this._onDocClick && document.removeEventListener("click", this._onDocClick), I(this);
817
+ this._onDocClick && document.removeEventListener("click", this._onDocClick), L(this);
795
818
  }
796
- }, le = [
819
+ }, oe = [
797
820
  "January",
798
821
  "February",
799
822
  "March",
@@ -806,7 +829,7 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
806
829
  "October",
807
830
  "November",
808
831
  "December"
809
- ], ue = [
832
+ ], se = [
810
833
  "Su",
811
834
  "Mo",
812
835
  "Tu",
@@ -814,24 +837,24 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
814
837
  "Th",
815
838
  "Fr",
816
839
  "Sa"
817
- ], de = (e) => String(e).padStart(2, "0"), fe = (e, t, n) => `${e}-${de(t + 1)}-${de(n)}`, q = (e) => {
840
+ ], ce = (e) => String(e).padStart(2, "0"), le = (e, t, n) => `${e}-${ce(t + 1)}-${ce(n)}`, ue = (e) => {
818
841
  let t = /^(\d{4})-(\d{2})-(\d{2})$/.exec(e || "");
819
842
  return t ? {
820
843
  y: +t[1],
821
844
  m: t[2] - 1,
822
845
  d: +t[3]
823
846
  } : null;
824
- }, pe = (e) => {
825
- let t = q(e);
826
- return t ? `${de(t.d)} ${le[t.m].slice(0, 3)} ${t.y}` : "";
827
- }, me = (e, t) => new Date(e, t + 1, 0).getDate(), he = (e, t) => {
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) => {
828
851
  for (; t < 0;) t += 12, --e;
829
852
  for (; t > 11;) t -= 12, e += 1;
830
853
  return {
831
854
  y: e,
832
855
  m: t
833
856
  };
834
- }, ge = class extends HTMLElement {
857
+ }, me = class extends HTMLElement {
835
858
  static get observedAttributes() {
836
859
  return [
837
860
  "start",
@@ -874,13 +897,13 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
874
897
  text: e,
875
898
  empty: !0
876
899
  } : {
877
- text: `${pe(this._start) || "Start"} – ${pe(this._end) || "End"}`,
900
+ text: `${de(this._start) || "Start"} – ${de(this._end) || "End"}`,
878
901
  empty: !1
879
902
  };
880
903
  }
881
904
  render() {
882
905
  this._start = this.getAttribute("start") || this._start, this._end = this.getAttribute("end") || this._end;
883
- let e = q(this._start);
906
+ let e = ue(this._start);
884
907
  e && (this._viewY = e.y, this._viewM = e.m);
885
908
  let t = this.getAttribute("size"), n = t === "sm" ? " input-sm" : t === "lg" ? " input-lg" : "", { text: r, empty: i } = this._label();
886
909
  this.innerHTML = `
@@ -908,24 +931,24 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
908
931
  r || (r = document.createElement("input"), r.type = "hidden", r.setAttribute("data-range-mirror", e), this.appendChild(r)), r.name = t, r.value = n || "";
909
932
  }
910
933
  _limits() {
911
- 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;
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;
912
935
  return (e, t, i) => {
913
936
  let a = new Date(e, t, i).getTime();
914
937
  return a < n || a > r;
915
938
  };
916
939
  }
917
940
  _monthHtml(e, t) {
918
- let n = this._firstDay(), r = (new Date(e, t, 1).getDay() - n + 7) % 7, i = me(e, t), a = this._limits(), o = ue.map((e, t) => ue[(t + n) % 7]).map((e) => `<span>${e}</span>`).join(""), s = (e, t, n, r) => {
919
- let i = fe(e, t, n), o = a(e, t, n);
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);
920
943
  return `<button type="button" class="${["datepicker-day", r ? "is-outside" : ""].filter(Boolean).join(" ")}" data-iso="${i}"${o ? " disabled" : ""}>${n}</button>`;
921
- }, c = "", l = he(e, t - 1), u = me(l.y, l.m);
944
+ }, c = "", l = pe(e, t - 1), u = fe(l.y, l.m);
922
945
  for (let e = r - 1; e >= 0; e--) c += s(l.y, l.m, u - e, !0);
923
946
  for (let n = 1; n <= i; n++) c += s(e, t, n, !1);
924
- let d = he(e, t + 1), f = (7 - (r + i) % 7) % 7;
947
+ let d = pe(e, t + 1), f = (7 - (r + i) % 7) % 7;
925
948
  for (let e = 1; e <= f; e++) c += s(d.y, d.m, e, !0);
926
949
  return `
927
950
  <div class="daterange-cal">
928
- <div class="datepicker-month-label">${le[t]} ${e}</div>
951
+ <div class="datepicker-month-label">${oe[t]} ${e}</div>
929
952
  <div class="datepicker-weekdays">${o}</div>
930
953
  <div class="datepicker-grid" role="grid">${c}</div>
931
954
  </div>`;
@@ -933,7 +956,7 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
933
956
  _renderView() {
934
957
  let e = this.querySelector(".daterange-pop");
935
958
  if (!e) return;
936
- let t = he(this._viewY, this._viewM + 1);
959
+ let t = pe(this._viewY, this._viewM + 1);
937
960
  e.innerHTML = `
938
961
  <div class="daterange-head">
939
962
  <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>
@@ -959,10 +982,10 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
959
982
  n.classList.toggle("is-range-start", i), n.classList.toggle("is-range-end", a), n.classList.toggle("in-range", o);
960
983
  }
961
984
  let i = e.querySelector("[data-range-hint]");
962
- i && (i.textContent = this._start ? this._end ? `${pe(this._start)} – ${pe(this._end)}` : "Pick an end date" : "Pick a start date");
985
+ i && (i.textContent = this._start ? this._end ? `${de(this._start)} – ${de(this._end)}` : "Pick an end date" : "Pick a start date");
963
986
  }
964
987
  _position(e, t) {
965
- P(e, t);
988
+ F(e, t);
966
989
  }
967
990
  _pick(e) {
968
991
  if (!this._start || this._start && this._end) {
@@ -980,7 +1003,7 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
980
1003
  if (!e || !t) return;
981
1004
  let r = () => !t.hidden;
982
1005
  this._open = () => {
983
- let r = q(this._start);
1006
+ let r = ue(this._start);
984
1007
  if (r) this._viewY = r.y, this._viewM = r.m;
985
1008
  else {
986
1009
  let e = /* @__PURE__ */ new Date();
@@ -993,7 +1016,7 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
993
1016
  this._popClick = !0;
994
1017
  let t = e.target.closest("[data-nav]");
995
1018
  if (t) {
996
- let e = he(this._viewY, this._viewM + Number(t.dataset.nav));
1019
+ let e = pe(this._viewY, this._viewM + Number(t.dataset.nav));
997
1020
  this._viewY = e.y, this._viewM = e.m, this._renderView();
998
1021
  return;
999
1022
  }
@@ -1011,14 +1034,14 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
1011
1034
  this._popClick = !1, r() && !t && !this.contains(e.target) && this._close();
1012
1035
  }, document.addEventListener("click", this._onDocClick), this._onDocKey = (e) => {
1013
1036
  r() && e.key === "Escape" && this._close();
1014
- }, document.addEventListener("keydown", this._onDocKey), F(this, () => {
1037
+ }, document.addEventListener("keydown", this._onDocKey), I(this, () => {
1015
1038
  r() && this._position(e, t);
1016
1039
  }), this._syncMirrors();
1017
1040
  }
1018
1041
  disconnectedCallback() {
1019
- this._onDocClick && document.removeEventListener("click", this._onDocClick), this._onDocKey && document.removeEventListener("keydown", this._onDocKey), I(this);
1042
+ this._onDocClick && document.removeEventListener("click", this._onDocClick), this._onDocKey && document.removeEventListener("keydown", this._onDocKey), L(this);
1020
1043
  }
1021
- }, _e = class extends HTMLElement {
1044
+ }, he = class extends HTMLElement {
1022
1045
  _accessibleName() {
1023
1046
  return this.getAttribute("aria-label") || this.getAttribute("placeholder") || "Select";
1024
1047
  }
@@ -1053,7 +1076,7 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
1053
1076
  return this._values.slice();
1054
1077
  }
1055
1078
  set values(e) {
1056
- this._values = Array.isArray(e) ? e.map(String) : [], L(this, this._values.join(",")), this._rendered && this._renderControl();
1079
+ this._values = Array.isArray(e) ? e.map(String) : [], z(this, this._values.join(",")), this._rendered && this._renderControl();
1057
1080
  }
1058
1081
  set options(e) {
1059
1082
  this._optionsProp = Array.isArray(e) ? e : null, this.isConnected && this.render();
@@ -1068,7 +1091,7 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
1068
1091
  value: e.getAttribute("value") ?? e.textContent.trim(),
1069
1092
  label: e.innerHTML,
1070
1093
  icon: e.getAttribute("icon") || void 0,
1071
- [R]: !0,
1094
+ [B]: !0,
1072
1095
  selected: e.hasAttribute("selected")
1073
1096
  })));
1074
1097
  }
@@ -1081,34 +1104,34 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
1081
1104
  }
1082
1105
  _labelHtmlFor(e) {
1083
1106
  let t = this._readOptions().find((t) => String(t.value) === String(e));
1084
- return t ? B(t) : z(e);
1107
+ return t ? H(t) : V(e);
1085
1108
  }
1086
1109
  render() {
1087
1110
  this._snapshotDeclared();
1088
1111
  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" : "";
1089
- L(this, this._values.join(",")), this.innerHTML = `
1112
+ z(this, this._values.join(",")), this.innerHTML = `
1090
1113
  <div class="search-select${i}">
1091
- <div class="input search-select-control search-select-multi" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-label="${J(this._accessibleName())}"${this.hasAttribute("disabled") ? " aria-disabled=\"true\"" : ""}>
1092
- ${n ? `<i class="bi bi-${J(n)} search-select-icon" aria-hidden="true"></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>` : ""}
1093
1116
  <div class="ms-chips" data-chips></div>
1094
1117
  <i class="bi bi-chevron-down search-select-caret" aria-hidden="true"></i>
1095
1118
  </div>
1096
1119
  <div class="search-select-menu search-select-menu-fixed" role="listbox" aria-multiselectable="true" tabindex="-1" hidden>
1097
- ${e ? `<div class="search-select-search"><i class="bi bi-search" aria-hidden="true"></i><input class="search-select-input" placeholder="${J(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>` : ""}
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>` : ""}
1098
1121
  <div class="search-select-options"></div>
1099
1122
  <div class="search-select-empty" hidden>No matches</div>
1100
1123
  </div>
1101
- </div>`, this._rendered = !0, L(this, this._values.join(",")), this._renderControl(), this._renderOptions(), this._wire();
1124
+ </div>`, this._rendered = !0, z(this, this._values.join(",")), this._renderControl(), this._renderOptions(), this._wire();
1102
1125
  }
1103
1126
  _renderControl() {
1104
1127
  let e = this.querySelector("[data-chips]");
1105
1128
  if (!e) return;
1106
1129
  let t = this.getAttribute("placeholder") || "Select…";
1107
1130
  if (!this._values.length) {
1108
- e.innerHTML = `<span class="search-select-placeholder">${z(t)}</span>`;
1131
+ e.innerHTML = `<span class="search-select-placeholder">${V(t)}</span>`;
1109
1132
  return;
1110
1133
  }
1111
- 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="${J(e)}" aria-label="Remove"><i class="bi bi-x" aria-hidden="true"></i></button></span>`).join(""), this._collapseChips();
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();
1112
1135
  }
1113
1136
  _collapseChips() {
1114
1137
  let e = this.querySelector("[data-chips]");
@@ -1132,9 +1155,9 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
1132
1155
  let t = this.querySelector(".search-select-options"), n = this.querySelector(".search-select-empty");
1133
1156
  if (!t) return;
1134
1157
  let r = (e || "").trim().toLowerCase(), i = this._readOptions();
1135
- r && (i = i.filter((e) => ve(e.label).toLowerCase().includes(r))), t.innerHTML = i.map((e) => {
1158
+ r && (i = i.filter((e) => _e(e.label).toLowerCase().includes(r))), t.innerHTML = i.map((e) => {
1136
1159
  let t = this._values.includes(String(e.value));
1137
- return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${J(e.value)}" aria-selected="${t}"><span class="ms-opt-label">${B(e)}</span><span class="ms-check"><i class="bi bi-check" aria-hidden="true"></i></span></button>`;
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>`;
1138
1161
  }).join(""), n && (n.hidden = i.length > 0), this._active = -1;
1139
1162
  }
1140
1163
  _wire() {
@@ -1142,7 +1165,7 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
1142
1165
  if (!e || !t) return;
1143
1166
  let a = () => this.hasAttribute("disabled");
1144
1167
  !this._ro && typeof ResizeObserver < "u" && (this._ro = new ResizeObserver(() => this._collapseChips()), this._ro.observe(this));
1145
- let o = () => P(e, t, { matchWidth: !0 }), s = () => [...this.querySelectorAll(".search-select-option")], c = () => s().filter((e) => !e.hidden), l = (e) => {
1168
+ let o = () => F(e, t, { matchWidth: !0 }), s = () => [...this.querySelectorAll(".search-select-option")], c = () => s().filter((e) => !e.hidden), l = (e) => {
1146
1169
  let t = c();
1147
1170
  this._active = e;
1148
1171
  for (let e of s()) e.classList.remove("is-active");
@@ -1152,7 +1175,7 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
1152
1175
  }, f = () => {
1153
1176
  t.hidden = !0, e.setAttribute("aria-expanded", "false"), e.classList.remove("open"), l(-1);
1154
1177
  }, p = () => {
1155
- L(this, this._values.join(",")), this.dispatchEvent(new Event("change", { bubbles: !0 }));
1178
+ z(this, this._values.join(",")), this.dispatchEvent(new Event("change", { bubbles: !0 }));
1156
1179
  }, m = (e) => {
1157
1180
  let t = String(e);
1158
1181
  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();
@@ -1189,14 +1212,14 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
1189
1212
  (e.key === "ArrowDown" || e.key === "Enter" || e.key === " ") && (e.preventDefault(), d());
1190
1213
  }), this._onDocClick = (e) => {
1191
1214
  u() && !this.contains(e.target) && f();
1192
- }, document.addEventListener("click", this._onDocClick), F(this, () => {
1215
+ }, document.addEventListener("click", this._onDocClick), I(this, () => {
1193
1216
  u() && o();
1194
1217
  });
1195
1218
  }
1196
1219
  disconnectedCallback() {
1197
- this._onDocClick && document.removeEventListener("click", this._onDocClick), I(this), this._ro?.disconnect(), this._ro = null;
1220
+ this._onDocClick && document.removeEventListener("click", this._onDocClick), L(this), this._ro?.disconnect(), this._ro = null;
1198
1221
  }
1199
- }, J = (e) => String(e ?? "").replace(/"/g, "&quot;").replace(/</g, "&lt;"), ve = (e) => String(e ?? "").replace(/<[^>]*>/g, ""), ye = /[^0-9]/g, be = /[^0-9a-zA-Z]/g, xe = class extends HTMLElement {
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 {
1200
1223
  static get observedAttributes() {
1201
1224
  return [
1202
1225
  "value",
@@ -1223,16 +1246,16 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
1223
1246
  return this._value ?? "";
1224
1247
  }
1225
1248
  set value(e) {
1226
- this._value = this._clean(e), L(this, this._value), this._paint();
1249
+ this._value = this._clean(e), z(this, this._value), this._paint();
1227
1250
  }
1228
1251
  _clean(e) {
1229
- return (e == null ? "" : String(e)).replace(this.mode === "alphanumeric" ? be : ye, "").slice(0, this.length);
1252
+ return (e == null ? "" : String(e)).replace(this.mode === "alphanumeric" ? ye : ve, "").slice(0, this.length);
1230
1253
  }
1231
1254
  connectedCallback() {
1232
1255
  this._rendered || this.render();
1233
1256
  }
1234
1257
  attributeChangedCallback(e, t, n) {
1235
- this._rendered && (e === "value" ? (this._value = this._clean(n), L(this, this._value), this._paint()) : this.render());
1258
+ this._rendered && (e === "value" ? (this._value = this._clean(n), z(this, this._value), this._paint()) : this.render());
1236
1259
  }
1237
1260
  render() {
1238
1261
  this._value = this._clean(this.getAttribute("value") ?? this._value);
@@ -1250,7 +1273,7 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
1250
1273
  spellcheck="false"
1251
1274
  ${n ? "disabled" : ""} />
1252
1275
  <div class="otp-slots" aria-hidden="true">${r}</div>
1253
- </div>`, this._rendered = !0, L(this, this._value), this._wire(), this._paint();
1276
+ </div>`, this._rendered = !0, z(this, this._value), this._wire(), this._paint();
1254
1277
  }
1255
1278
  _refs() {
1256
1279
  return {
@@ -1272,7 +1295,7 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
1272
1295
  if (!e) return;
1273
1296
  let t = (e) => {
1274
1297
  let t = this._clean(e), n = t !== this._value;
1275
- this._value = t, L(this, this._value), this._paint(), n && this.dispatchEvent(new Event("change", { bubbles: !0 })), n && t.length === this.length && this.dispatchEvent(new CustomEvent("complete", {
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", {
1276
1299
  bubbles: !0,
1277
1300
  detail: t
1278
1301
  }));
@@ -1292,7 +1315,7 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
1292
1315
  document.activeElement === e && this._paint();
1293
1316
  });
1294
1317
  }
1295
- }, Se = [
1318
+ }, xe = [
1296
1319
  [
1297
1320
  "AF",
1298
1321
  "Afghanistan",
@@ -2518,56 +2541,56 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
2518
2541
  "Zimbabwe",
2519
2542
  "263"
2520
2543
  ]
2521
- ], Ce = (e) => (Se.find((t) => t[0] === e) || [
2544
+ ], Se = (e) => (xe.find((t) => t[0] === e) || [
2522
2545
  "",
2523
2546
  "",
2524
2547
  ""
2525
- ])[2], we = (e) => `wui-flag wui-flag-${String(e).toLowerCase()}`, Y = null, Te = null;
2526
- function Ee() {
2527
- return Y ? Promise.resolve(Y) : (Te ||= Promise.all([import("./libphonenumber-js-BcNT8oq0-DMpMlice.js"), import("./examples.mobile.json-BMXTGiGC-Dl_Tt3py.js")]).then(([e, t]) => (Y = {
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 = {
2528
2551
  AsYouType: e.AsYouType,
2529
2552
  getExampleNumber: e.getExampleNumber,
2530
2553
  isValidPhoneNumber: e.isValidPhoneNumber,
2531
2554
  examples: t.default || t
2532
- }, Y)).catch(() => null), Te);
2555
+ }, Z)).catch(() => null), we);
2533
2556
  }
2534
- function De(e, t) {
2535
- if (!Y || !t) return t;
2557
+ function Ee(e, t) {
2558
+ if (!Z || !t) return t;
2536
2559
  try {
2537
- return new Y.AsYouType(e).input(t);
2560
+ return new Z.AsYouType(e).input(t);
2538
2561
  } catch {
2539
2562
  return t;
2540
2563
  }
2541
2564
  }
2542
- function Oe(e) {
2543
- if (!Y) return null;
2565
+ function De(e) {
2566
+ if (!Z) return null;
2544
2567
  try {
2545
- return Y.getExampleNumber(e, Y.examples)?.formatNational() || null;
2568
+ return Z.getExampleNumber(e, Z.examples)?.formatNational() || null;
2546
2569
  } catch {
2547
2570
  return null;
2548
2571
  }
2549
2572
  }
2550
- function ke(e) {
2551
- if (!Y || !e) return null;
2573
+ function Oe(e) {
2574
+ if (!Z || !e) return null;
2552
2575
  try {
2553
- return Y.isValidPhoneNumber(e);
2576
+ return Z.isValidPhoneNumber(e);
2554
2577
  } catch {
2555
2578
  return null;
2556
2579
  }
2557
2580
  }
2558
- function Ae(e) {
2559
- if (!Y) return null;
2581
+ function ke(e) {
2582
+ if (!Z) return null;
2560
2583
  try {
2561
- let t = Y.getExampleNumber(e, Y.examples);
2584
+ let t = Z.getExampleNumber(e, Z.examples);
2562
2585
  return t?.nationalNumber ? t.nationalNumber.length : null;
2563
2586
  } catch {
2564
2587
  return null;
2565
2588
  }
2566
2589
  }
2567
- function je(e) {
2568
- if (!Y || !e?.trim().startsWith("+")) return null;
2590
+ function Ae(e) {
2591
+ if (!Z || !e?.trim().startsWith("+")) return null;
2569
2592
  try {
2570
- let t = new Y.AsYouType();
2593
+ let t = new Z.AsYouType();
2571
2594
  t.input(e.trim());
2572
2595
  let n = t.getCountry();
2573
2596
  return n ? {
@@ -2578,7 +2601,7 @@ function je(e) {
2578
2601
  return null;
2579
2602
  }
2580
2603
  }
2581
- var Me = class extends HTMLElement {
2604
+ var je = class extends HTMLElement {
2582
2605
  static get observedAttributes() {
2583
2606
  return [
2584
2607
  "value",
@@ -2597,34 +2620,40 @@ var Me = class extends HTMLElement {
2597
2620
  this._rendered && (e === "country" && (this._country = n || "IN"), this.render());
2598
2621
  }
2599
2622
  get value() {
2600
- return `+${Ce(this._country)}${this._national}`;
2623
+ return `+${Se(this._country)}${this._national}`;
2601
2624
  }
2602
2625
  set value(e) {
2603
- this._national = String(e ?? "").replace(/[^0-9]/g, ""), this._commit();
2626
+ let t = String(e ?? "").trim(), n = Ae(t);
2627
+ if (n) this._country = n.country, this._national = n.national.replace(/[^0-9]/g, "");
2628
+ else if (t.startsWith("+")) {
2629
+ let e = t.replace(/[^0-9]/g, ""), n = String(Se(this._country));
2630
+ n && e.startsWith(n) && (e = e.slice(n.length)), this._national = e;
2631
+ } else this._national = t.replace(/[^0-9]/g, "");
2632
+ n && this.getAttribute("country") !== this._country ? this.setAttribute("country", this._country) : this._rendered && this.render(), this._commit();
2604
2633
  }
2605
2634
  _commit() {
2606
- L(this, this.value), this.dispatchEvent(new Event("change", { bubbles: !0 }));
2635
+ z(this, this.value), this.dispatchEvent(new Event("change", { bubbles: !0 }));
2607
2636
  }
2608
2637
  render() {
2609
- let e = this.getAttribute("placeholder") || Oe(this._country) || "Enter phone number";
2638
+ let e = this.getAttribute("placeholder") || De(this._country) || "Enter phone number";
2610
2639
  this._country = this.getAttribute("country") || this._country;
2611
- let t = Se.map(([e, t, n]) => `<button type="button" role="option" class="country-dropdown-item${e === this._country ? " selected" : ""}" data-iso="${e}"><span class="${we(e)}" aria-hidden="true"></span><span class="country-name-text">${t}<span class="country-code-text">+${n}</span></span></button>`).join("");
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("");
2612
2641
  this.innerHTML = `
2613
2642
  <div class="phone-input-wrap">
2614
2643
  <div class="phone-country-adornment">
2615
2644
  <button type="button" class="country-toggle" aria-haspopup="listbox" aria-expanded="false"${this.hasAttribute("disabled") ? " disabled" : ""}>
2616
- <span class="${we(this._country)}" data-flag aria-hidden="true"></span>
2645
+ <span class="${Ce(this._country)}" data-flag aria-hidden="true"></span>
2617
2646
  <i class="bi bi-chevron-down phone-chevron" aria-hidden="true"></i>
2618
- <span class="phone-dial" data-dial>+${Ce(this._country)}</span>
2647
+ <span class="phone-dial" data-dial>+${Se(this._country)}</span>
2619
2648
  </button>
2620
2649
  <div class="country-dropdown-menu" role="listbox" hidden>
2621
2650
  <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>
2622
2651
  <div class="country-list-scroll">${t}<div class="country-empty" hidden>No countries found</div></div>
2623
2652
  </div>
2624
2653
  </div>
2625
- <input type="tel" class="input" placeholder="${Ne(e)}" value="${Ne(De(this._country, this._national))}"${this.hasAttribute("disabled") ? " disabled" : ""} />
2654
+ <input type="tel" class="input" placeholder="${Me(e)}" value="${Me(Ee(this._country, this._national))}"${this.hasAttribute("disabled") ? " disabled" : ""} />
2626
2655
  </div>
2627
- <div class="field-error" data-phone-error hidden></div>`, this._rendered = !0, L(this, this.value), this._wire();
2656
+ <div class="field-error" data-phone-error hidden></div>`, this._rendered = !0, z(this, this.value), this._wire();
2628
2657
  }
2629
2658
  _wire() {
2630
2659
  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]");
@@ -2648,7 +2677,7 @@ var Me = class extends HTMLElement {
2648
2677
  }
2649
2678
  a && (a.hidden = n > 0);
2650
2679
  }, m = (e) => {
2651
- this._country = e, this.setAttribute("country", e), s && (s.className = we(e)), c && (c.textContent = `+${Ce(e)}`);
2680
+ this._country = e, this.setAttribute("country", e), s && (s.className = Ce(e)), c && (c.textContent = `+${Se(e)}`);
2652
2681
  for (let t of i.querySelectorAll(".country-dropdown-item")) t.classList.toggle("selected", t.dataset.iso === e);
2653
2682
  f(), this._commit();
2654
2683
  };
@@ -2659,35 +2688,35 @@ var Me = class extends HTMLElement {
2659
2688
  let h = this.querySelector("[data-phone-error]"), g = (e) => {
2660
2689
  if (o.classList.toggle("is-invalid", e), e ? o.setAttribute("aria-invalid", "true") : o.removeAttribute("aria-invalid"), h) {
2661
2690
  if (e) {
2662
- let e = Oe(this._country);
2691
+ let e = De(this._country);
2663
2692
  h.textContent = e ? `Enter a valid phone number, e.g. ${e}` : "Enter a valid phone number";
2664
2693
  }
2665
2694
  h.hidden = !e;
2666
2695
  }
2667
2696
  };
2668
2697
  o.addEventListener("input", () => {
2669
- let e = o.value.replace(/[^0-9]/g, ""), t = Ae(this._country);
2698
+ let e = o.value.replace(/[^0-9]/g, ""), t = ke(this._country);
2670
2699
  t && e.length > t && (e = e.slice(0, t)), this._national = e;
2671
- let n = De(this._country, this._national);
2672
- o.value !== n && (o.value = n), this._commit(), o.classList.contains("is-invalid") && (!this._national || ke(this.value) === !0) && g(!1);
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);
2673
2702
  }), o.addEventListener("blur", () => {
2674
- g(this._national.length > 0 && ke(this.value) === !1);
2703
+ g(this._national.length > 0 && Oe(this.value) === !1);
2675
2704
  }), o.addEventListener("paste", (e) => {
2676
- let t = je(e.clipboardData?.getData("text"));
2677
- t && (e.preventDefault(), this._national = t.national.replace(/[^0-9]/g, ""), t.country === this._country ? o.value = De(this._country, this._national) : this.setAttribute("country", t.country), this._commit(), this.querySelector("input[type=tel]")?.focus());
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());
2678
2707
  }), this._onDocClick = (e) => {
2679
2708
  l() && !this.contains(e.target) && f();
2680
- }, document.addEventListener("click", this._onDocClick), Ee().then((e) => {
2681
- if (!(!e || !o) && (this._national && (o.value = De(this._country, this._national)), !this.getAttribute("placeholder"))) {
2682
- let e = Oe(this._country);
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);
2683
2712
  e && (o.placeholder = e);
2684
2713
  }
2685
- }), L(this, this.value);
2714
+ }), z(this, this.value);
2686
2715
  }
2687
2716
  disconnectedCallback() {
2688
2717
  this._reposition && (window.removeEventListener("scroll", this._reposition, !0), window.removeEventListener("resize", this._reposition)), this._onDocClick && document.removeEventListener("click", this._onDocClick);
2689
2718
  }
2690
- }, Ne = (e) => String(e ?? "").replace(/"/g, "&quot;").replace(/</g, "&lt;"), Pe = class extends HTMLElement {
2719
+ }, Me = (e) => String(e ?? "").replace(/"/g, "&quot;").replace(/</g, "&lt;"), Ne = class extends HTMLElement {
2691
2720
  static get observedAttributes() {
2692
2721
  return [
2693
2722
  "value",
@@ -2713,13 +2742,17 @@ var Me = class extends HTMLElement {
2713
2742
  this._rendered || this.render();
2714
2743
  }
2715
2744
  attributeChangedCallback(e, t, n) {
2716
- this._rendered && (e === "value" ? this.value = n : this.render());
2745
+ if (e === "value") {
2746
+ this.value = n;
2747
+ return;
2748
+ }
2749
+ this._rendered && this.render();
2717
2750
  }
2718
2751
  get value() {
2719
2752
  return this._value;
2720
2753
  }
2721
2754
  set value(e) {
2722
- this._value = e == null ? "" : String(e), L(this, this._value), this._syncSelected(), this._syncReset();
2755
+ this._value = e == null ? "" : String(e), z(this, this._value), this._syncSelected(), this._syncReset();
2723
2756
  }
2724
2757
  set options(e) {
2725
2758
  this._optionsProp = Array.isArray(e) ? e : null, this.isConnected && this.render();
@@ -2734,7 +2767,7 @@ var Me = class extends HTMLElement {
2734
2767
  value: e.getAttribute("value") ?? e.textContent.trim(),
2735
2768
  label: e.innerHTML,
2736
2769
  icon: e.getAttribute("icon") || void 0,
2737
- [R]: !0,
2770
+ [B]: !0,
2738
2771
  selected: e.hasAttribute("selected")
2739
2772
  })));
2740
2773
  }
@@ -2744,25 +2777,25 @@ var Me = class extends HTMLElement {
2744
2777
  render() {
2745
2778
  this._snapshotDeclared();
2746
2779
  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);
2747
- l && (this._value = String(l.value)), L(this, this._value);
2780
+ l && (this._value = String(l.value)), z(this, this._value);
2748
2781
  let u = e.map((e) => {
2749
2782
  let t = String(e.value) === String(this._value);
2750
- return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${Fe(e.value)}" aria-selected="${t}">${B(e)}</button>`;
2783
+ return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${Pe(e.value)}" aria-selected="${t}">${H(e)}</button>`;
2751
2784
  }).join("");
2752
2785
  this.innerHTML = `
2753
2786
  <div class="search-select${this.hasAttribute("compact") ? " search-select-compact" : ""}${i}">
2754
- <button type="button" role="combobox" class="input search-select-control" aria-haspopup="listbox" aria-expanded="false" aria-label="${Fe(this._accessibleName())}"${this.hasAttribute("disabled") ? " disabled" : ""}>
2755
- ${a ? `<i class="bi bi-${Fe(a)} search-select-icon" aria-hidden="true"></i>` : ""}
2756
- ${o ? `<span class="search-select-prefix">${z(o)}</span>` : ""}
2757
- <span class="${l ? "" : "search-select-placeholder"}" data-label>${l ? B(l) : z(s)}</span>
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>
2758
2791
  ${n ? "<span class=\"search-select-reset\" role=\"button\" aria-label=\"Clear selection\" hidden><i class=\"bi bi-x-lg\" aria-hidden=\"true\"></i></span>" : ""}
2759
2792
  <i class="bi bi-chevron-down search-select-caret" aria-hidden="true"></i>
2760
2793
  </button>
2761
2794
  <div class="search-select-menu search-select-menu-fixed" role="listbox" tabindex="-1" hidden>
2762
- ${t ? `<div class="search-select-search"><i class="bi bi-search" aria-hidden="true"></i><input class="search-select-input" placeholder="${Fe(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>` : ""}
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>` : ""}
2763
2796
  <div class="search-select-options">${u}<div class="search-select-empty" hidden>No matches</div></div>
2764
2797
  </div>
2765
- </div>`, this._rendered = !0, L(this, this._value), this._wire(), this._syncReset();
2798
+ </div>`, this._rendered = !0, z(this, this._value), this._wire(), this._syncReset();
2766
2799
  }
2767
2800
  _refs() {
2768
2801
  return {
@@ -2788,7 +2821,7 @@ var Me = class extends HTMLElement {
2788
2821
  let t = e.dataset.value === String(this._value);
2789
2822
  e.classList.toggle("selected", t), e.setAttribute("aria-selected", String(t));
2790
2823
  }
2791
- e && (e.innerHTML = t ? B(t) : e.innerHTML, e.classList.toggle("search-select-placeholder", !t));
2824
+ e && (e.innerHTML = t ? H(t) : e.innerHTML, e.classList.toggle("search-select-placeholder", !t));
2792
2825
  }
2793
2826
  _syncReset() {
2794
2827
  let { reset: e } = this._refs();
@@ -2800,8 +2833,8 @@ var Me = class extends HTMLElement {
2800
2833
  let t = () => {
2801
2834
  if (this.hasAttribute("compact")) {
2802
2835
  let t = e.control.getBoundingClientRect();
2803
- e.menu.style.width = "max-content", e.menu.style.minWidth = `${t.width}px`, e.menu.style.maxWidth = "280px", P(e.control, e.menu);
2804
- } else P(e.control, e.menu, { matchWidth: !0 });
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 });
2805
2838
  }, n = (e) => {
2806
2839
  let t = this._visible();
2807
2840
  this._active = e;
@@ -2840,25 +2873,25 @@ var Me = class extends HTMLElement {
2840
2873
  t && n(this._visible().indexOf(t));
2841
2874
  }), e.optionsWrap.addEventListener("mouseleave", () => n(-1)), e.search?.addEventListener("input", () => {
2842
2875
  r(e.search.value), n(-1);
2843
- }), e.search?.addEventListener("keydown", c), e.clear?.addEventListener("click", () => {
2876
+ }), e.clear?.addEventListener("click", () => {
2844
2877
  e.search.value = "", r(""), e.search.focus();
2845
2878
  }), e.menu.addEventListener("keydown", c), this._onDocClick = (e) => {
2846
2879
  i() && !this.contains(e.target) && o();
2847
- }, document.addEventListener("click", this._onDocClick), F(this, () => {
2880
+ }, document.addEventListener("click", this._onDocClick), I(this, () => {
2848
2881
  i() && t();
2849
2882
  });
2850
2883
  }
2851
2884
  disconnectedCallback() {
2852
- this._onDocClick && document.removeEventListener("click", this._onDocClick), I(this);
2885
+ this._onDocClick && document.removeEventListener("click", this._onDocClick), L(this);
2853
2886
  }
2854
- }, Fe = (e) => String(e ?? "").replace(/"/g, "&quot;").replace(/</g, "&lt;"), Ie = "image/png,image/jpeg,image/webp", Le = {
2887
+ }, Pe = (e) => String(e ?? "").replace(/"/g, "&quot;").replace(/</g, "&lt;"), Fe = "image/png,image/jpeg,image/webp", Ie = {
2855
2888
  "image/png": [".png"],
2856
2889
  "image/jpeg": [".jpg", ".jpeg"],
2857
2890
  "image/webp": [".webp"],
2858
2891
  "image/gif": [".gif"],
2859
2892
  "image/svg+xml": [".svg"],
2860
2893
  "application/pdf": [".pdf"]
2861
- }, Re = {
2894
+ }, Le = {
2862
2895
  "image/png": "PNG",
2863
2896
  "image/jpeg": "JPG",
2864
2897
  "image/webp": "WEBP",
@@ -2872,36 +2905,57 @@ var Me = class extends HTMLElement {
2872
2905
  ".gif": "GIF",
2873
2906
  ".svg": "SVG",
2874
2907
  ".pdf": "PDF"
2875
- }, ze = (e) => String(e || "").split(",").map((e) => e.trim().toLowerCase()).filter(Boolean);
2908
+ }, Re = (e) => String(e || "").split(",").map((e) => e.trim().toLowerCase()).filter(Boolean), ze = [
2909
+ ".png",
2910
+ ".jpg",
2911
+ ".jpeg",
2912
+ ".webp",
2913
+ ".gif",
2914
+ ".svg",
2915
+ ".bmp",
2916
+ ".avif",
2917
+ ".heic"
2918
+ ];
2876
2919
  function Be(e) {
2920
+ if (!e) return !1;
2921
+ let t = typeof e == "object" && e.type ? String(e.type).toLowerCase() : "";
2922
+ if (t) return t.startsWith("image/");
2923
+ let n = typeof e == "string" ? e : e.name || e.url || "", r = String(n).toLowerCase();
2924
+ return ze.some((e) => r.endsWith(e));
2925
+ }
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;
2929
+ }
2930
+ function He(e) {
2877
2931
  let t = [];
2878
- for (let n of ze(e)) {
2879
- let e = Re[n] || (n.startsWith(".") ? n.slice(1).toUpperCase() : n.toUpperCase());
2932
+ for (let n of Re(e)) {
2933
+ let e = Le[n] || (n.startsWith(".") ? n.slice(1).toUpperCase() : n.toUpperCase());
2880
2934
  t.includes(e) || t.push(e);
2881
2935
  }
2882
2936
  return t.length <= 1 ? t[0] || "supported" : `${t.slice(0, -1).join(", ")} or ${t[t.length - 1]}`;
2883
2937
  }
2884
- function Ve(e, t) {
2885
- let n = ze(t);
2938
+ function Ue(e, t) {
2939
+ let n = Re(t);
2886
2940
  if (!n.length) return !0;
2887
2941
  let r = (e.type || "").toLowerCase(), i = (e.name || "").toLowerCase();
2888
- return n.some((e) => e.startsWith(".") ? i.endsWith(e) : e.endsWith("/*") ? r.startsWith(e.slice(0, -1)) : r && r === e ? !0 : !r && (Le[e] || []).some((e) => i.endsWith(e)));
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)));
2889
2943
  }
2890
- function He(e, t = {}) {
2944
+ function We(e, t = {}) {
2891
2945
  if (!e) return null;
2892
- let n = t.accept === void 0 ? Ie : t.accept, r = t.maxSizeMb || 5;
2893
- return Ve(e, n) ? e.size > r * 1024 * 1024 ? `Keep the file under ${r} MB.` : null : `Choose a ${Be(n)} file.`;
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.`;
2894
2948
  }
2895
- var X = (e, t) => {
2949
+ var Q = (e, t) => {
2896
2950
  typeof customElements < "u" && !customElements.get(e) && customElements.define(e, t);
2897
2951
  };
2898
- function Ue() {
2899
- X("wui-select", Pe), X("wui-phone", Me), X("wui-datepicker", ce), X("wui-date-range", ge), X("wui-autocomplete", re), X("wui-multiselect", _e), X("wui-otp", xe), X("wui-status-icon", ee);
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);
2900
2954
  }
2901
- Ue();
2955
+ Ge();
2902
2956
  //#endregion
2903
2957
  //#region src/components/RequiredMark.jsx
2904
- function Z() {
2958
+ function $() {
2905
2959
  return /* @__PURE__ */ t("span", {
2906
2960
  className: "required",
2907
2961
  "aria-hidden": "true",
@@ -2910,9 +2964,9 @@ function Z() {
2910
2964
  }
2911
2965
  //#endregion
2912
2966
  //#region src/components/AppAutocomplete.jsx
2913
- function We({ value: e, onChange: r, options: i, loadOptions: o, placeholder: s = "Search…", minChars: l, debounce: u, disabled: d = !1, size: f, name: p, label: m, error: h, hint: g, required: _ = !1, fieldClassName: v = "", ...y }) {
2914
- T("AppAutocomplete", y);
2915
- let b = c(null), x = typeof o == "function";
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";
2916
2970
  return a(() => {
2917
2971
  let e = b.current;
2918
2972
  e && !x && (e.options = i || []);
@@ -2945,7 +2999,7 @@ function We({ value: e, onChange: r, options: i, loadOptions: o, placeholder: s
2945
2999
  m && /* @__PURE__ */ n("label", {
2946
3000
  className: "label",
2947
3001
  htmlFor: p,
2948
- children: [m, _ && /* @__PURE__ */ t(Z, {})]
3002
+ children: [m, _ && /* @__PURE__ */ t($, {})]
2949
3003
  }),
2950
3004
  /* @__PURE__ */ t("wui-autocomplete", {
2951
3005
  "aria-label": typeof m == "string" ? m : void 0,
@@ -2954,7 +3008,7 @@ function We({ value: e, onChange: r, options: i, loadOptions: o, placeholder: s
2954
3008
  name: p,
2955
3009
  placeholder: s,
2956
3010
  remote: x ? "" : void 0,
2957
- "min-chars": l == null ? void 0 : String(l),
3011
+ "min-chars": c == null ? void 0 : String(c),
2958
3012
  debounce: u == null ? void 0 : String(u),
2959
3013
  size: f || void 0,
2960
3014
  disabled: d ? "" : void 0,
@@ -2972,14 +3026,14 @@ function We({ value: e, onChange: r, options: i, loadOptions: o, placeholder: s
2972
3026
  }
2973
3027
  //#endregion
2974
3028
  //#region src/components/AppAvatar.jsx
2975
- function Ge(e) {
3029
+ function qe(e) {
2976
3030
  let t = (e || "").trim();
2977
3031
  if (!t) return "?";
2978
3032
  let n = t.split(/\s+/).filter(Boolean);
2979
3033
  return n.length === 1 ? n[0].slice(0, 2).toUpperCase() : (n[0][0] + n[n.length - 1][0]).toUpperCase();
2980
3034
  }
2981
- function Ke({ name: e, src: n, className: r = "", ...i }) {
2982
- T("AppAvatar", i);
3035
+ function Je({ name: e, src: n, className: r = "", ...i }) {
3036
+ E("AppAvatar", i);
2983
3037
  let a = ["avatar", r].filter(Boolean).join(" ");
2984
3038
  return n ? /* @__PURE__ */ t("span", {
2985
3039
  className: a,
@@ -2992,13 +3046,13 @@ function Ke({ name: e, src: n, className: r = "", ...i }) {
2992
3046
  className: a,
2993
3047
  role: "img",
2994
3048
  "aria-label": e,
2995
- children: Ge(e)
3049
+ children: qe(e)
2996
3050
  });
2997
3051
  }
2998
3052
  //#endregion
2999
3053
  //#region src/components/AppBadge.jsx
3000
- function qe({ children: e, tone: n, dot: r = !1, className: i = "", ...a }) {
3001
- return T("AppBadge", a), /* @__PURE__ */ t(d, {
3054
+ function Ye({ children: e, tone: n, dot: r = !1, className: i = "", ...a }) {
3055
+ return E("AppBadge", a), /* @__PURE__ */ t(f, {
3002
3056
  bg: !1,
3003
3057
  className: [
3004
3058
  n ? `badge-${n}` : "",
@@ -3011,17 +3065,20 @@ function qe({ children: e, tone: n, dot: r = !1, className: i = "", ...a }) {
3011
3065
  }
3012
3066
  //#endregion
3013
3067
  //#region src/components/AppButton.jsx
3014
- var Je = {
3068
+ var Xe = {
3015
3069
  primary: "primary",
3016
3070
  secondary: "secondary",
3017
3071
  outline: "outline-primary",
3018
3072
  ghost: "link",
3019
- danger: "danger"
3073
+ danger: "danger",
3074
+ "outline-danger": "outline-danger",
3075
+ light: "light",
3076
+ warning: "warning"
3020
3077
  };
3021
- function Ye(e, n) {
3078
+ function Ze(e, n) {
3022
3079
  if (!e) return null;
3023
3080
  let r = n === "left" ? "me-2" : "ms-2";
3024
- return typeof e == "string" ? /* @__PURE__ */ t(O, {
3081
+ return typeof e == "string" ? /* @__PURE__ */ t(k, {
3025
3082
  name: e,
3026
3083
  size: 16,
3027
3084
  className: r
@@ -3030,35 +3087,35 @@ function Ye(e, n) {
3030
3087
  children: e
3031
3088
  });
3032
3089
  }
3033
- function Q({ 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 = "", ...p }) {
3034
- T("AppButton", p);
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);
3035
3092
  let m = [c ? "w-100" : "", d].filter(Boolean).join(" ");
3036
- return /* @__PURE__ */ n(f, {
3037
- type: (p.as === void 0 || p.as === "button") && p.href === void 0 ? a : void 0,
3038
- variant: Je[r] ?? "primary",
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",
3039
3096
  size: i === "md" ? void 0 : i,
3040
3097
  disabled: s || o,
3041
3098
  className: m || void 0,
3042
- ...p,
3099
+ ...f,
3043
3100
  children: [
3044
3101
  o && /* @__PURE__ */ t("span", {
3045
3102
  className: "spinner-border spinner-border-sm me-2",
3046
3103
  "aria-hidden": "true"
3047
3104
  }),
3048
- !o && Ye(l, "left"),
3105
+ !o && Ze(l, "left"),
3049
3106
  e,
3050
- !o && Ye(u, "right")
3107
+ !o && Ze(u, "right")
3051
3108
  ]
3052
3109
  });
3053
3110
  }
3054
3111
  //#endregion
3055
3112
  //#region src/components/AppCallout.jsx
3056
- function Xe({ children: e, icon: r = "info", className: i = "", ...a }) {
3057
- return T("AppCallout", a), /* @__PURE__ */ n("div", {
3113
+ function $e({ children: e, icon: r = "info", className: i = "", ...a }) {
3114
+ return E("AppCallout", a), /* @__PURE__ */ n("div", {
3058
3115
  className: `info-callout${i ? ` ${i}` : ""}`,
3059
3116
  children: [r && /* @__PURE__ */ t("span", {
3060
3117
  className: "info-callout-icon",
3061
- children: /* @__PURE__ */ t(O, {
3118
+ children: /* @__PURE__ */ t(k, {
3062
3119
  name: r,
3063
3120
  size: 18
3064
3121
  })
@@ -3067,24 +3124,27 @@ function Xe({ children: e, icon: r = "info", className: i = "", ...a }) {
3067
3124
  }
3068
3125
  //#endregion
3069
3126
  //#region src/components/AppCard.jsx
3070
- function Ze({ title: r, titleClassName: i = "", header: a, headerExtra: o, headerActions: s, children: c, className: l = "", bodyClassName: u = "", headerClassName: d = "", body: f = !0, lifted: m = !1, ...h }) {
3071
- T("AppCard", h);
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);
3072
3129
  let g = a != null || r != null || o != null || s != null;
3073
- return /* @__PURE__ */ n(p, {
3074
- className: [m ? "card-lifted" : "", l].filter(Boolean).join(" ") || void 0,
3130
+ return /* @__PURE__ */ n(m, {
3131
+ className: [p ? "card-lifted" : "", l].filter(Boolean).join(" ") || void 0,
3075
3132
  ...h,
3076
- children: [g && /* @__PURE__ */ t(p.Header, {
3133
+ children: [g && /* @__PURE__ */ t(m.Header, {
3077
3134
  className: d || void 0,
3078
3135
  children: a ?? /* @__PURE__ */ n(e, { children: [
3079
- r != null && /* @__PURE__ */ t(p.Title, {
3136
+ r != null && /* @__PURE__ */ t(m.Title, {
3080
3137
  as: "div",
3081
3138
  className: i || void 0,
3082
3139
  children: r
3083
3140
  }),
3084
3141
  o,
3085
- s
3142
+ s != null && /* @__PURE__ */ t("div", {
3143
+ className: "card-header-actions",
3144
+ children: s
3145
+ })
3086
3146
  ] })
3087
- }), f ? /* @__PURE__ */ t(p.Body, {
3147
+ }), f ? /* @__PURE__ */ t(m.Body, {
3088
3148
  className: u || void 0,
3089
3149
  children: c
3090
3150
  }) : c]
@@ -3092,29 +3152,40 @@ function Ze({ title: r, titleClassName: i = "", header: a, headerExtra: o, heade
3092
3152
  }
3093
3153
  //#endregion
3094
3154
  //#region src/components/AppCheckbox.jsx
3095
- var Qe = r(function({ label: e, id: r, name: i, className: a = "", ...s }, c) {
3096
- T("AppCheckbox", s);
3097
- let l = o(), u = r || i || l;
3155
+ var tt = r(function({ label: e, id: r, name: i, error: a, hint: s, className: c = "", ...l }, u) {
3156
+ E("AppCheckbox", l);
3157
+ let d = o(), f = r || i || d;
3098
3158
  return /* @__PURE__ */ n("div", {
3099
- className: `form-check${a ? ` ${a}` : ""}`,
3100
- children: [/* @__PURE__ */ t("input", {
3101
- type: "checkbox",
3102
- className: "form-check-input",
3103
- id: u,
3104
- name: i,
3105
- ref: c,
3106
- ...s
3107
- }), e != null && /* @__PURE__ */ t("label", {
3108
- className: "form-check-label",
3109
- htmlFor: u,
3110
- children: e
3111
- })]
3159
+ className: `form-check${c ? ` ${c}` : ""}`,
3160
+ children: [
3161
+ /* @__PURE__ */ t("input", {
3162
+ type: "checkbox",
3163
+ className: "form-check-input",
3164
+ id: f,
3165
+ name: i,
3166
+ ref: u,
3167
+ "aria-invalid": a ? "true" : "false",
3168
+ ...l
3169
+ }),
3170
+ e != null && /* @__PURE__ */ t("label", {
3171
+ className: "form-check-label",
3172
+ htmlFor: f,
3173
+ children: e
3174
+ }),
3175
+ a ? /* @__PURE__ */ t("div", {
3176
+ className: "field-error",
3177
+ children: a
3178
+ }) : s ? /* @__PURE__ */ t("div", {
3179
+ className: "field-hint",
3180
+ children: s
3181
+ }) : null
3182
+ ]
3112
3183
  });
3113
3184
  });
3114
3185
  //#endregion
3115
3186
  //#region src/components/AppChip.jsx
3116
- function $e({ 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 }) {
3117
- T("AppChip", m);
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);
3118
3189
  let h = r ?? i, g = [
3119
3190
  "chip",
3120
3191
  a && a !== "neutral" ? a : "",
@@ -3131,7 +3202,7 @@ function $e({ label: r, children: i, tone: a = "neutral", size: o = "md", leadin
3131
3202
  }) : c
3132
3203
  }) : s ? /* @__PURE__ */ t("span", {
3133
3204
  className: "chip-ic",
3134
- children: /* @__PURE__ */ t(O, {
3205
+ children: /* @__PURE__ */ t(k, {
3135
3206
  name: s,
3136
3207
  size: o === "sm" ? 12 : 14
3137
3208
  })
@@ -3156,7 +3227,7 @@ function $e({ label: r, children: i, tone: a = "neutral", size: o = "md", leadin
3156
3227
  onClick: l,
3157
3228
  disabled: d,
3158
3229
  "aria-label": f || (typeof h == "string" ? `Remove ${h}` : "Remove"),
3159
- children: /* @__PURE__ */ t(O, {
3230
+ children: /* @__PURE__ */ t(k, {
3160
3231
  name: "x",
3161
3232
  size: o === "sm" ? 12 : 14
3162
3233
  })
@@ -3165,8 +3236,8 @@ function $e({ label: r, children: i, tone: a = "neutral", size: o = "md", leadin
3165
3236
  }
3166
3237
  //#endregion
3167
3238
  //#region src/components/AppChoiceCard.jsx
3168
- function et({ 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 }) {
3169
- return T("AppChoiceCard", y), /* @__PURE__ */ n("label", {
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", {
3170
3241
  className: `struct-card${d ? " struct-card-img-card" : ""}${o ? " checked" : ""}${v ? ` ${v}` : ""}`,
3171
3242
  children: [
3172
3243
  /* @__PURE__ */ t("input", {
@@ -3186,7 +3257,7 @@ function et({ name: r, multiple: i = !1, value: a, checked: o, onChange: s, icon
3186
3257
  })
3187
3258
  }) : l || c ? /* @__PURE__ */ t("span", {
3188
3259
  className: "struct-card-ic",
3189
- children: l || /* @__PURE__ */ t(O, {
3260
+ children: l || /* @__PURE__ */ t(k, {
3190
3261
  name: c,
3191
3262
  size: u
3192
3263
  })
@@ -3203,7 +3274,7 @@ function et({ name: r, multiple: i = !1, value: a, checked: o, onChange: s, icon
3203
3274
  }),
3204
3275
  /* @__PURE__ */ t("span", {
3205
3276
  className: "struct-card-check",
3206
- children: /* @__PURE__ */ t(O, {
3277
+ children: /* @__PURE__ */ t(k, {
3207
3278
  name: g,
3208
3279
  size: _
3209
3280
  })
@@ -3213,8 +3284,8 @@ function et({ name: r, multiple: i = !1, value: a, checked: o, onChange: s, icon
3213
3284
  }
3214
3285
  //#endregion
3215
3286
  //#region src/components/AppChoiceChip.jsx
3216
- function tt({ multiple: e = !0, label: r, name: i, value: a, checked: o, onChange: s, children: c, count: l, className: u = "", ...d }) {
3217
- return T("AppChoiceChip", d), /* @__PURE__ */ n("label", {
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", {
3218
3289
  className: `choice-chip${o ? " checked" : ""}${u ? ` ${u}` : ""}`,
3219
3290
  children: [
3220
3291
  /* @__PURE__ */ t("input", {
@@ -3234,59 +3305,59 @@ function tt({ multiple: e = !0, label: r, name: i, value: a, checked: o, onChang
3234
3305
  }
3235
3306
  //#endregion
3236
3307
  //#region src/components/AppColorField.jsx
3237
- function nt({ value: e = "#000000", onChange: r, label: i, required: a = !1, error: o, hint: s, name: c, id: l, disabled: u = !1, size: d = "md", className: f = "", ...p }) {
3238
- T("AppColorField", p);
3239
- let m = l || c, h = (e) => /^#[0-9a-f]{6}$/i.test(e), g = d === "sm" ? " color-field-sm" : d === "lg" ? " color-field-lg" : "", _ = d === "sm" ? " input-sm" : d === "lg" ? " input-lg" : "";
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);
3310
+ 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" : "";
3240
3311
  return /* @__PURE__ */ n("div", {
3241
- className: `field${f ? ` ${f}` : ""}`,
3312
+ className: `field${p ? ` ${p}` : ""}`,
3242
3313
  children: [
3243
3314
  i && /* @__PURE__ */ n("label", {
3244
3315
  className: "label",
3245
- htmlFor: m,
3246
- children: [i, a && /* @__PURE__ */ t(Z, {})]
3316
+ htmlFor: g,
3317
+ children: [i, a && /* @__PURE__ */ t($, {})]
3247
3318
  }),
3248
3319
  /* @__PURE__ */ n("div", {
3249
- className: `color-field${g}`,
3320
+ className: `color-field${v}`,
3250
3321
  children: [/* @__PURE__ */ t("input", {
3251
3322
  type: "color",
3252
3323
  className: "color-field-swatch",
3253
- value: h(e) ? e : "#000000",
3324
+ value: _(e) ? e : "#000000",
3254
3325
  onChange: (e) => r?.(e.target.value),
3255
- disabled: u,
3326
+ disabled: d,
3256
3327
  "aria-label": `${i || "Colour"} — colour picker`,
3257
3328
  tabIndex: -1
3258
3329
  }), /* @__PURE__ */ t("input", {
3259
3330
  type: "text",
3260
- className: `input color-field-hex${_}${o ? " error" : ""}`,
3261
- id: m,
3262
- name: c,
3331
+ className: `input color-field-hex${y}${s ? " error" : ""}`,
3332
+ id: g,
3333
+ name: l,
3263
3334
  value: e,
3264
3335
  onChange: (e) => r?.(e.target.value),
3265
3336
  placeholder: "#4F46E5",
3266
3337
  spellCheck: !1,
3267
3338
  maxLength: 7,
3268
3339
  required: a,
3269
- disabled: u,
3270
- "aria-invalid": o ? "true" : "false"
3340
+ disabled: d,
3341
+ "aria-invalid": s ? "true" : "false"
3271
3342
  })]
3272
3343
  }),
3273
- o ? /* @__PURE__ */ t("div", {
3344
+ s ? /* @__PURE__ */ t("div", {
3274
3345
  className: "field-error",
3275
- children: o
3276
- }) : s ? /* @__PURE__ */ t("div", {
3277
- className: "field-hint",
3278
3346
  children: s
3347
+ }) : c ? /* @__PURE__ */ t("div", {
3348
+ className: "field-hint",
3349
+ children: c
3279
3350
  }) : null
3280
3351
  ]
3281
3352
  });
3282
3353
  }
3283
3354
  //#endregion
3284
3355
  //#region src/components/AppCompareTable.jsx
3285
- function rt({ columns: e = [], rows: r = [], caption: i, className: a = "", ...o }) {
3286
- T("AppCompareTable", o);
3356
+ function ot({ columns: e = [], rows: r = [], caption: i, className: a = "", ...o }) {
3357
+ E("AppCompareTable", o);
3287
3358
  let s = (e) => e === !0 ? /* @__PURE__ */ t("span", {
3288
3359
  className: "compare-yes",
3289
- children: /* @__PURE__ */ t(O, {
3360
+ children: /* @__PURE__ */ t(k, {
3290
3361
  name: "check",
3291
3362
  size: 16
3292
3363
  })
@@ -3318,9 +3389,9 @@ function rt({ columns: e = [], rows: r = [], caption: i, className: a = "", ...o
3318
3389
  }
3319
3390
  //#endregion
3320
3391
  //#region src/components/AppInfoTip.jsx
3321
- function it({ label: e, children: r, ...i }) {
3322
- T("AppInfoTip", i);
3323
- let [a, u] = l(!1), [d, f] = l(null), p = c(null), m = c(null), g = o();
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);
3324
3395
  return s(() => {
3325
3396
  if (!a || !p.current || !m.current) return;
3326
3397
  let e = p.current.getBoundingClientRect(), t = m.current.offsetWidth, n = m.current.offsetHeight, r = e.left + e.width / 2 - t / 2;
@@ -3332,27 +3403,37 @@ function it({ label: e, children: r, ...i }) {
3332
3403
  });
3333
3404
  }, [a]), r ? /* @__PURE__ */ n("span", {
3334
3405
  className: "infotip",
3335
- onMouseLeave: () => u(!1),
3406
+ onMouseLeave: () => c(!1),
3336
3407
  children: [/* @__PURE__ */ t("button", {
3337
3408
  type: "button",
3338
3409
  ref: p,
3339
3410
  className: "infotip-btn",
3340
3411
  "aria-label": e,
3341
3412
  "aria-expanded": a,
3342
- "aria-describedby": a ? g : void 0,
3343
- onMouseEnter: () => u(!0),
3344
- onClick: () => u((e) => !e),
3345
- onFocus: () => u(!0),
3346
- onBlur: () => u(!1),
3347
- children: /* @__PURE__ */ t(O, {
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, {
3348
3429
  name: "info",
3349
3430
  size: 16
3350
3431
  })
3351
- }), a && h(/* @__PURE__ */ t("span", {
3432
+ }), a && g(/* @__PURE__ */ t("span", {
3352
3433
  ref: m,
3353
3434
  className: "infotip-pop is-portal",
3354
3435
  role: "tooltip",
3355
- id: g,
3436
+ id: h,
3356
3437
  style: {
3357
3438
  position: "fixed",
3358
3439
  top: d ? d.top : 0,
@@ -3365,29 +3446,29 @@ function it({ label: e, children: r, ...i }) {
3365
3446
  }
3366
3447
  //#endregion
3367
3448
  //#region src/components/AppInput.jsx
3368
- var at = r(function({ label: e, required: r = !1, error: i, hint: a, help: o, helpLabel: s = "More information", type: u = "text", size: d = "md", leftIcon: f, rightIcon: p, onRightIconClick: h, rightIconLabel: g, unit: _, id: v, name: y, className: b = "", fieldClassName: x = "", disabled: S = !1, clearable: C = !1, showCount: w = !1, maxLength: E, prefix: D, suffix: k, floatingLabel: A = !1, ...j }, M) {
3369
- T("AppInput", j);
3370
- let [ee, N] = l(!1), P = v || y, F = u === "password", I = F && ee ? "text" : u, te = c(null), L = (e) => {
3371
- te.current = e, typeof M == "function" ? M(e) : M && (M.current = e);
3372
- }, R = String(j.value ?? j.defaultValue ?? ""), [z, ne] = l(() => !!R), [B, re] = l(() => R.length), V = C && !S, H = C || w, ie = (e) => {
3373
- ne(!!e.target.value), re(e.target.value.length), j.onInput?.(e);
3374
- }, ae = V ? /* @__PURE__ */ t("button", {
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", {
3375
3456
  type: "button",
3376
3457
  className: "input-clear",
3377
3458
  onClick: () => {
3378
- let e = te.current;
3459
+ let e = L.current;
3379
3460
  if (!e) return;
3380
3461
  let t = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value")?.set;
3381
- t ? t.call(e, "") : e.value = "", e.dispatchEvent(new Event("input", { bubbles: !0 })), ne(!1), e.focus();
3462
+ t ? t.call(e, "") : e.value = "", e.dispatchEvent(new Event("input", { bubbles: !0 })), V(!1), e.focus();
3382
3463
  },
3383
3464
  "aria-label": "Clear",
3384
3465
  tabIndex: -1,
3385
- hidden: !z,
3386
- children: /* @__PURE__ */ t(O, {
3466
+ hidden: !B,
3467
+ children: /* @__PURE__ */ t(k, {
3387
3468
  name: "x",
3388
3469
  size: 16
3389
3470
  })
3390
- }) : null, oe = [
3471
+ }) : null, W = i && P ? `${P}-error` : void 0, G = a && P ? `${P}-hint` : void 0, K = W || G, q = [
3391
3472
  "input",
3392
3473
  d === "sm" ? "input-sm" : "",
3393
3474
  d === "lg" ? "input-lg" : "",
@@ -3396,69 +3477,70 @@ var at = r(function({ label: e, required: r = !1, error: i, hint: a, help: o, he
3396
3477
  _ ? "num-input" : "",
3397
3478
  C ? "has-clear" : "",
3398
3479
  b
3399
- ].filter(Boolean).join(" "), U = /* @__PURE__ */ t(m.Control, {
3480
+ ].filter(Boolean).join(" "), J = /* @__PURE__ */ t(h.Control, {
3400
3481
  id: P,
3401
3482
  name: y,
3402
3483
  type: I,
3403
- className: oe,
3484
+ className: q,
3404
3485
  disabled: S,
3405
3486
  required: r,
3406
3487
  "aria-invalid": i ? "true" : "false",
3407
- maxLength: E,
3488
+ "aria-describedby": K,
3489
+ maxLength: T,
3408
3490
  ...j,
3409
3491
  placeholder: A ? " " : j.placeholder,
3410
- ref: L,
3411
- onInput: H ? ie : j.onInput
3412
- }), W;
3413
- return W = A && e ? /* @__PURE__ */ n("div", {
3492
+ ref: R,
3493
+ onInput: re ? U : j.onInput
3494
+ }), Y;
3495
+ return Y = A && e ? /* @__PURE__ */ n("div", {
3414
3496
  className: "field-float",
3415
- children: [U, /* @__PURE__ */ n("label", {
3497
+ children: [J, /* @__PURE__ */ n("label", {
3416
3498
  className: "float-label",
3417
3499
  htmlFor: P,
3418
- children: [e, r && /* @__PURE__ */ t(Z, {})]
3500
+ children: [e, r && /* @__PURE__ */ t($, {})]
3419
3501
  })]
3420
- }) : D || k ? /* @__PURE__ */ n("div", {
3502
+ }) : D || O ? /* @__PURE__ */ n("div", {
3421
3503
  className: "input-affixed",
3422
3504
  children: [
3423
3505
  D != null && /* @__PURE__ */ t("span", {
3424
3506
  className: "affix affix-pre",
3425
3507
  children: D
3426
3508
  }),
3427
- U,
3428
- k != null && /* @__PURE__ */ t("span", {
3509
+ J,
3510
+ O != null && /* @__PURE__ */ t("span", {
3429
3511
  className: "affix affix-suf",
3430
- children: k
3512
+ children: O
3431
3513
  })
3432
3514
  ]
3433
3515
  }) : _ ? /* @__PURE__ */ n("div", {
3434
3516
  className: "input-with-unit",
3435
- children: [U, /* @__PURE__ */ t("span", {
3517
+ children: [J, /* @__PURE__ */ t("span", {
3436
3518
  className: "unit",
3437
3519
  children: _
3438
3520
  })]
3439
3521
  }) : F ? /* @__PURE__ */ n("div", {
3440
3522
  className: "input-wrap",
3441
- children: [U, /* @__PURE__ */ t("button", {
3523
+ children: [J, /* @__PURE__ */ t("button", {
3442
3524
  type: "button",
3443
3525
  className: "pw-toggle",
3444
- onClick: () => N((e) => !e),
3445
- "aria-label": ee ? "Hide password" : "Show password",
3526
+ onClick: () => ee((e) => !e),
3527
+ "aria-label": N ? "Hide password" : "Show password",
3446
3528
  tabIndex: -1,
3447
- children: /* @__PURE__ */ t(O, {
3448
- name: ee ? "eye-off" : "eye",
3529
+ children: /* @__PURE__ */ t(k, {
3530
+ name: N ? "eye-off" : "eye",
3449
3531
  size: 18
3450
3532
  })
3451
3533
  })]
3452
3534
  }) : p ? /* @__PURE__ */ n("div", {
3453
3535
  className: "input-wrap",
3454
- children: [U, /* @__PURE__ */ t("button", {
3536
+ children: [J, /* @__PURE__ */ t("button", {
3455
3537
  type: "button",
3456
3538
  className: "pw-toggle",
3457
- onClick: h,
3458
- disabled: !h,
3539
+ onClick: m,
3540
+ disabled: !m,
3459
3541
  tabIndex: -1,
3460
3542
  "aria-label": g || p,
3461
- children: /* @__PURE__ */ t(O, {
3543
+ children: /* @__PURE__ */ t(k, {
3462
3544
  name: p,
3463
3545
  size: 18
3464
3546
  })
@@ -3468,110 +3550,112 @@ var at = r(function({ label: e, required: r = !1, error: i, hint: a, help: o, he
3468
3550
  children: [
3469
3551
  f && /* @__PURE__ */ t("span", {
3470
3552
  className: "ic",
3471
- children: /* @__PURE__ */ t(O, {
3553
+ children: /* @__PURE__ */ t(k, {
3472
3554
  name: f,
3473
3555
  size: 16
3474
3556
  })
3475
3557
  }),
3476
- U,
3477
- ae
3558
+ J,
3559
+ ie
3478
3560
  ]
3479
3561
  }) : f ? /* @__PURE__ */ n("div", {
3480
3562
  className: "input-icon",
3481
3563
  children: [/* @__PURE__ */ t("span", {
3482
3564
  className: "ic",
3483
- children: /* @__PURE__ */ t(O, {
3565
+ children: /* @__PURE__ */ t(k, {
3484
3566
  name: f,
3485
3567
  size: 16
3486
3568
  })
3487
- }), U]
3488
- }) : U, /* @__PURE__ */ n(m.Group, {
3569
+ }), J]
3570
+ }) : J, /* @__PURE__ */ n(h.Group, {
3489
3571
  className: `field${x ? ` ${x}` : ""}`,
3490
3572
  children: [
3491
- e && !A && /* @__PURE__ */ n(m.Label, {
3573
+ e && !A && /* @__PURE__ */ n(h.Label, {
3492
3574
  className: "label",
3493
3575
  htmlFor: P,
3494
3576
  children: [
3495
3577
  e,
3496
- r && /* @__PURE__ */ t(Z, {}),
3497
- o && /* @__PURE__ */ t(it, {
3578
+ r && /* @__PURE__ */ t($, {}),
3579
+ o && /* @__PURE__ */ t(st, {
3498
3580
  label: s,
3499
3581
  children: o
3500
3582
  })
3501
3583
  ]
3502
3584
  }),
3503
- W,
3585
+ Y,
3504
3586
  i ? /* @__PURE__ */ t("div", {
3505
3587
  className: "field-error",
3588
+ id: W,
3506
3589
  children: i
3507
3590
  }) : a ? /* @__PURE__ */ t("div", {
3508
3591
  className: "field-hint",
3592
+ id: G,
3509
3593
  children: a
3510
3594
  }) : null,
3511
3595
  w && /* @__PURE__ */ n("div", {
3512
- className: `field-count${E && B >= E ? " at-limit" : ""}`,
3513
- children: [B, E ? ` / ${E}` : ""]
3596
+ className: `field-count${T && te >= T ? " at-limit" : ""}`,
3597
+ children: [te, T ? ` / ${T}` : ""]
3514
3598
  })
3515
3599
  ]
3516
3600
  });
3517
- }), ot = "a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex=\"-1\"])";
3518
- function st({ open: e, title: r, subtitle: i, headerIcon: o, onClose: s, footer: l, size: u, wide: d = !1, side: f = !1, maxWidth: p, hideHeader: m = !1, className: h = "", children: _, ...v }) {
3519
- T("AppModal", v);
3520
- let y = c(null);
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);
3521
3605
  a(() => {
3522
3606
  if (!e) return;
3523
- let t = y.current?.closest(".modal-content");
3607
+ let t = b.current?.closest(".modal-content");
3524
3608
  if (!t) return;
3525
- let n = () => Array.from(t.querySelectorAll(ot));
3526
- (t.querySelector("[data-autofocus]") || n().find((e) => !e.classList.contains("lx-modal-close")) || n()[0] || t).focus?.();
3609
+ let n = () => Array.from(t.querySelectorAll(lt));
3610
+ (t.querySelector("[data-autofocus]") || n().find((e) => !e.classList.contains("wui-modal-close")) || n()[0] || t).focus?.();
3527
3611
  }, [e]);
3528
- let b = ["lx-modal-shell", f ? "is-side" : ""].filter(Boolean).join(" "), x = [
3529
- "lx-modal",
3530
- d ? "lx-modal-wide" : "",
3531
- f ? "lx-modal-side" : "",
3532
- h
3612
+ let x = ["wui-modal-shell", f ? "is-side" : ""].filter(Boolean).join(" "), S = [
3613
+ "wui-modal",
3614
+ d ? "wui-modal-wide" : "",
3615
+ f ? "wui-modal-side" : "",
3616
+ g
3533
3617
  ].filter(Boolean).join(" ");
3534
- return /* @__PURE__ */ n(g, {
3618
+ return /* @__PURE__ */ n(_, {
3535
3619
  show: e,
3536
3620
  onHide: s,
3537
3621
  animation: !1,
3538
- backdrop: !0,
3539
- keyboard: !0,
3622
+ backdrop: !h || "static",
3623
+ keyboard: !h,
3540
3624
  autoFocus: !1,
3541
3625
  enforceFocus: !0,
3542
3626
  restoreFocus: !0,
3543
3627
  size: u,
3544
3628
  centered: !f,
3545
- className: b,
3546
- style: p == null ? void 0 : { "--lx-modal-max-width": typeof p == "number" ? `${p}px` : p },
3547
- dialogClassName: "lx-rb-dialog",
3548
- contentClassName: x,
3549
- backdropClassName: "lx-modal-dim",
3629
+ className: x,
3630
+ style: p == null ? void 0 : { "--wui-modal-max-width": typeof p == "number" ? `${p}px` : p },
3631
+ dialogClassName: "wui-rb-dialog",
3632
+ contentClassName: S,
3633
+ backdropClassName: "wui-modal-dim",
3550
3634
  "aria-label": typeof r == "string" ? r : void 0,
3551
3635
  children: [
3552
3636
  !m && /* @__PURE__ */ n("div", {
3553
- className: "lx-modal-header",
3637
+ className: "wui-modal-header",
3554
3638
  children: [/* @__PURE__ */ n("div", {
3555
- className: "lx-modal-heading",
3639
+ className: "wui-modal-heading",
3556
3640
  children: [o && /* @__PURE__ */ t("span", {
3557
- className: "lx-modal-headicon",
3558
- children: /* @__PURE__ */ t(O, {
3641
+ className: "wui-modal-headicon",
3642
+ children: /* @__PURE__ */ t(k, {
3559
3643
  name: o,
3560
3644
  size: 18
3561
3645
  })
3562
3646
  }), /* @__PURE__ */ n("div", {
3563
- className: "lx-modal-headtext",
3647
+ className: "wui-modal-headtext",
3564
3648
  children: [/* @__PURE__ */ t("div", {
3565
- className: "lx-modal-title",
3649
+ className: "wui-modal-title",
3566
3650
  children: r
3567
3651
  }), i && /* @__PURE__ */ t("div", {
3568
- className: "lx-modal-subtitle",
3652
+ className: "wui-modal-subtitle",
3569
3653
  children: i
3570
3654
  })]
3571
3655
  })]
3572
3656
  }), /* @__PURE__ */ t("button", {
3573
3657
  type: "button",
3574
- className: "lx-modal-close",
3658
+ className: "wui-modal-close",
3575
3659
  onClick: s,
3576
3660
  "aria-label": "Close",
3577
3661
  children: /* @__PURE__ */ t("svg", {
@@ -3589,86 +3673,92 @@ function st({ open: e, title: r, subtitle: i, headerIcon: o, onClose: s, footer:
3589
3673
  })]
3590
3674
  }),
3591
3675
  /* @__PURE__ */ t("div", {
3592
- className: "lx-modal-body",
3593
- ref: y,
3594
- children: _
3676
+ className: "wui-modal-body",
3677
+ ref: b,
3678
+ children: v
3595
3679
  }),
3596
- l && /* @__PURE__ */ t("div", {
3597
- className: "lx-modal-footer",
3598
- children: l
3680
+ c && /* @__PURE__ */ t("div", {
3681
+ className: "wui-modal-footer",
3682
+ children: c
3599
3683
  })
3600
3684
  ]
3601
3685
  });
3602
3686
  }
3603
3687
  //#endregion
3604
3688
  //#region src/components/ModalIcons.jsx
3605
- var $ = (e) => function({ size: n = 72 }) {
3689
+ var dt = (e) => function({ size: n = 72 }) {
3606
3690
  return /* @__PURE__ */ t("wui-status-icon", {
3607
3691
  tone: e,
3608
3692
  size: n
3609
3693
  });
3610
- }, ct = {
3611
- success: $("success"),
3612
- error: $("error"),
3613
- warning: $("warning"),
3614
- info: $("info"),
3615
- delete: $("delete")
3694
+ }, ft = {
3695
+ success: dt("success"),
3696
+ error: dt("error"),
3697
+ warning: dt("warning"),
3698
+ info: dt("info"),
3699
+ delete: dt("delete")
3616
3700
  };
3617
3701
  //#endregion
3618
3702
  //#region src/components/AppConfirmDialog.jsx
3619
- function lt({ open: r, title: i, message: o, confirmLabel: s = "Confirm", cancelLabel: c = "Cancel", danger: u = !1, tone: d, confirmPhrase: f, onConfirm: p, onClose: m, ...h }) {
3620
- T("AppConfirmDialog", h);
3621
- let [g, _] = l("");
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("");
3622
3706
  if (a(() => {
3623
- r || _("");
3707
+ r || y("");
3624
3708
  }, [r]), !r) return null;
3625
- let v = !!f && g.trim() !== f, y = ct[d || (u ? "delete" : "info")];
3626
- return /* @__PURE__ */ t(st, {
3709
+ let b = !!f && v.trim() !== f, x = ft[d || (l ? "delete" : "info")], S = () => {
3710
+ h || m?.();
3711
+ };
3712
+ return /* @__PURE__ */ t(ut, {
3627
3713
  open: r,
3628
3714
  hideHeader: !0,
3629
3715
  title: i,
3630
- onClose: m,
3631
- className: "lx-confirm",
3716
+ onClose: S,
3717
+ staticBackdrop: g,
3718
+ className: "wui-confirm",
3632
3719
  footer: /* @__PURE__ */ n("div", {
3633
- className: "lx-confirm-actions",
3634
- children: [/* @__PURE__ */ t(Q, {
3720
+ className: "wui-confirm-actions",
3721
+ children: [/* @__PURE__ */ t(Qe, {
3635
3722
  variant: "secondary",
3636
- onClick: m,
3723
+ disabled: h,
3724
+ onClick: S,
3637
3725
  children: c
3638
- }), /* @__PURE__ */ t(Q, {
3639
- variant: u ? "danger" : "primary",
3640
- disabled: v,
3726
+ }), /* @__PURE__ */ t(Qe, {
3727
+ variant: l ? "danger" : "primary",
3728
+ disabled: b,
3729
+ loading: h,
3641
3730
  onClick: p,
3642
3731
  children: s
3643
3732
  })]
3644
3733
  }),
3645
3734
  children: /* @__PURE__ */ n("div", {
3646
- className: "lx-confirm-content",
3735
+ className: "wui-confirm-content",
3647
3736
  children: [
3648
- y && /* @__PURE__ */ t("span", {
3649
- className: "lx-confirm-icon",
3650
- children: /* @__PURE__ */ t(y, { size: 104 })
3737
+ x && /* @__PURE__ */ t("span", {
3738
+ className: "wui-confirm-icon",
3739
+ children: /* @__PURE__ */ t(x, { size: 104 })
3651
3740
  }),
3652
3741
  /* @__PURE__ */ t("h3", {
3653
- className: "lx-confirm-title",
3742
+ className: "wui-confirm-title",
3654
3743
  tabIndex: -1,
3655
3744
  "data-autofocus": !0,
3656
3745
  children: i
3657
3746
  }),
3658
3747
  o && /* @__PURE__ */ t("p", {
3659
- className: "lx-confirm-msg",
3748
+ className: "wui-confirm-msg",
3660
3749
  children: o
3661
3750
  }),
3662
- f && /* @__PURE__ */ t(at, {
3751
+ f && /* @__PURE__ */ t(ct, {
3663
3752
  fieldClassName: "mt-3 mb-0 w-100 text-start",
3664
3753
  label: /* @__PURE__ */ n(e, { children: [
3665
3754
  "Type ",
3666
3755
  /* @__PURE__ */ t("strong", { children: f }),
3667
3756
  " to confirm"
3668
3757
  ] }),
3669
- value: g,
3670
- onChange: (e) => _(e.target.value),
3671
- "aria-label": `Type ${f} to confirm`
3758
+ value: v,
3759
+ onChange: (e) => y(e.target.value),
3760
+ "aria-label": `Type ${f} to confirm`,
3761
+ disabled: h
3672
3762
  })
3673
3763
  ]
3674
3764
  })
@@ -3676,8 +3766,8 @@ function lt({ open: r, title: i, message: o, confirmLabel: s = "Confirm", cancel
3676
3766
  }
3677
3767
  //#endregion
3678
3768
  //#region src/components/AppSkeleton.jsx
3679
- function ut({ width: e = "100%", height: n = 14, radius: r = 6, className: i = "", style: a, ...o }) {
3680
- return T("AppSkeleton", o), /* @__PURE__ */ t("span", {
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", {
3681
3771
  className: `skeleton${i ? ` ${i}` : ""}`,
3682
3772
  "aria-hidden": "true",
3683
3773
  style: {
@@ -3685,10 +3775,11 @@ function ut({ width: e = "100%", height: n = 14, radius: r = 6, className: i = "
3685
3775
  height: n,
3686
3776
  borderRadius: r,
3687
3777
  ...a
3688
- }
3778
+ },
3779
+ ...o
3689
3780
  });
3690
3781
  }
3691
- var dt = [
3782
+ var ht = [
3692
3783
  "r0",
3693
3784
  "r1",
3694
3785
  "r2",
@@ -3697,7 +3788,7 @@ var dt = [
3697
3788
  "r5",
3698
3789
  "r6",
3699
3790
  "r7"
3700
- ], ft = [
3791
+ ], gt = [
3701
3792
  "c0",
3702
3793
  "c1",
3703
3794
  "c2",
@@ -3707,17 +3798,17 @@ var dt = [
3707
3798
  "c6",
3708
3799
  "c7"
3709
3800
  ];
3710
- function pt({ rows: e = 4, cols: n = 5 }) {
3711
- return dt.slice(0, e).map((e) => /* @__PURE__ */ t("tr", { children: ft.slice(0, n).map((e, n) => /* @__PURE__ */ t("td", { children: /* @__PURE__ */ t(ut, {
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, {
3712
3803
  width: n === 0 ? "70%" : "50%",
3713
3804
  height: 12
3714
3805
  }) }, e)) }, e));
3715
3806
  }
3716
3807
  //#endregion
3717
3808
  //#region src/components/AppSelectMini.jsx
3718
- function mt({ value: e, onChange: n, options: r = [], placeholder: i = "Select...", name: o, ariaLabel: s, id: l, disabled: u, size: d, icon: f, prefix: p, className: m, ...h }) {
3719
- T("AppSelectMini", h);
3720
- let g = c(null);
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);
3811
+ let g = l(null);
3721
3812
  return a(() => {
3722
3813
  g.current && (g.current.options = r.map((e) => ({
3723
3814
  value: e.value,
@@ -3739,7 +3830,7 @@ function mt({ value: e, onChange: n, options: r = [], placeholder: i = "Select..
3739
3830
  ref: g,
3740
3831
  name: o,
3741
3832
  compact: "",
3742
- id: l,
3833
+ id: c,
3743
3834
  placeholder: i,
3744
3835
  "aria-label": s,
3745
3836
  size: d || void 0,
@@ -3749,19 +3840,19 @@ function mt({ value: e, onChange: n, options: r = [], placeholder: i = "Select..
3749
3840
  }
3750
3841
  //#endregion
3751
3842
  //#region src/components/AppTablePagination.jsx
3752
- var ht = [
3843
+ var yt = [
3753
3844
  5,
3754
3845
  10,
3755
3846
  25,
3756
3847
  50
3757
3848
  ];
3758
- function gt({ page: e, totalPages: r, pageSize: i, total: a, firstRow: o, lastRow: s, onPageChange: c, onPageSizeChange: l, pageSizes: u = ht, ...d }) {
3759
- return T("AppTablePagination", d), /* @__PURE__ */ n("div", {
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", {
3760
3851
  className: "table-pagination",
3761
3852
  children: [
3762
3853
  /* @__PURE__ */ n("span", {
3763
3854
  className: "tpg-rows",
3764
- children: ["Rows per page:", /* @__PURE__ */ t(mt, {
3855
+ children: ["Rows per page:", /* @__PURE__ */ t(vt, {
3765
3856
  value: i,
3766
3857
  onChange: (e) => l(Number(e)),
3767
3858
  ariaLabel: "Rows per page",
@@ -3789,7 +3880,7 @@ function gt({ page: e, totalPages: r, pageSize: i, total: a, firstRow: o, lastRo
3789
3880
  onClick: () => c(Math.max(1, e - 1)),
3790
3881
  disabled: e <= 1,
3791
3882
  "aria-label": "Previous page",
3792
- children: /* @__PURE__ */ t(O, {
3883
+ children: /* @__PURE__ */ t(k, {
3793
3884
  name: "arrow-left",
3794
3885
  size: 18
3795
3886
  })
@@ -3799,7 +3890,7 @@ function gt({ page: e, totalPages: r, pageSize: i, total: a, firstRow: o, lastRo
3799
3890
  onClick: () => c(Math.min(r, e + 1)),
3800
3891
  disabled: e >= r,
3801
3892
  "aria-label": "Next page",
3802
- children: /* @__PURE__ */ t(O, {
3893
+ children: /* @__PURE__ */ t(k, {
3803
3894
  name: "arrow-right",
3804
3895
  size: 18
3805
3896
  })
@@ -3810,15 +3901,15 @@ function gt({ page: e, totalPages: r, pageSize: i, total: a, firstRow: o, lastRo
3810
3901
  }
3811
3902
  //#endregion
3812
3903
  //#region src/components/AppDataTable.jsx
3813
- function _t(e) {
3814
- return e === "end" ? "lx-cell-end" : e === "num" ? "num" : e === "center" ? "text-center" : "";
3904
+ function xt(e) {
3905
+ return e === "end" ? "wui-cell-end" : e === "num" ? "num" : e === "center" ? "text-center" : "";
3815
3906
  }
3816
- function vt(e) {
3817
- return e == null || e === "" ? "—" : e;
3907
+ function St(e) {
3908
+ return e == null || e === "" ? "—" : typeof e == "boolean" ? String(e) : e;
3818
3909
  }
3819
- function yt({ 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 }) {
3820
- T("AppDataTable", S);
3821
- let C = Math.max(1, r.length + +!!p + +!!v), w = v && i ? i.reduce((e, t) => e + +!!y?.has(a(t)), 0) : 0, E = v && i && i.length > 0 && w === i.length, D = w > 0 && !E, k = (e) => {
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) => {
3822
3913
  e && (e.indeterminate = D);
3823
3914
  }, A = d !== void 0 && f > 0 ? d : u;
3824
3915
  return /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("div", {
@@ -3828,12 +3919,12 @@ function yt({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
3828
3919
  "aria-label": g,
3829
3920
  children: [/* @__PURE__ */ t("thead", { children: /* @__PURE__ */ n("tr", { children: [
3830
3921
  v && /* @__PURE__ */ t("th", {
3831
- className: "lx-select-cell",
3922
+ className: "wui-select-cell",
3832
3923
  children: /* @__PURE__ */ t("input", {
3833
- ref: k,
3924
+ ref: O,
3834
3925
  type: "checkbox",
3835
- className: "lx-check",
3836
- checked: E,
3926
+ className: "wui-check",
3927
+ checked: T,
3837
3928
  onChange: (e) => x?.(e.target.checked),
3838
3929
  "aria-label": "Select all rows"
3839
3930
  })
@@ -3841,7 +3932,7 @@ function yt({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
3841
3932
  r.map((e, r) => {
3842
3933
  let i = !!(e.sortable && s), a = o && o.key === e.key;
3843
3934
  return /* @__PURE__ */ n("th", {
3844
- className: (i ? "sortable " : "") + (r === 0 ? "lx-name-cell " : "") + _t(e.align),
3935
+ className: (i ? "sortable " : "") + (r === 0 ? "wui-name-cell " : "") + xt(e.align),
3845
3936
  style: e.width ? { width: e.width } : void 0,
3846
3937
  tabIndex: i ? 0 : void 0,
3847
3938
  "aria-sort": a ? o.dir === "asc" ? "ascending" : "descending" : i ? "none" : void 0,
@@ -3851,7 +3942,7 @@ function yt({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
3851
3942
  } : void 0,
3852
3943
  children: [e.label, i && /* @__PURE__ */ t("span", {
3853
3944
  className: "sort-icon",
3854
- children: /* @__PURE__ */ t(O, {
3945
+ children: /* @__PURE__ */ t(k, {
3855
3946
  name: "chevrons-up-down",
3856
3947
  size: 14
3857
3948
  })
@@ -3859,50 +3950,50 @@ function yt({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
3859
3950
  }, e.key);
3860
3951
  }),
3861
3952
  p && (m ? /* @__PURE__ */ t("th", {
3862
- className: "lx-cell-end",
3953
+ className: "wui-cell-end",
3863
3954
  children: m
3864
3955
  }) : /* @__PURE__ */ t("th", {
3865
- className: "lx-cell-end",
3956
+ className: "wui-cell-end",
3866
3957
  children: /* @__PURE__ */ t("span", {
3867
3958
  className: "visually-hidden",
3868
3959
  children: "Actions"
3869
3960
  })
3870
3961
  }))
3871
- ] }) }), /* @__PURE__ */ t("tbody", { children: c ? /* @__PURE__ */ t(pt, {
3962
+ ] }) }), /* @__PURE__ */ t("tbody", { children: c ? /* @__PURE__ */ t(_t, {
3872
3963
  rows: l,
3873
3964
  cols: C
3874
- }) : i?.length ? i.map((e) => {
3875
- let i = a(e);
3965
+ }) : i?.length ? i.map((e, i) => {
3966
+ let o = a(e, i);
3876
3967
  return /* @__PURE__ */ n("tr", {
3877
- className: v && y?.has(i) ? "is-selected" : void 0,
3968
+ className: v && y?.has(o) ? "is-selected" : void 0,
3878
3969
  children: [
3879
3970
  v && /* @__PURE__ */ t("td", {
3880
- className: "lx-select-cell",
3971
+ className: "wui-select-cell",
3881
3972
  children: /* @__PURE__ */ t("input", {
3882
3973
  type: "checkbox",
3883
- className: "lx-check",
3884
- checked: y?.has(i) || !1,
3885
- onChange: () => b?.(i),
3974
+ className: "wui-check",
3975
+ checked: y?.has(o) || !1,
3976
+ onChange: () => b?.(o),
3886
3977
  "aria-label": "Select row"
3887
3978
  })
3888
3979
  }),
3889
3980
  r.map((n, r) => /* @__PURE__ */ t("td", {
3890
- className: (r === 0 ? "lx-name-cell " : "") + _t(n.align) + (n.cellClassName ? ` ${n.cellClassName}` : ""),
3891
- children: n.render ? n.render(e) : vt(e[n.key])
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])
3892
3983
  }, n.key)),
3893
3984
  p && /* @__PURE__ */ t("td", { children: /* @__PURE__ */ t("div", {
3894
3985
  className: "u-row-actions",
3895
3986
  children: p(e)
3896
3987
  }) })
3897
3988
  ]
3898
- }, i);
3989
+ }, o);
3899
3990
  }) : /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
3900
3991
  colSpan: C,
3901
- className: "lx-table-empty",
3992
+ className: "wui-table-empty",
3902
3993
  children: A
3903
3994
  }) }) })]
3904
3995
  })
3905
- }), h && !c && h.total > 0 && /* @__PURE__ */ t(gt, {
3996
+ }), h && !c && h.total > 0 && /* @__PURE__ */ t(bt, {
3906
3997
  page: h.page,
3907
3998
  totalPages: h.totalPages,
3908
3999
  pageSize: h.pageSize,
@@ -3915,9 +4006,9 @@ function yt({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
3915
4006
  }
3916
4007
  //#endregion
3917
4008
  //#region src/components/AppDatePicker.jsx
3918
- function bt({ value: e, onChange: r, label: i, required: s = !1, hint: l, error: u, name: d, min: f, max: p, placeholder: m = "Enter Date", disabled: h, size: g, firstDay: _, id: v, ariaLabel: y, className: b = "", ...x }) {
3919
- T("AppDatePicker", x);
3920
- let S = c(null), C = o(), w = v || d || C;
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);
4011
+ let S = l(null), C = o(), w = v || d || C;
3921
4012
  a(() => {
3922
4013
  let t = S.current;
3923
4014
  t && t.value !== (e ?? "") && (t.value = e ?? "");
@@ -3927,7 +4018,7 @@ function bt({ value: e, onChange: r, label: i, required: s = !1, hint: l, error:
3927
4018
  let t = () => r?.(e.value);
3928
4019
  return e.addEventListener("change", t), () => e.removeEventListener("change", t);
3929
4020
  }, [r]);
3930
- let E = !i && !u && !l, D = /* @__PURE__ */ t("wui-datepicker", {
4021
+ let T = !i && !u && !c, D = /* @__PURE__ */ t("wui-datepicker", {
3931
4022
  ref: S,
3932
4023
  id: w,
3933
4024
  name: d,
@@ -3940,9 +4031,9 @@ function bt({ value: e, onChange: r, label: i, required: s = !1, hint: l, error:
3940
4031
  "aria-invalid": u ? "true" : void 0,
3941
4032
  disabled: h ? "" : void 0,
3942
4033
  required: s ? "" : void 0,
3943
- className: E && b || void 0
4034
+ className: T && b || void 0
3944
4035
  });
3945
- return E ? D : /* @__PURE__ */ n("div", {
4036
+ return T ? D : /* @__PURE__ */ n("div", {
3946
4037
  className: `field${b ? ` ${b}` : ""}`,
3947
4038
  children: [
3948
4039
  i && /* @__PURE__ */ n("label", {
@@ -3959,18 +4050,18 @@ function bt({ value: e, onChange: r, label: i, required: s = !1, hint: l, error:
3959
4050
  className: "field-error",
3960
4051
  children: u
3961
4052
  }),
3962
- !u && l && /* @__PURE__ */ t("div", {
4053
+ !u && c && /* @__PURE__ */ t("div", {
3963
4054
  className: "field-hint",
3964
- children: l
4055
+ children: c
3965
4056
  })
3966
4057
  ]
3967
4058
  });
3968
4059
  }
3969
4060
  //#endregion
3970
4061
  //#region src/components/AppDateRangePicker.jsx
3971
- function xt({ start: e, end: r, onChange: i, label: s, required: l = !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 }) {
3972
- T("AppDateRangePicker", C);
3973
- let w = c(null), E = o(), D = b || f || E;
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;
3974
4065
  a(() => {
3975
4066
  let t = w.current;
3976
4067
  t && t.value.start !== (e ?? "") && t.setAttribute("start", e ?? "");
@@ -3996,7 +4087,7 @@ function xt({ start: e, end: r, onChange: i, label: s, required: l = !1, hint: u
3996
4087
  "aria-label": x,
3997
4088
  "aria-invalid": d ? "true" : void 0,
3998
4089
  disabled: _ ? "" : void 0,
3999
- required: l ? "" : void 0,
4090
+ required: c ? "" : void 0,
4000
4091
  className: O && S || void 0
4001
4092
  });
4002
4093
  return O ? k : /* @__PURE__ */ n("div", {
@@ -4005,7 +4096,7 @@ function xt({ start: e, end: r, onChange: i, label: s, required: l = !1, hint: u
4005
4096
  s && /* @__PURE__ */ n("label", {
4006
4097
  className: "label",
4007
4098
  htmlFor: D,
4008
- children: [s, l && /* @__PURE__ */ t("span", {
4099
+ children: [s, c && /* @__PURE__ */ t("span", {
4009
4100
  className: "required",
4010
4101
  "aria-hidden": "true",
4011
4102
  children: "*"
@@ -4025,7 +4116,7 @@ function xt({ start: e, end: r, onChange: i, label: s, required: l = !1, hint: u
4025
4116
  }
4026
4117
  //#endregion
4027
4118
  //#region src/components/AppDropdown.jsx
4028
- var St = r(function({ icon: e, iconSize: n = 20, btnClassName: r = "topbar-icon-btn", label: i, align: a = "end", "aria-label": o, className: s, ...c }, l) {
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) {
4029
4120
  return /* @__PURE__ */ t("button", {
4030
4121
  ref: l,
4031
4122
  type: "button",
@@ -4033,26 +4124,27 @@ var St = r(function({ icon: e, iconSize: n = 20, btnClassName: r = "topbar-icon-
4033
4124
  title: i,
4034
4125
  "aria-label": o,
4035
4126
  ...c,
4036
- children: /* @__PURE__ */ t(O, {
4127
+ children: /* @__PURE__ */ t(k, {
4037
4128
  name: e,
4038
4129
  size: n
4039
4130
  })
4040
4131
  });
4041
4132
  });
4042
- function Ct({ icon: e, iconSize: r, toggleClassName: i = "topbar-icon-btn", label: a, ariaLabel: o, align: s = "end", items: c = [], menuClassName: l = "", linkComponent: u, ...d }) {
4043
- return T("AppDropdown", d), /* @__PURE__ */ n(_, {
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, {
4044
4135
  align: s,
4045
- children: [/* @__PURE__ */ t(_.Toggle, {
4046
- as: St,
4136
+ children: [/* @__PURE__ */ t(v.Toggle, {
4137
+ as: Et,
4047
4138
  icon: e,
4048
4139
  iconSize: r,
4049
4140
  btnClassName: i,
4050
4141
  title: a,
4051
4142
  "aria-label": o
4052
- }), /* @__PURE__ */ t(_.Menu, {
4143
+ }), /* @__PURE__ */ t(v.Menu, {
4053
4144
  className: l,
4054
4145
  renderOnMount: !0,
4055
4146
  children: c.map((e) => {
4147
+ if (e.divider) return /* @__PURE__ */ t(v.Divider, {}, e.key);
4056
4148
  let r = e.to ? u ? {
4057
4149
  as: u,
4058
4150
  to: e.to
@@ -4063,14 +4155,14 @@ function Ct({ icon: e, iconSize: r, toggleClassName: i = "topbar-icon-btn", labe
4063
4155
  as: "button",
4064
4156
  type: "button"
4065
4157
  };
4066
- return /* @__PURE__ */ n(_.Item, {
4158
+ return /* @__PURE__ */ n(v.Item, {
4067
4159
  ...r,
4068
4160
  onClick: e.onClick,
4069
4161
  className: e.danger ? "danger" : void 0,
4070
4162
  children: [e.image ? /* @__PURE__ */ t("img", {
4071
4163
  src: e.image,
4072
4164
  alt: ""
4073
- }) : e.icon && /* @__PURE__ */ t(O, {
4165
+ }) : e.icon && /* @__PURE__ */ t(k, {
4074
4166
  name: e.icon,
4075
4167
  size: 16
4076
4168
  }), e.label]
@@ -4081,8 +4173,8 @@ function Ct({ icon: e, iconSize: r, toggleClassName: i = "topbar-icon-btn", labe
4081
4173
  }
4082
4174
  //#endregion
4083
4175
  //#region src/components/AppEmptyState.jsx
4084
- function wt({ icon: e, iconSize: r = 24, size: i = "md", title: a, text: o, action: s, className: c = "", style: l, ...u }) {
4085
- return T("AppEmptyState", u), /* @__PURE__ */ n("div", {
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", {
4086
4178
  className: [
4087
4179
  "empty-state",
4088
4180
  i === "sm" ? "empty-state-sm" : "",
@@ -4092,7 +4184,7 @@ function wt({ icon: e, iconSize: r = 24, size: i = "md", title: a, text: o, acti
4092
4184
  children: [
4093
4185
  e ? /* @__PURE__ */ t("div", {
4094
4186
  className: "empty-state-icon",
4095
- children: /* @__PURE__ */ t(O, {
4187
+ children: /* @__PURE__ */ t(k, {
4096
4188
  name: e,
4097
4189
  size: r
4098
4190
  })
@@ -4114,33 +4206,33 @@ function wt({ icon: e, iconSize: r = 24, size: i = "md", title: a, text: o, acti
4114
4206
  }
4115
4207
  //#endregion
4116
4208
  //#region src/components/AppFileAttachment.jsx
4117
- function Tt({ label: r = "Attachment", value: i, name: s, onChange: c, accept: u = Ie, maxSizeMb: d = 5, optional: f = !1, error: p, id: m, ...h }) {
4118
- T("AppFileAttachment", h);
4119
- let g = o(), _ = m || s || g, [v, y] = l(null), [b, x] = l("");
4120
- a(() => {
4121
- if (i instanceof File) {
4122
- let e = URL.createObjectURL(i);
4123
- return y(e), () => URL.revokeObjectURL(e);
4124
- }
4125
- y(i?.url || null);
4126
- }, [i]);
4127
- function S(e) {
4128
- let t = e.target.files?.[0];
4129
- if (e.target.value = "", !t) return;
4130
- let n = He(t, {
4131
- accept: u,
4132
- maxSizeMb: d
4133
- });
4134
- if (n) {
4135
- x(n);
4136
- return;
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]);
4212
+ function w(e) {
4213
+ let t = Array.from(e.target.files || []);
4214
+ if (e.target.value = "", !t.length) return;
4215
+ let n = [], r = "";
4216
+ for (let e of t) {
4217
+ let t = We(e, {
4218
+ accept: l,
4219
+ maxSizeMb: d
4220
+ });
4221
+ if (t) {
4222
+ r ||= t;
4223
+ continue;
4224
+ }
4225
+ n.push(e);
4137
4226
  }
4138
- x(""), c(t);
4227
+ 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)))));
4230
+ } else s(n[0]);
4139
4231
  }
4140
- function C() {
4141
- x(""), c(null);
4232
+ function T(e) {
4233
+ y(""), s(c ? b.filter((t, n) => n !== e) : null);
4142
4234
  }
4143
- let w = i instanceof File ? i.name : i?.name, E = i instanceof File ? `${(i.size / 1024).toFixed(0)} KB` : null, D = p || b;
4235
+ let D = p || v, O = c || b.length === 0, A = x ? "image" : "file", j = c ? `Add ${A}s` : `Add ${x ? "an" : "a"} ${A}`;
4144
4236
  return /* @__PURE__ */ n("div", {
4145
4237
  className: "field",
4146
4238
  children: [
@@ -4152,41 +4244,14 @@ function Tt({ label: r = "Attachment", value: i, name: s, onChange: c, accept: u
4152
4244
  children: " (optional)"
4153
4245
  })]
4154
4246
  }),
4155
- i ? /* @__PURE__ */ n("div", {
4156
- className: "attach-preview",
4157
- children: [/* @__PURE__ */ n("div", {
4158
- className: "attach-figure",
4159
- children: [/* @__PURE__ */ t("img", {
4160
- src: v,
4161
- alt: w
4162
- }), /* @__PURE__ */ t("button", {
4163
- type: "button",
4164
- className: "attach-remove",
4165
- "aria-label": "Remove attachment",
4166
- onClick: C,
4167
- children: /* @__PURE__ */ t(O, {
4168
- name: "x",
4169
- size: 18
4170
- })
4171
- })]
4172
- }), /* @__PURE__ */ n("div", {
4173
- className: "attach-meta",
4174
- children: [/* @__PURE__ */ t("div", {
4175
- className: "attach-name",
4176
- children: w
4177
- }), E && /* @__PURE__ */ t("div", {
4178
- className: "attach-size",
4179
- children: E
4180
- })]
4181
- })]
4182
- }) : /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ n("label", {
4247
+ O && /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ n("label", {
4183
4248
  className: "attach-drop",
4184
4249
  htmlFor: _,
4185
4250
  children: [
4186
4251
  /* @__PURE__ */ t("span", {
4187
4252
  className: "attach-drop-icon",
4188
- children: /* @__PURE__ */ t(O, {
4189
- name: "image",
4253
+ children: /* @__PURE__ */ t(k, {
4254
+ name: x ? "image" : "file-text",
4190
4255
  size: 18
4191
4256
  })
4192
4257
  }),
@@ -4194,11 +4259,12 @@ function Tt({ label: r = "Attachment", value: i, name: s, onChange: c, accept: u
4194
4259
  className: "attach-drop-copy",
4195
4260
  children: [/* @__PURE__ */ t("span", {
4196
4261
  className: "attach-drop-title",
4197
- children: "Add an image"
4262
+ children: j
4198
4263
  }), /* @__PURE__ */ n("span", {
4199
4264
  className: "attach-drop-hint",
4200
4265
  children: [
4201
- "PNG, JPG or WEBP, up to ",
4266
+ He(l),
4267
+ ", up to ",
4202
4268
  d,
4203
4269
  " MB"
4204
4270
  ]
@@ -4212,11 +4278,24 @@ function Tt({ label: r = "Attachment", value: i, name: s, onChange: c, accept: u
4212
4278
  }), /* @__PURE__ */ t("input", {
4213
4279
  id: _,
4214
4280
  type: "file",
4215
- className: "visually-hidden-input",
4216
- name: s,
4217
- accept: u,
4218
- onChange: S
4281
+ hidden: !0,
4282
+ name: a,
4283
+ accept: l,
4284
+ multiple: c || void 0,
4285
+ onChange: w
4219
4286
  })] }),
4287
+ C ? /* @__PURE__ */ t(Nt, {
4288
+ item: b[0],
4289
+ isImage: !0,
4290
+ onRemove: () => T(0)
4291
+ }) : b.length > 0 && /* @__PURE__ */ t("div", {
4292
+ className: "attach-list",
4293
+ children: b.map((e, n) => /* @__PURE__ */ t(Pt, {
4294
+ item: e,
4295
+ isImage: S(e),
4296
+ onRemove: () => T(n)
4297
+ }, At(e)))
4298
+ }),
4220
4299
  D && /* @__PURE__ */ t("div", {
4221
4300
  className: "field-error",
4222
4301
  children: D
@@ -4224,83 +4303,184 @@ function Tt({ label: r = "Attachment", value: i, name: s, onChange: c, accept: u
4224
4303
  ]
4225
4304
  });
4226
4305
  }
4227
- //#endregion
4228
- //#region src/components/toast.js
4229
- var Et = /* @__PURE__ */ new Set([
4230
- "success",
4231
- "info",
4232
- "warning",
4233
- "error"
4234
- ]);
4235
- function Dt(e, t = "success") {
4236
- let n = Et.has(t) ? t : "success";
4237
- v[n](e, { toastId: `${n}:${e}` });
4306
+ function At(e) {
4307
+ return e instanceof File ? `${e.name}:${e.size}` : e?.url || e?.name || "item";
4308
+ }
4309
+ function jt(e) {
4310
+ return e instanceof File ? e.name : e?.name;
4311
+ }
4312
+ function Mt(e, t) {
4313
+ let [n, r] = u(null);
4314
+ return a(() => {
4315
+ if (!t) {
4316
+ r(null);
4317
+ return;
4318
+ }
4319
+ if (e instanceof File) {
4320
+ let t = URL.createObjectURL(e);
4321
+ return r(t), () => URL.revokeObjectURL(t);
4322
+ }
4323
+ r(e?.url || null);
4324
+ }, [e, t]), n;
4325
+ }
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;
4328
+ return /* @__PURE__ */ n("div", {
4329
+ className: "attach-preview",
4330
+ children: [/* @__PURE__ */ n("div", {
4331
+ className: "attach-figure",
4332
+ children: [/* @__PURE__ */ t("img", {
4333
+ src: a,
4334
+ alt: o
4335
+ }), /* @__PURE__ */ t("button", {
4336
+ type: "button",
4337
+ className: "attach-remove",
4338
+ "aria-label": "Remove attachment",
4339
+ onClick: i,
4340
+ children: /* @__PURE__ */ t(k, {
4341
+ name: "x",
4342
+ size: 18
4343
+ })
4344
+ })]
4345
+ }), /* @__PURE__ */ n("div", {
4346
+ className: "attach-meta",
4347
+ children: [/* @__PURE__ */ t("div", {
4348
+ className: "attach-name",
4349
+ children: o
4350
+ }), s && /* @__PURE__ */ t("div", {
4351
+ className: "attach-size",
4352
+ children: s
4353
+ })]
4354
+ })]
4355
+ });
4238
4356
  }
4239
- function Ot(e) {
4240
- v.error(e, { toastId: `error:${e}` });
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;
4359
+ return /* @__PURE__ */ n("div", {
4360
+ className: "attach-item",
4361
+ children: [
4362
+ /* @__PURE__ */ t("span", {
4363
+ className: "attach-item-media",
4364
+ children: a ? /* @__PURE__ */ t("img", {
4365
+ src: a,
4366
+ alt: o
4367
+ }) : /* @__PURE__ */ t(k, {
4368
+ name: "file-text",
4369
+ size: 18
4370
+ })
4371
+ }),
4372
+ /* @__PURE__ */ n("span", {
4373
+ className: "attach-item-info",
4374
+ children: [/* @__PURE__ */ t("span", {
4375
+ className: "attach-name",
4376
+ children: o
4377
+ }), s && /* @__PURE__ */ t("span", {
4378
+ className: "attach-size",
4379
+ children: s
4380
+ })]
4381
+ }),
4382
+ /* @__PURE__ */ t("button", {
4383
+ type: "button",
4384
+ className: "attach-item-remove",
4385
+ "aria-label": `Remove ${o || "attachment"}`,
4386
+ onClick: i,
4387
+ children: /* @__PURE__ */ t(k, {
4388
+ name: "x",
4389
+ size: 16
4390
+ })
4391
+ })
4392
+ ]
4393
+ });
4241
4394
  }
4242
4395
  //#endregion
4243
4396
  //#region src/components/AppFilePicker.jsx
4244
- function kt({ label: e, value: r, name: i, onPick: s, accept: u = ".jpg,.jpeg,.png", maxSizeMb: d = 5, required: f, error: p, ...m }) {
4245
- T("AppFilePicker", m);
4246
- let [h, g] = l(null), [_, v] = l(!1), y = c(null), b = o(), x = i || b;
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;
4247
4400
  a(() => {
4248
- if (r instanceof File) {
4401
+ if (!c && r instanceof File) {
4249
4402
  let e = URL.createObjectURL(r);
4250
- return g(e), () => URL.revokeObjectURL(e);
4403
+ return y(e), () => URL.revokeObjectURL(e);
4251
4404
  }
4252
- g(null);
4253
- }, [r]);
4254
- let S = r?.url || h, C = (e) => {
4255
- let t = He(e, {
4256
- accept: u,
4257
- maxSizeMb: d
4405
+ y(null);
4406
+ }, [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, {
4409
+ accept: f,
4410
+ maxSizeMb: p
4258
4411
  });
4259
- return t ? (Dt(t, "error"), !1) : (s(e), !0);
4260
- }, w = (e) => {
4412
+ return t ? (C(t), !1) : (C(""), s(e), !0);
4413
+ }, ee = (e) => {
4414
+ let t = Array.from(e || []);
4415
+ if (!t.length) return;
4416
+ let n = Array.isArray(r) ? r : r ? [r] : [], i = new Set(n.map(It)), a = "", o = [];
4417
+ for (let e of t) {
4418
+ let t = We(e, {
4419
+ accept: f,
4420
+ maxSizeMb: p
4421
+ });
4422
+ if (t) {
4423
+ a ||= t;
4424
+ continue;
4425
+ }
4426
+ i.has(It(e)) || (i.add(It(e)), o.push(e));
4427
+ }
4428
+ let c = n.concat(o);
4429
+ d && c.length > d && (c = c.slice(0, d), a ||= `Up to ${d} files.`), C(a), s(c);
4430
+ }, P = (e) => {
4431
+ if (c) {
4432
+ ee(e.target.files);
4433
+ return;
4434
+ }
4261
4435
  let t = e.target.files?.[0] || null;
4262
- t && (C(t) || (e.target.value = ""));
4263
- }, E = (e) => {
4264
- e.preventDefault(), v(!1);
4436
+ t && (N(t) || (e.target.value = ""));
4437
+ }, F = (e) => {
4438
+ if (e.preventDefault(), x(!1), c) {
4439
+ ee(e.dataTransfer.files);
4440
+ return;
4441
+ }
4265
4442
  let t = e.dataTransfer.files?.[0];
4266
- t && C(t);
4267
- }, D = () => y.current?.click(), k = /* @__PURE__ */ t("input", {
4268
- id: x,
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,
4269
4448
  name: i,
4270
- ref: y,
4449
+ ref: w,
4271
4450
  type: "file",
4272
- accept: u,
4451
+ accept: f,
4452
+ multiple: c || void 0,
4273
4453
  hidden: !0,
4274
4454
  onClick: (e) => {
4275
4455
  e.currentTarget.value = "";
4276
4456
  },
4277
- onChange: w
4457
+ onChange: P
4278
4458
  });
4279
4459
  return /* @__PURE__ */ n("div", {
4280
- className: "field",
4460
+ className: `field${g ? ` ${g}` : ""}`,
4281
4461
  children: [
4282
4462
  /* @__PURE__ */ n("label", {
4283
4463
  className: "label",
4284
- htmlFor: x,
4285
- children: [e, f && /* @__PURE__ */ t(Z, {})]
4464
+ htmlFor: D,
4465
+ children: [e, m && /* @__PURE__ */ t($, {})]
4286
4466
  }),
4287
- S ? /* @__PURE__ */ n("div", {
4288
- className: `file-preview${p ? " error" : ""}`,
4467
+ A ? /* @__PURE__ */ n("div", {
4468
+ className: `file-preview${j ? " error" : ""}`,
4289
4469
  children: [
4290
4470
  /* @__PURE__ */ n("button", {
4291
4471
  type: "button",
4292
4472
  className: "file-preview-open",
4293
4473
  "aria-label": `Change ${e}`,
4294
- onClick: D,
4474
+ onClick: L,
4295
4475
  children: [/* @__PURE__ */ t("img", {
4296
- src: S,
4476
+ src: A,
4297
4477
  alt: `${e} preview`,
4298
4478
  className: "file-preview-img"
4299
4479
  }), /* @__PURE__ */ t("span", {
4300
4480
  className: "file-preview-overlay",
4301
4481
  children: /* @__PURE__ */ n("span", {
4302
4482
  className: "file-preview-cta",
4303
- children: [/* @__PURE__ */ t(O, {
4483
+ children: [/* @__PURE__ */ t(k, {
4304
4484
  name: "image",
4305
4485
  size: 16
4306
4486
  }), " Change image"]
@@ -4313,67 +4493,132 @@ function kt({ label: e, value: r, name: i, onPick: s, accept: u = ".jpg,.jpeg,.p
4313
4493
  "aria-label": `Remove ${e}`,
4314
4494
  title: "Remove image",
4315
4495
  onClick: () => s(null),
4316
- children: /* @__PURE__ */ t(O, {
4496
+ children: /* @__PURE__ */ t(k, {
4317
4497
  name: "x",
4318
4498
  size: 16
4319
4499
  })
4320
4500
  }),
4321
- k
4501
+ R
4322
4502
  ]
4323
4503
  }) : /* @__PURE__ */ n("div", {
4324
- className: `file-input file-input-tall${_ ? " dragging" : ""}${p ? " error" : ""}`,
4504
+ className: `file-input file-input-tall${b ? " dragging" : ""}${j ? " error" : ""}${c && O.length > 0 ? " has-files" : ""}`,
4325
4505
  onDragOver: (e) => {
4326
- e.preventDefault(), _ || v(!0);
4506
+ e.preventDefault(), b || x(!0);
4327
4507
  },
4328
4508
  onDragLeave: (e) => {
4329
- e.preventDefault(), v(!1);
4509
+ e.preventDefault(), x(!1);
4330
4510
  },
4331
- onDrop: E,
4332
- children: [/* @__PURE__ */ n("label", {
4333
- htmlFor: x,
4334
- className: "file-input-zone-label",
4335
- children: [
4336
- /* @__PURE__ */ t("span", {
4337
- className: "file-input-icon",
4338
- children: /* @__PURE__ */ t(O, {
4339
- name: "upload",
4340
- size: 24
4511
+ onDrop: F,
4512
+ children: [
4513
+ /* @__PURE__ */ n("label", {
4514
+ htmlFor: D,
4515
+ className: "file-input-zone-label",
4516
+ children: [
4517
+ /* @__PURE__ */ t("span", {
4518
+ className: "file-input-icon",
4519
+ children: /* @__PURE__ */ t(k, {
4520
+ name: "upload",
4521
+ size: 24
4522
+ })
4523
+ }),
4524
+ /* @__PURE__ */ n("span", {
4525
+ className: "file-input-title",
4526
+ children: [/* @__PURE__ */ t("span", {
4527
+ className: "browse",
4528
+ children: "Click to upload"
4529
+ }), " or drag & drop"]
4530
+ }),
4531
+ /* @__PURE__ */ n("span", {
4532
+ className: "file-input-text",
4533
+ children: [
4534
+ He(f),
4535
+ " · up to ",
4536
+ p,
4537
+ " MB"
4538
+ ]
4341
4539
  })
4342
- }),
4343
- /* @__PURE__ */ n("span", {
4344
- className: "file-input-title",
4345
- children: [/* @__PURE__ */ t("span", {
4346
- className: "browse",
4347
- children: "Click to upload"
4348
- }), " or drag & drop"]
4349
- }),
4350
- /* @__PURE__ */ n("span", {
4351
- className: "file-input-text",
4352
- children: [
4353
- "JPG, JPEG or PNG · up to ",
4354
- d,
4355
- " MB"
4356
- ]
4357
- })
4358
- ]
4359
- }), k]
4540
+ ]
4541
+ }),
4542
+ R,
4543
+ c && O.length > 0 && /* @__PURE__ */ t("div", {
4544
+ className: "attach-list",
4545
+ children: O.map((e, n) => /* @__PURE__ */ t(Lt, {
4546
+ item: e,
4547
+ isImage: e instanceof File ? Be(e) : M || Be(e),
4548
+ onRemove: () => I(n)
4549
+ }, It(e)))
4550
+ })
4551
+ ]
4360
4552
  }),
4361
- p && /* @__PURE__ */ t("div", {
4553
+ j && /* @__PURE__ */ t("div", {
4362
4554
  className: "field-error",
4363
- children: p
4555
+ children: j
4556
+ })
4557
+ ]
4558
+ });
4559
+ }
4560
+ function It(e) {
4561
+ return e instanceof File ? `${e.name}:${e.size}` : e?.url || e?.name || "item";
4562
+ }
4563
+ function Lt({ item: e, isImage: r, onRemove: i }) {
4564
+ let [o, s] = u(null);
4565
+ a(() => {
4566
+ if (!r) {
4567
+ s(null);
4568
+ return;
4569
+ }
4570
+ if (e instanceof File) {
4571
+ let t = URL.createObjectURL(e);
4572
+ return s(t), () => URL.revokeObjectURL(t);
4573
+ }
4574
+ s(e?.url || null);
4575
+ }, [e, r]);
4576
+ let c = e instanceof File ? e.name : e?.name, l = e instanceof File ? `${(e.size / 1024).toFixed(0)} KB` : null;
4577
+ return /* @__PURE__ */ n("div", {
4578
+ className: "attach-item",
4579
+ children: [
4580
+ /* @__PURE__ */ t("span", {
4581
+ className: "attach-item-media",
4582
+ children: o ? /* @__PURE__ */ t("img", {
4583
+ src: o,
4584
+ alt: c
4585
+ }) : /* @__PURE__ */ t(k, {
4586
+ name: "file-text",
4587
+ size: 18
4588
+ })
4589
+ }),
4590
+ /* @__PURE__ */ n("span", {
4591
+ className: "attach-item-info",
4592
+ children: [/* @__PURE__ */ t("span", {
4593
+ className: "attach-name",
4594
+ children: c
4595
+ }), l && /* @__PURE__ */ t("span", {
4596
+ className: "attach-size",
4597
+ children: l
4598
+ })]
4599
+ }),
4600
+ /* @__PURE__ */ t("button", {
4601
+ type: "button",
4602
+ className: "attach-item-remove",
4603
+ "aria-label": `Remove ${c || "file"}`,
4604
+ onClick: i,
4605
+ children: /* @__PURE__ */ t(k, {
4606
+ name: "x",
4607
+ size: 16
4608
+ })
4364
4609
  })
4365
4610
  ]
4366
4611
  });
4367
4612
  }
4368
4613
  //#endregion
4369
4614
  //#region src/components/AppInfoList.jsx
4370
- function At({ items: r = [], className: i = "", ...a }) {
4371
- return T("AppInfoList", a), /* @__PURE__ */ t("div", {
4615
+ function Rt({ items: r = [], className: i = "", ...a }) {
4616
+ return E("AppInfoList", a), /* @__PURE__ */ t("div", {
4372
4617
  className: `info-list${i ? ` ${i}` : ""}`,
4373
4618
  children: r.map((r, i) => {
4374
4619
  let a = /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("span", {
4375
4620
  className: "info-icon",
4376
- children: /* @__PURE__ */ t(O, {
4621
+ children: /* @__PURE__ */ t(k, {
4377
4622
  name: r.icon,
4378
4623
  size: 16
4379
4624
  })
@@ -4400,15 +4645,15 @@ function At({ items: r = [], className: i = "", ...a }) {
4400
4645
  }
4401
4646
  //#endregion
4402
4647
  //#region src/components/AppKpiTile.jsx
4403
- function jt({ label: e, value: r, icon: i, delta: a, deltaDirection: o = "flat", inline: s = !1, className: c = "", ...l }) {
4404
- T("AppKpiTile", l);
4648
+ function zt({ label: e, value: r, icon: i, delta: a, deltaDirection: o = "flat", inline: s = !1, className: c = "", ...l }) {
4649
+ E("AppKpiTile", l);
4405
4650
  let u = `kpi${s ? " kpi-inline" : ""}${c ? ` ${c}` : ""}`, d = o === "up" ? "arrow-up" : o === "down" ? "arrow-down" : null;
4406
4651
  return /* @__PURE__ */ n("div", {
4407
4652
  className: u,
4408
4653
  children: [
4409
4654
  i && /* @__PURE__ */ t("span", {
4410
4655
  className: "kpi-icon",
4411
- children: /* @__PURE__ */ t(O, {
4656
+ children: /* @__PURE__ */ t(k, {
4412
4657
  name: i,
4413
4658
  size: 20
4414
4659
  })
@@ -4423,7 +4668,7 @@ function jt({ label: e, value: r, icon: i, delta: a, deltaDirection: o = "flat",
4423
4668
  }),
4424
4669
  a && /* @__PURE__ */ n("div", {
4425
4670
  className: `kpi-delta${o === "flat" ? "" : ` ${o}`}`,
4426
- children: [d && /* @__PURE__ */ t(O, {
4671
+ children: [d && /* @__PURE__ */ t(k, {
4427
4672
  name: d,
4428
4673
  size: 13
4429
4674
  }), a]
@@ -4433,70 +4678,140 @@ function jt({ label: e, value: r, icon: i, delta: a, deltaDirection: o = "flat",
4433
4678
  }
4434
4679
  //#endregion
4435
4680
  //#region src/components/AppLogoPicker.jsx
4436
- function Mt({ value: r, fallback: i, name: a, onPick: o, loading: s = !1, accept: l = "image/png,image/jpeg", maxSizeMb: u = 5, overlayIcon: d = "image", overlayLabel: f = "Update photo", ariaLabel: p = "Upload photo", ...m }) {
4437
- T("AppLogoPicker", m);
4438
- let h = c(null);
4439
- return /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("button", {
4440
- type: "button",
4441
- className: "set-uploader",
4442
- "aria-busy": s || void 0,
4443
- disabled: s,
4444
- onClick: () => {
4445
- s || h.current?.click();
4446
- },
4447
- "aria-label": p,
4448
- children: /* @__PURE__ */ n("span", {
4449
- className: "set-uploader-ring",
4450
- children: [r ? /* @__PURE__ */ t("img", {
4451
- className: "set-uploader-img",
4452
- src: r,
4453
- alt: ""
4454
- }) : /* @__PURE__ */ t("span", {
4455
- className: "set-uploader-logo",
4456
- children: i
4457
- }), s ? /* @__PURE__ */ t("span", {
4458
- className: "set-uploader-overlay is-loading",
4459
- "aria-hidden": "true",
4460
- children: /* @__PURE__ */ t(O, {
4461
- name: "refresh-cw",
4462
- size: 22,
4463
- className: "lx-spin"
4464
- })
4465
- }) : /* @__PURE__ */ n("span", {
4466
- className: "set-uploader-overlay",
4467
- children: [/* @__PURE__ */ t(O, {
4468
- name: d,
4469
- size: 22
4470
- }), /* @__PURE__ */ t("span", { children: f })]
4471
- })]
4472
- })
4473
- }), /* @__PURE__ */ t("input", {
4474
- ref: h,
4475
- type: "file",
4476
- name: a,
4477
- hidden: !0,
4478
- accept: l,
4479
- onChange: (e) => {
4480
- let t = e.target.files?.[0];
4481
- if (e.target.value = "", !t) return;
4482
- let n = He(t, {
4483
- accept: l,
4484
- maxSizeMb: u
4485
- });
4486
- if (n) {
4487
- Dt(n, "error");
4488
- return;
4489
- }
4490
- o(t);
4491
- },
4492
- disabled: s
4493
- })] });
4681
+ var Bt = {
4682
+ sm: 72,
4683
+ md: 120,
4684
+ lg: 160
4685
+ };
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);
4691
+ }, [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, {
4696
+ accept: p,
4697
+ maxSizeMb: m
4698
+ });
4699
+ if (t) {
4700
+ P(t);
4701
+ return;
4702
+ }
4703
+ P(""), I(!1), N(URL.createObjectURL(e)), s(e);
4704
+ }, re = (e) => {
4705
+ let t = e.target.files?.[0];
4706
+ e.target.value = "", t && ne(t);
4707
+ }, U = (e) => {
4708
+ if (e.preventDefault(), R(!1), z) return;
4709
+ 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 = [
4714
+ "set-uploader",
4715
+ S === "avatar" ? "set-uploader--avatar" : "",
4716
+ w === "rounded" ? "set-uploader--rounded" : w === "square" ? "set-uploader--square" : "",
4717
+ L && "is-dragging"
4718
+ ].filter(Boolean).join(" ");
4719
+ return /* @__PURE__ */ n("div", {
4720
+ className: `field set-uploader-field${T ? ` ${T}` : ""}`,
4721
+ children: [
4722
+ v && /* @__PURE__ */ n("label", {
4723
+ className: "label",
4724
+ htmlFor: j,
4725
+ children: [v, x && /* @__PURE__ */ t($, {})]
4726
+ }),
4727
+ /* @__PURE__ */ n("div", {
4728
+ className: "set-uploader-shell",
4729
+ children: [
4730
+ /* @__PURE__ */ t("button", {
4731
+ type: "button",
4732
+ className: q,
4733
+ style: { "--wui-logo-size": `${W}px` },
4734
+ "aria-busy": d || void 0,
4735
+ disabled: z,
4736
+ onClick: H,
4737
+ "aria-label": _,
4738
+ onDragOver: (e) => {
4739
+ e.preventDefault(), !z && !L && R(!0);
4740
+ },
4741
+ onDragLeave: (e) => {
4742
+ e.preventDefault(), R(!1);
4743
+ },
4744
+ onDrop: U,
4745
+ children: /* @__PURE__ */ n("span", {
4746
+ className: "set-uploader-ring",
4747
+ children: [B ? /* @__PURE__ */ t("img", {
4748
+ className: "set-uploader-img",
4749
+ src: B,
4750
+ alt: "",
4751
+ onError: () => I(!0)
4752
+ }) : /* @__PURE__ */ t("span", {
4753
+ className: "set-uploader-logo",
4754
+ children: r || S === "avatar" && /* @__PURE__ */ t(k, {
4755
+ name: "person",
4756
+ size: K
4757
+ })
4758
+ }), d ? /* @__PURE__ */ t("span", {
4759
+ className: "set-uploader-overlay is-loading",
4760
+ "aria-hidden": "true",
4761
+ children: /* @__PURE__ */ t(k, {
4762
+ name: "refresh-cw",
4763
+ size: G,
4764
+ className: "wui-spin"
4765
+ })
4766
+ }) : !f && /* @__PURE__ */ n("span", {
4767
+ className: "set-uploader-overlay",
4768
+ children: [/* @__PURE__ */ t(k, {
4769
+ name: h,
4770
+ size: G
4771
+ }), /* @__PURE__ */ t("span", { children: g })]
4772
+ })]
4773
+ })
4774
+ }),
4775
+ /* @__PURE__ */ t("button", {
4776
+ type: "button",
4777
+ className: "set-uploader-remove",
4778
+ hidden: !te,
4779
+ "aria-label": "Remove photo",
4780
+ title: "Remove photo",
4781
+ onClick: ie,
4782
+ children: /* @__PURE__ */ t(k, {
4783
+ name: "x",
4784
+ size: 14
4785
+ })
4786
+ }),
4787
+ /* @__PURE__ */ t("input", {
4788
+ id: j,
4789
+ ref: O,
4790
+ type: "file",
4791
+ name: i,
4792
+ hidden: !0,
4793
+ accept: p,
4794
+ onChange: re,
4795
+ disabled: z
4796
+ })
4797
+ ]
4798
+ }),
4799
+ y && !V && /* @__PURE__ */ t("div", {
4800
+ className: "set-uploader-hint",
4801
+ children: y
4802
+ }),
4803
+ V && /* @__PURE__ */ t("div", {
4804
+ className: "field-error",
4805
+ children: V
4806
+ })
4807
+ ]
4808
+ });
4494
4809
  }
4495
4810
  //#endregion
4496
4811
  //#region src/components/AppMultiSelect.jsx
4497
- function Nt({ values: e, onChange: r, options: i, placeholder: o = "Select…", searchPlaceholder: s = "Search…", searchable: l = !0, disabled: u = !1, icon: d, size: f, collapseChips: p = !1, name: m, label: h, error: g, hint: _, required: v = !1, fieldClassName: y = "", ...b }) {
4498
- T("AppMultiSelect", b);
4499
- let x = c(null);
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);
4814
+ let x = l(null);
4500
4815
  return a(() => {
4501
4816
  let e = x.current;
4502
4817
  e && (e.options = i || []);
@@ -4516,7 +4831,7 @@ function Nt({ values: e, onChange: r, options: i, placeholder: o = "Select…",
4516
4831
  h && /* @__PURE__ */ n("label", {
4517
4832
  className: "label",
4518
4833
  htmlFor: m,
4519
- children: [h, v && /* @__PURE__ */ t(Z, {})]
4834
+ children: [h, v && /* @__PURE__ */ t($, {})]
4520
4835
  }),
4521
4836
  /* @__PURE__ */ t("wui-multiselect", {
4522
4837
  "aria-label": typeof h == "string" ? h : void 0,
@@ -4528,7 +4843,7 @@ function Nt({ values: e, onChange: r, options: i, placeholder: o = "Select…",
4528
4843
  icon: d || void 0,
4529
4844
  size: f || void 0,
4530
4845
  "collapse-chips": p ? "" : void 0,
4531
- searchable: l ? "" : void 0,
4846
+ searchable: c ? "" : void 0,
4532
4847
  disabled: u ? "" : void 0,
4533
4848
  required: v ? "" : void 0
4534
4849
  }),
@@ -4544,9 +4859,9 @@ function Nt({ values: e, onChange: r, options: i, placeholder: o = "Select…",
4544
4859
  }
4545
4860
  //#endregion
4546
4861
  //#region src/components/AppOtpInput.jsx
4547
- var Pt = r(function({ value: e, onChange: r, onComplete: i, length: s = 6, mode: l = "numeric", label: u, required: d = !1, hint: f, error: p, disabled: m = !1, name: h, id: g, className: _ = "", ...v }, y) {
4548
- T("AppOtpInput", v);
4549
- let b = c(null), x = o(), S = g || h || x, C = (e) => {
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);
4864
+ let b = l(null), x = o(), S = g || h || x, C = (e) => {
4550
4865
  b.current = e, typeof y == "function" ? y(e) : y && (y.current = e);
4551
4866
  };
4552
4867
  a(() => {
@@ -4566,7 +4881,7 @@ var Pt = r(function({ value: e, onChange: r, onComplete: i, length: s = 6, mode:
4566
4881
  id: S,
4567
4882
  name: h,
4568
4883
  length: String(s),
4569
- mode: l,
4884
+ mode: c,
4570
4885
  "aria-invalid": p ? "true" : void 0,
4571
4886
  disabled: m ? "" : void 0,
4572
4887
  required: d ? "" : void 0
@@ -4597,8 +4912,8 @@ var Pt = r(function({ value: e, onChange: r, onComplete: i, length: s = 6, mode:
4597
4912
  });
4598
4913
  //#endregion
4599
4914
  //#region src/components/AppPageHeader.jsx
4600
- function Ft({ title: e, subtitle: r, actions: i, className: a = "", ...o }) {
4601
- return T("AppPageHeader", o), /* @__PURE__ */ n("div", {
4915
+ function Wt({ title: e, subtitle: r, actions: i, className: a = "", ...o }) {
4916
+ return E("AppPageHeader", o), /* @__PURE__ */ n("div", {
4602
4917
  className: `page-header${i ? " d-flex align-items-end justify-content-between" : ""}${a ? ` ${a}` : ""}`,
4603
4918
  children: [/* @__PURE__ */ n("div", { children: [/* @__PURE__ */ t("div", {
4604
4919
  className: "page-title",
@@ -4614,9 +4929,9 @@ function Ft({ title: e, subtitle: r, actions: i, className: a = "", ...o }) {
4614
4929
  }
4615
4930
  //#endregion
4616
4931
  //#region src/components/AppPhoneNumberInput.jsx
4617
- function It({ value: e, onChange: r, country: i, disabled: o = !1, name: s, label: l = "Phone number", placeholder: u, required: d = !1, error: f, fieldClassName: p = "", ...m }) {
4618
- T("AppPhoneNumberInput", m);
4619
- let h = c(null);
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);
4934
+ let h = l(null);
4620
4935
  return a(() => {
4621
4936
  let t = h.current;
4622
4937
  t && t.value !== (e ?? "") && (t.value = e ?? "");
@@ -4628,10 +4943,10 @@ function It({ value: e, onChange: r, country: i, disabled: o = !1, name: s, labe
4628
4943
  }, [r]), /* @__PURE__ */ n("div", {
4629
4944
  className: `field app-phone-number-input${p ? ` ${p}` : ""}`,
4630
4945
  children: [
4631
- l && /* @__PURE__ */ n("label", {
4946
+ c && /* @__PURE__ */ n("label", {
4632
4947
  className: "label",
4633
4948
  htmlFor: s,
4634
- children: [l, d && /* @__PURE__ */ t(Z, {})]
4949
+ children: [c, d && /* @__PURE__ */ t($, {})]
4635
4950
  }),
4636
4951
  /* @__PURE__ */ t("wui-phone", {
4637
4952
  ref: h,
@@ -4649,8 +4964,8 @@ function It({ value: e, onChange: r, country: i, disabled: o = !1, name: s, labe
4649
4964
  }
4650
4965
  //#endregion
4651
4966
  //#region src/components/AppPricingCard.jsx
4652
- function Lt({ 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 }) {
4653
- return T("AppPricingCard", f), /* @__PURE__ */ n("div", {
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", {
4654
4969
  className: [
4655
4970
  "plan-card",
4656
4971
  c ? "featured" : "",
@@ -4685,7 +5000,7 @@ function Lt({ name: e, price: r, unit: i, tagline: a, features: o = [], cta: s,
4685
5000
  className: r ? void 0 : "excluded",
4686
5001
  children: [/* @__PURE__ */ t("span", {
4687
5002
  className: "plan-feature-icon",
4688
- children: /* @__PURE__ */ t(O, {
5003
+ children: /* @__PURE__ */ t(k, {
4689
5004
  name: r ? "check" : "x",
4690
5005
  size: 16
4691
5006
  })
@@ -4702,29 +5017,40 @@ function Lt({ name: e, price: r, unit: i, tagline: a, features: o = [], cta: s,
4702
5017
  }
4703
5018
  //#endregion
4704
5019
  //#region src/components/AppRadio.jsx
4705
- var Rt = r(function({ label: e, id: r, name: i, className: a = "", ...s }, c) {
4706
- T("AppRadio", s);
4707
- let l = o(), u = r || l;
5020
+ var qt = r(function({ label: e, id: r, name: i, error: a, hint: s, className: c = "", ...l }, u) {
5021
+ E("AppRadio", l);
5022
+ let d = o(), f = r || d;
4708
5023
  return /* @__PURE__ */ n("div", {
4709
- className: `form-check${a ? ` ${a}` : ""}`,
4710
- children: [/* @__PURE__ */ t("input", {
4711
- type: "radio",
4712
- className: "form-check-input",
4713
- id: u,
4714
- name: i,
4715
- ref: c,
4716
- ...s
4717
- }), e != null && /* @__PURE__ */ t("label", {
4718
- className: "form-check-label",
4719
- htmlFor: u,
4720
- children: e
4721
- })]
5024
+ className: `form-check${c ? ` ${c}` : ""}`,
5025
+ children: [
5026
+ /* @__PURE__ */ t("input", {
5027
+ type: "radio",
5028
+ className: "form-check-input",
5029
+ id: f,
5030
+ name: i,
5031
+ ref: u,
5032
+ "aria-invalid": a ? "true" : "false",
5033
+ ...l
5034
+ }),
5035
+ e != null && /* @__PURE__ */ t("label", {
5036
+ className: "form-check-label",
5037
+ htmlFor: f,
5038
+ children: e
5039
+ }),
5040
+ a ? /* @__PURE__ */ t("div", {
5041
+ className: "field-error",
5042
+ children: a
5043
+ }) : s ? /* @__PURE__ */ t("div", {
5044
+ className: "field-hint",
5045
+ children: s
5046
+ }) : null
5047
+ ]
4722
5048
  });
4723
5049
  });
4724
5050
  //#endregion
4725
5051
  //#region src/components/AppRepeater.jsx
4726
- function zt({ 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 }) {
4727
- T("AppRepeater", p);
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);
4728
5054
  let m = typeof u == "number" && e.length >= u, h = !!a && e.length > l;
4729
5055
  return /* @__PURE__ */ n("div", {
4730
5056
  className: `repeater${f ? ` ${f}` : ""}`,
@@ -4744,7 +5070,7 @@ function zt({ rows: e = [], renderRow: r, onAdd: i, onRemove: a, addLabel: o = "
4744
5070
  className: "repeater-body",
4745
5071
  children: r(e, i)
4746
5072
  }),
4747
- h && /* @__PURE__ */ t(k, {
5073
+ h && /* @__PURE__ */ t(A, {
4748
5074
  icon: "trash-2",
4749
5075
  label: `${s} ${i + 1}`,
4750
5076
  danger: !0,
@@ -4753,7 +5079,7 @@ function zt({ rows: e = [], renderRow: r, onAdd: i, onRemove: a, addLabel: o = "
4753
5079
  })
4754
5080
  ]
4755
5081
  }, e.id ?? i)),
4756
- /* @__PURE__ */ t(Q, {
5082
+ /* @__PURE__ */ t(Qe, {
4757
5083
  variant: "secondary",
4758
5084
  size: "sm",
4759
5085
  leftIcon: "plus",
@@ -4767,11 +5093,11 @@ function zt({ rows: e = [], renderRow: r, onAdd: i, onRemove: a, addLabel: o = "
4767
5093
  }
4768
5094
  //#endregion
4769
5095
  //#region src/components/AppResourceCard.jsx
4770
- function Bt({ icon: r, title: i, text: a, href: o, external: s = !1, linkComponent: c, className: l = "", ...u }) {
4771
- T("AppResourceCard", u);
5096
+ function Yt({ icon: r, title: i, text: a, href: o, external: s = !1, linkComponent: c, className: l = "", ...u }) {
5097
+ E("AppResourceCard", u);
4772
5098
  let d = /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("span", {
4773
5099
  className: "res-card-icon",
4774
- children: /* @__PURE__ */ t(O, {
5100
+ children: /* @__PURE__ */ t(k, {
4775
5101
  name: r,
4776
5102
  size: 18
4777
5103
  })
@@ -4799,8 +5125,8 @@ function Bt({ icon: r, title: i, text: a, href: o, external: s = !1, linkCompone
4799
5125
  }
4800
5126
  //#endregion
4801
5127
  //#region src/components/AppSearch.jsx
4802
- function Vt({ value: e, onValueChange: r, placeholder: i = "Search…", ariaLabel: a, iconSize: o = 18, size: s, loading: c = !1, disabled: l = !1, className: u = "", ...d }) {
4803
- return T("AppSearch", d), /* @__PURE__ */ n("div", {
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", {
4804
5130
  className: [
4805
5131
  "search-wrap",
4806
5132
  e ? "has-value" : "",
@@ -4813,12 +5139,12 @@ function Vt({ value: e, onValueChange: r, placeholder: i = "Search…", ariaLabe
4813
5139
  className: "search-spinner",
4814
5140
  "aria-hidden": "true"
4815
5141
  }),
4816
- /* @__PURE__ */ t(O, {
5142
+ /* @__PURE__ */ t(k, {
4817
5143
  name: "search",
4818
5144
  size: o,
4819
5145
  className: "search-icon"
4820
5146
  }),
4821
- /* @__PURE__ */ t(m.Control, {
5147
+ /* @__PURE__ */ t(h.Control, {
4822
5148
  type: "search",
4823
5149
  className: "input search-input",
4824
5150
  placeholder: i,
@@ -4833,7 +5159,7 @@ function Vt({ value: e, onValueChange: r, placeholder: i = "Search…", ariaLabe
4833
5159
  className: "search-clear",
4834
5160
  "aria-label": "Clear search",
4835
5161
  onClick: () => r(""),
4836
- children: /* @__PURE__ */ t(O, {
5162
+ children: /* @__PURE__ */ t(k, {
4837
5163
  name: "x",
4838
5164
  size: 16
4839
5165
  })
@@ -4843,9 +5169,9 @@ function Vt({ value: e, onValueChange: r, placeholder: i = "Search…", ariaLabe
4843
5169
  }
4844
5170
  //#endregion
4845
5171
  //#region src/components/AppSegmented.jsx
4846
- function Ht({ options: e = [], value: r, onChange: i, label: l, name: u, size: d = "md", fullWidth: f = !1, disabled: p = !1, className: m = "", ...h }) {
4847
- T("AppSegmented", h);
4848
- let g = o(), _ = u || g, v = c(null), y = c(null), b = [
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);
5174
+ let g = o(), _ = u || g, v = l(null), y = l(null), b = [
4849
5175
  "segmented",
4850
5176
  d === "sm" ? "segmented-sm" : d === "lg" ? "segmented-lg" : "",
4851
5177
  f ? "segmented-full" : "",
@@ -4879,7 +5205,7 @@ function Ht({ options: e = [], value: r, onChange: i, label: l, name: u, size: d
4879
5205
  ref: v,
4880
5206
  className: b,
4881
5207
  role: "radiogroup",
4882
- "aria-label": l,
5208
+ "aria-label": c,
4883
5209
  "aria-disabled": p || void 0,
4884
5210
  children: [/* @__PURE__ */ t("span", {
4885
5211
  className: "segmented-thumb",
@@ -4897,7 +5223,7 @@ function Ht({ options: e = [], value: r, onChange: i, label: l, name: u, size: d
4897
5223
  disabled: p || e.disabled,
4898
5224
  onChange: () => i?.(e.value)
4899
5225
  }),
4900
- e.icon && /* @__PURE__ */ t(O, {
5226
+ e.icon && /* @__PURE__ */ t(k, {
4901
5227
  name: e.icon,
4902
5228
  size: 13
4903
5229
  }),
@@ -4908,41 +5234,43 @@ function Ht({ options: e = [], value: r, onChange: i, label: l, name: u, size: d
4908
5234
  }
4909
5235
  //#endregion
4910
5236
  //#region src/components/AppSelect.jsx
4911
- var Ut = (e) => e == null ? "" : e.label ?? e.text ?? "";
4912
- function Wt({ value: e, onChange: r, options: i = [], placeholder: o = "Select...", searchPlaceholder: s = "Search...", searchable: l = !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 = "", ...E }) {
4913
- T("AppSelect", E);
4914
- let D = c(null);
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);
5240
+ let A = l(null);
4915
5241
  a(() => {
4916
- D.current && (D.current.options = i.map((e) => ({
5242
+ A.current && (A.current.options = i.map((e) => ({
4917
5243
  value: e.value,
4918
- label: Ut(e),
5244
+ label: Qt(e),
4919
5245
  icon: e.icon
4920
5246
  })));
4921
5247
  }, [i]), a(() => {
4922
- let t = D.current;
5248
+ let t = A.current;
4923
5249
  t && String(t.value ?? "") !== String(e ?? "") && (t.value = e ?? "");
4924
5250
  }, [e]), a(() => {
4925
- let e = D.current;
5251
+ let e = A.current;
4926
5252
  if (!e) return;
4927
5253
  let t = () => r?.(e.value);
4928
5254
  return e.addEventListener("change", t), () => e.removeEventListener("change", t);
4929
5255
  }, [r]);
4930
- let O = /* @__PURE__ */ t("wui-select", {
4931
- "aria-label": typeof h == "string" ? h : void 0,
4932
- ref: D,
5256
+ let j = /* @__PURE__ */ t("wui-select", {
5257
+ "aria-label": T || (typeof h == "string" ? h : void 0),
5258
+ "aria-labelledby": D || void 0,
5259
+ "aria-describedby": O || void 0,
5260
+ ref: A,
4933
5261
  id: x || S,
4934
5262
  name: S,
4935
- placeholder: p ? " " : o,
5263
+ placeholder: p && h ? " " : o,
4936
5264
  "search-placeholder": s,
4937
- searchable: l ? "" : void 0,
5265
+ searchable: c ? "" : void 0,
4938
5266
  clearable: u ? "" : void 0,
4939
5267
  size: d || void 0,
4940
5268
  icon: f || void 0,
4941
5269
  disabled: m ? "" : void 0,
4942
5270
  required: g ? "" : void 0
4943
5271
  });
4944
- if (!h && !_ && !v) return O;
4945
- let k = x || S, A = p && h;
5272
+ if (!h && !_ && !v) return j;
5273
+ let M = x || S, N = p && h;
4946
5274
  return /* @__PURE__ */ n("div", {
4947
5275
  className: [
4948
5276
  "field",
@@ -4950,26 +5278,26 @@ function Wt({ value: e, onChange: r, options: i = [], placeholder: o = "Select..
4950
5278
  w
4951
5279
  ].filter(Boolean).join(" "),
4952
5280
  children: [
4953
- h && !A && /* @__PURE__ */ n("label", {
5281
+ h && !N && /* @__PURE__ */ n("label", {
4954
5282
  className: "label",
4955
- htmlFor: k,
5283
+ htmlFor: M,
4956
5284
  children: [
4957
5285
  h,
4958
- g && /* @__PURE__ */ t(Z, {}),
4959
- y && /* @__PURE__ */ t(it, {
5286
+ g && /* @__PURE__ */ t($, {}),
5287
+ y && /* @__PURE__ */ t(st, {
4960
5288
  label: b,
4961
5289
  children: y
4962
5290
  })
4963
5291
  ]
4964
5292
  }),
4965
- A ? /* @__PURE__ */ n("div", {
5293
+ N ? /* @__PURE__ */ n("div", {
4966
5294
  className: "field-float",
4967
- children: [O, /* @__PURE__ */ n("label", {
5295
+ children: [j, /* @__PURE__ */ n("label", {
4968
5296
  className: "float-label",
4969
- htmlFor: k,
4970
- children: [h, g && /* @__PURE__ */ t(Z, {})]
5297
+ htmlFor: M,
5298
+ children: [h, g && /* @__PURE__ */ t($, {})]
4971
5299
  })]
4972
- }) : O,
5300
+ }) : j,
4973
5301
  _ ? /* @__PURE__ */ t("div", {
4974
5302
  className: "field-error",
4975
5303
  children: _
@@ -4982,9 +5310,9 @@ function Wt({ value: e, onChange: r, options: i = [], placeholder: o = "Select..
4982
5310
  }
4983
5311
  //#endregion
4984
5312
  //#region src/components/AppShell.jsx
4985
- function Gt({ groups: e = [], brand: r, sidebarFooter: i, topbarStart: o, topbarEnd: s, footer: c, children: u, collapsed: d, onCollapsedChange: f, noSidebar: p = !1, navLabel: m = "Main navigation", linkComponent: h, className: g = "", ..._ }) {
4986
- T("AppShell", _);
4987
- let [v, y] = l(!1), [b, x] = l(!1), [S, C] = l(!1), w = d ?? v;
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", _);
5315
+ let [v, y] = u(!1), [b, x] = u(!1), [S, C] = u(!1), w = d ?? v;
4988
5316
  return a(() => {
4989
5317
  let e = () => C(window.scrollY > 4);
4990
5318
  return e(), window.addEventListener("scroll", e, { passive: !0 }), () => window.removeEventListener("scroll", e);
@@ -5018,7 +5346,7 @@ function Gt({ groups: e = [], brand: r, sidebarFooter: i, topbarStart: o, topbar
5018
5346
  children: [e.label && /* @__PURE__ */ t("div", {
5019
5347
  className: "app-nav-group-label",
5020
5348
  children: e.label
5021
- }), e.items.map((e) => /* @__PURE__ */ t(Kt, {
5349
+ }), e.items.map((e) => /* @__PURE__ */ t(tn, {
5022
5350
  item: e,
5023
5351
  linkComponent: h,
5024
5352
  onNavigate: () => x(!1)
@@ -5040,7 +5368,7 @@ function Gt({ groups: e = [], brand: r, sidebarFooter: i, topbarStart: o, topbar
5040
5368
  },
5041
5369
  "aria-label": w ? "Expand navigation" : "Collapse navigation",
5042
5370
  "aria-expanded": !w,
5043
- children: /* @__PURE__ */ t(O, {
5371
+ children: /* @__PURE__ */ t(k, {
5044
5372
  name: "chevron-left",
5045
5373
  size: 14
5046
5374
  })
@@ -5058,7 +5386,7 @@ function Gt({ groups: e = [], brand: r, sidebarFooter: i, topbarStart: o, topbar
5058
5386
  onClick: () => x(!0),
5059
5387
  "aria-label": "Open navigation",
5060
5388
  "aria-expanded": b,
5061
- children: /* @__PURE__ */ t(O, {
5389
+ children: /* @__PURE__ */ t(k, {
5062
5390
  name: "menu",
5063
5391
  size: 18
5064
5392
  })
@@ -5070,7 +5398,7 @@ function Gt({ groups: e = [], brand: r, sidebarFooter: i, topbarStart: o, topbar
5070
5398
  }),
5071
5399
  /* @__PURE__ */ t("main", {
5072
5400
  className: "app-content",
5073
- children: u
5401
+ children: l
5074
5402
  }),
5075
5403
  c && /* @__PURE__ */ t("footer", {
5076
5404
  className: "app-footer",
@@ -5088,11 +5416,11 @@ function Gt({ groups: e = [], brand: r, sidebarFooter: i, topbarStart: o, topbar
5088
5416
  ]
5089
5417
  });
5090
5418
  }
5091
- function Kt({ item: r, linkComponent: i, onNavigate: a }) {
5419
+ function tn({ item: r, linkComponent: i, onNavigate: a }) {
5092
5420
  let o = `app-nav-item${r.active ? " active" : ""}`, s = /* @__PURE__ */ n(e, { children: [
5093
5421
  r.icon && /* @__PURE__ */ t("span", {
5094
5422
  className: "app-nav-icon",
5095
- children: /* @__PURE__ */ t(O, {
5423
+ children: /* @__PURE__ */ t(k, {
5096
5424
  name: r.icon,
5097
5425
  size: 22
5098
5426
  })
@@ -5122,7 +5450,7 @@ function Kt({ item: r, linkComponent: i, onNavigate: a }) {
5122
5450
  }
5123
5451
  //#endregion
5124
5452
  //#region src/components/AppSidebarMenu.jsx
5125
- var qt = {
5453
+ var nn = {
5126
5454
  left: "start",
5127
5455
  right: "end",
5128
5456
  start: "start",
@@ -5130,43 +5458,46 @@ var qt = {
5130
5458
  top: "top",
5131
5459
  bottom: "bottom"
5132
5460
  };
5133
- function Jt({ show: e, onHide: r, side: i = "right", title: a, titleIcon: o, header: s, children: c, footer: l, width: u, backdrop: d = !0, scroll: f = !1, keyboard: p = !0, closeButton: m = !0, responsive: h, className: g = "", bodyClassName: _ = "", ariaLabel: v, ...b }) {
5134
- return T("AppSidebarMenu", b), /* @__PURE__ */ n(y, {
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, {
5135
5463
  show: e,
5136
5464
  onHide: r,
5137
- placement: qt[i] || "end",
5138
- backdrop: d,
5139
- scroll: f,
5140
- keyboard: p,
5141
- responsive: h,
5142
- style: u ? { "--asm-width": u } : void 0,
5143
- className: `app-sidebar-menu${g ? ` ${g}` : ""}`,
5144
- "aria-label": v || (typeof a == "string" ? a : void 0),
5465
+ placement: nn[i] || "end",
5466
+ backdrop: f,
5467
+ scroll: p,
5468
+ keyboard: m,
5469
+ responsive: g,
5470
+ style: u || d ? {
5471
+ ...u && { "--asm-width": u },
5472
+ ...d && { "--asm-max-width": d }
5473
+ } : void 0,
5474
+ className: `app-sidebar-menu${_ ? ` ${_}` : ""}`,
5475
+ "aria-label": b || (typeof a == "string" ? a : void 0),
5145
5476
  children: [
5146
- s === void 0 ? (a != null || m) && /* @__PURE__ */ n("div", {
5477
+ s === void 0 ? (a != null || h) && /* @__PURE__ */ n("div", {
5147
5478
  className: "drawer-header",
5148
5479
  children: [a != null && /* @__PURE__ */ n("div", {
5149
5480
  className: "drawer-title",
5150
5481
  children: [o && /* @__PURE__ */ t("span", {
5151
5482
  className: "drawer-title-ic",
5152
- children: /* @__PURE__ */ t(O, {
5483
+ children: /* @__PURE__ */ t(k, {
5153
5484
  name: o,
5154
5485
  size: 18
5155
5486
  })
5156
5487
  }), a]
5157
- }), m && /* @__PURE__ */ t(Q, {
5488
+ }), h && /* @__PURE__ */ t(Qe, {
5158
5489
  variant: "ghost",
5159
5490
  className: "btn-icon",
5160
5491
  onClick: r,
5161
5492
  "aria-label": "Close",
5162
- children: /* @__PURE__ */ t(O, {
5493
+ children: /* @__PURE__ */ t(k, {
5163
5494
  name: "x",
5164
5495
  size: 16
5165
5496
  })
5166
5497
  })]
5167
5498
  }) : s,
5168
5499
  /* @__PURE__ */ t(y.Body, {
5169
- className: _,
5500
+ className: v,
5170
5501
  children: c
5171
5502
  }),
5172
5503
  l && /* @__PURE__ */ t("div", {
@@ -5178,8 +5509,8 @@ function Jt({ show: e, onHide: r, side: i = "right", title: a, titleIcon: o, hea
5178
5509
  }
5179
5510
  //#endregion
5180
5511
  //#region src/components/AppSpinner.jsx
5181
- function Yt({ size: e = "md", label: n = "Loading", className: r = "", ...i }) {
5182
- return T("AppSpinner", i), /* @__PURE__ */ t("span", {
5512
+ function an({ size: e = "md", label: n = "Loading", className: r = "", ...i }) {
5513
+ return E("AppSpinner", i), /* @__PURE__ */ t("span", {
5183
5514
  className: `spinner-border${e === "sm" ? " spinner-border-sm" : ""}${r ? ` ${r}` : ""}`,
5184
5515
  role: "status",
5185
5516
  "aria-label": n
@@ -5187,8 +5518,8 @@ function Yt({ size: e = "md", label: n = "Loading", className: r = "", ...i }) {
5187
5518
  }
5188
5519
  //#endregion
5189
5520
  //#region src/components/AppSplash.jsx
5190
- function Xt({ logo: e, initials: r, text: i, label: a = "Loading", className: o = "", ...s }) {
5191
- return T("AppSplash", s), /* @__PURE__ */ t("div", {
5521
+ function on({ logo: e, initials: r, text: i, label: a = "Loading", className: o = "", ...s }) {
5522
+ return E("AppSplash", s), /* @__PURE__ */ t("div", {
5192
5523
  className: `splash${o ? ` ${o}` : ""}`,
5193
5524
  role: "status",
5194
5525
  "aria-live": "polite",
@@ -5214,22 +5545,23 @@ function Xt({ logo: e, initials: r, text: i, label: a = "Loading", className: o
5214
5545
  }
5215
5546
  //#endregion
5216
5547
  //#region src/components/AppStatusBadge.jsx
5217
- function Zt({ label: e, tone: n = "neutral", className: r = "", ...i }) {
5218
- return T("AppStatusBadge", i), e == null || e === "" ? "—" : /* @__PURE__ */ t("span", {
5548
+ function sn({ label: e, tone: n = "neutral", className: r = "", ...i }) {
5549
+ return E("AppStatusBadge", i), e == null || e === "" ? "—" : /* @__PURE__ */ t("span", {
5219
5550
  className: `status-label ${n}${r ? ` ${r}` : ""}`,
5551
+ ...i,
5220
5552
  children: e
5221
5553
  });
5222
5554
  }
5223
5555
  //#endregion
5224
5556
  //#region src/components/AppStepper.jsx
5225
- function Qt({ steps: r = [], variant: i = "steps", label: a = "Progress", linkComponent: o, className: s = "", ...c }) {
5226
- return T("AppStepper", c), /* @__PURE__ */ t("nav", {
5557
+ function cn({ steps: r = [], variant: i = "steps", label: a = "Progress", linkComponent: o, className: s = "", ...c }) {
5558
+ return E("AppStepper", c), /* @__PURE__ */ t("nav", {
5227
5559
  className: [i === "journey" ? "stepper stepper-journey" : "stepper", s].filter(Boolean).join(" "),
5228
5560
  "aria-label": a,
5229
5561
  children: r.map((a, s) => {
5230
5562
  let c = a.status || "pending", l = `step${c === "pending" ? "" : ` ${c}`}`, u = /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("span", {
5231
5563
  className: "step-circle",
5232
- children: c === "done" ? /* @__PURE__ */ t(O, {
5564
+ children: c === "done" ? /* @__PURE__ */ t(k, {
5233
5565
  name: "check",
5234
5566
  size: 14
5235
5567
  }) : s + 1
@@ -5269,34 +5601,45 @@ function Qt({ steps: r = [], variant: i = "steps", label: a = "Progress", linkCo
5269
5601
  }
5270
5602
  //#endregion
5271
5603
  //#region src/components/AppSwitch.jsx
5272
- var $t = r(function({ label: e, id: r, name: i, className: a = "", ...s }, c) {
5273
- T("AppSwitch", s);
5274
- let l = o(), u = r || i || l;
5604
+ var ln = r(function({ label: e, id: r, name: i, error: a, hint: s, className: c = "", ...l }, u) {
5605
+ E("AppSwitch", l);
5606
+ let d = o(), f = r || i || d;
5275
5607
  return /* @__PURE__ */ n("div", {
5276
- className: `form-check form-switch${a ? ` ${a}` : ""}`,
5277
- children: [/* @__PURE__ */ t("input", {
5278
- type: "checkbox",
5279
- className: "form-check-input",
5280
- id: u,
5281
- name: i,
5282
- ref: c,
5283
- ...s
5284
- }), e != null && /* @__PURE__ */ t("label", {
5285
- className: "form-check-label",
5286
- htmlFor: u,
5287
- children: e
5288
- })]
5608
+ className: `form-check form-switch${c ? ` ${c}` : ""}`,
5609
+ children: [
5610
+ /* @__PURE__ */ t("input", {
5611
+ type: "checkbox",
5612
+ className: "form-check-input",
5613
+ id: f,
5614
+ name: i,
5615
+ ref: u,
5616
+ "aria-invalid": a ? "true" : "false",
5617
+ ...l
5618
+ }),
5619
+ e != null && /* @__PURE__ */ t("label", {
5620
+ className: "form-check-label",
5621
+ htmlFor: f,
5622
+ children: e
5623
+ }),
5624
+ a ? /* @__PURE__ */ t("div", {
5625
+ className: "field-error",
5626
+ children: a
5627
+ }) : s ? /* @__PURE__ */ t("div", {
5628
+ className: "field-hint",
5629
+ children: s
5630
+ }) : null
5631
+ ]
5289
5632
  });
5290
5633
  });
5291
5634
  //#endregion
5292
5635
  //#region src/components/AppTableEmptyState.jsx
5293
- function en({ icon: e, title: r, text: i, action: a, ...o }) {
5294
- return T("AppTableEmptyState", o), /* @__PURE__ */ n("div", {
5636
+ function un({ icon: e, title: r, text: i, action: a, ...o }) {
5637
+ return E("AppTableEmptyState", o), /* @__PURE__ */ n("div", {
5295
5638
  className: "tbl-empty",
5296
5639
  children: [
5297
5640
  /* @__PURE__ */ t("span", {
5298
5641
  className: "tbl-empty-icon",
5299
- children: /* @__PURE__ */ t(O, {
5642
+ children: /* @__PURE__ */ t(k, {
5300
5643
  name: e,
5301
5644
  size: 24
5302
5645
  })
@@ -5318,35 +5661,43 @@ function en({ icon: e, title: r, text: i, action: a, ...o }) {
5318
5661
  }
5319
5662
  //#endregion
5320
5663
  //#region src/components/AppTabs.jsx
5321
- function tn({ tabs: e, value: r, onChange: i, variant: a = "underline", ariaLabel: o, className: s = "", ...l }) {
5322
- T("AppTabs", l);
5323
- let u = c(null);
5324
- function d(t) {
5664
+ function dn({ tabs: e, value: r, onChange: i, variant: a = "underline", ariaLabel: o, className: s = "", style: c, ...u }) {
5665
+ E("AppTabs", u);
5666
+ let d = l(null);
5667
+ function f(t) {
5325
5668
  let n = e.findIndex((e) => e.key === r);
5326
5669
  if (n < 0) return;
5327
- let a = null;
5328
- if (t.key === "ArrowRight" ? a = e[(n + 1) % e.length] : t.key === "ArrowLeft" ? a = e[(n - 1 + e.length) % e.length] : t.key === "Home" ? a = e[0] : t.key === "End" && (a = e[e.length - 1]), !a) return;
5329
- t.preventDefault(), i(a.key);
5330
- let o = CSS.escape(String(a.key));
5331
- u.current?.querySelector(`[data-rr-ui-event-key="${o}"]`)?.focus();
5670
+ let a = e.length, o = (t, n) => {
5671
+ for (let r = 1; r <= a; r++) {
5672
+ let i = e[((t + n * r) % a + a) % a];
5673
+ if (!i.disabled) return i;
5674
+ }
5675
+ return null;
5676
+ }, s = null;
5677
+ if (t.key === "ArrowRight" ? s = o(n, 1) : t.key === "ArrowLeft" ? s = o(n, -1) : t.key === "Home" ? s = e.find((e) => !e.disabled) ?? null : t.key === "End" && (s = [...e].reverse().find((e) => !e.disabled) ?? null), !s) return;
5678
+ t.preventDefault(), i(s.key);
5679
+ let c = CSS.escape(String(s.key));
5680
+ d.current?.querySelector(`[data-rr-ui-event-key="${c}"]`)?.focus();
5332
5681
  }
5333
5682
  return /* @__PURE__ */ t(b, {
5334
5683
  as: "div",
5335
5684
  role: "tablist",
5336
- ref: u,
5685
+ ref: d,
5337
5686
  activeKey: r,
5338
5687
  onSelect: (e) => {
5339
5688
  e != null && i(e);
5340
5689
  },
5341
- onKeyDown: d,
5690
+ onKeyDown: f,
5342
5691
  bsPrefix: "app-tabs",
5343
5692
  className: [a === "pills" ? "app-tabs-pills" : "", s].filter(Boolean).join(" "),
5693
+ style: c,
5344
5694
  "aria-label": o,
5345
5695
  children: e.map((e) => /* @__PURE__ */ n(b.Link, {
5346
5696
  as: "button",
5347
5697
  type: "button",
5348
5698
  eventKey: e.key,
5349
5699
  role: "tab",
5700
+ disabled: e.disabled,
5350
5701
  bsPrefix: "app-tab",
5351
5702
  className: e.danger ? "danger" : void 0,
5352
5703
  children: [
@@ -5362,61 +5713,64 @@ function tn({ tabs: e, value: r, onChange: i, variant: a = "underline", ariaLabe
5362
5713
  }
5363
5714
  //#endregion
5364
5715
  //#region src/components/AppTextarea.jsx
5365
- var nn = r(function({ label: e, required: r = !1, error: a, hint: o, help: l, helpLabel: u = "More information", id: d, name: f, rows: p = 4, autoGrow: h = !1, className: g = "", fieldClassName: _ = "", ...v }, y) {
5366
- T("AppTextarea", v);
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);
5367
5718
  let b = d || f, x = [
5368
5719
  "textarea",
5369
- h ? "autosize" : "",
5720
+ m ? "autosize" : "",
5370
5721
  a ? "error" : "",
5371
5722
  g
5372
- ].filter(Boolean).join(" "), S = c(null), C = (e) => {
5373
- S.current = e, typeof y == "function" ? y(e) : y && (y.current = e);
5374
- }, w = i(() => {
5375
- let e = S.current;
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) => {
5724
+ T.current = e, typeof y == "function" ? y(e) : y && (y.current = e);
5725
+ }, O = i(() => {
5726
+ let e = T.current;
5376
5727
  e && (e.style.height = "auto", e.style.height = `${e.scrollHeight}px`);
5377
5728
  }, []);
5378
5729
  s(() => {
5379
- h && w();
5730
+ m && O();
5380
5731
  }, [
5381
- h,
5382
- w,
5732
+ m,
5733
+ O,
5383
5734
  v.value
5384
5735
  ]);
5385
- let E = (e) => {
5386
- h && w(), v.onInput?.(e);
5736
+ let k = (e) => {
5737
+ m && O(), v.onInput?.(e);
5387
5738
  };
5388
- return /* @__PURE__ */ n(m.Group, {
5739
+ return /* @__PURE__ */ n(h.Group, {
5389
5740
  className: `field${_ ? ` ${_}` : ""}`,
5390
5741
  children: [
5391
- e && /* @__PURE__ */ n(m.Label, {
5742
+ e && /* @__PURE__ */ n(h.Label, {
5392
5743
  className: "label",
5393
5744
  htmlFor: b,
5394
5745
  children: [
5395
5746
  e,
5396
- r && /* @__PURE__ */ t(Z, {}),
5397
- l && /* @__PURE__ */ t(it, {
5747
+ r && /* @__PURE__ */ t($, {}),
5748
+ c && /* @__PURE__ */ t(st, {
5398
5749
  label: u,
5399
- children: l
5750
+ children: c
5400
5751
  })
5401
5752
  ]
5402
5753
  }),
5403
- /* @__PURE__ */ t(m.Control, {
5754
+ /* @__PURE__ */ t(h.Control, {
5404
5755
  as: "textarea",
5405
5756
  id: b,
5406
5757
  name: f,
5407
5758
  rows: p,
5408
5759
  className: x,
5409
5760
  "aria-invalid": a ? "true" : "false",
5761
+ "aria-describedby": w,
5410
5762
  required: r,
5411
5763
  ...v,
5412
- ref: C,
5413
- onInput: E
5764
+ ref: D,
5765
+ onInput: k
5414
5766
  }),
5415
5767
  a ? /* @__PURE__ */ t("div", {
5416
5768
  className: "field-error",
5769
+ id: S,
5417
5770
  children: a
5418
5771
  }) : o ? /* @__PURE__ */ t("div", {
5419
5772
  className: "field-hint",
5773
+ id: C,
5420
5774
  children: o
5421
5775
  }) : null
5422
5776
  ]
@@ -5424,14 +5778,14 @@ var nn = r(function({ label: e, required: r = !1, error: a, hint: o, help: l, he
5424
5778
  });
5425
5779
  //#endregion
5426
5780
  //#region src/components/AppTimeline.jsx
5427
- function rn({ items: e = [], className: r = "", ...i }) {
5428
- return T("AppTimeline", i), /* @__PURE__ */ t("ol", {
5781
+ function pn({ items: e = [], className: r = "", ...i }) {
5782
+ return E("AppTimeline", i), /* @__PURE__ */ t("ol", {
5429
5783
  className: `timeline${r ? ` ${r}` : ""}`,
5430
5784
  children: e.map((e, r) => /* @__PURE__ */ n("li", {
5431
5785
  className: `timeline-item${e.tone && e.tone !== "neutral" ? ` ${e.tone}` : ""}`,
5432
5786
  children: [/* @__PURE__ */ t("span", {
5433
5787
  className: "timeline-dot",
5434
- children: /* @__PURE__ */ t(O, {
5788
+ children: /* @__PURE__ */ t(k, {
5435
5789
  name: e.icon || "circle",
5436
5790
  size: 12
5437
5791
  })
@@ -5462,4 +5816,46 @@ function rn({ items: e = [], className: r = "", ...i }) {
5462
5816
  });
5463
5817
  }
5464
5818
  //#endregion
5465
- export { k as ActionIcon, A as AppAccordion, j as AppAlert, We as AppAutocomplete, Ke as AppAvatar, qe as AppBadge, Q as AppButton, Xe as AppCallout, Ze as AppCard, Qe as AppCheckbox, $e as AppChip, et as AppChoiceCard, tt as AppChoiceChip, nt as AppColorField, rt as AppCompareTable, lt as AppConfirmDialog, yt as AppDataTable, bt as AppDatePicker, xt as AppDateRangePicker, Ct as AppDropdown, wt as AppEmptyState, Tt as AppFileAttachment, kt as AppFilePicker, At as AppInfoList, it as AppInfoTip, at as AppInput, jt as AppKpiTile, Mt as AppLogoPicker, st as AppModal, Nt as AppMultiSelect, Pt as AppOtpInput, Ft as AppPageHeader, It as AppPhoneNumberInput, Lt as AppPricingCard, Rt as AppRadio, zt as AppRepeater, Bt as AppResourceCard, Vt as AppSearch, Ht as AppSegmented, Wt as AppSelect, mt as AppSelectMini, Gt as AppShell, Jt as AppSidebarMenu, ut as AppSkeleton, pt as AppSkeletonRows, Yt as AppSpinner, Xt as AppSplash, Zt as AppStatusBadge, Qt as AppStepper, $t as AppSwitch, en as AppTableEmptyState, gt as AppTablePagination, tn as AppTabs, nn as AppTextarea, rn as AppTimeline, O as Icon, ct as MODAL_ICONS, Z as RequiredMark, Ot as errorToast, D as iconNames, Dt as toast };
5819
+ //#region src/components/toast.js
5820
+ var mn = /* @__PURE__ */ new Set([
5821
+ "success",
5822
+ "info",
5823
+ "warning",
5824
+ "error"
5825
+ ]);
5826
+ function hn(e, t = "success") {
5827
+ let n = mn.has(t) ? t : "success";
5828
+ x[n](e, { toastId: `${n}:${e}` });
5829
+ }
5830
+ function gn(e) {
5831
+ x.error(e, { toastId: `error:${e}` });
5832
+ }
5833
+ //#endregion
5834
+ //#region src/lib/usePagination.js
5835
+ function _n(e, t = 10) {
5836
+ let [n, r] = u(1), [i, o] = u(t), s = e.length, l = Math.max(1, Math.ceil(s / i));
5837
+ a(() => {
5838
+ n > l && r(l);
5839
+ }, [n, l]);
5840
+ let d = (n - 1) * i, f = c(() => e.slice(d, d + i), [
5841
+ e,
5842
+ d,
5843
+ i
5844
+ ]);
5845
+ function p(e) {
5846
+ o(e), r(1);
5847
+ }
5848
+ return {
5849
+ page: n,
5850
+ setPage: r,
5851
+ pageSize: i,
5852
+ setPageSize: p,
5853
+ totalPages: l,
5854
+ pageRows: f,
5855
+ total: s,
5856
+ firstRow: s === 0 ? 0 : d + 1,
5857
+ lastRow: Math.min(s, d + i)
5858
+ };
5859
+ }
5860
+ //#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 };