@coolms/ui-react 0.1.0-alpha.14 → 0.1.0-alpha.16
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/CHANGELOG.md +19 -0
- package/design-tokens.lock.json +5 -5
- package/dist/components/Collections.d.ts +4 -3
- package/dist/components/FileViewer.d.ts +40 -0
- package/dist/components/Notification.d.ts +38 -0
- package/dist/components/Workspace.d.ts +33 -3
- package/dist/index.d.ts +3 -2
- package/dist/index.js +1086 -897
- package/kit.contract.json +5 -1
- package/package.json +1 -1
- package/src/kit.css +44 -6
- package/src/tokens/coolms-tokens.css +10 -0
package/dist/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import { useId as
|
|
3
|
-
import { createPortal as
|
|
1
|
+
import { jsx as e, jsxs as d, Fragment as S } from "react/jsx-runtime";
|
|
2
|
+
import { useId as q, useState as A, useRef as U, useEffect as Y, useCallback as be, useMemo as Pe, useLayoutEffect as ke } from "react";
|
|
3
|
+
import { createPortal as xe } from "react-dom";
|
|
4
4
|
function re(n, l) {
|
|
5
|
-
const
|
|
6
|
-
for (const
|
|
7
|
-
const
|
|
8
|
-
|
|
5
|
+
const t = { ...n };
|
|
6
|
+
for (const o of Object.keys(l ?? {})) {
|
|
7
|
+
const m = l == null ? void 0 : l[o];
|
|
8
|
+
m !== void 0 && (t[o] = m);
|
|
9
9
|
}
|
|
10
|
-
return
|
|
10
|
+
return t;
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function D(...n) {
|
|
13
13
|
return n.filter(Boolean).join(" ");
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function z({ name: n }) {
|
|
16
16
|
const l = { width: 16, height: 16, viewBox: "0 0 16 16", "aria-hidden": !0, focusable: !1 };
|
|
17
17
|
switch (n) {
|
|
18
18
|
case "lock":
|
|
@@ -31,427 +31,427 @@ function K({ name: n }) {
|
|
|
31
31
|
return /* @__PURE__ */ e("svg", { ...l, className: "cms-glyph", children: /* @__PURE__ */ e("path", { fill: "currentColor", d: "M8 1a7 7 0 1 1 0 14A7 7 0 0 1 8 1Zm0 5.5a1 1 0 0 0-1 1V11a1 1 0 1 0 2 0V7.5a1 1 0 0 0-1-1ZM8 4a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z" }) });
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function ne({
|
|
35
35
|
variant: n = "secondary",
|
|
36
36
|
busy: l = !1,
|
|
37
|
-
busyLabel:
|
|
38
|
-
locked:
|
|
39
|
-
lockedReason:
|
|
40
|
-
icon:
|
|
41
|
-
disabled:
|
|
42
|
-
className:
|
|
37
|
+
busyLabel: t,
|
|
38
|
+
locked: o = !1,
|
|
39
|
+
lockedReason: m,
|
|
40
|
+
icon: s,
|
|
41
|
+
disabled: r,
|
|
42
|
+
className: i,
|
|
43
43
|
children: u,
|
|
44
|
-
type:
|
|
45
|
-
title:
|
|
44
|
+
type: p = "button",
|
|
45
|
+
title: c,
|
|
46
46
|
...h
|
|
47
47
|
}) {
|
|
48
|
-
const
|
|
49
|
-
return /* @__PURE__ */
|
|
48
|
+
const a = !!r || l;
|
|
49
|
+
return /* @__PURE__ */ d(
|
|
50
50
|
"button",
|
|
51
51
|
{
|
|
52
52
|
...h,
|
|
53
|
-
type:
|
|
54
|
-
className:
|
|
55
|
-
disabled:
|
|
53
|
+
type: p,
|
|
54
|
+
className: D("cms-button", `cms-button--${n}`, l && "is-busy", o && "is-locked", i),
|
|
55
|
+
disabled: a,
|
|
56
56
|
"aria-busy": l || void 0,
|
|
57
|
-
title:
|
|
57
|
+
title: o ? m ?? c : c,
|
|
58
58
|
children: [
|
|
59
|
-
l ? /* @__PURE__ */ e(
|
|
60
|
-
/* @__PURE__ */ e("span", { className: "cms-button__label", children: l &&
|
|
61
|
-
|
|
59
|
+
l ? /* @__PURE__ */ e(z, { name: "spinner" }) : o ? /* @__PURE__ */ e(z, { name: "lock" }) : s,
|
|
60
|
+
/* @__PURE__ */ e("span", { className: "cms-button__label", children: l && t !== void 0 ? t : u }),
|
|
61
|
+
o && m ? /* @__PURE__ */ d("span", { className: "cms-visually-hidden", children: [
|
|
62
62
|
", ",
|
|
63
|
-
|
|
63
|
+
m
|
|
64
64
|
] }) : null
|
|
65
65
|
]
|
|
66
66
|
}
|
|
67
67
|
);
|
|
68
68
|
}
|
|
69
|
-
function
|
|
70
|
-
return /* @__PURE__ */
|
|
69
|
+
function Ce({ id: n, label: l, help: t, error: o, pinned: m, children: s }) {
|
|
70
|
+
return /* @__PURE__ */ d("div", { className: D("cms-field", o != null && "is-invalid"), children: [
|
|
71
71
|
/* @__PURE__ */ e("label", { className: "cms-field__label", htmlFor: n, children: l }),
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
/* @__PURE__ */ e(
|
|
72
|
+
s,
|
|
73
|
+
m != null ? /* @__PURE__ */ d("p", { className: "cms-field__pinned", id: `${n}-pinned`, children: [
|
|
74
|
+
/* @__PURE__ */ e(z, { name: "lock" }),
|
|
75
75
|
" ",
|
|
76
|
-
|
|
76
|
+
m
|
|
77
77
|
] }) : null,
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
o != null ? /* @__PURE__ */ e("p", { className: "cms-field__error", id: `${n}-error`, role: "alert", children: o }) : null,
|
|
79
|
+
t != null ? /* @__PURE__ */ e("p", { className: "cms-field__help", id: `${n}-help`, children: t }) : null
|
|
80
80
|
] });
|
|
81
81
|
}
|
|
82
|
-
function
|
|
83
|
-
const
|
|
84
|
-
return
|
|
82
|
+
function Me(n, l) {
|
|
83
|
+
const t = [l.error != null && `${n}-error`, l.pinned != null && `${n}-pinned`, l.help != null && `${n}-help`].filter(Boolean).join(" ");
|
|
84
|
+
return t === "" ? void 0 : t;
|
|
85
85
|
}
|
|
86
|
-
const Fe = /^(\d{4})-(\d{2})-(\d{2})(?:T(\d{2}):(\d{2})(?::(\d{2}))?)?$/,
|
|
87
|
-
function
|
|
88
|
-
const
|
|
89
|
-
const h = new Date(Date.UTC(
|
|
90
|
-
return h.setUTCFullYear(
|
|
91
|
-
},
|
|
86
|
+
const Fe = /^(\d{4})-(\d{2})-(\d{2})(?:T(\d{2}):(\d{2})(?::(\d{2}))?)?$/, Be = /^(\d{2}):(\d{2})(?::(\d{2}))?$/;
|
|
87
|
+
function Ke(n, l, t) {
|
|
88
|
+
const o = (s, r, i, u = 0, p = 0, c = 0) => {
|
|
89
|
+
const h = new Date(Date.UTC(s, r - 1, i, u, p, c));
|
|
90
|
+
return h.setUTCFullYear(s), h.getUTCFullYear() === s && h.getUTCMonth() === r - 1 && h.getUTCDate() === i && h.getUTCHours() === u && h.getUTCMinutes() === p && h.getUTCSeconds() === c ? h : null;
|
|
91
|
+
}, m = (s) => ({ hour: Number(s[1]), minute: Number(s[2]), second: Number(s[3] ?? 0) });
|
|
92
92
|
try {
|
|
93
93
|
if (n === "time") {
|
|
94
|
-
const
|
|
95
|
-
if (
|
|
96
|
-
const
|
|
97
|
-
return u === null ? l : new Intl.DateTimeFormat(
|
|
94
|
+
const r = l.match(Be);
|
|
95
|
+
if (r === null) return l;
|
|
96
|
+
const i = m(r), u = o(2e3, 1, 1, i.hour, i.minute, i.second);
|
|
97
|
+
return u === null ? l : new Intl.DateTimeFormat(t, { timeStyle: r[3] === void 0 ? "short" : "medium", timeZone: "UTC" }).format(u);
|
|
98
98
|
}
|
|
99
|
-
const
|
|
100
|
-
if (
|
|
101
|
-
if (n === "date" &&
|
|
102
|
-
const
|
|
103
|
-
return
|
|
99
|
+
const s = l.match(Fe);
|
|
100
|
+
if (s === null) return l;
|
|
101
|
+
if (n === "date" && s[4] === void 0) {
|
|
102
|
+
const r = o(Number(s[1]), Number(s[2]), Number(s[3]));
|
|
103
|
+
return r === null ? l : new Intl.DateTimeFormat(t, { dateStyle: "medium", timeZone: "UTC" }).format(r);
|
|
104
104
|
}
|
|
105
|
-
if (n === "datetime-local" &&
|
|
106
|
-
const
|
|
107
|
-
return
|
|
105
|
+
if (n === "datetime-local" && s[4] !== void 0) {
|
|
106
|
+
const r = o(Number(s[1]), Number(s[2]), Number(s[3]), Number(s[4]), Number(s[5]), Number(s[6] ?? 0));
|
|
107
|
+
return r === null ? l : new Intl.DateTimeFormat(t, { dateStyle: "medium", timeStyle: s[6] === void 0 ? "short" : "medium", timeZone: "UTC" }).format(r);
|
|
108
108
|
}
|
|
109
109
|
} catch {
|
|
110
110
|
return l;
|
|
111
111
|
}
|
|
112
112
|
return l;
|
|
113
113
|
}
|
|
114
|
-
const
|
|
115
|
-
function
|
|
116
|
-
const
|
|
117
|
-
return /* @__PURE__ */ e(
|
|
114
|
+
const He = /* @__PURE__ */ new Set(["date", "time", "datetime-local"]);
|
|
115
|
+
function yn({ label: n, help: l, error: t, disabled: o, readOnly: m, pinned: s, value: r, onChange: i, placeholder: u, type: p = "text", name: c, locale: h, min: a, max: g, step: f, minLength: v, maxLength: N, required: k }) {
|
|
116
|
+
const x = q(), M = m === !0 || s != null, C = M && He.has(p), H = p === "number" && (f === "any" || typeof f == "number" && !Number.isInteger(f));
|
|
117
|
+
return /* @__PURE__ */ e(Ce, { id: x, label: n, help: l, error: t, pinned: s, children: /* @__PURE__ */ e(
|
|
118
118
|
"input",
|
|
119
119
|
{
|
|
120
|
-
id:
|
|
121
|
-
name:
|
|
122
|
-
type:
|
|
120
|
+
id: x,
|
|
121
|
+
name: c,
|
|
122
|
+
type: C ? "text" : p,
|
|
123
123
|
className: "cms-input",
|
|
124
|
-
value:
|
|
125
|
-
...
|
|
124
|
+
value: C ? Ke(p, r, h) : r,
|
|
125
|
+
...C ? { "data-value": r } : {},
|
|
126
126
|
lang: h,
|
|
127
127
|
placeholder: u,
|
|
128
|
-
disabled:
|
|
129
|
-
readOnly:
|
|
130
|
-
required:
|
|
131
|
-
"aria-required":
|
|
132
|
-
min:
|
|
133
|
-
max:
|
|
134
|
-
step:
|
|
128
|
+
disabled: o,
|
|
129
|
+
readOnly: M,
|
|
130
|
+
required: k,
|
|
131
|
+
"aria-required": k || void 0,
|
|
132
|
+
min: C ? void 0 : a,
|
|
133
|
+
max: C ? void 0 : g,
|
|
134
|
+
step: C ? void 0 : f,
|
|
135
135
|
minLength: v,
|
|
136
|
-
maxLength:
|
|
137
|
-
inputMode:
|
|
138
|
-
"aria-invalid":
|
|
139
|
-
"aria-describedby":
|
|
140
|
-
onChange: (
|
|
136
|
+
maxLength: N,
|
|
137
|
+
inputMode: p === "number" ? H ? "decimal" : "numeric" : void 0,
|
|
138
|
+
"aria-invalid": t != null || void 0,
|
|
139
|
+
"aria-describedby": Me(x, { help: l, error: t, pinned: s }),
|
|
140
|
+
onChange: (O) => i == null ? void 0 : i(O.target.value)
|
|
141
141
|
}
|
|
142
142
|
) });
|
|
143
143
|
}
|
|
144
|
-
function
|
|
145
|
-
const v =
|
|
146
|
-
return /* @__PURE__ */ e(
|
|
144
|
+
function wn({ label: n, help: l, error: t, disabled: o, readOnly: m, pinned: s, value: r, onChange: i, placeholder: u, rows: p = 4, name: c, locale: h, minLength: a, maxLength: g, required: f }) {
|
|
145
|
+
const v = q();
|
|
146
|
+
return /* @__PURE__ */ e(Ce, { id: v, label: n, help: l, error: t, pinned: s, children: /* @__PURE__ */ e(
|
|
147
147
|
"textarea",
|
|
148
148
|
{
|
|
149
149
|
id: v,
|
|
150
|
-
name:
|
|
150
|
+
name: c,
|
|
151
151
|
className: "cms-input cms-textarea",
|
|
152
|
-
rows:
|
|
153
|
-
value:
|
|
152
|
+
rows: p,
|
|
153
|
+
value: r,
|
|
154
154
|
lang: h,
|
|
155
155
|
placeholder: u,
|
|
156
|
-
disabled:
|
|
157
|
-
readOnly:
|
|
158
|
-
required:
|
|
159
|
-
"aria-required":
|
|
160
|
-
minLength:
|
|
156
|
+
disabled: o,
|
|
157
|
+
readOnly: m === !0 || s != null,
|
|
158
|
+
required: f,
|
|
159
|
+
"aria-required": f || void 0,
|
|
160
|
+
minLength: a,
|
|
161
161
|
maxLength: g,
|
|
162
|
-
"aria-invalid":
|
|
163
|
-
"aria-describedby":
|
|
164
|
-
onChange: (
|
|
162
|
+
"aria-invalid": t != null || void 0,
|
|
163
|
+
"aria-describedby": Me(v, { help: l, error: t, pinned: s }),
|
|
164
|
+
onChange: (N) => i == null ? void 0 : i(N.target.value)
|
|
165
165
|
}
|
|
166
166
|
) });
|
|
167
167
|
}
|
|
168
|
-
function
|
|
169
|
-
const
|
|
170
|
-
return /* @__PURE__ */ e(
|
|
168
|
+
function kn({ label: n, help: l, error: t, disabled: o, readOnly: m, value: s, options: r, onChange: i, emptyText: u = "Nothing to choose from yet.", name: p }) {
|
|
169
|
+
const c = q(), h = r.length === 0;
|
|
170
|
+
return /* @__PURE__ */ e(Ce, { id: c, label: n, help: h ? u : l, error: t, children: /* @__PURE__ */ e(
|
|
171
171
|
"select",
|
|
172
172
|
{
|
|
173
|
-
id:
|
|
174
|
-
name:
|
|
173
|
+
id: c,
|
|
174
|
+
name: p,
|
|
175
175
|
className: "cms-input cms-select",
|
|
176
|
-
value:
|
|
177
|
-
disabled:
|
|
178
|
-
"aria-readonly":
|
|
179
|
-
"aria-invalid":
|
|
180
|
-
"aria-describedby":
|
|
181
|
-
onChange: (
|
|
182
|
-
|
|
176
|
+
value: s,
|
|
177
|
+
disabled: o || h,
|
|
178
|
+
"aria-readonly": m || void 0,
|
|
179
|
+
"aria-invalid": t != null || void 0,
|
|
180
|
+
"aria-describedby": Me(c, { help: h ? u : l, error: t }),
|
|
181
|
+
onChange: (a) => {
|
|
182
|
+
m || i == null || i(a.target.value);
|
|
183
183
|
},
|
|
184
|
-
children:
|
|
184
|
+
children: r.map((a) => /* @__PURE__ */ e("option", { value: a.value, disabled: m && a.value !== s, children: a.label }, a.value))
|
|
185
185
|
}
|
|
186
186
|
) });
|
|
187
187
|
}
|
|
188
|
-
function
|
|
189
|
-
const
|
|
190
|
-
return /* @__PURE__ */
|
|
188
|
+
function xn({ label: n, checked: l, onChange: t, disabled: o, readOnly: m, help: s }) {
|
|
189
|
+
const r = q();
|
|
190
|
+
return /* @__PURE__ */ d("div", { className: "cms-toggle-row", children: [
|
|
191
191
|
/* @__PURE__ */ e(
|
|
192
192
|
"button",
|
|
193
193
|
{
|
|
194
|
-
id:
|
|
194
|
+
id: r,
|
|
195
195
|
type: "button",
|
|
196
196
|
role: "switch",
|
|
197
|
-
className:
|
|
197
|
+
className: D("cms-toggle", l && "is-on"),
|
|
198
198
|
"aria-checked": l,
|
|
199
|
-
"aria-readonly":
|
|
200
|
-
"aria-describedby":
|
|
201
|
-
disabled:
|
|
199
|
+
"aria-readonly": m || void 0,
|
|
200
|
+
"aria-describedby": s != null ? `${r}-help` : void 0,
|
|
201
|
+
disabled: o,
|
|
202
202
|
onClick: () => {
|
|
203
|
-
|
|
203
|
+
m || t == null || t(!l);
|
|
204
204
|
},
|
|
205
205
|
children: /* @__PURE__ */ e("span", { className: "cms-toggle__thumb" })
|
|
206
206
|
}
|
|
207
207
|
),
|
|
208
|
-
/* @__PURE__ */ e("label", { className: "cms-toggle__label", htmlFor:
|
|
209
|
-
|
|
208
|
+
/* @__PURE__ */ e("label", { className: "cms-toggle__label", htmlFor: r, children: n }),
|
|
209
|
+
s != null ? /* @__PURE__ */ e("p", { className: "cms-field__help", id: `${r}-help`, children: s }) : null
|
|
210
210
|
] });
|
|
211
211
|
}
|
|
212
|
-
const
|
|
213
|
-
function
|
|
214
|
-
const [
|
|
215
|
-
if (
|
|
212
|
+
const Oe = 150;
|
|
213
|
+
function Le({ open: n, title: l, onClose: t, dirty: o = !1, onDirtyClose: m, children: s, footer: r, closeLabel: i = "Close", initialFocus: u, className: p }) {
|
|
214
|
+
const [c, h] = A(n), [a, g] = A(!1), f = U(null), v = U(null), N = q();
|
|
215
|
+
if (Y(() => {
|
|
216
216
|
if (n) {
|
|
217
217
|
v.current = document.activeElement, h(!0), g(!1);
|
|
218
218
|
return;
|
|
219
219
|
}
|
|
220
|
-
if (!
|
|
220
|
+
if (!c) return;
|
|
221
221
|
g(!0);
|
|
222
|
-
const
|
|
223
|
-
var
|
|
224
|
-
h(!1), g(!1), (
|
|
225
|
-
},
|
|
226
|
-
return () => window.clearTimeout(
|
|
227
|
-
}, [n,
|
|
228
|
-
var
|
|
229
|
-
if (n &&
|
|
230
|
-
const
|
|
231
|
-
(
|
|
222
|
+
const x = window.setTimeout(() => {
|
|
223
|
+
var M, C;
|
|
224
|
+
h(!1), g(!1), (C = (M = v.current) == null ? void 0 : M.focus) == null || C.call(M);
|
|
225
|
+
}, Oe);
|
|
226
|
+
return () => window.clearTimeout(x);
|
|
227
|
+
}, [n, c]), Y(() => {
|
|
228
|
+
var x, M;
|
|
229
|
+
if (n && c) {
|
|
230
|
+
const C = 'input, select, textarea, button, [href], [tabindex]:not([tabindex="-1"])';
|
|
231
|
+
(M = (u == null ? void 0 : u.current) ?? ((x = f.current) == null ? void 0 : x.querySelector(`.cms-modal__body :is(${C}), .cms-modal__foot :is(${C})`)) ?? f.current) == null || M.focus();
|
|
232
232
|
}
|
|
233
|
-
}, [n,
|
|
234
|
-
const
|
|
235
|
-
|
|
233
|
+
}, [n, c, u]), !c) return null;
|
|
234
|
+
const k = () => {
|
|
235
|
+
o ? m == null || m() : t();
|
|
236
236
|
};
|
|
237
|
-
return
|
|
238
|
-
/* @__PURE__ */ e("div", { className:
|
|
239
|
-
|
|
240
|
-
}, children: /* @__PURE__ */
|
|
237
|
+
return xe(
|
|
238
|
+
/* @__PURE__ */ e("div", { className: D("cms-modal-scrim", a && "is-closing"), onMouseDown: (x) => {
|
|
239
|
+
x.target === x.currentTarget && k();
|
|
240
|
+
}, children: /* @__PURE__ */ d(
|
|
241
241
|
"div",
|
|
242
242
|
{
|
|
243
|
-
ref:
|
|
244
|
-
className:
|
|
243
|
+
ref: f,
|
|
244
|
+
className: D("cms-modal", p, a && "is-closing", o && "is-dirty"),
|
|
245
245
|
role: "dialog",
|
|
246
246
|
"aria-modal": "true",
|
|
247
|
-
"aria-labelledby":
|
|
247
|
+
"aria-labelledby": N,
|
|
248
248
|
tabIndex: -1,
|
|
249
|
-
onKeyDown: (
|
|
250
|
-
var
|
|
251
|
-
if (
|
|
252
|
-
|
|
253
|
-
else if (
|
|
254
|
-
const
|
|
255
|
-
if (!
|
|
256
|
-
const
|
|
257
|
-
|
|
249
|
+
onKeyDown: (x) => {
|
|
250
|
+
var M;
|
|
251
|
+
if (x.key === "Escape")
|
|
252
|
+
x.stopPropagation(), k();
|
|
253
|
+
else if (x.key === "Tab") {
|
|
254
|
+
const C = (M = f.current) == null ? void 0 : M.querySelectorAll('input, select, textarea, button:not([disabled]), [href], [tabindex]:not([tabindex="-1"])');
|
|
255
|
+
if (!C || C.length === 0) return;
|
|
256
|
+
const H = C[0], O = C[C.length - 1];
|
|
257
|
+
x.shiftKey && document.activeElement === H ? (x.preventDefault(), O.focus()) : !x.shiftKey && document.activeElement === O && (x.preventDefault(), H.focus());
|
|
258
258
|
}
|
|
259
259
|
},
|
|
260
260
|
children: [
|
|
261
|
-
/* @__PURE__ */
|
|
262
|
-
/* @__PURE__ */ e("h2", { className: "cms-modal__title", id:
|
|
263
|
-
/* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label":
|
|
261
|
+
/* @__PURE__ */ d("header", { className: "cms-modal__head", children: [
|
|
262
|
+
/* @__PURE__ */ e("h2", { className: "cms-modal__title", id: N, children: l }),
|
|
263
|
+
/* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": i, onClick: k, children: /* @__PURE__ */ e(z, { name: "close" }) })
|
|
264
264
|
] }),
|
|
265
|
-
/* @__PURE__ */ e("div", { className: "cms-modal__body", children:
|
|
266
|
-
|
|
265
|
+
/* @__PURE__ */ e("div", { className: "cms-modal__body", children: s }),
|
|
266
|
+
r != null ? /* @__PURE__ */ e("footer", { className: "cms-modal__foot", children: r }) : null
|
|
267
267
|
]
|
|
268
268
|
}
|
|
269
269
|
) }),
|
|
270
270
|
document.body
|
|
271
271
|
);
|
|
272
272
|
}
|
|
273
|
-
function
|
|
274
|
-
const
|
|
273
|
+
function Cn({ open: n, title: l, message: t, kind: o = "default", confirmLabel: m, cancelLabel: s, closeLabel: r, onConfirm: i, onCancel: u }) {
|
|
274
|
+
const p = o === "discard-changes";
|
|
275
275
|
return /* @__PURE__ */ e(
|
|
276
|
-
|
|
276
|
+
Le,
|
|
277
277
|
{
|
|
278
278
|
open: n,
|
|
279
279
|
title: l,
|
|
280
280
|
onClose: u,
|
|
281
|
-
...
|
|
282
|
-
footer: /* @__PURE__ */
|
|
283
|
-
/* @__PURE__ */ e(
|
|
284
|
-
/* @__PURE__ */ e(
|
|
281
|
+
...r === void 0 ? {} : { closeLabel: r },
|
|
282
|
+
footer: /* @__PURE__ */ d(S, { children: [
|
|
283
|
+
/* @__PURE__ */ e(ne, { onClick: u, children: s ?? (p ? "Keep editing" : "Cancel") }),
|
|
284
|
+
/* @__PURE__ */ e(ne, { variant: o === "default" ? "primary" : "danger", onClick: i, children: m ?? (p ? "Discard changes" : "Confirm") })
|
|
285
285
|
] }),
|
|
286
|
-
children:
|
|
287
|
-
/* @__PURE__ */ e(
|
|
286
|
+
children: o !== "default" ? /* @__PURE__ */ d("p", { className: "cms-confirm__warning", children: [
|
|
287
|
+
/* @__PURE__ */ e(z, { name: "warning" }),
|
|
288
288
|
" ",
|
|
289
|
-
|
|
290
|
-
] }) : /* @__PURE__ */ e("p", { children:
|
|
289
|
+
t
|
|
290
|
+
] }) : /* @__PURE__ */ e("p", { children: t })
|
|
291
291
|
}
|
|
292
292
|
);
|
|
293
293
|
}
|
|
294
|
-
function
|
|
295
|
-
return /* @__PURE__ */
|
|
296
|
-
/* @__PURE__ */ e(
|
|
294
|
+
function Mn({ kind: n, message: l, action: t, onDismiss: o, dismissLabel: m = "Dismiss" }) {
|
|
295
|
+
return /* @__PURE__ */ d("div", { className: D("cms-toast", `cms-toast--${n}`), role: n === "error" ? "alert" : "status", children: [
|
|
296
|
+
/* @__PURE__ */ e(z, { name: n === "success" ? "check" : n === "error" ? "warning" : "info" }),
|
|
297
297
|
/* @__PURE__ */ e("span", { className: "cms-toast__message", children: l }),
|
|
298
|
-
|
|
299
|
-
|
|
298
|
+
t ? /* @__PURE__ */ e(ne, { className: "cms-toast__action", onClick: t.onAction, children: t.label }) : null,
|
|
299
|
+
o ? /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": m, onClick: o, children: /* @__PURE__ */ e(z, { name: "close" }) }) : null
|
|
300
300
|
] });
|
|
301
301
|
}
|
|
302
|
-
function
|
|
302
|
+
function Sn({ children: n }) {
|
|
303
303
|
return /* @__PURE__ */ e("div", { className: "cms-toast-region", children: n });
|
|
304
304
|
}
|
|
305
|
-
function
|
|
306
|
-
return /* @__PURE__ */
|
|
307
|
-
/* @__PURE__ */ e(
|
|
305
|
+
function Ue({ what: n, layout: l = "inline" }) {
|
|
306
|
+
return /* @__PURE__ */ d("div", { className: D("cms-loading", `cms-loading--${l}`), role: "status", "aria-live": "polite", children: [
|
|
307
|
+
/* @__PURE__ */ e(z, { name: "spinner" }),
|
|
308
308
|
/* @__PURE__ */ e("span", { children: n })
|
|
309
309
|
] });
|
|
310
310
|
}
|
|
311
|
-
function
|
|
312
|
-
return /* @__PURE__ */
|
|
311
|
+
function ze({ title: n, hint: l, action: t }) {
|
|
312
|
+
return /* @__PURE__ */ d("div", { className: "cms-empty", children: [
|
|
313
313
|
/* @__PURE__ */ e("p", { className: "cms-empty__title", children: n }),
|
|
314
314
|
l != null ? /* @__PURE__ */ e("p", { className: "cms-empty__hint", children: l }) : null,
|
|
315
|
-
|
|
315
|
+
t != null ? /* @__PURE__ */ e("div", { className: "cms-empty__action", children: t }) : null
|
|
316
316
|
] });
|
|
317
317
|
}
|
|
318
|
-
function Re({ message: n, onRetry: l, retryLabel:
|
|
319
|
-
return /* @__PURE__ */
|
|
320
|
-
/* @__PURE__ */ e(
|
|
318
|
+
function Re({ message: n, onRetry: l, retryLabel: t = "Try again" }) {
|
|
319
|
+
return /* @__PURE__ */ d("div", { className: "cms-error-banner", role: "alert", children: [
|
|
320
|
+
/* @__PURE__ */ e(z, { name: "warning" }),
|
|
321
321
|
/* @__PURE__ */ e("span", { className: "cms-error-banner__message", children: n }),
|
|
322
|
-
l ? /* @__PURE__ */ e(
|
|
322
|
+
l ? /* @__PURE__ */ e(ne, { onClick: l, children: t }) : null
|
|
323
323
|
] });
|
|
324
324
|
}
|
|
325
325
|
const ye = 300;
|
|
326
|
-
function
|
|
326
|
+
function Ze() {
|
|
327
327
|
if (typeof window > "u" || typeof getComputedStyle != "function") return ye;
|
|
328
328
|
const n = getComputedStyle(document.documentElement).getPropertyValue("--cms-state-delay").trim(), l = n.endsWith("ms") ? Number.parseFloat(n) : n.endsWith("s") ? Number.parseFloat(n) * 1e3 : Number.NaN;
|
|
329
329
|
return Number.isFinite(l) && l >= 0 ? l : ye;
|
|
330
330
|
}
|
|
331
|
-
function
|
|
332
|
-
return /* @__PURE__ */
|
|
331
|
+
function Ve() {
|
|
332
|
+
return /* @__PURE__ */ d("svg", { className: "cms-state__spinner", viewBox: "0 0 24 24", "aria-hidden": "true", focusable: "false", children: [
|
|
333
333
|
/* @__PURE__ */ e("circle", { className: "cms-state__track", cx: "12", cy: "12", r: "10", fill: "none" }),
|
|
334
334
|
/* @__PURE__ */ e("circle", { className: "cms-state__arc", cx: "12", cy: "12", r: "10", fill: "none", pathLength: "100", strokeDasharray: "28 72" })
|
|
335
335
|
] });
|
|
336
336
|
}
|
|
337
|
-
function
|
|
338
|
-
const [
|
|
339
|
-
return
|
|
337
|
+
function ee({ kind: n, title: l, description: t, action: o, placement: m = "block" }) {
|
|
338
|
+
const [s, r] = A(n !== "loading");
|
|
339
|
+
return Y(() => {
|
|
340
340
|
if (n !== "loading") {
|
|
341
|
-
|
|
341
|
+
r(!0);
|
|
342
342
|
return;
|
|
343
343
|
}
|
|
344
|
-
|
|
345
|
-
const
|
|
346
|
-
return () => window.clearTimeout(
|
|
347
|
-
}, [n]), /* @__PURE__ */
|
|
344
|
+
r(!1);
|
|
345
|
+
const i = window.setTimeout(() => r(!0), Ze());
|
|
346
|
+
return () => window.clearTimeout(i);
|
|
347
|
+
}, [n]), /* @__PURE__ */ d(
|
|
348
348
|
"div",
|
|
349
349
|
{
|
|
350
|
-
className:
|
|
350
|
+
className: D("cms-state", `cms-state--${n}`, `cms-state--${m}`, !s && "is-waiting"),
|
|
351
351
|
role: "status",
|
|
352
352
|
"aria-live": "polite",
|
|
353
353
|
"data-kind": n,
|
|
354
354
|
children: [
|
|
355
|
-
n === "loading" ? /* @__PURE__ */ e(
|
|
356
|
-
n === "error" || n === "denied" ? /* @__PURE__ */ e(
|
|
357
|
-
/* @__PURE__ */
|
|
355
|
+
n === "loading" ? /* @__PURE__ */ e(Ve, {}) : null,
|
|
356
|
+
n === "error" || n === "denied" ? /* @__PURE__ */ e(z, { name: n === "error" ? "warning" : "lock" }) : null,
|
|
357
|
+
/* @__PURE__ */ d("span", { className: "cms-state__text", children: [
|
|
358
358
|
/* @__PURE__ */ e("span", { className: "cms-state__title", children: l }),
|
|
359
|
-
|
|
359
|
+
t !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-state__description", children: t }) : null
|
|
360
360
|
] }),
|
|
361
|
-
|
|
361
|
+
o !== void 0 && n !== "denied" ? /* @__PURE__ */ e(ne, { className: "cms-state__action", onClick: o.onAction, children: o.label }) : null
|
|
362
362
|
]
|
|
363
363
|
}
|
|
364
364
|
);
|
|
365
365
|
}
|
|
366
|
-
const
|
|
367
|
-
mail: /* @__PURE__ */
|
|
366
|
+
const $e = {
|
|
367
|
+
mail: /* @__PURE__ */ d(S, { children: [
|
|
368
368
|
/* @__PURE__ */ e("rect", { x: "3", y: "5", width: "18", height: "14", rx: "2" }),
|
|
369
369
|
/* @__PURE__ */ e("path", { d: "m3 7 9 6 9-6" })
|
|
370
370
|
] }),
|
|
371
371
|
chat: /* @__PURE__ */ e("path", { d: "M4 12a8 8 0 1 1 4 6.9L4 20l1.1-4A8 8 0 0 1 4 12Z" }),
|
|
372
372
|
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" }),
|
|
373
|
-
calendar: /* @__PURE__ */
|
|
373
|
+
calendar: /* @__PURE__ */ d(S, { children: [
|
|
374
374
|
/* @__PURE__ */ e("rect", { x: "3", y: "5", width: "18", height: "16", rx: "2" }),
|
|
375
375
|
/* @__PURE__ */ e("path", { d: "M3 10h18M8 3v4M16 3v4" })
|
|
376
376
|
] }),
|
|
377
|
-
file: /* @__PURE__ */
|
|
377
|
+
file: /* @__PURE__ */ d(S, { children: [
|
|
378
378
|
/* @__PURE__ */ e("path", { d: "M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9Z" }),
|
|
379
379
|
/* @__PURE__ */ e("path", { d: "M14 3v6h6M8 13h8M8 17h6" })
|
|
380
380
|
] }),
|
|
381
381
|
// The file, with code's angle brackets in place of its lines: a message's source.
|
|
382
|
-
"file-code": /* @__PURE__ */
|
|
382
|
+
"file-code": /* @__PURE__ */ d(S, { children: [
|
|
383
383
|
/* @__PURE__ */ e("path", { d: "M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9Z" }),
|
|
384
384
|
/* @__PURE__ */ e("path", { d: "M14 3v6h6" }),
|
|
385
385
|
/* @__PURE__ */ e("path", { d: "m10 12-2 2.5 2 2.5M14 12l2 2.5-2 2.5" })
|
|
386
386
|
] }),
|
|
387
|
-
image: /* @__PURE__ */
|
|
387
|
+
image: /* @__PURE__ */ d(S, { children: [
|
|
388
388
|
/* @__PURE__ */ e("rect", { x: "3", y: "4", width: "18", height: "16", rx: "2" }),
|
|
389
389
|
/* @__PURE__ */ e("circle", { cx: "9", cy: "10", r: "2" }),
|
|
390
390
|
/* @__PURE__ */ e("path", { d: "m21 17-5-5-9 8" })
|
|
391
391
|
] }),
|
|
392
|
-
search: /* @__PURE__ */
|
|
392
|
+
search: /* @__PURE__ */ d(S, { children: [
|
|
393
393
|
/* @__PURE__ */ e("circle", { cx: "11", cy: "11", r: "7" }),
|
|
394
394
|
/* @__PURE__ */ e("path", { d: "m20 20-4-4" })
|
|
395
395
|
] }),
|
|
396
|
-
bell: /* @__PURE__ */
|
|
396
|
+
bell: /* @__PURE__ */ d(S, { children: [
|
|
397
397
|
/* @__PURE__ */ e("path", { d: "M6 9a6 6 0 1 1 12 0c0 6 2 8 2 8H4s2-2 2-8Z" }),
|
|
398
398
|
/* @__PURE__ */ e("path", { d: "M10 20a2 2 0 0 0 4 0" })
|
|
399
399
|
] }),
|
|
400
|
-
pencil: /* @__PURE__ */
|
|
400
|
+
pencil: /* @__PURE__ */ d(S, { children: [
|
|
401
401
|
/* @__PURE__ */ e("path", { d: "M4 20h4L19 9l-4-4L4 16Z" }),
|
|
402
402
|
/* @__PURE__ */ e("path", { d: "m13 7 4 4" })
|
|
403
403
|
] }),
|
|
404
|
-
download: /* @__PURE__ */
|
|
404
|
+
download: /* @__PURE__ */ d(S, { children: [
|
|
405
405
|
/* @__PURE__ */ e("path", { d: "M12 4v11" }),
|
|
406
406
|
/* @__PURE__ */ e("path", { d: "m7 11 5 5 5-5" }),
|
|
407
407
|
/* @__PURE__ */ e("path", { d: "M4 20h16" })
|
|
408
408
|
] }),
|
|
409
|
-
print: /* @__PURE__ */
|
|
409
|
+
print: /* @__PURE__ */ d(S, { children: [
|
|
410
410
|
/* @__PURE__ */ e("path", { d: "M7 8V4h10v4" }),
|
|
411
411
|
/* @__PURE__ */ e("rect", { x: "3", y: "8", width: "18", height: "8", rx: "2" }),
|
|
412
412
|
/* @__PURE__ */ e("path", { d: "M7 14h10v6H7Z" })
|
|
413
413
|
] }),
|
|
414
|
-
"open-separately": /* @__PURE__ */
|
|
414
|
+
"open-separately": /* @__PURE__ */ d(S, { children: [
|
|
415
415
|
/* @__PURE__ */ e("path", { d: "M14 4h6v6" }),
|
|
416
416
|
/* @__PURE__ */ e("path", { d: "m20 4-9 9" }),
|
|
417
417
|
/* @__PURE__ */ e("path", { d: "M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5" })
|
|
418
418
|
] }),
|
|
419
419
|
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" }),
|
|
420
|
-
send: /* @__PURE__ */
|
|
420
|
+
send: /* @__PURE__ */ d(S, { children: [
|
|
421
421
|
/* @__PURE__ */ e("path", { d: "M21 3 10 14" }),
|
|
422
422
|
/* @__PURE__ */ e("path", { d: "M21 3 14 21l-4-7-7-4Z" })
|
|
423
423
|
] }),
|
|
424
|
-
inbox: /* @__PURE__ */
|
|
424
|
+
inbox: /* @__PURE__ */ d(S, { children: [
|
|
425
425
|
/* @__PURE__ */ e("path", { d: "M3 13h5l1 3h6l1-3h5" }),
|
|
426
426
|
/* @__PURE__ */ e("path", { d: "M5 5h14l2 8v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-6Z" })
|
|
427
427
|
] }),
|
|
428
|
-
archive: /* @__PURE__ */
|
|
428
|
+
archive: /* @__PURE__ */ d(S, { children: [
|
|
429
429
|
/* @__PURE__ */ e("rect", { x: "3", y: "4", width: "18", height: "5", rx: "1" }),
|
|
430
430
|
/* @__PURE__ */ e("path", { d: "M5 9v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V9M10 13h4" })
|
|
431
431
|
] }),
|
|
432
|
-
trash: /* @__PURE__ */
|
|
432
|
+
trash: /* @__PURE__ */ d(S, { children: [
|
|
433
433
|
/* @__PURE__ */ e("path", { d: "M4 7h16M10 11v6M14 11v6" }),
|
|
434
434
|
/* @__PURE__ */ e("path", { d: "M6 7l1 13a2 2 0 0 0 2 1h6a2 2 0 0 0 2-1l1-13M9 7V4h6v3" })
|
|
435
435
|
] }),
|
|
436
436
|
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" }),
|
|
437
|
-
mic: /* @__PURE__ */
|
|
437
|
+
mic: /* @__PURE__ */ d(S, { children: [
|
|
438
438
|
/* @__PURE__ */ e("rect", { x: "9", y: "3", width: "6", height: "11", rx: "3" }),
|
|
439
439
|
/* @__PURE__ */ e("path", { d: "M5 11a7 7 0 0 0 14 0M12 18v3" })
|
|
440
440
|
] }),
|
|
441
|
-
speaker: /* @__PURE__ */
|
|
441
|
+
speaker: /* @__PURE__ */ d(S, { children: [
|
|
442
442
|
/* @__PURE__ */ e("path", { d: "M4 9h4l5-4v14l-5-4H4Z" }),
|
|
443
443
|
/* @__PURE__ */ e("path", { d: "M16 9a4 4 0 0 1 0 6M19 6a8 8 0 0 1 0 12" })
|
|
444
444
|
] }),
|
|
445
|
-
"user-plus": /* @__PURE__ */
|
|
445
|
+
"user-plus": /* @__PURE__ */ d(S, { children: [
|
|
446
446
|
/* @__PURE__ */ e("circle", { cx: "10", cy: "8", r: "4" }),
|
|
447
447
|
/* @__PURE__ */ e("path", { d: "M3 21a7 7 0 0 1 14 0M19 8v6M16 11h6" })
|
|
448
448
|
] }),
|
|
449
449
|
"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" }),
|
|
450
|
-
video: /* @__PURE__ */
|
|
450
|
+
video: /* @__PURE__ */ d(S, { children: [
|
|
451
451
|
/* @__PURE__ */ e("rect", { x: "3", y: "6", width: "13", height: "12", rx: "2" }),
|
|
452
452
|
/* @__PURE__ */ e("path", { d: "m16 10 5-3v10l-5-3" })
|
|
453
453
|
] }),
|
|
454
|
-
info: /* @__PURE__ */
|
|
454
|
+
info: /* @__PURE__ */ d(S, { children: [
|
|
455
455
|
/* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "9" }),
|
|
456
456
|
/* @__PURE__ */ e("path", { d: "M12 11v6M12 7.5v.5" })
|
|
457
457
|
] }),
|
|
@@ -460,7 +460,7 @@ const Le = {
|
|
|
460
460
|
plus: /* @__PURE__ */ e("path", { d: "M12 5v14M5 12h14" }),
|
|
461
461
|
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" }),
|
|
462
462
|
check: /* @__PURE__ */ e("path", { d: "m5 12 5 5 9-10" }),
|
|
463
|
-
server: /* @__PURE__ */
|
|
463
|
+
server: /* @__PURE__ */ d(S, { children: [
|
|
464
464
|
/* @__PURE__ */ e("rect", { x: "3", y: "4", width: "18", height: "7", rx: "2" }),
|
|
465
465
|
/* @__PURE__ */ e("rect", { x: "3", y: "13", width: "18", height: "7", rx: "2" }),
|
|
466
466
|
/* @__PURE__ */ e("path", { d: "M7 7.5h.5M7 16.5h.5" })
|
|
@@ -472,7 +472,7 @@ const Le = {
|
|
|
472
472
|
more: /* @__PURE__ */ e("path", { d: "M5 12h.5M12 12h.5M19 12h.5" }),
|
|
473
473
|
important: /* @__PURE__ */ e("path", { d: "M4 6h11l5 6-5 6H4l4-6-4-6Z" })
|
|
474
474
|
};
|
|
475
|
-
function
|
|
475
|
+
function P({ name: n, size: l = 20, label: t }) {
|
|
476
476
|
return /* @__PURE__ */ e(
|
|
477
477
|
"svg",
|
|
478
478
|
{
|
|
@@ -486,12 +486,12 @@ function F({ name: n, size: l = 20, label: a }) {
|
|
|
486
486
|
strokeLinecap: "round",
|
|
487
487
|
strokeLinejoin: "round",
|
|
488
488
|
focusable: !1,
|
|
489
|
-
...
|
|
490
|
-
children:
|
|
489
|
+
...t ? { role: "img", "aria-label": t } : { "aria-hidden": !0 },
|
|
490
|
+
children: $e[n]
|
|
491
491
|
}
|
|
492
492
|
);
|
|
493
493
|
}
|
|
494
|
-
const
|
|
494
|
+
const An = Object.keys($e), Ae = {
|
|
495
495
|
reply: "reply",
|
|
496
496
|
"reply-all": "reply",
|
|
497
497
|
forward: "forward",
|
|
@@ -510,269 +510,302 @@ const xn = Object.keys(Le), Se = {
|
|
|
510
510
|
"three-dots": "more"
|
|
511
511
|
};
|
|
512
512
|
function _e(n) {
|
|
513
|
-
return Object.prototype.hasOwnProperty.call(
|
|
513
|
+
return Object.prototype.hasOwnProperty.call(Ae, n) ? Ae[n] : null;
|
|
514
514
|
}
|
|
515
|
-
const
|
|
516
|
-
function
|
|
515
|
+
const We = 'input, select, textarea, button:not([disabled]), iframe, [href], [tabindex]:not([tabindex="-1"])', je = 60;
|
|
516
|
+
function qe(n) {
|
|
517
517
|
return n instanceof Element && n.closest('input, select, textarea, [contenteditable="true"], [data-viewer-keys]') !== null;
|
|
518
518
|
}
|
|
519
|
-
function
|
|
519
|
+
function Xe(n) {
|
|
520
520
|
return n instanceof Element && n.closest("[data-viewer-gestures]") !== null;
|
|
521
521
|
}
|
|
522
522
|
function Ge(n) {
|
|
523
523
|
return n.getClientRects().length > 0;
|
|
524
524
|
}
|
|
525
|
-
function
|
|
526
|
-
const { name: l, badge:
|
|
527
|
-
|
|
528
|
-
var
|
|
529
|
-
const
|
|
530
|
-
return document.body.style.overflow = "hidden", (
|
|
531
|
-
var
|
|
532
|
-
document.body.style.overflow =
|
|
525
|
+
function Dn(n) {
|
|
526
|
+
const { name: l, badge: t, closeLabel: o, onClose: m, actions: s = [], moreLabel: r = "More", edit: i, editing: u, state: p, siblings: c, bar: h, thumbnails: a, strip: g, onZoom: f, children: v } = n, N = U(null), k = U(null), x = q(), [M, C] = A(!1), H = U(null);
|
|
527
|
+
Y(() => {
|
|
528
|
+
var V;
|
|
529
|
+
const y = document.activeElement, F = document.body.style.overflow;
|
|
530
|
+
return document.body.style.overflow = "hidden", (V = k.current) == null || V.focus(), () => {
|
|
531
|
+
var E;
|
|
532
|
+
document.body.style.overflow = F, (E = y == null ? void 0 : y.focus) == null || E.call(y);
|
|
533
533
|
};
|
|
534
534
|
}, []);
|
|
535
|
-
const
|
|
536
|
-
u != null && u.dirty ? u.onDirtyClose() :
|
|
537
|
-
},
|
|
538
|
-
const
|
|
539
|
-
|
|
540
|
-
},
|
|
541
|
-
var
|
|
542
|
-
const
|
|
543
|
-
if (
|
|
544
|
-
const
|
|
545
|
-
Math.abs(
|
|
535
|
+
const O = () => {
|
|
536
|
+
u != null && u.dirty ? u.onDirtyClose() : m();
|
|
537
|
+
}, le = (y) => {
|
|
538
|
+
const F = y.touches.length === 1 ? y.touches[0] : void 0;
|
|
539
|
+
H.current = F === void 0 || u !== void 0 || Xe(y.target) ? null : { x: F.clientX, y: F.clientY };
|
|
540
|
+
}, J = (y) => {
|
|
541
|
+
var X, B;
|
|
542
|
+
const F = H.current, V = y.changedTouches[0];
|
|
543
|
+
if (H.current = null, F === null || V === void 0) return;
|
|
544
|
+
const E = V.clientX - F.x;
|
|
545
|
+
Math.abs(E) < je || Math.abs(E) < Math.abs(V.clientY - F.y) || (E > 0 ? (X = c == null ? void 0 : c.onPrevious) == null || X.call(c) : (B = c == null ? void 0 : c.onNext) == null || B.call(c));
|
|
546
546
|
};
|
|
547
|
-
return
|
|
548
|
-
/* @__PURE__ */
|
|
547
|
+
return xe(
|
|
548
|
+
/* @__PURE__ */ d(
|
|
549
549
|
"div",
|
|
550
550
|
{
|
|
551
|
-
ref:
|
|
552
|
-
className:
|
|
551
|
+
ref: N,
|
|
552
|
+
className: D("cms-viewer", u !== void 0 && "is-editing"),
|
|
553
553
|
role: "dialog",
|
|
554
554
|
"aria-modal": "true",
|
|
555
|
-
"aria-labelledby":
|
|
555
|
+
"aria-labelledby": x,
|
|
556
556
|
tabIndex: -1,
|
|
557
|
-
onKeyDown: (
|
|
558
|
-
var
|
|
559
|
-
if (
|
|
557
|
+
onKeyDown: (y) => {
|
|
558
|
+
var F, V, E;
|
|
559
|
+
if (y.key === "Escape") {
|
|
560
560
|
if (u !== void 0) return;
|
|
561
|
-
|
|
562
|
-
} else if (
|
|
563
|
-
const
|
|
564
|
-
if (
|
|
565
|
-
const
|
|
566
|
-
|
|
567
|
-
} else u === void 0 && !
|
|
561
|
+
y.stopPropagation(), M ? C(!1) : m();
|
|
562
|
+
} else if (y.key === "Tab") {
|
|
563
|
+
const X = Array.from(((F = N.current) == null ? void 0 : F.querySelectorAll(We)) ?? []).filter(Ge);
|
|
564
|
+
if (X.length === 0) return;
|
|
565
|
+
const B = X[0], G = X[X.length - 1];
|
|
566
|
+
y.shiftKey && document.activeElement === B ? (y.preventDefault(), G.focus()) : !y.shiftKey && document.activeElement === G && (y.preventDefault(), B.focus());
|
|
567
|
+
} else u === void 0 && !qe(y.target) && !y.ctrlKey && !y.metaKey && !y.altKey && (y.key === "ArrowLeft" ? (V = c == null ? void 0 : c.onPrevious) == null || V.call(c) : y.key === "ArrowRight" ? (E = c == null ? void 0 : c.onNext) == null || E.call(c) : y.key === "+" || y.key === "=" ? f == null || f("in") : y.key === "-" ? f == null || f("out") : y.key === "0" && (f == null || f("reset")));
|
|
568
568
|
},
|
|
569
569
|
children: [
|
|
570
|
-
|
|
571
|
-
/* @__PURE__ */
|
|
572
|
-
/* @__PURE__ */ e("button", { ref:
|
|
573
|
-
/* @__PURE__ */ e("span", { className: "cms-viewer__badge", children:
|
|
574
|
-
/* @__PURE__ */ e("h2", { className: "cms-viewer__name", id:
|
|
575
|
-
|
|
570
|
+
c !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-visually-hidden", role: "status", children: `${l}, ${c.position}` }) : null,
|
|
571
|
+
/* @__PURE__ */ d("header", { className: "cms-viewer__top", children: [
|
|
572
|
+
/* @__PURE__ */ e("button", { ref: k, type: "button", className: "cms-viewer__icon", "aria-label": o, onClick: O, children: /* @__PURE__ */ e(z, { name: "close" }) }),
|
|
573
|
+
/* @__PURE__ */ e("span", { className: "cms-viewer__badge", children: t }),
|
|
574
|
+
/* @__PURE__ */ e("h2", { className: "cms-viewer__name", id: x, title: l, children: l }),
|
|
575
|
+
c !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-viewer__position", children: c.position }) : null,
|
|
576
576
|
/* @__PURE__ */ e("span", { className: "cms-viewer__space" }),
|
|
577
|
-
u !== void 0 ? /* @__PURE__ */
|
|
577
|
+
u !== void 0 ? /* @__PURE__ */ d(S, { children: [
|
|
578
578
|
/* @__PURE__ */ e("span", { className: "cms-viewer__status", role: "status", children: u.status }),
|
|
579
579
|
/* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__button cms-viewer__button--edit", onClick: u.onDone, children: u.doneLabel })
|
|
580
|
-
] }) : /* @__PURE__ */
|
|
581
|
-
/* @__PURE__ */ e("span", { className: "cms-viewer__actions", children:
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
] },
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
/* @__PURE__ */ e("span", { className: "cms-viewer__wide", children:
|
|
580
|
+
] }) : /* @__PURE__ */ d(S, { children: [
|
|
581
|
+
/* @__PURE__ */ e("span", { className: "cms-viewer__actions", children: s.map((y) => /* @__PURE__ */ d("button", { type: "button", className: "cms-viewer__button", onClick: y.onSelect, children: [
|
|
582
|
+
y.icon,
|
|
583
|
+
y.label
|
|
584
|
+
] }, y.label)) }),
|
|
585
|
+
i !== void 0 ? /* @__PURE__ */ d("button", { type: "button", className: "cms-viewer__button cms-viewer__button--edit", "aria-label": i.label, onClick: i.onEdit, children: [
|
|
586
|
+
i.icon,
|
|
587
|
+
/* @__PURE__ */ e("span", { className: "cms-viewer__wide", children: i.label })
|
|
588
588
|
] }) : null,
|
|
589
|
-
|
|
590
|
-
/* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__icon", "aria-label":
|
|
591
|
-
|
|
589
|
+
s.length > 0 ? /* @__PURE__ */ d("span", { className: "cms-viewer__more", children: [
|
|
590
|
+
/* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__icon", "aria-label": r, "aria-expanded": M, onClick: () => C((y) => !y), children: /* @__PURE__ */ e(P, { name: "more" }) }),
|
|
591
|
+
M ? /* @__PURE__ */ e("span", { className: "cms-viewer__menu", children: s.map((y) => /* @__PURE__ */ d(
|
|
592
592
|
"button",
|
|
593
593
|
{
|
|
594
594
|
type: "button",
|
|
595
595
|
className: "cms-viewer__button",
|
|
596
596
|
onClick: () => {
|
|
597
|
-
C(!1),
|
|
597
|
+
C(!1), y.onSelect();
|
|
598
598
|
},
|
|
599
599
|
children: [
|
|
600
|
-
|
|
601
|
-
|
|
600
|
+
y.icon,
|
|
601
|
+
y.label
|
|
602
602
|
]
|
|
603
603
|
},
|
|
604
|
-
|
|
604
|
+
y.label
|
|
605
605
|
)) }) : null
|
|
606
606
|
] }) : null
|
|
607
607
|
] })
|
|
608
608
|
] }),
|
|
609
|
-
/* @__PURE__ */
|
|
610
|
-
|
|
611
|
-
/* @__PURE__ */
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
609
|
+
/* @__PURE__ */ d("div", { className: "cms-viewer__body", children: [
|
|
610
|
+
a != null && u === void 0 ? /* @__PURE__ */ e("nav", { className: "cms-viewer__thumbnails", children: a }) : null,
|
|
611
|
+
/* @__PURE__ */ d("div", { className: "cms-viewer__content", onTouchStart: le, onTouchEnd: J, children: [
|
|
612
|
+
(u == null ? void 0 : u.conflict) !== void 0 ? /* @__PURE__ */ d("div", { className: "cms-viewer__conflict", role: "alert", children: [
|
|
613
|
+
/* @__PURE__ */ e("p", { className: "cms-viewer__conflict-text", children: u.conflict.message }),
|
|
614
|
+
/* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__button", onClick: u.conflict.onOverwrite, children: u.conflict.overwriteLabel }),
|
|
615
|
+
/* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__button cms-viewer__button--edit", onClick: u.conflict.onKeepBoth, children: u.conflict.keepBothLabel })
|
|
616
|
+
] }) : null,
|
|
617
|
+
p === void 0 ? v : /* @__PURE__ */ e(Ye, { state: p }),
|
|
618
|
+
u === void 0 && (c != null && c.onPrevious) ? /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__side cms-viewer__side--previous", "aria-label": c.previousLabel, title: c.previousLabel, onClick: c.onPrevious, children: /* @__PURE__ */ e(z, { name: "back" }) }) : null,
|
|
619
|
+
u === void 0 && (c != null && c.onNext) ? /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__side cms-viewer__side--next", "aria-label": c.nextLabel, title: c.nextLabel, onClick: c.onNext, children: /* @__PURE__ */ e(z, { name: "back" }) }) : null,
|
|
620
|
+
u === void 0 && c !== void 0 ? /* @__PURE__ */ e("div", { className: "cms-viewer__dots", "aria-hidden": "true", children: Array.from({ length: Math.min(c.total, 7) }, (y, F) => /* @__PURE__ */ e("i", { className: F === Math.min(c.index, 6) ? "is-current" : void 0 }, F)) }) : null
|
|
616
621
|
] })
|
|
617
622
|
] }),
|
|
618
|
-
u === void 0 &&
|
|
619
|
-
|
|
623
|
+
u === void 0 && g != null ? /* @__PURE__ */ e("div", { className: "cms-viewer__strip", children: g }) : null,
|
|
624
|
+
h != null ? /* @__PURE__ */ e("footer", { className: "cms-viewer__bar", children: h }) : null
|
|
620
625
|
]
|
|
621
626
|
}
|
|
622
627
|
),
|
|
623
628
|
document.body
|
|
624
629
|
);
|
|
625
630
|
}
|
|
626
|
-
|
|
631
|
+
function Ye({ state: n }) {
|
|
632
|
+
switch (n.kind) {
|
|
633
|
+
case "loading":
|
|
634
|
+
return /* @__PURE__ */ e(ee, { kind: "loading", title: n.title, placement: "page" });
|
|
635
|
+
case "error":
|
|
636
|
+
return /* @__PURE__ */ e(
|
|
637
|
+
ee,
|
|
638
|
+
{
|
|
639
|
+
kind: "error",
|
|
640
|
+
title: n.title,
|
|
641
|
+
...n.description === void 0 ? {} : { description: n.description },
|
|
642
|
+
...n.retry === void 0 ? {} : { action: { label: n.retry.label, onAction: n.retry.onRetry } },
|
|
643
|
+
placement: "page"
|
|
644
|
+
}
|
|
645
|
+
);
|
|
646
|
+
case "no-preview":
|
|
647
|
+
return /* @__PURE__ */ e(
|
|
648
|
+
ee,
|
|
649
|
+
{
|
|
650
|
+
kind: "empty",
|
|
651
|
+
title: n.title,
|
|
652
|
+
...n.description === void 0 ? {} : { description: n.description },
|
|
653
|
+
action: { label: n.download.label, onAction: n.download.onDownload },
|
|
654
|
+
placement: "page"
|
|
655
|
+
}
|
|
656
|
+
);
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
class Je extends Error {
|
|
627
660
|
constructor(l = "denied") {
|
|
628
661
|
super(l), this.name = "FilePickerDenied";
|
|
629
662
|
}
|
|
630
663
|
}
|
|
631
664
|
const Ne = (n, l) => `${n}
|
|
632
|
-
${l}`,
|
|
633
|
-
function
|
|
665
|
+
${l}`, Qe = (n, l) => n === "" ? l : `${n}/${l}`, en = 48;
|
|
666
|
+
function Tn(n) {
|
|
634
667
|
var me, ue;
|
|
635
|
-
const { open: l, spaces:
|
|
636
|
-
|
|
637
|
-
var
|
|
638
|
-
l && (h(((
|
|
639
|
-
}, [l]),
|
|
640
|
-
if (!l ||
|
|
641
|
-
let
|
|
642
|
-
return v({ status: "loading" }),
|
|
643
|
-
(
|
|
644
|
-
(
|
|
668
|
+
const { open: l, spaces: t, list: o, disabledReason: m, budget: s, formatSize: r, labels: i, onConfirm: u, onCancel: p } = n, [c, h] = A(((me = t[0]) == null ? void 0 : me.id) ?? ""), [a, g] = A(""), [f, v] = A({ status: "loading" }), [N, k] = A(0), [x, M] = A(/* @__PURE__ */ new Map()), [C, H] = A(0), [O, le] = A(!1), J = U(null), y = q();
|
|
669
|
+
Y(() => {
|
|
670
|
+
var b;
|
|
671
|
+
l && (h(((b = t[0]) == null ? void 0 : b.id) ?? ""), g(""), M(/* @__PURE__ */ new Map()), le(!1));
|
|
672
|
+
}, [l]), Y(() => {
|
|
673
|
+
if (!l || c === "") return;
|
|
674
|
+
let b = !0;
|
|
675
|
+
return v({ status: "loading" }), H(0), o(c, a).then(
|
|
676
|
+
(w) => b && v({ status: "ready", entries: w.entries, next: w.next ?? null, paging: !1 }),
|
|
677
|
+
(w) => b && v({ status: w instanceof Je ? "denied" : "error" })
|
|
645
678
|
), () => {
|
|
646
|
-
|
|
679
|
+
b = !1;
|
|
647
680
|
};
|
|
648
|
-
}, [l,
|
|
649
|
-
const
|
|
650
|
-
if (
|
|
651
|
-
const
|
|
652
|
-
v({ ...
|
|
653
|
-
(I) => v({ status: "ready", entries: [...
|
|
654
|
-
() => v({ status: "ready", entries:
|
|
681
|
+
}, [l, c, a, o, N]);
|
|
682
|
+
const F = be(() => {
|
|
683
|
+
if (f.status !== "ready" || f.next === null || f.paging) return;
|
|
684
|
+
const b = f.next, w = f.entries;
|
|
685
|
+
v({ ...f, paging: !0 }), o(c, a, b).then(
|
|
686
|
+
(I) => v({ status: "ready", entries: [...w, ...I.entries], next: I.next ?? null, paging: !1 }),
|
|
687
|
+
() => v({ status: "ready", entries: w, next: b, paging: !1 })
|
|
655
688
|
);
|
|
656
|
-
}, [
|
|
657
|
-
var
|
|
658
|
-
return ((
|
|
659
|
-
}, [
|
|
660
|
-
if (
|
|
661
|
-
const
|
|
662
|
-
return
|
|
663
|
-
}, ce = (
|
|
664
|
-
const
|
|
665
|
-
!
|
|
666
|
-
const
|
|
667
|
-
return
|
|
689
|
+
}, [f, o, c, a]), V = be((b) => {
|
|
690
|
+
var w;
|
|
691
|
+
return ((w = s == null ? void 0 : s.cost) == null ? void 0 : w.call(s, b)) ?? b.size ?? 0;
|
|
692
|
+
}, [s]), E = Pe(() => [...x.values()], [x]), X = E.reduce((b, w) => b + (w.size ?? 0), 0), B = s === void 0 ? null : s.limitBytes - s.usedBytes - E.reduce((b, w) => b + V(w), 0), G = B !== null && B < 0, ie = (b) => {
|
|
693
|
+
if (b.kind !== "file") return null;
|
|
694
|
+
const w = m == null ? void 0 : m(b);
|
|
695
|
+
return w || (B !== null && !x.has(Ne(c, b.id)) && V(b) > B ? i.overBudget : null);
|
|
696
|
+
}, ce = (b) => {
|
|
697
|
+
const w = Ne(c, b.id);
|
|
698
|
+
!x.has(w) && ie(b) !== null || M((I) => {
|
|
699
|
+
const K = new Map(I);
|
|
700
|
+
return K.has(w) ? K.delete(w) : K.set(w, { ...b, space: c, path: a }), K;
|
|
668
701
|
});
|
|
669
|
-
},
|
|
670
|
-
const I = new Map(
|
|
671
|
-
return I.delete(
|
|
672
|
-
}),
|
|
673
|
-
const
|
|
674
|
-
if (
|
|
675
|
-
|
|
676
|
-
const I =
|
|
677
|
-
|
|
678
|
-
} else
|
|
679
|
-
},
|
|
680
|
-
return /* @__PURE__ */
|
|
681
|
-
|
|
702
|
+
}, _ = (b) => g(Qe(a, b.name)), T = () => g(a.includes("/") ? a.slice(0, a.lastIndexOf("/")) : ""), Z = (b) => M((w) => {
|
|
703
|
+
const I = new Map(w);
|
|
704
|
+
return I.delete(b), I;
|
|
705
|
+
}), W = f.status === "ready" ? f.entries : [], L = (b) => {
|
|
706
|
+
const w = W[C];
|
|
707
|
+
if (b.key === "ArrowDown" || b.key === "ArrowUp" || b.key === "Home" || b.key === "End") {
|
|
708
|
+
b.preventDefault();
|
|
709
|
+
const I = W.length - 1, K = b.key === "Home" ? 0 : b.key === "End" ? I : Math.min(I, Math.max(0, C + (b.key === "ArrowDown" ? 1 : -1)));
|
|
710
|
+
H(K), K >= I - 1 && F();
|
|
711
|
+
} else b.key === "Enter" && (w == null ? void 0 : w.kind) === "folder" ? (b.preventDefault(), _(w)) : b.key === " " && (w == null ? void 0 : w.kind) === "file" ? (b.preventDefault(), ce(w)) : b.key === "Backspace" && a !== "" && (b.preventDefault(), T());
|
|
712
|
+
}, j = a === "" ? [] : a.split("/"), oe = ((ue = t.find((b) => b.id === c)) == null ? void 0 : ue.name) ?? "", de = (b) => `${y}-entry-${String(b)}`;
|
|
713
|
+
return /* @__PURE__ */ d(
|
|
714
|
+
Le,
|
|
682
715
|
{
|
|
683
716
|
open: l,
|
|
684
|
-
title:
|
|
685
|
-
onClose:
|
|
686
|
-
closeLabel:
|
|
687
|
-
initialFocus:
|
|
717
|
+
title: i.title,
|
|
718
|
+
onClose: p,
|
|
719
|
+
closeLabel: i.close,
|
|
720
|
+
initialFocus: J,
|
|
688
721
|
className: "cms-file-picker",
|
|
689
|
-
footer: /* @__PURE__ */
|
|
690
|
-
/* @__PURE__ */
|
|
691
|
-
|
|
692
|
-
|
|
722
|
+
footer: /* @__PURE__ */ d("div", { className: "cms-file-picker__foot", children: [
|
|
723
|
+
/* @__PURE__ */ d("div", { className: "cms-file-picker__summary", "aria-live": "polite", children: [
|
|
724
|
+
E.length > 0 ? /* @__PURE__ */ e("span", { children: i.total(E.length, r(X)) }) : null,
|
|
725
|
+
s !== void 0 && B !== null ? /* @__PURE__ */ e("span", { className: D(G && "is-over"), children: G ? i.overBudget : i.left(r(Math.max(0, B)), r(s.limitBytes)) }) : null
|
|
693
726
|
] }),
|
|
694
|
-
/* @__PURE__ */
|
|
695
|
-
/* @__PURE__ */ e(
|
|
696
|
-
/* @__PURE__ */ e(
|
|
727
|
+
/* @__PURE__ */ d("div", { className: "cms-file-picker__actions", children: [
|
|
728
|
+
/* @__PURE__ */ e(ne, { variant: "secondary", onClick: p, children: i.cancel }),
|
|
729
|
+
/* @__PURE__ */ e(ne, { variant: "primary", disabled: E.length === 0 || G, onClick: () => u(E), children: i.confirm(E.length) })
|
|
697
730
|
] })
|
|
698
731
|
] }),
|
|
699
732
|
children: [
|
|
700
|
-
/* @__PURE__ */
|
|
701
|
-
|
|
702
|
-
/* @__PURE__ */ e("span", { className: "cms-visually-hidden", children:
|
|
703
|
-
/* @__PURE__ */ e("select", { className: "cms-input cms-select", value:
|
|
704
|
-
h(
|
|
705
|
-
}, children:
|
|
733
|
+
/* @__PURE__ */ d("div", { className: "cms-file-picker__top", children: [
|
|
734
|
+
t.length > 1 ? /* @__PURE__ */ d("label", { className: "cms-file-picker__space", children: [
|
|
735
|
+
/* @__PURE__ */ e("span", { className: "cms-visually-hidden", children: i.space }),
|
|
736
|
+
/* @__PURE__ */ e("select", { className: "cms-input cms-select", value: c, onChange: (b) => {
|
|
737
|
+
h(b.target.value), g("");
|
|
738
|
+
}, children: t.map((b) => /* @__PURE__ */ e("option", { value: b.id, children: b.name }, b.id)) })
|
|
706
739
|
] }) : null,
|
|
707
|
-
/* @__PURE__ */
|
|
708
|
-
/* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label":
|
|
709
|
-
/* @__PURE__ */
|
|
710
|
-
/* @__PURE__ */ e("li", { children: /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__crumb", "aria-current":
|
|
711
|
-
|
|
712
|
-
const I =
|
|
713
|
-
return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__crumb", "aria-current": I ===
|
|
740
|
+
/* @__PURE__ */ d("nav", { className: "cms-file-picker__path", "aria-label": i.path, children: [
|
|
741
|
+
/* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": i.up, disabled: a === "", onClick: T, children: /* @__PURE__ */ e(P, { name: "chevron-left" }) }),
|
|
742
|
+
/* @__PURE__ */ d("ol", { children: [
|
|
743
|
+
/* @__PURE__ */ e("li", { children: /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__crumb", "aria-current": a === "" ? "location" : void 0, onClick: () => g(""), children: oe }) }),
|
|
744
|
+
j.map((b, w) => {
|
|
745
|
+
const I = j.slice(0, w + 1).join("/");
|
|
746
|
+
return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__crumb", "aria-current": I === a ? "location" : void 0, onClick: () => g(I), children: b }) }, I);
|
|
714
747
|
})
|
|
715
748
|
] })
|
|
716
749
|
] }),
|
|
717
|
-
|
|
750
|
+
E.length > 0 ? /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__chip", "aria-expanded": O, onClick: () => le((b) => !b), children: i.selected(E.length) }) : null
|
|
718
751
|
] }),
|
|
719
|
-
|
|
720
|
-
/* @__PURE__ */ e("ul", { children: [...
|
|
721
|
-
/* @__PURE__ */ e("span", { className: "cms-file-picker__name", children:
|
|
722
|
-
/* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label":
|
|
723
|
-
] },
|
|
724
|
-
/* @__PURE__ */ e(
|
|
725
|
-
|
|
726
|
-
}, children:
|
|
752
|
+
O && E.length > 0 ? /* @__PURE__ */ d("div", { className: "cms-file-picker__chosen", children: [
|
|
753
|
+
/* @__PURE__ */ e("ul", { children: [...x.entries()].map(([b, w]) => /* @__PURE__ */ d("li", { children: [
|
|
754
|
+
/* @__PURE__ */ e("span", { className: "cms-file-picker__name", children: w.name }),
|
|
755
|
+
/* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": i.remove(w.name), onClick: () => Z(b), children: /* @__PURE__ */ e(z, { name: "close" }) })
|
|
756
|
+
] }, b)) }),
|
|
757
|
+
/* @__PURE__ */ e(ne, { variant: "secondary", onClick: () => {
|
|
758
|
+
M(/* @__PURE__ */ new Map()), le(!1);
|
|
759
|
+
}, children: i.clear })
|
|
727
760
|
] }) : null,
|
|
728
|
-
/* @__PURE__ */
|
|
729
|
-
const
|
|
730
|
-
|
|
761
|
+
/* @__PURE__ */ d("div", { className: "cms-file-picker__list", onScroll: (b) => {
|
|
762
|
+
const w = b.currentTarget;
|
|
763
|
+
w.scrollTop + w.clientHeight >= w.scrollHeight - en && F();
|
|
731
764
|
}, children: [
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
/* @__PURE__ */
|
|
765
|
+
f.status === "loading" ? /* @__PURE__ */ e(ee, { kind: "loading", title: i.loading, placement: "block" }) : null,
|
|
766
|
+
f.status === "error" ? /* @__PURE__ */ e(ee, { kind: "error", title: i.error, placement: "block", action: { label: i.retry, onAction: () => k((b) => b + 1) } }) : null,
|
|
767
|
+
f.status === "denied" ? /* @__PURE__ */ e(ee, { kind: "denied", title: i.denied, placement: "block" }) : null,
|
|
768
|
+
f.status === "ready" && W.length === 0 ? /* @__PURE__ */ e(ee, { kind: "empty", title: i.empty, placement: "block" }) : null,
|
|
769
|
+
/* @__PURE__ */ d(
|
|
737
770
|
"div",
|
|
738
771
|
{
|
|
739
|
-
ref:
|
|
772
|
+
ref: J,
|
|
740
773
|
role: "listbox",
|
|
741
774
|
"aria-multiselectable": "true",
|
|
742
|
-
"aria-label":
|
|
743
|
-
"aria-activedescendant":
|
|
775
|
+
"aria-label": i.files,
|
|
776
|
+
"aria-activedescendant": W.length > 0 ? de(C) : void 0,
|
|
744
777
|
tabIndex: 0,
|
|
745
778
|
className: "cms-file-picker__entries",
|
|
746
|
-
hidden:
|
|
779
|
+
hidden: f.status !== "ready" || W.length === 0,
|
|
747
780
|
onKeyDown: L,
|
|
748
781
|
children: [
|
|
749
|
-
|
|
750
|
-
const I =
|
|
751
|
-
return /* @__PURE__ */
|
|
782
|
+
W.map((b, w) => {
|
|
783
|
+
const I = b.kind === "file" && x.has(Ne(c, b.id)), K = ie(b);
|
|
784
|
+
return /* @__PURE__ */ d(
|
|
752
785
|
"div",
|
|
753
786
|
{
|
|
754
|
-
id: de(
|
|
787
|
+
id: de(w),
|
|
755
788
|
role: "option",
|
|
756
|
-
"aria-selected":
|
|
757
|
-
"aria-disabled":
|
|
758
|
-
className:
|
|
789
|
+
"aria-selected": b.kind === "file" ? I : void 0,
|
|
790
|
+
"aria-disabled": K !== null || void 0,
|
|
791
|
+
className: D("cms-file-picker__entry", w === C && "is-active", I && "is-ticked", K !== null && "is-disabled"),
|
|
759
792
|
onClick: () => {
|
|
760
|
-
|
|
793
|
+
H(w), b.kind === "folder" ? _(b) : ce(b);
|
|
761
794
|
},
|
|
762
795
|
children: [
|
|
763
|
-
/* @__PURE__ */ e("span", { className: "cms-file-picker__tick", "aria-hidden": "true", children: I ? /* @__PURE__ */ e(
|
|
764
|
-
/* @__PURE__ */ e(
|
|
765
|
-
/* @__PURE__ */
|
|
766
|
-
/* @__PURE__ */ e("span", { className: "cms-file-picker__name", children:
|
|
767
|
-
|
|
796
|
+
/* @__PURE__ */ e("span", { className: "cms-file-picker__tick", "aria-hidden": "true", children: I ? /* @__PURE__ */ e(P, { name: "check" }) : null }),
|
|
797
|
+
/* @__PURE__ */ e(P, { name: b.kind === "folder" ? "folder" : "file" }),
|
|
798
|
+
/* @__PURE__ */ d("span", { className: "cms-file-picker__text", children: [
|
|
799
|
+
/* @__PURE__ */ e("span", { className: "cms-file-picker__name", children: b.name }),
|
|
800
|
+
K !== null ? /* @__PURE__ */ e("span", { className: "cms-file-picker__reason", children: K }) : null
|
|
768
801
|
] }),
|
|
769
|
-
|
|
802
|
+
b.kind === "file" && b.size != null ? /* @__PURE__ */ e("span", { className: "cms-file-picker__size", children: r(b.size) }) : null
|
|
770
803
|
]
|
|
771
804
|
},
|
|
772
|
-
|
|
805
|
+
b.id
|
|
773
806
|
);
|
|
774
807
|
}),
|
|
775
|
-
|
|
808
|
+
f.status === "ready" && f.paging ? /* @__PURE__ */ e("div", { className: "cms-file-picker__paging", children: /* @__PURE__ */ e(ee, { kind: "loading", title: i.loading, placement: "inline" }) }) : null
|
|
776
809
|
]
|
|
777
810
|
}
|
|
778
811
|
)
|
|
@@ -781,144 +814,144 @@ function Mn(n) {
|
|
|
781
814
|
}
|
|
782
815
|
);
|
|
783
816
|
}
|
|
784
|
-
function
|
|
785
|
-
return /* @__PURE__ */
|
|
786
|
-
|
|
817
|
+
function En({ title: n, scope: l, actions: t, backLink: o }) {
|
|
818
|
+
return /* @__PURE__ */ d("header", { className: "cms-page-header", children: [
|
|
819
|
+
o ? /* @__PURE__ */ d(
|
|
787
820
|
"a",
|
|
788
821
|
{
|
|
789
822
|
className: "cms-page-header__back",
|
|
790
|
-
href:
|
|
791
|
-
onClick: (
|
|
792
|
-
|
|
823
|
+
href: o.href ?? "#",
|
|
824
|
+
onClick: (m) => {
|
|
825
|
+
o.onBack && (m.preventDefault(), o.onBack());
|
|
793
826
|
},
|
|
794
827
|
children: [
|
|
795
|
-
/* @__PURE__ */ e(
|
|
828
|
+
/* @__PURE__ */ e(z, { name: "back" }),
|
|
796
829
|
" ",
|
|
797
|
-
|
|
830
|
+
o.label
|
|
798
831
|
]
|
|
799
832
|
}
|
|
800
833
|
) : null,
|
|
801
|
-
/* @__PURE__ */
|
|
802
|
-
/* @__PURE__ */
|
|
834
|
+
/* @__PURE__ */ d("div", { className: "cms-page-header__row", children: [
|
|
835
|
+
/* @__PURE__ */ d("div", { className: "cms-page-header__titles", children: [
|
|
803
836
|
/* @__PURE__ */ e("h1", { className: "cms-page-header__title", children: n }),
|
|
804
837
|
l != null ? /* @__PURE__ */ e("p", { className: "cms-page-header__scope", children: l }) : null
|
|
805
838
|
] }),
|
|
806
|
-
|
|
839
|
+
t != null ? /* @__PURE__ */ e("div", { className: "cms-page-header__actions", children: t }) : null
|
|
807
840
|
] })
|
|
808
841
|
] });
|
|
809
842
|
}
|
|
810
|
-
function
|
|
811
|
-
const
|
|
843
|
+
function Ln({ tabs: n, active: l, onSelect: t, label: o }) {
|
|
844
|
+
const m = U([]), s = (r, i) => {
|
|
812
845
|
var h;
|
|
813
|
-
const u = n.length - 1,
|
|
814
|
-
if (
|
|
815
|
-
|
|
816
|
-
const
|
|
817
|
-
|
|
846
|
+
const u = n.length - 1, p = r.key === "ArrowRight" ? i === u ? 0 : i + 1 : r.key === "ArrowLeft" ? i === 0 ? u : i - 1 : r.key === "Home" ? 0 : r.key === "End" ? u : null;
|
|
847
|
+
if (p === null) return;
|
|
848
|
+
r.preventDefault();
|
|
849
|
+
const c = n[p];
|
|
850
|
+
c && (t(c.id), (h = m.current[p]) == null || h.focus());
|
|
818
851
|
};
|
|
819
|
-
return /* @__PURE__ */ e("div", { className: "cms-tabs", role: "tablist", "aria-label":
|
|
820
|
-
const u =
|
|
821
|
-
return /* @__PURE__ */
|
|
852
|
+
return /* @__PURE__ */ e("div", { className: "cms-tabs", role: "tablist", "aria-label": o, children: n.map((r, i) => {
|
|
853
|
+
const u = r.id === l;
|
|
854
|
+
return /* @__PURE__ */ d(
|
|
822
855
|
"button",
|
|
823
856
|
{
|
|
824
|
-
ref: (
|
|
825
|
-
|
|
857
|
+
ref: (p) => {
|
|
858
|
+
m.current[i] = p;
|
|
826
859
|
},
|
|
827
860
|
type: "button",
|
|
828
861
|
role: "tab",
|
|
829
|
-
className:
|
|
862
|
+
className: D("cms-tab", u && "is-active"),
|
|
830
863
|
"aria-selected": u,
|
|
831
864
|
tabIndex: u ? 0 : -1,
|
|
832
|
-
onClick: () =>
|
|
833
|
-
onKeyDown: (
|
|
865
|
+
onClick: () => t(r.id),
|
|
866
|
+
onKeyDown: (p) => s(p, i),
|
|
834
867
|
children: [
|
|
835
|
-
|
|
836
|
-
|
|
868
|
+
r.label,
|
|
869
|
+
r.count !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-tab__count", children: r.count }) : null
|
|
837
870
|
]
|
|
838
871
|
},
|
|
839
|
-
|
|
872
|
+
r.id
|
|
840
873
|
);
|
|
841
874
|
}) });
|
|
842
875
|
}
|
|
843
|
-
function
|
|
844
|
-
var
|
|
876
|
+
function nn(n) {
|
|
877
|
+
var o;
|
|
845
878
|
const l = n.trim().split(/\s+/).filter(Boolean);
|
|
846
|
-
return (l.length > 1 ? [l[0][0], l[l.length - 1][0]] : [(
|
|
879
|
+
return (l.length > 1 ? [l[0][0], l[l.length - 1][0]] : [(o = l[0]) == null ? void 0 : o[0]]).filter(Boolean).join("").toUpperCase();
|
|
847
880
|
}
|
|
848
|
-
function
|
|
881
|
+
function ln(n) {
|
|
849
882
|
let l = 0;
|
|
850
|
-
for (const
|
|
851
|
-
l = l * 31 + (
|
|
883
|
+
for (const t of n.trim().toLowerCase())
|
|
884
|
+
l = l * 31 + (t.codePointAt(0) ?? 0) >>> 0;
|
|
852
885
|
return l % 6 + 1;
|
|
853
886
|
}
|
|
854
|
-
function ve({ name: n, pictureUrl: l, presence:
|
|
855
|
-
return /* @__PURE__ */
|
|
887
|
+
function ve({ name: n, pictureUrl: l, presence: t, size: o = 32 }) {
|
|
888
|
+
return /* @__PURE__ */ d(
|
|
856
889
|
"span",
|
|
857
890
|
{
|
|
858
|
-
className: `cms-avatar cms-avatar--tint-${
|
|
859
|
-
style: { width:
|
|
891
|
+
className: `cms-avatar cms-avatar--tint-${ln(n)}`,
|
|
892
|
+
style: { width: o, height: o, fontSize: Math.round(o * 0.4) },
|
|
860
893
|
role: "img",
|
|
861
|
-
"aria-label":
|
|
894
|
+
"aria-label": t ? `${n}, ${t}` : n,
|
|
862
895
|
children: [
|
|
863
|
-
l ? /* @__PURE__ */ e("img", { src: l, alt: "", className: "cms-avatar__picture" }) : /* @__PURE__ */ e("span", { "aria-hidden": "true", children:
|
|
864
|
-
|
|
896
|
+
l ? /* @__PURE__ */ e("img", { src: l, alt: "", className: "cms-avatar__picture" }) : /* @__PURE__ */ e("span", { "aria-hidden": "true", children: nn(n) }),
|
|
897
|
+
t ? /* @__PURE__ */ e("span", { className: D("cms-avatar__presence", `is-${t}`), "aria-hidden": "true" }) : null
|
|
865
898
|
]
|
|
866
899
|
}
|
|
867
900
|
);
|
|
868
901
|
}
|
|
869
|
-
function
|
|
870
|
-
return n <= 0 ? null : /* @__PURE__ */
|
|
871
|
-
/* @__PURE__ */ e("span", { "aria-hidden": "true", children: n >
|
|
902
|
+
function tn({ count: n, label: l, max: t = 99 }) {
|
|
903
|
+
return n <= 0 ? null : /* @__PURE__ */ d("span", { className: "cms-badge", children: [
|
|
904
|
+
/* @__PURE__ */ e("span", { "aria-hidden": "true", children: n > t ? `${t}+` : n }),
|
|
872
905
|
/* @__PURE__ */ e("span", { className: "cms-visually-hidden", children: l })
|
|
873
906
|
] });
|
|
874
907
|
}
|
|
875
|
-
function
|
|
876
|
-
return /* @__PURE__ */
|
|
877
|
-
/* @__PURE__ */
|
|
908
|
+
function $n({ product: n, mark: l, rail: t, active: o, onNavigate: m, server: s, search: r, account: i, children: u, railLabel: p = "Sections" }) {
|
|
909
|
+
return /* @__PURE__ */ d("div", { className: "cms-shell", children: [
|
|
910
|
+
/* @__PURE__ */ d("nav", { className: "cms-shell__rail", "aria-label": p, children: [
|
|
878
911
|
/* @__PURE__ */ e("span", { className: "cms-shell__mark", "aria-hidden": "true", children: l }),
|
|
879
|
-
/* @__PURE__ */ e("ul", { className: "cms-shell__items", children:
|
|
880
|
-
const h =
|
|
881
|
-
return /* @__PURE__ */ e("li", { children: /* @__PURE__ */
|
|
912
|
+
/* @__PURE__ */ e("ul", { className: "cms-shell__items", children: t.map((c) => {
|
|
913
|
+
const h = c.id === o;
|
|
914
|
+
return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ d(
|
|
882
915
|
"a",
|
|
883
916
|
{
|
|
884
|
-
href:
|
|
885
|
-
className:
|
|
917
|
+
href: c.href,
|
|
918
|
+
className: D("cms-shell__item", h && "is-active"),
|
|
886
919
|
"aria-current": h ? "page" : void 0,
|
|
887
|
-
title:
|
|
888
|
-
onClick: (
|
|
889
|
-
|
|
920
|
+
title: c.label,
|
|
921
|
+
onClick: (a) => {
|
|
922
|
+
m && (a.preventDefault(), m(c.id));
|
|
890
923
|
},
|
|
891
924
|
children: [
|
|
892
|
-
/* @__PURE__ */
|
|
893
|
-
/* @__PURE__ */ e(
|
|
894
|
-
|
|
925
|
+
/* @__PURE__ */ d("span", { className: "cms-shell__icon", children: [
|
|
926
|
+
/* @__PURE__ */ e(P, { name: c.icon, size: 22 }),
|
|
927
|
+
c.badge ? /* @__PURE__ */ e(tn, { count: c.badge.count, label: c.badge.label }) : null
|
|
895
928
|
] }),
|
|
896
|
-
/* @__PURE__ */ e("span", { className: "cms-shell__label", children:
|
|
929
|
+
/* @__PURE__ */ e("span", { className: "cms-shell__label", children: c.label })
|
|
897
930
|
]
|
|
898
931
|
}
|
|
899
|
-
) },
|
|
932
|
+
) }, c.id);
|
|
900
933
|
}) })
|
|
901
934
|
] }),
|
|
902
|
-
/* @__PURE__ */
|
|
935
|
+
/* @__PURE__ */ d("header", { className: "cms-shell__top", children: [
|
|
903
936
|
/* @__PURE__ */ e("span", { className: "cms-shell__product", children: n }),
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
937
|
+
s != null ? /* @__PURE__ */ e("div", { className: "cms-shell__server", children: s }) : null,
|
|
938
|
+
r != null ? /* @__PURE__ */ e("div", { className: "cms-shell__search", children: r }) : null,
|
|
939
|
+
i != null ? /* @__PURE__ */ e("div", { className: "cms-shell__account", children: i }) : null
|
|
907
940
|
] }),
|
|
908
941
|
/* @__PURE__ */ e("main", { className: "cms-shell__main", children: u })
|
|
909
942
|
] });
|
|
910
943
|
}
|
|
911
|
-
function
|
|
912
|
-
return /* @__PURE__ */
|
|
944
|
+
function In({ label: n, placeholder: l, value: t, onChange: o, onSearch: m }) {
|
|
945
|
+
return /* @__PURE__ */ d(
|
|
913
946
|
"form",
|
|
914
947
|
{
|
|
915
948
|
role: "search",
|
|
916
949
|
className: "cms-search",
|
|
917
|
-
onSubmit: (
|
|
918
|
-
|
|
950
|
+
onSubmit: (s) => {
|
|
951
|
+
s.preventDefault(), m == null || m(t);
|
|
919
952
|
},
|
|
920
953
|
children: [
|
|
921
|
-
/* @__PURE__ */ e(
|
|
954
|
+
/* @__PURE__ */ e(P, { name: "search", size: 18 }),
|
|
922
955
|
/* @__PURE__ */ e(
|
|
923
956
|
"input",
|
|
924
957
|
{
|
|
@@ -926,128 +959,214 @@ function En({ label: n, placeholder: l, value: a, onChange: i, onSearch: o }) {
|
|
|
926
959
|
type: "search",
|
|
927
960
|
"aria-label": n,
|
|
928
961
|
placeholder: l,
|
|
929
|
-
value:
|
|
930
|
-
onChange: (
|
|
962
|
+
value: t,
|
|
963
|
+
onChange: (s) => o(s.target.value)
|
|
931
964
|
}
|
|
932
965
|
)
|
|
933
966
|
]
|
|
934
967
|
}
|
|
935
968
|
);
|
|
936
969
|
}
|
|
937
|
-
function
|
|
938
|
-
const
|
|
970
|
+
function Pn({ options: n, value: l, onChange: t, label: o }) {
|
|
971
|
+
const m = U([]), s = (r, i) => {
|
|
939
972
|
var h;
|
|
940
|
-
const u = n.length - 1,
|
|
941
|
-
if (
|
|
942
|
-
|
|
943
|
-
const
|
|
944
|
-
|
|
973
|
+
const u = n.length - 1, p = r.key === "ArrowRight" || r.key === "ArrowDown" ? i === u ? 0 : i + 1 : r.key === "ArrowLeft" || r.key === "ArrowUp" ? i === 0 ? u : i - 1 : null;
|
|
974
|
+
if (p === null) return;
|
|
975
|
+
r.preventDefault();
|
|
976
|
+
const c = n[p];
|
|
977
|
+
c && (t(c.id), (h = m.current[p]) == null || h.focus());
|
|
945
978
|
};
|
|
946
|
-
return /* @__PURE__ */ e("div", { className: "cms-chips", role: "radiogroup", "aria-label":
|
|
947
|
-
const u =
|
|
948
|
-
return /* @__PURE__ */
|
|
979
|
+
return /* @__PURE__ */ e("div", { className: "cms-chips", role: "radiogroup", "aria-label": o, children: n.map((r, i) => {
|
|
980
|
+
const u = r.id === l;
|
|
981
|
+
return /* @__PURE__ */ d(
|
|
949
982
|
"button",
|
|
950
983
|
{
|
|
951
|
-
ref: (
|
|
952
|
-
|
|
984
|
+
ref: (p) => {
|
|
985
|
+
m.current[i] = p;
|
|
953
986
|
},
|
|
954
987
|
type: "button",
|
|
955
988
|
role: "radio",
|
|
956
989
|
"aria-checked": u,
|
|
957
990
|
tabIndex: u ? 0 : -1,
|
|
958
|
-
className:
|
|
959
|
-
onClick: () =>
|
|
960
|
-
onKeyDown: (
|
|
991
|
+
className: D("cms-chip", u && "is-on"),
|
|
992
|
+
onClick: () => t(r.id),
|
|
993
|
+
onKeyDown: (p) => s(p, i),
|
|
961
994
|
children: [
|
|
962
|
-
u ? /* @__PURE__ */ e(
|
|
963
|
-
|
|
995
|
+
u ? /* @__PURE__ */ e(P, { name: "check", size: 16 }) : null,
|
|
996
|
+
r.label
|
|
964
997
|
]
|
|
965
998
|
},
|
|
966
|
-
|
|
999
|
+
r.id
|
|
967
1000
|
);
|
|
968
1001
|
}) });
|
|
969
1002
|
}
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
]
|
|
977
|
-
|
|
978
|
-
|
|
1003
|
+
const De = 16;
|
|
1004
|
+
function an(n, l, t) {
|
|
1005
|
+
const o = n.map((s) => Math.min(Math.max(s.width, s.min), s.max));
|
|
1006
|
+
let m = o.reduce((s, r) => s + r, 0) + t - l;
|
|
1007
|
+
for (let s = o.length - 1; s >= 0 && m > 0; s -= 1) {
|
|
1008
|
+
const r = Math.min(m, o[s] - n[s].min);
|
|
1009
|
+
o[s] = o[s] - r, m -= r;
|
|
1010
|
+
}
|
|
1011
|
+
return o;
|
|
979
1012
|
}
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
1013
|
+
function sn({ index: n, size: l, shown: t, others: o, room: m, lastMin: s, onResize: r }) {
|
|
1014
|
+
const i = Math.max(l.min, Math.min(l.max, m > 0 ? m - o - s : l.max)), u = (h) => Math.round(Math.min(Math.max(h, l.min), i)), p = U(null), c = (h, a) => r == null ? void 0 : r(n, u(h), a);
|
|
1015
|
+
return /* @__PURE__ */ e(
|
|
1016
|
+
"div",
|
|
1017
|
+
{
|
|
1018
|
+
role: "separator",
|
|
1019
|
+
tabIndex: 0,
|
|
1020
|
+
"aria-orientation": "vertical",
|
|
1021
|
+
"aria-label": l.label,
|
|
1022
|
+
"aria-valuenow": t,
|
|
1023
|
+
"aria-valuemin": l.min,
|
|
1024
|
+
"aria-valuemax": i,
|
|
1025
|
+
className: "cms-panes__splitter",
|
|
1026
|
+
style: { "--split-at": `var(--split-pane-end-${String(n)})` },
|
|
1027
|
+
onPointerDown: (h) => {
|
|
1028
|
+
var a, g, f;
|
|
1029
|
+
h.button > 0 || (h.preventDefault(), (g = (a = h.currentTarget).setPointerCapture) == null || g.call(a, h.pointerId), p.current = { x: h.clientX, from: t, last: t }, (f = h.currentTarget.closest(".cms-panes")) == null || f.classList.add("is-resizing"));
|
|
1030
|
+
},
|
|
1031
|
+
onPointerMove: (h) => {
|
|
1032
|
+
const a = p.current;
|
|
1033
|
+
a === null || !Number.isFinite(h.clientX) || (a.last = u(a.from + h.clientX - a.x), c(a.last, !1));
|
|
1034
|
+
},
|
|
1035
|
+
onPointerUp: (h) => {
|
|
1036
|
+
var g;
|
|
1037
|
+
const a = p.current;
|
|
1038
|
+
a !== null && (p.current = null, (g = h.currentTarget.closest(".cms-panes")) == null || g.classList.remove("is-resizing"), c(a.last, !0));
|
|
1039
|
+
},
|
|
1040
|
+
onPointerCancel: (h) => {
|
|
1041
|
+
var g;
|
|
1042
|
+
const a = p.current;
|
|
1043
|
+
p.current = null, (g = h.currentTarget.closest(".cms-panes")) == null || g.classList.remove("is-resizing"), a !== null && c(a.last, !0);
|
|
1044
|
+
},
|
|
1045
|
+
onDoubleClick: () => c(l.reset, !0),
|
|
1046
|
+
onKeyDown: (h) => {
|
|
1047
|
+
const a = h.key === "ArrowLeft" ? t - De : h.key === "ArrowRight" ? t + De : h.key === "Home" ? l.min : h.key === "End" ? i : h.key === "Enter" ? l.reset : null;
|
|
1048
|
+
a !== null && (h.preventDefault(), c(a, !0));
|
|
1049
|
+
}
|
|
1050
|
+
}
|
|
1051
|
+
);
|
|
1052
|
+
}
|
|
1053
|
+
function Fn({ panes: n, active: l, back: t, sizes: o, lastMin: m = 360, onResize: s }) {
|
|
1054
|
+
const r = Math.min(Math.max(l ?? n.length - 1, 0), n.length - 1), i = U(null), [u, p] = A(0), c = (o ?? []).slice(0, n.length - 1), h = c.length === n.length - 1 && c.every((f) => f !== void 0);
|
|
1055
|
+
ke(() => {
|
|
1056
|
+
const f = i.current;
|
|
1057
|
+
if (f === null || !h) return;
|
|
1058
|
+
const v = () => p(f.clientWidth);
|
|
1059
|
+
if (v(), typeof ResizeObserver > "u") return;
|
|
1060
|
+
const N = new ResizeObserver(v);
|
|
1061
|
+
return N.observe(f), () => N.disconnect();
|
|
1062
|
+
}, [h]);
|
|
1063
|
+
const a = h ? an(c, u > 0 ? u : Number.POSITIVE_INFINITY, m) : [], g = h ? Object.fromEntries(a.flatMap((f, v) => [
|
|
1064
|
+
[`--split-pane-${String(v)}`, `${String(f)}px`],
|
|
1065
|
+
[`--split-pane-end-${String(v)}`, `${String(a.slice(0, v + 1).reduce((N, k) => N + k, 0))}px`]
|
|
1066
|
+
])) : void 0;
|
|
1067
|
+
return /* @__PURE__ */ d(
|
|
1068
|
+
"div",
|
|
1069
|
+
{
|
|
1070
|
+
ref: i,
|
|
1071
|
+
className: D("cms-panes", n.length === 3 ? "cms-panes--three" : "cms-panes--two", h && "cms-panes--sized"),
|
|
1072
|
+
"data-active": r,
|
|
1073
|
+
style: g,
|
|
1074
|
+
children: [
|
|
1075
|
+
n.map((f, v) => /* @__PURE__ */ d("section", { className: "cms-panes__pane", "aria-label": f.label, "data-offset": r - v, children: [
|
|
1076
|
+
v === r && t ? /* @__PURE__ */ d("a", { className: "cms-panes__back", href: t.href, children: [
|
|
1077
|
+
/* @__PURE__ */ e(P, { name: "chevron-left", size: 18 }),
|
|
1078
|
+
t.label
|
|
1079
|
+
] }) : null,
|
|
1080
|
+
f.content
|
|
1081
|
+
] }, f.label)),
|
|
1082
|
+
h ? c.map((f, v) => /* @__PURE__ */ e(
|
|
1083
|
+
sn,
|
|
1084
|
+
{
|
|
1085
|
+
index: v,
|
|
1086
|
+
size: f,
|
|
1087
|
+
shown: a[v],
|
|
1088
|
+
others: a.reduce((N, k, x) => x === v ? N : N + k, 0),
|
|
1089
|
+
room: u,
|
|
1090
|
+
lastMin: m,
|
|
1091
|
+
onResize: s
|
|
1092
|
+
},
|
|
1093
|
+
f.label
|
|
1094
|
+
)) : null
|
|
1095
|
+
]
|
|
1096
|
+
}
|
|
1097
|
+
);
|
|
1098
|
+
}
|
|
1099
|
+
const rn = { attachment: "Has an attachment", unread: "Unread" };
|
|
1100
|
+
function Bn({ from: n, subject: l, preview: t, time: o, unread: m, hasAttachment: s, selected: r, onOpen: i, labels: u }) {
|
|
1101
|
+
const p = re(rn, u);
|
|
1102
|
+
return /* @__PURE__ */ d(
|
|
984
1103
|
"button",
|
|
985
1104
|
{
|
|
986
1105
|
type: "button",
|
|
987
|
-
className:
|
|
988
|
-
"aria-current":
|
|
989
|
-
onClick:
|
|
1106
|
+
className: D("cms-mail-row", m && "is-unread", r && "is-selected"),
|
|
1107
|
+
"aria-current": r ? "true" : void 0,
|
|
1108
|
+
onClick: i,
|
|
990
1109
|
children: [
|
|
991
1110
|
/* @__PURE__ */ e(ve, { name: n, size: 40 }),
|
|
992
|
-
/* @__PURE__ */
|
|
993
|
-
/* @__PURE__ */
|
|
1111
|
+
/* @__PURE__ */ d("span", { className: "cms-mail-row__body", children: [
|
|
1112
|
+
/* @__PURE__ */ d("span", { className: "cms-mail-row__line", children: [
|
|
994
1113
|
/* @__PURE__ */ e("span", { className: "cms-mail-row__from", children: n }),
|
|
995
|
-
|
|
996
|
-
/* @__PURE__ */ e("span", { className: "cms-mail-row__time", children:
|
|
1114
|
+
s ? /* @__PURE__ */ e(P, { name: "paperclip", size: 16, label: p.attachment }) : null,
|
|
1115
|
+
/* @__PURE__ */ e("span", { className: "cms-mail-row__time", children: o })
|
|
997
1116
|
] }),
|
|
998
|
-
/* @__PURE__ */
|
|
1117
|
+
/* @__PURE__ */ d("span", { className: "cms-mail-row__line", children: [
|
|
999
1118
|
/* @__PURE__ */ e("span", { className: "cms-mail-row__subject", children: l }),
|
|
1000
|
-
|
|
1119
|
+
m ? /* @__PURE__ */ e("span", { className: "cms-mail-row__dot", role: "img", "aria-label": p.unread }) : null
|
|
1001
1120
|
] }),
|
|
1002
|
-
/* @__PURE__ */ e("span", { className: "cms-mail-row__preview", children:
|
|
1121
|
+
/* @__PURE__ */ e("span", { className: "cms-mail-row__preview", children: t })
|
|
1003
1122
|
] })
|
|
1004
1123
|
]
|
|
1005
1124
|
}
|
|
1006
1125
|
);
|
|
1007
1126
|
}
|
|
1008
|
-
function
|
|
1009
|
-
return /* @__PURE__ */
|
|
1127
|
+
function Kn({ direction: n, children: l, time: t, read: o, readLabel: m = "Read" }) {
|
|
1128
|
+
return /* @__PURE__ */ d("div", { className: D("cms-bubble", `cms-bubble--${n}`), children: [
|
|
1010
1129
|
/* @__PURE__ */ e("div", { className: "cms-bubble__text", children: l }),
|
|
1011
|
-
/* @__PURE__ */
|
|
1012
|
-
|
|
1013
|
-
n === "out" &&
|
|
1130
|
+
/* @__PURE__ */ d("div", { className: "cms-bubble__meta", children: [
|
|
1131
|
+
t,
|
|
1132
|
+
n === "out" && o ? /* @__PURE__ */ d(S, { children: [
|
|
1014
1133
|
" · ",
|
|
1015
|
-
|
|
1134
|
+
m
|
|
1016
1135
|
] }) : null
|
|
1017
1136
|
] })
|
|
1018
1137
|
] });
|
|
1019
1138
|
}
|
|
1020
|
-
function
|
|
1021
|
-
const h =
|
|
1022
|
-
v.preventDefault(),
|
|
1023
|
-
},
|
|
1024
|
-
return /* @__PURE__ */
|
|
1025
|
-
/* @__PURE__ */ e("label", { htmlFor: h, className:
|
|
1026
|
-
|
|
1139
|
+
function Hn({ label: n, value: l, onChange: t, onSend: o, onAttach: m, placeholder: s, variant: r = "chat", sendLabel: i = "Send", attachLabel: u = "Attach a file", leading: p, canSend: c }) {
|
|
1140
|
+
const h = q(), a = c ?? l.trim() !== "", g = (v) => {
|
|
1141
|
+
v.preventDefault(), a && o();
|
|
1142
|
+
}, f = m ? /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button cms-composer__attach", "aria-label": u, onClick: m, children: /* @__PURE__ */ e(P, { name: "paperclip" }) }) : null;
|
|
1143
|
+
return /* @__PURE__ */ d("form", { className: D("cms-composer", `cms-composer--${r}`), onSubmit: g, children: [
|
|
1144
|
+
/* @__PURE__ */ e("label", { htmlFor: h, className: r === "reply" ? "cms-composer__title" : "cms-visually-hidden", children: n }),
|
|
1145
|
+
r === "chat" ? f : null,
|
|
1027
1146
|
/* @__PURE__ */ e(
|
|
1028
1147
|
"textarea",
|
|
1029
1148
|
{
|
|
1030
1149
|
id: h,
|
|
1031
1150
|
className: "cms-composer__input",
|
|
1032
|
-
rows:
|
|
1033
|
-
placeholder:
|
|
1151
|
+
rows: r === "reply" ? 3 : 1,
|
|
1152
|
+
placeholder: s,
|
|
1034
1153
|
value: l,
|
|
1035
|
-
onChange: (v) =>
|
|
1154
|
+
onChange: (v) => t(v.target.value),
|
|
1036
1155
|
onKeyDown: (v) => {
|
|
1037
|
-
v.nativeEvent.isComposing || v.keyCode === 229 ||
|
|
1156
|
+
v.nativeEvent.isComposing || v.keyCode === 229 || r === "chat" && v.key === "Enter" && !v.shiftKey && (v.preventDefault(), a && o());
|
|
1038
1157
|
}
|
|
1039
1158
|
}
|
|
1040
1159
|
),
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1160
|
+
r === "reply" && p !== void 0 ? /* @__PURE__ */ e("div", { className: "cms-composer__leading", children: p }) : null,
|
|
1161
|
+
r === "reply" ? f : null,
|
|
1162
|
+
r === "chat" ? /* @__PURE__ */ e("button", { type: "submit", className: "cms-composer__send-round", "aria-label": i, disabled: !a, children: /* @__PURE__ */ e(P, { name: "send" }) }) : /* @__PURE__ */ d("button", { type: "submit", className: "cms-button cms-button--chrome cms-composer__send", disabled: !a, children: [
|
|
1163
|
+
i,
|
|
1045
1164
|
" ",
|
|
1046
|
-
/* @__PURE__ */ e(
|
|
1165
|
+
/* @__PURE__ */ e(P, { name: "send", size: 18 })
|
|
1047
1166
|
] })
|
|
1048
1167
|
] });
|
|
1049
1168
|
}
|
|
1050
|
-
const
|
|
1169
|
+
const Se = {
|
|
1051
1170
|
incomingAudio: "Incoming audio call",
|
|
1052
1171
|
incomingVideo: "Incoming video call",
|
|
1053
1172
|
incomingFrom: (n, l) => `${n} from ${l}`,
|
|
@@ -1068,91 +1187,91 @@ const Me = {
|
|
|
1068
1187
|
onCallWith: (n) => `On a call with ${n}`,
|
|
1069
1188
|
returnToCall: "Return to call"
|
|
1070
1189
|
};
|
|
1071
|
-
function
|
|
1072
|
-
const
|
|
1073
|
-
return /* @__PURE__ */
|
|
1190
|
+
function On({ name: n, media: l, onAccept: t, onDecline: o, labels: m }) {
|
|
1191
|
+
const s = re(Se, m), r = l === "video" ? s.incomingVideo : s.incomingAudio;
|
|
1192
|
+
return /* @__PURE__ */ d("div", { className: "cms-call-incoming", role: "alertdialog", "aria-label": s.incomingFrom(r, n), children: [
|
|
1074
1193
|
/* @__PURE__ */ e("span", { className: "cms-call-incoming__ring", "aria-hidden": "true", children: /* @__PURE__ */ e(ve, { name: n, size: 112 }) }),
|
|
1075
1194
|
/* @__PURE__ */ e("p", { className: "cms-call-incoming__name", children: n }),
|
|
1076
|
-
/* @__PURE__ */ e("p", { className: "cms-call-incoming__what", children:
|
|
1077
|
-
/* @__PURE__ */
|
|
1078
|
-
/* @__PURE__ */ e(ae, { icon: "phone-off", label:
|
|
1079
|
-
/* @__PURE__ */ e(ae, { icon: "phone", label:
|
|
1195
|
+
/* @__PURE__ */ e("p", { className: "cms-call-incoming__what", children: r }),
|
|
1196
|
+
/* @__PURE__ */ d("div", { className: "cms-call-incoming__actions", children: [
|
|
1197
|
+
/* @__PURE__ */ e(ae, { icon: "phone-off", label: s.decline, tone: "hang-up", onClick: o }),
|
|
1198
|
+
/* @__PURE__ */ e(ae, { icon: "phone", label: s.accept, tone: "accept", onClick: t })
|
|
1080
1199
|
] })
|
|
1081
1200
|
] });
|
|
1082
1201
|
}
|
|
1083
|
-
function ae({ icon: n, label: l, onClick:
|
|
1084
|
-
return /* @__PURE__ */
|
|
1202
|
+
function ae({ icon: n, label: l, onClick: t, tone: o = "plain", pressed: m }) {
|
|
1203
|
+
return /* @__PURE__ */ d(
|
|
1085
1204
|
"button",
|
|
1086
1205
|
{
|
|
1087
1206
|
type: "button",
|
|
1088
|
-
className:
|
|
1089
|
-
"aria-pressed":
|
|
1090
|
-
onClick:
|
|
1207
|
+
className: D("cms-call-button", `cms-call-button--${o}`, m && "is-pressed"),
|
|
1208
|
+
"aria-pressed": m,
|
|
1209
|
+
onClick: t,
|
|
1091
1210
|
children: [
|
|
1092
|
-
/* @__PURE__ */ e("span", { className: "cms-call-button__disc", children: /* @__PURE__ */ e(
|
|
1211
|
+
/* @__PURE__ */ e("span", { className: "cms-call-button__disc", children: /* @__PURE__ */ e(P, { name: n, size: 24 }) }),
|
|
1093
1212
|
/* @__PURE__ */ e("span", { className: "cms-call-button__label", children: l })
|
|
1094
1213
|
]
|
|
1095
1214
|
}
|
|
1096
1215
|
);
|
|
1097
1216
|
}
|
|
1098
|
-
function
|
|
1099
|
-
const
|
|
1100
|
-
return /* @__PURE__ */
|
|
1101
|
-
/* @__PURE__ */
|
|
1217
|
+
function Un({ name: n, duration: l, connection: t, you: o, muted: m, speaker: s, onToggleMute: r, onToggleSpeaker: i, onAddPerson: u, onChat: p, onHangUp: c, labels: h }) {
|
|
1218
|
+
const a = re(Se, h);
|
|
1219
|
+
return /* @__PURE__ */ d("section", { className: "cms-call-panel", "aria-label": a.callWith(n), children: [
|
|
1220
|
+
/* @__PURE__ */ d("div", { className: "cms-call-panel__head", children: [
|
|
1102
1221
|
/* @__PURE__ */ e(ve, { name: n, size: 64 }),
|
|
1103
|
-
/* @__PURE__ */
|
|
1222
|
+
/* @__PURE__ */ d("div", { className: "cms-call-panel__who", children: [
|
|
1104
1223
|
/* @__PURE__ */ e("p", { className: "cms-call-panel__name", children: n }),
|
|
1105
|
-
/* @__PURE__ */ e("p", { className: "cms-call-panel__time", "aria-label":
|
|
1224
|
+
/* @__PURE__ */ e("p", { className: "cms-call-panel__time", "aria-label": a.callTime(l), children: l })
|
|
1106
1225
|
] }),
|
|
1107
|
-
/* @__PURE__ */ e("span", { className:
|
|
1226
|
+
/* @__PURE__ */ e("span", { className: D("cms-pill", t === "good" ? "cms-pill--success" : "cms-pill--warning"), children: t === "good" ? a.goodConnection : a.poorConnection })
|
|
1108
1227
|
] }),
|
|
1109
|
-
/* @__PURE__ */
|
|
1110
|
-
/* @__PURE__ */ e(ve, { name:
|
|
1111
|
-
/* @__PURE__ */ e("span", { children:
|
|
1112
|
-
|
|
1228
|
+
/* @__PURE__ */ d("div", { className: "cms-call-panel__you", children: [
|
|
1229
|
+
/* @__PURE__ */ e(ve, { name: o.name, size: 36 }),
|
|
1230
|
+
/* @__PURE__ */ e("span", { children: a.you }),
|
|
1231
|
+
o.speaking ? /* @__PURE__ */ e("span", { className: "cms-call-panel__level", role: "img", "aria-label": a.speaking }) : null
|
|
1113
1232
|
] }),
|
|
1114
|
-
/* @__PURE__ */
|
|
1115
|
-
/* @__PURE__ */ e(ae, { icon: "mic", label:
|
|
1116
|
-
/* @__PURE__ */ e(ae, { icon: "speaker", label:
|
|
1117
|
-
u ? /* @__PURE__ */ e(ae, { icon: "user-plus", label:
|
|
1118
|
-
|
|
1119
|
-
/* @__PURE__ */ e(ae, { icon: "phone-off", label:
|
|
1233
|
+
/* @__PURE__ */ d("div", { className: "cms-call-panel__controls", children: [
|
|
1234
|
+
/* @__PURE__ */ e(ae, { icon: "mic", label: m ? a.unmute : a.mute, pressed: m, onClick: r }),
|
|
1235
|
+
/* @__PURE__ */ e(ae, { icon: "speaker", label: a.speaker, pressed: s, onClick: i }),
|
|
1236
|
+
u ? /* @__PURE__ */ e(ae, { icon: "user-plus", label: a.addPerson, onClick: u }) : null,
|
|
1237
|
+
p ? /* @__PURE__ */ e(ae, { icon: "chat", label: a.chat, onClick: p }) : null,
|
|
1238
|
+
/* @__PURE__ */ e(ae, { icon: "phone-off", label: a.hangUp, tone: "hang-up", onClick: c })
|
|
1120
1239
|
] })
|
|
1121
1240
|
] });
|
|
1122
1241
|
}
|
|
1123
|
-
function zn({ name: n, duration: l, muted:
|
|
1124
|
-
const
|
|
1125
|
-
return /* @__PURE__ */
|
|
1242
|
+
function zn({ name: n, duration: l, muted: t, onToggleMute: o, onReturn: m, onHangUp: s, labels: r }) {
|
|
1243
|
+
const i = re(Se, r);
|
|
1244
|
+
return /* @__PURE__ */ d("section", { className: "cms-call-bar", "aria-label": i.callWith(n), children: [
|
|
1126
1245
|
/* @__PURE__ */ e("span", { className: "cms-call-bar__live", "aria-hidden": "true" }),
|
|
1127
|
-
/* @__PURE__ */ e("span", { className: "cms-call-bar__name", children:
|
|
1246
|
+
/* @__PURE__ */ e("span", { className: "cms-call-bar__name", children: i.onCallWith(n) }),
|
|
1128
1247
|
/* @__PURE__ */ e("span", { className: "cms-call-bar__time", children: l }),
|
|
1129
|
-
/* @__PURE__ */
|
|
1130
|
-
/* @__PURE__ */ e("button", { type: "button", className: "cms-call-bar__icon", "aria-label":
|
|
1131
|
-
/* @__PURE__ */ e("button", { type: "button", className: "cms-button cms-button--primary", onClick:
|
|
1132
|
-
/* @__PURE__ */ e("button", { type: "button", className: "cms-call-bar__icon cms-call-bar__icon--hang-up", "aria-label":
|
|
1248
|
+
/* @__PURE__ */ d("span", { className: "cms-call-bar__actions", children: [
|
|
1249
|
+
/* @__PURE__ */ e("button", { type: "button", className: "cms-call-bar__icon", "aria-label": t ? i.unmute : i.mute, "aria-pressed": t, onClick: o, children: /* @__PURE__ */ e(P, { name: "mic" }) }),
|
|
1250
|
+
/* @__PURE__ */ e("button", { type: "button", className: "cms-button cms-button--primary", onClick: m, children: i.returnToCall }),
|
|
1251
|
+
/* @__PURE__ */ e("button", { type: "button", className: "cms-call-bar__icon cms-call-bar__icon--hang-up", "aria-label": i.hangUp, onClick: s, children: /* @__PURE__ */ e(P, { name: "phone-off" }) })
|
|
1133
1252
|
] })
|
|
1134
1253
|
] });
|
|
1135
1254
|
}
|
|
1136
|
-
function
|
|
1137
|
-
return /* @__PURE__ */
|
|
1138
|
-
/* @__PURE__ */
|
|
1139
|
-
/* @__PURE__ */
|
|
1255
|
+
function Rn({ mark: n, product: l, headline: t, lead: o, features: m = [], children: s }) {
|
|
1256
|
+
return /* @__PURE__ */ d("div", { className: "cms-signin", children: [
|
|
1257
|
+
/* @__PURE__ */ d("aside", { className: "cms-signin__brand", children: [
|
|
1258
|
+
/* @__PURE__ */ d("p", { className: "cms-signin__logo", children: [
|
|
1140
1259
|
/* @__PURE__ */ e("span", { className: "cms-signin__mark", "aria-hidden": "true", children: n }),
|
|
1141
1260
|
l
|
|
1142
1261
|
] }),
|
|
1143
|
-
/* @__PURE__ */
|
|
1144
|
-
/* @__PURE__ */ e("p", { className: "cms-signin__headline", children:
|
|
1145
|
-
/* @__PURE__ */ e("p", { className: "cms-signin__lead", children:
|
|
1146
|
-
|
|
1147
|
-
/* @__PURE__ */ e(
|
|
1148
|
-
|
|
1149
|
-
] },
|
|
1262
|
+
/* @__PURE__ */ d("div", { className: "cms-signin__pitch", children: [
|
|
1263
|
+
/* @__PURE__ */ e("p", { className: "cms-signin__headline", children: t }),
|
|
1264
|
+
/* @__PURE__ */ e("p", { className: "cms-signin__lead", children: o }),
|
|
1265
|
+
m.length ? /* @__PURE__ */ e("ul", { className: "cms-signin__features", children: m.map((r) => /* @__PURE__ */ d("li", { children: [
|
|
1266
|
+
/* @__PURE__ */ e(P, { name: r.icon, size: 18 }),
|
|
1267
|
+
r.label
|
|
1268
|
+
] }, r.label)) }) : null
|
|
1150
1269
|
] })
|
|
1151
1270
|
] }),
|
|
1152
|
-
/* @__PURE__ */ e("main", { className: "cms-signin__form", children:
|
|
1271
|
+
/* @__PURE__ */ e("main", { className: "cms-signin__form", children: s })
|
|
1153
1272
|
] });
|
|
1154
1273
|
}
|
|
1155
|
-
const
|
|
1274
|
+
const cn = {
|
|
1156
1275
|
title: "Sign in",
|
|
1157
1276
|
identifier: "Email or username",
|
|
1158
1277
|
identifierPlaceholder: "name@example.com",
|
|
@@ -1164,17 +1283,17 @@ const an = {
|
|
|
1164
1283
|
newHere: "New here?",
|
|
1165
1284
|
create: "Create an account"
|
|
1166
1285
|
};
|
|
1167
|
-
function
|
|
1168
|
-
const
|
|
1169
|
-
return /* @__PURE__ */
|
|
1170
|
-
|
|
1171
|
-
}, "aria-describedby":
|
|
1172
|
-
/* @__PURE__ */ e("h1", { className: "cms-signin-form__title", children:
|
|
1173
|
-
/* @__PURE__ */
|
|
1174
|
-
/* @__PURE__ */ e(
|
|
1286
|
+
function Zn({ server: n, onSubmit: l, forgotHref: t, createHref: o, error: m, busy: s, labels: r }) {
|
|
1287
|
+
const i = re(cn, r), u = q(), [p, c] = A(""), [h, a] = A(""), [g, f] = A(!1);
|
|
1288
|
+
return /* @__PURE__ */ d("form", { className: "cms-signin-form", onSubmit: (N) => {
|
|
1289
|
+
N.preventDefault(), l(p, h);
|
|
1290
|
+
}, "aria-describedby": m ? `${u}-error` : void 0, children: [
|
|
1291
|
+
/* @__PURE__ */ e("h1", { className: "cms-signin-form__title", children: i.title }),
|
|
1292
|
+
/* @__PURE__ */ d("p", { className: "cms-signin-form__server", children: [
|
|
1293
|
+
/* @__PURE__ */ e(P, { name: "server", size: 18 }),
|
|
1175
1294
|
n
|
|
1176
1295
|
] }),
|
|
1177
|
-
/* @__PURE__ */ e("label", { className: "cms-signin-form__label", htmlFor: `${u}-identifier`, children:
|
|
1296
|
+
/* @__PURE__ */ e("label", { className: "cms-signin-form__label", htmlFor: `${u}-identifier`, children: i.identifier }),
|
|
1178
1297
|
/* @__PURE__ */ e(
|
|
1179
1298
|
"input",
|
|
1180
1299
|
{
|
|
@@ -1182,14 +1301,14 @@ function Hn({ server: n, onSubmit: l, forgotHref: a, createHref: i, error: o, bu
|
|
|
1182
1301
|
className: "cms-signin-form__input",
|
|
1183
1302
|
type: "text",
|
|
1184
1303
|
autoComplete: "username",
|
|
1185
|
-
placeholder:
|
|
1186
|
-
value:
|
|
1187
|
-
onChange: (
|
|
1304
|
+
placeholder: i.identifierPlaceholder,
|
|
1305
|
+
value: p,
|
|
1306
|
+
onChange: (N) => c(N.target.value),
|
|
1188
1307
|
required: !0
|
|
1189
1308
|
}
|
|
1190
1309
|
),
|
|
1191
|
-
/* @__PURE__ */ e("label", { className: "cms-signin-form__label", htmlFor: `${u}-password`, children:
|
|
1192
|
-
/* @__PURE__ */
|
|
1310
|
+
/* @__PURE__ */ e("label", { className: "cms-signin-form__label", htmlFor: `${u}-password`, children: i.password }),
|
|
1311
|
+
/* @__PURE__ */ d("span", { className: "cms-signin-form__password", children: [
|
|
1193
1312
|
/* @__PURE__ */ e(
|
|
1194
1313
|
"input",
|
|
1195
1314
|
{
|
|
@@ -1198,134 +1317,135 @@ function Hn({ server: n, onSubmit: l, forgotHref: a, createHref: i, error: o, bu
|
|
|
1198
1317
|
type: g ? "text" : "password",
|
|
1199
1318
|
autoComplete: "current-password",
|
|
1200
1319
|
value: h,
|
|
1201
|
-
onChange: (
|
|
1320
|
+
onChange: (N) => a(N.target.value),
|
|
1202
1321
|
required: !0
|
|
1203
1322
|
}
|
|
1204
1323
|
),
|
|
1205
|
-
/* @__PURE__ */ e("button", { type: "button", className: "cms-signin-form__show", "aria-pressed": g, onClick: () =>
|
|
1324
|
+
/* @__PURE__ */ e("button", { type: "button", className: "cms-signin-form__show", "aria-pressed": g, onClick: () => f((N) => !N), children: g ? i.hide : i.show })
|
|
1206
1325
|
] }),
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
/* @__PURE__ */ e("button", { type: "submit", className: "cms-button cms-button--chrome cms-signin-form__submit", disabled:
|
|
1210
|
-
|
|
1211
|
-
/* @__PURE__ */ e("p", { className: "cms-signin-form__or", children: /* @__PURE__ */ e("span", { children:
|
|
1212
|
-
/* @__PURE__ */ e("a", { className: "cms-button cms-signin-form__create", href:
|
|
1326
|
+
t ? /* @__PURE__ */ e("a", { className: "cms-signin-form__forgot", href: t, children: i.forgot }) : null,
|
|
1327
|
+
m ? /* @__PURE__ */ e("p", { id: `${u}-error`, className: "cms-signin-form__error", role: "alert", children: m }) : null,
|
|
1328
|
+
/* @__PURE__ */ e("button", { type: "submit", className: "cms-button cms-button--chrome cms-signin-form__submit", disabled: s, "aria-busy": s || void 0, children: i.submit }),
|
|
1329
|
+
o ? /* @__PURE__ */ d(S, { children: [
|
|
1330
|
+
/* @__PURE__ */ e("p", { className: "cms-signin-form__or", children: /* @__PURE__ */ e("span", { children: i.newHere }) }),
|
|
1331
|
+
/* @__PURE__ */ e("a", { className: "cms-button cms-signin-form__create", href: o, children: i.create })
|
|
1213
1332
|
] }) : null
|
|
1214
1333
|
] });
|
|
1215
1334
|
}
|
|
1216
|
-
function
|
|
1217
|
-
const
|
|
1218
|
-
if (
|
|
1219
|
-
if (l === null) return /* @__PURE__ */ e(
|
|
1220
|
-
if (l.length === 0) return /* @__PURE__ */ e(
|
|
1221
|
-
const h = (
|
|
1335
|
+
function Vn({ label: n, rows: l, error: t, onRetry: o, loadingText: m = "Loading", emptyTitle: s = "Nothing here yet", emptyHint: r, selected: i, onOpen: u, onRowMenu: p }) {
|
|
1336
|
+
const c = U([]);
|
|
1337
|
+
if (t != null) return /* @__PURE__ */ e(Re, { message: t, onRetry: o });
|
|
1338
|
+
if (l === null) return /* @__PURE__ */ e(Ue, { what: m, layout: "block" });
|
|
1339
|
+
if (l.length === 0) return /* @__PURE__ */ e(ze, { title: s, hint: r });
|
|
1340
|
+
const h = (a, g, f) => {
|
|
1222
1341
|
var v;
|
|
1223
|
-
if (
|
|
1224
|
-
|
|
1225
|
-
else if (
|
|
1226
|
-
u == null || u(
|
|
1227
|
-
else if ((
|
|
1228
|
-
|
|
1229
|
-
const
|
|
1230
|
-
|
|
1342
|
+
if (a.key === "ArrowDown" || a.key === "ArrowUp")
|
|
1343
|
+
a.preventDefault(), (v = c.current[Math.min(l.length - 1, Math.max(0, g + (a.key === "ArrowDown" ? 1 : -1)))]) == null || v.focus();
|
|
1344
|
+
else if (a.key === "Enter")
|
|
1345
|
+
u == null || u(f);
|
|
1346
|
+
else if ((a.key === "ContextMenu" || a.shiftKey && a.key === "F10") && p) {
|
|
1347
|
+
a.preventDefault();
|
|
1348
|
+
const N = a.currentTarget.getBoundingClientRect();
|
|
1349
|
+
p(f, { x: N.left + 16, y: N.bottom });
|
|
1231
1350
|
}
|
|
1232
1351
|
};
|
|
1233
|
-
return /* @__PURE__ */ e("ul", { className: "cms-list", role: "listbox", "aria-label": n, children: l.map((
|
|
1234
|
-
const
|
|
1235
|
-
return /* @__PURE__ */
|
|
1352
|
+
return /* @__PURE__ */ e("ul", { className: "cms-list", role: "listbox", "aria-label": n, children: l.map((a, g) => {
|
|
1353
|
+
const f = a.id === i;
|
|
1354
|
+
return /* @__PURE__ */ d(
|
|
1236
1355
|
"li",
|
|
1237
1356
|
{
|
|
1238
1357
|
ref: (v) => {
|
|
1239
|
-
|
|
1358
|
+
c.current[g] = v;
|
|
1240
1359
|
},
|
|
1241
1360
|
role: "option",
|
|
1242
|
-
"aria-selected":
|
|
1243
|
-
tabIndex:
|
|
1244
|
-
className:
|
|
1245
|
-
onClick: () => u == null ? void 0 : u(
|
|
1246
|
-
onKeyDown: (v) => h(v, g,
|
|
1247
|
-
onContextMenu:
|
|
1248
|
-
v.preventDefault(),
|
|
1361
|
+
"aria-selected": f,
|
|
1362
|
+
tabIndex: f || i == null && g === 0 ? 0 : -1,
|
|
1363
|
+
className: D("cms-list__row", f && "is-selected"),
|
|
1364
|
+
onClick: () => u == null ? void 0 : u(a.id),
|
|
1365
|
+
onKeyDown: (v) => h(v, g, a.id),
|
|
1366
|
+
onContextMenu: p ? (v) => {
|
|
1367
|
+
v.preventDefault(), p(a.id, { x: v.clientX, y: v.clientY });
|
|
1249
1368
|
} : void 0,
|
|
1250
1369
|
children: [
|
|
1251
|
-
|
|
1252
|
-
/* @__PURE__ */
|
|
1253
|
-
/* @__PURE__ */ e("span", { className: "cms-list__primary", children:
|
|
1254
|
-
|
|
1370
|
+
a.lead != null ? /* @__PURE__ */ e("span", { className: "cms-list__lead", children: a.lead }) : null,
|
|
1371
|
+
/* @__PURE__ */ d("span", { className: "cms-list__text", children: [
|
|
1372
|
+
/* @__PURE__ */ e("span", { className: "cms-list__primary", children: a.primary }),
|
|
1373
|
+
a.secondary != null ? /* @__PURE__ */ e("span", { className: "cms-list__secondary", children: a.secondary }) : null
|
|
1255
1374
|
] }),
|
|
1256
|
-
|
|
1375
|
+
a.meta != null ? /* @__PURE__ */ e("span", { className: "cms-list__meta", children: a.meta }) : null
|
|
1257
1376
|
]
|
|
1258
1377
|
},
|
|
1259
|
-
|
|
1378
|
+
a.id
|
|
1260
1379
|
);
|
|
1261
1380
|
}) });
|
|
1262
1381
|
}
|
|
1263
|
-
function
|
|
1264
|
-
const
|
|
1265
|
-
if (
|
|
1382
|
+
function on({ at: n, items: l, onClose: t, label: o = "Actions", focus: m = "first" }) {
|
|
1383
|
+
const s = U(null), r = U(null), i = q(), [u, p] = A(n), c = l.filter((a) => a.offer.offered);
|
|
1384
|
+
if (ke(() => {
|
|
1266
1385
|
if (!n) return;
|
|
1267
|
-
const
|
|
1268
|
-
|
|
1269
|
-
}, [n]),
|
|
1270
|
-
var
|
|
1386
|
+
const a = s.current, g = (a == null ? void 0 : a.offsetWidth) ?? 0, f = (a == null ? void 0 : a.offsetHeight) ?? 0;
|
|
1387
|
+
p({ x: Math.max(0, Math.min(n.x, window.innerWidth - g)), y: Math.max(0, Math.min(n.y, window.innerHeight - f)) });
|
|
1388
|
+
}, [n]), Y(() => {
|
|
1389
|
+
var f, v;
|
|
1271
1390
|
if (!n) return;
|
|
1272
|
-
|
|
1273
|
-
const
|
|
1274
|
-
(
|
|
1275
|
-
const
|
|
1276
|
-
var
|
|
1277
|
-
(
|
|
1391
|
+
r.current = document.activeElement;
|
|
1392
|
+
const a = Array.from(((f = s.current) == null ? void 0 : f.querySelectorAll('[role="menuitem"]:not([aria-disabled="true"])')) ?? []);
|
|
1393
|
+
(v = m === "last" ? a[a.length - 1] : a[0]) == null || v.focus();
|
|
1394
|
+
const g = (N) => {
|
|
1395
|
+
var k;
|
|
1396
|
+
(k = s.current) != null && k.contains(N.target) || t();
|
|
1278
1397
|
};
|
|
1279
|
-
return document.addEventListener("mousedown",
|
|
1280
|
-
var
|
|
1281
|
-
document.removeEventListener("mousedown",
|
|
1398
|
+
return document.addEventListener("mousedown", g), () => {
|
|
1399
|
+
var N, k;
|
|
1400
|
+
document.removeEventListener("mousedown", g), (k = (N = r.current) == null ? void 0 : N.focus) == null || k.call(N);
|
|
1282
1401
|
};
|
|
1283
|
-
}, [n,
|
|
1284
|
-
const
|
|
1285
|
-
var
|
|
1286
|
-
const
|
|
1287
|
-
if (
|
|
1288
|
-
|
|
1289
|
-
else if (
|
|
1290
|
-
|
|
1291
|
-
const
|
|
1292
|
-
(
|
|
1402
|
+
}, [n, t, m]), !n || c.length === 0) return null;
|
|
1403
|
+
const h = (a) => {
|
|
1404
|
+
var v, N;
|
|
1405
|
+
const g = Array.from(((v = s.current) == null ? void 0 : v.querySelectorAll('[role="menuitem"]')) ?? []), f = g.indexOf(document.activeElement);
|
|
1406
|
+
if (a.key === "Escape" || a.key === "Tab")
|
|
1407
|
+
a.preventDefault(), t();
|
|
1408
|
+
else if (a.key === "ArrowDown" || a.key === "ArrowUp") {
|
|
1409
|
+
a.preventDefault();
|
|
1410
|
+
const k = a.key === "ArrowDown" ? 1 : -1;
|
|
1411
|
+
(N = g[(f + k + g.length) % g.length]) == null || N.focus();
|
|
1293
1412
|
}
|
|
1294
1413
|
};
|
|
1295
|
-
return
|
|
1414
|
+
return xe(
|
|
1296
1415
|
/* @__PURE__ */ e(
|
|
1297
1416
|
"div",
|
|
1298
1417
|
{
|
|
1299
|
-
ref:
|
|
1418
|
+
ref: s,
|
|
1300
1419
|
className: "cms-menu",
|
|
1301
1420
|
role: "menu",
|
|
1302
|
-
"aria-label":
|
|
1303
|
-
style: { left: (
|
|
1304
|
-
onKeyDown:
|
|
1305
|
-
onContextMenu: (
|
|
1306
|
-
children:
|
|
1307
|
-
const
|
|
1308
|
-
return /* @__PURE__ */
|
|
1421
|
+
"aria-label": o,
|
|
1422
|
+
style: { left: (u ?? n).x, top: (u ?? n).y },
|
|
1423
|
+
onKeyDown: h,
|
|
1424
|
+
onContextMenu: (a) => a.preventDefault(),
|
|
1425
|
+
children: c.map((a) => {
|
|
1426
|
+
const g = a.offer.refusal !== void 0;
|
|
1427
|
+
return /* @__PURE__ */ d(
|
|
1309
1428
|
"div",
|
|
1310
1429
|
{
|
|
1311
1430
|
role: "menuitem",
|
|
1312
1431
|
tabIndex: -1,
|
|
1313
|
-
"aria-disabled":
|
|
1314
|
-
|
|
1315
|
-
|
|
1432
|
+
"aria-disabled": g || void 0,
|
|
1433
|
+
"aria-describedby": g ? `${i}-${a.id}` : void 0,
|
|
1434
|
+
title: g ? a.offer.refusal : void 0,
|
|
1435
|
+
className: D("cms-menu__item", a.danger && "is-danger", a.offer.locked && "is-locked", g && "is-refused"),
|
|
1316
1436
|
onClick: () => {
|
|
1317
|
-
|
|
1437
|
+
g || (t(), a.onSelect());
|
|
1318
1438
|
},
|
|
1319
|
-
onKeyDown: (
|
|
1320
|
-
(
|
|
1439
|
+
onKeyDown: (f) => {
|
|
1440
|
+
(f.key === "Enter" || f.key === " ") && !g && (f.preventDefault(), t(), a.onSelect());
|
|
1321
1441
|
},
|
|
1322
1442
|
children: [
|
|
1323
|
-
|
|
1324
|
-
/* @__PURE__ */ e("span", { className: "cms-menu__label", children:
|
|
1325
|
-
|
|
1443
|
+
a.offer.locked ? /* @__PURE__ */ e(z, { name: "lock" }) : null,
|
|
1444
|
+
/* @__PURE__ */ e("span", { className: "cms-menu__label", children: a.label }),
|
|
1445
|
+
g ? /* @__PURE__ */ e("span", { id: `${i}-${a.id}`, className: "cms-menu__refusal", children: a.offer.refusal }) : null
|
|
1326
1446
|
]
|
|
1327
1447
|
},
|
|
1328
|
-
|
|
1448
|
+
a.id
|
|
1329
1449
|
);
|
|
1330
1450
|
})
|
|
1331
1451
|
}
|
|
@@ -1333,212 +1453,279 @@ function tn({ at: n, items: l, onClose: a, label: i = "Actions", focus: o = "fir
|
|
|
1333
1453
|
document.body
|
|
1334
1454
|
);
|
|
1335
1455
|
}
|
|
1336
|
-
const
|
|
1337
|
-
function
|
|
1456
|
+
const Te = { bare: /* @__PURE__ */ new Set(), hidden: /* @__PURE__ */ new Set() }, Ee = (n, l) => n.size === l.size && [...n].every((t) => l.has(t));
|
|
1457
|
+
function dn(n) {
|
|
1338
1458
|
const l = /* @__PURE__ */ new Map();
|
|
1339
|
-
for (const
|
|
1459
|
+
for (const t of n) l.set(t.group, [...l.get(t.group) ?? [], t]);
|
|
1340
1460
|
return [...l.values()];
|
|
1341
1461
|
}
|
|
1342
|
-
function
|
|
1462
|
+
function mn(n) {
|
|
1343
1463
|
const l = /* @__PURE__ */ new Map();
|
|
1344
|
-
for (const
|
|
1345
|
-
return [...l.entries()].sort(([
|
|
1346
|
-
}
|
|
1347
|
-
function
|
|
1348
|
-
const
|
|
1349
|
-
const
|
|
1350
|
-
if (
|
|
1351
|
-
const
|
|
1352
|
-
var
|
|
1353
|
-
return ((
|
|
1354
|
-
}, oe =
|
|
1355
|
-
const
|
|
1356
|
-
return oe + he.reduce((
|
|
1357
|
-
},
|
|
1358
|
-
let
|
|
1359
|
-
if (
|
|
1464
|
+
for (const t of n) t.overflow !== void 0 && t.overflow !== 0 && l.set(t.overflow, [...l.get(t.overflow) ?? [], t.id]);
|
|
1465
|
+
return [...l.entries()].sort(([t], [o]) => t - o).map(([, t]) => t);
|
|
1466
|
+
}
|
|
1467
|
+
function Wn({ label: n, actions: l, onAction: t, status: o, moreLabel: m, leading: s }) {
|
|
1468
|
+
const r = U(null), i = U(null), [u, p] = A(Te), [c, h] = A(null), [a, g] = A("first"), [f, v] = A(null), [N, k] = A(null), x = dn(l), M = mn(l), C = x.flat(), H = C.filter((_) => _.overflow === 0), O = C.filter((_) => _.overflow !== 0), le = JSON.stringify([l.map((_) => [_.id, _.label, _.icon, _.group, _.overflow ?? null]), o ?? "", s !== void 0]), J = be(() => {
|
|
1469
|
+
const _ = r.current, T = i.current;
|
|
1470
|
+
if (_ === null || T === null) return;
|
|
1471
|
+
const Z = getComputedStyle(_), W = parseFloat(Z.columnGap || "0") || 0, L = _.clientWidth - (parseFloat(Z.paddingLeft) || 0) - (parseFloat(Z.paddingRight) || 0), j = ($) => {
|
|
1472
|
+
var R;
|
|
1473
|
+
return ((R = T.querySelector($)) == null ? void 0 : R.getBoundingClientRect().width) ?? 0;
|
|
1474
|
+
}, oe = j('[data-measure="leading"]'), de = j('[data-measure="separator"]'), me = j('[data-measure="more"]'), ue = ($, R) => j(`[data-measure="${R ? "full" : "icon"}"][data-measure-action="${CSS.escape($)}"]`), b = ($, R) => {
|
|
1475
|
+
const Q = /* @__PURE__ */ new Set([...H.map((te) => te.id), ...R]), se = x.map((te) => te.filter((fe) => !Q.has(fe.id))).filter((te) => te.length > 0), he = se.flat(), Ie = he.length + (se.length - 1) + (Q.size > 0 ? 1 : 0) + (oe > 0 ? 1 : 0);
|
|
1476
|
+
return oe + he.reduce((te, fe) => te + ue(fe.id, !$.has(fe.id)), 0) + de * Math.max(0, se.length - 1) + (Q.size > 0 ? me : 0) + W * Math.max(0, Ie - 1);
|
|
1477
|
+
}, w = O.filter(($) => !M.some((R) => R.includes($.id))).map(($) => $.id), I = [...M, ...[...w].reverse().map(($) => [$])];
|
|
1478
|
+
let K = null;
|
|
1479
|
+
if (b(/* @__PURE__ */ new Set(), /* @__PURE__ */ new Set()) <= L) K = Te;
|
|
1360
1480
|
else {
|
|
1361
1481
|
const $ = /* @__PURE__ */ new Set();
|
|
1362
|
-
for (const
|
|
1363
|
-
for (const
|
|
1364
|
-
if (
|
|
1365
|
-
|
|
1482
|
+
for (const R of I) {
|
|
1483
|
+
for (const Q of R) $.add(Q);
|
|
1484
|
+
if (b($, /* @__PURE__ */ new Set()) <= L) {
|
|
1485
|
+
K = { bare: $, hidden: /* @__PURE__ */ new Set() };
|
|
1366
1486
|
break;
|
|
1367
1487
|
}
|
|
1368
1488
|
}
|
|
1369
1489
|
}
|
|
1370
|
-
if (
|
|
1371
|
-
const $ = new Set(
|
|
1372
|
-
for (const
|
|
1373
|
-
for (const
|
|
1374
|
-
if (
|
|
1490
|
+
if (K === null) {
|
|
1491
|
+
const $ = new Set(O.map((Q) => Q.id)), R = /* @__PURE__ */ new Set();
|
|
1492
|
+
for (const Q of M) {
|
|
1493
|
+
for (const se of Q) O.some((he) => he.id === se) && R.add(se);
|
|
1494
|
+
if (R.size >= 2 && b($, R) <= L) break;
|
|
1375
1495
|
}
|
|
1376
|
-
|
|
1496
|
+
K = { bare: $, hidden: R.size >= 2 ? R : /* @__PURE__ */ new Set() };
|
|
1377
1497
|
}
|
|
1378
|
-
const ge =
|
|
1379
|
-
|
|
1380
|
-
}, [
|
|
1381
|
-
|
|
1382
|
-
const
|
|
1383
|
-
if (
|
|
1384
|
-
const
|
|
1385
|
-
return
|
|
1386
|
-
}, [
|
|
1387
|
-
const
|
|
1388
|
-
...
|
|
1389
|
-
...
|
|
1390
|
-
], X = new Set(
|
|
1391
|
-
var L,
|
|
1392
|
-
const
|
|
1393
|
-
let
|
|
1394
|
-
if (
|
|
1395
|
-
|
|
1396
|
-
const
|
|
1397
|
-
v(
|
|
1398
|
-
}, ce =
|
|
1399
|
-
id:
|
|
1400
|
-
label: /* @__PURE__ */
|
|
1401
|
-
/* @__PURE__ */ e(pe, { name:
|
|
1402
|
-
|
|
1498
|
+
const ge = K;
|
|
1499
|
+
p(($) => Ee($.bare, ge.bare) && Ee($.hidden, ge.hidden) ? $ : ge);
|
|
1500
|
+
}, [le]);
|
|
1501
|
+
ke(J, [J]), Y(() => {
|
|
1502
|
+
const _ = r.current;
|
|
1503
|
+
if (_ === null || typeof ResizeObserver > "u") return;
|
|
1504
|
+
const T = new ResizeObserver(() => J());
|
|
1505
|
+
return T.observe(_), () => T.disconnect();
|
|
1506
|
+
}, [J]);
|
|
1507
|
+
const y = /* @__PURE__ */ new Set([...H.map((_) => _.id), ...u.hidden]), V = x.map((_) => _.filter((T) => !y.has(T.id))).filter((_) => _.length > 0).flat(), E = [
|
|
1508
|
+
...H,
|
|
1509
|
+
...M.flat().map((_) => C.find((T) => T.id === _)).filter((_) => _ !== void 0 && u.hidden.has(_.id))
|
|
1510
|
+
], X = new Set(O.filter((_) => !M.some((T) => T.includes(_.id))).map((_) => _.id)), B = [...V.map((_) => _.id), ...E.length > 0 ? ["more"] : []], G = f !== null && B.includes(f) ? f : B[0] ?? null, ie = (_) => {
|
|
1511
|
+
var L, j;
|
|
1512
|
+
const T = B.indexOf(G ?? "");
|
|
1513
|
+
let Z = null;
|
|
1514
|
+
if (_.key === "ArrowRight" ? Z = Math.min(B.length - 1, T + 1) : _.key === "ArrowLeft" ? Z = Math.max(0, T - 1) : _.key === "Home" ? Z = 0 : _.key === "End" ? Z = B.length - 1 : _.key === "Escape" && k(G), Z === null) return;
|
|
1515
|
+
_.preventDefault();
|
|
1516
|
+
const W = B[Z] ?? null;
|
|
1517
|
+
v(W), (j = (L = r.current) == null ? void 0 : L.querySelector(`[data-stop="${CSS.escape(W ?? "")}"]`)) == null || j.focus();
|
|
1518
|
+
}, ce = E.map((_) => ({
|
|
1519
|
+
id: _.id,
|
|
1520
|
+
label: /* @__PURE__ */ d(S, { children: [
|
|
1521
|
+
/* @__PURE__ */ e(pe, { name: _.icon }),
|
|
1522
|
+
_.label
|
|
1403
1523
|
] }),
|
|
1404
|
-
offer:
|
|
1405
|
-
...
|
|
1524
|
+
offer: _.disabled ? { offered: !0, locked: !1, refusal: _.reason ?? "" } : { offered: !0, locked: !1 },
|
|
1525
|
+
..._.danger ? { danger: !0 } : {},
|
|
1406
1526
|
onSelect: () => {
|
|
1407
|
-
!
|
|
1527
|
+
!_.disabled && !_.busy && t(_.id);
|
|
1408
1528
|
}
|
|
1409
1529
|
}));
|
|
1410
|
-
return /* @__PURE__ */
|
|
1530
|
+
return /* @__PURE__ */ d(
|
|
1411
1531
|
"div",
|
|
1412
1532
|
{
|
|
1413
|
-
ref:
|
|
1533
|
+
ref: r,
|
|
1414
1534
|
role: "toolbar",
|
|
1415
1535
|
"aria-label": n,
|
|
1416
|
-
className:
|
|
1536
|
+
className: D(
|
|
1417
1537
|
"cms-pane-toolbar",
|
|
1418
|
-
|
|
1419
|
-
u.bare.size > 0 && u.bare.size <
|
|
1538
|
+
O.length > 0 && u.bare.size >= O.length && "cms-pane-toolbar--labels-hidden",
|
|
1539
|
+
u.bare.size > 0 && u.bare.size < O.length && "cms-pane-toolbar--labels-partly-hidden"
|
|
1420
1540
|
),
|
|
1421
1541
|
onKeyDown: ie,
|
|
1422
1542
|
children: [
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
const
|
|
1426
|
-
return /* @__PURE__ */
|
|
1427
|
-
|
|
1428
|
-
/* @__PURE__ */ e("div", { className: "cms-pane-toolbar__group", hidden:
|
|
1429
|
-
|
|
1543
|
+
s !== void 0 ? /* @__PURE__ */ e("div", { className: "cms-pane-toolbar__leading", children: s }) : null,
|
|
1544
|
+
x.map((_, T) => {
|
|
1545
|
+
const Z = _.filter((L) => !y.has(L.id)), W = x.slice(0, T).some((L) => L.some((j) => !y.has(j.id)));
|
|
1546
|
+
return /* @__PURE__ */ d("div", { className: "cms-pane-toolbar__group-wrap", children: [
|
|
1547
|
+
Z.length > 0 && W ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__separator", role: "separator", "aria-orientation": "vertical" }) : null,
|
|
1548
|
+
/* @__PURE__ */ e("div", { className: "cms-pane-toolbar__group", hidden: Z.length === 0, children: _.map((L) => /* @__PURE__ */ e(
|
|
1549
|
+
un,
|
|
1430
1550
|
{
|
|
1431
1551
|
action: L,
|
|
1432
1552
|
labels: !u.bare.has(L.id),
|
|
1433
|
-
overflowed:
|
|
1553
|
+
overflowed: y.has(L.id),
|
|
1434
1554
|
pinned: X.has(L.id),
|
|
1435
|
-
tabbable:
|
|
1436
|
-
tipOff:
|
|
1437
|
-
onChoose: () =>
|
|
1555
|
+
tabbable: G === L.id,
|
|
1556
|
+
tipOff: N === L.id,
|
|
1557
|
+
onChoose: () => t(L.id),
|
|
1438
1558
|
onFocus: () => {
|
|
1439
|
-
v(L.id),
|
|
1559
|
+
v(L.id), k(null);
|
|
1440
1560
|
}
|
|
1441
1561
|
},
|
|
1442
1562
|
L.id
|
|
1443
1563
|
)) })
|
|
1444
|
-
] },
|
|
1564
|
+
] }, T);
|
|
1445
1565
|
}),
|
|
1446
|
-
|
|
1566
|
+
E.length > 0 ? /* @__PURE__ */ e(
|
|
1447
1567
|
"button",
|
|
1448
1568
|
{
|
|
1449
1569
|
type: "button",
|
|
1450
1570
|
className: "cms-icon-button cms-pane-toolbar__more",
|
|
1451
1571
|
"data-stop": "more",
|
|
1452
|
-
"aria-label":
|
|
1453
|
-
title:
|
|
1572
|
+
"aria-label": m,
|
|
1573
|
+
title: m,
|
|
1454
1574
|
"aria-haspopup": "menu",
|
|
1455
|
-
"aria-expanded":
|
|
1456
|
-
tabIndex:
|
|
1575
|
+
"aria-expanded": c !== null,
|
|
1576
|
+
tabIndex: G === "more" ? 0 : -1,
|
|
1457
1577
|
onFocus: () => v("more"),
|
|
1458
|
-
onClick: (
|
|
1459
|
-
const
|
|
1460
|
-
g("first"), h(
|
|
1578
|
+
onClick: (_) => {
|
|
1579
|
+
const T = _.currentTarget.getBoundingClientRect();
|
|
1580
|
+
g("first"), h(c === null ? { x: T.left, y: T.bottom } : null);
|
|
1461
1581
|
},
|
|
1462
|
-
onKeyDown: (
|
|
1463
|
-
if (
|
|
1464
|
-
|
|
1465
|
-
const
|
|
1466
|
-
g(
|
|
1582
|
+
onKeyDown: (_) => {
|
|
1583
|
+
if (_.key === "ArrowDown" || _.key === "ArrowUp") {
|
|
1584
|
+
_.preventDefault(), _.stopPropagation();
|
|
1585
|
+
const T = _.currentTarget.getBoundingClientRect();
|
|
1586
|
+
g(_.key === "ArrowUp" ? "last" : "first"), h({ x: T.left, y: T.bottom });
|
|
1467
1587
|
}
|
|
1468
1588
|
},
|
|
1469
|
-
children: /* @__PURE__ */ e(
|
|
1589
|
+
children: /* @__PURE__ */ e(P, { name: "more" })
|
|
1470
1590
|
}
|
|
1471
1591
|
) : null,
|
|
1472
|
-
|
|
1473
|
-
/* @__PURE__ */ e(
|
|
1474
|
-
/* @__PURE__ */
|
|
1475
|
-
|
|
1592
|
+
o !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__status", title: o, children: o }) : null,
|
|
1593
|
+
/* @__PURE__ */ e(on, { at: c, items: ce, onClose: () => h(null), label: m, focus: a }),
|
|
1594
|
+
/* @__PURE__ */ d("div", { ref: i, className: "cms-pane-toolbar__measure", "aria-hidden": "true", children: [
|
|
1595
|
+
s !== void 0 ? /* @__PURE__ */ e("div", { "data-measure": "leading", children: s }) : null,
|
|
1476
1596
|
/* @__PURE__ */ e("span", { "data-measure": "separator", className: "cms-pane-toolbar__separator" }),
|
|
1477
|
-
/* @__PURE__ */ e("span", { "data-measure": "more", className: "cms-icon-button cms-pane-toolbar__more", children: /* @__PURE__ */ e(
|
|
1478
|
-
|
|
1479
|
-
/* @__PURE__ */
|
|
1480
|
-
/* @__PURE__ */ e(pe, { name:
|
|
1481
|
-
/* @__PURE__ */ e("span", { className: "cms-pane-toolbar__label", children:
|
|
1597
|
+
/* @__PURE__ */ e("span", { "data-measure": "more", className: "cms-icon-button cms-pane-toolbar__more", children: /* @__PURE__ */ e(P, { name: "more" }) }),
|
|
1598
|
+
C.map((_) => /* @__PURE__ */ d("span", { children: [
|
|
1599
|
+
/* @__PURE__ */ d("span", { "data-measure": "full", "data-measure-action": _.id, className: "cms-pane-toolbar__action", children: [
|
|
1600
|
+
/* @__PURE__ */ e(pe, { name: _.icon }),
|
|
1601
|
+
/* @__PURE__ */ e("span", { className: "cms-pane-toolbar__label", children: _.label })
|
|
1482
1602
|
] }),
|
|
1483
|
-
/* @__PURE__ */ e("span", { "data-measure": "icon", "data-measure-action":
|
|
1484
|
-
] },
|
|
1603
|
+
/* @__PURE__ */ e("span", { "data-measure": "icon", "data-measure-action": _.id, className: D("cms-pane-toolbar__action", _e(_.icon) !== null && "cms-pane-toolbar__action--bare"), children: _e(_.icon) !== null ? /* @__PURE__ */ e(pe, { name: _.icon }) : /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__label", children: _.label }) })
|
|
1604
|
+
] }, _.id))
|
|
1485
1605
|
] })
|
|
1486
1606
|
]
|
|
1487
1607
|
}
|
|
1488
1608
|
);
|
|
1489
1609
|
}
|
|
1490
|
-
function
|
|
1491
|
-
const [u,
|
|
1492
|
-
|
|
1610
|
+
function un({ action: n, labels: l, overflowed: t, pinned: o, tabbable: m, tipOff: s, onChoose: r, onFocus: i }) {
|
|
1611
|
+
const [u, p] = A(!1);
|
|
1612
|
+
Y(() => {
|
|
1493
1613
|
if (!n.busy) {
|
|
1494
|
-
|
|
1614
|
+
p(!1);
|
|
1495
1615
|
return;
|
|
1496
1616
|
}
|
|
1497
|
-
const
|
|
1498
|
-
return () => clearTimeout(
|
|
1617
|
+
const k = setTimeout(() => p(!0), ye);
|
|
1618
|
+
return () => clearTimeout(k);
|
|
1499
1619
|
}, [n.busy]);
|
|
1500
|
-
const
|
|
1501
|
-
return /* @__PURE__ */
|
|
1620
|
+
const c = _e(n.icon) === null, h = l || c, a = n.disabled && n.reason ? n.reason : null, g = a ?? (h ? null : n.label), f = q(), [v, N] = A(!1);
|
|
1621
|
+
return /* @__PURE__ */ d(
|
|
1502
1622
|
"button",
|
|
1503
1623
|
{
|
|
1504
1624
|
type: "button",
|
|
1505
|
-
className:
|
|
1625
|
+
className: D("cms-pane-toolbar__action", !h && "cms-pane-toolbar__action--bare", c && "cms-pane-toolbar__action--text", n.danger && "is-danger"),
|
|
1506
1626
|
"data-action": n.id,
|
|
1507
1627
|
"data-stop": n.id,
|
|
1508
|
-
...
|
|
1509
|
-
...
|
|
1510
|
-
hidden:
|
|
1628
|
+
...t ? { "data-overflowed": "" } : {},
|
|
1629
|
+
...o ? { "data-pinned": "" } : {},
|
|
1630
|
+
hidden: t,
|
|
1511
1631
|
"aria-label": n.label,
|
|
1512
1632
|
"aria-disabled": n.disabled || void 0,
|
|
1513
1633
|
"aria-busy": n.busy || void 0,
|
|
1514
|
-
...
|
|
1515
|
-
...v &&
|
|
1516
|
-
tabIndex:
|
|
1517
|
-
onFocus:
|
|
1518
|
-
onBlur: () =>
|
|
1519
|
-
onKeyDown: (
|
|
1520
|
-
|
|
1634
|
+
...a === null ? {} : { "aria-describedby": f },
|
|
1635
|
+
...v && a !== null ? { "data-reason-shown": "" } : {},
|
|
1636
|
+
tabIndex: m ? 0 : -1,
|
|
1637
|
+
onFocus: i,
|
|
1638
|
+
onBlur: () => N(!1),
|
|
1639
|
+
onKeyDown: (k) => {
|
|
1640
|
+
k.key === "Escape" && N(!1);
|
|
1521
1641
|
},
|
|
1522
1642
|
onClick: () => {
|
|
1523
|
-
|
|
1643
|
+
a !== null ? N(!0) : !n.disabled && !n.busy && r();
|
|
1524
1644
|
},
|
|
1525
1645
|
children: [
|
|
1526
|
-
u ? /* @__PURE__ */ e(
|
|
1646
|
+
u ? /* @__PURE__ */ e(z, { name: "spinner" }) : /* @__PURE__ */ e(pe, { name: n.icon }),
|
|
1527
1647
|
h ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__label", "aria-hidden": "true", children: n.label }) : null,
|
|
1528
|
-
|
|
1648
|
+
a !== null || g !== null && !s ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__tip", role: "tooltip", id: f, children: g }) : null
|
|
1529
1649
|
]
|
|
1530
1650
|
}
|
|
1531
1651
|
);
|
|
1532
1652
|
}
|
|
1533
1653
|
function pe({ name: n }) {
|
|
1534
1654
|
const l = _e(n);
|
|
1535
|
-
return l === null ? null : /* @__PURE__ */ e(
|
|
1655
|
+
return l === null ? null : /* @__PURE__ */ e(P, { name: l, size: 18 });
|
|
1656
|
+
}
|
|
1657
|
+
function jn({ title: n, body: l = null, time: t = null, unread: o, unreadLabel: m, expandLabel: s, collapseLabel: r, action: i = null, onRead: u, leading: p }) {
|
|
1658
|
+
const [c, h] = A(!1), a = q(), g = () => {
|
|
1659
|
+
o && u();
|
|
1660
|
+
}, f = (i == null ? void 0 : i.presentation) === "row" && i.onAction !== void 0, v = (i == null ? void 0 : i.presentation) === "button" && i.onAction !== void 0 ? i : null, N = () => {
|
|
1661
|
+
var k;
|
|
1662
|
+
g(), f && ((k = i.onAction) == null || k.call(i));
|
|
1663
|
+
};
|
|
1664
|
+
return /* @__PURE__ */ d("article", { className: D("cms-notification", o && "is-unread", c && "is-expanded", f && "is-row-action"), "data-state": o ? "unread" : "read", children: [
|
|
1665
|
+
/* @__PURE__ */ d(
|
|
1666
|
+
"div",
|
|
1667
|
+
{
|
|
1668
|
+
className: "cms-notification__row",
|
|
1669
|
+
role: "button",
|
|
1670
|
+
tabIndex: 0,
|
|
1671
|
+
"aria-describedby": l === null ? void 0 : a,
|
|
1672
|
+
onClick: N,
|
|
1673
|
+
onKeyDown: (k) => {
|
|
1674
|
+
k.target !== k.currentTarget || k.key !== "Enter" && k.key !== " " || (k.preventDefault(), N());
|
|
1675
|
+
},
|
|
1676
|
+
children: [
|
|
1677
|
+
p != null ? /* @__PURE__ */ e("span", { className: "cms-notification__leading", children: p }) : null,
|
|
1678
|
+
/* @__PURE__ */ d("span", { className: "cms-notification__text", children: [
|
|
1679
|
+
/* @__PURE__ */ d("span", { className: "cms-notification__head", children: [
|
|
1680
|
+
/* @__PURE__ */ d("span", { className: "cms-notification__title", children: [
|
|
1681
|
+
o ? /* @__PURE__ */ d("span", { className: "cms-visually-hidden", children: [
|
|
1682
|
+
m,
|
|
1683
|
+
" "
|
|
1684
|
+
] }) : null,
|
|
1685
|
+
n
|
|
1686
|
+
] }),
|
|
1687
|
+
t !== null ? /* @__PURE__ */ e("span", { className: "cms-notification__time", children: t }) : null
|
|
1688
|
+
] }),
|
|
1689
|
+
l !== null && l !== "" ? /* @__PURE__ */ e("span", { className: "cms-notification__body", id: a, children: l }) : null
|
|
1690
|
+
] }),
|
|
1691
|
+
o ? /* @__PURE__ */ e("span", { className: "cms-notification__dot", "aria-hidden": "true" }) : null
|
|
1692
|
+
]
|
|
1693
|
+
}
|
|
1694
|
+
),
|
|
1695
|
+
l !== null && l !== "" ? /* @__PURE__ */ e(
|
|
1696
|
+
"button",
|
|
1697
|
+
{
|
|
1698
|
+
type: "button",
|
|
1699
|
+
className: "cms-notification__chevron",
|
|
1700
|
+
"aria-expanded": c,
|
|
1701
|
+
"aria-controls": a,
|
|
1702
|
+
"aria-label": c ? r : s,
|
|
1703
|
+
title: c ? r : s,
|
|
1704
|
+
onClick: () => {
|
|
1705
|
+
c || g(), h((k) => !k);
|
|
1706
|
+
},
|
|
1707
|
+
children: /* @__PURE__ */ e(P, { name: "chevron-down", size: 18 })
|
|
1708
|
+
}
|
|
1709
|
+
) : null,
|
|
1710
|
+
v !== null ? /* @__PURE__ */ e(
|
|
1711
|
+
"button",
|
|
1712
|
+
{
|
|
1713
|
+
type: "button",
|
|
1714
|
+
className: "cms-button cms-notification__action",
|
|
1715
|
+
onClick: () => {
|
|
1716
|
+
var k;
|
|
1717
|
+
g(), (k = v.onAction) == null || k.call(v);
|
|
1718
|
+
},
|
|
1719
|
+
children: v.label
|
|
1720
|
+
}
|
|
1721
|
+
) : null
|
|
1722
|
+
] });
|
|
1536
1723
|
}
|
|
1537
|
-
function
|
|
1724
|
+
function hn(n) {
|
|
1538
1725
|
return n === "allowed" || n === "elevate" || n === "denied";
|
|
1539
1726
|
}
|
|
1540
|
-
function
|
|
1541
|
-
if (!
|
|
1727
|
+
function qn(n, l) {
|
|
1728
|
+
if (!hn(n))
|
|
1542
1729
|
return l.showRefused ? { offered: !0, locked: !1, refusal: "not available: the server gave an answer this app does not know", unknown: !0 } : { offered: !1, locked: !1, unknown: !0 };
|
|
1543
1730
|
switch (n) {
|
|
1544
1731
|
case "allowed":
|
|
@@ -1549,121 +1736,123 @@ function On(n, l) {
|
|
|
1549
1736
|
return l.showRefused ? { offered: !0, locked: !1, refusal: l.refusal ?? "not allowed" } : { offered: !1, locked: !1 };
|
|
1550
1737
|
}
|
|
1551
1738
|
}
|
|
1552
|
-
function
|
|
1739
|
+
function fn(n, l) {
|
|
1553
1740
|
if (!n) return;
|
|
1554
1741
|
if (typeof n.get == "function") return n.get(l) ?? void 0;
|
|
1555
|
-
const
|
|
1556
|
-
return
|
|
1742
|
+
const t = n, o = Object.keys(t).find((m) => m.toLowerCase() === l.toLowerCase());
|
|
1743
|
+
return o === void 0 ? void 0 : t[o];
|
|
1557
1744
|
}
|
|
1558
|
-
function
|
|
1745
|
+
function pn(n) {
|
|
1559
1746
|
if (n && typeof n == "object") {
|
|
1560
1747
|
const l = n;
|
|
1561
1748
|
if (typeof l.detail == "string" && l.detail !== "") return l.detail;
|
|
1562
1749
|
if (typeof l.title == "string" && l.title !== "") return l.title;
|
|
1563
1750
|
}
|
|
1564
1751
|
}
|
|
1565
|
-
function
|
|
1752
|
+
function Xn(n, l, t, o) {
|
|
1566
1753
|
if (n !== 403) return { kind: "none" };
|
|
1567
|
-
const
|
|
1568
|
-
return
|
|
1754
|
+
const m = pn(t);
|
|
1755
|
+
return fn(l, "X-Elevation-Required") !== void 0 ? o.elevates ? { kind: "elevation-required", message: m ?? "This needs an elevated session." } : { kind: "refused", message: "This can only be done in the admin, in an elevated session." } : { kind: "refused", message: m ?? "The server refused this." };
|
|
1569
1756
|
}
|
|
1570
1757
|
const we = "coolms-kit:reread";
|
|
1571
|
-
function
|
|
1758
|
+
function Gn() {
|
|
1572
1759
|
window.dispatchEvent(new Event(we));
|
|
1573
1760
|
}
|
|
1574
|
-
function
|
|
1575
|
-
const [l,
|
|
1576
|
-
|
|
1577
|
-
const u =
|
|
1578
|
-
const
|
|
1579
|
-
|
|
1761
|
+
function Yn(n) {
|
|
1762
|
+
const [l, t] = A(void 0), [o, m] = A(void 0), [s, r] = A(!0), i = U(n);
|
|
1763
|
+
i.current = n;
|
|
1764
|
+
const u = U(0), p = be(() => {
|
|
1765
|
+
const c = ++u.current;
|
|
1766
|
+
r(!0), i.current().then(
|
|
1580
1767
|
(h) => {
|
|
1581
|
-
|
|
1768
|
+
c === u.current && (t(h), m(void 0), r(!1));
|
|
1582
1769
|
},
|
|
1583
1770
|
(h) => {
|
|
1584
|
-
|
|
1771
|
+
c === u.current && (m(h), r(!1));
|
|
1585
1772
|
}
|
|
1586
1773
|
);
|
|
1587
1774
|
}, []);
|
|
1588
|
-
return
|
|
1589
|
-
|
|
1590
|
-
const
|
|
1591
|
-
return window.addEventListener("focus",
|
|
1592
|
-
window.removeEventListener("focus",
|
|
1775
|
+
return Y(() => {
|
|
1776
|
+
p();
|
|
1777
|
+
const c = () => p();
|
|
1778
|
+
return window.addEventListener("focus", c), window.addEventListener(we, c), () => {
|
|
1779
|
+
window.removeEventListener("focus", c), window.removeEventListener(we, c);
|
|
1593
1780
|
};
|
|
1594
|
-
}, [
|
|
1781
|
+
}, [p]), { value: l, error: o, loading: s, reread: p };
|
|
1595
1782
|
}
|
|
1596
|
-
function
|
|
1783
|
+
function Jn(n) {
|
|
1597
1784
|
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 };
|
|
1598
1785
|
}
|
|
1599
|
-
const
|
|
1600
|
-
function
|
|
1601
|
-
const
|
|
1602
|
-
for (let
|
|
1603
|
-
const
|
|
1604
|
-
if (
|
|
1786
|
+
const bn = "/errors/client-update-required";
|
|
1787
|
+
function _n(n, l) {
|
|
1788
|
+
const t = n.split(".").map((m) => Number.parseInt(m, 10) || 0), o = l.split(".").map((m) => Number.parseInt(m, 10) || 0);
|
|
1789
|
+
for (let m = 0; m < Math.max(t.length, o.length); m++) {
|
|
1790
|
+
const s = t[m] ?? 0, r = o[m] ?? 0;
|
|
1791
|
+
if (s !== r) return s < r;
|
|
1605
1792
|
}
|
|
1606
1793
|
return !1;
|
|
1607
1794
|
}
|
|
1608
|
-
function
|
|
1609
|
-
return n.problemType !== void 0 && n.problemType.endsWith(
|
|
1795
|
+
function Qn(n) {
|
|
1796
|
+
return n.problemType !== void 0 && n.problemType.endsWith(bn) ? !0 : n.minimumVersion !== void 0 && _n(n.version, n.minimumVersion);
|
|
1610
1797
|
}
|
|
1611
1798
|
export {
|
|
1612
|
-
|
|
1799
|
+
$n as AppShell,
|
|
1613
1800
|
ve as Avatar,
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1801
|
+
Ae as BOOTSTRAP_ICONS,
|
|
1802
|
+
tn as Badge,
|
|
1803
|
+
ne as Button,
|
|
1804
|
+
Se as CALL_LABELS,
|
|
1805
|
+
bn as CLIENT_UPDATE_REQUIRED,
|
|
1619
1806
|
zn as CallBar,
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1807
|
+
Un as CallPanel,
|
|
1808
|
+
Kn as ChatBubble,
|
|
1809
|
+
Hn as Composer,
|
|
1810
|
+
Cn as ConfirmDialog,
|
|
1811
|
+
on as ContextMenu,
|
|
1812
|
+
ze as EmptyState,
|
|
1626
1813
|
Re as ErrorBanner,
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1814
|
+
Tn as FilePicker,
|
|
1815
|
+
Je as FilePickerDenied,
|
|
1816
|
+
Dn as FileViewer,
|
|
1817
|
+
Pn as FilterChips,
|
|
1818
|
+
An as ICON_NAMES,
|
|
1819
|
+
P as Icon,
|
|
1820
|
+
On as IncomingCall,
|
|
1821
|
+
Vn as List,
|
|
1822
|
+
Ue as Loading,
|
|
1823
|
+
rn as MAIL_ROW_LABELS,
|
|
1824
|
+
Oe as MODAL_CLOSE_MS,
|
|
1825
|
+
Bn as MailRow,
|
|
1826
|
+
Le as Modal,
|
|
1827
|
+
jn as Notification,
|
|
1828
|
+
En as PageHeader,
|
|
1829
|
+
Wn as PaneToolbar,
|
|
1830
|
+
cn as SIGN_IN_LABELS,
|
|
1643
1831
|
ye as STATE_DELAY_MS,
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1832
|
+
In as SearchField,
|
|
1833
|
+
kn as Select,
|
|
1834
|
+
Zn as SignInForm,
|
|
1835
|
+
Rn as SignInLayout,
|
|
1836
|
+
Fn as SplitPanes,
|
|
1837
|
+
ee as State,
|
|
1838
|
+
Ln as TabStrip,
|
|
1839
|
+
wn as TextArea,
|
|
1840
|
+
yn as TextField,
|
|
1841
|
+
Mn as Toast,
|
|
1842
|
+
Sn as ToastRegion,
|
|
1843
|
+
xn as Toggle,
|
|
1844
|
+
an as fitPanes,
|
|
1656
1845
|
_e as iconForName,
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1846
|
+
nn as initialsOf,
|
|
1847
|
+
hn as isCapability,
|
|
1848
|
+
Qn as needsClientUpdate,
|
|
1849
|
+
qn as offerFor,
|
|
1850
|
+
Jn as readConflict,
|
|
1851
|
+
Xn as readRefusal,
|
|
1852
|
+
pn as refusalText,
|
|
1853
|
+
Gn as rereadAll,
|
|
1854
|
+
ln as tintOf,
|
|
1855
|
+
Yn as useReread,
|
|
1856
|
+
_n as versionBelow,
|
|
1857
|
+
Ke as writtenOut
|
|
1669
1858
|
};
|