@coolms/ui-react 0.1.0-alpha.1 → 0.1.0-alpha.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,445 +1,1261 @@
1
- import { jsx as t, jsxs as v, Fragment as S } from "react/jsx-runtime";
2
- import { useId as A, useState as k, useRef as w, useEffect as x, useLayoutEffect as B, useCallback as K } from "react";
3
- import { createPortal as C } from "react-dom";
4
- function _(...e) {
5
- return e.filter(Boolean).join(" ");
1
+ import { jsx as e, jsxs as s, Fragment as C } from "react/jsx-runtime";
2
+ import { useId as Q, useState as D, useRef as z, useEffect as W, useCallback as ie, useMemo as Me, useLayoutEffect as ye } from "react";
3
+ import { createPortal as be } from "react-dom";
4
+ function te(l, n) {
5
+ const a = { ...l };
6
+ for (const t of Object.keys(n ?? {})) {
7
+ const c = n == null ? void 0 : n[t];
8
+ c !== void 0 && (a[t] = c);
9
+ }
10
+ return a;
11
+ }
12
+ function M(...l) {
13
+ return l.filter(Boolean).join(" ");
6
14
  }
7
- function N({ name: e }) {
15
+ function F({ name: l }) {
8
16
  const n = { width: 16, height: 16, viewBox: "0 0 16 16", "aria-hidden": !0, focusable: !1 };
9
- switch (e) {
17
+ switch (l) {
10
18
  case "lock":
11
- return /* @__PURE__ */ t("svg", { ...n, className: "cms-glyph", children: /* @__PURE__ */ t("path", { fill: "currentColor", d: "M5 7V5a3 3 0 1 1 6 0v2h.5A1.5 1.5 0 0 1 13 8.5v5A1.5 1.5 0 0 1 11.5 15h-7A1.5 1.5 0 0 1 3 13.5v-5A1.5 1.5 0 0 1 4.5 7H5Zm1.5 0h3V5a1.5 1.5 0 0 0-3 0v2Z" }) });
19
+ return /* @__PURE__ */ e("svg", { ...n, className: "cms-glyph", children: /* @__PURE__ */ e("path", { fill: "currentColor", d: "M5 7V5a3 3 0 1 1 6 0v2h.5A1.5 1.5 0 0 1 13 8.5v5A1.5 1.5 0 0 1 11.5 15h-7A1.5 1.5 0 0 1 3 13.5v-5A1.5 1.5 0 0 1 4.5 7H5Zm1.5 0h3V5a1.5 1.5 0 0 0-3 0v2Z" }) });
12
20
  case "spinner":
13
- return /* @__PURE__ */ t("svg", { ...n, className: "cms-glyph cms-spinner", children: /* @__PURE__ */ t("circle", { cx: "8", cy: "8", r: "6", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeDasharray: "28", strokeDashoffset: "10" }) });
21
+ return /* @__PURE__ */ e("svg", { ...n, className: "cms-glyph cms-spinner", children: /* @__PURE__ */ e("circle", { cx: "8", cy: "8", r: "6", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeDasharray: "28", strokeDashoffset: "10" }) });
14
22
  case "back":
15
- return /* @__PURE__ */ t("svg", { ...n, className: "cms-glyph", children: /* @__PURE__ */ t("path", { fill: "currentColor", d: "M10.7 2.3a1 1 0 0 1 0 1.4L6.4 8l4.3 4.3a1 1 0 0 1-1.4 1.4l-5-5a1 1 0 0 1 0-1.4l5-5a1 1 0 0 1 1.4 0Z" }) });
23
+ return /* @__PURE__ */ e("svg", { ...n, className: "cms-glyph", children: /* @__PURE__ */ e("path", { fill: "currentColor", d: "M10.7 2.3a1 1 0 0 1 0 1.4L6.4 8l4.3 4.3a1 1 0 0 1-1.4 1.4l-5-5a1 1 0 0 1 0-1.4l5-5a1 1 0 0 1 1.4 0Z" }) });
16
24
  case "close":
17
- return /* @__PURE__ */ t("svg", { ...n, className: "cms-glyph", children: /* @__PURE__ */ t("path", { fill: "currentColor", d: "M3.3 3.3a1 1 0 0 1 1.4 0L8 6.6l3.3-3.3a1 1 0 1 1 1.4 1.4L9.4 8l3.3 3.3a1 1 0 0 1-1.4 1.4L8 9.4l-3.3 3.3a1 1 0 0 1-1.4-1.4L6.6 8 3.3 4.7a1 1 0 0 1 0-1.4Z" }) });
25
+ return /* @__PURE__ */ e("svg", { ...n, className: "cms-glyph", children: /* @__PURE__ */ e("path", { fill: "currentColor", d: "M3.3 3.3a1 1 0 0 1 1.4 0L8 6.6l3.3-3.3a1 1 0 1 1 1.4 1.4L9.4 8l3.3 3.3a1 1 0 0 1-1.4 1.4L8 9.4l-3.3 3.3a1 1 0 0 1-1.4-1.4L6.6 8 3.3 4.7a1 1 0 0 1 0-1.4Z" }) });
18
26
  case "warning":
19
- return /* @__PURE__ */ t("svg", { ...n, className: "cms-glyph", children: /* @__PURE__ */ t("path", { fill: "currentColor", d: "M8.9 1.5a1 1 0 0 0-1.8 0l-6 11A1 1 0 0 0 2 14h12a1 1 0 0 0 .9-1.5l-6-11ZM8 5a1 1 0 0 1 1 1v3a1 1 0 0 1-2 0V6a1 1 0 0 1 1-1Zm0 7.5A1 1 0 1 1 8 10.5a1 1 0 0 1 0 2Z" }) });
27
+ return /* @__PURE__ */ e("svg", { ...n, className: "cms-glyph", children: /* @__PURE__ */ e("path", { fill: "currentColor", d: "M8.9 1.5a1 1 0 0 0-1.8 0l-6 11A1 1 0 0 0 2 14h12a1 1 0 0 0 .9-1.5l-6-11ZM8 5a1 1 0 0 1 1 1v3a1 1 0 0 1-2 0V6a1 1 0 0 1 1-1Zm0 7.5A1 1 0 1 1 8 10.5a1 1 0 0 1 0 2Z" }) });
20
28
  case "check":
21
- return /* @__PURE__ */ t("svg", { ...n, className: "cms-glyph", children: /* @__PURE__ */ t("path", { fill: "currentColor", d: "M13.7 4.3a1 1 0 0 1 0 1.4l-6 6a1 1 0 0 1-1.4 0l-3-3a1 1 0 1 1 1.4-1.4L7 9.6l5.3-5.3a1 1 0 0 1 1.4 0Z" }) });
29
+ return /* @__PURE__ */ e("svg", { ...n, className: "cms-glyph", children: /* @__PURE__ */ e("path", { fill: "currentColor", d: "M13.7 4.3a1 1 0 0 1 0 1.4l-6 6a1 1 0 0 1-1.4 0l-3-3a1 1 0 1 1 1.4-1.4L7 9.6l5.3-5.3a1 1 0 0 1 1.4 0Z" }) });
22
30
  case "info":
23
- return /* @__PURE__ */ t("svg", { ...n, className: "cms-glyph", children: /* @__PURE__ */ t("path", { fill: "currentColor", d: "M8 1a7 7 0 1 1 0 14A7 7 0 0 1 8 1Zm0 5.5a1 1 0 0 0-1 1V11a1 1 0 1 0 2 0V7.5a1 1 0 0 0-1-1ZM8 4a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z" }) });
31
+ return /* @__PURE__ */ e("svg", { ...n, className: "cms-glyph", children: /* @__PURE__ */ e("path", { fill: "currentColor", d: "M8 1a7 7 0 1 1 0 14A7 7 0 0 1 8 1Zm0 5.5a1 1 0 0 0-1 1V11a1 1 0 1 0 2 0V7.5a1 1 0 0 0-1-1ZM8 4a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z" }) });
24
32
  }
25
33
  }
26
- function E({
27
- variant: e = "secondary",
34
+ function J({
35
+ variant: l = "secondary",
28
36
  busy: n = !1,
29
- busyLabel: l,
30
- locked: a = !1,
31
- lockedReason: s,
37
+ busyLabel: a,
38
+ locked: t = !1,
39
+ lockedReason: c,
32
40
  icon: m,
33
- disabled: i,
34
- className: u,
35
- children: d,
36
- type: f = "button",
37
- title: r,
38
- ...o
41
+ disabled: o,
42
+ className: r,
43
+ children: h,
44
+ type: d = "button",
45
+ title: f,
46
+ ...p
39
47
  }) {
40
- const c = !!i || n;
41
- return /* @__PURE__ */ v(
48
+ const i = !!o || n;
49
+ return /* @__PURE__ */ s(
42
50
  "button",
43
51
  {
44
- ...o,
45
- type: f,
46
- className: _("cms-button", `cms-button--${e}`, n && "is-busy", a && "is-locked", u),
47
- disabled: c,
52
+ ...p,
53
+ type: d,
54
+ className: M("cms-button", `cms-button--${l}`, n && "is-busy", t && "is-locked", r),
55
+ disabled: i,
48
56
  "aria-busy": n || void 0,
49
- title: a ? s ?? r : r,
57
+ title: t ? c ?? f : f,
50
58
  children: [
51
- n ? /* @__PURE__ */ t(N, { name: "spinner" }) : a ? /* @__PURE__ */ t(N, { name: "lock" }) : m,
52
- /* @__PURE__ */ t("span", { className: "cms-button__label", children: n && l !== void 0 ? l : d }),
53
- a && s ? /* @__PURE__ */ v("span", { className: "cms-visually-hidden", children: [
59
+ n ? /* @__PURE__ */ e(F, { name: "spinner" }) : t ? /* @__PURE__ */ e(F, { name: "lock" }) : m,
60
+ /* @__PURE__ */ e("span", { className: "cms-button__label", children: n && a !== void 0 ? a : h }),
61
+ t && c ? /* @__PURE__ */ s("span", { className: "cms-visually-hidden", children: [
54
62
  ", ",
55
- s
63
+ c
56
64
  ] }) : null
57
65
  ]
58
66
  }
59
67
  );
60
68
  }
61
- function L({ id: e, label: n, help: l, error: a, pinned: s, children: m }) {
62
- return /* @__PURE__ */ v("div", { className: _("cms-field", a != null && "is-invalid"), children: [
63
- /* @__PURE__ */ t("label", { className: "cms-field__label", htmlFor: e, children: n }),
69
+ function we({ id: l, label: n, help: a, error: t, pinned: c, children: m }) {
70
+ return /* @__PURE__ */ s("div", { className: M("cms-field", t != null && "is-invalid"), children: [
71
+ /* @__PURE__ */ e("label", { className: "cms-field__label", htmlFor: l, children: n }),
64
72
  m,
65
- s != null ? /* @__PURE__ */ v("p", { className: "cms-field__pinned", id: `${e}-pinned`, children: [
66
- /* @__PURE__ */ t(N, { name: "lock" }),
73
+ c != null ? /* @__PURE__ */ s("p", { className: "cms-field__pinned", id: `${l}-pinned`, children: [
74
+ /* @__PURE__ */ e(F, { name: "lock" }),
67
75
  " ",
68
- s
76
+ c
69
77
  ] }) : null,
70
- a != null ? /* @__PURE__ */ t("p", { className: "cms-field__error", id: `${e}-error`, role: "alert", children: a }) : null,
71
- l != null ? /* @__PURE__ */ t("p", { className: "cms-field__help", id: `${e}-help`, children: l }) : null
78
+ t != null ? /* @__PURE__ */ e("p", { className: "cms-field__error", id: `${l}-error`, role: "alert", children: t }) : null,
79
+ a != null ? /* @__PURE__ */ e("p", { className: "cms-field__help", id: `${l}-help`, children: a }) : null
72
80
  ] });
73
81
  }
74
- function $(e, n) {
75
- const l = [n.error != null && `${e}-error`, n.pinned != null && `${e}-pinned`, n.help != null && `${e}-help`].filter(Boolean).join(" ");
76
- return l === "" ? void 0 : l;
82
+ function ke(l, n) {
83
+ const a = [n.error != null && `${l}-error`, n.pinned != null && `${l}-pinned`, n.help != null && `${l}-help`].filter(Boolean).join(" ");
84
+ return a === "" ? void 0 : a;
77
85
  }
78
- function Y({ label: e, help: n, error: l, disabled: a, readOnly: s, pinned: m, value: i, onChange: u, placeholder: d, type: f = "text", name: r }) {
79
- const o = A();
80
- return /* @__PURE__ */ t(L, { id: o, label: e, help: n, error: l, pinned: m, children: /* @__PURE__ */ t(
86
+ function sl({ label: l, help: n, error: a, disabled: t, readOnly: c, pinned: m, value: o, onChange: r, placeholder: h, type: d = "text", name: f }) {
87
+ const p = Q();
88
+ return /* @__PURE__ */ e(we, { id: p, label: l, help: n, error: a, pinned: m, children: /* @__PURE__ */ e(
81
89
  "input",
82
90
  {
83
- id: o,
84
- name: r,
85
- type: f,
91
+ id: p,
92
+ name: f,
93
+ type: d,
86
94
  className: "cms-input",
87
- value: i,
88
- placeholder: d,
89
- disabled: a,
90
- readOnly: s || m != null,
91
- "aria-invalid": l != null || void 0,
92
- "aria-describedby": $(o, { help: n, error: l, pinned: m }),
93
- onChange: (c) => u == null ? void 0 : u(c.target.value)
95
+ value: o,
96
+ placeholder: h,
97
+ disabled: t,
98
+ readOnly: c || m != null,
99
+ "aria-invalid": a != null || void 0,
100
+ "aria-describedby": ke(p, { help: n, error: a, pinned: m }),
101
+ onChange: (i) => r == null ? void 0 : r(i.target.value)
94
102
  }
95
103
  ) });
96
104
  }
97
- function J({ label: e, help: n, error: l, disabled: a, readOnly: s, value: m, options: i, onChange: u, emptyText: d = "Nothing to choose from yet.", name: f }) {
98
- const r = A(), o = i.length === 0;
99
- return /* @__PURE__ */ t(L, { id: r, label: e, help: o ? d : n, error: l, children: /* @__PURE__ */ t(
105
+ function tl({ label: l, help: n, error: a, disabled: t, readOnly: c, value: m, options: o, onChange: r, emptyText: h = "Nothing to choose from yet.", name: d }) {
106
+ const f = Q(), p = o.length === 0;
107
+ return /* @__PURE__ */ e(we, { id: f, label: l, help: p ? h : n, error: a, children: /* @__PURE__ */ e(
100
108
  "select",
101
109
  {
102
- id: r,
103
- name: f,
110
+ id: f,
111
+ name: d,
104
112
  className: "cms-input cms-select",
105
113
  value: m,
106
- disabled: a || o,
107
- "aria-readonly": s || void 0,
108
- "aria-invalid": l != null || void 0,
109
- "aria-describedby": $(r, { help: o ? d : n, error: l }),
110
- onChange: (c) => {
111
- s || u == null || u(c.target.value);
114
+ disabled: t || p,
115
+ "aria-readonly": c || void 0,
116
+ "aria-invalid": a != null || void 0,
117
+ "aria-describedby": ke(f, { help: p ? h : n, error: a }),
118
+ onChange: (i) => {
119
+ c || r == null || r(i.target.value);
112
120
  },
113
- children: i.map((c) => /* @__PURE__ */ t("option", { value: c.value, disabled: s && c.value !== m, children: c.label }, c.value))
121
+ children: o.map((i) => /* @__PURE__ */ e("option", { value: i.value, disabled: c && i.value !== m, children: i.label }, i.value))
114
122
  }
115
123
  ) });
116
124
  }
117
- function z({ label: e, checked: n, onChange: l, disabled: a, readOnly: s, help: m }) {
118
- const i = A();
119
- return /* @__PURE__ */ v("div", { className: "cms-toggle-row", children: [
120
- /* @__PURE__ */ t(
125
+ function cl({ label: l, checked: n, onChange: a, disabled: t, readOnly: c, help: m }) {
126
+ const o = Q();
127
+ return /* @__PURE__ */ s("div", { className: "cms-toggle-row", children: [
128
+ /* @__PURE__ */ e(
121
129
  "button",
122
130
  {
123
- id: i,
131
+ id: o,
124
132
  type: "button",
125
133
  role: "switch",
126
- className: _("cms-toggle", n && "is-on"),
134
+ className: M("cms-toggle", n && "is-on"),
127
135
  "aria-checked": n,
128
- "aria-readonly": s || void 0,
129
- "aria-describedby": m != null ? `${i}-help` : void 0,
130
- disabled: a,
136
+ "aria-readonly": c || void 0,
137
+ "aria-describedby": m != null ? `${o}-help` : void 0,
138
+ disabled: t,
131
139
  onClick: () => {
132
- s || l == null || l(!n);
140
+ c || a == null || a(!n);
133
141
  },
134
- children: /* @__PURE__ */ t("span", { className: "cms-toggle__thumb" })
142
+ children: /* @__PURE__ */ e("span", { className: "cms-toggle__thumb" })
135
143
  }
136
144
  ),
137
- /* @__PURE__ */ t("label", { className: "cms-toggle__label", htmlFor: i, children: e }),
138
- m != null ? /* @__PURE__ */ t("p", { className: "cms-field__help", id: `${i}-help`, children: m }) : null
145
+ /* @__PURE__ */ e("label", { className: "cms-toggle__label", htmlFor: o, children: l }),
146
+ m != null ? /* @__PURE__ */ e("p", { className: "cms-field__help", id: `${o}-help`, children: m }) : null
139
147
  ] });
140
148
  }
141
- const Z = 150;
142
- function I({ open: e, title: n, onClose: l, dirty: a = !1, onDirtyClose: s, children: m, footer: i }) {
143
- const [u, d] = k(e), [f, r] = k(!1), o = w(null), c = w(null), g = A();
144
- if (x(() => {
145
- if (e) {
146
- c.current = document.activeElement, d(!0), r(!1);
149
+ const Ae = 150;
150
+ function xe({ open: l, title: n, onClose: a, dirty: t = !1, onDirtyClose: c, children: m, footer: o, closeLabel: r = "Close", initialFocus: h, className: d }) {
151
+ const [f, p] = D(l), [i, v] = D(!1), y = z(null), g = z(null), k = Q();
152
+ if (W(() => {
153
+ if (l) {
154
+ g.current = document.activeElement, p(!0), v(!1);
147
155
  return;
148
156
  }
149
- if (!u) return;
150
- r(!0);
151
- const h = window.setTimeout(() => {
152
- var y, b;
153
- d(!1), r(!1), (b = (y = c.current) == null ? void 0 : y.focus) == null || b.call(y);
154
- }, Z);
155
- return () => window.clearTimeout(h);
156
- }, [e, u]), x(() => {
157
- var h, y;
158
- if (e && u) {
159
- const b = 'input, select, textarea, button, [href], [tabindex]:not([tabindex="-1"])';
160
- (y = ((h = o.current) == null ? void 0 : h.querySelector(`.cms-modal__body :is(${b}), .cms-modal__foot :is(${b})`)) ?? o.current) == null || y.focus();
157
+ if (!f) return;
158
+ v(!0);
159
+ const w = window.setTimeout(() => {
160
+ var E, A;
161
+ p(!1), v(!1), (A = (E = g.current) == null ? void 0 : E.focus) == null || A.call(E);
162
+ }, Ae);
163
+ return () => window.clearTimeout(w);
164
+ }, [l, f]), W(() => {
165
+ var w, E;
166
+ if (l && f) {
167
+ const A = 'input, select, textarea, button, [href], [tabindex]:not([tabindex="-1"])';
168
+ (E = (h == null ? void 0 : h.current) ?? ((w = y.current) == null ? void 0 : w.querySelector(`.cms-modal__body :is(${A}), .cms-modal__foot :is(${A})`)) ?? y.current) == null || E.focus();
161
169
  }
162
- }, [e, u]), !u) return null;
163
- const p = () => {
164
- a ? s == null || s() : l();
170
+ }, [l, f, h]), !f) return null;
171
+ const O = () => {
172
+ t ? c == null || c() : a();
165
173
  };
166
- return C(
167
- /* @__PURE__ */ t("div", { className: _("cms-modal-scrim", f && "is-closing"), onMouseDown: (h) => {
168
- h.target === h.currentTarget && p();
169
- }, children: /* @__PURE__ */ v(
174
+ return be(
175
+ /* @__PURE__ */ e("div", { className: M("cms-modal-scrim", i && "is-closing"), onMouseDown: (w) => {
176
+ w.target === w.currentTarget && O();
177
+ }, children: /* @__PURE__ */ s(
170
178
  "div",
171
179
  {
172
- ref: o,
173
- className: _("cms-modal", f && "is-closing", a && "is-dirty"),
180
+ ref: y,
181
+ className: M("cms-modal", d, i && "is-closing", t && "is-dirty"),
174
182
  role: "dialog",
175
183
  "aria-modal": "true",
176
- "aria-labelledby": g,
184
+ "aria-labelledby": k,
177
185
  tabIndex: -1,
178
- onKeyDown: (h) => {
179
- var y;
180
- if (h.key === "Escape")
181
- h.stopPropagation(), p();
182
- else if (h.key === "Tab") {
183
- const b = (y = o.current) == null ? void 0 : y.querySelectorAll('input, select, textarea, button:not([disabled]), [href], [tabindex]:not([tabindex="-1"])');
184
- if (!b || b.length === 0) return;
185
- const D = b[0], M = b[b.length - 1];
186
- h.shiftKey && document.activeElement === D ? (h.preventDefault(), M.focus()) : !h.shiftKey && document.activeElement === M && (h.preventDefault(), D.focus());
186
+ onKeyDown: (w) => {
187
+ var E;
188
+ if (w.key === "Escape")
189
+ w.stopPropagation(), O();
190
+ else if (w.key === "Tab") {
191
+ const A = (E = y.current) == null ? void 0 : E.querySelectorAll('input, select, textarea, button:not([disabled]), [href], [tabindex]:not([tabindex="-1"])');
192
+ if (!A || A.length === 0) return;
193
+ const V = A[0], Z = A[A.length - 1];
194
+ w.shiftKey && document.activeElement === V ? (w.preventDefault(), Z.focus()) : !w.shiftKey && document.activeElement === Z && (w.preventDefault(), V.focus());
187
195
  }
188
196
  },
189
197
  children: [
190
- /* @__PURE__ */ v("header", { className: "cms-modal__head", children: [
191
- /* @__PURE__ */ t("h2", { className: "cms-modal__title", id: g, children: n }),
192
- /* @__PURE__ */ t("button", { type: "button", className: "cms-icon-button", "aria-label": "Close", onClick: p, children: /* @__PURE__ */ t(N, { name: "close" }) })
198
+ /* @__PURE__ */ s("header", { className: "cms-modal__head", children: [
199
+ /* @__PURE__ */ e("h2", { className: "cms-modal__title", id: k, children: n }),
200
+ /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": r, onClick: O, children: /* @__PURE__ */ e(F, { name: "close" }) })
193
201
  ] }),
194
- /* @__PURE__ */ t("div", { className: "cms-modal__body", children: m }),
195
- i != null ? /* @__PURE__ */ t("footer", { className: "cms-modal__foot", children: i }) : null
202
+ /* @__PURE__ */ e("div", { className: "cms-modal__body", children: m }),
203
+ o != null ? /* @__PURE__ */ e("footer", { className: "cms-modal__foot", children: o }) : null
196
204
  ]
197
205
  }
198
206
  ) }),
199
207
  document.body
200
208
  );
201
209
  }
202
- function O({ open: e, title: n, message: l, kind: a = "default", confirmLabel: s, cancelLabel: m, onConfirm: i, onCancel: u }) {
203
- const d = a === "discard-changes";
204
- return /* @__PURE__ */ t(
205
- I,
210
+ function rl({ open: l, title: n, message: a, kind: t = "default", confirmLabel: c, cancelLabel: m, closeLabel: o, onConfirm: r, onCancel: h }) {
211
+ const d = t === "discard-changes";
212
+ return /* @__PURE__ */ e(
213
+ xe,
206
214
  {
207
- open: e,
215
+ open: l,
208
216
  title: n,
209
- onClose: u,
210
- footer: /* @__PURE__ */ v(S, { children: [
211
- /* @__PURE__ */ t(E, { onClick: u, children: m ?? (d ? "Keep editing" : "Cancel") }),
212
- /* @__PURE__ */ t(E, { variant: a === "default" ? "primary" : "danger", onClick: i, children: s ?? (d ? "Discard changes" : "Confirm") })
217
+ onClose: h,
218
+ ...o === void 0 ? {} : { closeLabel: o },
219
+ footer: /* @__PURE__ */ s(C, { children: [
220
+ /* @__PURE__ */ e(J, { onClick: h, children: m ?? (d ? "Keep editing" : "Cancel") }),
221
+ /* @__PURE__ */ e(J, { variant: t === "default" ? "primary" : "danger", onClick: r, children: c ?? (d ? "Discard changes" : "Confirm") })
213
222
  ] }),
214
- children: a !== "default" ? /* @__PURE__ */ v("p", { className: "cms-confirm__warning", children: [
215
- /* @__PURE__ */ t(N, { name: "warning" }),
223
+ children: t !== "default" ? /* @__PURE__ */ s("p", { className: "cms-confirm__warning", children: [
224
+ /* @__PURE__ */ e(F, { name: "warning" }),
216
225
  " ",
217
- l
218
- ] }) : /* @__PURE__ */ t("p", { children: l })
226
+ a
227
+ ] }) : /* @__PURE__ */ e("p", { children: a })
219
228
  }
220
229
  );
221
230
  }
222
- function ee({ kind: e, message: n, action: l, onDismiss: a }) {
223
- return /* @__PURE__ */ v("div", { className: _("cms-toast", `cms-toast--${e}`), role: e === "error" ? "alert" : "status", children: [
224
- /* @__PURE__ */ t(N, { name: e === "success" ? "check" : e === "error" ? "warning" : "info" }),
225
- /* @__PURE__ */ t("span", { className: "cms-toast__message", children: n }),
226
- l ? /* @__PURE__ */ t(E, { className: "cms-toast__action", onClick: l.onAction, children: l.label }) : null,
227
- a ? /* @__PURE__ */ t("button", { type: "button", className: "cms-icon-button", "aria-label": "Dismiss", onClick: a, children: /* @__PURE__ */ t(N, { name: "close" }) }) : null
231
+ function il({ kind: l, message: n, action: a, onDismiss: t, dismissLabel: c = "Dismiss" }) {
232
+ return /* @__PURE__ */ s("div", { className: M("cms-toast", `cms-toast--${l}`), role: l === "error" ? "alert" : "status", children: [
233
+ /* @__PURE__ */ e(F, { name: l === "success" ? "check" : l === "error" ? "warning" : "info" }),
234
+ /* @__PURE__ */ e("span", { className: "cms-toast__message", children: n }),
235
+ a ? /* @__PURE__ */ e(J, { className: "cms-toast__action", onClick: a.onAction, children: a.label }) : null,
236
+ t ? /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": c, onClick: t, children: /* @__PURE__ */ e(F, { name: "close" }) }) : null
228
237
  ] });
229
238
  }
230
- function ne({ children: e }) {
231
- return /* @__PURE__ */ t("div", { className: "cms-toast-region", children: e });
239
+ function ol({ children: l }) {
240
+ return /* @__PURE__ */ e("div", { className: "cms-toast-region", children: l });
232
241
  }
233
- function q({ what: e, layout: n = "inline" }) {
234
- return /* @__PURE__ */ v("div", { className: _("cms-loading", `cms-loading--${n}`), role: "status", "aria-live": "polite", children: [
235
- /* @__PURE__ */ t(N, { name: "spinner" }),
236
- /* @__PURE__ */ t("span", { children: e })
242
+ function Se({ what: l, layout: n = "inline" }) {
243
+ return /* @__PURE__ */ s("div", { className: M("cms-loading", `cms-loading--${n}`), role: "status", "aria-live": "polite", children: [
244
+ /* @__PURE__ */ e(F, { name: "spinner" }),
245
+ /* @__PURE__ */ e("span", { children: l })
237
246
  ] });
238
247
  }
239
- function F({ title: e, hint: n, action: l }) {
240
- return /* @__PURE__ */ v("div", { className: "cms-empty", children: [
241
- /* @__PURE__ */ t("p", { className: "cms-empty__title", children: e }),
242
- n != null ? /* @__PURE__ */ t("p", { className: "cms-empty__hint", children: n }) : null,
243
- l != null ? /* @__PURE__ */ t("div", { className: "cms-empty__action", children: l }) : null
248
+ function De({ title: l, hint: n, action: a }) {
249
+ return /* @__PURE__ */ s("div", { className: "cms-empty", children: [
250
+ /* @__PURE__ */ e("p", { className: "cms-empty__title", children: l }),
251
+ n != null ? /* @__PURE__ */ e("p", { className: "cms-empty__hint", children: n }) : null,
252
+ a != null ? /* @__PURE__ */ e("div", { className: "cms-empty__action", children: a }) : null
244
253
  ] });
245
254
  }
246
- function R({ message: e, onRetry: n }) {
247
- return /* @__PURE__ */ v("div", { className: "cms-error-banner", role: "alert", children: [
248
- /* @__PURE__ */ t(N, { name: "warning" }),
249
- /* @__PURE__ */ t("span", { className: "cms-error-banner__message", children: e }),
250
- n ? /* @__PURE__ */ t(E, { onClick: n, children: "Try again" }) : null
255
+ function Ee({ message: l, onRetry: n, retryLabel: a = "Try again" }) {
256
+ return /* @__PURE__ */ s("div", { className: "cms-error-banner", role: "alert", children: [
257
+ /* @__PURE__ */ e(F, { name: "warning" }),
258
+ /* @__PURE__ */ e("span", { className: "cms-error-banner__message", children: l }),
259
+ n ? /* @__PURE__ */ e(J, { onClick: n, children: a }) : null
251
260
  ] });
252
261
  }
253
- function te({ title: e, scope: n, actions: l, backLink: a }) {
254
- return /* @__PURE__ */ v("header", { className: "cms-page-header", children: [
255
- a ? /* @__PURE__ */ v(
262
+ const fe = 300;
263
+ function Le() {
264
+ if (typeof window > "u" || typeof getComputedStyle != "function") return fe;
265
+ const l = getComputedStyle(document.documentElement).getPropertyValue("--cms-state-delay").trim(), n = l.endsWith("ms") ? Number.parseFloat(l) : l.endsWith("s") ? Number.parseFloat(l) * 1e3 : Number.NaN;
266
+ return Number.isFinite(n) && n >= 0 ? n : fe;
267
+ }
268
+ function $e() {
269
+ return /* @__PURE__ */ s("svg", { className: "cms-state__spinner", viewBox: "0 0 24 24", "aria-hidden": "true", focusable: "false", children: [
270
+ /* @__PURE__ */ e("circle", { className: "cms-state__track", cx: "12", cy: "12", r: "10", fill: "none" }),
271
+ /* @__PURE__ */ e("circle", { className: "cms-state__arc", cx: "12", cy: "12", r: "10", fill: "none", pathLength: "100", strokeDasharray: "28 72" })
272
+ ] });
273
+ }
274
+ function se({ kind: l, title: n, description: a, action: t, placement: c = "block" }) {
275
+ const [m, o] = D(l !== "loading");
276
+ return W(() => {
277
+ if (l !== "loading") {
278
+ o(!0);
279
+ return;
280
+ }
281
+ o(!1);
282
+ const r = window.setTimeout(() => o(!0), Le());
283
+ return () => window.clearTimeout(r);
284
+ }, [l]), /* @__PURE__ */ s(
285
+ "div",
286
+ {
287
+ className: M("cms-state", `cms-state--${l}`, `cms-state--${c}`, !m && "is-waiting"),
288
+ role: "status",
289
+ "aria-live": "polite",
290
+ "data-kind": l,
291
+ children: [
292
+ l === "loading" ? /* @__PURE__ */ e($e, {}) : null,
293
+ l === "error" || l === "denied" ? /* @__PURE__ */ e(F, { name: l === "error" ? "warning" : "lock" }) : null,
294
+ /* @__PURE__ */ s("span", { className: "cms-state__text", children: [
295
+ /* @__PURE__ */ e("span", { className: "cms-state__title", children: n }),
296
+ a !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-state__description", children: a }) : null
297
+ ] }),
298
+ t !== void 0 && l !== "denied" ? /* @__PURE__ */ e(J, { className: "cms-state__action", onClick: t.onAction, children: t.label }) : null
299
+ ]
300
+ }
301
+ );
302
+ }
303
+ const Ce = {
304
+ mail: /* @__PURE__ */ s(C, { children: [
305
+ /* @__PURE__ */ e("rect", { x: "3", y: "5", width: "18", height: "14", rx: "2" }),
306
+ /* @__PURE__ */ e("path", { d: "m3 7 9 6 9-6" })
307
+ ] }),
308
+ chat: /* @__PURE__ */ e("path", { d: "M4 12a8 8 0 1 1 4 6.9L4 20l1.1-4A8 8 0 0 1 4 12Z" }),
309
+ phone: /* @__PURE__ */ e("path", { d: "M5 3h3l2 5-2.5 1.5a11 11 0 0 0 7 7L16 14l5 2v3a2 2 0 0 1-2 2A16 16 0 0 1 3 5a2 2 0 0 1 2-2Z" }),
310
+ calendar: /* @__PURE__ */ s(C, { children: [
311
+ /* @__PURE__ */ e("rect", { x: "3", y: "5", width: "18", height: "16", rx: "2" }),
312
+ /* @__PURE__ */ e("path", { d: "M3 10h18M8 3v4M16 3v4" })
313
+ ] }),
314
+ file: /* @__PURE__ */ s(C, { children: [
315
+ /* @__PURE__ */ e("path", { d: "M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9Z" }),
316
+ /* @__PURE__ */ e("path", { d: "M14 3v6h6M8 13h8M8 17h6" })
317
+ ] }),
318
+ image: /* @__PURE__ */ s(C, { children: [
319
+ /* @__PURE__ */ e("rect", { x: "3", y: "4", width: "18", height: "16", rx: "2" }),
320
+ /* @__PURE__ */ e("circle", { cx: "9", cy: "10", r: "2" }),
321
+ /* @__PURE__ */ e("path", { d: "m21 17-5-5-9 8" })
322
+ ] }),
323
+ search: /* @__PURE__ */ s(C, { children: [
324
+ /* @__PURE__ */ e("circle", { cx: "11", cy: "11", r: "7" }),
325
+ /* @__PURE__ */ e("path", { d: "m20 20-4-4" })
326
+ ] }),
327
+ bell: /* @__PURE__ */ s(C, { children: [
328
+ /* @__PURE__ */ e("path", { d: "M6 9a6 6 0 1 1 12 0c0 6 2 8 2 8H4s2-2 2-8Z" }),
329
+ /* @__PURE__ */ e("path", { d: "M10 20a2 2 0 0 0 4 0" })
330
+ ] }),
331
+ pencil: /* @__PURE__ */ s(C, { children: [
332
+ /* @__PURE__ */ e("path", { d: "M4 20h4L19 9l-4-4L4 16Z" }),
333
+ /* @__PURE__ */ e("path", { d: "m13 7 4 4" })
334
+ ] }),
335
+ download: /* @__PURE__ */ s(C, { children: [
336
+ /* @__PURE__ */ e("path", { d: "M12 4v11" }),
337
+ /* @__PURE__ */ e("path", { d: "m7 11 5 5 5-5" }),
338
+ /* @__PURE__ */ e("path", { d: "M4 20h16" })
339
+ ] }),
340
+ print: /* @__PURE__ */ s(C, { children: [
341
+ /* @__PURE__ */ e("path", { d: "M7 8V4h10v4" }),
342
+ /* @__PURE__ */ e("rect", { x: "3", y: "8", width: "18", height: "8", rx: "2" }),
343
+ /* @__PURE__ */ e("path", { d: "M7 14h10v6H7Z" })
344
+ ] }),
345
+ "open-separately": /* @__PURE__ */ s(C, { children: [
346
+ /* @__PURE__ */ e("path", { d: "M14 4h6v6" }),
347
+ /* @__PURE__ */ e("path", { d: "m20 4-9 9" }),
348
+ /* @__PURE__ */ e("path", { d: "M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5" })
349
+ ] }),
350
+ star: /* @__PURE__ */ e("path", { d: "m12 3 2.8 5.8 6.2.9-4.5 4.4 1 6.2L12 17.4l-5.5 2.9 1-6.2L3 9.7l6.2-.9Z" }),
351
+ send: /* @__PURE__ */ s(C, { children: [
352
+ /* @__PURE__ */ e("path", { d: "M21 3 10 14" }),
353
+ /* @__PURE__ */ e("path", { d: "M21 3 14 21l-4-7-7-4Z" })
354
+ ] }),
355
+ inbox: /* @__PURE__ */ s(C, { children: [
356
+ /* @__PURE__ */ e("path", { d: "M3 13h5l1 3h6l1-3h5" }),
357
+ /* @__PURE__ */ e("path", { d: "M5 5h14l2 8v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-6Z" })
358
+ ] }),
359
+ archive: /* @__PURE__ */ s(C, { children: [
360
+ /* @__PURE__ */ e("rect", { x: "3", y: "4", width: "18", height: "5", rx: "1" }),
361
+ /* @__PURE__ */ e("path", { d: "M5 9v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V9M10 13h4" })
362
+ ] }),
363
+ trash: /* @__PURE__ */ s(C, { children: [
364
+ /* @__PURE__ */ e("path", { d: "M4 7h16M10 11v6M14 11v6" }),
365
+ /* @__PURE__ */ e("path", { d: "M6 7l1 13a2 2 0 0 0 2 1h6a2 2 0 0 0 2-1l1-13M9 7V4h6v3" })
366
+ ] }),
367
+ paperclip: /* @__PURE__ */ e("path", { d: "m20 11-8.5 8.5a5 5 0 0 1-7-7L13 4a3.5 3.5 0 0 1 5 5l-8.5 8.5a2 2 0 0 1-3-3L14 7" }),
368
+ mic: /* @__PURE__ */ s(C, { children: [
369
+ /* @__PURE__ */ e("rect", { x: "9", y: "3", width: "6", height: "11", rx: "3" }),
370
+ /* @__PURE__ */ e("path", { d: "M5 11a7 7 0 0 0 14 0M12 18v3" })
371
+ ] }),
372
+ speaker: /* @__PURE__ */ s(C, { children: [
373
+ /* @__PURE__ */ e("path", { d: "M4 9h4l5-4v14l-5-4H4Z" }),
374
+ /* @__PURE__ */ e("path", { d: "M16 9a4 4 0 0 1 0 6M19 6a8 8 0 0 1 0 12" })
375
+ ] }),
376
+ "user-plus": /* @__PURE__ */ s(C, { children: [
377
+ /* @__PURE__ */ e("circle", { cx: "10", cy: "8", r: "4" }),
378
+ /* @__PURE__ */ e("path", { d: "M3 21a7 7 0 0 1 14 0M19 8v6M16 11h6" })
379
+ ] }),
380
+ "phone-off": /* @__PURE__ */ e("path", { d: "M3 14c5-5 13-5 18 0l-2 3-4-1v-3a10 10 0 0 0-6 0v3l-4 1Z" }),
381
+ video: /* @__PURE__ */ s(C, { children: [
382
+ /* @__PURE__ */ e("rect", { x: "3", y: "6", width: "13", height: "12", rx: "2" }),
383
+ /* @__PURE__ */ e("path", { d: "m16 10 5-3v10l-5-3" })
384
+ ] }),
385
+ info: /* @__PURE__ */ s(C, { children: [
386
+ /* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "9" }),
387
+ /* @__PURE__ */ e("path", { d: "M12 11v6M12 7.5v.5" })
388
+ ] }),
389
+ "chevron-down": /* @__PURE__ */ e("path", { d: "m6 9 6 6 6-6" }),
390
+ "chevron-left": /* @__PURE__ */ e("path", { d: "m15 18-6-6 6-6" }),
391
+ plus: /* @__PURE__ */ e("path", { d: "M12 5v14M5 12h14" }),
392
+ folder: /* @__PURE__ */ e("path", { d: "M3 6a2 2 0 0 1 2-2h4l2 3h8a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z" }),
393
+ check: /* @__PURE__ */ e("path", { d: "m5 12 5 5 9-10" }),
394
+ server: /* @__PURE__ */ s(C, { children: [
395
+ /* @__PURE__ */ e("rect", { x: "3", y: "4", width: "18", height: "7", rx: "2" }),
396
+ /* @__PURE__ */ e("rect", { x: "3", y: "13", width: "18", height: "7", rx: "2" }),
397
+ /* @__PURE__ */ e("path", { d: "M7 7.5h.5M7 16.5h.5" })
398
+ ] }),
399
+ reply: /* @__PURE__ */ e("path", { d: "M10 8 4 13l6 5M4 13h11a5 5 0 0 1 5 5" }),
400
+ // Reply's mirror: the arrow leaves to the right.
401
+ forward: /* @__PURE__ */ e("path", { d: "m14 8 6 5-6 5M20 13H9a5 5 0 0 0-5 5" }),
402
+ refresh: /* @__PURE__ */ e("path", { d: "M20 11a8 8 0 1 0-2.3 5.7M20 5v6h-6" }),
403
+ more: /* @__PURE__ */ e("path", { d: "M5 12h.5M12 12h.5M19 12h.5" }),
404
+ important: /* @__PURE__ */ e("path", { d: "M4 6h11l5 6-5 6H4l4-6-4-6Z" })
405
+ };
406
+ function P({ name: l, size: n = 20, label: a }) {
407
+ return /* @__PURE__ */ e(
408
+ "svg",
409
+ {
410
+ className: "cms-icon",
411
+ width: n,
412
+ height: n,
413
+ viewBox: "0 0 24 24",
414
+ fill: "none",
415
+ stroke: "currentColor",
416
+ strokeWidth: l === "more" ? 3 : 1.75,
417
+ strokeLinecap: "round",
418
+ strokeLinejoin: "round",
419
+ focusable: !1,
420
+ ...a ? { role: "img", "aria-label": a } : { "aria-hidden": !0 },
421
+ children: Ce[l]
422
+ }
423
+ );
424
+ }
425
+ const dl = Object.keys(Ce), ge = {
426
+ reply: "reply",
427
+ "reply-all": "reply",
428
+ forward: "forward",
429
+ envelope: "mail",
430
+ "envelope-open": "mail",
431
+ star: "star",
432
+ "star-fill": "star",
433
+ "folder-symlink": "folder",
434
+ folder: "folder",
435
+ trash: "trash",
436
+ archive: "archive",
437
+ "arrow-clockwise": "refresh",
438
+ download: "download",
439
+ printer: "print",
440
+ "three-dots": "more"
441
+ };
442
+ function oe(l) {
443
+ return Object.prototype.hasOwnProperty.call(ge, l) ? ge[l] : null;
444
+ }
445
+ const Te = 'input, select, textarea, button:not([disabled]), iframe, [href], [tabindex]:not([tabindex="-1"])', Pe = 60;
446
+ function Be(l) {
447
+ return l instanceof Element && l.closest('input, select, textarea, [contenteditable="true"], [data-viewer-keys]') !== null;
448
+ }
449
+ function Ie(l) {
450
+ return l instanceof Element && l.closest("[data-viewer-gestures]") !== null;
451
+ }
452
+ function Fe(l) {
453
+ return l.getClientRects().length > 0;
454
+ }
455
+ function ml(l) {
456
+ const { name: n, badge: a, closeLabel: t, onClose: c, actions: m = [], moreLabel: o = "More", edit: r, editing: h, siblings: d, bar: f, thumbnails: p, strip: i, onZoom: v, children: y } = l, g = z(null), k = z(null), O = Q(), [w, E] = D(!1), A = z(null);
457
+ W(() => {
458
+ var H;
459
+ const N = document.activeElement, T = document.body.style.overflow;
460
+ return document.body.style.overflow = "hidden", (H = k.current) == null || H.focus(), () => {
461
+ var B;
462
+ document.body.style.overflow = T, (B = N == null ? void 0 : N.focus) == null || B.call(N);
463
+ };
464
+ }, []);
465
+ const V = () => {
466
+ h != null && h.dirty ? h.onDirtyClose() : c();
467
+ }, Z = (N) => {
468
+ const T = N.touches.length === 1 ? N.touches[0] : void 0;
469
+ A.current = T === void 0 || h !== void 0 || Ie(N.target) ? null : { x: T.clientX, y: T.clientY };
470
+ }, le = (N) => {
471
+ var L, q;
472
+ const T = A.current, H = N.changedTouches[0];
473
+ if (A.current = null, T === null || H === void 0) return;
474
+ const B = H.clientX - T.x;
475
+ Math.abs(B) < Pe || Math.abs(B) < Math.abs(H.clientY - T.y) || (B > 0 ? (L = d == null ? void 0 : d.onPrevious) == null || L.call(d) : (q = d == null ? void 0 : d.onNext) == null || q.call(d));
476
+ };
477
+ return be(
478
+ /* @__PURE__ */ s(
479
+ "div",
480
+ {
481
+ ref: g,
482
+ className: M("cms-viewer", h !== void 0 && "is-editing"),
483
+ role: "dialog",
484
+ "aria-modal": "true",
485
+ "aria-labelledby": O,
486
+ tabIndex: -1,
487
+ onKeyDown: (N) => {
488
+ var T, H, B;
489
+ if (N.key === "Escape") {
490
+ if (h !== void 0) return;
491
+ N.stopPropagation(), w ? E(!1) : c();
492
+ } else if (N.key === "Tab") {
493
+ const L = Array.from(((T = g.current) == null ? void 0 : T.querySelectorAll(Te)) ?? []).filter(Fe);
494
+ if (L.length === 0) return;
495
+ const q = L[0], U = L[L.length - 1];
496
+ N.shiftKey && document.activeElement === q ? (N.preventDefault(), U.focus()) : !N.shiftKey && document.activeElement === U && (N.preventDefault(), q.focus());
497
+ } else h === void 0 && !Be(N.target) && !N.ctrlKey && !N.metaKey && !N.altKey && (N.key === "ArrowLeft" ? (H = d == null ? void 0 : d.onPrevious) == null || H.call(d) : N.key === "ArrowRight" ? (B = d == null ? void 0 : d.onNext) == null || B.call(d) : N.key === "+" || N.key === "=" ? v == null || v("in") : N.key === "-" ? v == null || v("out") : N.key === "0" && (v == null || v("reset")));
498
+ },
499
+ children: [
500
+ d !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-visually-hidden", role: "status", children: `${n}, ${d.position}` }) : null,
501
+ /* @__PURE__ */ s("header", { className: "cms-viewer__top", children: [
502
+ /* @__PURE__ */ e("button", { ref: k, type: "button", className: "cms-viewer__icon", "aria-label": t, onClick: V, children: /* @__PURE__ */ e(F, { name: "close" }) }),
503
+ /* @__PURE__ */ e("span", { className: "cms-viewer__badge", children: a }),
504
+ /* @__PURE__ */ e("h2", { className: "cms-viewer__name", id: O, title: n, children: n }),
505
+ d !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-viewer__position", children: d.position }) : null,
506
+ /* @__PURE__ */ e("span", { className: "cms-viewer__space" }),
507
+ h !== void 0 ? /* @__PURE__ */ s(C, { children: [
508
+ /* @__PURE__ */ e("span", { className: "cms-viewer__status", role: "status", children: h.status }),
509
+ /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__button cms-viewer__button--edit", onClick: h.onDone, children: h.doneLabel })
510
+ ] }) : /* @__PURE__ */ s(C, { children: [
511
+ /* @__PURE__ */ e("span", { className: "cms-viewer__actions", children: m.map((N) => /* @__PURE__ */ s("button", { type: "button", className: "cms-viewer__button", onClick: N.onSelect, children: [
512
+ N.icon,
513
+ N.label
514
+ ] }, N.label)) }),
515
+ r !== void 0 ? /* @__PURE__ */ s("button", { type: "button", className: "cms-viewer__button cms-viewer__button--edit", "aria-label": r.label, onClick: r.onEdit, children: [
516
+ r.icon,
517
+ /* @__PURE__ */ e("span", { className: "cms-viewer__wide", children: r.label })
518
+ ] }) : null,
519
+ m.length > 0 ? /* @__PURE__ */ s("span", { className: "cms-viewer__more", children: [
520
+ /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__icon", "aria-label": o, "aria-expanded": w, onClick: () => E((N) => !N), children: /* @__PURE__ */ e(P, { name: "more" }) }),
521
+ w ? /* @__PURE__ */ e("span", { className: "cms-viewer__menu", children: m.map((N) => /* @__PURE__ */ s(
522
+ "button",
523
+ {
524
+ type: "button",
525
+ className: "cms-viewer__button",
526
+ onClick: () => {
527
+ E(!1), N.onSelect();
528
+ },
529
+ children: [
530
+ N.icon,
531
+ N.label
532
+ ]
533
+ },
534
+ N.label
535
+ )) }) : null
536
+ ] }) : null
537
+ ] })
538
+ ] }),
539
+ /* @__PURE__ */ s("div", { className: "cms-viewer__body", children: [
540
+ p != null && h === void 0 ? /* @__PURE__ */ e("nav", { className: "cms-viewer__thumbnails", children: p }) : null,
541
+ /* @__PURE__ */ s("div", { className: "cms-viewer__content", onTouchStart: Z, onTouchEnd: le, children: [
542
+ y,
543
+ h === void 0 && (d != null && d.onPrevious) ? /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__side cms-viewer__side--previous", "aria-label": d.previousLabel, onClick: d.onPrevious, children: /* @__PURE__ */ e(F, { name: "back" }) }) : null,
544
+ h === void 0 && (d != null && d.onNext) ? /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__side cms-viewer__side--next", "aria-label": d.nextLabel, onClick: d.onNext, children: /* @__PURE__ */ e(F, { name: "back" }) }) : null,
545
+ h === void 0 && d !== void 0 ? /* @__PURE__ */ e("div", { className: "cms-viewer__dots", "aria-hidden": "true", children: Array.from({ length: Math.min(d.total, 7) }, (N, T) => /* @__PURE__ */ e("i", { className: T === Math.min(d.index, 6) ? "is-current" : void 0 }, T)) }) : null
546
+ ] })
547
+ ] }),
548
+ h === void 0 && i != null ? /* @__PURE__ */ e("div", { className: "cms-viewer__strip", children: i }) : null,
549
+ f != null ? /* @__PURE__ */ e("footer", { className: "cms-viewer__bar", children: f }) : null
550
+ ]
551
+ }
552
+ ),
553
+ document.body
554
+ );
555
+ }
556
+ class Ke extends Error {
557
+ constructor(n = "denied") {
558
+ super(n), this.name = "FilePickerDenied";
559
+ }
560
+ }
561
+ const pe = (l, n) => `${l}
562
+ ${n}`, ze = (l, n) => l === "" ? n : `${l}/${n}`, He = 48;
563
+ function ul(l) {
564
+ var Y, I;
565
+ const { open: n, spaces: a, list: t, disabledReason: c, budget: m, formatSize: o, labels: r, onConfirm: h, onCancel: d } = l, [f, p] = D(((Y = a[0]) == null ? void 0 : Y.id) ?? ""), [i, v] = D(""), [y, g] = D({ status: "loading" }), [k, O] = D(0), [w, E] = D(/* @__PURE__ */ new Map()), [A, V] = D(0), [Z, le] = D(!1), N = z(null), T = Q();
566
+ W(() => {
567
+ var u;
568
+ n && (p(((u = a[0]) == null ? void 0 : u.id) ?? ""), v(""), E(/* @__PURE__ */ new Map()), le(!1));
569
+ }, [n]), W(() => {
570
+ if (!n || f === "") return;
571
+ let u = !0;
572
+ return g({ status: "loading" }), V(0), t(f, i).then(
573
+ (b) => u && g({ status: "ready", entries: b.entries, next: b.next ?? null, paging: !1 }),
574
+ (b) => u && g({ status: b instanceof Ke ? "denied" : "error" })
575
+ ), () => {
576
+ u = !1;
577
+ };
578
+ }, [n, f, i, t, k]);
579
+ const H = ie(() => {
580
+ if (y.status !== "ready" || y.next === null || y.paging) return;
581
+ const u = y.next, b = y.entries;
582
+ g({ ...y, paging: !0 }), t(f, i, u).then(
583
+ (S) => g({ status: "ready", entries: [...b, ...S.entries], next: S.next ?? null, paging: !1 }),
584
+ () => g({ status: "ready", entries: b, next: u, paging: !1 })
585
+ );
586
+ }, [y, t, f, i]), B = ie((u) => {
587
+ var b;
588
+ return ((b = m == null ? void 0 : m.cost) == null ? void 0 : b.call(m, u)) ?? u.size ?? 0;
589
+ }, [m]), L = Me(() => [...w.values()], [w]), q = L.reduce((u, b) => u + (b.size ?? 0), 0), U = m === void 0 ? null : m.limitBytes - m.usedBytes - L.reduce((u, b) => u + B(b), 0), _ = U !== null && U < 0, x = (u) => {
590
+ if (u.kind !== "file") return null;
591
+ const b = c == null ? void 0 : c(u);
592
+ return b || (U !== null && !w.has(pe(f, u.id)) && B(u) > U ? r.overBudget : null);
593
+ }, K = (u) => {
594
+ const b = pe(f, u.id);
595
+ !w.has(b) && x(u) !== null || E((S) => {
596
+ const R = new Map(S);
597
+ return R.has(b) ? R.delete(b) : R.set(b, { ...u, space: f, path: i }), R;
598
+ });
599
+ }, G = (u) => v(ze(i, u.name)), $ = () => v(i.includes("/") ? i.slice(0, i.lastIndexOf("/")) : ""), j = (u) => E((b) => {
600
+ const S = new Map(b);
601
+ return S.delete(u), S;
602
+ }), X = y.status === "ready" ? y.entries : [], me = (u) => {
603
+ const b = X[A];
604
+ if (u.key === "ArrowDown" || u.key === "ArrowUp" || u.key === "Home" || u.key === "End") {
605
+ u.preventDefault();
606
+ const S = X.length - 1, R = u.key === "Home" ? 0 : u.key === "End" ? S : Math.min(S, Math.max(0, A + (u.key === "ArrowDown" ? 1 : -1)));
607
+ V(R), R >= S - 1 && H();
608
+ } else u.key === "Enter" && (b == null ? void 0 : b.kind) === "folder" ? (u.preventDefault(), G(b)) : u.key === " " && (b == null ? void 0 : b.kind) === "file" ? (u.preventDefault(), K(b)) : u.key === "Backspace" && i !== "" && (u.preventDefault(), $());
609
+ }, ce = i === "" ? [] : i.split("/"), ue = ((I = a.find((u) => u.id === f)) == null ? void 0 : I.name) ?? "", ne = (u) => `${T}-entry-${String(u)}`;
610
+ return /* @__PURE__ */ s(
611
+ xe,
612
+ {
613
+ open: n,
614
+ title: r.title,
615
+ onClose: d,
616
+ closeLabel: r.close,
617
+ initialFocus: N,
618
+ className: "cms-file-picker",
619
+ footer: /* @__PURE__ */ s("div", { className: "cms-file-picker__foot", children: [
620
+ /* @__PURE__ */ s("div", { className: "cms-file-picker__summary", "aria-live": "polite", children: [
621
+ L.length > 0 ? /* @__PURE__ */ e("span", { children: r.total(L.length, o(q)) }) : null,
622
+ m !== void 0 && U !== null ? /* @__PURE__ */ e("span", { className: M(_ && "is-over"), children: _ ? r.overBudget : r.left(o(Math.max(0, U)), o(m.limitBytes)) }) : null
623
+ ] }),
624
+ /* @__PURE__ */ s("div", { className: "cms-file-picker__actions", children: [
625
+ /* @__PURE__ */ e(J, { variant: "secondary", onClick: d, children: r.cancel }),
626
+ /* @__PURE__ */ e(J, { variant: "primary", disabled: L.length === 0 || _, onClick: () => h(L), children: r.confirm(L.length) })
627
+ ] })
628
+ ] }),
629
+ children: [
630
+ /* @__PURE__ */ s("div", { className: "cms-file-picker__top", children: [
631
+ a.length > 1 ? /* @__PURE__ */ s("label", { className: "cms-file-picker__space", children: [
632
+ /* @__PURE__ */ e("span", { className: "cms-visually-hidden", children: r.space }),
633
+ /* @__PURE__ */ e("select", { className: "cms-input cms-select", value: f, onChange: (u) => {
634
+ p(u.target.value), v("");
635
+ }, children: a.map((u) => /* @__PURE__ */ e("option", { value: u.id, children: u.name }, u.id)) })
636
+ ] }) : null,
637
+ /* @__PURE__ */ s("nav", { className: "cms-file-picker__path", "aria-label": r.path, children: [
638
+ /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": r.up, disabled: i === "", onClick: $, children: /* @__PURE__ */ e(P, { name: "chevron-left" }) }),
639
+ /* @__PURE__ */ s("ol", { children: [
640
+ /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__crumb", "aria-current": i === "" ? "location" : void 0, onClick: () => v(""), children: ue }) }),
641
+ ce.map((u, b) => {
642
+ const S = ce.slice(0, b + 1).join("/");
643
+ return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__crumb", "aria-current": S === i ? "location" : void 0, onClick: () => v(S), children: u }) }, S);
644
+ })
645
+ ] })
646
+ ] }),
647
+ L.length > 0 ? /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__chip", "aria-expanded": Z, onClick: () => le((u) => !u), children: r.selected(L.length) }) : null
648
+ ] }),
649
+ Z && L.length > 0 ? /* @__PURE__ */ s("div", { className: "cms-file-picker__chosen", children: [
650
+ /* @__PURE__ */ e("ul", { children: [...w.entries()].map(([u, b]) => /* @__PURE__ */ s("li", { children: [
651
+ /* @__PURE__ */ e("span", { className: "cms-file-picker__name", children: b.name }),
652
+ /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": r.remove(b.name), onClick: () => j(u), children: /* @__PURE__ */ e(F, { name: "close" }) })
653
+ ] }, u)) }),
654
+ /* @__PURE__ */ e(J, { variant: "secondary", onClick: () => {
655
+ E(/* @__PURE__ */ new Map()), le(!1);
656
+ }, children: r.clear })
657
+ ] }) : null,
658
+ /* @__PURE__ */ s("div", { className: "cms-file-picker__list", onScroll: (u) => {
659
+ const b = u.currentTarget;
660
+ b.scrollTop + b.clientHeight >= b.scrollHeight - He && H();
661
+ }, children: [
662
+ y.status === "loading" ? /* @__PURE__ */ e(se, { kind: "loading", title: r.loading, placement: "block" }) : null,
663
+ y.status === "error" ? /* @__PURE__ */ e(se, { kind: "error", title: r.error, placement: "block", action: { label: r.retry, onAction: () => O((u) => u + 1) } }) : null,
664
+ y.status === "denied" ? /* @__PURE__ */ e(se, { kind: "denied", title: r.denied, placement: "block" }) : null,
665
+ y.status === "ready" && X.length === 0 ? /* @__PURE__ */ e(se, { kind: "empty", title: r.empty, placement: "block" }) : null,
666
+ /* @__PURE__ */ s(
667
+ "div",
668
+ {
669
+ ref: N,
670
+ role: "listbox",
671
+ "aria-multiselectable": "true",
672
+ "aria-label": r.files,
673
+ "aria-activedescendant": X.length > 0 ? ne(A) : void 0,
674
+ tabIndex: 0,
675
+ className: "cms-file-picker__entries",
676
+ hidden: y.status !== "ready" || X.length === 0,
677
+ onKeyDown: me,
678
+ children: [
679
+ X.map((u, b) => {
680
+ const S = u.kind === "file" && w.has(pe(f, u.id)), R = x(u);
681
+ return /* @__PURE__ */ s(
682
+ "div",
683
+ {
684
+ id: ne(b),
685
+ role: "option",
686
+ "aria-selected": u.kind === "file" ? S : void 0,
687
+ "aria-disabled": R !== null || void 0,
688
+ className: M("cms-file-picker__entry", b === A && "is-active", S && "is-ticked", R !== null && "is-disabled"),
689
+ onClick: () => {
690
+ V(b), u.kind === "folder" ? G(u) : K(u);
691
+ },
692
+ children: [
693
+ /* @__PURE__ */ e("span", { className: "cms-file-picker__tick", "aria-hidden": "true", children: S ? /* @__PURE__ */ e(P, { name: "check" }) : null }),
694
+ /* @__PURE__ */ e(P, { name: u.kind === "folder" ? "folder" : "file" }),
695
+ /* @__PURE__ */ s("span", { className: "cms-file-picker__text", children: [
696
+ /* @__PURE__ */ e("span", { className: "cms-file-picker__name", children: u.name }),
697
+ R !== null ? /* @__PURE__ */ e("span", { className: "cms-file-picker__reason", children: R }) : null
698
+ ] }),
699
+ u.kind === "file" && u.size != null ? /* @__PURE__ */ e("span", { className: "cms-file-picker__size", children: o(u.size) }) : null
700
+ ]
701
+ },
702
+ u.id
703
+ );
704
+ }),
705
+ y.status === "ready" && y.paging ? /* @__PURE__ */ e("div", { className: "cms-file-picker__paging", children: /* @__PURE__ */ e(se, { kind: "loading", title: r.loading, placement: "inline" }) }) : null
706
+ ]
707
+ }
708
+ )
709
+ ] })
710
+ ]
711
+ }
712
+ );
713
+ }
714
+ function hl({ title: l, scope: n, actions: a, backLink: t }) {
715
+ return /* @__PURE__ */ s("header", { className: "cms-page-header", children: [
716
+ t ? /* @__PURE__ */ s(
256
717
  "a",
257
718
  {
258
719
  className: "cms-page-header__back",
259
- href: a.href ?? "#",
260
- onClick: (s) => {
261
- a.onBack && (s.preventDefault(), a.onBack());
720
+ href: t.href ?? "#",
721
+ onClick: (c) => {
722
+ t.onBack && (c.preventDefault(), t.onBack());
262
723
  },
263
724
  children: [
264
- /* @__PURE__ */ t(N, { name: "back" }),
725
+ /* @__PURE__ */ e(F, { name: "back" }),
265
726
  " ",
266
- a.label
727
+ t.label
267
728
  ]
268
729
  }
269
730
  ) : null,
270
- /* @__PURE__ */ v("div", { className: "cms-page-header__row", children: [
271
- /* @__PURE__ */ v("div", { className: "cms-page-header__titles", children: [
272
- /* @__PURE__ */ t("h1", { className: "cms-page-header__title", children: e }),
273
- n != null ? /* @__PURE__ */ t("p", { className: "cms-page-header__scope", children: n }) : null
731
+ /* @__PURE__ */ s("div", { className: "cms-page-header__row", children: [
732
+ /* @__PURE__ */ s("div", { className: "cms-page-header__titles", children: [
733
+ /* @__PURE__ */ e("h1", { className: "cms-page-header__title", children: l }),
734
+ n != null ? /* @__PURE__ */ e("p", { className: "cms-page-header__scope", children: n }) : null
274
735
  ] }),
275
- l != null ? /* @__PURE__ */ t("div", { className: "cms-page-header__actions", children: l }) : null
736
+ a != null ? /* @__PURE__ */ e("div", { className: "cms-page-header__actions", children: a }) : null
276
737
  ] })
277
738
  ] });
278
739
  }
279
- function le({ tabs: e, active: n, onSelect: l, label: a }) {
280
- const s = w([]), m = (i, u) => {
281
- var o;
282
- const d = e.length - 1, f = i.key === "ArrowRight" ? u === d ? 0 : u + 1 : i.key === "ArrowLeft" ? u === 0 ? d : u - 1 : i.key === "Home" ? 0 : i.key === "End" ? d : null;
283
- if (f === null) return;
284
- i.preventDefault();
285
- const r = e[f];
286
- r && (l(r.id), (o = s.current[f]) == null || o.focus());
740
+ function pl({ tabs: l, active: n, onSelect: a, label: t }) {
741
+ const c = z([]), m = (o, r) => {
742
+ var p;
743
+ const h = l.length - 1, d = o.key === "ArrowRight" ? r === h ? 0 : r + 1 : o.key === "ArrowLeft" ? r === 0 ? h : r - 1 : o.key === "Home" ? 0 : o.key === "End" ? h : null;
744
+ if (d === null) return;
745
+ o.preventDefault();
746
+ const f = l[d];
747
+ f && (a(f.id), (p = c.current[d]) == null || p.focus());
287
748
  };
288
- return /* @__PURE__ */ t("div", { className: "cms-tabs", role: "tablist", "aria-label": a, children: e.map((i, u) => {
289
- const d = i.id === n;
290
- return /* @__PURE__ */ v(
749
+ return /* @__PURE__ */ e("div", { className: "cms-tabs", role: "tablist", "aria-label": t, children: l.map((o, r) => {
750
+ const h = o.id === n;
751
+ return /* @__PURE__ */ s(
291
752
  "button",
292
753
  {
293
- ref: (f) => {
294
- s.current[u] = f;
754
+ ref: (d) => {
755
+ c.current[r] = d;
295
756
  },
296
757
  type: "button",
297
758
  role: "tab",
298
- className: _("cms-tab", d && "is-active"),
299
- "aria-selected": d,
300
- tabIndex: d ? 0 : -1,
301
- onClick: () => l(i.id),
302
- onKeyDown: (f) => m(f, u),
759
+ className: M("cms-tab", h && "is-active"),
760
+ "aria-selected": h,
761
+ tabIndex: h ? 0 : -1,
762
+ onClick: () => a(o.id),
763
+ onKeyDown: (d) => m(d, r),
303
764
  children: [
304
- i.label,
305
- i.count !== void 0 ? /* @__PURE__ */ t("span", { className: "cms-tab__count", children: i.count }) : null
765
+ o.label,
766
+ o.count !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-tab__count", children: o.count }) : null
306
767
  ]
307
768
  },
308
- i.id
769
+ o.id
309
770
  );
310
771
  }) });
311
772
  }
312
- function V(e) {
313
- var a;
314
- const n = e.trim().split(/\s+/).filter(Boolean);
315
- return (n.length > 1 ? [n[0][0], n[n.length - 1][0]] : [(a = n[0]) == null ? void 0 : a[0]]).filter(Boolean).join("").toUpperCase();
773
+ function Re(l) {
774
+ var t;
775
+ const n = l.trim().split(/\s+/).filter(Boolean);
776
+ return (n.length > 1 ? [n[0][0], n[n.length - 1][0]] : [(t = n[0]) == null ? void 0 : t[0]]).filter(Boolean).join("").toUpperCase();
316
777
  }
317
- function re({ name: e, pictureUrl: n, presence: l, size: a = 32 }) {
318
- return /* @__PURE__ */ v(
778
+ function Ze(l) {
779
+ let n = 0;
780
+ for (const a of l.trim().toLowerCase())
781
+ n = n * 31 + (a.codePointAt(0) ?? 0) >>> 0;
782
+ return n % 6 + 1;
783
+ }
784
+ function de({ name: l, pictureUrl: n, presence: a, size: t = 32 }) {
785
+ return /* @__PURE__ */ s(
319
786
  "span",
320
787
  {
321
- className: "cms-avatar",
322
- style: { width: a, height: a, fontSize: Math.round(a * 0.4) },
788
+ className: `cms-avatar cms-avatar--tint-${Ze(l)}`,
789
+ style: { width: t, height: t, fontSize: Math.round(t * 0.4) },
323
790
  role: "img",
324
- "aria-label": l ? `${e}, ${l}` : e,
791
+ "aria-label": a ? `${l}, ${a}` : l,
792
+ children: [
793
+ n ? /* @__PURE__ */ e("img", { src: n, alt: "", className: "cms-avatar__picture" }) : /* @__PURE__ */ e("span", { "aria-hidden": "true", children: Re(l) }),
794
+ a ? /* @__PURE__ */ e("span", { className: M("cms-avatar__presence", `is-${a}`), "aria-hidden": "true" }) : null
795
+ ]
796
+ }
797
+ );
798
+ }
799
+ function Oe({ count: l, label: n, max: a = 99 }) {
800
+ return l <= 0 ? null : /* @__PURE__ */ s("span", { className: "cms-badge", children: [
801
+ /* @__PURE__ */ e("span", { "aria-hidden": "true", children: l > a ? `${a}+` : l }),
802
+ /* @__PURE__ */ e("span", { className: "cms-visually-hidden", children: n })
803
+ ] });
804
+ }
805
+ function fl({ product: l, mark: n, rail: a, active: t, onNavigate: c, server: m, search: o, account: r, children: h, railLabel: d = "Sections" }) {
806
+ return /* @__PURE__ */ s("div", { className: "cms-shell", children: [
807
+ /* @__PURE__ */ s("nav", { className: "cms-shell__rail", "aria-label": d, children: [
808
+ /* @__PURE__ */ e("span", { className: "cms-shell__mark", "aria-hidden": "true", children: n }),
809
+ /* @__PURE__ */ e("ul", { className: "cms-shell__items", children: a.map((f) => {
810
+ const p = f.id === t;
811
+ return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ s(
812
+ "a",
813
+ {
814
+ href: f.href,
815
+ className: M("cms-shell__item", p && "is-active"),
816
+ "aria-current": p ? "page" : void 0,
817
+ title: f.label,
818
+ onClick: (i) => {
819
+ c && (i.preventDefault(), c(f.id));
820
+ },
821
+ children: [
822
+ /* @__PURE__ */ s("span", { className: "cms-shell__icon", children: [
823
+ /* @__PURE__ */ e(P, { name: f.icon, size: 22 }),
824
+ f.badge ? /* @__PURE__ */ e(Oe, { count: f.badge.count, label: f.badge.label }) : null
825
+ ] }),
826
+ /* @__PURE__ */ e("span", { className: "cms-shell__label", children: f.label })
827
+ ]
828
+ }
829
+ ) }, f.id);
830
+ }) })
831
+ ] }),
832
+ /* @__PURE__ */ s("header", { className: "cms-shell__top", children: [
833
+ /* @__PURE__ */ e("span", { className: "cms-shell__product", children: l }),
834
+ m != null ? /* @__PURE__ */ e("div", { className: "cms-shell__server", children: m }) : null,
835
+ o != null ? /* @__PURE__ */ e("div", { className: "cms-shell__search", children: o }) : null,
836
+ r != null ? /* @__PURE__ */ e("div", { className: "cms-shell__account", children: r }) : null
837
+ ] }),
838
+ /* @__PURE__ */ e("main", { className: "cms-shell__main", children: h })
839
+ ] });
840
+ }
841
+ function _l({ label: l, placeholder: n, value: a, onChange: t, onSearch: c }) {
842
+ return /* @__PURE__ */ s(
843
+ "form",
844
+ {
845
+ role: "search",
846
+ className: "cms-search",
847
+ onSubmit: (m) => {
848
+ m.preventDefault(), c == null || c(a);
849
+ },
850
+ children: [
851
+ /* @__PURE__ */ e(P, { name: "search", size: 18 }),
852
+ /* @__PURE__ */ e(
853
+ "input",
854
+ {
855
+ className: "cms-search__input",
856
+ type: "search",
857
+ "aria-label": l,
858
+ placeholder: n,
859
+ value: a,
860
+ onChange: (m) => t(m.target.value)
861
+ }
862
+ )
863
+ ]
864
+ }
865
+ );
866
+ }
867
+ function bl({ options: l, value: n, onChange: a, label: t }) {
868
+ const c = z([]), m = (o, r) => {
869
+ var p;
870
+ const h = l.length - 1, d = o.key === "ArrowRight" || o.key === "ArrowDown" ? r === h ? 0 : r + 1 : o.key === "ArrowLeft" || o.key === "ArrowUp" ? r === 0 ? h : r - 1 : null;
871
+ if (d === null) return;
872
+ o.preventDefault();
873
+ const f = l[d];
874
+ f && (a(f.id), (p = c.current[d]) == null || p.focus());
875
+ };
876
+ return /* @__PURE__ */ e("div", { className: "cms-chips", role: "radiogroup", "aria-label": t, children: l.map((o, r) => {
877
+ const h = o.id === n;
878
+ return /* @__PURE__ */ s(
879
+ "button",
880
+ {
881
+ ref: (d) => {
882
+ c.current[r] = d;
883
+ },
884
+ type: "button",
885
+ role: "radio",
886
+ "aria-checked": h,
887
+ tabIndex: h ? 0 : -1,
888
+ className: M("cms-chip", h && "is-on"),
889
+ onClick: () => a(o.id),
890
+ onKeyDown: (d) => m(d, r),
891
+ children: [
892
+ h ? /* @__PURE__ */ e(P, { name: "check", size: 16 }) : null,
893
+ o.label
894
+ ]
895
+ },
896
+ o.id
897
+ );
898
+ }) });
899
+ }
900
+ function vl({ panes: l, active: n, back: a }) {
901
+ const t = Math.min(Math.max(n ?? l.length - 1, 0), l.length - 1);
902
+ return /* @__PURE__ */ e("div", { className: M("cms-panes", l.length === 3 ? "cms-panes--three" : "cms-panes--two"), "data-active": t, children: l.map((c, m) => /* @__PURE__ */ s("section", { className: "cms-panes__pane", "aria-label": c.label, "data-offset": t - m, children: [
903
+ m === t && a ? /* @__PURE__ */ s("a", { className: "cms-panes__back", href: a.href, children: [
904
+ /* @__PURE__ */ e(P, { name: "chevron-left", size: 18 }),
905
+ a.label
906
+ ] }) : null,
907
+ c.content
908
+ ] }, c.label)) });
909
+ }
910
+ const Ve = { attachment: "Has an attachment", unread: "Unread" };
911
+ function gl({ from: l, subject: n, preview: a, time: t, unread: c, hasAttachment: m, selected: o, onOpen: r, labels: h }) {
912
+ const d = te(Ve, h);
913
+ return /* @__PURE__ */ s(
914
+ "button",
915
+ {
916
+ type: "button",
917
+ className: M("cms-mail-row", c && "is-unread", o && "is-selected"),
918
+ "aria-current": o ? "true" : void 0,
919
+ onClick: r,
325
920
  children: [
326
- n ? /* @__PURE__ */ t("img", { src: n, alt: "", className: "cms-avatar__picture" }) : /* @__PURE__ */ t("span", { "aria-hidden": "true", children: V(e) }),
327
- l ? /* @__PURE__ */ t("span", { className: _("cms-avatar__presence", `is-${l}`), "aria-hidden": "true" }) : null
921
+ /* @__PURE__ */ e(de, { name: l, size: 40 }),
922
+ /* @__PURE__ */ s("span", { className: "cms-mail-row__body", children: [
923
+ /* @__PURE__ */ s("span", { className: "cms-mail-row__line", children: [
924
+ /* @__PURE__ */ e("span", { className: "cms-mail-row__from", children: l }),
925
+ m ? /* @__PURE__ */ e(P, { name: "paperclip", size: 16, label: d.attachment }) : null,
926
+ /* @__PURE__ */ e("span", { className: "cms-mail-row__time", children: t })
927
+ ] }),
928
+ /* @__PURE__ */ s("span", { className: "cms-mail-row__line", children: [
929
+ /* @__PURE__ */ e("span", { className: "cms-mail-row__subject", children: n }),
930
+ c ? /* @__PURE__ */ e("span", { className: "cms-mail-row__dot", role: "img", "aria-label": d.unread }) : null
931
+ ] }),
932
+ /* @__PURE__ */ e("span", { className: "cms-mail-row__preview", children: a })
933
+ ] })
328
934
  ]
329
935
  }
330
936
  );
331
937
  }
332
- function ae({ label: e, rows: n, error: l, onRetry: a, loadingText: s = "Loading", emptyTitle: m = "Nothing here yet", emptyHint: i, selected: u, onOpen: d, onRowMenu: f }) {
333
- const r = w([]);
334
- if (l != null) return /* @__PURE__ */ t(R, { message: l, onRetry: a });
335
- if (n === null) return /* @__PURE__ */ t(q, { what: s, layout: "block" });
336
- if (n.length === 0) return /* @__PURE__ */ t(F, { title: m, hint: i });
337
- const o = (c, g, p) => {
338
- var h;
339
- if (c.key === "ArrowDown" || c.key === "ArrowUp")
340
- c.preventDefault(), (h = r.current[Math.min(n.length - 1, Math.max(0, g + (c.key === "ArrowDown" ? 1 : -1)))]) == null || h.focus();
341
- else if (c.key === "Enter")
342
- d == null || d(p);
343
- else if ((c.key === "ContextMenu" || c.shiftKey && c.key === "F10") && f) {
344
- c.preventDefault();
345
- const y = c.currentTarget.getBoundingClientRect();
346
- f(p, { x: y.left + 16, y: y.bottom });
938
+ function Nl({ direction: l, children: n, time: a, read: t, readLabel: c = "Read" }) {
939
+ return /* @__PURE__ */ s("div", { className: M("cms-bubble", `cms-bubble--${l}`), children: [
940
+ /* @__PURE__ */ e("div", { className: "cms-bubble__text", children: n }),
941
+ /* @__PURE__ */ s("div", { className: "cms-bubble__meta", children: [
942
+ a,
943
+ l === "out" && t ? /* @__PURE__ */ s(C, { children: [
944
+ " · ",
945
+ c
946
+ ] }) : null
947
+ ] })
948
+ ] });
949
+ }
950
+ function yl({ label: l, value: n, onChange: a, onSend: t, onAttach: c, placeholder: m, variant: o = "chat", sendLabel: r = "Send", attachLabel: h = "Attach a file", leading: d, canSend: f }) {
951
+ const p = Q(), i = f ?? n.trim() !== "", v = (g) => {
952
+ g.preventDefault(), i && t();
953
+ }, y = c ? /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button cms-composer__attach", "aria-label": h, onClick: c, children: /* @__PURE__ */ e(P, { name: "paperclip" }) }) : null;
954
+ return /* @__PURE__ */ s("form", { className: M("cms-composer", `cms-composer--${o}`), onSubmit: v, children: [
955
+ /* @__PURE__ */ e("label", { htmlFor: p, className: o === "reply" ? "cms-composer__title" : "cms-visually-hidden", children: l }),
956
+ o === "chat" ? y : null,
957
+ /* @__PURE__ */ e(
958
+ "textarea",
959
+ {
960
+ id: p,
961
+ className: "cms-composer__input",
962
+ rows: o === "reply" ? 3 : 1,
963
+ placeholder: m,
964
+ value: n,
965
+ onChange: (g) => a(g.target.value),
966
+ onKeyDown: (g) => {
967
+ g.nativeEvent.isComposing || g.keyCode === 229 || o === "chat" && g.key === "Enter" && !g.shiftKey && (g.preventDefault(), i && t());
968
+ }
969
+ }
970
+ ),
971
+ o === "reply" && d !== void 0 ? /* @__PURE__ */ e("div", { className: "cms-composer__leading", children: d }) : null,
972
+ o === "reply" ? y : null,
973
+ o === "chat" ? /* @__PURE__ */ e("button", { type: "submit", className: "cms-composer__send-round", "aria-label": r, disabled: !i, children: /* @__PURE__ */ e(P, { name: "send" }) }) : /* @__PURE__ */ s("button", { type: "submit", className: "cms-button cms-button--chrome cms-composer__send", disabled: !i, children: [
974
+ r,
975
+ " ",
976
+ /* @__PURE__ */ e(P, { name: "send", size: 18 })
977
+ ] })
978
+ ] });
979
+ }
980
+ const ve = {
981
+ incomingAudio: "Incoming audio call",
982
+ incomingVideo: "Incoming video call",
983
+ incomingFrom: (l, n) => `${l} from ${n}`,
984
+ accept: "Accept",
985
+ decline: "Decline",
986
+ callWith: (l) => `Call with ${l}`,
987
+ callTime: (l) => `Call time ${l}`,
988
+ goodConnection: "Good connection",
989
+ poorConnection: "Poor connection",
990
+ you: "You",
991
+ speaking: "Speaking",
992
+ mute: "Mute",
993
+ unmute: "Unmute",
994
+ speaker: "Speaker",
995
+ addPerson: "Add person",
996
+ chat: "Chat",
997
+ hangUp: "Hang up",
998
+ onCallWith: (l) => `On a call with ${l}`,
999
+ returnToCall: "Return to call"
1000
+ };
1001
+ function wl({ name: l, media: n, onAccept: a, onDecline: t, labels: c }) {
1002
+ const m = te(ve, c), o = n === "video" ? m.incomingVideo : m.incomingAudio;
1003
+ return /* @__PURE__ */ s("div", { className: "cms-call-incoming", role: "alertdialog", "aria-label": m.incomingFrom(o, l), children: [
1004
+ /* @__PURE__ */ e("span", { className: "cms-call-incoming__ring", "aria-hidden": "true", children: /* @__PURE__ */ e(de, { name: l, size: 112 }) }),
1005
+ /* @__PURE__ */ e("p", { className: "cms-call-incoming__name", children: l }),
1006
+ /* @__PURE__ */ e("p", { className: "cms-call-incoming__what", children: o }),
1007
+ /* @__PURE__ */ s("div", { className: "cms-call-incoming__actions", children: [
1008
+ /* @__PURE__ */ e(ee, { icon: "phone-off", label: m.decline, tone: "hang-up", onClick: t }),
1009
+ /* @__PURE__ */ e(ee, { icon: "phone", label: m.accept, tone: "accept", onClick: a })
1010
+ ] })
1011
+ ] });
1012
+ }
1013
+ function ee({ icon: l, label: n, onClick: a, tone: t = "plain", pressed: c }) {
1014
+ return /* @__PURE__ */ s(
1015
+ "button",
1016
+ {
1017
+ type: "button",
1018
+ className: M("cms-call-button", `cms-call-button--${t}`, c && "is-pressed"),
1019
+ "aria-pressed": c,
1020
+ onClick: a,
1021
+ children: [
1022
+ /* @__PURE__ */ e("span", { className: "cms-call-button__disc", children: /* @__PURE__ */ e(P, { name: l, size: 24 }) }),
1023
+ /* @__PURE__ */ e("span", { className: "cms-call-button__label", children: n })
1024
+ ]
1025
+ }
1026
+ );
1027
+ }
1028
+ function kl({ name: l, duration: n, connection: a, you: t, muted: c, speaker: m, onToggleMute: o, onToggleSpeaker: r, onAddPerson: h, onChat: d, onHangUp: f, labels: p }) {
1029
+ const i = te(ve, p);
1030
+ return /* @__PURE__ */ s("section", { className: "cms-call-panel", "aria-label": i.callWith(l), children: [
1031
+ /* @__PURE__ */ s("div", { className: "cms-call-panel__head", children: [
1032
+ /* @__PURE__ */ e(de, { name: l, size: 64 }),
1033
+ /* @__PURE__ */ s("div", { className: "cms-call-panel__who", children: [
1034
+ /* @__PURE__ */ e("p", { className: "cms-call-panel__name", children: l }),
1035
+ /* @__PURE__ */ e("p", { className: "cms-call-panel__time", "aria-label": i.callTime(n), children: n })
1036
+ ] }),
1037
+ /* @__PURE__ */ e("span", { className: M("cms-pill", a === "good" ? "cms-pill--success" : "cms-pill--warning"), children: a === "good" ? i.goodConnection : i.poorConnection })
1038
+ ] }),
1039
+ /* @__PURE__ */ s("div", { className: "cms-call-panel__you", children: [
1040
+ /* @__PURE__ */ e(de, { name: t.name, size: 36 }),
1041
+ /* @__PURE__ */ e("span", { children: i.you }),
1042
+ t.speaking ? /* @__PURE__ */ e("span", { className: "cms-call-panel__level", role: "img", "aria-label": i.speaking }) : null
1043
+ ] }),
1044
+ /* @__PURE__ */ s("div", { className: "cms-call-panel__controls", children: [
1045
+ /* @__PURE__ */ e(ee, { icon: "mic", label: c ? i.unmute : i.mute, pressed: c, onClick: o }),
1046
+ /* @__PURE__ */ e(ee, { icon: "speaker", label: i.speaker, pressed: m, onClick: r }),
1047
+ h ? /* @__PURE__ */ e(ee, { icon: "user-plus", label: i.addPerson, onClick: h }) : null,
1048
+ d ? /* @__PURE__ */ e(ee, { icon: "chat", label: i.chat, onClick: d }) : null,
1049
+ /* @__PURE__ */ e(ee, { icon: "phone-off", label: i.hangUp, tone: "hang-up", onClick: f })
1050
+ ] })
1051
+ ] });
1052
+ }
1053
+ function xl({ name: l, duration: n, muted: a, onToggleMute: t, onReturn: c, onHangUp: m, labels: o }) {
1054
+ const r = te(ve, o);
1055
+ return /* @__PURE__ */ s("section", { className: "cms-call-bar", "aria-label": r.callWith(l), children: [
1056
+ /* @__PURE__ */ e("span", { className: "cms-call-bar__live", "aria-hidden": "true" }),
1057
+ /* @__PURE__ */ e("span", { className: "cms-call-bar__name", children: r.onCallWith(l) }),
1058
+ /* @__PURE__ */ e("span", { className: "cms-call-bar__time", children: n }),
1059
+ /* @__PURE__ */ s("span", { className: "cms-call-bar__actions", children: [
1060
+ /* @__PURE__ */ e("button", { type: "button", className: "cms-call-bar__icon", "aria-label": a ? r.unmute : r.mute, "aria-pressed": a, onClick: t, children: /* @__PURE__ */ e(P, { name: "mic" }) }),
1061
+ /* @__PURE__ */ e("button", { type: "button", className: "cms-button cms-button--primary", onClick: c, children: r.returnToCall }),
1062
+ /* @__PURE__ */ e("button", { type: "button", className: "cms-call-bar__icon cms-call-bar__icon--hang-up", "aria-label": r.hangUp, onClick: m, children: /* @__PURE__ */ e(P, { name: "phone-off" }) })
1063
+ ] })
1064
+ ] });
1065
+ }
1066
+ function Cl({ mark: l, product: n, headline: a, lead: t, features: c = [], children: m }) {
1067
+ return /* @__PURE__ */ s("div", { className: "cms-signin", children: [
1068
+ /* @__PURE__ */ s("aside", { className: "cms-signin__brand", children: [
1069
+ /* @__PURE__ */ s("p", { className: "cms-signin__logo", children: [
1070
+ /* @__PURE__ */ e("span", { className: "cms-signin__mark", "aria-hidden": "true", children: l }),
1071
+ n
1072
+ ] }),
1073
+ /* @__PURE__ */ s("div", { className: "cms-signin__pitch", children: [
1074
+ /* @__PURE__ */ e("p", { className: "cms-signin__headline", children: a }),
1075
+ /* @__PURE__ */ e("p", { className: "cms-signin__lead", children: t }),
1076
+ c.length ? /* @__PURE__ */ e("ul", { className: "cms-signin__features", children: c.map((o) => /* @__PURE__ */ s("li", { children: [
1077
+ /* @__PURE__ */ e(P, { name: o.icon, size: 18 }),
1078
+ o.label
1079
+ ] }, o.label)) }) : null
1080
+ ] })
1081
+ ] }),
1082
+ /* @__PURE__ */ e("main", { className: "cms-signin__form", children: m })
1083
+ ] });
1084
+ }
1085
+ const Ue = {
1086
+ title: "Sign in",
1087
+ identifier: "Email or username",
1088
+ identifierPlaceholder: "name@example.com",
1089
+ password: "Password",
1090
+ show: "Show",
1091
+ hide: "Hide",
1092
+ forgot: "Forgot password?",
1093
+ submit: "Sign in",
1094
+ newHere: "New here?",
1095
+ create: "Create an account"
1096
+ };
1097
+ function Ml({ server: l, onSubmit: n, forgotHref: a, createHref: t, error: c, busy: m, labels: o }) {
1098
+ const r = te(Ue, o), h = Q(), [d, f] = D(""), [p, i] = D(""), [v, y] = D(!1);
1099
+ return /* @__PURE__ */ s("form", { className: "cms-signin-form", onSubmit: (k) => {
1100
+ k.preventDefault(), n(d, p);
1101
+ }, "aria-describedby": c ? `${h}-error` : void 0, children: [
1102
+ /* @__PURE__ */ e("h1", { className: "cms-signin-form__title", children: r.title }),
1103
+ /* @__PURE__ */ s("p", { className: "cms-signin-form__server", children: [
1104
+ /* @__PURE__ */ e(P, { name: "server", size: 18 }),
1105
+ l
1106
+ ] }),
1107
+ /* @__PURE__ */ e("label", { className: "cms-signin-form__label", htmlFor: `${h}-identifier`, children: r.identifier }),
1108
+ /* @__PURE__ */ e(
1109
+ "input",
1110
+ {
1111
+ id: `${h}-identifier`,
1112
+ className: "cms-signin-form__input",
1113
+ type: "text",
1114
+ autoComplete: "username",
1115
+ placeholder: r.identifierPlaceholder,
1116
+ value: d,
1117
+ onChange: (k) => f(k.target.value),
1118
+ required: !0
1119
+ }
1120
+ ),
1121
+ /* @__PURE__ */ e("label", { className: "cms-signin-form__label", htmlFor: `${h}-password`, children: r.password }),
1122
+ /* @__PURE__ */ s("span", { className: "cms-signin-form__password", children: [
1123
+ /* @__PURE__ */ e(
1124
+ "input",
1125
+ {
1126
+ id: `${h}-password`,
1127
+ className: "cms-signin-form__input",
1128
+ type: v ? "text" : "password",
1129
+ autoComplete: "current-password",
1130
+ value: p,
1131
+ onChange: (k) => i(k.target.value),
1132
+ required: !0
1133
+ }
1134
+ ),
1135
+ /* @__PURE__ */ e("button", { type: "button", className: "cms-signin-form__show", "aria-pressed": v, onClick: () => y((k) => !k), children: v ? r.hide : r.show })
1136
+ ] }),
1137
+ a ? /* @__PURE__ */ e("a", { className: "cms-signin-form__forgot", href: a, children: r.forgot }) : null,
1138
+ c ? /* @__PURE__ */ e("p", { id: `${h}-error`, className: "cms-signin-form__error", role: "alert", children: c }) : null,
1139
+ /* @__PURE__ */ e("button", { type: "submit", className: "cms-button cms-button--chrome cms-signin-form__submit", disabled: m, "aria-busy": m || void 0, children: r.submit }),
1140
+ t ? /* @__PURE__ */ s(C, { children: [
1141
+ /* @__PURE__ */ e("p", { className: "cms-signin-form__or", children: /* @__PURE__ */ e("span", { children: r.newHere }) }),
1142
+ /* @__PURE__ */ e("a", { className: "cms-button cms-signin-form__create", href: t, children: r.create })
1143
+ ] }) : null
1144
+ ] });
1145
+ }
1146
+ function Al({ label: l, rows: n, error: a, onRetry: t, loadingText: c = "Loading", emptyTitle: m = "Nothing here yet", emptyHint: o, selected: r, onOpen: h, onRowMenu: d }) {
1147
+ const f = z([]);
1148
+ if (a != null) return /* @__PURE__ */ e(Ee, { message: a, onRetry: t });
1149
+ if (n === null) return /* @__PURE__ */ e(Se, { what: c, layout: "block" });
1150
+ if (n.length === 0) return /* @__PURE__ */ e(De, { title: m, hint: o });
1151
+ const p = (i, v, y) => {
1152
+ var g;
1153
+ if (i.key === "ArrowDown" || i.key === "ArrowUp")
1154
+ i.preventDefault(), (g = f.current[Math.min(n.length - 1, Math.max(0, v + (i.key === "ArrowDown" ? 1 : -1)))]) == null || g.focus();
1155
+ else if (i.key === "Enter")
1156
+ h == null || h(y);
1157
+ else if ((i.key === "ContextMenu" || i.shiftKey && i.key === "F10") && d) {
1158
+ i.preventDefault();
1159
+ const k = i.currentTarget.getBoundingClientRect();
1160
+ d(y, { x: k.left + 16, y: k.bottom });
347
1161
  }
348
1162
  };
349
- return /* @__PURE__ */ t("ul", { className: "cms-list", role: "listbox", "aria-label": e, children: n.map((c, g) => {
350
- const p = c.id === u;
351
- return /* @__PURE__ */ v(
1163
+ return /* @__PURE__ */ e("ul", { className: "cms-list", role: "listbox", "aria-label": l, children: n.map((i, v) => {
1164
+ const y = i.id === r;
1165
+ return /* @__PURE__ */ s(
352
1166
  "li",
353
1167
  {
354
- ref: (h) => {
355
- r.current[g] = h;
1168
+ ref: (g) => {
1169
+ f.current[v] = g;
356
1170
  },
357
1171
  role: "option",
358
- "aria-selected": p,
359
- tabIndex: p || u == null && g === 0 ? 0 : -1,
360
- className: _("cms-list__row", p && "is-selected"),
361
- onClick: () => d == null ? void 0 : d(c.id),
362
- onKeyDown: (h) => o(h, g, c.id),
363
- onContextMenu: f ? (h) => {
364
- h.preventDefault(), f(c.id, { x: h.clientX, y: h.clientY });
1172
+ "aria-selected": y,
1173
+ tabIndex: y || r == null && v === 0 ? 0 : -1,
1174
+ className: M("cms-list__row", y && "is-selected"),
1175
+ onClick: () => h == null ? void 0 : h(i.id),
1176
+ onKeyDown: (g) => p(g, v, i.id),
1177
+ onContextMenu: d ? (g) => {
1178
+ g.preventDefault(), d(i.id, { x: g.clientX, y: g.clientY });
365
1179
  } : void 0,
366
1180
  children: [
367
- c.lead != null ? /* @__PURE__ */ t("span", { className: "cms-list__lead", children: c.lead }) : null,
368
- /* @__PURE__ */ v("span", { className: "cms-list__text", children: [
369
- /* @__PURE__ */ t("span", { className: "cms-list__primary", children: c.primary }),
370
- c.secondary != null ? /* @__PURE__ */ t("span", { className: "cms-list__secondary", children: c.secondary }) : null
1181
+ i.lead != null ? /* @__PURE__ */ e("span", { className: "cms-list__lead", children: i.lead }) : null,
1182
+ /* @__PURE__ */ s("span", { className: "cms-list__text", children: [
1183
+ /* @__PURE__ */ e("span", { className: "cms-list__primary", children: i.primary }),
1184
+ i.secondary != null ? /* @__PURE__ */ e("span", { className: "cms-list__secondary", children: i.secondary }) : null
371
1185
  ] }),
372
- c.meta != null ? /* @__PURE__ */ t("span", { className: "cms-list__meta", children: c.meta }) : null
1186
+ i.meta != null ? /* @__PURE__ */ e("span", { className: "cms-list__meta", children: i.meta }) : null
373
1187
  ]
374
1188
  },
375
- c.id
1189
+ i.id
376
1190
  );
377
1191
  }) });
378
1192
  }
379
- function se({ at: e, items: n, onClose: l, label: a = "Actions" }) {
380
- const s = w(null), m = w(null), [i, u] = k(e), d = n.filter((r) => r.offer.offered);
381
- if (B(() => {
382
- if (!e) return;
383
- const r = s.current, o = (r == null ? void 0 : r.offsetWidth) ?? 0, c = (r == null ? void 0 : r.offsetHeight) ?? 0;
384
- u({ x: Math.max(0, Math.min(e.x, window.innerWidth - o)), y: Math.max(0, Math.min(e.y, window.innerHeight - c)) });
385
- }, [e]), x(() => {
386
- var o, c;
387
- if (!e) return;
388
- m.current = document.activeElement, (c = (o = s.current) == null ? void 0 : o.querySelector('[role="menuitem"]:not([aria-disabled="true"])')) == null || c.focus();
389
- const r = (g) => {
390
- var p;
391
- (p = s.current) != null && p.contains(g.target) || l();
1193
+ function je({ at: l, items: n, onClose: a, label: t = "Actions", focus: c = "first" }) {
1194
+ const m = z(null), o = z(null), [r, h] = D(l), d = n.filter((p) => p.offer.offered);
1195
+ if (ye(() => {
1196
+ if (!l) return;
1197
+ const p = m.current, i = (p == null ? void 0 : p.offsetWidth) ?? 0, v = (p == null ? void 0 : p.offsetHeight) ?? 0;
1198
+ h({ x: Math.max(0, Math.min(l.x, window.innerWidth - i)), y: Math.max(0, Math.min(l.y, window.innerHeight - v)) });
1199
+ }, [l]), W(() => {
1200
+ var v, y;
1201
+ if (!l) return;
1202
+ o.current = document.activeElement;
1203
+ const p = Array.from(((v = m.current) == null ? void 0 : v.querySelectorAll('[role="menuitem"]:not([aria-disabled="true"])')) ?? []);
1204
+ (y = c === "last" ? p[p.length - 1] : p[0]) == null || y.focus();
1205
+ const i = (g) => {
1206
+ var k;
1207
+ (k = m.current) != null && k.contains(g.target) || a();
392
1208
  };
393
- return document.addEventListener("mousedown", r), () => {
394
- var g, p;
395
- document.removeEventListener("mousedown", r), (p = (g = m.current) == null ? void 0 : g.focus) == null || p.call(g);
1209
+ return document.addEventListener("mousedown", i), () => {
1210
+ var g, k;
1211
+ document.removeEventListener("mousedown", i), (k = (g = o.current) == null ? void 0 : g.focus) == null || k.call(g);
396
1212
  };
397
- }, [e, l]), !e || d.length === 0) return null;
398
- const f = (r) => {
399
- var g, p;
400
- const o = Array.from(((g = s.current) == null ? void 0 : g.querySelectorAll('[role="menuitem"]')) ?? []), c = o.indexOf(document.activeElement);
401
- if (r.key === "Escape" || r.key === "Tab")
402
- r.preventDefault(), l();
403
- else if (r.key === "ArrowDown" || r.key === "ArrowUp") {
404
- r.preventDefault();
405
- const h = r.key === "ArrowDown" ? 1 : -1;
406
- (p = o[(c + h + o.length) % o.length]) == null || p.focus();
1213
+ }, [l, a, c]), !l || d.length === 0) return null;
1214
+ const f = (p) => {
1215
+ var y, g;
1216
+ const i = Array.from(((y = m.current) == null ? void 0 : y.querySelectorAll('[role="menuitem"]')) ?? []), v = i.indexOf(document.activeElement);
1217
+ if (p.key === "Escape" || p.key === "Tab")
1218
+ p.preventDefault(), a();
1219
+ else if (p.key === "ArrowDown" || p.key === "ArrowUp") {
1220
+ p.preventDefault();
1221
+ const k = p.key === "ArrowDown" ? 1 : -1;
1222
+ (g = i[(v + k + i.length) % i.length]) == null || g.focus();
407
1223
  }
408
1224
  };
409
- return C(
410
- /* @__PURE__ */ t(
1225
+ return be(
1226
+ /* @__PURE__ */ e(
411
1227
  "div",
412
1228
  {
413
- ref: s,
1229
+ ref: m,
414
1230
  className: "cms-menu",
415
1231
  role: "menu",
416
- "aria-label": a,
417
- style: { left: (i ?? e).x, top: (i ?? e).y },
1232
+ "aria-label": t,
1233
+ style: { left: (r ?? l).x, top: (r ?? l).y },
418
1234
  onKeyDown: f,
419
- onContextMenu: (r) => r.preventDefault(),
420
- children: d.map((r) => {
421
- const o = r.offer.refusal !== void 0;
422
- return /* @__PURE__ */ v(
1235
+ onContextMenu: (p) => p.preventDefault(),
1236
+ children: d.map((p) => {
1237
+ const i = p.offer.refusal !== void 0;
1238
+ return /* @__PURE__ */ s(
423
1239
  "div",
424
1240
  {
425
1241
  role: "menuitem",
426
1242
  tabIndex: -1,
427
- "aria-disabled": o || void 0,
428
- title: o ? r.offer.refusal : void 0,
429
- className: _("cms-menu__item", r.danger && "is-danger", r.offer.locked && "is-locked", o && "is-refused"),
1243
+ "aria-disabled": i || void 0,
1244
+ title: i ? p.offer.refusal : void 0,
1245
+ className: M("cms-menu__item", p.danger && "is-danger", p.offer.locked && "is-locked", i && "is-refused"),
430
1246
  onClick: () => {
431
- o || (l(), r.onSelect());
1247
+ i || (a(), p.onSelect());
432
1248
  },
433
- onKeyDown: (c) => {
434
- (c.key === "Enter" || c.key === " ") && !o && (c.preventDefault(), l(), r.onSelect());
1249
+ onKeyDown: (v) => {
1250
+ (v.key === "Enter" || v.key === " ") && !i && (v.preventDefault(), a(), p.onSelect());
435
1251
  },
436
1252
  children: [
437
- r.offer.locked ? /* @__PURE__ */ t(N, { name: "lock" }) : null,
438
- /* @__PURE__ */ t("span", { className: "cms-menu__label", children: r.label }),
439
- o ? /* @__PURE__ */ t("span", { className: "cms-menu__refusal", children: r.offer.refusal }) : null
1253
+ p.offer.locked ? /* @__PURE__ */ e(F, { name: "lock" }) : null,
1254
+ /* @__PURE__ */ e("span", { className: "cms-menu__label", children: p.label }),
1255
+ i ? /* @__PURE__ */ e("span", { className: "cms-menu__refusal", children: p.offer.refusal }) : null
440
1256
  ]
441
1257
  },
442
- r.id
1258
+ p.id
443
1259
  );
444
1260
  })
445
1261
  }
@@ -447,13 +1263,191 @@ function se({ at: e, items: n, onClose: l, label: a = "Actions" }) {
447
1263
  document.body
448
1264
  );
449
1265
  }
450
- function j(e) {
451
- return e === "allowed" || e === "elevate" || e === "denied";
1266
+ const Ne = { labels: !0, hidden: /* @__PURE__ */ new Set() };
1267
+ function We(l) {
1268
+ const n = /* @__PURE__ */ new Map();
1269
+ for (const a of l) n.set(a.group, [...n.get(a.group) ?? [], a]);
1270
+ return [...n.values()];
1271
+ }
1272
+ function qe(l) {
1273
+ const n = /* @__PURE__ */ new Map();
1274
+ for (const a of l) a.overflow !== void 0 && n.set(a.overflow, [...n.get(a.overflow) ?? [], a.id]);
1275
+ return [...n.entries()].sort(([a], [t]) => a - t).map(([, a]) => a);
452
1276
  }
453
- function ce(e, n) {
454
- if (!j(e))
1277
+ function Sl({ label: l, actions: n, onAction: a, status: t, moreLabel: c, leading: m }) {
1278
+ const o = z(null), r = z(null), [h, d] = D(Ne), [f, p] = D(null), [i, v] = D("first"), [y, g] = D(null), [k, O] = D(null), w = We(n), E = qe(n), A = w.flat(), V = JSON.stringify([n.map((_) => [_.id, _.label, _.icon, _.group, _.overflow ?? null]), t ?? "", m !== void 0]), Z = ie(() => {
1279
+ const _ = o.current, x = r.current;
1280
+ if (_ === null || x === null) return;
1281
+ const K = getComputedStyle(_), G = parseFloat(K.columnGap || "0") || 0, $ = _.clientWidth - (parseFloat(K.paddingLeft) || 0) - (parseFloat(K.paddingRight) || 0), j = (I) => {
1282
+ var u;
1283
+ return ((u = x.querySelector(I)) == null ? void 0 : u.getBoundingClientRect().width) ?? 0;
1284
+ }, X = j('[data-measure="leading"]'), me = j('[data-measure="separator"]'), ce = j('[data-measure="more"]'), ue = (I, u) => j(`[data-measure="${u ? "full" : "icon"}"][data-measure-action="${CSS.escape(I)}"]`), ne = (I, u) => {
1285
+ const b = w.map((ae) => ae.filter((he) => !u.has(he.id))).filter((ae) => ae.length > 0), S = b.flat(), R = S.length + (b.length - 1) + (u.size > 0 ? 1 : 0) + (X > 0 ? 1 : 0);
1286
+ return X + S.reduce((ae, he) => ae + ue(he.id, I), 0) + me * Math.max(0, b.length - 1) + (u.size > 0 ? ce : 0) + G * Math.max(0, R - 1);
1287
+ };
1288
+ let Y;
1289
+ if (ne(!0, /* @__PURE__ */ new Set()) <= $) Y = Ne;
1290
+ else if (ne(!1, /* @__PURE__ */ new Set()) <= $) Y = { labels: !1, hidden: /* @__PURE__ */ new Set() };
1291
+ else {
1292
+ const I = /* @__PURE__ */ new Set();
1293
+ for (const u of E) {
1294
+ for (const b of u) A.some((S) => S.id === b) && I.add(b);
1295
+ if (I.size >= 2 && ne(!1, I) <= $) break;
1296
+ }
1297
+ Y = { labels: !1, hidden: I.size >= 2 ? I : /* @__PURE__ */ new Set() };
1298
+ }
1299
+ d((I) => I.labels === Y.labels && [...I.hidden].join() === [...Y.hidden].join() ? I : Y);
1300
+ }, [V]);
1301
+ ye(Z, [Z]), W(() => {
1302
+ const _ = o.current;
1303
+ if (_ === null || typeof ResizeObserver > "u") return;
1304
+ const x = new ResizeObserver(() => Z());
1305
+ return x.observe(_), () => x.disconnect();
1306
+ }, [Z]);
1307
+ const N = w.map((_) => _.filter((x) => !h.hidden.has(x.id))).filter((_) => _.length > 0).flat(), T = E.flat().map((_) => A.find((x) => x.id === _)).filter((_) => _ !== void 0 && h.hidden.has(_.id)), H = new Set(A.filter((_) => !E.some((x) => x.includes(_.id))).map((_) => _.id)), B = [...N.map((_) => _.id), ...T.length > 0 ? ["more"] : []], L = y !== null && B.includes(y) ? y : B[0] ?? null, q = (_) => {
1308
+ var $, j;
1309
+ const x = B.indexOf(L ?? "");
1310
+ let K = null;
1311
+ if (_.key === "ArrowRight" ? K = Math.min(B.length - 1, x + 1) : _.key === "ArrowLeft" ? K = Math.max(0, x - 1) : _.key === "Home" ? K = 0 : _.key === "End" ? K = B.length - 1 : _.key === "Escape" && O(L), K === null) return;
1312
+ _.preventDefault();
1313
+ const G = B[K] ?? null;
1314
+ g(G), (j = ($ = o.current) == null ? void 0 : $.querySelector(`[data-stop="${CSS.escape(G ?? "")}"]`)) == null || j.focus();
1315
+ }, U = T.map((_) => ({
1316
+ id: _.id,
1317
+ label: /* @__PURE__ */ s(C, { children: [
1318
+ /* @__PURE__ */ e(re, { name: _.icon }),
1319
+ _.label
1320
+ ] }),
1321
+ offer: _.disabled ? { offered: !0, locked: !1, refusal: _.reason ?? "" } : { offered: !0, locked: !1 },
1322
+ ..._.danger ? { danger: !0 } : {},
1323
+ onSelect: () => {
1324
+ !_.disabled && !_.busy && a(_.id);
1325
+ }
1326
+ }));
1327
+ return /* @__PURE__ */ s(
1328
+ "div",
1329
+ {
1330
+ ref: o,
1331
+ role: "toolbar",
1332
+ "aria-label": l,
1333
+ className: M("cms-pane-toolbar", !h.labels && "cms-pane-toolbar--labels-hidden"),
1334
+ onKeyDown: q,
1335
+ children: [
1336
+ m !== void 0 ? /* @__PURE__ */ e("div", { className: "cms-pane-toolbar__leading", children: m }) : null,
1337
+ w.map((_, x) => {
1338
+ const K = _.filter(($) => !h.hidden.has($.id)), G = w.slice(0, x).some(($) => $.some((j) => !h.hidden.has(j.id)));
1339
+ return /* @__PURE__ */ s("div", { className: "cms-pane-toolbar__group-wrap", children: [
1340
+ K.length > 0 && G ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__separator", role: "separator", "aria-orientation": "vertical" }) : null,
1341
+ /* @__PURE__ */ e("div", { className: "cms-pane-toolbar__group", hidden: K.length === 0, children: _.map(($) => /* @__PURE__ */ e(
1342
+ Ge,
1343
+ {
1344
+ action: $,
1345
+ labels: h.labels,
1346
+ overflowed: h.hidden.has($.id),
1347
+ pinned: H.has($.id),
1348
+ tabbable: L === $.id,
1349
+ tipOff: k === $.id,
1350
+ onChoose: () => a($.id),
1351
+ onFocus: () => {
1352
+ g($.id), O(null);
1353
+ }
1354
+ },
1355
+ $.id
1356
+ )) })
1357
+ ] }, x);
1358
+ }),
1359
+ T.length > 0 ? /* @__PURE__ */ e(
1360
+ "button",
1361
+ {
1362
+ type: "button",
1363
+ className: "cms-icon-button cms-pane-toolbar__more",
1364
+ "data-stop": "more",
1365
+ "aria-label": c,
1366
+ title: c,
1367
+ "aria-haspopup": "menu",
1368
+ "aria-expanded": f !== null,
1369
+ tabIndex: L === "more" ? 0 : -1,
1370
+ onFocus: () => g("more"),
1371
+ onClick: (_) => {
1372
+ const x = _.currentTarget.getBoundingClientRect();
1373
+ v("first"), p(f === null ? { x: x.left, y: x.bottom } : null);
1374
+ },
1375
+ onKeyDown: (_) => {
1376
+ if (_.key === "ArrowDown" || _.key === "ArrowUp") {
1377
+ _.preventDefault(), _.stopPropagation();
1378
+ const x = _.currentTarget.getBoundingClientRect();
1379
+ v(_.key === "ArrowUp" ? "last" : "first"), p({ x: x.left, y: x.bottom });
1380
+ }
1381
+ },
1382
+ children: /* @__PURE__ */ e(P, { name: "more" })
1383
+ }
1384
+ ) : null,
1385
+ t !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__status", title: t, children: t }) : null,
1386
+ /* @__PURE__ */ e(je, { at: f, items: U, onClose: () => p(null), label: c, focus: i }),
1387
+ /* @__PURE__ */ s("div", { ref: r, className: "cms-pane-toolbar__measure", "aria-hidden": "true", children: [
1388
+ m !== void 0 ? /* @__PURE__ */ e("div", { "data-measure": "leading", children: m }) : null,
1389
+ /* @__PURE__ */ e("span", { "data-measure": "separator", className: "cms-pane-toolbar__separator" }),
1390
+ /* @__PURE__ */ e("span", { "data-measure": "more", className: "cms-icon-button cms-pane-toolbar__more", children: /* @__PURE__ */ e(P, { name: "more" }) }),
1391
+ A.map((_) => /* @__PURE__ */ s("span", { children: [
1392
+ /* @__PURE__ */ s("span", { "data-measure": "full", "data-measure-action": _.id, className: "cms-pane-toolbar__action", children: [
1393
+ /* @__PURE__ */ e(re, { name: _.icon }),
1394
+ /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__label", children: _.label })
1395
+ ] }),
1396
+ /* @__PURE__ */ e("span", { "data-measure": "icon", "data-measure-action": _.id, className: M("cms-pane-toolbar__action", oe(_.icon) !== null && "cms-pane-toolbar__action--icon"), children: oe(_.icon) !== null ? /* @__PURE__ */ e(re, { name: _.icon }) : /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__label", children: _.label }) })
1397
+ ] }, _.id))
1398
+ ] })
1399
+ ]
1400
+ }
1401
+ );
1402
+ }
1403
+ function Ge({ action: l, labels: n, overflowed: a, pinned: t, tabbable: c, tipOff: m, onChoose: o, onFocus: r }) {
1404
+ const [h, d] = D(!1);
1405
+ W(() => {
1406
+ if (!l.busy) {
1407
+ d(!1);
1408
+ return;
1409
+ }
1410
+ const v = setTimeout(() => d(!0), fe);
1411
+ return () => clearTimeout(v);
1412
+ }, [l.busy]);
1413
+ const f = oe(l.icon) === null, p = n || f, i = l.disabled && l.reason ? l.reason : p ? null : l.label;
1414
+ return /* @__PURE__ */ s(
1415
+ "button",
1416
+ {
1417
+ type: "button",
1418
+ className: M("cms-pane-toolbar__action", !p && "cms-pane-toolbar__action--icon", l.danger && "is-danger"),
1419
+ "data-action": l.id,
1420
+ "data-stop": l.id,
1421
+ ...a ? { "data-overflowed": "" } : {},
1422
+ ...t ? { "data-pinned": "" } : {},
1423
+ hidden: a,
1424
+ "aria-label": l.label,
1425
+ "aria-disabled": l.disabled || void 0,
1426
+ "aria-busy": l.busy || void 0,
1427
+ tabIndex: c ? 0 : -1,
1428
+ onFocus: r,
1429
+ onClick: () => {
1430
+ !l.disabled && !l.busy && o();
1431
+ },
1432
+ children: [
1433
+ h ? /* @__PURE__ */ e(F, { name: "spinner" }) : /* @__PURE__ */ e(re, { name: l.icon }),
1434
+ p ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__label", "aria-hidden": "true", children: l.label }) : null,
1435
+ i !== null && !m ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__tip", role: "tooltip", children: i }) : null
1436
+ ]
1437
+ }
1438
+ );
1439
+ }
1440
+ function re({ name: l }) {
1441
+ const n = oe(l);
1442
+ return n === null ? null : /* @__PURE__ */ e(P, { name: n, size: 18 });
1443
+ }
1444
+ function Xe(l) {
1445
+ return l === "allowed" || l === "elevate" || l === "denied";
1446
+ }
1447
+ function Dl(l, n) {
1448
+ if (!Xe(l))
455
1449
  return n.showRefused ? { offered: !0, locked: !1, refusal: "not available: the server gave an answer this app does not know", unknown: !0 } : { offered: !1, locked: !1, unknown: !0 };
456
- switch (e) {
1450
+ switch (l) {
457
1451
  case "allowed":
458
1452
  return { offered: !0, locked: !1 };
459
1453
  case "elevate":
@@ -462,92 +1456,119 @@ function ce(e, n) {
462
1456
  return n.showRefused ? { offered: !0, locked: !1, refusal: n.refusal ?? "not allowed" } : { offered: !1, locked: !1 };
463
1457
  }
464
1458
  }
465
- function H(e, n) {
466
- if (!e) return;
467
- if (typeof e.get == "function") return e.get(n) ?? void 0;
468
- const l = e, a = Object.keys(l).find((s) => s.toLowerCase() === n.toLowerCase());
469
- return a === void 0 ? void 0 : l[a];
1459
+ function Ye(l, n) {
1460
+ if (!l) return;
1461
+ if (typeof l.get == "function") return l.get(n) ?? void 0;
1462
+ const a = l, t = Object.keys(a).find((c) => c.toLowerCase() === n.toLowerCase());
1463
+ return t === void 0 ? void 0 : a[t];
470
1464
  }
471
- function P(e) {
472
- if (e && typeof e == "object") {
473
- const n = e;
1465
+ function Je(l) {
1466
+ if (l && typeof l == "object") {
1467
+ const n = l;
474
1468
  if (typeof n.detail == "string" && n.detail !== "") return n.detail;
475
1469
  if (typeof n.title == "string" && n.title !== "") return n.title;
476
1470
  }
477
1471
  }
478
- function ie(e, n, l, a) {
479
- if (e !== 403) return { kind: "none" };
480
- const s = P(l);
481
- return H(n, "X-Elevation-Required") !== void 0 ? a.elevates ? { kind: "elevation-required", message: s ?? "This needs an elevated session." } : { kind: "refused", message: "This can only be done in the admin, in an elevated session." } : { kind: "refused", message: s ?? "The server refused this." };
482
- }
483
- const T = "coolms-kit:reread";
484
- function oe() {
485
- window.dispatchEvent(new Event(T));
486
- }
487
- function ue(e) {
488
- const [n, l] = k(void 0), [a, s] = k(void 0), [m, i] = k(!0), u = w(e);
489
- u.current = e;
490
- const d = w(0), f = K(() => {
491
- const r = ++d.current;
492
- i(!0), u.current().then(
493
- (o) => {
494
- r === d.current && (l(o), s(void 0), i(!1));
1472
+ function El(l, n, a, t) {
1473
+ if (l !== 403) return { kind: "none" };
1474
+ const c = Je(a);
1475
+ return Ye(n, "X-Elevation-Required") !== void 0 ? t.elevates ? { kind: "elevation-required", message: c ?? "This needs an elevated session." } : { kind: "refused", message: "This can only be done in the admin, in an elevated session." } : { kind: "refused", message: c ?? "The server refused this." };
1476
+ }
1477
+ const _e = "coolms-kit:reread";
1478
+ function Ll() {
1479
+ window.dispatchEvent(new Event(_e));
1480
+ }
1481
+ function $l(l) {
1482
+ const [n, a] = D(void 0), [t, c] = D(void 0), [m, o] = D(!0), r = z(l);
1483
+ r.current = l;
1484
+ const h = z(0), d = ie(() => {
1485
+ const f = ++h.current;
1486
+ o(!0), r.current().then(
1487
+ (p) => {
1488
+ f === h.current && (a(p), c(void 0), o(!1));
495
1489
  },
496
- (o) => {
497
- r === d.current && (s(o), i(!1));
1490
+ (p) => {
1491
+ f === h.current && (c(p), o(!1));
498
1492
  }
499
1493
  );
500
1494
  }, []);
501
- return x(() => {
502
- f();
503
- const r = () => f();
504
- return window.addEventListener("focus", r), window.addEventListener(T, r), () => {
505
- window.removeEventListener("focus", r), window.removeEventListener(T, r);
1495
+ return W(() => {
1496
+ d();
1497
+ const f = () => d();
1498
+ return window.addEventListener("focus", f), window.addEventListener(_e, f), () => {
1499
+ window.removeEventListener("focus", f), window.removeEventListener(_e, f);
506
1500
  };
507
- }, [f]), { value: n, error: a, loading: m, reread: f };
1501
+ }, [d]), { value: n, error: t, loading: m, reread: d };
508
1502
  }
509
- function de(e) {
510
- return e === 412 ? { conflict: !0, message: "Someone changed this since you opened it. Nothing was saved; read it again to see the change." } : { conflict: !1 };
1503
+ function Tl(l) {
1504
+ return l === 412 ? { conflict: !0, message: "Someone changed this since you opened it. Nothing was saved; read it again to see the change." } : { conflict: !1 };
511
1505
  }
512
- const U = "/errors/client-update-required";
513
- function W(e, n) {
514
- const l = e.split(".").map((s) => Number.parseInt(s, 10) || 0), a = n.split(".").map((s) => Number.parseInt(s, 10) || 0);
515
- for (let s = 0; s < Math.max(l.length, a.length); s++) {
516
- const m = l[s] ?? 0, i = a[s] ?? 0;
517
- if (m !== i) return m < i;
1506
+ const Qe = "/errors/client-update-required";
1507
+ function el(l, n) {
1508
+ const a = l.split(".").map((c) => Number.parseInt(c, 10) || 0), t = n.split(".").map((c) => Number.parseInt(c, 10) || 0);
1509
+ for (let c = 0; c < Math.max(a.length, t.length); c++) {
1510
+ const m = a[c] ?? 0, o = t[c] ?? 0;
1511
+ if (m !== o) return m < o;
518
1512
  }
519
1513
  return !1;
520
1514
  }
521
- function me(e) {
522
- return e.problemType !== void 0 && e.problemType.endsWith(U) ? !0 : e.minimumVersion !== void 0 && W(e.version, e.minimumVersion);
1515
+ function Pl(l) {
1516
+ return l.problemType !== void 0 && l.problemType.endsWith(Qe) ? !0 : l.minimumVersion !== void 0 && el(l.version, l.minimumVersion);
523
1517
  }
524
1518
  export {
525
- re as Avatar,
526
- E as Button,
527
- U as CLIENT_UPDATE_REQUIRED,
528
- O as ConfirmDialog,
529
- se as ContextMenu,
530
- F as EmptyState,
531
- R as ErrorBanner,
532
- ae as List,
533
- q as Loading,
534
- Z as MODAL_CLOSE_MS,
535
- I as Modal,
536
- te as PageHeader,
537
- J as Select,
538
- le as TabStrip,
539
- Y as TextField,
540
- ee as Toast,
541
- ne as ToastRegion,
542
- z as Toggle,
543
- V as initialsOf,
544
- j as isCapability,
545
- me as needsClientUpdate,
546
- ce as offerFor,
547
- de as readConflict,
548
- ie as readRefusal,
549
- P as refusalText,
550
- oe as rereadAll,
551
- ue as useReread,
552
- W as versionBelow
1519
+ fl as AppShell,
1520
+ de as Avatar,
1521
+ ge as BOOTSTRAP_ICONS,
1522
+ Oe as Badge,
1523
+ J as Button,
1524
+ ve as CALL_LABELS,
1525
+ Qe as CLIENT_UPDATE_REQUIRED,
1526
+ xl as CallBar,
1527
+ kl as CallPanel,
1528
+ Nl as ChatBubble,
1529
+ yl as Composer,
1530
+ rl as ConfirmDialog,
1531
+ je as ContextMenu,
1532
+ De as EmptyState,
1533
+ Ee as ErrorBanner,
1534
+ ul as FilePicker,
1535
+ Ke as FilePickerDenied,
1536
+ ml as FileViewer,
1537
+ bl as FilterChips,
1538
+ dl as ICON_NAMES,
1539
+ P as Icon,
1540
+ wl as IncomingCall,
1541
+ Al as List,
1542
+ Se as Loading,
1543
+ Ve as MAIL_ROW_LABELS,
1544
+ Ae as MODAL_CLOSE_MS,
1545
+ gl as MailRow,
1546
+ xe as Modal,
1547
+ hl as PageHeader,
1548
+ Sl as PaneToolbar,
1549
+ Ue as SIGN_IN_LABELS,
1550
+ fe as STATE_DELAY_MS,
1551
+ _l as SearchField,
1552
+ tl as Select,
1553
+ Ml as SignInForm,
1554
+ Cl as SignInLayout,
1555
+ vl as SplitPanes,
1556
+ se as State,
1557
+ pl as TabStrip,
1558
+ sl as TextField,
1559
+ il as Toast,
1560
+ ol as ToastRegion,
1561
+ cl as Toggle,
1562
+ oe as iconForName,
1563
+ Re as initialsOf,
1564
+ Xe as isCapability,
1565
+ Pl as needsClientUpdate,
1566
+ Dl as offerFor,
1567
+ Tl as readConflict,
1568
+ El as readRefusal,
1569
+ Je as refusalText,
1570
+ Ll as rereadAll,
1571
+ Ze as tintOf,
1572
+ $l as useReread,
1573
+ el as versionBelow
553
1574
  };