@coolms/ui-react 0.1.0-alpha.32 → 0.1.0-alpha.34

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,18 +1,18 @@
1
- import { jsx as e, jsxs as o, Fragment as E } from "react/jsx-runtime";
2
- import { useId as Q, useState as A, useRef as O, useEffect as J, useCallback as _e, useMemo as je, useContext as qe, createContext as Ye, useLayoutEffect as ve } from "react";
3
- import { createPortal as De } from "react-dom";
4
- function ge(n, l) {
1
+ import { jsx as e, jsxs as i, Fragment as A } from "react/jsx-runtime";
2
+ import { useId as se, useState as T, useRef as H, useEffect as Q, useCallback as be, useMemo as ln, useContext as tn, createContext as sn, useLayoutEffect as ve, Fragment as an } from "react";
3
+ import { createPortal as Pe } from "react-dom";
4
+ function ye(n, l) {
5
5
  const t = { ...n };
6
- for (const i of Object.keys(l ?? {})) {
7
- const c = l == null ? void 0 : l[i];
8
- c !== void 0 && (t[i] = c);
6
+ for (const r of Object.keys(l ?? {})) {
7
+ const c = l == null ? void 0 : l[r];
8
+ c !== void 0 && (t[r] = c);
9
9
  }
10
10
  return t;
11
11
  }
12
- function L(...n) {
12
+ function F(...n) {
13
13
  return n.filter(Boolean).join(" ");
14
14
  }
15
- function V({ name: n }) {
15
+ function G({ name: n }) {
16
16
  const l = { width: 16, height: 16, viewBox: "0 0 16 16", "aria-hidden": !0, focusable: !1 };
17
17
  switch (n) {
18
18
  case "lock":
@@ -31,34 +31,34 @@ function V({ name: n }) {
31
31
  return /* @__PURE__ */ e("svg", { ...l, 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" }) });
32
32
  }
33
33
  }
34
- function ce({
34
+ function he({
35
35
  variant: n = "secondary",
36
36
  busy: l = !1,
37
37
  busyLabel: t,
38
- locked: i = !1,
38
+ locked: r = !1,
39
39
  lockedReason: c,
40
40
  icon: s,
41
- disabled: u,
41
+ disabled: m,
42
42
  className: a,
43
- children: m,
43
+ children: u,
44
44
  type: v = "button",
45
- title: d,
46
- ...f
45
+ title: o,
46
+ ...p
47
47
  }) {
48
- const r = !!u || l;
49
- return /* @__PURE__ */ o(
48
+ const h = !!m || l;
49
+ return /* @__PURE__ */ i(
50
50
  "button",
51
51
  {
52
- ...f,
52
+ ...p,
53
53
  type: v,
54
- className: L("cms-button", `cms-button--${n}`, l && "is-busy", i && "is-locked", a),
55
- disabled: r,
54
+ className: F("cms-button", `cms-button--${n}`, l && "is-busy", r && "is-locked", a),
55
+ disabled: h,
56
56
  "aria-busy": l || void 0,
57
- title: i ? c ?? d : d,
57
+ title: r ? c ?? o : o,
58
58
  children: [
59
- l ? /* @__PURE__ */ e(V, { name: "spinner" }) : i ? /* @__PURE__ */ e(V, { name: "lock" }) : s,
60
- /* @__PURE__ */ e("span", { className: "cms-button__label", children: l && t !== void 0 ? t : m }),
61
- i && c ? /* @__PURE__ */ o("span", { className: "cms-visually-hidden", children: [
59
+ l ? /* @__PURE__ */ e(G, { name: "spinner" }) : r ? /* @__PURE__ */ e(G, { name: "lock" }) : s,
60
+ /* @__PURE__ */ e("span", { className: "cms-button__label", children: l && t !== void 0 ? t : u }),
61
+ r && c ? /* @__PURE__ */ i("span", { className: "cms-visually-hidden", children: [
62
62
  ", ",
63
63
  c
64
64
  ] }) : null
@@ -66,395 +66,395 @@ function ce({
66
66
  }
67
67
  );
68
68
  }
69
- function Le({ id: n, label: l, help: t, error: i, pinned: c, children: s }) {
70
- return /* @__PURE__ */ o("div", { className: L("cms-field", i != null && "is-invalid"), children: [
69
+ function Fe({ id: n, label: l, help: t, error: r, pinned: c, children: s }) {
70
+ return /* @__PURE__ */ i("div", { className: F("cms-field", r != null && "is-invalid"), children: [
71
71
  /* @__PURE__ */ e("label", { className: "cms-field__label", htmlFor: n, children: l }),
72
72
  s,
73
- c != null ? /* @__PURE__ */ o("p", { className: "cms-field__pinned", id: `${n}-pinned`, children: [
74
- /* @__PURE__ */ e(V, { name: "lock" }),
73
+ c != null ? /* @__PURE__ */ i("p", { className: "cms-field__pinned", id: `${n}-pinned`, children: [
74
+ /* @__PURE__ */ e(G, { name: "lock" }),
75
75
  " ",
76
76
  c
77
77
  ] }) : null,
78
- i != null ? /* @__PURE__ */ e("p", { className: "cms-field__error", id: `${n}-error`, role: "alert", children: i }) : null,
78
+ r != null ? /* @__PURE__ */ e("p", { className: "cms-field__error", id: `${n}-error`, role: "alert", children: r }) : null,
79
79
  t != null ? /* @__PURE__ */ e("p", { className: "cms-field__help", id: `${n}-help`, children: t }) : null
80
80
  ] });
81
81
  }
82
- function $e(n, l) {
82
+ function Be(n, l) {
83
83
  const t = [l.error != null && `${n}-error`, l.pinned != null && `${n}-pinned`, l.help != null && `${n}-help`].filter(Boolean).join(" ");
84
84
  return t === "" ? void 0 : t;
85
85
  }
86
- const Ge = /^(\d{4})-(\d{2})-(\d{2})(?:T(\d{2}):(\d{2})(?::(\d{2}))?)?$/, Xe = /^(\d{2}):(\d{2})(?::(\d{2}))?$/;
87
- function Je(n, l, t) {
88
- const i = (s, u, a, m = 0, v = 0, d = 0) => {
89
- const f = new Date(Date.UTC(s, u - 1, a, m, v, d));
90
- return f.setUTCFullYear(s), f.getUTCFullYear() === s && f.getUTCMonth() === u - 1 && f.getUTCDate() === a && f.getUTCHours() === m && f.getUTCMinutes() === v && f.getUTCSeconds() === d ? f : null;
86
+ const rn = /^(\d{4})-(\d{2})-(\d{2})(?:T(\d{2}):(\d{2})(?::(\d{2}))?)?$/, cn = /^(\d{2}):(\d{2})(?::(\d{2}))?$/;
87
+ function on(n, l, t) {
88
+ const r = (s, m, a, u = 0, v = 0, o = 0) => {
89
+ const p = new Date(Date.UTC(s, m - 1, a, u, v, o));
90
+ return p.setUTCFullYear(s), p.getUTCFullYear() === s && p.getUTCMonth() === m - 1 && p.getUTCDate() === a && p.getUTCHours() === u && p.getUTCMinutes() === v && p.getUTCSeconds() === o ? p : null;
91
91
  }, c = (s) => ({ hour: Number(s[1]), minute: Number(s[2]), second: Number(s[3] ?? 0) });
92
92
  try {
93
93
  if (n === "time") {
94
- const u = l.match(Xe);
95
- if (u === null) return l;
96
- const a = c(u), m = i(2e3, 1, 1, a.hour, a.minute, a.second);
97
- return m === null ? l : new Intl.DateTimeFormat(t, { timeStyle: u[3] === void 0 ? "short" : "medium", timeZone: "UTC" }).format(m);
94
+ const m = l.match(cn);
95
+ if (m === null) return l;
96
+ const a = c(m), u = r(2e3, 1, 1, a.hour, a.minute, a.second);
97
+ return u === null ? l : new Intl.DateTimeFormat(t, { timeStyle: m[3] === void 0 ? "short" : "medium", timeZone: "UTC" }).format(u);
98
98
  }
99
- const s = l.match(Ge);
99
+ const s = l.match(rn);
100
100
  if (s === null) return l;
101
101
  if (n === "date" && s[4] === void 0) {
102
- const u = i(Number(s[1]), Number(s[2]), Number(s[3]));
103
- return u === null ? l : new Intl.DateTimeFormat(t, { dateStyle: "medium", timeZone: "UTC" }).format(u);
102
+ const m = r(Number(s[1]), Number(s[2]), Number(s[3]));
103
+ return m === null ? l : new Intl.DateTimeFormat(t, { dateStyle: "medium", timeZone: "UTC" }).format(m);
104
104
  }
105
105
  if (n === "datetime-local" && s[4] !== void 0) {
106
- const u = i(Number(s[1]), Number(s[2]), Number(s[3]), Number(s[4]), Number(s[5]), Number(s[6] ?? 0));
107
- return u === null ? l : new Intl.DateTimeFormat(t, { dateStyle: "medium", timeStyle: s[6] === void 0 ? "short" : "medium", timeZone: "UTC" }).format(u);
106
+ const m = r(Number(s[1]), Number(s[2]), Number(s[3]), Number(s[4]), Number(s[5]), Number(s[6] ?? 0));
107
+ return m === null ? l : new Intl.DateTimeFormat(t, { dateStyle: "medium", timeStyle: s[6] === void 0 ? "short" : "medium", timeZone: "UTC" }).format(m);
108
108
  }
109
109
  } catch {
110
110
  return l;
111
111
  }
112
112
  return l;
113
113
  }
114
- const Qe = /* @__PURE__ */ new Set(["date", "time", "datetime-local"]);
115
- function qn({ label: n, help: l, error: t, disabled: i, readOnly: c, pinned: s, value: u, onChange: a, placeholder: m, type: v = "text", name: d, locale: f, min: r, max: h, step: p, minLength: N, maxLength: k, required: y }) {
116
- const C = Q(), M = c === !0 || s != null, _ = M && Qe.has(v), w = v === "number" && (p === "any" || typeof p == "number" && !Number.isInteger(p));
117
- return /* @__PURE__ */ e(Le, { id: C, label: n, help: l, error: t, pinned: s, children: /* @__PURE__ */ e(
114
+ const dn = /* @__PURE__ */ new Set(["date", "time", "datetime-local"]);
115
+ function il({ label: n, help: l, error: t, disabled: r, readOnly: c, pinned: s, value: m, onChange: a, placeholder: u, type: v = "text", name: o, locale: p, min: h, max: f, step: d, minLength: g, maxLength: k, required: x }) {
116
+ const C = se(), w = c === !0 || s != null, b = w && dn.has(v), y = v === "number" && (d === "any" || typeof d == "number" && !Number.isInteger(d));
117
+ return /* @__PURE__ */ e(Fe, { id: C, label: n, help: l, error: t, pinned: s, children: /* @__PURE__ */ e(
118
118
  "input",
119
119
  {
120
120
  id: C,
121
- name: d,
122
- type: _ ? "text" : v,
121
+ name: o,
122
+ type: b ? "text" : v,
123
123
  className: "cms-input",
124
- value: _ ? Je(v, u, f) : u,
125
- ..._ ? { "data-value": u } : {},
126
- lang: f,
127
- placeholder: m,
128
- disabled: i,
129
- readOnly: M,
130
- required: y,
131
- "aria-required": y || void 0,
132
- min: _ ? void 0 : r,
133
- max: _ ? void 0 : h,
134
- step: _ ? void 0 : p,
135
- minLength: N,
124
+ value: b ? on(v, m, p) : m,
125
+ ...b ? { "data-value": m } : {},
126
+ lang: p,
127
+ placeholder: u,
128
+ disabled: r,
129
+ readOnly: w,
130
+ required: x,
131
+ "aria-required": x || void 0,
132
+ min: b ? void 0 : h,
133
+ max: b ? void 0 : f,
134
+ step: b ? void 0 : d,
135
+ minLength: g,
136
136
  maxLength: k,
137
- inputMode: v === "number" ? w ? "decimal" : "numeric" : void 0,
137
+ inputMode: v === "number" ? y ? "decimal" : "numeric" : void 0,
138
138
  "aria-invalid": t != null || void 0,
139
- "aria-describedby": $e(C, { help: l, error: t, pinned: s }),
140
- onChange: (T) => a == null ? void 0 : a(T.target.value)
139
+ "aria-describedby": Be(C, { help: l, error: t, pinned: s }),
140
+ onChange: (D) => a == null ? void 0 : a(D.target.value)
141
141
  }
142
142
  ) });
143
143
  }
144
- function Yn({ label: n, help: l, error: t, disabled: i, readOnly: c, pinned: s, value: u, onChange: a, placeholder: m, rows: v = 4, name: d, locale: f, minLength: r, maxLength: h, required: p }) {
145
- const N = Q();
146
- return /* @__PURE__ */ e(Le, { id: N, label: n, help: l, error: t, pinned: s, children: /* @__PURE__ */ e(
144
+ function ol({ label: n, help: l, error: t, disabled: r, readOnly: c, pinned: s, value: m, onChange: a, placeholder: u, rows: v = 4, name: o, locale: p, minLength: h, maxLength: f, required: d }) {
145
+ const g = se();
146
+ return /* @__PURE__ */ e(Fe, { id: g, label: n, help: l, error: t, pinned: s, children: /* @__PURE__ */ e(
147
147
  "textarea",
148
148
  {
149
- id: N,
150
- name: d,
149
+ id: g,
150
+ name: o,
151
151
  className: "cms-input cms-textarea",
152
152
  rows: v,
153
- value: u,
154
- lang: f,
155
- placeholder: m,
156
- disabled: i,
153
+ value: m,
154
+ lang: p,
155
+ placeholder: u,
156
+ disabled: r,
157
157
  readOnly: c === !0 || s != null,
158
- required: p,
159
- "aria-required": p || void 0,
160
- minLength: r,
161
- maxLength: h,
158
+ required: d,
159
+ "aria-required": d || void 0,
160
+ minLength: h,
161
+ maxLength: f,
162
162
  "aria-invalid": t != null || void 0,
163
- "aria-describedby": $e(N, { help: l, error: t, pinned: s }),
163
+ "aria-describedby": Be(g, { help: l, error: t, pinned: s }),
164
164
  onChange: (k) => a == null ? void 0 : a(k.target.value)
165
165
  }
166
166
  ) });
167
167
  }
168
- function Gn({ label: n, help: l, error: t, disabled: i, readOnly: c, value: s, options: u, onChange: a, emptyText: m = "Nothing to choose from yet.", name: v }) {
169
- const d = Q(), f = u.length === 0;
170
- return /* @__PURE__ */ e(Le, { id: d, label: n, help: f ? m : l, error: t, children: /* @__PURE__ */ e(
168
+ function dl({ label: n, help: l, error: t, disabled: r, readOnly: c, value: s, options: m, onChange: a, emptyText: u = "Nothing to choose from yet.", name: v }) {
169
+ const o = se(), p = m.length === 0;
170
+ return /* @__PURE__ */ e(Fe, { id: o, label: n, help: p ? u : l, error: t, children: /* @__PURE__ */ e(
171
171
  "select",
172
172
  {
173
- id: d,
173
+ id: o,
174
174
  name: v,
175
175
  className: "cms-input cms-select",
176
176
  value: s,
177
- disabled: i || f,
177
+ disabled: r || p,
178
178
  "aria-readonly": c || void 0,
179
179
  "aria-invalid": t != null || void 0,
180
- "aria-describedby": $e(d, { help: f ? m : l, error: t }),
181
- onChange: (r) => {
182
- c || a == null || a(r.target.value);
180
+ "aria-describedby": Be(o, { help: p ? u : l, error: t }),
181
+ onChange: (h) => {
182
+ c || a == null || a(h.target.value);
183
183
  },
184
- children: u.map((r) => /* @__PURE__ */ e("option", { value: r.value, disabled: c && r.value !== s, children: r.label }, r.value))
184
+ children: m.map((h) => /* @__PURE__ */ e("option", { value: h.value, disabled: c && h.value !== s, children: h.label }, h.value))
185
185
  }
186
186
  ) });
187
187
  }
188
- function Xn({ label: n, checked: l, onChange: t, disabled: i, readOnly: c, help: s }) {
189
- const u = Q();
190
- return /* @__PURE__ */ o("div", { className: "cms-toggle-row", children: [
188
+ function ul({ label: n, checked: l, onChange: t, disabled: r, readOnly: c, help: s }) {
189
+ const m = se();
190
+ return /* @__PURE__ */ i("div", { className: "cms-toggle-row", children: [
191
191
  /* @__PURE__ */ e(
192
192
  "button",
193
193
  {
194
- id: u,
194
+ id: m,
195
195
  type: "button",
196
196
  role: "switch",
197
- className: L("cms-toggle", l && "is-on"),
197
+ className: F("cms-toggle", l && "is-on"),
198
198
  "aria-checked": l,
199
199
  "aria-readonly": c || void 0,
200
- "aria-describedby": s != null ? `${u}-help` : void 0,
201
- disabled: i,
200
+ "aria-describedby": s != null ? `${m}-help` : void 0,
201
+ disabled: r,
202
202
  onClick: () => {
203
203
  c || t == null || t(!l);
204
204
  },
205
205
  children: /* @__PURE__ */ e("span", { className: "cms-toggle__thumb" })
206
206
  }
207
207
  ),
208
- /* @__PURE__ */ e("label", { className: "cms-toggle__label", htmlFor: u, children: n }),
209
- s != null ? /* @__PURE__ */ e("p", { className: "cms-field__help", id: `${u}-help`, children: s }) : null
208
+ /* @__PURE__ */ e("label", { className: "cms-toggle__label", htmlFor: m, children: n }),
209
+ s != null ? /* @__PURE__ */ e("p", { className: "cms-field__help", id: `${m}-help`, children: s }) : null
210
210
  ] });
211
211
  }
212
- const en = 150;
213
- function ze({ open: n, title: l, onClose: t, dirty: i = !1, onDirtyClose: c, children: s, footer: u, closeLabel: a = "Close", initialFocus: m, className: v }) {
214
- const [d, f] = A(n), [r, h] = A(!1), p = O(null), N = O(null), k = Q();
215
- if (J(() => {
212
+ const un = 150;
213
+ function je({ open: n, title: l, onClose: t, dirty: r = !1, onDirtyClose: c, children: s, footer: m, closeLabel: a = "Close", initialFocus: u, className: v }) {
214
+ const [o, p] = T(n), [h, f] = T(!1), d = H(null), g = H(null), k = se();
215
+ if (Q(() => {
216
216
  if (n) {
217
- N.current = document.activeElement, f(!0), h(!1);
217
+ g.current = document.activeElement, p(!0), f(!1);
218
218
  return;
219
219
  }
220
- if (!d) return;
221
- h(!0);
220
+ if (!o) return;
221
+ f(!0);
222
222
  const C = window.setTimeout(() => {
223
- var M, _;
224
- f(!1), h(!1), (_ = (M = N.current) == null ? void 0 : M.focus) == null || _.call(M);
225
- }, en);
223
+ var w, b;
224
+ p(!1), f(!1), (b = (w = g.current) == null ? void 0 : w.focus) == null || b.call(w);
225
+ }, un);
226
226
  return () => window.clearTimeout(C);
227
- }, [n, d]), J(() => {
228
- var C, M;
229
- if (n && d) {
230
- const _ = 'input, select, textarea, button, [href], [tabindex]:not([tabindex="-1"])';
231
- (M = (m == null ? void 0 : m.current) ?? ((C = p.current) == null ? void 0 : C.querySelector(`.cms-modal__body :is(${_}), .cms-modal__foot :is(${_})`)) ?? p.current) == null || M.focus();
227
+ }, [n, o]), Q(() => {
228
+ var C, w;
229
+ if (n && o) {
230
+ const b = 'input, select, textarea, button, [href], [tabindex]:not([tabindex="-1"])';
231
+ (w = (u == null ? void 0 : u.current) ?? ((C = d.current) == null ? void 0 : C.querySelector(`.cms-modal__body :is(${b}), .cms-modal__foot :is(${b})`)) ?? d.current) == null || w.focus();
232
232
  }
233
- }, [n, d, m]), !d) return null;
234
- const y = () => {
235
- i ? c == null || c() : t();
233
+ }, [n, o, u]), !o) return null;
234
+ const x = () => {
235
+ r ? c == null || c() : t();
236
236
  };
237
- return De(
238
- /* @__PURE__ */ e("div", { className: L("cms-modal-scrim", r && "is-closing"), onMouseDown: (C) => {
239
- C.target === C.currentTarget && y();
240
- }, children: /* @__PURE__ */ o(
237
+ return Pe(
238
+ /* @__PURE__ */ e("div", { className: F("cms-modal-scrim", h && "is-closing"), onMouseDown: (C) => {
239
+ C.target === C.currentTarget && x();
240
+ }, children: /* @__PURE__ */ i(
241
241
  "div",
242
242
  {
243
- ref: p,
244
- className: L("cms-modal", v, r && "is-closing", i && "is-dirty"),
243
+ ref: d,
244
+ className: F("cms-modal", v, h && "is-closing", r && "is-dirty"),
245
245
  role: "dialog",
246
246
  "aria-modal": "true",
247
247
  "aria-labelledby": k,
248
248
  tabIndex: -1,
249
249
  onKeyDown: (C) => {
250
- var M;
250
+ var w;
251
251
  if (C.key === "Escape")
252
- C.stopPropagation(), y();
252
+ C.stopPropagation(), x();
253
253
  else if (C.key === "Tab") {
254
- const _ = (M = p.current) == null ? void 0 : M.querySelectorAll('input, select, textarea, button:not([disabled]), [href], [tabindex]:not([tabindex="-1"])');
255
- if (!_ || _.length === 0) return;
256
- const w = _[0], T = _[_.length - 1];
257
- C.shiftKey && document.activeElement === w ? (C.preventDefault(), T.focus()) : !C.shiftKey && document.activeElement === T && (C.preventDefault(), w.focus());
254
+ const b = (w = d.current) == null ? void 0 : w.querySelectorAll('input, select, textarea, button:not([disabled]), [href], [tabindex]:not([tabindex="-1"])');
255
+ if (!b || b.length === 0) return;
256
+ const y = b[0], D = b[b.length - 1];
257
+ C.shiftKey && document.activeElement === y ? (C.preventDefault(), D.focus()) : !C.shiftKey && document.activeElement === D && (C.preventDefault(), y.focus());
258
258
  }
259
259
  },
260
260
  children: [
261
- /* @__PURE__ */ o("header", { className: "cms-modal__head", children: [
261
+ /* @__PURE__ */ i("header", { className: "cms-modal__head", children: [
262
262
  /* @__PURE__ */ e("h2", { className: "cms-modal__title", id: k, children: l }),
263
- /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": a, onClick: y, children: /* @__PURE__ */ e(V, { name: "close" }) })
263
+ /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": a, onClick: x, children: /* @__PURE__ */ e(G, { name: "close" }) })
264
264
  ] }),
265
265
  /* @__PURE__ */ e("div", { className: "cms-modal__body", children: s }),
266
- u != null ? /* @__PURE__ */ e("footer", { className: "cms-modal__foot", children: u }) : null
266
+ m != null ? /* @__PURE__ */ e("footer", { className: "cms-modal__foot", children: m }) : null
267
267
  ]
268
268
  }
269
269
  ) }),
270
270
  document.body
271
271
  );
272
272
  }
273
- function Jn({ open: n, title: l, message: t, kind: i = "default", confirmLabel: c, cancelLabel: s, closeLabel: u, onConfirm: a, onCancel: m }) {
274
- const v = i === "discard-changes";
273
+ function ml({ open: n, title: l, message: t, kind: r = "default", confirmLabel: c, cancelLabel: s, closeLabel: m, onConfirm: a, onCancel: u }) {
274
+ const v = r === "discard-changes";
275
275
  return /* @__PURE__ */ e(
276
- ze,
276
+ je,
277
277
  {
278
278
  open: n,
279
279
  title: l,
280
- onClose: m,
281
- ...u === void 0 ? {} : { closeLabel: u },
282
- footer: /* @__PURE__ */ o(E, { children: [
283
- /* @__PURE__ */ e(ce, { onClick: m, children: s ?? (v ? "Keep editing" : "Cancel") }),
284
- /* @__PURE__ */ e(ce, { variant: i === "default" ? "primary" : "danger", onClick: a, children: c ?? (v ? "Discard changes" : "Confirm") })
280
+ onClose: u,
281
+ ...m === void 0 ? {} : { closeLabel: m },
282
+ footer: /* @__PURE__ */ i(A, { children: [
283
+ /* @__PURE__ */ e(he, { onClick: u, children: s ?? (v ? "Keep editing" : "Cancel") }),
284
+ /* @__PURE__ */ e(he, { variant: r === "default" ? "primary" : "danger", onClick: a, children: c ?? (v ? "Discard changes" : "Confirm") })
285
285
  ] }),
286
- children: i !== "default" ? /* @__PURE__ */ o("p", { className: "cms-confirm__warning", children: [
287
- /* @__PURE__ */ e(V, { name: "warning" }),
286
+ children: r !== "default" ? /* @__PURE__ */ i("p", { className: "cms-confirm__warning", children: [
287
+ /* @__PURE__ */ e(G, { name: "warning" }),
288
288
  " ",
289
289
  t
290
290
  ] }) : /* @__PURE__ */ e("p", { children: t })
291
291
  }
292
292
  );
293
293
  }
294
- function Qn({ kind: n, message: l, action: t, onDismiss: i, dismissLabel: c = "Dismiss" }) {
295
- return /* @__PURE__ */ o("div", { className: L("cms-toast", `cms-toast--${n}`), role: n === "error" ? "alert" : "status", children: [
296
- /* @__PURE__ */ e(V, { name: n === "success" ? "check" : n === "error" ? "warning" : "info" }),
294
+ function hl({ kind: n, message: l, action: t, onDismiss: r, dismissLabel: c = "Dismiss" }) {
295
+ return /* @__PURE__ */ i("div", { className: F("cms-toast", `cms-toast--${n}`), role: n === "error" ? "alert" : "status", children: [
296
+ /* @__PURE__ */ e(G, { name: n === "success" ? "check" : n === "error" ? "warning" : "info" }),
297
297
  /* @__PURE__ */ e("span", { className: "cms-toast__message", children: l }),
298
- t ? /* @__PURE__ */ e(ce, { className: "cms-toast__action", onClick: t.onAction, children: t.label }) : null,
299
- i ? /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": c, onClick: i, children: /* @__PURE__ */ e(V, { name: "close" }) }) : null
298
+ t ? /* @__PURE__ */ e(he, { className: "cms-toast__action", onClick: t.onAction, children: t.label }) : null,
299
+ r ? /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": c, onClick: r, children: /* @__PURE__ */ e(G, { name: "close" }) }) : null
300
300
  ] });
301
301
  }
302
- function el({ children: n }) {
302
+ function fl({ children: n }) {
303
303
  return /* @__PURE__ */ e("div", { className: "cms-toast-region", children: n });
304
304
  }
305
- function nn({ what: n, layout: l = "inline" }) {
306
- return /* @__PURE__ */ o("div", { className: L("cms-loading", `cms-loading--${l}`), role: "status", "aria-live": "polite", children: [
307
- /* @__PURE__ */ e(V, { name: "spinner" }),
305
+ function mn({ what: n, layout: l = "inline" }) {
306
+ return /* @__PURE__ */ i("div", { className: F("cms-loading", `cms-loading--${l}`), role: "status", "aria-live": "polite", children: [
307
+ /* @__PURE__ */ e(G, { name: "spinner" }),
308
308
  /* @__PURE__ */ e("span", { children: n })
309
309
  ] });
310
310
  }
311
- function ln({ title: n, hint: l, action: t }) {
312
- return /* @__PURE__ */ o("div", { className: "cms-empty", children: [
311
+ function hn({ title: n, hint: l, action: t }) {
312
+ return /* @__PURE__ */ i("div", { className: "cms-empty", children: [
313
313
  /* @__PURE__ */ e("p", { className: "cms-empty__title", children: n }),
314
314
  l != null ? /* @__PURE__ */ e("p", { className: "cms-empty__hint", children: l }) : null,
315
315
  t != null ? /* @__PURE__ */ e("div", { className: "cms-empty__action", children: t }) : null
316
316
  ] });
317
317
  }
318
- function tn({ message: n, onRetry: l, retryLabel: t = "Try again" }) {
319
- return /* @__PURE__ */ o("div", { className: "cms-error-banner", role: "alert", children: [
320
- /* @__PURE__ */ e(V, { name: "warning" }),
318
+ function fn({ message: n, onRetry: l, retryLabel: t = "Try again" }) {
319
+ return /* @__PURE__ */ i("div", { className: "cms-error-banner", role: "alert", children: [
320
+ /* @__PURE__ */ e(G, { name: "warning" }),
321
321
  /* @__PURE__ */ e("span", { className: "cms-error-banner__message", children: n }),
322
- l ? /* @__PURE__ */ e(ce, { onClick: l, children: t }) : null
322
+ l ? /* @__PURE__ */ e(he, { onClick: l, children: t }) : null
323
323
  ] });
324
324
  }
325
- const Ke = {
326
- mail: /* @__PURE__ */ o(E, { children: [
325
+ const Ge = {
326
+ mail: /* @__PURE__ */ i(A, { children: [
327
327
  /* @__PURE__ */ e("rect", { x: "3", y: "5", width: "18", height: "14", rx: "2" }),
328
328
  /* @__PURE__ */ e("path", { d: "m3 7 9 6 9-6" })
329
329
  ] }),
330
330
  // A gear: a ring with eight short teeth, the hole in its middle.
331
- settings: /* @__PURE__ */ o(E, { children: [
331
+ settings: /* @__PURE__ */ i(A, { children: [
332
332
  /* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "3" }),
333
333
  /* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "7" }),
334
334
  /* @__PURE__ */ e("path", { d: "M12 2v3M12 19v3M2 12h3M19 12h3M4.9 4.9 7 7M17 17l2.1 2.1M4.9 19.1 7 17M17 7l2.1-2.1" })
335
335
  ] }),
336
336
  // The envelope with its flap open above it: a message read, or the message itself again.
337
- "mail-open": /* @__PURE__ */ o(E, { children: [
337
+ "mail-open": /* @__PURE__ */ i(A, { children: [
338
338
  /* @__PURE__ */ e("path", { d: "M3 10v9a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-9" }),
339
339
  /* @__PURE__ */ e("path", { d: "m3 10 9-6 9 6" }),
340
340
  /* @__PURE__ */ e("path", { d: "m3 10 9 6 9-6" })
341
341
  ] }),
342
342
  // A clipboard: copy what is shown.
343
- copy: /* @__PURE__ */ o(E, { children: [
343
+ copy: /* @__PURE__ */ i(A, { children: [
344
344
  /* @__PURE__ */ e("rect", { x: "6", y: "4", width: "12", height: "17", rx: "2" }),
345
345
  /* @__PURE__ */ e("path", { d: "M9 4V3h6v1" }),
346
346
  /* @__PURE__ */ e("path", { d: "M9 10h6M9 14h6M9 18h3" })
347
347
  ] }),
348
348
  chat: /* @__PURE__ */ e("path", { d: "M4 12a8 8 0 1 1 4 6.9L4 20l1.1-4A8 8 0 0 1 4 12Z" }),
349
349
  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" }),
350
- calendar: /* @__PURE__ */ o(E, { children: [
350
+ calendar: /* @__PURE__ */ i(A, { children: [
351
351
  /* @__PURE__ */ e("rect", { x: "3", y: "5", width: "18", height: "16", rx: "2" }),
352
352
  /* @__PURE__ */ e("path", { d: "M3 10h18M8 3v4M16 3v4" })
353
353
  ] }),
354
- file: /* @__PURE__ */ o(E, { children: [
354
+ file: /* @__PURE__ */ i(A, { children: [
355
355
  /* @__PURE__ */ e("path", { d: "M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9Z" }),
356
356
  /* @__PURE__ */ e("path", { d: "M14 3v6h6M8 13h8M8 17h6" })
357
357
  ] }),
358
358
  // The file, with code's angle brackets in place of its lines: a message's source.
359
- "file-code": /* @__PURE__ */ o(E, { children: [
359
+ "file-code": /* @__PURE__ */ i(A, { children: [
360
360
  /* @__PURE__ */ e("path", { d: "M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9Z" }),
361
361
  /* @__PURE__ */ e("path", { d: "M14 3v6h6" }),
362
362
  /* @__PURE__ */ e("path", { d: "m10 12-2 2.5 2 2.5M14 12l2 2.5-2 2.5" })
363
363
  ] }),
364
- image: /* @__PURE__ */ o(E, { children: [
364
+ image: /* @__PURE__ */ i(A, { children: [
365
365
  /* @__PURE__ */ e("rect", { x: "3", y: "4", width: "18", height: "16", rx: "2" }),
366
366
  /* @__PURE__ */ e("circle", { cx: "9", cy: "10", r: "2" }),
367
367
  /* @__PURE__ */ e("path", { d: "m21 17-5-5-9 8" })
368
368
  ] }),
369
- search: /* @__PURE__ */ o(E, { children: [
369
+ search: /* @__PURE__ */ i(A, { children: [
370
370
  /* @__PURE__ */ e("circle", { cx: "11", cy: "11", r: "7" }),
371
371
  /* @__PURE__ */ e("path", { d: "m20 20-4-4" })
372
372
  ] }),
373
- bell: /* @__PURE__ */ o(E, { children: [
373
+ bell: /* @__PURE__ */ i(A, { children: [
374
374
  /* @__PURE__ */ e("path", { d: "M6 9a6 6 0 1 1 12 0c0 6 2 8 2 8H4s2-2 2-8Z" }),
375
375
  /* @__PURE__ */ e("path", { d: "M10 20a2 2 0 0 0 4 0" })
376
376
  ] }),
377
- pencil: /* @__PURE__ */ o(E, { children: [
377
+ pencil: /* @__PURE__ */ i(A, { children: [
378
378
  /* @__PURE__ */ e("path", { d: "M4 20h4L19 9l-4-4L4 16Z" }),
379
379
  /* @__PURE__ */ e("path", { d: "m13 7 4 4" })
380
380
  ] }),
381
- download: /* @__PURE__ */ o(E, { children: [
381
+ download: /* @__PURE__ */ i(A, { children: [
382
382
  /* @__PURE__ */ e("path", { d: "M12 4v11" }),
383
383
  /* @__PURE__ */ e("path", { d: "m7 11 5 5 5-5" }),
384
384
  /* @__PURE__ */ e("path", { d: "M4 20h16" })
385
385
  ] }),
386
386
  // Download's arrow turned up, from the line: a file sent up.
387
- upload: /* @__PURE__ */ o(E, { children: [
387
+ upload: /* @__PURE__ */ i(A, { children: [
388
388
  /* @__PURE__ */ e("path", { d: "M12 20V9" }),
389
389
  /* @__PURE__ */ e("path", { d: "m7 13 5-5 5 5" }),
390
390
  /* @__PURE__ */ e("path", { d: "M4 4h16" })
391
391
  ] }),
392
- print: /* @__PURE__ */ o(E, { children: [
392
+ print: /* @__PURE__ */ i(A, { children: [
393
393
  /* @__PURE__ */ e("path", { d: "M7 8V4h10v4" }),
394
394
  /* @__PURE__ */ e("rect", { x: "3", y: "8", width: "18", height: "8", rx: "2" }),
395
395
  /* @__PURE__ */ e("path", { d: "M7 14h10v6H7Z" })
396
396
  ] }),
397
- "open-separately": /* @__PURE__ */ o(E, { children: [
397
+ "open-separately": /* @__PURE__ */ i(A, { children: [
398
398
  /* @__PURE__ */ e("path", { d: "M14 4h6v6" }),
399
399
  /* @__PURE__ */ e("path", { d: "m20 4-9 9" }),
400
400
  /* @__PURE__ */ e("path", { d: "M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5" })
401
401
  ] }),
402
402
  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" }),
403
- send: /* @__PURE__ */ o(E, { children: [
403
+ send: /* @__PURE__ */ i(A, { children: [
404
404
  /* @__PURE__ */ e("path", { d: "M21 3 10 14" }),
405
405
  /* @__PURE__ */ e("path", { d: "M21 3 14 21l-4-7-7-4Z" })
406
406
  ] }),
407
- inbox: /* @__PURE__ */ o(E, { children: [
407
+ inbox: /* @__PURE__ */ i(A, { children: [
408
408
  /* @__PURE__ */ e("path", { d: "M3 13h5l1 3h6l1-3h5" }),
409
409
  /* @__PURE__ */ e("path", { d: "M5 5h14l2 8v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-6Z" })
410
410
  ] }),
411
- archive: /* @__PURE__ */ o(E, { children: [
411
+ archive: /* @__PURE__ */ i(A, { children: [
412
412
  /* @__PURE__ */ e("rect", { x: "3", y: "4", width: "18", height: "5", rx: "1" }),
413
413
  /* @__PURE__ */ e("path", { d: "M5 9v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V9M10 13h4" })
414
414
  ] }),
415
- trash: /* @__PURE__ */ o(E, { children: [
415
+ trash: /* @__PURE__ */ i(A, { children: [
416
416
  /* @__PURE__ */ e("path", { d: "M4 7h16M10 11v6M14 11v6" }),
417
417
  /* @__PURE__ */ e("path", { d: "M6 7l1 13a2 2 0 0 0 2 1h6a2 2 0 0 0 2-1l1-13M9 7V4h6v3" })
418
418
  ] }),
419
419
  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" }),
420
- mic: /* @__PURE__ */ o(E, { children: [
420
+ mic: /* @__PURE__ */ i(A, { children: [
421
421
  /* @__PURE__ */ e("rect", { x: "9", y: "3", width: "6", height: "11", rx: "3" }),
422
422
  /* @__PURE__ */ e("path", { d: "M5 11a7 7 0 0 0 14 0M12 18v3" })
423
423
  ] }),
424
- speaker: /* @__PURE__ */ o(E, { children: [
424
+ speaker: /* @__PURE__ */ i(A, { children: [
425
425
  /* @__PURE__ */ e("path", { d: "M4 9h4l5-4v14l-5-4H4Z" }),
426
426
  /* @__PURE__ */ e("path", { d: "M16 9a4 4 0 0 1 0 6M19 6a8 8 0 0 1 0 12" })
427
427
  ] }),
428
- "user-plus": /* @__PURE__ */ o(E, { children: [
428
+ "user-plus": /* @__PURE__ */ i(A, { children: [
429
429
  /* @__PURE__ */ e("circle", { cx: "10", cy: "8", r: "4" }),
430
430
  /* @__PURE__ */ e("path", { d: "M3 21a7 7 0 0 1 14 0M19 8v6M16 11h6" })
431
431
  ] }),
432
432
  // A person, nothing more: one whose account is gone.
433
- user: /* @__PURE__ */ o(E, { children: [
433
+ user: /* @__PURE__ */ i(A, { children: [
434
434
  /* @__PURE__ */ e("circle", { cx: "12", cy: "8", r: "4" }),
435
435
  /* @__PURE__ */ e("path", { d: "M4 21a8 8 0 0 1 16 0" })
436
436
  ] }),
437
437
  // A person with a tick: someone allowed.
438
- "user-check": /* @__PURE__ */ o(E, { children: [
438
+ "user-check": /* @__PURE__ */ i(A, { children: [
439
439
  /* @__PURE__ */ e("circle", { cx: "10", cy: "8", r: "4" }),
440
440
  /* @__PURE__ */ e("path", { d: "M3 21a7 7 0 0 1 14 0M16 11l2 2 4-4" })
441
441
  ] }),
442
442
  // A person with a cross: someone no longer allowed.
443
- "user-x": /* @__PURE__ */ o(E, { children: [
443
+ "user-x": /* @__PURE__ */ i(A, { children: [
444
444
  /* @__PURE__ */ e("circle", { cx: "10", cy: "8", r: "4" }),
445
445
  /* @__PURE__ */ e("path", { d: "M3 21a7 7 0 0 1 14 0M17 8l4 4M21 8l-4 4" })
446
446
  ] }),
447
447
  // Two people: the members of a group.
448
- users: /* @__PURE__ */ o(E, { children: [
448
+ users: /* @__PURE__ */ i(A, { children: [
449
449
  /* @__PURE__ */ e("circle", { cx: "9", cy: "8", r: "3.5" }),
450
450
  /* @__PURE__ */ e("path", { d: "M2.5 20a6.5 6.5 0 0 1 13 0M16 4.6a3.5 3.5 0 0 1 0 6.8M18 14a6.5 6.5 0 0 1 3.5 6" })
451
451
  ] }),
452
452
  "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" }),
453
- video: /* @__PURE__ */ o(E, { children: [
453
+ video: /* @__PURE__ */ i(A, { children: [
454
454
  /* @__PURE__ */ e("rect", { x: "3", y: "6", width: "13", height: "12", rx: "2" }),
455
455
  /* @__PURE__ */ e("path", { d: "m16 10 5-3v10l-5-3" })
456
456
  ] }),
457
- info: /* @__PURE__ */ o(E, { children: [
457
+ info: /* @__PURE__ */ i(A, { children: [
458
458
  /* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "9" }),
459
459
  /* @__PURE__ */ e("path", { d: "M12 11v6M12 7.5v.5" })
460
460
  ] }),
@@ -463,17 +463,17 @@ const Ke = {
463
463
  plus: /* @__PURE__ */ e("path", { d: "M12 5v14M5 12h14" }),
464
464
  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" }),
465
465
  // The folder with a plus inside: a new folder.
466
- "folder-plus": /* @__PURE__ */ o(E, { children: [
466
+ "folder-plus": /* @__PURE__ */ i(A, { children: [
467
467
  /* @__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" }),
468
468
  /* @__PURE__ */ e("path", { d: "M12 10.5v6M9 13.5h6" })
469
469
  ] }),
470
470
  // The folder with a cross inside: a folder removed.
471
- "folder-x": /* @__PURE__ */ o(E, { children: [
471
+ "folder-x": /* @__PURE__ */ i(A, { children: [
472
472
  /* @__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" }),
473
473
  /* @__PURE__ */ e("path", { d: "m9.5 11 5 5M14.5 11l-5 5" })
474
474
  ] }),
475
475
  check: /* @__PURE__ */ e("path", { d: "m5 12 5 5 9-10" }),
476
- server: /* @__PURE__ */ o(E, { children: [
476
+ server: /* @__PURE__ */ i(A, { children: [
477
477
  /* @__PURE__ */ e("rect", { x: "3", y: "4", width: "18", height: "7", rx: "2" }),
478
478
  /* @__PURE__ */ e("rect", { x: "3", y: "13", width: "18", height: "7", rx: "2" }),
479
479
  /* @__PURE__ */ e("path", { d: "M7 7.5h.5M7 16.5h.5" })
@@ -485,9 +485,11 @@ const Ke = {
485
485
  more: /* @__PURE__ */ e("path", { d: "M5 12h.5M12 12h.5M19 12h.5" }),
486
486
  // A number sign: a channel, by its name.
487
487
  hash: /* @__PURE__ */ e("path", { d: "M10 4 8 20M16 4l-2 16M5 9h15M4 15h15" }),
488
+ // A funnel: a list's filter.
489
+ funnel: /* @__PURE__ */ e("path", { d: "M4 5h16l-6 8v6l-4-2v-4Z" }),
488
490
  important: /* @__PURE__ */ e("path", { d: "M4 6h11l5 6-5 6H4l4-6-4-6Z" })
489
491
  };
490
- function D({ name: n, size: l = 20, label: t }) {
492
+ function L({ name: n, size: l = 20, label: t }) {
491
493
  return /* @__PURE__ */ e(
492
494
  "svg",
493
495
  {
@@ -502,11 +504,11 @@ function D({ name: n, size: l = 20, label: t }) {
502
504
  strokeLinejoin: "round",
503
505
  focusable: !1,
504
506
  ...t ? { role: "img", "aria-label": t } : { "aria-hidden": !0 },
505
- children: Ke[n]
507
+ children: Ge[n]
506
508
  }
507
509
  );
508
510
  }
509
- const nl = Object.keys(Ke), Be = {
511
+ const pl = Object.keys(Ge), Ke = {
510
512
  reply: "reply",
511
513
  "reply-all": "reply",
512
514
  forward: "forward",
@@ -546,189 +548,190 @@ const nl = Object.keys(Ke), Be = {
546
548
  "chat-dots": "chat",
547
549
  images: "image",
548
550
  paperclip: "paperclip",
549
- hash: "hash"
551
+ hash: "hash",
552
+ funnel: "funnel"
550
553
  };
551
- function me(n) {
552
- return Object.prototype.hasOwnProperty.call(Be, n) ? Be[n] : null;
554
+ function we(n) {
555
+ return Object.prototype.hasOwnProperty.call(Ke, n) ? Ke[n] : null;
553
556
  }
554
- function an() {
557
+ function pn() {
555
558
  try {
556
559
  return process.env.NODE_ENV !== "production";
557
560
  } catch {
558
561
  return !1;
559
562
  }
560
563
  }
561
- const Re = /* @__PURE__ */ new Set();
562
- function sn({ name: n, size: l = 18 }) {
564
+ const Ve = /* @__PURE__ */ new Set();
565
+ function _n({ name: n, size: l = 18 }) {
563
566
  if (n === "") return null;
564
- const t = me(n);
565
- return t !== null ? /* @__PURE__ */ e(D, { name: t, size: l }) : (!Re.has(n) && an() && (Re.add(n), console.warn(`@coolms/ui-react: no icon for the server's icon name "${n}"; its space is kept empty`)), /* @__PURE__ */ e("span", { className: "cms-icon cms-icon--blank", style: { width: l, height: l }, "aria-hidden": "true", "data-icon-name": n }));
567
+ const t = we(n);
568
+ return t !== null ? /* @__PURE__ */ e(L, { name: t, size: l }) : (!Ve.has(n) && pn() && (Ve.add(n), console.warn(`@coolms/ui-react: no icon for the server's icon name "${n}"; its space is kept empty`)), /* @__PURE__ */ e("span", { className: "cms-icon cms-icon--blank", style: { width: l, height: l }, "aria-hidden": "true", "data-icon-name": n }));
566
569
  }
567
- const Ce = 300;
568
- function rn() {
569
- if (typeof window > "u" || typeof getComputedStyle != "function") return Ce;
570
+ const Te = 300;
571
+ function bn() {
572
+ if (typeof window > "u" || typeof getComputedStyle != "function") return Te;
570
573
  const n = getComputedStyle(document.documentElement).getPropertyValue("--cms-state-delay").trim(), l = n.endsWith("ms") ? Number.parseFloat(n) : n.endsWith("s") ? Number.parseFloat(n) * 1e3 : Number.NaN;
571
- return Number.isFinite(l) && l >= 0 ? l : Ce;
574
+ return Number.isFinite(l) && l >= 0 ? l : Te;
572
575
  }
573
- function cn() {
574
- return /* @__PURE__ */ o("svg", { className: "cms-state__spinner", viewBox: "0 0 24 24", "aria-hidden": "true", focusable: "false", children: [
576
+ function vn() {
577
+ return /* @__PURE__ */ i("svg", { className: "cms-state__spinner", viewBox: "0 0 24 24", "aria-hidden": "true", focusable: "false", children: [
575
578
  /* @__PURE__ */ e("circle", { className: "cms-state__track", cx: "12", cy: "12", r: "10", fill: "none" }),
576
579
  /* @__PURE__ */ e("circle", { className: "cms-state__arc", cx: "12", cy: "12", r: "10", fill: "none", pathLength: "100", strokeDasharray: "28 72" })
577
580
  ] });
578
581
  }
579
- function ie({ kind: n, title: l, description: t, action: i, placement: c = "block", icon: s }) {
580
- const [u, a] = A(n !== "loading");
581
- return J(() => {
582
+ function me({ kind: n, title: l, description: t, action: r, placement: c = "block", icon: s }) {
583
+ const [m, a] = T(n !== "loading");
584
+ return Q(() => {
582
585
  if (n !== "loading") {
583
586
  a(!0);
584
587
  return;
585
588
  }
586
589
  a(!1);
587
- const m = window.setTimeout(() => a(!0), rn());
588
- return () => window.clearTimeout(m);
589
- }, [n]), /* @__PURE__ */ o(
590
+ const u = window.setTimeout(() => a(!0), bn());
591
+ return () => window.clearTimeout(u);
592
+ }, [n]), /* @__PURE__ */ i(
590
593
  "div",
591
594
  {
592
- className: L("cms-state", `cms-state--${n}`, `cms-state--${c}`, !u && "is-waiting"),
595
+ className: F("cms-state", `cms-state--${n}`, `cms-state--${c}`, !m && "is-waiting"),
593
596
  role: "status",
594
597
  "aria-live": "polite",
595
598
  "data-kind": n,
596
599
  children: [
597
- n === "loading" ? /* @__PURE__ */ e(cn, {}) : null,
598
- n === "error" || n === "denied" ? /* @__PURE__ */ e(V, { name: n === "error" ? "warning" : "lock" }) : null,
599
- n === "empty" && s !== void 0 && me(s) !== null ? /* @__PURE__ */ e("span", { className: "cms-state__icon", "aria-hidden": "true", children: /* @__PURE__ */ e(sn, { name: s, size: c === "page" ? 32 : 24 }) }) : null,
600
- /* @__PURE__ */ o("span", { className: "cms-state__text", children: [
600
+ n === "loading" ? /* @__PURE__ */ e(vn, {}) : null,
601
+ n === "error" || n === "denied" ? /* @__PURE__ */ e(G, { name: n === "error" ? "warning" : "lock" }) : null,
602
+ n === "empty" && s !== void 0 && we(s) !== null ? /* @__PURE__ */ e("span", { className: "cms-state__icon", "aria-hidden": "true", children: /* @__PURE__ */ e(_n, { name: s, size: c === "page" ? 32 : 24 }) }) : null,
603
+ /* @__PURE__ */ i("span", { className: "cms-state__text", children: [
601
604
  /* @__PURE__ */ e("span", { className: "cms-state__title", children: l }),
602
605
  t !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-state__description", children: t }) : null
603
606
  ] }),
604
- i !== void 0 && n !== "denied" ? /* @__PURE__ */ e(ce, { className: "cms-state__action", onClick: i.onAction, children: i.label }) : null
607
+ r !== void 0 && n !== "denied" ? /* @__PURE__ */ e(he, { className: "cms-state__action", onClick: r.onAction, children: r.label }) : null
605
608
  ]
606
609
  }
607
610
  );
608
611
  }
609
- const on = 'input, select, textarea, button:not([disabled]), iframe, [href], [tabindex]:not([tabindex="-1"])', dn = 60;
610
- function un(n) {
612
+ const gn = 'input, select, textarea, button:not([disabled]), iframe, [href], [tabindex]:not([tabindex="-1"])', Nn = 60;
613
+ function wn(n) {
611
614
  return n instanceof Element && n.closest('input, select, textarea, [contenteditable="true"], [data-viewer-keys]') !== null;
612
615
  }
613
- function mn(n) {
616
+ function yn(n) {
614
617
  return n instanceof Element && n.closest("[data-viewer-gestures]") !== null;
615
618
  }
616
- function hn(n) {
619
+ function kn(n) {
617
620
  return n.getClientRects().length > 0;
618
621
  }
619
- function ll(n) {
620
- const { name: l, badge: t, closeLabel: i, onClose: c, actions: s = [], moreLabel: u = "More", edit: a, editing: m, state: v, siblings: d, bar: f, thumbnails: r, strip: h, onZoom: p, children: N } = n, k = O(null), y = O(null), C = Q(), [M, _] = A(!1), w = O(null);
621
- J(() => {
622
+ function _l(n) {
623
+ const { name: l, badge: t, closeLabel: r, onClose: c, actions: s = [], moreLabel: m = "More", edit: a, editing: u, state: v, siblings: o, bar: p, thumbnails: h, strip: f, onZoom: d, children: g } = n, k = H(null), x = H(null), C = se(), [w, b] = T(!1), y = H(null);
624
+ Q(() => {
622
625
  var z;
623
- const x = document.activeElement, $ = document.body.style.overflow;
624
- return document.body.style.overflow = "hidden", (z = y.current) == null || z.focus(), () => {
625
- var W;
626
- document.body.style.overflow = $, (W = x == null ? void 0 : x.focus) == null || W.call(x);
626
+ const M = document.activeElement, R = document.body.style.overflow;
627
+ return document.body.style.overflow = "hidden", (z = x.current) == null || z.focus(), () => {
628
+ var q;
629
+ document.body.style.overflow = R, (q = M == null ? void 0 : M.focus) == null || q.call(M);
627
630
  };
628
631
  }, []);
629
- const T = () => {
630
- m != null && m.dirty ? m.onDirtyClose() : c();
631
- }, U = (x) => {
632
- const $ = x.touches.length === 1 ? x.touches[0] : void 0;
633
- w.current = $ === void 0 || m !== void 0 || mn(x.target) ? null : { x: $.clientX, y: $.clientY };
634
- }, B = (x) => {
635
- var H, Y;
636
- const $ = w.current, z = x.changedTouches[0];
637
- if (w.current = null, $ === null || z === void 0) return;
638
- const W = z.clientX - $.x;
639
- Math.abs(W) < dn || Math.abs(W) < Math.abs(z.clientY - $.y) || (W > 0 ? (H = d == null ? void 0 : d.onPrevious) == null || H.call(d) : (Y = d == null ? void 0 : d.onNext) == null || Y.call(d));
632
+ const D = () => {
633
+ u != null && u.dirty ? u.onDirtyClose() : c();
634
+ }, Z = (M) => {
635
+ const R = M.touches.length === 1 ? M.touches[0] : void 0;
636
+ y.current = R === void 0 || u !== void 0 || yn(M.target) ? null : { x: R.clientX, y: R.clientY };
637
+ }, V = (M) => {
638
+ var U, j;
639
+ const R = y.current, z = M.changedTouches[0];
640
+ if (y.current = null, R === null || z === void 0) return;
641
+ const q = z.clientX - R.x;
642
+ Math.abs(q) < Nn || Math.abs(q) < Math.abs(z.clientY - R.y) || (q > 0 ? (U = o == null ? void 0 : o.onPrevious) == null || U.call(o) : (j = o == null ? void 0 : o.onNext) == null || j.call(o));
640
643
  };
641
- return De(
642
- /* @__PURE__ */ o(
644
+ return Pe(
645
+ /* @__PURE__ */ i(
643
646
  "div",
644
647
  {
645
648
  ref: k,
646
- className: L("cms-viewer", m !== void 0 && "is-editing"),
649
+ className: F("cms-viewer", u !== void 0 && "is-editing"),
647
650
  role: "dialog",
648
651
  "aria-modal": "true",
649
652
  "aria-labelledby": C,
650
653
  tabIndex: -1,
651
- onKeyDown: (x) => {
652
- var $, z, W;
653
- if (x.key === "Escape") {
654
- if (m !== void 0) return;
655
- x.stopPropagation(), M ? _(!1) : c();
656
- } else if (x.key === "Tab") {
657
- const H = Array.from((($ = k.current) == null ? void 0 : $.querySelectorAll(on)) ?? []).filter(hn);
658
- if (H.length === 0) return;
659
- const Y = H[0], X = H[H.length - 1];
660
- x.shiftKey && document.activeElement === Y ? (x.preventDefault(), X.focus()) : !x.shiftKey && document.activeElement === X && (x.preventDefault(), Y.focus());
661
- } else m === void 0 && !un(x.target) && !x.ctrlKey && !x.metaKey && !x.altKey && (x.key === "ArrowLeft" ? (z = d == null ? void 0 : d.onPrevious) == null || z.call(d) : x.key === "ArrowRight" ? (W = d == null ? void 0 : d.onNext) == null || W.call(d) : x.key === "+" || x.key === "=" ? p == null || p("in") : x.key === "-" ? p == null || p("out") : x.key === "0" && (p == null || p("reset")));
654
+ onKeyDown: (M) => {
655
+ var R, z, q;
656
+ if (M.key === "Escape") {
657
+ if (u !== void 0) return;
658
+ M.stopPropagation(), w ? b(!1) : c();
659
+ } else if (M.key === "Tab") {
660
+ const U = Array.from(((R = k.current) == null ? void 0 : R.querySelectorAll(gn)) ?? []).filter(kn);
661
+ if (U.length === 0) return;
662
+ const j = U[0], le = U[U.length - 1];
663
+ M.shiftKey && document.activeElement === j ? (M.preventDefault(), le.focus()) : !M.shiftKey && document.activeElement === le && (M.preventDefault(), j.focus());
664
+ } else u === void 0 && !wn(M.target) && !M.ctrlKey && !M.metaKey && !M.altKey && (M.key === "ArrowLeft" ? (z = o == null ? void 0 : o.onPrevious) == null || z.call(o) : M.key === "ArrowRight" ? (q = o == null ? void 0 : o.onNext) == null || q.call(o) : M.key === "+" || M.key === "=" ? d == null || d("in") : M.key === "-" ? d == null || d("out") : M.key === "0" && (d == null || d("reset")));
662
665
  },
663
666
  children: [
664
- d !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-visually-hidden", role: "status", children: `${l}, ${d.position}` }) : null,
665
- /* @__PURE__ */ o("header", { className: "cms-viewer__top", children: [
666
- /* @__PURE__ */ e("button", { ref: y, type: "button", className: "cms-viewer__icon", "aria-label": i, onClick: T, children: /* @__PURE__ */ e(V, { name: "close" }) }),
667
+ o !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-visually-hidden", role: "status", children: `${l}, ${o.position}` }) : null,
668
+ /* @__PURE__ */ i("header", { className: "cms-viewer__top", children: [
669
+ /* @__PURE__ */ e("button", { ref: x, type: "button", className: "cms-viewer__icon", "aria-label": r, onClick: D, children: /* @__PURE__ */ e(G, { name: "close" }) }),
667
670
  /* @__PURE__ */ e("span", { className: "cms-viewer__badge", children: t }),
668
671
  /* @__PURE__ */ e("h2", { className: "cms-viewer__name", id: C, title: l, children: l }),
669
- d !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-viewer__position", children: d.position }) : null,
672
+ o !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-viewer__position", children: o.position }) : null,
670
673
  /* @__PURE__ */ e("span", { className: "cms-viewer__space" }),
671
- m !== void 0 ? /* @__PURE__ */ o(E, { children: [
672
- /* @__PURE__ */ e("span", { className: "cms-viewer__status", role: "status", children: m.status }),
673
- /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__button cms-viewer__button--edit", onClick: m.onDone, children: m.doneLabel })
674
- ] }) : /* @__PURE__ */ o(E, { children: [
675
- /* @__PURE__ */ e("span", { className: "cms-viewer__actions", children: s.map((x) => /* @__PURE__ */ o("button", { type: "button", className: "cms-viewer__button", onClick: x.onSelect, children: [
676
- x.icon,
677
- x.label
678
- ] }, x.label)) }),
679
- a !== void 0 ? /* @__PURE__ */ o("button", { type: "button", className: "cms-viewer__button cms-viewer__button--edit", "aria-label": a.label, onClick: a.onEdit, children: [
674
+ u !== void 0 ? /* @__PURE__ */ i(A, { children: [
675
+ /* @__PURE__ */ e("span", { className: "cms-viewer__status", role: "status", children: u.status }),
676
+ /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__button cms-viewer__button--edit", onClick: u.onDone, children: u.doneLabel })
677
+ ] }) : /* @__PURE__ */ i(A, { children: [
678
+ /* @__PURE__ */ e("span", { className: "cms-viewer__actions", children: s.map((M) => /* @__PURE__ */ i("button", { type: "button", className: "cms-viewer__button", onClick: M.onSelect, children: [
679
+ M.icon,
680
+ M.label
681
+ ] }, M.label)) }),
682
+ a !== void 0 ? /* @__PURE__ */ i("button", { type: "button", className: "cms-viewer__button cms-viewer__button--edit", "aria-label": a.label, onClick: a.onEdit, children: [
680
683
  a.icon,
681
684
  /* @__PURE__ */ e("span", { className: "cms-viewer__wide", children: a.label })
682
685
  ] }) : null,
683
- s.length > 0 ? /* @__PURE__ */ o("span", { className: "cms-viewer__more", children: [
684
- /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__icon", "aria-label": u, "aria-expanded": M, onClick: () => _((x) => !x), children: /* @__PURE__ */ e(D, { name: "more" }) }),
685
- M ? /* @__PURE__ */ e("span", { className: "cms-viewer__menu", children: s.map((x) => /* @__PURE__ */ o(
686
+ s.length > 0 ? /* @__PURE__ */ i("span", { className: "cms-viewer__more", children: [
687
+ /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__icon", "aria-label": m, "aria-expanded": w, onClick: () => b((M) => !M), children: /* @__PURE__ */ e(L, { name: "more" }) }),
688
+ w ? /* @__PURE__ */ e("span", { className: "cms-viewer__menu", children: s.map((M) => /* @__PURE__ */ i(
686
689
  "button",
687
690
  {
688
691
  type: "button",
689
692
  className: "cms-viewer__button",
690
693
  onClick: () => {
691
- _(!1), x.onSelect();
694
+ b(!1), M.onSelect();
692
695
  },
693
696
  children: [
694
- x.icon,
695
- x.label
697
+ M.icon,
698
+ M.label
696
699
  ]
697
700
  },
698
- x.label
701
+ M.label
699
702
  )) }) : null
700
703
  ] }) : null
701
704
  ] })
702
705
  ] }),
703
- /* @__PURE__ */ o("div", { className: "cms-viewer__body", children: [
704
- r != null && m === void 0 ? /* @__PURE__ */ e("nav", { className: "cms-viewer__thumbnails", children: r }) : null,
705
- /* @__PURE__ */ o("div", { className: "cms-viewer__content", onTouchStart: U, onTouchEnd: B, children: [
706
- (m == null ? void 0 : m.conflict) !== void 0 ? /* @__PURE__ */ o("div", { className: "cms-viewer__conflict", role: "alert", children: [
707
- /* @__PURE__ */ e("p", { className: "cms-viewer__conflict-text", children: m.conflict.message }),
708
- /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__button", onClick: m.conflict.onOverwrite, children: m.conflict.overwriteLabel }),
709
- /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__button cms-viewer__button--edit", onClick: m.conflict.onKeepBoth, children: m.conflict.keepBothLabel })
706
+ /* @__PURE__ */ i("div", { className: "cms-viewer__body", children: [
707
+ h != null && u === void 0 ? /* @__PURE__ */ e("nav", { className: "cms-viewer__thumbnails", children: h }) : null,
708
+ /* @__PURE__ */ i("div", { className: "cms-viewer__content", onTouchStart: Z, onTouchEnd: V, children: [
709
+ (u == null ? void 0 : u.conflict) !== void 0 ? /* @__PURE__ */ i("div", { className: "cms-viewer__conflict", role: "alert", children: [
710
+ /* @__PURE__ */ e("p", { className: "cms-viewer__conflict-text", children: u.conflict.message }),
711
+ /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__button", onClick: u.conflict.onOverwrite, children: u.conflict.overwriteLabel }),
712
+ /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__button cms-viewer__button--edit", onClick: u.conflict.onKeepBoth, children: u.conflict.keepBothLabel })
710
713
  ] }) : null,
711
- v === void 0 ? N : /* @__PURE__ */ e(fn, { state: v }),
712
- m === void 0 && (d != null && d.onPrevious) ? /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__side cms-viewer__side--previous", "aria-label": d.previousLabel, title: d.previousLabel, onClick: d.onPrevious, children: /* @__PURE__ */ e(V, { name: "back" }) }) : null,
713
- m === void 0 && (d != null && d.onNext) ? /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__side cms-viewer__side--next", "aria-label": d.nextLabel, title: d.nextLabel, onClick: d.onNext, children: /* @__PURE__ */ e(V, { name: "back" }) }) : null,
714
- m === void 0 && d !== void 0 ? /* @__PURE__ */ e("div", { className: "cms-viewer__dots", "aria-hidden": "true", children: Array.from({ length: Math.min(d.total, 7) }, (x, $) => /* @__PURE__ */ e("i", { className: $ === Math.min(d.index, 6) ? "is-current" : void 0 }, $)) }) : null
714
+ v === void 0 ? g : /* @__PURE__ */ e(xn, { state: v }),
715
+ u === void 0 && (o != null && o.onPrevious) ? /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__side cms-viewer__side--previous", "aria-label": o.previousLabel, title: o.previousLabel, onClick: o.onPrevious, children: /* @__PURE__ */ e(G, { name: "back" }) }) : null,
716
+ u === void 0 && (o != null && o.onNext) ? /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__side cms-viewer__side--next", "aria-label": o.nextLabel, title: o.nextLabel, onClick: o.onNext, children: /* @__PURE__ */ e(G, { name: "back" }) }) : null,
717
+ u === void 0 && o !== void 0 ? /* @__PURE__ */ e("div", { className: "cms-viewer__dots", "aria-hidden": "true", children: Array.from({ length: Math.min(o.total, 7) }, (M, R) => /* @__PURE__ */ e("i", { className: R === Math.min(o.index, 6) ? "is-current" : void 0 }, R)) }) : null
715
718
  ] })
716
719
  ] }),
717
- m === void 0 && h != null ? /* @__PURE__ */ e("div", { className: "cms-viewer__strip", children: h }) : null,
718
- f != null ? /* @__PURE__ */ e("footer", { className: "cms-viewer__bar", children: f }) : null
720
+ u === void 0 && f != null ? /* @__PURE__ */ e("div", { className: "cms-viewer__strip", children: f }) : null,
721
+ p != null ? /* @__PURE__ */ e("footer", { className: "cms-viewer__bar", children: p }) : null
719
722
  ]
720
723
  }
721
724
  ),
722
725
  document.body
723
726
  );
724
727
  }
725
- function fn({ state: n }) {
728
+ function xn({ state: n }) {
726
729
  switch (n.kind) {
727
730
  case "loading":
728
- return /* @__PURE__ */ e(ie, { kind: "loading", title: n.title, placement: "page" });
731
+ return /* @__PURE__ */ e(me, { kind: "loading", title: n.title, placement: "page" });
729
732
  case "error":
730
733
  return /* @__PURE__ */ e(
731
- ie,
734
+ me,
732
735
  {
733
736
  kind: "error",
734
737
  title: n.title,
@@ -739,7 +742,7 @@ function fn({ state: n }) {
739
742
  );
740
743
  case "no-preview":
741
744
  return /* @__PURE__ */ e(
742
- ie,
745
+ me,
743
746
  {
744
747
  kind: "empty",
745
748
  title: n.title,
@@ -750,179 +753,179 @@ function fn({ state: n }) {
750
753
  );
751
754
  }
752
755
  }
753
- class pn extends Error {
756
+ class Mn extends Error {
754
757
  constructor(l = "denied") {
755
758
  super(l), this.name = "FilePickerDenied";
756
759
  }
757
760
  }
758
- class bn extends Error {
761
+ class Cn extends Error {
759
762
  constructor(l = "restart") {
760
763
  super(l), this.name = "FilePickerRestart";
761
764
  }
762
765
  }
763
- const Me = (n, l) => `${n}
764
- ${l}`, _n = (n, l) => n === "" ? l : `${n}/${l}`, vn = 48;
765
- function tl(n) {
766
- var P, G;
767
- const { open: l, spaces: t, list: i, disabledReason: c, budget: s, formatSize: u, labels: a, onConfirm: m, onCancel: v } = n, [d, f] = A(((P = t[0]) == null ? void 0 : P.id) ?? ""), [r, h] = A(""), [p, N] = A({ status: "loading" }), [k, y] = A(0), [C, M] = A(/* @__PURE__ */ new Map()), [_, w] = A(0), [T, U] = A(!1), B = O(null), x = O(!1);
768
- J(() => {
769
- x.current = !1;
770
- }, [l, d, r]);
771
- const $ = Q();
772
- J(() => {
773
- var g;
774
- l && (f(((g = t[0]) == null ? void 0 : g.id) ?? ""), h(""), M(/* @__PURE__ */ new Map()), U(!1));
775
- }, [l]), J(() => {
776
- if (!l || d === "") return;
777
- let g = !0;
778
- return N({ status: "loading" }), w(0), i(d, r).then(
779
- (S) => g && N({ status: "ready", entries: S.entries, next: S.next ?? null, paging: !1 }),
780
- (S) => g && N({ status: S instanceof pn ? "denied" : "error" })
766
+ const Ae = (n, l) => `${n}
767
+ ${l}`, Sn = (n, l) => n === "" ? l : `${n}/${l}`, En = 48;
768
+ function bl(n) {
769
+ var I, X;
770
+ const { open: l, spaces: t, list: r, disabledReason: c, budget: s, formatSize: m, labels: a, onConfirm: u, onCancel: v } = n, [o, p] = T(((I = t[0]) == null ? void 0 : I.id) ?? ""), [h, f] = T(""), [d, g] = T({ status: "loading" }), [k, x] = T(0), [C, w] = T(/* @__PURE__ */ new Map()), [b, y] = T(0), [D, Z] = T(!1), V = H(null), M = H(!1);
771
+ Q(() => {
772
+ M.current = !1;
773
+ }, [l, o, h]);
774
+ const R = se();
775
+ Q(() => {
776
+ var N;
777
+ l && (p(((N = t[0]) == null ? void 0 : N.id) ?? ""), f(""), w(/* @__PURE__ */ new Map()), Z(!1));
778
+ }, [l]), Q(() => {
779
+ if (!l || o === "") return;
780
+ let N = !0;
781
+ return g({ status: "loading" }), y(0), r(o, h).then(
782
+ (S) => N && g({ status: "ready", entries: S.entries, next: S.next ?? null, paging: !1 }),
783
+ (S) => N && g({ status: S instanceof Mn ? "denied" : "error" })
781
784
  ), () => {
782
- g = !1;
785
+ N = !1;
783
786
  };
784
- }, [l, d, r, i, k]);
785
- const z = _e(() => {
786
- if (p.status !== "ready" || p.next === null || p.paging) return;
787
- const g = p.next, S = p.entries;
788
- N({ ...p, paging: !0 }), i(d, r, g).then(
789
- (R) => {
790
- x.current = !1, N({ status: "ready", entries: [...S, ...R.entries], next: R.next ?? null, paging: !1 });
787
+ }, [l, o, h, r, k]);
788
+ const z = be(() => {
789
+ if (d.status !== "ready" || d.next === null || d.paging) return;
790
+ const N = d.next, S = d.entries;
791
+ g({ ...d, paging: !0 }), r(o, h, N).then(
792
+ (O) => {
793
+ M.current = !1, g({ status: "ready", entries: [...S, ...O.entries], next: O.next ?? null, paging: !1 });
791
794
  },
792
- (R) => {
793
- if (!(R instanceof bn)) {
794
- N({ status: "ready", entries: S, next: g, paging: !1 });
795
+ (O) => {
796
+ if (!(O instanceof Cn)) {
797
+ g({ status: "ready", entries: S, next: N, paging: !1 });
795
798
  return;
796
799
  }
797
- if (x.current) {
798
- N({ status: "error" });
800
+ if (M.current) {
801
+ g({ status: "error" });
799
802
  return;
800
803
  }
801
- x.current = !0, y((j) => j + 1);
804
+ M.current = !0, x((Y) => Y + 1);
802
805
  }
803
806
  );
804
- }, [p, i, d, r]), W = _e((g) => {
807
+ }, [d, r, o, h]), q = be((N) => {
805
808
  var S;
806
- return ((S = s == null ? void 0 : s.cost) == null ? void 0 : S.call(s, g)) ?? g.size ?? 0;
807
- }, [s]), H = je(() => [...C.values()], [C]), Y = H.reduce((g, S) => g + (S.size ?? 0), 0), X = s === void 0 ? null : s.limitBytes - s.usedBytes - H.reduce((g, S) => g + W(S), 0), ee = X !== null && X < 0, te = (g) => {
808
- if (g.kind !== "file") return null;
809
- const S = c == null ? void 0 : c(g);
810
- return S || (X !== null && !C.has(Me(d, g.id)) && W(g) > X ? a.overBudget : null);
811
- }, q = (g) => {
812
- const S = Me(d, g.id);
813
- !C.has(S) && te(g) !== null || M((R) => {
814
- const j = new Map(R);
815
- return j.has(S) ? j.delete(S) : j.set(S, { ...g, space: d, path: r }), j;
809
+ return ((S = s == null ? void 0 : s.cost) == null ? void 0 : S.call(s, N)) ?? N.size ?? 0;
810
+ }, [s]), U = ln(() => [...C.values()], [C]), j = U.reduce((N, S) => N + (S.size ?? 0), 0), le = s === void 0 ? null : s.limitBytes - s.usedBytes - U.reduce((N, S) => N + q(S), 0), ae = le !== null && le < 0, re = (N) => {
811
+ if (N.kind !== "file") return null;
812
+ const S = c == null ? void 0 : c(N);
813
+ return S || (le !== null && !C.has(Ae(o, N.id)) && q(N) > le ? a.overBudget : null);
814
+ }, ie = (N) => {
815
+ const S = Ae(o, N.id);
816
+ !C.has(S) && re(N) !== null || w((O) => {
817
+ const Y = new Map(O);
818
+ return Y.has(S) ? Y.delete(S) : Y.set(S, { ...N, space: o, path: h }), Y;
816
819
  });
817
- }, ae = (g) => h(_n(r, g.name)), se = () => h(r.includes("/") ? r.slice(0, r.lastIndexOf("/")) : ""), ke = (g) => M((S) => {
818
- const R = new Map(S);
819
- return R.delete(g), R;
820
- }), re = p.status === "ready" ? p.entries : [], b = (g) => {
821
- const S = re[_];
822
- if (g.key === "ArrowDown" || g.key === "ArrowUp" || g.key === "Home" || g.key === "End") {
823
- g.preventDefault();
824
- const R = re.length - 1, j = g.key === "Home" ? 0 : g.key === "End" ? R : Math.min(R, Math.max(0, _ + (g.key === "ArrowDown" ? 1 : -1)));
825
- w(j), j >= R - 1 && z();
826
- } else g.key === "Enter" && (S == null ? void 0 : S.kind) === "folder" ? (g.preventDefault(), ae(S)) : g.key === " " && (S == null ? void 0 : S.kind) === "file" ? (g.preventDefault(), q(S)) : g.key === "Backspace" && r !== "" && (g.preventDefault(), se());
827
- }, I = r === "" ? [] : r.split("/"), K = ((G = t.find((g) => g.id === d)) == null ? void 0 : G.name) ?? "", ne = (g) => `${$}-entry-${String(g)}`;
828
- return /* @__PURE__ */ o(
829
- ze,
820
+ }, oe = (N) => f(Sn(h, N.name)), J = () => f(h.includes("/") ? h.slice(0, h.lastIndexOf("/")) : ""), fe = (N) => w((S) => {
821
+ const O = new Map(S);
822
+ return O.delete(N), O;
823
+ }), ee = d.status === "ready" ? d.entries : [], _ = (N) => {
824
+ const S = ee[b];
825
+ if (N.key === "ArrowDown" || N.key === "ArrowUp" || N.key === "Home" || N.key === "End") {
826
+ N.preventDefault();
827
+ const O = ee.length - 1, Y = N.key === "Home" ? 0 : N.key === "End" ? O : Math.min(O, Math.max(0, b + (N.key === "ArrowDown" ? 1 : -1)));
828
+ y(Y), Y >= O - 1 && z();
829
+ } else N.key === "Enter" && (S == null ? void 0 : S.kind) === "folder" ? (N.preventDefault(), oe(S)) : N.key === " " && (S == null ? void 0 : S.kind) === "file" ? (N.preventDefault(), ie(S)) : N.key === "Backspace" && h !== "" && (N.preventDefault(), J());
830
+ }, $ = h === "" ? [] : h.split("/"), B = ((X = t.find((N) => N.id === o)) == null ? void 0 : X.name) ?? "", ne = (N) => `${R}-entry-${String(N)}`;
831
+ return /* @__PURE__ */ i(
832
+ je,
830
833
  {
831
834
  open: l,
832
835
  title: a.title,
833
836
  onClose: v,
834
837
  closeLabel: a.close,
835
- initialFocus: B,
838
+ initialFocus: V,
836
839
  className: "cms-file-picker",
837
- footer: /* @__PURE__ */ o("div", { className: "cms-file-picker__foot", children: [
838
- /* @__PURE__ */ o("div", { className: "cms-file-picker__summary", "aria-live": "polite", children: [
839
- H.length > 0 ? /* @__PURE__ */ e("span", { children: a.total(H.length, u(Y)) }) : null,
840
- s !== void 0 && X !== null ? /* @__PURE__ */ e("span", { className: L(ee && "is-over"), children: ee ? a.overBudget : a.left(u(Math.max(0, X)), u(s.limitBytes)) }) : null
840
+ footer: /* @__PURE__ */ i("div", { className: "cms-file-picker__foot", children: [
841
+ /* @__PURE__ */ i("div", { className: "cms-file-picker__summary", "aria-live": "polite", children: [
842
+ U.length > 0 ? /* @__PURE__ */ e("span", { children: a.total(U.length, m(j)) }) : null,
843
+ s !== void 0 && le !== null ? /* @__PURE__ */ e("span", { className: F(ae && "is-over"), children: ae ? a.overBudget : a.left(m(Math.max(0, le)), m(s.limitBytes)) }) : null
841
844
  ] }),
842
- /* @__PURE__ */ o("div", { className: "cms-file-picker__actions", children: [
843
- /* @__PURE__ */ e(ce, { variant: "secondary", onClick: v, children: a.cancel }),
844
- /* @__PURE__ */ e(ce, { variant: "primary", disabled: H.length === 0 || ee, onClick: () => m(H), children: a.confirm(H.length) })
845
+ /* @__PURE__ */ i("div", { className: "cms-file-picker__actions", children: [
846
+ /* @__PURE__ */ e(he, { variant: "secondary", onClick: v, children: a.cancel }),
847
+ /* @__PURE__ */ e(he, { variant: "primary", disabled: U.length === 0 || ae, onClick: () => u(U), children: a.confirm(U.length) })
845
848
  ] })
846
849
  ] }),
847
850
  children: [
848
- /* @__PURE__ */ o("div", { className: "cms-file-picker__top", children: [
849
- t.length > 1 ? /* @__PURE__ */ o("label", { className: "cms-file-picker__space", children: [
851
+ /* @__PURE__ */ i("div", { className: "cms-file-picker__top", children: [
852
+ t.length > 1 ? /* @__PURE__ */ i("label", { className: "cms-file-picker__space", children: [
850
853
  /* @__PURE__ */ e("span", { className: "cms-visually-hidden", children: a.space }),
851
- /* @__PURE__ */ e("select", { className: "cms-input cms-select", value: d, onChange: (g) => {
852
- f(g.target.value), h("");
853
- }, children: t.map((g) => /* @__PURE__ */ e("option", { value: g.id, children: g.name }, g.id)) })
854
+ /* @__PURE__ */ e("select", { className: "cms-input cms-select", value: o, onChange: (N) => {
855
+ p(N.target.value), f("");
856
+ }, children: t.map((N) => /* @__PURE__ */ e("option", { value: N.id, children: N.name }, N.id)) })
854
857
  ] }) : null,
855
- /* @__PURE__ */ o("nav", { className: "cms-file-picker__path", "aria-label": a.path, children: [
856
- /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": a.up, disabled: r === "", onClick: se, children: /* @__PURE__ */ e(D, { name: "chevron-left" }) }),
857
- /* @__PURE__ */ o("ol", { children: [
858
- /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__crumb", "aria-current": r === "" ? "location" : void 0, onClick: () => h(""), children: K }) }),
859
- I.map((g, S) => {
860
- const R = I.slice(0, S + 1).join("/");
861
- return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__crumb", "aria-current": R === r ? "location" : void 0, onClick: () => h(R), children: g }) }, R);
858
+ /* @__PURE__ */ i("nav", { className: "cms-file-picker__path", "aria-label": a.path, children: [
859
+ /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": a.up, disabled: h === "", onClick: J, children: /* @__PURE__ */ e(L, { name: "chevron-left" }) }),
860
+ /* @__PURE__ */ i("ol", { children: [
861
+ /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__crumb", "aria-current": h === "" ? "location" : void 0, onClick: () => f(""), children: B }) }),
862
+ $.map((N, S) => {
863
+ const O = $.slice(0, S + 1).join("/");
864
+ return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__crumb", "aria-current": O === h ? "location" : void 0, onClick: () => f(O), children: N }) }, O);
862
865
  })
863
866
  ] })
864
867
  ] }),
865
- H.length > 0 ? /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__chip", "aria-expanded": T, onClick: () => U((g) => !g), children: a.selected(H.length) }) : null
868
+ U.length > 0 ? /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__chip", "aria-expanded": D, onClick: () => Z((N) => !N), children: a.selected(U.length) }) : null
866
869
  ] }),
867
- T && H.length > 0 ? /* @__PURE__ */ o("div", { className: "cms-file-picker__chosen", children: [
868
- /* @__PURE__ */ e("ul", { children: [...C.entries()].map(([g, S]) => /* @__PURE__ */ o("li", { children: [
870
+ D && U.length > 0 ? /* @__PURE__ */ i("div", { className: "cms-file-picker__chosen", children: [
871
+ /* @__PURE__ */ e("ul", { children: [...C.entries()].map(([N, S]) => /* @__PURE__ */ i("li", { children: [
869
872
  /* @__PURE__ */ e("span", { className: "cms-file-picker__name", children: S.name }),
870
- /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": a.remove(S.name), onClick: () => ke(g), children: /* @__PURE__ */ e(V, { name: "close" }) })
871
- ] }, g)) }),
872
- /* @__PURE__ */ e(ce, { variant: "secondary", onClick: () => {
873
- M(/* @__PURE__ */ new Map()), U(!1);
873
+ /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": a.remove(S.name), onClick: () => fe(N), children: /* @__PURE__ */ e(G, { name: "close" }) })
874
+ ] }, N)) }),
875
+ /* @__PURE__ */ e(he, { variant: "secondary", onClick: () => {
876
+ w(/* @__PURE__ */ new Map()), Z(!1);
874
877
  }, children: a.clear })
875
878
  ] }) : null,
876
- /* @__PURE__ */ o("div", { className: "cms-file-picker__list", onScroll: (g) => {
877
- const S = g.currentTarget;
878
- S.scrollTop + S.clientHeight >= S.scrollHeight - vn && z();
879
+ /* @__PURE__ */ i("div", { className: "cms-file-picker__list", onScroll: (N) => {
880
+ const S = N.currentTarget;
881
+ S.scrollTop + S.clientHeight >= S.scrollHeight - En && z();
879
882
  }, children: [
880
- p.status === "loading" ? /* @__PURE__ */ e(ie, { kind: "loading", title: a.loading, placement: "block" }) : null,
881
- p.status === "error" ? /* @__PURE__ */ e(ie, { kind: "error", title: a.error, placement: "block", action: { label: a.retry, onAction: () => {
882
- x.current = !1, y((g) => g + 1);
883
+ d.status === "loading" ? /* @__PURE__ */ e(me, { kind: "loading", title: a.loading, placement: "block" }) : null,
884
+ d.status === "error" ? /* @__PURE__ */ e(me, { kind: "error", title: a.error, placement: "block", action: { label: a.retry, onAction: () => {
885
+ M.current = !1, x((N) => N + 1);
883
886
  } } }) : null,
884
- p.status === "denied" ? /* @__PURE__ */ e(ie, { kind: "denied", title: a.denied, placement: "block" }) : null,
885
- p.status === "ready" && re.length === 0 ? /* @__PURE__ */ e(ie, { kind: "empty", title: a.empty, placement: "block" }) : null,
886
- /* @__PURE__ */ o(
887
+ d.status === "denied" ? /* @__PURE__ */ e(me, { kind: "denied", title: a.denied, placement: "block" }) : null,
888
+ d.status === "ready" && ee.length === 0 ? /* @__PURE__ */ e(me, { kind: "empty", title: a.empty, placement: "block" }) : null,
889
+ /* @__PURE__ */ i(
887
890
  "div",
888
891
  {
889
- ref: B,
892
+ ref: V,
890
893
  role: "listbox",
891
894
  "aria-multiselectable": "true",
892
895
  "aria-label": a.files,
893
- "aria-activedescendant": re.length > 0 ? ne(_) : void 0,
896
+ "aria-activedescendant": ee.length > 0 ? ne(b) : void 0,
894
897
  tabIndex: 0,
895
898
  className: "cms-file-picker__entries",
896
- hidden: p.status !== "ready" || re.length === 0,
897
- onKeyDown: b,
899
+ hidden: d.status !== "ready" || ee.length === 0,
900
+ onKeyDown: _,
898
901
  children: [
899
- re.map((g, S) => {
900
- const R = g.kind === "file" && C.has(Me(d, g.id)), j = te(g);
901
- return /* @__PURE__ */ o(
902
+ ee.map((N, S) => {
903
+ const O = N.kind === "file" && C.has(Ae(o, N.id)), Y = re(N);
904
+ return /* @__PURE__ */ i(
902
905
  "div",
903
906
  {
904
907
  id: ne(S),
905
908
  role: "option",
906
- "aria-selected": g.kind === "file" ? R : void 0,
907
- "aria-disabled": j !== null || void 0,
908
- className: L("cms-file-picker__entry", S === _ && "is-active", R && "is-ticked", j !== null && "is-disabled"),
909
+ "aria-selected": N.kind === "file" ? O : void 0,
910
+ "aria-disabled": Y !== null || void 0,
911
+ className: F("cms-file-picker__entry", S === b && "is-active", O && "is-ticked", Y !== null && "is-disabled"),
909
912
  onClick: () => {
910
- w(S), g.kind === "folder" ? ae(g) : q(g);
913
+ y(S), N.kind === "folder" ? oe(N) : ie(N);
911
914
  },
912
915
  children: [
913
- /* @__PURE__ */ e("span", { className: "cms-file-picker__tick", "aria-hidden": "true", children: R ? /* @__PURE__ */ e(D, { name: "check" }) : null }),
914
- /* @__PURE__ */ e(D, { name: g.kind === "folder" ? "folder" : "file" }),
915
- /* @__PURE__ */ o("span", { className: "cms-file-picker__text", children: [
916
- /* @__PURE__ */ e("span", { className: "cms-file-picker__name", children: g.name }),
917
- j !== null ? /* @__PURE__ */ e("span", { className: "cms-file-picker__reason", children: j }) : null
916
+ /* @__PURE__ */ e("span", { className: "cms-file-picker__tick", "aria-hidden": "true", children: O ? /* @__PURE__ */ e(L, { name: "check" }) : null }),
917
+ /* @__PURE__ */ e(L, { name: N.kind === "folder" ? "folder" : "file" }),
918
+ /* @__PURE__ */ i("span", { className: "cms-file-picker__text", children: [
919
+ /* @__PURE__ */ e("span", { className: "cms-file-picker__name", children: N.name }),
920
+ Y !== null ? /* @__PURE__ */ e("span", { className: "cms-file-picker__reason", children: Y }) : null
918
921
  ] }),
919
- g.kind === "file" && g.size != null ? /* @__PURE__ */ e("span", { className: "cms-file-picker__size", children: u(g.size) }) : null
922
+ N.kind === "file" && N.size != null ? /* @__PURE__ */ e("span", { className: "cms-file-picker__size", children: m(N.size) }) : null
920
923
  ]
921
924
  },
922
- g.id
925
+ N.id
923
926
  );
924
927
  }),
925
- p.status === "ready" && p.paging ? /* @__PURE__ */ e("div", { className: "cms-file-picker__paging", children: /* @__PURE__ */ e(ie, { kind: "loading", title: a.loading, placement: "inline" }) }) : null
928
+ d.status === "ready" && d.paging ? /* @__PURE__ */ e("div", { className: "cms-file-picker__paging", children: /* @__PURE__ */ e(me, { kind: "loading", title: a.loading, placement: "inline" }) }) : null
926
929
  ]
927
930
  }
928
931
  )
@@ -931,205 +934,217 @@ function tl(n) {
931
934
  }
932
935
  );
933
936
  }
934
- const Se = 64;
935
- function gn(n, l) {
937
+ const De = 64;
938
+ function An(n, l) {
936
939
  for (let t = n instanceof Element ? n : null; t !== null; t = t.parentElement) {
937
940
  if (t instanceof HTMLElement && t.scrollTop > 0) return !1;
938
941
  if (t === l) return !0;
939
942
  }
940
943
  return l.scrollTop <= 0;
941
944
  }
942
- function Nn(n, l) {
943
- const [t, i] = A(0), c = O(l);
944
- return c.current = l, J(() => {
945
+ function Tn(n, l) {
946
+ const [t, r] = T(0), c = H(l);
947
+ return c.current = l, Q(() => {
945
948
  const s = n.current;
946
949
  if (s === null) return;
947
- let u = null, a = 0;
948
- const m = (f) => {
949
- u = gn(f.target, s) && f.touches.length === 1 ? f.touches[0].clientY : null, a = 0;
950
- }, v = (f) => {
951
- if (u === null || c.current === null) return;
952
- const r = f.touches[0].clientY - u;
953
- if (r <= 0) {
954
- u = null, i(0);
950
+ let m = null, a = 0;
951
+ const u = (p) => {
952
+ m = An(p.target, s) && p.touches.length === 1 ? p.touches[0].clientY : null, a = 0;
953
+ }, v = (p) => {
954
+ if (m === null || c.current === null) return;
955
+ const h = p.touches[0].clientY - m;
956
+ if (h <= 0) {
957
+ m = null, r(0);
955
958
  return;
956
959
  }
957
- f.cancelable && f.preventDefault(), a = Math.min(r * 0.6, Se * 1.5), i(a);
958
- }, d = () => {
959
- var f;
960
- u !== null && a >= Se && ((f = c.current) == null || f.call(c)), u = null, a = 0, i(0);
960
+ p.cancelable && p.preventDefault(), a = Math.min(h * 0.6, De * 1.5), r(a);
961
+ }, o = () => {
962
+ var p;
963
+ m !== null && a >= De && ((p = c.current) == null || p.call(c)), m = null, a = 0, r(0);
961
964
  };
962
- return s.addEventListener("touchstart", m, { passive: !0 }), s.addEventListener("touchmove", v, { passive: !1 }), s.addEventListener("touchend", d), s.addEventListener("touchcancel", d), () => {
963
- s.removeEventListener("touchstart", m), s.removeEventListener("touchmove", v), s.removeEventListener("touchend", d), s.removeEventListener("touchcancel", d);
965
+ return s.addEventListener("touchstart", u, { passive: !0 }), s.addEventListener("touchmove", v, { passive: !1 }), s.addEventListener("touchend", o), s.addEventListener("touchcancel", o), () => {
966
+ s.removeEventListener("touchstart", u), s.removeEventListener("touchmove", v), s.removeEventListener("touchend", o), s.removeEventListener("touchcancel", o);
964
967
  };
965
968
  }, [n]), t;
966
969
  }
967
- const Ze = Ye(null);
968
- function wn() {
969
- return qe(Ze);
970
+ const Ye = sn(null);
971
+ function Dn() {
972
+ return tn(Ye);
970
973
  }
971
- function al({ label: n, rows: l, error: t, onRetry: i, loadingText: c = "Loading", emptyTitle: s = "Nothing here yet", emptyHint: u, selected: a, onOpen: m, onRowMenu: v }) {
972
- const d = O([]), f = wn();
973
- if (t != null) return /* @__PURE__ */ e(tn, { message: t, onRetry: i });
974
- if (l === null) return /* @__PURE__ */ e(nn, { what: c, layout: "block" });
975
- if (l.length === 0) return /* @__PURE__ */ e(ln, { title: s, hint: u });
976
- const r = (h, p, N) => {
974
+ function vl({ label: n, rows: l, error: t, onRetry: r, loadingText: c = "Loading", emptyTitle: s = "Nothing here yet", emptyHint: m, selected: a, onOpen: u, onRowMenu: v }) {
975
+ const o = H([]), p = Dn();
976
+ if (t != null) return /* @__PURE__ */ e(fn, { message: t, onRetry: r });
977
+ if (l === null) return /* @__PURE__ */ e(mn, { what: c, layout: "block" });
978
+ if (l.length === 0) return /* @__PURE__ */ e(hn, { title: s, hint: m });
979
+ const h = (f, d, g) => {
977
980
  var k;
978
- if (h.key === "ArrowDown" || h.key === "ArrowUp")
979
- h.preventDefault(), (k = d.current[Math.min(l.length - 1, Math.max(0, p + (h.key === "ArrowDown" ? 1 : -1)))]) == null || k.focus();
980
- else if (h.key === "Enter")
981
- m == null || m(N);
982
- else if ((h.key === "ContextMenu" || h.shiftKey && h.key === "F10") && v) {
983
- h.preventDefault();
984
- const y = h.currentTarget.getBoundingClientRect();
985
- v(N, { x: y.left + 16, y: y.bottom });
981
+ if (f.key === "ArrowDown" || f.key === "ArrowUp")
982
+ f.preventDefault(), (k = o.current[Math.min(l.length - 1, Math.max(0, d + (f.key === "ArrowDown" ? 1 : -1)))]) == null || k.focus();
983
+ else if (f.key === "Enter")
984
+ u == null || u(g);
985
+ else if ((f.key === "ContextMenu" || f.shiftKey && f.key === "F10") && v) {
986
+ f.preventDefault();
987
+ const x = f.currentTarget.getBoundingClientRect();
988
+ v(g, { x: x.left + 16, y: x.bottom });
986
989
  }
987
990
  };
988
- return /* @__PURE__ */ o(E, { children: [
989
- f !== null && (f.distance > 0 || f.refreshing) ? /* @__PURE__ */ o("div", { className: "cms-list__pull", role: "status", style: { height: f.refreshing ? void 0 : f.distance }, "data-ready": f.distance >= Se ? "" : void 0, children: [
990
- f.refreshing ? /* @__PURE__ */ e(V, { name: "spinner" }) : null,
991
- f.text != null ? /* @__PURE__ */ e("span", { className: "cms-list__pull-text", children: f.text }) : null
991
+ return /* @__PURE__ */ i(A, { children: [
992
+ p !== null && (p.distance > 0 || p.refreshing) ? /* @__PURE__ */ i("div", { className: "cms-list__pull", role: "status", style: { height: p.refreshing ? void 0 : p.distance }, "data-ready": p.distance >= De ? "" : void 0, children: [
993
+ p.refreshing ? /* @__PURE__ */ e(G, { name: "spinner" }) : null,
994
+ p.text != null ? /* @__PURE__ */ e("span", { className: "cms-list__pull-text", children: p.text }) : null
992
995
  ] }) : null,
993
- /* @__PURE__ */ e("ul", { className: "cms-list", role: "listbox", "aria-label": n, children: l.map((h, p) => {
994
- const N = h.id === a;
995
- return /* @__PURE__ */ o(
996
+ /* @__PURE__ */ e("ul", { className: "cms-list", role: "listbox", "aria-label": n, children: l.map((f, d) => {
997
+ const g = f.id === a;
998
+ return /* @__PURE__ */ i(
996
999
  "li",
997
1000
  {
998
1001
  ref: (k) => {
999
- d.current[p] = k;
1002
+ o.current[d] = k;
1000
1003
  },
1001
1004
  role: "option",
1002
- "aria-selected": N,
1003
- tabIndex: N || a == null && p === 0 ? 0 : -1,
1004
- className: L("cms-list__row", N && "is-selected"),
1005
- onClick: () => m == null ? void 0 : m(h.id),
1006
- onKeyDown: (k) => r(k, p, h.id),
1005
+ "aria-selected": g,
1006
+ tabIndex: g || a == null && d === 0 ? 0 : -1,
1007
+ className: F("cms-list__row", g && "is-selected"),
1008
+ onClick: () => u == null ? void 0 : u(f.id),
1009
+ onKeyDown: (k) => h(k, d, f.id),
1007
1010
  onContextMenu: v ? (k) => {
1008
- k.preventDefault(), v(h.id, { x: k.clientX, y: k.clientY });
1011
+ k.preventDefault(), v(f.id, { x: k.clientX, y: k.clientY });
1009
1012
  } : void 0,
1010
1013
  children: [
1011
- h.lead != null ? /* @__PURE__ */ e("span", { className: "cms-list__lead", children: h.lead }) : null,
1012
- /* @__PURE__ */ o("span", { className: "cms-list__text", children: [
1013
- /* @__PURE__ */ e("span", { className: L("cms-list__primary", h.unread === !0 && "is-unread"), children: h.primary }),
1014
- h.secondary != null ? /* @__PURE__ */ e("span", { className: "cms-list__secondary", children: h.secondary }) : null
1014
+ f.lead != null ? /* @__PURE__ */ e("span", { className: "cms-list__lead", children: f.lead }) : null,
1015
+ /* @__PURE__ */ i("span", { className: "cms-list__text", children: [
1016
+ /* @__PURE__ */ e("span", { className: F("cms-list__primary", f.unread === !0 && "is-unread"), children: f.primary }),
1017
+ f.secondary != null ? /* @__PURE__ */ e("span", { className: "cms-list__secondary", children: f.secondary }) : null
1015
1018
  ] }),
1016
- h.meta != null || h.count !== void 0 ? /* @__PURE__ */ o("span", { className: "cms-list__end", children: [
1017
- h.meta != null ? /* @__PURE__ */ e("span", { className: "cms-list__meta", children: h.meta }) : null,
1018
- h.count !== void 0 && h.count > 0 ? /* @__PURE__ */ e("span", { className: "cms-badge cms-list__count", children: h.count }) : null
1019
+ f.meta != null || f.count !== void 0 ? /* @__PURE__ */ i("span", { className: "cms-list__end", children: [
1020
+ f.meta != null ? /* @__PURE__ */ e("span", { className: "cms-list__meta", children: f.meta }) : null,
1021
+ f.count !== void 0 && f.count > 0 ? /* @__PURE__ */ e("span", { className: "cms-badge cms-list__count", children: f.count }) : null
1019
1022
  ] }) : null
1020
1023
  ]
1021
1024
  },
1022
- h.id
1025
+ f.id
1023
1026
  );
1024
1027
  }) })
1025
1028
  ] });
1026
1029
  }
1027
- function he({ at: n, items: l, onClose: t, label: i = "Actions", focus: c = "first" }) {
1028
- const s = O(null), u = O(null), a = Q(), [m, v] = A(n), d = l.filter((r) => r.offer.offered);
1030
+ function ge({ at: n, items: l, onClose: t, label: r = "Actions", focus: c = "current" }) {
1031
+ const s = H(null), m = H(null), a = se(), [u, v] = T(n), o = l.filter((d) => d.offer.offered);
1029
1032
  if (ve(() => {
1030
1033
  if (!n) return;
1031
- const r = s.current, h = (r == null ? void 0 : r.offsetWidth) ?? 0, p = (r == null ? void 0 : r.offsetHeight) ?? 0;
1032
- v({ x: Math.max(0, Math.min(n.x, window.innerWidth - h)), y: Math.max(0, Math.min(n.y, window.innerHeight - p)) });
1033
- }, [n]), J(() => {
1034
- var p, N;
1034
+ const d = s.current, g = (d == null ? void 0 : d.offsetWidth) ?? 0, k = (d == null ? void 0 : d.offsetHeight) ?? 0;
1035
+ v({ x: Math.max(0, Math.min(n.x, window.innerWidth - g)), y: Math.max(0, Math.min(n.y, window.innerHeight - k)) });
1036
+ }, [n]), Q(() => {
1037
+ var x, C;
1035
1038
  if (!n) return;
1036
- u.current = document.activeElement;
1037
- const r = Array.from(((p = s.current) == null ? void 0 : p.querySelectorAll('[role="menuitem"]:not([aria-disabled="true"])')) ?? []);
1038
- (N = c === "last" ? r[r.length - 1] : r[0]) == null || N.focus();
1039
- const h = (k) => {
1040
- var y;
1041
- (y = s.current) != null && y.contains(k.target) || t();
1039
+ m.current = document.activeElement;
1040
+ const d = Array.from(((x = s.current) == null ? void 0 : x.querySelectorAll('[role^="menuitem"]:not([aria-disabled="true"])')) ?? []), g = c === "current" ? d.find((w) => w.getAttribute("aria-checked") === "true") : void 0;
1041
+ (C = c === "last" ? d[d.length - 1] : g ?? d[0]) == null || C.focus();
1042
+ const k = (w) => {
1043
+ var b;
1044
+ (b = s.current) != null && b.contains(w.target) || t();
1042
1045
  };
1043
- return document.addEventListener("mousedown", h), () => {
1044
- var k, y;
1045
- document.removeEventListener("mousedown", h), (y = (k = u.current) == null ? void 0 : k.focus) == null || y.call(k);
1046
+ return document.addEventListener("mousedown", k), () => {
1047
+ var w, b;
1048
+ document.removeEventListener("mousedown", k), (b = (w = m.current) == null ? void 0 : w.focus) == null || b.call(w);
1046
1049
  };
1047
- }, [n, t, c]), !n || d.length === 0) return null;
1048
- const f = (r) => {
1049
- var N, k;
1050
- const h = Array.from(((N = s.current) == null ? void 0 : N.querySelectorAll('[role="menuitem"]')) ?? []), p = h.indexOf(document.activeElement);
1051
- if (r.key === "Escape" || r.key === "Tab")
1052
- r.preventDefault(), t();
1053
- else if (r.key === "ArrowDown" || r.key === "ArrowUp") {
1054
- r.preventDefault();
1055
- const y = r.key === "ArrowDown" ? 1 : -1;
1056
- (k = h[(p + y + h.length) % h.length]) == null || k.focus();
1050
+ }, [n, t, c]), !n || o.length === 0) return null;
1051
+ const p = (d) => {
1052
+ var x, C;
1053
+ const g = Array.from(((x = s.current) == null ? void 0 : x.querySelectorAll('[role^="menuitem"]')) ?? []), k = g.indexOf(document.activeElement);
1054
+ if (d.key === "Escape" || d.key === "Tab")
1055
+ d.preventDefault(), t();
1056
+ else if (d.key === "ArrowDown" || d.key === "ArrowUp") {
1057
+ d.preventDefault();
1058
+ const w = d.key === "ArrowDown" ? 1 : -1;
1059
+ (C = g[(k + w + g.length) % g.length]) == null || C.focus();
1057
1060
  }
1058
- };
1059
- return De(
1061
+ }, h = (d) => {
1062
+ const g = d.offer.refusal !== void 0;
1063
+ return /* @__PURE__ */ i(
1064
+ "div",
1065
+ {
1066
+ role: d.checked === void 0 ? "menuitem" : "menuitemradio",
1067
+ "aria-checked": d.checked,
1068
+ tabIndex: -1,
1069
+ "aria-disabled": g || void 0,
1070
+ "aria-describedby": g ? `${a}-${d.id}` : void 0,
1071
+ title: g ? d.offer.refusal : void 0,
1072
+ className: F("cms-menu__item", d.danger && "is-danger", d.offer.locked && "is-locked", g && "is-refused"),
1073
+ onClick: () => {
1074
+ g || (t(), d.onSelect());
1075
+ },
1076
+ onKeyDown: (k) => {
1077
+ (k.key === "Enter" || k.key === " ") && !g && (k.preventDefault(), t(), d.onSelect());
1078
+ },
1079
+ children: [
1080
+ d.checked !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-menu__check", children: d.checked ? /* @__PURE__ */ e(G, { name: "check" }) : null }) : null,
1081
+ d.offer.locked ? /* @__PURE__ */ e(G, { name: "lock" }) : null,
1082
+ /* @__PURE__ */ e("span", { className: "cms-menu__label", children: d.label }),
1083
+ g ? /* @__PURE__ */ e("span", { id: `${a}-${d.id}`, className: "cms-menu__refusal", children: d.offer.refusal }) : null
1084
+ ]
1085
+ },
1086
+ d.id
1087
+ );
1088
+ }, f = [];
1089
+ for (const d of o) {
1090
+ const g = f[f.length - 1];
1091
+ g !== void 0 && g.group === d.group ? g.items.push(d) : f.push({ group: d.group, items: [d] });
1092
+ }
1093
+ return Pe(
1060
1094
  /* @__PURE__ */ e(
1061
1095
  "div",
1062
1096
  {
1063
1097
  ref: s,
1064
1098
  className: "cms-menu",
1065
1099
  role: "menu",
1066
- "aria-label": i,
1067
- style: { left: (m ?? n).x, top: (m ?? n).y },
1068
- onKeyDown: f,
1069
- onContextMenu: (r) => r.preventDefault(),
1070
- children: d.map((r) => {
1071
- const h = r.offer.refusal !== void 0;
1072
- return /* @__PURE__ */ o(
1073
- "div",
1074
- {
1075
- role: "menuitem",
1076
- tabIndex: -1,
1077
- "aria-disabled": h || void 0,
1078
- "aria-describedby": h ? `${a}-${r.id}` : void 0,
1079
- title: h ? r.offer.refusal : void 0,
1080
- className: L("cms-menu__item", r.danger && "is-danger", r.offer.locked && "is-locked", h && "is-refused"),
1081
- onClick: () => {
1082
- h || (t(), r.onSelect());
1083
- },
1084
- onKeyDown: (p) => {
1085
- (p.key === "Enter" || p.key === " ") && !h && (p.preventDefault(), t(), r.onSelect());
1086
- },
1087
- children: [
1088
- r.offer.locked ? /* @__PURE__ */ e(V, { name: "lock" }) : null,
1089
- /* @__PURE__ */ e("span", { className: "cms-menu__label", children: r.label }),
1090
- h ? /* @__PURE__ */ e("span", { id: `${a}-${r.id}`, className: "cms-menu__refusal", children: r.offer.refusal }) : null
1091
- ]
1092
- },
1093
- r.id
1094
- );
1095
- })
1100
+ "aria-label": r,
1101
+ style: { left: (u ?? n).x, top: (u ?? n).y },
1102
+ onKeyDown: p,
1103
+ onContextMenu: (d) => d.preventDefault(),
1104
+ children: f.map((d, g) => /* @__PURE__ */ i(an, { children: [
1105
+ g > 0 ? /* @__PURE__ */ e("div", { className: "cms-menu__separator", role: "separator" }) : null,
1106
+ d.group === void 0 ? d.items.map(h) : /* @__PURE__ */ i("div", { role: "group", "aria-label": d.group, children: [
1107
+ /* @__PURE__ */ e("div", { className: "cms-menu__group", "aria-hidden": "true", children: d.group }),
1108
+ d.items.map(h)
1109
+ ] })
1110
+ ] }, g))
1096
1111
  }
1097
1112
  ),
1098
1113
  document.body
1099
1114
  );
1100
1115
  }
1101
- function sl({ title: n, icon: l, primary: t, more: i = [], moreLabel: c, context: s, fullWidth: u = !1 }) {
1102
- var k, y, C;
1103
- const [a, m] = A(null), v = Q(), d = i.filter((M) => M.offer.offered), f = (k = t == null ? void 0 : t.offer) == null ? void 0 : k.refusal, r = t !== void 0 && (((y = t.offer) == null ? void 0 : y.offered) === !1 || f !== void 0), h = t !== void 0 && "menu" in t ? t.menu.filter((M) => M.offer.offered) : [], p = t !== void 0 && "menu" in t && h.length > 0 ? t : null, N = (M, _) => {
1104
- const w = _.getBoundingClientRect();
1105
- m((a == null ? void 0 : a.which) === M ? null : { which: M, x: w.left, y: w.bottom + 4 });
1116
+ function gl({ title: n, icon: l, primary: t, more: r = [], moreLabel: c, context: s, fullWidth: m = !1 }) {
1117
+ var k, x, C;
1118
+ const [a, u] = T(null), v = se(), o = r.filter((w) => w.offer.offered), p = (k = t == null ? void 0 : t.offer) == null ? void 0 : k.refusal, h = t !== void 0 && (((x = t.offer) == null ? void 0 : x.offered) === !1 || p !== void 0), f = t !== void 0 && "menu" in t ? t.menu.filter((w) => w.offer.offered) : [], d = t !== void 0 && "menu" in t && f.length > 0 ? t : null, g = (w, b) => {
1119
+ const y = b.getBoundingClientRect();
1120
+ u((a == null ? void 0 : a.which) === w ? null : { which: w, x: y.left, y: y.bottom + 4 });
1106
1121
  };
1107
- return /* @__PURE__ */ o("header", { className: `cms-section-header${u ? " cms-section-header--full" : ""}`, children: [
1108
- /* @__PURE__ */ o("div", { className: "cms-section-header__row", "data-row": "1", children: [
1109
- l !== void 0 ? /* @__PURE__ */ e(D, { name: l }) : null,
1122
+ return /* @__PURE__ */ i("header", { className: `cms-section-header${m ? " cms-section-header--full" : ""}`, children: [
1123
+ /* @__PURE__ */ i("div", { className: "cms-section-header__row", "data-row": "1", children: [
1124
+ l !== void 0 ? /* @__PURE__ */ e(L, { name: l }) : null,
1110
1125
  /* @__PURE__ */ e("h1", { className: "cms-section-header__title", title: n, children: n }),
1111
- /* @__PURE__ */ o("div", { className: "cms-section-header__actions", children: [
1112
- t !== void 0 && ((C = t.offer) == null ? void 0 : C.offered) !== !1 ? /* @__PURE__ */ o("span", { className: `cms-section-header__primary${p !== null ? " cms-section-header__primary--split" : ""}`, children: [
1113
- /* @__PURE__ */ o(
1126
+ /* @__PURE__ */ i("div", { className: "cms-section-header__actions", children: [
1127
+ t !== void 0 && ((C = t.offer) == null ? void 0 : C.offered) !== !1 ? /* @__PURE__ */ i("span", { className: `cms-section-header__primary${d !== null ? " cms-section-header__primary--split" : ""}`, children: [
1128
+ /* @__PURE__ */ i(
1114
1129
  "button",
1115
1130
  {
1116
1131
  type: "button",
1117
1132
  className: "cms-button cms-button--primary",
1118
1133
  "data-action": "primary",
1119
- "aria-disabled": r ? "true" : void 0,
1120
- "aria-describedby": f !== void 0 ? v : void 0,
1121
- title: f,
1134
+ "aria-disabled": h ? "true" : void 0,
1135
+ "aria-describedby": p !== void 0 ? v : void 0,
1136
+ title: p,
1122
1137
  onClick: () => {
1123
- r || t.onPress();
1138
+ h || t.onPress();
1124
1139
  },
1125
1140
  children: [
1126
- /* @__PURE__ */ e(D, { name: t.icon }),
1141
+ /* @__PURE__ */ e(L, { name: t.icon }),
1127
1142
  " ",
1128
1143
  /* @__PURE__ */ e("span", { children: t.label })
1129
1144
  ]
1130
1145
  }
1131
1146
  ),
1132
- p !== null ? /* @__PURE__ */ e(
1147
+ d !== null ? /* @__PURE__ */ e(
1133
1148
  "button",
1134
1149
  {
1135
1150
  type: "button",
@@ -1137,14 +1152,14 @@ function sl({ title: n, icon: l, primary: t, more: i = [], moreLabel: c, context
1137
1152
  "data-action": "primary-menu",
1138
1153
  "aria-haspopup": "menu",
1139
1154
  "aria-expanded": (a == null ? void 0 : a.which) === "primary",
1140
- "aria-label": p.menuLabel,
1141
- onClick: (M) => N("primary", M.currentTarget),
1142
- children: /* @__PURE__ */ e(D, { name: "chevron-down" })
1155
+ "aria-label": d.menuLabel,
1156
+ onClick: (w) => g("primary", w.currentTarget),
1157
+ children: /* @__PURE__ */ e(L, { name: "chevron-down" })
1143
1158
  }
1144
1159
  ) : null,
1145
- f !== void 0 ? /* @__PURE__ */ e("span", { id: v, className: "cms-visually-hidden", children: f }) : null
1160
+ p !== void 0 ? /* @__PURE__ */ e("span", { id: v, className: "cms-visually-hidden", children: p }) : null
1146
1161
  ] }) : null,
1147
- d.length > 0 ? /* @__PURE__ */ e(
1162
+ o.length > 0 ? /* @__PURE__ */ e(
1148
1163
  "button",
1149
1164
  {
1150
1165
  type: "button",
@@ -1154,36 +1169,36 @@ function sl({ title: n, icon: l, primary: t, more: i = [], moreLabel: c, context
1154
1169
  "aria-expanded": (a == null ? void 0 : a.which) === "more",
1155
1170
  "aria-label": c,
1156
1171
  title: c,
1157
- onClick: (M) => N("more", M.currentTarget),
1158
- children: /* @__PURE__ */ e(D, { name: "more" })
1172
+ onClick: (w) => g("more", w.currentTarget),
1173
+ children: /* @__PURE__ */ e(L, { name: "more" })
1159
1174
  }
1160
1175
  ) : null
1161
1176
  ] })
1162
1177
  ] }),
1163
1178
  s != null ? /* @__PURE__ */ e("div", { className: "cms-section-header__context", "data-row": "2", children: s }) : null,
1164
- p !== null ? /* @__PURE__ */ e(he, { at: (a == null ? void 0 : a.which) === "primary" ? a : null, items: h, onClose: () => m(null), label: p.menuLabel }) : null,
1165
- /* @__PURE__ */ e(he, { at: (a == null ? void 0 : a.which) === "more" ? a : null, items: i, onClose: () => m(null), label: c })
1179
+ d !== null ? /* @__PURE__ */ e(ge, { at: (a == null ? void 0 : a.which) === "primary" ? a : null, items: f, onClose: () => u(null), label: d.menuLabel }) : null,
1180
+ /* @__PURE__ */ e(ge, { at: (a == null ? void 0 : a.which) === "more" ? a : null, items: r, onClose: () => u(null), label: c })
1166
1181
  ] });
1167
1182
  }
1168
- function rl({ title: n, scope: l, actions: t, backLink: i }) {
1169
- return /* @__PURE__ */ o("header", { className: "cms-page-header", children: [
1170
- i ? /* @__PURE__ */ o(
1183
+ function Nl({ title: n, scope: l, actions: t, backLink: r }) {
1184
+ return /* @__PURE__ */ i("header", { className: "cms-page-header", children: [
1185
+ r ? /* @__PURE__ */ i(
1171
1186
  "a",
1172
1187
  {
1173
1188
  className: "cms-page-header__back",
1174
- href: i.href ?? "#",
1189
+ href: r.href ?? "#",
1175
1190
  onClick: (c) => {
1176
- i.onBack && (c.preventDefault(), i.onBack());
1191
+ r.onBack && (c.preventDefault(), r.onBack());
1177
1192
  },
1178
1193
  children: [
1179
- /* @__PURE__ */ e(V, { name: "back" }),
1194
+ /* @__PURE__ */ e(G, { name: "back" }),
1180
1195
  " ",
1181
- i.label
1196
+ r.label
1182
1197
  ]
1183
1198
  }
1184
1199
  ) : null,
1185
- /* @__PURE__ */ o("div", { className: "cms-page-header__row", children: [
1186
- /* @__PURE__ */ o("div", { className: "cms-page-header__titles", children: [
1200
+ /* @__PURE__ */ i("div", { className: "cms-page-header__row", children: [
1201
+ /* @__PURE__ */ i("div", { className: "cms-page-header__titles", children: [
1187
1202
  /* @__PURE__ */ e("h1", { className: "cms-page-header__title", children: n }),
1188
1203
  l != null ? /* @__PURE__ */ e("p", { className: "cms-page-header__scope", children: l }) : null
1189
1204
  ] }),
@@ -1191,18 +1206,18 @@ function rl({ title: n, scope: l, actions: t, backLink: i }) {
1191
1206
  ] })
1192
1207
  ] });
1193
1208
  }
1194
- function il({ tabs: n, active: l, onSelect: t, label: i }) {
1195
- const c = O([]), s = (u, a) => {
1196
- var f;
1197
- const m = n.length - 1, v = u.key === "ArrowRight" ? a === m ? 0 : a + 1 : u.key === "ArrowLeft" ? a === 0 ? m : a - 1 : u.key === "Home" ? 0 : u.key === "End" ? m : null;
1209
+ function wl({ tabs: n, active: l, onSelect: t, label: r }) {
1210
+ const c = H([]), s = (m, a) => {
1211
+ var p;
1212
+ const u = n.length - 1, v = m.key === "ArrowRight" ? a === u ? 0 : a + 1 : m.key === "ArrowLeft" ? a === 0 ? u : a - 1 : m.key === "Home" ? 0 : m.key === "End" ? u : null;
1198
1213
  if (v === null) return;
1199
- u.preventDefault();
1200
- const d = n[v];
1201
- d && (t(d.id), (f = c.current[v]) == null || f.focus());
1214
+ m.preventDefault();
1215
+ const o = n[v];
1216
+ o && (t(o.id), (p = c.current[v]) == null || p.focus());
1202
1217
  };
1203
- return /* @__PURE__ */ e("div", { className: "cms-tabs", role: "tablist", "aria-label": i, children: n.map((u, a) => {
1204
- const m = u.id === l;
1205
- return /* @__PURE__ */ o(
1218
+ return /* @__PURE__ */ e("div", { className: "cms-tabs", role: "tablist", "aria-label": r, children: n.map((m, a) => {
1219
+ const u = m.id === l;
1220
+ return /* @__PURE__ */ i(
1206
1221
  "button",
1207
1222
  {
1208
1223
  ref: (v) => {
@@ -1210,54 +1225,54 @@ function il({ tabs: n, active: l, onSelect: t, label: i }) {
1210
1225
  },
1211
1226
  type: "button",
1212
1227
  role: "tab",
1213
- className: L("cms-tab", m && "is-active"),
1214
- "aria-selected": m,
1215
- tabIndex: m ? 0 : -1,
1216
- onClick: () => t(u.id),
1228
+ className: F("cms-tab", u && "is-active"),
1229
+ "aria-selected": u,
1230
+ tabIndex: u ? 0 : -1,
1231
+ onClick: () => t(m.id),
1217
1232
  onKeyDown: (v) => s(v, a),
1218
1233
  children: [
1219
- u.label,
1220
- u.count !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-tab__count", children: u.count }) : null
1234
+ m.label,
1235
+ m.count !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-tab__count", children: m.count }) : null
1221
1236
  ]
1222
1237
  },
1223
- u.id
1238
+ m.id
1224
1239
  );
1225
1240
  }) });
1226
1241
  }
1227
- function yn(n) {
1242
+ function Ln(n) {
1228
1243
  const l = n.trim().replace(/\s+via\s+\S.*$/, "").split(/\s+/).filter(Boolean), t = (c) => {
1229
1244
  var s;
1230
1245
  return (s = c == null ? void 0 : c.match(/[\p{L}\p{N}]/u)) == null ? void 0 : s[0];
1231
1246
  };
1232
1247
  return (l.length > 1 ? [t(l[0]), t(l[l.length - 1])] : [t(l[0])]).filter(Boolean).join("").toUpperCase();
1233
1248
  }
1234
- function kn(n) {
1249
+ function $n(n) {
1235
1250
  let l = 0;
1236
1251
  for (const t of n.trim().toLowerCase())
1237
1252
  l = l * 31 + (t.codePointAt(0) ?? 0) >>> 0;
1238
1253
  return l % 6 + 1;
1239
1254
  }
1240
- function ye({ name: n, pictureUrl: l, presence: t, connection: i, deleted: c = !1, size: s = 32 }) {
1241
- const u = i !== void 0 ? `is-${i.state === "offline" ? "disconnected" : i.state}` : t === void 0 ? null : `is-${t === "busy" ? "away" : t}`, a = i !== void 0 ? `${n}, ${i.label}` : t ? `${n}, ${t}` : n;
1242
- return /* @__PURE__ */ o(
1255
+ function Se({ name: n, pictureUrl: l, presence: t, connection: r, deleted: c = !1, size: s = 32, tintSeed: m }) {
1256
+ const a = Ln(n) || "?", u = n.trim() === "" ? "?" : n, v = r !== void 0 ? `is-${r.state === "offline" ? "disconnected" : r.state}` : t === void 0 ? null : `is-${t === "busy" ? "away" : t}`, o = r !== void 0 ? `${u}, ${r.label}` : t ? `${u}, ${t}` : u;
1257
+ return /* @__PURE__ */ i(
1243
1258
  "span",
1244
1259
  {
1245
- className: L("cms-avatar", c ? "cms-avatar--deleted" : `cms-avatar--tint-${kn(n)}`),
1260
+ className: F("cms-avatar", c ? "cms-avatar--deleted" : `cms-avatar--tint-${$n(m ?? n)}`),
1246
1261
  style: { width: s, height: s, fontSize: Math.round(s * 0.4) },
1247
1262
  role: "img",
1248
- "aria-label": a,
1249
- ...i === void 0 ? {} : { title: i.label },
1263
+ "aria-label": o,
1264
+ ...r === void 0 ? {} : { title: r.label },
1250
1265
  children: [
1251
- c ? /* @__PURE__ */ e(D, { name: "user", size: Math.round(s * 0.6) }) : l ? /* @__PURE__ */ e("img", { src: l, alt: "", className: "cms-avatar__picture" }) : /* @__PURE__ */ e("span", { "aria-hidden": "true", children: yn(n) }),
1252
- u === null ? null : /* @__PURE__ */ e("span", { className: L("cms-avatar__presence", u), "aria-hidden": "true" })
1266
+ c ? /* @__PURE__ */ e(L, { name: "user", size: Math.round(s * 0.6) }) : l ? /* @__PURE__ */ e("img", { src: l, alt: "", className: "cms-avatar__picture" }) : /* @__PURE__ */ e("span", { "aria-hidden": "true", children: a }),
1267
+ v === null ? null : /* @__PURE__ */ e("span", { className: F("cms-avatar__presence", v), "aria-hidden": "true" })
1253
1268
  ]
1254
1269
  }
1255
1270
  );
1256
1271
  }
1257
- const xn = 64, Ie = "cms-splitter:";
1258
- function Ee(n) {
1272
+ const In = 64, Re = "cms-splitter:";
1273
+ function Le(n) {
1259
1274
  try {
1260
- const l = window.localStorage.getItem(Ie + n);
1275
+ const l = window.localStorage.getItem(Re + n);
1261
1276
  if (l === null) return null;
1262
1277
  const t = Number(l);
1263
1278
  return Number.isFinite(t) ? t : null;
@@ -1265,40 +1280,40 @@ function Ee(n) {
1265
1280
  return null;
1266
1281
  }
1267
1282
  }
1268
- function Mn(n, l) {
1283
+ function Pn(n, l) {
1269
1284
  if (n !== void 0)
1270
1285
  try {
1271
- window.localStorage.setItem(Ie + n, String(l));
1286
+ window.localStorage.setItem(Re + n, String(l));
1272
1287
  } catch {
1273
1288
  }
1274
1289
  }
1275
- function Cn(n) {
1290
+ function Fn(n) {
1276
1291
  if (n !== void 0)
1277
1292
  try {
1278
- window.localStorage.removeItem(Ie + n);
1293
+ window.localStorage.removeItem(Re + n);
1279
1294
  } catch {
1280
1295
  }
1281
1296
  }
1282
- function Sn({ storageKey: n, value: l, default: t, min: i, max: c, step: s = 16, label: u, onChange: a, className: m, style: v }) {
1283
- const d = Math.max(i, c), f = (_) => Math.round(Math.min(Math.max(_, i), d)), [r, h] = A(() => {
1284
- const _ = n === void 0 ? null : Ee(n);
1285
- return f(_ ?? t);
1286
- }), p = f(l ?? r), N = O(null), [k, y] = A(!1);
1297
+ function Bn({ storageKey: n, value: l, default: t, min: r, max: c, step: s = 16, label: m, onChange: a, className: u, style: v }) {
1298
+ const o = Math.max(r, c), p = (b) => Math.round(Math.min(Math.max(b, r), o)), [h, f] = T(() => {
1299
+ const b = n === void 0 ? null : Le(n);
1300
+ return p(b ?? t);
1301
+ }), d = p(l ?? h), g = H(null), [k, x] = T(!1);
1287
1302
  ve(() => {
1288
1303
  if (n === void 0) return;
1289
- const _ = Ee(n);
1290
- if (_ === null) return;
1291
- const w = f(_);
1292
- (l === void 0 || w !== f(l)) && (h(w), a(w, !0));
1304
+ const b = Le(n);
1305
+ if (b === null) return;
1306
+ const y = p(b);
1307
+ (l === void 0 || y !== p(l)) && (f(y), a(y, !0));
1293
1308
  }, []), ve(() => {
1294
- l !== void 0 && f(l) !== l && a(f(l), !0);
1295
- }, [l, i, d]);
1296
- const C = (_, w) => {
1297
- const T = f(_);
1298
- h(T), w && Mn(n, T), a(T, w);
1299
- }, M = () => {
1300
- const _ = N.current;
1301
- N.current = null, y(!1), _ !== null && _.last !== _.from && C(_.last, !0);
1309
+ l !== void 0 && p(l) !== l && a(p(l), !0);
1310
+ }, [l, r, o]);
1311
+ const C = (b, y) => {
1312
+ const D = p(b);
1313
+ f(D), y && Pn(n, D), a(D, y);
1314
+ }, w = () => {
1315
+ const b = g.current;
1316
+ g.current = null, x(!1), b !== null && b.last !== b.from && C(b.last, !0);
1302
1317
  };
1303
1318
  return /* @__PURE__ */ e(
1304
1319
  "div",
@@ -1306,81 +1321,81 @@ function Sn({ storageKey: n, value: l, default: t, min: i, max: c, step: s = 16,
1306
1321
  role: "separator",
1307
1322
  tabIndex: 0,
1308
1323
  "aria-orientation": "vertical",
1309
- "aria-label": u,
1310
- "aria-valuenow": p,
1311
- "aria-valuemin": i,
1312
- "aria-valuemax": d,
1313
- className: L("cms-splitter", k && "is-dragging", p <= i && "is-at-min", p >= d && "is-at-max", m),
1324
+ "aria-label": m,
1325
+ "aria-valuenow": d,
1326
+ "aria-valuemin": r,
1327
+ "aria-valuemax": o,
1328
+ className: F("cms-splitter", k && "is-dragging", d <= r && "is-at-min", d >= o && "is-at-max", u),
1314
1329
  style: v,
1315
- onPointerDown: (_) => {
1316
- var T, U;
1317
- if (_.button > 0) return;
1318
- _.preventDefault(), (U = (T = _.currentTarget).setPointerCapture) == null || U.call(T, _.pointerId);
1319
- const w = getComputedStyle(_.currentTarget).direction === "rtl" ? -1 : 1;
1320
- N.current = { x: _.clientX, from: p, last: p, sign: w }, y(!0);
1330
+ onPointerDown: (b) => {
1331
+ var D, Z;
1332
+ if (b.button > 0) return;
1333
+ b.preventDefault(), (Z = (D = b.currentTarget).setPointerCapture) == null || Z.call(D, b.pointerId);
1334
+ const y = getComputedStyle(b.currentTarget).direction === "rtl" ? -1 : 1;
1335
+ g.current = { x: b.clientX, from: d, last: d, sign: y }, x(!0);
1321
1336
  },
1322
- onPointerMove: (_) => {
1323
- const w = N.current;
1324
- w === null || !Number.isFinite(_.clientX) || (w.last = f(w.from + w.sign * (_.clientX - w.x)), C(w.last, !1));
1337
+ onPointerMove: (b) => {
1338
+ const y = g.current;
1339
+ y === null || !Number.isFinite(b.clientX) || (y.last = p(y.from + y.sign * (b.clientX - y.x)), C(y.last, !1));
1325
1340
  },
1326
- onPointerUp: M,
1327
- onPointerCancel: M,
1341
+ onPointerUp: w,
1342
+ onPointerCancel: w,
1328
1343
  onDoubleClick: () => {
1329
- Cn(n);
1330
- const _ = f(t);
1331
- h(_), a(_, !0);
1344
+ Fn(n);
1345
+ const b = p(t);
1346
+ f(b), a(b, !0);
1332
1347
  },
1333
- onKeyDown: (_) => {
1334
- const w = _.shiftKey ? xn : s, T = getComputedStyle(_.currentTarget).direction === "rtl" ? -1 : 1, U = _.key === "ArrowLeft" ? p - T * w : _.key === "ArrowRight" ? p + T * w : _.key === "Home" ? i : _.key === "End" ? d : null;
1335
- U !== null && (_.preventDefault(), C(U, !0));
1348
+ onKeyDown: (b) => {
1349
+ const y = b.shiftKey ? In : s, D = getComputedStyle(b.currentTarget).direction === "rtl" ? -1 : 1, Z = b.key === "ArrowLeft" ? d - D * y : b.key === "ArrowRight" ? d + D * y : b.key === "Home" ? r : b.key === "End" ? o : null;
1350
+ Z !== null && (b.preventDefault(), C(Z, !0));
1336
1351
  }
1337
1352
  }
1338
1353
  );
1339
1354
  }
1340
- function En({ count: n, label: l, max: t = 99 }) {
1341
- return n <= 0 ? null : /* @__PURE__ */ o("span", { className: "cms-badge", children: [
1355
+ function Rn({ count: n, label: l, max: t = 99 }) {
1356
+ return n <= 0 ? null : /* @__PURE__ */ i("span", { className: "cms-badge", children: [
1342
1357
  /* @__PURE__ */ e("span", { "aria-hidden": "true", children: n > t ? `${t}+` : n }),
1343
1358
  /* @__PURE__ */ e("span", { className: "cms-visually-hidden", children: l })
1344
1359
  ] });
1345
1360
  }
1346
- function cl({ product: n, mark: l, rail: t, active: i, onNavigate: c, server: s, search: u, account: a, children: m, railLabel: v = "Sections" }) {
1347
- return /* @__PURE__ */ o("div", { className: "cms-shell", children: [
1348
- /* @__PURE__ */ o("nav", { className: "cms-shell__rail", "aria-label": v, children: [
1361
+ function yl({ product: n, mark: l, rail: t, active: r, onNavigate: c, server: s, search: m, account: a, children: u, railLabel: v = "Sections" }) {
1362
+ return /* @__PURE__ */ i("div", { className: "cms-shell", children: [
1363
+ /* @__PURE__ */ i("nav", { className: "cms-shell__rail", "aria-label": v, children: [
1349
1364
  /* @__PURE__ */ e("span", { className: "cms-shell__mark", "aria-hidden": "true", children: l }),
1350
- /* @__PURE__ */ e("ul", { className: "cms-shell__items", children: t.map((d) => {
1351
- const f = d.id === i;
1352
- return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ o(
1365
+ /* @__PURE__ */ e("ul", { className: "cms-shell__items", children: t.map((o) => {
1366
+ const p = o.id === r;
1367
+ return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ i(
1353
1368
  "a",
1354
1369
  {
1355
- href: d.href,
1356
- className: L("cms-shell__item", f && "is-active"),
1357
- "aria-current": f ? "page" : void 0,
1358
- title: d.label,
1359
- onClick: (r) => {
1360
- c && (r.preventDefault(), c(d.id));
1370
+ href: o.href,
1371
+ className: F("cms-shell__item", p && "is-active"),
1372
+ "aria-current": p ? "page" : void 0,
1373
+ title: o.label,
1374
+ onClick: (h) => {
1375
+ c && (h.preventDefault(), c(o.id));
1361
1376
  },
1362
1377
  children: [
1363
- /* @__PURE__ */ o("span", { className: "cms-shell__icon", children: [
1364
- /* @__PURE__ */ e(D, { name: d.icon, size: 22 }),
1365
- d.badge ? /* @__PURE__ */ e(En, { count: d.badge.count, label: d.badge.label }) : null
1378
+ /* @__PURE__ */ i("span", { className: "cms-shell__icon", children: [
1379
+ /* @__PURE__ */ e(L, { name: o.icon, size: 22 }),
1380
+ o.badge ? /* @__PURE__ */ e(Rn, { count: o.badge.count, label: o.badge.label }) : null
1366
1381
  ] }),
1367
- /* @__PURE__ */ e("span", { className: "cms-shell__label", children: d.label })
1382
+ /* @__PURE__ */ e("span", { className: "cms-shell__label", children: o.label })
1368
1383
  ]
1369
1384
  }
1370
- ) }, d.id);
1385
+ ) }, o.id);
1371
1386
  }) })
1372
1387
  ] }),
1373
- /* @__PURE__ */ o("header", { className: "cms-shell__top", children: [
1388
+ /* @__PURE__ */ i("header", { className: "cms-shell__top", children: [
1374
1389
  /* @__PURE__ */ e("span", { className: "cms-shell__product", children: n }),
1375
1390
  s != null ? /* @__PURE__ */ e("div", { className: "cms-shell__server", children: s }) : null,
1376
- u != null ? /* @__PURE__ */ e("div", { className: "cms-shell__search", children: u }) : null,
1391
+ m != null ? /* @__PURE__ */ e("div", { className: "cms-shell__search", children: m }) : null,
1377
1392
  a != null ? /* @__PURE__ */ e("div", { className: "cms-shell__account", children: a }) : null
1378
1393
  ] }),
1379
- /* @__PURE__ */ e("main", { className: "cms-shell__main", children: m })
1394
+ /* @__PURE__ */ e("main", { className: "cms-shell__main", children: u })
1380
1395
  ] });
1381
1396
  }
1382
- function ol({ label: n, placeholder: l, value: t, onChange: i, onSearch: c }) {
1383
- return /* @__PURE__ */ o(
1397
+ function kl({ label: n, placeholder: l, value: t, onChange: r, onSearch: c }) {
1398
+ return /* @__PURE__ */ i(
1384
1399
  "form",
1385
1400
  {
1386
1401
  role: "search",
@@ -1389,7 +1404,7 @@ function ol({ label: n, placeholder: l, value: t, onChange: i, onSearch: c }) {
1389
1404
  s.preventDefault(), c == null || c(t);
1390
1405
  },
1391
1406
  children: [
1392
- /* @__PURE__ */ e(D, { name: "search", size: 18 }),
1407
+ /* @__PURE__ */ e(L, { name: "search", size: 18 }),
1393
1408
  /* @__PURE__ */ e(
1394
1409
  "input",
1395
1410
  {
@@ -1398,157 +1413,124 @@ function ol({ label: n, placeholder: l, value: t, onChange: i, onSearch: c }) {
1398
1413
  "aria-label": n,
1399
1414
  placeholder: l,
1400
1415
  value: t,
1401
- onChange: (s) => i(s.target.value)
1416
+ onChange: (s) => r(s.target.value)
1402
1417
  }
1403
1418
  )
1404
1419
  ]
1405
1420
  }
1406
1421
  );
1407
1422
  }
1408
- function An({ options: n, value: l, onChange: t, label: i }) {
1409
- const c = O([]), s = (u, a) => {
1410
- var f;
1411
- const m = n.length - 1, v = u.key === "ArrowRight" || u.key === "ArrowDown" ? a === m ? 0 : a + 1 : u.key === "ArrowLeft" || u.key === "ArrowUp" ? a === 0 ? m : a - 1 : null;
1412
- if (v === null) return;
1413
- u.preventDefault();
1414
- const d = n[v];
1415
- d && (t(d.id), (f = c.current[v]) == null || f.focus());
1416
- };
1417
- return /* @__PURE__ */ e("div", { className: "cms-chips", role: "radiogroup", "aria-label": i, children: n.map((u, a) => {
1418
- const m = u.id === l;
1419
- return /* @__PURE__ */ o(
1420
- "button",
1421
- {
1422
- ref: (v) => {
1423
- c.current[a] = v;
1424
- },
1425
- type: "button",
1426
- role: "radio",
1427
- "aria-checked": m,
1428
- tabIndex: m ? 0 : -1,
1429
- className: L("cms-chip", m && "is-on"),
1430
- onClick: () => t(u.id),
1431
- onKeyDown: (v) => s(v, a),
1432
- children: [
1433
- m ? /* @__PURE__ */ e(D, { name: "check", size: 16 }) : null,
1434
- u.label
1435
- ]
1436
- },
1437
- u.id
1438
- );
1439
- }) });
1440
- }
1441
- function Tn(n, l, t) {
1442
- const i = n.map((s) => Math.min(Math.max(s.width, s.min), s.max));
1443
- let c = i.reduce((s, u) => s + u, 0) + t - l;
1444
- for (let s = i.length - 1; s >= 0 && c > 0; s -= 1) {
1445
- const u = Math.min(c, i[s] - n[s].min);
1446
- i[s] = i[s] - u, c -= u;
1423
+ function Hn(n, l, t) {
1424
+ const r = n.map((s) => Math.min(Math.max(s.width, s.min), s.max));
1425
+ let c = r.reduce((s, m) => s + m, 0) + t - l;
1426
+ for (let s = r.length - 1; s >= 0 && c > 0; s -= 1) {
1427
+ const m = Math.min(c, r[s] - n[s].min);
1428
+ r[s] = r[s] - m, c -= m;
1447
1429
  }
1448
- return i;
1430
+ return r;
1449
1431
  }
1450
- function dl({ panes: n, active: l, back: t, sizes: i, lastMin: c = 360, onResize: s, storageKey: u }) {
1451
- const a = Math.min(Math.max(l ?? n.length - 1, 0), n.length - 1), m = O(null), [v, d] = A(0), f = (i ?? []).slice(0, n.length - 1), [r, h] = A(() => u === void 0 ? [] : f.map((_, w) => Ee(`${u}:${String(w)}`) ?? void 0)), [p, N] = A(!1), k = f.map((_, w) => _ !== void 0 && r[w] !== void 0 ? { ..._, width: r[w] } : _), y = k.length === n.length - 1 && k.every((_) => _ !== void 0);
1432
+ function xl({ panes: n, active: l, back: t, sizes: r, lastMin: c = 360, onResize: s, storageKey: m }) {
1433
+ const a = Math.min(Math.max(l ?? n.length - 1, 0), n.length - 1), u = H(null), [v, o] = T(0), p = (r ?? []).slice(0, n.length - 1), [h, f] = T(() => m === void 0 ? [] : p.map((b, y) => Le(`${m}:${String(y)}`) ?? void 0)), [d, g] = T(!1), k = p.map((b, y) => b !== void 0 && h[y] !== void 0 ? { ...b, width: h[y] } : b), x = k.length === n.length - 1 && k.every((b) => b !== void 0);
1452
1434
  ve(() => {
1453
- const _ = m.current;
1454
- if (_ === null || !y) return;
1455
- const w = () => d(_.clientWidth);
1456
- if (w(), typeof ResizeObserver > "u") return;
1457
- const T = new ResizeObserver(w);
1458
- return T.observe(_), () => T.disconnect();
1459
- }, [y]);
1460
- const C = y ? Tn(k, v > 0 ? v : Number.POSITIVE_INFINITY, c) : [], M = y ? Object.fromEntries(C.flatMap((_, w) => [
1461
- [`--split-pane-${String(w)}`, `${String(_)}px`],
1462
- [`--split-pane-end-${String(w)}`, `${String(C.slice(0, w + 1).reduce((T, U) => T + U, 0))}px`]
1435
+ const b = u.current;
1436
+ if (b === null || !x) return;
1437
+ const y = () => o(b.clientWidth);
1438
+ if (y(), typeof ResizeObserver > "u") return;
1439
+ const D = new ResizeObserver(y);
1440
+ return D.observe(b), () => D.disconnect();
1441
+ }, [x]);
1442
+ const C = x ? Hn(k, v > 0 ? v : Number.POSITIVE_INFINITY, c) : [], w = x ? Object.fromEntries(C.flatMap((b, y) => [
1443
+ [`--split-pane-${String(y)}`, `${String(b)}px`],
1444
+ [`--split-pane-end-${String(y)}`, `${String(C.slice(0, y + 1).reduce((D, Z) => D + Z, 0))}px`]
1463
1445
  ])) : void 0;
1464
- return /* @__PURE__ */ o(
1446
+ return /* @__PURE__ */ i(
1465
1447
  "div",
1466
1448
  {
1467
- ref: m,
1468
- className: L("cms-panes", n.length === 3 ? "cms-panes--three" : "cms-panes--two", y && "cms-panes--sized", p && "is-resizing"),
1449
+ ref: u,
1450
+ className: F("cms-panes", n.length === 3 ? "cms-panes--three" : "cms-panes--two", x && "cms-panes--sized", d && "is-resizing"),
1469
1451
  "data-active": a,
1470
- style: M,
1452
+ style: w,
1471
1453
  children: [
1472
- n.map((_, w) => /* @__PURE__ */ o("section", { className: "cms-panes__pane", "aria-label": _.label, "data-offset": a - w, children: [
1473
- w === a && t ? /* @__PURE__ */ o("a", { className: "cms-panes__back", href: t.href, children: [
1474
- /* @__PURE__ */ e(D, { name: "chevron-left", size: 18 }),
1454
+ n.map((b, y) => /* @__PURE__ */ i("section", { className: "cms-panes__pane", "aria-label": b.label, "data-offset": a - y, children: [
1455
+ y === a && t ? /* @__PURE__ */ i("a", { className: "cms-panes__back", href: t.href, children: [
1456
+ /* @__PURE__ */ e(L, { name: "chevron-left", size: 18 }),
1475
1457
  t.label
1476
1458
  ] }) : null,
1477
- _.content
1478
- ] }, _.label)),
1479
- y ? k.map((_, w) => {
1480
- const T = C.reduce((B, x, $) => $ === w ? B : B + x, 0), U = Math.max(_.min, Math.min(_.max, v > 0 ? v - T - c : _.max));
1459
+ b.content
1460
+ ] }, b.label)),
1461
+ x ? k.map((b, y) => {
1462
+ const D = C.reduce((V, M, R) => R === y ? V : V + M, 0), Z = Math.max(b.min, Math.min(b.max, v > 0 ? v - D - c : b.max));
1481
1463
  return /* @__PURE__ */ e(
1482
- Sn,
1464
+ Bn,
1483
1465
  {
1484
- ...u === void 0 ? {} : { storageKey: `${u}:${String(w)}` },
1485
- value: C[w],
1486
- default: _.reset,
1487
- min: _.min,
1488
- max: U,
1489
- label: _.label,
1466
+ ...m === void 0 ? {} : { storageKey: `${m}:${String(y)}` },
1467
+ value: C[y],
1468
+ default: b.reset,
1469
+ min: b.min,
1470
+ max: Z,
1471
+ label: b.label,
1490
1472
  className: "cms-panes__splitter",
1491
- style: { "--split-at": `var(--split-pane-end-${String(w)})` },
1492
- onChange: (B, x) => {
1493
- u !== void 0 && h(($) => {
1494
- const z = [...$];
1495
- return z[w] = B, z;
1496
- }), N(!x), s == null || s(w, B, x);
1473
+ style: { "--split-at": `var(--split-pane-end-${String(y)})` },
1474
+ onChange: (V, M) => {
1475
+ m !== void 0 && f((R) => {
1476
+ const z = [...R];
1477
+ return z[y] = V, z;
1478
+ }), g(!M), s == null || s(y, V, M);
1497
1479
  }
1498
1480
  },
1499
- _.label
1481
+ b.label
1500
1482
  );
1501
1483
  }) : null
1502
1484
  ]
1503
1485
  }
1504
1486
  );
1505
1487
  }
1506
- const Dn = { attachment: "Has an attachment", unread: "Unread" };
1507
- function ul({ from: n, subject: l, preview: t, time: i, unread: c, hasAttachment: s, selected: u, onOpen: a, check: m, selecting: v, labels: d }) {
1508
- const f = ge(Dn, d), r = /* @__PURE__ */ e(ye, { name: n, size: 40 });
1509
- return /* @__PURE__ */ o("div", { className: L("cms-mail-row", c && "is-unread", u && "is-selected", v && "is-selecting", (m == null ? void 0 : m.checked) && "is-checked"), children: [
1510
- m !== void 0 ? /* @__PURE__ */ o("span", { className: "cms-mail-row__lead", children: [
1511
- r,
1488
+ const On = { attachment: "Has an attachment", unread: "Unread" };
1489
+ function Ml({ from: n, subject: l, preview: t, time: r, unread: c, hasAttachment: s, selected: m, onOpen: a, check: u, selecting: v, labels: o }) {
1490
+ const p = ye(On, o), h = /* @__PURE__ */ e(Se, { name: n, size: 40 });
1491
+ return /* @__PURE__ */ i("div", { className: F("cms-mail-row", c && "is-unread", m && "is-selected", v && "is-selecting", (u == null ? void 0 : u.checked) && "is-checked"), children: [
1492
+ u !== void 0 ? /* @__PURE__ */ i("span", { className: "cms-mail-row__lead", children: [
1493
+ h,
1512
1494
  /* @__PURE__ */ e(
1513
1495
  "input",
1514
1496
  {
1515
1497
  type: "checkbox",
1516
1498
  className: "cms-mail-row__check",
1517
- checked: m.checked,
1518
- disabled: m.disabled,
1519
- "aria-disabled": m.pending ? "true" : void 0,
1520
- "aria-busy": m.pending ? "true" : void 0,
1521
- "aria-label": m.label,
1499
+ checked: u.checked,
1500
+ disabled: u.disabled,
1501
+ "aria-disabled": u.pending ? "true" : void 0,
1502
+ "aria-busy": u.pending ? "true" : void 0,
1503
+ "aria-label": u.label,
1522
1504
  onChange: () => {
1523
1505
  },
1524
- onClick: (h) => {
1525
- if (h.stopPropagation(), m.pending) {
1526
- h.preventDefault();
1506
+ onClick: (f) => {
1507
+ if (f.stopPropagation(), u.pending) {
1508
+ f.preventDefault();
1527
1509
  return;
1528
1510
  }
1529
- m.onCheck({ shift: h.shiftKey, toggle: h.ctrlKey || h.metaKey });
1511
+ u.onCheck({ shift: f.shiftKey, toggle: f.ctrlKey || f.metaKey });
1530
1512
  }
1531
1513
  }
1532
1514
  )
1533
1515
  ] }) : null,
1534
- /* @__PURE__ */ o(
1516
+ /* @__PURE__ */ i(
1535
1517
  "button",
1536
1518
  {
1537
1519
  type: "button",
1538
1520
  className: "cms-mail-row__open",
1539
- "aria-current": u ? "true" : void 0,
1521
+ "aria-current": m ? "true" : void 0,
1540
1522
  onClick: a,
1541
1523
  children: [
1542
- m === void 0 ? r : null,
1543
- /* @__PURE__ */ o("span", { className: "cms-mail-row__body", children: [
1544
- /* @__PURE__ */ o("span", { className: "cms-mail-row__line", children: [
1524
+ u === void 0 ? h : null,
1525
+ /* @__PURE__ */ i("span", { className: "cms-mail-row__body", children: [
1526
+ /* @__PURE__ */ i("span", { className: "cms-mail-row__line", children: [
1545
1527
  /* @__PURE__ */ e("span", { className: "cms-mail-row__from", children: n }),
1546
- s ? /* @__PURE__ */ e(D, { name: "paperclip", size: 16, label: f.attachment }) : null,
1547
- /* @__PURE__ */ e("span", { className: "cms-mail-row__time", children: i })
1528
+ s ? /* @__PURE__ */ e(L, { name: "paperclip", size: 16, label: p.attachment }) : null,
1529
+ /* @__PURE__ */ e("span", { className: "cms-mail-row__time", children: r })
1548
1530
  ] }),
1549
- /* @__PURE__ */ o("span", { className: "cms-mail-row__line", children: [
1531
+ /* @__PURE__ */ i("span", { className: "cms-mail-row__line", children: [
1550
1532
  /* @__PURE__ */ e("span", { className: "cms-mail-row__subject", children: l }),
1551
- c ? /* @__PURE__ */ e("span", { className: "cms-mail-row__dot", role: "img", "aria-label": f.unread }) : null
1533
+ c ? /* @__PURE__ */ e("span", { className: "cms-mail-row__dot", role: "img", "aria-label": p.unread }) : null
1552
1534
  ] }),
1553
1535
  /* @__PURE__ */ e("span", { className: "cms-mail-row__preview", children: t })
1554
1536
  ] })
@@ -1557,49 +1539,49 @@ function ul({ from: n, subject: l, preview: t, time: i, unread: c, hasAttachment
1557
1539
  )
1558
1540
  ] });
1559
1541
  }
1560
- function ml({ direction: n, children: l, time: t, read: i, readLabel: c = "Read" }) {
1561
- return /* @__PURE__ */ o("div", { className: L("cms-bubble", `cms-bubble--${n}`), children: [
1542
+ function Cl({ direction: n, children: l, time: t, read: r, readLabel: c = "Read" }) {
1543
+ return /* @__PURE__ */ i("div", { className: F("cms-bubble", `cms-bubble--${n}`), children: [
1562
1544
  /* @__PURE__ */ e("div", { className: "cms-bubble__text", children: l }),
1563
- /* @__PURE__ */ o("div", { className: "cms-bubble__meta", children: [
1545
+ /* @__PURE__ */ i("div", { className: "cms-bubble__meta", children: [
1564
1546
  t,
1565
- n === "out" && i ? /* @__PURE__ */ o(E, { children: [
1547
+ n === "out" && r ? /* @__PURE__ */ i(A, { children: [
1566
1548
  " · ",
1567
1549
  c
1568
1550
  ] }) : null
1569
1551
  ] })
1570
1552
  ] });
1571
1553
  }
1572
- function hl({ label: n, value: l, onChange: t, onSend: i, onAttach: c, placeholder: s, variant: u = "chat", sendLabel: a = "Send", attachLabel: m = "Attach a file", leading: v, canSend: d }) {
1573
- const f = Q(), r = d ?? l.trim() !== "", h = (N) => {
1574
- N.preventDefault(), r && i();
1575
- }, p = c ? /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button cms-composer__attach", "aria-label": m, onClick: c, children: /* @__PURE__ */ e(D, { name: "paperclip" }) }) : null;
1576
- return /* @__PURE__ */ o("form", { className: L("cms-composer", `cms-composer--${u}`), onSubmit: h, children: [
1577
- /* @__PURE__ */ e("label", { htmlFor: f, className: u === "reply" ? "cms-composer__title" : "cms-visually-hidden", children: n }),
1578
- u === "chat" ? p : null,
1554
+ function Sl({ label: n, value: l, onChange: t, onSend: r, onAttach: c, placeholder: s, variant: m = "chat", sendLabel: a = "Send", attachLabel: u = "Attach a file", leading: v, canSend: o }) {
1555
+ const p = se(), h = o ?? l.trim() !== "", f = (g) => {
1556
+ g.preventDefault(), h && r();
1557
+ }, d = c ? /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button cms-composer__attach", "aria-label": u, onClick: c, children: /* @__PURE__ */ e(L, { name: "paperclip" }) }) : null;
1558
+ return /* @__PURE__ */ i("form", { className: F("cms-composer", `cms-composer--${m}`), onSubmit: f, children: [
1559
+ /* @__PURE__ */ e("label", { htmlFor: p, className: m === "reply" ? "cms-composer__title" : "cms-visually-hidden", children: n }),
1560
+ m === "chat" ? d : null,
1579
1561
  /* @__PURE__ */ e(
1580
1562
  "textarea",
1581
1563
  {
1582
- id: f,
1564
+ id: p,
1583
1565
  className: "cms-composer__input",
1584
- rows: u === "reply" ? 3 : 1,
1566
+ rows: m === "reply" ? 3 : 1,
1585
1567
  placeholder: s,
1586
1568
  value: l,
1587
- onChange: (N) => t(N.target.value),
1588
- onKeyDown: (N) => {
1589
- N.nativeEvent.isComposing || N.keyCode === 229 || u === "chat" && N.key === "Enter" && !N.shiftKey && (N.preventDefault(), r && i());
1569
+ onChange: (g) => t(g.target.value),
1570
+ onKeyDown: (g) => {
1571
+ g.nativeEvent.isComposing || g.keyCode === 229 || m === "chat" && g.key === "Enter" && !g.shiftKey && (g.preventDefault(), h && r());
1590
1572
  }
1591
1573
  }
1592
1574
  ),
1593
- u === "reply" && v !== void 0 ? /* @__PURE__ */ e("div", { className: "cms-composer__leading", children: v }) : null,
1594
- u === "reply" ? p : null,
1595
- u === "chat" ? /* @__PURE__ */ e("button", { type: "submit", className: "cms-composer__send-round", "aria-label": a, disabled: !r, children: /* @__PURE__ */ e(D, { name: "send" }) }) : /* @__PURE__ */ o("button", { type: "submit", className: "cms-button cms-button--chrome cms-composer__send", disabled: !r, children: [
1575
+ m === "reply" && v !== void 0 ? /* @__PURE__ */ e("div", { className: "cms-composer__leading", children: v }) : null,
1576
+ m === "reply" ? d : null,
1577
+ m === "chat" ? /* @__PURE__ */ e("button", { type: "submit", className: "cms-composer__send-round", "aria-label": a, disabled: !h, children: /* @__PURE__ */ e(L, { name: "send" }) }) : /* @__PURE__ */ i("button", { type: "submit", className: "cms-button cms-button--chrome cms-composer__send", disabled: !h, children: [
1596
1578
  a,
1597
1579
  " ",
1598
- /* @__PURE__ */ e(D, { name: "send", size: 18 })
1580
+ /* @__PURE__ */ e(L, { name: "send", size: 18 })
1599
1581
  ] })
1600
1582
  ] });
1601
1583
  }
1602
- const Pe = {
1584
+ const He = {
1603
1585
  incomingAudio: "Incoming audio call",
1604
1586
  incomingVideo: "Incoming video call",
1605
1587
  incomingFrom: (n, l) => `${n} from ${l}`,
@@ -1620,91 +1602,91 @@ const Pe = {
1620
1602
  onCallWith: (n) => `On a call with ${n}`,
1621
1603
  returnToCall: "Return to call"
1622
1604
  };
1623
- function fl({ name: n, media: l, onAccept: t, onDecline: i, labels: c }) {
1624
- const s = ge(Pe, c), u = l === "video" ? s.incomingVideo : s.incomingAudio;
1625
- return /* @__PURE__ */ o("div", { className: "cms-call-incoming", role: "alertdialog", "aria-label": s.incomingFrom(u, n), children: [
1626
- /* @__PURE__ */ e("span", { className: "cms-call-incoming__ring", "aria-hidden": "true", children: /* @__PURE__ */ e(ye, { name: n, size: 112 }) }),
1605
+ function El({ name: n, media: l, onAccept: t, onDecline: r, labels: c }) {
1606
+ const s = ye(He, c), m = l === "video" ? s.incomingVideo : s.incomingAudio;
1607
+ return /* @__PURE__ */ i("div", { className: "cms-call-incoming", role: "alertdialog", "aria-label": s.incomingFrom(m, n), children: [
1608
+ /* @__PURE__ */ e("span", { className: "cms-call-incoming__ring", "aria-hidden": "true", children: /* @__PURE__ */ e(Se, { name: n, size: 112 }) }),
1627
1609
  /* @__PURE__ */ e("p", { className: "cms-call-incoming__name", children: n }),
1628
- /* @__PURE__ */ e("p", { className: "cms-call-incoming__what", children: u }),
1629
- /* @__PURE__ */ o("div", { className: "cms-call-incoming__actions", children: [
1630
- /* @__PURE__ */ e(de, { icon: "phone-off", label: s.decline, tone: "hang-up", onClick: i }),
1631
- /* @__PURE__ */ e(de, { icon: "phone", label: s.accept, tone: "accept", onClick: t })
1610
+ /* @__PURE__ */ e("p", { className: "cms-call-incoming__what", children: m }),
1611
+ /* @__PURE__ */ i("div", { className: "cms-call-incoming__actions", children: [
1612
+ /* @__PURE__ */ e(_e, { icon: "phone-off", label: s.decline, tone: "hang-up", onClick: r }),
1613
+ /* @__PURE__ */ e(_e, { icon: "phone", label: s.accept, tone: "accept", onClick: t })
1632
1614
  ] })
1633
1615
  ] });
1634
1616
  }
1635
- function de({ icon: n, label: l, onClick: t, tone: i = "plain", pressed: c }) {
1636
- return /* @__PURE__ */ o(
1617
+ function _e({ icon: n, label: l, onClick: t, tone: r = "plain", pressed: c }) {
1618
+ return /* @__PURE__ */ i(
1637
1619
  "button",
1638
1620
  {
1639
1621
  type: "button",
1640
- className: L("cms-call-button", `cms-call-button--${i}`, c && "is-pressed"),
1622
+ className: F("cms-call-button", `cms-call-button--${r}`, c && "is-pressed"),
1641
1623
  "aria-pressed": c,
1642
1624
  onClick: t,
1643
1625
  children: [
1644
- /* @__PURE__ */ e("span", { className: "cms-call-button__disc", children: /* @__PURE__ */ e(D, { name: n, size: 24 }) }),
1626
+ /* @__PURE__ */ e("span", { className: "cms-call-button__disc", children: /* @__PURE__ */ e(L, { name: n, size: 24 }) }),
1645
1627
  /* @__PURE__ */ e("span", { className: "cms-call-button__label", children: l })
1646
1628
  ]
1647
1629
  }
1648
1630
  );
1649
1631
  }
1650
- function pl({ name: n, duration: l, connection: t, you: i, muted: c, speaker: s, onToggleMute: u, onToggleSpeaker: a, onAddPerson: m, onChat: v, onHangUp: d, labels: f }) {
1651
- const r = ge(Pe, f);
1652
- return /* @__PURE__ */ o("section", { className: "cms-call-panel", "aria-label": r.callWith(n), children: [
1653
- /* @__PURE__ */ o("div", { className: "cms-call-panel__head", children: [
1654
- /* @__PURE__ */ e(ye, { name: n, size: 64 }),
1655
- /* @__PURE__ */ o("div", { className: "cms-call-panel__who", children: [
1632
+ function Al({ name: n, duration: l, connection: t, you: r, muted: c, speaker: s, onToggleMute: m, onToggleSpeaker: a, onAddPerson: u, onChat: v, onHangUp: o, labels: p }) {
1633
+ const h = ye(He, p);
1634
+ return /* @__PURE__ */ i("section", { className: "cms-call-panel", "aria-label": h.callWith(n), children: [
1635
+ /* @__PURE__ */ i("div", { className: "cms-call-panel__head", children: [
1636
+ /* @__PURE__ */ e(Se, { name: n, size: 64 }),
1637
+ /* @__PURE__ */ i("div", { className: "cms-call-panel__who", children: [
1656
1638
  /* @__PURE__ */ e("p", { className: "cms-call-panel__name", children: n }),
1657
- /* @__PURE__ */ e("p", { className: "cms-call-panel__time", "aria-label": r.callTime(l), children: l })
1639
+ /* @__PURE__ */ e("p", { className: "cms-call-panel__time", "aria-label": h.callTime(l), children: l })
1658
1640
  ] }),
1659
- /* @__PURE__ */ e("span", { className: L("cms-pill", t === "good" ? "cms-pill--success" : "cms-pill--warning"), children: t === "good" ? r.goodConnection : r.poorConnection })
1641
+ /* @__PURE__ */ e("span", { className: F("cms-pill", t === "good" ? "cms-pill--success" : "cms-pill--warning"), children: t === "good" ? h.goodConnection : h.poorConnection })
1660
1642
  ] }),
1661
- /* @__PURE__ */ o("div", { className: "cms-call-panel__you", children: [
1662
- /* @__PURE__ */ e(ye, { name: i.name, size: 36 }),
1663
- /* @__PURE__ */ e("span", { children: r.you }),
1664
- i.speaking ? /* @__PURE__ */ e("span", { className: "cms-call-panel__level", role: "img", "aria-label": r.speaking }) : null
1643
+ /* @__PURE__ */ i("div", { className: "cms-call-panel__you", children: [
1644
+ /* @__PURE__ */ e(Se, { name: r.name, size: 36 }),
1645
+ /* @__PURE__ */ e("span", { children: h.you }),
1646
+ r.speaking ? /* @__PURE__ */ e("span", { className: "cms-call-panel__level", role: "img", "aria-label": h.speaking }) : null
1665
1647
  ] }),
1666
- /* @__PURE__ */ o("div", { className: "cms-call-panel__controls", children: [
1667
- /* @__PURE__ */ e(de, { icon: "mic", label: c ? r.unmute : r.mute, pressed: c, onClick: u }),
1668
- /* @__PURE__ */ e(de, { icon: "speaker", label: r.speaker, pressed: s, onClick: a }),
1669
- m ? /* @__PURE__ */ e(de, { icon: "user-plus", label: r.addPerson, onClick: m }) : null,
1670
- v ? /* @__PURE__ */ e(de, { icon: "chat", label: r.chat, onClick: v }) : null,
1671
- /* @__PURE__ */ e(de, { icon: "phone-off", label: r.hangUp, tone: "hang-up", onClick: d })
1648
+ /* @__PURE__ */ i("div", { className: "cms-call-panel__controls", children: [
1649
+ /* @__PURE__ */ e(_e, { icon: "mic", label: c ? h.unmute : h.mute, pressed: c, onClick: m }),
1650
+ /* @__PURE__ */ e(_e, { icon: "speaker", label: h.speaker, pressed: s, onClick: a }),
1651
+ u ? /* @__PURE__ */ e(_e, { icon: "user-plus", label: h.addPerson, onClick: u }) : null,
1652
+ v ? /* @__PURE__ */ e(_e, { icon: "chat", label: h.chat, onClick: v }) : null,
1653
+ /* @__PURE__ */ e(_e, { icon: "phone-off", label: h.hangUp, tone: "hang-up", onClick: o })
1672
1654
  ] })
1673
1655
  ] });
1674
1656
  }
1675
- function bl({ name: n, duration: l, muted: t, onToggleMute: i, onReturn: c, onHangUp: s, labels: u }) {
1676
- const a = ge(Pe, u);
1677
- return /* @__PURE__ */ o("section", { className: "cms-call-bar", "aria-label": a.callWith(n), children: [
1657
+ function Tl({ name: n, duration: l, muted: t, onToggleMute: r, onReturn: c, onHangUp: s, labels: m }) {
1658
+ const a = ye(He, m);
1659
+ return /* @__PURE__ */ i("section", { className: "cms-call-bar", "aria-label": a.callWith(n), children: [
1678
1660
  /* @__PURE__ */ e("span", { className: "cms-call-bar__live", "aria-hidden": "true" }),
1679
1661
  /* @__PURE__ */ e("span", { className: "cms-call-bar__name", children: a.onCallWith(n) }),
1680
1662
  /* @__PURE__ */ e("span", { className: "cms-call-bar__time", children: l }),
1681
- /* @__PURE__ */ o("span", { className: "cms-call-bar__actions", children: [
1682
- /* @__PURE__ */ e("button", { type: "button", className: "cms-call-bar__icon", "aria-label": t ? a.unmute : a.mute, "aria-pressed": t, onClick: i, children: /* @__PURE__ */ e(D, { name: "mic" }) }),
1663
+ /* @__PURE__ */ i("span", { className: "cms-call-bar__actions", children: [
1664
+ /* @__PURE__ */ e("button", { type: "button", className: "cms-call-bar__icon", "aria-label": t ? a.unmute : a.mute, "aria-pressed": t, onClick: r, children: /* @__PURE__ */ e(L, { name: "mic" }) }),
1683
1665
  /* @__PURE__ */ e("button", { type: "button", className: "cms-button cms-button--primary", onClick: c, children: a.returnToCall }),
1684
- /* @__PURE__ */ e("button", { type: "button", className: "cms-call-bar__icon cms-call-bar__icon--hang-up", "aria-label": a.hangUp, onClick: s, children: /* @__PURE__ */ e(D, { name: "phone-off" }) })
1666
+ /* @__PURE__ */ e("button", { type: "button", className: "cms-call-bar__icon cms-call-bar__icon--hang-up", "aria-label": a.hangUp, onClick: s, children: /* @__PURE__ */ e(L, { name: "phone-off" }) })
1685
1667
  ] })
1686
1668
  ] });
1687
1669
  }
1688
- function _l({ mark: n, product: l, headline: t, lead: i, features: c = [], children: s }) {
1689
- return /* @__PURE__ */ o("div", { className: "cms-signin", children: [
1690
- /* @__PURE__ */ o("aside", { className: "cms-signin__brand", children: [
1691
- /* @__PURE__ */ o("p", { className: "cms-signin__logo", children: [
1670
+ function Dl({ mark: n, product: l, headline: t, lead: r, features: c = [], children: s }) {
1671
+ return /* @__PURE__ */ i("div", { className: "cms-signin", children: [
1672
+ /* @__PURE__ */ i("aside", { className: "cms-signin__brand", children: [
1673
+ /* @__PURE__ */ i("p", { className: "cms-signin__logo", children: [
1692
1674
  /* @__PURE__ */ e("span", { className: "cms-signin__mark", "aria-hidden": "true", children: n }),
1693
1675
  l
1694
1676
  ] }),
1695
- /* @__PURE__ */ o("div", { className: "cms-signin__pitch", children: [
1677
+ /* @__PURE__ */ i("div", { className: "cms-signin__pitch", children: [
1696
1678
  /* @__PURE__ */ e("p", { className: "cms-signin__headline", children: t }),
1697
- /* @__PURE__ */ e("p", { className: "cms-signin__lead", children: i }),
1698
- c.length ? /* @__PURE__ */ e("ul", { className: "cms-signin__features", children: c.map((u) => /* @__PURE__ */ o("li", { children: [
1699
- /* @__PURE__ */ e(D, { name: u.icon, size: 18 }),
1700
- u.label
1701
- ] }, u.label)) }) : null
1679
+ /* @__PURE__ */ e("p", { className: "cms-signin__lead", children: r }),
1680
+ c.length ? /* @__PURE__ */ e("ul", { className: "cms-signin__features", children: c.map((m) => /* @__PURE__ */ i("li", { children: [
1681
+ /* @__PURE__ */ e(L, { name: m.icon, size: 18 }),
1682
+ m.label
1683
+ ] }, m.label)) }) : null
1702
1684
  ] })
1703
1685
  ] }),
1704
1686
  /* @__PURE__ */ e("main", { className: "cms-signin__form", children: s })
1705
1687
  ] });
1706
1688
  }
1707
- const Ln = {
1689
+ const Un = {
1708
1690
  title: "Sign in",
1709
1691
  identifier: "Email or username",
1710
1692
  identifierPlaceholder: "name@example.com",
@@ -1716,196 +1698,288 @@ const Ln = {
1716
1698
  newHere: "New here?",
1717
1699
  create: "Create an account"
1718
1700
  };
1719
- function vl({ server: n, onSubmit: l, forgotHref: t, createHref: i, error: c, busy: s, labels: u }) {
1720
- const a = ge(Ln, u), m = Q(), [v, d] = A(""), [f, r] = A(""), [h, p] = A(!1);
1721
- return /* @__PURE__ */ o("form", { className: "cms-signin-form", onSubmit: (k) => {
1722
- k.preventDefault(), l(v, f);
1723
- }, "aria-describedby": c ? `${m}-error` : void 0, children: [
1701
+ function Ll({ server: n, onSubmit: l, forgotHref: t, createHref: r, error: c, busy: s, labels: m }) {
1702
+ const a = ye(Un, m), u = se(), [v, o] = T(""), [p, h] = T(""), [f, d] = T(!1);
1703
+ return /* @__PURE__ */ i("form", { className: "cms-signin-form", onSubmit: (k) => {
1704
+ k.preventDefault(), l(v, p);
1705
+ }, "aria-describedby": c ? `${u}-error` : void 0, children: [
1724
1706
  /* @__PURE__ */ e("h1", { className: "cms-signin-form__title", children: a.title }),
1725
- /* @__PURE__ */ o("p", { className: "cms-signin-form__server", children: [
1726
- /* @__PURE__ */ e(D, { name: "server", size: 18 }),
1707
+ /* @__PURE__ */ i("p", { className: "cms-signin-form__server", children: [
1708
+ /* @__PURE__ */ e(L, { name: "server", size: 18 }),
1727
1709
  n
1728
1710
  ] }),
1729
- /* @__PURE__ */ e("label", { className: "cms-signin-form__label", htmlFor: `${m}-identifier`, children: a.identifier }),
1711
+ /* @__PURE__ */ e("label", { className: "cms-signin-form__label", htmlFor: `${u}-identifier`, children: a.identifier }),
1730
1712
  /* @__PURE__ */ e(
1731
1713
  "input",
1732
1714
  {
1733
- id: `${m}-identifier`,
1715
+ id: `${u}-identifier`,
1734
1716
  className: "cms-signin-form__input",
1735
1717
  type: "text",
1736
1718
  autoComplete: "username",
1737
1719
  placeholder: a.identifierPlaceholder,
1738
1720
  value: v,
1739
- onChange: (k) => d(k.target.value),
1721
+ onChange: (k) => o(k.target.value),
1740
1722
  required: !0
1741
1723
  }
1742
1724
  ),
1743
- /* @__PURE__ */ e("label", { className: "cms-signin-form__label", htmlFor: `${m}-password`, children: a.password }),
1744
- /* @__PURE__ */ o("span", { className: "cms-signin-form__password", children: [
1725
+ /* @__PURE__ */ e("label", { className: "cms-signin-form__label", htmlFor: `${u}-password`, children: a.password }),
1726
+ /* @__PURE__ */ i("span", { className: "cms-signin-form__password", children: [
1745
1727
  /* @__PURE__ */ e(
1746
1728
  "input",
1747
1729
  {
1748
- id: `${m}-password`,
1730
+ id: `${u}-password`,
1749
1731
  className: "cms-signin-form__input",
1750
- type: h ? "text" : "password",
1732
+ type: f ? "text" : "password",
1751
1733
  autoComplete: "current-password",
1752
- value: f,
1753
- onChange: (k) => r(k.target.value),
1734
+ value: p,
1735
+ onChange: (k) => h(k.target.value),
1754
1736
  required: !0
1755
1737
  }
1756
1738
  ),
1757
- /* @__PURE__ */ e("button", { type: "button", className: "cms-signin-form__show", "aria-pressed": h, onClick: () => p((k) => !k), children: h ? a.hide : a.show })
1739
+ /* @__PURE__ */ e("button", { type: "button", className: "cms-signin-form__show", "aria-pressed": f, onClick: () => d((k) => !k), children: f ? a.hide : a.show })
1758
1740
  ] }),
1759
1741
  t ? /* @__PURE__ */ e("a", { className: "cms-signin-form__forgot", href: t, children: a.forgot }) : null,
1760
- c ? /* @__PURE__ */ e("p", { id: `${m}-error`, className: "cms-signin-form__error", role: "alert", children: c }) : null,
1742
+ c ? /* @__PURE__ */ e("p", { id: `${u}-error`, className: "cms-signin-form__error", role: "alert", children: c }) : null,
1761
1743
  /* @__PURE__ */ e("button", { type: "submit", className: "cms-button cms-button--chrome cms-signin-form__submit", disabled: s, "aria-busy": s || void 0, children: a.submit }),
1762
- i ? /* @__PURE__ */ o(E, { children: [
1744
+ r ? /* @__PURE__ */ i(A, { children: [
1763
1745
  /* @__PURE__ */ e("p", { className: "cms-signin-form__or", children: /* @__PURE__ */ e("span", { children: a.newHere }) }),
1764
- /* @__PURE__ */ e("a", { className: "cms-button cms-signin-form__create", href: i, children: a.create })
1746
+ /* @__PURE__ */ e("a", { className: "cms-button cms-signin-form__create", href: r, children: a.create })
1765
1747
  ] }) : null
1766
1748
  ] });
1767
1749
  }
1768
- const Oe = { bare: /* @__PURE__ */ new Set(), hidden: /* @__PURE__ */ new Set() }, He = (n, l) => n.size === l.size && [...n].every((t) => l.has(t));
1769
- function $n(n) {
1750
+ const zn = { name: (n, l) => `${n}: ${l}` };
1751
+ function Xe(n) {
1752
+ const l = Oe(n);
1753
+ return l === Ue(n.options, n.defaultValue) ? null : l ?? null;
1754
+ }
1755
+ function Oe({ options: n, value: l, defaultValue: t }) {
1756
+ return n.find((r) => r.id === l) ?? Ue(n, t);
1757
+ }
1758
+ function Je(n) {
1759
+ var l;
1760
+ return ye(zn, n.labels).name(n.label, ((l = Oe(n)) == null ? void 0 : l.label) ?? "");
1761
+ }
1762
+ function Qe(n, l) {
1763
+ const t = Oe(n);
1764
+ return n.options.map((r) => ({
1765
+ id: r.id,
1766
+ label: r.label,
1767
+ offer: { offered: !0, locked: !1 },
1768
+ checked: r === t,
1769
+ ...l === void 0 ? {} : { group: l },
1770
+ onSelect: () => {
1771
+ r !== t && n.onChange(r.id);
1772
+ }
1773
+ }));
1774
+ }
1775
+ function Ue(n, l) {
1776
+ return n.find((t) => t.id === l) ?? n[0];
1777
+ }
1778
+ function en(n) {
1779
+ var s;
1780
+ const l = H(null), t = (n == null ? void 0 : n.value) ?? null, c = n === void 0 || n.options.some((m) => m.id === n.value) ? null : ((s = Ue(n.options, n.defaultValue)) == null ? void 0 : s.id) ?? null;
1781
+ Q(() => {
1782
+ c === null ? l.current = null : l.current !== t && (l.current = t, n == null || n.onChange(c));
1783
+ }, [c, t]);
1784
+ }
1785
+ function nn({ iconOnly: n = !1, onOpenChange: l, ...t }) {
1786
+ return t.options.length < 2 ? null : /* @__PURE__ */ e(Kn, { ...t, iconOnly: n, onOpenChange: l });
1787
+ }
1788
+ function Kn({ iconOnly: n, onOpenChange: l, ...t }) {
1789
+ const [r, c] = T(null), s = be(() => c(null), []), m = H(!1), a = r !== null;
1790
+ Q(() => (l == null || l(a), () => l == null ? void 0 : l(!1)), [a, l]);
1791
+ const u = Xe(t), v = u !== null && !n, o = Je(t), p = (h, f) => {
1792
+ const d = h.getBoundingClientRect();
1793
+ c({ x: d.left, y: d.bottom + 4, focus: f });
1794
+ };
1795
+ return /* @__PURE__ */ i(A, { children: [
1796
+ /* @__PURE__ */ e(
1797
+ "button",
1798
+ {
1799
+ type: "button",
1800
+ className: F("cms-filter-menu", u !== null && "cms-filter-menu--active", v && "cms-filter-menu--named"),
1801
+ "aria-haspopup": "menu",
1802
+ "aria-expanded": a,
1803
+ "aria-label": o,
1804
+ title: o,
1805
+ onMouseDown: () => {
1806
+ m.current = a;
1807
+ },
1808
+ onClick: (h) => {
1809
+ a || m.current ? s() : p(h.currentTarget, "current"), m.current = !1;
1810
+ },
1811
+ onKeyDown: (h) => {
1812
+ m.current = !1, (h.key === "ArrowDown" || h.key === "ArrowUp") && (h.preventDefault(), p(h.currentTarget, h.key === "ArrowUp" ? "last" : "current"));
1813
+ },
1814
+ children: v ? /* @__PURE__ */ i(A, { children: [
1815
+ /* @__PURE__ */ e("span", { className: "cms-filter-menu__choice", children: u.label }),
1816
+ /* @__PURE__ */ e(L, { name: "chevron-down", size: 16 })
1817
+ ] }) : /* @__PURE__ */ e(L, { name: "funnel" })
1818
+ }
1819
+ ),
1820
+ /* @__PURE__ */ e(
1821
+ ge,
1822
+ {
1823
+ at: r,
1824
+ items: Qe(t),
1825
+ onClose: s,
1826
+ label: t.label,
1827
+ focus: r == null ? void 0 : r.focus
1828
+ }
1829
+ )
1830
+ ] });
1831
+ }
1832
+ function Vn(n) {
1833
+ return en(n), /* @__PURE__ */ e(nn, { ...n });
1834
+ }
1835
+ function $l({ leading: n, name: l, filter: t }) {
1836
+ return /* @__PURE__ */ i("div", { className: "cms-list-head", children: [
1837
+ n != null ? /* @__PURE__ */ e("span", { className: "cms-list-head__leading", children: n }) : null,
1838
+ /* @__PURE__ */ e("h2", { className: "cms-list-head__name", title: l, children: l }),
1839
+ t !== void 0 ? /* @__PURE__ */ e(Vn, { ...t }) : null
1840
+ ] });
1841
+ }
1842
+ const Ze = { bare: /* @__PURE__ */ new Set(), hidden: /* @__PURE__ */ new Set() }, We = (n, l) => n.size === l.size && [...n].every((t) => l.has(t));
1843
+ function Zn(n) {
1770
1844
  const l = /* @__PURE__ */ new Map();
1771
1845
  for (const t of n) l.set(t.group, [...l.get(t.group) ?? [], t]);
1772
1846
  return [...l.values()];
1773
1847
  }
1774
- function In(n) {
1848
+ function Wn(n) {
1775
1849
  const l = /* @__PURE__ */ new Map();
1776
1850
  for (const t of n) t.overflow !== void 0 && t.overflow !== 0 && l.set(t.overflow, [...l.get(t.overflow) ?? [], t.id]);
1777
- return [...l.entries()].sort(([t], [i]) => t - i).map(([, t]) => t);
1778
- }
1779
- function gl({ label: n, actions: l, onAction: t, status: i, moreLabel: c, leading: s }) {
1780
- const u = l.filter((b) => b.entries === void 0 || b.entries.length > 0), a = O(null), m = O(null), v = O(null), [d, f] = A(Oe), [r, h] = A(null), [p, N] = A("first"), [k, y] = A(null), [C, M] = A(null), _ = $n(u), w = In(u), T = _.flat(), U = T.filter((b) => b.overflow === 0), B = T.filter((b) => b.overflow !== 0), x = JSON.stringify([u.map((b) => [b.id, b.label, b.icon, b.group, b.overflow ?? null, b.entries !== void 0]), i ?? "", s !== void 0]), $ = _e(() => {
1781
- const b = a.current, I = m.current;
1782
- if (b === null || I === null) return;
1783
- const K = getComputedStyle(b), ne = parseFloat(K.columnGap || "0") || 0, P = b.clientWidth - (parseFloat(K.paddingLeft) || 0) - (parseFloat(K.paddingRight) || 0), G = (F) => {
1784
- var Z;
1785
- return ((Z = I.querySelector(F)) == null ? void 0 : Z.getBoundingClientRect().width) ?? 0;
1786
- }, g = G('[data-measure="leading"]'), S = G('[data-measure="separator"]'), R = G('[data-measure="more"]'), j = (F, Z) => G(`[data-measure="${Z ? "full" : "icon"}"][data-measure-action="${CSS.escape(F)}"]`), fe = (F, Z) => {
1787
- const le = /* @__PURE__ */ new Set([...U.map((oe) => oe.id), ...Z]), ue = _.map((oe) => oe.filter((we) => !le.has(we.id))).filter((oe) => oe.length > 0), Ne = ue.flat(), We = Ne.length + (ue.length - 1) + (le.size > 0 ? 1 : 0) + (g > 0 ? 1 : 0);
1788
- return g + Ne.reduce((oe, we) => oe + j(we.id, !F.has(we.id)), 0) + S * Math.max(0, ue.length - 1) + (le.size > 0 ? R : 0) + ne * Math.max(0, We - 1);
1789
- }, Fe = B.filter((F) => !w.some((Z) => Z.includes(F.id))).map((F) => F.id), Ve = [...w, ...[...Fe].reverse().map((F) => [F])];
1790
- let pe = null;
1791
- if (fe(/* @__PURE__ */ new Set(), /* @__PURE__ */ new Set()) <= P) pe = Oe;
1851
+ return [...l.entries()].sort(([t], [r]) => t - r).map(([, t]) => t);
1852
+ }
1853
+ function Il({ label: n, actions: l, onAction: t, status: r, moreLabel: c, leading: s }) {
1854
+ const m = l.filter((_) => _.entries === void 0 || _.entries.length > 0), a = H(null), u = H(null), v = H(null), [o, p] = T(Ze), [h, f] = T(null), [d, g] = T("first"), [k, x] = T(null), [C, w] = T(null), b = Zn(m), y = Wn(m), D = b.flat(), Z = D.filter((_) => _.overflow === 0), V = D.filter((_) => _.overflow !== 0), M = JSON.stringify([m.map((_) => [_.id, _.label, _.icon, _.group, _.overflow ?? null, _.entries !== void 0]), r ?? "", s !== void 0]), R = be(() => {
1855
+ const _ = a.current, $ = u.current;
1856
+ if (_ === null || $ === null) return;
1857
+ const B = getComputedStyle(_), ne = parseFloat(B.columnGap || "0") || 0, I = _.clientWidth - (parseFloat(B.paddingLeft) || 0) - (parseFloat(B.paddingRight) || 0), X = (E) => {
1858
+ var K;
1859
+ return ((K = $.querySelector(E)) == null ? void 0 : K.getBoundingClientRect().width) ?? 0;
1860
+ }, N = X('[data-measure="leading"]'), S = X('[data-measure="separator"]'), O = X('[data-measure="more"]'), Y = (E, K) => X(`[data-measure="${K ? "full" : "icon"}"][data-measure-action="${CSS.escape(E)}"]`), de = (E, K) => {
1861
+ const W = /* @__PURE__ */ new Set([...Z.map((ce) => ce.id), ...K]), te = b.map((ce) => ce.filter((Ne) => !W.has(Ne.id))).filter((ce) => ce.length > 0), pe = te.flat(), Ce = pe.length + (te.length - 1) + (W.size > 0 ? 1 : 0) + (N > 0 ? 1 : 0);
1862
+ return N + pe.reduce((ce, Ne) => ce + Y(Ne.id, !E.has(Ne.id)), 0) + S * Math.max(0, te.length - 1) + (W.size > 0 ? O : 0) + ne * Math.max(0, Ce - 1);
1863
+ }, Me = V.filter((E) => !y.some((K) => K.includes(E.id))).map((E) => E.id), Ee = [...y, ...[...Me].reverse().map((E) => [E])];
1864
+ let ue = null;
1865
+ if (de(/* @__PURE__ */ new Set(), /* @__PURE__ */ new Set()) <= I) ue = Ze;
1792
1866
  else {
1793
- const F = /* @__PURE__ */ new Set();
1794
- for (const Z of Ve) {
1795
- for (const le of Z) F.add(le);
1796
- if (fe(F, /* @__PURE__ */ new Set()) <= P) {
1797
- pe = { bare: F, hidden: /* @__PURE__ */ new Set() };
1867
+ const E = /* @__PURE__ */ new Set();
1868
+ for (const K of Ee) {
1869
+ for (const W of K) E.add(W);
1870
+ if (de(E, /* @__PURE__ */ new Set()) <= I) {
1871
+ ue = { bare: E, hidden: /* @__PURE__ */ new Set() };
1798
1872
  break;
1799
1873
  }
1800
1874
  }
1801
1875
  }
1802
- if (pe === null) {
1803
- const F = new Set(B.map((le) => le.id)), Z = /* @__PURE__ */ new Set();
1804
- for (const le of w) {
1805
- for (const ue of le) B.some((Ne) => Ne.id === ue) && Z.add(ue);
1806
- if (Z.size >= 2 && fe(F, Z) <= P) break;
1876
+ if (ue === null) {
1877
+ const E = new Set(V.map((W) => W.id)), K = /* @__PURE__ */ new Set();
1878
+ for (const W of y) {
1879
+ for (const te of W) V.some((pe) => pe.id === te) && K.add(te);
1880
+ if (K.size >= 2 && de(E, K) <= I) break;
1807
1881
  }
1808
- if (fe(F, Z) > P) {
1809
- for (const le of [...Fe].reverse())
1810
- if (Z.add(le), fe(F, Z) <= P) break;
1882
+ if (de(E, K) > I) {
1883
+ for (const W of [...Me].reverse())
1884
+ if (K.add(W), de(E, K) <= I) break;
1811
1885
  }
1812
- pe = { bare: F, hidden: Z };
1886
+ ue = { bare: E, hidden: K };
1813
1887
  }
1814
- const xe = pe;
1815
- f((F) => He(F.bare, xe.bare) && He(F.hidden, xe.hidden) ? F : xe);
1816
- }, [x]);
1817
- ve($, [$]), J(() => {
1818
- const b = a.current;
1819
- if (b === null || typeof ResizeObserver > "u") return;
1820
- const I = new ResizeObserver(() => $());
1821
- return I.observe(b), () => I.disconnect();
1822
- }, [$]);
1823
- const z = /* @__PURE__ */ new Set([...U.map((b) => b.id), ...d.hidden]), H = _.map((b) => b.filter((I) => !z.has(I.id))).filter((b) => b.length > 0).flat(), Y = [
1824
- ...U,
1825
- ...w.flat().map((b) => T.find((I) => I.id === b)).filter((b) => b !== void 0 && d.hidden.has(b.id)),
1888
+ const P = ue;
1889
+ p((E) => We(E.bare, P.bare) && We(E.hidden, P.hidden) ? E : P);
1890
+ }, [M]);
1891
+ ve(R, [R]), Q(() => {
1892
+ const _ = a.current;
1893
+ if (_ === null || typeof ResizeObserver > "u") return;
1894
+ const $ = new ResizeObserver(() => R());
1895
+ return $.observe(_), () => $.disconnect();
1896
+ }, [R]);
1897
+ const z = /* @__PURE__ */ new Set([...Z.map((_) => _.id), ...o.hidden]), U = b.map((_) => _.filter(($) => !z.has($.id))).filter((_) => _.length > 0).flat(), j = [
1898
+ ...Z,
1899
+ ...y.flat().map((_) => D.find(($) => $.id === _)).filter((_) => _ !== void 0 && o.hidden.has(_.id)),
1826
1900
  // The pinned that a row too narrow for them sent behind ..., in the row's order.
1827
- ...B.filter((b) => d.hidden.has(b.id) && !w.some((I) => I.includes(b.id)))
1828
- ], X = new Set(B.filter((b) => !w.some((I) => I.includes(b.id))).map((b) => b.id)), ee = [...H.map((b) => b.id), ...Y.length > 0 ? ["more"] : []], te = k !== null && ee.includes(k) ? k : ee[0] ?? null, q = (b) => {
1829
- var P, G;
1830
- const I = ee.indexOf(te ?? "");
1831
- let K = null;
1832
- if (b.key === "ArrowRight" ? K = Math.min(ee.length - 1, I + 1) : b.key === "ArrowLeft" ? K = Math.max(0, I - 1) : b.key === "Home" ? K = 0 : b.key === "End" ? K = ee.length - 1 : b.key === "Escape" && M(te), K === null) return;
1833
- b.preventDefault();
1834
- const ne = ee[K] ?? null;
1835
- y(ne), (G = (P = a.current) == null ? void 0 : P.querySelector(`[data-stop="${CSS.escape(ne ?? "")}"]`)) == null || G.focus();
1836
- }, ae = Y.map((b) => ({
1837
- id: b.id,
1838
- label: /* @__PURE__ */ o(E, { children: [
1839
- /* @__PURE__ */ e(be, { name: b.icon }),
1840
- b.label
1901
+ ...V.filter((_) => o.hidden.has(_.id) && !y.some(($) => $.includes(_.id)))
1902
+ ], le = new Set(V.filter((_) => !y.some(($) => $.includes(_.id))).map((_) => _.id)), ae = [...U.map((_) => _.id), ...j.length > 0 ? ["more"] : []], re = k !== null && ae.includes(k) ? k : ae[0] ?? null, ie = (_) => {
1903
+ var I, X;
1904
+ const $ = ae.indexOf(re ?? "");
1905
+ let B = null;
1906
+ if (_.key === "ArrowRight" ? B = Math.min(ae.length - 1, $ + 1) : _.key === "ArrowLeft" ? B = Math.max(0, $ - 1) : _.key === "Home" ? B = 0 : _.key === "End" ? B = ae.length - 1 : _.key === "Escape" && w(re), B === null) return;
1907
+ _.preventDefault();
1908
+ const ne = ae[B] ?? null;
1909
+ x(ne), (X = (I = a.current) == null ? void 0 : I.querySelector(`[data-stop="${CSS.escape(ne ?? "")}"]`)) == null || X.focus();
1910
+ }, oe = j.map((_) => ({
1911
+ id: _.id,
1912
+ label: /* @__PURE__ */ i(A, { children: [
1913
+ /* @__PURE__ */ e(xe, { name: _.icon }),
1914
+ _.label
1841
1915
  ] }),
1842
- offer: b.disabled ? { offered: !0, locked: !1, refusal: b.reason ?? "" } : { offered: !0, locked: !1 },
1843
- ...b.danger ? { danger: !0 } : {},
1916
+ offer: _.disabled ? { offered: !0, locked: !1, refusal: _.reason ?? "" } : { offered: !0, locked: !1 },
1917
+ ..._.danger ? { danger: !0 } : {},
1844
1918
  onSelect: () => {
1845
- var K;
1846
- if (b.disabled || b.busy) return;
1847
- if (b.entries === void 0) {
1848
- t(b.id);
1919
+ var B;
1920
+ if (_.disabled || _.busy) return;
1921
+ if (_.entries === void 0) {
1922
+ t(_.id);
1849
1923
  return;
1850
1924
  }
1851
- const I = (K = v.current) == null ? void 0 : K.getBoundingClientRect();
1852
- N("first"), h({ which: b.id, x: (I == null ? void 0 : I.left) ?? 0, y: (I == null ? void 0 : I.bottom) ?? 0 });
1925
+ const $ = (B = v.current) == null ? void 0 : B.getBoundingClientRect();
1926
+ g("first"), f({ which: _.id, x: ($ == null ? void 0 : $.left) ?? 0, y: ($ == null ? void 0 : $.bottom) ?? 0 });
1853
1927
  }
1854
- })), se = r === null || r.which === "more" ? void 0 : T.find((b) => b.id === r.which), ke = ((se == null ? void 0 : se.entries) ?? []).map((b) => ({
1855
- id: b.id,
1856
- label: /* @__PURE__ */ o(E, { children: [
1857
- b.icon !== void 0 ? /* @__PURE__ */ e(be, { name: b.icon }) : null,
1858
- b.label
1928
+ })), J = h === null || h.which === "more" ? void 0 : D.find((_) => _.id === h.which), fe = ((J == null ? void 0 : J.entries) ?? []).map((_) => ({
1929
+ id: _.id,
1930
+ label: /* @__PURE__ */ i(A, { children: [
1931
+ _.icon !== void 0 ? /* @__PURE__ */ e(xe, { name: _.icon }) : null,
1932
+ _.label
1859
1933
  ] }),
1860
- offer: b.disabled ? { offered: !0, locked: !1, refusal: b.reason ?? "" } : { offered: !0, locked: !1 },
1861
- ...b.danger ? { danger: !0 } : {},
1934
+ offer: _.disabled ? { offered: !0, locked: !1, refusal: _.reason ?? "" } : { offered: !0, locked: !1 },
1935
+ ..._.danger ? { danger: !0 } : {},
1862
1936
  onSelect: () => {
1863
- b.disabled || t(b.id);
1937
+ _.disabled || t(_.id);
1864
1938
  }
1865
- })), re = (b, I, K) => {
1866
- const ne = I.getBoundingClientRect();
1867
- N(K), h({ which: b, x: ne.left, y: ne.bottom });
1939
+ })), ee = (_, $, B) => {
1940
+ const ne = $.getBoundingClientRect();
1941
+ g(B), f({ which: _, x: ne.left, y: ne.bottom });
1868
1942
  };
1869
- return /* @__PURE__ */ o(
1943
+ return /* @__PURE__ */ i(
1870
1944
  "div",
1871
1945
  {
1872
1946
  ref: a,
1873
1947
  role: "toolbar",
1874
1948
  "aria-label": n,
1875
- className: L(
1949
+ className: F(
1876
1950
  "cms-pane-toolbar",
1877
- B.length > 0 && d.bare.size >= B.length && "cms-pane-toolbar--labels-hidden",
1878
- d.bare.size > 0 && d.bare.size < B.length && "cms-pane-toolbar--labels-partly-hidden"
1951
+ V.length > 0 && o.bare.size >= V.length && "cms-pane-toolbar--labels-hidden",
1952
+ o.bare.size > 0 && o.bare.size < V.length && "cms-pane-toolbar--labels-partly-hidden"
1879
1953
  ),
1880
- onKeyDown: q,
1954
+ onKeyDown: ie,
1881
1955
  children: [
1882
1956
  s !== void 0 ? /* @__PURE__ */ e("div", { className: "cms-pane-toolbar__leading", children: s }) : null,
1883
- _.map((b, I) => {
1884
- const K = b.filter((P) => !z.has(P.id)), ne = _.slice(0, I).some((P) => P.some((G) => !z.has(G.id)));
1885
- return /* @__PURE__ */ o("div", { className: "cms-pane-toolbar__group-wrap", children: [
1886
- K.length > 0 && ne ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__separator", role: "separator", "aria-orientation": "vertical" }) : null,
1887
- /* @__PURE__ */ e("div", { className: "cms-pane-toolbar__group", hidden: K.length === 0, children: b.map((P) => /* @__PURE__ */ e(
1888
- Pn,
1957
+ b.map((_, $) => {
1958
+ const B = _.filter((I) => !z.has(I.id)), ne = b.slice(0, $).some((I) => I.some((X) => !z.has(X.id)));
1959
+ return /* @__PURE__ */ i("div", { className: "cms-pane-toolbar__group-wrap", children: [
1960
+ B.length > 0 && ne ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__separator", role: "separator", "aria-orientation": "vertical" }) : null,
1961
+ /* @__PURE__ */ e("div", { className: "cms-pane-toolbar__group", hidden: B.length === 0, children: _.map((I) => /* @__PURE__ */ e(
1962
+ qn,
1889
1963
  {
1890
- action: P,
1891
- labels: !d.bare.has(P.id),
1892
- overflowed: z.has(P.id),
1893
- pinned: X.has(P.id),
1894
- tabbable: te === P.id,
1895
- tipOff: C === P.id,
1896
- menuOpen: (r == null ? void 0 : r.which) === P.id,
1897
- onChoose: (G, g) => {
1898
- P.entries === void 0 ? t(P.id) : (r == null ? void 0 : r.which) === P.id && g === null ? h(null) : re(P.id, G, g ?? "first");
1964
+ action: I,
1965
+ labels: !o.bare.has(I.id),
1966
+ overflowed: z.has(I.id),
1967
+ pinned: le.has(I.id),
1968
+ tabbable: re === I.id,
1969
+ tipOff: C === I.id,
1970
+ menuOpen: (h == null ? void 0 : h.which) === I.id,
1971
+ onChoose: (X, N) => {
1972
+ I.entries === void 0 ? t(I.id) : (h == null ? void 0 : h.which) === I.id && N === null ? f(null) : ee(I.id, X, N ?? "first");
1899
1973
  },
1900
1974
  onFocus: () => {
1901
- y(P.id), M(null);
1975
+ x(I.id), w(null);
1902
1976
  }
1903
1977
  },
1904
- P.id
1978
+ I.id
1905
1979
  )) })
1906
- ] }, I);
1980
+ ] }, $);
1907
1981
  }),
1908
- Y.length > 0 ? /* @__PURE__ */ e(
1982
+ j.length > 0 ? /* @__PURE__ */ e(
1909
1983
  "button",
1910
1984
  {
1911
1985
  ref: v,
@@ -1915,118 +1989,118 @@ function gl({ label: n, actions: l, onAction: t, status: i, moreLabel: c, leadin
1915
1989
  "aria-label": c,
1916
1990
  title: c,
1917
1991
  "aria-haspopup": "menu",
1918
- "aria-expanded": (r == null ? void 0 : r.which) === "more",
1919
- tabIndex: te === "more" ? 0 : -1,
1920
- onFocus: () => y("more"),
1921
- onClick: (b) => {
1922
- (r == null ? void 0 : r.which) === "more" ? h(null) : re("more", b.currentTarget, "first");
1992
+ "aria-expanded": (h == null ? void 0 : h.which) === "more",
1993
+ tabIndex: re === "more" ? 0 : -1,
1994
+ onFocus: () => x("more"),
1995
+ onClick: (_) => {
1996
+ (h == null ? void 0 : h.which) === "more" ? f(null) : ee("more", _.currentTarget, "first");
1923
1997
  },
1924
- onKeyDown: (b) => {
1925
- (b.key === "ArrowDown" || b.key === "ArrowUp") && (b.preventDefault(), b.stopPropagation(), re("more", b.currentTarget, b.key === "ArrowUp" ? "last" : "first"));
1998
+ onKeyDown: (_) => {
1999
+ (_.key === "ArrowDown" || _.key === "ArrowUp") && (_.preventDefault(), _.stopPropagation(), ee("more", _.currentTarget, _.key === "ArrowUp" ? "last" : "first"));
1926
2000
  },
1927
- children: /* @__PURE__ */ e(D, { name: "more" })
2001
+ children: /* @__PURE__ */ e(L, { name: "more" })
1928
2002
  }
1929
2003
  ) : null,
1930
- i !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__status", title: i, children: i }) : null,
1931
- /* @__PURE__ */ e(he, { at: (r == null ? void 0 : r.which) === "more" ? r : null, items: ae, onClose: () => h(null), label: c, focus: p }),
1932
- /* @__PURE__ */ e(he, { at: se !== void 0 ? r : null, items: ke, onClose: () => h(null), label: (se == null ? void 0 : se.label) ?? "", focus: p }),
1933
- /* @__PURE__ */ o("div", { ref: m, className: "cms-pane-toolbar__measure", "aria-hidden": "true", children: [
2004
+ r !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__status", title: r, children: r }) : null,
2005
+ /* @__PURE__ */ e(ge, { at: (h == null ? void 0 : h.which) === "more" ? h : null, items: oe, onClose: () => f(null), label: c, focus: d }),
2006
+ /* @__PURE__ */ e(ge, { at: J !== void 0 ? h : null, items: fe, onClose: () => f(null), label: (J == null ? void 0 : J.label) ?? "", focus: d }),
2007
+ /* @__PURE__ */ i("div", { ref: u, className: "cms-pane-toolbar__measure", "aria-hidden": "true", children: [
1934
2008
  s !== void 0 ? /* @__PURE__ */ e("div", { "data-measure": "leading", children: s }) : null,
1935
2009
  /* @__PURE__ */ e("span", { "data-measure": "separator", className: "cms-pane-toolbar__separator" }),
1936
- /* @__PURE__ */ e("span", { "data-measure": "more", className: "cms-icon-button cms-pane-toolbar__more", children: /* @__PURE__ */ e(D, { name: "more" }) }),
1937
- T.map((b) => /* @__PURE__ */ o("span", { children: [
1938
- /* @__PURE__ */ o("span", { "data-measure": "full", "data-measure-action": b.id, className: L("cms-pane-toolbar__action", b.entries !== void 0 && "cms-pane-toolbar__action--menu"), children: [
1939
- /* @__PURE__ */ e(be, { name: b.icon }),
1940
- /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__label", children: b.label }),
1941
- b.entries !== void 0 ? /* @__PURE__ */ e(Ae, {}) : null
2010
+ /* @__PURE__ */ e("span", { "data-measure": "more", className: "cms-icon-button cms-pane-toolbar__more", children: /* @__PURE__ */ e(L, { name: "more" }) }),
2011
+ D.map((_) => /* @__PURE__ */ i("span", { children: [
2012
+ /* @__PURE__ */ i("span", { "data-measure": "full", "data-measure-action": _.id, className: F("cms-pane-toolbar__action", _.entries !== void 0 && "cms-pane-toolbar__action--menu"), children: [
2013
+ /* @__PURE__ */ e(xe, { name: _.icon }),
2014
+ /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__label", children: _.label }),
2015
+ _.entries !== void 0 ? /* @__PURE__ */ e($e, {}) : null
1942
2016
  ] }),
1943
- /* @__PURE__ */ o("span", { "data-measure": "icon", "data-measure-action": b.id, className: L("cms-pane-toolbar__action", me(b.icon) !== null && "cms-pane-toolbar__action--bare", b.entries !== void 0 && "cms-pane-toolbar__action--menu"), children: [
1944
- me(b.icon) !== null ? /* @__PURE__ */ e(be, { name: b.icon }) : /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__label", children: b.label }),
1945
- b.entries !== void 0 ? /* @__PURE__ */ e(Ae, {}) : null
2017
+ /* @__PURE__ */ i("span", { "data-measure": "icon", "data-measure-action": _.id, className: F("cms-pane-toolbar__action", we(_.icon) !== null && "cms-pane-toolbar__action--bare", _.entries !== void 0 && "cms-pane-toolbar__action--menu"), children: [
2018
+ we(_.icon) !== null ? /* @__PURE__ */ e(xe, { name: _.icon }) : /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__label", children: _.label }),
2019
+ _.entries !== void 0 ? /* @__PURE__ */ e($e, {}) : null
1946
2020
  ] })
1947
- ] }, b.id))
2021
+ ] }, _.id))
1948
2022
  ] })
1949
2023
  ]
1950
2024
  }
1951
2025
  );
1952
2026
  }
1953
- function Pn({ action: n, labels: l, overflowed: t, pinned: i, tabbable: c, tipOff: s, menuOpen: u, onChoose: a, onFocus: m }) {
1954
- const [v, d] = A(!1);
1955
- J(() => {
2027
+ function qn({ action: n, labels: l, overflowed: t, pinned: r, tabbable: c, tipOff: s, menuOpen: m, onChoose: a, onFocus: u }) {
2028
+ const [v, o] = T(!1);
2029
+ Q(() => {
1956
2030
  if (!n.busy) {
1957
- d(!1);
2031
+ o(!1);
1958
2032
  return;
1959
2033
  }
1960
- const M = setTimeout(() => d(!0), Ce);
1961
- return () => clearTimeout(M);
2034
+ const w = setTimeout(() => o(!0), Te);
2035
+ return () => clearTimeout(w);
1962
2036
  }, [n.busy]);
1963
- const f = me(n.icon) === null, r = l || f, h = n.disabled && n.reason ? n.reason : null, p = h ?? (r ? null : n.label), N = Q(), [k, y] = A(!1), C = n.entries !== void 0;
1964
- return /* @__PURE__ */ o(
2037
+ const p = we(n.icon) === null, h = l || p, f = n.disabled && n.reason ? n.reason : null, d = f ?? (h ? null : n.label), g = se(), [k, x] = T(!1), C = n.entries !== void 0;
2038
+ return /* @__PURE__ */ i(
1965
2039
  "button",
1966
2040
  {
1967
2041
  type: "button",
1968
- className: L("cms-pane-toolbar__action", !r && "cms-pane-toolbar__action--bare", f && "cms-pane-toolbar__action--text", C && "cms-pane-toolbar__action--menu", n.danger && "is-danger"),
2042
+ className: F("cms-pane-toolbar__action", !h && "cms-pane-toolbar__action--bare", p && "cms-pane-toolbar__action--text", C && "cms-pane-toolbar__action--menu", n.danger && "is-danger"),
1969
2043
  "data-action": n.id,
1970
2044
  "data-stop": n.id,
1971
2045
  ...t ? { "data-overflowed": "" } : {},
1972
- ...i ? { "data-pinned": "" } : {},
2046
+ ...r ? { "data-pinned": "" } : {},
1973
2047
  hidden: t,
1974
2048
  "aria-label": n.label,
1975
2049
  "aria-disabled": n.disabled || void 0,
1976
2050
  "aria-busy": n.busy || void 0,
1977
- ...C ? { "aria-haspopup": "menu", "aria-expanded": u } : {},
1978
- ...h === null ? {} : { "aria-describedby": N },
1979
- ...k && h !== null ? { "data-reason-shown": "" } : {},
2051
+ ...C ? { "aria-haspopup": "menu", "aria-expanded": m } : {},
2052
+ ...f === null ? {} : { "aria-describedby": g },
2053
+ ...k && f !== null ? { "data-reason-shown": "" } : {},
1980
2054
  tabIndex: c ? 0 : -1,
1981
- onFocus: m,
1982
- onBlur: () => y(!1),
1983
- onKeyDown: (M) => {
1984
- M.key === "Escape" && y(!1), C && (M.key === "ArrowDown" || M.key === "ArrowUp") && (M.preventDefault(), h !== null ? y(!0) : !n.disabled && !n.busy && a(M.currentTarget, M.key === "ArrowUp" ? "last" : "first"));
2055
+ onFocus: u,
2056
+ onBlur: () => x(!1),
2057
+ onKeyDown: (w) => {
2058
+ w.key === "Escape" && x(!1), C && (w.key === "ArrowDown" || w.key === "ArrowUp") && (w.preventDefault(), f !== null ? x(!0) : !n.disabled && !n.busy && a(w.currentTarget, w.key === "ArrowUp" ? "last" : "first"));
1985
2059
  },
1986
- onClick: (M) => {
1987
- h !== null ? y(!0) : !n.disabled && !n.busy && a(M.currentTarget, null);
2060
+ onClick: (w) => {
2061
+ f !== null ? x(!0) : !n.disabled && !n.busy && a(w.currentTarget, null);
1988
2062
  },
1989
2063
  children: [
1990
- v ? /* @__PURE__ */ e(V, { name: "spinner" }) : /* @__PURE__ */ e(be, { name: n.icon }),
1991
- r ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__label", "aria-hidden": "true", children: n.label }) : null,
1992
- C ? /* @__PURE__ */ e(Ae, {}) : null,
1993
- h !== null || p !== null && !s ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__tip", role: "tooltip", id: N, children: p }) : null
2064
+ v ? /* @__PURE__ */ e(G, { name: "spinner" }) : /* @__PURE__ */ e(xe, { name: n.icon }),
2065
+ h ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__label", "aria-hidden": "true", children: n.label }) : null,
2066
+ C ? /* @__PURE__ */ e($e, {}) : null,
2067
+ f !== null || d !== null && !s ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__tip", role: "tooltip", id: g, children: d }) : null
1994
2068
  ]
1995
2069
  }
1996
2070
  );
1997
2071
  }
1998
- function Ae() {
1999
- return /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__chevron", "aria-hidden": "true", children: /* @__PURE__ */ e(D, { name: "chevron-down", size: 14 }) });
2072
+ function $e() {
2073
+ return /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__chevron", "aria-hidden": "true", children: /* @__PURE__ */ e(L, { name: "chevron-down", size: 14 }) });
2000
2074
  }
2001
- function be({ name: n }) {
2002
- const l = me(n);
2003
- return l === null ? null : /* @__PURE__ */ e(D, { name: l, size: 18 });
2075
+ function xe({ name: n }) {
2076
+ const l = we(n);
2077
+ return l === null ? null : /* @__PURE__ */ e(L, { name: l, size: 18 });
2004
2078
  }
2005
- function Nl({ title: n, body: l = null, time: t = null, unread: i, unreadLabel: c, expandLabel: s, collapseLabel: u, action: a = null, onRead: m, leading: v }) {
2006
- const [d, f] = A(!1), r = Q(), h = () => {
2007
- i && m();
2008
- }, p = (a == null ? void 0 : a.presentation) === "row" && a.onAction !== void 0, N = (a == null ? void 0 : a.presentation) === "button" && a.onAction !== void 0 ? a : null, k = () => {
2009
- var y;
2010
- h(), p && ((y = a.onAction) == null || y.call(a));
2079
+ function Pl({ title: n, body: l = null, time: t = null, unread: r, unreadLabel: c, expandLabel: s, collapseLabel: m, action: a = null, onRead: u, leading: v }) {
2080
+ const [o, p] = T(!1), h = se(), f = () => {
2081
+ r && u();
2082
+ }, d = (a == null ? void 0 : a.presentation) === "row" && a.onAction !== void 0, g = (a == null ? void 0 : a.presentation) === "button" && a.onAction !== void 0 ? a : null, k = () => {
2083
+ var x;
2084
+ f(), d && ((x = a.onAction) == null || x.call(a));
2011
2085
  };
2012
- return /* @__PURE__ */ o("article", { className: L("cms-notification", i && "is-unread", d && "is-expanded", p && "is-row-action"), "data-state": i ? "unread" : "read", children: [
2013
- /* @__PURE__ */ o(
2086
+ return /* @__PURE__ */ i("article", { className: F("cms-notification", r && "is-unread", o && "is-expanded", d && "is-row-action"), "data-state": r ? "unread" : "read", children: [
2087
+ /* @__PURE__ */ i(
2014
2088
  "div",
2015
2089
  {
2016
2090
  className: "cms-notification__row",
2017
2091
  role: "button",
2018
2092
  tabIndex: 0,
2019
- "aria-describedby": l === null ? void 0 : r,
2093
+ "aria-describedby": l === null ? void 0 : h,
2020
2094
  onClick: k,
2021
- onKeyDown: (y) => {
2022
- y.target !== y.currentTarget || y.key !== "Enter" && y.key !== " " || (y.preventDefault(), k());
2095
+ onKeyDown: (x) => {
2096
+ x.target !== x.currentTarget || x.key !== "Enter" && x.key !== " " || (x.preventDefault(), k());
2023
2097
  },
2024
2098
  children: [
2025
2099
  v != null ? /* @__PURE__ */ e("span", { className: "cms-notification__leading", children: v }) : null,
2026
- /* @__PURE__ */ o("span", { className: "cms-notification__text", children: [
2027
- /* @__PURE__ */ o("span", { className: "cms-notification__head", children: [
2028
- /* @__PURE__ */ o("span", { className: "cms-notification__title", children: [
2029
- i ? /* @__PURE__ */ o("span", { className: "cms-visually-hidden", children: [
2100
+ /* @__PURE__ */ i("span", { className: "cms-notification__text", children: [
2101
+ /* @__PURE__ */ i("span", { className: "cms-notification__head", children: [
2102
+ /* @__PURE__ */ i("span", { className: "cms-notification__title", children: [
2103
+ r ? /* @__PURE__ */ i("span", { className: "cms-visually-hidden", children: [
2030
2104
  c,
2031
2105
  " "
2032
2106
  ] }) : null,
@@ -2034,9 +2108,9 @@ function Nl({ title: n, body: l = null, time: t = null, unread: i, unreadLabel:
2034
2108
  ] }),
2035
2109
  t !== null ? /* @__PURE__ */ e("span", { className: "cms-notification__time", children: t }) : null
2036
2110
  ] }),
2037
- l !== null && l !== "" ? /* @__PURE__ */ e("span", { className: "cms-notification__body", id: r, children: l }) : null
2111
+ l !== null && l !== "" ? /* @__PURE__ */ e("span", { className: "cms-notification__body", id: h, children: l }) : null
2038
2112
  ] }),
2039
- i ? /* @__PURE__ */ e("span", { className: "cms-notification__dot", "aria-hidden": "true" }) : null
2113
+ r ? /* @__PURE__ */ e("span", { className: "cms-notification__dot", "aria-hidden": "true" }) : null
2040
2114
  ]
2041
2115
  }
2042
2116
  ),
@@ -2045,35 +2119,35 @@ function Nl({ title: n, body: l = null, time: t = null, unread: i, unreadLabel:
2045
2119
  {
2046
2120
  type: "button",
2047
2121
  className: "cms-notification__chevron",
2048
- "aria-expanded": d,
2049
- "aria-controls": r,
2050
- "aria-label": d ? u : s,
2051
- title: d ? u : s,
2122
+ "aria-expanded": o,
2123
+ "aria-controls": h,
2124
+ "aria-label": o ? m : s,
2125
+ title: o ? m : s,
2052
2126
  onClick: () => {
2053
- d || h(), f((y) => !y);
2127
+ o || f(), p((x) => !x);
2054
2128
  },
2055
- children: /* @__PURE__ */ e(D, { name: "chevron-down", size: 18 })
2129
+ children: /* @__PURE__ */ e(L, { name: "chevron-down", size: 18 })
2056
2130
  }
2057
2131
  ) : null,
2058
- N !== null ? /* @__PURE__ */ e(
2132
+ g !== null ? /* @__PURE__ */ e(
2059
2133
  "button",
2060
2134
  {
2061
2135
  type: "button",
2062
2136
  className: "cms-button cms-notification__action",
2063
2137
  onClick: () => {
2064
- var y;
2065
- h(), (y = N.onAction) == null || y.call(N);
2138
+ var x;
2139
+ f(), (x = g.onAction) == null || x.call(g);
2066
2140
  },
2067
- children: N.label
2141
+ children: g.label
2068
2142
  }
2069
2143
  ) : null
2070
2144
  ] });
2071
2145
  }
2072
- function Fn(n) {
2146
+ function jn(n) {
2073
2147
  return n === "allowed" || n === "elevate" || n === "denied";
2074
2148
  }
2075
- function wl(n, l) {
2076
- if (!Fn(n))
2149
+ function Fl(n, l) {
2150
+ if (!jn(n))
2077
2151
  return l.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 };
2078
2152
  switch (n) {
2079
2153
  case "allowed":
@@ -2084,241 +2158,317 @@ function wl(n, l) {
2084
2158
  return l.showRefused ? { offered: !0, locked: !1, refusal: l.refusal ?? "not allowed" } : { offered: !1, locked: !1 };
2085
2159
  }
2086
2160
  }
2087
- function Bn(n, l) {
2161
+ function Gn(n, l) {
2088
2162
  if (!n) return;
2089
2163
  if (typeof n.get == "function") return n.get(l) ?? void 0;
2090
- const t = n, i = Object.keys(t).find((c) => c.toLowerCase() === l.toLowerCase());
2091
- return i === void 0 ? void 0 : t[i];
2164
+ const t = n, r = Object.keys(t).find((c) => c.toLowerCase() === l.toLowerCase());
2165
+ return r === void 0 ? void 0 : t[r];
2092
2166
  }
2093
- function Rn(n) {
2167
+ function Yn(n) {
2094
2168
  if (n && typeof n == "object") {
2095
2169
  const l = n;
2096
2170
  if (typeof l.detail == "string" && l.detail !== "") return l.detail;
2097
2171
  if (typeof l.title == "string" && l.title !== "") return l.title;
2098
2172
  }
2099
2173
  }
2100
- function yl(n, l, t, i) {
2174
+ function Bl(n, l, t, r) {
2101
2175
  if (n !== 403) return { kind: "none" };
2102
- const c = Rn(t);
2103
- return Bn(l, "X-Elevation-Required") !== void 0 ? i.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." };
2176
+ const c = Yn(t);
2177
+ return Gn(l, "X-Elevation-Required") !== void 0 ? r.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." };
2104
2178
  }
2105
- const Te = "coolms-kit:reread";
2106
- function kl() {
2107
- window.dispatchEvent(new Event(Te));
2179
+ const Ie = "coolms-kit:reread";
2180
+ function Rl() {
2181
+ window.dispatchEvent(new Event(Ie));
2108
2182
  }
2109
- function xl(n) {
2110
- const [l, t] = A(void 0), [i, c] = A(void 0), [s, u] = A(!0), a = O(n);
2183
+ function Hl(n) {
2184
+ const [l, t] = T(void 0), [r, c] = T(void 0), [s, m] = T(!0), a = H(n);
2111
2185
  a.current = n;
2112
- const m = O(0), v = _e(() => {
2113
- const d = ++m.current;
2114
- u(!0), a.current().then(
2115
- (f) => {
2116
- d === m.current && (t(f), c(void 0), u(!1));
2186
+ const u = H(0), v = be(() => {
2187
+ const o = ++u.current;
2188
+ m(!0), a.current().then(
2189
+ (p) => {
2190
+ o === u.current && (t(p), c(void 0), m(!1));
2117
2191
  },
2118
- (f) => {
2119
- d === m.current && (c(f), u(!1));
2192
+ (p) => {
2193
+ o === u.current && (c(p), m(!1));
2120
2194
  }
2121
2195
  );
2122
2196
  }, []);
2123
- return J(() => {
2197
+ return Q(() => {
2124
2198
  v();
2125
- const d = () => v();
2126
- return window.addEventListener("focus", d), window.addEventListener(Te, d), () => {
2127
- window.removeEventListener("focus", d), window.removeEventListener(Te, d);
2199
+ const o = () => v();
2200
+ return window.addEventListener("focus", o), window.addEventListener(Ie, o), () => {
2201
+ window.removeEventListener("focus", o), window.removeEventListener(Ie, o);
2128
2202
  };
2129
- }, [v]), { value: l, error: i, loading: s, reread: v };
2203
+ }, [v]), { value: l, error: r, loading: s, reread: v };
2130
2204
  }
2131
- function Ml(n) {
2205
+ function Ol(n) {
2132
2206
  return n === 412 ? { conflict: !0, message: "Someone changed this since you opened it. Nothing was saved; read it again to see the change." } : { conflict: !1 };
2133
2207
  }
2134
- const On = "/errors/client-update-required";
2135
- function Hn(n, l) {
2136
- const t = n.split(".").map((c) => Number.parseInt(c, 10) || 0), i = l.split(".").map((c) => Number.parseInt(c, 10) || 0);
2137
- for (let c = 0; c < Math.max(t.length, i.length); c++) {
2138
- const s = t[c] ?? 0, u = i[c] ?? 0;
2139
- if (s !== u) return s < u;
2208
+ const Xn = "/errors/client-update-required";
2209
+ function Jn(n, l) {
2210
+ const t = n.split(".").map((c) => Number.parseInt(c, 10) || 0), r = l.split(".").map((c) => Number.parseInt(c, 10) || 0);
2211
+ for (let c = 0; c < Math.max(t.length, r.length); c++) {
2212
+ const s = t[c] ?? 0, m = r[c] ?? 0;
2213
+ if (s !== m) return s < m;
2140
2214
  }
2141
2215
  return !1;
2142
2216
  }
2143
- function Cl(n) {
2144
- return n.problemType !== void 0 && n.problemType.endsWith(On) ? !0 : n.minimumVersion !== void 0 && Hn(n.version, n.minimumVersion);
2217
+ function Ul(n) {
2218
+ return n.problemType !== void 0 && n.problemType.endsWith(Xn) ? !0 : n.minimumVersion !== void 0 && Jn(n.version, n.minimumVersion);
2145
2219
  }
2146
- const Ue = 4, Un = 48, zn = 800, Kn = /* @__PURE__ */ new Set(["ArrowDown", "ArrowUp", "PageDown", "PageUp", "Home", "End", " "]);
2147
- function Zn(n, l) {
2148
- const [t, i] = A(!1);
2149
- return J(() => {
2220
+ const qe = 4, Qn = 48, el = 800, nl = /* @__PURE__ */ new Set(["ArrowDown", "ArrowUp", "PageDown", "PageUp", "Home", "End", " "]);
2221
+ function ll(n, l) {
2222
+ const [t, r] = T(!1);
2223
+ return Q(() => {
2150
2224
  const c = n.current;
2151
2225
  if (c === null || !l) {
2152
- i(!1);
2226
+ r(!1);
2153
2227
  return;
2154
2228
  }
2155
2229
  const s = /* @__PURE__ */ new WeakMap();
2156
- let u = Number.NEGATIVE_INFINITY, a = null;
2157
- const m = (r) => {
2158
- u = performance.now(), a = r.target;
2159
- }, v = (r) => {
2160
- const h = r.target;
2161
- !(h instanceof HTMLElement && (h.isContentEditable || h.closest("input, textarea, select") !== null)) && Kn.has(r.key) && m(r);
2162
- }, d = (r) => {
2163
- const h = r.target;
2164
- if (!(h instanceof HTMLElement)) return;
2165
- const p = h.scrollTop, N = s.get(h) ?? 0;
2166
- if (s.set(h, p), p <= 0) {
2167
- i(!1);
2230
+ let m = Number.NEGATIVE_INFINITY, a = null;
2231
+ const u = (h) => {
2232
+ m = performance.now(), a = h.target;
2233
+ }, v = (h) => {
2234
+ const f = h.target;
2235
+ !(f instanceof HTMLElement && (f.isContentEditable || f.closest("input, textarea, select") !== null)) && nl.has(h.key) && u(h);
2236
+ }, o = (h) => {
2237
+ const f = h.target;
2238
+ if (!(f instanceof HTMLElement)) return;
2239
+ const d = f.scrollTop, g = s.get(f) ?? 0;
2240
+ if (s.set(f, d), d <= 0) {
2241
+ r(!1);
2168
2242
  return;
2169
2243
  }
2170
- performance.now() - u > zn || !(a === c || a === document.body || a instanceof Node && h.contains(a)) || (p < N - Ue ? i(!1) : p > N + Ue && p > Un && i(!0));
2171
- }, f = [["wheel", m], ["touchmove", m], ["pointerdown", m], ["keydown", v]];
2172
- for (const [r, h] of f) c.addEventListener(r, h, { capture: !0, passive: !0 });
2173
- return c.addEventListener("scroll", d, { capture: !0, passive: !0 }), () => {
2174
- for (const [r, h] of f) c.removeEventListener(r, h, { capture: !0 });
2175
- c.removeEventListener("scroll", d, { capture: !0 });
2244
+ performance.now() - m > el || !(a === c || a === document.body || a instanceof Node && f.contains(a)) || (d < g - qe ? r(!1) : d > g + qe && d > Qn && r(!0));
2245
+ }, p = [["wheel", u], ["touchmove", u], ["pointerdown", u], ["keydown", v]];
2246
+ for (const [h, f] of p) c.addEventListener(h, f, { capture: !0, passive: !0 });
2247
+ return c.addEventListener("scroll", o, { capture: !0, passive: !0 }), () => {
2248
+ for (const [h, f] of p) c.removeEventListener(h, f, { capture: !0 });
2249
+ c.removeEventListener("scroll", o, { capture: !0 });
2176
2250
  };
2177
- }, [n, l]), [t, i];
2178
- }
2179
- function Sl({ title: n, back: l, navigation: t, search: i, searching: c, more: s = [], moreLabel: u = "More actions", globals: a, filters: m, primary: v, onRefresh: d, pullText: f, barHidden: r, children: h }) {
2180
- const p = v !== void 0 && "menu" in v && !v.menu.some((q) => q.offer.offered) ? void 0 : v, N = O(null), k = O(null), [y, C] = A(!1), [M, _] = A(null), [w, T] = A(null), U = _e(() => T(null), []), B = O(!1), x = s.some((q) => q.offer.offered), $ = w !== null && x && c === void 0, W = Nn(k, d === void 0 ? null : () => {
2181
- y || (C(!0), d().finally(() => C(!1)));
2182
- }), H = d === void 0 ? null : { distance: W, refreshing: y, text: f ?? null }, Y = c !== void 0 || W > 0 || y || $, [X, ee] = Zn(N, r === void 0 && !Y), te = !Y && (r ?? X);
2183
- return /* @__PURE__ */ o(
2251
+ }, [n, l]), [t, r];
2252
+ }
2253
+ const tl = 64;
2254
+ function sl({ bar: n, leading: l, gap: t, icon: r, iconGap: c, search: s, more: m, globals: a, name: u, choice: v }) {
2255
+ const o = [...s ? [r] : [], r, r, ...a], p = o.reduce((f, d) => f + d, 0) + c * (o.length - 1);
2256
+ return n - (l > 0 ? l + t : 0) - t - p + 0.01 < Math.min(tl, u) + v;
2257
+ }
2258
+ function zl({ title: n, back: l, navigation: t, search: r, searching: c, more: s = [], moreLabel: m = "More actions", globals: a, filter: u, primary: v, onRefresh: o, pullText: p, barHidden: h, children: f }) {
2259
+ const d = v !== void 0 && "menu" in v && !v.menu.some((P) => P.offer.offered) ? void 0 : v, g = H(null), k = H(null), [x, C] = T(!1), [w, b] = T(null), [y, D] = T(null), Z = be(() => D(null), []), V = H(!1), M = H(null), R = H(null), z = H(null), q = s.some((P) => P.offer.offered), U = y !== null && q && c === void 0;
2260
+ en(u);
2261
+ const j = u === void 0 ? null : Xe(u), [le, ae] = T(!1), re = H(!1), ie = H(!1), oe = H(null), J = u === void 0 ? void 0 : {
2262
+ ...u,
2263
+ onChange: (P) => {
2264
+ re.current = !0, u.onChange(P);
2265
+ }
2266
+ }, fe = j === null ? "" : ` · ${j.label}`, ee = u !== void 0 && u.options.length >= 2, [_, $] = T(!1), B = ee && q && _, ne = JSON.stringify([ee, q, B, r !== void 0, c !== void 0, l !== void 0, n, fe]), I = be(() => {
2267
+ const P = M.current, E = R.current, K = z.current;
2268
+ if (P === null || E === null || K === null || !ee) return null;
2269
+ const W = (ke) => parseFloat(ke) || 0, te = getComputedStyle(P), pe = P.getBoundingClientRect().width;
2270
+ if (pe === 0) return null;
2271
+ const Ce = (ke) => {
2272
+ var ze;
2273
+ return ((ze = P.querySelector(`.cms-screen__ruler > [data-ruler="${ke}"]`)) == null ? void 0 : ze.getBoundingClientRect().width) ?? 0;
2274
+ }, ce = P.querySelector(".cms-screen__leading"), Ne = (r !== void 0 ? 1 : 0) + (B ? 0 : 1) + 1;
2275
+ return sl({
2276
+ bar: pe - W(te.paddingLeft) - W(te.paddingRight),
2277
+ leading: ce === null || ce.childNodes.length === 0 ? 0 : W(getComputedStyle(ce).minWidth),
2278
+ gap: W(te.columnGap),
2279
+ icon: K.getBoundingClientRect().width,
2280
+ iconGap: W(getComputedStyle(E).columnGap),
2281
+ search: r !== void 0,
2282
+ more: !0,
2283
+ globals: Array.from(E.children).slice(Ne).map((ke) => ke.getBoundingClientRect().width),
2284
+ name: Ce("name"),
2285
+ choice: Ce("choice")
2286
+ });
2287
+ }, [ne]);
2288
+ ve(() => {
2289
+ const P = I() ?? _;
2290
+ P !== _ && re.current && (ie.current = !0), re.current = !1, $(P);
2291
+ }, [I]), Q(() => {
2292
+ if (M.current === null || typeof ResizeObserver > "u") return;
2293
+ const P = new ResizeObserver(() => {
2294
+ const E = I();
2295
+ E !== null && $(E);
2296
+ });
2297
+ for (const E of [M.current, R.current, ...M.current.querySelectorAll(".cms-screen__ruler > span")]) E !== null && P.observe(E);
2298
+ return () => P.disconnect();
2299
+ }, [I]);
2300
+ const X = H(B);
2301
+ ve(() => {
2302
+ var K, W, te;
2303
+ if (X.current === B) return;
2304
+ X.current = B, D(null);
2305
+ const P = document.activeElement;
2306
+ (P === document.body && oe.current !== null && !oe.current.isConnected || ie.current && (P === document.body || ((K = M.current) == null ? void 0 : K.contains(P)) === !0)) && ((te = B ? z.current : (W = R.current) == null ? void 0 : W.querySelector(".cms-filter-menu")) == null || te.focus()), ie.current = !1;
2307
+ }, [B]);
2308
+ const N = B && j !== null && u !== void 0 ? `${m}, ${Je(u)}` : m, O = Tn(k, o === void 0 ? null : () => {
2309
+ x || (C(!0), o().finally(() => C(!1)));
2310
+ }), Y = o === void 0 ? null : { distance: O, refreshing: x, text: p ?? null }, de = c !== void 0 || O > 0 || x || U || le, [Me, Ee] = ll(g, h === void 0 && !de), ue = !de && (h ?? Me);
2311
+ return /* @__PURE__ */ i(
2184
2312
  "div",
2185
2313
  {
2186
- ref: N,
2187
- className: L("cms-screen", p !== void 0 && "cms-screen--with-primary"),
2188
- "data-bar-hidden": te ? "" : void 0,
2189
- onFocus: (q) => {
2190
- te && q.target instanceof Element && q.target.closest(".cms-screen__bar, .cms-screen__filters") !== null && ee(!1);
2314
+ ref: g,
2315
+ className: F("cms-screen", d !== void 0 && "cms-screen--with-primary"),
2316
+ "data-bar-hidden": ue ? "" : void 0,
2317
+ onFocus: (P) => {
2318
+ oe.current = P.target, ue && P.target instanceof Element && P.target.closest(".cms-screen__bar") !== null && Ee(!1);
2191
2319
  },
2192
2320
  children: [
2193
- c !== void 0 ? /* @__PURE__ */ o("header", { className: "cms-screen__bar cms-screen__bar--searching", children: [
2194
- /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button cms-screen__icon", "aria-label": c.closeLabel, title: c.closeLabel, onClick: c.onClose, children: /* @__PURE__ */ e(D, { name: "chevron-left" }) }),
2321
+ c !== void 0 ? /* @__PURE__ */ i("header", { className: "cms-screen__bar cms-screen__bar--searching", children: [
2322
+ /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button cms-screen__icon", "aria-label": c.closeLabel, title: c.closeLabel, onClick: c.onClose, children: /* @__PURE__ */ e(L, { name: "chevron-left" }) }),
2195
2323
  /* @__PURE__ */ e("div", { className: "cms-screen__search", children: c.field })
2196
- ] }) : /* @__PURE__ */ o("header", { className: "cms-screen__bar", children: [
2197
- /* @__PURE__ */ e("div", { className: "cms-screen__leading", children: l !== void 0 ? l.href !== void 0 ? /* @__PURE__ */ o("a", { className: "cms-screen__back", href: l.href, onClick: l.onBack, children: [
2198
- /* @__PURE__ */ e(D, { name: "chevron-left" }),
2324
+ ] }) : /* @__PURE__ */ i("header", { ref: M, className: "cms-screen__bar", children: [
2325
+ /* @__PURE__ */ e("div", { className: "cms-screen__leading", children: l !== void 0 ? l.href !== void 0 ? /* @__PURE__ */ i("a", { className: "cms-screen__back", href: l.href, onClick: l.onBack, children: [
2326
+ /* @__PURE__ */ e(L, { name: "chevron-left" }),
2199
2327
  /* @__PURE__ */ e("span", { className: "cms-screen__back-name", children: l.label })
2200
- ] }) : /* @__PURE__ */ o("button", { type: "button", className: "cms-screen__back", onClick: l.onBack, children: [
2201
- /* @__PURE__ */ e(D, { name: "chevron-left" }),
2328
+ ] }) : /* @__PURE__ */ i("button", { type: "button", className: "cms-screen__back", onClick: l.onBack, children: [
2329
+ /* @__PURE__ */ e(L, { name: "chevron-left" }),
2202
2330
  /* @__PURE__ */ e("span", { className: "cms-screen__back-name", children: l.label })
2203
2331
  ] }) : t }),
2204
- /* @__PURE__ */ e("h1", { className: "cms-screen__title", title: n, children: n }),
2205
- /* @__PURE__ */ o("div", { className: "cms-screen__trailing", children: [
2206
- i !== void 0 ? /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button cms-screen__icon", "aria-label": i.label, title: i.label, onClick: i.onOpen, children: /* @__PURE__ */ e(D, { name: "search" }) }) : null,
2207
- x ? /* @__PURE__ */ e(
2332
+ j === null ? /* @__PURE__ */ e("h1", { className: "cms-screen__title", title: n, children: n }) : /* @__PURE__ */ i("h1", { className: "cms-screen__title cms-screen__title--filtered", title: n + fe, children: [
2333
+ /* @__PURE__ */ i("span", { className: "cms-screen__title-place", children: [
2334
+ /* @__PURE__ */ e("span", { className: "cms-screen__title-name", children: n }),
2335
+ /* @__PURE__ */ e("span", { className: "cms-screen__title-dot", children: " · " })
2336
+ ] }),
2337
+ /* @__PURE__ */ e("span", { className: "cms-screen__title-choice", children: j.label })
2338
+ ] }),
2339
+ ee && q ? /* @__PURE__ */ i("span", { className: "cms-screen__ruler", "aria-hidden": "true", children: [
2340
+ /* @__PURE__ */ e("span", { "data-ruler": "name", children: n }),
2341
+ j !== null ? /* @__PURE__ */ e("span", { "data-ruler": "choice", children: fe }) : null
2342
+ ] }) : null,
2343
+ /* @__PURE__ */ i("div", { ref: R, className: "cms-screen__trailing", children: [
2344
+ r !== void 0 ? /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button cms-screen__icon", "aria-label": r.label, title: r.label, onClick: r.onOpen, children: /* @__PURE__ */ e(L, { name: "search" }) }) : null,
2345
+ J !== void 0 && !B ? /* @__PURE__ */ e(nn, { ...J, iconOnly: !0, onOpenChange: ae }) : null,
2346
+ q ? /* @__PURE__ */ e(
2208
2347
  "button",
2209
2348
  {
2349
+ ref: z,
2210
2350
  type: "button",
2211
- className: "cms-icon-button cms-screen__icon",
2351
+ className: F("cms-icon-button cms-screen__icon", B && j !== null && "cms-screen__icon--active"),
2212
2352
  "data-action": "more",
2213
2353
  "aria-haspopup": "menu",
2214
- "aria-expanded": $,
2215
- "aria-label": u,
2216
- title: u,
2354
+ "aria-expanded": U,
2355
+ "aria-label": N,
2356
+ title: N,
2217
2357
  onMouseDown: () => {
2218
- B.current = $;
2358
+ V.current = U;
2219
2359
  },
2220
- onClick: (q) => {
2221
- const ae = q.currentTarget.getBoundingClientRect();
2222
- T(B.current ? null : { x: ae.left, y: ae.bottom + 4 }), B.current = !1;
2360
+ onClick: (P) => {
2361
+ const E = P.currentTarget.getBoundingClientRect();
2362
+ D(V.current ? null : { x: E.left, y: E.bottom + 4 }), V.current = !1;
2223
2363
  },
2224
- children: /* @__PURE__ */ e(D, { name: "more" })
2364
+ children: /* @__PURE__ */ e(L, { name: "more" })
2225
2365
  }
2226
2366
  ) : null,
2227
2367
  a
2228
2368
  ] })
2229
2369
  ] }),
2230
- m !== void 0 ? /* @__PURE__ */ e("div", { className: "cms-screen__filters", children: /* @__PURE__ */ e(An, { label: m.label, options: m.options, value: m.selected, onChange: m.onSelect }) }) : null,
2231
- /* @__PURE__ */ e("div", { ref: k, className: "cms-screen__content", "data-pulling": W > 0 ? "" : void 0, "data-refreshing": y ? "" : void 0, children: /* @__PURE__ */ e(Ze.Provider, { value: H, children: h }) }),
2232
- p !== void 0 ? /* @__PURE__ */ e(
2370
+ /* @__PURE__ */ e("div", { ref: k, className: "cms-screen__content", "data-pulling": O > 0 ? "" : void 0, "data-refreshing": x ? "" : void 0, children: /* @__PURE__ */ e(Ye.Provider, { value: Y, children: f }) }),
2371
+ d !== void 0 ? /* @__PURE__ */ e(
2233
2372
  "button",
2234
2373
  {
2235
2374
  type: "button",
2236
2375
  className: "cms-button cms-button--primary cms-screen__primary",
2237
- "aria-label": p.label,
2238
- title: p.label,
2239
- ..."menu" in p ? { "aria-haspopup": "menu", "aria-expanded": M !== null } : {},
2240
- onClick: (q) => {
2241
- if ("menu" in p) {
2242
- const ae = q.currentTarget.getBoundingClientRect();
2243
- _(M === null ? { x: ae.left, y: ae.top } : null);
2376
+ "aria-label": d.label,
2377
+ title: d.label,
2378
+ ..."menu" in d ? { "aria-haspopup": "menu", "aria-expanded": w !== null } : {},
2379
+ onClick: (P) => {
2380
+ if ("menu" in d) {
2381
+ const E = P.currentTarget.getBoundingClientRect();
2382
+ b(w === null ? { x: E.left, y: E.top } : null);
2244
2383
  } else
2245
- p.onPress();
2384
+ d.onPress();
2246
2385
  },
2247
- children: /* @__PURE__ */ e(D, { name: p.icon, size: 24 })
2386
+ children: /* @__PURE__ */ e(L, { name: d.icon, size: 24 })
2248
2387
  }
2249
2388
  ) : null,
2250
- /* @__PURE__ */ e(he, { at: $ ? w : null, items: s, onClose: U, label: u }),
2251
- p !== void 0 && "menu" in p ? /* @__PURE__ */ e(he, { at: M, items: p.menu, onClose: () => _(null), label: p.label }) : null
2389
+ /* @__PURE__ */ e(
2390
+ ge,
2391
+ {
2392
+ at: U ? y : null,
2393
+ items: B && J !== void 0 ? [...s, ...Qe(J, J.label)] : s,
2394
+ onClose: Z,
2395
+ label: m,
2396
+ focus: "first"
2397
+ }
2398
+ ),
2399
+ d !== void 0 && "menu" in d ? /* @__PURE__ */ e(ge, { at: w, items: d.menu, onClose: () => b(null), label: d.label }) : null
2252
2400
  ]
2253
2401
  }
2254
2402
  );
2255
2403
  }
2256
2404
  export {
2257
- cl as AppShell,
2258
- ye as Avatar,
2259
- Be as BOOTSTRAP_ICONS,
2260
- En as Badge,
2261
- ce as Button,
2262
- Pe as CALL_LABELS,
2263
- On as CLIENT_UPDATE_REQUIRED,
2264
- bl as CallBar,
2265
- pl as CallPanel,
2266
- ml as ChatBubble,
2267
- hl as Composer,
2268
- Jn as ConfirmDialog,
2269
- he as ContextMenu,
2270
- ln as EmptyState,
2271
- tn as ErrorBanner,
2272
- tl as FilePicker,
2273
- pn as FilePickerDenied,
2274
- bn as FilePickerRestart,
2275
- ll as FileViewer,
2276
- An as FilterChips,
2277
- nl as ICON_NAMES,
2278
- D as Icon,
2279
- fl as IncomingCall,
2280
- al as List,
2281
- nn as Loading,
2282
- Dn as MAIL_ROW_LABELS,
2283
- en as MODAL_CLOSE_MS,
2284
- ul as MailRow,
2285
- ze as Modal,
2286
- sn as NamedIcon,
2287
- Nl as Notification,
2288
- Se as PULL_AT,
2289
- rl as PageHeader,
2290
- gl as PaneToolbar,
2291
- Ln as SIGN_IN_LABELS,
2292
- Ce as STATE_DELAY_MS,
2293
- Sl as ScreenShell,
2294
- ol as SearchField,
2295
- sl as SectionHeader,
2296
- Gn as Select,
2297
- vl as SignInForm,
2298
- _l as SignInLayout,
2299
- dl as SplitPanes,
2300
- Sn as Splitter,
2301
- ie as State,
2302
- il as TabStrip,
2303
- Yn as TextArea,
2304
- qn as TextField,
2305
- Qn as Toast,
2306
- el as ToastRegion,
2307
- Xn as Toggle,
2308
- Tn as fitPanes,
2309
- me as iconForName,
2310
- yn as initialsOf,
2311
- Fn as isCapability,
2312
- Cl as needsClientUpdate,
2313
- wl as offerFor,
2314
- Ml as readConflict,
2315
- yl as readRefusal,
2316
- Rn as refusalText,
2317
- kl as rereadAll,
2318
- kn as tintOf,
2319
- Nn as usePull,
2320
- wn as usePullState,
2321
- xl as useReread,
2322
- Hn as versionBelow,
2323
- Je as writtenOut
2405
+ yl as AppShell,
2406
+ Se as Avatar,
2407
+ Ke as BOOTSTRAP_ICONS,
2408
+ Rn as Badge,
2409
+ he as Button,
2410
+ He as CALL_LABELS,
2411
+ Xn as CLIENT_UPDATE_REQUIRED,
2412
+ Tl as CallBar,
2413
+ Al as CallPanel,
2414
+ Cl as ChatBubble,
2415
+ Sl as Composer,
2416
+ ml as ConfirmDialog,
2417
+ ge as ContextMenu,
2418
+ hn as EmptyState,
2419
+ fn as ErrorBanner,
2420
+ zn as FILTER_MENU_LABELS,
2421
+ bl as FilePicker,
2422
+ Mn as FilePickerDenied,
2423
+ Cn as FilePickerRestart,
2424
+ _l as FileViewer,
2425
+ Vn as FilterMenu,
2426
+ pl as ICON_NAMES,
2427
+ L as Icon,
2428
+ El as IncomingCall,
2429
+ vl as List,
2430
+ $l as ListHead,
2431
+ mn as Loading,
2432
+ On as MAIL_ROW_LABELS,
2433
+ un as MODAL_CLOSE_MS,
2434
+ Ml as MailRow,
2435
+ je as Modal,
2436
+ _n as NamedIcon,
2437
+ Pl as Notification,
2438
+ De as PULL_AT,
2439
+ Nl as PageHeader,
2440
+ Il as PaneToolbar,
2441
+ Un as SIGN_IN_LABELS,
2442
+ Te as STATE_DELAY_MS,
2443
+ zl as ScreenShell,
2444
+ kl as SearchField,
2445
+ gl as SectionHeader,
2446
+ dl as Select,
2447
+ Ll as SignInForm,
2448
+ Dl as SignInLayout,
2449
+ xl as SplitPanes,
2450
+ Bn as Splitter,
2451
+ me as State,
2452
+ wl as TabStrip,
2453
+ ol as TextArea,
2454
+ il as TextField,
2455
+ hl as Toast,
2456
+ fl as ToastRegion,
2457
+ ul as Toggle,
2458
+ Hn as fitPanes,
2459
+ we as iconForName,
2460
+ Ln as initialsOf,
2461
+ jn as isCapability,
2462
+ Ul as needsClientUpdate,
2463
+ Fl as offerFor,
2464
+ Ol as readConflict,
2465
+ Bl as readRefusal,
2466
+ Yn as refusalText,
2467
+ Rl as rereadAll,
2468
+ $n as tintOf,
2469
+ Tn as usePull,
2470
+ Dn as usePullState,
2471
+ Hl as useReread,
2472
+ Jn as versionBelow,
2473
+ on as writtenOut
2324
2474
  };