@coolms/ui-react 0.1.0-alpha.45 → 0.1.0-alpha.47

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,5 +1,5 @@
1
- import { jsx as n, jsxs as f, Fragment as ge } from "react/jsx-runtime";
2
- import { createElement as $n, useId as he, useState as D, useRef as O, useEffect as Q, useCallback as Ie, useMemo as Bn, useContext as Fn, createContext as Rn, useLayoutEffect as $e, Fragment as Hn } from "react";
1
+ import { jsx as n, jsxs as h, Fragment as ge } from "react/jsx-runtime";
2
+ import { createElement as $n, useId as he, useState as I, useRef as z, useEffect as Q, useCallback as Ie, useMemo as Bn, useContext as Fn, createContext as Rn, useLayoutEffect as $e, Fragment as Hn } from "react";
3
3
  import { createPortal as an } from "react-dom";
4
4
  function qe(e, t) {
5
5
  const l = { ...e };
@@ -9,7 +9,7 @@ function qe(e, t) {
9
9
  }
10
10
  return l;
11
11
  }
12
- function F(...e) {
12
+ function H(...e) {
13
13
  return e.filter(Boolean).join(" ");
14
14
  }
15
15
  function se({ name: e }) {
@@ -46,19 +46,19 @@ function De({
46
46
  ...g
47
47
  }) {
48
48
  const u = !!m || t;
49
- return /* @__PURE__ */ f(
49
+ return /* @__PURE__ */ h(
50
50
  "button",
51
51
  {
52
52
  ...g,
53
53
  type: b,
54
- className: F("cms-button", `cms-button--${e}`, t && "is-busy", s && "is-locked", c),
54
+ className: H("cms-button", `cms-button--${e}`, t && "is-busy", s && "is-locked", c),
55
55
  disabled: u,
56
56
  "aria-busy": t || void 0,
57
57
  title: s ? a ?? i : i,
58
58
  children: [
59
59
  t ? /* @__PURE__ */ n(se, { name: "spinner" }) : s ? /* @__PURE__ */ n(se, { name: "lock" }) : r,
60
60
  /* @__PURE__ */ n("span", { className: "cms-button__label", children: t && l !== void 0 ? l : d }),
61
- s && a ? /* @__PURE__ */ f("span", { className: "cms-visually-hidden", children: [
61
+ s && a ? /* @__PURE__ */ h("span", { className: "cms-visually-hidden", children: [
62
62
  ", ",
63
63
  a
64
64
  ] }) : null
@@ -108,10 +108,10 @@ function Cn({ name: e, size: t = 18 }) {
108
108
  return l !== null ? /* @__PURE__ */ n($, { name: l, size: t }) : (!gn.has(e) && Un() && (gn.add(e), console.warn(`@coolms/ui-react: no icon for the server's icon name "${e}"; its space is kept empty`)), /* @__PURE__ */ n("span", { className: "cms-icon cms-icon--blank", style: { width: t, height: t }, "aria-hidden": "true", "data-icon-name": e }));
109
109
  }
110
110
  function on({ id: e, label: t, help: l, error: s, pinned: a, children: r }) {
111
- return /* @__PURE__ */ f("div", { className: F("cms-field", s != null && "is-invalid"), children: [
111
+ return /* @__PURE__ */ h("div", { className: H("cms-field", s != null && "is-invalid"), children: [
112
112
  /* @__PURE__ */ n("label", { className: "cms-field__label", htmlFor: e, children: t }),
113
113
  r,
114
- a != null ? /* @__PURE__ */ f("p", { className: "cms-field__pinned", id: `${e}-pinned`, children: [
114
+ a != null ? /* @__PURE__ */ h("p", { className: "cms-field__pinned", id: `${e}-pinned`, children: [
115
115
  /* @__PURE__ */ n(se, { name: "lock" }),
116
116
  " ",
117
117
  a
@@ -153,57 +153,57 @@ function Zn(e, t, l) {
153
153
  return t;
154
154
  }
155
155
  const Vn = /* @__PURE__ */ new Set(["date", "time", "datetime-local"]);
156
- function Gt({ label: e, help: t, error: l, disabled: s, readOnly: a, pinned: r, value: m, onChange: c, placeholder: d, type: b = "text", name: i, locale: g, min: u, max: N, step: h, minLength: _, maxLength: k, required: x, autoComplete: C, reveal: A }) {
157
- const v = he(), [y, I] = D(!1), U = a === !0 || r != null, P = U && Vn.has(b), M = b === "number" && (h === "any" || typeof h == "number" && !Number.isInteger(h)), B = b === "password" && A !== void 0 && !U, z = /* @__PURE__ */ n(
156
+ function Gt({ label: e, help: t, error: l, disabled: s, readOnly: a, pinned: r, value: m, onChange: c, placeholder: d, type: b = "text", name: i, locale: g, min: u, max: k, step: f, minLength: x, maxLength: L, required: S, autoComplete: _, reveal: N }) {
157
+ const v = he(), [w, T] = I(!1), B = a === !0 || r != null, F = B && Vn.has(b), M = b === "number" && (f === "any" || typeof f == "number" && !Number.isInteger(f)), R = b === "password" && N !== void 0 && !B, U = /* @__PURE__ */ n(
158
158
  "input",
159
159
  {
160
160
  id: v,
161
161
  name: i,
162
- type: P || B && y ? "text" : b,
163
- autoComplete: C,
162
+ type: F || R && w ? "text" : b,
163
+ autoComplete: _,
164
164
  className: "cms-input",
165
- value: P ? Zn(b, m, g) : m,
166
- ...P ? { "data-value": m } : {},
165
+ value: F ? Zn(b, m, g) : m,
166
+ ...F ? { "data-value": m } : {},
167
167
  lang: g,
168
168
  placeholder: d,
169
169
  disabled: s,
170
- readOnly: U,
171
- required: x,
172
- "aria-required": x || void 0,
173
- min: P ? void 0 : u,
174
- max: P ? void 0 : N,
175
- step: P ? void 0 : h,
176
- minLength: _,
177
- maxLength: k,
170
+ readOnly: B,
171
+ required: S,
172
+ "aria-required": S || void 0,
173
+ min: F ? void 0 : u,
174
+ max: F ? void 0 : k,
175
+ step: F ? void 0 : f,
176
+ minLength: x,
177
+ maxLength: L,
178
178
  inputMode: b === "number" ? M ? "decimal" : "numeric" : void 0,
179
179
  "aria-invalid": l != null || void 0,
180
180
  "aria-describedby": cn(v, { help: t, error: l, pinned: r }),
181
181
  onChange: (j) => c == null ? void 0 : c(j.target.value)
182
182
  }
183
183
  );
184
- return /* @__PURE__ */ n(on, { id: v, label: e, help: t, error: l, pinned: r, children: B ? /* @__PURE__ */ f("span", { className: "cms-input-reveal", children: [
185
- z,
184
+ return /* @__PURE__ */ n(on, { id: v, label: e, help: t, error: l, pinned: r, children: R ? /* @__PURE__ */ h("span", { className: "cms-input-reveal", children: [
185
+ U,
186
186
  /* @__PURE__ */ n(
187
187
  "button",
188
188
  {
189
189
  type: "button",
190
190
  className: "cms-input-reveal__button",
191
191
  "aria-controls": v,
192
- "aria-label": y ? A.hide : A.show,
193
- title: y ? A.hide : A.show,
192
+ "aria-label": w ? N.hide : N.show,
193
+ title: w ? N.hide : N.show,
194
194
  disabled: s,
195
- onClick: () => I((j) => !j),
196
- children: /* @__PURE__ */ n($, { name: y ? "eye-off" : "eye", size: 18 })
195
+ onClick: () => T((j) => !j),
196
+ children: /* @__PURE__ */ n($, { name: w ? "eye-off" : "eye", size: 18 })
197
197
  }
198
198
  )
199
- ] }) : z });
199
+ ] }) : U });
200
200
  }
201
- function jt({ label: e, help: t, error: l, disabled: s, readOnly: a, pinned: r, value: m, onChange: c, placeholder: d, rows: b = 4, name: i, locale: g, minLength: u, maxLength: N, required: h }) {
202
- const _ = he();
203
- return /* @__PURE__ */ n(on, { id: _, label: e, help: t, error: l, pinned: r, children: /* @__PURE__ */ n(
201
+ function jt({ label: e, help: t, error: l, disabled: s, readOnly: a, pinned: r, value: m, onChange: c, placeholder: d, rows: b = 4, name: i, locale: g, minLength: u, maxLength: k, required: f }) {
202
+ const x = he();
203
+ return /* @__PURE__ */ n(on, { id: x, label: e, help: t, error: l, pinned: r, children: /* @__PURE__ */ n(
204
204
  "textarea",
205
205
  {
206
- id: _,
206
+ id: x,
207
207
  name: i,
208
208
  className: "cms-input cms-textarea",
209
209
  rows: b,
@@ -212,13 +212,13 @@ function jt({ label: e, help: t, error: l, disabled: s, readOnly: a, pinned: r,
212
212
  placeholder: d,
213
213
  disabled: s,
214
214
  readOnly: a === !0 || r != null,
215
- required: h,
216
- "aria-required": h || void 0,
215
+ required: f,
216
+ "aria-required": f || void 0,
217
217
  minLength: u,
218
- maxLength: N,
218
+ maxLength: k,
219
219
  "aria-invalid": l != null || void 0,
220
- "aria-describedby": cn(_, { help: t, error: l, pinned: r }),
221
- onChange: (k) => c == null ? void 0 : c(k.target.value)
220
+ "aria-describedby": cn(x, { help: t, error: l, pinned: r }),
221
+ onChange: (L) => c == null ? void 0 : c(L.target.value)
222
222
  }
223
223
  ) });
224
224
  }
@@ -244,14 +244,14 @@ function Yt({ label: e, help: t, error: l, disabled: s, readOnly: a, value: r, o
244
244
  }
245
245
  function Xt({ label: e, checked: t, onChange: l, disabled: s, readOnly: a, help: r }) {
246
246
  const m = he();
247
- return /* @__PURE__ */ f("div", { className: "cms-toggle-row", children: [
247
+ return /* @__PURE__ */ h("div", { className: "cms-toggle-row", children: [
248
248
  /* @__PURE__ */ n(
249
249
  "button",
250
250
  {
251
251
  id: m,
252
252
  type: "button",
253
253
  role: "switch",
254
- className: F("cms-toggle", t && "is-on"),
254
+ className: H("cms-toggle", t && "is-on"),
255
255
  "aria-checked": t,
256
256
  "aria-readonly": a || void 0,
257
257
  "aria-describedby": r != null ? `${m}-help` : void 0,
@@ -268,56 +268,56 @@ function Xt({ label: e, checked: t, onChange: l, disabled: s, readOnly: a, help:
268
268
  }
269
269
  const qn = 150;
270
270
  function Sn({ open: e, title: t, onClose: l, dirty: s = !1, onDirtyClose: a, children: r, footer: m, closeLabel: c = "Close", initialFocus: d, className: b }) {
271
- const [i, g] = D(e), [u, N] = D(!1), h = O(null), _ = O(null), k = he();
271
+ const [i, g] = I(e), [u, k] = I(!1), f = z(null), x = z(null), L = he();
272
272
  if (Q(() => {
273
273
  if (e) {
274
- _.current = document.activeElement, g(!0), N(!1);
274
+ x.current = document.activeElement, g(!0), k(!1);
275
275
  return;
276
276
  }
277
277
  if (!i) return;
278
- N(!0);
279
- const C = window.setTimeout(() => {
280
- var A, v;
281
- g(!1), N(!1), (v = (A = _.current) == null ? void 0 : A.focus) == null || v.call(A);
278
+ k(!0);
279
+ const _ = window.setTimeout(() => {
280
+ var N, v;
281
+ g(!1), k(!1), (v = (N = x.current) == null ? void 0 : N.focus) == null || v.call(N);
282
282
  }, qn);
283
- return () => window.clearTimeout(C);
283
+ return () => window.clearTimeout(_);
284
284
  }, [e, i]), Q(() => {
285
- var C, A;
285
+ var _, N;
286
286
  if (e && i) {
287
287
  const v = 'input, select, textarea, button, [href], [tabindex]:not([tabindex="-1"])';
288
- (A = (d == null ? void 0 : d.current) ?? ((C = h.current) == null ? void 0 : C.querySelector(`.cms-modal__body :is(${v}), .cms-modal__foot :is(${v})`)) ?? h.current) == null || A.focus();
288
+ (N = (d == null ? void 0 : d.current) ?? ((_ = f.current) == null ? void 0 : _.querySelector(`.cms-modal__body :is(${v}), .cms-modal__foot :is(${v})`)) ?? f.current) == null || N.focus();
289
289
  }
290
290
  }, [e, i, d]), !i) return null;
291
- const x = () => {
291
+ const S = () => {
292
292
  s ? a == null || a() : l();
293
293
  };
294
294
  return an(
295
- /* @__PURE__ */ n("div", { className: F("cms-modal-scrim", u && "is-closing"), onMouseDown: (C) => {
296
- C.target === C.currentTarget && x();
297
- }, children: /* @__PURE__ */ f(
295
+ /* @__PURE__ */ n("div", { className: H("cms-modal-scrim", u && "is-closing"), onMouseDown: (_) => {
296
+ _.target === _.currentTarget && S();
297
+ }, children: /* @__PURE__ */ h(
298
298
  "div",
299
299
  {
300
- ref: h,
301
- className: F("cms-modal", b, u && "is-closing", s && "is-dirty"),
300
+ ref: f,
301
+ className: H("cms-modal", b, u && "is-closing", s && "is-dirty"),
302
302
  role: "dialog",
303
303
  "aria-modal": "true",
304
- "aria-labelledby": k,
304
+ "aria-labelledby": L,
305
305
  tabIndex: -1,
306
- onKeyDown: (C) => {
307
- var A;
308
- if (C.key === "Escape")
309
- C.stopPropagation(), x();
310
- else if (C.key === "Tab") {
311
- const v = (A = h.current) == null ? void 0 : A.querySelectorAll('input, select, textarea, button:not([disabled]), [href], [tabindex]:not([tabindex="-1"])');
306
+ onKeyDown: (_) => {
307
+ var N;
308
+ if (_.key === "Escape")
309
+ _.stopPropagation(), S();
310
+ else if (_.key === "Tab") {
311
+ const v = (N = f.current) == null ? void 0 : N.querySelectorAll('input, select, textarea, button:not([disabled]), [href], [tabindex]:not([tabindex="-1"])');
312
312
  if (!v || v.length === 0) return;
313
- const y = v[0], I = v[v.length - 1];
314
- C.shiftKey && document.activeElement === y ? (C.preventDefault(), I.focus()) : !C.shiftKey && document.activeElement === I && (C.preventDefault(), y.focus());
313
+ const w = v[0], T = v[v.length - 1];
314
+ _.shiftKey && document.activeElement === w ? (_.preventDefault(), T.focus()) : !_.shiftKey && document.activeElement === T && (_.preventDefault(), w.focus());
315
315
  }
316
316
  },
317
317
  children: [
318
- /* @__PURE__ */ f("header", { className: "cms-modal__head", children: [
319
- /* @__PURE__ */ n("h2", { className: "cms-modal__title", id: k, children: t }),
320
- /* @__PURE__ */ n("button", { type: "button", className: "cms-icon-button", "aria-label": c, onClick: x, children: /* @__PURE__ */ n(se, { name: "close" }) })
318
+ /* @__PURE__ */ h("header", { className: "cms-modal__head", children: [
319
+ /* @__PURE__ */ n("h2", { className: "cms-modal__title", id: L, children: t }),
320
+ /* @__PURE__ */ n("button", { type: "button", className: "cms-icon-button", "aria-label": c, onClick: S, children: /* @__PURE__ */ n(se, { name: "close" }) })
321
321
  ] }),
322
322
  /* @__PURE__ */ n("div", { className: "cms-modal__body", children: r }),
323
323
  m != null ? /* @__PURE__ */ n("footer", { className: "cms-modal__foot", children: m }) : null
@@ -336,11 +336,11 @@ function Jt({ open: e, title: t, message: l, kind: s = "default", confirmLabel:
336
336
  title: t,
337
337
  onClose: d,
338
338
  ...m === void 0 ? {} : { closeLabel: m },
339
- footer: /* @__PURE__ */ f(ge, { children: [
339
+ footer: /* @__PURE__ */ h(ge, { children: [
340
340
  /* @__PURE__ */ n(De, { onClick: d, children: r ?? (b ? "Keep editing" : "Cancel") }),
341
341
  /* @__PURE__ */ n(De, { variant: s === "default" ? "primary" : "danger", onClick: c, children: a ?? (b ? "Discard changes" : "Confirm") })
342
342
  ] }),
343
- children: s !== "default" ? /* @__PURE__ */ f("p", { className: "cms-confirm__warning", children: [
343
+ children: s !== "default" ? /* @__PURE__ */ h("p", { className: "cms-confirm__warning", children: [
344
344
  /* @__PURE__ */ n(se, { name: "warning" }),
345
345
  " ",
346
346
  l
@@ -349,7 +349,7 @@ function Jt({ open: e, title: t, message: l, kind: s = "default", confirmLabel:
349
349
  );
350
350
  }
351
351
  function Qt({ kind: e, message: t, action: l, onDismiss: s, dismissLabel: a = "Dismiss" }) {
352
- return /* @__PURE__ */ f("div", { className: F("cms-toast", `cms-toast--${e}`), role: e === "error" ? "alert" : "status", children: [
352
+ return /* @__PURE__ */ h("div", { className: H("cms-toast", `cms-toast--${e}`), role: e === "error" ? "alert" : "status", children: [
353
353
  /* @__PURE__ */ n(se, { name: e === "success" ? "check" : e === "error" ? "warning" : "info" }),
354
354
  /* @__PURE__ */ n("span", { className: "cms-toast__message", children: t }),
355
355
  l ? /* @__PURE__ */ n(De, { className: "cms-toast__action", onClick: l.onAction, children: l.label }) : null,
@@ -360,15 +360,15 @@ function el({ children: e }) {
360
360
  return /* @__PURE__ */ n("div", { className: "cms-toast-region", children: e });
361
361
  }
362
362
  function Gn({ what: e, layout: t = "inline" }) {
363
- return /* @__PURE__ */ f("div", { className: F("cms-loading", `cms-loading--${t}`), role: "status", "aria-live": "polite", children: [
363
+ return /* @__PURE__ */ h("div", { className: H("cms-loading", `cms-loading--${t}`), role: "status", "aria-live": "polite", children: [
364
364
  /* @__PURE__ */ n(se, { name: "spinner" }),
365
365
  /* @__PURE__ */ n("span", { children: e })
366
366
  ] });
367
367
  }
368
368
  function jn({ title: e, hint: t, action: l, icon: s }) {
369
- return /* @__PURE__ */ f("div", { className: "cms-state cms-state--empty cms-state--page", role: "status", "aria-live": "polite", "data-kind": "empty", children: [
369
+ return /* @__PURE__ */ h("div", { className: "cms-state cms-state--empty cms-state--page", role: "status", "aria-live": "polite", "data-kind": "empty", children: [
370
370
  s !== void 0 && Be(s) !== null ? /* @__PURE__ */ n("span", { className: "cms-state__icon", "aria-hidden": "true", children: /* @__PURE__ */ n(Cn, { name: s, size: 32 }) }) : null,
371
- /* @__PURE__ */ f("span", { className: "cms-state__text", children: [
371
+ /* @__PURE__ */ h("span", { className: "cms-state__text", children: [
372
372
  /* @__PURE__ */ n("span", { className: "cms-state__title", children: e }),
373
373
  t != null ? /* @__PURE__ */ n("span", { className: "cms-state__description", children: t }) : null
374
374
  ] }),
@@ -376,7 +376,7 @@ function jn({ title: e, hint: t, action: l, icon: s }) {
376
376
  ] });
377
377
  }
378
378
  function Yn({ message: e, onRetry: t, retryLabel: l = "Try again" }) {
379
- return /* @__PURE__ */ f("div", { className: "cms-error-banner", role: "alert", children: [
379
+ return /* @__PURE__ */ h("div", { className: "cms-error-banner", role: "alert", children: [
380
380
  /* @__PURE__ */ n(se, { name: "warning" }),
381
381
  /* @__PURE__ */ n("span", { className: "cms-error-banner__message", children: e }),
382
382
  t ? /* @__PURE__ */ n(De, { onClick: t, children: l }) : null
@@ -389,13 +389,13 @@ function Xn() {
389
389
  return Number.isFinite(t) && t >= 0 ? t : en;
390
390
  }
391
391
  function Jn() {
392
- return /* @__PURE__ */ f("svg", { className: "cms-state__spinner", viewBox: "0 0 24 24", "aria-hidden": "true", focusable: "false", children: [
392
+ return /* @__PURE__ */ h("svg", { className: "cms-state__spinner", viewBox: "0 0 24 24", "aria-hidden": "true", focusable: "false", children: [
393
393
  /* @__PURE__ */ n("circle", { className: "cms-state__track", cx: "12", cy: "12", r: "10", fill: "none" }),
394
394
  /* @__PURE__ */ n("circle", { className: "cms-state__arc", cx: "12", cy: "12", r: "10", fill: "none", pathLength: "100", strokeDasharray: "28 72" })
395
395
  ] });
396
396
  }
397
397
  function Le({ kind: e, title: t, description: l, action: s, placement: a = "page", icon: r }) {
398
- const [m, c] = D(e !== "loading");
398
+ const [m, c] = I(e !== "loading");
399
399
  Q(() => {
400
400
  if (e !== "loading") {
401
401
  c(!0);
@@ -406,10 +406,10 @@ function Le({ kind: e, title: t, description: l, action: s, placement: a = "page
406
406
  return () => window.clearTimeout(b);
407
407
  }, [e]);
408
408
  const d = a === "block";
409
- return /* @__PURE__ */ f(
409
+ return /* @__PURE__ */ h(
410
410
  "div",
411
411
  {
412
- className: F("cms-state", `cms-state--${e}`, `cms-state--${a}`, !m && "is-waiting"),
412
+ className: H("cms-state", `cms-state--${e}`, `cms-state--${a}`, !m && "is-waiting"),
413
413
  role: "status",
414
414
  "aria-live": "polite",
415
415
  "data-kind": e,
@@ -417,7 +417,7 @@ function Le({ kind: e, title: t, description: l, action: s, placement: a = "page
417
417
  e === "loading" ? /* @__PURE__ */ n(Jn, {}) : null,
418
418
  (e === "error" || e === "denied") && !d ? /* @__PURE__ */ n(se, { name: e === "error" ? "warning" : "lock" }) : null,
419
419
  e === "empty" && !d && r !== void 0 && Be(r) !== null ? /* @__PURE__ */ n("span", { className: "cms-state__icon", "aria-hidden": "true", children: /* @__PURE__ */ n(Cn, { name: r, size: a === "page" ? 32 : 24 }) }) : null,
420
- /* @__PURE__ */ f("span", { className: "cms-state__text", children: [
420
+ /* @__PURE__ */ h("span", { className: "cms-state__text", children: [
421
421
  /* @__PURE__ */ n("span", { className: "cms-state__title", children: t }),
422
422
  l !== void 0 && !d ? /* @__PURE__ */ n("span", { className: "cms-state__description", children: l }) : null
423
423
  ] }),
@@ -437,72 +437,72 @@ function lt(e) {
437
437
  return e.getClientRects().length > 0;
438
438
  }
439
439
  function nl(e) {
440
- const { name: t, badge: l, closeLabel: s, onClose: a, actions: r = [], moreLabel: m = "More", edit: c, editing: d, state: b, siblings: i, bar: g, thumbnails: u, strip: N, onZoom: h, children: _ } = e, k = O(null), x = O(null), C = he(), [A, v] = D(!1), y = O(null);
440
+ const { name: t, badge: l, closeLabel: s, onClose: a, actions: r = [], moreLabel: m = "More", edit: c, editing: d, state: b, siblings: i, bar: g, thumbnails: u, strip: k, onZoom: f, children: x } = e, L = z(null), S = z(null), _ = he(), [N, v] = I(!1), w = z(null);
441
441
  Q(() => {
442
- var z;
443
- const M = document.activeElement, B = document.body.style.overflow;
444
- return document.body.style.overflow = "hidden", (z = x.current) == null || z.focus(), () => {
442
+ var U;
443
+ const M = document.activeElement, R = document.body.style.overflow;
444
+ return document.body.style.overflow = "hidden", (U = S.current) == null || U.focus(), () => {
445
445
  var j;
446
- document.body.style.overflow = B, (j = M == null ? void 0 : M.focus) == null || j.call(M);
446
+ document.body.style.overflow = R, (j = M == null ? void 0 : M.focus) == null || j.call(M);
447
447
  };
448
448
  }, []);
449
- const I = () => {
449
+ const T = () => {
450
450
  d != null && d.dirty ? d.onDirtyClose() : a();
451
- }, U = (M) => {
452
- const B = M.touches.length === 1 ? M.touches[0] : void 0;
453
- y.current = B === void 0 || d !== void 0 || tt(M.target) ? null : { x: B.clientX, y: B.clientY };
454
- }, P = (M) => {
451
+ }, B = (M) => {
452
+ const R = M.touches.length === 1 ? M.touches[0] : void 0;
453
+ w.current = R === void 0 || d !== void 0 || tt(M.target) ? null : { x: R.clientX, y: R.clientY };
454
+ }, F = (M) => {
455
455
  var K, G;
456
- const B = y.current, z = M.changedTouches[0];
457
- if (y.current = null, B === null || z === void 0) return;
458
- const j = z.clientX - B.x;
459
- Math.abs(j) < et || Math.abs(j) < Math.abs(z.clientY - B.y) || (j > 0 ? (K = i == null ? void 0 : i.onPrevious) == null || K.call(i) : (G = i == null ? void 0 : i.onNext) == null || G.call(i));
456
+ const R = w.current, U = M.changedTouches[0];
457
+ if (w.current = null, R === null || U === void 0) return;
458
+ const j = U.clientX - R.x;
459
+ Math.abs(j) < et || Math.abs(j) < Math.abs(U.clientY - R.y) || (j > 0 ? (K = i == null ? void 0 : i.onPrevious) == null || K.call(i) : (G = i == null ? void 0 : i.onNext) == null || G.call(i));
460
460
  };
461
461
  return an(
462
- /* @__PURE__ */ f(
462
+ /* @__PURE__ */ h(
463
463
  "div",
464
464
  {
465
- ref: k,
466
- className: F("cms-viewer", d !== void 0 && "is-editing"),
465
+ ref: L,
466
+ className: H("cms-viewer", d !== void 0 && "is-editing"),
467
467
  role: "dialog",
468
468
  "aria-modal": "true",
469
- "aria-labelledby": C,
469
+ "aria-labelledby": _,
470
470
  tabIndex: -1,
471
471
  onKeyDown: (M) => {
472
- var B, z, j;
472
+ var R, U, j;
473
473
  if (M.key === "Escape") {
474
474
  if (d !== void 0) return;
475
- M.stopPropagation(), A ? v(!1) : a();
475
+ M.stopPropagation(), N ? v(!1) : a();
476
476
  } else if (M.key === "Tab") {
477
- const K = Array.from(((B = k.current) == null ? void 0 : B.querySelectorAll(Qn)) ?? []).filter(lt);
477
+ const K = Array.from(((R = L.current) == null ? void 0 : R.querySelectorAll(Qn)) ?? []).filter(lt);
478
478
  if (K.length === 0) return;
479
479
  const G = K[0], Y = K[K.length - 1];
480
480
  M.shiftKey && document.activeElement === G ? (M.preventDefault(), Y.focus()) : !M.shiftKey && document.activeElement === Y && (M.preventDefault(), G.focus());
481
- } else d === void 0 && !nt(M.target) && !M.ctrlKey && !M.metaKey && !M.altKey && (M.key === "ArrowLeft" ? (z = i == null ? void 0 : i.onPrevious) == null || z.call(i) : M.key === "ArrowRight" ? (j = i == null ? void 0 : i.onNext) == null || j.call(i) : M.key === "+" || M.key === "=" ? h == null || h("in") : M.key === "-" ? h == null || h("out") : M.key === "0" && (h == null || h("reset")));
481
+ } else d === void 0 && !nt(M.target) && !M.ctrlKey && !M.metaKey && !M.altKey && (M.key === "ArrowLeft" ? (U = i == null ? void 0 : i.onPrevious) == null || U.call(i) : M.key === "ArrowRight" ? (j = i == null ? void 0 : i.onNext) == null || j.call(i) : M.key === "+" || M.key === "=" ? f == null || f("in") : M.key === "-" ? f == null || f("out") : M.key === "0" && (f == null || f("reset")));
482
482
  },
483
483
  children: [
484
484
  i !== void 0 ? /* @__PURE__ */ n("span", { className: "cms-visually-hidden", role: "status", children: `${t}, ${i.position}` }) : null,
485
- /* @__PURE__ */ f("header", { className: "cms-viewer__top", children: [
486
- /* @__PURE__ */ n("button", { ref: x, type: "button", className: "cms-viewer__icon", "aria-label": s, onClick: I, children: /* @__PURE__ */ n(se, { name: "close" }) }),
485
+ /* @__PURE__ */ h("header", { className: "cms-viewer__top", children: [
486
+ /* @__PURE__ */ n("button", { ref: S, type: "button", className: "cms-viewer__icon", "aria-label": s, onClick: T, children: /* @__PURE__ */ n(se, { name: "close" }) }),
487
487
  /* @__PURE__ */ n("span", { className: "cms-viewer__badge", children: l }),
488
- /* @__PURE__ */ n("h2", { className: "cms-viewer__name", id: C, title: t, children: t }),
488
+ /* @__PURE__ */ n("h2", { className: "cms-viewer__name", id: _, title: t, children: t }),
489
489
  i !== void 0 ? /* @__PURE__ */ n("span", { className: "cms-viewer__position", children: i.position }) : null,
490
490
  /* @__PURE__ */ n("span", { className: "cms-viewer__space" }),
491
- d !== void 0 ? /* @__PURE__ */ f(ge, { children: [
491
+ d !== void 0 ? /* @__PURE__ */ h(ge, { children: [
492
492
  /* @__PURE__ */ n("span", { className: "cms-viewer__status", role: "status", children: d.status }),
493
493
  /* @__PURE__ */ n("button", { type: "button", className: "cms-viewer__button cms-viewer__button--edit", onClick: d.onDone, children: d.doneLabel })
494
- ] }) : /* @__PURE__ */ f(ge, { children: [
495
- /* @__PURE__ */ n("span", { className: "cms-viewer__actions", children: r.map((M) => /* @__PURE__ */ f("button", { type: "button", className: "cms-viewer__button", onClick: M.onSelect, children: [
494
+ ] }) : /* @__PURE__ */ h(ge, { children: [
495
+ /* @__PURE__ */ n("span", { className: "cms-viewer__actions", children: r.map((M) => /* @__PURE__ */ h("button", { type: "button", className: "cms-viewer__button", onClick: M.onSelect, children: [
496
496
  M.icon,
497
497
  M.label
498
498
  ] }, M.label)) }),
499
- c !== void 0 ? /* @__PURE__ */ f("button", { type: "button", className: "cms-viewer__button cms-viewer__button--edit", "aria-label": c.label, onClick: c.onEdit, children: [
499
+ c !== void 0 ? /* @__PURE__ */ h("button", { type: "button", className: "cms-viewer__button cms-viewer__button--edit", "aria-label": c.label, onClick: c.onEdit, children: [
500
500
  c.icon,
501
501
  /* @__PURE__ */ n("span", { className: "cms-viewer__wide", children: c.label })
502
502
  ] }) : null,
503
- r.length > 0 ? /* @__PURE__ */ f("span", { className: "cms-viewer__more", children: [
504
- /* @__PURE__ */ n("button", { type: "button", className: "cms-viewer__icon", "aria-label": m, "aria-expanded": A, onClick: () => v((M) => !M), children: /* @__PURE__ */ n($, { name: "more" }) }),
505
- A ? /* @__PURE__ */ n("span", { className: "cms-viewer__menu", children: r.map((M) => /* @__PURE__ */ f(
503
+ r.length > 0 ? /* @__PURE__ */ h("span", { className: "cms-viewer__more", children: [
504
+ /* @__PURE__ */ n("button", { type: "button", className: "cms-viewer__icon", "aria-label": m, "aria-expanded": N, onClick: () => v((M) => !M), children: /* @__PURE__ */ n($, { name: "more" }) }),
505
+ N ? /* @__PURE__ */ n("span", { className: "cms-viewer__menu", children: r.map((M) => /* @__PURE__ */ h(
506
506
  "button",
507
507
  {
508
508
  type: "button",
@@ -520,21 +520,21 @@ function nl(e) {
520
520
  ] }) : null
521
521
  ] })
522
522
  ] }),
523
- /* @__PURE__ */ f("div", { className: "cms-viewer__body", children: [
523
+ /* @__PURE__ */ h("div", { className: "cms-viewer__body", children: [
524
524
  u != null && d === void 0 ? /* @__PURE__ */ n("nav", { className: "cms-viewer__thumbnails", children: u }) : null,
525
- /* @__PURE__ */ f("div", { className: "cms-viewer__content", onTouchStart: U, onTouchEnd: P, children: [
526
- (d == null ? void 0 : d.conflict) !== void 0 ? /* @__PURE__ */ f("div", { className: "cms-viewer__conflict", role: "alert", children: [
525
+ /* @__PURE__ */ h("div", { className: "cms-viewer__content", onTouchStart: B, onTouchEnd: F, children: [
526
+ (d == null ? void 0 : d.conflict) !== void 0 ? /* @__PURE__ */ h("div", { className: "cms-viewer__conflict", role: "alert", children: [
527
527
  /* @__PURE__ */ n("p", { className: "cms-viewer__conflict-text", children: d.conflict.message }),
528
528
  /* @__PURE__ */ n("button", { type: "button", className: "cms-viewer__button", onClick: d.conflict.onOverwrite, children: d.conflict.overwriteLabel }),
529
529
  /* @__PURE__ */ n("button", { type: "button", className: "cms-viewer__button cms-viewer__button--edit", onClick: d.conflict.onKeepBoth, children: d.conflict.keepBothLabel })
530
530
  ] }) : null,
531
- b === void 0 ? _ : /* @__PURE__ */ n(st, { state: b }),
531
+ b === void 0 ? x : /* @__PURE__ */ n(st, { state: b }),
532
532
  d === void 0 && (i != null && i.onPrevious) ? /* @__PURE__ */ n("button", { type: "button", className: "cms-viewer__side cms-viewer__side--previous", "aria-label": i.previousLabel, title: i.previousLabel, onClick: i.onPrevious, children: /* @__PURE__ */ n(se, { name: "back" }) }) : null,
533
533
  d === void 0 && (i != null && i.onNext) ? /* @__PURE__ */ n("button", { type: "button", className: "cms-viewer__side cms-viewer__side--next", "aria-label": i.nextLabel, title: i.nextLabel, onClick: i.onNext, children: /* @__PURE__ */ n(se, { name: "back" }) }) : null,
534
- d === void 0 && i !== void 0 ? /* @__PURE__ */ n("div", { className: "cms-viewer__dots", "aria-hidden": "true", children: Array.from({ length: Math.min(i.total, 7) }, (M, B) => /* @__PURE__ */ n("i", { className: B === Math.min(i.index, 6) ? "is-current" : void 0 }, B)) }) : null
534
+ d === void 0 && i !== void 0 ? /* @__PURE__ */ n("div", { className: "cms-viewer__dots", "aria-hidden": "true", children: Array.from({ length: Math.min(i.total, 7) }, (M, R) => /* @__PURE__ */ n("i", { className: R === Math.min(i.index, 6) ? "is-current" : void 0 }, R)) }) : null
535
535
  ] })
536
536
  ] }),
537
- d === void 0 && N != null ? /* @__PURE__ */ n("div", { className: "cms-viewer__strip", children: N }) : null,
537
+ d === void 0 && k != null ? /* @__PURE__ */ n("div", { className: "cms-viewer__strip", children: k }) : null,
538
538
  g != null ? /* @__PURE__ */ n("footer", { className: "cms-viewer__bar", children: g }) : null
539
539
  ]
540
540
  }
@@ -584,165 +584,165 @@ const Je = (e, t) => `${e}
584
584
  ${t}`, it = (e, t) => e === "" ? t : `${e}/${t}`, ot = 48;
585
585
  function tl(e) {
586
586
  var ne, ye;
587
- const { open: t, spaces: l, list: s, disabledReason: a, budget: r, formatSize: m, labels: c, onConfirm: d, onCancel: b } = e, [i, g] = D(((ne = l[0]) == null ? void 0 : ne.id) ?? ""), [u, N] = D(""), [h, _] = D({ status: "loading" }), [k, x] = D(0), [C, A] = D(/* @__PURE__ */ new Map()), [v, y] = D(0), [I, U] = D(!1), P = O(null), M = O(!1);
587
+ const { open: t, spaces: l, list: s, disabledReason: a, budget: r, formatSize: m, labels: c, onConfirm: d, onCancel: b } = e, [i, g] = I(((ne = l[0]) == null ? void 0 : ne.id) ?? ""), [u, k] = I(""), [f, x] = I({ status: "loading" }), [L, S] = I(0), [_, N] = I(/* @__PURE__ */ new Map()), [v, w] = I(0), [T, B] = I(!1), F = z(null), M = z(!1);
588
588
  Q(() => {
589
589
  M.current = !1;
590
590
  }, [t, i, u]);
591
- const B = he();
591
+ const R = he();
592
592
  Q(() => {
593
- var w;
594
- t && (g(((w = l[0]) == null ? void 0 : w.id) ?? ""), N(""), A(/* @__PURE__ */ new Map()), U(!1));
593
+ var y;
594
+ t && (g(((y = l[0]) == null ? void 0 : y.id) ?? ""), k(""), N(/* @__PURE__ */ new Map()), B(!1));
595
595
  }, [t]), Q(() => {
596
596
  if (!t || i === "") return;
597
- let w = !0;
598
- return _({ status: "loading" }), y(0), s(i, u).then(
599
- (E) => w && _({ status: "ready", entries: E.entries, next: E.next ?? null, paging: !1 }),
600
- (E) => w && _({ status: E instanceof at ? "denied" : "error" })
597
+ let y = !0;
598
+ return x({ status: "loading" }), w(0), s(i, u).then(
599
+ (E) => y && x({ status: "ready", entries: E.entries, next: E.next ?? null, paging: !1 }),
600
+ (E) => y && x({ status: E instanceof at ? "denied" : "error" })
601
601
  ), () => {
602
- w = !1;
602
+ y = !1;
603
603
  };
604
- }, [t, i, u, s, k]);
605
- const z = Ie(() => {
606
- if (h.status !== "ready" || h.next === null || h.paging) return;
607
- const w = h.next, E = h.entries;
608
- _({ ...h, paging: !0 }), s(i, u, w).then(
604
+ }, [t, i, u, s, L]);
605
+ const U = Ie(() => {
606
+ if (f.status !== "ready" || f.next === null || f.paging) return;
607
+ const y = f.next, E = f.entries;
608
+ x({ ...f, paging: !0 }), s(i, u, y).then(
609
609
  (W) => {
610
- M.current = !1, _({ status: "ready", entries: [...E, ...W.entries], next: W.next ?? null, paging: !1 });
610
+ M.current = !1, x({ status: "ready", entries: [...E, ...W.entries], next: W.next ?? null, paging: !1 });
611
611
  },
612
612
  (W) => {
613
613
  if (!(W instanceof rt)) {
614
- _({ status: "ready", entries: E, next: w, paging: !1 });
614
+ x({ status: "ready", entries: E, next: y, paging: !1 });
615
615
  return;
616
616
  }
617
617
  if (M.current) {
618
- _({ status: "error" });
618
+ x({ status: "error" });
619
619
  return;
620
620
  }
621
- M.current = !0, x((q) => q + 1);
621
+ M.current = !0, S((q) => q + 1);
622
622
  }
623
623
  );
624
- }, [h, s, i, u]), j = Ie((w) => {
624
+ }, [f, s, i, u]), j = Ie((y) => {
625
625
  var E;
626
- return ((E = r == null ? void 0 : r.cost) == null ? void 0 : E.call(r, w)) ?? w.size ?? 0;
627
- }, [r]), K = Bn(() => [...C.values()], [C]), G = K.reduce((w, E) => w + (E.size ?? 0), 0), Y = r === void 0 ? null : r.limitBytes - r.usedBytes - K.reduce((w, E) => w + j(E), 0), ee = Y !== null && Y < 0, ie = (w) => {
628
- if (w.kind !== "file") return null;
629
- const E = a == null ? void 0 : a(w);
630
- return E || (Y !== null && !C.has(Je(i, w.id)) && j(w) > Y ? c.overBudget : null);
631
- }, be = (w) => {
632
- const E = Je(i, w.id);
633
- !C.has(E) && ie(w) !== null || A((W) => {
626
+ return ((E = r == null ? void 0 : r.cost) == null ? void 0 : E.call(r, y)) ?? y.size ?? 0;
627
+ }, [r]), K = Bn(() => [..._.values()], [_]), G = K.reduce((y, E) => y + (E.size ?? 0), 0), Y = r === void 0 ? null : r.limitBytes - r.usedBytes - K.reduce((y, E) => y + j(E), 0), ee = Y !== null && Y < 0, ie = (y) => {
628
+ if (y.kind !== "file") return null;
629
+ const E = a == null ? void 0 : a(y);
630
+ return E || (Y !== null && !_.has(Je(i, y.id)) && j(y) > Y ? c.overBudget : null);
631
+ }, be = (y) => {
632
+ const E = Je(i, y.id);
633
+ !_.has(E) && ie(y) !== null || N((W) => {
634
634
  const q = new Map(W);
635
- return q.has(E) ? q.delete(E) : q.set(E, { ...w, space: i, path: u }), q;
635
+ return q.has(E) ? q.delete(E) : q.set(E, { ...y, space: i, path: u }), q;
636
636
  });
637
- }, oe = (w) => N(it(u, w.name)), de = () => N(u.includes("/") ? u.slice(0, u.lastIndexOf("/")) : ""), Ce = (w) => A((E) => {
637
+ }, oe = (y) => k(it(u, y.name)), de = () => k(u.includes("/") ? u.slice(0, u.lastIndexOf("/")) : ""), Ce = (y) => N((E) => {
638
638
  const W = new Map(E);
639
- return W.delete(w), W;
640
- }), fe = h.status === "ready" ? h.entries : [], te = (w) => {
639
+ return W.delete(y), W;
640
+ }), fe = f.status === "ready" ? f.entries : [], te = (y) => {
641
641
  const E = fe[v];
642
- if (w.key === "ArrowDown" || w.key === "ArrowUp" || w.key === "Home" || w.key === "End") {
643
- w.preventDefault();
644
- const W = fe.length - 1, q = w.key === "Home" ? 0 : w.key === "End" ? W : Math.min(W, Math.max(0, v + (w.key === "ArrowDown" ? 1 : -1)));
645
- y(q), q >= W - 1 && z();
646
- } else w.key === "Enter" && (E == null ? void 0 : E.kind) === "folder" ? (w.preventDefault(), oe(E)) : w.key === " " && (E == null ? void 0 : E.kind) === "file" ? (w.preventDefault(), be(E)) : w.key === "Backspace" && u !== "" && (w.preventDefault(), de());
647
- }, pe = u === "" ? [] : u.split("/"), _e = ((ye = l.find((w) => w.id === i)) == null ? void 0 : ye.name) ?? "", we = (w) => `${B}-entry-${String(w)}`;
648
- return /* @__PURE__ */ f(
642
+ if (y.key === "ArrowDown" || y.key === "ArrowUp" || y.key === "Home" || y.key === "End") {
643
+ y.preventDefault();
644
+ const W = fe.length - 1, q = y.key === "Home" ? 0 : y.key === "End" ? W : Math.min(W, Math.max(0, v + (y.key === "ArrowDown" ? 1 : -1)));
645
+ w(q), q >= W - 1 && U();
646
+ } else y.key === "Enter" && (E == null ? void 0 : E.kind) === "folder" ? (y.preventDefault(), oe(E)) : y.key === " " && (E == null ? void 0 : E.kind) === "file" ? (y.preventDefault(), be(E)) : y.key === "Backspace" && u !== "" && (y.preventDefault(), de());
647
+ }, pe = u === "" ? [] : u.split("/"), _e = ((ye = l.find((y) => y.id === i)) == null ? void 0 : ye.name) ?? "", we = (y) => `${R}-entry-${String(y)}`;
648
+ return /* @__PURE__ */ h(
649
649
  Sn,
650
650
  {
651
651
  open: t,
652
652
  title: c.title,
653
653
  onClose: b,
654
654
  closeLabel: c.close,
655
- initialFocus: P,
655
+ initialFocus: F,
656
656
  className: "cms-file-picker",
657
- footer: /* @__PURE__ */ f("div", { className: "cms-file-picker__foot", children: [
658
- /* @__PURE__ */ f("div", { className: "cms-file-picker__summary", "aria-live": "polite", children: [
657
+ footer: /* @__PURE__ */ h("div", { className: "cms-file-picker__foot", children: [
658
+ /* @__PURE__ */ h("div", { className: "cms-file-picker__summary", "aria-live": "polite", children: [
659
659
  K.length > 0 ? /* @__PURE__ */ n("span", { children: c.total(K.length, m(G)) }) : null,
660
- r !== void 0 && Y !== null ? /* @__PURE__ */ n("span", { className: F(ee && "is-over"), children: ee ? c.overBudget : c.left(m(Math.max(0, Y)), m(r.limitBytes)) }) : null
660
+ r !== void 0 && Y !== null ? /* @__PURE__ */ n("span", { className: H(ee && "is-over"), children: ee ? c.overBudget : c.left(m(Math.max(0, Y)), m(r.limitBytes)) }) : null
661
661
  ] }),
662
- /* @__PURE__ */ f("div", { className: "cms-file-picker__actions", children: [
662
+ /* @__PURE__ */ h("div", { className: "cms-file-picker__actions", children: [
663
663
  /* @__PURE__ */ n(De, { variant: "secondary", onClick: b, children: c.cancel }),
664
664
  /* @__PURE__ */ n(De, { variant: "primary", disabled: K.length === 0 || ee, onClick: () => d(K), children: c.confirm(K.length) })
665
665
  ] })
666
666
  ] }),
667
667
  children: [
668
- /* @__PURE__ */ f("div", { className: "cms-file-picker__top", children: [
669
- l.length > 1 ? /* @__PURE__ */ f("label", { className: "cms-file-picker__space", children: [
668
+ /* @__PURE__ */ h("div", { className: "cms-file-picker__top", children: [
669
+ l.length > 1 ? /* @__PURE__ */ h("label", { className: "cms-file-picker__space", children: [
670
670
  /* @__PURE__ */ n("span", { className: "cms-visually-hidden", children: c.space }),
671
- /* @__PURE__ */ n("select", { className: "cms-input cms-select", value: i, onChange: (w) => {
672
- g(w.target.value), N("");
673
- }, children: l.map((w) => /* @__PURE__ */ n("option", { value: w.id, children: w.name }, w.id)) })
671
+ /* @__PURE__ */ n("select", { className: "cms-input cms-select", value: i, onChange: (y) => {
672
+ g(y.target.value), k("");
673
+ }, children: l.map((y) => /* @__PURE__ */ n("option", { value: y.id, children: y.name }, y.id)) })
674
674
  ] }) : null,
675
- /* @__PURE__ */ f("nav", { className: "cms-file-picker__path", "aria-label": c.path, children: [
675
+ /* @__PURE__ */ h("nav", { className: "cms-file-picker__path", "aria-label": c.path, children: [
676
676
  /* @__PURE__ */ n("button", { type: "button", className: "cms-icon-button", "aria-label": c.up, disabled: u === "", onClick: de, children: /* @__PURE__ */ n($, { name: "chevron-left" }) }),
677
- /* @__PURE__ */ f("ol", { children: [
678
- /* @__PURE__ */ n("li", { children: /* @__PURE__ */ n("button", { type: "button", className: "cms-file-picker__crumb", "aria-current": u === "" ? "location" : void 0, onClick: () => N(""), children: _e }) }),
679
- pe.map((w, E) => {
677
+ /* @__PURE__ */ h("ol", { children: [
678
+ /* @__PURE__ */ n("li", { children: /* @__PURE__ */ n("button", { type: "button", className: "cms-file-picker__crumb", "aria-current": u === "" ? "location" : void 0, onClick: () => k(""), children: _e }) }),
679
+ pe.map((y, E) => {
680
680
  const W = pe.slice(0, E + 1).join("/");
681
- return /* @__PURE__ */ n("li", { children: /* @__PURE__ */ n("button", { type: "button", className: "cms-file-picker__crumb", "aria-current": W === u ? "location" : void 0, onClick: () => N(W), children: w }) }, W);
681
+ return /* @__PURE__ */ n("li", { children: /* @__PURE__ */ n("button", { type: "button", className: "cms-file-picker__crumb", "aria-current": W === u ? "location" : void 0, onClick: () => k(W), children: y }) }, W);
682
682
  })
683
683
  ] })
684
684
  ] }),
685
- K.length > 0 ? /* @__PURE__ */ n("button", { type: "button", className: "cms-file-picker__chip", "aria-expanded": I, onClick: () => U((w) => !w), children: c.selected(K.length) }) : null
685
+ K.length > 0 ? /* @__PURE__ */ n("button", { type: "button", className: "cms-file-picker__chip", "aria-expanded": T, onClick: () => B((y) => !y), children: c.selected(K.length) }) : null
686
686
  ] }),
687
- I && K.length > 0 ? /* @__PURE__ */ f("div", { className: "cms-file-picker__chosen", children: [
688
- /* @__PURE__ */ n("ul", { children: [...C.entries()].map(([w, E]) => /* @__PURE__ */ f("li", { children: [
687
+ T && K.length > 0 ? /* @__PURE__ */ h("div", { className: "cms-file-picker__chosen", children: [
688
+ /* @__PURE__ */ n("ul", { children: [..._.entries()].map(([y, E]) => /* @__PURE__ */ h("li", { children: [
689
689
  /* @__PURE__ */ n("span", { className: "cms-file-picker__name", children: E.name }),
690
- /* @__PURE__ */ n("button", { type: "button", className: "cms-icon-button", "aria-label": c.remove(E.name), onClick: () => Ce(w), children: /* @__PURE__ */ n(se, { name: "close" }) })
691
- ] }, w)) }),
690
+ /* @__PURE__ */ n("button", { type: "button", className: "cms-icon-button", "aria-label": c.remove(E.name), onClick: () => Ce(y), children: /* @__PURE__ */ n(se, { name: "close" }) })
691
+ ] }, y)) }),
692
692
  /* @__PURE__ */ n(De, { variant: "secondary", onClick: () => {
693
- A(/* @__PURE__ */ new Map()), U(!1);
693
+ N(/* @__PURE__ */ new Map()), B(!1);
694
694
  }, children: c.clear })
695
695
  ] }) : null,
696
- /* @__PURE__ */ f("div", { className: "cms-file-picker__list", onScroll: (w) => {
697
- const E = w.currentTarget;
698
- E.scrollTop + E.clientHeight >= E.scrollHeight - ot && z();
696
+ /* @__PURE__ */ h("div", { className: "cms-file-picker__list", onScroll: (y) => {
697
+ const E = y.currentTarget;
698
+ E.scrollTop + E.clientHeight >= E.scrollHeight - ot && U();
699
699
  }, children: [
700
- h.status === "loading" ? /* @__PURE__ */ n(Le, { kind: "loading", title: c.loading, placement: "page" }) : null,
701
- h.status === "error" ? /* @__PURE__ */ n(Le, { kind: "error", title: c.error, placement: "page", action: { label: c.retry, onAction: () => {
702
- M.current = !1, x((w) => w + 1);
700
+ f.status === "loading" ? /* @__PURE__ */ n(Le, { kind: "loading", title: c.loading, placement: "page" }) : null,
701
+ f.status === "error" ? /* @__PURE__ */ n(Le, { kind: "error", title: c.error, placement: "page", action: { label: c.retry, onAction: () => {
702
+ M.current = !1, S((y) => y + 1);
703
703
  } } }) : null,
704
- h.status === "denied" ? /* @__PURE__ */ n(Le, { kind: "denied", title: c.denied, placement: "page" }) : null,
705
- h.status === "ready" && fe.length === 0 ? /* @__PURE__ */ n(Le, { kind: "empty", title: c.empty, placement: "page" }) : null,
706
- /* @__PURE__ */ f(
704
+ f.status === "denied" ? /* @__PURE__ */ n(Le, { kind: "denied", title: c.denied, placement: "page" }) : null,
705
+ f.status === "ready" && fe.length === 0 ? /* @__PURE__ */ n(Le, { kind: "empty", title: c.empty, placement: "page" }) : null,
706
+ /* @__PURE__ */ h(
707
707
  "div",
708
708
  {
709
- ref: P,
709
+ ref: F,
710
710
  role: "listbox",
711
711
  "aria-multiselectable": "true",
712
712
  "aria-label": c.files,
713
713
  "aria-activedescendant": fe.length > 0 ? we(v) : void 0,
714
714
  tabIndex: 0,
715
715
  className: "cms-file-picker__entries",
716
- hidden: h.status !== "ready" || fe.length === 0,
716
+ hidden: f.status !== "ready" || fe.length === 0,
717
717
  onKeyDown: te,
718
718
  children: [
719
- fe.map((w, E) => {
720
- const W = w.kind === "file" && C.has(Je(i, w.id)), q = ie(w);
721
- return /* @__PURE__ */ f(
719
+ fe.map((y, E) => {
720
+ const W = y.kind === "file" && _.has(Je(i, y.id)), q = ie(y);
721
+ return /* @__PURE__ */ h(
722
722
  "div",
723
723
  {
724
724
  id: we(E),
725
725
  role: "option",
726
- "aria-selected": w.kind === "file" ? W : void 0,
726
+ "aria-selected": y.kind === "file" ? W : void 0,
727
727
  "aria-disabled": q !== null || void 0,
728
- className: F("cms-file-picker__entry", E === v && "is-active", W && "is-ticked", q !== null && "is-disabled"),
728
+ className: H("cms-file-picker__entry", E === v && "is-active", W && "is-ticked", q !== null && "is-disabled"),
729
729
  onClick: () => {
730
- y(E), w.kind === "folder" ? oe(w) : be(w);
730
+ w(E), y.kind === "folder" ? oe(y) : be(y);
731
731
  },
732
732
  children: [
733
733
  /* @__PURE__ */ n("span", { className: "cms-file-picker__tick", "aria-hidden": "true", children: W ? /* @__PURE__ */ n($, { name: "check" }) : null }),
734
- /* @__PURE__ */ n($, { name: w.kind === "folder" ? "folder" : "file" }),
735
- /* @__PURE__ */ f("span", { className: "cms-file-picker__text", children: [
736
- /* @__PURE__ */ n("span", { className: "cms-file-picker__name", children: w.name }),
734
+ /* @__PURE__ */ n($, { name: y.kind === "folder" ? "folder" : "file" }),
735
+ /* @__PURE__ */ h("span", { className: "cms-file-picker__text", children: [
736
+ /* @__PURE__ */ n("span", { className: "cms-file-picker__name", children: y.name }),
737
737
  q !== null ? /* @__PURE__ */ n("span", { className: "cms-file-picker__reason", children: q }) : null
738
738
  ] }),
739
- w.kind === "file" && w.size != null ? /* @__PURE__ */ n("span", { className: "cms-file-picker__size", children: m(w.size) }) : null
739
+ y.kind === "file" && y.size != null ? /* @__PURE__ */ n("span", { className: "cms-file-picker__size", children: m(y.size) }) : null
740
740
  ]
741
741
  },
742
- w.id
742
+ y.id
743
743
  );
744
744
  }),
745
- h.status === "ready" && h.paging ? /* @__PURE__ */ n("div", { className: "cms-file-picker__paging", children: /* @__PURE__ */ n(Le, { kind: "loading", title: c.loading, placement: "inline" }) }) : null
745
+ f.status === "ready" && f.paging ? /* @__PURE__ */ n("div", { className: "cms-file-picker__paging", children: /* @__PURE__ */ n(Le, { kind: "loading", title: c.loading, placement: "inline" }) }) : null
746
746
  ]
747
747
  }
748
748
  )
@@ -760,7 +760,7 @@ function ct(e, t) {
760
760
  return t.scrollTop <= 0;
761
761
  }
762
762
  function dt(e, t) {
763
- const [l, s] = D(0), a = O(t);
763
+ const [l, s] = I(0), a = z(t);
764
764
  return a.current = t, Q(() => {
765
765
  const r = e.current;
766
766
  if (r === null) return;
@@ -789,126 +789,128 @@ function ut() {
789
789
  return Fn(En);
790
790
  }
791
791
  function ll({ label: e, rows: t, error: l, onRetry: s, loadingText: a = "Loading", emptyTitle: r = "Nothing here yet", emptyHint: m, emptyIcon: c, selected: d, onOpen: b, onRowMenu: i }) {
792
- const g = O([]), u = ut();
792
+ const g = z([]), u = ut();
793
793
  if (l != null) return /* @__PURE__ */ n(Yn, { message: l, onRetry: s });
794
794
  if (t === null) return /* @__PURE__ */ n(Gn, { what: a, layout: "block" });
795
795
  if (t.length === 0) return /* @__PURE__ */ n(jn, { title: r, hint: m, ...c === void 0 ? {} : { icon: c } });
796
- const N = (h, _, k) => {
797
- var x;
798
- if (h.key === "ArrowDown" || h.key === "ArrowUp")
799
- h.preventDefault(), (x = g.current[Math.min(t.length - 1, Math.max(0, _ + (h.key === "ArrowDown" ? 1 : -1)))]) == null || x.focus();
800
- else if (h.key === "Enter")
801
- b == null || b(k);
802
- else if ((h.key === "ContextMenu" || h.shiftKey && h.key === "F10") && i) {
803
- h.preventDefault();
804
- const C = h.currentTarget.getBoundingClientRect();
805
- i(k, { x: C.left + 16, y: C.bottom });
796
+ const k = (f, x, L) => {
797
+ var S;
798
+ if (f.key === "ArrowDown" || f.key === "ArrowUp")
799
+ f.preventDefault(), (S = g.current[Math.min(t.length - 1, Math.max(0, x + (f.key === "ArrowDown" ? 1 : -1)))]) == null || S.focus();
800
+ else if (f.key === "Enter")
801
+ b == null || b(L);
802
+ else if ((f.key === "ContextMenu" || f.shiftKey && f.key === "F10") && i) {
803
+ f.preventDefault();
804
+ const _ = f.currentTarget.getBoundingClientRect();
805
+ i(L, { x: _.left + 16, y: _.bottom });
806
806
  }
807
807
  };
808
- return /* @__PURE__ */ f(ge, { children: [
809
- u !== null && (u.distance > 0 || u.refreshing) ? /* @__PURE__ */ f("div", { className: "cms-list__pull", role: "status", style: { height: u.refreshing ? void 0 : u.distance }, "data-ready": u.distance >= nn ? "" : void 0, children: [
808
+ return /* @__PURE__ */ h(ge, { children: [
809
+ u !== null && (u.distance > 0 || u.refreshing) ? /* @__PURE__ */ h("div", { className: "cms-list__pull", role: "status", style: { height: u.refreshing ? void 0 : u.distance }, "data-ready": u.distance >= nn ? "" : void 0, children: [
810
810
  u.refreshing ? /* @__PURE__ */ n(se, { name: "spinner" }) : null,
811
811
  u.text != null ? /* @__PURE__ */ n("span", { className: "cms-list__pull-text", children: u.text }) : null
812
812
  ] }) : null,
813
- /* @__PURE__ */ n("ul", { className: "cms-list", role: "listbox", "aria-label": e, children: t.map((h, _) => {
814
- const k = h.id === d;
815
- return /* @__PURE__ */ f(
813
+ /* @__PURE__ */ n("ul", { className: "cms-list", role: "listbox", "aria-label": e, children: t.map((f, x) => {
814
+ const L = f.id === d;
815
+ return /* @__PURE__ */ h(
816
816
  "li",
817
817
  {
818
- ref: (x) => {
819
- g.current[_] = x;
818
+ ref: (S) => {
819
+ g.current[x] = S;
820
820
  },
821
821
  role: "option",
822
- "aria-selected": k,
823
- tabIndex: k || d == null && _ === 0 ? 0 : -1,
824
- className: F("cms-list__row", k && "is-selected"),
825
- onClick: () => b == null ? void 0 : b(h.id),
826
- onKeyDown: (x) => N(x, _, h.id),
827
- onContextMenu: i ? (x) => {
828
- x.preventDefault(), i(h.id, { x: x.clientX, y: x.clientY });
822
+ "aria-selected": L,
823
+ tabIndex: L || d == null && x === 0 ? 0 : -1,
824
+ className: H("cms-list__row", L && "is-selected"),
825
+ onClick: () => b == null ? void 0 : b(f.id),
826
+ onKeyDown: (S) => k(S, x, f.id),
827
+ onContextMenu: i ? (S) => {
828
+ S.preventDefault(), i(f.id, { x: S.clientX, y: S.clientY });
829
829
  } : void 0,
830
830
  children: [
831
- h.lead != null ? /* @__PURE__ */ n("span", { className: "cms-list__lead", children: h.lead }) : null,
832
- /* @__PURE__ */ f("span", { className: "cms-list__text", children: [
833
- /* @__PURE__ */ n("span", { className: F("cms-list__primary", h.unread === !0 && "is-unread"), children: h.primary }),
834
- h.secondary != null ? /* @__PURE__ */ n("span", { className: "cms-list__secondary", children: h.secondary }) : null
831
+ f.lead != null ? /* @__PURE__ */ n("span", { className: "cms-list__lead", children: f.lead }) : null,
832
+ /* @__PURE__ */ h("span", { className: "cms-list__text", children: [
833
+ /* @__PURE__ */ n("span", { className: H("cms-list__primary", f.unread === !0 && "is-unread"), children: f.primary }),
834
+ f.secondary != null ? /* @__PURE__ */ n("span", { className: "cms-list__secondary", children: f.secondary }) : null
835
835
  ] }),
836
- h.meta != null || h.count !== void 0 ? /* @__PURE__ */ f("span", { className: "cms-list__end", children: [
837
- h.meta != null ? /* @__PURE__ */ n("span", { className: "cms-list__meta", children: h.meta }) : null,
838
- h.count !== void 0 && h.count > 0 ? /* @__PURE__ */ n("span", { className: "cms-badge cms-list__count", children: h.count }) : null
836
+ f.meta != null || f.count !== void 0 ? /* @__PURE__ */ h("span", { className: "cms-list__end", children: [
837
+ f.meta != null ? /* @__PURE__ */ n("span", { className: "cms-list__meta", children: f.meta }) : null,
838
+ f.count !== void 0 && f.count > 0 ? /* @__PURE__ */ n("span", { className: "cms-badge cms-list__count", children: f.count }) : null
839
839
  ] }) : null
840
840
  ]
841
841
  },
842
- h.id
842
+ f.id
843
843
  );
844
844
  }) })
845
845
  ] });
846
846
  }
847
847
  function Ke({ at: e, items: t, onClose: l, label: s = "Actions", focus: a = "current", corner: r = "top-left" }) {
848
- const m = O(null), c = O(null), d = he(), [b, i] = D(e), g = t.filter((_) => _.offer.offered);
848
+ const m = z(null), c = z(null), d = he(), [b, i] = I(e), g = t.filter((_) => _.offer.offered);
849
849
  if ($e(() => {
850
850
  if (!e) return;
851
- const _ = m.current, k = (_ == null ? void 0 : _.offsetWidth) ?? 0, x = (_ == null ? void 0 : _.offsetHeight) ?? 0, C = r === "bottom-right" ? e.x - k : e.x, A = r === "bottom-right" ? e.y - x : e.y;
852
- i({ x: Math.max(0, Math.min(C, window.innerWidth - k)), y: Math.max(0, Math.min(A, window.innerHeight - x)) });
851
+ const _ = m.current, N = (_ == null ? void 0 : _.offsetWidth) ?? 0, v = (_ == null ? void 0 : _.offsetHeight) ?? 0, w = r === "bottom-right" ? e.x - N : e.x, T = r === "bottom-right" ? e.y - v : e.y;
852
+ i({ x: Math.max(0, Math.min(w, window.innerWidth - N)), y: Math.max(0, Math.min(T, window.innerHeight - v)) });
853
853
  }, [e, r]), Q(() => {
854
- var C, A;
854
+ var w, T;
855
855
  if (!e) return;
856
856
  c.current = document.activeElement;
857
- const _ = Array.from(((C = m.current) == null ? void 0 : C.querySelectorAll('[role^="menuitem"]:not([aria-disabled="true"])')) ?? []), k = a === "current" ? _.find((v) => v.getAttribute("aria-checked") === "true") : void 0;
858
- (A = a === "last" ? _[_.length - 1] : k ?? _[0]) == null || A.focus();
859
- const x = (v) => {
860
- var y;
861
- (y = m.current) != null && y.contains(v.target) || l();
857
+ const _ = Array.from(((w = m.current) == null ? void 0 : w.querySelectorAll('[role^="menuitem"]:not([aria-disabled="true"])')) ?? []), N = a === "current" ? _.find((B) => B.getAttribute("aria-checked") === "true") : void 0;
858
+ (T = a === "last" ? _[_.length - 1] : N ?? _[0]) == null || T.focus();
859
+ const v = (B) => {
860
+ var F;
861
+ (F = m.current) != null && F.contains(B.target) || l();
862
862
  };
863
- return document.addEventListener("mousedown", x), () => {
864
- var v, y;
865
- document.removeEventListener("mousedown", x), (y = (v = c.current) == null ? void 0 : v.focus) == null || y.call(v);
863
+ return document.addEventListener("mousedown", v), () => {
864
+ var B, F;
865
+ document.removeEventListener("mousedown", v), (F = (B = c.current) == null ? void 0 : B.focus) == null || F.call(B);
866
866
  };
867
867
  }, [e, l, a]), !e || g.length === 0) return null;
868
868
  const u = (_) => {
869
- var C, A;
870
- const k = Array.from(((C = m.current) == null ? void 0 : C.querySelectorAll('[role^="menuitem"]')) ?? []), x = k.indexOf(document.activeElement);
869
+ var w, T;
870
+ const N = Array.from(((w = m.current) == null ? void 0 : w.querySelectorAll('[role^="menuitem"]')) ?? []), v = N.indexOf(document.activeElement);
871
871
  if (_.key === "Escape" || _.key === "Tab")
872
872
  _.preventDefault(), l();
873
873
  else if (_.key === "ArrowDown" || _.key === "ArrowUp") {
874
874
  _.preventDefault();
875
- const v = _.key === "ArrowDown" ? 1 : -1;
876
- (A = k[(x + v + k.length) % k.length]) == null || A.focus();
875
+ const B = _.key === "ArrowDown" ? 1 : -1;
876
+ (T = N[(v + B + N.length) % N.length]) == null || T.focus();
877
877
  }
878
- }, N = (_) => {
879
- const k = _.offer.refusal !== void 0;
880
- return /* @__PURE__ */ f(
878
+ }, k = g.flatMap((_) => _.offer.refusal === void 0 ? [] : [_.offer.refusal]), f = k.length > 1 && k.every((_) => _ === k[0]) ? k[0] : void 0, x = `${d}-shared`, L = (_) => {
879
+ const N = _.offer.refusal !== void 0, v = N ? f !== void 0 ? x : `${d}-${_.id}` : void 0;
880
+ return /* @__PURE__ */ h(
881
881
  "div",
882
882
  {
883
883
  role: _.checked === void 0 ? "menuitem" : "menuitemradio",
884
884
  "aria-checked": _.checked,
885
885
  tabIndex: -1,
886
- "aria-disabled": k || void 0,
887
- "aria-describedby": k ? `${d}-${_.id}` : void 0,
888
- title: k ? _.offer.refusal : void 0,
889
- className: F("cms-menu__item", _.danger && "is-danger", _.offer.locked && "is-locked", k && "is-refused"),
886
+ "aria-disabled": N || void 0,
887
+ "aria-describedby": v,
888
+ title: N ? _.offer.refusal : void 0,
889
+ className: H("cms-menu__item", _.danger && "is-danger", _.offer.locked && "is-locked", N && "is-refused"),
890
890
  onClick: () => {
891
- k || (l(), _.onSelect());
891
+ N || (l(), _.onSelect());
892
892
  },
893
- onKeyDown: (x) => {
894
- (x.key === "Enter" || x.key === " ") && !k && (x.preventDefault(), l(), _.onSelect());
893
+ onKeyDown: (w) => {
894
+ (w.key === "Enter" || w.key === " ") && !N && (w.preventDefault(), l(), _.onSelect());
895
895
  },
896
896
  children: [
897
897
  _.checked !== void 0 ? /* @__PURE__ */ n("span", { className: "cms-menu__check", children: _.checked ? /* @__PURE__ */ n(se, { name: "check" }) : null }) : null,
898
898
  _.offer.locked ? /* @__PURE__ */ n(se, { name: "lock" }) : null,
899
- /* @__PURE__ */ n("span", { className: "cms-menu__label", children: _.label }),
900
- k ? /* @__PURE__ */ n("span", { id: `${d}-${_.id}`, className: "cms-menu__refusal", children: _.offer.refusal }) : null
899
+ /* @__PURE__ */ h("span", { className: "cms-menu__text", children: [
900
+ /* @__PURE__ */ n("span", { className: "cms-menu__label", children: _.label }),
901
+ N && f === void 0 ? /* @__PURE__ */ n("span", { id: `${d}-${_.id}`, className: "cms-menu__refusal", children: _.offer.refusal }) : null
902
+ ] })
901
903
  ]
902
904
  },
903
905
  _.id
904
906
  );
905
- }, h = [];
907
+ }, S = [];
906
908
  for (const _ of g) {
907
- const k = h[h.length - 1];
908
- k !== void 0 && k.group === _.group ? k.items.push(_) : h.push({ group: _.group, items: [_] });
909
+ const N = S[S.length - 1];
910
+ N !== void 0 && N.group === _.group ? N.items.push(_) : S.push({ group: _.group, items: [_] });
909
911
  }
910
912
  return an(
911
- /* @__PURE__ */ n(
913
+ /* @__PURE__ */ h(
912
914
  "div",
913
915
  {
914
916
  ref: m,
@@ -918,20 +920,23 @@ function Ke({ at: e, items: t, onClose: l, label: s = "Actions", focus: a = "cur
918
920
  style: { left: (b ?? e).x, top: (b ?? e).y },
919
921
  onKeyDown: u,
920
922
  onContextMenu: (_) => _.preventDefault(),
921
- children: h.map((_, k) => /* @__PURE__ */ f(Hn, { children: [
922
- k > 0 ? /* @__PURE__ */ n("div", { className: "cms-menu__separator", role: "separator" }) : null,
923
- _.group === void 0 ? _.items.map(N) : /* @__PURE__ */ f("div", { role: "group", "aria-label": _.group, children: [
924
- /* @__PURE__ */ n("div", { className: "cms-menu__group", "aria-hidden": "true", children: _.group }),
925
- _.items.map(N)
926
- ] })
927
- ] }, k))
923
+ children: [
924
+ f === void 0 ? null : /* @__PURE__ */ n("div", { id: x, className: "cms-menu__reason", children: f }),
925
+ S.map((_, N) => /* @__PURE__ */ h(Hn, { children: [
926
+ N > 0 ? /* @__PURE__ */ n("div", { className: "cms-menu__separator", role: "separator" }) : null,
927
+ _.group === void 0 ? _.items.map(L) : /* @__PURE__ */ h("div", { role: "group", "aria-label": _.group, children: [
928
+ /* @__PURE__ */ n("div", { className: "cms-menu__group", "aria-hidden": "true", children: _.group }),
929
+ _.items.map(L)
930
+ ] })
931
+ ] }, N))
932
+ ]
928
933
  }
929
934
  ),
930
935
  document.body
931
936
  );
932
937
  }
933
938
  function dn() {
934
- const [e, t] = D(/* @__PURE__ */ new Set()), [l, s] = D(null), a = O(null), r = O(null), m = (d) => t((b) => b.has(d) ? b : /* @__PURE__ */ new Set([...b, d])), c = (d) => t((b) => {
939
+ const [e, t] = I(/* @__PURE__ */ new Set()), [l, s] = I(null), a = z(null), r = z(null), m = (d) => t((b) => b.has(d) ? b : /* @__PURE__ */ new Set([...b, d])), c = (d) => t((b) => {
935
940
  if (!b.has(d)) return b;
936
941
  const i = new Set(b);
937
942
  return i.delete(d), i;
@@ -966,7 +971,7 @@ function mt(e, t, l) {
966
971
  const wn = /* @__PURE__ */ new Set(), yn = { descriptionHidden: !1, elsewhereHidden: !1, titleCut: !1, titleFloor: 0, bare: wn, primaryBare: !1, hidden: wn, primaryHidden: !1, chipsCut: !1 }, Nn = (e, t) => e.size === t.size && [...e].every((l) => t.has(l)), ht = (e, t) => e.descriptionHidden === t.descriptionHidden && e.elsewhereHidden === t.elsewhereHidden && e.titleCut === t.titleCut && e.titleFloor === t.titleFloor && Nn(e.bare, t.bare) && e.primaryBare === t.primaryBare && Nn(e.hidden, t.hidden) && e.primaryHidden === t.primaryHidden && e.chipsCut === t.chipsCut, ft = 64, Ae = "primary";
967
972
  function sl({ title: e, icon: t, description: l, meta: s = [], primary: a, secondary: r, more: m = [], moreLabel: c, context: d, fullWidth: b = !1 }) {
968
973
  var X, Ne, ce;
969
- const [i, g] = D(null), [u, N] = D(yn), [h, _] = D(null), [k, x] = D(null), C = dn(), A = O(null), v = O(null), y = O(null), I = he(), U = he(), P = [
974
+ const [i, g] = I(null), [u, k] = I(yn), [f, x] = I(null), [L, S] = I(null), _ = dn(), N = z(null), v = z(null), w = z(null), T = he(), B = he(), F = [
970
975
  ...(r ?? []).map((o) => ({
971
976
  id: o.id,
972
977
  label: o.label,
@@ -987,29 +992,29 @@ function sl({ title: e, icon: t, description: l, meta: s = [], primary: a, secon
987
992
  offer: o.offer,
988
993
  run: o.onSelect
989
994
  }))
990
- ].filter((o) => o.offer.offered), M = P.filter((o) => o.overflow === 0), B = P.filter((o) => o.overflow !== 0), z = M.length === 1 ? M[0] ?? null : null, j = pt(B), K = B.filter((o) => o.overflow === void 0).map((o) => o.id).reverse(), G = [...j, ...K.map((o) => [o])], Y = [...z !== null ? [[z.id]] : [], ...G], ee = a !== void 0 && ((X = a.offer) == null ? void 0 : X.offered) !== !1, ie = (Ne = a == null ? void 0 : a.offer) == null ? void 0 : Ne.refusal, be = a !== void 0 && (((ce = a.offer) == null ? void 0 : ce.offered) === !1 || ie !== void 0), oe = a !== void 0 && "menu" in a ? a.menu.filter((o) => o.offer.offered) : [], de = a !== void 0 && "menu" in a && oe.length > 0 ? a : null, Ce = s.filter((o) => o.elsewhere === !0), fe = JSON.stringify([
995
+ ].filter((o) => o.offer.offered), M = F.filter((o) => o.overflow === 0), R = F.filter((o) => o.overflow !== 0), U = M.length === 1 ? M[0] ?? null : null, j = pt(R), K = R.filter((o) => o.overflow === void 0).map((o) => o.id).reverse(), G = [...j, ...K.map((o) => [o])], Y = [...U !== null ? [[U.id]] : [], ...G], ee = a !== void 0 && ((X = a.offer) == null ? void 0 : X.offered) !== !1, ie = (Ne = a == null ? void 0 : a.offer) == null ? void 0 : Ne.refusal, be = a !== void 0 && (((ce = a.offer) == null ? void 0 : ce.offered) === !1 || ie !== void 0), oe = a !== void 0 && "menu" in a ? a.menu.filter((o) => o.offer.offered) : [], de = a !== void 0 && "menu" in a && oe.length > 0 ? a : null, Ce = s.filter((o) => o.elsewhere === !0), fe = JSON.stringify([
991
996
  e,
992
997
  t ?? null,
993
998
  l ?? null,
994
999
  s.map((o) => [o.id, o.text, o.elsewhere === !0]),
995
1000
  ee ? [a.label, a.icon, de !== null] : null,
996
- P.map((o) => [o.id, o.name, o.icon, o.overflow ?? null])
1001
+ F.map((o) => [o.id, o.name, o.icon, o.overflow ?? null])
997
1002
  ]), te = Ie(() => {
998
- const o = A.current, T = v.current;
999
- if (o === null || T === null) return;
1000
- const S = getComputedStyle(o), H = parseFloat(S.columnGap || "0") || 0, le = o.clientWidth - (parseFloat(S.paddingLeft) || 0) - (parseFloat(S.paddingRight) || 0), J = (re) => {
1003
+ const o = N.current, A = v.current;
1004
+ if (o === null || A === null) return;
1005
+ const C = getComputedStyle(o), P = parseFloat(C.columnGap || "0") || 0, le = o.clientWidth - (parseFloat(C.paddingLeft) || 0) - (parseFloat(C.paddingRight) || 0), J = (re) => {
1001
1006
  var Me;
1002
- return ((Me = T.querySelector(re)) == null ? void 0 : Me.getBoundingClientRect().width) ?? 0;
1007
+ return ((Me = A.querySelector(re)) == null ? void 0 : Me.getBoundingClientRect().width) ?? 0;
1003
1008
  }, ke = J('[data-measure="title"]'), Re = Math.min(ke, ft), He = (re) => {
1004
1009
  const Me = pe(re), xe = [];
1005
1010
  t !== void 0 && xe.push(J('[data-measure="lead"]')), xe.push(re.titleCut ? Re : ke), l !== void 0 && !re.descriptionHidden && xe.push(J('[data-measure="description"]'));
1006
1011
  for (const ve of s) ve.elsewhere === !0 && re.elsewhereHidden || xe.push(J(`[data-measure="meta"][data-measure-id="${CSS.escape(ve.id)}"]`));
1007
- for (const ve of P) {
1012
+ for (const ve of F) {
1008
1013
  if (Me.has(ve.id)) continue;
1009
1014
  const Ze = re.bare.has(ve.id) && ve.icon !== null;
1010
1015
  xe.push(J(`[data-measure="${Ze ? "icon" : "full"}"][data-measure-id="${CSS.escape(ve.id)}"]`));
1011
1016
  }
1012
- return ee && !re.primaryHidden && xe.push(J(`[data-measure="${re.primaryBare ? "primary-icon" : "primary"}"]`)), Me.size > 0 && xe.push(J('[data-measure="more"]')), xe.reduce((ve, Ze) => ve + Ze, 0) + H * Math.max(0, xe.length - 1);
1017
+ return ee && !re.primaryHidden && xe.push(J(`[data-measure="${re.primaryBare ? "primary-icon" : "primary"}"]`)), Me.size > 0 && xe.push(J('[data-measure="more"]')), xe.reduce((ve, Ze) => ve + Ze, 0) + P * Math.max(0, xe.length - 1);
1013
1018
  };
1014
1019
  let V = { ...yn, titleFloor: Re };
1015
1020
  const Oe = (re) => (V = re, He(re) <= le), pn = (() => {
@@ -1031,116 +1036,116 @@ function sl({ title: e, icon: t, description: l, meta: s = [], primary: a, secon
1031
1036
  const _n = ve() ? Ze(Me) : bn;
1032
1037
  return Oe({ ..._n, titleCut: !0 }) ? V : { ..._n, titleCut: !0, chipsCut: !0 };
1033
1038
  })();
1034
- N((re) => ht(re, pn) ? re : pn);
1039
+ k((re) => ht(re, pn) ? re : pn);
1035
1040
  }, [fe]);
1036
1041
  $e(te, [te]), Q(() => {
1037
- const o = A.current;
1042
+ const o = N.current;
1038
1043
  if (o === null || typeof ResizeObserver > "u") return;
1039
- const T = new ResizeObserver(() => te());
1040
- return T.observe(o), () => T.disconnect();
1044
+ const A = new ResizeObserver(() => te());
1045
+ return A.observe(o), () => A.disconnect();
1041
1046
  }, [te]), Q(() => {
1042
1047
  const o = typeof document > "u" ? void 0 : document.fonts;
1043
1048
  if (o === void 0) return;
1044
- let T = !0;
1045
- const S = () => {
1046
- T && te();
1049
+ let A = !0;
1050
+ const C = () => {
1051
+ A && te();
1047
1052
  };
1048
- return o.ready.then(S), o.addEventListener("loadingdone", S), () => {
1049
- T = !1, o.removeEventListener("loadingdone", S);
1053
+ return o.ready.then(C), o.addEventListener("loadingdone", C), () => {
1054
+ A = !1, o.removeEventListener("loadingdone", C);
1050
1055
  };
1051
1056
  }, [te]);
1052
1057
  function pe(o) {
1053
- const T = o.hidden.size + (o.primaryHidden ? 1 : 0);
1054
- return /* @__PURE__ */ new Set([...M.filter((S) => S !== z || T > 0).map((S) => S.id), ...o.hidden, ...o.primaryHidden ? [Ae] : []]);
1058
+ const A = o.hidden.size + (o.primaryHidden ? 1 : 0);
1059
+ return /* @__PURE__ */ new Set([...M.filter((C) => C !== U || A > 0).map((C) => C.id), ...o.hidden, ...o.primaryHidden ? [Ae] : []]);
1055
1060
  }
1056
- const _e = pe(u), we = P.filter((o) => !_e.has(o.id) && o !== z), ne = z !== null && !_e.has(z.id) ? z : null, ye = ee && !u.primaryHidden, w = (o) => P.find((T) => T.id === o), E = G.flat().filter((o) => u.hidden.has(o)).map(w).filter((o) => o !== void 0), W = (o) => ({ id: o.id, label: o.label, offer: o.offer, ...o.danger ? { danger: !0 } : {}, onSelect: o.run }), q = [
1061
+ const _e = pe(u), we = F.filter((o) => !_e.has(o.id) && o !== U), ne = U !== null && !_e.has(U.id) ? U : null, ye = ee && !u.primaryHidden, y = (o) => F.find((A) => A.id === o), E = G.flat().filter((o) => u.hidden.has(o)).map(y).filter((o) => o !== void 0), W = (o) => ({ id: o.id, label: o.label, offer: o.offer, ...o.danger ? { danger: !0 } : {}, onSelect: o.run }), q = [
1057
1062
  ...ee && u.primaryHidden ? [{ id: Ae, label: a.label, offer: a.offer ?? { offered: !0, locked: !1 }, onSelect: () => {
1058
1063
  be || a.onPress();
1059
1064
  } }, ...oe] : [],
1060
1065
  ...E.map(W),
1061
1066
  ..._e.size > 0 ? M.map(W) : []
1062
- ], p = q.length > 0, L = [
1067
+ ], p = q.length > 0, D = [
1063
1068
  ...we.map((o) => o.id),
1064
1069
  ...ne !== null ? [ne.id] : [],
1065
1070
  ...ye ? [Ae, ...de !== null ? ["primary-menu"] : []] : [],
1066
1071
  ...p ? ["more"] : []
1067
- ], Z = h !== null && L.includes(h) ? h : L[0] ?? null;
1072
+ ], Z = f !== null && D.includes(f) ? f : D[0] ?? null;
1068
1073
  Q(() => {
1069
- var o, T;
1070
- h === null || L.includes(h) || !p || ((o = A.current) != null && o.contains(document.activeElement) || document.activeElement === document.body) && (_("more"), (T = y.current) == null || T.focus());
1074
+ var o, A;
1075
+ f === null || D.includes(f) || !p || ((o = N.current) != null && o.contains(document.activeElement) || document.activeElement === document.body) && (x("more"), (A = w.current) == null || A.focus());
1071
1076
  }, [u]);
1072
- const ue = (o) => `${U}-${o}`, ae = (o) => {
1077
+ const ue = (o) => `${B}-${o}`, ae = (o) => {
1073
1078
  var le;
1074
- const T = L.indexOf(Z ?? "");
1075
- let S = null;
1076
- if (o.key === "ArrowRight" ? S = Math.min(L.length - 1, T + 1) : o.key === "ArrowLeft" ? S = Math.max(0, T - 1) : o.key === "Home" ? S = 0 : o.key === "End" && (S = L.length - 1), S === null) return;
1079
+ const A = D.indexOf(Z ?? "");
1080
+ let C = null;
1081
+ if (o.key === "ArrowRight" ? C = Math.min(D.length - 1, A + 1) : o.key === "ArrowLeft" ? C = Math.max(0, A - 1) : o.key === "Home" ? C = 0 : o.key === "End" && (C = D.length - 1), C === null) return;
1077
1082
  o.preventDefault();
1078
- const H = L[S] ?? null;
1079
- _(H), H !== null && ((le = document.getElementById(ue(H))) == null || le.focus());
1080
- }, me = (o, T) => {
1081
- const S = T.getBoundingClientRect();
1082
- g((i == null ? void 0 : i.which) === o ? null : { which: o, x: S.left, y: S.bottom + 4 });
1083
- }, Se = (o) => ({ id: ue(o), tabIndex: Z === o ? 0 : -1, onFocus: () => _(o) }), We = (o, T, S) => T ? {
1084
- ...k === o ? { "data-reason-shown": "" } : {},
1085
- ...C.dismissed(o) ? { "data-tip-dismissed": "" } : {},
1086
- onFocus: (H) => {
1087
- _(o), C.focusIn(o), Te(H.currentTarget, S);
1083
+ const P = D[C] ?? null;
1084
+ x(P), P !== null && ((le = document.getElementById(ue(P))) == null || le.focus());
1085
+ }, me = (o, A) => {
1086
+ const C = A.getBoundingClientRect();
1087
+ g((i == null ? void 0 : i.which) === o ? null : { which: o, x: C.left, y: C.bottom + 4 });
1088
+ }, Se = (o) => ({ id: ue(o), tabIndex: Z === o ? 0 : -1, onFocus: () => x(o) }), We = (o, A, C) => A ? {
1089
+ ...L === o ? { "data-reason-shown": "" } : {},
1090
+ ..._.dismissed(o) ? { "data-tip-dismissed": "" } : {},
1091
+ onFocus: (P) => {
1092
+ x(o), _.focusIn(o), Te(P.currentTarget, C);
1088
1093
  },
1089
1094
  onBlur: () => {
1090
- x((H) => H === o ? null : H), C.focusOut(o);
1095
+ S((P) => P === o ? null : P), _.focusOut(o);
1091
1096
  },
1092
- onMouseEnter: (H) => {
1093
- C.pointerIn(o), Te(H.currentTarget, S);
1097
+ onMouseEnter: (P) => {
1098
+ _.pointerIn(o), Te(P.currentTarget, C);
1094
1099
  },
1095
- onMouseLeave: () => C.pointerOut(o),
1096
- onKeyDown: (H) => {
1097
- H.key === "Escape" && (x((le) => le === o ? null : le), C.dismiss(o));
1100
+ onMouseLeave: () => _.pointerOut(o),
1101
+ onKeyDown: (P) => {
1102
+ P.key === "Escape" && (S((le) => le === o ? null : le), _.dismiss(o));
1098
1103
  }
1099
- } : {}, Fe = (o, T, S) => {
1100
- x(o), C.show(o), Te(T, S);
1101
- }, Te = (o, T) => {
1102
- const S = document.getElementById(T), H = A.current;
1103
- if (S === null || H === null) return;
1104
- const le = S.style.display;
1105
- S.style.display = "block";
1106
- const J = S.offsetWidth;
1107
- S.style.display = le;
1108
- const ke = H.getBoundingClientRect(), Re = o.getBoundingClientRect();
1109
- S.style.left = `${String(mt(Re.left + Re.width / 2 - ke.left, ke.width, J))}px`, S.style.right = "auto";
1110
- }, Ee = (o, T, S) => /* @__PURE__ */ f("span", { id: o, className: "cms-section-header__tip", role: "tooltip", children: [
1111
- S !== null ? /* @__PURE__ */ f("span", { "aria-hidden": "true", children: [
1112
- S,
1104
+ } : {}, Fe = (o, A, C) => {
1105
+ S(o), _.show(o), Te(A, C);
1106
+ }, Te = (o, A) => {
1107
+ const C = document.getElementById(A), P = N.current;
1108
+ if (C === null || P === null) return;
1109
+ const le = C.style.display;
1110
+ C.style.display = "block";
1111
+ const J = C.offsetWidth;
1112
+ C.style.display = le;
1113
+ const ke = P.getBoundingClientRect(), Re = o.getBoundingClientRect();
1114
+ C.style.left = `${String(mt(Re.left + Re.width / 2 - ke.left, ke.width, J))}px`, C.style.right = "auto";
1115
+ }, Ee = (o, A, C) => /* @__PURE__ */ h("span", { id: o, className: "cms-section-header__tip", role: "tooltip", children: [
1116
+ C !== null ? /* @__PURE__ */ h("span", { "aria-hidden": "true", children: [
1117
+ C,
1113
1118
  ": "
1114
1119
  ] }) : null,
1115
- T
1116
- ] }), R = (o) => {
1117
- const T = u.bare.has(o.id) && o.icon !== null, S = o.offer.refusal, H = `${U}-reason-${o.id}`;
1118
- return /* @__PURE__ */ f(
1120
+ A
1121
+ ] }), O = (o) => {
1122
+ const A = u.bare.has(o.id) && o.icon !== null, C = o.offer.refusal, P = `${B}-reason-${o.id}`;
1123
+ return /* @__PURE__ */ h(
1119
1124
  "button",
1120
1125
  {
1121
1126
  type: "button",
1122
- className: F("cms-button", "cms-button--quiet", "cms-section-header__secondary", T && "cms-section-header__secondary--bare", o.danger && "is-danger"),
1127
+ className: H("cms-button", "cms-button--quiet", "cms-section-header__secondary", A && "cms-section-header__secondary--bare", o.danger && "is-danger"),
1123
1128
  "data-action": o.id,
1124
- "aria-label": T || S !== void 0 ? o.name : void 0,
1125
- "aria-disabled": S !== void 0 ? "true" : void 0,
1126
- "aria-describedby": S !== void 0 ? H : void 0,
1127
- title: S === void 0 && T ? o.name : void 0,
1129
+ "aria-label": A || C !== void 0 ? o.name : void 0,
1130
+ "aria-disabled": C !== void 0 ? "true" : void 0,
1131
+ "aria-describedby": C !== void 0 ? P : void 0,
1132
+ title: C === void 0 && A ? o.name : void 0,
1128
1133
  ...Se(o.id),
1129
- ...We(o.id, S !== void 0, H),
1134
+ ...We(o.id, C !== void 0, P),
1130
1135
  onClick: (le) => {
1131
- S === void 0 ? o.run() : Fe(o.id, le.currentTarget, H);
1136
+ C === void 0 ? o.run() : Fe(o.id, le.currentTarget, P);
1132
1137
  },
1133
1138
  children: [
1134
1139
  o.icon !== null ? /* @__PURE__ */ n($, { name: o.icon, size: 18 }) : null,
1135
- T ? null : /* @__PURE__ */ n("span", { className: "cms-section-header__label", children: o.label }),
1136
- S !== void 0 ? Ee(H, S, T ? o.name : null) : null
1140
+ A ? null : /* @__PURE__ */ n("span", { className: "cms-section-header__label", children: o.label }),
1141
+ C !== void 0 ? Ee(P, C, A ? o.name : null) : null
1137
1142
  ]
1138
1143
  },
1139
1144
  o.id
1140
1145
  );
1141
1146
  };
1142
- return /* @__PURE__ */ f("header", { className: F("cms-section-header", b && "cms-section-header--full"), children: [
1143
- /* @__PURE__ */ f("div", { ref: A, className: F("cms-section-header__row", u.chipsCut && "cms-section-header__row--chips-cut"), "data-row": "1", children: [
1147
+ return /* @__PURE__ */ h("header", { className: H("cms-section-header", b && "cms-section-header--full"), children: [
1148
+ /* @__PURE__ */ h("div", { ref: N, className: H("cms-section-header__row", u.chipsCut && "cms-section-header__row--chips-cut"), "data-row": "1", children: [
1144
1149
  t !== void 0 ? /* @__PURE__ */ n($, { name: t }) : null,
1145
1150
  /* @__PURE__ */ n(
1146
1151
  "h1",
@@ -1151,41 +1156,41 @@ function sl({ title: e, icon: t, description: l, meta: s = [], primary: a, secon
1151
1156
  children: e
1152
1157
  }
1153
1158
  ),
1154
- l !== void 0 ? /* @__PURE__ */ n("span", { className: F("cms-section-header__description", u.descriptionHidden && "cms-visually-hidden"), children: l }) : null,
1155
- s.map((o, T) => /* @__PURE__ */ n(
1159
+ l !== void 0 ? /* @__PURE__ */ n("span", { className: H("cms-section-header__description", u.descriptionHidden && "cms-visually-hidden"), children: l }) : null,
1160
+ s.map((o, A) => /* @__PURE__ */ n(
1156
1161
  "span",
1157
1162
  {
1158
1163
  className: "cms-section-header__meta",
1159
1164
  "data-meta": o.id,
1160
1165
  hidden: o.elsewhere === !0 && u.elsewhereHidden,
1161
- style: u.chipsCut && o.elsewhere !== !0 ? { flexShrink: T + 1 } : void 0,
1166
+ style: u.chipsCut && o.elsewhere !== !0 ? { flexShrink: A + 1 } : void 0,
1162
1167
  ...u.chipsCut && o.elsewhere !== !0 ? { title: o.text, "aria-label": o.text } : {},
1163
1168
  children: o.content
1164
1169
  },
1165
1170
  o.id
1166
1171
  )),
1167
- /* @__PURE__ */ f("div", { className: "cms-section-header__actions", role: "toolbar", "aria-label": e, onKeyDown: ae, children: [
1168
- we.map(R),
1169
- ne !== null ? R(ne) : null,
1170
- ye ? /* @__PURE__ */ f("span", { className: F("cms-section-header__primary", de !== null && "cms-section-header__primary--split"), children: [
1171
- /* @__PURE__ */ f(
1172
+ /* @__PURE__ */ h("div", { className: "cms-section-header__actions", role: "toolbar", "aria-label": e, onKeyDown: ae, children: [
1173
+ we.map(O),
1174
+ ne !== null ? O(ne) : null,
1175
+ ye ? /* @__PURE__ */ h("span", { className: H("cms-section-header__primary", de !== null && "cms-section-header__primary--split"), children: [
1176
+ /* @__PURE__ */ h(
1172
1177
  "button",
1173
1178
  {
1174
1179
  type: "button",
1175
- className: F("cms-button", "cms-button--primary", u.primaryBare && "cms-section-header__primary--bare"),
1180
+ className: H("cms-button", "cms-button--primary", u.primaryBare && "cms-section-header__primary--bare"),
1176
1181
  "data-action": "primary",
1177
1182
  "aria-label": u.primaryBare ? a.label : void 0,
1178
1183
  "aria-disabled": be ? "true" : void 0,
1179
- "aria-describedby": ie !== void 0 ? I : void 0,
1184
+ "aria-describedby": ie !== void 0 ? T : void 0,
1180
1185
  title: u.primaryBare && ie === void 0 ? a.label : void 0,
1181
1186
  ...Se(Ae),
1182
- ...We(Ae, ie !== void 0, I),
1187
+ ...We(Ae, ie !== void 0, T),
1183
1188
  onClick: (o) => {
1184
- be ? ie !== void 0 && Fe(Ae, o.currentTarget, I) : a.onPress();
1189
+ be ? ie !== void 0 && Fe(Ae, o.currentTarget, T) : a.onPress();
1185
1190
  },
1186
1191
  children: [
1187
1192
  /* @__PURE__ */ n($, { name: a.icon }),
1188
- u.primaryBare ? null : /* @__PURE__ */ f(ge, { children: [
1193
+ u.primaryBare ? null : /* @__PURE__ */ h(ge, { children: [
1189
1194
  " ",
1190
1195
  /* @__PURE__ */ n("span", { children: a.label })
1191
1196
  ] })
@@ -1206,12 +1211,12 @@ function sl({ title: e, icon: t, description: l, meta: s = [], primary: a, secon
1206
1211
  children: /* @__PURE__ */ n($, { name: "chevron-down" })
1207
1212
  }
1208
1213
  ) : null,
1209
- ie !== void 0 ? Ee(I, ie, u.primaryBare ? a.label : null) : null
1214
+ ie !== void 0 ? Ee(T, ie, u.primaryBare ? a.label : null) : null
1210
1215
  ] }) : null,
1211
1216
  p ? /* @__PURE__ */ n(
1212
1217
  "button",
1213
1218
  {
1214
- ref: y,
1219
+ ref: w,
1215
1220
  type: "button",
1216
1221
  className: "cms-section-header__more",
1217
1222
  "data-action": "more",
@@ -1225,28 +1230,28 @@ function sl({ title: e, icon: t, description: l, meta: s = [], primary: a, secon
1225
1230
  }
1226
1231
  ) : null
1227
1232
  ] }),
1228
- /* @__PURE__ */ f("div", { ref: v, className: "cms-section-header__measure", "aria-hidden": "true", children: [
1233
+ /* @__PURE__ */ h("div", { ref: v, className: "cms-section-header__measure", "aria-hidden": "true", children: [
1229
1234
  t !== void 0 ? /* @__PURE__ */ n("span", { "data-measure": "lead", children: /* @__PURE__ */ n($, { name: t }) }) : null,
1230
1235
  /* @__PURE__ */ n("span", { "data-measure": "title", className: "cms-section-header__title", children: e }),
1231
1236
  l !== void 0 ? /* @__PURE__ */ n("span", { "data-measure": "description", className: "cms-section-header__description", children: l }) : null,
1232
1237
  s.map((o) => /* @__PURE__ */ n("span", { "data-measure": "meta", "data-measure-id": o.id, className: "cms-section-header__meta", children: o.content }, o.id)),
1233
- P.map((o) => /* @__PURE__ */ f("span", { children: [
1234
- /* @__PURE__ */ f("span", { "data-measure": "full", "data-measure-id": o.id, className: "cms-button cms-button--quiet cms-section-header__secondary", children: [
1238
+ F.map((o) => /* @__PURE__ */ h("span", { children: [
1239
+ /* @__PURE__ */ h("span", { "data-measure": "full", "data-measure-id": o.id, className: "cms-button cms-button--quiet cms-section-header__secondary", children: [
1235
1240
  o.icon !== null ? /* @__PURE__ */ n($, { name: o.icon, size: 18 }) : null,
1236
1241
  /* @__PURE__ */ n("span", { className: "cms-section-header__label", children: o.label })
1237
1242
  ] }),
1238
1243
  /* @__PURE__ */ n("span", { "data-measure": "icon", "data-measure-id": o.id, className: "cms-button cms-button--quiet cms-section-header__secondary cms-section-header__secondary--bare", children: o.icon !== null ? /* @__PURE__ */ n($, { name: o.icon, size: 18 }) : null })
1239
1244
  ] }, o.id)),
1240
- ee ? /* @__PURE__ */ f(ge, { children: [
1241
- /* @__PURE__ */ f("span", { "data-measure": "primary", className: "cms-section-header__primary", children: [
1242
- /* @__PURE__ */ f("span", { className: "cms-button cms-button--primary", children: [
1245
+ ee ? /* @__PURE__ */ h(ge, { children: [
1246
+ /* @__PURE__ */ h("span", { "data-measure": "primary", className: "cms-section-header__primary", children: [
1247
+ /* @__PURE__ */ h("span", { className: "cms-button cms-button--primary", children: [
1243
1248
  /* @__PURE__ */ n($, { name: a.icon }),
1244
1249
  " ",
1245
1250
  /* @__PURE__ */ n("span", { children: a.label })
1246
1251
  ] }),
1247
1252
  de !== null ? /* @__PURE__ */ n("span", { className: "cms-button cms-button--primary cms-section-header__split", children: /* @__PURE__ */ n($, { name: "chevron-down" }) }) : null
1248
1253
  ] }),
1249
- /* @__PURE__ */ f("span", { "data-measure": "primary-icon", className: "cms-section-header__primary", children: [
1254
+ /* @__PURE__ */ h("span", { "data-measure": "primary-icon", className: "cms-section-header__primary", children: [
1250
1255
  /* @__PURE__ */ n("span", { className: "cms-button cms-button--primary cms-section-header__primary--bare", children: /* @__PURE__ */ n($, { name: a.icon }) }),
1251
1256
  de !== null ? /* @__PURE__ */ n("span", { className: "cms-button cms-button--primary cms-section-header__split", children: /* @__PURE__ */ n($, { name: "chevron-down" }) }) : null
1252
1257
  ] })
@@ -1265,14 +1270,14 @@ function pt(e) {
1265
1270
  return [...t.entries()].sort(([l], [s]) => l - s).map(([, l]) => l);
1266
1271
  }
1267
1272
  function al({ head: e, children: t, className: l, scrollRef: s, onScroll: a, bodyProps: r }) {
1268
- return /* @__PURE__ */ f("div", { className: F("cms-column", l), children: [
1273
+ return /* @__PURE__ */ h("div", { className: H("cms-column", l), children: [
1269
1274
  e == null ? null : /* @__PURE__ */ n("div", { className: "cms-column__head", children: e }),
1270
- /* @__PURE__ */ n("div", { ...r, className: F("cms-column__body", r == null ? void 0 : r.className), ref: s, onScroll: a, children: t })
1275
+ /* @__PURE__ */ n("div", { ...r, className: H("cms-column__body", r == null ? void 0 : r.className), ref: s, onScroll: a, children: t })
1271
1276
  ] });
1272
1277
  }
1273
1278
  function rl({ title: e, scope: t, actions: l, backLink: s }) {
1274
- return /* @__PURE__ */ f("header", { className: "cms-page-header", children: [
1275
- s ? /* @__PURE__ */ f(
1279
+ return /* @__PURE__ */ h("header", { className: "cms-page-header", children: [
1280
+ s ? /* @__PURE__ */ h(
1276
1281
  "a",
1277
1282
  {
1278
1283
  className: "cms-page-header__back",
@@ -1287,8 +1292,8 @@ function rl({ title: e, scope: t, actions: l, backLink: s }) {
1287
1292
  ]
1288
1293
  }
1289
1294
  ) : null,
1290
- /* @__PURE__ */ f("div", { className: "cms-page-header__row", children: [
1291
- /* @__PURE__ */ f("div", { className: "cms-page-header__titles", children: [
1295
+ /* @__PURE__ */ h("div", { className: "cms-page-header__row", children: [
1296
+ /* @__PURE__ */ h("div", { className: "cms-page-header__titles", children: [
1292
1297
  /* @__PURE__ */ n("h1", { className: "cms-page-header__title", children: e }),
1293
1298
  t != null ? /* @__PURE__ */ n("p", { className: "cms-page-header__scope", children: t }) : null
1294
1299
  ] }),
@@ -1297,7 +1302,7 @@ function rl({ title: e, scope: t, actions: l, backLink: s }) {
1297
1302
  ] });
1298
1303
  }
1299
1304
  function il({ tabs: e, active: t, onSelect: l, label: s }) {
1300
- const a = O([]), r = (m, c) => {
1305
+ const a = z([]), r = (m, c) => {
1301
1306
  var g;
1302
1307
  const d = e.length - 1, b = m.key === "ArrowRight" ? c === d ? 0 : c + 1 : m.key === "ArrowLeft" ? c === 0 ? d : c - 1 : m.key === "Home" ? 0 : m.key === "End" ? d : null;
1303
1308
  if (b === null) return;
@@ -1307,7 +1312,7 @@ function il({ tabs: e, active: t, onSelect: l, label: s }) {
1307
1312
  };
1308
1313
  return /* @__PURE__ */ n("div", { className: "cms-tabs", role: "tablist", "aria-label": s, children: e.map((m, c) => {
1309
1314
  const d = m.id === t;
1310
- return /* @__PURE__ */ f(
1315
+ return /* @__PURE__ */ h(
1311
1316
  "button",
1312
1317
  {
1313
1318
  ref: (b) => {
@@ -1315,7 +1320,7 @@ function il({ tabs: e, active: t, onSelect: l, label: s }) {
1315
1320
  },
1316
1321
  type: "button",
1317
1322
  role: "tab",
1318
- className: F("cms-tab", d && "is-active"),
1323
+ className: H("cms-tab", d && "is-active"),
1319
1324
  "aria-selected": d,
1320
1325
  tabIndex: d ? 0 : -1,
1321
1326
  onClick: () => l(m.id),
@@ -1343,18 +1348,18 @@ function _t(e) {
1343
1348
  return t % 6 + 1;
1344
1349
  }
1345
1350
  function Ye({ name: e, pictureUrl: t, presence: l, connection: s, deleted: a = !1, placeholder: r = !1, size: m = 32, tintSeed: c, unnamedLabel: d }) {
1346
- const b = a || r, i = bt(e) || "?", g = e.trim() === "" ? (d == null ? void 0 : d.trim()) || "?" : e, u = s !== void 0 ? `is-${s.state === "offline" ? "disconnected" : s.state}` : l === void 0 ? null : `is-${l === "busy" ? "away" : l}`, N = s !== void 0 ? `${g}, ${s.label}` : l ? `${g}, ${l}` : g;
1347
- return /* @__PURE__ */ f(
1351
+ const b = a || r, i = bt(e) || "?", g = e.trim() === "" ? (d == null ? void 0 : d.trim()) || "?" : e, u = s !== void 0 ? `is-${s.state === "offline" ? "disconnected" : s.state}` : l === void 0 ? null : `is-${l === "busy" ? "away" : l}`, k = s !== void 0 ? `${g}, ${s.label}` : l ? `${g}, ${l}` : g;
1352
+ return /* @__PURE__ */ h(
1348
1353
  "span",
1349
1354
  {
1350
- className: F("cms-avatar", b ? "cms-avatar--deleted" : `cms-avatar--tint-${_t(c ?? e)}`),
1355
+ className: H("cms-avatar", b ? "cms-avatar--deleted" : `cms-avatar--tint-${_t(c ?? e)}`),
1351
1356
  style: { width: m, height: m, fontSize: Math.round(m * 0.4) },
1352
1357
  role: "img",
1353
- "aria-label": N,
1358
+ "aria-label": k,
1354
1359
  ...s === void 0 ? {} : { title: s.label },
1355
1360
  children: [
1356
1361
  b ? /* @__PURE__ */ n($, { name: "user", size: Math.round(m * 0.6) }) : t ? /* @__PURE__ */ n("img", { src: t, alt: "", className: "cms-avatar__picture" }) : /* @__PURE__ */ n("span", { "aria-hidden": "true", children: i }),
1357
- u === null ? null : /* @__PURE__ */ n("span", { className: F("cms-avatar__presence", u), "aria-hidden": "true" })
1362
+ u === null ? null : /* @__PURE__ */ n("span", { className: H("cms-avatar__presence", u), "aria-hidden": "true" })
1358
1363
  ]
1359
1364
  }
1360
1365
  );
@@ -1385,25 +1390,25 @@ function wt(e) {
1385
1390
  }
1386
1391
  }
1387
1392
  function yt({ storageKey: e, value: t, default: l, min: s, max: a, step: r = 16, label: m, onChange: c, className: d, style: b }) {
1388
- const i = Math.max(s, a), g = (v) => Math.round(Math.min(Math.max(v, s), i)), [u, N] = D(() => {
1393
+ const i = Math.max(s, a), g = (v) => Math.round(Math.min(Math.max(v, s), i)), [u, k] = I(() => {
1389
1394
  const v = e === void 0 ? null : tn(e);
1390
1395
  return g(v ?? l);
1391
- }), h = g(t ?? u), _ = O(null), [k, x] = D(!1);
1396
+ }), f = g(t ?? u), x = z(null), [L, S] = I(!1);
1392
1397
  $e(() => {
1393
1398
  if (e === void 0) return;
1394
1399
  const v = tn(e);
1395
1400
  if (v === null) return;
1396
- const y = g(v);
1397
- (t === void 0 || y !== g(t)) && (N(y), c(y, !0));
1401
+ const w = g(v);
1402
+ (t === void 0 || w !== g(t)) && (k(w), c(w, !0));
1398
1403
  }, []), $e(() => {
1399
1404
  t !== void 0 && g(t) !== t && c(g(t), !0);
1400
1405
  }, [t, s, i]);
1401
- const C = (v, y) => {
1402
- const I = g(v);
1403
- N(I), y && gt(e, I), c(I, y);
1404
- }, A = () => {
1405
- const v = _.current;
1406
- _.current = null, x(!1), v !== null && v.last !== v.from && C(v.last, !0);
1406
+ const _ = (v, w) => {
1407
+ const T = g(v);
1408
+ k(T), w && gt(e, T), c(T, w);
1409
+ }, N = () => {
1410
+ const v = x.current;
1411
+ x.current = null, S(!1), v !== null && v.last !== v.from && _(v.last, !0);
1407
1412
  };
1408
1413
  return /* @__PURE__ */ n(
1409
1414
  "div",
@@ -1412,60 +1417,60 @@ function yt({ storageKey: e, value: t, default: l, min: s, max: a, step: r = 16,
1412
1417
  tabIndex: 0,
1413
1418
  "aria-orientation": "vertical",
1414
1419
  "aria-label": m,
1415
- "aria-valuenow": h,
1420
+ "aria-valuenow": f,
1416
1421
  "aria-valuemin": s,
1417
1422
  "aria-valuemax": i,
1418
- className: F("cms-splitter", k && "is-dragging", h <= s && "is-at-min", h >= i && "is-at-max", d),
1423
+ className: H("cms-splitter", L && "is-dragging", f <= s && "is-at-min", f >= i && "is-at-max", d),
1419
1424
  style: b,
1420
1425
  onPointerDown: (v) => {
1421
- var I, U;
1426
+ var T, B;
1422
1427
  if (v.button > 0) return;
1423
- v.preventDefault(), (U = (I = v.currentTarget).setPointerCapture) == null || U.call(I, v.pointerId);
1424
- const y = getComputedStyle(v.currentTarget).direction === "rtl" ? -1 : 1;
1425
- _.current = { x: v.clientX, from: h, last: h, sign: y }, x(!0);
1428
+ v.preventDefault(), (B = (T = v.currentTarget).setPointerCapture) == null || B.call(T, v.pointerId);
1429
+ const w = getComputedStyle(v.currentTarget).direction === "rtl" ? -1 : 1;
1430
+ x.current = { x: v.clientX, from: f, last: f, sign: w }, S(!0);
1426
1431
  },
1427
1432
  onPointerMove: (v) => {
1428
- const y = _.current;
1429
- y === null || !Number.isFinite(v.clientX) || (y.last = g(y.from + y.sign * (v.clientX - y.x)), C(y.last, !1));
1433
+ const w = x.current;
1434
+ w === null || !Number.isFinite(v.clientX) || (w.last = g(w.from + w.sign * (v.clientX - w.x)), _(w.last, !1));
1430
1435
  },
1431
- onPointerUp: A,
1432
- onPointerCancel: A,
1436
+ onPointerUp: N,
1437
+ onPointerCancel: N,
1433
1438
  onDoubleClick: () => {
1434
1439
  wt(e);
1435
1440
  const v = g(l);
1436
- N(v), c(v, !0);
1441
+ k(v), c(v, !0);
1437
1442
  },
1438
1443
  onKeyDown: (v) => {
1439
- const y = v.shiftKey ? vt : r, I = getComputedStyle(v.currentTarget).direction === "rtl" ? -1 : 1, U = v.key === "ArrowLeft" ? h - I * y : v.key === "ArrowRight" ? h + I * y : v.key === "Home" ? s : v.key === "End" ? i : null;
1440
- U !== null && (v.preventDefault(), C(U, !0));
1444
+ const w = v.shiftKey ? vt : r, T = getComputedStyle(v.currentTarget).direction === "rtl" ? -1 : 1, B = v.key === "ArrowLeft" ? f - T * w : v.key === "ArrowRight" ? f + T * w : v.key === "Home" ? s : v.key === "End" ? i : null;
1445
+ B !== null && (v.preventDefault(), _(B, !0));
1441
1446
  }
1442
1447
  }
1443
1448
  );
1444
1449
  }
1445
1450
  function Nt({ count: e, label: t, max: l = 99 }) {
1446
- return e <= 0 ? null : /* @__PURE__ */ f("span", { className: "cms-badge", children: [
1451
+ return e <= 0 ? null : /* @__PURE__ */ h("span", { className: "cms-badge", children: [
1447
1452
  /* @__PURE__ */ n("span", { "aria-hidden": "true", children: e > l ? `${l}+` : e }),
1448
1453
  /* @__PURE__ */ n("span", { className: "cms-visually-hidden", children: t })
1449
1454
  ] });
1450
1455
  }
1451
1456
  function ol({ product: e, mark: t, rail: l, active: s, onNavigate: a, server: r, search: m, account: c, children: d, railLabel: b = "Sections" }) {
1452
- return /* @__PURE__ */ f("div", { className: "cms-shell", children: [
1453
- /* @__PURE__ */ f("nav", { className: "cms-shell__rail", "aria-label": b, children: [
1457
+ return /* @__PURE__ */ h("div", { className: "cms-shell", children: [
1458
+ /* @__PURE__ */ h("nav", { className: "cms-shell__rail", "aria-label": b, children: [
1454
1459
  /* @__PURE__ */ n("span", { className: "cms-shell__mark", "aria-hidden": "true", children: t }),
1455
1460
  /* @__PURE__ */ n("ul", { className: "cms-shell__items", children: l.map((i) => {
1456
1461
  const g = i.id === s;
1457
- return /* @__PURE__ */ n("li", { children: /* @__PURE__ */ f(
1462
+ return /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(
1458
1463
  "a",
1459
1464
  {
1460
1465
  href: i.href,
1461
- className: F("cms-shell__item", g && "is-active"),
1466
+ className: H("cms-shell__item", g && "is-active"),
1462
1467
  "aria-current": g ? "page" : void 0,
1463
1468
  title: i.label,
1464
1469
  onClick: (u) => {
1465
1470
  a && (u.preventDefault(), a(i.id));
1466
1471
  },
1467
1472
  children: [
1468
- /* @__PURE__ */ f("span", { className: "cms-shell__icon", children: [
1473
+ /* @__PURE__ */ h("span", { className: "cms-shell__icon", children: [
1469
1474
  /* @__PURE__ */ n($, { name: i.icon, size: 22 }),
1470
1475
  i.badge ? /* @__PURE__ */ n(Nt, { count: i.badge.count, label: i.badge.label }) : null
1471
1476
  ] }),
@@ -1475,7 +1480,7 @@ function ol({ product: e, mark: t, rail: l, active: s, onNavigate: a, server: r,
1475
1480
  ) }, i.id);
1476
1481
  }) })
1477
1482
  ] }),
1478
- /* @__PURE__ */ f("header", { className: "cms-shell__top", children: [
1483
+ /* @__PURE__ */ h("header", { className: "cms-shell__top", children: [
1479
1484
  /* @__PURE__ */ n("span", { className: "cms-shell__product", children: e }),
1480
1485
  r != null ? /* @__PURE__ */ n("div", { className: "cms-shell__server", children: r }) : null,
1481
1486
  m != null ? /* @__PURE__ */ n("div", { className: "cms-shell__search", children: m }) : null,
@@ -1485,7 +1490,7 @@ function ol({ product: e, mark: t, rail: l, active: s, onNavigate: a, server: r,
1485
1490
  ] });
1486
1491
  }
1487
1492
  function cl({ label: e, placeholder: t, value: l, onChange: s, onSearch: a }) {
1488
- return /* @__PURE__ */ f(
1493
+ return /* @__PURE__ */ h(
1489
1494
  "form",
1490
1495
  {
1491
1496
  role: "search",
@@ -1520,52 +1525,52 @@ function kt(e, t, l) {
1520
1525
  return s;
1521
1526
  }
1522
1527
  function dl({ panes: e, active: t, back: l, sizes: s, lastMin: a = 360, onResize: r, storageKey: m }) {
1523
- const c = Math.min(Math.max(t ?? e.length - 1, 0), e.length - 1), d = O(null), [b, i] = D(0), g = (s ?? []).slice(0, e.length - 1), [u, N] = D(() => m === void 0 ? [] : g.map((v, y) => tn(`${m}:${String(y)}`) ?? void 0)), [h, _] = D(!1), k = g.map((v, y) => v !== void 0 && u[y] !== void 0 ? { ...v, width: u[y] } : v), x = k.length === e.length - 1 && k.every((v) => v !== void 0);
1528
+ const c = Math.min(Math.max(t ?? e.length - 1, 0), e.length - 1), d = z(null), [b, i] = I(0), g = (s ?? []).slice(0, e.length - 1), [u, k] = I(() => m === void 0 ? [] : g.map((v, w) => tn(`${m}:${String(w)}`) ?? void 0)), [f, x] = I(!1), L = g.map((v, w) => v !== void 0 && u[w] !== void 0 ? { ...v, width: u[w] } : v), S = L.length === e.length - 1 && L.every((v) => v !== void 0);
1524
1529
  $e(() => {
1525
1530
  const v = d.current;
1526
- if (v === null || !x) return;
1527
- const y = () => i(v.clientWidth);
1528
- if (y(), typeof ResizeObserver > "u") return;
1529
- const I = new ResizeObserver(y);
1530
- return I.observe(v), () => I.disconnect();
1531
- }, [x]);
1532
- const C = x ? kt(k, b > 0 ? b : Number.POSITIVE_INFINITY, a) : [], A = x ? Object.fromEntries(C.flatMap((v, y) => [
1533
- [`--split-pane-${String(y)}`, `${String(v)}px`],
1534
- [`--split-pane-end-${String(y)}`, `${String(C.slice(0, y + 1).reduce((I, U) => I + U, 0))}px`]
1531
+ if (v === null || !S) return;
1532
+ const w = () => i(v.clientWidth);
1533
+ if (w(), typeof ResizeObserver > "u") return;
1534
+ const T = new ResizeObserver(w);
1535
+ return T.observe(v), () => T.disconnect();
1536
+ }, [S]);
1537
+ const _ = S ? kt(L, b > 0 ? b : Number.POSITIVE_INFINITY, a) : [], N = S ? Object.fromEntries(_.flatMap((v, w) => [
1538
+ [`--split-pane-${String(w)}`, `${String(v)}px`],
1539
+ [`--split-pane-end-${String(w)}`, `${String(_.slice(0, w + 1).reduce((T, B) => T + B, 0))}px`]
1535
1540
  ])) : void 0;
1536
- return /* @__PURE__ */ f(
1541
+ return /* @__PURE__ */ h(
1537
1542
  "div",
1538
1543
  {
1539
1544
  ref: d,
1540
- className: F("cms-panes", e.length === 3 ? "cms-panes--three" : "cms-panes--two", x && "cms-panes--sized", h && "is-resizing"),
1545
+ className: H("cms-panes", e.length === 3 ? "cms-panes--three" : "cms-panes--two", S && "cms-panes--sized", f && "is-resizing"),
1541
1546
  "data-active": c,
1542
- style: A,
1547
+ style: N,
1543
1548
  children: [
1544
- e.map((v, y) => /* @__PURE__ */ f("section", { className: "cms-panes__pane", "aria-label": v.label, "data-offset": c - y, children: [
1545
- y === c && l ? /* @__PURE__ */ f("a", { className: "cms-panes__back", href: l.href, children: [
1549
+ e.map((v, w) => /* @__PURE__ */ h("section", { className: "cms-panes__pane", "aria-label": v.label, "data-offset": c - w, children: [
1550
+ w === c && l ? /* @__PURE__ */ h("a", { className: "cms-panes__back", href: l.href, children: [
1546
1551
  /* @__PURE__ */ n($, { name: "chevron-left", size: 18 }),
1547
1552
  l.label
1548
1553
  ] }) : null,
1549
1554
  v.content
1550
1555
  ] }, v.label)),
1551
- x ? k.map((v, y) => {
1552
- const I = C.reduce((P, M, B) => B === y ? P : P + M, 0), U = Math.max(v.min, Math.min(v.max, b > 0 ? b - I - a : v.max));
1556
+ S ? L.map((v, w) => {
1557
+ const T = _.reduce((F, M, R) => R === w ? F : F + M, 0), B = Math.max(v.min, Math.min(v.max, b > 0 ? b - T - a : v.max));
1553
1558
  return /* @__PURE__ */ n(
1554
1559
  yt,
1555
1560
  {
1556
- ...m === void 0 ? {} : { storageKey: `${m}:${String(y)}` },
1557
- value: C[y],
1561
+ ...m === void 0 ? {} : { storageKey: `${m}:${String(w)}` },
1562
+ value: _[w],
1558
1563
  default: v.reset,
1559
1564
  min: v.min,
1560
- max: U,
1565
+ max: B,
1561
1566
  label: v.label,
1562
1567
  className: "cms-panes__splitter",
1563
- style: { "--split-at": `var(--split-pane-end-${String(y)})` },
1564
- onChange: (P, M) => {
1565
- m !== void 0 && N((B) => {
1566
- const z = [...B];
1567
- return z[y] = P, z;
1568
- }), _(!M), r == null || r(y, P, M);
1568
+ style: { "--split-at": `var(--split-pane-end-${String(w)})` },
1569
+ onChange: (F, M) => {
1570
+ m !== void 0 && k((R) => {
1571
+ const U = [...R];
1572
+ return U[w] = F, U;
1573
+ }), x(!M), r == null || r(w, F, M);
1569
1574
  }
1570
1575
  },
1571
1576
  v.label
@@ -1577,10 +1582,10 @@ function dl({ panes: e, active: t, back: l, sizes: s, lastMin: a = 360, onResize
1577
1582
  }
1578
1583
  const xt = { attachment: "Has an attachment", unread: "Unread" };
1579
1584
  function ul({ from: e, fromPlaceholder: t = !1, subject: l, preview: s, time: a, unread: r, hasAttachment: m, selected: c, onOpen: d, check: b, selecting: i, labels: g }) {
1580
- const u = qe(xt, g), N = /* @__PURE__ */ n(Ye, { name: e, size: 40, placeholder: t });
1581
- return /* @__PURE__ */ f("div", { className: F("cms-mail-row", r && "is-unread", c && "is-selected", i && "is-selecting", (b == null ? void 0 : b.checked) && "is-checked"), children: [
1582
- b !== void 0 ? /* @__PURE__ */ f("span", { className: "cms-mail-row__lead", children: [
1583
- N,
1585
+ const u = qe(xt, g), k = /* @__PURE__ */ n(Ye, { name: e, size: 40, placeholder: t });
1586
+ return /* @__PURE__ */ h("div", { className: H("cms-mail-row", r && "is-unread", c && "is-selected", i && "is-selecting", (b == null ? void 0 : b.checked) && "is-checked"), children: [
1587
+ b !== void 0 ? /* @__PURE__ */ h("span", { className: "cms-mail-row__lead", children: [
1588
+ k,
1584
1589
  /* @__PURE__ */ n(
1585
1590
  "input",
1586
1591
  {
@@ -1593,17 +1598,17 @@ function ul({ from: e, fromPlaceholder: t = !1, subject: l, preview: s, time: a,
1593
1598
  "aria-label": b.label,
1594
1599
  onChange: () => {
1595
1600
  },
1596
- onClick: (h) => {
1597
- if (h.stopPropagation(), b.pending) {
1598
- h.preventDefault();
1601
+ onClick: (f) => {
1602
+ if (f.stopPropagation(), b.pending) {
1603
+ f.preventDefault();
1599
1604
  return;
1600
1605
  }
1601
- b.onCheck({ shift: h.shiftKey, toggle: h.ctrlKey || h.metaKey });
1606
+ b.onCheck({ shift: f.shiftKey, toggle: f.ctrlKey || f.metaKey });
1602
1607
  }
1603
1608
  }
1604
1609
  )
1605
1610
  ] }) : null,
1606
- /* @__PURE__ */ f(
1611
+ /* @__PURE__ */ h(
1607
1612
  "button",
1608
1613
  {
1609
1614
  type: "button",
@@ -1611,14 +1616,14 @@ function ul({ from: e, fromPlaceholder: t = !1, subject: l, preview: s, time: a,
1611
1616
  "aria-current": c ? "true" : void 0,
1612
1617
  onClick: d,
1613
1618
  children: [
1614
- b === void 0 ? N : null,
1615
- /* @__PURE__ */ f("span", { className: "cms-mail-row__body", children: [
1616
- /* @__PURE__ */ f("span", { className: "cms-mail-row__line", children: [
1619
+ b === void 0 ? k : null,
1620
+ /* @__PURE__ */ h("span", { className: "cms-mail-row__body", children: [
1621
+ /* @__PURE__ */ h("span", { className: "cms-mail-row__line", children: [
1617
1622
  /* @__PURE__ */ n("span", { className: "cms-mail-row__from", children: e }),
1618
1623
  m ? /* @__PURE__ */ n($, { name: "paperclip", size: 16, label: u.attachment }) : null,
1619
1624
  /* @__PURE__ */ n("span", { className: "cms-mail-row__time", children: a })
1620
1625
  ] }),
1621
- /* @__PURE__ */ f("span", { className: "cms-mail-row__line", children: [
1626
+ /* @__PURE__ */ h("span", { className: "cms-mail-row__line", children: [
1622
1627
  /* @__PURE__ */ n("span", { className: "cms-mail-row__subject", children: l }),
1623
1628
  r ? /* @__PURE__ */ n("span", { className: "cms-mail-row__dot", role: "img", "aria-label": u.unread }) : null
1624
1629
  ] }),
@@ -1630,11 +1635,11 @@ function ul({ from: e, fromPlaceholder: t = !1, subject: l, preview: s, time: a,
1630
1635
  ] });
1631
1636
  }
1632
1637
  function ml({ direction: e, children: t, time: l, read: s, readLabel: a = "Read" }) {
1633
- return /* @__PURE__ */ f("div", { className: F("cms-bubble", `cms-bubble--${e}`), children: [
1638
+ return /* @__PURE__ */ h("div", { className: H("cms-bubble", `cms-bubble--${e}`), children: [
1634
1639
  /* @__PURE__ */ n("div", { className: "cms-bubble__text", children: t }),
1635
- /* @__PURE__ */ f("div", { className: "cms-bubble__meta", children: [
1640
+ /* @__PURE__ */ h("div", { className: "cms-bubble__meta", children: [
1636
1641
  l,
1637
- e === "out" && s ? /* @__PURE__ */ f(ge, { children: [
1642
+ e === "out" && s ? /* @__PURE__ */ h(ge, { children: [
1638
1643
  " · ",
1639
1644
  a
1640
1645
  ] }) : null
@@ -1642,12 +1647,12 @@ function ml({ direction: e, children: t, time: l, read: s, readLabel: a = "Read"
1642
1647
  ] });
1643
1648
  }
1644
1649
  function hl({ label: e, value: t, onChange: l, onSend: s, onAttach: a, placeholder: r, variant: m = "chat", sendLabel: c = "Send", attachLabel: d = "Attach a file", leading: b, canSend: i }) {
1645
- const g = he(), u = i ?? t.trim() !== "", N = (_) => {
1646
- _.preventDefault(), u && s();
1647
- }, h = a ? /* @__PURE__ */ n("button", { type: "button", className: "cms-icon-button cms-composer__attach", "aria-label": d, onClick: a, children: /* @__PURE__ */ n($, { name: "paperclip" }) }) : null;
1648
- return /* @__PURE__ */ f("form", { className: F("cms-composer", `cms-composer--${m}`), onSubmit: N, children: [
1650
+ const g = he(), u = i ?? t.trim() !== "", k = (x) => {
1651
+ x.preventDefault(), u && s();
1652
+ }, f = a ? /* @__PURE__ */ n("button", { type: "button", className: "cms-icon-button cms-composer__attach", "aria-label": d, onClick: a, children: /* @__PURE__ */ n($, { name: "paperclip" }) }) : null;
1653
+ return /* @__PURE__ */ h("form", { className: H("cms-composer", `cms-composer--${m}`), onSubmit: k, children: [
1649
1654
  /* @__PURE__ */ n("label", { htmlFor: g, className: m === "reply" ? "cms-composer__title" : "cms-visually-hidden", children: e }),
1650
- m === "chat" ? h : null,
1655
+ m === "chat" ? f : null,
1651
1656
  /* @__PURE__ */ n(
1652
1657
  "textarea",
1653
1658
  {
@@ -1656,15 +1661,15 @@ function hl({ label: e, value: t, onChange: l, onSend: s, onAttach: a, placehold
1656
1661
  rows: m === "reply" ? 3 : 1,
1657
1662
  placeholder: r,
1658
1663
  value: t,
1659
- onChange: (_) => l(_.target.value),
1660
- onKeyDown: (_) => {
1661
- _.nativeEvent.isComposing || _.keyCode === 229 || m === "chat" && _.key === "Enter" && !_.shiftKey && (_.preventDefault(), u && s());
1664
+ onChange: (x) => l(x.target.value),
1665
+ onKeyDown: (x) => {
1666
+ x.nativeEvent.isComposing || x.keyCode === 229 || m === "chat" && x.key === "Enter" && !x.shiftKey && (x.preventDefault(), u && s());
1662
1667
  }
1663
1668
  }
1664
1669
  ),
1665
1670
  m === "reply" && b !== void 0 ? /* @__PURE__ */ n("div", { className: "cms-composer__leading", children: b }) : null,
1666
- m === "reply" ? h : null,
1667
- m === "chat" ? /* @__PURE__ */ n("button", { type: "submit", className: "cms-composer__send-round", "aria-label": c, disabled: !u, children: /* @__PURE__ */ n($, { name: "send" }) }) : /* @__PURE__ */ f("button", { type: "submit", className: "cms-button cms-button--chrome cms-composer__send", disabled: !u, children: [
1671
+ m === "reply" ? f : null,
1672
+ m === "chat" ? /* @__PURE__ */ n("button", { type: "submit", className: "cms-composer__send-round", "aria-label": c, disabled: !u, children: /* @__PURE__ */ n($, { name: "send" }) }) : /* @__PURE__ */ h("button", { type: "submit", className: "cms-button cms-button--chrome cms-composer__send", disabled: !u, children: [
1668
1673
  c,
1669
1674
  " ",
1670
1675
  /* @__PURE__ */ n($, { name: "send", size: 18 })
@@ -1694,22 +1699,22 @@ const mn = {
1694
1699
  };
1695
1700
  function fl({ name: e, namePlaceholder: t = !1, media: l, onAccept: s, onDecline: a, labels: r }) {
1696
1701
  const m = qe(mn, r), c = l === "video" ? m.incomingVideo : m.incomingAudio;
1697
- return /* @__PURE__ */ f("div", { className: "cms-call-incoming", role: "alertdialog", "aria-label": m.incomingFrom(c, e), children: [
1702
+ return /* @__PURE__ */ h("div", { className: "cms-call-incoming", role: "alertdialog", "aria-label": m.incomingFrom(c, e), children: [
1698
1703
  /* @__PURE__ */ n("span", { className: "cms-call-incoming__ring", "aria-hidden": "true", children: /* @__PURE__ */ n(Ye, { name: e, size: 112, placeholder: t }) }),
1699
1704
  /* @__PURE__ */ n("p", { className: "cms-call-incoming__name", children: e }),
1700
1705
  /* @__PURE__ */ n("p", { className: "cms-call-incoming__what", children: c }),
1701
- /* @__PURE__ */ f("div", { className: "cms-call-incoming__actions", children: [
1706
+ /* @__PURE__ */ h("div", { className: "cms-call-incoming__actions", children: [
1702
1707
  /* @__PURE__ */ n(Ue, { icon: "phone-off", label: m.decline, tone: "hang-up", onClick: a }),
1703
1708
  /* @__PURE__ */ n(Ue, { icon: "phone", label: m.accept, tone: "accept", onClick: s })
1704
1709
  ] })
1705
1710
  ] });
1706
1711
  }
1707
1712
  function Ue({ icon: e, label: t, onClick: l, tone: s = "plain", pressed: a }) {
1708
- return /* @__PURE__ */ f(
1713
+ return /* @__PURE__ */ h(
1709
1714
  "button",
1710
1715
  {
1711
1716
  type: "button",
1712
- className: F("cms-call-button", `cms-call-button--${s}`, a && "is-pressed"),
1717
+ className: H("cms-call-button", `cms-call-button--${s}`, a && "is-pressed"),
1713
1718
  "aria-pressed": a,
1714
1719
  onClick: l,
1715
1720
  children: [
@@ -1721,21 +1726,21 @@ function Ue({ icon: e, label: t, onClick: l, tone: s = "plain", pressed: a }) {
1721
1726
  }
1722
1727
  function pl({ name: e, duration: t, connection: l, you: s, muted: a, speaker: r, onToggleMute: m, onToggleSpeaker: c, onAddPerson: d, onChat: b, onHangUp: i, labels: g }) {
1723
1728
  const u = qe(mn, g);
1724
- return /* @__PURE__ */ f("section", { className: "cms-call-panel", "aria-label": u.callWith(e), children: [
1725
- /* @__PURE__ */ f("div", { className: "cms-call-panel__head", children: [
1729
+ return /* @__PURE__ */ h("section", { className: "cms-call-panel", "aria-label": u.callWith(e), children: [
1730
+ /* @__PURE__ */ h("div", { className: "cms-call-panel__head", children: [
1726
1731
  /* @__PURE__ */ n(Ye, { name: e, size: 64 }),
1727
- /* @__PURE__ */ f("div", { className: "cms-call-panel__who", children: [
1732
+ /* @__PURE__ */ h("div", { className: "cms-call-panel__who", children: [
1728
1733
  /* @__PURE__ */ n("p", { className: "cms-call-panel__name", children: e }),
1729
1734
  /* @__PURE__ */ n("p", { className: "cms-call-panel__time", "aria-label": u.callTime(t), children: t })
1730
1735
  ] }),
1731
- /* @__PURE__ */ n("span", { className: F("cms-pill", l === "good" ? "cms-pill--success" : "cms-pill--warning"), children: l === "good" ? u.goodConnection : u.poorConnection })
1736
+ /* @__PURE__ */ n("span", { className: H("cms-pill", l === "good" ? "cms-pill--success" : "cms-pill--warning"), children: l === "good" ? u.goodConnection : u.poorConnection })
1732
1737
  ] }),
1733
- /* @__PURE__ */ f("div", { className: "cms-call-panel__you", children: [
1738
+ /* @__PURE__ */ h("div", { className: "cms-call-panel__you", children: [
1734
1739
  /* @__PURE__ */ n(Ye, { name: s.name, size: 36 }),
1735
1740
  /* @__PURE__ */ n("span", { children: u.you }),
1736
1741
  s.speaking ? /* @__PURE__ */ n("span", { className: "cms-call-panel__level", role: "img", "aria-label": u.speaking }) : null
1737
1742
  ] }),
1738
- /* @__PURE__ */ f("div", { className: "cms-call-panel__controls", children: [
1743
+ /* @__PURE__ */ h("div", { className: "cms-call-panel__controls", children: [
1739
1744
  /* @__PURE__ */ n(Ue, { icon: "mic", label: a ? u.unmute : u.mute, pressed: a, onClick: m }),
1740
1745
  /* @__PURE__ */ n(Ue, { icon: "speaker", label: u.speaker, pressed: r, onClick: c }),
1741
1746
  d ? /* @__PURE__ */ n(Ue, { icon: "user-plus", label: u.addPerson, onClick: d }) : null,
@@ -1746,11 +1751,11 @@ function pl({ name: e, duration: t, connection: l, you: s, muted: a, speaker: r,
1746
1751
  }
1747
1752
  function bl({ name: e, duration: t, muted: l, onToggleMute: s, onReturn: a, onHangUp: r, labels: m }) {
1748
1753
  const c = qe(mn, m);
1749
- return /* @__PURE__ */ f("section", { className: "cms-call-bar", "aria-label": c.callWith(e), children: [
1754
+ return /* @__PURE__ */ h("section", { className: "cms-call-bar", "aria-label": c.callWith(e), children: [
1750
1755
  /* @__PURE__ */ n("span", { className: "cms-call-bar__live", "aria-hidden": "true" }),
1751
1756
  /* @__PURE__ */ n("span", { className: "cms-call-bar__name", children: c.onCallWith(e) }),
1752
1757
  /* @__PURE__ */ n("span", { className: "cms-call-bar__time", children: t }),
1753
- /* @__PURE__ */ f("span", { className: "cms-call-bar__actions", children: [
1758
+ /* @__PURE__ */ h("span", { className: "cms-call-bar__actions", children: [
1754
1759
  /* @__PURE__ */ n("button", { type: "button", className: "cms-call-bar__icon", "aria-label": l ? c.unmute : c.mute, "aria-pressed": l, onClick: s, children: /* @__PURE__ */ n($, { name: "mic" }) }),
1755
1760
  /* @__PURE__ */ n("button", { type: "button", className: "cms-button cms-button--primary", onClick: a, children: c.returnToCall }),
1756
1761
  /* @__PURE__ */ n("button", { type: "button", className: "cms-call-bar__icon cms-call-bar__icon--hang-up", "aria-label": c.hangUp, onClick: r, children: /* @__PURE__ */ n($, { name: "phone-off" }) })
@@ -1758,16 +1763,16 @@ function bl({ name: e, duration: t, muted: l, onToggleMute: s, onReturn: a, onHa
1758
1763
  ] });
1759
1764
  }
1760
1765
  function _l({ mark: e, product: t, headline: l, lead: s, features: a = [], children: r }) {
1761
- return /* @__PURE__ */ f("div", { className: "cms-signin", children: [
1762
- /* @__PURE__ */ f("aside", { className: "cms-signin__brand", children: [
1763
- /* @__PURE__ */ f("p", { className: "cms-signin__logo", children: [
1766
+ return /* @__PURE__ */ h("div", { className: "cms-signin", children: [
1767
+ /* @__PURE__ */ h("aside", { className: "cms-signin__brand", children: [
1768
+ /* @__PURE__ */ h("p", { className: "cms-signin__logo", children: [
1764
1769
  /* @__PURE__ */ n("span", { className: "cms-signin__mark", "aria-hidden": "true", children: e }),
1765
1770
  t
1766
1771
  ] }),
1767
- /* @__PURE__ */ f("div", { className: "cms-signin__pitch", children: [
1772
+ /* @__PURE__ */ h("div", { className: "cms-signin__pitch", children: [
1768
1773
  /* @__PURE__ */ n("p", { className: "cms-signin__headline", children: l }),
1769
1774
  /* @__PURE__ */ n("p", { className: "cms-signin__lead", children: s }),
1770
- a.length ? /* @__PURE__ */ n("ul", { className: "cms-signin__features", children: a.map((m) => /* @__PURE__ */ f("li", { children: [
1775
+ a.length ? /* @__PURE__ */ n("ul", { className: "cms-signin__features", children: a.map((m) => /* @__PURE__ */ h("li", { children: [
1771
1776
  /* @__PURE__ */ n($, { name: m.icon, size: 18 }),
1772
1777
  m.label
1773
1778
  ] }, m.label)) }) : null
@@ -1789,12 +1794,12 @@ const Mt = {
1789
1794
  create: "Create an account"
1790
1795
  };
1791
1796
  function vl({ server: e, onSubmit: t, forgotHref: l, createHref: s, error: a, busy: r, labels: m }) {
1792
- const c = qe(Mt, m), d = he(), [b, i] = D(""), [g, u] = D(""), [N, h] = D(!1);
1793
- return /* @__PURE__ */ f("form", { className: "cms-signin-form", onSubmit: (k) => {
1794
- k.preventDefault(), t(b, g);
1797
+ const c = qe(Mt, m), d = he(), [b, i] = I(""), [g, u] = I(""), [k, f] = I(!1);
1798
+ return /* @__PURE__ */ h("form", { className: "cms-signin-form", onSubmit: (L) => {
1799
+ L.preventDefault(), t(b, g);
1795
1800
  }, "aria-describedby": a ? `${d}-error` : void 0, children: [
1796
1801
  /* @__PURE__ */ n("h1", { className: "cms-signin-form__title", children: c.title }),
1797
- /* @__PURE__ */ f("p", { className: "cms-signin-form__server", children: [
1802
+ /* @__PURE__ */ h("p", { className: "cms-signin-form__server", children: [
1798
1803
  /* @__PURE__ */ n($, { name: "server", size: 18 }),
1799
1804
  e
1800
1805
  ] }),
@@ -1808,30 +1813,30 @@ function vl({ server: e, onSubmit: t, forgotHref: l, createHref: s, error: a, bu
1808
1813
  autoComplete: "username",
1809
1814
  placeholder: c.identifierPlaceholder,
1810
1815
  value: b,
1811
- onChange: (k) => i(k.target.value),
1816
+ onChange: (L) => i(L.target.value),
1812
1817
  required: !0
1813
1818
  }
1814
1819
  ),
1815
1820
  /* @__PURE__ */ n("label", { className: "cms-signin-form__label", htmlFor: `${d}-password`, children: c.password }),
1816
- /* @__PURE__ */ f("span", { className: "cms-signin-form__password", children: [
1821
+ /* @__PURE__ */ h("span", { className: "cms-signin-form__password", children: [
1817
1822
  /* @__PURE__ */ n(
1818
1823
  "input",
1819
1824
  {
1820
1825
  id: `${d}-password`,
1821
1826
  className: "cms-signin-form__input",
1822
- type: N ? "text" : "password",
1827
+ type: k ? "text" : "password",
1823
1828
  autoComplete: "current-password",
1824
1829
  value: g,
1825
- onChange: (k) => u(k.target.value),
1830
+ onChange: (L) => u(L.target.value),
1826
1831
  required: !0
1827
1832
  }
1828
1833
  ),
1829
- /* @__PURE__ */ n("button", { type: "button", className: "cms-signin-form__show", "aria-pressed": N, onClick: () => h((k) => !k), children: N ? c.hide : c.show })
1834
+ /* @__PURE__ */ n("button", { type: "button", className: "cms-signin-form__show", "aria-pressed": k, onClick: () => f((L) => !L), children: k ? c.hide : c.show })
1830
1835
  ] }),
1831
1836
  l ? /* @__PURE__ */ n("a", { className: "cms-signin-form__forgot", href: l, children: c.forgot }) : null,
1832
1837
  a ? /* @__PURE__ */ n("p", { id: `${d}-error`, className: "cms-signin-form__error", role: "alert", children: a }) : null,
1833
1838
  /* @__PURE__ */ n("button", { type: "submit", className: "cms-button cms-button--chrome cms-signin-form__submit", disabled: r, "aria-busy": r || void 0, children: c.submit }),
1834
- s ? /* @__PURE__ */ f(ge, { children: [
1839
+ s ? /* @__PURE__ */ h(ge, { children: [
1835
1840
  /* @__PURE__ */ n("p", { className: "cms-signin-form__or", children: /* @__PURE__ */ n("span", { children: c.newHere }) }),
1836
1841
  /* @__PURE__ */ n("a", { className: "cms-button cms-signin-form__create", href: s, children: c.create })
1837
1842
  ] }) : null
@@ -1867,7 +1872,7 @@ function fn(e, t) {
1867
1872
  }
1868
1873
  function Dn(e) {
1869
1874
  var r;
1870
- const t = O(null), l = (e == null ? void 0 : e.value) ?? null, a = e === void 0 || e.options.some((m) => m.id === e.value) ? null : ((r = fn(e.options, e.defaultValue)) == null ? void 0 : r.id) ?? null;
1875
+ const t = z(null), l = (e == null ? void 0 : e.value) ?? null, a = e === void 0 || e.options.some((m) => m.id === e.value) ? null : ((r = fn(e.options, e.defaultValue)) == null ? void 0 : r.id) ?? null;
1871
1876
  Q(() => {
1872
1877
  a === null ? t.current = null : t.current !== l && (t.current = l, e == null || e.onChange(a));
1873
1878
  }, [a, l]);
@@ -1876,18 +1881,18 @@ function In({ iconOnly: e = !1, onOpenChange: t, ...l }) {
1876
1881
  return l.options.length < 2 ? null : /* @__PURE__ */ n(St, { ...l, iconOnly: e, onOpenChange: t });
1877
1882
  }
1878
1883
  function St({ iconOnly: e, onOpenChange: t, ...l }) {
1879
- const [s, a] = D(null), r = Ie(() => a(null), []), m = O(!1), c = s !== null;
1884
+ const [s, a] = I(null), r = Ie(() => a(null), []), m = z(!1), c = s !== null;
1880
1885
  Q(() => (t == null || t(c), () => t == null ? void 0 : t(!1)), [c, t]);
1881
- const d = An(l), b = d !== null && !e, i = Tn(l), g = (u, N) => {
1882
- const h = u.getBoundingClientRect();
1883
- a({ x: h.left, y: h.bottom + 4, focus: N });
1886
+ const d = An(l), b = d !== null && !e, i = Tn(l), g = (u, k) => {
1887
+ const f = u.getBoundingClientRect();
1888
+ a({ x: f.left, y: f.bottom + 4, focus: k });
1884
1889
  };
1885
- return /* @__PURE__ */ f(ge, { children: [
1890
+ return /* @__PURE__ */ h(ge, { children: [
1886
1891
  /* @__PURE__ */ n(
1887
1892
  "button",
1888
1893
  {
1889
1894
  type: "button",
1890
- className: F("cms-filter-menu", d !== null && "cms-filter-menu--active", b && "cms-filter-menu--named"),
1895
+ className: H("cms-filter-menu", d !== null && "cms-filter-menu--active", b && "cms-filter-menu--named"),
1891
1896
  "aria-haspopup": "menu",
1892
1897
  "aria-expanded": c,
1893
1898
  "aria-label": i,
@@ -1901,7 +1906,7 @@ function St({ iconOnly: e, onOpenChange: t, ...l }) {
1901
1906
  onKeyDown: (u) => {
1902
1907
  m.current = !1, (u.key === "ArrowDown" || u.key === "ArrowUp") && (u.preventDefault(), g(u.currentTarget, u.key === "ArrowUp" ? "last" : "current"));
1903
1908
  },
1904
- children: b ? /* @__PURE__ */ f(ge, { children: [
1909
+ children: b ? /* @__PURE__ */ h(ge, { children: [
1905
1910
  /* @__PURE__ */ n("span", { className: "cms-filter-menu__choice", children: d.label }),
1906
1911
  /* @__PURE__ */ n($, { name: "chevron-down", size: 16 })
1907
1912
  ] }) : /* @__PURE__ */ n($, { name: "funnel" })
@@ -1923,7 +1928,7 @@ function Et(e) {
1923
1928
  return Dn(e), /* @__PURE__ */ n(In, { ...e });
1924
1929
  }
1925
1930
  function gl({ leading: e, name: t, filter: l }) {
1926
- return /* @__PURE__ */ f("div", { className: "cms-list-head", children: [
1931
+ return /* @__PURE__ */ h("div", { className: "cms-list-head", children: [
1927
1932
  e != null ? /* @__PURE__ */ n("span", { className: "cms-list-head__leading", children: e }) : null,
1928
1933
  /* @__PURE__ */ n("h2", { className: "cms-list-head__name", title: t, children: t }),
1929
1934
  l !== void 0 ? /* @__PURE__ */ n(Et, { ...l }) : null
@@ -1942,70 +1947,70 @@ function Tt(e) {
1942
1947
  }
1943
1948
  function wl({ label: e, actions: t, onAction: l, status: s, moreLabel: a, leading: r }) {
1944
1949
  var q;
1945
- const m = t.filter((p) => p.entries === void 0 || p.entries.length > 0), c = O(null), d = O(null), b = O(null), [i, g] = D(kn), [u, N] = D(null), [h, _] = D("first"), [k, x] = D(null), [C, A] = D(null), v = At(m), y = v.flat(), I = ((q = y.find((p) => p.primary === !0 && p.overflow !== 0)) == null ? void 0 : q.id) ?? null, U = Tt(m.filter((p) => p.id !== I)), P = y.filter((p) => p.overflow === 0), M = y.filter((p) => p.overflow !== 0), B = P.length === 1 ? P[0] ?? null : null, z = JSON.stringify([m.map((p) => [p.id, p.label, p.icon, p.group, p.overflow ?? null, p.primary === !0, p.entries !== void 0]), s ?? "", r !== void 0]), j = (p) => /* @__PURE__ */ new Set([...P.filter((L) => L !== B || p.size > 0).map((L) => L.id), ...p]), K = Ie(() => {
1946
- const p = c.current, L = d.current;
1947
- if (p === null || L === null) return;
1948
- const Z = getComputedStyle(p), ue = parseFloat(Z.columnGap || "0") || 0, ae = p.clientWidth - (parseFloat(Z.paddingLeft) || 0) - (parseFloat(Z.paddingRight) || 0), me = (T) => {
1949
- var S;
1950
- return ((S = L.querySelector(T)) == null ? void 0 : S.getBoundingClientRect().width) ?? 0;
1951
- }, Se = me('[data-measure="leading"]'), We = me('[data-measure="separator"]'), Fe = me('[data-measure="more"]'), Te = (T, S) => me(`[data-measure="${S ? "full" : "icon"}"][data-measure-action="${CSS.escape(T)}"]`), Ee = (T, S) => {
1952
- const H = j(S), le = B !== null && !H.has(B.id) ? B : null, J = v.map((He) => He.filter((V) => !H.has(V.id) && V !== le)).filter((He) => He.length > 0), ke = [...J.flat(), ...le !== null ? [le] : []], Re = ke.length + (J.length - 1) + (H.size > 0 ? 1 : 0) + (Se > 0 ? 1 : 0);
1953
- return Se + ke.reduce((He, V) => He + Te(V.id, !T.has(V.id)), 0) + We * Math.max(0, J.length - 1) + (H.size > 0 ? Fe : 0) + ue * Math.max(0, Re - 1);
1954
- }, R = M.filter((T) => T.id !== I && !U.some((S) => S.includes(T.id))).map((T) => T.id), X = [...U, ...[...R].reverse().map((T) => [T]), ...I !== null ? [[I]] : []], Ne = [...B !== null ? [[B.id]] : [], ...X];
1950
+ const m = t.filter((p) => p.entries === void 0 || p.entries.length > 0), c = z(null), d = z(null), b = z(null), [i, g] = I(kn), [u, k] = I(null), [f, x] = I("first"), [L, S] = I(null), [_, N] = I(null), v = At(m), w = v.flat(), T = ((q = w.find((p) => p.primary === !0 && p.overflow !== 0)) == null ? void 0 : q.id) ?? null, B = Tt(m.filter((p) => p.id !== T)), F = w.filter((p) => p.overflow === 0), M = w.filter((p) => p.overflow !== 0), R = F.length === 1 ? F[0] ?? null : null, U = JSON.stringify([m.map((p) => [p.id, p.label, p.icon, p.group, p.overflow ?? null, p.primary === !0, p.entries !== void 0]), s ?? "", r !== void 0]), j = (p) => /* @__PURE__ */ new Set([...F.filter((D) => D !== R || p.size > 0).map((D) => D.id), ...p]), K = Ie(() => {
1951
+ const p = c.current, D = d.current;
1952
+ if (p === null || D === null) return;
1953
+ const Z = getComputedStyle(p), ue = parseFloat(Z.columnGap || "0") || 0, ae = p.clientWidth - (parseFloat(Z.paddingLeft) || 0) - (parseFloat(Z.paddingRight) || 0), me = (A) => {
1954
+ var C;
1955
+ return ((C = D.querySelector(A)) == null ? void 0 : C.getBoundingClientRect().width) ?? 0;
1956
+ }, Se = me('[data-measure="leading"]'), We = me('[data-measure="separator"]'), Fe = me('[data-measure="more"]'), Te = (A, C) => me(`[data-measure="${C ? "full" : "icon"}"][data-measure-action="${CSS.escape(A)}"]`), Ee = (A, C) => {
1957
+ const P = j(C), le = R !== null && !P.has(R.id) ? R : null, J = v.map((He) => He.filter((V) => !P.has(V.id) && V !== le)).filter((He) => He.length > 0), ke = [...J.flat(), ...le !== null ? [le] : []], Re = ke.length + (J.length - 1) + (P.size > 0 ? 1 : 0) + (Se > 0 ? 1 : 0);
1958
+ return Se + ke.reduce((He, V) => He + Te(V.id, !A.has(V.id)), 0) + We * Math.max(0, J.length - 1) + (P.size > 0 ? Fe : 0) + ue * Math.max(0, Re - 1);
1959
+ }, O = M.filter((A) => A.id !== T && !B.some((C) => C.includes(A.id))).map((A) => A.id), X = [...B, ...[...O].reverse().map((A) => [A]), ...T !== null ? [[T]] : []], Ne = [...R !== null ? [[R.id]] : [], ...X];
1955
1960
  let ce = null;
1956
1961
  if (Ee(/* @__PURE__ */ new Set(), /* @__PURE__ */ new Set()) <= ae) ce = kn;
1957
1962
  else {
1958
- const T = /* @__PURE__ */ new Set();
1959
- for (const S of Ne) {
1960
- for (const H of S) T.add(H);
1961
- if (Ee(T, /* @__PURE__ */ new Set()) <= ae) {
1962
- ce = { bare: T, hidden: /* @__PURE__ */ new Set() };
1963
+ const A = /* @__PURE__ */ new Set();
1964
+ for (const C of Ne) {
1965
+ for (const P of C) A.add(P);
1966
+ if (Ee(A, /* @__PURE__ */ new Set()) <= ae) {
1967
+ ce = { bare: A, hidden: /* @__PURE__ */ new Set() };
1963
1968
  break;
1964
1969
  }
1965
1970
  }
1966
1971
  }
1967
1972
  if (ce === null) {
1968
- const T = new Set(Ne.flat()), S = /* @__PURE__ */ new Set(), H = () => S.size + P.length >= 2;
1973
+ const A = new Set(Ne.flat()), C = /* @__PURE__ */ new Set(), P = () => C.size + F.length >= 2;
1969
1974
  for (const le of X) {
1970
- for (const J of le) S.add(J);
1971
- if (H() && Ee(T, S) <= ae) break;
1975
+ for (const J of le) C.add(J);
1976
+ if (P() && Ee(A, C) <= ae) break;
1972
1977
  }
1973
- H() || S.clear(), ce = { bare: T, hidden: S };
1978
+ P() || C.clear(), ce = { bare: A, hidden: C };
1974
1979
  }
1975
1980
  const o = ce;
1976
- g((T) => xn(T.bare, o.bare) && xn(T.hidden, o.hidden) ? T : o);
1977
- }, [z]);
1981
+ g((A) => xn(A.bare, o.bare) && xn(A.hidden, o.hidden) ? A : o);
1982
+ }, [U]);
1978
1983
  $e(K, [K]), Q(() => {
1979
1984
  const p = c.current;
1980
1985
  if (p === null || typeof ResizeObserver > "u") return;
1981
- const L = new ResizeObserver(() => K());
1982
- return L.observe(p), () => L.disconnect();
1986
+ const D = new ResizeObserver(() => K());
1987
+ return D.observe(p), () => D.disconnect();
1983
1988
  }, [K]), Q(() => {
1984
1989
  const p = typeof document > "u" ? void 0 : document.fonts;
1985
1990
  if (p === void 0) return;
1986
- let L = !0;
1991
+ let D = !0;
1987
1992
  const Z = () => {
1988
- L && K();
1993
+ D && K();
1989
1994
  };
1990
1995
  return p.ready.then(Z), p.addEventListener("loadingdone", Z), () => {
1991
- L = !1, p.removeEventListener("loadingdone", Z);
1996
+ D = !1, p.removeEventListener("loadingdone", Z);
1992
1997
  };
1993
1998
  }, [K]);
1994
- const G = j(i.hidden), Y = B !== null && !G.has(B.id) ? B : null, ee = (p) => G.has(p.id) || p === Y, be = [...v.map((p) => p.filter((L) => !ee(L))).filter((p) => p.length > 0).flat(), ...Y !== null ? [Y] : []], oe = (p) => y.find((L) => L.id === p), de = [...U.flat(), ...M.filter((p) => p.id !== I && !U.some((L) => L.includes(p.id))).map((p) => p.id).reverse()], Ce = [
1995
- ...I !== null && i.hidden.has(I) ? [oe(I)] : [],
1999
+ const G = j(i.hidden), Y = R !== null && !G.has(R.id) ? R : null, ee = (p) => G.has(p.id) || p === Y, be = [...v.map((p) => p.filter((D) => !ee(D))).filter((p) => p.length > 0).flat(), ...Y !== null ? [Y] : []], oe = (p) => w.find((D) => D.id === p), de = [...B.flat(), ...M.filter((p) => p.id !== T && !B.some((D) => D.includes(p.id))).map((p) => p.id).reverse()], Ce = [
2000
+ ...T !== null && i.hidden.has(T) ? [oe(T)] : [],
1996
2001
  ...de.filter((p) => i.hidden.has(p)).map(oe),
1997
- ...G.size > 0 ? P : []
1998
- ].filter((p) => p !== void 0 && G.has(p.id)), fe = new Set(M.filter((p) => !U.some((L) => L.includes(p.id))).map((p) => p.id)), te = [...be.map((p) => p.id), ...Ce.length > 0 ? ["more"] : []], pe = k !== null && te.includes(k) ? k : te[0] ?? null, _e = (p) => {
2002
+ ...G.size > 0 ? F : []
2003
+ ].filter((p) => p !== void 0 && G.has(p.id)), fe = new Set(M.filter((p) => !B.some((D) => D.includes(p.id))).map((p) => p.id)), te = [...be.map((p) => p.id), ...Ce.length > 0 ? ["more"] : []], pe = L !== null && te.includes(L) ? L : te[0] ?? null, _e = (p) => {
1999
2004
  var ae, me;
2000
- const L = te.indexOf(pe ?? "");
2005
+ const D = te.indexOf(pe ?? "");
2001
2006
  let Z = null;
2002
- if (p.key === "ArrowRight" ? Z = Math.min(te.length - 1, L + 1) : p.key === "ArrowLeft" ? Z = Math.max(0, L - 1) : p.key === "Home" ? Z = 0 : p.key === "End" ? Z = te.length - 1 : p.key === "Escape" && A(pe), Z === null) return;
2007
+ if (p.key === "ArrowRight" ? Z = Math.min(te.length - 1, D + 1) : p.key === "ArrowLeft" ? Z = Math.max(0, D - 1) : p.key === "Home" ? Z = 0 : p.key === "End" ? Z = te.length - 1 : p.key === "Escape" && N(pe), Z === null) return;
2003
2008
  p.preventDefault();
2004
2009
  const ue = te[Z] ?? null;
2005
- x(ue), (me = (ae = c.current) == null ? void 0 : ae.querySelector(`[data-stop="${CSS.escape(ue ?? "")}"]`)) == null || me.focus();
2010
+ S(ue), (me = (ae = c.current) == null ? void 0 : ae.querySelector(`[data-stop="${CSS.escape(ue ?? "")}"]`)) == null || me.focus();
2006
2011
  }, we = Ce.map((p) => ({
2007
2012
  id: p.id,
2008
- label: /* @__PURE__ */ f(ge, { children: [
2013
+ label: /* @__PURE__ */ h(ge, { children: [
2009
2014
  /* @__PURE__ */ n(je, { name: p.icon }),
2010
2015
  p.label
2011
2016
  ] }),
@@ -2018,12 +2023,12 @@ function wl({ label: e, actions: t, onAction: l, status: s, moreLabel: a, leadin
2018
2023
  l(p.id);
2019
2024
  return;
2020
2025
  }
2021
- const L = (Z = b.current) == null ? void 0 : Z.getBoundingClientRect();
2022
- _("first"), N({ which: p.id, x: (L == null ? void 0 : L.left) ?? 0, y: (L == null ? void 0 : L.bottom) ?? 0 });
2026
+ const D = (Z = b.current) == null ? void 0 : Z.getBoundingClientRect();
2027
+ x("first"), k({ which: p.id, x: (D == null ? void 0 : D.left) ?? 0, y: (D == null ? void 0 : D.bottom) ?? 0 });
2023
2028
  }
2024
- })), ne = u === null || u.which === "more" ? void 0 : y.find((p) => p.id === u.which), ye = ((ne == null ? void 0 : ne.entries) ?? []).map((p) => ({
2029
+ })), ne = u === null || u.which === "more" ? void 0 : w.find((p) => p.id === u.which), ye = ((ne == null ? void 0 : ne.entries) ?? []).map((p) => ({
2025
2030
  id: p.id,
2026
- label: /* @__PURE__ */ f(ge, { children: [
2031
+ label: /* @__PURE__ */ h(ge, { children: [
2027
2032
  p.icon !== void 0 ? /* @__PURE__ */ n(je, { name: p.icon }) : null,
2028
2033
  p.label
2029
2034
  ] }),
@@ -2032,36 +2037,36 @@ function wl({ label: e, actions: t, onAction: l, status: s, moreLabel: a, leadin
2032
2037
  onSelect: () => {
2033
2038
  p.disabled || l(p.id);
2034
2039
  }
2035
- })), w = (p, L, Z) => {
2036
- const ue = L.getBoundingClientRect();
2037
- _(Z), N({ which: p, x: ue.left, y: ue.bottom });
2038
- }, E = M.length + (B !== null ? 1 : 0), W = (p) => /* @__PURE__ */ n(
2040
+ })), y = (p, D, Z) => {
2041
+ const ue = D.getBoundingClientRect();
2042
+ x(Z), k({ which: p, x: ue.left, y: ue.bottom });
2043
+ }, E = M.length + (R !== null ? 1 : 0), W = (p) => /* @__PURE__ */ n(
2039
2044
  Lt,
2040
2045
  {
2041
2046
  action: p,
2042
- primary: p.id === I,
2047
+ primary: p.id === T,
2043
2048
  labels: !i.bare.has(p.id),
2044
2049
  overflowed: G.has(p.id),
2045
2050
  pinned: fe.has(p.id),
2046
2051
  tabbable: pe === p.id,
2047
- tipOff: C === p.id,
2052
+ tipOff: _ === p.id,
2048
2053
  menuOpen: (u == null ? void 0 : u.which) === p.id,
2049
- onChoose: (L, Z) => {
2050
- p.entries === void 0 ? l(p.id) : (u == null ? void 0 : u.which) === p.id && Z === null ? N(null) : w(p.id, L, Z ?? "first");
2054
+ onChoose: (D, Z) => {
2055
+ p.entries === void 0 ? l(p.id) : (u == null ? void 0 : u.which) === p.id && Z === null ? k(null) : y(p.id, D, Z ?? "first");
2051
2056
  },
2052
2057
  onFocus: () => {
2053
- x(p.id), A(null);
2058
+ S(p.id), N(null);
2054
2059
  }
2055
2060
  },
2056
2061
  p.id
2057
2062
  );
2058
- return /* @__PURE__ */ f(
2063
+ return /* @__PURE__ */ h(
2059
2064
  "div",
2060
2065
  {
2061
2066
  ref: c,
2062
2067
  role: "toolbar",
2063
2068
  "aria-label": e,
2064
- className: F(
2069
+ className: H(
2065
2070
  "cms-pane-toolbar",
2066
2071
  E > 0 && i.bare.size >= E && "cms-pane-toolbar--labels-hidden",
2067
2072
  i.bare.size > 0 && i.bare.size < E && "cms-pane-toolbar--labels-partly-hidden"
@@ -2069,12 +2074,12 @@ function wl({ label: e, actions: t, onAction: l, status: s, moreLabel: a, leadin
2069
2074
  onKeyDown: _e,
2070
2075
  children: [
2071
2076
  r !== void 0 ? /* @__PURE__ */ n("div", { className: "cms-pane-toolbar__leading", children: r }) : null,
2072
- v.map((p, L) => {
2073
- const Z = p.filter((ae) => !ee(ae)), ue = v.slice(0, L).some((ae) => ae.some((me) => !ee(me)));
2074
- return /* @__PURE__ */ f("div", { className: "cms-pane-toolbar__group-wrap", children: [
2077
+ v.map((p, D) => {
2078
+ const Z = p.filter((ae) => !ee(ae)), ue = v.slice(0, D).some((ae) => ae.some((me) => !ee(me)));
2079
+ return /* @__PURE__ */ h("div", { className: "cms-pane-toolbar__group-wrap", children: [
2075
2080
  Z.length > 0 && ue ? /* @__PURE__ */ n("span", { className: "cms-pane-toolbar__separator", role: "separator", "aria-orientation": "vertical" }) : null,
2076
2081
  /* @__PURE__ */ n("div", { className: "cms-pane-toolbar__group", hidden: Z.length === 0, children: p.filter((ae) => ae !== Y).map((ae) => W(ae)) })
2077
- ] }, L);
2082
+ ] }, D);
2078
2083
  }),
2079
2084
  Y !== null ? /* @__PURE__ */ n("div", { className: "cms-pane-toolbar__group cms-pane-toolbar__lone", children: W(Y) }) : null,
2080
2085
  Ce.length > 0 ? /* @__PURE__ */ n(
@@ -2089,30 +2094,30 @@ function wl({ label: e, actions: t, onAction: l, status: s, moreLabel: a, leadin
2089
2094
  "aria-haspopup": "menu",
2090
2095
  "aria-expanded": (u == null ? void 0 : u.which) === "more",
2091
2096
  tabIndex: pe === "more" ? 0 : -1,
2092
- onFocus: () => x("more"),
2097
+ onFocus: () => S("more"),
2093
2098
  onClick: (p) => {
2094
- (u == null ? void 0 : u.which) === "more" ? N(null) : w("more", p.currentTarget, "first");
2099
+ (u == null ? void 0 : u.which) === "more" ? k(null) : y("more", p.currentTarget, "first");
2095
2100
  },
2096
2101
  onKeyDown: (p) => {
2097
- (p.key === "ArrowDown" || p.key === "ArrowUp") && (p.preventDefault(), p.stopPropagation(), w("more", p.currentTarget, p.key === "ArrowUp" ? "last" : "first"));
2102
+ (p.key === "ArrowDown" || p.key === "ArrowUp") && (p.preventDefault(), p.stopPropagation(), y("more", p.currentTarget, p.key === "ArrowUp" ? "last" : "first"));
2098
2103
  },
2099
2104
  children: /* @__PURE__ */ n($, { name: "more" })
2100
2105
  }
2101
2106
  ) : null,
2102
2107
  s !== void 0 ? /* @__PURE__ */ n("span", { className: "cms-pane-toolbar__status", title: s, children: s }) : null,
2103
- /* @__PURE__ */ n(Ke, { at: (u == null ? void 0 : u.which) === "more" ? u : null, items: we, onClose: () => N(null), label: a, focus: h }),
2104
- /* @__PURE__ */ n(Ke, { at: ne !== void 0 ? u : null, items: ye, onClose: () => N(null), label: (ne == null ? void 0 : ne.label) ?? "", focus: h }),
2105
- /* @__PURE__ */ f("div", { ref: d, className: "cms-pane-toolbar__measure", "aria-hidden": "true", children: [
2108
+ /* @__PURE__ */ n(Ke, { at: (u == null ? void 0 : u.which) === "more" ? u : null, items: we, onClose: () => k(null), label: a, focus: f }),
2109
+ /* @__PURE__ */ n(Ke, { at: ne !== void 0 ? u : null, items: ye, onClose: () => k(null), label: (ne == null ? void 0 : ne.label) ?? "", focus: f }),
2110
+ /* @__PURE__ */ h("div", { ref: d, className: "cms-pane-toolbar__measure", "aria-hidden": "true", children: [
2106
2111
  r !== void 0 ? /* @__PURE__ */ n("div", { "data-measure": "leading", children: r }) : null,
2107
2112
  /* @__PURE__ */ n("span", { "data-measure": "separator", className: "cms-pane-toolbar__separator" }),
2108
2113
  /* @__PURE__ */ n("span", { "data-measure": "more", className: "cms-icon-button cms-pane-toolbar__more", children: /* @__PURE__ */ n($, { name: "more" }) }),
2109
- y.map((p) => /* @__PURE__ */ f("span", { children: [
2110
- /* @__PURE__ */ f("span", { "data-measure": "full", "data-measure-action": p.id, className: F("cms-pane-toolbar__action", p.entries !== void 0 && "cms-pane-toolbar__action--menu"), children: [
2114
+ w.map((p) => /* @__PURE__ */ h("span", { children: [
2115
+ /* @__PURE__ */ h("span", { "data-measure": "full", "data-measure-action": p.id, className: H("cms-pane-toolbar__action", p.entries !== void 0 && "cms-pane-toolbar__action--menu"), children: [
2111
2116
  /* @__PURE__ */ n(je, { name: p.icon }),
2112
2117
  /* @__PURE__ */ n("span", { className: "cms-pane-toolbar__label", children: p.label }),
2113
2118
  p.entries !== void 0 ? /* @__PURE__ */ n(ln, {}) : null
2114
2119
  ] }),
2115
- /* @__PURE__ */ f("span", { "data-measure": "icon", "data-measure-action": p.id, className: F("cms-pane-toolbar__action", Be(p.icon) !== null && "cms-pane-toolbar__action--bare", p.entries !== void 0 && "cms-pane-toolbar__action--menu"), children: [
2120
+ /* @__PURE__ */ h("span", { "data-measure": "icon", "data-measure-action": p.id, className: H("cms-pane-toolbar__action", Be(p.icon) !== null && "cms-pane-toolbar__action--bare", p.entries !== void 0 && "cms-pane-toolbar__action--menu"), children: [
2116
2121
  Be(p.icon) !== null ? /* @__PURE__ */ n(je, { name: p.icon }) : /* @__PURE__ */ n("span", { className: "cms-pane-toolbar__label", children: p.label }),
2117
2122
  p.entries !== void 0 ? /* @__PURE__ */ n(ln, {}) : null
2118
2123
  ] })
@@ -2124,21 +2129,21 @@ function wl({ label: e, actions: t, onAction: l, status: s, moreLabel: a, leadin
2124
2129
  }
2125
2130
  const Pe = "tip";
2126
2131
  function Lt({ action: e, primary: t, labels: l, overflowed: s, pinned: a, tabbable: r, tipOff: m, menuOpen: c, onChoose: d, onFocus: b }) {
2127
- const [i, g] = D(!1);
2132
+ const [i, g] = I(!1);
2128
2133
  Q(() => {
2129
2134
  if (!e.busy) {
2130
2135
  g(!1);
2131
2136
  return;
2132
2137
  }
2133
- const y = setTimeout(() => g(!0), en);
2134
- return () => clearTimeout(y);
2138
+ const w = setTimeout(() => g(!0), en);
2139
+ return () => clearTimeout(w);
2135
2140
  }, [e.busy]);
2136
- const u = Be(e.icon) === null, N = l || u, h = e.disabled && e.reason ? e.reason : null, _ = h ?? (N ? null : e.label), k = he(), [x, C] = D(!1), A = dn(), v = e.entries !== void 0;
2137
- return /* @__PURE__ */ f(
2141
+ const u = Be(e.icon) === null, k = l || u, f = e.disabled && e.reason ? e.reason : null, x = f ?? (k ? null : e.label), L = he(), [S, _] = I(!1), N = dn(), v = e.entries !== void 0;
2142
+ return /* @__PURE__ */ h(
2138
2143
  "button",
2139
2144
  {
2140
2145
  type: "button",
2141
- className: F("cms-pane-toolbar__action", t && "cms-pane-toolbar__action--primary", !N && "cms-pane-toolbar__action--bare", u && "cms-pane-toolbar__action--text", v && "cms-pane-toolbar__action--menu", e.danger && "is-danger"),
2146
+ className: H("cms-pane-toolbar__action", t && "cms-pane-toolbar__action--primary", !k && "cms-pane-toolbar__action--bare", u && "cms-pane-toolbar__action--text", v && "cms-pane-toolbar__action--menu", e.danger && "is-danger"),
2142
2147
  "data-action": e.id,
2143
2148
  "data-stop": e.id,
2144
2149
  ...s ? { "data-overflowed": "" } : {},
@@ -2148,29 +2153,29 @@ function Lt({ action: e, primary: t, labels: l, overflowed: s, pinned: a, tabbab
2148
2153
  "aria-disabled": e.disabled || void 0,
2149
2154
  "aria-busy": e.busy || void 0,
2150
2155
  ...v ? { "aria-haspopup": "menu", "aria-expanded": c } : {},
2151
- ...h === null ? {} : { "aria-describedby": k },
2152
- ...x && h !== null ? { "data-reason-shown": "" } : {},
2153
- ...A.dismissed(Pe) ? { "data-tip-dismissed": "" } : {},
2156
+ ...f === null ? {} : { "aria-describedby": L },
2157
+ ...S && f !== null ? { "data-reason-shown": "" } : {},
2158
+ ...N.dismissed(Pe) ? { "data-tip-dismissed": "" } : {},
2154
2159
  tabIndex: r ? 0 : -1,
2155
2160
  onFocus: () => {
2156
- b(), A.focusIn(Pe);
2161
+ b(), N.focusIn(Pe);
2157
2162
  },
2158
2163
  onBlur: () => {
2159
- C(!1), A.focusOut(Pe);
2164
+ _(!1), N.focusOut(Pe);
2160
2165
  },
2161
- onMouseEnter: () => A.pointerIn(Pe),
2162
- onMouseLeave: () => A.pointerOut(Pe),
2163
- onKeyDown: (y) => {
2164
- y.key === "Escape" && (C(!1), A.dismiss(Pe)), v && (y.key === "ArrowDown" || y.key === "ArrowUp") && (y.preventDefault(), h !== null ? C(!0) : !e.disabled && !e.busy && d(y.currentTarget, y.key === "ArrowUp" ? "last" : "first"));
2166
+ onMouseEnter: () => N.pointerIn(Pe),
2167
+ onMouseLeave: () => N.pointerOut(Pe),
2168
+ onKeyDown: (w) => {
2169
+ w.key === "Escape" && (_(!1), N.dismiss(Pe)), v && (w.key === "ArrowDown" || w.key === "ArrowUp") && (w.preventDefault(), f !== null ? _(!0) : !e.disabled && !e.busy && d(w.currentTarget, w.key === "ArrowUp" ? "last" : "first"));
2165
2170
  },
2166
- onClick: (y) => {
2167
- h !== null ? (C(!0), A.show(Pe)) : !e.disabled && !e.busy && d(y.currentTarget, null);
2171
+ onClick: (w) => {
2172
+ f !== null ? (_(!0), N.show(Pe)) : !e.disabled && !e.busy && d(w.currentTarget, null);
2168
2173
  },
2169
2174
  children: [
2170
2175
  i ? /* @__PURE__ */ n(se, { name: "spinner" }) : /* @__PURE__ */ n(je, { name: e.icon }),
2171
- N ? /* @__PURE__ */ n("span", { className: "cms-pane-toolbar__label", "aria-hidden": "true", children: e.label }) : null,
2176
+ k ? /* @__PURE__ */ n("span", { className: "cms-pane-toolbar__label", "aria-hidden": "true", children: e.label }) : null,
2172
2177
  v ? /* @__PURE__ */ n(ln, {}) : null,
2173
- h !== null || _ !== null && !m ? /* @__PURE__ */ n("span", { className: "cms-pane-toolbar__tip", role: "tooltip", id: k, children: _ }) : null
2178
+ f !== null || x !== null && !m ? /* @__PURE__ */ n("span", { className: "cms-pane-toolbar__tip", role: "tooltip", id: L, children: x }) : null
2174
2179
  ]
2175
2180
  }
2176
2181
  );
@@ -2183,30 +2188,30 @@ function je({ name: e }) {
2183
2188
  return t === null ? null : /* @__PURE__ */ n($, { name: t, size: 18 });
2184
2189
  }
2185
2190
  function yl({ title: e, body: t = null, time: l = null, unread: s, unreadLabel: a, expandLabel: r, collapseLabel: m, action: c = null, onRead: d, leading: b }) {
2186
- const [i, g] = D(!1), u = he(), N = () => {
2191
+ const [i, g] = I(!1), u = he(), k = () => {
2187
2192
  s && d();
2188
- }, h = (c == null ? void 0 : c.presentation) === "row" && c.onAction !== void 0, _ = (c == null ? void 0 : c.presentation) === "button" && c.onAction !== void 0 ? c : null, k = () => {
2189
- var x;
2190
- N(), h && ((x = c.onAction) == null || x.call(c));
2193
+ }, f = (c == null ? void 0 : c.presentation) === "row" && c.onAction !== void 0, x = (c == null ? void 0 : c.presentation) === "button" && c.onAction !== void 0 ? c : null, L = () => {
2194
+ var S;
2195
+ k(), f && ((S = c.onAction) == null || S.call(c));
2191
2196
  };
2192
- return /* @__PURE__ */ f("article", { className: F("cms-notification", s && "is-unread", i && "is-expanded", h && "is-row-action"), "data-state": s ? "unread" : "read", children: [
2193
- /* @__PURE__ */ f(
2197
+ return /* @__PURE__ */ h("article", { className: H("cms-notification", s && "is-unread", i && "is-expanded", f && "is-row-action"), "data-state": s ? "unread" : "read", children: [
2198
+ /* @__PURE__ */ h(
2194
2199
  "div",
2195
2200
  {
2196
2201
  className: "cms-notification__row",
2197
2202
  role: "button",
2198
2203
  tabIndex: 0,
2199
2204
  "aria-describedby": t === null ? void 0 : u,
2200
- onClick: k,
2201
- onKeyDown: (x) => {
2202
- x.target !== x.currentTarget || x.key !== "Enter" && x.key !== " " || (x.preventDefault(), k());
2205
+ onClick: L,
2206
+ onKeyDown: (S) => {
2207
+ S.target !== S.currentTarget || S.key !== "Enter" && S.key !== " " || (S.preventDefault(), L());
2203
2208
  },
2204
2209
  children: [
2205
2210
  b != null ? /* @__PURE__ */ n("span", { className: "cms-notification__leading", children: b }) : null,
2206
- /* @__PURE__ */ f("span", { className: "cms-notification__text", children: [
2207
- /* @__PURE__ */ f("span", { className: "cms-notification__head", children: [
2208
- /* @__PURE__ */ f("span", { className: "cms-notification__title", children: [
2209
- s ? /* @__PURE__ */ f("span", { className: "cms-visually-hidden", children: [
2211
+ /* @__PURE__ */ h("span", { className: "cms-notification__text", children: [
2212
+ /* @__PURE__ */ h("span", { className: "cms-notification__head", children: [
2213
+ /* @__PURE__ */ h("span", { className: "cms-notification__title", children: [
2214
+ s ? /* @__PURE__ */ h("span", { className: "cms-visually-hidden", children: [
2210
2215
  a,
2211
2216
  " "
2212
2217
  ] }) : null,
@@ -2230,21 +2235,21 @@ function yl({ title: e, body: t = null, time: l = null, unread: s, unreadLabel:
2230
2235
  "aria-label": i ? m : r,
2231
2236
  title: i ? m : r,
2232
2237
  onClick: () => {
2233
- i || N(), g((x) => !x);
2238
+ i || k(), g((S) => !S);
2234
2239
  },
2235
2240
  children: /* @__PURE__ */ n($, { name: "chevron-down", size: 18 })
2236
2241
  }
2237
2242
  ) : null,
2238
- _ !== null ? /* @__PURE__ */ n(
2243
+ x !== null ? /* @__PURE__ */ n(
2239
2244
  "button",
2240
2245
  {
2241
2246
  type: "button",
2242
2247
  className: "cms-button cms-notification__action",
2243
2248
  onClick: () => {
2244
- var x;
2245
- N(), (x = _.onAction) == null || x.call(_);
2249
+ var S;
2250
+ k(), (S = x.onAction) == null || S.call(x);
2246
2251
  },
2247
- children: _.label
2252
+ children: x.label
2248
2253
  }
2249
2254
  ) : null
2250
2255
  ] });
@@ -2287,9 +2292,9 @@ function xl() {
2287
2292
  window.dispatchEvent(new Event(sn));
2288
2293
  }
2289
2294
  function Ml(e) {
2290
- const [t, l] = D(void 0), [s, a] = D(void 0), [r, m] = D(!0), c = O(e);
2295
+ const [t, l] = I(void 0), [s, a] = I(void 0), [r, m] = I(!0), c = z(e);
2291
2296
  c.current = e;
2292
- const d = O(0), b = Ie(() => {
2297
+ const d = z(0), b = Ie(() => {
2293
2298
  const i = ++d.current;
2294
2299
  m(!0), c.current().then(
2295
2300
  (g) => {
@@ -2330,7 +2335,7 @@ function Ht(e, t, l) {
2330
2335
  }
2331
2336
  const Ot = 800, Pt = /* @__PURE__ */ new Set(["ArrowDown", "ArrowUp", "PageDown", "PageUp", "Home", "End", " "]);
2332
2337
  function zt(e, t) {
2333
- const [l, s] = D(!1);
2338
+ const [l, s] = I(!1);
2334
2339
  return Q(() => {
2335
2340
  const a = e.current;
2336
2341
  if (a === null || !t) {
@@ -2342,117 +2347,117 @@ function zt(e, t) {
2342
2347
  const d = (u) => {
2343
2348
  m = performance.now(), c = u.target;
2344
2349
  }, b = (u) => {
2345
- const N = u.target;
2346
- !(N instanceof HTMLElement && (N.isContentEditable || N.closest("input, textarea, select") !== null)) && Pt.has(u.key) && d(u);
2350
+ const k = u.target;
2351
+ !(k instanceof HTMLElement && (k.isContentEditable || k.closest("input, textarea, select") !== null)) && Pt.has(u.key) && d(u);
2347
2352
  }, i = (u) => {
2348
- const N = u.target;
2349
- if (!(N instanceof HTMLElement)) return;
2350
- const h = N.scrollTop, _ = r.get(N) ?? 0;
2351
- if (r.set(N, h), h <= 0) {
2353
+ const k = u.target;
2354
+ if (!(k instanceof HTMLElement)) return;
2355
+ const f = k.scrollTop, x = r.get(k) ?? 0;
2356
+ if (r.set(k, f), f <= 0) {
2352
2357
  s(!1);
2353
2358
  return;
2354
2359
  }
2355
- performance.now() - m > Ot || !(c === a || c === document.body || c instanceof Node && N.contains(c)) || (h < _ - Mn ? s(!1) : h > _ + Mn && h > Rt && Ht(a, N, h) && s(!0));
2360
+ performance.now() - m > Ot || !(c === a || c === document.body || c instanceof Node && k.contains(c)) || (f < x - Mn ? s(!1) : f > x + Mn && f > Rt && Ht(a, k, f) && s(!0));
2356
2361
  }, g = [["wheel", d], ["touchmove", d], ["pointerdown", d], ["keydown", b]];
2357
- for (const [u, N] of g) a.addEventListener(u, N, { capture: !0, passive: !0 });
2362
+ for (const [u, k] of g) a.addEventListener(u, k, { capture: !0, passive: !0 });
2358
2363
  return a.addEventListener("scroll", i, { capture: !0, passive: !0 }), () => {
2359
- for (const [u, N] of g) a.removeEventListener(u, N, { capture: !0 });
2364
+ for (const [u, k] of g) a.removeEventListener(u, k, { capture: !0 });
2360
2365
  a.removeEventListener("scroll", i, { capture: !0 });
2361
2366
  };
2362
2367
  }, [e, t]), [l, s];
2363
2368
  }
2364
2369
  const Ut = 64;
2365
2370
  function Kt({ bar: e, leading: t, gap: l, icon: s, iconGap: a, search: r, more: m, globals: c, name: d, choice: b }) {
2366
- const i = [...r ? [s] : [], s, s, ...c], g = i.reduce((N, h) => N + h, 0) + a * (i.length - 1);
2371
+ const i = [...r ? [s] : [], s, s, ...c], g = i.reduce((k, f) => k + f, 0) + a * (i.length - 1);
2367
2372
  return e - (t > 0 ? t + l : 0) - l - g + 0.01 < Math.min(Ut, d) + b;
2368
2373
  }
2369
- function El({ title: e, back: t, navigation: l, search: s, searching: a, more: r = [], moreLabel: m = "More actions", globals: c, filter: d, primary: b, onRefresh: i, pullText: g, barHidden: u, children: N }) {
2374
+ function El({ title: e, back: t, navigation: l, search: s, searching: a, more: r = [], moreLabel: m = "More actions", globals: c, filter: d, primary: b, onRefresh: i, pullText: g, barHidden: u, children: k }) {
2370
2375
  var Te, Ee;
2371
- const h = b === void 0 || ("menu" in b ? !b.menu.some((R) => R.offer.offered) : ((Te = b.offer) == null ? void 0 : Te.offered) === !1) ? void 0 : b, _ = h !== void 0 && !("menu" in h) ? ((Ee = h.offer) == null ? void 0 : Ee.refusal) ?? null : null, k = he(), [x, C] = D(!1), A = dn(), v = O(null), y = O(null), [I, U] = D(!1), [P, M] = D(null), [B, z] = D(null), j = Ie(() => z(null), []), K = O(!1), G = O(null), Y = O(null), ee = O(null), ie = r.some((R) => R.offer.offered), be = B !== null && ie && a === void 0;
2376
+ const f = b === void 0 || ("menu" in b ? !b.menu.some((O) => O.offer.offered) : ((Te = b.offer) == null ? void 0 : Te.offered) === !1) ? void 0 : b, x = f !== void 0 && !("menu" in f) ? ((Ee = f.offer) == null ? void 0 : Ee.refusal) ?? null : null, L = he(), [S, _] = I(!1), N = dn(), v = z(null), w = z(null), [T, B] = I(!1), [F, M] = I(null), [R, U] = I(null), j = Ie(() => U(null), []), K = z(!1), G = z(null), Y = z(null), ee = z(null), ie = r.some((O) => O.offer.offered), be = R !== null && ie && a === void 0;
2372
2377
  Dn(d);
2373
- const oe = d === void 0 ? null : An(d), [de, Ce] = D(!1), fe = O(!1), te = O(!1), pe = O(null), _e = d === void 0 ? void 0 : {
2378
+ const oe = d === void 0 ? null : An(d), [de, Ce] = I(!1), fe = z(!1), te = z(!1), pe = z(null), _e = d === void 0 ? void 0 : {
2374
2379
  ...d,
2375
- onChange: (R) => {
2376
- fe.current = !0, d.onChange(R);
2380
+ onChange: (O) => {
2381
+ fe.current = !0, d.onChange(O);
2377
2382
  }
2378
- }, we = oe === null ? "" : ` · ${oe.label}`, ne = d !== void 0 && d.options.length >= 2, [ye, w] = D(!1), E = ne && ie && ye, W = JSON.stringify([ne, ie, E, s !== void 0, a !== void 0, t !== void 0, e, we]), q = Ie(() => {
2379
- const R = G.current, X = Y.current, Ne = ee.current;
2380
- if (R === null || X === null || Ne === null || !ne) return null;
2381
- const ce = (J) => parseFloat(J) || 0, o = getComputedStyle(R), T = R.getBoundingClientRect().width;
2382
- if (T === 0) return null;
2383
- const S = (J) => {
2383
+ }, we = oe === null ? "" : ` · ${oe.label}`, ne = d !== void 0 && d.options.length >= 2, [ye, y] = I(!1), E = ne && ie && ye, W = JSON.stringify([ne, ie, E, s !== void 0, a !== void 0, t !== void 0, e, we]), q = Ie(() => {
2384
+ const O = G.current, X = Y.current, Ne = ee.current;
2385
+ if (O === null || X === null || Ne === null || !ne) return null;
2386
+ const ce = (J) => parseFloat(J) || 0, o = getComputedStyle(O), A = O.getBoundingClientRect().width;
2387
+ if (A === 0) return null;
2388
+ const C = (J) => {
2384
2389
  var ke;
2385
- return ((ke = R.querySelector(`.cms-screen__ruler > [data-ruler="${J}"]`)) == null ? void 0 : ke.getBoundingClientRect().width) ?? 0;
2386
- }, H = R.querySelector(".cms-screen__leading"), le = (s !== void 0 ? 1 : 0) + (E ? 0 : 1) + 1;
2390
+ return ((ke = O.querySelector(`.cms-screen__ruler > [data-ruler="${J}"]`)) == null ? void 0 : ke.getBoundingClientRect().width) ?? 0;
2391
+ }, P = O.querySelector(".cms-screen__leading"), le = (s !== void 0 ? 1 : 0) + (E ? 0 : 1) + 1;
2387
2392
  return Kt({
2388
- bar: T - ce(o.paddingLeft) - ce(o.paddingRight),
2389
- leading: H === null || H.childNodes.length === 0 ? 0 : ce(getComputedStyle(H).minWidth),
2393
+ bar: A - ce(o.paddingLeft) - ce(o.paddingRight),
2394
+ leading: P === null || P.childNodes.length === 0 ? 0 : ce(getComputedStyle(P).minWidth),
2390
2395
  gap: ce(o.columnGap),
2391
2396
  icon: Ne.getBoundingClientRect().width,
2392
2397
  iconGap: ce(getComputedStyle(X).columnGap),
2393
2398
  search: s !== void 0,
2394
2399
  more: !0,
2395
2400
  globals: Array.from(X.children).slice(le).map((J) => J.getBoundingClientRect().width),
2396
- name: S("name"),
2397
- choice: S("choice")
2401
+ name: C("name"),
2402
+ choice: C("choice")
2398
2403
  });
2399
2404
  }, [W]);
2400
2405
  $e(() => {
2401
- const R = q() ?? ye;
2402
- R !== ye && fe.current && (te.current = !0), fe.current = !1, w(R);
2406
+ const O = q() ?? ye;
2407
+ O !== ye && fe.current && (te.current = !0), fe.current = !1, y(O);
2403
2408
  }, [q]), Q(() => {
2404
2409
  if (G.current === null || typeof ResizeObserver > "u") return;
2405
- const R = new ResizeObserver(() => {
2410
+ const O = new ResizeObserver(() => {
2406
2411
  const X = q();
2407
- X !== null && w(X);
2412
+ X !== null && y(X);
2408
2413
  });
2409
- for (const X of [G.current, Y.current, ...G.current.querySelectorAll(".cms-screen__ruler > span")]) X !== null && R.observe(X);
2410
- return () => R.disconnect();
2414
+ for (const X of [G.current, Y.current, ...G.current.querySelectorAll(".cms-screen__ruler > span")]) X !== null && O.observe(X);
2415
+ return () => O.disconnect();
2411
2416
  }, [q]);
2412
- const p = O(E);
2417
+ const p = z(E);
2413
2418
  $e(() => {
2414
2419
  var Ne, ce, o;
2415
2420
  if (p.current === E) return;
2416
- p.current = E, z(null);
2417
- const R = document.activeElement;
2418
- (R === document.body && pe.current !== null && !pe.current.isConnected || te.current && (R === document.body || ((Ne = G.current) == null ? void 0 : Ne.contains(R)) === !0)) && ((o = E ? ee.current : (ce = Y.current) == null ? void 0 : ce.querySelector(".cms-filter-menu")) == null || o.focus()), te.current = !1;
2421
+ p.current = E, U(null);
2422
+ const O = document.activeElement;
2423
+ (O === document.body && pe.current !== null && !pe.current.isConnected || te.current && (O === document.body || ((Ne = G.current) == null ? void 0 : Ne.contains(O)) === !0)) && ((o = E ? ee.current : (ce = Y.current) == null ? void 0 : ce.querySelector(".cms-filter-menu")) == null || o.focus()), te.current = !1;
2419
2424
  }, [E]);
2420
- const L = E && oe !== null && d !== void 0 ? `${m}, ${Tn(d)}` : m, ue = dt(y, i === void 0 ? null : () => {
2421
- I || (U(!0), i().finally(() => U(!1)));
2422
- }), ae = i === void 0 ? null : { distance: ue, refreshing: I, text: g ?? null }, me = a !== void 0 || ue > 0 || I || be || de, [Se, We] = zt(v, u === void 0 && !me), Fe = !me && (u ?? Se);
2423
- return /* @__PURE__ */ f(
2425
+ const D = E && oe !== null && d !== void 0 ? `${m}, ${Tn(d)}` : m, ue = dt(w, i === void 0 ? null : () => {
2426
+ T || (B(!0), i().finally(() => B(!1)));
2427
+ }), ae = i === void 0 ? null : { distance: ue, refreshing: T, text: g ?? null }, me = a !== void 0 || ue > 0 || T || be || de, [Se, We] = zt(v, u === void 0 && !me), Fe = !me && (u ?? Se);
2428
+ return /* @__PURE__ */ h(
2424
2429
  "div",
2425
2430
  {
2426
2431
  ref: v,
2427
- className: F("cms-screen", h !== void 0 && "cms-screen--with-primary"),
2432
+ className: H("cms-screen", f !== void 0 && "cms-screen--with-primary"),
2428
2433
  "data-bar-hidden": Fe ? "" : void 0,
2429
- onFocus: (R) => {
2430
- pe.current = R.target, Fe && R.target instanceof Element && R.target.closest(".cms-screen__bar") !== null && We(!1);
2434
+ onFocus: (O) => {
2435
+ pe.current = O.target, Fe && O.target instanceof Element && O.target.closest(".cms-screen__bar") !== null && We(!1);
2431
2436
  },
2432
2437
  children: [
2433
- a !== void 0 ? /* @__PURE__ */ f("header", { className: "cms-screen__bar cms-screen__bar--searching", children: [
2438
+ a !== void 0 ? /* @__PURE__ */ h("header", { className: "cms-screen__bar cms-screen__bar--searching", children: [
2434
2439
  /* @__PURE__ */ n("button", { type: "button", className: "cms-icon-button cms-screen__icon", "aria-label": a.closeLabel, title: a.closeLabel, onClick: a.onClose, children: /* @__PURE__ */ n($, { name: "chevron-left" }) }),
2435
2440
  /* @__PURE__ */ n("div", { className: "cms-screen__search", children: a.field })
2436
- ] }) : /* @__PURE__ */ f("header", { ref: G, className: "cms-screen__bar", children: [
2437
- /* @__PURE__ */ n("div", { className: "cms-screen__leading", children: t !== void 0 ? t.href !== void 0 ? /* @__PURE__ */ f("a", { className: "cms-screen__back", href: t.href, onClick: t.onBack, children: [
2441
+ ] }) : /* @__PURE__ */ h("header", { ref: G, className: "cms-screen__bar", children: [
2442
+ /* @__PURE__ */ n("div", { className: "cms-screen__leading", children: t !== void 0 ? t.href !== void 0 ? /* @__PURE__ */ h("a", { className: "cms-screen__back", href: t.href, onClick: t.onBack, children: [
2438
2443
  /* @__PURE__ */ n($, { name: "chevron-left" }),
2439
2444
  /* @__PURE__ */ n("span", { className: "cms-screen__back-name", children: t.label })
2440
- ] }) : /* @__PURE__ */ f("button", { type: "button", className: "cms-screen__back", onClick: t.onBack, children: [
2445
+ ] }) : /* @__PURE__ */ h("button", { type: "button", className: "cms-screen__back", onClick: t.onBack, children: [
2441
2446
  /* @__PURE__ */ n($, { name: "chevron-left" }),
2442
2447
  /* @__PURE__ */ n("span", { className: "cms-screen__back-name", children: t.label })
2443
2448
  ] }) : l }),
2444
- oe === null ? /* @__PURE__ */ n("h1", { className: "cms-screen__title", title: e, children: e }) : /* @__PURE__ */ f("h1", { className: "cms-screen__title cms-screen__title--filtered", title: e + we, children: [
2445
- /* @__PURE__ */ f("span", { className: "cms-screen__title-place", children: [
2449
+ oe === null ? /* @__PURE__ */ n("h1", { className: "cms-screen__title", title: e, children: e }) : /* @__PURE__ */ h("h1", { className: "cms-screen__title cms-screen__title--filtered", title: e + we, children: [
2450
+ /* @__PURE__ */ h("span", { className: "cms-screen__title-place", children: [
2446
2451
  /* @__PURE__ */ n("span", { className: "cms-screen__title-name", children: e }),
2447
2452
  /* @__PURE__ */ n("span", { className: "cms-screen__title-dot", children: " · " })
2448
2453
  ] }),
2449
2454
  /* @__PURE__ */ n("span", { className: "cms-screen__title-choice", children: oe.label })
2450
2455
  ] }),
2451
- ne && ie ? /* @__PURE__ */ f("span", { className: "cms-screen__ruler", "aria-hidden": "true", children: [
2456
+ ne && ie ? /* @__PURE__ */ h("span", { className: "cms-screen__ruler", "aria-hidden": "true", children: [
2452
2457
  /* @__PURE__ */ n("span", { "data-ruler": "name", children: e }),
2453
2458
  oe !== null ? /* @__PURE__ */ n("span", { "data-ruler": "choice", children: we }) : null
2454
2459
  ] }) : null,
2455
- /* @__PURE__ */ f("div", { ref: Y, className: "cms-screen__trailing", children: [
2460
+ /* @__PURE__ */ h("div", { ref: Y, className: "cms-screen__trailing", children: [
2456
2461
  s !== void 0 ? /* @__PURE__ */ n("button", { type: "button", className: "cms-icon-button cms-screen__icon", "aria-label": s.label, title: s.label, onClick: s.onOpen, children: /* @__PURE__ */ n($, { name: "search" }) }) : null,
2457
2462
  _e !== void 0 && !E ? /* @__PURE__ */ n(In, { ..._e, iconOnly: !0, onOpenChange: Ce }) : null,
2458
2463
  ie ? /* @__PURE__ */ n(
@@ -2460,18 +2465,18 @@ function El({ title: e, back: t, navigation: l, search: s, searching: a, more: r
2460
2465
  {
2461
2466
  ref: ee,
2462
2467
  type: "button",
2463
- className: F("cms-icon-button cms-screen__icon", E && oe !== null && "cms-screen__icon--active"),
2468
+ className: H("cms-icon-button cms-screen__icon", E && oe !== null && "cms-screen__icon--active"),
2464
2469
  "data-action": "more",
2465
2470
  "aria-haspopup": "menu",
2466
2471
  "aria-expanded": be,
2467
- "aria-label": L,
2468
- title: L,
2472
+ "aria-label": D,
2473
+ title: D,
2469
2474
  onMouseDown: () => {
2470
2475
  K.current = be;
2471
2476
  },
2472
- onClick: (R) => {
2473
- const X = R.currentTarget.getBoundingClientRect();
2474
- z(K.current ? null : { x: X.left, y: X.bottom + 4 }), K.current = !1;
2477
+ onClick: (O) => {
2478
+ const X = O.currentTarget.getBoundingClientRect();
2479
+ U(K.current ? null : { x: X.left, y: X.bottom + 4 }), K.current = !1;
2475
2480
  },
2476
2481
  children: /* @__PURE__ */ n($, { name: "more" })
2477
2482
  }
@@ -2479,55 +2484,55 @@ function El({ title: e, back: t, navigation: l, search: s, searching: a, more: r
2479
2484
  c
2480
2485
  ] })
2481
2486
  ] }),
2482
- /* @__PURE__ */ n("div", { ref: y, className: "cms-screen__content", "data-pulling": ue > 0 ? "" : void 0, "data-refreshing": I ? "" : void 0, children: /* @__PURE__ */ n(En.Provider, { value: ae, children: N }) }),
2483
- h !== void 0 ? /* @__PURE__ */ f(
2487
+ /* @__PURE__ */ n("div", { ref: w, className: "cms-screen__content", "data-pulling": ue > 0 ? "" : void 0, "data-refreshing": T ? "" : void 0, children: /* @__PURE__ */ n(En.Provider, { value: ae, children: k }) }),
2488
+ f !== void 0 ? /* @__PURE__ */ h(
2484
2489
  "button",
2485
2490
  {
2486
2491
  type: "button",
2487
2492
  className: "cms-button cms-button--primary cms-screen__primary",
2488
- "aria-label": h.label,
2489
- ..._ === null ? { title: h.label } : {
2493
+ "aria-label": f.label,
2494
+ ...x === null ? { title: f.label } : {
2490
2495
  "aria-disabled": !0,
2491
- "aria-describedby": k,
2492
- ...x ? { "data-reason-shown": "" } : {},
2493
- ...A.dismissed(ze) ? { "data-tip-dismissed": "" } : {}
2496
+ "aria-describedby": L,
2497
+ ...S ? { "data-reason-shown": "" } : {},
2498
+ ...N.dismissed(ze) ? { "data-tip-dismissed": "" } : {}
2494
2499
  },
2495
- ..."menu" in h ? { "aria-haspopup": "menu", "aria-expanded": P !== null } : {},
2496
- onFocus: () => A.focusIn(ze),
2500
+ ..."menu" in f ? { "aria-haspopup": "menu", "aria-expanded": F !== null } : {},
2501
+ onFocus: () => N.focusIn(ze),
2497
2502
  onBlur: () => {
2498
- C(!1), A.focusOut(ze);
2503
+ _(!1), N.focusOut(ze);
2499
2504
  },
2500
- onMouseEnter: () => A.pointerIn(ze),
2501
- onMouseLeave: () => A.pointerOut(ze),
2502
- onKeyDown: (R) => {
2503
- R.key === "Escape" && _ !== null && (C(!1), A.dismiss(ze));
2505
+ onMouseEnter: () => N.pointerIn(ze),
2506
+ onMouseLeave: () => N.pointerOut(ze),
2507
+ onKeyDown: (O) => {
2508
+ O.key === "Escape" && x !== null && (_(!1), N.dismiss(ze));
2504
2509
  },
2505
- onClick: (R) => {
2506
- if (_ !== null)
2507
- C(!0), A.show(ze);
2508
- else if ("menu" in h) {
2509
- const X = R.currentTarget.getBoundingClientRect();
2510
- M(P === null ? { x: X.left, y: X.top } : null);
2510
+ onClick: (O) => {
2511
+ if (x !== null)
2512
+ _(!0), N.show(ze);
2513
+ else if ("menu" in f) {
2514
+ const X = O.currentTarget.getBoundingClientRect();
2515
+ M(F === null ? { x: X.left, y: X.top } : null);
2511
2516
  } else
2512
- h.onPress();
2517
+ f.onPress();
2513
2518
  },
2514
2519
  children: [
2515
- /* @__PURE__ */ n($, { name: h.icon, size: 24 }),
2516
- _ !== null ? /* @__PURE__ */ n("span", { className: "cms-screen__tip", role: "tooltip", id: k, children: _ }) : null
2520
+ /* @__PURE__ */ n($, { name: f.icon, size: 24 }),
2521
+ x !== null ? /* @__PURE__ */ n("span", { className: "cms-screen__tip", role: "tooltip", id: L, children: x }) : null
2517
2522
  ]
2518
2523
  }
2519
2524
  ) : null,
2520
2525
  /* @__PURE__ */ n(
2521
2526
  Ke,
2522
2527
  {
2523
- at: be ? B : null,
2528
+ at: be ? R : null,
2524
2529
  items: E && _e !== void 0 ? [...r, ...Ln(_e, _e.label)] : r,
2525
2530
  onClose: j,
2526
2531
  label: m,
2527
2532
  focus: "first"
2528
2533
  }
2529
2534
  ),
2530
- h !== void 0 && "menu" in h ? /* @__PURE__ */ n(Ke, { at: P, items: h.menu, onClose: () => M(null), label: h.label }) : null
2535
+ f !== void 0 && "menu" in f ? /* @__PURE__ */ n(Ke, { at: F, items: f.menu, onClose: () => M(null), label: f.label }) : null
2531
2536
  ]
2532
2537
  }
2533
2538
  );