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