@coolms/ui-react 0.1.0-alpha.42 → 0.1.0-alpha.43

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,64 +1,64 @@
1
- import { jsx as e, jsxs as o, Fragment as $ } from "react/jsx-runtime";
2
- import { useId as fe, useState as D, useRef as P, useEffect as ee, useCallback as Ie, useMemo as Dn, useContext as In, createContext as $n, useLayoutEffect as $e, Fragment as Bn } from "react";
3
- import { createPortal as ln } from "react-dom";
4
- function qe(n, t) {
5
- const l = { ...n };
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";
3
+ import { createPortal as an } from "react-dom";
4
+ function qe(e, t) {
5
+ const l = { ...e };
6
6
  for (const s of Object.keys(t ?? {})) {
7
7
  const a = t == null ? void 0 : t[s];
8
8
  a !== void 0 && (l[s] = a);
9
9
  }
10
10
  return l;
11
11
  }
12
- function H(...n) {
13
- return n.filter(Boolean).join(" ");
12
+ function F(...e) {
13
+ return e.filter(Boolean).join(" ");
14
14
  }
15
- function ae({ name: n }) {
15
+ function se({ name: e }) {
16
16
  const t = { width: 16, height: 16, viewBox: "0 0 16 16", "aria-hidden": !0, focusable: !1 };
17
- switch (n) {
17
+ switch (e) {
18
18
  case "lock":
19
- return /* @__PURE__ */ e("svg", { ...t, className: "cms-glyph", children: /* @__PURE__ */ e("path", { fill: "currentColor", d: "M5 7V5a3 3 0 1 1 6 0v2h.5A1.5 1.5 0 0 1 13 8.5v5A1.5 1.5 0 0 1 11.5 15h-7A1.5 1.5 0 0 1 3 13.5v-5A1.5 1.5 0 0 1 4.5 7H5Zm1.5 0h3V5a1.5 1.5 0 0 0-3 0v2Z" }) });
19
+ return /* @__PURE__ */ n("svg", { ...t, className: "cms-glyph", children: /* @__PURE__ */ n("path", { fill: "currentColor", d: "M5 7V5a3 3 0 1 1 6 0v2h.5A1.5 1.5 0 0 1 13 8.5v5A1.5 1.5 0 0 1 11.5 15h-7A1.5 1.5 0 0 1 3 13.5v-5A1.5 1.5 0 0 1 4.5 7H5Zm1.5 0h3V5a1.5 1.5 0 0 0-3 0v2Z" }) });
20
20
  case "spinner":
21
- return /* @__PURE__ */ e("svg", { ...t, className: "cms-glyph cms-spinner", children: /* @__PURE__ */ e("circle", { cx: "8", cy: "8", r: "6", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeDasharray: "28", strokeDashoffset: "10" }) });
21
+ return /* @__PURE__ */ n("svg", { ...t, className: "cms-glyph cms-spinner", children: /* @__PURE__ */ n("circle", { cx: "8", cy: "8", r: "6", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeDasharray: "28", strokeDashoffset: "10" }) });
22
22
  case "back":
23
- return /* @__PURE__ */ e("svg", { ...t, className: "cms-glyph", children: /* @__PURE__ */ e("path", { fill: "currentColor", d: "M10.7 2.3a1 1 0 0 1 0 1.4L6.4 8l4.3 4.3a1 1 0 0 1-1.4 1.4l-5-5a1 1 0 0 1 0-1.4l5-5a1 1 0 0 1 1.4 0Z" }) });
23
+ return /* @__PURE__ */ n("svg", { ...t, className: "cms-glyph", children: /* @__PURE__ */ n("path", { fill: "currentColor", d: "M10.7 2.3a1 1 0 0 1 0 1.4L6.4 8l4.3 4.3a1 1 0 0 1-1.4 1.4l-5-5a1 1 0 0 1 0-1.4l5-5a1 1 0 0 1 1.4 0Z" }) });
24
24
  case "close":
25
- return /* @__PURE__ */ e("svg", { ...t, className: "cms-glyph", children: /* @__PURE__ */ e("path", { fill: "currentColor", d: "M3.3 3.3a1 1 0 0 1 1.4 0L8 6.6l3.3-3.3a1 1 0 1 1 1.4 1.4L9.4 8l3.3 3.3a1 1 0 0 1-1.4 1.4L8 9.4l-3.3 3.3a1 1 0 0 1-1.4-1.4L6.6 8 3.3 4.7a1 1 0 0 1 0-1.4Z" }) });
25
+ return /* @__PURE__ */ n("svg", { ...t, className: "cms-glyph", children: /* @__PURE__ */ n("path", { fill: "currentColor", d: "M3.3 3.3a1 1 0 0 1 1.4 0L8 6.6l3.3-3.3a1 1 0 1 1 1.4 1.4L9.4 8l3.3 3.3a1 1 0 0 1-1.4 1.4L8 9.4l-3.3 3.3a1 1 0 0 1-1.4-1.4L6.6 8 3.3 4.7a1 1 0 0 1 0-1.4Z" }) });
26
26
  case "warning":
27
- return /* @__PURE__ */ e("svg", { ...t, className: "cms-glyph", children: /* @__PURE__ */ e("path", { fill: "currentColor", d: "M8.9 1.5a1 1 0 0 0-1.8 0l-6 11A1 1 0 0 0 2 14h12a1 1 0 0 0 .9-1.5l-6-11ZM8 5a1 1 0 0 1 1 1v3a1 1 0 0 1-2 0V6a1 1 0 0 1 1-1Zm0 7.5A1 1 0 1 1 8 10.5a1 1 0 0 1 0 2Z" }) });
27
+ return /* @__PURE__ */ n("svg", { ...t, className: "cms-glyph", children: /* @__PURE__ */ n("path", { fill: "currentColor", d: "M8.9 1.5a1 1 0 0 0-1.8 0l-6 11A1 1 0 0 0 2 14h12a1 1 0 0 0 .9-1.5l-6-11ZM8 5a1 1 0 0 1 1 1v3a1 1 0 0 1-2 0V6a1 1 0 0 1 1-1Zm0 7.5A1 1 0 1 1 8 10.5a1 1 0 0 1 0 2Z" }) });
28
28
  case "check":
29
- return /* @__PURE__ */ e("svg", { ...t, className: "cms-glyph", children: /* @__PURE__ */ e("path", { fill: "currentColor", d: "M13.7 4.3a1 1 0 0 1 0 1.4l-6 6a1 1 0 0 1-1.4 0l-3-3a1 1 0 1 1 1.4-1.4L7 9.6l5.3-5.3a1 1 0 0 1 1.4 0Z" }) });
29
+ return /* @__PURE__ */ n("svg", { ...t, className: "cms-glyph", children: /* @__PURE__ */ n("path", { fill: "currentColor", d: "M13.7 4.3a1 1 0 0 1 0 1.4l-6 6a1 1 0 0 1-1.4 0l-3-3a1 1 0 1 1 1.4-1.4L7 9.6l5.3-5.3a1 1 0 0 1 1.4 0Z" }) });
30
30
  case "info":
31
- return /* @__PURE__ */ e("svg", { ...t, className: "cms-glyph", children: /* @__PURE__ */ e("path", { fill: "currentColor", d: "M8 1a7 7 0 1 1 0 14A7 7 0 0 1 8 1Zm0 5.5a1 1 0 0 0-1 1V11a1 1 0 1 0 2 0V7.5a1 1 0 0 0-1-1ZM8 4a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z" }) });
31
+ return /* @__PURE__ */ n("svg", { ...t, className: "cms-glyph", children: /* @__PURE__ */ n("path", { fill: "currentColor", d: "M8 1a7 7 0 1 1 0 14A7 7 0 0 1 8 1Zm0 5.5a1 1 0 0 0-1 1V11a1 1 0 1 0 2 0V7.5a1 1 0 0 0-1-1ZM8 4a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z" }) });
32
32
  }
33
33
  }
34
34
  function De({
35
- variant: n = "secondary",
35
+ variant: e = "secondary",
36
36
  busy: t = !1,
37
37
  busyLabel: l,
38
38
  locked: s = !1,
39
39
  lockedReason: a,
40
- icon: c,
41
- disabled: f,
42
- className: u,
43
- children: m,
44
- type: _ = "button",
45
- title: i,
40
+ icon: i,
41
+ disabled: h,
42
+ className: d,
43
+ children: u,
44
+ type: b = "button",
45
+ title: c,
46
46
  ...v
47
47
  }) {
48
- const h = !!f || t;
49
- return /* @__PURE__ */ o(
48
+ const m = !!h || t;
49
+ return /* @__PURE__ */ f(
50
50
  "button",
51
51
  {
52
52
  ...v,
53
- type: _,
54
- className: H("cms-button", `cms-button--${n}`, t && "is-busy", s && "is-locked", u),
55
- disabled: h,
53
+ type: b,
54
+ className: F("cms-button", `cms-button--${e}`, t && "is-busy", s && "is-locked", d),
55
+ disabled: m,
56
56
  "aria-busy": t || void 0,
57
- title: s ? a ?? i : i,
57
+ title: s ? a ?? c : c,
58
58
  children: [
59
- t ? /* @__PURE__ */ e(ae, { name: "spinner" }) : s ? /* @__PURE__ */ e(ae, { name: "lock" }) : c,
60
- /* @__PURE__ */ e("span", { className: "cms-button__label", children: t && l !== void 0 ? l : m }),
61
- s && a ? /* @__PURE__ */ o("span", { className: "cms-visually-hidden", children: [
59
+ t ? /* @__PURE__ */ n(se, { name: "spinner" }) : s ? /* @__PURE__ */ n(se, { name: "lock" }) : i,
60
+ /* @__PURE__ */ n("span", { className: "cms-button__label", children: t && l !== void 0 ? l : u }),
61
+ s && a ? /* @__PURE__ */ f("span", { className: "cms-visually-hidden", children: [
62
62
  ", ",
63
63
  a
64
64
  ] }) : null
@@ -66,185 +66,13 @@ function De({
66
66
  }
67
67
  );
68
68
  }
69
- const kn = {
70
- mail: /* @__PURE__ */ o($, { children: [
71
- /* @__PURE__ */ e("rect", { x: "3", y: "5", width: "18", height: "14", rx: "2" }),
72
- /* @__PURE__ */ e("path", { d: "m3 7 9 6 9-6" })
73
- ] }),
74
- // A gear: a ring with eight short teeth, the hole in its middle.
75
- settings: /* @__PURE__ */ o($, { children: [
76
- /* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "3" }),
77
- /* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "7" }),
78
- /* @__PURE__ */ e("path", { d: "M12 2v3M12 19v3M2 12h3M19 12h3M4.9 4.9 7 7M17 17l2.1 2.1M4.9 19.1 7 17M17 7l2.1-2.1" })
79
- ] }),
80
- // The envelope with its flap open above it: a message read, or the message itself again.
81
- "mail-open": /* @__PURE__ */ o($, { children: [
82
- /* @__PURE__ */ e("path", { d: "M3 10v9a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-9" }),
83
- /* @__PURE__ */ e("path", { d: "m3 10 9-6 9 6" }),
84
- /* @__PURE__ */ e("path", { d: "m3 10 9 6 9-6" })
85
- ] }),
86
- // A clipboard: copy what is shown.
87
- copy: /* @__PURE__ */ o($, { children: [
88
- /* @__PURE__ */ e("rect", { x: "6", y: "4", width: "12", height: "17", rx: "2" }),
89
- /* @__PURE__ */ e("path", { d: "M9 4V3h6v1" }),
90
- /* @__PURE__ */ e("path", { d: "M9 10h6M9 14h6M9 18h3" })
91
- ] }),
92
- chat: /* @__PURE__ */ e("path", { d: "M4 12a8 8 0 1 1 4 6.9L4 20l1.1-4A8 8 0 0 1 4 12Z" }),
93
- phone: /* @__PURE__ */ e("path", { d: "M5 3h3l2 5-2.5 1.5a11 11 0 0 0 7 7L16 14l5 2v3a2 2 0 0 1-2 2A16 16 0 0 1 3 5a2 2 0 0 1 2-2Z" }),
94
- calendar: /* @__PURE__ */ o($, { children: [
95
- /* @__PURE__ */ e("rect", { x: "3", y: "5", width: "18", height: "16", rx: "2" }),
96
- /* @__PURE__ */ e("path", { d: "M3 10h18M8 3v4M16 3v4" })
97
- ] }),
98
- file: /* @__PURE__ */ o($, { children: [
99
- /* @__PURE__ */ e("path", { d: "M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9Z" }),
100
- /* @__PURE__ */ e("path", { d: "M14 3v6h6M8 13h8M8 17h6" })
101
- ] }),
102
- // The file, with code's angle brackets in place of its lines: a message's source.
103
- "file-code": /* @__PURE__ */ o($, { children: [
104
- /* @__PURE__ */ e("path", { d: "M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9Z" }),
105
- /* @__PURE__ */ e("path", { d: "M14 3v6h6" }),
106
- /* @__PURE__ */ e("path", { d: "m10 12-2 2.5 2 2.5M14 12l2 2.5-2 2.5" })
107
- ] }),
108
- image: /* @__PURE__ */ o($, { children: [
109
- /* @__PURE__ */ e("rect", { x: "3", y: "4", width: "18", height: "16", rx: "2" }),
110
- /* @__PURE__ */ e("circle", { cx: "9", cy: "10", r: "2" }),
111
- /* @__PURE__ */ e("path", { d: "m21 17-5-5-9 8" })
112
- ] }),
113
- search: /* @__PURE__ */ o($, { children: [
114
- /* @__PURE__ */ e("circle", { cx: "11", cy: "11", r: "7" }),
115
- /* @__PURE__ */ e("path", { d: "m20 20-4-4" })
116
- ] }),
117
- bell: /* @__PURE__ */ o($, { children: [
118
- /* @__PURE__ */ e("path", { d: "M6 9a6 6 0 1 1 12 0c0 6 2 8 2 8H4s2-2 2-8Z" }),
119
- /* @__PURE__ */ e("path", { d: "M10 20a2 2 0 0 0 4 0" })
120
- ] }),
121
- pencil: /* @__PURE__ */ o($, { children: [
122
- /* @__PURE__ */ e("path", { d: "M4 20h4L19 9l-4-4L4 16Z" }),
123
- /* @__PURE__ */ e("path", { d: "m13 7 4 4" })
124
- ] }),
125
- download: /* @__PURE__ */ o($, { children: [
126
- /* @__PURE__ */ e("path", { d: "M12 4v11" }),
127
- /* @__PURE__ */ e("path", { d: "m7 11 5 5 5-5" }),
128
- /* @__PURE__ */ e("path", { d: "M4 20h16" })
129
- ] }),
130
- // Download's arrow turned up, from the line: a file sent up.
131
- upload: /* @__PURE__ */ o($, { children: [
132
- /* @__PURE__ */ e("path", { d: "M12 20V9" }),
133
- /* @__PURE__ */ e("path", { d: "m7 13 5-5 5 5" }),
134
- /* @__PURE__ */ e("path", { d: "M4 4h16" })
135
- ] }),
136
- print: /* @__PURE__ */ o($, { children: [
137
- /* @__PURE__ */ e("path", { d: "M7 8V4h10v4" }),
138
- /* @__PURE__ */ e("rect", { x: "3", y: "8", width: "18", height: "8", rx: "2" }),
139
- /* @__PURE__ */ e("path", { d: "M7 14h10v6H7Z" })
140
- ] }),
141
- "open-separately": /* @__PURE__ */ o($, { children: [
142
- /* @__PURE__ */ e("path", { d: "M14 4h6v6" }),
143
- /* @__PURE__ */ e("path", { d: "m20 4-9 9" }),
144
- /* @__PURE__ */ e("path", { d: "M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5" })
145
- ] }),
146
- star: /* @__PURE__ */ e("path", { d: "m12 3 2.8 5.8 6.2.9-4.5 4.4 1 6.2L12 17.4l-5.5 2.9 1-6.2L3 9.7l6.2-.9Z" }),
147
- send: /* @__PURE__ */ o($, { children: [
148
- /* @__PURE__ */ e("path", { d: "M21 3 10 14" }),
149
- /* @__PURE__ */ e("path", { d: "M21 3 14 21l-4-7-7-4Z" })
150
- ] }),
151
- inbox: /* @__PURE__ */ o($, { children: [
152
- /* @__PURE__ */ e("path", { d: "M3 13h5l1 3h6l1-3h5" }),
153
- /* @__PURE__ */ e("path", { d: "M5 5h14l2 8v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-6Z" })
154
- ] }),
155
- archive: /* @__PURE__ */ o($, { children: [
156
- /* @__PURE__ */ e("rect", { x: "3", y: "4", width: "18", height: "5", rx: "1" }),
157
- /* @__PURE__ */ e("path", { d: "M5 9v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V9M10 13h4" })
158
- ] }),
159
- trash: /* @__PURE__ */ o($, { children: [
160
- /* @__PURE__ */ e("path", { d: "M4 7h16M10 11v6M14 11v6" }),
161
- /* @__PURE__ */ e("path", { d: "M6 7l1 13a2 2 0 0 0 2 1h6a2 2 0 0 0 2-1l1-13M9 7V4h6v3" })
162
- ] }),
163
- paperclip: /* @__PURE__ */ e("path", { d: "m20 11-8.5 8.5a5 5 0 0 1-7-7L13 4a3.5 3.5 0 0 1 5 5l-8.5 8.5a2 2 0 0 1-3-3L14 7" }),
164
- mic: /* @__PURE__ */ o($, { children: [
165
- /* @__PURE__ */ e("rect", { x: "9", y: "3", width: "6", height: "11", rx: "3" }),
166
- /* @__PURE__ */ e("path", { d: "M5 11a7 7 0 0 0 14 0M12 18v3" })
167
- ] }),
168
- speaker: /* @__PURE__ */ o($, { children: [
169
- /* @__PURE__ */ e("path", { d: "M4 9h4l5-4v14l-5-4H4Z" }),
170
- /* @__PURE__ */ e("path", { d: "M16 9a4 4 0 0 1 0 6M19 6a8 8 0 0 1 0 12" })
171
- ] }),
172
- "user-plus": /* @__PURE__ */ o($, { children: [
173
- /* @__PURE__ */ e("circle", { cx: "10", cy: "8", r: "4" }),
174
- /* @__PURE__ */ e("path", { d: "M3 21a7 7 0 0 1 14 0M19 8v6M16 11h6" })
175
- ] }),
176
- // A person, nothing more: one whose account is gone.
177
- user: /* @__PURE__ */ o($, { children: [
178
- /* @__PURE__ */ e("circle", { cx: "12", cy: "8", r: "4" }),
179
- /* @__PURE__ */ e("path", { d: "M4 21a8 8 0 0 1 16 0" })
180
- ] }),
181
- // A person with a tick: someone allowed.
182
- "user-check": /* @__PURE__ */ o($, { children: [
183
- /* @__PURE__ */ e("circle", { cx: "10", cy: "8", r: "4" }),
184
- /* @__PURE__ */ e("path", { d: "M3 21a7 7 0 0 1 14 0M16 11l2 2 4-4" })
185
- ] }),
186
- // A person with a cross: someone no longer allowed.
187
- "user-x": /* @__PURE__ */ o($, { children: [
188
- /* @__PURE__ */ e("circle", { cx: "10", cy: "8", r: "4" }),
189
- /* @__PURE__ */ e("path", { d: "M3 21a7 7 0 0 1 14 0M17 8l4 4M21 8l-4 4" })
190
- ] }),
191
- // Two people: the members of a group.
192
- users: /* @__PURE__ */ o($, { children: [
193
- /* @__PURE__ */ e("circle", { cx: "9", cy: "8", r: "3.5" }),
194
- /* @__PURE__ */ e("path", { d: "M2.5 20a6.5 6.5 0 0 1 13 0M16 4.6a3.5 3.5 0 0 1 0 6.8M18 14a6.5 6.5 0 0 1 3.5 6" })
195
- ] }),
196
- "phone-off": /* @__PURE__ */ e("path", { d: "M3 14c5-5 13-5 18 0l-2 3-4-1v-3a10 10 0 0 0-6 0v3l-4 1Z" }),
197
- video: /* @__PURE__ */ o($, { children: [
198
- /* @__PURE__ */ e("rect", { x: "3", y: "6", width: "13", height: "12", rx: "2" }),
199
- /* @__PURE__ */ e("path", { d: "m16 10 5-3v10l-5-3" })
200
- ] }),
201
- info: /* @__PURE__ */ o($, { children: [
202
- /* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "9" }),
203
- /* @__PURE__ */ e("path", { d: "M12 11v6M12 7.5v.5" })
204
- ] }),
205
- "chevron-down": /* @__PURE__ */ e("path", { d: "m6 9 6 6 6-6" }),
206
- "chevron-left": /* @__PURE__ */ e("path", { d: "m15 18-6-6 6-6" }),
207
- plus: /* @__PURE__ */ e("path", { d: "M12 5v14M5 12h14" }),
208
- folder: /* @__PURE__ */ e("path", { d: "M3 6a2 2 0 0 1 2-2h4l2 3h8a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z" }),
209
- // The folder with a plus inside: a new folder.
210
- "folder-plus": /* @__PURE__ */ o($, { children: [
211
- /* @__PURE__ */ e("path", { d: "M3 6a2 2 0 0 1 2-2h4l2 3h8a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z" }),
212
- /* @__PURE__ */ e("path", { d: "M12 10.5v6M9 13.5h6" })
213
- ] }),
214
- // The folder with a cross inside: a folder removed.
215
- "folder-x": /* @__PURE__ */ o($, { children: [
216
- /* @__PURE__ */ e("path", { d: "M3 6a2 2 0 0 1 2-2h4l2 3h8a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z" }),
217
- /* @__PURE__ */ e("path", { d: "m9.5 11 5 5M14.5 11l-5 5" })
218
- ] }),
219
- check: /* @__PURE__ */ e("path", { d: "m5 12 5 5 9-10" }),
220
- server: /* @__PURE__ */ o($, { children: [
221
- /* @__PURE__ */ e("rect", { x: "3", y: "4", width: "18", height: "7", rx: "2" }),
222
- /* @__PURE__ */ e("rect", { x: "3", y: "13", width: "18", height: "7", rx: "2" }),
223
- /* @__PURE__ */ e("path", { d: "M7 7.5h.5M7 16.5h.5" })
224
- ] }),
225
- reply: /* @__PURE__ */ e("path", { d: "M10 8 4 13l6 5M4 13h11a5 5 0 0 1 5 5" }),
226
- // Reply's mirror: the arrow leaves to the right.
227
- forward: /* @__PURE__ */ e("path", { d: "m14 8 6 5-6 5M20 13H9a5 5 0 0 0-5 5" }),
228
- refresh: /* @__PURE__ */ e("path", { d: "M20 11a8 8 0 1 0-2.3 5.7M20 5v6h-6" }),
229
- more: /* @__PURE__ */ e("path", { d: "M5 12h.5M12 12h.5M19 12h.5" }),
230
- // A number sign: a channel, by its name.
231
- hash: /* @__PURE__ */ e("path", { d: "M10 4 8 20M16 4l-2 16M5 9h15M4 15h15" }),
232
- // A funnel: a list's filter.
233
- funnel: /* @__PURE__ */ e("path", { d: "M4 5h16l-6 8v6l-4-2v-4Z" }),
234
- // An eye: what is hidden is shown. Struck through: it is hidden again.
235
- eye: /* @__PURE__ */ o($, { children: [
236
- /* @__PURE__ */ e("path", { d: "M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12Z" }),
237
- /* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "3" })
238
- ] }),
239
- "eye-off": /* @__PURE__ */ o($, { children: [
240
- /* @__PURE__ */ e("path", { d: "M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12Z" }),
241
- /* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "3" }),
242
- /* @__PURE__ */ e("path", { d: "m4 4 16 16" })
243
- ] }),
244
- important: /* @__PURE__ */ e("path", { d: "M4 6h11l5 6-5 6H4l4-6-4-6Z" })
245
- };
246
- function B({ name: n, size: t = 20, label: l }) {
247
- return /* @__PURE__ */ e(
69
+ const On = { width: 1.75, linecap: "round", linejoin: "round" }, Pn = { mail: { parts: [{ tag: "rect", x: "3", y: "5", width: "18", height: "14", rx: "2" }, { tag: "path", d: "m3 7 9 6 9-6" }] }, settings: { note: "A gear: a ring with eight short teeth, the hole in its middle.", parts: [{ tag: "circle", cx: "12", cy: "12", r: "3" }, { tag: "circle", cx: "12", cy: "12", r: "7" }, { tag: "path", d: "M12 2v3M12 19v3M2 12h3M19 12h3M4.9 4.9 7 7M17 17l2.1 2.1M4.9 19.1 7 17M17 7l2.1-2.1" }] }, "mail-open": { note: "The envelope with its flap open above it: a message read, or the message itself again.", parts: [{ tag: "path", d: "M3 10v9a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-9" }, { tag: "path", d: "m3 10 9-6 9 6" }, { tag: "path", d: "m3 10 9 6 9-6" }] }, copy: { note: "A clipboard: copy what is shown.", parts: [{ tag: "rect", x: "6", y: "4", width: "12", height: "17", rx: "2" }, { tag: "path", d: "M9 4V3h6v1" }, { tag: "path", d: "M9 10h6M9 14h6M9 18h3" }] }, chat: { parts: [{ tag: "path", d: "M4 12a8 8 0 1 1 4 6.9L4 20l1.1-4A8 8 0 0 1 4 12Z" }] }, phone: { parts: [{ tag: "path", d: "M5 3h3l2 5-2.5 1.5a11 11 0 0 0 7 7L16 14l5 2v3a2 2 0 0 1-2 2A16 16 0 0 1 3 5a2 2 0 0 1 2-2Z" }] }, calendar: { parts: [{ tag: "rect", x: "3", y: "5", width: "18", height: "16", rx: "2" }, { tag: "path", d: "M3 10h18M8 3v4M16 3v4" }] }, file: { parts: [{ tag: "path", d: "M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9Z" }, { tag: "path", d: "M14 3v6h6M8 13h8M8 17h6" }] }, "file-code": { note: "The file, with code's angle brackets in place of its lines: a message's source.", parts: [{ tag: "path", d: "M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9Z" }, { tag: "path", d: "M14 3v6h6" }, { tag: "path", d: "m10 12-2 2.5 2 2.5M14 12l2 2.5-2 2.5" }] }, image: { parts: [{ tag: "rect", x: "3", y: "4", width: "18", height: "16", rx: "2" }, { tag: "circle", cx: "9", cy: "10", r: "2" }, { tag: "path", d: "m21 17-5-5-9 8" }] }, search: { parts: [{ tag: "circle", cx: "11", cy: "11", r: "7" }, { tag: "path", d: "m20 20-4-4" }] }, bell: { parts: [{ tag: "path", d: "M6 9a6 6 0 1 1 12 0c0 6 2 8 2 8H4s2-2 2-8Z" }, { tag: "path", d: "M10 20a2 2 0 0 0 4 0" }] }, pencil: { parts: [{ tag: "path", d: "M4 20h4L19 9l-4-4L4 16Z" }, { tag: "path", d: "m13 7 4 4" }] }, download: { parts: [{ tag: "path", d: "M12 4v11" }, { tag: "path", d: "m7 11 5 5 5-5" }, { tag: "path", d: "M4 20h16" }] }, upload: { note: "Download's arrow turned up, from the line: a file sent up.", parts: [{ tag: "path", d: "M12 20V9" }, { tag: "path", d: "m7 13 5-5 5 5" }, { tag: "path", d: "M4 4h16" }] }, print: { parts: [{ tag: "path", d: "M7 8V4h10v4" }, { tag: "rect", x: "3", y: "8", width: "18", height: "8", rx: "2" }, { tag: "path", d: "M7 14h10v6H7Z" }] }, "open-separately": { parts: [{ tag: "path", d: "M14 4h6v6" }, { tag: "path", d: "m20 4-9 9" }, { tag: "path", d: "M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5" }] }, star: { parts: [{ tag: "path", d: "m12 3 2.8 5.8 6.2.9-4.5 4.4 1 6.2L12 17.4l-5.5 2.9 1-6.2L3 9.7l6.2-.9Z" }] }, send: { parts: [{ tag: "path", d: "M21 3 10 14" }, { tag: "path", d: "M21 3 14 21l-4-7-7-4Z" }] }, inbox: { parts: [{ tag: "path", d: "M3 13h5l1 3h6l1-3h5" }, { tag: "path", d: "M5 5h14l2 8v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-6Z" }] }, archive: { parts: [{ tag: "rect", x: "3", y: "4", width: "18", height: "5", rx: "1" }, { tag: "path", d: "M5 9v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V9M10 13h4" }] }, trash: { parts: [{ tag: "path", d: "M4 7h16M10 11v6M14 11v6" }, { tag: "path", d: "M6 7l1 13a2 2 0 0 0 2 1h6a2 2 0 0 0 2-1l1-13M9 7V4h6v3" }] }, paperclip: { parts: [{ tag: "path", d: "m20 11-8.5 8.5a5 5 0 0 1-7-7L13 4a3.5 3.5 0 0 1 5 5l-8.5 8.5a2 2 0 0 1-3-3L14 7" }] }, mic: { parts: [{ tag: "rect", x: "9", y: "3", width: "6", height: "11", rx: "3" }, { tag: "path", d: "M5 11a7 7 0 0 0 14 0M12 18v3" }] }, speaker: { parts: [{ tag: "path", d: "M4 9h4l5-4v14l-5-4H4Z" }, { tag: "path", d: "M16 9a4 4 0 0 1 0 6M19 6a8 8 0 0 1 0 12" }] }, "user-plus": { parts: [{ tag: "circle", cx: "10", cy: "8", r: "4" }, { tag: "path", d: "M3 21a7 7 0 0 1 14 0M19 8v6M16 11h6" }] }, user: { note: "A person, nothing more: one whose account is gone.", parts: [{ tag: "circle", cx: "12", cy: "8", r: "4" }, { tag: "path", d: "M4 21a8 8 0 0 1 16 0" }] }, "user-check": { note: "A person with a tick: someone allowed.", parts: [{ tag: "circle", cx: "10", cy: "8", r: "4" }, { tag: "path", d: "M3 21a7 7 0 0 1 14 0M16 11l2 2 4-4" }] }, "user-x": { note: "A person with a cross: someone no longer allowed.", parts: [{ tag: "circle", cx: "10", cy: "8", r: "4" }, { tag: "path", d: "M3 21a7 7 0 0 1 14 0M17 8l4 4M21 8l-4 4" }] }, users: { note: "Two people: the members of a group.", parts: [{ tag: "circle", cx: "9", cy: "8", r: "3.5" }, { tag: "path", d: "M2.5 20a6.5 6.5 0 0 1 13 0M16 4.6a3.5 3.5 0 0 1 0 6.8M18 14a6.5 6.5 0 0 1 3.5 6" }] }, "phone-off": { parts: [{ tag: "path", d: "M3 14c5-5 13-5 18 0l-2 3-4-1v-3a10 10 0 0 0-6 0v3l-4 1Z" }] }, video: { parts: [{ tag: "rect", x: "3", y: "6", width: "13", height: "12", rx: "2" }, { tag: "path", d: "m16 10 5-3v10l-5-3" }] }, info: { parts: [{ tag: "circle", cx: "12", cy: "12", r: "9" }, { tag: "path", d: "M12 11v6M12 7.5v.5" }] }, "chevron-down": { parts: [{ tag: "path", d: "m6 9 6 6 6-6" }] }, "chevron-left": { parts: [{ tag: "path", d: "m15 18-6-6 6-6" }] }, plus: { parts: [{ tag: "path", d: "M12 5v14M5 12h14" }] }, folder: { parts: [{ tag: "path", d: "M3 6a2 2 0 0 1 2-2h4l2 3h8a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z" }] }, "folder-plus": { note: "The folder with a plus inside: a new folder.", parts: [{ tag: "path", d: "M3 6a2 2 0 0 1 2-2h4l2 3h8a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z" }, { tag: "path", d: "M12 10.5v6M9 13.5h6" }] }, "folder-x": { note: "The folder with a cross inside: a folder removed.", parts: [{ tag: "path", d: "M3 6a2 2 0 0 1 2-2h4l2 3h8a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z" }, { tag: "path", d: "m9.5 11 5 5M14.5 11l-5 5" }] }, check: { parts: [{ tag: "path", d: "m5 12 5 5 9-10" }] }, server: { parts: [{ tag: "rect", x: "3", y: "4", width: "18", height: "7", rx: "2" }, { tag: "rect", x: "3", y: "13", width: "18", height: "7", rx: "2" }, { tag: "path", d: "M7 7.5h.5M7 16.5h.5" }] }, reply: { parts: [{ tag: "path", d: "M10 8 4 13l6 5M4 13h11a5 5 0 0 1 5 5" }] }, forward: { note: "Reply's mirror: the arrow leaves to the right.", parts: [{ tag: "path", d: "m14 8 6 5-6 5M20 13H9a5 5 0 0 0-5 5" }] }, refresh: { parts: [{ tag: "path", d: "M20 11a8 8 0 1 0-2.3 5.7M20 5v6h-6" }] }, more: { parts: [{ tag: "path", d: "M5 12h.5M12 12h.5M19 12h.5" }], strokeWidth: 3 }, hash: { note: "A number sign: a channel, by its name.", parts: [{ tag: "path", d: "M10 4 8 20M16 4l-2 16M5 9h15M4 15h15" }] }, funnel: { note: "A funnel: a list's filter.", parts: [{ tag: "path", d: "M4 5h16l-6 8v6l-4-2v-4Z" }] }, eye: { note: "An eye: what is hidden is shown. Struck through: it is hidden again.", parts: [{ tag: "path", d: "M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12Z" }, { tag: "circle", cx: "12", cy: "12", r: "3" }] }, "eye-off": { parts: [{ tag: "path", d: "M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12Z" }, { tag: "circle", cx: "12", cy: "12", r: "3" }, { tag: "path", d: "m4 4 16 16" }] }, important: { parts: [{ tag: "path", d: "M4 6h11l5 6-5 6H4l4-6-4-6Z" }] } }, zn = { reply: "reply", "reply-all": "reply", forward: "forward", envelope: "mail", "envelope-open": "mail-open", star: "star", "star-fill": "star", "folder-symlink": "folder", folder: "folder", trash: "trash", archive: "archive", "arrow-clockwise": "refresh", download: "download", printer: "print", "file-earmark-code": "file-code", clipboard: "copy", "three-dots": "more", pencil: "pencil", trash3: "trash", "folder-plus": "folder-plus", "folder-x": "folder-x", image: "image", "person-check": "user-check", "person-x": "user-x", "arrow-left": "chevron-left", "pencil-square": "pencil", "plus-lg": "plus", gear: "settings", upload: "upload", "cloud-upload": "upload", people: "users", "file-earmark-word": "file", "file-earmark-spreadsheet": "file", "file-earmark-text": "file", folder2: "folder", "folder2-open": "folder", "chat-dots": "chat", images: "image", paperclip: "paperclip", hash: "hash", funnel: "funnel", eye: "eye", "eye-slash": "eye-off", inbox: "inbox", bell: "bell" }, rn = {
70
+ stroke: On,
71
+ icons: Pn,
72
+ bootstrap: zn
73
+ }, Qe = rn.icons, Xe = rn.stroke;
74
+ function $({ name: e, size: t = 20, label: l }) {
75
+ return /* @__PURE__ */ n(
248
76
  "svg",
249
77
  {
250
78
  className: "cms-icon",
@@ -253,478 +81,434 @@ function B({ name: n, size: t = 20, label: l }) {
253
81
  viewBox: "0 0 24 24",
254
82
  fill: "none",
255
83
  stroke: "currentColor",
256
- strokeWidth: n === "more" ? 3 : 1.75,
257
- strokeLinecap: "round",
258
- strokeLinejoin: "round",
84
+ strokeWidth: Qe[e].strokeWidth ?? Xe.width,
85
+ strokeLinecap: Xe.linecap,
86
+ strokeLinejoin: Xe.linejoin,
259
87
  focusable: !1,
260
88
  ...l ? { role: "img", "aria-label": l } : { "aria-hidden": !0 },
261
- children: kn[n]
89
+ children: Qe[e].parts.map(({ tag: s, ...a }, i) => $n(s, { key: i, ...a }))
262
90
  }
263
91
  );
264
92
  }
265
- const zt = Object.keys(kn), pn = {
266
- reply: "reply",
267
- "reply-all": "reply",
268
- forward: "forward",
269
- envelope: "mail",
270
- "envelope-open": "mail-open",
271
- star: "star",
272
- "star-fill": "star",
273
- "folder-symlink": "folder",
274
- folder: "folder",
275
- trash: "trash",
276
- archive: "archive",
277
- "arrow-clockwise": "refresh",
278
- download: "download",
279
- printer: "print",
280
- "file-earmark-code": "file-code",
281
- clipboard: "copy",
282
- "three-dots": "more",
283
- pencil: "pencil",
284
- trash3: "trash",
285
- "folder-plus": "folder-plus",
286
- "folder-x": "folder-x",
287
- image: "image",
288
- "person-check": "user-check",
289
- "person-x": "user-x",
290
- "arrow-left": "chevron-left",
291
- "pencil-square": "pencil",
292
- "plus-lg": "plus",
293
- gear: "settings",
294
- upload: "upload",
295
- "cloud-upload": "upload",
296
- people: "users",
297
- "file-earmark-word": "file",
298
- "file-earmark-spreadsheet": "file",
299
- "file-earmark-text": "file",
300
- folder2: "folder",
301
- "folder2-open": "folder",
302
- "chat-dots": "chat",
303
- images: "image",
304
- paperclip: "paperclip",
305
- hash: "hash",
306
- funnel: "funnel",
307
- eye: "eye",
308
- "eye-slash": "eye-off"
309
- };
310
- function Be(n) {
311
- return Object.prototype.hasOwnProperty.call(pn, n) ? pn[n] : null;
93
+ const qt = Object.keys(Qe), vn = rn.bootstrap;
94
+ function Be(e) {
95
+ return Object.prototype.hasOwnProperty.call(vn, e) ? vn[e] : null;
312
96
  }
313
- function Fn() {
97
+ function Un() {
314
98
  try {
315
99
  return process.env.NODE_ENV !== "production";
316
100
  } catch {
317
101
  return !1;
318
102
  }
319
103
  }
320
- const _n = /* @__PURE__ */ new Set();
321
- function xn({ name: n, size: t = 18 }) {
322
- if (n === "") return null;
323
- const l = Be(n);
324
- return l !== null ? /* @__PURE__ */ e(B, { name: l, size: t }) : (!_n.has(n) && Fn() && (_n.add(n), console.warn(`@coolms/ui-react: no icon for the server's icon name "${n}"; its space is kept empty`)), /* @__PURE__ */ e("span", { className: "cms-icon cms-icon--blank", style: { width: t, height: t }, "aria-hidden": "true", "data-icon-name": n }));
325
- }
326
- function sn({ id: n, label: t, help: l, error: s, pinned: a, children: c }) {
327
- return /* @__PURE__ */ o("div", { className: H("cms-field", s != null && "is-invalid"), children: [
328
- /* @__PURE__ */ e("label", { className: "cms-field__label", htmlFor: n, children: t }),
329
- c,
330
- a != null ? /* @__PURE__ */ o("p", { className: "cms-field__pinned", id: `${n}-pinned`, children: [
331
- /* @__PURE__ */ e(ae, { name: "lock" }),
104
+ const gn = /* @__PURE__ */ new Set();
105
+ function Cn({ name: e, size: t = 18 }) {
106
+ if (e === "") return null;
107
+ const l = Be(e);
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
+ }
110
+ function cn({ id: e, label: t, help: l, error: s, pinned: a, children: i }) {
111
+ return /* @__PURE__ */ f("div", { className: F("cms-field", s != null && "is-invalid"), children: [
112
+ /* @__PURE__ */ n("label", { className: "cms-field__label", htmlFor: e, children: t }),
113
+ i,
114
+ a != null ? /* @__PURE__ */ f("p", { className: "cms-field__pinned", id: `${e}-pinned`, children: [
115
+ /* @__PURE__ */ n(se, { name: "lock" }),
332
116
  " ",
333
117
  a
334
118
  ] }) : null,
335
- s != null ? /* @__PURE__ */ e("p", { className: "cms-field__error", id: `${n}-error`, role: "alert", children: s }) : null,
336
- l != null ? /* @__PURE__ */ e("p", { className: "cms-field__help", id: `${n}-help`, children: l }) : null
119
+ s != null ? /* @__PURE__ */ n("p", { className: "cms-field__error", id: `${e}-error`, role: "alert", children: s }) : null,
120
+ l != null ? /* @__PURE__ */ n("p", { className: "cms-field__help", id: `${e}-help`, children: l }) : null
337
121
  ] });
338
122
  }
339
- function an(n, t) {
340
- const l = [t.error != null && `${n}-error`, t.pinned != null && `${n}-pinned`, t.help != null && `${n}-help`].filter(Boolean).join(" ");
123
+ function on(e, t) {
124
+ const l = [t.error != null && `${e}-error`, t.pinned != null && `${e}-pinned`, t.help != null && `${e}-help`].filter(Boolean).join(" ");
341
125
  return l === "" ? void 0 : l;
342
126
  }
343
- const Hn = /^(\d{4})-(\d{2})-(\d{2})(?:T(\d{2}):(\d{2})(?::(\d{2}))?)?$/, Rn = /^(\d{2}):(\d{2})(?::(\d{2}))?$/;
344
- function On(n, t, l) {
345
- const s = (c, f, u, m = 0, _ = 0, i = 0) => {
346
- const v = new Date(Date.UTC(c, f - 1, u, m, _, i));
347
- return v.setUTCFullYear(c), v.getUTCFullYear() === c && v.getUTCMonth() === f - 1 && v.getUTCDate() === u && v.getUTCHours() === m && v.getUTCMinutes() === _ && v.getUTCSeconds() === i ? v : null;
348
- }, a = (c) => ({ hour: Number(c[1]), minute: Number(c[2]), second: Number(c[3] ?? 0) });
127
+ const Kn = /^(\d{4})-(\d{2})-(\d{2})(?:T(\d{2}):(\d{2})(?::(\d{2}))?)?$/, Wn = /^(\d{2}):(\d{2})(?::(\d{2}))?$/;
128
+ function Zn(e, t, l) {
129
+ const s = (i, h, d, u = 0, b = 0, c = 0) => {
130
+ const v = new Date(Date.UTC(i, h - 1, d, u, b, c));
131
+ return v.setUTCFullYear(i), v.getUTCFullYear() === i && v.getUTCMonth() === h - 1 && v.getUTCDate() === d && v.getUTCHours() === u && v.getUTCMinutes() === b && v.getUTCSeconds() === c ? v : null;
132
+ }, a = (i) => ({ hour: Number(i[1]), minute: Number(i[2]), second: Number(i[3] ?? 0) });
349
133
  try {
350
- if (n === "time") {
351
- const f = t.match(Rn);
352
- if (f === null) return t;
353
- const u = a(f), m = s(2e3, 1, 1, u.hour, u.minute, u.second);
354
- return m === null ? t : new Intl.DateTimeFormat(l, { timeStyle: f[3] === void 0 ? "short" : "medium", timeZone: "UTC" }).format(m);
134
+ if (e === "time") {
135
+ const h = t.match(Wn);
136
+ if (h === null) return t;
137
+ const d = a(h), u = s(2e3, 1, 1, d.hour, d.minute, d.second);
138
+ return u === null ? t : new Intl.DateTimeFormat(l, { timeStyle: h[3] === void 0 ? "short" : "medium", timeZone: "UTC" }).format(u);
355
139
  }
356
- const c = t.match(Hn);
357
- if (c === null) return t;
358
- if (n === "date" && c[4] === void 0) {
359
- const f = s(Number(c[1]), Number(c[2]), Number(c[3]));
360
- return f === null ? t : new Intl.DateTimeFormat(l, { dateStyle: "medium", timeZone: "UTC" }).format(f);
140
+ const i = t.match(Kn);
141
+ if (i === null) return t;
142
+ if (e === "date" && i[4] === void 0) {
143
+ const h = s(Number(i[1]), Number(i[2]), Number(i[3]));
144
+ return h === null ? t : new Intl.DateTimeFormat(l, { dateStyle: "medium", timeZone: "UTC" }).format(h);
361
145
  }
362
- if (n === "datetime-local" && c[4] !== void 0) {
363
- const f = s(Number(c[1]), Number(c[2]), Number(c[3]), Number(c[4]), Number(c[5]), Number(c[6] ?? 0));
364
- return f === null ? t : new Intl.DateTimeFormat(l, { dateStyle: "medium", timeStyle: c[6] === void 0 ? "short" : "medium", timeZone: "UTC" }).format(f);
146
+ if (e === "datetime-local" && i[4] !== void 0) {
147
+ const h = s(Number(i[1]), Number(i[2]), Number(i[3]), Number(i[4]), Number(i[5]), Number(i[6] ?? 0));
148
+ return h === null ? t : new Intl.DateTimeFormat(l, { dateStyle: "medium", timeStyle: i[6] === void 0 ? "short" : "medium", timeZone: "UTC" }).format(h);
365
149
  }
366
150
  } catch {
367
151
  return t;
368
152
  }
369
153
  return t;
370
154
  }
371
- const Pn = /* @__PURE__ */ new Set(["date", "time", "datetime-local"]);
372
- function Ut({ label: n, help: t, error: l, disabled: s, readOnly: a, pinned: c, value: f, onChange: u, placeholder: m, type: _ = "text", name: i, locale: v, min: h, max: w, step: r, minLength: g, maxLength: T, required: x, autoComplete: M, reveal: E }) {
373
- const b = fe(), [N, I] = D(!1), K = a === !0 || c != null, z = K && Pn.has(_), k = _ === "number" && (r === "any" || typeof r == "number" && !Number.isInteger(r)), F = _ === "password" && E !== void 0 && !K, U = /* @__PURE__ */ e(
155
+ const Vn = /* @__PURE__ */ new Set(["date", "time", "datetime-local"]);
156
+ function Gt({ label: e, help: t, error: l, disabled: s, readOnly: a, pinned: i, value: h, onChange: d, placeholder: u, type: b = "text", name: c, locale: v, min: m, max: N, step: r, minLength: g, maxLength: T, required: C, autoComplete: S, reveal: x }) {
157
+ const _ = he(), [y, I] = D(!1), U = a === !0 || i != null, P = U && Vn.has(b), k = b === "number" && (r === "any" || typeof r == "number" && !Number.isInteger(r)), B = b === "password" && x !== void 0 && !U, z = /* @__PURE__ */ n(
374
158
  "input",
375
159
  {
376
- id: b,
377
- name: i,
378
- type: z || F && N ? "text" : _,
379
- autoComplete: M,
160
+ id: _,
161
+ name: c,
162
+ type: P || B && y ? "text" : b,
163
+ autoComplete: S,
380
164
  className: "cms-input",
381
- value: z ? On(_, f, v) : f,
382
- ...z ? { "data-value": f } : {},
165
+ value: P ? Zn(b, h, v) : h,
166
+ ...P ? { "data-value": h } : {},
383
167
  lang: v,
384
- placeholder: m,
168
+ placeholder: u,
385
169
  disabled: s,
386
- readOnly: K,
387
- required: x,
388
- "aria-required": x || void 0,
389
- min: z ? void 0 : h,
390
- max: z ? void 0 : w,
391
- step: z ? void 0 : r,
170
+ readOnly: U,
171
+ required: C,
172
+ "aria-required": C || void 0,
173
+ min: P ? void 0 : m,
174
+ max: P ? void 0 : N,
175
+ step: P ? void 0 : r,
392
176
  minLength: g,
393
177
  maxLength: T,
394
- inputMode: _ === "number" ? k ? "decimal" : "numeric" : void 0,
178
+ inputMode: b === "number" ? k ? "decimal" : "numeric" : void 0,
395
179
  "aria-invalid": l != null || void 0,
396
- "aria-describedby": an(b, { help: t, error: l, pinned: c }),
397
- onChange: (Y) => u == null ? void 0 : u(Y.target.value)
180
+ "aria-describedby": on(_, { help: t, error: l, pinned: i }),
181
+ onChange: (j) => d == null ? void 0 : d(j.target.value)
398
182
  }
399
183
  );
400
- return /* @__PURE__ */ e(sn, { id: b, label: n, help: t, error: l, pinned: c, children: F ? /* @__PURE__ */ o("span", { className: "cms-input-reveal", children: [
401
- U,
402
- /* @__PURE__ */ e(
184
+ return /* @__PURE__ */ n(cn, { id: _, label: e, help: t, error: l, pinned: i, children: B ? /* @__PURE__ */ f("span", { className: "cms-input-reveal", children: [
185
+ z,
186
+ /* @__PURE__ */ n(
403
187
  "button",
404
188
  {
405
189
  type: "button",
406
190
  className: "cms-input-reveal__button",
407
- "aria-controls": b,
408
- "aria-label": N ? E.hide : E.show,
409
- title: N ? E.hide : E.show,
191
+ "aria-controls": _,
192
+ "aria-label": y ? x.hide : x.show,
193
+ title: y ? x.hide : x.show,
410
194
  disabled: s,
411
- onClick: () => I((Y) => !Y),
412
- children: /* @__PURE__ */ e(B, { name: N ? "eye-off" : "eye", size: 18 })
195
+ onClick: () => I((j) => !j),
196
+ children: /* @__PURE__ */ n($, { name: y ? "eye-off" : "eye", size: 18 })
413
197
  }
414
198
  )
415
- ] }) : U });
199
+ ] }) : z });
416
200
  }
417
- function Kt({ label: n, help: t, error: l, disabled: s, readOnly: a, pinned: c, value: f, onChange: u, placeholder: m, rows: _ = 4, name: i, locale: v, minLength: h, maxLength: w, required: r }) {
418
- const g = fe();
419
- return /* @__PURE__ */ e(sn, { id: g, label: n, help: t, error: l, pinned: c, children: /* @__PURE__ */ e(
201
+ function jt({ label: e, help: t, error: l, disabled: s, readOnly: a, pinned: i, value: h, onChange: d, placeholder: u, rows: b = 4, name: c, locale: v, minLength: m, maxLength: N, required: r }) {
202
+ const g = he();
203
+ return /* @__PURE__ */ n(cn, { id: g, label: e, help: t, error: l, pinned: i, children: /* @__PURE__ */ n(
420
204
  "textarea",
421
205
  {
422
206
  id: g,
423
- name: i,
207
+ name: c,
424
208
  className: "cms-input cms-textarea",
425
- rows: _,
426
- value: f,
209
+ rows: b,
210
+ value: h,
427
211
  lang: v,
428
- placeholder: m,
212
+ placeholder: u,
429
213
  disabled: s,
430
- readOnly: a === !0 || c != null,
214
+ readOnly: a === !0 || i != null,
431
215
  required: r,
432
216
  "aria-required": r || void 0,
433
- minLength: h,
434
- maxLength: w,
217
+ minLength: m,
218
+ maxLength: N,
435
219
  "aria-invalid": l != null || void 0,
436
- "aria-describedby": an(g, { help: t, error: l, pinned: c }),
437
- onChange: (T) => u == null ? void 0 : u(T.target.value)
220
+ "aria-describedby": on(g, { help: t, error: l, pinned: i }),
221
+ onChange: (T) => d == null ? void 0 : d(T.target.value)
438
222
  }
439
223
  ) });
440
224
  }
441
- function Wt({ label: n, help: t, error: l, disabled: s, readOnly: a, value: c, options: f, onChange: u, emptyText: m = "Nothing to choose from yet.", name: _ }) {
442
- const i = fe(), v = f.length === 0;
443
- return /* @__PURE__ */ e(sn, { id: i, label: n, help: v ? m : t, error: l, children: /* @__PURE__ */ e(
225
+ function Yt({ label: e, help: t, error: l, disabled: s, readOnly: a, value: i, options: h, onChange: d, emptyText: u = "Nothing to choose from yet.", name: b }) {
226
+ const c = he(), v = h.length === 0;
227
+ return /* @__PURE__ */ n(cn, { id: c, label: e, help: v ? u : t, error: l, children: /* @__PURE__ */ n(
444
228
  "select",
445
229
  {
446
- id: i,
447
- name: _,
230
+ id: c,
231
+ name: b,
448
232
  className: "cms-input cms-select",
449
- value: c,
233
+ value: i,
450
234
  disabled: s || v,
451
235
  "aria-readonly": a || void 0,
452
236
  "aria-invalid": l != null || void 0,
453
- "aria-describedby": an(i, { help: v ? m : t, error: l }),
454
- onChange: (h) => {
455
- a || u == null || u(h.target.value);
237
+ "aria-describedby": on(c, { help: v ? u : t, error: l }),
238
+ onChange: (m) => {
239
+ a || d == null || d(m.target.value);
456
240
  },
457
- children: f.map((h) => /* @__PURE__ */ e("option", { value: h.value, disabled: a && h.value !== c, children: h.label }, h.value))
241
+ children: h.map((m) => /* @__PURE__ */ n("option", { value: m.value, disabled: a && m.value !== i, children: m.label }, m.value))
458
242
  }
459
243
  ) });
460
244
  }
461
- function Zt({ label: n, checked: t, onChange: l, disabled: s, readOnly: a, help: c }) {
462
- const f = fe();
463
- return /* @__PURE__ */ o("div", { className: "cms-toggle-row", children: [
464
- /* @__PURE__ */ e(
245
+ function Xt({ label: e, checked: t, onChange: l, disabled: s, readOnly: a, help: i }) {
246
+ const h = he();
247
+ return /* @__PURE__ */ f("div", { className: "cms-toggle-row", children: [
248
+ /* @__PURE__ */ n(
465
249
  "button",
466
250
  {
467
- id: f,
251
+ id: h,
468
252
  type: "button",
469
253
  role: "switch",
470
- className: H("cms-toggle", t && "is-on"),
254
+ className: F("cms-toggle", t && "is-on"),
471
255
  "aria-checked": t,
472
256
  "aria-readonly": a || void 0,
473
- "aria-describedby": c != null ? `${f}-help` : void 0,
257
+ "aria-describedby": i != null ? `${h}-help` : void 0,
474
258
  disabled: s,
475
259
  onClick: () => {
476
260
  a || l == null || l(!t);
477
261
  },
478
- children: /* @__PURE__ */ e("span", { className: "cms-toggle__thumb" })
262
+ children: /* @__PURE__ */ n("span", { className: "cms-toggle__thumb" })
479
263
  }
480
264
  ),
481
- /* @__PURE__ */ e("label", { className: "cms-toggle__label", htmlFor: f, children: n }),
482
- c != null ? /* @__PURE__ */ e("p", { className: "cms-field__help", id: `${f}-help`, children: c }) : null
265
+ /* @__PURE__ */ n("label", { className: "cms-toggle__label", htmlFor: h, children: e }),
266
+ i != null ? /* @__PURE__ */ n("p", { className: "cms-field__help", id: `${h}-help`, children: i }) : null
483
267
  ] });
484
268
  }
485
- const zn = 150;
486
- function Mn({ open: n, title: t, onClose: l, dirty: s = !1, onDirtyClose: a, children: c, footer: f, closeLabel: u = "Close", initialFocus: m, className: _ }) {
487
- const [i, v] = D(n), [h, w] = D(!1), r = P(null), g = P(null), T = fe();
488
- if (ee(() => {
489
- if (n) {
490
- g.current = document.activeElement, v(!0), w(!1);
269
+ const qn = 150;
270
+ function Sn({ open: e, title: t, onClose: l, dirty: s = !1, onDirtyClose: a, children: i, footer: h, closeLabel: d = "Close", initialFocus: u, className: b }) {
271
+ const [c, v] = D(e), [m, N] = D(!1), r = O(null), g = O(null), T = he();
272
+ if (Q(() => {
273
+ if (e) {
274
+ g.current = document.activeElement, v(!0), N(!1);
491
275
  return;
492
276
  }
493
- if (!i) return;
494
- w(!0);
495
- const M = window.setTimeout(() => {
496
- var E, b;
497
- v(!1), w(!1), (b = (E = g.current) == null ? void 0 : E.focus) == null || b.call(E);
498
- }, zn);
499
- return () => window.clearTimeout(M);
500
- }, [n, i]), ee(() => {
501
- var M, E;
502
- if (n && i) {
503
- const b = 'input, select, textarea, button, [href], [tabindex]:not([tabindex="-1"])';
504
- (E = (m == null ? void 0 : m.current) ?? ((M = r.current) == null ? void 0 : M.querySelector(`.cms-modal__body :is(${b}), .cms-modal__foot :is(${b})`)) ?? r.current) == null || E.focus();
277
+ if (!c) return;
278
+ N(!0);
279
+ const S = window.setTimeout(() => {
280
+ var x, _;
281
+ v(!1), N(!1), (_ = (x = g.current) == null ? void 0 : x.focus) == null || _.call(x);
282
+ }, qn);
283
+ return () => window.clearTimeout(S);
284
+ }, [e, c]), Q(() => {
285
+ var S, x;
286
+ if (e && c) {
287
+ const _ = 'input, select, textarea, button, [href], [tabindex]:not([tabindex="-1"])';
288
+ (x = (u == null ? void 0 : u.current) ?? ((S = r.current) == null ? void 0 : S.querySelector(`.cms-modal__body :is(${_}), .cms-modal__foot :is(${_})`)) ?? r.current) == null || x.focus();
505
289
  }
506
- }, [n, i, m]), !i) return null;
507
- const x = () => {
290
+ }, [e, c, u]), !c) return null;
291
+ const C = () => {
508
292
  s ? a == null || a() : l();
509
293
  };
510
- return ln(
511
- /* @__PURE__ */ e("div", { className: H("cms-modal-scrim", h && "is-closing"), onMouseDown: (M) => {
512
- M.target === M.currentTarget && x();
513
- }, children: /* @__PURE__ */ o(
294
+ return an(
295
+ /* @__PURE__ */ n("div", { className: F("cms-modal-scrim", m && "is-closing"), onMouseDown: (S) => {
296
+ S.target === S.currentTarget && C();
297
+ }, children: /* @__PURE__ */ f(
514
298
  "div",
515
299
  {
516
300
  ref: r,
517
- className: H("cms-modal", _, h && "is-closing", s && "is-dirty"),
301
+ className: F("cms-modal", b, m && "is-closing", s && "is-dirty"),
518
302
  role: "dialog",
519
303
  "aria-modal": "true",
520
304
  "aria-labelledby": T,
521
305
  tabIndex: -1,
522
- onKeyDown: (M) => {
523
- var E;
524
- if (M.key === "Escape")
525
- M.stopPropagation(), x();
526
- else if (M.key === "Tab") {
527
- const b = (E = r.current) == null ? void 0 : E.querySelectorAll('input, select, textarea, button:not([disabled]), [href], [tabindex]:not([tabindex="-1"])');
528
- if (!b || b.length === 0) return;
529
- const N = b[0], I = b[b.length - 1];
530
- M.shiftKey && document.activeElement === N ? (M.preventDefault(), I.focus()) : !M.shiftKey && document.activeElement === I && (M.preventDefault(), N.focus());
306
+ onKeyDown: (S) => {
307
+ var x;
308
+ if (S.key === "Escape")
309
+ S.stopPropagation(), C();
310
+ else if (S.key === "Tab") {
311
+ const _ = (x = r.current) == null ? void 0 : x.querySelectorAll('input, select, textarea, button:not([disabled]), [href], [tabindex]:not([tabindex="-1"])');
312
+ if (!_ || _.length === 0) return;
313
+ const y = _[0], I = _[_.length - 1];
314
+ S.shiftKey && document.activeElement === y ? (S.preventDefault(), I.focus()) : !S.shiftKey && document.activeElement === I && (S.preventDefault(), y.focus());
531
315
  }
532
316
  },
533
317
  children: [
534
- /* @__PURE__ */ o("header", { className: "cms-modal__head", children: [
535
- /* @__PURE__ */ e("h2", { className: "cms-modal__title", id: T, children: t }),
536
- /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": u, onClick: x, children: /* @__PURE__ */ e(ae, { name: "close" }) })
318
+ /* @__PURE__ */ f("header", { className: "cms-modal__head", children: [
319
+ /* @__PURE__ */ n("h2", { className: "cms-modal__title", id: T, children: t }),
320
+ /* @__PURE__ */ n("button", { type: "button", className: "cms-icon-button", "aria-label": d, onClick: C, children: /* @__PURE__ */ n(se, { name: "close" }) })
537
321
  ] }),
538
- /* @__PURE__ */ e("div", { className: "cms-modal__body", children: c }),
539
- f != null ? /* @__PURE__ */ e("footer", { className: "cms-modal__foot", children: f }) : null
322
+ /* @__PURE__ */ n("div", { className: "cms-modal__body", children: i }),
323
+ h != null ? /* @__PURE__ */ n("footer", { className: "cms-modal__foot", children: h }) : null
540
324
  ]
541
325
  }
542
326
  ) }),
543
327
  document.body
544
328
  );
545
329
  }
546
- function Vt({ open: n, title: t, message: l, kind: s = "default", confirmLabel: a, cancelLabel: c, closeLabel: f, onConfirm: u, onCancel: m }) {
547
- const _ = s === "discard-changes";
548
- return /* @__PURE__ */ e(
549
- Mn,
330
+ function Jt({ open: e, title: t, message: l, kind: s = "default", confirmLabel: a, cancelLabel: i, closeLabel: h, onConfirm: d, onCancel: u }) {
331
+ const b = s === "discard-changes";
332
+ return /* @__PURE__ */ n(
333
+ Sn,
550
334
  {
551
- open: n,
335
+ open: e,
552
336
  title: t,
553
- onClose: m,
554
- ...f === void 0 ? {} : { closeLabel: f },
555
- footer: /* @__PURE__ */ o($, { children: [
556
- /* @__PURE__ */ e(De, { onClick: m, children: c ?? (_ ? "Keep editing" : "Cancel") }),
557
- /* @__PURE__ */ e(De, { variant: s === "default" ? "primary" : "danger", onClick: u, children: a ?? (_ ? "Discard changes" : "Confirm") })
337
+ onClose: u,
338
+ ...h === void 0 ? {} : { closeLabel: h },
339
+ footer: /* @__PURE__ */ f(ge, { children: [
340
+ /* @__PURE__ */ n(De, { onClick: u, children: i ?? (b ? "Keep editing" : "Cancel") }),
341
+ /* @__PURE__ */ n(De, { variant: s === "default" ? "primary" : "danger", onClick: d, children: a ?? (b ? "Discard changes" : "Confirm") })
558
342
  ] }),
559
- children: s !== "default" ? /* @__PURE__ */ o("p", { className: "cms-confirm__warning", children: [
560
- /* @__PURE__ */ e(ae, { name: "warning" }),
343
+ children: s !== "default" ? /* @__PURE__ */ f("p", { className: "cms-confirm__warning", children: [
344
+ /* @__PURE__ */ n(se, { name: "warning" }),
561
345
  " ",
562
346
  l
563
- ] }) : /* @__PURE__ */ e("p", { children: l })
347
+ ] }) : /* @__PURE__ */ n("p", { children: l })
564
348
  }
565
349
  );
566
350
  }
567
- function qt({ kind: n, message: t, action: l, onDismiss: s, dismissLabel: a = "Dismiss" }) {
568
- return /* @__PURE__ */ o("div", { className: H("cms-toast", `cms-toast--${n}`), role: n === "error" ? "alert" : "status", children: [
569
- /* @__PURE__ */ e(ae, { name: n === "success" ? "check" : n === "error" ? "warning" : "info" }),
570
- /* @__PURE__ */ e("span", { className: "cms-toast__message", children: t }),
571
- l ? /* @__PURE__ */ e(De, { className: "cms-toast__action", onClick: l.onAction, children: l.label }) : null,
572
- s ? /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": a, onClick: s, children: /* @__PURE__ */ e(ae, { name: "close" }) }) : null
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: [
353
+ /* @__PURE__ */ n(se, { name: e === "success" ? "check" : e === "error" ? "warning" : "info" }),
354
+ /* @__PURE__ */ n("span", { className: "cms-toast__message", children: t }),
355
+ l ? /* @__PURE__ */ n(De, { className: "cms-toast__action", onClick: l.onAction, children: l.label }) : null,
356
+ s ? /* @__PURE__ */ n("button", { type: "button", className: "cms-icon-button", "aria-label": a, onClick: s, children: /* @__PURE__ */ n(se, { name: "close" }) }) : null
573
357
  ] });
574
358
  }
575
- function Gt({ children: n }) {
576
- return /* @__PURE__ */ e("div", { className: "cms-toast-region", children: n });
359
+ function el({ children: e }) {
360
+ return /* @__PURE__ */ n("div", { className: "cms-toast-region", children: e });
577
361
  }
578
- function Un({ what: n, layout: t = "inline" }) {
579
- return /* @__PURE__ */ o("div", { className: H("cms-loading", `cms-loading--${t}`), role: "status", "aria-live": "polite", children: [
580
- /* @__PURE__ */ e(ae, { name: "spinner" }),
581
- /* @__PURE__ */ e("span", { children: n })
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: [
364
+ /* @__PURE__ */ n(se, { name: "spinner" }),
365
+ /* @__PURE__ */ n("span", { children: e })
582
366
  ] });
583
367
  }
584
- function Kn({ title: n, hint: t, action: l, icon: s }) {
585
- return /* @__PURE__ */ o("div", { className: "cms-state cms-state--empty cms-state--page", role: "status", "aria-live": "polite", "data-kind": "empty", children: [
586
- s !== void 0 && Be(s) !== null ? /* @__PURE__ */ e("span", { className: "cms-state__icon", "aria-hidden": "true", children: /* @__PURE__ */ e(xn, { name: s, size: 32 }) }) : null,
587
- /* @__PURE__ */ o("span", { className: "cms-state__text", children: [
588
- /* @__PURE__ */ e("span", { className: "cms-state__title", children: n }),
589
- t != null ? /* @__PURE__ */ e("span", { className: "cms-state__description", children: t }) : null
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: [
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: [
372
+ /* @__PURE__ */ n("span", { className: "cms-state__title", children: e }),
373
+ t != null ? /* @__PURE__ */ n("span", { className: "cms-state__description", children: t }) : null
590
374
  ] }),
591
- l != null ? /* @__PURE__ */ e("div", { className: "cms-state__action", children: l }) : null
375
+ l != null ? /* @__PURE__ */ n("div", { className: "cms-state__action", children: l }) : null
592
376
  ] });
593
377
  }
594
- function Wn({ message: n, onRetry: t, retryLabel: l = "Try again" }) {
595
- return /* @__PURE__ */ o("div", { className: "cms-error-banner", role: "alert", children: [
596
- /* @__PURE__ */ e(ae, { name: "warning" }),
597
- /* @__PURE__ */ e("span", { className: "cms-error-banner__message", children: n }),
598
- t ? /* @__PURE__ */ e(De, { onClick: t, children: l }) : null
378
+ function Yn({ message: e, onRetry: t, retryLabel: l = "Try again" }) {
379
+ return /* @__PURE__ */ f("div", { className: "cms-error-banner", role: "alert", children: [
380
+ /* @__PURE__ */ n(se, { name: "warning" }),
381
+ /* @__PURE__ */ n("span", { className: "cms-error-banner__message", children: e }),
382
+ t ? /* @__PURE__ */ n(De, { onClick: t, children: l }) : null
599
383
  ] });
600
384
  }
601
- const Je = 300;
602
- function Zn() {
603
- if (typeof window > "u" || typeof getComputedStyle != "function") return Je;
604
- const n = getComputedStyle(document.documentElement).getPropertyValue("--cms-state-delay").trim(), t = n.endsWith("ms") ? Number.parseFloat(n) : n.endsWith("s") ? Number.parseFloat(n) * 1e3 : Number.NaN;
605
- return Number.isFinite(t) && t >= 0 ? t : Je;
385
+ const en = 300;
386
+ function Xn() {
387
+ if (typeof window > "u" || typeof getComputedStyle != "function") return en;
388
+ const e = getComputedStyle(document.documentElement).getPropertyValue("--cms-state-delay").trim(), t = e.endsWith("ms") ? Number.parseFloat(e) : e.endsWith("s") ? Number.parseFloat(e) * 1e3 : Number.NaN;
389
+ return Number.isFinite(t) && t >= 0 ? t : en;
606
390
  }
607
- function Vn() {
608
- return /* @__PURE__ */ o("svg", { className: "cms-state__spinner", viewBox: "0 0 24 24", "aria-hidden": "true", focusable: "false", children: [
609
- /* @__PURE__ */ e("circle", { className: "cms-state__track", cx: "12", cy: "12", r: "10", fill: "none" }),
610
- /* @__PURE__ */ e("circle", { className: "cms-state__arc", cx: "12", cy: "12", r: "10", fill: "none", pathLength: "100", strokeDasharray: "28 72" })
391
+ function Jn() {
392
+ return /* @__PURE__ */ f("svg", { className: "cms-state__spinner", viewBox: "0 0 24 24", "aria-hidden": "true", focusable: "false", children: [
393
+ /* @__PURE__ */ n("circle", { className: "cms-state__track", cx: "12", cy: "12", r: "10", fill: "none" }),
394
+ /* @__PURE__ */ n("circle", { className: "cms-state__arc", cx: "12", cy: "12", r: "10", fill: "none", pathLength: "100", strokeDasharray: "28 72" })
611
395
  ] });
612
396
  }
613
- function Le({ kind: n, title: t, description: l, action: s, placement: a = "page", icon: c }) {
614
- const [f, u] = D(n !== "loading");
615
- ee(() => {
616
- if (n !== "loading") {
617
- u(!0);
397
+ function Le({ kind: e, title: t, description: l, action: s, placement: a = "page", icon: i }) {
398
+ const [h, d] = D(e !== "loading");
399
+ Q(() => {
400
+ if (e !== "loading") {
401
+ d(!0);
618
402
  return;
619
403
  }
620
- u(!1);
621
- const _ = window.setTimeout(() => u(!0), Zn());
622
- return () => window.clearTimeout(_);
623
- }, [n]);
624
- const m = a === "block";
625
- return /* @__PURE__ */ o(
404
+ d(!1);
405
+ const b = window.setTimeout(() => d(!0), Xn());
406
+ return () => window.clearTimeout(b);
407
+ }, [e]);
408
+ const u = a === "block";
409
+ return /* @__PURE__ */ f(
626
410
  "div",
627
411
  {
628
- className: H("cms-state", `cms-state--${n}`, `cms-state--${a}`, !f && "is-waiting"),
412
+ className: F("cms-state", `cms-state--${e}`, `cms-state--${a}`, !h && "is-waiting"),
629
413
  role: "status",
630
414
  "aria-live": "polite",
631
- "data-kind": n,
415
+ "data-kind": e,
632
416
  children: [
633
- n === "loading" ? /* @__PURE__ */ e(Vn, {}) : null,
634
- (n === "error" || n === "denied") && !m ? /* @__PURE__ */ e(ae, { name: n === "error" ? "warning" : "lock" }) : null,
635
- n === "empty" && !m && c !== void 0 && Be(c) !== null ? /* @__PURE__ */ e("span", { className: "cms-state__icon", "aria-hidden": "true", children: /* @__PURE__ */ e(xn, { name: c, size: a === "page" ? 32 : 24 }) }) : null,
636
- /* @__PURE__ */ o("span", { className: "cms-state__text", children: [
637
- /* @__PURE__ */ e("span", { className: "cms-state__title", children: t }),
638
- l !== void 0 && !m ? /* @__PURE__ */ e("span", { className: "cms-state__description", children: l }) : null
417
+ e === "loading" ? /* @__PURE__ */ n(Jn, {}) : null,
418
+ (e === "error" || e === "denied") && !u ? /* @__PURE__ */ n(se, { name: e === "error" ? "warning" : "lock" }) : null,
419
+ e === "empty" && !u && i !== void 0 && Be(i) !== null ? /* @__PURE__ */ n("span", { className: "cms-state__icon", "aria-hidden": "true", children: /* @__PURE__ */ n(Cn, { name: i, size: a === "page" ? 32 : 24 }) }) : null,
420
+ /* @__PURE__ */ f("span", { className: "cms-state__text", children: [
421
+ /* @__PURE__ */ n("span", { className: "cms-state__title", children: t }),
422
+ l !== void 0 && !u ? /* @__PURE__ */ n("span", { className: "cms-state__description", children: l }) : null
639
423
  ] }),
640
- s !== void 0 && n !== "denied" ? /* @__PURE__ */ e(De, { className: "cms-state__action", variant: m ? "quiet" : "secondary", onClick: s.onAction, children: s.label }) : null
424
+ s !== void 0 && e !== "denied" ? /* @__PURE__ */ n(De, { className: "cms-state__action", variant: u ? "quiet" : "secondary", onClick: s.onAction, children: s.label }) : null
641
425
  ]
642
426
  }
643
427
  );
644
428
  }
645
- const qn = 'input, select, textarea, button:not([disabled]), iframe, [href], [tabindex]:not([tabindex="-1"])', Gn = 60;
646
- function jn(n) {
647
- return n instanceof Element && n.closest('input, select, textarea, [contenteditable="true"], [data-viewer-keys]') !== null;
429
+ const Qn = 'input, select, textarea, button:not([disabled]), iframe, [href], [tabindex]:not([tabindex="-1"])', et = 60;
430
+ function nt(e) {
431
+ return e instanceof Element && e.closest('input, select, textarea, [contenteditable="true"], [data-viewer-keys]') !== null;
648
432
  }
649
- function Yn(n) {
650
- return n instanceof Element && n.closest("[data-viewer-gestures]") !== null;
433
+ function tt(e) {
434
+ return e instanceof Element && e.closest("[data-viewer-gestures]") !== null;
651
435
  }
652
- function Xn(n) {
653
- return n.getClientRects().length > 0;
436
+ function lt(e) {
437
+ return e.getClientRects().length > 0;
654
438
  }
655
- function jt(n) {
656
- const { name: t, badge: l, closeLabel: s, onClose: a, actions: c = [], moreLabel: f = "More", edit: u, editing: m, state: _, siblings: i, bar: v, thumbnails: h, strip: w, onZoom: r, children: g } = n, T = P(null), x = P(null), M = fe(), [E, b] = D(!1), N = P(null);
657
- ee(() => {
658
- var U;
659
- const k = document.activeElement, F = document.body.style.overflow;
660
- return document.body.style.overflow = "hidden", (U = x.current) == null || U.focus(), () => {
661
- var Y;
662
- document.body.style.overflow = F, (Y = k == null ? void 0 : k.focus) == null || Y.call(k);
439
+ function nl(e) {
440
+ const { name: t, badge: l, closeLabel: s, onClose: a, actions: i = [], moreLabel: h = "More", edit: d, editing: u, state: b, siblings: c, bar: v, thumbnails: m, strip: N, onZoom: r, children: g } = e, T = O(null), C = O(null), S = he(), [x, _] = D(!1), y = O(null);
441
+ Q(() => {
442
+ var z;
443
+ const k = document.activeElement, B = document.body.style.overflow;
444
+ return document.body.style.overflow = "hidden", (z = C.current) == null || z.focus(), () => {
445
+ var j;
446
+ document.body.style.overflow = B, (j = k == null ? void 0 : k.focus) == null || j.call(k);
663
447
  };
664
448
  }, []);
665
449
  const I = () => {
666
- m != null && m.dirty ? m.onDirtyClose() : a();
667
- }, K = (k) => {
668
- const F = k.touches.length === 1 ? k.touches[0] : void 0;
669
- N.current = F === void 0 || m !== void 0 || Yn(k.target) ? null : { x: F.clientX, y: F.clientY };
670
- }, z = (k) => {
671
- var W, j;
672
- const F = N.current, U = k.changedTouches[0];
673
- if (N.current = null, F === null || U === void 0) return;
674
- const Y = U.clientX - F.x;
675
- Math.abs(Y) < Gn || Math.abs(Y) < Math.abs(U.clientY - F.y) || (Y > 0 ? (W = i == null ? void 0 : i.onPrevious) == null || W.call(i) : (j = i == null ? void 0 : i.onNext) == null || j.call(i));
450
+ u != null && u.dirty ? u.onDirtyClose() : a();
451
+ }, U = (k) => {
452
+ const B = k.touches.length === 1 ? k.touches[0] : void 0;
453
+ y.current = B === void 0 || u !== void 0 || tt(k.target) ? null : { x: B.clientX, y: B.clientY };
454
+ }, P = (k) => {
455
+ var K, G;
456
+ const B = y.current, z = k.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 = c == null ? void 0 : c.onPrevious) == null || K.call(c) : (G = c == null ? void 0 : c.onNext) == null || G.call(c));
676
460
  };
677
- return ln(
678
- /* @__PURE__ */ o(
461
+ return an(
462
+ /* @__PURE__ */ f(
679
463
  "div",
680
464
  {
681
465
  ref: T,
682
- className: H("cms-viewer", m !== void 0 && "is-editing"),
466
+ className: F("cms-viewer", u !== void 0 && "is-editing"),
683
467
  role: "dialog",
684
468
  "aria-modal": "true",
685
- "aria-labelledby": M,
469
+ "aria-labelledby": S,
686
470
  tabIndex: -1,
687
471
  onKeyDown: (k) => {
688
- var F, U, Y;
472
+ var B, z, j;
689
473
  if (k.key === "Escape") {
690
- if (m !== void 0) return;
691
- k.stopPropagation(), E ? b(!1) : a();
474
+ if (u !== void 0) return;
475
+ k.stopPropagation(), x ? _(!1) : a();
692
476
  } else if (k.key === "Tab") {
693
- const W = Array.from(((F = T.current) == null ? void 0 : F.querySelectorAll(qn)) ?? []).filter(Xn);
694
- if (W.length === 0) return;
695
- const j = W[0], X = W[W.length - 1];
696
- k.shiftKey && document.activeElement === j ? (k.preventDefault(), X.focus()) : !k.shiftKey && document.activeElement === X && (k.preventDefault(), j.focus());
697
- } else m === void 0 && !jn(k.target) && !k.ctrlKey && !k.metaKey && !k.altKey && (k.key === "ArrowLeft" ? (U = i == null ? void 0 : i.onPrevious) == null || U.call(i) : k.key === "ArrowRight" ? (Y = i == null ? void 0 : i.onNext) == null || Y.call(i) : k.key === "+" || k.key === "=" ? r == null || r("in") : k.key === "-" ? r == null || r("out") : k.key === "0" && (r == null || r("reset")));
477
+ const K = Array.from(((B = T.current) == null ? void 0 : B.querySelectorAll(Qn)) ?? []).filter(lt);
478
+ if (K.length === 0) return;
479
+ const G = K[0], Y = K[K.length - 1];
480
+ k.shiftKey && document.activeElement === G ? (k.preventDefault(), Y.focus()) : !k.shiftKey && document.activeElement === Y && (k.preventDefault(), G.focus());
481
+ } else u === void 0 && !nt(k.target) && !k.ctrlKey && !k.metaKey && !k.altKey && (k.key === "ArrowLeft" ? (z = c == null ? void 0 : c.onPrevious) == null || z.call(c) : k.key === "ArrowRight" ? (j = c == null ? void 0 : c.onNext) == null || j.call(c) : k.key === "+" || k.key === "=" ? r == null || r("in") : k.key === "-" ? r == null || r("out") : k.key === "0" && (r == null || r("reset")));
698
482
  },
699
483
  children: [
700
- i !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-visually-hidden", role: "status", children: `${t}, ${i.position}` }) : null,
701
- /* @__PURE__ */ o("header", { className: "cms-viewer__top", children: [
702
- /* @__PURE__ */ e("button", { ref: x, type: "button", className: "cms-viewer__icon", "aria-label": s, onClick: I, children: /* @__PURE__ */ e(ae, { name: "close" }) }),
703
- /* @__PURE__ */ e("span", { className: "cms-viewer__badge", children: l }),
704
- /* @__PURE__ */ e("h2", { className: "cms-viewer__name", id: M, title: t, children: t }),
705
- i !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-viewer__position", children: i.position }) : null,
706
- /* @__PURE__ */ e("span", { className: "cms-viewer__space" }),
707
- m !== void 0 ? /* @__PURE__ */ o($, { children: [
708
- /* @__PURE__ */ e("span", { className: "cms-viewer__status", role: "status", children: m.status }),
709
- /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__button cms-viewer__button--edit", onClick: m.onDone, children: m.doneLabel })
710
- ] }) : /* @__PURE__ */ o($, { children: [
711
- /* @__PURE__ */ e("span", { className: "cms-viewer__actions", children: c.map((k) => /* @__PURE__ */ o("button", { type: "button", className: "cms-viewer__button", onClick: k.onSelect, children: [
484
+ c !== void 0 ? /* @__PURE__ */ n("span", { className: "cms-visually-hidden", role: "status", children: `${t}, ${c.position}` }) : null,
485
+ /* @__PURE__ */ f("header", { className: "cms-viewer__top", children: [
486
+ /* @__PURE__ */ n("button", { ref: C, type: "button", className: "cms-viewer__icon", "aria-label": s, onClick: I, children: /* @__PURE__ */ n(se, { name: "close" }) }),
487
+ /* @__PURE__ */ n("span", { className: "cms-viewer__badge", children: l }),
488
+ /* @__PURE__ */ n("h2", { className: "cms-viewer__name", id: S, title: t, children: t }),
489
+ c !== void 0 ? /* @__PURE__ */ n("span", { className: "cms-viewer__position", children: c.position }) : null,
490
+ /* @__PURE__ */ n("span", { className: "cms-viewer__space" }),
491
+ u !== void 0 ? /* @__PURE__ */ f(ge, { children: [
492
+ /* @__PURE__ */ n("span", { className: "cms-viewer__status", role: "status", children: u.status }),
493
+ /* @__PURE__ */ n("button", { type: "button", className: "cms-viewer__button cms-viewer__button--edit", onClick: u.onDone, children: u.doneLabel })
494
+ ] }) : /* @__PURE__ */ f(ge, { children: [
495
+ /* @__PURE__ */ n("span", { className: "cms-viewer__actions", children: i.map((k) => /* @__PURE__ */ f("button", { type: "button", className: "cms-viewer__button", onClick: k.onSelect, children: [
712
496
  k.icon,
713
497
  k.label
714
498
  ] }, k.label)) }),
715
- u !== void 0 ? /* @__PURE__ */ o("button", { type: "button", className: "cms-viewer__button cms-viewer__button--edit", "aria-label": u.label, onClick: u.onEdit, children: [
716
- u.icon,
717
- /* @__PURE__ */ e("span", { className: "cms-viewer__wide", children: u.label })
499
+ d !== void 0 ? /* @__PURE__ */ f("button", { type: "button", className: "cms-viewer__button cms-viewer__button--edit", "aria-label": d.label, onClick: d.onEdit, children: [
500
+ d.icon,
501
+ /* @__PURE__ */ n("span", { className: "cms-viewer__wide", children: d.label })
718
502
  ] }) : null,
719
- c.length > 0 ? /* @__PURE__ */ o("span", { className: "cms-viewer__more", children: [
720
- /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__icon", "aria-label": f, "aria-expanded": E, onClick: () => b((k) => !k), children: /* @__PURE__ */ e(B, { name: "more" }) }),
721
- E ? /* @__PURE__ */ e("span", { className: "cms-viewer__menu", children: c.map((k) => /* @__PURE__ */ o(
503
+ i.length > 0 ? /* @__PURE__ */ f("span", { className: "cms-viewer__more", children: [
504
+ /* @__PURE__ */ n("button", { type: "button", className: "cms-viewer__icon", "aria-label": h, "aria-expanded": x, onClick: () => _((k) => !k), children: /* @__PURE__ */ n($, { name: "more" }) }),
505
+ x ? /* @__PURE__ */ n("span", { className: "cms-viewer__menu", children: i.map((k) => /* @__PURE__ */ f(
722
506
  "button",
723
507
  {
724
508
  type: "button",
725
509
  className: "cms-viewer__button",
726
510
  onClick: () => {
727
- b(!1), k.onSelect();
511
+ _(!1), k.onSelect();
728
512
  },
729
513
  children: [
730
514
  k.icon,
@@ -736,229 +520,229 @@ function jt(n) {
736
520
  ] }) : null
737
521
  ] })
738
522
  ] }),
739
- /* @__PURE__ */ o("div", { className: "cms-viewer__body", children: [
740
- h != null && m === void 0 ? /* @__PURE__ */ e("nav", { className: "cms-viewer__thumbnails", children: h }) : null,
741
- /* @__PURE__ */ o("div", { className: "cms-viewer__content", onTouchStart: K, onTouchEnd: z, children: [
742
- (m == null ? void 0 : m.conflict) !== void 0 ? /* @__PURE__ */ o("div", { className: "cms-viewer__conflict", role: "alert", children: [
743
- /* @__PURE__ */ e("p", { className: "cms-viewer__conflict-text", children: m.conflict.message }),
744
- /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__button", onClick: m.conflict.onOverwrite, children: m.conflict.overwriteLabel }),
745
- /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__button cms-viewer__button--edit", onClick: m.conflict.onKeepBoth, children: m.conflict.keepBothLabel })
523
+ /* @__PURE__ */ f("div", { className: "cms-viewer__body", children: [
524
+ m != null && u === void 0 ? /* @__PURE__ */ n("nav", { className: "cms-viewer__thumbnails", children: m }) : null,
525
+ /* @__PURE__ */ f("div", { className: "cms-viewer__content", onTouchStart: U, onTouchEnd: P, children: [
526
+ (u == null ? void 0 : u.conflict) !== void 0 ? /* @__PURE__ */ f("div", { className: "cms-viewer__conflict", role: "alert", children: [
527
+ /* @__PURE__ */ n("p", { className: "cms-viewer__conflict-text", children: u.conflict.message }),
528
+ /* @__PURE__ */ n("button", { type: "button", className: "cms-viewer__button", onClick: u.conflict.onOverwrite, children: u.conflict.overwriteLabel }),
529
+ /* @__PURE__ */ n("button", { type: "button", className: "cms-viewer__button cms-viewer__button--edit", onClick: u.conflict.onKeepBoth, children: u.conflict.keepBothLabel })
746
530
  ] }) : null,
747
- _ === void 0 ? g : /* @__PURE__ */ e(Jn, { state: _ }),
748
- m === void 0 && (i != null && i.onPrevious) ? /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__side cms-viewer__side--previous", "aria-label": i.previousLabel, title: i.previousLabel, onClick: i.onPrevious, children: /* @__PURE__ */ e(ae, { name: "back" }) }) : null,
749
- m === void 0 && (i != null && i.onNext) ? /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__side cms-viewer__side--next", "aria-label": i.nextLabel, title: i.nextLabel, onClick: i.onNext, children: /* @__PURE__ */ e(ae, { name: "back" }) }) : null,
750
- m === void 0 && i !== void 0 ? /* @__PURE__ */ e("div", { className: "cms-viewer__dots", "aria-hidden": "true", children: Array.from({ length: Math.min(i.total, 7) }, (k, F) => /* @__PURE__ */ e("i", { className: F === Math.min(i.index, 6) ? "is-current" : void 0 }, F)) }) : null
531
+ b === void 0 ? g : /* @__PURE__ */ n(st, { state: b }),
532
+ u === void 0 && (c != null && c.onPrevious) ? /* @__PURE__ */ n("button", { type: "button", className: "cms-viewer__side cms-viewer__side--previous", "aria-label": c.previousLabel, title: c.previousLabel, onClick: c.onPrevious, children: /* @__PURE__ */ n(se, { name: "back" }) }) : null,
533
+ u === void 0 && (c != null && c.onNext) ? /* @__PURE__ */ n("button", { type: "button", className: "cms-viewer__side cms-viewer__side--next", "aria-label": c.nextLabel, title: c.nextLabel, onClick: c.onNext, children: /* @__PURE__ */ n(se, { name: "back" }) }) : null,
534
+ u === void 0 && c !== void 0 ? /* @__PURE__ */ n("div", { className: "cms-viewer__dots", "aria-hidden": "true", children: Array.from({ length: Math.min(c.total, 7) }, (k, B) => /* @__PURE__ */ n("i", { className: B === Math.min(c.index, 6) ? "is-current" : void 0 }, B)) }) : null
751
535
  ] })
752
536
  ] }),
753
- m === void 0 && w != null ? /* @__PURE__ */ e("div", { className: "cms-viewer__strip", children: w }) : null,
754
- v != null ? /* @__PURE__ */ e("footer", { className: "cms-viewer__bar", children: v }) : null
537
+ u === void 0 && N != null ? /* @__PURE__ */ n("div", { className: "cms-viewer__strip", children: N }) : null,
538
+ v != null ? /* @__PURE__ */ n("footer", { className: "cms-viewer__bar", children: v }) : null
755
539
  ]
756
540
  }
757
541
  ),
758
542
  document.body
759
543
  );
760
544
  }
761
- function Jn({ state: n }) {
762
- switch (n.kind) {
545
+ function st({ state: e }) {
546
+ switch (e.kind) {
763
547
  case "loading":
764
- return /* @__PURE__ */ e(Le, { kind: "loading", title: n.title, placement: "page" });
548
+ return /* @__PURE__ */ n(Le, { kind: "loading", title: e.title, placement: "page" });
765
549
  case "error":
766
- return /* @__PURE__ */ e(
550
+ return /* @__PURE__ */ n(
767
551
  Le,
768
552
  {
769
553
  kind: "error",
770
- title: n.title,
771
- ...n.description === void 0 ? {} : { description: n.description },
772
- ...n.retry === void 0 ? {} : { action: { label: n.retry.label, onAction: n.retry.onRetry } },
554
+ title: e.title,
555
+ ...e.description === void 0 ? {} : { description: e.description },
556
+ ...e.retry === void 0 ? {} : { action: { label: e.retry.label, onAction: e.retry.onRetry } },
773
557
  placement: "page"
774
558
  }
775
559
  );
776
560
  case "no-preview":
777
- return /* @__PURE__ */ e(
561
+ return /* @__PURE__ */ n(
778
562
  Le,
779
563
  {
780
564
  kind: "empty",
781
- title: n.title,
782
- ...n.description === void 0 ? {} : { description: n.description },
783
- action: { label: n.download.label, onAction: n.download.onDownload },
565
+ title: e.title,
566
+ ...e.description === void 0 ? {} : { description: e.description },
567
+ action: { label: e.download.label, onAction: e.download.onDownload },
784
568
  placement: "page"
785
569
  }
786
570
  );
787
571
  }
788
572
  }
789
- class Qn extends Error {
573
+ class at extends Error {
790
574
  constructor(t = "denied") {
791
575
  super(t), this.name = "FilePickerDenied";
792
576
  }
793
577
  }
794
- class et extends Error {
578
+ class rt extends Error {
795
579
  constructor(t = "restart") {
796
580
  super(t), this.name = "FilePickerRestart";
797
581
  }
798
582
  }
799
- const Xe = (n, t) => `${n}
800
- ${t}`, nt = (n, t) => n === "" ? t : `${n}/${t}`, tt = 48;
801
- function Yt(n) {
802
- var te, we;
803
- const { open: t, spaces: l, list: s, disabledReason: a, budget: c, formatSize: f, labels: u, onConfirm: m, onCancel: _ } = n, [i, v] = D(((te = l[0]) == null ? void 0 : te.id) ?? ""), [h, w] = D(""), [r, g] = D({ status: "loading" }), [T, x] = D(0), [M, E] = D(/* @__PURE__ */ new Map()), [b, N] = D(0), [I, K] = D(!1), z = P(null), k = P(!1);
804
- ee(() => {
583
+ const Je = (e, t) => `${e}
584
+ ${t}`, it = (e, t) => e === "" ? t : `${e}/${t}`, ct = 48;
585
+ function tl(e) {
586
+ var ne, ye;
587
+ const { open: t, spaces: l, list: s, disabledReason: a, budget: i, formatSize: h, labels: d, onConfirm: u, onCancel: b } = e, [c, v] = D(((ne = l[0]) == null ? void 0 : ne.id) ?? ""), [m, N] = D(""), [r, g] = D({ status: "loading" }), [T, C] = D(0), [S, x] = D(/* @__PURE__ */ new Map()), [_, y] = D(0), [I, U] = D(!1), P = O(null), k = O(!1);
588
+ Q(() => {
805
589
  k.current = !1;
806
- }, [t, i, h]);
807
- const F = fe();
808
- ee(() => {
809
- var y;
810
- t && (v(((y = l[0]) == null ? void 0 : y.id) ?? ""), w(""), E(/* @__PURE__ */ new Map()), K(!1));
811
- }, [t]), ee(() => {
812
- if (!t || i === "") return;
813
- let y = !0;
814
- return g({ status: "loading" }), N(0), s(i, h).then(
815
- (S) => y && g({ status: "ready", entries: S.entries, next: S.next ?? null, paging: !1 }),
816
- (S) => y && g({ status: S instanceof Qn ? "denied" : "error" })
590
+ }, [t, c, m]);
591
+ const B = he();
592
+ Q(() => {
593
+ var w;
594
+ t && (v(((w = l[0]) == null ? void 0 : w.id) ?? ""), N(""), x(/* @__PURE__ */ new Map()), U(!1));
595
+ }, [t]), Q(() => {
596
+ if (!t || c === "") return;
597
+ let w = !0;
598
+ return g({ status: "loading" }), y(0), s(c, m).then(
599
+ (E) => w && g({ status: "ready", entries: E.entries, next: E.next ?? null, paging: !1 }),
600
+ (E) => w && g({ status: E instanceof at ? "denied" : "error" })
817
601
  ), () => {
818
- y = !1;
602
+ w = !1;
819
603
  };
820
- }, [t, i, h, s, T]);
821
- const U = Ie(() => {
604
+ }, [t, c, m, s, T]);
605
+ const z = Ie(() => {
822
606
  if (r.status !== "ready" || r.next === null || r.paging) return;
823
- const y = r.next, S = r.entries;
824
- g({ ...r, paging: !0 }), s(i, h, y).then(
825
- (Z) => {
826
- k.current = !1, g({ status: "ready", entries: [...S, ...Z.entries], next: Z.next ?? null, paging: !1 });
607
+ const w = r.next, E = r.entries;
608
+ g({ ...r, paging: !0 }), s(c, m, w).then(
609
+ (W) => {
610
+ k.current = !1, g({ status: "ready", entries: [...E, ...W.entries], next: W.next ?? null, paging: !1 });
827
611
  },
828
- (Z) => {
829
- if (!(Z instanceof et)) {
830
- g({ status: "ready", entries: S, next: y, paging: !1 });
612
+ (W) => {
613
+ if (!(W instanceof rt)) {
614
+ g({ status: "ready", entries: E, next: w, paging: !1 });
831
615
  return;
832
616
  }
833
617
  if (k.current) {
834
618
  g({ status: "error" });
835
619
  return;
836
620
  }
837
- k.current = !0, x((G) => G + 1);
621
+ k.current = !0, C((q) => q + 1);
838
622
  }
839
623
  );
840
- }, [r, s, i, h]), Y = Ie((y) => {
841
- var S;
842
- return ((S = c == null ? void 0 : c.cost) == null ? void 0 : S.call(c, y)) ?? y.size ?? 0;
843
- }, [c]), W = Dn(() => [...M.values()], [M]), j = W.reduce((y, S) => y + (S.size ?? 0), 0), X = c === void 0 ? null : c.limitBytes - c.usedBytes - W.reduce((y, S) => y + Y(S), 0), ne = X !== null && X < 0, ce = (y) => {
844
- if (y.kind !== "file") return null;
845
- const S = a == null ? void 0 : a(y);
846
- return S || (X !== null && !M.has(Xe(i, y.id)) && Y(y) > X ? u.overBudget : null);
847
- }, be = (y) => {
848
- const S = Xe(i, y.id);
849
- !M.has(S) && ce(y) !== null || E((Z) => {
850
- const G = new Map(Z);
851
- return G.has(S) ? G.delete(S) : G.set(S, { ...y, space: i, path: h }), G;
624
+ }, [r, s, c, m]), j = Ie((w) => {
625
+ var E;
626
+ return ((E = i == null ? void 0 : i.cost) == null ? void 0 : E.call(i, w)) ?? w.size ?? 0;
627
+ }, [i]), K = Bn(() => [...S.values()], [S]), G = K.reduce((w, E) => w + (E.size ?? 0), 0), Y = i === void 0 ? null : i.limitBytes - i.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 && !S.has(Je(c, w.id)) && j(w) > Y ? d.overBudget : null);
631
+ }, be = (w) => {
632
+ const E = Je(c, w.id);
633
+ !S.has(E) && ie(w) !== null || x((W) => {
634
+ const q = new Map(W);
635
+ return q.has(E) ? q.delete(E) : q.set(E, { ...w, space: c, path: m }), q;
852
636
  });
853
- }, oe = (y) => w(nt(h, y.name)), ue = () => w(h.includes("/") ? h.slice(0, h.lastIndexOf("/")) : ""), Ce = (y) => E((S) => {
854
- const Z = new Map(S);
855
- return Z.delete(y), Z;
856
- }), pe = r.status === "ready" ? r.entries : [], le = (y) => {
857
- const S = pe[b];
858
- if (y.key === "ArrowDown" || y.key === "ArrowUp" || y.key === "Home" || y.key === "End") {
859
- y.preventDefault();
860
- const Z = pe.length - 1, G = y.key === "Home" ? 0 : y.key === "End" ? Z : Math.min(Z, Math.max(0, b + (y.key === "ArrowDown" ? 1 : -1)));
861
- N(G), G >= Z - 1 && U();
862
- } else y.key === "Enter" && (S == null ? void 0 : S.kind) === "folder" ? (y.preventDefault(), oe(S)) : y.key === " " && (S == null ? void 0 : S.kind) === "file" ? (y.preventDefault(), be(S)) : y.key === "Backspace" && h !== "" && (y.preventDefault(), ue());
863
- }, _e = h === "" ? [] : h.split("/"), ve = ((we = l.find((y) => y.id === i)) == null ? void 0 : we.name) ?? "", ye = (y) => `${F}-entry-${String(y)}`;
864
- return /* @__PURE__ */ o(
865
- Mn,
637
+ }, ce = (w) => N(it(m, w.name)), de = () => N(m.includes("/") ? m.slice(0, m.lastIndexOf("/")) : ""), Ce = (w) => x((E) => {
638
+ const W = new Map(E);
639
+ return W.delete(w), W;
640
+ }), fe = r.status === "ready" ? r.entries : [], te = (w) => {
641
+ const E = fe[_];
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, _ + (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(), ce(E)) : w.key === " " && (E == null ? void 0 : E.kind) === "file" ? (w.preventDefault(), be(E)) : w.key === "Backspace" && m !== "" && (w.preventDefault(), de());
647
+ }, pe = m === "" ? [] : m.split("/"), _e = ((ye = l.find((w) => w.id === c)) == null ? void 0 : ye.name) ?? "", we = (w) => `${B}-entry-${String(w)}`;
648
+ return /* @__PURE__ */ f(
649
+ Sn,
866
650
  {
867
651
  open: t,
868
- title: u.title,
869
- onClose: _,
870
- closeLabel: u.close,
871
- initialFocus: z,
652
+ title: d.title,
653
+ onClose: b,
654
+ closeLabel: d.close,
655
+ initialFocus: P,
872
656
  className: "cms-file-picker",
873
- footer: /* @__PURE__ */ o("div", { className: "cms-file-picker__foot", children: [
874
- /* @__PURE__ */ o("div", { className: "cms-file-picker__summary", "aria-live": "polite", children: [
875
- W.length > 0 ? /* @__PURE__ */ e("span", { children: u.total(W.length, f(j)) }) : null,
876
- c !== void 0 && X !== null ? /* @__PURE__ */ e("span", { className: H(ne && "is-over"), children: ne ? u.overBudget : u.left(f(Math.max(0, X)), f(c.limitBytes)) }) : null
657
+ footer: /* @__PURE__ */ f("div", { className: "cms-file-picker__foot", children: [
658
+ /* @__PURE__ */ f("div", { className: "cms-file-picker__summary", "aria-live": "polite", children: [
659
+ K.length > 0 ? /* @__PURE__ */ n("span", { children: d.total(K.length, h(G)) }) : null,
660
+ i !== void 0 && Y !== null ? /* @__PURE__ */ n("span", { className: F(ee && "is-over"), children: ee ? d.overBudget : d.left(h(Math.max(0, Y)), h(i.limitBytes)) }) : null
877
661
  ] }),
878
- /* @__PURE__ */ o("div", { className: "cms-file-picker__actions", children: [
879
- /* @__PURE__ */ e(De, { variant: "secondary", onClick: _, children: u.cancel }),
880
- /* @__PURE__ */ e(De, { variant: "primary", disabled: W.length === 0 || ne, onClick: () => m(W), children: u.confirm(W.length) })
662
+ /* @__PURE__ */ f("div", { className: "cms-file-picker__actions", children: [
663
+ /* @__PURE__ */ n(De, { variant: "secondary", onClick: b, children: d.cancel }),
664
+ /* @__PURE__ */ n(De, { variant: "primary", disabled: K.length === 0 || ee, onClick: () => u(K), children: d.confirm(K.length) })
881
665
  ] })
882
666
  ] }),
883
667
  children: [
884
- /* @__PURE__ */ o("div", { className: "cms-file-picker__top", children: [
885
- l.length > 1 ? /* @__PURE__ */ o("label", { className: "cms-file-picker__space", children: [
886
- /* @__PURE__ */ e("span", { className: "cms-visually-hidden", children: u.space }),
887
- /* @__PURE__ */ e("select", { className: "cms-input cms-select", value: i, onChange: (y) => {
888
- v(y.target.value), w("");
889
- }, children: l.map((y) => /* @__PURE__ */ e("option", { value: y.id, children: y.name }, y.id)) })
668
+ /* @__PURE__ */ f("div", { className: "cms-file-picker__top", children: [
669
+ l.length > 1 ? /* @__PURE__ */ f("label", { className: "cms-file-picker__space", children: [
670
+ /* @__PURE__ */ n("span", { className: "cms-visually-hidden", children: d.space }),
671
+ /* @__PURE__ */ n("select", { className: "cms-input cms-select", value: c, onChange: (w) => {
672
+ v(w.target.value), N("");
673
+ }, children: l.map((w) => /* @__PURE__ */ n("option", { value: w.id, children: w.name }, w.id)) })
890
674
  ] }) : null,
891
- /* @__PURE__ */ o("nav", { className: "cms-file-picker__path", "aria-label": u.path, children: [
892
- /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": u.up, disabled: h === "", onClick: ue, children: /* @__PURE__ */ e(B, { name: "chevron-left" }) }),
893
- /* @__PURE__ */ o("ol", { children: [
894
- /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__crumb", "aria-current": h === "" ? "location" : void 0, onClick: () => w(""), children: ve }) }),
895
- _e.map((y, S) => {
896
- const Z = _e.slice(0, S + 1).join("/");
897
- return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__crumb", "aria-current": Z === h ? "location" : void 0, onClick: () => w(Z), children: y }) }, Z);
675
+ /* @__PURE__ */ f("nav", { className: "cms-file-picker__path", "aria-label": d.path, children: [
676
+ /* @__PURE__ */ n("button", { type: "button", className: "cms-icon-button", "aria-label": d.up, disabled: m === "", 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": m === "" ? "location" : void 0, onClick: () => N(""), children: _e }) }),
679
+ pe.map((w, E) => {
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 === m ? "location" : void 0, onClick: () => N(W), children: w }) }, W);
898
682
  })
899
683
  ] })
900
684
  ] }),
901
- W.length > 0 ? /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__chip", "aria-expanded": I, onClick: () => K((y) => !y), children: u.selected(W.length) }) : null
685
+ K.length > 0 ? /* @__PURE__ */ n("button", { type: "button", className: "cms-file-picker__chip", "aria-expanded": I, onClick: () => U((w) => !w), children: d.selected(K.length) }) : null
902
686
  ] }),
903
- I && W.length > 0 ? /* @__PURE__ */ o("div", { className: "cms-file-picker__chosen", children: [
904
- /* @__PURE__ */ e("ul", { children: [...M.entries()].map(([y, S]) => /* @__PURE__ */ o("li", { children: [
905
- /* @__PURE__ */ e("span", { className: "cms-file-picker__name", children: S.name }),
906
- /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": u.remove(S.name), onClick: () => Ce(y), children: /* @__PURE__ */ e(ae, { name: "close" }) })
907
- ] }, y)) }),
908
- /* @__PURE__ */ e(De, { variant: "secondary", onClick: () => {
909
- E(/* @__PURE__ */ new Map()), K(!1);
910
- }, children: u.clear })
687
+ I && K.length > 0 ? /* @__PURE__ */ f("div", { className: "cms-file-picker__chosen", children: [
688
+ /* @__PURE__ */ n("ul", { children: [...S.entries()].map(([w, E]) => /* @__PURE__ */ f("li", { children: [
689
+ /* @__PURE__ */ n("span", { className: "cms-file-picker__name", children: E.name }),
690
+ /* @__PURE__ */ n("button", { type: "button", className: "cms-icon-button", "aria-label": d.remove(E.name), onClick: () => Ce(w), children: /* @__PURE__ */ n(se, { name: "close" }) })
691
+ ] }, w)) }),
692
+ /* @__PURE__ */ n(De, { variant: "secondary", onClick: () => {
693
+ x(/* @__PURE__ */ new Map()), U(!1);
694
+ }, children: d.clear })
911
695
  ] }) : null,
912
- /* @__PURE__ */ o("div", { className: "cms-file-picker__list", onScroll: (y) => {
913
- const S = y.currentTarget;
914
- S.scrollTop + S.clientHeight >= S.scrollHeight - tt && U();
696
+ /* @__PURE__ */ f("div", { className: "cms-file-picker__list", onScroll: (w) => {
697
+ const E = w.currentTarget;
698
+ E.scrollTop + E.clientHeight >= E.scrollHeight - ct && z();
915
699
  }, children: [
916
- r.status === "loading" ? /* @__PURE__ */ e(Le, { kind: "loading", title: u.loading, placement: "page" }) : null,
917
- r.status === "error" ? /* @__PURE__ */ e(Le, { kind: "error", title: u.error, placement: "page", action: { label: u.retry, onAction: () => {
918
- k.current = !1, x((y) => y + 1);
700
+ r.status === "loading" ? /* @__PURE__ */ n(Le, { kind: "loading", title: d.loading, placement: "page" }) : null,
701
+ r.status === "error" ? /* @__PURE__ */ n(Le, { kind: "error", title: d.error, placement: "page", action: { label: d.retry, onAction: () => {
702
+ k.current = !1, C((w) => w + 1);
919
703
  } } }) : null,
920
- r.status === "denied" ? /* @__PURE__ */ e(Le, { kind: "denied", title: u.denied, placement: "page" }) : null,
921
- r.status === "ready" && pe.length === 0 ? /* @__PURE__ */ e(Le, { kind: "empty", title: u.empty, placement: "page" }) : null,
922
- /* @__PURE__ */ o(
704
+ r.status === "denied" ? /* @__PURE__ */ n(Le, { kind: "denied", title: d.denied, placement: "page" }) : null,
705
+ r.status === "ready" && fe.length === 0 ? /* @__PURE__ */ n(Le, { kind: "empty", title: d.empty, placement: "page" }) : null,
706
+ /* @__PURE__ */ f(
923
707
  "div",
924
708
  {
925
- ref: z,
709
+ ref: P,
926
710
  role: "listbox",
927
711
  "aria-multiselectable": "true",
928
- "aria-label": u.files,
929
- "aria-activedescendant": pe.length > 0 ? ye(b) : void 0,
712
+ "aria-label": d.files,
713
+ "aria-activedescendant": fe.length > 0 ? we(_) : void 0,
930
714
  tabIndex: 0,
931
715
  className: "cms-file-picker__entries",
932
- hidden: r.status !== "ready" || pe.length === 0,
933
- onKeyDown: le,
716
+ hidden: r.status !== "ready" || fe.length === 0,
717
+ onKeyDown: te,
934
718
  children: [
935
- pe.map((y, S) => {
936
- const Z = y.kind === "file" && M.has(Xe(i, y.id)), G = ce(y);
937
- return /* @__PURE__ */ o(
719
+ fe.map((w, E) => {
720
+ const W = w.kind === "file" && S.has(Je(c, w.id)), q = ie(w);
721
+ return /* @__PURE__ */ f(
938
722
  "div",
939
723
  {
940
- id: ye(S),
724
+ id: we(E),
941
725
  role: "option",
942
- "aria-selected": y.kind === "file" ? Z : void 0,
943
- "aria-disabled": G !== null || void 0,
944
- className: H("cms-file-picker__entry", S === b && "is-active", Z && "is-ticked", G !== null && "is-disabled"),
726
+ "aria-selected": w.kind === "file" ? W : void 0,
727
+ "aria-disabled": q !== null || void 0,
728
+ className: F("cms-file-picker__entry", E === _ && "is-active", W && "is-ticked", q !== null && "is-disabled"),
945
729
  onClick: () => {
946
- N(S), y.kind === "folder" ? oe(y) : be(y);
730
+ y(E), w.kind === "folder" ? ce(w) : be(w);
947
731
  },
948
732
  children: [
949
- /* @__PURE__ */ e("span", { className: "cms-file-picker__tick", "aria-hidden": "true", children: Z ? /* @__PURE__ */ e(B, { name: "check" }) : null }),
950
- /* @__PURE__ */ e(B, { name: y.kind === "folder" ? "folder" : "file" }),
951
- /* @__PURE__ */ o("span", { className: "cms-file-picker__text", children: [
952
- /* @__PURE__ */ e("span", { className: "cms-file-picker__name", children: y.name }),
953
- G !== null ? /* @__PURE__ */ e("span", { className: "cms-file-picker__reason", children: G }) : null
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 }),
737
+ q !== null ? /* @__PURE__ */ n("span", { className: "cms-file-picker__reason", children: q }) : null
954
738
  ] }),
955
- y.kind === "file" && y.size != null ? /* @__PURE__ */ e("span", { className: "cms-file-picker__size", children: f(y.size) }) : null
739
+ w.kind === "file" && w.size != null ? /* @__PURE__ */ n("span", { className: "cms-file-picker__size", children: h(w.size) }) : null
956
740
  ]
957
741
  },
958
- y.id
742
+ w.id
959
743
  );
960
744
  }),
961
- r.status === "ready" && r.paging ? /* @__PURE__ */ e("div", { className: "cms-file-picker__paging", children: /* @__PURE__ */ e(Le, { kind: "loading", title: u.loading, placement: "inline" }) }) : null
745
+ r.status === "ready" && r.paging ? /* @__PURE__ */ n("div", { className: "cms-file-picker__paging", children: /* @__PURE__ */ n(Le, { kind: "loading", title: d.loading, placement: "inline" }) }) : null
962
746
  ]
963
747
  }
964
748
  )
@@ -967,91 +751,91 @@ function Yt(n) {
967
751
  }
968
752
  );
969
753
  }
970
- const Qe = 64;
971
- function lt(n, t) {
972
- for (let l = n instanceof Element ? n : null; l !== null; l = l.parentElement) {
754
+ const nn = 64;
755
+ function ot(e, t) {
756
+ for (let l = e instanceof Element ? e : null; l !== null; l = l.parentElement) {
973
757
  if (l instanceof HTMLElement && l.scrollTop > 0) return !1;
974
758
  if (l === t) return !0;
975
759
  }
976
760
  return t.scrollTop <= 0;
977
761
  }
978
- function st(n, t) {
979
- const [l, s] = D(0), a = P(t);
980
- return a.current = t, ee(() => {
981
- const c = n.current;
982
- if (c === null) return;
983
- let f = null, u = 0;
984
- const m = (v) => {
985
- f = lt(v.target, c) && v.touches.length === 1 ? v.touches[0].clientY : null, u = 0;
986
- }, _ = (v) => {
987
- if (f === null || a.current === null) return;
988
- const h = v.touches[0].clientY - f;
989
- if (h <= 0) {
990
- f = null, s(0);
762
+ function dt(e, t) {
763
+ const [l, s] = D(0), a = O(t);
764
+ return a.current = t, Q(() => {
765
+ const i = e.current;
766
+ if (i === null) return;
767
+ let h = null, d = 0;
768
+ const u = (v) => {
769
+ h = ot(v.target, i) && v.touches.length === 1 ? v.touches[0].clientY : null, d = 0;
770
+ }, b = (v) => {
771
+ if (h === null || a.current === null) return;
772
+ const m = v.touches[0].clientY - h;
773
+ if (m <= 0) {
774
+ h = null, s(0);
991
775
  return;
992
776
  }
993
- v.cancelable && v.preventDefault(), u = Math.min(h * 0.6, Qe * 1.5), s(u);
994
- }, i = () => {
777
+ v.cancelable && v.preventDefault(), d = Math.min(m * 0.6, nn * 1.5), s(d);
778
+ }, c = () => {
995
779
  var v;
996
- f !== null && u >= Qe && ((v = a.current) == null || v.call(a)), f = null, u = 0, s(0);
780
+ h !== null && d >= nn && ((v = a.current) == null || v.call(a)), h = null, d = 0, s(0);
997
781
  };
998
- return c.addEventListener("touchstart", m, { passive: !0 }), c.addEventListener("touchmove", _, { passive: !1 }), c.addEventListener("touchend", i), c.addEventListener("touchcancel", i), () => {
999
- c.removeEventListener("touchstart", m), c.removeEventListener("touchmove", _), c.removeEventListener("touchend", i), c.removeEventListener("touchcancel", i);
782
+ return i.addEventListener("touchstart", u, { passive: !0 }), i.addEventListener("touchmove", b, { passive: !1 }), i.addEventListener("touchend", c), i.addEventListener("touchcancel", c), () => {
783
+ i.removeEventListener("touchstart", u), i.removeEventListener("touchmove", b), i.removeEventListener("touchend", c), i.removeEventListener("touchcancel", c);
1000
784
  };
1001
- }, [n]), l;
1002
- }
1003
- const Cn = $n(null);
1004
- function at() {
1005
- return In(Cn);
1006
- }
1007
- function Xt({ label: n, rows: t, error: l, onRetry: s, loadingText: a = "Loading", emptyTitle: c = "Nothing here yet", emptyHint: f, emptyIcon: u, selected: m, onOpen: _, onRowMenu: i }) {
1008
- const v = P([]), h = at();
1009
- if (l != null) return /* @__PURE__ */ e(Wn, { message: l, onRetry: s });
1010
- if (t === null) return /* @__PURE__ */ e(Un, { what: a, layout: "block" });
1011
- if (t.length === 0) return /* @__PURE__ */ e(Kn, { title: c, hint: f, ...u === void 0 ? {} : { icon: u } });
1012
- const w = (r, g, T) => {
1013
- var x;
785
+ }, [e]), l;
786
+ }
787
+ const En = Rn(null);
788
+ function ut() {
789
+ return Fn(En);
790
+ }
791
+ function ll({ label: e, rows: t, error: l, onRetry: s, loadingText: a = "Loading", emptyTitle: i = "Nothing here yet", emptyHint: h, emptyIcon: d, selected: u, onOpen: b, onRowMenu: c }) {
792
+ const v = O([]), m = ut();
793
+ if (l != null) return /* @__PURE__ */ n(Yn, { message: l, onRetry: s });
794
+ if (t === null) return /* @__PURE__ */ n(Gn, { what: a, layout: "block" });
795
+ if (t.length === 0) return /* @__PURE__ */ n(jn, { title: i, hint: h, ...d === void 0 ? {} : { icon: d } });
796
+ const N = (r, g, T) => {
797
+ var C;
1014
798
  if (r.key === "ArrowDown" || r.key === "ArrowUp")
1015
- r.preventDefault(), (x = v.current[Math.min(t.length - 1, Math.max(0, g + (r.key === "ArrowDown" ? 1 : -1)))]) == null || x.focus();
799
+ r.preventDefault(), (C = v.current[Math.min(t.length - 1, Math.max(0, g + (r.key === "ArrowDown" ? 1 : -1)))]) == null || C.focus();
1016
800
  else if (r.key === "Enter")
1017
- _ == null || _(T);
1018
- else if ((r.key === "ContextMenu" || r.shiftKey && r.key === "F10") && i) {
801
+ b == null || b(T);
802
+ else if ((r.key === "ContextMenu" || r.shiftKey && r.key === "F10") && c) {
1019
803
  r.preventDefault();
1020
- const M = r.currentTarget.getBoundingClientRect();
1021
- i(T, { x: M.left + 16, y: M.bottom });
804
+ const S = r.currentTarget.getBoundingClientRect();
805
+ c(T, { x: S.left + 16, y: S.bottom });
1022
806
  }
1023
807
  };
1024
- return /* @__PURE__ */ o($, { children: [
1025
- h !== null && (h.distance > 0 || h.refreshing) ? /* @__PURE__ */ o("div", { className: "cms-list__pull", role: "status", style: { height: h.refreshing ? void 0 : h.distance }, "data-ready": h.distance >= Qe ? "" : void 0, children: [
1026
- h.refreshing ? /* @__PURE__ */ e(ae, { name: "spinner" }) : null,
1027
- h.text != null ? /* @__PURE__ */ e("span", { className: "cms-list__pull-text", children: h.text }) : null
808
+ return /* @__PURE__ */ f(ge, { children: [
809
+ m !== null && (m.distance > 0 || m.refreshing) ? /* @__PURE__ */ f("div", { className: "cms-list__pull", role: "status", style: { height: m.refreshing ? void 0 : m.distance }, "data-ready": m.distance >= nn ? "" : void 0, children: [
810
+ m.refreshing ? /* @__PURE__ */ n(se, { name: "spinner" }) : null,
811
+ m.text != null ? /* @__PURE__ */ n("span", { className: "cms-list__pull-text", children: m.text }) : null
1028
812
  ] }) : null,
1029
- /* @__PURE__ */ e("ul", { className: "cms-list", role: "listbox", "aria-label": n, children: t.map((r, g) => {
1030
- const T = r.id === m;
1031
- return /* @__PURE__ */ o(
813
+ /* @__PURE__ */ n("ul", { className: "cms-list", role: "listbox", "aria-label": e, children: t.map((r, g) => {
814
+ const T = r.id === u;
815
+ return /* @__PURE__ */ f(
1032
816
  "li",
1033
817
  {
1034
- ref: (x) => {
1035
- v.current[g] = x;
818
+ ref: (C) => {
819
+ v.current[g] = C;
1036
820
  },
1037
821
  role: "option",
1038
822
  "aria-selected": T,
1039
- tabIndex: T || m == null && g === 0 ? 0 : -1,
1040
- className: H("cms-list__row", T && "is-selected"),
1041
- onClick: () => _ == null ? void 0 : _(r.id),
1042
- onKeyDown: (x) => w(x, g, r.id),
1043
- onContextMenu: i ? (x) => {
1044
- x.preventDefault(), i(r.id, { x: x.clientX, y: x.clientY });
823
+ tabIndex: T || u == null && g === 0 ? 0 : -1,
824
+ className: F("cms-list__row", T && "is-selected"),
825
+ onClick: () => b == null ? void 0 : b(r.id),
826
+ onKeyDown: (C) => N(C, g, r.id),
827
+ onContextMenu: c ? (C) => {
828
+ C.preventDefault(), c(r.id, { x: C.clientX, y: C.clientY });
1045
829
  } : void 0,
1046
830
  children: [
1047
- r.lead != null ? /* @__PURE__ */ e("span", { className: "cms-list__lead", children: r.lead }) : null,
1048
- /* @__PURE__ */ o("span", { className: "cms-list__text", children: [
1049
- /* @__PURE__ */ e("span", { className: H("cms-list__primary", r.unread === !0 && "is-unread"), children: r.primary }),
1050
- r.secondary != null ? /* @__PURE__ */ e("span", { className: "cms-list__secondary", children: r.secondary }) : null
831
+ r.lead != null ? /* @__PURE__ */ n("span", { className: "cms-list__lead", children: r.lead }) : null,
832
+ /* @__PURE__ */ f("span", { className: "cms-list__text", children: [
833
+ /* @__PURE__ */ n("span", { className: F("cms-list__primary", r.unread === !0 && "is-unread"), children: r.primary }),
834
+ r.secondary != null ? /* @__PURE__ */ n("span", { className: "cms-list__secondary", children: r.secondary }) : null
1051
835
  ] }),
1052
- r.meta != null || r.count !== void 0 ? /* @__PURE__ */ o("span", { className: "cms-list__end", children: [
1053
- r.meta != null ? /* @__PURE__ */ e("span", { className: "cms-list__meta", children: r.meta }) : null,
1054
- r.count !== void 0 && r.count > 0 ? /* @__PURE__ */ e("span", { className: "cms-badge cms-list__count", children: r.count }) : null
836
+ r.meta != null || r.count !== void 0 ? /* @__PURE__ */ f("span", { className: "cms-list__end", children: [
837
+ r.meta != null ? /* @__PURE__ */ n("span", { className: "cms-list__meta", children: r.meta }) : null,
838
+ r.count !== void 0 && r.count > 0 ? /* @__PURE__ */ n("span", { className: "cms-badge cms-list__count", children: r.count }) : null
1055
839
  ] }) : null
1056
840
  ]
1057
841
  },
@@ -1060,49 +844,49 @@ function Xt({ label: n, rows: t, error: l, onRetry: s, loadingText: a = "Loading
1060
844
  }) })
1061
845
  ] });
1062
846
  }
1063
- function Ke({ at: n, items: t, onClose: l, label: s = "Actions", focus: a = "current" }) {
1064
- const c = P(null), f = P(null), u = fe(), [m, _] = D(n), i = t.filter((r) => r.offer.offered);
847
+ function Ke({ at: e, items: t, onClose: l, label: s = "Actions", focus: a = "current" }) {
848
+ const i = O(null), h = O(null), d = he(), [u, b] = D(e), c = t.filter((r) => r.offer.offered);
1065
849
  if ($e(() => {
1066
- if (!n) return;
1067
- const r = c.current, g = (r == null ? void 0 : r.offsetWidth) ?? 0, T = (r == null ? void 0 : r.offsetHeight) ?? 0;
1068
- _({ x: Math.max(0, Math.min(n.x, window.innerWidth - g)), y: Math.max(0, Math.min(n.y, window.innerHeight - T)) });
1069
- }, [n]), ee(() => {
1070
- var x, M;
1071
- if (!n) return;
1072
- f.current = document.activeElement;
1073
- const r = Array.from(((x = c.current) == null ? void 0 : x.querySelectorAll('[role^="menuitem"]:not([aria-disabled="true"])')) ?? []), g = a === "current" ? r.find((E) => E.getAttribute("aria-checked") === "true") : void 0;
1074
- (M = a === "last" ? r[r.length - 1] : g ?? r[0]) == null || M.focus();
1075
- const T = (E) => {
1076
- var b;
1077
- (b = c.current) != null && b.contains(E.target) || l();
850
+ if (!e) return;
851
+ const r = i.current, g = (r == null ? void 0 : r.offsetWidth) ?? 0, T = (r == null ? void 0 : r.offsetHeight) ?? 0;
852
+ b({ x: Math.max(0, Math.min(e.x, window.innerWidth - g)), y: Math.max(0, Math.min(e.y, window.innerHeight - T)) });
853
+ }, [e]), Q(() => {
854
+ var C, S;
855
+ if (!e) return;
856
+ h.current = document.activeElement;
857
+ const r = Array.from(((C = i.current) == null ? void 0 : C.querySelectorAll('[role^="menuitem"]:not([aria-disabled="true"])')) ?? []), g = a === "current" ? r.find((x) => x.getAttribute("aria-checked") === "true") : void 0;
858
+ (S = a === "last" ? r[r.length - 1] : g ?? r[0]) == null || S.focus();
859
+ const T = (x) => {
860
+ var _;
861
+ (_ = i.current) != null && _.contains(x.target) || l();
1078
862
  };
1079
863
  return document.addEventListener("mousedown", T), () => {
1080
- var E, b;
1081
- document.removeEventListener("mousedown", T), (b = (E = f.current) == null ? void 0 : E.focus) == null || b.call(E);
864
+ var x, _;
865
+ document.removeEventListener("mousedown", T), (_ = (x = h.current) == null ? void 0 : x.focus) == null || _.call(x);
1082
866
  };
1083
- }, [n, l, a]), !n || i.length === 0) return null;
867
+ }, [e, l, a]), !e || c.length === 0) return null;
1084
868
  const v = (r) => {
1085
- var x, M;
1086
- const g = Array.from(((x = c.current) == null ? void 0 : x.querySelectorAll('[role^="menuitem"]')) ?? []), T = g.indexOf(document.activeElement);
869
+ var C, S;
870
+ const g = Array.from(((C = i.current) == null ? void 0 : C.querySelectorAll('[role^="menuitem"]')) ?? []), T = g.indexOf(document.activeElement);
1087
871
  if (r.key === "Escape" || r.key === "Tab")
1088
872
  r.preventDefault(), l();
1089
873
  else if (r.key === "ArrowDown" || r.key === "ArrowUp") {
1090
874
  r.preventDefault();
1091
- const E = r.key === "ArrowDown" ? 1 : -1;
1092
- (M = g[(T + E + g.length) % g.length]) == null || M.focus();
875
+ const x = r.key === "ArrowDown" ? 1 : -1;
876
+ (S = g[(T + x + g.length) % g.length]) == null || S.focus();
1093
877
  }
1094
- }, h = (r) => {
878
+ }, m = (r) => {
1095
879
  const g = r.offer.refusal !== void 0;
1096
- return /* @__PURE__ */ o(
880
+ return /* @__PURE__ */ f(
1097
881
  "div",
1098
882
  {
1099
883
  role: r.checked === void 0 ? "menuitem" : "menuitemradio",
1100
884
  "aria-checked": r.checked,
1101
885
  tabIndex: -1,
1102
886
  "aria-disabled": g || void 0,
1103
- "aria-describedby": g ? `${u}-${r.id}` : void 0,
887
+ "aria-describedby": g ? `${d}-${r.id}` : void 0,
1104
888
  title: g ? r.offer.refusal : void 0,
1105
- className: H("cms-menu__item", r.danger && "is-danger", r.offer.locked && "is-locked", g && "is-refused"),
889
+ className: F("cms-menu__item", r.danger && "is-danger", r.offer.locked && "is-locked", g && "is-refused"),
1106
890
  onClick: () => {
1107
891
  g || (l(), r.onSelect());
1108
892
  },
@@ -1110,35 +894,35 @@ function Ke({ at: n, items: t, onClose: l, label: s = "Actions", focus: a = "cur
1110
894
  (T.key === "Enter" || T.key === " ") && !g && (T.preventDefault(), l(), r.onSelect());
1111
895
  },
1112
896
  children: [
1113
- r.checked !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-menu__check", children: r.checked ? /* @__PURE__ */ e(ae, { name: "check" }) : null }) : null,
1114
- r.offer.locked ? /* @__PURE__ */ e(ae, { name: "lock" }) : null,
1115
- /* @__PURE__ */ e("span", { className: "cms-menu__label", children: r.label }),
1116
- g ? /* @__PURE__ */ e("span", { id: `${u}-${r.id}`, className: "cms-menu__refusal", children: r.offer.refusal }) : null
897
+ r.checked !== void 0 ? /* @__PURE__ */ n("span", { className: "cms-menu__check", children: r.checked ? /* @__PURE__ */ n(se, { name: "check" }) : null }) : null,
898
+ r.offer.locked ? /* @__PURE__ */ n(se, { name: "lock" }) : null,
899
+ /* @__PURE__ */ n("span", { className: "cms-menu__label", children: r.label }),
900
+ g ? /* @__PURE__ */ n("span", { id: `${d}-${r.id}`, className: "cms-menu__refusal", children: r.offer.refusal }) : null
1117
901
  ]
1118
902
  },
1119
903
  r.id
1120
904
  );
1121
- }, w = [];
1122
- for (const r of i) {
1123
- const g = w[w.length - 1];
1124
- g !== void 0 && g.group === r.group ? g.items.push(r) : w.push({ group: r.group, items: [r] });
905
+ }, N = [];
906
+ for (const r of c) {
907
+ const g = N[N.length - 1];
908
+ g !== void 0 && g.group === r.group ? g.items.push(r) : N.push({ group: r.group, items: [r] });
1125
909
  }
1126
- return ln(
1127
- /* @__PURE__ */ e(
910
+ return an(
911
+ /* @__PURE__ */ n(
1128
912
  "div",
1129
913
  {
1130
- ref: c,
914
+ ref: i,
1131
915
  className: "cms-menu",
1132
916
  role: "menu",
1133
917
  "aria-label": s,
1134
- style: { left: (m ?? n).x, top: (m ?? n).y },
918
+ style: { left: (u ?? e).x, top: (u ?? e).y },
1135
919
  onKeyDown: v,
1136
920
  onContextMenu: (r) => r.preventDefault(),
1137
- children: w.map((r, g) => /* @__PURE__ */ o(Bn, { children: [
1138
- g > 0 ? /* @__PURE__ */ e("div", { className: "cms-menu__separator", role: "separator" }) : null,
1139
- r.group === void 0 ? r.items.map(h) : /* @__PURE__ */ o("div", { role: "group", "aria-label": r.group, children: [
1140
- /* @__PURE__ */ e("div", { className: "cms-menu__group", "aria-hidden": "true", children: r.group }),
1141
- r.items.map(h)
921
+ children: N.map((r, g) => /* @__PURE__ */ f(Hn, { children: [
922
+ g > 0 ? /* @__PURE__ */ n("div", { className: "cms-menu__separator", role: "separator" }) : null,
923
+ r.group === void 0 ? r.items.map(m) : /* @__PURE__ */ f("div", { role: "group", "aria-label": r.group, children: [
924
+ /* @__PURE__ */ n("div", { className: "cms-menu__group", "aria-hidden": "true", children: r.group }),
925
+ r.items.map(m)
1142
926
  ] })
1143
927
  ] }, g))
1144
928
  }
@@ -1146,349 +930,349 @@ function Ke({ at: n, items: t, onClose: l, label: s = "Actions", focus: a = "cur
1146
930
  document.body
1147
931
  );
1148
932
  }
1149
- function rn() {
1150
- const [n, t] = D(/* @__PURE__ */ new Set()), [l, s] = D(null), a = P(null), c = P(null), f = (m) => t((_) => _.has(m) ? _ : /* @__PURE__ */ new Set([..._, m])), u = (m) => t((_) => {
1151
- if (!_.has(m)) return _;
1152
- const i = new Set(_);
1153
- return i.delete(m), i;
933
+ function dn() {
934
+ const [e, t] = D(/* @__PURE__ */ new Set()), [l, s] = D(null), a = O(null), i = O(null), h = (u) => t((b) => b.has(u) ? b : /* @__PURE__ */ new Set([...b, u])), d = (u) => t((b) => {
935
+ if (!b.has(u)) return b;
936
+ const c = new Set(b);
937
+ return c.delete(u), c;
1154
938
  });
1155
- return ee(() => {
939
+ return Q(() => {
1156
940
  if (l === null) return;
1157
- const m = (_) => {
1158
- _.key === "Escape" && f(l);
941
+ const u = (b) => {
942
+ b.key === "Escape" && h(l);
1159
943
  };
1160
- return window.addEventListener("keydown", m), () => window.removeEventListener("keydown", m);
944
+ return window.addEventListener("keydown", u), () => window.removeEventListener("keydown", u);
1161
945
  }, [l]), {
1162
- dismissed: (m) => n.has(m),
1163
- dismiss: f,
1164
- show: u,
1165
- pointerIn: (m) => {
1166
- c.current = m, s(m);
946
+ dismissed: (u) => e.has(u),
947
+ dismiss: h,
948
+ show: d,
949
+ pointerIn: (u) => {
950
+ i.current = u, s(u);
1167
951
  },
1168
- pointerOut: (m) => {
1169
- c.current === m && (c.current = null), s((_) => _ === m ? null : _), a.current !== m && u(m);
952
+ pointerOut: (u) => {
953
+ i.current === u && (i.current = null), s((b) => b === u ? null : b), a.current !== u && d(u);
1170
954
  },
1171
- focusIn: (m) => {
1172
- a.current = m;
955
+ focusIn: (u) => {
956
+ a.current = u;
1173
957
  },
1174
- focusOut: (m) => {
1175
- a.current === m && (a.current = null), c.current !== m && u(m);
958
+ focusOut: (u) => {
959
+ a.current === u && (a.current = null), i.current !== u && d(u);
1176
960
  }
1177
961
  };
1178
962
  }
1179
- function rt(n, t, l) {
1180
- return Math.min(Math.max(n - l / 2, 0), Math.max(0, t - l));
1181
- }
1182
- const bn = /* @__PURE__ */ new Set(), vn = { descriptionHidden: !1, elsewhereHidden: !1, titleCut: !1, titleFloor: 0, bare: bn, primaryBare: !1, hidden: bn, primaryHidden: !1, chipsCut: !1 }, gn = (n, t) => n.size === t.size && [...n].every((l) => t.has(l)), it = (n, t) => n.descriptionHidden === t.descriptionHidden && n.elsewhereHidden === t.elsewhereHidden && n.titleCut === t.titleCut && n.titleFloor === t.titleFloor && gn(n.bare, t.bare) && n.primaryBare === t.primaryBare && gn(n.hidden, t.hidden) && n.primaryHidden === t.primaryHidden && n.chipsCut === t.chipsCut, ct = 64, Ae = "primary";
1183
- function Jt({ title: n, icon: t, description: l, meta: s = [], primary: a, secondary: c, more: f = [], moreLabel: u, context: m, fullWidth: _ = !1 }) {
1184
- var J, Ne, de;
1185
- const [i, v] = D(null), [h, w] = D(vn), [r, g] = D(null), [T, x] = D(null), M = rn(), E = P(null), b = P(null), N = P(null), I = fe(), K = fe(), z = [
1186
- ...(c ?? []).map((d) => ({
1187
- id: d.id,
1188
- label: d.label,
1189
- name: d.label,
1190
- icon: d.icon === void 0 ? null : Be(d.icon),
1191
- overflow: d.overflow,
1192
- danger: d.danger === !0,
1193
- offer: d.offer ?? { offered: !0, locked: !1 },
1194
- run: d.onPress
963
+ function mt(e, t, l) {
964
+ return Math.min(Math.max(e - l / 2, 0), Math.max(0, t - l));
965
+ }
966
+ 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
+ function sl({ title: e, icon: t, description: l, meta: s = [], primary: a, secondary: i, more: h = [], moreLabel: d, context: u, fullWidth: b = !1 }) {
968
+ var X, Ne, oe;
969
+ const [c, v] = D(null), [m, N] = D(yn), [r, g] = D(null), [T, C] = D(null), S = dn(), x = O(null), _ = O(null), y = O(null), I = he(), U = he(), P = [
970
+ ...(i ?? []).map((o) => ({
971
+ id: o.id,
972
+ label: o.label,
973
+ name: o.label,
974
+ icon: o.icon === void 0 ? null : Be(o.icon),
975
+ overflow: o.overflow,
976
+ danger: o.danger === !0,
977
+ offer: o.offer ?? { offered: !0, locked: !1 },
978
+ run: o.onPress
1195
979
  })),
1196
- ...f.map((d) => ({
1197
- id: d.id,
1198
- label: d.label,
1199
- name: typeof d.label == "string" ? d.label : d.id,
980
+ ...h.map((o) => ({
981
+ id: o.id,
982
+ label: o.label,
983
+ name: typeof o.label == "string" ? o.label : o.id,
1200
984
  icon: null,
1201
985
  overflow: void 0,
1202
- danger: d.danger === !0,
1203
- offer: d.offer,
1204
- run: d.onSelect
986
+ danger: o.danger === !0,
987
+ offer: o.offer,
988
+ run: o.onSelect
1205
989
  }))
1206
- ].filter((d) => d.offer.offered), k = z.filter((d) => d.overflow === 0), F = z.filter((d) => d.overflow !== 0), U = k.length === 1 ? k[0] ?? null : null, Y = ot(F), W = F.filter((d) => d.overflow === void 0).map((d) => d.id).reverse(), j = [...Y, ...W.map((d) => [d])], X = [...U !== null ? [[U.id]] : [], ...j], ne = a !== void 0 && ((J = a.offer) == null ? void 0 : J.offered) !== !1, ce = (Ne = a == null ? void 0 : a.offer) == null ? void 0 : Ne.refusal, be = a !== void 0 && (((de = a.offer) == null ? void 0 : de.offered) === !1 || ce !== void 0), oe = a !== void 0 && "menu" in a ? a.menu.filter((d) => d.offer.offered) : [], ue = a !== void 0 && "menu" in a && oe.length > 0 ? a : null, Ce = s.filter((d) => d.elsewhere === !0), pe = JSON.stringify([
1207
- n,
990
+ ].filter((o) => o.offer.offered), k = P.filter((o) => o.overflow === 0), B = P.filter((o) => o.overflow !== 0), z = k.length === 1 ? k[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 && (((oe = a.offer) == null ? void 0 : oe.offered) === !1 || ie !== void 0), ce = a !== void 0 && "menu" in a ? a.menu.filter((o) => o.offer.offered) : [], de = a !== void 0 && "menu" in a && ce.length > 0 ? a : null, Ce = s.filter((o) => o.elsewhere === !0), fe = JSON.stringify([
991
+ e,
1208
992
  t ?? null,
1209
993
  l ?? null,
1210
- s.map((d) => [d.id, d.text, d.elsewhere === !0]),
1211
- ne ? [a.label, a.icon, ue !== null] : null,
1212
- z.map((d) => [d.id, d.name, d.icon, d.overflow ?? null])
1213
- ]), le = Ie(() => {
1214
- const d = E.current, A = b.current;
1215
- if (d === null || A === null) return;
1216
- const C = getComputedStyle(d), O = parseFloat(C.columnGap || "0") || 0, se = d.clientWidth - (parseFloat(C.paddingLeft) || 0) - (parseFloat(C.paddingRight) || 0), Q = (ie) => {
994
+ s.map((o) => [o.id, o.text, o.elsewhere === !0]),
995
+ ee ? [a.label, a.icon, de !== null] : null,
996
+ P.map((o) => [o.id, o.name, o.icon, o.overflow ?? null])
997
+ ]), te = Ie(() => {
998
+ const o = x.current, A = _.current;
999
+ if (o === null || A === null) return;
1000
+ const M = getComputedStyle(o), H = parseFloat(M.columnGap || "0") || 0, le = o.clientWidth - (parseFloat(M.paddingLeft) || 0) - (parseFloat(M.paddingRight) || 0), J = (re) => {
1217
1001
  var Me;
1218
- return ((Me = A.querySelector(ie)) == null ? void 0 : Me.getBoundingClientRect().width) ?? 0;
1219
- }, ke = Q('[data-measure="title"]'), He = Math.min(ke, ct), Re = (ie) => {
1220
- const Me = _e(ie), xe = [];
1221
- t !== void 0 && xe.push(Q('[data-measure="lead"]')), xe.push(ie.titleCut ? He : ke), l !== void 0 && !ie.descriptionHidden && xe.push(Q('[data-measure="description"]'));
1222
- for (const ge of s) ge.elsewhere === !0 && ie.elsewhereHidden || xe.push(Q(`[data-measure="meta"][data-measure-id="${CSS.escape(ge.id)}"]`));
1223
- for (const ge of z) {
1224
- if (Me.has(ge.id)) continue;
1225
- const Ze = ie.bare.has(ge.id) && ge.icon !== null;
1226
- xe.push(Q(`[data-measure="${Ze ? "icon" : "full"}"][data-measure-id="${CSS.escape(ge.id)}"]`));
1002
+ return ((Me = A.querySelector(re)) == null ? void 0 : Me.getBoundingClientRect().width) ?? 0;
1003
+ }, ke = J('[data-measure="title"]'), Re = Math.min(ke, ft), He = (re) => {
1004
+ const Me = pe(re), xe = [];
1005
+ 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
+ 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) {
1008
+ if (Me.has(ve.id)) continue;
1009
+ const Ze = re.bare.has(ve.id) && ve.icon !== null;
1010
+ xe.push(J(`[data-measure="${Ze ? "icon" : "full"}"][data-measure-id="${CSS.escape(ve.id)}"]`));
1227
1011
  }
1228
- return ne && !ie.primaryHidden && xe.push(Q(`[data-measure="${ie.primaryBare ? "primary-icon" : "primary"}"]`)), Me.size > 0 && xe.push(Q('[data-measure="more"]')), xe.reduce((ge, Ze) => ge + Ze, 0) + O * Math.max(0, xe.length - 1);
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);
1229
1013
  };
1230
- let q = { ...vn, titleFloor: He };
1231
- const Oe = (ie) => (q = ie, Re(ie) <= se), mn = (() => {
1232
- if (Oe(q) || l !== void 0 && Oe({ ...q, descriptionHidden: !0 }) || (q = { ...q, descriptionHidden: !0 }, Ce.length > 0 && Oe({ ...q, elsewhereHidden: !0 }))) return q;
1233
- q = { ...q, elsewhereHidden: !0 };
1234
- const ie = /* @__PURE__ */ new Set();
1235
- for (const Ve of X) {
1236
- for (const Ge of Ve) ie.add(Ge);
1237
- if (Oe({ ...q, bare: new Set(ie) })) return q;
1014
+ let V = { ...yn, titleFloor: Re };
1015
+ const Oe = (re) => (V = re, He(re) <= le), pn = (() => {
1016
+ if (Oe(V) || l !== void 0 && Oe({ ...V, descriptionHidden: !0 }) || (V = { ...V, descriptionHidden: !0 }, Ce.length > 0 && Oe({ ...V, elsewhereHidden: !0 }))) return V;
1017
+ V = { ...V, elsewhereHidden: !0 };
1018
+ const re = /* @__PURE__ */ new Set();
1019
+ for (const Ve of Y) {
1020
+ for (const Ge of Ve) re.add(Ge);
1021
+ if (Oe({ ...V, bare: new Set(re) })) return V;
1238
1022
  }
1239
- if (ne && Oe({ ...q, primaryBare: !0 })) return q;
1240
- q = { ...q, primaryBare: ne };
1241
- const Me = /* @__PURE__ */ new Set(), xe = [...j, ...ne ? [[Ae]] : []], ge = () => Me.size + k.length >= 2, Ze = (Ve) => ({ ...q, hidden: new Set([...Ve].filter((Ge) => Ge !== Ae)), primaryHidden: Ve.has(Ae) }), hn = q;
1023
+ if (ee && Oe({ ...V, primaryBare: !0 })) return V;
1024
+ V = { ...V, primaryBare: ee };
1025
+ const Me = /* @__PURE__ */ new Set(), xe = [...G, ...ee ? [[Ae]] : []], ve = () => Me.size + k.length >= 2, Ze = (Ve) => ({ ...V, hidden: new Set([...Ve].filter((Ge) => Ge !== Ae)), primaryHidden: Ve.has(Ae) }), bn = V;
1242
1026
  for (const Ve of xe) {
1243
1027
  for (const Ge of Ve) Me.add(Ge);
1244
- if (ge() && Oe(Ze(Me))) return q;
1245
- q = hn;
1028
+ if (ve() && Oe(Ze(Me))) return V;
1029
+ V = bn;
1246
1030
  }
1247
- const fn = ge() ? Ze(Me) : hn;
1248
- return Oe({ ...fn, titleCut: !0 }) ? q : { ...fn, titleCut: !0, chipsCut: !0 };
1031
+ const _n = ve() ? Ze(Me) : bn;
1032
+ return Oe({ ..._n, titleCut: !0 }) ? V : { ..._n, titleCut: !0, chipsCut: !0 };
1249
1033
  })();
1250
- w((ie) => it(ie, mn) ? ie : mn);
1251
- }, [pe]);
1252
- $e(le, [le]), ee(() => {
1253
- const d = E.current;
1254
- if (d === null || typeof ResizeObserver > "u") return;
1255
- const A = new ResizeObserver(() => le());
1256
- return A.observe(d), () => A.disconnect();
1257
- }, [le]), ee(() => {
1258
- const d = typeof document > "u" ? void 0 : document.fonts;
1259
- if (d === void 0) return;
1034
+ N((re) => ht(re, pn) ? re : pn);
1035
+ }, [fe]);
1036
+ $e(te, [te]), Q(() => {
1037
+ const o = x.current;
1038
+ if (o === null || typeof ResizeObserver > "u") return;
1039
+ const A = new ResizeObserver(() => te());
1040
+ return A.observe(o), () => A.disconnect();
1041
+ }, [te]), Q(() => {
1042
+ const o = typeof document > "u" ? void 0 : document.fonts;
1043
+ if (o === void 0) return;
1260
1044
  let A = !0;
1261
- const C = () => {
1262
- A && le();
1045
+ const M = () => {
1046
+ A && te();
1263
1047
  };
1264
- return d.ready.then(C), d.addEventListener("loadingdone", C), () => {
1265
- A = !1, d.removeEventListener("loadingdone", C);
1048
+ return o.ready.then(M), o.addEventListener("loadingdone", M), () => {
1049
+ A = !1, o.removeEventListener("loadingdone", M);
1266
1050
  };
1267
- }, [le]);
1268
- function _e(d) {
1269
- const A = d.hidden.size + (d.primaryHidden ? 1 : 0);
1270
- return /* @__PURE__ */ new Set([...k.filter((C) => C !== U || A > 0).map((C) => C.id), ...d.hidden, ...d.primaryHidden ? [Ae] : []]);
1051
+ }, [te]);
1052
+ function pe(o) {
1053
+ const A = o.hidden.size + (o.primaryHidden ? 1 : 0);
1054
+ return /* @__PURE__ */ new Set([...k.filter((M) => M !== z || A > 0).map((M) => M.id), ...o.hidden, ...o.primaryHidden ? [Ae] : []]);
1271
1055
  }
1272
- const ve = _e(h), ye = z.filter((d) => !ve.has(d.id) && d !== U), te = U !== null && !ve.has(U.id) ? U : null, we = ne && !h.primaryHidden, y = (d) => z.find((A) => A.id === d), S = j.flat().filter((d) => h.hidden.has(d)).map(y).filter((d) => d !== void 0), Z = (d) => ({ id: d.id, label: d.label, offer: d.offer, ...d.danger ? { danger: !0 } : {}, onSelect: d.run }), G = [
1273
- ...ne && h.primaryHidden ? [{ id: Ae, label: a.label, offer: a.offer ?? { offered: !0, locked: !1 }, onSelect: () => {
1056
+ const _e = pe(m), we = P.filter((o) => !_e.has(o.id) && o !== z), ne = z !== null && !_e.has(z.id) ? z : null, ye = ee && !m.primaryHidden, w = (o) => P.find((A) => A.id === o), E = G.flat().filter((o) => m.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 = [
1057
+ ...ee && m.primaryHidden ? [{ id: Ae, label: a.label, offer: a.offer ?? { offered: !0, locked: !1 }, onSelect: () => {
1274
1058
  be || a.onPress();
1275
- } }, ...oe] : [],
1276
- ...S.map(Z),
1277
- ...ve.size > 0 ? k.map(Z) : []
1278
- ], p = G.length > 0, L = [
1279
- ...ye.map((d) => d.id),
1280
- ...te !== null ? [te.id] : [],
1281
- ...we ? [Ae, ...ue !== null ? ["primary-menu"] : []] : [],
1059
+ } }, ...ce] : [],
1060
+ ...E.map(W),
1061
+ ..._e.size > 0 ? k.map(W) : []
1062
+ ], p = q.length > 0, L = [
1063
+ ...we.map((o) => o.id),
1064
+ ...ne !== null ? [ne.id] : [],
1065
+ ...ye ? [Ae, ...de !== null ? ["primary-menu"] : []] : [],
1282
1066
  ...p ? ["more"] : []
1283
- ], V = r !== null && L.includes(r) ? r : L[0] ?? null;
1284
- ee(() => {
1285
- var d, A;
1286
- r === null || L.includes(r) || !p || ((d = E.current) != null && d.contains(document.activeElement) || document.activeElement === document.body) && (g("more"), (A = N.current) == null || A.focus());
1287
- }, [h]);
1288
- const me = (d) => `${K}-${d}`, re = (d) => {
1289
- var se;
1290
- const A = L.indexOf(V ?? "");
1291
- let C = null;
1292
- if (d.key === "ArrowRight" ? C = Math.min(L.length - 1, A + 1) : d.key === "ArrowLeft" ? C = Math.max(0, A - 1) : d.key === "Home" ? C = 0 : d.key === "End" && (C = L.length - 1), C === null) return;
1293
- d.preventDefault();
1294
- const O = L[C] ?? null;
1295
- g(O), O !== null && ((se = document.getElementById(me(O))) == null || se.focus());
1296
- }, he = (d, A) => {
1297
- const C = A.getBoundingClientRect();
1298
- v((i == null ? void 0 : i.which) === d ? null : { which: d, x: C.left, y: C.bottom + 4 });
1299
- }, Se = (d) => ({ id: me(d), tabIndex: V === d ? 0 : -1, onFocus: () => g(d) }), We = (d, A, C) => A ? {
1300
- ...T === d ? { "data-reason-shown": "" } : {},
1301
- ...M.dismissed(d) ? { "data-tip-dismissed": "" } : {},
1302
- onFocus: (O) => {
1303
- g(d), M.focusIn(d), Te(O.currentTarget, C);
1067
+ ], Z = r !== null && L.includes(r) ? r : L[0] ?? null;
1068
+ Q(() => {
1069
+ var o, A;
1070
+ r === null || L.includes(r) || !p || ((o = x.current) != null && o.contains(document.activeElement) || document.activeElement === document.body) && (g("more"), (A = y.current) == null || A.focus());
1071
+ }, [m]);
1072
+ const ue = (o) => `${U}-${o}`, ae = (o) => {
1073
+ var le;
1074
+ const A = L.indexOf(Z ?? "");
1075
+ let M = null;
1076
+ if (o.key === "ArrowRight" ? M = Math.min(L.length - 1, A + 1) : o.key === "ArrowLeft" ? M = Math.max(0, A - 1) : o.key === "Home" ? M = 0 : o.key === "End" && (M = L.length - 1), M === null) return;
1077
+ o.preventDefault();
1078
+ const H = L[M] ?? null;
1079
+ g(H), H !== null && ((le = document.getElementById(ue(H))) == null || le.focus());
1080
+ }, me = (o, A) => {
1081
+ const M = A.getBoundingClientRect();
1082
+ v((c == null ? void 0 : c.which) === o ? null : { which: o, x: M.left, y: M.bottom + 4 });
1083
+ }, Se = (o) => ({ id: ue(o), tabIndex: Z === o ? 0 : -1, onFocus: () => g(o) }), We = (o, A, M) => A ? {
1084
+ ...T === o ? { "data-reason-shown": "" } : {},
1085
+ ...S.dismissed(o) ? { "data-tip-dismissed": "" } : {},
1086
+ onFocus: (H) => {
1087
+ g(o), S.focusIn(o), Te(H.currentTarget, M);
1304
1088
  },
1305
1089
  onBlur: () => {
1306
- x((O) => O === d ? null : O), M.focusOut(d);
1090
+ C((H) => H === o ? null : H), S.focusOut(o);
1307
1091
  },
1308
- onMouseEnter: (O) => {
1309
- M.pointerIn(d), Te(O.currentTarget, C);
1092
+ onMouseEnter: (H) => {
1093
+ S.pointerIn(o), Te(H.currentTarget, M);
1310
1094
  },
1311
- onMouseLeave: () => M.pointerOut(d),
1312
- onKeyDown: (O) => {
1313
- O.key === "Escape" && (x((se) => se === d ? null : se), M.dismiss(d));
1095
+ onMouseLeave: () => S.pointerOut(o),
1096
+ onKeyDown: (H) => {
1097
+ H.key === "Escape" && (C((le) => le === o ? null : le), S.dismiss(o));
1314
1098
  }
1315
- } : {}, Fe = (d, A, C) => {
1316
- x(d), M.show(d), Te(A, C);
1317
- }, Te = (d, A) => {
1318
- const C = document.getElementById(A), O = E.current;
1319
- if (C === null || O === null) return;
1320
- const se = C.style.display;
1321
- C.style.display = "block";
1322
- const Q = C.offsetWidth;
1323
- C.style.display = se;
1324
- const ke = O.getBoundingClientRect(), He = d.getBoundingClientRect();
1325
- C.style.left = `${String(rt(He.left + He.width / 2 - ke.left, ke.width, Q))}px`, C.style.right = "auto";
1326
- }, Ee = (d, A, C) => /* @__PURE__ */ o("span", { id: d, className: "cms-section-header__tip", role: "tooltip", children: [
1327
- C !== null ? /* @__PURE__ */ o("span", { "aria-hidden": "true", children: [
1328
- C,
1099
+ } : {}, Fe = (o, A, M) => {
1100
+ C(o), S.show(o), Te(A, M);
1101
+ }, Te = (o, A) => {
1102
+ const M = document.getElementById(A), H = x.current;
1103
+ if (M === null || H === null) return;
1104
+ const le = M.style.display;
1105
+ M.style.display = "block";
1106
+ const J = M.offsetWidth;
1107
+ M.style.display = le;
1108
+ const ke = H.getBoundingClientRect(), Re = o.getBoundingClientRect();
1109
+ M.style.left = `${String(mt(Re.left + Re.width / 2 - ke.left, ke.width, J))}px`, M.style.right = "auto";
1110
+ }, Ee = (o, A, M) => /* @__PURE__ */ f("span", { id: o, className: "cms-section-header__tip", role: "tooltip", children: [
1111
+ M !== null ? /* @__PURE__ */ f("span", { "aria-hidden": "true", children: [
1112
+ M,
1329
1113
  ": "
1330
1114
  ] }) : null,
1331
1115
  A
1332
- ] }), R = (d) => {
1333
- const A = h.bare.has(d.id) && d.icon !== null, C = d.offer.refusal, O = `${K}-reason-${d.id}`;
1334
- return /* @__PURE__ */ o(
1116
+ ] }), R = (o) => {
1117
+ const A = m.bare.has(o.id) && o.icon !== null, M = o.offer.refusal, H = `${U}-reason-${o.id}`;
1118
+ return /* @__PURE__ */ f(
1335
1119
  "button",
1336
1120
  {
1337
1121
  type: "button",
1338
- className: H("cms-button", "cms-button--quiet", "cms-section-header__secondary", A && "cms-section-header__secondary--bare", d.danger && "is-danger"),
1339
- "data-action": d.id,
1340
- "aria-label": A || C !== void 0 ? d.name : void 0,
1341
- "aria-disabled": C !== void 0 ? "true" : void 0,
1342
- "aria-describedby": C !== void 0 ? O : void 0,
1343
- title: C === void 0 && A ? d.name : void 0,
1344
- ...Se(d.id),
1345
- ...We(d.id, C !== void 0, O),
1346
- onClick: (se) => {
1347
- C === void 0 ? d.run() : Fe(d.id, se.currentTarget, O);
1122
+ className: F("cms-button", "cms-button--quiet", "cms-section-header__secondary", A && "cms-section-header__secondary--bare", o.danger && "is-danger"),
1123
+ "data-action": o.id,
1124
+ "aria-label": A || M !== void 0 ? o.name : void 0,
1125
+ "aria-disabled": M !== void 0 ? "true" : void 0,
1126
+ "aria-describedby": M !== void 0 ? H : void 0,
1127
+ title: M === void 0 && A ? o.name : void 0,
1128
+ ...Se(o.id),
1129
+ ...We(o.id, M !== void 0, H),
1130
+ onClick: (le) => {
1131
+ M === void 0 ? o.run() : Fe(o.id, le.currentTarget, H);
1348
1132
  },
1349
1133
  children: [
1350
- d.icon !== null ? /* @__PURE__ */ e(B, { name: d.icon, size: 18 }) : null,
1351
- A ? null : /* @__PURE__ */ e("span", { className: "cms-section-header__label", children: d.label }),
1352
- C !== void 0 ? Ee(O, C, A ? d.name : null) : null
1134
+ o.icon !== null ? /* @__PURE__ */ n($, { name: o.icon, size: 18 }) : null,
1135
+ A ? null : /* @__PURE__ */ n("span", { className: "cms-section-header__label", children: o.label }),
1136
+ M !== void 0 ? Ee(H, M, A ? o.name : null) : null
1353
1137
  ]
1354
1138
  },
1355
- d.id
1139
+ o.id
1356
1140
  );
1357
1141
  };
1358
- return /* @__PURE__ */ o("header", { className: H("cms-section-header", _ && "cms-section-header--full"), children: [
1359
- /* @__PURE__ */ o("div", { ref: E, className: H("cms-section-header__row", h.chipsCut && "cms-section-header__row--chips-cut"), "data-row": "1", children: [
1360
- t !== void 0 ? /* @__PURE__ */ e(B, { name: t }) : null,
1361
- /* @__PURE__ */ e(
1142
+ return /* @__PURE__ */ f("header", { className: F("cms-section-header", b && "cms-section-header--full"), children: [
1143
+ /* @__PURE__ */ f("div", { ref: x, className: F("cms-section-header__row", m.chipsCut && "cms-section-header__row--chips-cut"), "data-row": "1", children: [
1144
+ t !== void 0 ? /* @__PURE__ */ n($, { name: t }) : null,
1145
+ /* @__PURE__ */ n(
1362
1146
  "h1",
1363
1147
  {
1364
1148
  className: "cms-section-header__title",
1365
- title: n,
1366
- style: { minWidth: h.titleCut ? `${h.titleFloor}px` : "max-content" },
1367
- children: n
1149
+ title: e,
1150
+ style: { minWidth: m.titleCut ? `${m.titleFloor}px` : "max-content" },
1151
+ children: e
1368
1152
  }
1369
1153
  ),
1370
- l !== void 0 ? /* @__PURE__ */ e("span", { className: H("cms-section-header__description", h.descriptionHidden && "cms-visually-hidden"), children: l }) : null,
1371
- s.map((d, A) => /* @__PURE__ */ e(
1154
+ l !== void 0 ? /* @__PURE__ */ n("span", { className: F("cms-section-header__description", m.descriptionHidden && "cms-visually-hidden"), children: l }) : null,
1155
+ s.map((o, A) => /* @__PURE__ */ n(
1372
1156
  "span",
1373
1157
  {
1374
1158
  className: "cms-section-header__meta",
1375
- "data-meta": d.id,
1376
- hidden: d.elsewhere === !0 && h.elsewhereHidden,
1377
- style: h.chipsCut && d.elsewhere !== !0 ? { flexShrink: A + 1 } : void 0,
1378
- ...h.chipsCut && d.elsewhere !== !0 ? { title: d.text, "aria-label": d.text } : {},
1379
- children: d.content
1159
+ "data-meta": o.id,
1160
+ hidden: o.elsewhere === !0 && m.elsewhereHidden,
1161
+ style: m.chipsCut && o.elsewhere !== !0 ? { flexShrink: A + 1 } : void 0,
1162
+ ...m.chipsCut && o.elsewhere !== !0 ? { title: o.text, "aria-label": o.text } : {},
1163
+ children: o.content
1380
1164
  },
1381
- d.id
1165
+ o.id
1382
1166
  )),
1383
- /* @__PURE__ */ o("div", { className: "cms-section-header__actions", role: "toolbar", "aria-label": n, onKeyDown: re, children: [
1384
- ye.map(R),
1385
- te !== null ? R(te) : null,
1386
- we ? /* @__PURE__ */ o("span", { className: H("cms-section-header__primary", ue !== null && "cms-section-header__primary--split"), children: [
1387
- /* @__PURE__ */ o(
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(
1388
1172
  "button",
1389
1173
  {
1390
1174
  type: "button",
1391
- className: H("cms-button", "cms-button--primary", h.primaryBare && "cms-section-header__primary--bare"),
1175
+ className: F("cms-button", "cms-button--primary", m.primaryBare && "cms-section-header__primary--bare"),
1392
1176
  "data-action": "primary",
1393
- "aria-label": h.primaryBare ? a.label : void 0,
1177
+ "aria-label": m.primaryBare ? a.label : void 0,
1394
1178
  "aria-disabled": be ? "true" : void 0,
1395
- "aria-describedby": ce !== void 0 ? I : void 0,
1396
- title: h.primaryBare && ce === void 0 ? a.label : void 0,
1179
+ "aria-describedby": ie !== void 0 ? I : void 0,
1180
+ title: m.primaryBare && ie === void 0 ? a.label : void 0,
1397
1181
  ...Se(Ae),
1398
- ...We(Ae, ce !== void 0, I),
1399
- onClick: (d) => {
1400
- be ? ce !== void 0 && Fe(Ae, d.currentTarget, I) : a.onPress();
1182
+ ...We(Ae, ie !== void 0, I),
1183
+ onClick: (o) => {
1184
+ be ? ie !== void 0 && Fe(Ae, o.currentTarget, I) : a.onPress();
1401
1185
  },
1402
1186
  children: [
1403
- /* @__PURE__ */ e(B, { name: a.icon }),
1404
- h.primaryBare ? null : /* @__PURE__ */ o($, { children: [
1187
+ /* @__PURE__ */ n($, { name: a.icon }),
1188
+ m.primaryBare ? null : /* @__PURE__ */ f(ge, { children: [
1405
1189
  " ",
1406
- /* @__PURE__ */ e("span", { children: a.label })
1190
+ /* @__PURE__ */ n("span", { children: a.label })
1407
1191
  ] })
1408
1192
  ]
1409
1193
  }
1410
1194
  ),
1411
- ue !== null ? /* @__PURE__ */ e(
1195
+ de !== null ? /* @__PURE__ */ n(
1412
1196
  "button",
1413
1197
  {
1414
1198
  type: "button",
1415
1199
  className: "cms-button cms-button--primary cms-section-header__split",
1416
1200
  "data-action": "primary-menu",
1417
1201
  "aria-haspopup": "menu",
1418
- "aria-expanded": (i == null ? void 0 : i.which) === "primary",
1419
- "aria-label": ue.menuLabel,
1202
+ "aria-expanded": (c == null ? void 0 : c.which) === "primary",
1203
+ "aria-label": de.menuLabel,
1420
1204
  ...Se("primary-menu"),
1421
- onClick: (d) => he("primary", d.currentTarget),
1422
- children: /* @__PURE__ */ e(B, { name: "chevron-down" })
1205
+ onClick: (o) => me("primary", o.currentTarget),
1206
+ children: /* @__PURE__ */ n($, { name: "chevron-down" })
1423
1207
  }
1424
1208
  ) : null,
1425
- ce !== void 0 ? Ee(I, ce, h.primaryBare ? a.label : null) : null
1209
+ ie !== void 0 ? Ee(I, ie, m.primaryBare ? a.label : null) : null
1426
1210
  ] }) : null,
1427
- p ? /* @__PURE__ */ e(
1211
+ p ? /* @__PURE__ */ n(
1428
1212
  "button",
1429
1213
  {
1430
- ref: N,
1214
+ ref: y,
1431
1215
  type: "button",
1432
1216
  className: "cms-section-header__more",
1433
1217
  "data-action": "more",
1434
1218
  "aria-haspopup": "menu",
1435
- "aria-expanded": (i == null ? void 0 : i.which) === "more",
1436
- "aria-label": u,
1437
- title: u,
1219
+ "aria-expanded": (c == null ? void 0 : c.which) === "more",
1220
+ "aria-label": d,
1221
+ title: d,
1438
1222
  ...Se("more"),
1439
- onClick: (d) => he("more", d.currentTarget),
1440
- children: /* @__PURE__ */ e(B, { name: "more" })
1223
+ onClick: (o) => me("more", o.currentTarget),
1224
+ children: /* @__PURE__ */ n($, { name: "more" })
1441
1225
  }
1442
1226
  ) : null
1443
1227
  ] }),
1444
- /* @__PURE__ */ o("div", { ref: b, className: "cms-section-header__measure", "aria-hidden": "true", children: [
1445
- t !== void 0 ? /* @__PURE__ */ e("span", { "data-measure": "lead", children: /* @__PURE__ */ e(B, { name: t }) }) : null,
1446
- /* @__PURE__ */ e("span", { "data-measure": "title", className: "cms-section-header__title", children: n }),
1447
- l !== void 0 ? /* @__PURE__ */ e("span", { "data-measure": "description", className: "cms-section-header__description", children: l }) : null,
1448
- s.map((d) => /* @__PURE__ */ e("span", { "data-measure": "meta", "data-measure-id": d.id, className: "cms-section-header__meta", children: d.content }, d.id)),
1449
- z.map((d) => /* @__PURE__ */ o("span", { children: [
1450
- /* @__PURE__ */ o("span", { "data-measure": "full", "data-measure-id": d.id, className: "cms-button cms-button--quiet cms-section-header__secondary", children: [
1451
- d.icon !== null ? /* @__PURE__ */ e(B, { name: d.icon, size: 18 }) : null,
1452
- /* @__PURE__ */ e("span", { className: "cms-section-header__label", children: d.label })
1228
+ /* @__PURE__ */ f("div", { ref: _, className: "cms-section-header__measure", "aria-hidden": "true", children: [
1229
+ t !== void 0 ? /* @__PURE__ */ n("span", { "data-measure": "lead", children: /* @__PURE__ */ n($, { name: t }) }) : null,
1230
+ /* @__PURE__ */ n("span", { "data-measure": "title", className: "cms-section-header__title", children: e }),
1231
+ l !== void 0 ? /* @__PURE__ */ n("span", { "data-measure": "description", className: "cms-section-header__description", children: l }) : null,
1232
+ 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: [
1235
+ o.icon !== null ? /* @__PURE__ */ n($, { name: o.icon, size: 18 }) : null,
1236
+ /* @__PURE__ */ n("span", { className: "cms-section-header__label", children: o.label })
1453
1237
  ] }),
1454
- /* @__PURE__ */ e("span", { "data-measure": "icon", "data-measure-id": d.id, className: "cms-button cms-button--quiet cms-section-header__secondary cms-section-header__secondary--bare", children: d.icon !== null ? /* @__PURE__ */ e(B, { name: d.icon, size: 18 }) : null })
1455
- ] }, d.id)),
1456
- ne ? /* @__PURE__ */ o($, { children: [
1457
- /* @__PURE__ */ o("span", { "data-measure": "primary", className: "cms-section-header__primary", children: [
1458
- /* @__PURE__ */ o("span", { className: "cms-button cms-button--primary", children: [
1459
- /* @__PURE__ */ e(B, { name: a.icon }),
1238
+ /* @__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
+ ] }, 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: [
1243
+ /* @__PURE__ */ n($, { name: a.icon }),
1460
1244
  " ",
1461
- /* @__PURE__ */ e("span", { children: a.label })
1245
+ /* @__PURE__ */ n("span", { children: a.label })
1462
1246
  ] }),
1463
- ue !== null ? /* @__PURE__ */ e("span", { className: "cms-button cms-button--primary cms-section-header__split", children: /* @__PURE__ */ e(B, { name: "chevron-down" }) }) : null
1247
+ de !== null ? /* @__PURE__ */ n("span", { className: "cms-button cms-button--primary cms-section-header__split", children: /* @__PURE__ */ n($, { name: "chevron-down" }) }) : null
1464
1248
  ] }),
1465
- /* @__PURE__ */ o("span", { "data-measure": "primary-icon", className: "cms-section-header__primary", children: [
1466
- /* @__PURE__ */ e("span", { className: "cms-button cms-button--primary cms-section-header__primary--bare", children: /* @__PURE__ */ e(B, { name: a.icon }) }),
1467
- ue !== null ? /* @__PURE__ */ e("span", { className: "cms-button cms-button--primary cms-section-header__split", children: /* @__PURE__ */ e(B, { name: "chevron-down" }) }) : null
1249
+ /* @__PURE__ */ f("span", { "data-measure": "primary-icon", className: "cms-section-header__primary", children: [
1250
+ /* @__PURE__ */ n("span", { className: "cms-button cms-button--primary cms-section-header__primary--bare", children: /* @__PURE__ */ n($, { name: a.icon }) }),
1251
+ de !== null ? /* @__PURE__ */ n("span", { className: "cms-button cms-button--primary cms-section-header__split", children: /* @__PURE__ */ n($, { name: "chevron-down" }) }) : null
1468
1252
  ] })
1469
1253
  ] }) : null,
1470
- /* @__PURE__ */ e("span", { "data-measure": "more", className: "cms-section-header__more", children: /* @__PURE__ */ e(B, { name: "more" }) })
1254
+ /* @__PURE__ */ n("span", { "data-measure": "more", className: "cms-section-header__more", children: /* @__PURE__ */ n($, { name: "more" }) })
1471
1255
  ] })
1472
1256
  ] }),
1473
- m != null ? /* @__PURE__ */ e("div", { className: "cms-section-header__context", "data-row": "2", children: m }) : null,
1474
- ue !== null ? /* @__PURE__ */ e(Ke, { at: (i == null ? void 0 : i.which) === "primary" ? i : null, items: oe, onClose: () => v(null), label: ue.menuLabel }) : null,
1475
- /* @__PURE__ */ e(Ke, { at: (i == null ? void 0 : i.which) === "more" ? i : null, items: G, onClose: () => v(null), label: u })
1257
+ u != null ? /* @__PURE__ */ n("div", { className: "cms-section-header__context", "data-row": "2", children: u }) : null,
1258
+ de !== null ? /* @__PURE__ */ n(Ke, { at: (c == null ? void 0 : c.which) === "primary" ? c : null, items: ce, onClose: () => v(null), label: de.menuLabel }) : null,
1259
+ /* @__PURE__ */ n(Ke, { at: (c == null ? void 0 : c.which) === "more" ? c : null, items: q, onClose: () => v(null), label: d })
1476
1260
  ] });
1477
1261
  }
1478
- function ot(n) {
1262
+ function pt(e) {
1479
1263
  const t = /* @__PURE__ */ new Map();
1480
- for (const l of n) l.overflow !== void 0 && l.overflow !== 0 && t.set(l.overflow, [...t.get(l.overflow) ?? [], l.id]);
1264
+ for (const l of e) l.overflow !== void 0 && l.overflow !== 0 && t.set(l.overflow, [...t.get(l.overflow) ?? [], l.id]);
1481
1265
  return [...t.entries()].sort(([l], [s]) => l - s).map(([, l]) => l);
1482
1266
  }
1483
- function Qt({ head: n, children: t, className: l, scrollRef: s, onScroll: a, bodyProps: c }) {
1484
- return /* @__PURE__ */ o("div", { className: H("cms-column", l), children: [
1485
- n == null ? null : /* @__PURE__ */ e("div", { className: "cms-column__head", children: n }),
1486
- /* @__PURE__ */ e("div", { ...c, className: H("cms-column__body", c == null ? void 0 : c.className), ref: s, onScroll: a, children: t })
1267
+ function al({ head: e, children: t, className: l, scrollRef: s, onScroll: a, bodyProps: i }) {
1268
+ return /* @__PURE__ */ f("div", { className: F("cms-column", l), children: [
1269
+ e == null ? null : /* @__PURE__ */ n("div", { className: "cms-column__head", children: e }),
1270
+ /* @__PURE__ */ n("div", { ...i, className: F("cms-column__body", i == null ? void 0 : i.className), ref: s, onScroll: a, children: t })
1487
1271
  ] });
1488
1272
  }
1489
- function el({ title: n, scope: t, actions: l, backLink: s }) {
1490
- return /* @__PURE__ */ o("header", { className: "cms-page-header", children: [
1491
- s ? /* @__PURE__ */ o(
1273
+ function rl({ title: e, scope: t, actions: l, backLink: s }) {
1274
+ return /* @__PURE__ */ f("header", { className: "cms-page-header", children: [
1275
+ s ? /* @__PURE__ */ f(
1492
1276
  "a",
1493
1277
  {
1494
1278
  className: "cms-page-header__back",
@@ -1497,88 +1281,88 @@ function el({ title: n, scope: t, actions: l, backLink: s }) {
1497
1281
  s.onBack && (a.preventDefault(), s.onBack());
1498
1282
  },
1499
1283
  children: [
1500
- /* @__PURE__ */ e(ae, { name: "back" }),
1284
+ /* @__PURE__ */ n(se, { name: "back" }),
1501
1285
  " ",
1502
1286
  s.label
1503
1287
  ]
1504
1288
  }
1505
1289
  ) : null,
1506
- /* @__PURE__ */ o("div", { className: "cms-page-header__row", children: [
1507
- /* @__PURE__ */ o("div", { className: "cms-page-header__titles", children: [
1508
- /* @__PURE__ */ e("h1", { className: "cms-page-header__title", children: n }),
1509
- t != null ? /* @__PURE__ */ e("p", { className: "cms-page-header__scope", children: t }) : null
1290
+ /* @__PURE__ */ f("div", { className: "cms-page-header__row", children: [
1291
+ /* @__PURE__ */ f("div", { className: "cms-page-header__titles", children: [
1292
+ /* @__PURE__ */ n("h1", { className: "cms-page-header__title", children: e }),
1293
+ t != null ? /* @__PURE__ */ n("p", { className: "cms-page-header__scope", children: t }) : null
1510
1294
  ] }),
1511
- l != null ? /* @__PURE__ */ e("div", { className: "cms-page-header__actions", children: l }) : null
1295
+ l != null ? /* @__PURE__ */ n("div", { className: "cms-page-header__actions", children: l }) : null
1512
1296
  ] })
1513
1297
  ] });
1514
1298
  }
1515
- function nl({ tabs: n, active: t, onSelect: l, label: s }) {
1516
- const a = P([]), c = (f, u) => {
1299
+ function il({ tabs: e, active: t, onSelect: l, label: s }) {
1300
+ const a = O([]), i = (h, d) => {
1517
1301
  var v;
1518
- const m = n.length - 1, _ = f.key === "ArrowRight" ? u === m ? 0 : u + 1 : f.key === "ArrowLeft" ? u === 0 ? m : u - 1 : f.key === "Home" ? 0 : f.key === "End" ? m : null;
1519
- if (_ === null) return;
1520
- f.preventDefault();
1521
- const i = n[_];
1522
- i && (l(i.id), (v = a.current[_]) == null || v.focus());
1302
+ const u = e.length - 1, b = h.key === "ArrowRight" ? d === u ? 0 : d + 1 : h.key === "ArrowLeft" ? d === 0 ? u : d - 1 : h.key === "Home" ? 0 : h.key === "End" ? u : null;
1303
+ if (b === null) return;
1304
+ h.preventDefault();
1305
+ const c = e[b];
1306
+ c && (l(c.id), (v = a.current[b]) == null || v.focus());
1523
1307
  };
1524
- return /* @__PURE__ */ e("div", { className: "cms-tabs", role: "tablist", "aria-label": s, children: n.map((f, u) => {
1525
- const m = f.id === t;
1526
- return /* @__PURE__ */ o(
1308
+ return /* @__PURE__ */ n("div", { className: "cms-tabs", role: "tablist", "aria-label": s, children: e.map((h, d) => {
1309
+ const u = h.id === t;
1310
+ return /* @__PURE__ */ f(
1527
1311
  "button",
1528
1312
  {
1529
- ref: (_) => {
1530
- a.current[u] = _;
1313
+ ref: (b) => {
1314
+ a.current[d] = b;
1531
1315
  },
1532
1316
  type: "button",
1533
1317
  role: "tab",
1534
- className: H("cms-tab", m && "is-active"),
1535
- "aria-selected": m,
1536
- tabIndex: m ? 0 : -1,
1537
- onClick: () => l(f.id),
1538
- onKeyDown: (_) => c(_, u),
1318
+ className: F("cms-tab", u && "is-active"),
1319
+ "aria-selected": u,
1320
+ tabIndex: u ? 0 : -1,
1321
+ onClick: () => l(h.id),
1322
+ onKeyDown: (b) => i(b, d),
1539
1323
  children: [
1540
- f.label,
1541
- f.count !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-tab__count", children: f.count }) : null
1324
+ h.label,
1325
+ h.count !== void 0 ? /* @__PURE__ */ n("span", { className: "cms-tab__count", children: h.count }) : null
1542
1326
  ]
1543
1327
  },
1544
- f.id
1328
+ h.id
1545
1329
  );
1546
1330
  }) });
1547
1331
  }
1548
- function dt(n) {
1549
- const t = n.trim().replace(/\s+via\s+\S.*$/, "").split(/\s+/).filter(Boolean), l = (a) => {
1550
- var c;
1551
- return (c = a == null ? void 0 : a.match(/[\p{L}\p{N}]/u)) == null ? void 0 : c[0];
1332
+ function bt(e) {
1333
+ const t = e.trim().replace(/\s+via\s+\S.*$/, "").split(/\s+/).filter(Boolean), l = (a) => {
1334
+ var i;
1335
+ return (i = a == null ? void 0 : a.match(/[\p{L}\p{N}]/u)) == null ? void 0 : i[0];
1552
1336
  };
1553
1337
  return (t.length > 1 ? [l(t[0]), l(t[t.length - 1])] : [l(t[0])]).filter(Boolean).join("").toUpperCase();
1554
1338
  }
1555
- function ut(n) {
1339
+ function _t(e) {
1556
1340
  let t = 0;
1557
- for (const l of n.trim().toLowerCase())
1341
+ for (const l of e.trim().toLowerCase())
1558
1342
  t = t * 31 + (l.codePointAt(0) ?? 0) >>> 0;
1559
1343
  return t % 6 + 1;
1560
1344
  }
1561
- function Ye({ name: n, pictureUrl: t, presence: l, connection: s, deleted: a = !1, placeholder: c = !1, size: f = 32, tintSeed: u, unnamedLabel: m }) {
1562
- const _ = a || c, i = dt(n) || "?", v = n.trim() === "" ? (m == null ? void 0 : m.trim()) || "?" : n, h = s !== void 0 ? `is-${s.state === "offline" ? "disconnected" : s.state}` : l === void 0 ? null : `is-${l === "busy" ? "away" : l}`, w = s !== void 0 ? `${v}, ${s.label}` : l ? `${v}, ${l}` : v;
1563
- return /* @__PURE__ */ o(
1345
+ function Ye({ name: e, pictureUrl: t, presence: l, connection: s, deleted: a = !1, placeholder: i = !1, size: h = 32, tintSeed: d, unnamedLabel: u }) {
1346
+ const b = a || i, c = bt(e) || "?", v = e.trim() === "" ? (u == null ? void 0 : u.trim()) || "?" : e, m = s !== void 0 ? `is-${s.state === "offline" ? "disconnected" : s.state}` : l === void 0 ? null : `is-${l === "busy" ? "away" : l}`, N = s !== void 0 ? `${v}, ${s.label}` : l ? `${v}, ${l}` : v;
1347
+ return /* @__PURE__ */ f(
1564
1348
  "span",
1565
1349
  {
1566
- className: H("cms-avatar", _ ? "cms-avatar--deleted" : `cms-avatar--tint-${ut(u ?? n)}`),
1567
- style: { width: f, height: f, fontSize: Math.round(f * 0.4) },
1350
+ className: F("cms-avatar", b ? "cms-avatar--deleted" : `cms-avatar--tint-${_t(d ?? e)}`),
1351
+ style: { width: h, height: h, fontSize: Math.round(h * 0.4) },
1568
1352
  role: "img",
1569
- "aria-label": w,
1353
+ "aria-label": N,
1570
1354
  ...s === void 0 ? {} : { title: s.label },
1571
1355
  children: [
1572
- _ ? /* @__PURE__ */ e(B, { name: "user", size: Math.round(f * 0.6) }) : t ? /* @__PURE__ */ e("img", { src: t, alt: "", className: "cms-avatar__picture" }) : /* @__PURE__ */ e("span", { "aria-hidden": "true", children: i }),
1573
- h === null ? null : /* @__PURE__ */ e("span", { className: H("cms-avatar__presence", h), "aria-hidden": "true" })
1356
+ b ? /* @__PURE__ */ n($, { name: "user", size: Math.round(h * 0.6) }) : t ? /* @__PURE__ */ n("img", { src: t, alt: "", className: "cms-avatar__picture" }) : /* @__PURE__ */ n("span", { "aria-hidden": "true", children: c }),
1357
+ m === null ? null : /* @__PURE__ */ n("span", { className: F("cms-avatar__presence", m), "aria-hidden": "true" })
1574
1358
  ]
1575
1359
  }
1576
1360
  );
1577
1361
  }
1578
- const mt = 64, cn = "cms-splitter:";
1579
- function en(n) {
1362
+ const vt = 64, un = "cms-splitter:";
1363
+ function tn(e) {
1580
1364
  try {
1581
- const t = window.localStorage.getItem(cn + n);
1365
+ const t = window.localStorage.getItem(un + e);
1582
1366
  if (t === null) return null;
1583
1367
  const l = Number(t);
1584
1368
  return Number.isFinite(l) ? l : null;
@@ -1586,315 +1370,315 @@ function en(n) {
1586
1370
  return null;
1587
1371
  }
1588
1372
  }
1589
- function ht(n, t) {
1590
- if (n !== void 0)
1373
+ function gt(e, t) {
1374
+ if (e !== void 0)
1591
1375
  try {
1592
- window.localStorage.setItem(cn + n, String(t));
1376
+ window.localStorage.setItem(un + e, String(t));
1593
1377
  } catch {
1594
1378
  }
1595
1379
  }
1596
- function ft(n) {
1597
- if (n !== void 0)
1380
+ function wt(e) {
1381
+ if (e !== void 0)
1598
1382
  try {
1599
- window.localStorage.removeItem(cn + n);
1383
+ window.localStorage.removeItem(un + e);
1600
1384
  } catch {
1601
1385
  }
1602
1386
  }
1603
- function pt({ storageKey: n, value: t, default: l, min: s, max: a, step: c = 16, label: f, onChange: u, className: m, style: _ }) {
1604
- const i = Math.max(s, a), v = (b) => Math.round(Math.min(Math.max(b, s), i)), [h, w] = D(() => {
1605
- const b = n === void 0 ? null : en(n);
1606
- return v(b ?? l);
1607
- }), r = v(t ?? h), g = P(null), [T, x] = D(!1);
1387
+ function yt({ storageKey: e, value: t, default: l, min: s, max: a, step: i = 16, label: h, onChange: d, className: u, style: b }) {
1388
+ const c = Math.max(s, a), v = (_) => Math.round(Math.min(Math.max(_, s), c)), [m, N] = D(() => {
1389
+ const _ = e === void 0 ? null : tn(e);
1390
+ return v(_ ?? l);
1391
+ }), r = v(t ?? m), g = O(null), [T, C] = D(!1);
1608
1392
  $e(() => {
1609
- if (n === void 0) return;
1610
- const b = en(n);
1611
- if (b === null) return;
1612
- const N = v(b);
1613
- (t === void 0 || N !== v(t)) && (w(N), u(N, !0));
1393
+ if (e === void 0) return;
1394
+ const _ = tn(e);
1395
+ if (_ === null) return;
1396
+ const y = v(_);
1397
+ (t === void 0 || y !== v(t)) && (N(y), d(y, !0));
1614
1398
  }, []), $e(() => {
1615
- t !== void 0 && v(t) !== t && u(v(t), !0);
1616
- }, [t, s, i]);
1617
- const M = (b, N) => {
1618
- const I = v(b);
1619
- w(I), N && ht(n, I), u(I, N);
1620
- }, E = () => {
1621
- const b = g.current;
1622
- g.current = null, x(!1), b !== null && b.last !== b.from && M(b.last, !0);
1399
+ t !== void 0 && v(t) !== t && d(v(t), !0);
1400
+ }, [t, s, c]);
1401
+ const S = (_, y) => {
1402
+ const I = v(_);
1403
+ N(I), y && gt(e, I), d(I, y);
1404
+ }, x = () => {
1405
+ const _ = g.current;
1406
+ g.current = null, C(!1), _ !== null && _.last !== _.from && S(_.last, !0);
1623
1407
  };
1624
- return /* @__PURE__ */ e(
1408
+ return /* @__PURE__ */ n(
1625
1409
  "div",
1626
1410
  {
1627
1411
  role: "separator",
1628
1412
  tabIndex: 0,
1629
1413
  "aria-orientation": "vertical",
1630
- "aria-label": f,
1414
+ "aria-label": h,
1631
1415
  "aria-valuenow": r,
1632
1416
  "aria-valuemin": s,
1633
- "aria-valuemax": i,
1634
- className: H("cms-splitter", T && "is-dragging", r <= s && "is-at-min", r >= i && "is-at-max", m),
1635
- style: _,
1636
- onPointerDown: (b) => {
1637
- var I, K;
1638
- if (b.button > 0) return;
1639
- b.preventDefault(), (K = (I = b.currentTarget).setPointerCapture) == null || K.call(I, b.pointerId);
1640
- const N = getComputedStyle(b.currentTarget).direction === "rtl" ? -1 : 1;
1641
- g.current = { x: b.clientX, from: r, last: r, sign: N }, x(!0);
1417
+ "aria-valuemax": c,
1418
+ className: F("cms-splitter", T && "is-dragging", r <= s && "is-at-min", r >= c && "is-at-max", u),
1419
+ style: b,
1420
+ onPointerDown: (_) => {
1421
+ var I, U;
1422
+ if (_.button > 0) return;
1423
+ _.preventDefault(), (U = (I = _.currentTarget).setPointerCapture) == null || U.call(I, _.pointerId);
1424
+ const y = getComputedStyle(_.currentTarget).direction === "rtl" ? -1 : 1;
1425
+ g.current = { x: _.clientX, from: r, last: r, sign: y }, C(!0);
1642
1426
  },
1643
- onPointerMove: (b) => {
1644
- const N = g.current;
1645
- N === null || !Number.isFinite(b.clientX) || (N.last = v(N.from + N.sign * (b.clientX - N.x)), M(N.last, !1));
1427
+ onPointerMove: (_) => {
1428
+ const y = g.current;
1429
+ y === null || !Number.isFinite(_.clientX) || (y.last = v(y.from + y.sign * (_.clientX - y.x)), S(y.last, !1));
1646
1430
  },
1647
- onPointerUp: E,
1648
- onPointerCancel: E,
1431
+ onPointerUp: x,
1432
+ onPointerCancel: x,
1649
1433
  onDoubleClick: () => {
1650
- ft(n);
1651
- const b = v(l);
1652
- w(b), u(b, !0);
1434
+ wt(e);
1435
+ const _ = v(l);
1436
+ N(_), d(_, !0);
1653
1437
  },
1654
- onKeyDown: (b) => {
1655
- const N = b.shiftKey ? mt : c, I = getComputedStyle(b.currentTarget).direction === "rtl" ? -1 : 1, K = b.key === "ArrowLeft" ? r - I * N : b.key === "ArrowRight" ? r + I * N : b.key === "Home" ? s : b.key === "End" ? i : null;
1656
- K !== null && (b.preventDefault(), M(K, !0));
1438
+ onKeyDown: (_) => {
1439
+ const y = _.shiftKey ? vt : i, I = getComputedStyle(_.currentTarget).direction === "rtl" ? -1 : 1, U = _.key === "ArrowLeft" ? r - I * y : _.key === "ArrowRight" ? r + I * y : _.key === "Home" ? s : _.key === "End" ? c : null;
1440
+ U !== null && (_.preventDefault(), S(U, !0));
1657
1441
  }
1658
1442
  }
1659
1443
  );
1660
1444
  }
1661
- function _t({ count: n, label: t, max: l = 99 }) {
1662
- return n <= 0 ? null : /* @__PURE__ */ o("span", { className: "cms-badge", children: [
1663
- /* @__PURE__ */ e("span", { "aria-hidden": "true", children: n > l ? `${l}+` : n }),
1664
- /* @__PURE__ */ e("span", { className: "cms-visually-hidden", children: t })
1445
+ function Nt({ count: e, label: t, max: l = 99 }) {
1446
+ return e <= 0 ? null : /* @__PURE__ */ f("span", { className: "cms-badge", children: [
1447
+ /* @__PURE__ */ n("span", { "aria-hidden": "true", children: e > l ? `${l}+` : e }),
1448
+ /* @__PURE__ */ n("span", { className: "cms-visually-hidden", children: t })
1665
1449
  ] });
1666
1450
  }
1667
- function tl({ product: n, mark: t, rail: l, active: s, onNavigate: a, server: c, search: f, account: u, children: m, railLabel: _ = "Sections" }) {
1668
- return /* @__PURE__ */ o("div", { className: "cms-shell", children: [
1669
- /* @__PURE__ */ o("nav", { className: "cms-shell__rail", "aria-label": _, children: [
1670
- /* @__PURE__ */ e("span", { className: "cms-shell__mark", "aria-hidden": "true", children: t }),
1671
- /* @__PURE__ */ e("ul", { className: "cms-shell__items", children: l.map((i) => {
1672
- const v = i.id === s;
1673
- return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ o(
1451
+ function cl({ product: e, mark: t, rail: l, active: s, onNavigate: a, server: i, search: h, account: d, children: u, railLabel: b = "Sections" }) {
1452
+ return /* @__PURE__ */ f("div", { className: "cms-shell", children: [
1453
+ /* @__PURE__ */ f("nav", { className: "cms-shell__rail", "aria-label": b, children: [
1454
+ /* @__PURE__ */ n("span", { className: "cms-shell__mark", "aria-hidden": "true", children: t }),
1455
+ /* @__PURE__ */ n("ul", { className: "cms-shell__items", children: l.map((c) => {
1456
+ const v = c.id === s;
1457
+ return /* @__PURE__ */ n("li", { children: /* @__PURE__ */ f(
1674
1458
  "a",
1675
1459
  {
1676
- href: i.href,
1677
- className: H("cms-shell__item", v && "is-active"),
1460
+ href: c.href,
1461
+ className: F("cms-shell__item", v && "is-active"),
1678
1462
  "aria-current": v ? "page" : void 0,
1679
- title: i.label,
1680
- onClick: (h) => {
1681
- a && (h.preventDefault(), a(i.id));
1463
+ title: c.label,
1464
+ onClick: (m) => {
1465
+ a && (m.preventDefault(), a(c.id));
1682
1466
  },
1683
1467
  children: [
1684
- /* @__PURE__ */ o("span", { className: "cms-shell__icon", children: [
1685
- /* @__PURE__ */ e(B, { name: i.icon, size: 22 }),
1686
- i.badge ? /* @__PURE__ */ e(_t, { count: i.badge.count, label: i.badge.label }) : null
1468
+ /* @__PURE__ */ f("span", { className: "cms-shell__icon", children: [
1469
+ /* @__PURE__ */ n($, { name: c.icon, size: 22 }),
1470
+ c.badge ? /* @__PURE__ */ n(Nt, { count: c.badge.count, label: c.badge.label }) : null
1687
1471
  ] }),
1688
- /* @__PURE__ */ e("span", { className: "cms-shell__label", children: i.label })
1472
+ /* @__PURE__ */ n("span", { className: "cms-shell__label", children: c.label })
1689
1473
  ]
1690
1474
  }
1691
- ) }, i.id);
1475
+ ) }, c.id);
1692
1476
  }) })
1693
1477
  ] }),
1694
- /* @__PURE__ */ o("header", { className: "cms-shell__top", children: [
1695
- /* @__PURE__ */ e("span", { className: "cms-shell__product", children: n }),
1696
- c != null ? /* @__PURE__ */ e("div", { className: "cms-shell__server", children: c }) : null,
1697
- f != null ? /* @__PURE__ */ e("div", { className: "cms-shell__search", children: f }) : null,
1698
- u != null ? /* @__PURE__ */ e("div", { className: "cms-shell__account", children: u }) : null
1478
+ /* @__PURE__ */ f("header", { className: "cms-shell__top", children: [
1479
+ /* @__PURE__ */ n("span", { className: "cms-shell__product", children: e }),
1480
+ i != null ? /* @__PURE__ */ n("div", { className: "cms-shell__server", children: i }) : null,
1481
+ h != null ? /* @__PURE__ */ n("div", { className: "cms-shell__search", children: h }) : null,
1482
+ d != null ? /* @__PURE__ */ n("div", { className: "cms-shell__account", children: d }) : null
1699
1483
  ] }),
1700
- /* @__PURE__ */ e("main", { className: "cms-shell__main", children: m })
1484
+ /* @__PURE__ */ n("main", { className: "cms-shell__main", children: u })
1701
1485
  ] });
1702
1486
  }
1703
- function ll({ label: n, placeholder: t, value: l, onChange: s, onSearch: a }) {
1704
- return /* @__PURE__ */ o(
1487
+ function ol({ label: e, placeholder: t, value: l, onChange: s, onSearch: a }) {
1488
+ return /* @__PURE__ */ f(
1705
1489
  "form",
1706
1490
  {
1707
1491
  role: "search",
1708
1492
  className: "cms-search",
1709
- onSubmit: (c) => {
1710
- c.preventDefault(), a == null || a(l);
1493
+ onSubmit: (i) => {
1494
+ i.preventDefault(), a == null || a(l);
1711
1495
  },
1712
1496
  children: [
1713
- /* @__PURE__ */ e(B, { name: "search", size: 18 }),
1714
- /* @__PURE__ */ e(
1497
+ /* @__PURE__ */ n($, { name: "search", size: 18 }),
1498
+ /* @__PURE__ */ n(
1715
1499
  "input",
1716
1500
  {
1717
1501
  className: "cms-search__input",
1718
1502
  type: "search",
1719
- "aria-label": n,
1503
+ "aria-label": e,
1720
1504
  placeholder: t,
1721
1505
  value: l,
1722
- onChange: (c) => s(c.target.value)
1506
+ onChange: (i) => s(i.target.value)
1723
1507
  }
1724
1508
  )
1725
1509
  ]
1726
1510
  }
1727
1511
  );
1728
1512
  }
1729
- function bt(n, t, l) {
1730
- const s = n.map((c) => Math.min(Math.max(c.width, c.min), c.max));
1731
- let a = s.reduce((c, f) => c + f, 0) + l - t;
1732
- for (let c = s.length - 1; c >= 0 && a > 0; c -= 1) {
1733
- const f = Math.min(a, s[c] - n[c].min);
1734
- s[c] = s[c] - f, a -= f;
1513
+ function kt(e, t, l) {
1514
+ const s = e.map((i) => Math.min(Math.max(i.width, i.min), i.max));
1515
+ let a = s.reduce((i, h) => i + h, 0) + l - t;
1516
+ for (let i = s.length - 1; i >= 0 && a > 0; i -= 1) {
1517
+ const h = Math.min(a, s[i] - e[i].min);
1518
+ s[i] = s[i] - h, a -= h;
1735
1519
  }
1736
1520
  return s;
1737
1521
  }
1738
- function sl({ panes: n, active: t, back: l, sizes: s, lastMin: a = 360, onResize: c, storageKey: f }) {
1739
- const u = Math.min(Math.max(t ?? n.length - 1, 0), n.length - 1), m = P(null), [_, i] = D(0), v = (s ?? []).slice(0, n.length - 1), [h, w] = D(() => f === void 0 ? [] : v.map((b, N) => en(`${f}:${String(N)}`) ?? void 0)), [r, g] = D(!1), T = v.map((b, N) => b !== void 0 && h[N] !== void 0 ? { ...b, width: h[N] } : b), x = T.length === n.length - 1 && T.every((b) => b !== void 0);
1522
+ function dl({ panes: e, active: t, back: l, sizes: s, lastMin: a = 360, onResize: i, storageKey: h }) {
1523
+ const d = Math.min(Math.max(t ?? e.length - 1, 0), e.length - 1), u = O(null), [b, c] = D(0), v = (s ?? []).slice(0, e.length - 1), [m, N] = D(() => h === void 0 ? [] : v.map((_, y) => tn(`${h}:${String(y)}`) ?? void 0)), [r, g] = D(!1), T = v.map((_, y) => _ !== void 0 && m[y] !== void 0 ? { ..._, width: m[y] } : _), C = T.length === e.length - 1 && T.every((_) => _ !== void 0);
1740
1524
  $e(() => {
1741
- const b = m.current;
1742
- if (b === null || !x) return;
1743
- const N = () => i(b.clientWidth);
1744
- if (N(), typeof ResizeObserver > "u") return;
1745
- const I = new ResizeObserver(N);
1746
- return I.observe(b), () => I.disconnect();
1747
- }, [x]);
1748
- const M = x ? bt(T, _ > 0 ? _ : Number.POSITIVE_INFINITY, a) : [], E = x ? Object.fromEntries(M.flatMap((b, N) => [
1749
- [`--split-pane-${String(N)}`, `${String(b)}px`],
1750
- [`--split-pane-end-${String(N)}`, `${String(M.slice(0, N + 1).reduce((I, K) => I + K, 0))}px`]
1525
+ const _ = u.current;
1526
+ if (_ === null || !C) return;
1527
+ const y = () => c(_.clientWidth);
1528
+ if (y(), typeof ResizeObserver > "u") return;
1529
+ const I = new ResizeObserver(y);
1530
+ return I.observe(_), () => I.disconnect();
1531
+ }, [C]);
1532
+ const S = C ? kt(T, b > 0 ? b : Number.POSITIVE_INFINITY, a) : [], x = C ? Object.fromEntries(S.flatMap((_, y) => [
1533
+ [`--split-pane-${String(y)}`, `${String(_)}px`],
1534
+ [`--split-pane-end-${String(y)}`, `${String(S.slice(0, y + 1).reduce((I, U) => I + U, 0))}px`]
1751
1535
  ])) : void 0;
1752
- return /* @__PURE__ */ o(
1536
+ return /* @__PURE__ */ f(
1753
1537
  "div",
1754
1538
  {
1755
- ref: m,
1756
- className: H("cms-panes", n.length === 3 ? "cms-panes--three" : "cms-panes--two", x && "cms-panes--sized", r && "is-resizing"),
1757
- "data-active": u,
1758
- style: E,
1539
+ ref: u,
1540
+ className: F("cms-panes", e.length === 3 ? "cms-panes--three" : "cms-panes--two", C && "cms-panes--sized", r && "is-resizing"),
1541
+ "data-active": d,
1542
+ style: x,
1759
1543
  children: [
1760
- n.map((b, N) => /* @__PURE__ */ o("section", { className: "cms-panes__pane", "aria-label": b.label, "data-offset": u - N, children: [
1761
- N === u && l ? /* @__PURE__ */ o("a", { className: "cms-panes__back", href: l.href, children: [
1762
- /* @__PURE__ */ e(B, { name: "chevron-left", size: 18 }),
1544
+ e.map((_, y) => /* @__PURE__ */ f("section", { className: "cms-panes__pane", "aria-label": _.label, "data-offset": d - y, children: [
1545
+ y === d && l ? /* @__PURE__ */ f("a", { className: "cms-panes__back", href: l.href, children: [
1546
+ /* @__PURE__ */ n($, { name: "chevron-left", size: 18 }),
1763
1547
  l.label
1764
1548
  ] }) : null,
1765
- b.content
1766
- ] }, b.label)),
1767
- x ? T.map((b, N) => {
1768
- const I = M.reduce((z, k, F) => F === N ? z : z + k, 0), K = Math.max(b.min, Math.min(b.max, _ > 0 ? _ - I - a : b.max));
1769
- return /* @__PURE__ */ e(
1770
- pt,
1549
+ _.content
1550
+ ] }, _.label)),
1551
+ C ? T.map((_, y) => {
1552
+ const I = S.reduce((P, k, B) => B === y ? P : P + k, 0), U = Math.max(_.min, Math.min(_.max, b > 0 ? b - I - a : _.max));
1553
+ return /* @__PURE__ */ n(
1554
+ yt,
1771
1555
  {
1772
- ...f === void 0 ? {} : { storageKey: `${f}:${String(N)}` },
1773
- value: M[N],
1774
- default: b.reset,
1775
- min: b.min,
1776
- max: K,
1777
- label: b.label,
1556
+ ...h === void 0 ? {} : { storageKey: `${h}:${String(y)}` },
1557
+ value: S[y],
1558
+ default: _.reset,
1559
+ min: _.min,
1560
+ max: U,
1561
+ label: _.label,
1778
1562
  className: "cms-panes__splitter",
1779
- style: { "--split-at": `var(--split-pane-end-${String(N)})` },
1780
- onChange: (z, k) => {
1781
- f !== void 0 && w((F) => {
1782
- const U = [...F];
1783
- return U[N] = z, U;
1784
- }), g(!k), c == null || c(N, z, k);
1563
+ style: { "--split-at": `var(--split-pane-end-${String(y)})` },
1564
+ onChange: (P, k) => {
1565
+ h !== void 0 && N((B) => {
1566
+ const z = [...B];
1567
+ return z[y] = P, z;
1568
+ }), g(!k), i == null || i(y, P, k);
1785
1569
  }
1786
1570
  },
1787
- b.label
1571
+ _.label
1788
1572
  );
1789
1573
  }) : null
1790
1574
  ]
1791
1575
  }
1792
1576
  );
1793
1577
  }
1794
- const vt = { attachment: "Has an attachment", unread: "Unread" };
1795
- function al({ from: n, fromPlaceholder: t = !1, subject: l, preview: s, time: a, unread: c, hasAttachment: f, selected: u, onOpen: m, check: _, selecting: i, labels: v }) {
1796
- const h = qe(vt, v), w = /* @__PURE__ */ e(Ye, { name: n, size: 40, placeholder: t });
1797
- return /* @__PURE__ */ o("div", { className: H("cms-mail-row", c && "is-unread", u && "is-selected", i && "is-selecting", (_ == null ? void 0 : _.checked) && "is-checked"), children: [
1798
- _ !== void 0 ? /* @__PURE__ */ o("span", { className: "cms-mail-row__lead", children: [
1799
- w,
1800
- /* @__PURE__ */ e(
1578
+ const xt = { attachment: "Has an attachment", unread: "Unread" };
1579
+ function ul({ from: e, fromPlaceholder: t = !1, subject: l, preview: s, time: a, unread: i, hasAttachment: h, selected: d, onOpen: u, check: b, selecting: c, labels: v }) {
1580
+ const m = qe(xt, v), N = /* @__PURE__ */ n(Ye, { name: e, size: 40, placeholder: t });
1581
+ return /* @__PURE__ */ f("div", { className: F("cms-mail-row", i && "is-unread", d && "is-selected", c && "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,
1584
+ /* @__PURE__ */ n(
1801
1585
  "input",
1802
1586
  {
1803
1587
  type: "checkbox",
1804
1588
  className: "cms-mail-row__check",
1805
- checked: _.checked,
1806
- disabled: _.disabled,
1807
- "aria-disabled": _.pending ? "true" : void 0,
1808
- "aria-busy": _.pending ? "true" : void 0,
1809
- "aria-label": _.label,
1589
+ checked: b.checked,
1590
+ disabled: b.disabled,
1591
+ "aria-disabled": b.pending ? "true" : void 0,
1592
+ "aria-busy": b.pending ? "true" : void 0,
1593
+ "aria-label": b.label,
1810
1594
  onChange: () => {
1811
1595
  },
1812
1596
  onClick: (r) => {
1813
- if (r.stopPropagation(), _.pending) {
1597
+ if (r.stopPropagation(), b.pending) {
1814
1598
  r.preventDefault();
1815
1599
  return;
1816
1600
  }
1817
- _.onCheck({ shift: r.shiftKey, toggle: r.ctrlKey || r.metaKey });
1601
+ b.onCheck({ shift: r.shiftKey, toggle: r.ctrlKey || r.metaKey });
1818
1602
  }
1819
1603
  }
1820
1604
  )
1821
1605
  ] }) : null,
1822
- /* @__PURE__ */ o(
1606
+ /* @__PURE__ */ f(
1823
1607
  "button",
1824
1608
  {
1825
1609
  type: "button",
1826
1610
  className: "cms-mail-row__open",
1827
- "aria-current": u ? "true" : void 0,
1828
- onClick: m,
1611
+ "aria-current": d ? "true" : void 0,
1612
+ onClick: u,
1829
1613
  children: [
1830
- _ === void 0 ? w : null,
1831
- /* @__PURE__ */ o("span", { className: "cms-mail-row__body", children: [
1832
- /* @__PURE__ */ o("span", { className: "cms-mail-row__line", children: [
1833
- /* @__PURE__ */ e("span", { className: "cms-mail-row__from", children: n }),
1834
- f ? /* @__PURE__ */ e(B, { name: "paperclip", size: 16, label: h.attachment }) : null,
1835
- /* @__PURE__ */ e("span", { className: "cms-mail-row__time", children: a })
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: [
1617
+ /* @__PURE__ */ n("span", { className: "cms-mail-row__from", children: e }),
1618
+ h ? /* @__PURE__ */ n($, { name: "paperclip", size: 16, label: m.attachment }) : null,
1619
+ /* @__PURE__ */ n("span", { className: "cms-mail-row__time", children: a })
1836
1620
  ] }),
1837
- /* @__PURE__ */ o("span", { className: "cms-mail-row__line", children: [
1838
- /* @__PURE__ */ e("span", { className: "cms-mail-row__subject", children: l }),
1839
- c ? /* @__PURE__ */ e("span", { className: "cms-mail-row__dot", role: "img", "aria-label": h.unread }) : null
1621
+ /* @__PURE__ */ f("span", { className: "cms-mail-row__line", children: [
1622
+ /* @__PURE__ */ n("span", { className: "cms-mail-row__subject", children: l }),
1623
+ i ? /* @__PURE__ */ n("span", { className: "cms-mail-row__dot", role: "img", "aria-label": m.unread }) : null
1840
1624
  ] }),
1841
- /* @__PURE__ */ e("span", { className: "cms-mail-row__preview", children: s })
1625
+ /* @__PURE__ */ n("span", { className: "cms-mail-row__preview", children: s })
1842
1626
  ] })
1843
1627
  ]
1844
1628
  }
1845
1629
  )
1846
1630
  ] });
1847
1631
  }
1848
- function rl({ direction: n, children: t, time: l, read: s, readLabel: a = "Read" }) {
1849
- return /* @__PURE__ */ o("div", { className: H("cms-bubble", `cms-bubble--${n}`), children: [
1850
- /* @__PURE__ */ e("div", { className: "cms-bubble__text", children: t }),
1851
- /* @__PURE__ */ o("div", { className: "cms-bubble__meta", children: [
1632
+ 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: [
1634
+ /* @__PURE__ */ n("div", { className: "cms-bubble__text", children: t }),
1635
+ /* @__PURE__ */ f("div", { className: "cms-bubble__meta", children: [
1852
1636
  l,
1853
- n === "out" && s ? /* @__PURE__ */ o($, { children: [
1637
+ e === "out" && s ? /* @__PURE__ */ f(ge, { children: [
1854
1638
  " · ",
1855
1639
  a
1856
1640
  ] }) : null
1857
1641
  ] })
1858
1642
  ] });
1859
1643
  }
1860
- function il({ label: n, value: t, onChange: l, onSend: s, onAttach: a, placeholder: c, variant: f = "chat", sendLabel: u = "Send", attachLabel: m = "Attach a file", leading: _, canSend: i }) {
1861
- const v = fe(), h = i ?? t.trim() !== "", w = (g) => {
1862
- g.preventDefault(), h && s();
1863
- }, r = a ? /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button cms-composer__attach", "aria-label": m, onClick: a, children: /* @__PURE__ */ e(B, { name: "paperclip" }) }) : null;
1864
- return /* @__PURE__ */ o("form", { className: H("cms-composer", `cms-composer--${f}`), onSubmit: w, children: [
1865
- /* @__PURE__ */ e("label", { htmlFor: v, className: f === "reply" ? "cms-composer__title" : "cms-visually-hidden", children: n }),
1866
- f === "chat" ? r : null,
1867
- /* @__PURE__ */ e(
1644
+ function hl({ label: e, value: t, onChange: l, onSend: s, onAttach: a, placeholder: i, variant: h = "chat", sendLabel: d = "Send", attachLabel: u = "Attach a file", leading: b, canSend: c }) {
1645
+ const v = he(), m = c ?? t.trim() !== "", N = (g) => {
1646
+ g.preventDefault(), m && s();
1647
+ }, r = a ? /* @__PURE__ */ n("button", { type: "button", className: "cms-icon-button cms-composer__attach", "aria-label": u, onClick: a, children: /* @__PURE__ */ n($, { name: "paperclip" }) }) : null;
1648
+ return /* @__PURE__ */ f("form", { className: F("cms-composer", `cms-composer--${h}`), onSubmit: N, children: [
1649
+ /* @__PURE__ */ n("label", { htmlFor: v, className: h === "reply" ? "cms-composer__title" : "cms-visually-hidden", children: e }),
1650
+ h === "chat" ? r : null,
1651
+ /* @__PURE__ */ n(
1868
1652
  "textarea",
1869
1653
  {
1870
1654
  id: v,
1871
1655
  className: "cms-composer__input",
1872
- rows: f === "reply" ? 3 : 1,
1873
- placeholder: c,
1656
+ rows: h === "reply" ? 3 : 1,
1657
+ placeholder: i,
1874
1658
  value: t,
1875
1659
  onChange: (g) => l(g.target.value),
1876
1660
  onKeyDown: (g) => {
1877
- g.nativeEvent.isComposing || g.keyCode === 229 || f === "chat" && g.key === "Enter" && !g.shiftKey && (g.preventDefault(), h && s());
1661
+ g.nativeEvent.isComposing || g.keyCode === 229 || h === "chat" && g.key === "Enter" && !g.shiftKey && (g.preventDefault(), m && s());
1878
1662
  }
1879
1663
  }
1880
1664
  ),
1881
- f === "reply" && _ !== void 0 ? /* @__PURE__ */ e("div", { className: "cms-composer__leading", children: _ }) : null,
1882
- f === "reply" ? r : null,
1883
- f === "chat" ? /* @__PURE__ */ e("button", { type: "submit", className: "cms-composer__send-round", "aria-label": u, disabled: !h, children: /* @__PURE__ */ e(B, { name: "send" }) }) : /* @__PURE__ */ o("button", { type: "submit", className: "cms-button cms-button--chrome cms-composer__send", disabled: !h, children: [
1884
- u,
1665
+ h === "reply" && b !== void 0 ? /* @__PURE__ */ n("div", { className: "cms-composer__leading", children: b }) : null,
1666
+ h === "reply" ? r : null,
1667
+ h === "chat" ? /* @__PURE__ */ n("button", { type: "submit", className: "cms-composer__send-round", "aria-label": d, disabled: !m, children: /* @__PURE__ */ n($, { name: "send" }) }) : /* @__PURE__ */ f("button", { type: "submit", className: "cms-button cms-button--chrome cms-composer__send", disabled: !m, children: [
1668
+ d,
1885
1669
  " ",
1886
- /* @__PURE__ */ e(B, { name: "send", size: 18 })
1670
+ /* @__PURE__ */ n($, { name: "send", size: 18 })
1887
1671
  ] })
1888
1672
  ] });
1889
1673
  }
1890
- const on = {
1674
+ const mn = {
1891
1675
  incomingAudio: "Incoming audio call",
1892
1676
  incomingVideo: "Incoming video call",
1893
- incomingFrom: (n, t) => `${n} from ${t}`,
1677
+ incomingFrom: (e, t) => `${e} from ${t}`,
1894
1678
  accept: "Accept",
1895
1679
  decline: "Decline",
1896
- callWith: (n) => `Call with ${n}`,
1897
- callTime: (n) => `Call time ${n}`,
1680
+ callWith: (e) => `Call with ${e}`,
1681
+ callTime: (e) => `Call time ${e}`,
1898
1682
  goodConnection: "Good connection",
1899
1683
  poorConnection: "Poor connection",
1900
1684
  you: "You",
@@ -1905,94 +1689,94 @@ const on = {
1905
1689
  addPerson: "Add person",
1906
1690
  chat: "Chat",
1907
1691
  hangUp: "Hang up",
1908
- onCallWith: (n) => `On a call with ${n}`,
1692
+ onCallWith: (e) => `On a call with ${e}`,
1909
1693
  returnToCall: "Return to call"
1910
1694
  };
1911
- function cl({ name: n, namePlaceholder: t = !1, media: l, onAccept: s, onDecline: a, labels: c }) {
1912
- const f = qe(on, c), u = l === "video" ? f.incomingVideo : f.incomingAudio;
1913
- return /* @__PURE__ */ o("div", { className: "cms-call-incoming", role: "alertdialog", "aria-label": f.incomingFrom(u, n), children: [
1914
- /* @__PURE__ */ e("span", { className: "cms-call-incoming__ring", "aria-hidden": "true", children: /* @__PURE__ */ e(Ye, { name: n, size: 112, placeholder: t }) }),
1915
- /* @__PURE__ */ e("p", { className: "cms-call-incoming__name", children: n }),
1916
- /* @__PURE__ */ e("p", { className: "cms-call-incoming__what", children: u }),
1917
- /* @__PURE__ */ o("div", { className: "cms-call-incoming__actions", children: [
1918
- /* @__PURE__ */ e(Ue, { icon: "phone-off", label: f.decline, tone: "hang-up", onClick: a }),
1919
- /* @__PURE__ */ e(Ue, { icon: "phone", label: f.accept, tone: "accept", onClick: s })
1695
+ function fl({ name: e, namePlaceholder: t = !1, media: l, onAccept: s, onDecline: a, labels: i }) {
1696
+ const h = qe(mn, i), d = l === "video" ? h.incomingVideo : h.incomingAudio;
1697
+ return /* @__PURE__ */ f("div", { className: "cms-call-incoming", role: "alertdialog", "aria-label": h.incomingFrom(d, e), children: [
1698
+ /* @__PURE__ */ n("span", { className: "cms-call-incoming__ring", "aria-hidden": "true", children: /* @__PURE__ */ n(Ye, { name: e, size: 112, placeholder: t }) }),
1699
+ /* @__PURE__ */ n("p", { className: "cms-call-incoming__name", children: e }),
1700
+ /* @__PURE__ */ n("p", { className: "cms-call-incoming__what", children: d }),
1701
+ /* @__PURE__ */ f("div", { className: "cms-call-incoming__actions", children: [
1702
+ /* @__PURE__ */ n(Ue, { icon: "phone-off", label: h.decline, tone: "hang-up", onClick: a }),
1703
+ /* @__PURE__ */ n(Ue, { icon: "phone", label: h.accept, tone: "accept", onClick: s })
1920
1704
  ] })
1921
1705
  ] });
1922
1706
  }
1923
- function Ue({ icon: n, label: t, onClick: l, tone: s = "plain", pressed: a }) {
1924
- return /* @__PURE__ */ o(
1707
+ function Ue({ icon: e, label: t, onClick: l, tone: s = "plain", pressed: a }) {
1708
+ return /* @__PURE__ */ f(
1925
1709
  "button",
1926
1710
  {
1927
1711
  type: "button",
1928
- className: H("cms-call-button", `cms-call-button--${s}`, a && "is-pressed"),
1712
+ className: F("cms-call-button", `cms-call-button--${s}`, a && "is-pressed"),
1929
1713
  "aria-pressed": a,
1930
1714
  onClick: l,
1931
1715
  children: [
1932
- /* @__PURE__ */ e("span", { className: "cms-call-button__disc", children: /* @__PURE__ */ e(B, { name: n, size: 24 }) }),
1933
- /* @__PURE__ */ e("span", { className: "cms-call-button__label", children: t })
1716
+ /* @__PURE__ */ n("span", { className: "cms-call-button__disc", children: /* @__PURE__ */ n($, { name: e, size: 24 }) }),
1717
+ /* @__PURE__ */ n("span", { className: "cms-call-button__label", children: t })
1934
1718
  ]
1935
1719
  }
1936
1720
  );
1937
1721
  }
1938
- function ol({ name: n, duration: t, connection: l, you: s, muted: a, speaker: c, onToggleMute: f, onToggleSpeaker: u, onAddPerson: m, onChat: _, onHangUp: i, labels: v }) {
1939
- const h = qe(on, v);
1940
- return /* @__PURE__ */ o("section", { className: "cms-call-panel", "aria-label": h.callWith(n), children: [
1941
- /* @__PURE__ */ o("div", { className: "cms-call-panel__head", children: [
1942
- /* @__PURE__ */ e(Ye, { name: n, size: 64 }),
1943
- /* @__PURE__ */ o("div", { className: "cms-call-panel__who", children: [
1944
- /* @__PURE__ */ e("p", { className: "cms-call-panel__name", children: n }),
1945
- /* @__PURE__ */ e("p", { className: "cms-call-panel__time", "aria-label": h.callTime(t), children: t })
1722
+ function pl({ name: e, duration: t, connection: l, you: s, muted: a, speaker: i, onToggleMute: h, onToggleSpeaker: d, onAddPerson: u, onChat: b, onHangUp: c, labels: v }) {
1723
+ const m = qe(mn, v);
1724
+ return /* @__PURE__ */ f("section", { className: "cms-call-panel", "aria-label": m.callWith(e), children: [
1725
+ /* @__PURE__ */ f("div", { className: "cms-call-panel__head", children: [
1726
+ /* @__PURE__ */ n(Ye, { name: e, size: 64 }),
1727
+ /* @__PURE__ */ f("div", { className: "cms-call-panel__who", children: [
1728
+ /* @__PURE__ */ n("p", { className: "cms-call-panel__name", children: e }),
1729
+ /* @__PURE__ */ n("p", { className: "cms-call-panel__time", "aria-label": m.callTime(t), children: t })
1946
1730
  ] }),
1947
- /* @__PURE__ */ e("span", { className: H("cms-pill", l === "good" ? "cms-pill--success" : "cms-pill--warning"), children: l === "good" ? h.goodConnection : h.poorConnection })
1731
+ /* @__PURE__ */ n("span", { className: F("cms-pill", l === "good" ? "cms-pill--success" : "cms-pill--warning"), children: l === "good" ? m.goodConnection : m.poorConnection })
1948
1732
  ] }),
1949
- /* @__PURE__ */ o("div", { className: "cms-call-panel__you", children: [
1950
- /* @__PURE__ */ e(Ye, { name: s.name, size: 36 }),
1951
- /* @__PURE__ */ e("span", { children: h.you }),
1952
- s.speaking ? /* @__PURE__ */ e("span", { className: "cms-call-panel__level", role: "img", "aria-label": h.speaking }) : null
1733
+ /* @__PURE__ */ f("div", { className: "cms-call-panel__you", children: [
1734
+ /* @__PURE__ */ n(Ye, { name: s.name, size: 36 }),
1735
+ /* @__PURE__ */ n("span", { children: m.you }),
1736
+ s.speaking ? /* @__PURE__ */ n("span", { className: "cms-call-panel__level", role: "img", "aria-label": m.speaking }) : null
1953
1737
  ] }),
1954
- /* @__PURE__ */ o("div", { className: "cms-call-panel__controls", children: [
1955
- /* @__PURE__ */ e(Ue, { icon: "mic", label: a ? h.unmute : h.mute, pressed: a, onClick: f }),
1956
- /* @__PURE__ */ e(Ue, { icon: "speaker", label: h.speaker, pressed: c, onClick: u }),
1957
- m ? /* @__PURE__ */ e(Ue, { icon: "user-plus", label: h.addPerson, onClick: m }) : null,
1958
- _ ? /* @__PURE__ */ e(Ue, { icon: "chat", label: h.chat, onClick: _ }) : null,
1959
- /* @__PURE__ */ e(Ue, { icon: "phone-off", label: h.hangUp, tone: "hang-up", onClick: i })
1738
+ /* @__PURE__ */ f("div", { className: "cms-call-panel__controls", children: [
1739
+ /* @__PURE__ */ n(Ue, { icon: "mic", label: a ? m.unmute : m.mute, pressed: a, onClick: h }),
1740
+ /* @__PURE__ */ n(Ue, { icon: "speaker", label: m.speaker, pressed: i, onClick: d }),
1741
+ u ? /* @__PURE__ */ n(Ue, { icon: "user-plus", label: m.addPerson, onClick: u }) : null,
1742
+ b ? /* @__PURE__ */ n(Ue, { icon: "chat", label: m.chat, onClick: b }) : null,
1743
+ /* @__PURE__ */ n(Ue, { icon: "phone-off", label: m.hangUp, tone: "hang-up", onClick: c })
1960
1744
  ] })
1961
1745
  ] });
1962
1746
  }
1963
- function dl({ name: n, duration: t, muted: l, onToggleMute: s, onReturn: a, onHangUp: c, labels: f }) {
1964
- const u = qe(on, f);
1965
- return /* @__PURE__ */ o("section", { className: "cms-call-bar", "aria-label": u.callWith(n), children: [
1966
- /* @__PURE__ */ e("span", { className: "cms-call-bar__live", "aria-hidden": "true" }),
1967
- /* @__PURE__ */ e("span", { className: "cms-call-bar__name", children: u.onCallWith(n) }),
1968
- /* @__PURE__ */ e("span", { className: "cms-call-bar__time", children: t }),
1969
- /* @__PURE__ */ o("span", { className: "cms-call-bar__actions", children: [
1970
- /* @__PURE__ */ e("button", { type: "button", className: "cms-call-bar__icon", "aria-label": l ? u.unmute : u.mute, "aria-pressed": l, onClick: s, children: /* @__PURE__ */ e(B, { name: "mic" }) }),
1971
- /* @__PURE__ */ e("button", { type: "button", className: "cms-button cms-button--primary", onClick: a, children: u.returnToCall }),
1972
- /* @__PURE__ */ e("button", { type: "button", className: "cms-call-bar__icon cms-call-bar__icon--hang-up", "aria-label": u.hangUp, onClick: c, children: /* @__PURE__ */ e(B, { name: "phone-off" }) })
1747
+ function bl({ name: e, duration: t, muted: l, onToggleMute: s, onReturn: a, onHangUp: i, labels: h }) {
1748
+ const d = qe(mn, h);
1749
+ return /* @__PURE__ */ f("section", { className: "cms-call-bar", "aria-label": d.callWith(e), children: [
1750
+ /* @__PURE__ */ n("span", { className: "cms-call-bar__live", "aria-hidden": "true" }),
1751
+ /* @__PURE__ */ n("span", { className: "cms-call-bar__name", children: d.onCallWith(e) }),
1752
+ /* @__PURE__ */ n("span", { className: "cms-call-bar__time", children: t }),
1753
+ /* @__PURE__ */ f("span", { className: "cms-call-bar__actions", children: [
1754
+ /* @__PURE__ */ n("button", { type: "button", className: "cms-call-bar__icon", "aria-label": l ? d.unmute : d.mute, "aria-pressed": l, onClick: s, children: /* @__PURE__ */ n($, { name: "mic" }) }),
1755
+ /* @__PURE__ */ n("button", { type: "button", className: "cms-button cms-button--primary", onClick: a, children: d.returnToCall }),
1756
+ /* @__PURE__ */ n("button", { type: "button", className: "cms-call-bar__icon cms-call-bar__icon--hang-up", "aria-label": d.hangUp, onClick: i, children: /* @__PURE__ */ n($, { name: "phone-off" }) })
1973
1757
  ] })
1974
1758
  ] });
1975
1759
  }
1976
- function ul({ mark: n, product: t, headline: l, lead: s, features: a = [], children: c }) {
1977
- return /* @__PURE__ */ o("div", { className: "cms-signin", children: [
1978
- /* @__PURE__ */ o("aside", { className: "cms-signin__brand", children: [
1979
- /* @__PURE__ */ o("p", { className: "cms-signin__logo", children: [
1980
- /* @__PURE__ */ e("span", { className: "cms-signin__mark", "aria-hidden": "true", children: n }),
1760
+ function _l({ mark: e, product: t, headline: l, lead: s, features: a = [], children: i }) {
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: [
1764
+ /* @__PURE__ */ n("span", { className: "cms-signin__mark", "aria-hidden": "true", children: e }),
1981
1765
  t
1982
1766
  ] }),
1983
- /* @__PURE__ */ o("div", { className: "cms-signin__pitch", children: [
1984
- /* @__PURE__ */ e("p", { className: "cms-signin__headline", children: l }),
1985
- /* @__PURE__ */ e("p", { className: "cms-signin__lead", children: s }),
1986
- a.length ? /* @__PURE__ */ e("ul", { className: "cms-signin__features", children: a.map((f) => /* @__PURE__ */ o("li", { children: [
1987
- /* @__PURE__ */ e(B, { name: f.icon, size: 18 }),
1988
- f.label
1989
- ] }, f.label)) }) : null
1767
+ /* @__PURE__ */ f("div", { className: "cms-signin__pitch", children: [
1768
+ /* @__PURE__ */ n("p", { className: "cms-signin__headline", children: l }),
1769
+ /* @__PURE__ */ n("p", { className: "cms-signin__lead", children: s }),
1770
+ a.length ? /* @__PURE__ */ n("ul", { className: "cms-signin__features", children: a.map((h) => /* @__PURE__ */ f("li", { children: [
1771
+ /* @__PURE__ */ n($, { name: h.icon, size: 18 }),
1772
+ h.label
1773
+ ] }, h.label)) }) : null
1990
1774
  ] })
1991
1775
  ] }),
1992
- /* @__PURE__ */ e("main", { className: "cms-signin__form", children: c })
1776
+ /* @__PURE__ */ n("main", { className: "cms-signin__form", children: i })
1993
1777
  ] });
1994
1778
  }
1995
- const gt = {
1779
+ const Mt = {
1996
1780
  title: "Sign in",
1997
1781
  identifier: "Email or username",
1998
1782
  identifierPlaceholder: "name@example.com",
@@ -2004,243 +1788,243 @@ const gt = {
2004
1788
  newHere: "New here?",
2005
1789
  create: "Create an account"
2006
1790
  };
2007
- function ml({ server: n, onSubmit: t, forgotHref: l, createHref: s, error: a, busy: c, labels: f }) {
2008
- const u = qe(gt, f), m = fe(), [_, i] = D(""), [v, h] = D(""), [w, r] = D(!1);
2009
- return /* @__PURE__ */ o("form", { className: "cms-signin-form", onSubmit: (T) => {
2010
- T.preventDefault(), t(_, v);
2011
- }, "aria-describedby": a ? `${m}-error` : void 0, children: [
2012
- /* @__PURE__ */ e("h1", { className: "cms-signin-form__title", children: u.title }),
2013
- /* @__PURE__ */ o("p", { className: "cms-signin-form__server", children: [
2014
- /* @__PURE__ */ e(B, { name: "server", size: 18 }),
2015
- n
1791
+ function vl({ server: e, onSubmit: t, forgotHref: l, createHref: s, error: a, busy: i, labels: h }) {
1792
+ const d = qe(Mt, h), u = he(), [b, c] = D(""), [v, m] = D(""), [N, r] = D(!1);
1793
+ return /* @__PURE__ */ f("form", { className: "cms-signin-form", onSubmit: (T) => {
1794
+ T.preventDefault(), t(b, v);
1795
+ }, "aria-describedby": a ? `${u}-error` : void 0, children: [
1796
+ /* @__PURE__ */ n("h1", { className: "cms-signin-form__title", children: d.title }),
1797
+ /* @__PURE__ */ f("p", { className: "cms-signin-form__server", children: [
1798
+ /* @__PURE__ */ n($, { name: "server", size: 18 }),
1799
+ e
2016
1800
  ] }),
2017
- /* @__PURE__ */ e("label", { className: "cms-signin-form__label", htmlFor: `${m}-identifier`, children: u.identifier }),
2018
- /* @__PURE__ */ e(
1801
+ /* @__PURE__ */ n("label", { className: "cms-signin-form__label", htmlFor: `${u}-identifier`, children: d.identifier }),
1802
+ /* @__PURE__ */ n(
2019
1803
  "input",
2020
1804
  {
2021
- id: `${m}-identifier`,
1805
+ id: `${u}-identifier`,
2022
1806
  className: "cms-signin-form__input",
2023
1807
  type: "text",
2024
1808
  autoComplete: "username",
2025
- placeholder: u.identifierPlaceholder,
2026
- value: _,
2027
- onChange: (T) => i(T.target.value),
1809
+ placeholder: d.identifierPlaceholder,
1810
+ value: b,
1811
+ onChange: (T) => c(T.target.value),
2028
1812
  required: !0
2029
1813
  }
2030
1814
  ),
2031
- /* @__PURE__ */ e("label", { className: "cms-signin-form__label", htmlFor: `${m}-password`, children: u.password }),
2032
- /* @__PURE__ */ o("span", { className: "cms-signin-form__password", children: [
2033
- /* @__PURE__ */ e(
1815
+ /* @__PURE__ */ n("label", { className: "cms-signin-form__label", htmlFor: `${u}-password`, children: d.password }),
1816
+ /* @__PURE__ */ f("span", { className: "cms-signin-form__password", children: [
1817
+ /* @__PURE__ */ n(
2034
1818
  "input",
2035
1819
  {
2036
- id: `${m}-password`,
1820
+ id: `${u}-password`,
2037
1821
  className: "cms-signin-form__input",
2038
- type: w ? "text" : "password",
1822
+ type: N ? "text" : "password",
2039
1823
  autoComplete: "current-password",
2040
1824
  value: v,
2041
- onChange: (T) => h(T.target.value),
1825
+ onChange: (T) => m(T.target.value),
2042
1826
  required: !0
2043
1827
  }
2044
1828
  ),
2045
- /* @__PURE__ */ e("button", { type: "button", className: "cms-signin-form__show", "aria-pressed": w, onClick: () => r((T) => !T), children: w ? u.hide : u.show })
1829
+ /* @__PURE__ */ n("button", { type: "button", className: "cms-signin-form__show", "aria-pressed": N, onClick: () => r((T) => !T), children: N ? d.hide : d.show })
2046
1830
  ] }),
2047
- l ? /* @__PURE__ */ e("a", { className: "cms-signin-form__forgot", href: l, children: u.forgot }) : null,
2048
- a ? /* @__PURE__ */ e("p", { id: `${m}-error`, className: "cms-signin-form__error", role: "alert", children: a }) : null,
2049
- /* @__PURE__ */ e("button", { type: "submit", className: "cms-button cms-button--chrome cms-signin-form__submit", disabled: c, "aria-busy": c || void 0, children: u.submit }),
2050
- s ? /* @__PURE__ */ o($, { children: [
2051
- /* @__PURE__ */ e("p", { className: "cms-signin-form__or", children: /* @__PURE__ */ e("span", { children: u.newHere }) }),
2052
- /* @__PURE__ */ e("a", { className: "cms-button cms-signin-form__create", href: s, children: u.create })
1831
+ l ? /* @__PURE__ */ n("a", { className: "cms-signin-form__forgot", href: l, children: d.forgot }) : null,
1832
+ a ? /* @__PURE__ */ n("p", { id: `${u}-error`, className: "cms-signin-form__error", role: "alert", children: a }) : null,
1833
+ /* @__PURE__ */ n("button", { type: "submit", className: "cms-button cms-button--chrome cms-signin-form__submit", disabled: i, "aria-busy": i || void 0, children: d.submit }),
1834
+ s ? /* @__PURE__ */ f(ge, { children: [
1835
+ /* @__PURE__ */ n("p", { className: "cms-signin-form__or", children: /* @__PURE__ */ n("span", { children: d.newHere }) }),
1836
+ /* @__PURE__ */ n("a", { className: "cms-button cms-signin-form__create", href: s, children: d.create })
2053
1837
  ] }) : null
2054
1838
  ] });
2055
1839
  }
2056
- const yt = { name: (n, t) => `${n}: ${t}` };
2057
- function Sn(n) {
2058
- const t = dn(n);
2059
- return t === un(n.options, n.defaultValue) ? null : t ?? null;
1840
+ const Ct = { name: (e, t) => `${e}: ${t}` };
1841
+ function An(e) {
1842
+ const t = hn(e);
1843
+ return t === fn(e.options, e.defaultValue) ? null : t ?? null;
2060
1844
  }
2061
- function dn({ options: n, value: t, defaultValue: l }) {
2062
- return n.find((s) => s.id === t) ?? un(n, l);
1845
+ function hn({ options: e, value: t, defaultValue: l }) {
1846
+ return e.find((s) => s.id === t) ?? fn(e, l);
2063
1847
  }
2064
- function En(n) {
1848
+ function Tn(e) {
2065
1849
  var t;
2066
- return qe(yt, n.labels).name(n.label, ((t = dn(n)) == null ? void 0 : t.label) ?? "");
1850
+ return qe(Ct, e.labels).name(e.label, ((t = hn(e)) == null ? void 0 : t.label) ?? "");
2067
1851
  }
2068
- function An(n, t) {
2069
- const l = dn(n);
2070
- return n.options.map((s) => ({
1852
+ function Ln(e, t) {
1853
+ const l = hn(e);
1854
+ return e.options.map((s) => ({
2071
1855
  id: s.id,
2072
1856
  label: s.label,
2073
1857
  offer: { offered: !0, locked: !1 },
2074
1858
  checked: s === l,
2075
1859
  ...t === void 0 ? {} : { group: t },
2076
1860
  onSelect: () => {
2077
- s !== l && n.onChange(s.id);
1861
+ s !== l && e.onChange(s.id);
2078
1862
  }
2079
1863
  }));
2080
1864
  }
2081
- function un(n, t) {
2082
- return n.find((l) => l.id === t) ?? n[0];
1865
+ function fn(e, t) {
1866
+ return e.find((l) => l.id === t) ?? e[0];
2083
1867
  }
2084
- function Tn(n) {
2085
- var c;
2086
- const t = P(null), l = (n == null ? void 0 : n.value) ?? null, a = n === void 0 || n.options.some((f) => f.id === n.value) ? null : ((c = un(n.options, n.defaultValue)) == null ? void 0 : c.id) ?? null;
2087
- ee(() => {
2088
- a === null ? t.current = null : t.current !== l && (t.current = l, n == null || n.onChange(a));
1868
+ function Dn(e) {
1869
+ var i;
1870
+ const t = O(null), l = (e == null ? void 0 : e.value) ?? null, a = e === void 0 || e.options.some((h) => h.id === e.value) ? null : ((i = fn(e.options, e.defaultValue)) == null ? void 0 : i.id) ?? null;
1871
+ Q(() => {
1872
+ a === null ? t.current = null : t.current !== l && (t.current = l, e == null || e.onChange(a));
2089
1873
  }, [a, l]);
2090
1874
  }
2091
- function Ln({ iconOnly: n = !1, onOpenChange: t, ...l }) {
2092
- return l.options.length < 2 ? null : /* @__PURE__ */ e(wt, { ...l, iconOnly: n, onOpenChange: t });
1875
+ function In({ iconOnly: e = !1, onOpenChange: t, ...l }) {
1876
+ return l.options.length < 2 ? null : /* @__PURE__ */ n(St, { ...l, iconOnly: e, onOpenChange: t });
2093
1877
  }
2094
- function wt({ iconOnly: n, onOpenChange: t, ...l }) {
2095
- const [s, a] = D(null), c = Ie(() => a(null), []), f = P(!1), u = s !== null;
2096
- ee(() => (t == null || t(u), () => t == null ? void 0 : t(!1)), [u, t]);
2097
- const m = Sn(l), _ = m !== null && !n, i = En(l), v = (h, w) => {
2098
- const r = h.getBoundingClientRect();
2099
- a({ x: r.left, y: r.bottom + 4, focus: w });
1878
+ function St({ iconOnly: e, onOpenChange: t, ...l }) {
1879
+ const [s, a] = D(null), i = Ie(() => a(null), []), h = O(!1), d = s !== null;
1880
+ Q(() => (t == null || t(d), () => t == null ? void 0 : t(!1)), [d, t]);
1881
+ const u = An(l), b = u !== null && !e, c = Tn(l), v = (m, N) => {
1882
+ const r = m.getBoundingClientRect();
1883
+ a({ x: r.left, y: r.bottom + 4, focus: N });
2100
1884
  };
2101
- return /* @__PURE__ */ o($, { children: [
2102
- /* @__PURE__ */ e(
1885
+ return /* @__PURE__ */ f(ge, { children: [
1886
+ /* @__PURE__ */ n(
2103
1887
  "button",
2104
1888
  {
2105
1889
  type: "button",
2106
- className: H("cms-filter-menu", m !== null && "cms-filter-menu--active", _ && "cms-filter-menu--named"),
1890
+ className: F("cms-filter-menu", u !== null && "cms-filter-menu--active", b && "cms-filter-menu--named"),
2107
1891
  "aria-haspopup": "menu",
2108
- "aria-expanded": u,
2109
- "aria-label": i,
2110
- title: i,
1892
+ "aria-expanded": d,
1893
+ "aria-label": c,
1894
+ title: c,
2111
1895
  onMouseDown: () => {
2112
- f.current = u;
1896
+ h.current = d;
2113
1897
  },
2114
- onClick: (h) => {
2115
- u || f.current ? c() : v(h.currentTarget, "current"), f.current = !1;
1898
+ onClick: (m) => {
1899
+ d || h.current ? i() : v(m.currentTarget, "current"), h.current = !1;
2116
1900
  },
2117
- onKeyDown: (h) => {
2118
- f.current = !1, (h.key === "ArrowDown" || h.key === "ArrowUp") && (h.preventDefault(), v(h.currentTarget, h.key === "ArrowUp" ? "last" : "current"));
1901
+ onKeyDown: (m) => {
1902
+ h.current = !1, (m.key === "ArrowDown" || m.key === "ArrowUp") && (m.preventDefault(), v(m.currentTarget, m.key === "ArrowUp" ? "last" : "current"));
2119
1903
  },
2120
- children: _ ? /* @__PURE__ */ o($, { children: [
2121
- /* @__PURE__ */ e("span", { className: "cms-filter-menu__choice", children: m.label }),
2122
- /* @__PURE__ */ e(B, { name: "chevron-down", size: 16 })
2123
- ] }) : /* @__PURE__ */ e(B, { name: "funnel" })
1904
+ children: b ? /* @__PURE__ */ f(ge, { children: [
1905
+ /* @__PURE__ */ n("span", { className: "cms-filter-menu__choice", children: u.label }),
1906
+ /* @__PURE__ */ n($, { name: "chevron-down", size: 16 })
1907
+ ] }) : /* @__PURE__ */ n($, { name: "funnel" })
2124
1908
  }
2125
1909
  ),
2126
- /* @__PURE__ */ e(
1910
+ /* @__PURE__ */ n(
2127
1911
  Ke,
2128
1912
  {
2129
1913
  at: s,
2130
- items: An(l),
2131
- onClose: c,
1914
+ items: Ln(l),
1915
+ onClose: i,
2132
1916
  label: l.label,
2133
1917
  focus: s == null ? void 0 : s.focus
2134
1918
  }
2135
1919
  )
2136
1920
  ] });
2137
1921
  }
2138
- function Nt(n) {
2139
- return Tn(n), /* @__PURE__ */ e(Ln, { ...n });
1922
+ function Et(e) {
1923
+ return Dn(e), /* @__PURE__ */ n(In, { ...e });
2140
1924
  }
2141
- function hl({ leading: n, name: t, filter: l }) {
2142
- return /* @__PURE__ */ o("div", { className: "cms-list-head", children: [
2143
- n != null ? /* @__PURE__ */ e("span", { className: "cms-list-head__leading", children: n }) : null,
2144
- /* @__PURE__ */ e("h2", { className: "cms-list-head__name", title: t, children: t }),
2145
- l !== void 0 ? /* @__PURE__ */ e(Nt, { ...l }) : null
1925
+ function gl({ leading: e, name: t, filter: l }) {
1926
+ return /* @__PURE__ */ f("div", { className: "cms-list-head", children: [
1927
+ e != null ? /* @__PURE__ */ n("span", { className: "cms-list-head__leading", children: e }) : null,
1928
+ /* @__PURE__ */ n("h2", { className: "cms-list-head__name", title: t, children: t }),
1929
+ l !== void 0 ? /* @__PURE__ */ n(Et, { ...l }) : null
2146
1930
  ] });
2147
1931
  }
2148
- const yn = { bare: /* @__PURE__ */ new Set(), hidden: /* @__PURE__ */ new Set() }, wn = (n, t) => n.size === t.size && [...n].every((l) => t.has(l));
2149
- function kt(n) {
1932
+ const kn = { bare: /* @__PURE__ */ new Set(), hidden: /* @__PURE__ */ new Set() }, xn = (e, t) => e.size === t.size && [...e].every((l) => t.has(l));
1933
+ function At(e) {
2150
1934
  const t = /* @__PURE__ */ new Map();
2151
- for (const l of n) t.set(l.group, [...t.get(l.group) ?? [], l]);
1935
+ for (const l of e) t.set(l.group, [...t.get(l.group) ?? [], l]);
2152
1936
  return [...t.values()];
2153
1937
  }
2154
- function xt(n) {
1938
+ function Tt(e) {
2155
1939
  const t = /* @__PURE__ */ new Map();
2156
- for (const l of n) l.overflow !== void 0 && l.overflow !== 0 && t.set(l.overflow, [...t.get(l.overflow) ?? [], l.id]);
1940
+ for (const l of e) l.overflow !== void 0 && l.overflow !== 0 && t.set(l.overflow, [...t.get(l.overflow) ?? [], l.id]);
2157
1941
  return [...t.entries()].sort(([l], [s]) => l - s).map(([, l]) => l);
2158
1942
  }
2159
- function fl({ label: n, actions: t, onAction: l, status: s, moreLabel: a, leading: c }) {
2160
- var G;
2161
- const f = t.filter((p) => p.entries === void 0 || p.entries.length > 0), u = P(null), m = P(null), _ = P(null), [i, v] = D(yn), [h, w] = D(null), [r, g] = D("first"), [T, x] = D(null), [M, E] = D(null), b = kt(f), N = b.flat(), I = ((G = N.find((p) => p.primary === !0 && p.overflow !== 0)) == null ? void 0 : G.id) ?? null, K = xt(f.filter((p) => p.id !== I)), z = N.filter((p) => p.overflow === 0), k = N.filter((p) => p.overflow !== 0), F = z.length === 1 ? z[0] ?? null : null, U = JSON.stringify([f.map((p) => [p.id, p.label, p.icon, p.group, p.overflow ?? null, p.primary === !0, p.entries !== void 0]), s ?? "", c !== void 0]), Y = (p) => /* @__PURE__ */ new Set([...z.filter((L) => L !== F || p.size > 0).map((L) => L.id), ...p]), W = Ie(() => {
2162
- const p = u.current, L = m.current;
1943
+ function wl({ label: e, actions: t, onAction: l, status: s, moreLabel: a, leading: i }) {
1944
+ var q;
1945
+ const h = t.filter((p) => p.entries === void 0 || p.entries.length > 0), d = O(null), u = O(null), b = O(null), [c, v] = D(kn), [m, N] = D(null), [r, g] = D("first"), [T, C] = D(null), [S, x] = D(null), _ = At(h), y = _.flat(), I = ((q = y.find((p) => p.primary === !0 && p.overflow !== 0)) == null ? void 0 : q.id) ?? null, U = Tt(h.filter((p) => p.id !== I)), P = y.filter((p) => p.overflow === 0), k = y.filter((p) => p.overflow !== 0), B = P.length === 1 ? P[0] ?? null : null, z = JSON.stringify([h.map((p) => [p.id, p.label, p.icon, p.group, p.overflow ?? null, p.primary === !0, p.entries !== void 0]), s ?? "", i !== 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 = d.current, L = u.current;
2163
1947
  if (p === null || L === null) return;
2164
- const V = getComputedStyle(p), me = parseFloat(V.columnGap || "0") || 0, re = p.clientWidth - (parseFloat(V.paddingLeft) || 0) - (parseFloat(V.paddingRight) || 0), he = (A) => {
2165
- var C;
2166
- return ((C = L.querySelector(A)) == null ? void 0 : C.getBoundingClientRect().width) ?? 0;
2167
- }, Se = he('[data-measure="leading"]'), We = he('[data-measure="separator"]'), Fe = he('[data-measure="more"]'), Te = (A, C) => he(`[data-measure="${C ? "full" : "icon"}"][data-measure-action="${CSS.escape(A)}"]`), Ee = (A, C) => {
2168
- const O = Y(C), se = F !== null && !O.has(F.id) ? F : null, Q = b.map((Re) => Re.filter((q) => !O.has(q.id) && q !== se)).filter((Re) => Re.length > 0), ke = [...Q.flat(), ...se !== null ? [se] : []], He = ke.length + (Q.length - 1) + (O.size > 0 ? 1 : 0) + (Se > 0 ? 1 : 0);
2169
- return Se + ke.reduce((Re, q) => Re + Te(q.id, !A.has(q.id)), 0) + We * Math.max(0, Q.length - 1) + (O.size > 0 ? Fe : 0) + me * Math.max(0, He - 1);
2170
- }, R = k.filter((A) => A.id !== I && !K.some((C) => C.includes(A.id))).map((A) => A.id), J = [...K, ...[...R].reverse().map((A) => [A]), ...I !== null ? [[I]] : []], Ne = [...F !== null ? [[F.id]] : [], ...J];
2171
- let de = null;
2172
- if (Ee(/* @__PURE__ */ new Set(), /* @__PURE__ */ new Set()) <= re) de = yn;
1948
+ const Z = getComputedStyle(p), ue = parseFloat(Z.columnGap || "0") || 0, ae = p.clientWidth - (parseFloat(Z.paddingLeft) || 0) - (parseFloat(Z.paddingRight) || 0), me = (A) => {
1949
+ var M;
1950
+ return ((M = L.querySelector(A)) == null ? void 0 : M.getBoundingClientRect().width) ?? 0;
1951
+ }, Se = me('[data-measure="leading"]'), We = me('[data-measure="separator"]'), Fe = me('[data-measure="more"]'), Te = (A, M) => me(`[data-measure="${M ? "full" : "icon"}"][data-measure-action="${CSS.escape(A)}"]`), Ee = (A, M) => {
1952
+ const H = j(M), le = B !== null && !H.has(B.id) ? B : null, J = _.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, !A.has(V.id)), 0) + We * Math.max(0, J.length - 1) + (H.size > 0 ? Fe : 0) + ue * Math.max(0, Re - 1);
1954
+ }, R = k.filter((A) => A.id !== I && !U.some((M) => M.includes(A.id))).map((A) => A.id), X = [...U, ...[...R].reverse().map((A) => [A]), ...I !== null ? [[I]] : []], Ne = [...B !== null ? [[B.id]] : [], ...X];
1955
+ let oe = null;
1956
+ if (Ee(/* @__PURE__ */ new Set(), /* @__PURE__ */ new Set()) <= ae) oe = kn;
2173
1957
  else {
2174
1958
  const A = /* @__PURE__ */ new Set();
2175
- for (const C of Ne) {
2176
- for (const O of C) A.add(O);
2177
- if (Ee(A, /* @__PURE__ */ new Set()) <= re) {
2178
- de = { bare: A, hidden: /* @__PURE__ */ new Set() };
1959
+ for (const M of Ne) {
1960
+ for (const H of M) A.add(H);
1961
+ if (Ee(A, /* @__PURE__ */ new Set()) <= ae) {
1962
+ oe = { bare: A, hidden: /* @__PURE__ */ new Set() };
2179
1963
  break;
2180
1964
  }
2181
1965
  }
2182
1966
  }
2183
- if (de === null) {
2184
- const A = new Set(Ne.flat()), C = /* @__PURE__ */ new Set(), O = () => C.size + z.length >= 2;
2185
- for (const se of J) {
2186
- for (const Q of se) C.add(Q);
2187
- if (O() && Ee(A, C) <= re) break;
1967
+ if (oe === null) {
1968
+ const A = new Set(Ne.flat()), M = /* @__PURE__ */ new Set(), H = () => M.size + P.length >= 2;
1969
+ for (const le of X) {
1970
+ for (const J of le) M.add(J);
1971
+ if (H() && Ee(A, M) <= ae) break;
2188
1972
  }
2189
- O() || C.clear(), de = { bare: A, hidden: C };
1973
+ H() || M.clear(), oe = { bare: A, hidden: M };
2190
1974
  }
2191
- const d = de;
2192
- v((A) => wn(A.bare, d.bare) && wn(A.hidden, d.hidden) ? A : d);
2193
- }, [U]);
2194
- $e(W, [W]), ee(() => {
2195
- const p = u.current;
1975
+ const o = oe;
1976
+ v((A) => xn(A.bare, o.bare) && xn(A.hidden, o.hidden) ? A : o);
1977
+ }, [z]);
1978
+ $e(K, [K]), Q(() => {
1979
+ const p = d.current;
2196
1980
  if (p === null || typeof ResizeObserver > "u") return;
2197
- const L = new ResizeObserver(() => W());
1981
+ const L = new ResizeObserver(() => K());
2198
1982
  return L.observe(p), () => L.disconnect();
2199
- }, [W]), ee(() => {
1983
+ }, [K]), Q(() => {
2200
1984
  const p = typeof document > "u" ? void 0 : document.fonts;
2201
1985
  if (p === void 0) return;
2202
1986
  let L = !0;
2203
- const V = () => {
2204
- L && W();
1987
+ const Z = () => {
1988
+ L && K();
2205
1989
  };
2206
- return p.ready.then(V), p.addEventListener("loadingdone", V), () => {
2207
- L = !1, p.removeEventListener("loadingdone", V);
1990
+ return p.ready.then(Z), p.addEventListener("loadingdone", Z), () => {
1991
+ L = !1, p.removeEventListener("loadingdone", Z);
2208
1992
  };
2209
- }, [W]);
2210
- const j = Y(i.hidden), X = F !== null && !j.has(F.id) ? F : null, ne = (p) => j.has(p.id) || p === X, be = [...b.map((p) => p.filter((L) => !ne(L))).filter((p) => p.length > 0).flat(), ...X !== null ? [X] : []], oe = (p) => N.find((L) => L.id === p), ue = [...K.flat(), ...k.filter((p) => p.id !== I && !K.some((L) => L.includes(p.id))).map((p) => p.id).reverse()], Ce = [
2211
- ...I !== null && i.hidden.has(I) ? [oe(I)] : [],
2212
- ...ue.filter((p) => i.hidden.has(p)).map(oe),
2213
- ...j.size > 0 ? z : []
2214
- ].filter((p) => p !== void 0 && j.has(p.id)), pe = new Set(k.filter((p) => !K.some((L) => L.includes(p.id))).map((p) => p.id)), le = [...be.map((p) => p.id), ...Ce.length > 0 ? ["more"] : []], _e = T !== null && le.includes(T) ? T : le[0] ?? null, ve = (p) => {
2215
- var re, he;
2216
- const L = le.indexOf(_e ?? "");
2217
- let V = null;
2218
- if (p.key === "ArrowRight" ? V = Math.min(le.length - 1, L + 1) : p.key === "ArrowLeft" ? V = Math.max(0, L - 1) : p.key === "Home" ? V = 0 : p.key === "End" ? V = le.length - 1 : p.key === "Escape" && E(_e), V === null) return;
1993
+ }, [K]);
1994
+ const G = j(c.hidden), Y = B !== null && !G.has(B.id) ? B : null, ee = (p) => G.has(p.id) || p === Y, be = [..._.map((p) => p.filter((L) => !ee(L))).filter((p) => p.length > 0).flat(), ...Y !== null ? [Y] : []], ce = (p) => y.find((L) => L.id === p), de = [...U.flat(), ...k.filter((p) => p.id !== I && !U.some((L) => L.includes(p.id))).map((p) => p.id).reverse()], Ce = [
1995
+ ...I !== null && c.hidden.has(I) ? [ce(I)] : [],
1996
+ ...de.filter((p) => c.hidden.has(p)).map(ce),
1997
+ ...G.size > 0 ? P : []
1998
+ ].filter((p) => p !== void 0 && G.has(p.id)), fe = new Set(k.filter((p) => !U.some((L) => L.includes(p.id))).map((p) => p.id)), te = [...be.map((p) => p.id), ...Ce.length > 0 ? ["more"] : []], pe = T !== null && te.includes(T) ? T : te[0] ?? null, _e = (p) => {
1999
+ var ae, me;
2000
+ const L = te.indexOf(pe ?? "");
2001
+ 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" && x(pe), Z === null) return;
2219
2003
  p.preventDefault();
2220
- const me = le[V] ?? null;
2221
- x(me), (he = (re = u.current) == null ? void 0 : re.querySelector(`[data-stop="${CSS.escape(me ?? "")}"]`)) == null || he.focus();
2222
- }, ye = Ce.map((p) => ({
2004
+ const ue = te[Z] ?? null;
2005
+ C(ue), (me = (ae = d.current) == null ? void 0 : ae.querySelector(`[data-stop="${CSS.escape(ue ?? "")}"]`)) == null || me.focus();
2006
+ }, we = Ce.map((p) => ({
2223
2007
  id: p.id,
2224
- label: /* @__PURE__ */ o($, { children: [
2225
- /* @__PURE__ */ e(je, { name: p.icon }),
2008
+ label: /* @__PURE__ */ f(ge, { children: [
2009
+ /* @__PURE__ */ n(je, { name: p.icon }),
2226
2010
  p.label
2227
2011
  ] }),
2228
2012
  offer: p.disabled ? { offered: !0, locked: !1, refusal: p.reason ?? "" } : { offered: !0, locked: !1 },
2229
2013
  ...p.danger ? { danger: !0 } : {},
2230
2014
  onSelect: () => {
2231
- var V;
2015
+ var Z;
2232
2016
  if (p.disabled || p.busy) return;
2233
2017
  if (p.entries === void 0) {
2234
2018
  l(p.id);
2235
2019
  return;
2236
2020
  }
2237
- const L = (V = _.current) == null ? void 0 : V.getBoundingClientRect();
2238
- g("first"), w({ which: p.id, x: (L == null ? void 0 : L.left) ?? 0, y: (L == null ? void 0 : L.bottom) ?? 0 });
2021
+ const L = (Z = b.current) == null ? void 0 : Z.getBoundingClientRect();
2022
+ g("first"), N({ which: p.id, x: (L == null ? void 0 : L.left) ?? 0, y: (L == null ? void 0 : L.bottom) ?? 0 });
2239
2023
  }
2240
- })), te = h === null || h.which === "more" ? void 0 : N.find((p) => p.id === h.which), we = ((te == null ? void 0 : te.entries) ?? []).map((p) => ({
2024
+ })), ne = m === null || m.which === "more" ? void 0 : y.find((p) => p.id === m.which), ye = ((ne == null ? void 0 : ne.entries) ?? []).map((p) => ({
2241
2025
  id: p.id,
2242
- label: /* @__PURE__ */ o($, { children: [
2243
- p.icon !== void 0 ? /* @__PURE__ */ e(je, { name: p.icon }) : null,
2026
+ label: /* @__PURE__ */ f(ge, { children: [
2027
+ p.icon !== void 0 ? /* @__PURE__ */ n(je, { name: p.icon }) : null,
2244
2028
  p.label
2245
2029
  ] }),
2246
2030
  offer: p.disabled ? { offered: !0, locked: !1, refusal: p.reason ?? "" } : { offered: !0, locked: !1 },
@@ -2248,88 +2032,89 @@ function fl({ label: n, actions: t, onAction: l, status: s, moreLabel: a, leadin
2248
2032
  onSelect: () => {
2249
2033
  p.disabled || l(p.id);
2250
2034
  }
2251
- })), y = (p, L, V) => {
2252
- const me = L.getBoundingClientRect();
2253
- g(V), w({ which: p, x: me.left, y: me.bottom });
2254
- }, S = k.length + (F !== null ? 1 : 0), Z = (p) => /* @__PURE__ */ e(
2255
- Mt,
2035
+ })), w = (p, L, Z) => {
2036
+ const ue = L.getBoundingClientRect();
2037
+ g(Z), N({ which: p, x: ue.left, y: ue.bottom });
2038
+ }, E = k.length + (B !== null ? 1 : 0), W = (p) => /* @__PURE__ */ n(
2039
+ Lt,
2256
2040
  {
2257
2041
  action: p,
2258
- labels: !i.bare.has(p.id),
2259
- overflowed: j.has(p.id),
2260
- pinned: pe.has(p.id),
2261
- tabbable: _e === p.id,
2262
- tipOff: M === p.id,
2263
- menuOpen: (h == null ? void 0 : h.which) === p.id,
2264
- onChoose: (L, V) => {
2265
- p.entries === void 0 ? l(p.id) : (h == null ? void 0 : h.which) === p.id && V === null ? w(null) : y(p.id, L, V ?? "first");
2042
+ primary: p.id === I,
2043
+ labels: !c.bare.has(p.id),
2044
+ overflowed: G.has(p.id),
2045
+ pinned: fe.has(p.id),
2046
+ tabbable: pe === p.id,
2047
+ tipOff: S === p.id,
2048
+ menuOpen: (m == null ? void 0 : m.which) === p.id,
2049
+ onChoose: (L, Z) => {
2050
+ p.entries === void 0 ? l(p.id) : (m == null ? void 0 : m.which) === p.id && Z === null ? N(null) : w(p.id, L, Z ?? "first");
2266
2051
  },
2267
2052
  onFocus: () => {
2268
- x(p.id), E(null);
2053
+ C(p.id), x(null);
2269
2054
  }
2270
2055
  },
2271
2056
  p.id
2272
2057
  );
2273
- return /* @__PURE__ */ o(
2058
+ return /* @__PURE__ */ f(
2274
2059
  "div",
2275
2060
  {
2276
- ref: u,
2061
+ ref: d,
2277
2062
  role: "toolbar",
2278
- "aria-label": n,
2279
- className: H(
2063
+ "aria-label": e,
2064
+ className: F(
2280
2065
  "cms-pane-toolbar",
2281
- S > 0 && i.bare.size >= S && "cms-pane-toolbar--labels-hidden",
2282
- i.bare.size > 0 && i.bare.size < S && "cms-pane-toolbar--labels-partly-hidden"
2066
+ E > 0 && c.bare.size >= E && "cms-pane-toolbar--labels-hidden",
2067
+ c.bare.size > 0 && c.bare.size < E && "cms-pane-toolbar--labels-partly-hidden"
2283
2068
  ),
2284
- onKeyDown: ve,
2069
+ onKeyDown: _e,
2285
2070
  children: [
2286
- c !== void 0 ? /* @__PURE__ */ e("div", { className: "cms-pane-toolbar__leading", children: c }) : null,
2287
- b.map((p, L) => {
2288
- const V = p.filter((re) => !ne(re)), me = b.slice(0, L).some((re) => re.some((he) => !ne(he)));
2289
- return /* @__PURE__ */ o("div", { className: "cms-pane-toolbar__group-wrap", children: [
2290
- V.length > 0 && me ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__separator", role: "separator", "aria-orientation": "vertical" }) : null,
2291
- /* @__PURE__ */ e("div", { className: "cms-pane-toolbar__group", hidden: V.length === 0, children: p.filter((re) => re !== X).map((re) => Z(re)) })
2071
+ i !== void 0 ? /* @__PURE__ */ n("div", { className: "cms-pane-toolbar__leading", children: i }) : null,
2072
+ _.map((p, L) => {
2073
+ const Z = p.filter((ae) => !ee(ae)), ue = _.slice(0, L).some((ae) => ae.some((me) => !ee(me)));
2074
+ return /* @__PURE__ */ f("div", { className: "cms-pane-toolbar__group-wrap", children: [
2075
+ Z.length > 0 && ue ? /* @__PURE__ */ n("span", { className: "cms-pane-toolbar__separator", role: "separator", "aria-orientation": "vertical" }) : null,
2076
+ /* @__PURE__ */ n("div", { className: "cms-pane-toolbar__group", hidden: Z.length === 0, children: p.filter((ae) => ae !== Y).map((ae) => W(ae)) })
2292
2077
  ] }, L);
2293
2078
  }),
2294
- X !== null ? /* @__PURE__ */ e("div", { className: "cms-pane-toolbar__group cms-pane-toolbar__lone", children: Z(X) }) : null,
2295
- Ce.length > 0 ? /* @__PURE__ */ e(
2079
+ Y !== null ? /* @__PURE__ */ n("div", { className: "cms-pane-toolbar__group cms-pane-toolbar__lone", children: W(Y) }) : null,
2080
+ Ce.length > 0 ? /* @__PURE__ */ n(
2296
2081
  "button",
2297
2082
  {
2298
- ref: _,
2083
+ ref: b,
2299
2084
  type: "button",
2300
2085
  className: "cms-icon-button cms-pane-toolbar__more",
2301
2086
  "data-stop": "more",
2302
2087
  "aria-label": a,
2303
2088
  title: a,
2304
2089
  "aria-haspopup": "menu",
2305
- "aria-expanded": (h == null ? void 0 : h.which) === "more",
2306
- tabIndex: _e === "more" ? 0 : -1,
2307
- onFocus: () => x("more"),
2090
+ "aria-expanded": (m == null ? void 0 : m.which) === "more",
2091
+ tabIndex: pe === "more" ? 0 : -1,
2092
+ onFocus: () => C("more"),
2308
2093
  onClick: (p) => {
2309
- (h == null ? void 0 : h.which) === "more" ? w(null) : y("more", p.currentTarget, "first");
2094
+ (m == null ? void 0 : m.which) === "more" ? N(null) : w("more", p.currentTarget, "first");
2310
2095
  },
2311
2096
  onKeyDown: (p) => {
2312
- (p.key === "ArrowDown" || p.key === "ArrowUp") && (p.preventDefault(), p.stopPropagation(), y("more", p.currentTarget, p.key === "ArrowUp" ? "last" : "first"));
2097
+ (p.key === "ArrowDown" || p.key === "ArrowUp") && (p.preventDefault(), p.stopPropagation(), w("more", p.currentTarget, p.key === "ArrowUp" ? "last" : "first"));
2313
2098
  },
2314
- children: /* @__PURE__ */ e(B, { name: "more" })
2099
+ children: /* @__PURE__ */ n($, { name: "more" })
2315
2100
  }
2316
2101
  ) : null,
2317
- s !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__status", title: s, children: s }) : null,
2318
- /* @__PURE__ */ e(Ke, { at: (h == null ? void 0 : h.which) === "more" ? h : null, items: ye, onClose: () => w(null), label: a, focus: r }),
2319
- /* @__PURE__ */ e(Ke, { at: te !== void 0 ? h : null, items: we, onClose: () => w(null), label: (te == null ? void 0 : te.label) ?? "", focus: r }),
2320
- /* @__PURE__ */ o("div", { ref: m, className: "cms-pane-toolbar__measure", "aria-hidden": "true", children: [
2321
- c !== void 0 ? /* @__PURE__ */ e("div", { "data-measure": "leading", children: c }) : null,
2322
- /* @__PURE__ */ e("span", { "data-measure": "separator", className: "cms-pane-toolbar__separator" }),
2323
- /* @__PURE__ */ e("span", { "data-measure": "more", className: "cms-icon-button cms-pane-toolbar__more", children: /* @__PURE__ */ e(B, { name: "more" }) }),
2324
- N.map((p) => /* @__PURE__ */ o("span", { children: [
2325
- /* @__PURE__ */ o("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: [
2326
- /* @__PURE__ */ e(je, { name: p.icon }),
2327
- /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__label", children: p.label }),
2328
- p.entries !== void 0 ? /* @__PURE__ */ e(nn, {}) : null
2102
+ s !== void 0 ? /* @__PURE__ */ n("span", { className: "cms-pane-toolbar__status", title: s, children: s }) : null,
2103
+ /* @__PURE__ */ n(Ke, { at: (m == null ? void 0 : m.which) === "more" ? m : null, items: we, onClose: () => N(null), label: a, focus: r }),
2104
+ /* @__PURE__ */ n(Ke, { at: ne !== void 0 ? m : null, items: ye, onClose: () => N(null), label: (ne == null ? void 0 : ne.label) ?? "", focus: r }),
2105
+ /* @__PURE__ */ f("div", { ref: u, className: "cms-pane-toolbar__measure", "aria-hidden": "true", children: [
2106
+ i !== void 0 ? /* @__PURE__ */ n("div", { "data-measure": "leading", children: i }) : null,
2107
+ /* @__PURE__ */ n("span", { "data-measure": "separator", className: "cms-pane-toolbar__separator" }),
2108
+ /* @__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: [
2111
+ /* @__PURE__ */ n(je, { name: p.icon }),
2112
+ /* @__PURE__ */ n("span", { className: "cms-pane-toolbar__label", children: p.label }),
2113
+ p.entries !== void 0 ? /* @__PURE__ */ n(ln, {}) : null
2329
2114
  ] }),
2330
- /* @__PURE__ */ o("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: [
2331
- Be(p.icon) !== null ? /* @__PURE__ */ e(je, { name: p.icon }) : /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__label", children: p.label }),
2332
- p.entries !== void 0 ? /* @__PURE__ */ e(nn, {}) : null
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: [
2116
+ Be(p.icon) !== null ? /* @__PURE__ */ n(je, { name: p.icon }) : /* @__PURE__ */ n("span", { className: "cms-pane-toolbar__label", children: p.label }),
2117
+ p.entries !== void 0 ? /* @__PURE__ */ n(ln, {}) : null
2333
2118
  ] })
2334
2119
  ] }, p.id))
2335
2120
  ] })
@@ -2338,139 +2123,139 @@ function fl({ label: n, actions: t, onAction: l, status: s, moreLabel: a, leadin
2338
2123
  );
2339
2124
  }
2340
2125
  const Pe = "tip";
2341
- function Mt({ action: n, labels: t, overflowed: l, pinned: s, tabbable: a, tipOff: c, menuOpen: f, onChoose: u, onFocus: m }) {
2342
- const [_, i] = D(!1);
2343
- ee(() => {
2344
- if (!n.busy) {
2345
- i(!1);
2126
+ function Lt({ action: e, primary: t, labels: l, overflowed: s, pinned: a, tabbable: i, tipOff: h, menuOpen: d, onChoose: u, onFocus: b }) {
2127
+ const [c, v] = D(!1);
2128
+ Q(() => {
2129
+ if (!e.busy) {
2130
+ v(!1);
2346
2131
  return;
2347
2132
  }
2348
- const b = setTimeout(() => i(!0), Je);
2349
- return () => clearTimeout(b);
2350
- }, [n.busy]);
2351
- const v = Be(n.icon) === null, h = t || v, w = n.disabled && n.reason ? n.reason : null, r = w ?? (h ? null : n.label), g = fe(), [T, x] = D(!1), M = rn(), E = n.entries !== void 0;
2352
- return /* @__PURE__ */ o(
2133
+ const y = setTimeout(() => v(!0), en);
2134
+ return () => clearTimeout(y);
2135
+ }, [e.busy]);
2136
+ const m = Be(e.icon) === null, N = l || m, r = e.disabled && e.reason ? e.reason : null, g = r ?? (N ? null : e.label), T = he(), [C, S] = D(!1), x = dn(), _ = e.entries !== void 0;
2137
+ return /* @__PURE__ */ f(
2353
2138
  "button",
2354
2139
  {
2355
2140
  type: "button",
2356
- className: H("cms-pane-toolbar__action", !h && "cms-pane-toolbar__action--bare", v && "cms-pane-toolbar__action--text", E && "cms-pane-toolbar__action--menu", n.danger && "is-danger"),
2357
- "data-action": n.id,
2358
- "data-stop": n.id,
2359
- ...l ? { "data-overflowed": "" } : {},
2360
- ...s ? { "data-pinned": "" } : {},
2361
- hidden: l,
2362
- "aria-label": n.label,
2363
- "aria-disabled": n.disabled || void 0,
2364
- "aria-busy": n.busy || void 0,
2365
- ...E ? { "aria-haspopup": "menu", "aria-expanded": f } : {},
2366
- ...w === null ? {} : { "aria-describedby": g },
2367
- ...T && w !== null ? { "data-reason-shown": "" } : {},
2368
- ...M.dismissed(Pe) ? { "data-tip-dismissed": "" } : {},
2369
- tabIndex: a ? 0 : -1,
2141
+ className: F("cms-pane-toolbar__action", t && "cms-pane-toolbar__action--primary", !N && "cms-pane-toolbar__action--bare", m && "cms-pane-toolbar__action--text", _ && "cms-pane-toolbar__action--menu", e.danger && "is-danger"),
2142
+ "data-action": e.id,
2143
+ "data-stop": e.id,
2144
+ ...s ? { "data-overflowed": "" } : {},
2145
+ ...a ? { "data-pinned": "" } : {},
2146
+ hidden: s,
2147
+ "aria-label": e.label,
2148
+ "aria-disabled": e.disabled || void 0,
2149
+ "aria-busy": e.busy || void 0,
2150
+ ..._ ? { "aria-haspopup": "menu", "aria-expanded": d } : {},
2151
+ ...r === null ? {} : { "aria-describedby": T },
2152
+ ...C && r !== null ? { "data-reason-shown": "" } : {},
2153
+ ...x.dismissed(Pe) ? { "data-tip-dismissed": "" } : {},
2154
+ tabIndex: i ? 0 : -1,
2370
2155
  onFocus: () => {
2371
- m(), M.focusIn(Pe);
2156
+ b(), x.focusIn(Pe);
2372
2157
  },
2373
2158
  onBlur: () => {
2374
- x(!1), M.focusOut(Pe);
2159
+ S(!1), x.focusOut(Pe);
2375
2160
  },
2376
- onMouseEnter: () => M.pointerIn(Pe),
2377
- onMouseLeave: () => M.pointerOut(Pe),
2378
- onKeyDown: (b) => {
2379
- b.key === "Escape" && (x(!1), M.dismiss(Pe)), E && (b.key === "ArrowDown" || b.key === "ArrowUp") && (b.preventDefault(), w !== null ? x(!0) : !n.disabled && !n.busy && u(b.currentTarget, b.key === "ArrowUp" ? "last" : "first"));
2161
+ onMouseEnter: () => x.pointerIn(Pe),
2162
+ onMouseLeave: () => x.pointerOut(Pe),
2163
+ onKeyDown: (y) => {
2164
+ y.key === "Escape" && (S(!1), x.dismiss(Pe)), _ && (y.key === "ArrowDown" || y.key === "ArrowUp") && (y.preventDefault(), r !== null ? S(!0) : !e.disabled && !e.busy && u(y.currentTarget, y.key === "ArrowUp" ? "last" : "first"));
2380
2165
  },
2381
- onClick: (b) => {
2382
- w !== null ? (x(!0), M.show(Pe)) : !n.disabled && !n.busy && u(b.currentTarget, null);
2166
+ onClick: (y) => {
2167
+ r !== null ? (S(!0), x.show(Pe)) : !e.disabled && !e.busy && u(y.currentTarget, null);
2383
2168
  },
2384
2169
  children: [
2385
- _ ? /* @__PURE__ */ e(ae, { name: "spinner" }) : /* @__PURE__ */ e(je, { name: n.icon }),
2386
- h ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__label", "aria-hidden": "true", children: n.label }) : null,
2387
- E ? /* @__PURE__ */ e(nn, {}) : null,
2388
- w !== null || r !== null && !c ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__tip", role: "tooltip", id: g, children: r }) : null
2170
+ c ? /* @__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,
2172
+ _ ? /* @__PURE__ */ n(ln, {}) : null,
2173
+ r !== null || g !== null && !h ? /* @__PURE__ */ n("span", { className: "cms-pane-toolbar__tip", role: "tooltip", id: T, children: g }) : null
2389
2174
  ]
2390
2175
  }
2391
2176
  );
2392
2177
  }
2393
- function nn() {
2394
- return /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__chevron", "aria-hidden": "true", children: /* @__PURE__ */ e(B, { name: "chevron-down", size: 14 }) });
2178
+ function ln() {
2179
+ return /* @__PURE__ */ n("span", { className: "cms-pane-toolbar__chevron", "aria-hidden": "true", children: /* @__PURE__ */ n($, { name: "chevron-down", size: 14 }) });
2395
2180
  }
2396
- function je({ name: n }) {
2397
- const t = Be(n);
2398
- return t === null ? null : /* @__PURE__ */ e(B, { name: t, size: 18 });
2181
+ function je({ name: e }) {
2182
+ const t = Be(e);
2183
+ return t === null ? null : /* @__PURE__ */ n($, { name: t, size: 18 });
2399
2184
  }
2400
- function pl({ title: n, body: t = null, time: l = null, unread: s, unreadLabel: a, expandLabel: c, collapseLabel: f, action: u = null, onRead: m, leading: _ }) {
2401
- const [i, v] = D(!1), h = fe(), w = () => {
2402
- s && m();
2403
- }, r = (u == null ? void 0 : u.presentation) === "row" && u.onAction !== void 0, g = (u == null ? void 0 : u.presentation) === "button" && u.onAction !== void 0 ? u : null, T = () => {
2404
- var x;
2405
- w(), r && ((x = u.onAction) == null || x.call(u));
2185
+ function yl({ title: e, body: t = null, time: l = null, unread: s, unreadLabel: a, expandLabel: i, collapseLabel: h, action: d = null, onRead: u, leading: b }) {
2186
+ const [c, v] = D(!1), m = he(), N = () => {
2187
+ s && u();
2188
+ }, r = (d == null ? void 0 : d.presentation) === "row" && d.onAction !== void 0, g = (d == null ? void 0 : d.presentation) === "button" && d.onAction !== void 0 ? d : null, T = () => {
2189
+ var C;
2190
+ N(), r && ((C = d.onAction) == null || C.call(d));
2406
2191
  };
2407
- return /* @__PURE__ */ o("article", { className: H("cms-notification", s && "is-unread", i && "is-expanded", r && "is-row-action"), "data-state": s ? "unread" : "read", children: [
2408
- /* @__PURE__ */ o(
2192
+ return /* @__PURE__ */ f("article", { className: F("cms-notification", s && "is-unread", c && "is-expanded", r && "is-row-action"), "data-state": s ? "unread" : "read", children: [
2193
+ /* @__PURE__ */ f(
2409
2194
  "div",
2410
2195
  {
2411
2196
  className: "cms-notification__row",
2412
2197
  role: "button",
2413
2198
  tabIndex: 0,
2414
- "aria-describedby": t === null ? void 0 : h,
2199
+ "aria-describedby": t === null ? void 0 : m,
2415
2200
  onClick: T,
2416
- onKeyDown: (x) => {
2417
- x.target !== x.currentTarget || x.key !== "Enter" && x.key !== " " || (x.preventDefault(), T());
2201
+ onKeyDown: (C) => {
2202
+ C.target !== C.currentTarget || C.key !== "Enter" && C.key !== " " || (C.preventDefault(), T());
2418
2203
  },
2419
2204
  children: [
2420
- _ != null ? /* @__PURE__ */ e("span", { className: "cms-notification__leading", children: _ }) : null,
2421
- /* @__PURE__ */ o("span", { className: "cms-notification__text", children: [
2422
- /* @__PURE__ */ o("span", { className: "cms-notification__head", children: [
2423
- /* @__PURE__ */ o("span", { className: "cms-notification__title", children: [
2424
- s ? /* @__PURE__ */ o("span", { className: "cms-visually-hidden", children: [
2205
+ 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: [
2425
2210
  a,
2426
2211
  " "
2427
2212
  ] }) : null,
2428
- n
2213
+ e
2429
2214
  ] }),
2430
- l !== null ? /* @__PURE__ */ e("span", { className: "cms-notification__time", children: l }) : null
2215
+ l !== null ? /* @__PURE__ */ n("span", { className: "cms-notification__time", children: l }) : null
2431
2216
  ] }),
2432
- t !== null && t !== "" ? /* @__PURE__ */ e("span", { className: "cms-notification__body", id: h, children: t }) : null
2217
+ t !== null && t !== "" ? /* @__PURE__ */ n("span", { className: "cms-notification__body", id: m, children: t }) : null
2433
2218
  ] }),
2434
- s ? /* @__PURE__ */ e("span", { className: "cms-notification__dot", "aria-hidden": "true" }) : null
2219
+ s ? /* @__PURE__ */ n("span", { className: "cms-notification__dot", "aria-hidden": "true" }) : null
2435
2220
  ]
2436
2221
  }
2437
2222
  ),
2438
- t !== null && t !== "" ? /* @__PURE__ */ e(
2223
+ t !== null && t !== "" ? /* @__PURE__ */ n(
2439
2224
  "button",
2440
2225
  {
2441
2226
  type: "button",
2442
2227
  className: "cms-notification__chevron",
2443
- "aria-expanded": i,
2444
- "aria-controls": h,
2445
- "aria-label": i ? f : c,
2446
- title: i ? f : c,
2228
+ "aria-expanded": c,
2229
+ "aria-controls": m,
2230
+ "aria-label": c ? h : i,
2231
+ title: c ? h : i,
2447
2232
  onClick: () => {
2448
- i || w(), v((x) => !x);
2233
+ c || N(), v((C) => !C);
2449
2234
  },
2450
- children: /* @__PURE__ */ e(B, { name: "chevron-down", size: 18 })
2235
+ children: /* @__PURE__ */ n($, { name: "chevron-down", size: 18 })
2451
2236
  }
2452
2237
  ) : null,
2453
- g !== null ? /* @__PURE__ */ e(
2238
+ g !== null ? /* @__PURE__ */ n(
2454
2239
  "button",
2455
2240
  {
2456
2241
  type: "button",
2457
2242
  className: "cms-button cms-notification__action",
2458
2243
  onClick: () => {
2459
- var x;
2460
- w(), (x = g.onAction) == null || x.call(g);
2244
+ var C;
2245
+ N(), (C = g.onAction) == null || C.call(g);
2461
2246
  },
2462
2247
  children: g.label
2463
2248
  }
2464
2249
  ) : null
2465
2250
  ] });
2466
2251
  }
2467
- function Ct(n) {
2468
- return n === "allowed" || n === "elevate" || n === "denied";
2252
+ function Dt(e) {
2253
+ return e === "allowed" || e === "elevate" || e === "denied";
2469
2254
  }
2470
- function _l(n, t) {
2471
- if (!Ct(n))
2255
+ function Nl(e, t) {
2256
+ if (!Dt(e))
2472
2257
  return t.showRefused ? { offered: !0, locked: !1, refusal: "not available: the server gave an answer this app does not know", unknown: !0 } : { offered: !1, locked: !1, unknown: !0 };
2473
- switch (n) {
2258
+ switch (e) {
2474
2259
  case "allowed":
2475
2260
  return { offered: !0, locked: !1 };
2476
2261
  case "elevate":
@@ -2479,223 +2264,223 @@ function _l(n, t) {
2479
2264
  return t.showRefused ? { offered: !0, locked: !1, refusal: t.refusal ?? "not allowed" } : { offered: !1, locked: !1 };
2480
2265
  }
2481
2266
  }
2482
- function St(n, t) {
2483
- if (!n) return;
2484
- if (typeof n.get == "function") return n.get(t) ?? void 0;
2485
- const l = n, s = Object.keys(l).find((a) => a.toLowerCase() === t.toLowerCase());
2267
+ function It(e, t) {
2268
+ if (!e) return;
2269
+ if (typeof e.get == "function") return e.get(t) ?? void 0;
2270
+ const l = e, s = Object.keys(l).find((a) => a.toLowerCase() === t.toLowerCase());
2486
2271
  return s === void 0 ? void 0 : l[s];
2487
2272
  }
2488
- function Et(n) {
2489
- if (n && typeof n == "object") {
2490
- const t = n;
2273
+ function $t(e) {
2274
+ if (e && typeof e == "object") {
2275
+ const t = e;
2491
2276
  if (typeof t.detail == "string" && t.detail !== "") return t.detail;
2492
2277
  if (typeof t.title == "string" && t.title !== "") return t.title;
2493
2278
  }
2494
2279
  }
2495
- function bl(n, t, l, s) {
2496
- if (n !== 403) return { kind: "none" };
2497
- const a = Et(l);
2498
- return St(t, "X-Elevation-Required") !== void 0 ? s.elevates ? { kind: "elevation-required", message: a ?? "This needs an elevated session." } : { kind: "refused", message: "This can only be done in the admin, in an elevated session." } : { kind: "refused", message: a ?? "The server refused this." };
2499
- }
2500
- const tn = "coolms-kit:reread";
2501
- function vl() {
2502
- window.dispatchEvent(new Event(tn));
2503
- }
2504
- function gl(n) {
2505
- const [t, l] = D(void 0), [s, a] = D(void 0), [c, f] = D(!0), u = P(n);
2506
- u.current = n;
2507
- const m = P(0), _ = Ie(() => {
2508
- const i = ++m.current;
2509
- f(!0), u.current().then(
2280
+ function kl(e, t, l, s) {
2281
+ if (e !== 403) return { kind: "none" };
2282
+ const a = $t(l);
2283
+ return It(t, "X-Elevation-Required") !== void 0 ? s.elevates ? { kind: "elevation-required", message: a ?? "This needs an elevated session." } : { kind: "refused", message: "This can only be done in the admin, in an elevated session." } : { kind: "refused", message: a ?? "The server refused this." };
2284
+ }
2285
+ const sn = "coolms-kit:reread";
2286
+ function xl() {
2287
+ window.dispatchEvent(new Event(sn));
2288
+ }
2289
+ function Ml(e) {
2290
+ const [t, l] = D(void 0), [s, a] = D(void 0), [i, h] = D(!0), d = O(e);
2291
+ d.current = e;
2292
+ const u = O(0), b = Ie(() => {
2293
+ const c = ++u.current;
2294
+ h(!0), d.current().then(
2510
2295
  (v) => {
2511
- i === m.current && (l(v), a(void 0), f(!1));
2296
+ c === u.current && (l(v), a(void 0), h(!1));
2512
2297
  },
2513
2298
  (v) => {
2514
- i === m.current && (a(v), f(!1));
2299
+ c === u.current && (a(v), h(!1));
2515
2300
  }
2516
2301
  );
2517
2302
  }, []);
2518
- return ee(() => {
2519
- _();
2520
- const i = () => _();
2521
- return window.addEventListener("focus", i), window.addEventListener(tn, i), () => {
2522
- window.removeEventListener("focus", i), window.removeEventListener(tn, i);
2303
+ return Q(() => {
2304
+ b();
2305
+ const c = () => b();
2306
+ return window.addEventListener("focus", c), window.addEventListener(sn, c), () => {
2307
+ window.removeEventListener("focus", c), window.removeEventListener(sn, c);
2523
2308
  };
2524
- }, [_]), { value: t, error: s, loading: c, reread: _ };
2309
+ }, [b]), { value: t, error: s, loading: i, reread: b };
2525
2310
  }
2526
- function yl(n) {
2527
- return n === 412 ? { conflict: !0, message: "Someone changed this since you opened it. Nothing was saved; read it again to see the change." } : { conflict: !1 };
2311
+ function Cl(e) {
2312
+ return e === 412 ? { conflict: !0, message: "Someone changed this since you opened it. Nothing was saved; read it again to see the change." } : { conflict: !1 };
2528
2313
  }
2529
- const At = "/errors/client-update-required";
2530
- function Tt(n, t) {
2531
- const l = n.split(".").map((a) => Number.parseInt(a, 10) || 0), s = t.split(".").map((a) => Number.parseInt(a, 10) || 0);
2314
+ const Bt = "/errors/client-update-required";
2315
+ function Ft(e, t) {
2316
+ const l = e.split(".").map((a) => Number.parseInt(a, 10) || 0), s = t.split(".").map((a) => Number.parseInt(a, 10) || 0);
2532
2317
  for (let a = 0; a < Math.max(l.length, s.length); a++) {
2533
- const c = l[a] ?? 0, f = s[a] ?? 0;
2534
- if (c !== f) return c < f;
2318
+ const i = l[a] ?? 0, h = s[a] ?? 0;
2319
+ if (i !== h) return i < h;
2535
2320
  }
2536
2321
  return !1;
2537
2322
  }
2538
- function wl(n) {
2539
- return n.problemType !== void 0 && n.problemType.endsWith(At) ? !0 : n.minimumVersion !== void 0 && Tt(n.version, n.minimumVersion);
2323
+ function Sl(e) {
2324
+ return e.problemType !== void 0 && e.problemType.endsWith(Bt) ? !0 : e.minimumVersion !== void 0 && Ft(e.version, e.minimumVersion);
2540
2325
  }
2541
- const ze = "primary", Nn = 4, Lt = 48;
2542
- function Dt(n, t, l) {
2543
- const s = n.querySelector(":scope > .cms-screen__bar");
2326
+ const ze = "primary", Mn = 4, Rt = 48;
2327
+ function Ht(e, t, l) {
2328
+ const s = e.querySelector(":scope > .cms-screen__bar");
2544
2329
  return l <= t.scrollHeight - t.clientHeight - ((s == null ? void 0 : s.offsetHeight) ?? 0);
2545
2330
  }
2546
- const It = 800, $t = /* @__PURE__ */ new Set(["ArrowDown", "ArrowUp", "PageDown", "PageUp", "Home", "End", " "]);
2547
- function Bt(n, t) {
2331
+ const Ot = 800, Pt = /* @__PURE__ */ new Set(["ArrowDown", "ArrowUp", "PageDown", "PageUp", "Home", "End", " "]);
2332
+ function zt(e, t) {
2548
2333
  const [l, s] = D(!1);
2549
- return ee(() => {
2550
- const a = n.current;
2334
+ return Q(() => {
2335
+ const a = e.current;
2551
2336
  if (a === null || !t) {
2552
2337
  s(!1);
2553
2338
  return;
2554
2339
  }
2555
- const c = /* @__PURE__ */ new WeakMap();
2556
- let f = Number.NEGATIVE_INFINITY, u = null;
2557
- const m = (h) => {
2558
- f = performance.now(), u = h.target;
2559
- }, _ = (h) => {
2560
- const w = h.target;
2561
- !(w instanceof HTMLElement && (w.isContentEditable || w.closest("input, textarea, select") !== null)) && $t.has(h.key) && m(h);
2562
- }, i = (h) => {
2563
- const w = h.target;
2564
- if (!(w instanceof HTMLElement)) return;
2565
- const r = w.scrollTop, g = c.get(w) ?? 0;
2566
- if (c.set(w, r), r <= 0) {
2340
+ const i = /* @__PURE__ */ new WeakMap();
2341
+ let h = Number.NEGATIVE_INFINITY, d = null;
2342
+ const u = (m) => {
2343
+ h = performance.now(), d = m.target;
2344
+ }, b = (m) => {
2345
+ const N = m.target;
2346
+ !(N instanceof HTMLElement && (N.isContentEditable || N.closest("input, textarea, select") !== null)) && Pt.has(m.key) && u(m);
2347
+ }, c = (m) => {
2348
+ const N = m.target;
2349
+ if (!(N instanceof HTMLElement)) return;
2350
+ const r = N.scrollTop, g = i.get(N) ?? 0;
2351
+ if (i.set(N, r), r <= 0) {
2567
2352
  s(!1);
2568
2353
  return;
2569
2354
  }
2570
- performance.now() - f > It || !(u === a || u === document.body || u instanceof Node && w.contains(u)) || (r < g - Nn ? s(!1) : r > g + Nn && r > Lt && Dt(a, w, r) && s(!0));
2571
- }, v = [["wheel", m], ["touchmove", m], ["pointerdown", m], ["keydown", _]];
2572
- for (const [h, w] of v) a.addEventListener(h, w, { capture: !0, passive: !0 });
2573
- return a.addEventListener("scroll", i, { capture: !0, passive: !0 }), () => {
2574
- for (const [h, w] of v) a.removeEventListener(h, w, { capture: !0 });
2575
- a.removeEventListener("scroll", i, { capture: !0 });
2355
+ performance.now() - h > Ot || !(d === a || d === document.body || d instanceof Node && N.contains(d)) || (r < g - Mn ? s(!1) : r > g + Mn && r > Rt && Ht(a, N, r) && s(!0));
2356
+ }, v = [["wheel", u], ["touchmove", u], ["pointerdown", u], ["keydown", b]];
2357
+ for (const [m, N] of v) a.addEventListener(m, N, { capture: !0, passive: !0 });
2358
+ return a.addEventListener("scroll", c, { capture: !0, passive: !0 }), () => {
2359
+ for (const [m, N] of v) a.removeEventListener(m, N, { capture: !0 });
2360
+ a.removeEventListener("scroll", c, { capture: !0 });
2576
2361
  };
2577
- }, [n, t]), [l, s];
2362
+ }, [e, t]), [l, s];
2578
2363
  }
2579
- const Ft = 64;
2580
- function Ht({ bar: n, leading: t, gap: l, icon: s, iconGap: a, search: c, more: f, globals: u, name: m, choice: _ }) {
2581
- const i = [...c ? [s] : [], s, s, ...u], v = i.reduce((w, r) => w + r, 0) + a * (i.length - 1);
2582
- return n - (t > 0 ? t + l : 0) - l - v + 0.01 < Math.min(Ft, m) + _;
2364
+ const Ut = 64;
2365
+ function Kt({ bar: e, leading: t, gap: l, icon: s, iconGap: a, search: i, more: h, globals: d, name: u, choice: b }) {
2366
+ const c = [...i ? [s] : [], s, s, ...d], v = c.reduce((N, r) => N + r, 0) + a * (c.length - 1);
2367
+ return e - (t > 0 ? t + l : 0) - l - v + 0.01 < Math.min(Ut, u) + b;
2583
2368
  }
2584
- function Nl({ title: n, back: t, navigation: l, search: s, searching: a, more: c = [], moreLabel: f = "More actions", globals: u, filter: m, primary: _, onRefresh: i, pullText: v, barHidden: h, children: w }) {
2369
+ function El({ title: e, back: t, navigation: l, search: s, searching: a, more: i = [], moreLabel: h = "More actions", globals: d, filter: u, primary: b, onRefresh: c, pullText: v, barHidden: m, children: N }) {
2585
2370
  var Te, Ee;
2586
- const r = _ === void 0 || ("menu" in _ ? !_.menu.some((R) => R.offer.offered) : ((Te = _.offer) == null ? void 0 : Te.offered) === !1) ? void 0 : _, g = r !== void 0 && !("menu" in r) ? ((Ee = r.offer) == null ? void 0 : Ee.refusal) ?? null : null, T = fe(), [x, M] = D(!1), E = rn(), b = P(null), N = P(null), [I, K] = D(!1), [z, k] = D(null), [F, U] = D(null), Y = Ie(() => U(null), []), W = P(!1), j = P(null), X = P(null), ne = P(null), ce = c.some((R) => R.offer.offered), be = F !== null && ce && a === void 0;
2587
- Tn(m);
2588
- const oe = m === void 0 ? null : Sn(m), [ue, Ce] = D(!1), pe = P(!1), le = P(!1), _e = P(null), ve = m === void 0 ? void 0 : {
2589
- ...m,
2371
+ const r = 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, g = r !== void 0 && !("menu" in r) ? ((Ee = r.offer) == null ? void 0 : Ee.refusal) ?? null : null, T = he(), [C, S] = D(!1), x = dn(), _ = O(null), y = O(null), [I, U] = D(!1), [P, k] = D(null), [B, z] = D(null), j = Ie(() => z(null), []), K = O(!1), G = O(null), Y = O(null), ee = O(null), ie = i.some((R) => R.offer.offered), be = B !== null && ie && a === void 0;
2372
+ Dn(u);
2373
+ const ce = u === void 0 ? null : An(u), [de, Ce] = D(!1), fe = O(!1), te = O(!1), pe = O(null), _e = u === void 0 ? void 0 : {
2374
+ ...u,
2590
2375
  onChange: (R) => {
2591
- pe.current = !0, m.onChange(R);
2376
+ fe.current = !0, u.onChange(R);
2592
2377
  }
2593
- }, ye = oe === null ? "" : ` · ${oe.label}`, te = m !== void 0 && m.options.length >= 2, [we, y] = D(!1), S = te && ce && we, Z = JSON.stringify([te, ce, S, s !== void 0, a !== void 0, t !== void 0, n, ye]), G = Ie(() => {
2594
- const R = j.current, J = X.current, Ne = ne.current;
2595
- if (R === null || J === null || Ne === null || !te) return null;
2596
- const de = (Q) => parseFloat(Q) || 0, d = getComputedStyle(R), A = R.getBoundingClientRect().width;
2378
+ }, we = ce === null ? "" : ` · ${ce.label}`, ne = u !== void 0 && u.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 oe = (J) => parseFloat(J) || 0, o = getComputedStyle(R), A = R.getBoundingClientRect().width;
2597
2382
  if (A === 0) return null;
2598
- const C = (Q) => {
2383
+ const M = (J) => {
2599
2384
  var ke;
2600
- return ((ke = R.querySelector(`.cms-screen__ruler > [data-ruler="${Q}"]`)) == null ? void 0 : ke.getBoundingClientRect().width) ?? 0;
2601
- }, O = R.querySelector(".cms-screen__leading"), se = (s !== void 0 ? 1 : 0) + (S ? 0 : 1) + 1;
2602
- return Ht({
2603
- bar: A - de(d.paddingLeft) - de(d.paddingRight),
2604
- leading: O === null || O.childNodes.length === 0 ? 0 : de(getComputedStyle(O).minWidth),
2605
- gap: de(d.columnGap),
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;
2387
+ return Kt({
2388
+ bar: A - oe(o.paddingLeft) - oe(o.paddingRight),
2389
+ leading: H === null || H.childNodes.length === 0 ? 0 : oe(getComputedStyle(H).minWidth),
2390
+ gap: oe(o.columnGap),
2606
2391
  icon: Ne.getBoundingClientRect().width,
2607
- iconGap: de(getComputedStyle(J).columnGap),
2392
+ iconGap: oe(getComputedStyle(X).columnGap),
2608
2393
  search: s !== void 0,
2609
2394
  more: !0,
2610
- globals: Array.from(J.children).slice(se).map((Q) => Q.getBoundingClientRect().width),
2611
- name: C("name"),
2612
- choice: C("choice")
2395
+ globals: Array.from(X.children).slice(le).map((J) => J.getBoundingClientRect().width),
2396
+ name: M("name"),
2397
+ choice: M("choice")
2613
2398
  });
2614
- }, [Z]);
2399
+ }, [W]);
2615
2400
  $e(() => {
2616
- const R = G() ?? we;
2617
- R !== we && pe.current && (le.current = !0), pe.current = !1, y(R);
2618
- }, [G]), ee(() => {
2619
- if (j.current === null || typeof ResizeObserver > "u") return;
2401
+ const R = q() ?? ye;
2402
+ R !== ye && fe.current && (te.current = !0), fe.current = !1, w(R);
2403
+ }, [q]), Q(() => {
2404
+ if (G.current === null || typeof ResizeObserver > "u") return;
2620
2405
  const R = new ResizeObserver(() => {
2621
- const J = G();
2622
- J !== null && y(J);
2406
+ const X = q();
2407
+ X !== null && w(X);
2623
2408
  });
2624
- for (const J of [j.current, X.current, ...j.current.querySelectorAll(".cms-screen__ruler > span")]) J !== null && R.observe(J);
2409
+ for (const X of [G.current, Y.current, ...G.current.querySelectorAll(".cms-screen__ruler > span")]) X !== null && R.observe(X);
2625
2410
  return () => R.disconnect();
2626
- }, [G]);
2627
- const p = P(S);
2411
+ }, [q]);
2412
+ const p = O(E);
2628
2413
  $e(() => {
2629
- var Ne, de, d;
2630
- if (p.current === S) return;
2631
- p.current = S, U(null);
2414
+ var Ne, oe, o;
2415
+ if (p.current === E) return;
2416
+ p.current = E, z(null);
2632
2417
  const R = document.activeElement;
2633
- (R === document.body && _e.current !== null && !_e.current.isConnected || le.current && (R === document.body || ((Ne = j.current) == null ? void 0 : Ne.contains(R)) === !0)) && ((d = S ? ne.current : (de = X.current) == null ? void 0 : de.querySelector(".cms-filter-menu")) == null || d.focus()), le.current = !1;
2634
- }, [S]);
2635
- const L = S && oe !== null && m !== void 0 ? `${f}, ${En(m)}` : f, me = st(N, i === void 0 ? null : () => {
2636
- I || (K(!0), i().finally(() => K(!1)));
2637
- }), re = i === void 0 ? null : { distance: me, refreshing: I, text: v ?? null }, he = a !== void 0 || me > 0 || I || be || ue, [Se, We] = Bt(b, h === void 0 && !he), Fe = !he && (h ?? Se);
2638
- return /* @__PURE__ */ o(
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 : (oe = Y.current) == null ? void 0 : oe.querySelector(".cms-filter-menu")) == null || o.focus()), te.current = !1;
2419
+ }, [E]);
2420
+ const L = E && ce !== null && u !== void 0 ? `${h}, ${Tn(u)}` : h, ue = dt(y, c === void 0 ? null : () => {
2421
+ I || (U(!0), c().finally(() => U(!1)));
2422
+ }), ae = c === void 0 ? null : { distance: ue, refreshing: I, text: v ?? null }, me = a !== void 0 || ue > 0 || I || be || de, [Se, We] = zt(_, m === void 0 && !me), Fe = !me && (m ?? Se);
2423
+ return /* @__PURE__ */ f(
2639
2424
  "div",
2640
2425
  {
2641
- ref: b,
2642
- className: H("cms-screen", r !== void 0 && "cms-screen--with-primary"),
2426
+ ref: _,
2427
+ className: F("cms-screen", r !== void 0 && "cms-screen--with-primary"),
2643
2428
  "data-bar-hidden": Fe ? "" : void 0,
2644
2429
  onFocus: (R) => {
2645
- _e.current = R.target, Fe && R.target instanceof Element && R.target.closest(".cms-screen__bar") !== null && We(!1);
2430
+ pe.current = R.target, Fe && R.target instanceof Element && R.target.closest(".cms-screen__bar") !== null && We(!1);
2646
2431
  },
2647
2432
  children: [
2648
- a !== void 0 ? /* @__PURE__ */ o("header", { className: "cms-screen__bar cms-screen__bar--searching", children: [
2649
- /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button cms-screen__icon", "aria-label": a.closeLabel, title: a.closeLabel, onClick: a.onClose, children: /* @__PURE__ */ e(B, { name: "chevron-left" }) }),
2650
- /* @__PURE__ */ e("div", { className: "cms-screen__search", children: a.field })
2651
- ] }) : /* @__PURE__ */ o("header", { ref: j, className: "cms-screen__bar", children: [
2652
- /* @__PURE__ */ e("div", { className: "cms-screen__leading", children: t !== void 0 ? t.href !== void 0 ? /* @__PURE__ */ o("a", { className: "cms-screen__back", href: t.href, onClick: t.onBack, children: [
2653
- /* @__PURE__ */ e(B, { name: "chevron-left" }),
2654
- /* @__PURE__ */ e("span", { className: "cms-screen__back-name", children: t.label })
2655
- ] }) : /* @__PURE__ */ o("button", { type: "button", className: "cms-screen__back", onClick: t.onBack, children: [
2656
- /* @__PURE__ */ e(B, { name: "chevron-left" }),
2657
- /* @__PURE__ */ e("span", { className: "cms-screen__back-name", children: t.label })
2433
+ a !== void 0 ? /* @__PURE__ */ f("header", { className: "cms-screen__bar cms-screen__bar--searching", children: [
2434
+ /* @__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
+ /* @__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: [
2438
+ /* @__PURE__ */ n($, { name: "chevron-left" }),
2439
+ /* @__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: [
2441
+ /* @__PURE__ */ n($, { name: "chevron-left" }),
2442
+ /* @__PURE__ */ n("span", { className: "cms-screen__back-name", children: t.label })
2658
2443
  ] }) : l }),
2659
- oe === null ? /* @__PURE__ */ e("h1", { className: "cms-screen__title", title: n, children: n }) : /* @__PURE__ */ o("h1", { className: "cms-screen__title cms-screen__title--filtered", title: n + ye, children: [
2660
- /* @__PURE__ */ o("span", { className: "cms-screen__title-place", children: [
2661
- /* @__PURE__ */ e("span", { className: "cms-screen__title-name", children: n }),
2662
- /* @__PURE__ */ e("span", { className: "cms-screen__title-dot", children: " · " })
2444
+ ce === 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: [
2446
+ /* @__PURE__ */ n("span", { className: "cms-screen__title-name", children: e }),
2447
+ /* @__PURE__ */ n("span", { className: "cms-screen__title-dot", children: " · " })
2663
2448
  ] }),
2664
- /* @__PURE__ */ e("span", { className: "cms-screen__title-choice", children: oe.label })
2449
+ /* @__PURE__ */ n("span", { className: "cms-screen__title-choice", children: ce.label })
2665
2450
  ] }),
2666
- te && ce ? /* @__PURE__ */ o("span", { className: "cms-screen__ruler", "aria-hidden": "true", children: [
2667
- /* @__PURE__ */ e("span", { "data-ruler": "name", children: n }),
2668
- oe !== null ? /* @__PURE__ */ e("span", { "data-ruler": "choice", children: ye }) : null
2451
+ ne && ie ? /* @__PURE__ */ f("span", { className: "cms-screen__ruler", "aria-hidden": "true", children: [
2452
+ /* @__PURE__ */ n("span", { "data-ruler": "name", children: e }),
2453
+ ce !== null ? /* @__PURE__ */ n("span", { "data-ruler": "choice", children: we }) : null
2669
2454
  ] }) : null,
2670
- /* @__PURE__ */ o("div", { ref: X, className: "cms-screen__trailing", children: [
2671
- s !== void 0 ? /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button cms-screen__icon", "aria-label": s.label, title: s.label, onClick: s.onOpen, children: /* @__PURE__ */ e(B, { name: "search" }) }) : null,
2672
- ve !== void 0 && !S ? /* @__PURE__ */ e(Ln, { ...ve, iconOnly: !0, onOpenChange: Ce }) : null,
2673
- ce ? /* @__PURE__ */ e(
2455
+ /* @__PURE__ */ f("div", { ref: Y, className: "cms-screen__trailing", children: [
2456
+ 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
+ _e !== void 0 && !E ? /* @__PURE__ */ n(In, { ..._e, iconOnly: !0, onOpenChange: Ce }) : null,
2458
+ ie ? /* @__PURE__ */ n(
2674
2459
  "button",
2675
2460
  {
2676
- ref: ne,
2461
+ ref: ee,
2677
2462
  type: "button",
2678
- className: H("cms-icon-button cms-screen__icon", S && oe !== null && "cms-screen__icon--active"),
2463
+ className: F("cms-icon-button cms-screen__icon", E && ce !== null && "cms-screen__icon--active"),
2679
2464
  "data-action": "more",
2680
2465
  "aria-haspopup": "menu",
2681
2466
  "aria-expanded": be,
2682
2467
  "aria-label": L,
2683
2468
  title: L,
2684
2469
  onMouseDown: () => {
2685
- W.current = be;
2470
+ K.current = be;
2686
2471
  },
2687
2472
  onClick: (R) => {
2688
- const J = R.currentTarget.getBoundingClientRect();
2689
- U(W.current ? null : { x: J.left, y: J.bottom + 4 }), W.current = !1;
2473
+ const X = R.currentTarget.getBoundingClientRect();
2474
+ z(K.current ? null : { x: X.left, y: X.bottom + 4 }), K.current = !1;
2690
2475
  },
2691
- children: /* @__PURE__ */ e(B, { name: "more" })
2476
+ children: /* @__PURE__ */ n($, { name: "more" })
2692
2477
  }
2693
2478
  ) : null,
2694
- u
2479
+ d
2695
2480
  ] })
2696
2481
  ] }),
2697
- /* @__PURE__ */ e("div", { ref: N, className: "cms-screen__content", "data-pulling": me > 0 ? "" : void 0, "data-refreshing": I ? "" : void 0, children: /* @__PURE__ */ e(Cn.Provider, { value: re, children: w }) }),
2698
- r !== void 0 ? /* @__PURE__ */ o(
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
+ r !== void 0 ? /* @__PURE__ */ f(
2699
2484
  "button",
2700
2485
  {
2701
2486
  type: "button",
@@ -2704,118 +2489,118 @@ function Nl({ title: n, back: t, navigation: l, search: s, searching: a, more: c
2704
2489
  ...g === null ? { title: r.label } : {
2705
2490
  "aria-disabled": !0,
2706
2491
  "aria-describedby": T,
2707
- ...x ? { "data-reason-shown": "" } : {},
2708
- ...E.dismissed(ze) ? { "data-tip-dismissed": "" } : {}
2492
+ ...C ? { "data-reason-shown": "" } : {},
2493
+ ...x.dismissed(ze) ? { "data-tip-dismissed": "" } : {}
2709
2494
  },
2710
- ..."menu" in r ? { "aria-haspopup": "menu", "aria-expanded": z !== null } : {},
2711
- onFocus: () => E.focusIn(ze),
2495
+ ..."menu" in r ? { "aria-haspopup": "menu", "aria-expanded": P !== null } : {},
2496
+ onFocus: () => x.focusIn(ze),
2712
2497
  onBlur: () => {
2713
- M(!1), E.focusOut(ze);
2498
+ S(!1), x.focusOut(ze);
2714
2499
  },
2715
- onMouseEnter: () => E.pointerIn(ze),
2716
- onMouseLeave: () => E.pointerOut(ze),
2500
+ onMouseEnter: () => x.pointerIn(ze),
2501
+ onMouseLeave: () => x.pointerOut(ze),
2717
2502
  onKeyDown: (R) => {
2718
- R.key === "Escape" && g !== null && (M(!1), E.dismiss(ze));
2503
+ R.key === "Escape" && g !== null && (S(!1), x.dismiss(ze));
2719
2504
  },
2720
2505
  onClick: (R) => {
2721
2506
  if (g !== null)
2722
- M(!0), E.show(ze);
2507
+ S(!0), x.show(ze);
2723
2508
  else if ("menu" in r) {
2724
- const J = R.currentTarget.getBoundingClientRect();
2725
- k(z === null ? { x: J.left, y: J.top } : null);
2509
+ const X = R.currentTarget.getBoundingClientRect();
2510
+ k(P === null ? { x: X.left, y: X.top } : null);
2726
2511
  } else
2727
2512
  r.onPress();
2728
2513
  },
2729
2514
  children: [
2730
- /* @__PURE__ */ e(B, { name: r.icon, size: 24 }),
2731
- g !== null ? /* @__PURE__ */ e("span", { className: "cms-screen__tip", role: "tooltip", id: T, children: g }) : null
2515
+ /* @__PURE__ */ n($, { name: r.icon, size: 24 }),
2516
+ g !== null ? /* @__PURE__ */ n("span", { className: "cms-screen__tip", role: "tooltip", id: T, children: g }) : null
2732
2517
  ]
2733
2518
  }
2734
2519
  ) : null,
2735
- /* @__PURE__ */ e(
2520
+ /* @__PURE__ */ n(
2736
2521
  Ke,
2737
2522
  {
2738
- at: be ? F : null,
2739
- items: S && ve !== void 0 ? [...c, ...An(ve, ve.label)] : c,
2740
- onClose: Y,
2741
- label: f,
2523
+ at: be ? B : null,
2524
+ items: E && _e !== void 0 ? [...i, ...Ln(_e, _e.label)] : i,
2525
+ onClose: j,
2526
+ label: h,
2742
2527
  focus: "first"
2743
2528
  }
2744
2529
  ),
2745
- r !== void 0 && "menu" in r ? /* @__PURE__ */ e(Ke, { at: z, items: r.menu, onClose: () => k(null), label: r.label }) : null
2530
+ r !== void 0 && "menu" in r ? /* @__PURE__ */ n(Ke, { at: P, items: r.menu, onClose: () => k(null), label: r.label }) : null
2746
2531
  ]
2747
2532
  }
2748
2533
  );
2749
2534
  }
2750
2535
  export {
2751
- tl as AppShell,
2536
+ cl as AppShell,
2752
2537
  Ye as Avatar,
2753
- pn as BOOTSTRAP_ICONS,
2754
- _t as Badge,
2538
+ vn as BOOTSTRAP_ICONS,
2539
+ Nt as Badge,
2755
2540
  De as Button,
2756
- on as CALL_LABELS,
2757
- At as CLIENT_UPDATE_REQUIRED,
2758
- dl as CallBar,
2759
- ol as CallPanel,
2760
- rl as ChatBubble,
2761
- Qt as Column,
2762
- il as Composer,
2763
- Vt as ConfirmDialog,
2541
+ mn as CALL_LABELS,
2542
+ Bt as CLIENT_UPDATE_REQUIRED,
2543
+ bl as CallBar,
2544
+ pl as CallPanel,
2545
+ ml as ChatBubble,
2546
+ al as Column,
2547
+ hl as Composer,
2548
+ Jt as ConfirmDialog,
2764
2549
  Ke as ContextMenu,
2765
- Kn as EmptyState,
2766
- Wn as ErrorBanner,
2767
- yt as FILTER_MENU_LABELS,
2768
- Yt as FilePicker,
2769
- Qn as FilePickerDenied,
2770
- et as FilePickerRestart,
2771
- jt as FileViewer,
2772
- Nt as FilterMenu,
2773
- zt as ICON_NAMES,
2774
- B as Icon,
2775
- cl as IncomingCall,
2776
- Xt as List,
2777
- hl as ListHead,
2778
- Un as Loading,
2779
- vt as MAIL_ROW_LABELS,
2780
- zn as MODAL_CLOSE_MS,
2781
- al as MailRow,
2782
- Mn as Modal,
2783
- xn as NamedIcon,
2784
- pl as Notification,
2785
- Qe as PULL_AT,
2786
- el as PageHeader,
2787
- fl as PaneToolbar,
2788
- gt as SIGN_IN_LABELS,
2789
- Je as STATE_DELAY_MS,
2790
- Nl as ScreenShell,
2791
- ll as SearchField,
2792
- Jt as SectionHeader,
2793
- Wt as Select,
2794
- ml as SignInForm,
2795
- ul as SignInLayout,
2796
- sl as SplitPanes,
2797
- pt as Splitter,
2550
+ jn as EmptyState,
2551
+ Yn as ErrorBanner,
2552
+ Ct as FILTER_MENU_LABELS,
2553
+ tl as FilePicker,
2554
+ at as FilePickerDenied,
2555
+ rt as FilePickerRestart,
2556
+ nl as FileViewer,
2557
+ Et as FilterMenu,
2558
+ qt as ICON_NAMES,
2559
+ $ as Icon,
2560
+ fl as IncomingCall,
2561
+ ll as List,
2562
+ gl as ListHead,
2563
+ Gn as Loading,
2564
+ xt as MAIL_ROW_LABELS,
2565
+ qn as MODAL_CLOSE_MS,
2566
+ ul as MailRow,
2567
+ Sn as Modal,
2568
+ Cn as NamedIcon,
2569
+ yl as Notification,
2570
+ nn as PULL_AT,
2571
+ rl as PageHeader,
2572
+ wl as PaneToolbar,
2573
+ Mt as SIGN_IN_LABELS,
2574
+ en as STATE_DELAY_MS,
2575
+ El as ScreenShell,
2576
+ ol as SearchField,
2577
+ sl as SectionHeader,
2578
+ Yt as Select,
2579
+ vl as SignInForm,
2580
+ _l as SignInLayout,
2581
+ dl as SplitPanes,
2582
+ yt as Splitter,
2798
2583
  Le as State,
2799
- nl as TabStrip,
2800
- Kt as TextArea,
2801
- Ut as TextField,
2802
- qt as Toast,
2803
- Gt as ToastRegion,
2804
- Zt as Toggle,
2805
- bt as fitPanes,
2584
+ il as TabStrip,
2585
+ jt as TextArea,
2586
+ Gt as TextField,
2587
+ Qt as Toast,
2588
+ el as ToastRegion,
2589
+ Xt as Toggle,
2590
+ kt as fitPanes,
2806
2591
  Be as iconForName,
2807
- dt as initialsOf,
2808
- Ct as isCapability,
2809
- wl as needsClientUpdate,
2810
- _l as offerFor,
2811
- yl as readConflict,
2812
- bl as readRefusal,
2813
- Et as refusalText,
2814
- vl as rereadAll,
2815
- ut as tintOf,
2816
- st as usePull,
2817
- at as usePullState,
2818
- gl as useReread,
2819
- Tt as versionBelow,
2820
- On as writtenOut
2592
+ bt as initialsOf,
2593
+ Dt as isCapability,
2594
+ Sl as needsClientUpdate,
2595
+ Nl as offerFor,
2596
+ Cl as readConflict,
2597
+ kl as readRefusal,
2598
+ $t as refusalText,
2599
+ xl as rereadAll,
2600
+ _t as tintOf,
2601
+ dt as usePull,
2602
+ ut as usePullState,
2603
+ Ml as useReread,
2604
+ Ft as versionBelow,
2605
+ Zn as writtenOut
2821
2606
  };