@vacano/ui 1.15.5 → 1.15.7
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/README.md +1 -1
- package/dist/{ToggleGroup-C3ReF8j7.cjs → ToggleGroup-DXq3FgdQ.cjs} +67 -63
- package/dist/ToggleGroup-DXq3FgdQ.cjs.map +1 -0
- package/dist/{ToggleGroup-TWO3UOqH.js → ToggleGroup-Do3q0qhi.js} +837 -833
- package/dist/ToggleGroup-Do3q0qhi.js.map +1 -0
- package/dist/form.cjs +1 -1
- package/dist/form.js +1 -1
- package/dist/{index-GSZAZ6Cz.cjs → index-BUoqL3Q7.cjs} +2 -2
- package/dist/{index-GSZAZ6Cz.cjs.map → index-BUoqL3Q7.cjs.map} +1 -1
- package/dist/{index-Abn5L42P.js → index-B_4jp70c.js} +2 -2
- package/dist/{index-Abn5L42P.js.map → index-B_4jp70c.js.map} +1 -1
- package/dist/index.cjs +258 -243
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +9 -0
- package/dist/index.js +1052 -1033
- package/dist/index.js.map +1 -1
- package/dist/{keyboard-D8zOi0jU.cjs → keyboard-Cexig8lu.cjs} +3 -3
- package/dist/keyboard-Cexig8lu.cjs.map +1 -0
- package/dist/{keyboard-D00e_brg.js → keyboard-D5qN_1XD.js} +24 -16
- package/dist/keyboard-D5qN_1XD.js.map +1 -0
- package/dist/lib.cjs +1 -1
- package/dist/lib.d.ts +9 -0
- package/dist/lib.js +14 -13
- package/package.json +1 -1
- package/dist/ToggleGroup-C3ReF8j7.cjs.map +0 -1
- package/dist/ToggleGroup-TWO3UOqH.js.map +0 -1
- package/dist/keyboard-D00e_brg.js.map +0 -1
- package/dist/keyboard-D8zOi0jU.cjs.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { C as i, a as O, B as
|
|
2
|
-
import { d as
|
|
3
|
-
import { m as
|
|
4
|
-
import { b as
|
|
5
|
-
import { j as d, a as m, F as
|
|
6
|
-
import { css as
|
|
7
|
-
import { useState as L, useCallback as E, Children as
|
|
8
|
-
import { s as
|
|
9
|
-
import { A as
|
|
1
|
+
import { C as i, a as O, Z as ae, B as se, K as Z } from "./keyboard-D5qN_1XD.js";
|
|
2
|
+
import { d as Gd, c as Kd, g as Qd, b as Jd, i as ec, t as tc, u as oc } from "./keyboard-D5qN_1XD.js";
|
|
3
|
+
import { m as pe } from "./index-B_4jp70c.js";
|
|
4
|
+
import { b as nc, a as ic, i as ac } from "./index-B_4jp70c.js";
|
|
5
|
+
import { j as d, a as m, F as Fe, X as Nt, e as Yt, L as Wt } from "./X-DAuAfjix.js";
|
|
6
|
+
import { css as Oe, Global as Ut, keyframes as W } from "@emotion/react";
|
|
7
|
+
import { useState as L, useCallback as E, Children as Ct, isValidElement as Qe, cloneElement as It, useEffect as G, createContext as ke, useContext as ze, useRef as B, useLayoutEffect as Tt, useReducer as Lt, useMemo as ye } from "react";
|
|
8
|
+
import { s as l, B as we, i as qt } from "./ToggleGroup-Do3q0qhi.js";
|
|
9
|
+
import { A as dc, C as cc, a as sc, b as pc, j as gc, D as uc, F as hc, l as fc, I as xc, m as bc, K as $c, n as yc, M as mc, O as vc, R as wc, c as Sc, d as kc, S as zc, T as Ec, e as Nc, f as Cc, g as Ic, h as Tc, k as Lc } from "./ToggleGroup-Do3q0qhi.js";
|
|
10
10
|
import { n as z } from "./tooling-YDHxmiMT.js";
|
|
11
|
-
import { createPortal as
|
|
12
|
-
import { C as
|
|
13
|
-
const
|
|
11
|
+
import { createPortal as tt } from "react-dom";
|
|
12
|
+
import { C as Vt, a as Zt, b as Gt } from "./CircleX-RQVijA2m.js";
|
|
13
|
+
const Kt = Oe`
|
|
14
14
|
*,
|
|
15
15
|
*::before,
|
|
16
16
|
*::after {
|
|
@@ -112,11 +112,11 @@ const Gt = De`
|
|
|
112
112
|
:focus:not(:focus-visible) {
|
|
113
113
|
outline: none;
|
|
114
114
|
}
|
|
115
|
-
`,
|
|
115
|
+
`, ed = () => /* @__PURE__ */ d(Ut, { styles: Kt }), Qt = l.div`
|
|
116
116
|
display: flex;
|
|
117
117
|
flex-direction: column;
|
|
118
118
|
gap: ${({ $variant: e }) => e === "splitted" ? "8px" : "0"};
|
|
119
|
-
`,
|
|
119
|
+
`, Jt = l.div`
|
|
120
120
|
border-bottom: ${({ $variant: e }) => e === "outlined" ? `1px solid ${i.gray}` : "none"};
|
|
121
121
|
border-radius: ${({ $variant: e }) => e === "splitted" ? "8px" : "0"};
|
|
122
122
|
background-color: ${({ $variant: e }) => e === "splitted" ? "#f9fafb" : "transparent"};
|
|
@@ -126,7 +126,7 @@ const Gt = De`
|
|
|
126
126
|
&:first-of-type {
|
|
127
127
|
border-top: ${({ $variant: e }) => e === "outlined" ? `1px solid ${i.gray}` : "none"};
|
|
128
128
|
}
|
|
129
|
-
`,
|
|
129
|
+
`, eo = l.button`
|
|
130
130
|
display: flex;
|
|
131
131
|
align-items: center;
|
|
132
132
|
justify-content: space-between;
|
|
@@ -145,7 +145,7 @@ const Gt = De`
|
|
|
145
145
|
&:hover {
|
|
146
146
|
color: ${i.black};
|
|
147
147
|
}
|
|
148
|
-
`,
|
|
148
|
+
`, to = l.span`
|
|
149
149
|
display: flex;
|
|
150
150
|
align-items: center;
|
|
151
151
|
justify-content: center;
|
|
@@ -155,24 +155,24 @@ const Gt = De`
|
|
|
155
155
|
color: ${i["iron-grey"]};
|
|
156
156
|
transition: transform 0.2s ease;
|
|
157
157
|
transform: rotate(${({ $expanded: e }) => e ? "180deg" : "0deg"});
|
|
158
|
-
`,
|
|
158
|
+
`, oo = l.div`
|
|
159
159
|
display: grid;
|
|
160
160
|
grid-template-rows: ${({ $expanded: e }) => e ? "1fr" : "0fr"};
|
|
161
161
|
transition: grid-template-rows 0.2s ease;
|
|
162
|
-
`,
|
|
162
|
+
`, ro = l.div`
|
|
163
163
|
overflow: hidden;
|
|
164
|
-
`,
|
|
164
|
+
`, no = l.div`
|
|
165
165
|
padding: 0 16px 14px;
|
|
166
166
|
font-size: 14px;
|
|
167
167
|
line-height: 1.5;
|
|
168
168
|
color: ${i["iron-grey"]};
|
|
169
|
-
`,
|
|
169
|
+
`, ge = z("accordion"), io = () => /* @__PURE__ */ d("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ d("polyline", { points: "6 9 12 15 18 9" }) }), td = ({
|
|
170
170
|
className: e,
|
|
171
171
|
classnames: t,
|
|
172
172
|
defaultValue: o = [],
|
|
173
173
|
items: r,
|
|
174
174
|
multiple: n = !1,
|
|
175
|
-
onChange:
|
|
175
|
+
onChange: a,
|
|
176
176
|
ref: s,
|
|
177
177
|
value: c,
|
|
178
178
|
variant: p = "outlined",
|
|
@@ -182,29 +182,29 @@ const Gt = De`
|
|
|
182
182
|
(b) => {
|
|
183
183
|
const $ = f.includes(b);
|
|
184
184
|
let v;
|
|
185
|
-
n ? v = $ ? f.filter((w) => w !== b) : [...f, b] : v = $ ? [] : [b], x || h(v),
|
|
185
|
+
n ? v = $ ? f.filter((w) => w !== b) : [...f, b] : v = $ ? [] : [b], x || h(v), a == null || a(v);
|
|
186
186
|
},
|
|
187
|
-
[f, x, n,
|
|
187
|
+
[f, x, n, a]
|
|
188
188
|
);
|
|
189
189
|
return /* @__PURE__ */ d(
|
|
190
|
-
|
|
190
|
+
Qt,
|
|
191
191
|
{
|
|
192
192
|
...u,
|
|
193
193
|
ref: s,
|
|
194
194
|
$variant: p,
|
|
195
|
-
className:
|
|
195
|
+
className: ge("container", e),
|
|
196
196
|
role: "region",
|
|
197
197
|
children: r.map((b) => {
|
|
198
198
|
const $ = f.includes(b.value);
|
|
199
199
|
return /* @__PURE__ */ m(
|
|
200
|
-
|
|
200
|
+
Jt,
|
|
201
201
|
{
|
|
202
202
|
$variant: p,
|
|
203
203
|
$disabled: !!b.disabled,
|
|
204
|
-
className:
|
|
204
|
+
className: ge("item", t == null ? void 0 : t.item),
|
|
205
205
|
children: [
|
|
206
206
|
/* @__PURE__ */ m(
|
|
207
|
-
|
|
207
|
+
eo,
|
|
208
208
|
{
|
|
209
209
|
type: "button",
|
|
210
210
|
"aria-expanded": $,
|
|
@@ -212,14 +212,14 @@ const Gt = De`
|
|
|
212
212
|
$expanded: $,
|
|
213
213
|
disabled: b.disabled,
|
|
214
214
|
onClick: () => y(b.value),
|
|
215
|
-
className:
|
|
215
|
+
className: ge("trigger", t == null ? void 0 : t.trigger),
|
|
216
216
|
children: [
|
|
217
217
|
b.title,
|
|
218
|
-
/* @__PURE__ */ d(
|
|
218
|
+
/* @__PURE__ */ d(to, { $expanded: $, className: ge("icon", t == null ? void 0 : t.icon), children: /* @__PURE__ */ d(io, {}) })
|
|
219
219
|
]
|
|
220
220
|
}
|
|
221
221
|
),
|
|
222
|
-
/* @__PURE__ */ d(
|
|
222
|
+
/* @__PURE__ */ d(oo, { $expanded: $, children: /* @__PURE__ */ d(ro, { children: /* @__PURE__ */ d(no, { className: ge("content", t == null ? void 0 : t.content), children: b.content }) }) })
|
|
223
223
|
]
|
|
224
224
|
},
|
|
225
225
|
b.value
|
|
@@ -227,7 +227,7 @@ const Gt = De`
|
|
|
227
227
|
})
|
|
228
228
|
}
|
|
229
229
|
);
|
|
230
|
-
},
|
|
230
|
+
}, ao = {
|
|
231
231
|
none: "0",
|
|
232
232
|
sm: "8px",
|
|
233
233
|
md: "12px",
|
|
@@ -238,14 +238,14 @@ const Gt = De`
|
|
|
238
238
|
success: i.green,
|
|
239
239
|
warning: i.yellow,
|
|
240
240
|
danger: i.red
|
|
241
|
-
},
|
|
241
|
+
}, co = l.div`
|
|
242
242
|
display: flex;
|
|
243
243
|
align-items: ${({ $center: e }) => e ? "center" : "flex-start"};
|
|
244
244
|
gap: 12px;
|
|
245
245
|
padding: 16px;
|
|
246
|
-
border-radius: ${({ $radius: e }) =>
|
|
246
|
+
border-radius: ${({ $radius: e }) => ao[e]};
|
|
247
247
|
background-color: ${i.gray};
|
|
248
|
-
`,
|
|
248
|
+
`, so = l.div`
|
|
249
249
|
flex-shrink: 0;
|
|
250
250
|
display: flex;
|
|
251
251
|
align-items: center;
|
|
@@ -277,74 +277,74 @@ const Gt = De`
|
|
|
277
277
|
width: 16px;
|
|
278
278
|
height: 16px;
|
|
279
279
|
}
|
|
280
|
-
`,
|
|
280
|
+
`, po = l.div`
|
|
281
281
|
display: flex;
|
|
282
282
|
flex-direction: column;
|
|
283
283
|
gap: 2px;
|
|
284
284
|
flex: 1;
|
|
285
285
|
min-width: 0;
|
|
286
|
-
`,
|
|
286
|
+
`, go = l.div`
|
|
287
287
|
font-size: 14px;
|
|
288
288
|
font-weight: 600;
|
|
289
289
|
color: ${i.black};
|
|
290
290
|
line-height: 1.4;
|
|
291
|
-
`,
|
|
291
|
+
`, uo = l.div`
|
|
292
292
|
font-size: 14px;
|
|
293
293
|
color: ${i["iron-grey"]};
|
|
294
294
|
line-height: 1.5;
|
|
295
|
-
`,
|
|
295
|
+
`, Ee = z("alert"), od = ({
|
|
296
296
|
className: e,
|
|
297
297
|
classnames: t,
|
|
298
298
|
description: o,
|
|
299
299
|
icon: r,
|
|
300
300
|
radius: n = "lg",
|
|
301
|
-
ref:
|
|
301
|
+
ref: a,
|
|
302
302
|
title: s,
|
|
303
303
|
variant: c = "normal",
|
|
304
304
|
...p
|
|
305
305
|
}) => /* @__PURE__ */ m(
|
|
306
|
-
|
|
306
|
+
co,
|
|
307
307
|
{
|
|
308
308
|
...p,
|
|
309
|
-
ref:
|
|
309
|
+
ref: a,
|
|
310
310
|
role: "alert",
|
|
311
|
-
className:
|
|
311
|
+
className: Ee("container", e),
|
|
312
312
|
$radius: n,
|
|
313
313
|
$center: !o,
|
|
314
314
|
children: [
|
|
315
|
-
r && /* @__PURE__ */ d(
|
|
316
|
-
/* @__PURE__ */ m(
|
|
317
|
-
s && /* @__PURE__ */ d(
|
|
318
|
-
o && /* @__PURE__ */ d(
|
|
315
|
+
r && /* @__PURE__ */ d(so, { $variant: c, className: Ee("icon", t == null ? void 0 : t.icon), children: /* @__PURE__ */ d("span", { children: r }) }),
|
|
316
|
+
/* @__PURE__ */ m(po, { children: [
|
|
317
|
+
s && /* @__PURE__ */ d(go, { className: Ee("title", t == null ? void 0 : t.title), children: s }),
|
|
318
|
+
o && /* @__PURE__ */ d(uo, { className: Ee("description", t == null ? void 0 : t.description), children: o })
|
|
319
319
|
] })
|
|
320
320
|
]
|
|
321
321
|
}
|
|
322
|
-
),
|
|
322
|
+
), ho = (e) => {
|
|
323
323
|
var o, r;
|
|
324
324
|
const t = e.trim().split(/\s+/);
|
|
325
325
|
if (t.length >= 2) {
|
|
326
|
-
const n = ((o = t[0]) == null ? void 0 : o[0]) ?? "",
|
|
327
|
-
return (n +
|
|
326
|
+
const n = ((o = t[0]) == null ? void 0 : o[0]) ?? "", a = ((r = t[t.length - 1]) == null ? void 0 : r[0]) ?? "";
|
|
327
|
+
return (n + a).toUpperCase();
|
|
328
328
|
}
|
|
329
329
|
return e.slice(0, 2).toUpperCase();
|
|
330
|
-
},
|
|
330
|
+
}, Se = {
|
|
331
331
|
sm: 32,
|
|
332
332
|
md: 40,
|
|
333
333
|
lg: 56
|
|
334
|
-
},
|
|
334
|
+
}, Rt = {
|
|
335
335
|
sm: 12,
|
|
336
336
|
md: 14,
|
|
337
337
|
lg: 20
|
|
338
|
-
},
|
|
338
|
+
}, ot = {
|
|
339
339
|
sm: 18,
|
|
340
340
|
md: 22,
|
|
341
341
|
lg: 30
|
|
342
|
-
},
|
|
342
|
+
}, fo = {
|
|
343
343
|
sm: "6px",
|
|
344
344
|
md: "10px",
|
|
345
345
|
lg: "14px",
|
|
346
346
|
full: "50%"
|
|
347
|
-
},
|
|
347
|
+
}, je = {
|
|
348
348
|
default: { background: i.gray, color: i.black, border: i.gray },
|
|
349
349
|
primary: {
|
|
350
350
|
background: i["baltic-blue"],
|
|
@@ -354,47 +354,47 @@ const Gt = De`
|
|
|
354
354
|
success: { background: i.green, color: i.white, border: i.green },
|
|
355
355
|
warning: { background: i.yellow, color: i.black, border: i.yellow },
|
|
356
356
|
danger: { background: i.red, color: i.white, border: i.red }
|
|
357
|
-
},
|
|
357
|
+
}, xo = l.div`
|
|
358
358
|
position: relative;
|
|
359
359
|
display: inline-flex;
|
|
360
360
|
align-items: center;
|
|
361
361
|
justify-content: center;
|
|
362
362
|
overflow: hidden;
|
|
363
|
-
width: ${({ $size: e }) =>
|
|
364
|
-
height: ${({ $size: e }) =>
|
|
365
|
-
border-radius: ${({ $radius: e }) =>
|
|
366
|
-
background-color: ${({ $color: e }) =>
|
|
367
|
-
color: ${({ $color: e }) =>
|
|
368
|
-
font-size: ${({ $size: e }) =>
|
|
363
|
+
width: ${({ $size: e }) => Se[e]}px;
|
|
364
|
+
height: ${({ $size: e }) => Se[e]}px;
|
|
365
|
+
border-radius: ${({ $radius: e }) => fo[e]};
|
|
366
|
+
background-color: ${({ $color: e }) => je[e].background};
|
|
367
|
+
color: ${({ $color: e }) => je[e].color};
|
|
368
|
+
font-size: ${({ $size: e }) => Rt[e]}px;
|
|
369
369
|
font-weight: 600;
|
|
370
370
|
line-height: 1;
|
|
371
371
|
flex-shrink: 0;
|
|
372
372
|
user-select: none;
|
|
373
373
|
box-sizing: border-box;
|
|
374
|
-
${({ $bordered: e, $color: t }) => e && `box-shadow: 0 0 0 2px #fff, 0 0 0 4px ${
|
|
374
|
+
${({ $bordered: e, $color: t }) => e && `box-shadow: 0 0 0 2px #fff, 0 0 0 4px ${je[t].border};`}
|
|
375
375
|
${({ $disabled: e }) => e && "opacity: 0.5; pointer-events: none;"}
|
|
376
|
-
`,
|
|
376
|
+
`, bo = l.img`
|
|
377
377
|
width: 100%;
|
|
378
378
|
height: 100%;
|
|
379
379
|
object-fit: cover;
|
|
380
|
-
`,
|
|
380
|
+
`, rt = l.span`
|
|
381
381
|
display: inline-flex;
|
|
382
382
|
align-items: center;
|
|
383
383
|
justify-content: center;
|
|
384
384
|
|
|
385
385
|
& svg {
|
|
386
|
-
width: ${({ $size: e }) =>
|
|
387
|
-
height: ${({ $size: e }) =>
|
|
386
|
+
width: ${({ $size: e }) => ot[e]}px;
|
|
387
|
+
height: ${({ $size: e }) => ot[e]}px;
|
|
388
388
|
}
|
|
389
|
-
`,
|
|
389
|
+
`, $o = l.span`
|
|
390
390
|
letter-spacing: 0.5px;
|
|
391
|
-
`,
|
|
391
|
+
`, ue = z("avatar"), yo = ({
|
|
392
392
|
bordered: e = !1,
|
|
393
393
|
className: t,
|
|
394
394
|
classnames: o,
|
|
395
395
|
color: r = "default",
|
|
396
396
|
disabled: n = !1,
|
|
397
|
-
icon:
|
|
397
|
+
icon: a,
|
|
398
398
|
name: s,
|
|
399
399
|
radius: c = "full",
|
|
400
400
|
ref: p,
|
|
@@ -404,67 +404,67 @@ const Gt = De`
|
|
|
404
404
|
}) => {
|
|
405
405
|
const [x, f] = L(!1), y = g && !x;
|
|
406
406
|
return /* @__PURE__ */ d(
|
|
407
|
-
|
|
407
|
+
xo,
|
|
408
408
|
{
|
|
409
409
|
...h,
|
|
410
410
|
ref: p,
|
|
411
|
-
className:
|
|
411
|
+
className: ue("container", t),
|
|
412
412
|
$size: u,
|
|
413
413
|
$radius: c,
|
|
414
414
|
$color: r,
|
|
415
415
|
$bordered: e,
|
|
416
416
|
$disabled: n,
|
|
417
417
|
children: y ? /* @__PURE__ */ d(
|
|
418
|
-
|
|
418
|
+
bo,
|
|
419
419
|
{
|
|
420
|
-
className:
|
|
420
|
+
className: ue("image", o == null ? void 0 : o.image),
|
|
421
421
|
src: g,
|
|
422
422
|
alt: s || "",
|
|
423
423
|
onError: () => f(!0)
|
|
424
424
|
}
|
|
425
|
-
) :
|
|
425
|
+
) : a ? /* @__PURE__ */ d(rt, { className: ue("fallback", o == null ? void 0 : o.fallback), $size: u, children: a }) : s ? /* @__PURE__ */ d($o, { className: ue("initials", o == null ? void 0 : o.initials), children: ho(s) }) : /* @__PURE__ */ d(rt, { className: ue("fallback", o == null ? void 0 : o.fallback), $size: u, children: /* @__PURE__ */ d("svg", { viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ d("path", { d: "M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z" }) }) })
|
|
426
426
|
}
|
|
427
427
|
);
|
|
428
|
-
},
|
|
428
|
+
}, mo = l.div`
|
|
429
429
|
display: inline-flex;
|
|
430
430
|
align-items: center;
|
|
431
431
|
|
|
432
432
|
& > * + * {
|
|
433
|
-
margin-left: -${({ $size: e }) => Math.round(
|
|
433
|
+
margin-left: -${({ $size: e }) => Math.round(Se[e] * 0.25)}px;
|
|
434
434
|
}
|
|
435
|
-
`,
|
|
435
|
+
`, vo = l.div`
|
|
436
436
|
display: inline-flex;
|
|
437
437
|
align-items: center;
|
|
438
438
|
justify-content: center;
|
|
439
|
-
width: ${({ $size: e }) =>
|
|
440
|
-
height: ${({ $size: e }) =>
|
|
439
|
+
width: ${({ $size: e }) => Se[e]}px;
|
|
440
|
+
height: ${({ $size: e }) => Se[e]}px;
|
|
441
441
|
border-radius: 50%;
|
|
442
442
|
background-color: #e4e4e7;
|
|
443
443
|
color: #71717a;
|
|
444
|
-
font-size: ${({ $size: e }) =>
|
|
444
|
+
font-size: ${({ $size: e }) => Rt[e]}px;
|
|
445
445
|
font-weight: 600;
|
|
446
446
|
line-height: 1;
|
|
447
447
|
flex-shrink: 0;
|
|
448
|
-
`,
|
|
448
|
+
`, nt = z("avatar-group"), rd = ({
|
|
449
449
|
children: e,
|
|
450
450
|
className: t,
|
|
451
451
|
classnames: o,
|
|
452
452
|
max: r = 5,
|
|
453
453
|
ref: n,
|
|
454
|
-
size:
|
|
454
|
+
size: a = "md",
|
|
455
455
|
...s
|
|
456
456
|
}) => {
|
|
457
|
-
const c =
|
|
458
|
-
return /* @__PURE__ */ m(
|
|
457
|
+
const c = Ct.toArray(e).filter(Qe), p = c.slice(0, r), u = c.length - r;
|
|
458
|
+
return /* @__PURE__ */ m(mo, { ...s, ref: n, className: nt("container", t), $size: a, children: [
|
|
459
459
|
p.map(
|
|
460
|
-
(g) =>
|
|
460
|
+
(g) => Qe(g) ? It(g, { size: a }) : g
|
|
461
461
|
),
|
|
462
|
-
u > 0 && /* @__PURE__ */ m(
|
|
462
|
+
u > 0 && /* @__PURE__ */ m(vo, { className: nt("count", o == null ? void 0 : o.count), $size: a, children: [
|
|
463
463
|
"+",
|
|
464
464
|
u
|
|
465
465
|
] })
|
|
466
466
|
] });
|
|
467
|
-
},
|
|
467
|
+
}, wo = {
|
|
468
468
|
default: { bg: i.black, text: i.white, border: i.black, flatBg: i.gray },
|
|
469
469
|
success: { bg: i.green, text: i.white, border: i.green, flatBg: "#dcfce7" },
|
|
470
470
|
warning: { bg: i.yellow, text: i.black, border: i.yellow, flatBg: "#fef9c3" },
|
|
@@ -473,7 +473,7 @@ const Gt = De`
|
|
|
473
473
|
sm: { minWidth: 16, height: 16, fontSize: 10, padding: "0 4px", dotSize: 8 },
|
|
474
474
|
md: { minWidth: 20, height: 20, fontSize: 11, padding: "0 5px", dotSize: 10 },
|
|
475
475
|
lg: { minWidth: 24, height: 24, fontSize: 12, padding: "0 6px", dotSize: 12 }
|
|
476
|
-
},
|
|
476
|
+
}, So = (e, t) => {
|
|
477
477
|
const o = t === "circle" ? "10%" : "0%";
|
|
478
478
|
switch (e) {
|
|
479
479
|
case "top-right":
|
|
@@ -485,8 +485,8 @@ const Gt = De`
|
|
|
485
485
|
case "bottom-left":
|
|
486
486
|
return `bottom: 0; left: 0; transform: translate(-50%, 50%) translate(${o}, -${o});`;
|
|
487
487
|
}
|
|
488
|
-
},
|
|
489
|
-
const o =
|
|
488
|
+
}, ko = (e, t) => {
|
|
489
|
+
const o = wo[t];
|
|
490
490
|
switch (e) {
|
|
491
491
|
case "solid":
|
|
492
492
|
return `background-color: ${o.bg}; color: ${o.text};`;
|
|
@@ -495,10 +495,10 @@ const Gt = De`
|
|
|
495
495
|
case "bordered":
|
|
496
496
|
return `background-color: transparent; color: ${o.border}; border: 1.5px solid ${o.border};`;
|
|
497
497
|
}
|
|
498
|
-
},
|
|
498
|
+
}, zo = l.div`
|
|
499
499
|
position: relative;
|
|
500
500
|
display: inline-flex;
|
|
501
|
-
`,
|
|
501
|
+
`, Eo = l.span`
|
|
502
502
|
position: absolute;
|
|
503
503
|
display: inline-flex;
|
|
504
504
|
align-items: center;
|
|
@@ -524,9 +524,9 @@ const Gt = De`
|
|
|
524
524
|
padding: ${le[t].padding};
|
|
525
525
|
`}
|
|
526
526
|
|
|
527
|
-
${({ $variant: e, $color: t }) =>
|
|
527
|
+
${({ $variant: e, $color: t }) => ko(e, t)}
|
|
528
528
|
|
|
529
|
-
${({ $placement: e, $shape: t }) =>
|
|
529
|
+
${({ $placement: e, $shape: t }) => So(e, t)}
|
|
530
530
|
|
|
531
531
|
${({ $showOutline: e }) => e && `
|
|
532
532
|
box-shadow: 0 0 0 2px ${i.white};
|
|
@@ -536,13 +536,13 @@ const Gt = De`
|
|
|
536
536
|
opacity: 0;
|
|
537
537
|
transform: scale(0);
|
|
538
538
|
`}
|
|
539
|
-
`,
|
|
539
|
+
`, it = z("badge"), nd = ({
|
|
540
540
|
children: e,
|
|
541
541
|
className: t,
|
|
542
542
|
classnames: o,
|
|
543
543
|
color: r = "default",
|
|
544
544
|
content: n,
|
|
545
|
-
dot:
|
|
545
|
+
dot: a = !1,
|
|
546
546
|
invisible: s = !1,
|
|
547
547
|
placement: c = "top-right",
|
|
548
548
|
ref: p,
|
|
@@ -551,28 +551,28 @@ const Gt = De`
|
|
|
551
551
|
size: h = "md",
|
|
552
552
|
variant: x = "solid",
|
|
553
553
|
...f
|
|
554
|
-
}) => /* @__PURE__ */ m(
|
|
554
|
+
}) => /* @__PURE__ */ m(zo, { ...f, ref: p, className: it("container", t), children: [
|
|
555
555
|
e,
|
|
556
556
|
/* @__PURE__ */ d(
|
|
557
|
-
|
|
557
|
+
Eo,
|
|
558
558
|
{
|
|
559
|
-
className:
|
|
559
|
+
className: it("badge", o == null ? void 0 : o.badge),
|
|
560
560
|
$color: r,
|
|
561
|
-
$dot:
|
|
561
|
+
$dot: a,
|
|
562
562
|
$invisible: s,
|
|
563
563
|
$placement: c,
|
|
564
564
|
$shape: u,
|
|
565
565
|
$showOutline: g,
|
|
566
566
|
$size: h,
|
|
567
567
|
$variant: x,
|
|
568
|
-
children: !
|
|
568
|
+
children: !a && n
|
|
569
569
|
}
|
|
570
570
|
)
|
|
571
|
-
] }),
|
|
571
|
+
] }), id = ({ children: e, ...t }) => /* @__PURE__ */ d("li", { ...t, children: e }), ie = {
|
|
572
572
|
sm: { fontSize: 12, gap: 4, padding: "4px 8px" },
|
|
573
573
|
md: { fontSize: 14, gap: 6, padding: "6px 12px" },
|
|
574
574
|
lg: { fontSize: 16, gap: 8, padding: "8px 16px" }
|
|
575
|
-
},
|
|
575
|
+
}, No = l.nav`
|
|
576
576
|
display: inline-flex;
|
|
577
577
|
align-items: center;
|
|
578
578
|
${({ $variant: e, $size: t }) => {
|
|
@@ -594,7 +594,7 @@ const Gt = De`
|
|
|
594
594
|
return "";
|
|
595
595
|
}
|
|
596
596
|
}}
|
|
597
|
-
`,
|
|
597
|
+
`, Co = l.ol`
|
|
598
598
|
display: flex;
|
|
599
599
|
align-items: center;
|
|
600
600
|
gap: ${({ $size: e }) => ie[e].gap}px;
|
|
@@ -602,7 +602,7 @@ const Gt = De`
|
|
|
602
602
|
margin: 0;
|
|
603
603
|
padding: 0;
|
|
604
604
|
flex-wrap: wrap;
|
|
605
|
-
`,
|
|
605
|
+
`, at = l.li`
|
|
606
606
|
display: inline-flex;
|
|
607
607
|
align-items: center;
|
|
608
608
|
gap: ${({ $size: e }) => ie[e].gap}px;
|
|
@@ -611,7 +611,7 @@ const Gt = De`
|
|
|
611
611
|
color: ${({ $current: e }) => e ? i.black : i["iron-grey"]};
|
|
612
612
|
font-weight: ${({ $current: e }) => e ? 600 : 400};
|
|
613
613
|
${({ $disabled: e, $current: t }) => e && !t && "opacity: 0.5; pointer-events: none;"}
|
|
614
|
-
`,
|
|
614
|
+
`, Io = l.a`
|
|
615
615
|
display: inline-flex;
|
|
616
616
|
align-items: center;
|
|
617
617
|
gap: 4px;
|
|
@@ -630,7 +630,7 @@ const Gt = De`
|
|
|
630
630
|
color: ${i.black};
|
|
631
631
|
}
|
|
632
632
|
`}
|
|
633
|
-
`,
|
|
633
|
+
`, To = l.span`
|
|
634
634
|
display: inline-flex;
|
|
635
635
|
align-items: center;
|
|
636
636
|
color: ${i["iron-grey"]};
|
|
@@ -641,7 +641,7 @@ const Gt = De`
|
|
|
641
641
|
width: ${({ $size: e }) => ie[e].fontSize - 2}px;
|
|
642
642
|
height: ${({ $size: e }) => ie[e].fontSize - 2}px;
|
|
643
643
|
}
|
|
644
|
-
`,
|
|
644
|
+
`, Lo = l.button`
|
|
645
645
|
display: inline-flex;
|
|
646
646
|
align-items: center;
|
|
647
647
|
justify-content: center;
|
|
@@ -658,7 +658,7 @@ const Gt = De`
|
|
|
658
658
|
background-color: ${i.gray};
|
|
659
659
|
color: ${i.black};
|
|
660
660
|
}
|
|
661
|
-
`,
|
|
661
|
+
`, Ne = z("breadcrumbs"), Ro = () => /* @__PURE__ */ d(
|
|
662
662
|
"svg",
|
|
663
663
|
{
|
|
664
664
|
viewBox: "0 0 24 24",
|
|
@@ -669,13 +669,13 @@ const Gt = De`
|
|
|
669
669
|
strokeLinejoin: "round",
|
|
670
670
|
children: /* @__PURE__ */ d("path", { d: "m9 18 6-6-6-6" })
|
|
671
671
|
}
|
|
672
|
-
),
|
|
672
|
+
), ad = ({
|
|
673
673
|
children: e,
|
|
674
674
|
className: t,
|
|
675
675
|
classnames: o,
|
|
676
676
|
disabled: r = !1,
|
|
677
677
|
itemsAfterCollapse: n = 1,
|
|
678
|
-
itemsBeforeCollapse:
|
|
678
|
+
itemsBeforeCollapse: a = 1,
|
|
679
679
|
maxItems: s,
|
|
680
680
|
ref: c,
|
|
681
681
|
separator: p,
|
|
@@ -683,13 +683,13 @@ const Gt = De`
|
|
|
683
683
|
variant: g = "light",
|
|
684
684
|
...h
|
|
685
685
|
}) => {
|
|
686
|
-
const x =
|
|
687
|
-
(w) =>
|
|
688
|
-
), f = x.length, y = s !== void 0 && f > s, b = (w) => /* @__PURE__ */ d(
|
|
686
|
+
const x = Ct.toArray(e).filter(
|
|
687
|
+
(w) => Qe(w)
|
|
688
|
+
), f = x.length, y = s !== void 0 && f > s, b = (w) => /* @__PURE__ */ d(To, { className: Ne("separator", o == null ? void 0 : o.separator), $size: u, children: p || /* @__PURE__ */ d(Ro, {}) }, w), $ = (w, S, I) => {
|
|
689
689
|
const { current: A, disabled: T, href: C, startContent: N, endContent: R } = w.props, k = A || I, _ = r || T && !k;
|
|
690
|
-
return /* @__PURE__ */ m(
|
|
690
|
+
return /* @__PURE__ */ m(at, { $size: u, $current: k, $disabled: !!_, children: [
|
|
691
691
|
/* @__PURE__ */ m(
|
|
692
|
-
|
|
692
|
+
Io,
|
|
693
693
|
{
|
|
694
694
|
as: C && !k ? "a" : "span",
|
|
695
695
|
href: C && !k ? C : void 0,
|
|
@@ -706,14 +706,14 @@ const Gt = De`
|
|
|
706
706
|
] }, S);
|
|
707
707
|
}, v = () => {
|
|
708
708
|
if (y) {
|
|
709
|
-
const w = x.slice(0,
|
|
710
|
-
return /* @__PURE__ */ m(
|
|
709
|
+
const w = x.slice(0, a), S = x.slice(f - n);
|
|
710
|
+
return /* @__PURE__ */ m(Fe, { children: [
|
|
711
711
|
w.map((I, A) => $(I, A, !1)),
|
|
712
|
-
/* @__PURE__ */ m(
|
|
712
|
+
/* @__PURE__ */ m(at, { $size: u, $current: !1, $disabled: !1, children: [
|
|
713
713
|
/* @__PURE__ */ d(
|
|
714
|
-
|
|
714
|
+
Lo,
|
|
715
715
|
{
|
|
716
|
-
className:
|
|
716
|
+
className: Ne("ellipsis", o == null ? void 0 : o.ellipsis),
|
|
717
717
|
"aria-label": "Show more",
|
|
718
718
|
children: "..."
|
|
719
719
|
}
|
|
@@ -729,15 +729,15 @@ const Gt = De`
|
|
|
729
729
|
return x.map((w, S) => $(w, S, S === f - 1));
|
|
730
730
|
};
|
|
731
731
|
return /* @__PURE__ */ d(
|
|
732
|
-
|
|
732
|
+
No,
|
|
733
733
|
{
|
|
734
734
|
...h,
|
|
735
735
|
ref: c,
|
|
736
|
-
className:
|
|
736
|
+
className: Ne("container", t),
|
|
737
737
|
$variant: g,
|
|
738
738
|
$size: u,
|
|
739
739
|
"aria-label": "Breadcrumbs",
|
|
740
|
-
children: /* @__PURE__ */ d(
|
|
740
|
+
children: /* @__PURE__ */ d(Co, { className: Ne("list", o == null ? void 0 : o.list), $size: u, children: v() })
|
|
741
741
|
}
|
|
742
742
|
);
|
|
743
743
|
}, lt = {
|
|
@@ -745,18 +745,18 @@ const Gt = De`
|
|
|
745
745
|
sm: `0 1px 2px ${O(i.black, 5)}`,
|
|
746
746
|
md: `0 4px 14px ${O(i.black, 10)}`,
|
|
747
747
|
lg: `0 10px 30px ${O(i.black, 15)}`
|
|
748
|
-
},
|
|
748
|
+
}, Ao = {
|
|
749
749
|
none: "0",
|
|
750
750
|
sm: "8px",
|
|
751
751
|
md: "12px",
|
|
752
752
|
lg: "16px"
|
|
753
|
-
},
|
|
753
|
+
}, Po = l.div`
|
|
754
754
|
position: relative;
|
|
755
755
|
display: flex;
|
|
756
756
|
flex-direction: column;
|
|
757
757
|
overflow: hidden;
|
|
758
758
|
background-color: ${({ $blurred: e }) => e ? O(i.white, 70) : i.white};
|
|
759
|
-
border-radius: ${({ $radius: e }) =>
|
|
759
|
+
border-radius: ${({ $radius: e }) => Ao[e]};
|
|
760
760
|
border: ${({ $border: e }) => e ? `1px solid ${O(i["iron-grey"], 15)}` : "none"};
|
|
761
761
|
box-shadow: ${({ $shadow: e }) => lt[e]};
|
|
762
762
|
width: ${({ $fullWidth: e }) => e ? "100%" : "auto"};
|
|
@@ -785,19 +785,19 @@ const Gt = De`
|
|
|
785
785
|
transform: scale(0.98);
|
|
786
786
|
}
|
|
787
787
|
`}
|
|
788
|
-
`,
|
|
788
|
+
`, Bo = l.div`
|
|
789
789
|
display: flex;
|
|
790
790
|
align-items: center;
|
|
791
791
|
gap: 12px;
|
|
792
792
|
padding: 16px 16px 0;
|
|
793
793
|
z-index: 1;
|
|
794
|
-
`,
|
|
794
|
+
`, _o = l.div`
|
|
795
795
|
display: flex;
|
|
796
796
|
flex-direction: column;
|
|
797
797
|
flex: 1;
|
|
798
798
|
padding: 12px 16px;
|
|
799
799
|
z-index: 1;
|
|
800
|
-
`,
|
|
800
|
+
`, Mo = l.div`
|
|
801
801
|
display: flex;
|
|
802
802
|
align-items: center;
|
|
803
803
|
gap: 8px;
|
|
@@ -811,13 +811,13 @@ const Gt = De`
|
|
|
811
811
|
-webkit-backdrop-filter: blur(10px);
|
|
812
812
|
border-top: 1px solid ${O(i["iron-grey"], 15)};
|
|
813
813
|
`}
|
|
814
|
-
`,
|
|
814
|
+
`, Do = z("card"), ld = ({
|
|
815
815
|
blurred: e = !1,
|
|
816
816
|
border: t = !1,
|
|
817
817
|
children: o,
|
|
818
818
|
className: r,
|
|
819
819
|
disabled: n = !1,
|
|
820
|
-
footerBlurred:
|
|
820
|
+
footerBlurred: a = !1,
|
|
821
821
|
fullWidth: s = !1,
|
|
822
822
|
hoverable: c = !1,
|
|
823
823
|
pressable: p = !1,
|
|
@@ -828,15 +828,15 @@ const Gt = De`
|
|
|
828
828
|
}) => {
|
|
829
829
|
const f = typeof h == "boolean" ? h ? "md" : "none" : h;
|
|
830
830
|
return /* @__PURE__ */ d(
|
|
831
|
-
|
|
831
|
+
Po,
|
|
832
832
|
{
|
|
833
833
|
...x,
|
|
834
834
|
ref: g,
|
|
835
|
-
className:
|
|
835
|
+
className: Do("container", r),
|
|
836
836
|
$blurred: e,
|
|
837
837
|
$border: t,
|
|
838
838
|
$disabled: n,
|
|
839
|
-
$footerBlurred:
|
|
839
|
+
$footerBlurred: a,
|
|
840
840
|
$fullWidth: s,
|
|
841
841
|
$hoverable: c,
|
|
842
842
|
$pressable: p,
|
|
@@ -847,13 +847,19 @@ const Gt = De`
|
|
|
847
847
|
children: o
|
|
848
848
|
}
|
|
849
849
|
);
|
|
850
|
-
},
|
|
850
|
+
}, Fo = z("card"), dd = ({ children: e, className: t, ref: o, ...r }) => /* @__PURE__ */ d(_o, { ...r, ref: o, className: Fo("body", t), children: e }), Oo = z("card"), cd = ({
|
|
851
851
|
blurred: e = !1,
|
|
852
852
|
children: t,
|
|
853
853
|
className: o,
|
|
854
854
|
ref: r,
|
|
855
855
|
...n
|
|
856
|
-
}) => /* @__PURE__ */ d(
|
|
856
|
+
}) => /* @__PURE__ */ d(Mo, { ...n, ref: r, className: Oo("footer", o), $blurred: e, children: t }), jo = z("card"), sd = ({ children: e, className: t, ref: o, ...r }) => /* @__PURE__ */ d(Bo, { ...r, ref: o, className: jo("header", t), children: e }), Ho = "Confirm", Xo = "Cancel", Yo = W`
|
|
857
|
+
from { opacity: 0; }
|
|
858
|
+
to { opacity: 1; }
|
|
859
|
+
`, Wo = W`
|
|
860
|
+
from { opacity: 1; }
|
|
861
|
+
to { opacity: 0; }
|
|
862
|
+
`, Uo = W`
|
|
857
863
|
from {
|
|
858
864
|
opacity: 0;
|
|
859
865
|
transform: translateX(-50%) translateY(100%);
|
|
@@ -862,7 +868,7 @@ const Gt = De`
|
|
|
862
868
|
opacity: 1;
|
|
863
869
|
transform: translateX(-50%) translateY(0);
|
|
864
870
|
}
|
|
865
|
-
`,
|
|
871
|
+
`, qo = W`
|
|
866
872
|
from {
|
|
867
873
|
opacity: 1;
|
|
868
874
|
transform: translateX(-50%) translateY(0);
|
|
@@ -871,7 +877,14 @@ const Gt = De`
|
|
|
871
877
|
opacity: 0;
|
|
872
878
|
transform: translateX(-50%) translateY(100%);
|
|
873
879
|
}
|
|
874
|
-
`,
|
|
880
|
+
`, Vo = l.div`
|
|
881
|
+
position: fixed;
|
|
882
|
+
inset: 0;
|
|
883
|
+
z-index: ${ae.confirmation};
|
|
884
|
+
background-color: rgba(0, 0, 0, 0.15);
|
|
885
|
+
backdrop-filter: blur(2px);
|
|
886
|
+
animation: ${({ $isExiting: e }) => e ? Wo : Yo} 0.2s ease-out forwards;
|
|
887
|
+
`, Zo = l.div`
|
|
875
888
|
position: fixed;
|
|
876
889
|
bottom: 24px;
|
|
877
890
|
left: 50%;
|
|
@@ -885,19 +898,19 @@ const Gt = De`
|
|
|
885
898
|
box-shadow:
|
|
886
899
|
0 4px 6px -1px rgba(0, 0, 0, 0.1),
|
|
887
900
|
0 2px 4px -2px rgba(0, 0, 0, 0.1);
|
|
888
|
-
animation: ${({ $isExiting: e }) => e ?
|
|
889
|
-
z-index:
|
|
890
|
-
`,
|
|
901
|
+
animation: ${({ $isExiting: e }) => e ? qo : Uo} 0.2s ease-out forwards;
|
|
902
|
+
z-index: ${ae.confirmationBar};
|
|
903
|
+
`, Go = l.p`
|
|
891
904
|
margin: 0;
|
|
892
905
|
font-size: 14px;
|
|
893
906
|
color: ${i.black};
|
|
894
907
|
white-space: nowrap;
|
|
895
|
-
`,
|
|
908
|
+
`, Ko = l.div`
|
|
896
909
|
display: flex;
|
|
897
910
|
align-items: center;
|
|
898
911
|
gap: 8px;
|
|
899
|
-
`,
|
|
900
|
-
const [o, r] = L(!1), [n,
|
|
912
|
+
`, Qo = ({ confirmation: e, onDone: t }) => {
|
|
913
|
+
const [o, r] = L(!1), [n, a] = L(!1), { message: s, onConfirm: c, onCancel: p, options: u } = e, g = u.confirmLabel || Ho, h = u.cancelLabel || Xo, x = E(
|
|
901
914
|
(b) => {
|
|
902
915
|
r(!0), setTimeout(() => {
|
|
903
916
|
b == null || b(), t();
|
|
@@ -907,11 +920,11 @@ const Gt = De`
|
|
|
907
920
|
), f = E(async () => {
|
|
908
921
|
const b = c();
|
|
909
922
|
if (b instanceof Promise) {
|
|
910
|
-
|
|
923
|
+
a(!0);
|
|
911
924
|
try {
|
|
912
925
|
await b;
|
|
913
926
|
} finally {
|
|
914
|
-
|
|
927
|
+
a(!1);
|
|
915
928
|
}
|
|
916
929
|
}
|
|
917
930
|
x();
|
|
@@ -923,22 +936,25 @@ const Gt = De`
|
|
|
923
936
|
$.key === "Escape" && !n && y();
|
|
924
937
|
};
|
|
925
938
|
return document.addEventListener("keydown", b), () => document.removeEventListener("keydown", b);
|
|
926
|
-
}, [y, n]), /* @__PURE__ */ m(
|
|
927
|
-
/* @__PURE__ */ d(
|
|
928
|
-
/* @__PURE__ */ m(
|
|
929
|
-
/* @__PURE__ */ d(
|
|
930
|
-
/* @__PURE__ */
|
|
939
|
+
}, [y, n]), /* @__PURE__ */ m(Fe, { children: [
|
|
940
|
+
/* @__PURE__ */ d(Vo, { $isExiting: o, onClick: y }),
|
|
941
|
+
/* @__PURE__ */ m(Zo, { $isExiting: o, children: [
|
|
942
|
+
/* @__PURE__ */ d(Go, { children: s }),
|
|
943
|
+
/* @__PURE__ */ m(Ko, { children: [
|
|
944
|
+
/* @__PURE__ */ d(we, { variant: "system", size: "compact", onClick: y, disabled: n, children: h }),
|
|
945
|
+
/* @__PURE__ */ d(we, { variant: "danger", size: "compact", onClick: f, loading: n, children: g })
|
|
946
|
+
] })
|
|
931
947
|
] })
|
|
932
948
|
] });
|
|
933
|
-
},
|
|
934
|
-
},
|
|
949
|
+
}, At = ke(null), Jo = () => {
|
|
950
|
+
}, pd = ({ children: e }) => {
|
|
935
951
|
const [t, o] = L(null), r = E(
|
|
936
|
-
(
|
|
952
|
+
(a, s, c, p) => {
|
|
937
953
|
o({
|
|
938
954
|
open: !0,
|
|
939
|
-
message:
|
|
955
|
+
message: a,
|
|
940
956
|
onConfirm: s,
|
|
941
|
-
onCancel: c ||
|
|
957
|
+
onCancel: c || Jo,
|
|
942
958
|
options: p || {}
|
|
943
959
|
});
|
|
944
960
|
},
|
|
@@ -946,105 +962,105 @@ const Gt = De`
|
|
|
946
962
|
), n = E(() => {
|
|
947
963
|
o(null);
|
|
948
964
|
}, []);
|
|
949
|
-
return /* @__PURE__ */ m(
|
|
965
|
+
return /* @__PURE__ */ m(At.Provider, { value: { show: r, hide: n }, children: [
|
|
950
966
|
e,
|
|
951
|
-
t && /* @__PURE__ */ d(
|
|
967
|
+
t && /* @__PURE__ */ d(Qo, { confirmation: t, onDone: n })
|
|
952
968
|
] });
|
|
953
|
-
},
|
|
954
|
-
const e =
|
|
969
|
+
}, gd = () => {
|
|
970
|
+
const e = ze(At);
|
|
955
971
|
if (!e)
|
|
956
972
|
throw new Error("useConfirmation must be used within ConfirmationProvider");
|
|
957
973
|
return e;
|
|
958
|
-
},
|
|
959
|
-
sm: `${
|
|
960
|
-
md: `${
|
|
961
|
-
lg: `${
|
|
962
|
-
xl: `${
|
|
963
|
-
"2xl": `${
|
|
964
|
-
},
|
|
974
|
+
}, he = {
|
|
975
|
+
sm: `${se.sm}px`,
|
|
976
|
+
md: `${se.md}px`,
|
|
977
|
+
lg: `${se.lg}px`,
|
|
978
|
+
xl: `${se.xl}px`,
|
|
979
|
+
"2xl": `${se["2xl"]}px`
|
|
980
|
+
}, er = l.div`
|
|
965
981
|
width: 100%;
|
|
966
982
|
|
|
967
|
-
${
|
|
968
|
-
max-width: ${
|
|
983
|
+
${pe("sm")} {
|
|
984
|
+
max-width: ${he.sm};
|
|
969
985
|
}
|
|
970
986
|
|
|
971
|
-
${
|
|
972
|
-
max-width: ${
|
|
987
|
+
${pe("md")} {
|
|
988
|
+
max-width: ${he.md};
|
|
973
989
|
}
|
|
974
990
|
|
|
975
|
-
${
|
|
976
|
-
max-width: ${
|
|
991
|
+
${pe("lg")} {
|
|
992
|
+
max-width: ${he.lg};
|
|
977
993
|
}
|
|
978
994
|
|
|
979
|
-
${
|
|
980
|
-
max-width: ${
|
|
995
|
+
${pe("xl")} {
|
|
996
|
+
max-width: ${he.xl};
|
|
981
997
|
}
|
|
982
998
|
|
|
983
|
-
${
|
|
984
|
-
max-width: ${
|
|
999
|
+
${pe("2xl")} {
|
|
1000
|
+
max-width: ${he["2xl"]};
|
|
985
1001
|
}
|
|
986
|
-
`,
|
|
1002
|
+
`, tr = z("container"), ud = ({
|
|
987
1003
|
children: e,
|
|
988
1004
|
className: t,
|
|
989
1005
|
ref: o,
|
|
990
1006
|
...r
|
|
991
|
-
}) => /* @__PURE__ */ d(
|
|
1007
|
+
}) => /* @__PURE__ */ d(er, { ...r, ref: o, className: tr("container", t), children: e }), dt = (e, t) => new Intl.DateTimeFormat(t, { year: "numeric", month: "long" }).format(e), or = l.span`
|
|
992
1008
|
display: inline-flex;
|
|
993
1009
|
align-items: baseline;
|
|
994
1010
|
gap: 5px;
|
|
995
1011
|
font-size: 13px;
|
|
996
1012
|
font-weight: 500;
|
|
997
1013
|
color: ${i["iron-grey"]};
|
|
998
|
-
`,
|
|
1014
|
+
`, rr = l.span`
|
|
999
1015
|
font-weight: 500;
|
|
1000
|
-
`,
|
|
1016
|
+
`, nr = l.span``, fe = z("date-range"), hd = ({
|
|
1001
1017
|
className: e,
|
|
1002
1018
|
classnames: t,
|
|
1003
1019
|
from: o,
|
|
1004
1020
|
locale: r = "en",
|
|
1005
1021
|
presentLabel: n = "Present Time",
|
|
1006
|
-
ref:
|
|
1022
|
+
ref: a,
|
|
1007
1023
|
to: s,
|
|
1008
1024
|
...c
|
|
1009
|
-
}) => /* @__PURE__ */ m(
|
|
1010
|
-
/* @__PURE__ */ d(
|
|
1011
|
-
/* @__PURE__ */ d("span", { className:
|
|
1012
|
-
/* @__PURE__ */ d(
|
|
1013
|
-
/* @__PURE__ */ d("span", { className:
|
|
1014
|
-
] }),
|
|
1025
|
+
}) => /* @__PURE__ */ m(or, { ...c, ref: a, className: fe("container", e), children: [
|
|
1026
|
+
/* @__PURE__ */ d(rr, { className: fe("hash", t == null ? void 0 : t.hash), children: "#" }),
|
|
1027
|
+
/* @__PURE__ */ d("span", { className: fe("from", t == null ? void 0 : t.from), children: dt(o, r) }),
|
|
1028
|
+
/* @__PURE__ */ d(nr, { className: fe("separator", t == null ? void 0 : t.separator), children: "—" }),
|
|
1029
|
+
/* @__PURE__ */ d("span", { className: fe("to", t == null ? void 0 : t.to), children: s ? dt(s, r) : n })
|
|
1030
|
+
] }), ir = l.div`
|
|
1015
1031
|
display: flex;
|
|
1016
1032
|
flex-direction: row;
|
|
1017
1033
|
align-items: center;
|
|
1018
1034
|
gap: 8px;
|
|
1019
1035
|
margin-top: ${(e) => e.$spacing}px;
|
|
1020
1036
|
margin-bottom: ${(e) => e.$spacing}px;
|
|
1021
|
-
`,
|
|
1037
|
+
`, ct = l.div`
|
|
1022
1038
|
flex: 1;
|
|
1023
1039
|
height: 1px;
|
|
1024
1040
|
background-color: ${i.gray};
|
|
1025
|
-
`,
|
|
1041
|
+
`, ar = l.span`
|
|
1026
1042
|
font-size: 12px;
|
|
1027
1043
|
color: ${i["iron-grey"]};
|
|
1028
1044
|
white-space: nowrap;
|
|
1029
|
-
`,
|
|
1045
|
+
`, Ce = z("divider"), fd = ({
|
|
1030
1046
|
children: e,
|
|
1031
1047
|
className: t,
|
|
1032
1048
|
classnames: o,
|
|
1033
1049
|
ref: r,
|
|
1034
1050
|
spacing: n = 8,
|
|
1035
|
-
...
|
|
1036
|
-
}) => /* @__PURE__ */ m(
|
|
1037
|
-
/* @__PURE__ */ d(
|
|
1038
|
-
e && /* @__PURE__ */ m(
|
|
1039
|
-
/* @__PURE__ */ d(
|
|
1040
|
-
/* @__PURE__ */ d(
|
|
1051
|
+
...a
|
|
1052
|
+
}) => /* @__PURE__ */ m(ir, { ...a, ref: r, className: Ce("container", t), $spacing: n, children: [
|
|
1053
|
+
/* @__PURE__ */ d(ct, { className: Ce("line", o == null ? void 0 : o.line) }),
|
|
1054
|
+
e && /* @__PURE__ */ m(Fe, { children: [
|
|
1055
|
+
/* @__PURE__ */ d(ar, { className: Ce("label", o == null ? void 0 : o.label), children: e }),
|
|
1056
|
+
/* @__PURE__ */ d(ct, { className: Ce("line", o == null ? void 0 : o.line) })
|
|
1041
1057
|
] })
|
|
1042
|
-
] }),
|
|
1058
|
+
] }), lr = {
|
|
1043
1059
|
left: Z.slideInLeft,
|
|
1044
1060
|
right: Z.slideInRight,
|
|
1045
1061
|
top: Z.slideInTop,
|
|
1046
1062
|
bottom: Z.slideInBottom
|
|
1047
|
-
},
|
|
1063
|
+
}, dr = (e, t) => {
|
|
1048
1064
|
switch (e) {
|
|
1049
1065
|
case "left":
|
|
1050
1066
|
return `
|
|
@@ -1075,29 +1091,29 @@ const Gt = De`
|
|
|
1075
1091
|
height: ${t};
|
|
1076
1092
|
`;
|
|
1077
1093
|
}
|
|
1078
|
-
},
|
|
1094
|
+
}, cr = l.div`
|
|
1079
1095
|
position: fixed;
|
|
1080
|
-
z-index:
|
|
1096
|
+
z-index: ${ae.modal};
|
|
1081
1097
|
background-color: ${i.white};
|
|
1082
1098
|
box-shadow: 0 4px 24px ${O(i.black, 20)};
|
|
1083
|
-
${(e) =>
|
|
1084
|
-
animation: ${(e) =>
|
|
1085
|
-
`,
|
|
1099
|
+
${(e) => dr(e.$position, e.$size)}
|
|
1100
|
+
animation: ${(e) => lr[e.$position]} ${(e) => e.$animated ? "0.05s" : "0s"} ease-out forwards;
|
|
1101
|
+
`, sr = z("drawer"), xd = ({
|
|
1086
1102
|
animated: e,
|
|
1087
1103
|
children: t,
|
|
1088
1104
|
className: o,
|
|
1089
1105
|
open: r,
|
|
1090
1106
|
position: n = "right",
|
|
1091
|
-
ref:
|
|
1107
|
+
ref: a,
|
|
1092
1108
|
size: s = "400px",
|
|
1093
1109
|
...c
|
|
1094
|
-
}) => r ?
|
|
1110
|
+
}) => r ? tt(
|
|
1095
1111
|
/* @__PURE__ */ d(
|
|
1096
|
-
|
|
1112
|
+
cr,
|
|
1097
1113
|
{
|
|
1098
1114
|
...c,
|
|
1099
|
-
ref:
|
|
1100
|
-
className:
|
|
1115
|
+
ref: a,
|
|
1116
|
+
className: sr("container", o),
|
|
1101
1117
|
$animated: !!e,
|
|
1102
1118
|
$position: n,
|
|
1103
1119
|
$size: s,
|
|
@@ -1105,48 +1121,49 @@ const Gt = De`
|
|
|
1105
1121
|
}
|
|
1106
1122
|
),
|
|
1107
1123
|
document.body
|
|
1108
|
-
) : null,
|
|
1124
|
+
) : null, pr = l.div`
|
|
1109
1125
|
position: relative;
|
|
1110
1126
|
display: inline-block;
|
|
1111
|
-
`,
|
|
1127
|
+
`, gr = l.div`
|
|
1112
1128
|
cursor: pointer;
|
|
1113
|
-
`,
|
|
1114
|
-
z-index: 100;
|
|
1129
|
+
`, Pt = `
|
|
1115
1130
|
min-width: 160px;
|
|
1116
1131
|
padding: 8px;
|
|
1117
1132
|
background-color: ${i.white};
|
|
1118
1133
|
border: 1px solid ${i.gray};
|
|
1119
1134
|
border-radius: 8px;
|
|
1120
1135
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
|
1121
|
-
`,
|
|
1136
|
+
`, Bt = (e, t) => e ? "translateY(0)" : t === "bottom" ? "translateY(-8px)" : "translateY(8px)", ur = l.div`
|
|
1122
1137
|
position: absolute;
|
|
1123
1138
|
${({ $position: e }) => e === "bottom" ? "top: calc(100% + 4px);" : "bottom: calc(100% + 4px);"}
|
|
1124
1139
|
${({ $align: e }) => e === "left" ? "left: 0;" : "right: 0;"}
|
|
1125
|
-
${
|
|
1140
|
+
z-index: ${ae.dropdown};
|
|
1141
|
+
${Pt}
|
|
1126
1142
|
opacity: ${({ $open: e }) => e ? 1 : 0};
|
|
1127
1143
|
visibility: ${({ $open: e }) => e ? "visible" : "hidden"};
|
|
1128
|
-
transform: ${({ $open: e, $position: t }) =>
|
|
1144
|
+
transform: ${({ $open: e, $position: t }) => Bt(e, t)};
|
|
1129
1145
|
transition:
|
|
1130
1146
|
opacity 0.15s ease,
|
|
1131
1147
|
transform 0.15s ease,
|
|
1132
1148
|
visibility 0.15s;
|
|
1133
|
-
`,
|
|
1149
|
+
`, hr = l.div`
|
|
1134
1150
|
position: fixed;
|
|
1135
|
-
${
|
|
1151
|
+
z-index: ${ae.portalDropdown};
|
|
1152
|
+
${Pt}
|
|
1136
1153
|
opacity: ${({ $open: e }) => e ? 1 : 0};
|
|
1137
1154
|
visibility: ${({ $open: e }) => e ? "visible" : "hidden"};
|
|
1138
|
-
transform: ${({ $open: e, $position: t }) =>
|
|
1155
|
+
transform: ${({ $open: e, $position: t }) => Bt(e, t)};
|
|
1139
1156
|
transition:
|
|
1140
1157
|
opacity 0.15s ease,
|
|
1141
1158
|
transform 0.15s ease,
|
|
1142
1159
|
visibility 0.15s;
|
|
1143
|
-
`,
|
|
1160
|
+
`, Ie = z("dropdown"), Te = 4, fr = 100, bd = ({
|
|
1144
1161
|
align: e = "left",
|
|
1145
1162
|
autoClose: t = !0,
|
|
1146
1163
|
children: o,
|
|
1147
1164
|
className: r,
|
|
1148
1165
|
classnames: n,
|
|
1149
|
-
onClose:
|
|
1166
|
+
onClose: a,
|
|
1150
1167
|
onOpen: s,
|
|
1151
1168
|
open: c,
|
|
1152
1169
|
portalRenderNode: p,
|
|
@@ -1157,24 +1174,24 @@ const Gt = De`
|
|
|
1157
1174
|
const [x, f] = L(!1), [y, b] = L({ top: 0, left: 0 }), [$, v] = L("bottom"), w = B(null), S = B(null), I = B(null), A = c !== void 0, T = A ? c : x, C = E(() => {
|
|
1158
1175
|
var X, Y;
|
|
1159
1176
|
if (!S.current) return;
|
|
1160
|
-
const P = S.current.getBoundingClientRect(), j = ((X = I.current) == null ? void 0 : X.offsetHeight) ??
|
|
1177
|
+
const P = S.current.getBoundingClientRect(), j = ((X = I.current) == null ? void 0 : X.offsetHeight) ?? fr, q = ((Y = I.current) == null ? void 0 : Y.offsetWidth) ?? 160, H = window.innerHeight - P.bottom - Te, K = P.top - Te, Q = H < j && K > H ? "top" : "bottom";
|
|
1161
1178
|
if (v(Q), p) {
|
|
1162
1179
|
let J;
|
|
1163
1180
|
e === "left" ? J = P.left : J = P.right - q;
|
|
1164
|
-
const
|
|
1165
|
-
b({ top:
|
|
1181
|
+
const Xt = Q === "bottom" ? P.bottom + Te : P.top - j - Te;
|
|
1182
|
+
b({ top: Xt, left: J });
|
|
1166
1183
|
}
|
|
1167
1184
|
}, [e, p]), N = E(() => {
|
|
1168
|
-
A ? T ?
|
|
1185
|
+
A ? T ? a == null || a() : s == null || s() : f((P) => {
|
|
1169
1186
|
const j = !P;
|
|
1170
|
-
return j ? s == null || s() :
|
|
1187
|
+
return j ? s == null || s() : a == null || a(), j;
|
|
1171
1188
|
});
|
|
1172
|
-
}, [A, T,
|
|
1173
|
-
A || f(!1),
|
|
1174
|
-
}, [A,
|
|
1189
|
+
}, [A, T, a, s]), R = E(() => {
|
|
1190
|
+
A || f(!1), a == null || a();
|
|
1191
|
+
}, [A, a]), k = E(() => {
|
|
1175
1192
|
t && R();
|
|
1176
1193
|
}, [t, R]);
|
|
1177
|
-
|
|
1194
|
+
Tt(() => {
|
|
1178
1195
|
T && C();
|
|
1179
1196
|
}, [T, C]), G(() => {
|
|
1180
1197
|
const P = (K) => {
|
|
@@ -1191,14 +1208,14 @@ const Gt = De`
|
|
|
1191
1208
|
document.removeEventListener("mousedown", P), document.removeEventListener("keydown", j), window.removeEventListener("scroll", q, !0), window.removeEventListener("resize", H);
|
|
1192
1209
|
};
|
|
1193
1210
|
}, [T, R, p, C]);
|
|
1194
|
-
const _ = p ?
|
|
1211
|
+
const _ = p ? tt(
|
|
1195
1212
|
/* @__PURE__ */ d(
|
|
1196
|
-
|
|
1213
|
+
hr,
|
|
1197
1214
|
{
|
|
1198
1215
|
ref: I,
|
|
1199
1216
|
$open: T,
|
|
1200
1217
|
$position: $,
|
|
1201
|
-
className:
|
|
1218
|
+
className: Ie("content", n == null ? void 0 : n.content),
|
|
1202
1219
|
style: { top: y.top, left: y.left },
|
|
1203
1220
|
onClick: k,
|
|
1204
1221
|
children: o
|
|
@@ -1206,36 +1223,36 @@ const Gt = De`
|
|
|
1206
1223
|
),
|
|
1207
1224
|
p
|
|
1208
1225
|
) : /* @__PURE__ */ d(
|
|
1209
|
-
|
|
1226
|
+
ur,
|
|
1210
1227
|
{
|
|
1211
1228
|
ref: I,
|
|
1212
1229
|
$align: e,
|
|
1213
1230
|
$open: T,
|
|
1214
1231
|
$position: $,
|
|
1215
|
-
className:
|
|
1232
|
+
className: Ie("content", n == null ? void 0 : n.content),
|
|
1216
1233
|
onClick: k,
|
|
1217
1234
|
children: o
|
|
1218
1235
|
}
|
|
1219
1236
|
);
|
|
1220
|
-
return /* @__PURE__ */ m(
|
|
1237
|
+
return /* @__PURE__ */ m(pr, { ...h, ref: u ?? w, className: Ie("container", r), children: [
|
|
1221
1238
|
/* @__PURE__ */ d(
|
|
1222
|
-
|
|
1239
|
+
gr,
|
|
1223
1240
|
{
|
|
1224
1241
|
ref: S,
|
|
1225
1242
|
onClick: N,
|
|
1226
|
-
className:
|
|
1227
|
-
children:
|
|
1243
|
+
className: Ie("trigger", n == null ? void 0 : n.trigger),
|
|
1244
|
+
children: It(g)
|
|
1228
1245
|
}
|
|
1229
1246
|
),
|
|
1230
1247
|
_
|
|
1231
1248
|
] });
|
|
1232
|
-
},
|
|
1249
|
+
}, xr = l.div`
|
|
1233
1250
|
display: flex;
|
|
1234
1251
|
flex-direction: column;
|
|
1235
1252
|
align-items: center;
|
|
1236
1253
|
text-align: center;
|
|
1237
1254
|
padding: 40px 24px;
|
|
1238
|
-
`,
|
|
1255
|
+
`, br = l.div`
|
|
1239
1256
|
position: relative;
|
|
1240
1257
|
display: flex;
|
|
1241
1258
|
align-items: center;
|
|
@@ -1243,7 +1260,7 @@ const Gt = De`
|
|
|
1243
1260
|
width: 200px;
|
|
1244
1261
|
height: 200px;
|
|
1245
1262
|
margin-bottom: 16px;
|
|
1246
|
-
`,
|
|
1263
|
+
`, $r = l.div`
|
|
1247
1264
|
position: absolute;
|
|
1248
1265
|
inset: 0;
|
|
1249
1266
|
|
|
@@ -1264,7 +1281,7 @@ const Gt = De`
|
|
|
1264
1281
|
inset: 8px;
|
|
1265
1282
|
opacity: 0.5;
|
|
1266
1283
|
}
|
|
1267
|
-
`,
|
|
1284
|
+
`, yr = l.div`
|
|
1268
1285
|
position: absolute;
|
|
1269
1286
|
inset: 0;
|
|
1270
1287
|
|
|
@@ -1284,7 +1301,7 @@ const Gt = De`
|
|
|
1284
1301
|
&::after {
|
|
1285
1302
|
inset: 52px;
|
|
1286
1303
|
}
|
|
1287
|
-
`,
|
|
1304
|
+
`, mr = l.div`
|
|
1288
1305
|
position: relative;
|
|
1289
1306
|
z-index: 1;
|
|
1290
1307
|
display: flex;
|
|
@@ -1299,42 +1316,42 @@ const Gt = De`
|
|
|
1299
1316
|
box-shadow:
|
|
1300
1317
|
0 1px 2px rgba(0, 0, 0, 0.05),
|
|
1301
1318
|
0 1px 3px rgba(0, 0, 0, 0.1);
|
|
1302
|
-
`,
|
|
1319
|
+
`, vr = l.h3`
|
|
1303
1320
|
margin: 0 0 4px;
|
|
1304
1321
|
font-size: 16px;
|
|
1305
1322
|
font-weight: 600;
|
|
1306
1323
|
color: ${i.black};
|
|
1307
1324
|
line-height: 1.4;
|
|
1308
|
-
`,
|
|
1325
|
+
`, wr = l.p`
|
|
1309
1326
|
margin: 0;
|
|
1310
1327
|
font-size: 14px;
|
|
1311
1328
|
color: ${i["iron-grey"]};
|
|
1312
1329
|
line-height: 1.5;
|
|
1313
1330
|
max-width: 360px;
|
|
1314
|
-
`,
|
|
1331
|
+
`, Sr = l.div`
|
|
1315
1332
|
display: flex;
|
|
1316
1333
|
align-items: center;
|
|
1317
1334
|
gap: 12px;
|
|
1318
1335
|
margin-top: 20px;
|
|
1319
|
-
`,
|
|
1336
|
+
`, xe = z("empty-state"), $d = ({
|
|
1320
1337
|
actions: e,
|
|
1321
1338
|
className: t,
|
|
1322
1339
|
classnames: o,
|
|
1323
1340
|
description: r,
|
|
1324
1341
|
icon: n,
|
|
1325
|
-
ref:
|
|
1342
|
+
ref: a,
|
|
1326
1343
|
title: s,
|
|
1327
1344
|
...c
|
|
1328
|
-
}) => /* @__PURE__ */ m(
|
|
1329
|
-
n && /* @__PURE__ */ m(
|
|
1330
|
-
/* @__PURE__ */ d(
|
|
1331
|
-
/* @__PURE__ */ d(
|
|
1332
|
-
/* @__PURE__ */ d(
|
|
1345
|
+
}) => /* @__PURE__ */ m(xr, { ...c, ref: a, className: xe("container", t), children: [
|
|
1346
|
+
n && /* @__PURE__ */ m(br, { className: xe("icon", o == null ? void 0 : o.icon), children: [
|
|
1347
|
+
/* @__PURE__ */ d(yr, {}),
|
|
1348
|
+
/* @__PURE__ */ d($r, {}),
|
|
1349
|
+
/* @__PURE__ */ d(mr, { children: n })
|
|
1333
1350
|
] }),
|
|
1334
|
-
/* @__PURE__ */ d(
|
|
1335
|
-
r && /* @__PURE__ */ d(
|
|
1336
|
-
e && /* @__PURE__ */ d(
|
|
1337
|
-
] }),
|
|
1351
|
+
/* @__PURE__ */ d(vr, { className: xe("title", o == null ? void 0 : o.title), children: s }),
|
|
1352
|
+
r && /* @__PURE__ */ d(wr, { className: xe("description", o == null ? void 0 : o.description), children: r }),
|
|
1353
|
+
e && /* @__PURE__ */ d(Sr, { className: xe("actions", o == null ? void 0 : o.actions), children: e })
|
|
1354
|
+
] }), kr = l.div`
|
|
1338
1355
|
display: grid;
|
|
1339
1356
|
grid-template-rows: auto 1fr auto;
|
|
1340
1357
|
grid-auto-flow: column;
|
|
@@ -1359,16 +1376,16 @@ const Gt = De`
|
|
|
1359
1376
|
> * > :not([class*='field-label']):not([class*='field-message']) {
|
|
1360
1377
|
grid-row: 2;
|
|
1361
1378
|
}
|
|
1362
|
-
`,
|
|
1379
|
+
`, zr = z("field-row"), yd = ({ className: e, gap: t = 16, ref: o, ...r }) => /* @__PURE__ */ d(kr, { ...r, ref: o, $gap: t, className: zr("container", e) }), Er = (e) => {
|
|
1363
1380
|
if (e === 0) return "0 B";
|
|
1364
1381
|
const t = ["B", "KB", "MB", "GB"], o = Math.floor(Math.log(e) / Math.log(1024)), r = e / Math.pow(1024, o);
|
|
1365
1382
|
return `${r % 1 === 0 ? r : r.toFixed(1)} ${t[o]}`;
|
|
1366
|
-
},
|
|
1383
|
+
}, st = (e, t) => t.split(",").map((r) => r.trim()).some((r) => r.startsWith(".") ? e.name.toLowerCase().endsWith(r.toLowerCase()) : r.endsWith("/*") ? e.type.startsWith(r.replace("/*", "/")) : e.type === r), Nr = l.div`
|
|
1367
1384
|
flex-shrink: 0;
|
|
1368
1385
|
display: flex;
|
|
1369
1386
|
flex-direction: column;
|
|
1370
1387
|
gap: 16px;
|
|
1371
|
-
`,
|
|
1388
|
+
`, Cr = l.div`
|
|
1372
1389
|
display: flex;
|
|
1373
1390
|
flex-direction: column;
|
|
1374
1391
|
align-items: center;
|
|
@@ -1390,7 +1407,7 @@ const Gt = De`
|
|
|
1390
1407
|
background-color: #f9fafb;
|
|
1391
1408
|
}
|
|
1392
1409
|
`}
|
|
1393
|
-
`,
|
|
1410
|
+
`, Ir = l.div`
|
|
1394
1411
|
display: flex;
|
|
1395
1412
|
align-items: center;
|
|
1396
1413
|
justify-content: center;
|
|
@@ -1405,7 +1422,7 @@ const Gt = De`
|
|
|
1405
1422
|
width: 20px;
|
|
1406
1423
|
height: 20px;
|
|
1407
1424
|
}
|
|
1408
|
-
`,
|
|
1425
|
+
`, Tr = l.div`
|
|
1409
1426
|
display: flex;
|
|
1410
1427
|
flex-direction: column;
|
|
1411
1428
|
align-items: center;
|
|
@@ -1413,35 +1430,35 @@ const Gt = De`
|
|
|
1413
1430
|
font-size: 14px;
|
|
1414
1431
|
color: ${i["iron-grey"]};
|
|
1415
1432
|
text-align: center;
|
|
1416
|
-
`,
|
|
1433
|
+
`, Lr = l.span`
|
|
1417
1434
|
color: ${i.black};
|
|
1418
1435
|
font-weight: 600;
|
|
1419
1436
|
cursor: pointer;
|
|
1420
|
-
`,
|
|
1437
|
+
`, Rr = l.div`
|
|
1421
1438
|
font-size: 12px;
|
|
1422
1439
|
color: ${i["iron-grey"]};
|
|
1423
1440
|
text-align: center;
|
|
1424
|
-
`,
|
|
1441
|
+
`, Ar = l.input`
|
|
1425
1442
|
display: none;
|
|
1426
1443
|
`;
|
|
1427
|
-
|
|
1444
|
+
l.div`
|
|
1428
1445
|
display: flex;
|
|
1429
1446
|
flex-direction: column;
|
|
1430
1447
|
gap: 12px;
|
|
1431
1448
|
`;
|
|
1432
|
-
const
|
|
1449
|
+
const Pr = {
|
|
1433
1450
|
uploading: i.gray,
|
|
1434
1451
|
complete: i.gray,
|
|
1435
1452
|
failed: i.red
|
|
1436
|
-
},
|
|
1453
|
+
}, Br = l.div`
|
|
1437
1454
|
display: flex;
|
|
1438
1455
|
align-items: flex-start;
|
|
1439
1456
|
gap: 12px;
|
|
1440
1457
|
padding: 14px;
|
|
1441
|
-
border: 1px solid ${({ $status: e }) =>
|
|
1458
|
+
border: 1px solid ${({ $status: e }) => Pr[e]};
|
|
1442
1459
|
border-radius: 12px;
|
|
1443
1460
|
transition: border-color 0.15s ease;
|
|
1444
|
-
`,
|
|
1461
|
+
`, _r = l.div`
|
|
1445
1462
|
display: flex;
|
|
1446
1463
|
align-items: center;
|
|
1447
1464
|
justify-content: center;
|
|
@@ -1456,54 +1473,54 @@ const Tr = {
|
|
|
1456
1473
|
width: 20px;
|
|
1457
1474
|
height: 20px;
|
|
1458
1475
|
}
|
|
1459
|
-
`,
|
|
1476
|
+
`, Mr = l.div`
|
|
1460
1477
|
flex: 1;
|
|
1461
1478
|
min-width: 0;
|
|
1462
1479
|
display: flex;
|
|
1463
1480
|
flex-direction: column;
|
|
1464
1481
|
gap: 4px;
|
|
1465
|
-
`,
|
|
1482
|
+
`, Dr = l.div`
|
|
1466
1483
|
display: flex;
|
|
1467
1484
|
align-items: flex-start;
|
|
1468
1485
|
justify-content: space-between;
|
|
1469
1486
|
gap: 8px;
|
|
1470
|
-
`,
|
|
1487
|
+
`, Fr = l.div`
|
|
1471
1488
|
min-width: 0;
|
|
1472
|
-
`,
|
|
1489
|
+
`, Or = l.div`
|
|
1473
1490
|
font-size: 14px;
|
|
1474
1491
|
font-weight: 500;
|
|
1475
1492
|
color: ${i.black};
|
|
1476
1493
|
white-space: nowrap;
|
|
1477
1494
|
overflow: hidden;
|
|
1478
1495
|
text-overflow: ellipsis;
|
|
1479
|
-
`,
|
|
1496
|
+
`, jr = l.div`
|
|
1480
1497
|
font-size: 14px;
|
|
1481
1498
|
color: ${i["iron-grey"]};
|
|
1482
|
-
`,
|
|
1499
|
+
`, Hr = l.div`
|
|
1483
1500
|
display: flex;
|
|
1484
1501
|
align-items: center;
|
|
1485
1502
|
gap: 12px;
|
|
1486
1503
|
margin-top: 2px;
|
|
1487
|
-
`,
|
|
1504
|
+
`, Xr = l.div`
|
|
1488
1505
|
flex: 1;
|
|
1489
1506
|
height: 8px;
|
|
1490
1507
|
border-radius: 4px;
|
|
1491
1508
|
background-color: ${i.gray};
|
|
1492
1509
|
overflow: hidden;
|
|
1493
|
-
`,
|
|
1510
|
+
`, Yr = l.div`
|
|
1494
1511
|
height: 100%;
|
|
1495
1512
|
width: ${({ $value: e }) => Math.min(100, Math.max(0, e))}%;
|
|
1496
1513
|
border-radius: 4px;
|
|
1497
1514
|
background-color: ${({ $status: e }) => e === "failed" ? i.red : i.black};
|
|
1498
1515
|
transition: width 0.2s ease;
|
|
1499
|
-
`,
|
|
1516
|
+
`, Wr = l.span`
|
|
1500
1517
|
flex-shrink: 0;
|
|
1501
1518
|
font-size: 14px;
|
|
1502
1519
|
color: ${i.black};
|
|
1503
1520
|
font-weight: 500;
|
|
1504
1521
|
min-width: 36px;
|
|
1505
1522
|
text-align: right;
|
|
1506
|
-
`,
|
|
1523
|
+
`, Ur = l.button`
|
|
1507
1524
|
display: flex;
|
|
1508
1525
|
align-items: center;
|
|
1509
1526
|
justify-content: center;
|
|
@@ -1526,7 +1543,7 @@ const Tr = {
|
|
|
1526
1543
|
&:hover {
|
|
1527
1544
|
color: ${i.black};
|
|
1528
1545
|
}
|
|
1529
|
-
`,
|
|
1546
|
+
`, qr = l.button`
|
|
1530
1547
|
display: inline;
|
|
1531
1548
|
padding: 0;
|
|
1532
1549
|
border: none;
|
|
@@ -1540,13 +1557,13 @@ const Tr = {
|
|
|
1540
1557
|
&:hover {
|
|
1541
1558
|
text-decoration: underline;
|
|
1542
1559
|
}
|
|
1543
|
-
`,
|
|
1560
|
+
`, pt = l.div`
|
|
1544
1561
|
display: flex;
|
|
1545
1562
|
align-items: center;
|
|
1546
1563
|
gap: 4px;
|
|
1547
1564
|
font-size: 14px;
|
|
1548
1565
|
color: ${i["iron-grey"]};
|
|
1549
|
-
`,
|
|
1566
|
+
`, Vr = l.span`
|
|
1550
1567
|
display: inline-flex;
|
|
1551
1568
|
color: ${i.green};
|
|
1552
1569
|
|
|
@@ -1554,7 +1571,7 @@ const Tr = {
|
|
|
1554
1571
|
width: 16px;
|
|
1555
1572
|
height: 16px;
|
|
1556
1573
|
}
|
|
1557
|
-
`,
|
|
1574
|
+
`, Le = z("file-upload"), Zr = () => /* @__PURE__ */ m(
|
|
1558
1575
|
"svg",
|
|
1559
1576
|
{
|
|
1560
1577
|
viewBox: "0 0 24 24",
|
|
@@ -1569,13 +1586,13 @@ const Tr = {
|
|
|
1569
1586
|
/* @__PURE__ */ d("line", { x1: "12", x2: "12", y1: "3", y2: "15" })
|
|
1570
1587
|
]
|
|
1571
1588
|
}
|
|
1572
|
-
),
|
|
1589
|
+
), md = ({
|
|
1573
1590
|
accept: e,
|
|
1574
1591
|
children: t,
|
|
1575
1592
|
className: o,
|
|
1576
1593
|
classnames: r,
|
|
1577
1594
|
description: n,
|
|
1578
|
-
disabled:
|
|
1595
|
+
disabled: a = !1,
|
|
1579
1596
|
hint: s,
|
|
1580
1597
|
icon: c,
|
|
1581
1598
|
maxSize: p,
|
|
@@ -1590,10 +1607,10 @@ const Tr = {
|
|
|
1590
1607
|
if (!C || C.length === 0) return;
|
|
1591
1608
|
const N = Array.from(C);
|
|
1592
1609
|
if (e) {
|
|
1593
|
-
const R = N.filter((k) => !
|
|
1610
|
+
const R = N.filter((k) => !st(k, e));
|
|
1594
1611
|
if (R.length > 0) {
|
|
1595
1612
|
h == null || h(R, "type");
|
|
1596
|
-
const k = N.filter((_) =>
|
|
1613
|
+
const k = N.filter((_) => st(_, e));
|
|
1597
1614
|
if (k.length === 0) return;
|
|
1598
1615
|
g == null || g(k);
|
|
1599
1616
|
return;
|
|
@@ -1614,42 +1631,42 @@ const Tr = {
|
|
|
1614
1631
|
[e, p, g, h]
|
|
1615
1632
|
), w = () => {
|
|
1616
1633
|
var C;
|
|
1617
|
-
|
|
1634
|
+
a || (C = y.current) == null || C.click();
|
|
1618
1635
|
}, S = (C) => {
|
|
1619
1636
|
v(C.target.files), y.current && (y.current.value = "");
|
|
1620
1637
|
}, I = (C) => {
|
|
1621
|
-
C.preventDefault(), C.stopPropagation(),
|
|
1638
|
+
C.preventDefault(), C.stopPropagation(), a || $(!0);
|
|
1622
1639
|
}, A = (C) => {
|
|
1623
1640
|
C.preventDefault(), C.stopPropagation(), $(!1);
|
|
1624
1641
|
}, T = (C) => {
|
|
1625
|
-
C.preventDefault(), C.stopPropagation(), $(!1),
|
|
1642
|
+
C.preventDefault(), C.stopPropagation(), $(!1), a || v(C.dataTransfer.files);
|
|
1626
1643
|
};
|
|
1627
|
-
return /* @__PURE__ */ m(
|
|
1644
|
+
return /* @__PURE__ */ m(Nr, { ref: x, className: o, ...f, children: [
|
|
1628
1645
|
/* @__PURE__ */ m(
|
|
1629
|
-
|
|
1646
|
+
Cr,
|
|
1630
1647
|
{
|
|
1631
|
-
className:
|
|
1632
|
-
$disabled:
|
|
1648
|
+
className: Le("dropzone", r == null ? void 0 : r.dropzone),
|
|
1649
|
+
$disabled: a,
|
|
1633
1650
|
$dragOver: b,
|
|
1634
1651
|
onClick: w,
|
|
1635
1652
|
onDragOver: I,
|
|
1636
1653
|
onDragLeave: A,
|
|
1637
1654
|
onDrop: T,
|
|
1638
1655
|
role: "button",
|
|
1639
|
-
tabIndex:
|
|
1640
|
-
"aria-disabled":
|
|
1656
|
+
tabIndex: a ? -1 : 0,
|
|
1657
|
+
"aria-disabled": a,
|
|
1641
1658
|
children: [
|
|
1642
|
-
/* @__PURE__ */ d(
|
|
1643
|
-
/* @__PURE__ */ d(
|
|
1644
|
-
/* @__PURE__ */ d(
|
|
1659
|
+
/* @__PURE__ */ d(Ir, { className: Le("icon", r == null ? void 0 : r.icon), children: c || /* @__PURE__ */ d(Zr, {}) }),
|
|
1660
|
+
/* @__PURE__ */ d(Tr, { className: Le("text", r == null ? void 0 : r.text), children: n || /* @__PURE__ */ m("span", { children: [
|
|
1661
|
+
/* @__PURE__ */ d(Lr, { children: "Click to upload" }),
|
|
1645
1662
|
" or drag and drop"
|
|
1646
1663
|
] }) }),
|
|
1647
|
-
s && /* @__PURE__ */ d(
|
|
1664
|
+
s && /* @__PURE__ */ d(Rr, { className: Le("hint", r == null ? void 0 : r.hint), children: s })
|
|
1648
1665
|
]
|
|
1649
1666
|
}
|
|
1650
1667
|
),
|
|
1651
1668
|
/* @__PURE__ */ d(
|
|
1652
|
-
|
|
1669
|
+
Ar,
|
|
1653
1670
|
{
|
|
1654
1671
|
ref: y,
|
|
1655
1672
|
type: "file",
|
|
@@ -1661,7 +1678,7 @@ const Tr = {
|
|
|
1661
1678
|
),
|
|
1662
1679
|
t
|
|
1663
1680
|
] });
|
|
1664
|
-
}, re = z("file-upload-item"),
|
|
1681
|
+
}, re = z("file-upload-item"), Gr = () => /* @__PURE__ */ m(
|
|
1665
1682
|
"svg",
|
|
1666
1683
|
{
|
|
1667
1684
|
viewBox: "0 0 24 24",
|
|
@@ -1675,7 +1692,7 @@ const Tr = {
|
|
|
1675
1692
|
/* @__PURE__ */ d("path", { d: "M14 2v4a2 2 0 0 0 2 2h4" })
|
|
1676
1693
|
]
|
|
1677
1694
|
}
|
|
1678
|
-
),
|
|
1695
|
+
), Kr = () => /* @__PURE__ */ m(
|
|
1679
1696
|
"svg",
|
|
1680
1697
|
{
|
|
1681
1698
|
viewBox: "0 0 24 24",
|
|
@@ -1689,7 +1706,7 @@ const Tr = {
|
|
|
1689
1706
|
/* @__PURE__ */ d("path", { d: "m6 6 12 12" })
|
|
1690
1707
|
]
|
|
1691
1708
|
}
|
|
1692
|
-
),
|
|
1709
|
+
), Qr = () => /* @__PURE__ */ d(
|
|
1693
1710
|
"svg",
|
|
1694
1711
|
{
|
|
1695
1712
|
viewBox: "0 0 24 24",
|
|
@@ -1700,103 +1717,103 @@ const Tr = {
|
|
|
1700
1717
|
strokeLinejoin: "round",
|
|
1701
1718
|
children: /* @__PURE__ */ d("path", { d: "M20 6 9 17l-5-5" })
|
|
1702
1719
|
}
|
|
1703
|
-
),
|
|
1720
|
+
), vd = ({
|
|
1704
1721
|
name: e,
|
|
1705
1722
|
size: t,
|
|
1706
1723
|
status: o = "uploading",
|
|
1707
1724
|
progress: r = 0,
|
|
1708
1725
|
icon: n,
|
|
1709
|
-
onRemove:
|
|
1726
|
+
onRemove: a,
|
|
1710
1727
|
onRetry: s,
|
|
1711
1728
|
className: c,
|
|
1712
1729
|
classnames: p,
|
|
1713
1730
|
ref: u
|
|
1714
|
-
}) => /* @__PURE__ */ m(
|
|
1715
|
-
/* @__PURE__ */ d(
|
|
1716
|
-
/* @__PURE__ */ m(
|
|
1717
|
-
/* @__PURE__ */ m(
|
|
1718
|
-
/* @__PURE__ */ m(
|
|
1719
|
-
/* @__PURE__ */ d(
|
|
1720
|
-
/* @__PURE__ */ d(
|
|
1731
|
+
}) => /* @__PURE__ */ m(Br, { ref: u, className: re("item", c), $status: o, children: [
|
|
1732
|
+
/* @__PURE__ */ d(_r, { className: re("icon", p == null ? void 0 : p.icon), $status: o, children: n || /* @__PURE__ */ d(Gr, {}) }),
|
|
1733
|
+
/* @__PURE__ */ m(Mr, { children: [
|
|
1734
|
+
/* @__PURE__ */ m(Dr, { children: [
|
|
1735
|
+
/* @__PURE__ */ m(Fr, { className: re("info", p == null ? void 0 : p.info), children: [
|
|
1736
|
+
/* @__PURE__ */ d(Or, { className: re("name", p == null ? void 0 : p.name), children: e }),
|
|
1737
|
+
/* @__PURE__ */ d(jr, { className: re("size", p == null ? void 0 : p.size), children: Er(t) })
|
|
1721
1738
|
] }),
|
|
1722
|
-
|
|
1723
|
-
|
|
1739
|
+
a && /* @__PURE__ */ d(
|
|
1740
|
+
Ur,
|
|
1724
1741
|
{
|
|
1725
1742
|
className: re("action", p == null ? void 0 : p.action),
|
|
1726
|
-
onClick:
|
|
1743
|
+
onClick: a,
|
|
1727
1744
|
"aria-label": "Remove file",
|
|
1728
1745
|
type: "button",
|
|
1729
|
-
children: /* @__PURE__ */ d(
|
|
1746
|
+
children: /* @__PURE__ */ d(Kr, {})
|
|
1730
1747
|
}
|
|
1731
1748
|
)
|
|
1732
1749
|
] }),
|
|
1733
|
-
o === "uploading" && /* @__PURE__ */ m(
|
|
1734
|
-
/* @__PURE__ */ d(
|
|
1735
|
-
/* @__PURE__ */ m(
|
|
1750
|
+
o === "uploading" && /* @__PURE__ */ m(Hr, { className: re("progress", p == null ? void 0 : p.progress), children: [
|
|
1751
|
+
/* @__PURE__ */ d(Xr, { children: /* @__PURE__ */ d(Yr, { $value: r, $status: o }) }),
|
|
1752
|
+
/* @__PURE__ */ m(Wr, { children: [
|
|
1736
1753
|
r,
|
|
1737
1754
|
"%"
|
|
1738
1755
|
] })
|
|
1739
1756
|
] }),
|
|
1740
|
-
o === "complete" && /* @__PURE__ */ m(
|
|
1741
|
-
/* @__PURE__ */ d(
|
|
1757
|
+
o === "complete" && /* @__PURE__ */ m(pt, { children: [
|
|
1758
|
+
/* @__PURE__ */ d(Vr, { children: /* @__PURE__ */ d(Qr, {}) }),
|
|
1742
1759
|
"Complete"
|
|
1743
1760
|
] }),
|
|
1744
|
-
o === "failed" && /* @__PURE__ */ m(
|
|
1761
|
+
o === "failed" && /* @__PURE__ */ m(pt, { children: [
|
|
1745
1762
|
"Upload failed.",
|
|
1746
1763
|
" ",
|
|
1747
|
-
s && /* @__PURE__ */ d(
|
|
1764
|
+
s && /* @__PURE__ */ d(qr, { onClick: s, type: "button", children: "Try again" })
|
|
1748
1765
|
] })
|
|
1749
1766
|
] })
|
|
1750
|
-
] }),
|
|
1767
|
+
] }), _t = `
|
|
1751
1768
|
display: inline-flex;
|
|
1752
1769
|
font-size: 14px;
|
|
1753
1770
|
gap: 3px;
|
|
1754
1771
|
color: ${i["iron-grey"]};
|
|
1755
1772
|
transition: color 0.15s ease;
|
|
1756
1773
|
text-decoration: none;
|
|
1757
|
-
`,
|
|
1774
|
+
`, Mt = `
|
|
1758
1775
|
cursor: pointer;
|
|
1759
1776
|
&:hover {
|
|
1760
1777
|
color: ${i["steel-blue"]};
|
|
1761
1778
|
}
|
|
1762
|
-
`,
|
|
1763
|
-
${
|
|
1779
|
+
`, Jr = l.span`
|
|
1780
|
+
${_t}
|
|
1764
1781
|
cursor: ${({ $clickable: e }) => e ? "pointer" : "default"};
|
|
1765
|
-
${({ $clickable: e }) => e &&
|
|
1766
|
-
`,
|
|
1767
|
-
${Bt}
|
|
1782
|
+
${({ $clickable: e }) => e && Mt}
|
|
1783
|
+
`, en = l.a`
|
|
1768
1784
|
${_t}
|
|
1769
|
-
|
|
1785
|
+
${Mt}
|
|
1786
|
+
`, tn = l.span``, on = l.span``, Re = z("hashtag"), wd = ({
|
|
1770
1787
|
children: e,
|
|
1771
1788
|
className: t,
|
|
1772
1789
|
classnames: o,
|
|
1773
1790
|
href: r,
|
|
1774
1791
|
onClick: n,
|
|
1775
|
-
ref:
|
|
1792
|
+
ref: a,
|
|
1776
1793
|
...s
|
|
1777
1794
|
}) => {
|
|
1778
|
-
const c = /* @__PURE__ */ m(
|
|
1779
|
-
/* @__PURE__ */ d(
|
|
1780
|
-
/* @__PURE__ */ d(
|
|
1795
|
+
const c = /* @__PURE__ */ m(Fe, { children: [
|
|
1796
|
+
/* @__PURE__ */ d(tn, { className: Re("hash", o == null ? void 0 : o.hash), children: "#" }),
|
|
1797
|
+
/* @__PURE__ */ d(on, { className: Re("label", o == null ? void 0 : o.label), children: e })
|
|
1781
1798
|
] });
|
|
1782
1799
|
if (r)
|
|
1783
1800
|
return /* @__PURE__ */ d(
|
|
1784
|
-
|
|
1801
|
+
en,
|
|
1785
1802
|
{
|
|
1786
|
-
ref:
|
|
1803
|
+
ref: a,
|
|
1787
1804
|
href: r,
|
|
1788
|
-
className:
|
|
1805
|
+
className: Re("container", t),
|
|
1789
1806
|
onClick: n,
|
|
1790
1807
|
children: c
|
|
1791
1808
|
}
|
|
1792
1809
|
);
|
|
1793
1810
|
const p = !!n;
|
|
1794
1811
|
return /* @__PURE__ */ d(
|
|
1795
|
-
|
|
1812
|
+
Jr,
|
|
1796
1813
|
{
|
|
1797
1814
|
...s,
|
|
1798
|
-
ref:
|
|
1799
|
-
className:
|
|
1815
|
+
ref: a,
|
|
1816
|
+
className: Re("container", t),
|
|
1800
1817
|
$clickable: p,
|
|
1801
1818
|
onClick: n,
|
|
1802
1819
|
role: p ? "button" : void 0,
|
|
@@ -1804,34 +1821,34 @@ const Tr = {
|
|
|
1804
1821
|
children: c
|
|
1805
1822
|
}
|
|
1806
1823
|
);
|
|
1807
|
-
},
|
|
1824
|
+
}, gt = {
|
|
1808
1825
|
1: { fontSize: 32, lineHeight: 1.2 },
|
|
1809
1826
|
2: { fontSize: 24, lineHeight: 1.25 },
|
|
1810
1827
|
3: { fontSize: 18, lineHeight: 1.3 },
|
|
1811
1828
|
4: { fontSize: 16, lineHeight: 1.4 },
|
|
1812
1829
|
5: { fontSize: 14, lineHeight: 1.4 },
|
|
1813
1830
|
6: { fontSize: 12, lineHeight: 1.5 }
|
|
1814
|
-
},
|
|
1831
|
+
}, rn = l.h1`
|
|
1815
1832
|
margin: 0;
|
|
1816
1833
|
font-weight: 700;
|
|
1817
1834
|
color: ${i.black};
|
|
1818
|
-
font-size: ${({ $level: e }) =>
|
|
1819
|
-
line-height: ${({ $level: e }) =>
|
|
1820
|
-
`,
|
|
1821
|
-
|
|
1835
|
+
font-size: ${({ $level: e }) => gt[e].fontSize}px;
|
|
1836
|
+
line-height: ${({ $level: e }) => gt[e].lineHeight};
|
|
1837
|
+
`, nn = z("heading"), Sd = ({ as: e, children: t, className: o, level: r = 3, ref: n, ...a }) => /* @__PURE__ */ d(
|
|
1838
|
+
rn,
|
|
1822
1839
|
{
|
|
1823
|
-
...
|
|
1840
|
+
...a,
|
|
1824
1841
|
as: `h${e ?? r}`,
|
|
1825
1842
|
ref: n,
|
|
1826
|
-
className:
|
|
1843
|
+
className: nn("container", o),
|
|
1827
1844
|
$level: r,
|
|
1828
1845
|
children: t
|
|
1829
1846
|
}
|
|
1830
|
-
),
|
|
1847
|
+
), an = l.div`
|
|
1831
1848
|
display: flex;
|
|
1832
1849
|
flex-direction: column;
|
|
1833
1850
|
gap: 12px;
|
|
1834
|
-
`,
|
|
1851
|
+
`, ln = l.div`
|
|
1835
1852
|
width: ${({ $size: e }) => e}px;
|
|
1836
1853
|
height: ${({ $size: e }) => e}px;
|
|
1837
1854
|
border-radius: 8px;
|
|
@@ -1847,10 +1864,10 @@ const Tr = {
|
|
|
1847
1864
|
height: 100%;
|
|
1848
1865
|
object-fit: cover;
|
|
1849
1866
|
}
|
|
1850
|
-
`,
|
|
1867
|
+
`, dn = l.span`
|
|
1851
1868
|
font-size: 12px;
|
|
1852
1869
|
color: ${i["iron-grey"]};
|
|
1853
|
-
`,
|
|
1870
|
+
`, cn = (e) => `
|
|
1854
1871
|
.${e} {
|
|
1855
1872
|
padding: 7px 16px;
|
|
1856
1873
|
font-size: 14px;
|
|
@@ -1868,7 +1885,7 @@ const Tr = {
|
|
|
1868
1885
|
.${e}:active {
|
|
1869
1886
|
transform: translate(0, 1px);
|
|
1870
1887
|
}
|
|
1871
|
-
`,
|
|
1888
|
+
`, sn = (e) => `
|
|
1872
1889
|
.${e} {
|
|
1873
1890
|
display: flex;
|
|
1874
1891
|
flex: 1 1 auto;
|
|
@@ -1892,7 +1909,7 @@ const Tr = {
|
|
|
1892
1909
|
max-height: 70vh;
|
|
1893
1910
|
}
|
|
1894
1911
|
}
|
|
1895
|
-
`,
|
|
1912
|
+
`, pn = (e) => `
|
|
1896
1913
|
.${e} {
|
|
1897
1914
|
padding: 7px 16px;
|
|
1898
1915
|
font-size: 14px;
|
|
@@ -1910,7 +1927,7 @@ const Tr = {
|
|
|
1910
1927
|
.${e}:active {
|
|
1911
1928
|
transform: translate(0, 1px);
|
|
1912
1929
|
}
|
|
1913
|
-
`,
|
|
1930
|
+
`, gn = (e) => `
|
|
1914
1931
|
.${e} {
|
|
1915
1932
|
display: flex;
|
|
1916
1933
|
flex-direction: column;
|
|
@@ -1928,7 +1945,7 @@ const Tr = {
|
|
|
1928
1945
|
border-radius: 8px;
|
|
1929
1946
|
}
|
|
1930
1947
|
}
|
|
1931
|
-
`,
|
|
1948
|
+
`, un = (e) => `
|
|
1932
1949
|
.${e} {
|
|
1933
1950
|
display: flex;
|
|
1934
1951
|
justify-content: flex-end;
|
|
@@ -1947,7 +1964,7 @@ const Tr = {
|
|
|
1947
1964
|
gap: 8px;
|
|
1948
1965
|
}
|
|
1949
1966
|
}
|
|
1950
|
-
`,
|
|
1967
|
+
`, hn = (e) => `
|
|
1951
1968
|
.${e} {
|
|
1952
1969
|
display: flex;
|
|
1953
1970
|
justify-content: flex-start;
|
|
@@ -1969,7 +1986,7 @@ const Tr = {
|
|
|
1969
1986
|
font-size: 14px;
|
|
1970
1987
|
}
|
|
1971
1988
|
}
|
|
1972
|
-
`,
|
|
1989
|
+
`, fn = (e) => `
|
|
1973
1990
|
.${e} {
|
|
1974
1991
|
display: block;
|
|
1975
1992
|
z-index: 101;
|
|
@@ -1987,27 +2004,27 @@ const Tr = {
|
|
|
1987
2004
|
position: absolute;
|
|
1988
2005
|
touch-action: none;
|
|
1989
2006
|
}
|
|
1990
|
-
`,
|
|
2007
|
+
`, xn = (e) => `
|
|
1991
2008
|
.${e} {
|
|
1992
2009
|
position: absolute;
|
|
1993
2010
|
z-index: 2;
|
|
1994
2011
|
background-color: rgba(0, 0, 0, 0.6);
|
|
1995
2012
|
touch-action: none;
|
|
1996
2013
|
}
|
|
1997
|
-
`,
|
|
2014
|
+
`, bn = (e) => `
|
|
1998
2015
|
.${e} {
|
|
1999
2016
|
position: absolute;
|
|
2000
2017
|
z-index: 3;
|
|
2001
2018
|
touch-action: none;
|
|
2002
2019
|
}
|
|
2003
|
-
`,
|
|
2020
|
+
`, $n = (e) => `
|
|
2004
2021
|
.${e} {
|
|
2005
2022
|
backface-visibility: hidden;
|
|
2006
2023
|
perspective: 1000px;
|
|
2007
2024
|
max-inline-size: unset !important;
|
|
2008
2025
|
max-block-size: unset !important;
|
|
2009
2026
|
}
|
|
2010
|
-
`,
|
|
2027
|
+
`, yn = (e) => `
|
|
2011
2028
|
.${e} {
|
|
2012
2029
|
position: absolute;
|
|
2013
2030
|
z-index: 100;
|
|
@@ -2018,18 +2035,18 @@ const Tr = {
|
|
|
2018
2035
|
overflow: hidden;
|
|
2019
2036
|
border-radius: 50%;
|
|
2020
2037
|
}
|
|
2021
|
-
`,
|
|
2038
|
+
`, mn = {
|
|
2022
2039
|
tl: "nw-resize",
|
|
2023
2040
|
tr: "ne-resize",
|
|
2024
2041
|
bl: "sw-resize",
|
|
2025
2042
|
br: "se-resize"
|
|
2026
|
-
},
|
|
2043
|
+
}, vn = {
|
|
2027
2044
|
tl: { h: "left", v: "top" },
|
|
2028
2045
|
tr: { h: "right", v: "top" },
|
|
2029
2046
|
bl: { h: "left", v: "bottom" },
|
|
2030
2047
|
br: { h: "right", v: "bottom" }
|
|
2031
|
-
},
|
|
2032
|
-
const o =
|
|
2048
|
+
}, Ae = (e, t) => {
|
|
2049
|
+
const o = mn[t], { h: r, v: n } = vn[t];
|
|
2033
2050
|
return `
|
|
2034
2051
|
.${e} {
|
|
2035
2052
|
display: block;
|
|
@@ -2057,7 +2074,7 @@ const Tr = {
|
|
|
2057
2074
|
}
|
|
2058
2075
|
}
|
|
2059
2076
|
`;
|
|
2060
|
-
},
|
|
2077
|
+
}, wn = (e) => `
|
|
2061
2078
|
.${e} {
|
|
2062
2079
|
display: flex;
|
|
2063
2080
|
align-items: center;
|
|
@@ -2083,7 +2100,7 @@ const Tr = {
|
|
|
2083
2100
|
padding-bottom: env(safe-area-inset-bottom, 8px);
|
|
2084
2101
|
}
|
|
2085
2102
|
}
|
|
2086
|
-
`,
|
|
2103
|
+
`, Sn = (e) => `
|
|
2087
2104
|
.${e} {
|
|
2088
2105
|
backface-visibility: hidden;
|
|
2089
2106
|
user-select: none;
|
|
@@ -2096,16 +2113,16 @@ const Tr = {
|
|
|
2096
2113
|
position: absolute;
|
|
2097
2114
|
z-index: 1;
|
|
2098
2115
|
}
|
|
2099
|
-
`,
|
|
2116
|
+
`, kn = (e) => {
|
|
2100
2117
|
let t = 5381;
|
|
2101
2118
|
for (let o = 0; o < e.length; o++)
|
|
2102
2119
|
t = (t << 5) + t ^ e.charCodeAt(o);
|
|
2103
2120
|
return Math.abs(t).toString(36);
|
|
2104
|
-
}, M = (e) => `hq-cropper__${
|
|
2121
|
+
}, M = (e) => `hq-cropper__${kn(e)}`, D = (e) => e || [], F = (e, t) => {
|
|
2105
2122
|
if (t)
|
|
2106
2123
|
for (const o of t)
|
|
2107
2124
|
e.classList.add(o);
|
|
2108
|
-
},
|
|
2125
|
+
}, zn = (e) => {
|
|
2109
2126
|
const t = {
|
|
2110
2127
|
applyButton: [
|
|
2111
2128
|
M("applyButton"),
|
|
@@ -2158,34 +2175,34 @@ const Tr = {
|
|
|
2158
2175
|
preview: [M("preview"), ...D(e.preview)],
|
|
2159
2176
|
root: [M("root"), ...D(e.root)]
|
|
2160
2177
|
}, o = `
|
|
2161
|
-
${
|
|
2162
|
-
${
|
|
2163
|
-
${
|
|
2164
|
-
${
|
|
2165
|
-
${
|
|
2166
|
-
${
|
|
2167
|
-
${
|
|
2168
|
-
${
|
|
2169
|
-
${
|
|
2170
|
-
${
|
|
2171
|
-
${
|
|
2172
|
-
${
|
|
2173
|
-
${
|
|
2174
|
-
${
|
|
2175
|
-
${
|
|
2176
|
-
${
|
|
2177
|
-
${
|
|
2178
|
+
${cn(t.applyButton[0])}
|
|
2179
|
+
${sn(t.body[0])}
|
|
2180
|
+
${pn(t.cancelButton[0])}
|
|
2181
|
+
${gn(t.container[0])}
|
|
2182
|
+
${un(t.footer[0])}
|
|
2183
|
+
${hn(t.header[0])}
|
|
2184
|
+
${fn(t.handlerMove[0])}
|
|
2185
|
+
${xn(t.portalArea[0])}
|
|
2186
|
+
${bn(t.portal[0])}
|
|
2187
|
+
${$n(t.previewImage[0])}
|
|
2188
|
+
${yn(t.preview[0])}
|
|
2189
|
+
${Ae(t.handlerResizeBottomLeft[0], "bl")}
|
|
2190
|
+
${Ae(t.handlerResizeBottomRight[0], "br")}
|
|
2191
|
+
${Ae(t.handlerResizeTopLeft[0], "tl")}
|
|
2192
|
+
${Ae(t.handlerResizeTopRight[0], "tr")}
|
|
2193
|
+
${wn(t.root[0])}
|
|
2194
|
+
${Sn(t.sourceImage[0])}
|
|
2178
2195
|
`, r = document.createElement("style");
|
|
2179
2196
|
return r.innerHTML = o, document.getElementsByTagName("head")[0].prepend(r), t;
|
|
2180
2197
|
};
|
|
2181
|
-
let
|
|
2182
|
-
const
|
|
2198
|
+
let En = 0;
|
|
2199
|
+
const Nn = (e) => {
|
|
2183
2200
|
const t = /* @__PURE__ */ new Map(), o = new Proxy(
|
|
2184
2201
|
{ ...e },
|
|
2185
2202
|
{
|
|
2186
|
-
set(r, n,
|
|
2187
|
-
return Reflect.set(r, n,
|
|
2188
|
-
(s) => s.action(
|
|
2203
|
+
set(r, n, a) {
|
|
2204
|
+
return Reflect.set(r, n, a), (t.get(n) || []).forEach(
|
|
2205
|
+
(s) => s.action(a, r, n)
|
|
2189
2206
|
), !0;
|
|
2190
2207
|
}
|
|
2191
2208
|
}
|
|
@@ -2194,22 +2211,22 @@ const Sn = (e) => {
|
|
|
2194
2211
|
for (const n of Object.keys(
|
|
2195
2212
|
r
|
|
2196
2213
|
)) {
|
|
2197
|
-
const
|
|
2198
|
-
|
|
2214
|
+
const a = r[n];
|
|
2215
|
+
a !== void 0 && (o[n] = a);
|
|
2199
2216
|
}
|
|
2200
2217
|
}, subscribe: (r, n) => {
|
|
2201
|
-
const
|
|
2218
|
+
const a = String(++En), s = t.get(r) || [];
|
|
2202
2219
|
return t.set(r, [
|
|
2203
2220
|
...s,
|
|
2204
2221
|
{
|
|
2205
2222
|
action: n,
|
|
2206
|
-
id:
|
|
2223
|
+
id: a
|
|
2207
2224
|
}
|
|
2208
|
-
]),
|
|
2225
|
+
]), a;
|
|
2209
2226
|
}, unsubscribe: (r) => {
|
|
2210
|
-
for (const [n,
|
|
2211
|
-
const s =
|
|
2212
|
-
if (s.length !==
|
|
2227
|
+
for (const [n, a] of t.entries()) {
|
|
2228
|
+
const s = a.filter((c) => c.id !== r);
|
|
2229
|
+
if (s.length !== a.length) {
|
|
2213
2230
|
t.set(n, s);
|
|
2214
2231
|
return;
|
|
2215
2232
|
}
|
|
@@ -2217,7 +2234,7 @@ const Sn = (e) => {
|
|
|
2217
2234
|
}, unsubscribeAll: () => {
|
|
2218
2235
|
t.clear();
|
|
2219
2236
|
} };
|
|
2220
|
-
},
|
|
2237
|
+
}, Je = {
|
|
2221
2238
|
action: null,
|
|
2222
2239
|
sourceBase64: "",
|
|
2223
2240
|
fileName: "",
|
|
@@ -2254,38 +2271,38 @@ const Sn = (e) => {
|
|
|
2254
2271
|
maxFileSize: 0,
|
|
2255
2272
|
allowedTypes: ["image/jpeg", "image/png", "image/gif", "image/webp"]
|
|
2256
2273
|
}
|
|
2257
|
-
},
|
|
2258
|
-
...
|
|
2259
|
-
config: { ...
|
|
2260
|
-
css:
|
|
2261
|
-
}),
|
|
2274
|
+
}, Cn = (e = {}, t = {}) => Nn({
|
|
2275
|
+
...Je,
|
|
2276
|
+
config: { ...Je.config, ...e },
|
|
2277
|
+
css: zn(t)
|
|
2278
|
+
}), In = (e, t) => {
|
|
2262
2279
|
var x;
|
|
2263
2280
|
const o = e(), r = document.querySelector(
|
|
2264
2281
|
`.${(x = o.css) == null ? void 0 : x.body[0]}`
|
|
2265
2282
|
);
|
|
2266
2283
|
if (!r)
|
|
2267
2284
|
return o.frame;
|
|
2268
|
-
const { width: n, height:
|
|
2285
|
+
const { width: n, height: a } = r.getBoundingClientRect(), s = n / a, c = t.width / t.height;
|
|
2269
2286
|
let p, u, g = 0, h = 0;
|
|
2270
|
-
return s > c ? (p =
|
|
2287
|
+
return s > c ? (p = a * c, u = a, h = (n - p) / 2) : (p = n, u = n * (t.height / t.width), g = (a - u) / 2), {
|
|
2271
2288
|
width: p,
|
|
2272
2289
|
height: u,
|
|
2273
2290
|
left: h,
|
|
2274
2291
|
top: g
|
|
2275
2292
|
};
|
|
2276
|
-
},
|
|
2277
|
-
const [r, n] = t,
|
|
2278
|
-
return [
|
|
2279
|
-
},
|
|
2293
|
+
}, Tn = (e, t, o) => {
|
|
2294
|
+
const [r, n] = t, a = r + e > o.width ? (o.width - e) / 2 : r, s = n + e > o.height ? (o.height - e) / 2 : n;
|
|
2295
|
+
return [a, s];
|
|
2296
|
+
}, Ln = (e, t) => {
|
|
2280
2297
|
const { config: o } = e(), r = Math.min(t.width, t.height) - o.framePadding * 2, n = o.portalSize > r ? r : o.portalSize;
|
|
2281
2298
|
if (Array.isArray(o.portalPosition) && o.portalPosition.length === 2) {
|
|
2282
|
-
const [
|
|
2299
|
+
const [a, s] = Tn(
|
|
2283
2300
|
n,
|
|
2284
2301
|
o.portalPosition,
|
|
2285
2302
|
t
|
|
2286
2303
|
);
|
|
2287
2304
|
return {
|
|
2288
|
-
left:
|
|
2305
|
+
left: a,
|
|
2289
2306
|
top: s,
|
|
2290
2307
|
size: n
|
|
2291
2308
|
};
|
|
@@ -2300,119 +2317,119 @@ const Sn = (e) => {
|
|
|
2300
2317
|
size: n
|
|
2301
2318
|
};
|
|
2302
2319
|
};
|
|
2303
|
-
var
|
|
2304
|
-
const
|
|
2320
|
+
var U = /* @__PURE__ */ ((e) => (e.MOVE = "MOVE", e.RESIZE_TL = "RESIZE_TL", e.RESIZE_TR = "RESIZE_TR", e.RESIZE_BR = "RESIZE_BR", e.RESIZE_BL = "RESIZE_BL", e))(U || {});
|
|
2321
|
+
const Rn = (e) => {
|
|
2305
2322
|
var r;
|
|
2306
2323
|
const t = e(), o = document.createElement("span");
|
|
2307
|
-
return F(o, (r = t.css) == null ? void 0 : r.handlerMove), o.setAttribute("data-action",
|
|
2308
|
-
},
|
|
2324
|
+
return F(o, (r = t.css) == null ? void 0 : r.handlerMove), o.setAttribute("data-action", U.MOVE), o;
|
|
2325
|
+
}, An = (e) => {
|
|
2309
2326
|
var r;
|
|
2310
2327
|
const t = e(), o = document.createElement("span");
|
|
2311
|
-
return F(o, (r = t.css) == null ? void 0 : r.handlerResizeBottomLeft), o.setAttribute("data-action",
|
|
2312
|
-
},
|
|
2328
|
+
return F(o, (r = t.css) == null ? void 0 : r.handlerResizeBottomLeft), o.setAttribute("data-action", U.RESIZE_BL), o;
|
|
2329
|
+
}, Pn = (e) => {
|
|
2313
2330
|
var r;
|
|
2314
2331
|
const t = e(), o = document.createElement("span");
|
|
2315
|
-
return F(o, (r = t.css) == null ? void 0 : r.handlerResizeBottomRight), o.setAttribute("data-action",
|
|
2316
|
-
},
|
|
2332
|
+
return F(o, (r = t.css) == null ? void 0 : r.handlerResizeBottomRight), o.setAttribute("data-action", U.RESIZE_BR), o;
|
|
2333
|
+
}, Bn = (e) => {
|
|
2317
2334
|
var r;
|
|
2318
2335
|
const t = e(), o = document.createElement("span");
|
|
2319
|
-
return F(o, (r = t.css) == null ? void 0 : r.handlerResizeTopLeft), o.setAttribute("data-action",
|
|
2320
|
-
},
|
|
2336
|
+
return F(o, (r = t.css) == null ? void 0 : r.handlerResizeTopLeft), o.setAttribute("data-action", U.RESIZE_TL), o;
|
|
2337
|
+
}, _n = (e) => {
|
|
2321
2338
|
var r;
|
|
2322
2339
|
const t = e(), o = document.createElement("span");
|
|
2323
|
-
return F(o, (r = t.css) == null ? void 0 : r.handlerResizeTopRight), o.setAttribute("data-action",
|
|
2324
|
-
},
|
|
2340
|
+
return F(o, (r = t.css) == null ? void 0 : r.handlerResizeTopRight), o.setAttribute("data-action", U.RESIZE_TR), o;
|
|
2341
|
+
}, Mn = (e) => {
|
|
2325
2342
|
var r;
|
|
2326
2343
|
const t = e(), o = document.createElement("img");
|
|
2327
2344
|
return F(o, (r = t.css) == null ? void 0 : r.previewImage), o;
|
|
2328
|
-
},
|
|
2345
|
+
}, Dn = (e) => {
|
|
2329
2346
|
var r;
|
|
2330
2347
|
const t = e(), o = document.createElement("div");
|
|
2331
|
-
return F(o, (r = t.css) == null ? void 0 : r.preview), o.appendChild(
|
|
2332
|
-
},
|
|
2348
|
+
return F(o, (r = t.css) == null ? void 0 : r.preview), o.appendChild(Mn(e)), o;
|
|
2349
|
+
}, Fn = (e) => {
|
|
2333
2350
|
var r;
|
|
2334
2351
|
const t = e(), o = document.createElement("div");
|
|
2335
|
-
return F(o, (r = t.css) == null ? void 0 : r.portal), o.appendChild(
|
|
2336
|
-
},
|
|
2352
|
+
return F(o, (r = t.css) == null ? void 0 : r.portal), o.appendChild(Dn(e)), o.appendChild(Rn(e)), o.appendChild(Bn(e)), o.appendChild(_n(e)), o.appendChild(An(e)), o.appendChild(Pn(e)), o;
|
|
2353
|
+
}, On = (e) => {
|
|
2337
2354
|
var r;
|
|
2338
2355
|
const t = e(), o = document.createElement("div");
|
|
2339
|
-
return F(o, (r = t.css) == null ? void 0 : r.portalArea), o.appendChild(
|
|
2340
|
-
},
|
|
2356
|
+
return F(o, (r = t.css) == null ? void 0 : r.portalArea), o.appendChild(Fn(e)), o;
|
|
2357
|
+
}, jn = (e) => {
|
|
2341
2358
|
var r;
|
|
2342
2359
|
const t = e(), o = document.createElement("img");
|
|
2343
2360
|
return F(o, (r = t.css) == null ? void 0 : r.sourceImage), o.setAttribute("alt", "source"), o.setAttribute("crossOrigin", "anonymous"), o.setAttribute("draggable", "false"), o.setAttribute("src", t.sourceBase64), o;
|
|
2344
|
-
},
|
|
2361
|
+
}, Hn = (e) => {
|
|
2345
2362
|
var r;
|
|
2346
2363
|
const t = e(), o = document.createElement("div");
|
|
2347
|
-
return F(o, (r = t.css) == null ? void 0 : r.body), o.appendChild(
|
|
2348
|
-
},
|
|
2364
|
+
return F(o, (r = t.css) == null ? void 0 : r.body), o.appendChild(jn(e)), o.appendChild(On(e)), o;
|
|
2365
|
+
}, Xn = (e, t) => {
|
|
2349
2366
|
var n;
|
|
2350
2367
|
const o = e(), r = document.createElement("div");
|
|
2351
2368
|
return F(r, (n = o.css) == null ? void 0 : n.applyButton), r.setAttribute("role", "button"), r.innerText = o.config.applyButtonLabel, r.addEventListener("click", t), r;
|
|
2352
|
-
},
|
|
2369
|
+
}, Yn = (e, t) => {
|
|
2353
2370
|
var n;
|
|
2354
2371
|
const o = e(), r = document.createElement("div");
|
|
2355
2372
|
return F(r, (n = o.css) == null ? void 0 : n.cancelButton), r.setAttribute("role", "button"), r.innerText = o.config.cancelButtonLabel, r.addEventListener("click", t), r;
|
|
2356
|
-
},
|
|
2357
|
-
var
|
|
2373
|
+
}, Wn = (e, t, o) => {
|
|
2374
|
+
var a;
|
|
2358
2375
|
const r = e(), n = document.createElement("div");
|
|
2359
|
-
return F(n, (
|
|
2360
|
-
},
|
|
2376
|
+
return F(n, (a = r.css) == null ? void 0 : a.footer), n.appendChild(Yn(e, o)), n.appendChild(Xn(e, t)), n;
|
|
2377
|
+
}, Un = (e) => {
|
|
2361
2378
|
var r;
|
|
2362
2379
|
const t = e(), o = document.createElement("div");
|
|
2363
2380
|
return F(o, (r = t.css) == null ? void 0 : r.header), o;
|
|
2364
|
-
},
|
|
2365
|
-
var
|
|
2381
|
+
}, qn = (e, t, o) => {
|
|
2382
|
+
var a;
|
|
2366
2383
|
const r = e(), n = document.createElement("div");
|
|
2367
|
-
return F(n, (
|
|
2368
|
-
},
|
|
2369
|
-
var
|
|
2384
|
+
return F(n, (a = r.css) == null ? void 0 : a.container), n.appendChild(Un(e)), n.appendChild(Hn(e)), n.appendChild(Wn(e, t, o)), n;
|
|
2385
|
+
}, Vn = (e, t, o) => {
|
|
2386
|
+
var a;
|
|
2370
2387
|
const r = e(), n = document.createElement("div");
|
|
2371
|
-
F(n, (
|
|
2372
|
-
},
|
|
2388
|
+
F(n, (a = r.css) == null ? void 0 : a.root), n.appendChild(qn(e, t, o)), document.body.appendChild(n);
|
|
2389
|
+
}, Zn = (e) => {
|
|
2373
2390
|
const t = document.createElement("input");
|
|
2374
2391
|
return t.style.display = "none", t.setAttribute("type", "file"), t.setAttribute("accept", "image/x-png,image/jpeg"), t.addEventListener("change", e, !1), document.body.appendChild(t), t;
|
|
2375
|
-
},
|
|
2392
|
+
}, me = /* @__PURE__ */ new Map(), Gn = {
|
|
2376
2393
|
header: "header",
|
|
2377
2394
|
sourceImage: "sourceImage",
|
|
2378
2395
|
portalArea: "portalArea",
|
|
2379
2396
|
portal: "portal",
|
|
2380
2397
|
previewImage: "previewImage"
|
|
2381
2398
|
}, ne = (e, t) => {
|
|
2382
|
-
if (
|
|
2383
|
-
return
|
|
2399
|
+
if (me.has(e))
|
|
2400
|
+
return me.get(e);
|
|
2384
2401
|
if (!t)
|
|
2385
2402
|
return null;
|
|
2386
|
-
const o = t[
|
|
2403
|
+
const o = t[Gn[e]], r = document.querySelector(
|
|
2387
2404
|
`.${o[0]}`
|
|
2388
2405
|
);
|
|
2389
|
-
return
|
|
2390
|
-
},
|
|
2391
|
-
|
|
2392
|
-
},
|
|
2393
|
-
|
|
2394
|
-
},
|
|
2406
|
+
return me.set(e, r), r;
|
|
2407
|
+
}, Kn = () => {
|
|
2408
|
+
me.clear();
|
|
2409
|
+
}, Qn = () => {
|
|
2410
|
+
me.clear();
|
|
2411
|
+
}, Jn = (e, t) => {
|
|
2395
2412
|
const o = ne("header", t.css);
|
|
2396
2413
|
o && (o.innerText = e);
|
|
2397
|
-
},
|
|
2414
|
+
}, ei = (e, t) => {
|
|
2398
2415
|
const o = ne("sourceImage", t.css);
|
|
2399
2416
|
o && (o.setAttribute("src", e), o.style.height = `${t.frame.height}px`, o.style.width = `${t.frame.width}px`, o.style.left = `${t.frame.left}px`, o.style.top = `${t.frame.top}px`);
|
|
2400
2417
|
const r = ne("portalArea", t.css);
|
|
2401
2418
|
r && (r.style.height = `${t.frame.height}px`, r.style.width = `${t.frame.width}px`, r.style.left = `${t.frame.left}px`, r.style.top = `${t.frame.top}px`);
|
|
2402
2419
|
const n = ne("portal", t.css);
|
|
2403
2420
|
n && (n.style.width = `${t.portal.size}px`, n.style.height = `${t.portal.size}px`, n.style.left = `${t.portal.left}px`, n.style.top = `${t.portal.top}px`);
|
|
2404
|
-
const
|
|
2405
|
-
|
|
2406
|
-
},
|
|
2421
|
+
const a = ne("previewImage", t.css);
|
|
2422
|
+
a && (a.setAttribute("src", e), a.style.height = `${t.frame.height}px`, a.style.width = `${t.frame.width}px`, a.style.marginLeft = `-${t.portal.left}px`, a.style.marginTop = `-${t.portal.top}px`);
|
|
2423
|
+
}, ti = (e, t) => {
|
|
2407
2424
|
const o = ne("portal", t.css);
|
|
2408
2425
|
o && (o.style.left = `${e.left}px`, o.style.top = `${e.top}px`, o.style.width = `${e.size}px`, o.style.height = `${e.size}px`);
|
|
2409
2426
|
const r = ne("previewImage", t.css);
|
|
2410
2427
|
r && (r.style.marginLeft = `-${e.left}px`, r.style.marginTop = `-${e.top}px`);
|
|
2411
|
-
},
|
|
2428
|
+
}, He = 1, oi = (e) => {
|
|
2412
2429
|
var f, y;
|
|
2413
|
-
const t = e(), o = document.createElement("canvas"), r = t.frame.width ||
|
|
2414
|
-
t.portal.size * Math.min(
|
|
2415
|
-
|
|
2430
|
+
const t = e(), o = document.createElement("canvas"), r = t.frame.width || He, n = t.frame.height || He, a = t.sourceWidth / r, s = t.sourceHeight / n, c = t.portal.left * a, p = t.portal.top * s, u = Math.max(
|
|
2431
|
+
t.portal.size * Math.min(a, s),
|
|
2432
|
+
He
|
|
2416
2433
|
), g = t.config.outputSize > 0 ? t.config.outputSize : u;
|
|
2417
2434
|
o.width = g, o.height = g;
|
|
2418
2435
|
const h = document.querySelector(
|
|
@@ -2454,10 +2471,10 @@ const Cn = (e) => {
|
|
|
2454
2471
|
o.remove(), $(v);
|
|
2455
2472
|
}
|
|
2456
2473
|
});
|
|
2457
|
-
},
|
|
2458
|
-
const { emitted: r, portal: n, frame:
|
|
2474
|
+
}, ri = (e, t, o) => {
|
|
2475
|
+
const { emitted: r, portal: n, frame: a, config: s } = t();
|
|
2459
2476
|
let c = r.left - r.X + e.clientX, p = r.top - r.Y + e.clientY;
|
|
2460
|
-
const u = s.framePadding, g =
|
|
2477
|
+
const u = s.framePadding, g = a.width - s.framePadding - n.size, h = s.framePadding, x = a.height - s.framePadding - n.size;
|
|
2461
2478
|
c < u && (c = u), c > g && (c = g), p < h && (p = h), p > x && (p = x), o({
|
|
2462
2479
|
portal: {
|
|
2463
2480
|
...n,
|
|
@@ -2465,29 +2482,29 @@ const Cn = (e) => {
|
|
|
2465
2482
|
top: p
|
|
2466
2483
|
}
|
|
2467
2484
|
});
|
|
2468
|
-
},
|
|
2469
|
-
const { action: r, emitted: n, portal:
|
|
2485
|
+
}, ni = (e, t, o) => {
|
|
2486
|
+
const { action: r, emitted: n, portal: a, frame: s, config: c } = t(), p = e.pageX - n.X, u = e.pageY - n.Y;
|
|
2470
2487
|
switch (r) {
|
|
2471
|
-
case
|
|
2488
|
+
case U.RESIZE_BR: {
|
|
2472
2489
|
let g = n.size + Math.max(p, u);
|
|
2473
2490
|
return g < c.minPortalSize && (g = c.minPortalSize), n.top + g > s.height - c.framePadding && (g = s.height - n.top - c.framePadding), n.left + g > s.width - c.framePadding && (g = s.width - n.left - c.framePadding), o({
|
|
2474
2491
|
portal: {
|
|
2475
|
-
...
|
|
2492
|
+
...a,
|
|
2476
2493
|
size: g
|
|
2477
2494
|
}
|
|
2478
2495
|
});
|
|
2479
2496
|
}
|
|
2480
|
-
case
|
|
2497
|
+
case U.RESIZE_TR: {
|
|
2481
2498
|
let g = p + u > 0 ? n.size + p : n.size - u, h = p + u > 0 ? n.top - p : n.top + u;
|
|
2482
2499
|
return g < c.minPortalSize && (h = n.top + n.size - c.minPortalSize, g = c.minPortalSize), n.left + g > s.width - c.framePadding && (g = s.width - n.left - c.framePadding, h = n.top - s.width + n.left + n.size), h < c.framePadding && (g = n.top + n.size, h = c.framePadding), o({
|
|
2483
2500
|
portal: {
|
|
2484
|
-
...
|
|
2501
|
+
...a,
|
|
2485
2502
|
top: h,
|
|
2486
2503
|
size: g
|
|
2487
2504
|
}
|
|
2488
2505
|
});
|
|
2489
2506
|
}
|
|
2490
|
-
case
|
|
2507
|
+
case U.RESIZE_TL: {
|
|
2491
2508
|
const g = Math.min(p, u);
|
|
2492
2509
|
let h = n.size - g, x = n.left + g, f = n.top + g;
|
|
2493
2510
|
if (h < c.minPortalSize) {
|
|
@@ -2504,18 +2521,18 @@ const Cn = (e) => {
|
|
|
2504
2521
|
}
|
|
2505
2522
|
return o({
|
|
2506
2523
|
portal: {
|
|
2507
|
-
...
|
|
2524
|
+
...a,
|
|
2508
2525
|
top: f,
|
|
2509
2526
|
left: x,
|
|
2510
2527
|
size: h
|
|
2511
2528
|
}
|
|
2512
2529
|
});
|
|
2513
2530
|
}
|
|
2514
|
-
case
|
|
2531
|
+
case U.RESIZE_BL: {
|
|
2515
2532
|
let g = p + u > 0 ? n.size + u : n.size - p, h = p + u > 0 ? n.left - u : n.left + p;
|
|
2516
2533
|
return g < c.minPortalSize && (h = n.left + n.size - c.minPortalSize, g = c.minPortalSize), g + n.top > s.height - c.framePadding && (h = n.left - s.height + n.top + n.size, g = s.height - n.top - c.framePadding), h < c.framePadding && (h = c.framePadding, g = n.left + n.size - c.framePadding), o({
|
|
2517
2534
|
portal: {
|
|
2518
|
-
...
|
|
2535
|
+
...a,
|
|
2519
2536
|
left: h,
|
|
2520
2537
|
size: g
|
|
2521
2538
|
}
|
|
@@ -2524,7 +2541,7 @@ const Cn = (e) => {
|
|
|
2524
2541
|
default:
|
|
2525
2542
|
return;
|
|
2526
2543
|
}
|
|
2527
|
-
},
|
|
2544
|
+
}, ut = (e) => {
|
|
2528
2545
|
if ("touches" in e && e.touches.length > 0) {
|
|
2529
2546
|
const o = e.touches[0];
|
|
2530
2547
|
return {
|
|
@@ -2550,19 +2567,19 @@ const Cn = (e) => {
|
|
|
2550
2567
|
pageX: t.pageX,
|
|
2551
2568
|
pageY: t.pageY
|
|
2552
2569
|
};
|
|
2553
|
-
},
|
|
2570
|
+
}, ii = (e, t) => {
|
|
2554
2571
|
var x, f, y;
|
|
2555
2572
|
const o = e(), r = document.querySelector(
|
|
2556
2573
|
`.${(x = o.css) == null ? void 0 : x.portal[0]}`
|
|
2557
2574
|
), n = document.querySelector(
|
|
2558
2575
|
`.${(f = o.css) == null ? void 0 : f.portalArea[0]}`
|
|
2559
|
-
),
|
|
2576
|
+
), a = document.querySelector(
|
|
2560
2577
|
`.${(y = o.css) == null ? void 0 : y.root[0]}`
|
|
2561
2578
|
);
|
|
2562
2579
|
let s = null, c = null;
|
|
2563
2580
|
const p = (b) => {
|
|
2564
2581
|
b.preventDefault();
|
|
2565
|
-
const { portal: $ } = e(), v =
|
|
2582
|
+
const { portal: $ } = e(), v = ut(b);
|
|
2566
2583
|
if (b.target) {
|
|
2567
2584
|
const w = b.target.getAttribute("data-action"), S = {
|
|
2568
2585
|
X: v.pageX,
|
|
@@ -2589,22 +2606,22 @@ const Cn = (e) => {
|
|
|
2589
2606
|
const { action: $ } = e();
|
|
2590
2607
|
if ($)
|
|
2591
2608
|
switch ($) {
|
|
2592
|
-
case
|
|
2593
|
-
|
|
2609
|
+
case U.MOVE:
|
|
2610
|
+
ri(b, e, t);
|
|
2594
2611
|
break;
|
|
2595
2612
|
default:
|
|
2596
|
-
|
|
2613
|
+
ni(b, e, t);
|
|
2597
2614
|
}
|
|
2598
2615
|
}, h = (b) => {
|
|
2599
2616
|
const { action: $ } = e();
|
|
2600
|
-
$ && (b.preventDefault(), c =
|
|
2617
|
+
$ && (b.preventDefault(), c = ut(b), s === null && (s = requestAnimationFrame(g)));
|
|
2601
2618
|
};
|
|
2602
|
-
return
|
|
2619
|
+
return a && (a.addEventListener("mouseup", u), a.addEventListener("touchend", u), a.addEventListener("touchcancel", u)), r && (r.addEventListener("mousedown", p), r.addEventListener("touchstart", p, {
|
|
2603
2620
|
passive: !1
|
|
2604
2621
|
})), n && (n.addEventListener("mousemove", h), n.addEventListener("touchmove", h, {
|
|
2605
2622
|
passive: !1
|
|
2606
2623
|
})), () => {
|
|
2607
|
-
s !== null && cancelAnimationFrame(s),
|
|
2624
|
+
s !== null && cancelAnimationFrame(s), a && (a.removeEventListener("mouseup", u), a.removeEventListener("touchend", u), a.removeEventListener("touchcancel", u)), r && (r.removeEventListener("mousedown", p), r.removeEventListener("touchstart", p)), n && (n.removeEventListener(
|
|
2608
2625
|
"mousemove",
|
|
2609
2626
|
h
|
|
2610
2627
|
), n.removeEventListener(
|
|
@@ -2612,15 +2629,15 @@ const Cn = (e) => {
|
|
|
2612
2629
|
h
|
|
2613
2630
|
));
|
|
2614
2631
|
};
|
|
2615
|
-
},
|
|
2632
|
+
}, ht = 1024 * 1024, ai = (e, t) => {
|
|
2616
2633
|
if (!t.allowedTypes.includes(e.type))
|
|
2617
2634
|
return `Invalid file type "${e.type}". Allowed types: ${t.allowedTypes.join(", ")}`;
|
|
2618
2635
|
if (t.maxFileSize > 0 && e.size > t.maxFileSize) {
|
|
2619
|
-
const o = (t.maxFileSize /
|
|
2620
|
-
return `File size (${(e.size /
|
|
2636
|
+
const o = (t.maxFileSize / ht).toFixed(2);
|
|
2637
|
+
return `File size (${(e.size / ht).toFixed(2)}MB) exceeds maximum allowed size (${o}MB)`;
|
|
2621
2638
|
}
|
|
2622
2639
|
return null;
|
|
2623
|
-
},
|
|
2640
|
+
}, li = (e, t, o, r, n, a, s) => {
|
|
2624
2641
|
const c = (v) => {
|
|
2625
2642
|
s ? s(v) : console.error(`HqCropper: ${v}`);
|
|
2626
2643
|
};
|
|
@@ -2628,7 +2645,7 @@ const Cn = (e) => {
|
|
|
2628
2645
|
c("Can't read file input");
|
|
2629
2646
|
return;
|
|
2630
2647
|
}
|
|
2631
|
-
const p = e.target.files[0], { config: u } = t(), g =
|
|
2648
|
+
const p = e.target.files[0], { config: u } = t(), g = ai(p, u);
|
|
2632
2649
|
if (g) {
|
|
2633
2650
|
c(g), e.target.value = "";
|
|
2634
2651
|
return;
|
|
@@ -2640,7 +2657,7 @@ const Cn = (e) => {
|
|
|
2640
2657
|
const v = t(), w = document.querySelector(
|
|
2641
2658
|
`.${(S = v.css) == null ? void 0 : S.root[0]}`
|
|
2642
2659
|
);
|
|
2643
|
-
w && (w.remove(), document.removeEventListener("keydown", y), x == null || x(),
|
|
2660
|
+
w && (w.remove(), document.removeEventListener("keydown", y), x == null || x(), Qn(), a(), o(Je));
|
|
2644
2661
|
}, y = (v) => {
|
|
2645
2662
|
v.key === "Escape" && t().sourceBase64 && b(v);
|
|
2646
2663
|
}, b = (v) => {
|
|
@@ -2648,7 +2665,7 @@ const Cn = (e) => {
|
|
|
2648
2665
|
}, $ = (v) => {
|
|
2649
2666
|
v.preventDefault();
|
|
2650
2667
|
const w = t();
|
|
2651
|
-
|
|
2668
|
+
oi(t).then(([S, I]) => {
|
|
2652
2669
|
r(S, I, w), b(v);
|
|
2653
2670
|
}).catch((S) => {
|
|
2654
2671
|
c(
|
|
@@ -2666,8 +2683,8 @@ const Cn = (e) => {
|
|
|
2666
2683
|
c("Failed to load image");
|
|
2667
2684
|
}, w.onload = () => {
|
|
2668
2685
|
var A;
|
|
2669
|
-
|
|
2670
|
-
const S =
|
|
2686
|
+
Vn(t, $, b), Kn(), n("fileName", Jn), n("sourceBase64", ei), n("portal", ti);
|
|
2687
|
+
const S = In(t, w), I = Ln(t, S);
|
|
2671
2688
|
o({
|
|
2672
2689
|
frame: S,
|
|
2673
2690
|
portal: I,
|
|
@@ -2675,20 +2692,20 @@ const Cn = (e) => {
|
|
|
2675
2692
|
sourceBase64: (A = v.target) == null ? void 0 : A.result,
|
|
2676
2693
|
sourceHeight: w.height,
|
|
2677
2694
|
sourceWidth: w.width
|
|
2678
|
-
}), x =
|
|
2695
|
+
}), x = ii(t, o), document.addEventListener("keydown", y);
|
|
2679
2696
|
};
|
|
2680
2697
|
}, h.onerror = () => {
|
|
2681
2698
|
c("Failed to read file");
|
|
2682
2699
|
}, h.readAsDataURL(p), e.target.value = "";
|
|
2683
|
-
},
|
|
2684
|
-
const { getState: n, setState:
|
|
2700
|
+
}, di = (e, t, o, r) => {
|
|
2701
|
+
const { getState: n, setState: a, subscribe: s, unsubscribeAll: c } = Cn(
|
|
2685
2702
|
t,
|
|
2686
2703
|
o
|
|
2687
|
-
), p =
|
|
2688
|
-
(u) =>
|
|
2704
|
+
), p = Zn(
|
|
2705
|
+
(u) => li(
|
|
2689
2706
|
u,
|
|
2690
2707
|
n,
|
|
2691
|
-
|
|
2708
|
+
a,
|
|
2692
2709
|
e,
|
|
2693
2710
|
s,
|
|
2694
2711
|
c,
|
|
@@ -2708,7 +2725,7 @@ const Cn = (e) => {
|
|
|
2708
2725
|
allowedTypes: ["image/jpeg", "image/png", "image/webp"],
|
|
2709
2726
|
applyLabel: "Apply",
|
|
2710
2727
|
cancelLabel: "Cancel"
|
|
2711
|
-
},
|
|
2728
|
+
}, ft = "vacano-image-cropper-styles", ci = `
|
|
2712
2729
|
.vacano-cropper-root {
|
|
2713
2730
|
background-color: rgba(0, 0, 0, 0.5);
|
|
2714
2731
|
backdrop-filter: blur(4px);
|
|
@@ -2756,11 +2773,11 @@ const Cn = (e) => {
|
|
|
2756
2773
|
.vacano-cropper-apply-button:hover {
|
|
2757
2774
|
background-color: ${i["iron-grey"]};
|
|
2758
2775
|
}
|
|
2759
|
-
`,
|
|
2760
|
-
if (typeof document > "u" || document.getElementById(
|
|
2776
|
+
`, si = () => {
|
|
2777
|
+
if (typeof document > "u" || document.getElementById(ft)) return;
|
|
2761
2778
|
const e = document.createElement("style");
|
|
2762
|
-
e.id =
|
|
2763
|
-
},
|
|
2779
|
+
e.id = ft, e.textContent = ci, document.head.appendChild(e);
|
|
2780
|
+
}, pi = {
|
|
2764
2781
|
root: ["vacano-cropper-root"],
|
|
2765
2782
|
container: ["vacano-cropper-container"],
|
|
2766
2783
|
header: ["vacano-cropper-header"],
|
|
@@ -2769,13 +2786,13 @@ const Cn = (e) => {
|
|
|
2769
2786
|
cancelButton: ["vacano-cropper-cancel-button"],
|
|
2770
2787
|
applyButton: ["vacano-cropper-apply-button"],
|
|
2771
2788
|
portal: ["vacano-cropper-portal"]
|
|
2772
|
-
},
|
|
2789
|
+
}, gi = (e = {}) => {
|
|
2773
2790
|
const {
|
|
2774
2791
|
allowedTypes: t = ee.allowedTypes,
|
|
2775
2792
|
applyLabel: o = ee.applyLabel,
|
|
2776
2793
|
cancelLabel: r = ee.cancelLabel,
|
|
2777
2794
|
compression: n = ee.compression,
|
|
2778
|
-
maxFileSize:
|
|
2795
|
+
maxFileSize: a = ee.maxFileSize,
|
|
2779
2796
|
onCrop: s,
|
|
2780
2797
|
onError: c,
|
|
2781
2798
|
outputSize: p = ee.outputSize,
|
|
@@ -2783,7 +2800,7 @@ const Cn = (e) => {
|
|
|
2783
2800
|
type: g = ee.type
|
|
2784
2801
|
} = e, h = B(null);
|
|
2785
2802
|
return { open: E(() => {
|
|
2786
|
-
h.current || (
|
|
2803
|
+
h.current || (si(), h.current = di(
|
|
2787
2804
|
(f, y, b) => {
|
|
2788
2805
|
y && (s == null || s({ base64: f, blob: y, state: b }));
|
|
2789
2806
|
},
|
|
@@ -2792,12 +2809,12 @@ const Cn = (e) => {
|
|
|
2792
2809
|
outputSize: p,
|
|
2793
2810
|
compression: n,
|
|
2794
2811
|
type: g,
|
|
2795
|
-
maxFileSize:
|
|
2812
|
+
maxFileSize: a,
|
|
2796
2813
|
allowedTypes: t,
|
|
2797
2814
|
applyButtonLabel: o,
|
|
2798
2815
|
cancelButtonLabel: r
|
|
2799
2816
|
},
|
|
2800
|
-
|
|
2817
|
+
pi,
|
|
2801
2818
|
(f) => {
|
|
2802
2819
|
c == null || c({ code: "CROPPER_ERROR", message: f });
|
|
2803
2820
|
}
|
|
@@ -2807,20 +2824,20 @@ const Cn = (e) => {
|
|
|
2807
2824
|
o,
|
|
2808
2825
|
r,
|
|
2809
2826
|
n,
|
|
2810
|
-
|
|
2827
|
+
a,
|
|
2811
2828
|
s,
|
|
2812
2829
|
c,
|
|
2813
2830
|
p,
|
|
2814
2831
|
u,
|
|
2815
2832
|
g
|
|
2816
2833
|
]) };
|
|
2817
|
-
},
|
|
2834
|
+
}, Xe = z("image-cropper"), kd = ({
|
|
2818
2835
|
allowedTypes: e,
|
|
2819
2836
|
applyLabel: t,
|
|
2820
2837
|
buttonLabel: o = "Select Image",
|
|
2821
2838
|
cancelLabel: r,
|
|
2822
2839
|
className: n,
|
|
2823
|
-
classnames:
|
|
2840
|
+
classnames: a,
|
|
2824
2841
|
compression: s,
|
|
2825
2842
|
maxFileSize: c,
|
|
2826
2843
|
onCrop: p,
|
|
@@ -2833,7 +2850,7 @@ const Cn = (e) => {
|
|
|
2833
2850
|
value: b,
|
|
2834
2851
|
...$
|
|
2835
2852
|
}) => {
|
|
2836
|
-
const [v, w] = L(b ?? null), { open: S } =
|
|
2853
|
+
const [v, w] = L(b ?? null), { open: S } = gi({
|
|
2837
2854
|
allowedTypes: e,
|
|
2838
2855
|
applyLabel: t,
|
|
2839
2856
|
cancelLabel: r,
|
|
@@ -2847,29 +2864,29 @@ const Cn = (e) => {
|
|
|
2847
2864
|
portalSize: h,
|
|
2848
2865
|
type: y
|
|
2849
2866
|
});
|
|
2850
|
-
return /* @__PURE__ */ m(
|
|
2851
|
-
/* @__PURE__ */ d(
|
|
2867
|
+
return /* @__PURE__ */ m(an, { ...$, ref: f, className: Xe("container", n), children: [
|
|
2868
|
+
/* @__PURE__ */ d(ln, { $size: x, className: Xe("preview", a == null ? void 0 : a.preview), children: v ? /* @__PURE__ */ d("img", { src: v, alt: "Preview" }) : /* @__PURE__ */ d(dn, { children: "No image" }) }),
|
|
2852
2869
|
/* @__PURE__ */ d(
|
|
2853
|
-
|
|
2870
|
+
we,
|
|
2854
2871
|
{
|
|
2855
2872
|
variant: "system",
|
|
2856
2873
|
onClick: S,
|
|
2857
|
-
className:
|
|
2874
|
+
className: Xe("button", a == null ? void 0 : a.button),
|
|
2858
2875
|
style: { width: x },
|
|
2859
2876
|
children: o
|
|
2860
2877
|
}
|
|
2861
2878
|
)
|
|
2862
2879
|
] });
|
|
2863
|
-
},
|
|
2880
|
+
}, ce = {
|
|
2864
2881
|
default: { box: 40, line: 22, weight: 2.5, gap: 6 },
|
|
2865
2882
|
compact: { box: 32, line: 18, weight: 2, gap: 5 }
|
|
2866
|
-
},
|
|
2883
|
+
}, ui = l.button`
|
|
2867
2884
|
position: relative;
|
|
2868
2885
|
display: flex;
|
|
2869
2886
|
align-items: center;
|
|
2870
2887
|
justify-content: center;
|
|
2871
|
-
width: ${({ $size: e }) =>
|
|
2872
|
-
height: ${({ $size: e }) =>
|
|
2888
|
+
width: ${({ $size: e }) => ce[e].box}px;
|
|
2889
|
+
height: ${({ $size: e }) => ce[e].box}px;
|
|
2873
2890
|
padding: 0;
|
|
2874
2891
|
border: none;
|
|
2875
2892
|
border-radius: 8px;
|
|
@@ -2886,15 +2903,15 @@ const Cn = (e) => {
|
|
|
2886
2903
|
&:focus-visible {
|
|
2887
2904
|
box-shadow: 0 0 0 2px ${i["steel-blue"]};
|
|
2888
2905
|
}
|
|
2889
|
-
`,
|
|
2906
|
+
`, hi = l.div`
|
|
2890
2907
|
display: flex;
|
|
2891
2908
|
flex-direction: column;
|
|
2892
2909
|
align-items: center;
|
|
2893
|
-
gap: ${({ $size: e }) =>
|
|
2894
|
-
`,
|
|
2910
|
+
gap: ${({ $size: e }) => ce[e].gap}px;
|
|
2911
|
+
`, Ye = l.span`
|
|
2895
2912
|
display: block;
|
|
2896
|
-
width: ${({ $size: e }) =>
|
|
2897
|
-
height: ${({ $size: e }) =>
|
|
2913
|
+
width: ${({ $size: e }) => ce[e].line}px;
|
|
2914
|
+
height: ${({ $size: e }) => ce[e].weight}px;
|
|
2898
2915
|
background-color: ${i.black};
|
|
2899
2916
|
border-radius: 2px;
|
|
2900
2917
|
transition:
|
|
@@ -2903,32 +2920,32 @@ const Cn = (e) => {
|
|
|
2903
2920
|
transform-origin: center;
|
|
2904
2921
|
|
|
2905
2922
|
${({ $position: e, $size: t, $open: o }) => {
|
|
2906
|
-
const { gap: r, weight: n } =
|
|
2923
|
+
const { gap: r, weight: n } = ce[t], a = r + n;
|
|
2907
2924
|
if (e === "top")
|
|
2908
|
-
return o ? `transform: translateY(${
|
|
2925
|
+
return o ? `transform: translateY(${a}px) rotate(45deg);` : "";
|
|
2909
2926
|
if (e === "middle")
|
|
2910
2927
|
return o ? "opacity: 0;" : "";
|
|
2911
2928
|
if (e === "bottom")
|
|
2912
|
-
return o ? `transform: translateY(-${
|
|
2929
|
+
return o ? `transform: translateY(-${a}px) rotate(-45deg);` : "";
|
|
2913
2930
|
}}
|
|
2914
|
-
`,
|
|
2931
|
+
`, Pe = z("menu-button"), zd = ({
|
|
2915
2932
|
className: e,
|
|
2916
2933
|
classnames: t,
|
|
2917
2934
|
defaultOpen: o = !1,
|
|
2918
2935
|
disabled: r = !1,
|
|
2919
2936
|
onOpenChange: n,
|
|
2920
|
-
open:
|
|
2937
|
+
open: a,
|
|
2921
2938
|
ref: s,
|
|
2922
2939
|
size: c = "default",
|
|
2923
2940
|
...p
|
|
2924
2941
|
}) => {
|
|
2925
|
-
const [u, g] = L(o), h =
|
|
2942
|
+
const [u, g] = L(o), h = a !== void 0, x = h ? a : u, f = E(() => {
|
|
2926
2943
|
if (r) return;
|
|
2927
2944
|
const y = !x;
|
|
2928
2945
|
h || g(y), n == null || n(y);
|
|
2929
2946
|
}, [r, x, h, n]);
|
|
2930
2947
|
return /* @__PURE__ */ d(
|
|
2931
|
-
|
|
2948
|
+
ui,
|
|
2932
2949
|
{
|
|
2933
2950
|
...p,
|
|
2934
2951
|
ref: s,
|
|
@@ -2936,42 +2953,42 @@ const Cn = (e) => {
|
|
|
2936
2953
|
disabled: r,
|
|
2937
2954
|
"aria-label": x ? "Close menu" : "Open menu",
|
|
2938
2955
|
"aria-expanded": x,
|
|
2939
|
-
className:
|
|
2956
|
+
className: Pe("container", e),
|
|
2940
2957
|
$size: c,
|
|
2941
2958
|
$disabled: r,
|
|
2942
2959
|
onClick: f,
|
|
2943
|
-
children: /* @__PURE__ */ m(
|
|
2960
|
+
children: /* @__PURE__ */ m(hi, { $size: c, $open: x, children: [
|
|
2944
2961
|
/* @__PURE__ */ d(
|
|
2945
|
-
|
|
2962
|
+
Ye,
|
|
2946
2963
|
{
|
|
2947
2964
|
$size: c,
|
|
2948
2965
|
$position: "top",
|
|
2949
2966
|
$open: x,
|
|
2950
|
-
className:
|
|
2967
|
+
className: Pe("line", t == null ? void 0 : t.line)
|
|
2951
2968
|
}
|
|
2952
2969
|
),
|
|
2953
2970
|
/* @__PURE__ */ d(
|
|
2954
|
-
|
|
2971
|
+
Ye,
|
|
2955
2972
|
{
|
|
2956
2973
|
$size: c,
|
|
2957
2974
|
$position: "middle",
|
|
2958
2975
|
$open: x,
|
|
2959
|
-
className:
|
|
2976
|
+
className: Pe("line", t == null ? void 0 : t.line)
|
|
2960
2977
|
}
|
|
2961
2978
|
),
|
|
2962
2979
|
/* @__PURE__ */ d(
|
|
2963
|
-
|
|
2980
|
+
Ye,
|
|
2964
2981
|
{
|
|
2965
2982
|
$size: c,
|
|
2966
2983
|
$position: "bottom",
|
|
2967
2984
|
$open: x,
|
|
2968
|
-
className:
|
|
2985
|
+
className: Pe("line", t == null ? void 0 : t.line)
|
|
2969
2986
|
}
|
|
2970
2987
|
)
|
|
2971
2988
|
] })
|
|
2972
2989
|
}
|
|
2973
2990
|
);
|
|
2974
|
-
},
|
|
2991
|
+
}, fi = 5e3, xt = {
|
|
2975
2992
|
default: {
|
|
2976
2993
|
background: "#374151",
|
|
2977
2994
|
text: i.white
|
|
@@ -2992,31 +3009,31 @@ const Cn = (e) => {
|
|
|
2992
3009
|
background: i["steel-blue"],
|
|
2993
3010
|
text: i.white
|
|
2994
3011
|
}
|
|
2995
|
-
},
|
|
3012
|
+
}, Dt = ke(null), bt = (e) => xt[e] ?? xt.default, xi = l.div`
|
|
2996
3013
|
position: fixed;
|
|
2997
3014
|
top: 0;
|
|
2998
3015
|
left: 0;
|
|
2999
3016
|
right: 0;
|
|
3000
3017
|
z-index: 9999;
|
|
3001
3018
|
pointer-events: none;
|
|
3002
|
-
`,
|
|
3019
|
+
`, bi = l.div`
|
|
3003
3020
|
display: flex;
|
|
3004
3021
|
align-items: center;
|
|
3005
3022
|
justify-content: center;
|
|
3006
3023
|
gap: 12px;
|
|
3007
3024
|
min-height: 44px;
|
|
3008
3025
|
padding: 12px 48px;
|
|
3009
|
-
background-color: ${({ $variant: e }) =>
|
|
3010
|
-
color: ${({ $variant: e }) =>
|
|
3026
|
+
background-color: ${({ $variant: e }) => bt(e).background};
|
|
3027
|
+
color: ${({ $variant: e }) => bt(e).text};
|
|
3011
3028
|
animation: ${({ $isExiting: e }) => e ? Z.slideOutTopFade : Z.slideInTopFade}
|
|
3012
3029
|
0.3s ease-out forwards;
|
|
3013
3030
|
pointer-events: auto;
|
|
3014
|
-
`,
|
|
3031
|
+
`, $i = l.span`
|
|
3015
3032
|
font-size: 14px;
|
|
3016
3033
|
font-weight: 500;
|
|
3017
3034
|
line-height: 1.4;
|
|
3018
3035
|
text-align: center;
|
|
3019
|
-
`,
|
|
3036
|
+
`, yi = l.button`
|
|
3020
3037
|
position: absolute;
|
|
3021
3038
|
right: 16px;
|
|
3022
3039
|
top: 50%;
|
|
@@ -3037,36 +3054,36 @@ const Cn = (e) => {
|
|
|
3037
3054
|
&:hover {
|
|
3038
3055
|
opacity: 1;
|
|
3039
3056
|
}
|
|
3040
|
-
`,
|
|
3057
|
+
`, mi = l.div`
|
|
3041
3058
|
position: relative;
|
|
3042
|
-
`,
|
|
3059
|
+
`, vi = ({
|
|
3043
3060
|
notification: e,
|
|
3044
3061
|
onRemove: t,
|
|
3045
3062
|
onAnimationEnd: o
|
|
3046
3063
|
}) => {
|
|
3047
|
-
const [r, n] = L(!1),
|
|
3064
|
+
const [r, n] = L(!1), a = () => {
|
|
3048
3065
|
n(!0);
|
|
3049
3066
|
}, s = () => {
|
|
3050
3067
|
r && (t(), o());
|
|
3051
3068
|
};
|
|
3052
3069
|
return G(() => {
|
|
3053
3070
|
const c = setTimeout(() => {
|
|
3054
|
-
|
|
3071
|
+
a();
|
|
3055
3072
|
}, e.duration);
|
|
3056
3073
|
return () => clearTimeout(c);
|
|
3057
|
-
}, [e.duration, e.id]), /* @__PURE__ */ d(
|
|
3058
|
-
|
|
3074
|
+
}, [e.duration, e.id]), /* @__PURE__ */ d(mi, { children: /* @__PURE__ */ m(
|
|
3075
|
+
bi,
|
|
3059
3076
|
{
|
|
3060
3077
|
$variant: e.variant,
|
|
3061
3078
|
$isExiting: r,
|
|
3062
3079
|
onAnimationEnd: s,
|
|
3063
3080
|
children: [
|
|
3064
|
-
/* @__PURE__ */ d(
|
|
3065
|
-
/* @__PURE__ */ d(
|
|
3081
|
+
/* @__PURE__ */ d($i, { children: e.message }),
|
|
3082
|
+
/* @__PURE__ */ d(yi, { onClick: a, children: /* @__PURE__ */ d(Nt, { style: { width: 18, height: 18 } }) })
|
|
3066
3083
|
]
|
|
3067
3084
|
}
|
|
3068
3085
|
) });
|
|
3069
|
-
},
|
|
3086
|
+
}, wi = (e, t) => {
|
|
3070
3087
|
switch (t.type) {
|
|
3071
3088
|
case "ADD_NOTIFICATION": {
|
|
3072
3089
|
const o = t.payload;
|
|
@@ -3093,12 +3110,12 @@ const Cn = (e) => {
|
|
|
3093
3110
|
default:
|
|
3094
3111
|
return e;
|
|
3095
3112
|
}
|
|
3096
|
-
},
|
|
3113
|
+
}, Si = {
|
|
3097
3114
|
current: null,
|
|
3098
3115
|
queue: []
|
|
3099
|
-
},
|
|
3100
|
-
const [t, o] =
|
|
3101
|
-
(c, p = "default", u =
|
|
3116
|
+
}, Ed = ({ children: e }) => {
|
|
3117
|
+
const [t, o] = Lt(wi, Si), r = E(
|
|
3118
|
+
(c, p = "default", u = fi) => {
|
|
3102
3119
|
const g = `notification-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
|
|
3103
3120
|
o({
|
|
3104
3121
|
type: "ADD_NOTIFICATION",
|
|
@@ -3113,31 +3130,31 @@ const Cn = (e) => {
|
|
|
3113
3130
|
[]
|
|
3114
3131
|
), n = E(() => {
|
|
3115
3132
|
o({ type: "REMOVE_CURRENT" });
|
|
3116
|
-
}, []),
|
|
3133
|
+
}, []), a = E(() => {
|
|
3117
3134
|
o({ type: "REMOVE_CURRENT" });
|
|
3118
3135
|
}, []), s = E(() => {
|
|
3119
3136
|
setTimeout(() => {
|
|
3120
3137
|
o({ type: "SHOW_NEXT" });
|
|
3121
3138
|
}, 100);
|
|
3122
3139
|
}, []);
|
|
3123
|
-
return /* @__PURE__ */ m(
|
|
3140
|
+
return /* @__PURE__ */ m(Dt.Provider, { value: { show: r, hide: n }, children: [
|
|
3124
3141
|
e,
|
|
3125
|
-
/* @__PURE__ */ d(
|
|
3126
|
-
|
|
3142
|
+
/* @__PURE__ */ d(xi, { children: t.current && /* @__PURE__ */ d(
|
|
3143
|
+
vi,
|
|
3127
3144
|
{
|
|
3128
3145
|
notification: t.current,
|
|
3129
|
-
onRemove:
|
|
3146
|
+
onRemove: a,
|
|
3130
3147
|
onAnimationEnd: s
|
|
3131
3148
|
},
|
|
3132
3149
|
t.current.id
|
|
3133
3150
|
) })
|
|
3134
3151
|
] });
|
|
3135
|
-
},
|
|
3136
|
-
const e =
|
|
3152
|
+
}, Nd = () => {
|
|
3153
|
+
const e = ze(Dt);
|
|
3137
3154
|
if (!e)
|
|
3138
3155
|
throw new Error("useNotification must be used within NotificationProvider");
|
|
3139
3156
|
return e;
|
|
3140
|
-
},
|
|
3157
|
+
}, Ft = ke(null), ki = "Agree", zi = "Discard", Ei = W`
|
|
3141
3158
|
from {
|
|
3142
3159
|
opacity: 0;
|
|
3143
3160
|
transform: translateY(100%);
|
|
@@ -3146,7 +3163,7 @@ const Cn = (e) => {
|
|
|
3146
3163
|
opacity: 1;
|
|
3147
3164
|
transform: translateY(0);
|
|
3148
3165
|
}
|
|
3149
|
-
`,
|
|
3166
|
+
`, Ni = W`
|
|
3150
3167
|
from {
|
|
3151
3168
|
opacity: 1;
|
|
3152
3169
|
transform: translateY(0);
|
|
@@ -3155,7 +3172,7 @@ const Cn = (e) => {
|
|
|
3155
3172
|
opacity: 0;
|
|
3156
3173
|
transform: translateY(100%);
|
|
3157
3174
|
}
|
|
3158
|
-
`,
|
|
3175
|
+
`, Ci = l.div`
|
|
3159
3176
|
position: fixed;
|
|
3160
3177
|
bottom: 24px;
|
|
3161
3178
|
right: 24px;
|
|
@@ -3170,20 +3187,20 @@ const Cn = (e) => {
|
|
|
3170
3187
|
box-shadow:
|
|
3171
3188
|
0 4px 6px -1px rgba(0, 0, 0, 0.1),
|
|
3172
3189
|
0 2px 4px -2px rgba(0, 0, 0, 0.1);
|
|
3173
|
-
animation: ${({ $isExiting: e }) => e ?
|
|
3190
|
+
animation: ${({ $isExiting: e }) => e ? Ni : Ei} 0.2s ease-out forwards;
|
|
3174
3191
|
z-index: 1000;
|
|
3175
|
-
`,
|
|
3192
|
+
`, Ii = l.p`
|
|
3176
3193
|
margin: 0;
|
|
3177
3194
|
font-weight: 600;
|
|
3178
3195
|
font-size: 14px;
|
|
3179
3196
|
color: ${i.black};
|
|
3180
3197
|
text-align: left;
|
|
3181
|
-
`,
|
|
3198
|
+
`, Ti = l.p`
|
|
3182
3199
|
margin: 4px 0 0;
|
|
3183
3200
|
font-size: 13px;
|
|
3184
3201
|
color: ${i["iron-grey"]};
|
|
3185
3202
|
text-align: left;
|
|
3186
|
-
`,
|
|
3203
|
+
`, Li = l.div`
|
|
3187
3204
|
display: flex;
|
|
3188
3205
|
align-items: center;
|
|
3189
3206
|
justify-content: flex-start;
|
|
@@ -3192,8 +3209,8 @@ const Cn = (e) => {
|
|
|
3192
3209
|
padding: 12px 16px;
|
|
3193
3210
|
border-top: 1px solid ${i.gray};
|
|
3194
3211
|
background-color: rgba(0, 0, 0, 0.01);
|
|
3195
|
-
`,
|
|
3196
|
-
const [o, r] = L(!1), [n,
|
|
3212
|
+
`, Ri = ({ confirmation: e, onDone: t }) => {
|
|
3213
|
+
const [o, r] = L(!1), [n, a] = L(!1), { label: s, description: c, onConfirm: p, onDiscard: u, options: g } = e, h = g.confirmLabel || ki, x = g.discardLabel || zi, f = E(
|
|
3197
3214
|
($) => {
|
|
3198
3215
|
r(!0), setTimeout(() => {
|
|
3199
3216
|
$ == null || $(), t();
|
|
@@ -3203,11 +3220,11 @@ const Cn = (e) => {
|
|
|
3203
3220
|
), y = E(async () => {
|
|
3204
3221
|
const $ = p();
|
|
3205
3222
|
if ($ instanceof Promise) {
|
|
3206
|
-
|
|
3223
|
+
a(!0);
|
|
3207
3224
|
try {
|
|
3208
3225
|
await $;
|
|
3209
3226
|
} finally {
|
|
3210
|
-
|
|
3227
|
+
a(!1);
|
|
3211
3228
|
}
|
|
3212
3229
|
}
|
|
3213
3230
|
f();
|
|
@@ -3219,24 +3236,24 @@ const Cn = (e) => {
|
|
|
3219
3236
|
v.key === "Escape" && !n && b();
|
|
3220
3237
|
};
|
|
3221
3238
|
return document.addEventListener("keydown", $), () => document.removeEventListener("keydown", $);
|
|
3222
|
-
}, [b, n]), /* @__PURE__ */ m(
|
|
3223
|
-
/* @__PURE__ */ d(
|
|
3224
|
-
/* @__PURE__ */ d(
|
|
3225
|
-
/* @__PURE__ */ m(
|
|
3226
|
-
/* @__PURE__ */ d(
|
|
3227
|
-
/* @__PURE__ */ d(
|
|
3239
|
+
}, [b, n]), /* @__PURE__ */ m(Ci, { $isExiting: o, children: [
|
|
3240
|
+
/* @__PURE__ */ d(Ii, { children: s }),
|
|
3241
|
+
/* @__PURE__ */ d(Ti, { children: c }),
|
|
3242
|
+
/* @__PURE__ */ m(Li, { children: [
|
|
3243
|
+
/* @__PURE__ */ d(we, { variant: "transparent", size: "compact", onClick: b, disabled: n, children: x }),
|
|
3244
|
+
/* @__PURE__ */ d(we, { variant: "system", size: "compact", onClick: y, loading: n, children: h })
|
|
3228
3245
|
] })
|
|
3229
3246
|
] });
|
|
3230
|
-
},
|
|
3231
|
-
},
|
|
3247
|
+
}, Ai = () => {
|
|
3248
|
+
}, Cd = ({ children: e }) => {
|
|
3232
3249
|
const [t, o] = L(null), r = E(
|
|
3233
|
-
(
|
|
3250
|
+
(a, s, c, p, u) => {
|
|
3234
3251
|
o({
|
|
3235
3252
|
open: !0,
|
|
3236
|
-
label:
|
|
3253
|
+
label: a,
|
|
3237
3254
|
description: s,
|
|
3238
3255
|
onConfirm: c,
|
|
3239
|
-
onDiscard: p ||
|
|
3256
|
+
onDiscard: p || Ai,
|
|
3240
3257
|
options: u || {}
|
|
3241
3258
|
});
|
|
3242
3259
|
},
|
|
@@ -3244,39 +3261,39 @@ const Cn = (e) => {
|
|
|
3244
3261
|
), n = E(() => {
|
|
3245
3262
|
o(null);
|
|
3246
3263
|
}, []);
|
|
3247
|
-
return /* @__PURE__ */ m(
|
|
3264
|
+
return /* @__PURE__ */ m(Ft.Provider, { value: { show: r, hide: n }, children: [
|
|
3248
3265
|
e,
|
|
3249
|
-
t && /* @__PURE__ */ d(
|
|
3266
|
+
t && /* @__PURE__ */ d(Ri, { confirmation: t, onDone: n })
|
|
3250
3267
|
] });
|
|
3251
|
-
},
|
|
3252
|
-
const e =
|
|
3268
|
+
}, Id = () => {
|
|
3269
|
+
const e = ze(Ft);
|
|
3253
3270
|
if (!e)
|
|
3254
3271
|
throw new Error("useNotifyConfirmation must be used within NotifyConfirmationProvider");
|
|
3255
3272
|
return e;
|
|
3256
|
-
},
|
|
3273
|
+
}, Pi = l.div`
|
|
3257
3274
|
display: flex;
|
|
3258
3275
|
flex-direction: column;
|
|
3259
3276
|
gap: 2px;
|
|
3260
|
-
`,
|
|
3277
|
+
`, Bi = l.span`
|
|
3261
3278
|
font-size: 12px;
|
|
3262
3279
|
font-weight: 700;
|
|
3263
3280
|
text-transform: uppercase;
|
|
3264
3281
|
letter-spacing: 0.5px;
|
|
3265
3282
|
color: ${i["iron-grey"]};
|
|
3266
|
-
`,
|
|
3283
|
+
`, _i = l.span`
|
|
3267
3284
|
font-size: 14px;
|
|
3268
3285
|
color: ${i["iron-grey"]};
|
|
3269
|
-
`,
|
|
3286
|
+
`, We = z("overline"), Td = ({
|
|
3270
3287
|
children: e,
|
|
3271
3288
|
className: t,
|
|
3272
3289
|
classnames: o,
|
|
3273
3290
|
description: r,
|
|
3274
3291
|
ref: n,
|
|
3275
|
-
...
|
|
3276
|
-
}) => /* @__PURE__ */ m(
|
|
3277
|
-
/* @__PURE__ */ d(
|
|
3278
|
-
r && /* @__PURE__ */ d(
|
|
3279
|
-
] }),
|
|
3292
|
+
...a
|
|
3293
|
+
}) => /* @__PURE__ */ m(Pi, { ...a, ref: n, className: We("container", t), children: [
|
|
3294
|
+
/* @__PURE__ */ d(Bi, { className: We("label", o == null ? void 0 : o.label), children: e }),
|
|
3295
|
+
r && /* @__PURE__ */ d(_i, { className: We("description", o == null ? void 0 : o.description), children: r })
|
|
3296
|
+
] }), Mi = l.div`
|
|
3280
3297
|
position: relative;
|
|
3281
3298
|
display: flex;
|
|
3282
3299
|
flex-direction: column;
|
|
@@ -3286,7 +3303,7 @@ const Cn = (e) => {
|
|
|
3286
3303
|
min-height: 100dvh;
|
|
3287
3304
|
padding: 40px 24px;
|
|
3288
3305
|
overflow: hidden;
|
|
3289
|
-
`,
|
|
3306
|
+
`, Di = l.div`
|
|
3290
3307
|
position: absolute;
|
|
3291
3308
|
inset: 0;
|
|
3292
3309
|
background-image:
|
|
@@ -3296,7 +3313,7 @@ const Cn = (e) => {
|
|
|
3296
3313
|
mask-image: radial-gradient(ellipse 60% 50% at 50% 40%, black 20%, transparent 100%);
|
|
3297
3314
|
-webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 40%, black 20%, transparent 100%);
|
|
3298
3315
|
pointer-events: none;
|
|
3299
|
-
`,
|
|
3316
|
+
`, Fi = l.div`
|
|
3300
3317
|
position: relative;
|
|
3301
3318
|
z-index: 1;
|
|
3302
3319
|
display: flex;
|
|
@@ -3304,9 +3321,9 @@ const Cn = (e) => {
|
|
|
3304
3321
|
align-items: center;
|
|
3305
3322
|
width: 100%;
|
|
3306
3323
|
max-width: 400px;
|
|
3307
|
-
`,
|
|
3324
|
+
`, Oi = l.div`
|
|
3308
3325
|
margin-bottom: 32px;
|
|
3309
|
-
`,
|
|
3326
|
+
`, ji = l.div`
|
|
3310
3327
|
display: flex;
|
|
3311
3328
|
align-items: center;
|
|
3312
3329
|
justify-content: center;
|
|
@@ -3320,60 +3337,60 @@ const Cn = (e) => {
|
|
|
3320
3337
|
0 1px 2px rgba(0, 0, 0, 0.05),
|
|
3321
3338
|
0 1px 3px rgba(0, 0, 0, 0.1);
|
|
3322
3339
|
margin-bottom: 24px;
|
|
3323
|
-
`,
|
|
3340
|
+
`, Hi = l.div`
|
|
3324
3341
|
display: flex;
|
|
3325
3342
|
flex-direction: column;
|
|
3326
3343
|
align-items: center;
|
|
3327
3344
|
text-align: center;
|
|
3328
3345
|
gap: 8px;
|
|
3329
3346
|
margin-bottom: 32px;
|
|
3330
|
-
`,
|
|
3347
|
+
`, Xi = l.h1`
|
|
3331
3348
|
margin: 0;
|
|
3332
3349
|
font-size: 24px;
|
|
3333
3350
|
font-weight: 600;
|
|
3334
3351
|
color: ${i.black};
|
|
3335
3352
|
line-height: 1.3;
|
|
3336
|
-
`,
|
|
3353
|
+
`, Yi = l.p`
|
|
3337
3354
|
margin: 0;
|
|
3338
3355
|
font-size: 14px;
|
|
3339
3356
|
color: ${i["iron-grey"]};
|
|
3340
3357
|
line-height: 1.5;
|
|
3341
3358
|
max-width: 360px;
|
|
3342
|
-
`,
|
|
3359
|
+
`, Wi = l.div`
|
|
3343
3360
|
width: 100%;
|
|
3344
|
-
`,
|
|
3361
|
+
`, Ui = l.div`
|
|
3345
3362
|
margin-top: 32px;
|
|
3346
3363
|
text-align: center;
|
|
3347
3364
|
font-size: 14px;
|
|
3348
3365
|
color: ${i["iron-grey"]};
|
|
3349
|
-
`, te = z("shell-screen"),
|
|
3366
|
+
`, te = z("shell-screen"), Ld = ({
|
|
3350
3367
|
children: e,
|
|
3351
3368
|
className: t,
|
|
3352
3369
|
classnames: o,
|
|
3353
3370
|
description: r,
|
|
3354
3371
|
footer: n,
|
|
3355
|
-
gridSize:
|
|
3372
|
+
gridSize: a = 64,
|
|
3356
3373
|
icon: s,
|
|
3357
3374
|
logo: c,
|
|
3358
3375
|
ref: p,
|
|
3359
3376
|
title: u,
|
|
3360
3377
|
...g
|
|
3361
|
-
}) => /* @__PURE__ */ m(
|
|
3362
|
-
/* @__PURE__ */ d(
|
|
3363
|
-
/* @__PURE__ */ m(
|
|
3364
|
-
c && /* @__PURE__ */ d(
|
|
3365
|
-
s && /* @__PURE__ */ d(
|
|
3366
|
-
(u || r) && /* @__PURE__ */ m(
|
|
3367
|
-
u && /* @__PURE__ */ d(
|
|
3368
|
-
r && /* @__PURE__ */ d(
|
|
3378
|
+
}) => /* @__PURE__ */ m(Mi, { ...g, ref: p, className: te("container", t), children: [
|
|
3379
|
+
/* @__PURE__ */ d(Di, { $size: a, className: te("grid", o == null ? void 0 : o.grid) }),
|
|
3380
|
+
/* @__PURE__ */ m(Fi, { children: [
|
|
3381
|
+
c && /* @__PURE__ */ d(Oi, { children: c }),
|
|
3382
|
+
s && /* @__PURE__ */ d(ji, { className: te("icon"), children: s }),
|
|
3383
|
+
(u || r) && /* @__PURE__ */ m(Hi, { className: te("header", o == null ? void 0 : o.header), children: [
|
|
3384
|
+
u && /* @__PURE__ */ d(Xi, { className: te("title", o == null ? void 0 : o.title), children: u }),
|
|
3385
|
+
r && /* @__PURE__ */ d(Yi, { className: te("description", o == null ? void 0 : o.description), children: r })
|
|
3369
3386
|
] }),
|
|
3370
|
-
e && /* @__PURE__ */ d(
|
|
3371
|
-
n && /* @__PURE__ */ d(
|
|
3387
|
+
e && /* @__PURE__ */ d(Wi, { className: te("content", o == null ? void 0 : o.content), children: e }),
|
|
3388
|
+
n && /* @__PURE__ */ d(Ui, { className: te("footer", o == null ? void 0 : o.footer), children: n })
|
|
3372
3389
|
] })
|
|
3373
|
-
] }),
|
|
3390
|
+
] }), qi = (e, t, o, r) => {
|
|
3374
3391
|
if (o * 2 + 3 + r * 2 >= e)
|
|
3375
3392
|
return Array.from({ length: e }, (x, f) => f + 1);
|
|
3376
|
-
const
|
|
3393
|
+
const a = Math.max(t - o, r + 1), s = Math.min(t + o, e - r), c = a > r + 2, p = s < e - r - 1;
|
|
3377
3394
|
if (!c && p) {
|
|
3378
3395
|
const x = o * 2 + r + 2, f = Array.from({ length: x }, (b, $) => $ + 1), y = Array.from({ length: r }, (b, $) => e - r + $ + 1);
|
|
3379
3396
|
return [...f, "dots", ...y];
|
|
@@ -3383,16 +3400,16 @@ const Cn = (e) => {
|
|
|
3383
3400
|
return [...f, "dots", ...y];
|
|
3384
3401
|
}
|
|
3385
3402
|
const u = Array.from({ length: r }, (x, f) => f + 1), g = Array.from(
|
|
3386
|
-
{ length: s -
|
|
3387
|
-
(x, f) =>
|
|
3403
|
+
{ length: s - a + 1 },
|
|
3404
|
+
(x, f) => a + f
|
|
3388
3405
|
), h = Array.from({ length: r }, (x, f) => e - r + f + 1);
|
|
3389
3406
|
return [...u, "dots", ...g, "dots", ...h];
|
|
3390
|
-
},
|
|
3407
|
+
}, Vi = l.nav`
|
|
3391
3408
|
display: inline-flex;
|
|
3392
3409
|
align-items: center;
|
|
3393
3410
|
gap: 2px;
|
|
3394
3411
|
position: relative;
|
|
3395
|
-
`,
|
|
3412
|
+
`, Zi = (e, t) => {
|
|
3396
3413
|
if (!t)
|
|
3397
3414
|
switch (e) {
|
|
3398
3415
|
case "bordered":
|
|
@@ -3420,7 +3437,7 @@ const Cn = (e) => {
|
|
|
3420
3437
|
position: relative;
|
|
3421
3438
|
z-index: 1;
|
|
3422
3439
|
`;
|
|
3423
|
-
},
|
|
3440
|
+
}, Gi = l.button`
|
|
3424
3441
|
position: relative;
|
|
3425
3442
|
display: inline-flex;
|
|
3426
3443
|
align-items: center;
|
|
@@ -3437,13 +3454,13 @@ const Cn = (e) => {
|
|
|
3437
3454
|
transition:
|
|
3438
3455
|
background-color 0.15s ease,
|
|
3439
3456
|
color 0.15s ease;
|
|
3440
|
-
${({ $variant: e, $active: t }) =>
|
|
3457
|
+
${({ $variant: e, $active: t }) => Zi(e, t)}
|
|
3441
3458
|
${({ $disabled: e }) => e && `
|
|
3442
3459
|
opacity: 0.4;
|
|
3443
3460
|
pointer-events: none;
|
|
3444
3461
|
cursor: default;
|
|
3445
3462
|
`}
|
|
3446
|
-
`,
|
|
3463
|
+
`, Ki = l.span`
|
|
3447
3464
|
position: absolute;
|
|
3448
3465
|
width: 36px;
|
|
3449
3466
|
height: 36px;
|
|
@@ -3452,7 +3469,7 @@ const Cn = (e) => {
|
|
|
3452
3469
|
z-index: 0;
|
|
3453
3470
|
transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
3454
3471
|
pointer-events: none;
|
|
3455
|
-
`,
|
|
3472
|
+
`, Qi = l.span`
|
|
3456
3473
|
display: inline-flex;
|
|
3457
3474
|
align-items: center;
|
|
3458
3475
|
justify-content: center;
|
|
@@ -3461,7 +3478,7 @@ const Cn = (e) => {
|
|
|
3461
3478
|
font-size: 14px;
|
|
3462
3479
|
color: ${i["iron-grey"]};
|
|
3463
3480
|
user-select: none;
|
|
3464
|
-
`,
|
|
3481
|
+
`, $t = l.button`
|
|
3465
3482
|
display: inline-flex;
|
|
3466
3483
|
align-items: center;
|
|
3467
3484
|
justify-content: center;
|
|
@@ -3485,13 +3502,13 @@ const Cn = (e) => {
|
|
|
3485
3502
|
pointer-events: none;
|
|
3486
3503
|
cursor: default;
|
|
3487
3504
|
`}
|
|
3488
|
-
`,
|
|
3505
|
+
`, de = z("pagination"), Rd = ({
|
|
3489
3506
|
boundaries: e = 1,
|
|
3490
3507
|
className: t,
|
|
3491
3508
|
classnames: o,
|
|
3492
3509
|
disabled: r = !1,
|
|
3493
3510
|
initialPage: n = 1,
|
|
3494
|
-
loop:
|
|
3511
|
+
loop: a = !1,
|
|
3495
3512
|
onChange: s,
|
|
3496
3513
|
page: c,
|
|
3497
3514
|
ref: p,
|
|
@@ -3501,7 +3518,7 @@ const Cn = (e) => {
|
|
|
3501
3518
|
variant: x = "flat",
|
|
3502
3519
|
...f
|
|
3503
3520
|
}) => {
|
|
3504
|
-
const y = c !== void 0, [b, $] = L(n), v = y ? c : b, w = B(/* @__PURE__ */ new Map()), S = B(null), I = B(null), A =
|
|
3521
|
+
const y = c !== void 0, [b, $] = L(n), v = y ? c : b, w = B(/* @__PURE__ */ new Map()), S = B(null), I = B(null), A = qi(h, v, g, e), T = E(
|
|
3505
3522
|
(k) => {
|
|
3506
3523
|
y || $(k), s == null || s(k);
|
|
3507
3524
|
},
|
|
@@ -3513,29 +3530,29 @@ const Cn = (e) => {
|
|
|
3513
3530
|
[v, T, h]
|
|
3514
3531
|
), N = E(() => {
|
|
3515
3532
|
if (v <= 1) {
|
|
3516
|
-
|
|
3533
|
+
a && T(h);
|
|
3517
3534
|
return;
|
|
3518
3535
|
}
|
|
3519
3536
|
T(v - 1);
|
|
3520
|
-
}, [v,
|
|
3537
|
+
}, [v, a, T, h]), R = E(() => {
|
|
3521
3538
|
if (v >= h) {
|
|
3522
|
-
|
|
3539
|
+
a && T(1);
|
|
3523
3540
|
return;
|
|
3524
3541
|
}
|
|
3525
3542
|
T(v + 1);
|
|
3526
|
-
}, [v,
|
|
3543
|
+
}, [v, a, T, h]);
|
|
3527
3544
|
return G(() => {
|
|
3528
3545
|
const k = I.current, _ = S.current, P = w.current.get(v);
|
|
3529
3546
|
if (!k || !_ || !P) return;
|
|
3530
3547
|
const j = _.getBoundingClientRect(), H = P.getBoundingClientRect().left - j.left;
|
|
3531
3548
|
k.style.transform = `translateX(${H}px)`;
|
|
3532
|
-
}, [v, A]), /* @__PURE__ */ m(
|
|
3533
|
-
/* @__PURE__ */ d(
|
|
3549
|
+
}, [v, A]), /* @__PURE__ */ m(Vi, { ...f, ref: p || S, className: de("container", t), children: [
|
|
3550
|
+
/* @__PURE__ */ d(Ki, { ref: I, className: de("cursor", o == null ? void 0 : o.cursor) }),
|
|
3534
3551
|
u && /* @__PURE__ */ d(
|
|
3535
|
-
|
|
3552
|
+
$t,
|
|
3536
3553
|
{
|
|
3537
|
-
className:
|
|
3538
|
-
$disabled: r || !
|
|
3554
|
+
className: de("controls", o == null ? void 0 : o.controls),
|
|
3555
|
+
$disabled: r || !a && v <= 1,
|
|
3539
3556
|
onClick: N,
|
|
3540
3557
|
"aria-label": "Previous page",
|
|
3541
3558
|
children: /* @__PURE__ */ d(
|
|
@@ -3555,13 +3572,13 @@ const Cn = (e) => {
|
|
|
3555
3572
|
}
|
|
3556
3573
|
),
|
|
3557
3574
|
A.map(
|
|
3558
|
-
(k, _) => k === "dots" ? /* @__PURE__ */ d(
|
|
3559
|
-
|
|
3575
|
+
(k, _) => k === "dots" ? /* @__PURE__ */ d(Qi, { className: de("ellipsis", o == null ? void 0 : o.ellipsis), children: "..." }, `dots-${_}`) : /* @__PURE__ */ d(
|
|
3576
|
+
Gi,
|
|
3560
3577
|
{
|
|
3561
3578
|
ref: (P) => {
|
|
3562
3579
|
P ? w.current.set(k, P) : w.current.delete(k);
|
|
3563
3580
|
},
|
|
3564
|
-
className:
|
|
3581
|
+
className: de("item", o == null ? void 0 : o.item),
|
|
3565
3582
|
$active: k === v,
|
|
3566
3583
|
$variant: x,
|
|
3567
3584
|
$disabled: r,
|
|
@@ -3574,10 +3591,10 @@ const Cn = (e) => {
|
|
|
3574
3591
|
)
|
|
3575
3592
|
),
|
|
3576
3593
|
u && /* @__PURE__ */ d(
|
|
3577
|
-
|
|
3594
|
+
$t,
|
|
3578
3595
|
{
|
|
3579
|
-
className:
|
|
3580
|
-
$disabled: r || !
|
|
3596
|
+
className: de("controls", o == null ? void 0 : o.controls),
|
|
3597
|
+
$disabled: r || !a && v >= h,
|
|
3581
3598
|
onClick: R,
|
|
3582
3599
|
"aria-label": "Next page",
|
|
3583
3600
|
children: /* @__PURE__ */ d(
|
|
@@ -3597,7 +3614,7 @@ const Cn = (e) => {
|
|
|
3597
3614
|
}
|
|
3598
3615
|
)
|
|
3599
3616
|
] });
|
|
3600
|
-
},
|
|
3617
|
+
}, yt = {
|
|
3601
3618
|
light: {
|
|
3602
3619
|
background: i.white,
|
|
3603
3620
|
border: O(i.black, 30),
|
|
@@ -3610,19 +3627,19 @@ const Cn = (e) => {
|
|
|
3610
3627
|
title: i.white,
|
|
3611
3628
|
description: "#9ca3af"
|
|
3612
3629
|
}
|
|
3613
|
-
},
|
|
3630
|
+
}, De = (e) => yt[e] ?? yt.light, Ji = l.div`
|
|
3614
3631
|
position: relative;
|
|
3615
3632
|
display: flex;
|
|
3616
3633
|
flex-direction: column;
|
|
3617
3634
|
gap: 16px;
|
|
3618
3635
|
padding: 12px;
|
|
3619
|
-
border: 1px dashed ${({ $variant: e }) =>
|
|
3636
|
+
border: 1px dashed ${({ $variant: e }) => De(e).border};
|
|
3620
3637
|
border-radius: 16px;
|
|
3621
|
-
background-color: ${({ $variant: e }) =>
|
|
3638
|
+
background-color: ${({ $variant: e }) => De(e).background};
|
|
3622
3639
|
box-shadow:
|
|
3623
3640
|
0 4px 6px -1px rgba(0, 0, 0, 0.1),
|
|
3624
3641
|
0 2px 4px -2px rgba(0, 0, 0, 0.1);
|
|
3625
|
-
`,
|
|
3642
|
+
`, ea = l.div`
|
|
3626
3643
|
position: absolute;
|
|
3627
3644
|
top: -1px;
|
|
3628
3645
|
right: 12px;
|
|
@@ -3635,51 +3652,51 @@ const Cn = (e) => {
|
|
|
3635
3652
|
letter-spacing: 0.5px;
|
|
3636
3653
|
text-transform: uppercase;
|
|
3637
3654
|
line-height: 1.4;
|
|
3638
|
-
`,
|
|
3655
|
+
`, ta = l.div`
|
|
3639
3656
|
display: flex;
|
|
3640
3657
|
flex-direction: column;
|
|
3641
3658
|
gap: 4px;
|
|
3642
|
-
`,
|
|
3659
|
+
`, oa = l.div`
|
|
3643
3660
|
font-size: 18px;
|
|
3644
3661
|
font-weight: 600;
|
|
3645
3662
|
line-height: 1.4;
|
|
3646
|
-
color: ${({ $variant: e }) =>
|
|
3647
|
-
`,
|
|
3663
|
+
color: ${({ $variant: e }) => De(e).title};
|
|
3664
|
+
`, ra = l.div`
|
|
3648
3665
|
font-size: 14px;
|
|
3649
3666
|
line-height: 1.5;
|
|
3650
|
-
color: ${({ $variant: e }) =>
|
|
3651
|
-
`,
|
|
3667
|
+
color: ${({ $variant: e }) => De(e).description};
|
|
3668
|
+
`, na = l.div`
|
|
3652
3669
|
display: flex;
|
|
3653
3670
|
flex-wrap: wrap;
|
|
3654
3671
|
gap: 8px;
|
|
3655
|
-
`,
|
|
3672
|
+
`, be = z("panel"), Ad = ({
|
|
3656
3673
|
children: e,
|
|
3657
3674
|
className: t,
|
|
3658
3675
|
classnames: o,
|
|
3659
3676
|
description: r,
|
|
3660
3677
|
label: n,
|
|
3661
|
-
ref:
|
|
3678
|
+
ref: a,
|
|
3662
3679
|
title: s,
|
|
3663
3680
|
variant: c = "light",
|
|
3664
3681
|
...p
|
|
3665
3682
|
}) => {
|
|
3666
3683
|
const u = s || r;
|
|
3667
|
-
return /* @__PURE__ */ m(
|
|
3668
|
-
n && /* @__PURE__ */ d(
|
|
3669
|
-
u && /* @__PURE__ */ m(
|
|
3670
|
-
s && /* @__PURE__ */ d(
|
|
3684
|
+
return /* @__PURE__ */ m(Ji, { ...p, ref: a, className: be("container", t), $variant: c, children: [
|
|
3685
|
+
n && /* @__PURE__ */ d(ea, { className: be("label", o == null ? void 0 : o.label), children: n }),
|
|
3686
|
+
u && /* @__PURE__ */ m(ta, { children: [
|
|
3687
|
+
s && /* @__PURE__ */ d(oa, { className: be("title", o == null ? void 0 : o.title), $variant: c, children: s }),
|
|
3671
3688
|
r && /* @__PURE__ */ d(
|
|
3672
|
-
|
|
3689
|
+
ra,
|
|
3673
3690
|
{
|
|
3674
|
-
className:
|
|
3691
|
+
className: be("description", o == null ? void 0 : o.description),
|
|
3675
3692
|
$variant: c,
|
|
3676
3693
|
children: r
|
|
3677
3694
|
}
|
|
3678
3695
|
)
|
|
3679
3696
|
] }),
|
|
3680
|
-
/* @__PURE__ */ d(
|
|
3697
|
+
/* @__PURE__ */ d(na, { className: be("content", o == null ? void 0 : o.content), children: e })
|
|
3681
3698
|
] });
|
|
3682
|
-
},
|
|
3699
|
+
}, ia = [
|
|
3683
3700
|
// Космос и запуск
|
|
3684
3701
|
"Готовим стартовый стол к запуску",
|
|
3685
3702
|
"Прогреваем фотонные двигатели",
|
|
@@ -3760,10 +3777,10 @@ const Cn = (e) => {
|
|
|
3760
3777
|
"Переключаем контур охлаждения",
|
|
3761
3778
|
"Диагностируем плазменный щит",
|
|
3762
3779
|
"Затягиваем болты на обшивке"
|
|
3763
|
-
],
|
|
3780
|
+
], aa = 3500, la = (e) => e && e.length > 0 ? e : ia, da = (e) => e && e > 0 ? e : aa, ca = (e) => Math.max(...e.map((t) => t.length)), sa = (e, t) => {
|
|
3764
3781
|
const o = Math.floor((t - e.length) / 2);
|
|
3765
3782
|
return e.padStart(e.length + o).padEnd(t);
|
|
3766
|
-
},
|
|
3783
|
+
}, mt = (e, t) => {
|
|
3767
3784
|
const o = Array.from({ length: e }, (r, n) => n);
|
|
3768
3785
|
for (let r = o.length - 1; r > 0; r--) {
|
|
3769
3786
|
const n = Math.floor(Math.random() * (r + 1));
|
|
@@ -3774,39 +3791,39 @@ const Cn = (e) => {
|
|
|
3774
3791
|
[o[0], o[r]] = [o[r], o[0]];
|
|
3775
3792
|
}
|
|
3776
3793
|
return o;
|
|
3777
|
-
},
|
|
3794
|
+
}, pa = W`
|
|
3778
3795
|
from { transform: rotate(0deg) translateX(20px) rotate(0deg); }
|
|
3779
3796
|
to { transform: rotate(360deg) translateX(20px) rotate(-360deg); }
|
|
3780
|
-
`,
|
|
3797
|
+
`, ga = W`
|
|
3781
3798
|
from { transform: rotate(120deg) translateX(14px) rotate(-120deg); }
|
|
3782
3799
|
to { transform: rotate(480deg) translateX(14px) rotate(-480deg); }
|
|
3783
|
-
`,
|
|
3800
|
+
`, ua = W`
|
|
3784
3801
|
from { transform: rotate(240deg) translateX(26px) rotate(-240deg); }
|
|
3785
3802
|
to { transform: rotate(600deg) translateX(26px) rotate(-600deg); }
|
|
3786
|
-
`,
|
|
3803
|
+
`, ha = l.div`
|
|
3787
3804
|
display: flex;
|
|
3788
3805
|
flex-direction: column;
|
|
3789
3806
|
align-items: center;
|
|
3790
3807
|
justify-content: center;
|
|
3791
3808
|
padding: 48px 24px;
|
|
3792
3809
|
gap: 28px;
|
|
3793
|
-
`,
|
|
3810
|
+
`, fa = l.div`
|
|
3794
3811
|
position: relative;
|
|
3795
3812
|
width: 64px;
|
|
3796
3813
|
height: 64px;
|
|
3797
3814
|
display: flex;
|
|
3798
3815
|
align-items: center;
|
|
3799
3816
|
justify-content: center;
|
|
3800
|
-
`,
|
|
3817
|
+
`, Ue = l.div`
|
|
3801
3818
|
position: absolute;
|
|
3802
3819
|
width: ${(e) => e.$index === 0 ? 6 : e.$index === 1 ? 4 : 3}px;
|
|
3803
3820
|
height: ${(e) => e.$index === 0 ? 6 : e.$index === 1 ? 4 : 3}px;
|
|
3804
3821
|
border-radius: 50%;
|
|
3805
3822
|
background: ${i.black};
|
|
3806
3823
|
opacity: ${(e) => e.$index === 0 ? 1 : e.$index === 1 ? 0.6 : 0.35};
|
|
3807
|
-
animation: ${(e) => e.$index === 0 ?
|
|
3824
|
+
animation: ${(e) => e.$index === 0 ? pa : e.$index === 1 ? ga : ua}
|
|
3808
3825
|
${(e) => e.$index === 0 ? 3 : e.$index === 1 ? 2 : 4.5}s linear infinite;
|
|
3809
|
-
`,
|
|
3826
|
+
`, xa = l.span`
|
|
3810
3827
|
position: absolute;
|
|
3811
3828
|
width: 1px;
|
|
3812
3829
|
height: 1px;
|
|
@@ -3816,14 +3833,14 @@ const Cn = (e) => {
|
|
|
3816
3833
|
clip: rect(0, 0, 0, 0);
|
|
3817
3834
|
white-space: nowrap;
|
|
3818
3835
|
border: 0;
|
|
3819
|
-
`,
|
|
3836
|
+
`, ba = l.p`
|
|
3820
3837
|
margin: 0;
|
|
3821
3838
|
font-size: 14px;
|
|
3822
3839
|
color: ${i["iron-grey"]};
|
|
3823
3840
|
line-height: 1.5;
|
|
3824
3841
|
text-align: center;
|
|
3825
3842
|
max-width: 360px;
|
|
3826
|
-
`,
|
|
3843
|
+
`, $a = 40, ya = 200, ma = 30, vt = "АБВГДЕЖЗИКЛМНОПРСТУФХЦЧШЩЭЮЯабвгдежзиклмнопрстуфхцчшщэюяABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", va = () => vt[Math.floor(Math.random() * vt.length)], wa = (e) => ya + e * ma, Sa = () => $a, ka = l.div`
|
|
3827
3844
|
display: flex;
|
|
3828
3845
|
justify-content: center;
|
|
3829
3846
|
white-space: pre;
|
|
@@ -3833,12 +3850,12 @@ const Cn = (e) => {
|
|
|
3833
3850
|
line-height: 1.6;
|
|
3834
3851
|
color: ${i.black};
|
|
3835
3852
|
min-height: 1.6em;
|
|
3836
|
-
`,
|
|
3853
|
+
`, za = l.span`
|
|
3837
3854
|
display: inline-block;
|
|
3838
3855
|
width: 0.65em;
|
|
3839
3856
|
text-align: center;
|
|
3840
|
-
`,
|
|
3841
|
-
const [n,
|
|
3857
|
+
`, Ea = z("split-flap-text"), Na = ({ className: e, ref: t, text: o, ...r }) => {
|
|
3858
|
+
const [n, a] = L(() => o.split("")), s = B(o), c = B([]), p = B(null), u = B([]), g = B(o.split("")), h = E(() => {
|
|
3842
3859
|
p.current && (clearInterval(p.current), p.current = null);
|
|
3843
3860
|
for (const f of u.current)
|
|
3844
3861
|
clearTimeout(f);
|
|
@@ -3846,32 +3863,32 @@ const Cn = (e) => {
|
|
|
3846
3863
|
}, []), x = E(
|
|
3847
3864
|
(f) => {
|
|
3848
3865
|
h(), g.current = f, c.current = f.map((y) => y === " "), p.current = setInterval(() => {
|
|
3849
|
-
|
|
3850
|
-
(y) => y.map((b, $) => c.current[$] ? g.current[$] :
|
|
3866
|
+
a(
|
|
3867
|
+
(y) => y.map((b, $) => c.current[$] ? g.current[$] : va())
|
|
3851
3868
|
);
|
|
3852
|
-
},
|
|
3853
|
-
c.current[b] = !0, c.current.every(Boolean) && (p.current && (clearInterval(p.current), p.current = null),
|
|
3854
|
-
},
|
|
3869
|
+
}, Sa()), u.current = f.map((y, b) => setTimeout(() => {
|
|
3870
|
+
c.current[b] = !0, c.current.every(Boolean) && (p.current && (clearInterval(p.current), p.current = null), a([...g.current]));
|
|
3871
|
+
}, wa(b)));
|
|
3855
3872
|
},
|
|
3856
3873
|
[h]
|
|
3857
3874
|
);
|
|
3858
3875
|
return G(() => {
|
|
3859
3876
|
o !== s.current && (s.current = o, x(o.split("")));
|
|
3860
|
-
}, [o, x]), G(() => h, [h]), /* @__PURE__ */ d(
|
|
3861
|
-
},
|
|
3877
|
+
}, [o, x]), G(() => h, [h]), /* @__PURE__ */ d(ka, { ...r, ref: t, className: Ea("container", e), "aria-hidden": "true", children: n.map((f, y) => /* @__PURE__ */ d(za, { children: f === " " ? " " : f }, y)) });
|
|
3878
|
+
}, Be = z("pending-screen"), Pd = ({
|
|
3862
3879
|
className: e,
|
|
3863
3880
|
classnames: t,
|
|
3864
3881
|
description: o,
|
|
3865
3882
|
interval: r,
|
|
3866
3883
|
phrases: n,
|
|
3867
|
-
ref:
|
|
3884
|
+
ref: a,
|
|
3868
3885
|
...s
|
|
3869
3886
|
}) => {
|
|
3870
|
-
const c =
|
|
3871
|
-
(S) => (h.current >= g.current.length && (g.current =
|
|
3887
|
+
const c = ye(() => la(n), [n]), p = ye(() => da(r), [r]), u = ye(() => ca(c), [c]), g = B([]), h = B(0), x = E(
|
|
3888
|
+
(S) => (h.current >= g.current.length && (g.current = mt(c.length, S), h.current = 0), g.current[h.current++]),
|
|
3872
3889
|
[c.length]
|
|
3873
3890
|
), [f, y] = L(() => {
|
|
3874
|
-
g.current =
|
|
3891
|
+
g.current = mt(c.length);
|
|
3875
3892
|
const S = g.current[0];
|
|
3876
3893
|
return h.current = 1, S;
|
|
3877
3894
|
}), b = B(null), $ = E(() => {
|
|
@@ -3880,18 +3897,18 @@ const Cn = (e) => {
|
|
|
3880
3897
|
G(() => (b.current = setInterval($, p), () => {
|
|
3881
3898
|
b.current && clearInterval(b.current);
|
|
3882
3899
|
}), [$, p]);
|
|
3883
|
-
const v = c[f], w =
|
|
3884
|
-
return /* @__PURE__ */ m(
|
|
3885
|
-
/* @__PURE__ */ m(
|
|
3886
|
-
/* @__PURE__ */ d(
|
|
3887
|
-
/* @__PURE__ */ d(
|
|
3888
|
-
/* @__PURE__ */ d(
|
|
3900
|
+
const v = c[f], w = sa(v, u);
|
|
3901
|
+
return /* @__PURE__ */ m(ha, { ...s, ref: a, className: Be("container", e), role: "status", children: [
|
|
3902
|
+
/* @__PURE__ */ m(fa, { className: Be("indicator", t == null ? void 0 : t.indicator), children: [
|
|
3903
|
+
/* @__PURE__ */ d(Ue, { $index: 0 }),
|
|
3904
|
+
/* @__PURE__ */ d(Ue, { $index: 1 }),
|
|
3905
|
+
/* @__PURE__ */ d(Ue, { $index: 2 })
|
|
3889
3906
|
] }),
|
|
3890
|
-
/* @__PURE__ */ d(
|
|
3891
|
-
/* @__PURE__ */ d(
|
|
3892
|
-
o && /* @__PURE__ */ d(
|
|
3907
|
+
/* @__PURE__ */ d(Na, { text: w, className: Be("board", t == null ? void 0 : t.board) }),
|
|
3908
|
+
/* @__PURE__ */ d(xa, { children: v }),
|
|
3909
|
+
o && /* @__PURE__ */ d(ba, { className: Be("description", t == null ? void 0 : t.description), children: o })
|
|
3893
3910
|
] });
|
|
3894
|
-
},
|
|
3911
|
+
}, et = {
|
|
3895
3912
|
compact: {
|
|
3896
3913
|
height: 4,
|
|
3897
3914
|
radius: 2
|
|
@@ -3900,39 +3917,39 @@ const Cn = (e) => {
|
|
|
3900
3917
|
height: 8,
|
|
3901
3918
|
radius: 4
|
|
3902
3919
|
}
|
|
3903
|
-
},
|
|
3920
|
+
}, Ca = l.div`
|
|
3904
3921
|
width: 100%;
|
|
3905
|
-
height: ${({ $size: e }) =>
|
|
3906
|
-
border-radius: ${({ $size: e }) =>
|
|
3922
|
+
height: ${({ $size: e }) => et[e].height}px;
|
|
3923
|
+
border-radius: ${({ $size: e }) => et[e].radius}px;
|
|
3907
3924
|
background-color: ${i.gray};
|
|
3908
3925
|
overflow: hidden;
|
|
3909
|
-
`,
|
|
3926
|
+
`, Ia = l.div`
|
|
3910
3927
|
height: 100%;
|
|
3911
3928
|
width: ${({ $value: e }) => Math.min(100, Math.max(0, e))}%;
|
|
3912
|
-
border-radius: ${({ $size: e }) =>
|
|
3929
|
+
border-radius: ${({ $size: e }) => et[e].radius}px;
|
|
3913
3930
|
background-color: ${i.black};
|
|
3914
3931
|
transition: width 0.2s ease;
|
|
3915
|
-
`,
|
|
3932
|
+
`, wt = z("progress"), Bd = ({
|
|
3916
3933
|
value: e,
|
|
3917
3934
|
size: t = "default",
|
|
3918
3935
|
className: o,
|
|
3919
3936
|
classnames: r,
|
|
3920
3937
|
ref: n,
|
|
3921
|
-
...
|
|
3938
|
+
...a
|
|
3922
3939
|
}) => /* @__PURE__ */ d(
|
|
3923
|
-
|
|
3940
|
+
Ca,
|
|
3924
3941
|
{
|
|
3925
|
-
...
|
|
3942
|
+
...a,
|
|
3926
3943
|
ref: n,
|
|
3927
3944
|
$size: t,
|
|
3928
|
-
className:
|
|
3945
|
+
className: wt("track", o, r == null ? void 0 : r.track),
|
|
3929
3946
|
role: "progressbar",
|
|
3930
3947
|
"aria-valuenow": e,
|
|
3931
3948
|
"aria-valuemin": 0,
|
|
3932
3949
|
"aria-valuemax": 100,
|
|
3933
|
-
children: /* @__PURE__ */ d(
|
|
3950
|
+
children: /* @__PURE__ */ d(Ia, { $size: t, $value: e, className: wt("bar", r == null ? void 0 : r.bar) })
|
|
3934
3951
|
}
|
|
3935
|
-
),
|
|
3952
|
+
), Ot = ke(null), Ta = l.div`
|
|
3936
3953
|
position: fixed;
|
|
3937
3954
|
bottom: 24px;
|
|
3938
3955
|
right: 24px;
|
|
@@ -3947,114 +3964,114 @@ const Cn = (e) => {
|
|
|
3947
3964
|
animation: ${Z.fadeIn} 0.2s ease-out;
|
|
3948
3965
|
pointer-events: none;
|
|
3949
3966
|
color: ${i.black};
|
|
3950
|
-
`,
|
|
3967
|
+
`, La = l.span`
|
|
3951
3968
|
font-size: 14px;
|
|
3952
3969
|
font-weight: 500;
|
|
3953
3970
|
white-space: nowrap;
|
|
3954
|
-
`,
|
|
3971
|
+
`, _d = ({
|
|
3955
3972
|
children: e,
|
|
3956
3973
|
defaultMessage: t = "Saving"
|
|
3957
3974
|
}) => {
|
|
3958
|
-
const [o, r] = L(!1), [n,
|
|
3975
|
+
const [o, r] = L(!1), [n, a] = L(t), s = E(
|
|
3959
3976
|
(u) => {
|
|
3960
|
-
|
|
3977
|
+
a(u ?? t), r(!0);
|
|
3961
3978
|
},
|
|
3962
3979
|
[t]
|
|
3963
3980
|
), c = E(() => {
|
|
3964
3981
|
r(!1);
|
|
3965
|
-
}, []), p =
|
|
3966
|
-
return /* @__PURE__ */ m(
|
|
3982
|
+
}, []), p = ye(() => ({ isVisible: o, show: s, hide: c }), [o, s, c]);
|
|
3983
|
+
return /* @__PURE__ */ m(Ot.Provider, { value: p, children: [
|
|
3967
3984
|
e,
|
|
3968
|
-
o && /* @__PURE__ */ m(
|
|
3969
|
-
/* @__PURE__ */ d(
|
|
3970
|
-
/* @__PURE__ */ d(
|
|
3985
|
+
o && /* @__PURE__ */ m(Ta, { children: [
|
|
3986
|
+
/* @__PURE__ */ d(qt, { size: "sm" }),
|
|
3987
|
+
/* @__PURE__ */ d(La, { children: n })
|
|
3971
3988
|
] })
|
|
3972
3989
|
] });
|
|
3973
|
-
},
|
|
3974
|
-
const e =
|
|
3990
|
+
}, Md = () => {
|
|
3991
|
+
const e = ze(Ot);
|
|
3975
3992
|
if (!e)
|
|
3976
3993
|
throw new Error("useSaveProgress must be used within SaveProgressProvider");
|
|
3977
3994
|
return e;
|
|
3978
|
-
},
|
|
3995
|
+
}, Ra = W`
|
|
3979
3996
|
0% { opacity: 1; }
|
|
3980
3997
|
50% { opacity: 0.4; }
|
|
3981
3998
|
100% { opacity: 1; }
|
|
3982
|
-
`,
|
|
3999
|
+
`, Aa = W`
|
|
3983
4000
|
0% { transform: translateX(-100%); }
|
|
3984
4001
|
60% { transform: translateX(100%); }
|
|
3985
4002
|
100% { transform: translateX(100%); }
|
|
3986
|
-
`,
|
|
3987
|
-
animation: ${
|
|
3988
|
-
`,
|
|
4003
|
+
`, Pa = Oe`
|
|
4004
|
+
animation: ${Ra} 1.5s ease-in-out infinite;
|
|
4005
|
+
`, Ba = Oe`
|
|
3989
4006
|
&::after {
|
|
3990
4007
|
content: '';
|
|
3991
4008
|
position: absolute;
|
|
3992
4009
|
inset: 0;
|
|
3993
4010
|
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
|
|
3994
|
-
animation: ${
|
|
4011
|
+
animation: ${Aa} 1.6s linear infinite;
|
|
3995
4012
|
}
|
|
3996
|
-
`,
|
|
3997
|
-
pulse:
|
|
3998
|
-
wave:
|
|
4013
|
+
`, _a = {
|
|
4014
|
+
pulse: Pa,
|
|
4015
|
+
wave: Ba,
|
|
3999
4016
|
none: null
|
|
4000
|
-
},
|
|
4017
|
+
}, Ma = {
|
|
4001
4018
|
none: "0",
|
|
4002
4019
|
sm: "4px",
|
|
4003
4020
|
md: "8px",
|
|
4004
4021
|
lg: "12px",
|
|
4005
4022
|
full: "9999px"
|
|
4006
|
-
},
|
|
4023
|
+
}, qe = (e) => typeof e == "number" ? `${e}px` : e, Da = l.div`
|
|
4007
4024
|
position: relative;
|
|
4008
4025
|
overflow: hidden;
|
|
4009
4026
|
background-color: #e5e7eb;
|
|
4010
|
-
width: ${({ $width: e, $circle: t, $height: o }) =>
|
|
4011
|
-
height: ${({ $height: e }) =>
|
|
4012
|
-
border-radius: ${({ $circle: e, $radius: t }) => e ? "50%" :
|
|
4013
|
-
${({ $animation: e }) =>
|
|
4014
|
-
`,
|
|
4027
|
+
width: ${({ $width: e, $circle: t, $height: o }) => qe(t ? o : e)};
|
|
4028
|
+
height: ${({ $height: e }) => qe(e)};
|
|
4029
|
+
border-radius: ${({ $circle: e, $radius: t }) => e ? "50%" : Ma[t]};
|
|
4030
|
+
${({ $animation: e }) => _a[e]}
|
|
4031
|
+
`, Fa = z("skeleton"), Dd = ({
|
|
4015
4032
|
animation: e = "pulse",
|
|
4016
4033
|
circle: t = !1,
|
|
4017
4034
|
className: o,
|
|
4018
4035
|
height: r = 16,
|
|
4019
4036
|
radius: n = "md",
|
|
4020
|
-
ref:
|
|
4037
|
+
ref: a,
|
|
4021
4038
|
width: s = "100%",
|
|
4022
4039
|
...c
|
|
4023
4040
|
}) => /* @__PURE__ */ d(
|
|
4024
|
-
|
|
4041
|
+
Da,
|
|
4025
4042
|
{
|
|
4026
4043
|
...c,
|
|
4027
|
-
ref:
|
|
4028
|
-
className:
|
|
4044
|
+
ref: a,
|
|
4045
|
+
className: Fa("container", o),
|
|
4029
4046
|
$animation: e,
|
|
4030
4047
|
$circle: t,
|
|
4031
4048
|
$height: r,
|
|
4032
4049
|
$radius: n,
|
|
4033
4050
|
$width: s
|
|
4034
4051
|
}
|
|
4035
|
-
),
|
|
4052
|
+
), Oa = l.span`
|
|
4036
4053
|
display: inline-flex;
|
|
4037
4054
|
align-items: baseline;
|
|
4038
4055
|
gap: 4px;
|
|
4039
4056
|
font-size: 13px;
|
|
4040
4057
|
color: #666;
|
|
4041
|
-
`,
|
|
4058
|
+
`, ja = l.strong`
|
|
4042
4059
|
font-weight: 700;
|
|
4043
4060
|
color: ${i.black};
|
|
4044
|
-
`,
|
|
4045
|
-
/* @__PURE__ */ d(
|
|
4046
|
-
/* @__PURE__ */ d(
|
|
4047
|
-
] }),
|
|
4061
|
+
`, Ha = l.span``, Ve = z("stat"), Fd = ({ className: e, classnames: t, label: o, ref: r, value: n, ...a }) => /* @__PURE__ */ m(Oa, { ...a, ref: r, className: Ve("container", e), children: [
|
|
4062
|
+
/* @__PURE__ */ d(ja, { className: Ve("value", t == null ? void 0 : t.value), children: n }),
|
|
4063
|
+
/* @__PURE__ */ d(Ha, { className: Ve("label", t == null ? void 0 : t.label), children: o })
|
|
4064
|
+
] }), Xa = l.div`
|
|
4048
4065
|
display: flex;
|
|
4049
4066
|
flex-direction: column;
|
|
4050
4067
|
border: 1px solid ${i.gray};
|
|
4051
4068
|
border-radius: 8px;
|
|
4052
4069
|
overflow: hidden;
|
|
4053
|
-
`,
|
|
4070
|
+
`, Ya = l.div`
|
|
4054
4071
|
&:not(:last-child) {
|
|
4055
4072
|
border-bottom: 1px solid ${i.gray};
|
|
4056
4073
|
}
|
|
4057
|
-
`,
|
|
4074
|
+
`, Wa = l.button`
|
|
4058
4075
|
display: flex;
|
|
4059
4076
|
align-items: center;
|
|
4060
4077
|
gap: 8px;
|
|
@@ -4073,7 +4090,7 @@ const Cn = (e) => {
|
|
|
4073
4090
|
&:hover {
|
|
4074
4091
|
background-color: ${({ $interactive: e }) => e ? O(i.black, 3) : "transparent"};
|
|
4075
4092
|
}
|
|
4076
|
-
`,
|
|
4093
|
+
`, Ua = l.span`
|
|
4077
4094
|
display: flex;
|
|
4078
4095
|
align-items: center;
|
|
4079
4096
|
justify-content: center;
|
|
@@ -4083,84 +4100,84 @@ const Cn = (e) => {
|
|
|
4083
4100
|
color: ${i["iron-grey"]};
|
|
4084
4101
|
transition: transform 0.15s ease;
|
|
4085
4102
|
transform: rotate(${({ $expanded: e }) => e ? "90deg" : "0deg"});
|
|
4086
|
-
`,
|
|
4103
|
+
`, qa = l.span`
|
|
4087
4104
|
width: 16px;
|
|
4088
4105
|
height: 16px;
|
|
4089
4106
|
flex-shrink: 0;
|
|
4090
|
-
`,
|
|
4107
|
+
`, Va = {
|
|
4091
4108
|
success: i.green,
|
|
4092
4109
|
error: i.red,
|
|
4093
4110
|
running: i["steel-blue"],
|
|
4094
4111
|
pending: i.gray
|
|
4095
|
-
},
|
|
4112
|
+
}, Za = W`
|
|
4096
4113
|
from { transform: rotate(0deg); }
|
|
4097
4114
|
to { transform: rotate(360deg); }
|
|
4098
|
-
`,
|
|
4099
|
-
animation: ${
|
|
4100
|
-
`,
|
|
4115
|
+
`, Ga = Oe`
|
|
4116
|
+
animation: ${Za} 1s linear infinite;
|
|
4117
|
+
`, Ka = l.span`
|
|
4101
4118
|
display: flex;
|
|
4102
4119
|
align-items: center;
|
|
4103
4120
|
justify-content: center;
|
|
4104
4121
|
flex-shrink: 0;
|
|
4105
|
-
color: ${({ $status: e }) =>
|
|
4106
|
-
${({ $status: e }) => e === "running" &&
|
|
4107
|
-
`,
|
|
4122
|
+
color: ${({ $status: e }) => Va[e]};
|
|
4123
|
+
${({ $status: e }) => e === "running" && Ga}
|
|
4124
|
+
`, Qa = l.span`
|
|
4108
4125
|
flex: 1;
|
|
4109
4126
|
min-width: 0;
|
|
4110
4127
|
overflow: hidden;
|
|
4111
4128
|
text-overflow: ellipsis;
|
|
4112
4129
|
white-space: nowrap;
|
|
4113
4130
|
color: ${({ $muted: e }) => e ? i["iron-grey"] : i.black};
|
|
4114
|
-
`,
|
|
4131
|
+
`, Ja = l.span`
|
|
4115
4132
|
flex-shrink: 0;
|
|
4116
4133
|
font-size: 12px;
|
|
4117
4134
|
font-weight: 400;
|
|
4118
4135
|
color: ${i["iron-grey"]};
|
|
4119
4136
|
font-variant-numeric: tabular-nums;
|
|
4120
|
-
`,
|
|
4137
|
+
`, el = l.div`
|
|
4121
4138
|
display: grid;
|
|
4122
4139
|
grid-template-rows: ${({ $expanded: e }) => e ? "1fr" : "0fr"};
|
|
4123
4140
|
transition: grid-template-rows 0.15s ease;
|
|
4124
|
-
`,
|
|
4141
|
+
`, tl = l.div`
|
|
4125
4142
|
overflow: hidden;
|
|
4126
|
-
`,
|
|
4143
|
+
`, ol = l.div`
|
|
4127
4144
|
padding: 8px 0;
|
|
4128
4145
|
background-color: ${i.white};
|
|
4129
4146
|
border-top: 1px solid ${i.gray};
|
|
4130
4147
|
font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
|
|
4131
4148
|
font-size: 12px;
|
|
4132
4149
|
line-height: 20px;
|
|
4133
|
-
`,
|
|
4150
|
+
`, rl = l.div`
|
|
4134
4151
|
display: flex;
|
|
4135
4152
|
padding: 0 16px;
|
|
4136
4153
|
|
|
4137
4154
|
&:hover {
|
|
4138
4155
|
background-color: ${O(i.black, 3)};
|
|
4139
4156
|
}
|
|
4140
|
-
`,
|
|
4157
|
+
`, nl = l.span`
|
|
4141
4158
|
flex-shrink: 0;
|
|
4142
4159
|
width: 40px;
|
|
4143
4160
|
text-align: right;
|
|
4144
4161
|
padding-right: 16px;
|
|
4145
4162
|
color: ${i["iron-grey"]};
|
|
4146
4163
|
user-select: none;
|
|
4147
|
-
`,
|
|
4164
|
+
`, il = l.span`
|
|
4148
4165
|
flex: 1;
|
|
4149
4166
|
min-width: 0;
|
|
4150
4167
|
white-space: pre;
|
|
4151
4168
|
color: ${i.black};
|
|
4152
|
-
`,
|
|
4153
|
-
success:
|
|
4154
|
-
error:
|
|
4155
|
-
running:
|
|
4156
|
-
pending:
|
|
4157
|
-
},
|
|
4169
|
+
`, _e = z("step-log"), al = {
|
|
4170
|
+
success: Gt,
|
|
4171
|
+
error: Zt,
|
|
4172
|
+
running: Wt,
|
|
4173
|
+
pending: Vt
|
|
4174
|
+
}, Od = ({
|
|
4158
4175
|
className: e,
|
|
4159
4176
|
classnames: t,
|
|
4160
4177
|
defaultValue: o = [],
|
|
4161
4178
|
onChange: r,
|
|
4162
4179
|
ref: n,
|
|
4163
|
-
steps:
|
|
4180
|
+
steps: a,
|
|
4164
4181
|
value: s,
|
|
4165
4182
|
...c
|
|
4166
4183
|
}) => {
|
|
@@ -4171,36 +4188,36 @@ const Cn = (e) => {
|
|
|
4171
4188
|
},
|
|
4172
4189
|
[h, g, r]
|
|
4173
4190
|
);
|
|
4174
|
-
return /* @__PURE__ */ d(
|
|
4175
|
-
const y = h.includes(f.value), b = f.status ?? "pending", $ = b !== "pending", v = f.lines && f.lines.length > 0, w =
|
|
4176
|
-
return /* @__PURE__ */ m(
|
|
4191
|
+
return /* @__PURE__ */ d(Xa, { ...c, ref: n, className: _e("container", e), children: a.map((f) => {
|
|
4192
|
+
const y = h.includes(f.value), b = f.status ?? "pending", $ = b !== "pending", v = f.lines && f.lines.length > 0, w = al[b];
|
|
4193
|
+
return /* @__PURE__ */ m(Ya, { className: _e("step", t == null ? void 0 : t.step), children: [
|
|
4177
4194
|
/* @__PURE__ */ m(
|
|
4178
|
-
|
|
4195
|
+
Wa,
|
|
4179
4196
|
{
|
|
4180
4197
|
type: "button",
|
|
4181
4198
|
$expanded: y,
|
|
4182
4199
|
$interactive: $,
|
|
4183
4200
|
onClick: $ ? () => x(f.value) : void 0,
|
|
4184
|
-
className:
|
|
4201
|
+
className: _e("header", t == null ? void 0 : t.header),
|
|
4185
4202
|
children: [
|
|
4186
|
-
$ ? /* @__PURE__ */ d(
|
|
4187
|
-
/* @__PURE__ */ d(
|
|
4188
|
-
/* @__PURE__ */ d(
|
|
4189
|
-
f.duration && /* @__PURE__ */ d(
|
|
4203
|
+
$ ? /* @__PURE__ */ d(Ua, { $expanded: y, children: /* @__PURE__ */ d(Yt, { size: 14 }) }) : /* @__PURE__ */ d(qa, {}),
|
|
4204
|
+
/* @__PURE__ */ d(Ka, { $status: b, children: /* @__PURE__ */ d(w, { size: 16 }) }),
|
|
4205
|
+
/* @__PURE__ */ d(Qa, { $muted: b === "pending", children: f.title }),
|
|
4206
|
+
f.duration && /* @__PURE__ */ d(Ja, { children: f.duration })
|
|
4190
4207
|
]
|
|
4191
4208
|
}
|
|
4192
4209
|
),
|
|
4193
|
-
$ && v && /* @__PURE__ */ d(
|
|
4194
|
-
/* @__PURE__ */ d(
|
|
4195
|
-
/* @__PURE__ */ d(
|
|
4210
|
+
$ && v && /* @__PURE__ */ d(el, { $expanded: y, children: /* @__PURE__ */ d(tl, { children: /* @__PURE__ */ d(ol, { className: _e("log", t == null ? void 0 : t.log), children: f.lines.map((S) => /* @__PURE__ */ m(rl, { children: [
|
|
4211
|
+
/* @__PURE__ */ d(nl, { children: S.line }),
|
|
4212
|
+
/* @__PURE__ */ d(il, { children: S.text })
|
|
4196
4213
|
] }, S.line)) }) }) })
|
|
4197
4214
|
] }, f.value);
|
|
4198
4215
|
}) });
|
|
4199
|
-
},
|
|
4216
|
+
}, ll = l.div`
|
|
4200
4217
|
display: flex;
|
|
4201
4218
|
align-items: ${(e) => e.$orientation === "vertical" ? "flex-start" : "center"};
|
|
4202
4219
|
flex-direction: ${(e) => e.$orientation === "vertical" ? "column" : "row"};
|
|
4203
|
-
`,
|
|
4220
|
+
`, dl = l.div`
|
|
4204
4221
|
display: flex;
|
|
4205
4222
|
align-items: ${(e) => e.$orientation === "vertical" ? "flex-start" : "center"};
|
|
4206
4223
|
flex-direction: ${(e) => e.$orientation === "vertical" ? "column" : "row"};
|
|
@@ -4209,7 +4226,7 @@ const Cn = (e) => {
|
|
|
4209
4226
|
&:last-child {
|
|
4210
4227
|
flex: 0;
|
|
4211
4228
|
}
|
|
4212
|
-
`,
|
|
4229
|
+
`, cl = l.button`
|
|
4213
4230
|
display: flex;
|
|
4214
4231
|
align-items: center;
|
|
4215
4232
|
gap: 10px;
|
|
@@ -4218,7 +4235,7 @@ const Cn = (e) => {
|
|
|
4218
4235
|
background: transparent;
|
|
4219
4236
|
cursor: ${(e) => e.$clickable ? "pointer" : "default"};
|
|
4220
4237
|
flex-shrink: 0;
|
|
4221
|
-
`,
|
|
4238
|
+
`, sl = l.div`
|
|
4222
4239
|
display: flex;
|
|
4223
4240
|
align-items: center;
|
|
4224
4241
|
justify-content: center;
|
|
@@ -4242,13 +4259,13 @@ const Cn = (e) => {
|
|
|
4242
4259
|
border: 2px solid ${i.gray};
|
|
4243
4260
|
color: ${i["iron-grey"]};
|
|
4244
4261
|
`}
|
|
4245
|
-
`,
|
|
4262
|
+
`, pl = l.span`
|
|
4246
4263
|
font-size: 14px;
|
|
4247
4264
|
font-weight: 500;
|
|
4248
4265
|
white-space: nowrap;
|
|
4249
4266
|
color: ${(e) => e.$active || e.$completed ? i.black : i["iron-grey"]};
|
|
4250
4267
|
transition: color 0.2s ease;
|
|
4251
|
-
`,
|
|
4268
|
+
`, gl = l.div`
|
|
4252
4269
|
background-color: ${(e) => e.$completed ? i.black : i.gray};
|
|
4253
4270
|
transition: background-color 0.2s ease;
|
|
4254
4271
|
|
|
@@ -4262,52 +4279,52 @@ const Cn = (e) => {
|
|
|
4262
4279
|
min-width: 16px;
|
|
4263
4280
|
margin: 0 12px;
|
|
4264
4281
|
`}
|
|
4265
|
-
`,
|
|
4282
|
+
`, $e = z("stepper"), jd = ({
|
|
4266
4283
|
className: e,
|
|
4267
4284
|
classnames: t,
|
|
4268
4285
|
onChange: o,
|
|
4269
4286
|
orientation: r = "horizontal",
|
|
4270
4287
|
ref: n,
|
|
4271
|
-
steps:
|
|
4288
|
+
steps: a,
|
|
4272
4289
|
value: s,
|
|
4273
4290
|
...c
|
|
4274
4291
|
}) => {
|
|
4275
|
-
const p =
|
|
4292
|
+
const p = ye(() => a.findIndex((u) => u.value === s), [a, s]);
|
|
4276
4293
|
return /* @__PURE__ */ d(
|
|
4277
|
-
|
|
4294
|
+
ll,
|
|
4278
4295
|
{
|
|
4279
4296
|
...c,
|
|
4280
4297
|
ref: n,
|
|
4281
4298
|
$orientation: r,
|
|
4282
|
-
className:
|
|
4283
|
-
children:
|
|
4284
|
-
const h = u.value === s, x = g < p, f = g ===
|
|
4285
|
-
return /* @__PURE__ */ m(
|
|
4299
|
+
className: $e("container", e),
|
|
4300
|
+
children: a.map((u, g) => {
|
|
4301
|
+
const h = u.value === s, x = g < p, f = g === a.length - 1;
|
|
4302
|
+
return /* @__PURE__ */ m(dl, { $orientation: r, children: [
|
|
4286
4303
|
/* @__PURE__ */ m(
|
|
4287
|
-
|
|
4304
|
+
cl,
|
|
4288
4305
|
{
|
|
4289
4306
|
type: "button",
|
|
4290
4307
|
$active: h,
|
|
4291
4308
|
$completed: x,
|
|
4292
4309
|
$clickable: !!o,
|
|
4293
4310
|
onClick: () => o == null ? void 0 : o(u.value),
|
|
4294
|
-
className:
|
|
4311
|
+
className: $e("step", t == null ? void 0 : t.step),
|
|
4295
4312
|
children: [
|
|
4296
4313
|
/* @__PURE__ */ d(
|
|
4297
|
-
|
|
4314
|
+
sl,
|
|
4298
4315
|
{
|
|
4299
4316
|
$active: h,
|
|
4300
4317
|
$completed: x,
|
|
4301
|
-
className:
|
|
4318
|
+
className: $e("circle", t == null ? void 0 : t.circle),
|
|
4302
4319
|
children: g + 1
|
|
4303
4320
|
}
|
|
4304
4321
|
),
|
|
4305
4322
|
/* @__PURE__ */ d(
|
|
4306
|
-
|
|
4323
|
+
pl,
|
|
4307
4324
|
{
|
|
4308
4325
|
$active: h,
|
|
4309
4326
|
$completed: x,
|
|
4310
|
-
className:
|
|
4327
|
+
className: $e("label", t == null ? void 0 : t.label),
|
|
4311
4328
|
children: u.label
|
|
4312
4329
|
}
|
|
4313
4330
|
)
|
|
@@ -4315,22 +4332,22 @@ const Cn = (e) => {
|
|
|
4315
4332
|
}
|
|
4316
4333
|
),
|
|
4317
4334
|
!f && /* @__PURE__ */ d(
|
|
4318
|
-
|
|
4335
|
+
gl,
|
|
4319
4336
|
{
|
|
4320
4337
|
$completed: x,
|
|
4321
4338
|
$orientation: r,
|
|
4322
|
-
className:
|
|
4339
|
+
className: $e("line", t == null ? void 0 : t.line)
|
|
4323
4340
|
}
|
|
4324
4341
|
)
|
|
4325
4342
|
] }, u.value);
|
|
4326
4343
|
})
|
|
4327
4344
|
}
|
|
4328
4345
|
);
|
|
4329
|
-
},
|
|
4346
|
+
}, ul = l.div`
|
|
4330
4347
|
display: flex;
|
|
4331
4348
|
align-items: center;
|
|
4332
4349
|
gap: 6px;
|
|
4333
|
-
`,
|
|
4350
|
+
`, hl = l.button`
|
|
4334
4351
|
padding: 6px 16px;
|
|
4335
4352
|
border: none;
|
|
4336
4353
|
border-radius: 12px;
|
|
@@ -4348,90 +4365,90 @@ const Cn = (e) => {
|
|
|
4348
4365
|
&:hover:not(:disabled) {
|
|
4349
4366
|
background-color: ${(e) => e.$active ? i.gray : "rgba(0, 0, 0, 0.05)"};
|
|
4350
4367
|
}
|
|
4351
|
-
`,
|
|
4352
|
-
|
|
4368
|
+
`, St = z("tabs"), Hd = ({ className: e, classnames: t, onChange: o, ref: r, tabs: n, value: a, ...s }) => /* @__PURE__ */ d(ul, { ...s, ref: r, className: St("container", e), role: "tablist", children: n.map((c) => /* @__PURE__ */ d(
|
|
4369
|
+
hl,
|
|
4353
4370
|
{
|
|
4354
4371
|
type: "button",
|
|
4355
4372
|
role: "tab",
|
|
4356
|
-
"aria-selected":
|
|
4357
|
-
$active:
|
|
4373
|
+
"aria-selected": a === c.value,
|
|
4374
|
+
$active: a === c.value,
|
|
4358
4375
|
$disabled: !!c.disabled,
|
|
4359
4376
|
disabled: c.disabled,
|
|
4360
4377
|
onClick: () => o(c.value),
|
|
4361
|
-
className:
|
|
4378
|
+
className: St("tab", t == null ? void 0 : t.tab),
|
|
4362
4379
|
children: c.label
|
|
4363
4380
|
},
|
|
4364
4381
|
c.value
|
|
4365
|
-
)) }),
|
|
4382
|
+
)) }), fl = l.div`
|
|
4366
4383
|
display: flex;
|
|
4367
4384
|
flex-direction: column;
|
|
4368
|
-
`,
|
|
4385
|
+
`, xl = l.div`
|
|
4369
4386
|
display: grid;
|
|
4370
4387
|
grid-template-columns: 20px 1fr;
|
|
4371
4388
|
gap: 0 12px;
|
|
4372
|
-
`,
|
|
4389
|
+
`, bl = l.div`
|
|
4373
4390
|
display: flex;
|
|
4374
4391
|
flex-direction: column;
|
|
4375
4392
|
align-items: center;
|
|
4376
4393
|
grid-row: 1 / -1;
|
|
4377
|
-
`,
|
|
4394
|
+
`, $l = l.div`
|
|
4378
4395
|
width: 10px;
|
|
4379
4396
|
height: 10px;
|
|
4380
4397
|
border-radius: 50%;
|
|
4381
4398
|
background-color: ${i.black};
|
|
4382
4399
|
flex-shrink: 0;
|
|
4383
4400
|
margin-top: 5px;
|
|
4384
|
-
`,
|
|
4401
|
+
`, yl = l.div`
|
|
4385
4402
|
width: 2px;
|
|
4386
4403
|
flex: 1;
|
|
4387
4404
|
background-color: ${i.gray};
|
|
4388
4405
|
visibility: ${(e) => e.$last ? "hidden" : "visible"};
|
|
4389
|
-
`,
|
|
4406
|
+
`, ml = l.div`
|
|
4390
4407
|
padding-bottom: ${(e) => e.$last ? "0" : "24px"};
|
|
4391
4408
|
min-width: 0;
|
|
4392
|
-
`,
|
|
4409
|
+
`, vl = l.div`
|
|
4393
4410
|
display: flex;
|
|
4394
4411
|
align-items: flex-start;
|
|
4395
4412
|
justify-content: space-between;
|
|
4396
4413
|
gap: 8px;
|
|
4397
|
-
`,
|
|
4414
|
+
`, wl = l.div`
|
|
4398
4415
|
font-size: 15px;
|
|
4399
4416
|
font-weight: 600;
|
|
4400
4417
|
color: ${i.black};
|
|
4401
4418
|
line-height: 20px;
|
|
4402
4419
|
min-width: 0;
|
|
4403
|
-
`,
|
|
4420
|
+
`, Sl = l.div`
|
|
4404
4421
|
display: flex;
|
|
4405
4422
|
align-items: center;
|
|
4406
4423
|
gap: 4px;
|
|
4407
4424
|
flex-shrink: 0;
|
|
4408
|
-
`,
|
|
4425
|
+
`, kl = l.div`
|
|
4409
4426
|
font-size: 13px;
|
|
4410
4427
|
color: ${i["iron-grey"]};
|
|
4411
4428
|
margin-top: 2px;
|
|
4412
4429
|
line-height: 1.4;
|
|
4413
|
-
`,
|
|
4430
|
+
`, zl = l.div`
|
|
4414
4431
|
font-size: 14px;
|
|
4415
4432
|
color: ${i["iron-grey"]};
|
|
4416
4433
|
margin-top: 8px;
|
|
4417
4434
|
line-height: 1.5;
|
|
4418
|
-
`, V = z("timeline"),
|
|
4435
|
+
`, V = z("timeline"), Xd = ({ className: e, classnames: t, items: o, ref: r, ...n }) => /* @__PURE__ */ d(fl, { ...n, ref: r, className: V("container", e), children: o.map((a, s) => {
|
|
4419
4436
|
const c = s === o.length - 1;
|
|
4420
|
-
return /* @__PURE__ */ m(
|
|
4421
|
-
/* @__PURE__ */ m(
|
|
4422
|
-
/* @__PURE__ */ d(
|
|
4423
|
-
/* @__PURE__ */ d(
|
|
4437
|
+
return /* @__PURE__ */ m(xl, { className: V("item", t == null ? void 0 : t.item), children: [
|
|
4438
|
+
/* @__PURE__ */ m(bl, { $last: c, children: [
|
|
4439
|
+
/* @__PURE__ */ d($l, { className: V("dot", t == null ? void 0 : t.dot) }),
|
|
4440
|
+
/* @__PURE__ */ d(yl, { className: V("line", t == null ? void 0 : t.line), $last: c })
|
|
4424
4441
|
] }),
|
|
4425
|
-
/* @__PURE__ */ m(
|
|
4426
|
-
/* @__PURE__ */ m(
|
|
4427
|
-
/* @__PURE__ */ d(
|
|
4428
|
-
|
|
4442
|
+
/* @__PURE__ */ m(ml, { className: V("content", t == null ? void 0 : t.content), $last: c, children: [
|
|
4443
|
+
/* @__PURE__ */ m(vl, { children: [
|
|
4444
|
+
/* @__PURE__ */ d(wl, { className: V("title", t == null ? void 0 : t.title), children: a.title }),
|
|
4445
|
+
a.actions && /* @__PURE__ */ d(Sl, { className: V("actions", t == null ? void 0 : t.actions), children: a.actions })
|
|
4429
4446
|
] }),
|
|
4430
|
-
|
|
4431
|
-
|
|
4447
|
+
a.description && /* @__PURE__ */ d(kl, { className: V("description", t == null ? void 0 : t.description), children: a.description }),
|
|
4448
|
+
a.content && /* @__PURE__ */ d(zl, { className: V("body", t == null ? void 0 : t.body), children: a.content })
|
|
4432
4449
|
] })
|
|
4433
4450
|
] }, s);
|
|
4434
|
-
}) }),
|
|
4451
|
+
}) }), jt = ke(null), Ze = 3, kt = {
|
|
4435
4452
|
default: {
|
|
4436
4453
|
background: "#374151",
|
|
4437
4454
|
text: i.white,
|
|
@@ -4452,11 +4469,11 @@ const Cn = (e) => {
|
|
|
4452
4469
|
text: i.white,
|
|
4453
4470
|
border: i.red
|
|
4454
4471
|
}
|
|
4455
|
-
},
|
|
4472
|
+
}, El = (e, t) => {
|
|
4456
4473
|
switch (t.type) {
|
|
4457
4474
|
case "ADD_TOAST": {
|
|
4458
4475
|
const o = t.payload;
|
|
4459
|
-
return e.toasts.length <
|
|
4476
|
+
return e.toasts.length < Ze ? {
|
|
4460
4477
|
...e,
|
|
4461
4478
|
toasts: [...e.toasts, o]
|
|
4462
4479
|
} : {
|
|
@@ -4465,8 +4482,8 @@ const Cn = (e) => {
|
|
|
4465
4482
|
};
|
|
4466
4483
|
}
|
|
4467
4484
|
case "REMOVE_TOAST": {
|
|
4468
|
-
const o = t.payload, r = e.toasts.filter((
|
|
4469
|
-
return n && r.length <
|
|
4485
|
+
const o = t.payload, r = e.toasts.filter((a) => a.id !== o), n = e.queue[0];
|
|
4486
|
+
return n && r.length < Ze ? {
|
|
4470
4487
|
toasts: [...r, n],
|
|
4471
4488
|
queue: e.queue.slice(1)
|
|
4472
4489
|
} : {
|
|
@@ -4476,7 +4493,7 @@ const Cn = (e) => {
|
|
|
4476
4493
|
}
|
|
4477
4494
|
case "SHOW_NEXT_FROM_QUEUE": {
|
|
4478
4495
|
const o = e.queue[0];
|
|
4479
|
-
return !o || e.toasts.length >=
|
|
4496
|
+
return !o || e.toasts.length >= Ze ? e : {
|
|
4480
4497
|
toasts: [...e.toasts, o],
|
|
4481
4498
|
queue: e.queue.slice(1)
|
|
4482
4499
|
};
|
|
@@ -4484,10 +4501,10 @@ const Cn = (e) => {
|
|
|
4484
4501
|
default:
|
|
4485
4502
|
return e;
|
|
4486
4503
|
}
|
|
4487
|
-
},
|
|
4504
|
+
}, Nl = {
|
|
4488
4505
|
toasts: [],
|
|
4489
4506
|
queue: []
|
|
4490
|
-
},
|
|
4507
|
+
}, Ge = (e) => kt[e] ?? kt.default, Cl = l.div`
|
|
4491
4508
|
position: fixed;
|
|
4492
4509
|
bottom: 24px;
|
|
4493
4510
|
left: 24px;
|
|
@@ -4498,30 +4515,30 @@ const Cn = (e) => {
|
|
|
4498
4515
|
pointer-events: none;
|
|
4499
4516
|
width: auto;
|
|
4500
4517
|
max-width: 90vw;
|
|
4501
|
-
`,
|
|
4518
|
+
`, Il = l.div`
|
|
4502
4519
|
display: flex;
|
|
4503
4520
|
align-items: center;
|
|
4504
4521
|
justify-content: space-between;
|
|
4505
4522
|
gap: 12px;
|
|
4506
4523
|
min-height: 32px;
|
|
4507
4524
|
padding: 8px 8px 8px 16px;
|
|
4508
|
-
background-color: ${({ $variant: e }) =>
|
|
4509
|
-
color: ${({ $variant: e }) =>
|
|
4510
|
-
border: 1px solid ${({ $variant: e }) =>
|
|
4525
|
+
background-color: ${({ $variant: e }) => Ge(e).background};
|
|
4526
|
+
color: ${({ $variant: e }) => Ge(e).text};
|
|
4527
|
+
border: 1px solid ${({ $variant: e }) => Ge(e).border};
|
|
4511
4528
|
border-radius: 96px;
|
|
4512
4529
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
4513
4530
|
animation: ${({ $isExiting: e }) => e ? Z.slideOutBottomFade : Z.slideInBottomFade}
|
|
4514
4531
|
0.3s ease-out;
|
|
4515
4532
|
pointer-events: auto;
|
|
4516
4533
|
max-width: 500px;
|
|
4517
|
-
`,
|
|
4534
|
+
`, Tl = l.span`
|
|
4518
4535
|
font-size: 14px;
|
|
4519
4536
|
font-weight: 500;
|
|
4520
4537
|
line-height: 1.4;
|
|
4521
4538
|
white-space: nowrap;
|
|
4522
4539
|
overflow: hidden;
|
|
4523
4540
|
text-overflow: ellipsis;
|
|
4524
|
-
`,
|
|
4541
|
+
`, Ll = l.button`
|
|
4525
4542
|
display: flex;
|
|
4526
4543
|
align-items: center;
|
|
4527
4544
|
justify-content: center;
|
|
@@ -4539,13 +4556,13 @@ const Cn = (e) => {
|
|
|
4539
4556
|
&:hover {
|
|
4540
4557
|
opacity: 1;
|
|
4541
4558
|
}
|
|
4542
|
-
`,
|
|
4559
|
+
`, Rl = l.div`
|
|
4543
4560
|
display: flex;
|
|
4544
4561
|
align-items: center;
|
|
4545
4562
|
justify-content: space-between;
|
|
4546
4563
|
gap: 12px;
|
|
4547
4564
|
width: 100%;
|
|
4548
|
-
`,
|
|
4565
|
+
`, Al = l.div`
|
|
4549
4566
|
display: flex;
|
|
4550
4567
|
align-items: center;
|
|
4551
4568
|
justify-content: center;
|
|
@@ -4560,7 +4577,7 @@ const Cn = (e) => {
|
|
|
4560
4577
|
font-weight: 500;
|
|
4561
4578
|
white-space: nowrap;
|
|
4562
4579
|
margin-left: auto;
|
|
4563
|
-
`,
|
|
4580
|
+
`, zt = ({ toast: e, onHide: t }) => {
|
|
4564
4581
|
const [o, r] = L(!1), n = () => {
|
|
4565
4582
|
r(!0), setTimeout(() => {
|
|
4566
4583
|
t(e.id);
|
|
@@ -4568,57 +4585,57 @@ const Cn = (e) => {
|
|
|
4568
4585
|
};
|
|
4569
4586
|
return G(() => {
|
|
4570
4587
|
if (e.duration) {
|
|
4571
|
-
const
|
|
4588
|
+
const a = setTimeout(() => {
|
|
4572
4589
|
n();
|
|
4573
4590
|
}, e.duration);
|
|
4574
|
-
return () => clearTimeout(
|
|
4591
|
+
return () => clearTimeout(a);
|
|
4575
4592
|
}
|
|
4576
|
-
}, [e.duration, e.id]), /* @__PURE__ */ m(
|
|
4577
|
-
/* @__PURE__ */ d(
|
|
4578
|
-
/* @__PURE__ */ d(
|
|
4593
|
+
}, [e.duration, e.id]), /* @__PURE__ */ m(Il, { $variant: e.variant, $isExiting: o, children: [
|
|
4594
|
+
/* @__PURE__ */ d(Tl, { children: e.message }),
|
|
4595
|
+
/* @__PURE__ */ d(Ll, { onClick: n, children: /* @__PURE__ */ d(Nt, { style: { width: 16, height: 16 } }) })
|
|
4579
4596
|
] });
|
|
4580
|
-
},
|
|
4597
|
+
}, Pl = ({ toasts: e, queueCount: t, onHide: o }) => {
|
|
4581
4598
|
if (e.length === 0)
|
|
4582
4599
|
return null;
|
|
4583
4600
|
const r = e.length - 1;
|
|
4584
|
-
return /* @__PURE__ */ d(
|
|
4585
|
-
/* @__PURE__ */ d(
|
|
4586
|
-
/* @__PURE__ */ m(
|
|
4601
|
+
return /* @__PURE__ */ d(Cl, { children: e.map((n, a) => a === r && t > 0 ? /* @__PURE__ */ m(Rl, { children: [
|
|
4602
|
+
/* @__PURE__ */ d(zt, { toast: n, onHide: o }),
|
|
4603
|
+
/* @__PURE__ */ m(Al, { children: [
|
|
4587
4604
|
"+",
|
|
4588
4605
|
t
|
|
4589
4606
|
] })
|
|
4590
|
-
] }, n.id) : /* @__PURE__ */ d(
|
|
4591
|
-
},
|
|
4592
|
-
const [t, o] =
|
|
4593
|
-
(
|
|
4607
|
+
] }, n.id) : /* @__PURE__ */ d(zt, { toast: n, onHide: o }, n.id)) });
|
|
4608
|
+
}, Yd = ({ children: e }) => {
|
|
4609
|
+
const [t, o] = Lt(El, Nl), r = E(
|
|
4610
|
+
(a, s = "default", c) => {
|
|
4594
4611
|
const p = `toast-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
|
|
4595
4612
|
o({
|
|
4596
4613
|
type: "ADD_TOAST",
|
|
4597
4614
|
payload: {
|
|
4598
4615
|
id: p,
|
|
4599
|
-
message:
|
|
4616
|
+
message: a,
|
|
4600
4617
|
variant: s,
|
|
4601
4618
|
duration: c
|
|
4602
4619
|
}
|
|
4603
4620
|
});
|
|
4604
4621
|
},
|
|
4605
4622
|
[]
|
|
4606
|
-
), n = E((
|
|
4623
|
+
), n = E((a) => {
|
|
4607
4624
|
o({
|
|
4608
4625
|
type: "REMOVE_TOAST",
|
|
4609
|
-
payload:
|
|
4626
|
+
payload: a
|
|
4610
4627
|
});
|
|
4611
4628
|
}, []);
|
|
4612
|
-
return /* @__PURE__ */ m(
|
|
4629
|
+
return /* @__PURE__ */ m(jt.Provider, { value: { show: r, hide: n }, children: [
|
|
4613
4630
|
e,
|
|
4614
|
-
/* @__PURE__ */ d(
|
|
4631
|
+
/* @__PURE__ */ d(Pl, { toasts: t.toasts, queueCount: t.queue.length, onHide: n })
|
|
4615
4632
|
] });
|
|
4616
|
-
},
|
|
4617
|
-
const e =
|
|
4633
|
+
}, Wd = () => {
|
|
4634
|
+
const e = ze(jt);
|
|
4618
4635
|
if (!e)
|
|
4619
4636
|
throw new Error("useToastr must be used within ToastProvider");
|
|
4620
4637
|
return e;
|
|
4621
|
-
},
|
|
4638
|
+
}, Et = {
|
|
4622
4639
|
dark: {
|
|
4623
4640
|
background: i.black,
|
|
4624
4641
|
text: i.white
|
|
@@ -4640,8 +4657,8 @@ const Cn = (e) => {
|
|
|
4640
4657
|
background: i.red,
|
|
4641
4658
|
text: i.white
|
|
4642
4659
|
}
|
|
4643
|
-
},
|
|
4644
|
-
const o =
|
|
4660
|
+
}, ve = (e) => Et[e] ?? Et.dark, Bl = (e, t) => {
|
|
4661
|
+
const o = ve(t).background;
|
|
4645
4662
|
switch (e) {
|
|
4646
4663
|
case "top":
|
|
4647
4664
|
return `
|
|
@@ -4674,9 +4691,9 @@ const Cn = (e) => {
|
|
|
4674
4691
|
default:
|
|
4675
4692
|
return "";
|
|
4676
4693
|
}
|
|
4677
|
-
},
|
|
4694
|
+
}, _l = (e, t) => {
|
|
4678
4695
|
if (t !== "light") return "";
|
|
4679
|
-
const o =
|
|
4696
|
+
const o = ve(t).border;
|
|
4680
4697
|
switch (e) {
|
|
4681
4698
|
case "top":
|
|
4682
4699
|
return `
|
|
@@ -4717,11 +4734,10 @@ const Cn = (e) => {
|
|
|
4717
4734
|
default:
|
|
4718
4735
|
return "";
|
|
4719
4736
|
}
|
|
4720
|
-
},
|
|
4721
|
-
z-index: 1000;
|
|
4737
|
+
}, Ht = (e) => `
|
|
4722
4738
|
padding: 6px 12px;
|
|
4723
|
-
background-color: ${
|
|
4724
|
-
color: ${
|
|
4739
|
+
background-color: ${ve(e.$variant).background};
|
|
4740
|
+
color: ${ve(e.$variant).text};
|
|
4725
4741
|
font-size: 13px;
|
|
4726
4742
|
line-height: 1.4;
|
|
4727
4743
|
border-radius: 6px;
|
|
@@ -4735,7 +4751,7 @@ const Cn = (e) => {
|
|
|
4735
4751
|
transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
|
|
4736
4752
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
|
|
4737
4753
|
|
|
4738
|
-
${e.$variant === "light" ? `border: 1px solid ${
|
|
4754
|
+
${e.$variant === "light" ? `border: 1px solid ${ve(e.$variant).border};` : ""}
|
|
4739
4755
|
|
|
4740
4756
|
&::before {
|
|
4741
4757
|
content: '';
|
|
@@ -4743,7 +4759,7 @@ const Cn = (e) => {
|
|
|
4743
4759
|
width: 0;
|
|
4744
4760
|
height: 0;
|
|
4745
4761
|
border: 6px solid transparent;
|
|
4746
|
-
${
|
|
4762
|
+
${Bl(e.$placement, e.$variant)}
|
|
4747
4763
|
}
|
|
4748
4764
|
|
|
4749
4765
|
${e.$variant === "light" ? `
|
|
@@ -4756,12 +4772,12 @@ const Cn = (e) => {
|
|
|
4756
4772
|
}
|
|
4757
4773
|
` : ""}
|
|
4758
4774
|
|
|
4759
|
-
${
|
|
4760
|
-
`,
|
|
4775
|
+
${_l(e.$placement, e.$variant)}
|
|
4776
|
+
`, Ml = l.div`
|
|
4761
4777
|
position: relative;
|
|
4762
4778
|
display: inline-block;
|
|
4763
4779
|
width: fit-content;
|
|
4764
|
-
`,
|
|
4780
|
+
`, Dl = (e) => {
|
|
4765
4781
|
switch (e) {
|
|
4766
4782
|
case "top":
|
|
4767
4783
|
return `
|
|
@@ -4790,31 +4806,33 @@ const Cn = (e) => {
|
|
|
4790
4806
|
default:
|
|
4791
4807
|
return "";
|
|
4792
4808
|
}
|
|
4793
|
-
},
|
|
4809
|
+
}, Fl = l.div`
|
|
4794
4810
|
position: absolute;
|
|
4795
|
-
${
|
|
4796
|
-
${(
|
|
4797
|
-
|
|
4811
|
+
z-index: ${ae.dropdown};
|
|
4812
|
+
${(e) => Ht(e)}
|
|
4813
|
+
${({ $placement: e }) => Dl(e)}
|
|
4814
|
+
`, Ol = l.div`
|
|
4798
4815
|
position: fixed;
|
|
4799
|
-
${
|
|
4800
|
-
|
|
4816
|
+
z-index: ${ae.portalDropdown};
|
|
4817
|
+
${(e) => Ht(e)}
|
|
4818
|
+
`, Ke = z("tooltip"), oe = 8, Ud = ({
|
|
4801
4819
|
children: e,
|
|
4802
4820
|
className: t,
|
|
4803
4821
|
classnames: o,
|
|
4804
4822
|
content: r,
|
|
4805
4823
|
delay: n = 200,
|
|
4806
|
-
placement:
|
|
4824
|
+
placement: a = "top",
|
|
4807
4825
|
portalRenderNode: s,
|
|
4808
4826
|
ref: c,
|
|
4809
4827
|
variant: p = "dark",
|
|
4810
4828
|
...u
|
|
4811
4829
|
}) => {
|
|
4812
|
-
const [g, h] = L(!1), [x, f] = L(null), [y, b] = L(
|
|
4830
|
+
const [g, h] = L(!1), [x, f] = L(null), [y, b] = L(a), [$, v] = L({ top: 0, left: 0 }), w = B(null), S = B(null), I = E(() => {
|
|
4813
4831
|
var K, Q;
|
|
4814
4832
|
if (!w.current) return;
|
|
4815
4833
|
const N = w.current.getBoundingClientRect(), R = ((K = S.current) == null ? void 0 : K.offsetWidth) ?? 100, k = ((Q = S.current) == null ? void 0 : Q.offsetHeight) ?? 30, _ = N.top - oe, P = window.innerHeight - N.bottom - oe, j = N.left - oe, q = window.innerWidth - N.right - oe;
|
|
4816
|
-
let H =
|
|
4817
|
-
if (
|
|
4834
|
+
let H = a;
|
|
4835
|
+
if (a === "top" && _ < k && P > _ ? H = "bottom" : a === "bottom" && P < k && _ > P ? H = "top" : a === "left" && j < R && q > j ? H = "right" : a === "right" && q < R && j > q && (H = "left"), b(H), s) {
|
|
4818
4836
|
let X, Y;
|
|
4819
4837
|
switch (H) {
|
|
4820
4838
|
case "top":
|
|
@@ -4835,8 +4853,8 @@ const Cn = (e) => {
|
|
|
4835
4853
|
const J = 8;
|
|
4836
4854
|
Y = Math.max(J, Math.min(Y, window.innerWidth - R - J)), X = Math.max(J, Math.min(X, window.innerHeight - k - J)), v({ top: X, left: Y });
|
|
4837
4855
|
}
|
|
4838
|
-
}, [
|
|
4839
|
-
|
|
4856
|
+
}, [a, s]);
|
|
4857
|
+
Tt(() => {
|
|
4840
4858
|
g && I();
|
|
4841
4859
|
}, [g, I]);
|
|
4842
4860
|
const A = () => {
|
|
@@ -4846,12 +4864,12 @@ const Cn = (e) => {
|
|
|
4846
4864
|
f(N);
|
|
4847
4865
|
}, T = () => {
|
|
4848
4866
|
x && (clearTimeout(x), f(null)), h(!1);
|
|
4849
|
-
}, C = s ?
|
|
4867
|
+
}, C = s ? tt(
|
|
4850
4868
|
/* @__PURE__ */ d(
|
|
4851
|
-
|
|
4869
|
+
Ol,
|
|
4852
4870
|
{
|
|
4853
4871
|
ref: S,
|
|
4854
|
-
className:
|
|
4872
|
+
className: Ke("content", o == null ? void 0 : o.content),
|
|
4855
4873
|
$placement: y,
|
|
4856
4874
|
$variant: p,
|
|
4857
4875
|
$visible: g,
|
|
@@ -4861,10 +4879,10 @@ const Cn = (e) => {
|
|
|
4861
4879
|
),
|
|
4862
4880
|
s
|
|
4863
4881
|
) : /* @__PURE__ */ d(
|
|
4864
|
-
|
|
4882
|
+
Fl,
|
|
4865
4883
|
{
|
|
4866
4884
|
ref: S,
|
|
4867
|
-
className:
|
|
4885
|
+
className: Ke("content", o == null ? void 0 : o.content),
|
|
4868
4886
|
$placement: y,
|
|
4869
4887
|
$variant: p,
|
|
4870
4888
|
$visible: g,
|
|
@@ -4872,13 +4890,13 @@ const Cn = (e) => {
|
|
|
4872
4890
|
}
|
|
4873
4891
|
);
|
|
4874
4892
|
return /* @__PURE__ */ m(
|
|
4875
|
-
|
|
4893
|
+
Ml,
|
|
4876
4894
|
{
|
|
4877
4895
|
...u,
|
|
4878
4896
|
ref: (N) => {
|
|
4879
4897
|
w.current = N, typeof c == "function" ? c(N) : c && (c.current = N);
|
|
4880
4898
|
},
|
|
4881
|
-
className:
|
|
4899
|
+
className: Ke("wrapper", t),
|
|
4882
4900
|
onMouseEnter: A,
|
|
4883
4901
|
onMouseLeave: T,
|
|
4884
4902
|
children: [
|
|
@@ -4887,146 +4905,147 @@ const Cn = (e) => {
|
|
|
4887
4905
|
]
|
|
4888
4906
|
}
|
|
4889
4907
|
);
|
|
4890
|
-
},
|
|
4908
|
+
}, jl = l.div`
|
|
4891
4909
|
display: inline-flex;
|
|
4892
4910
|
align-items: center;
|
|
4893
4911
|
gap: 12px;
|
|
4894
4912
|
flex-direction: ${({ $reverse: e }) => e ? "row-reverse" : "row"};
|
|
4895
|
-
`,
|
|
4913
|
+
`, Hl = l.div`
|
|
4896
4914
|
display: flex;
|
|
4897
4915
|
flex-direction: column;
|
|
4898
4916
|
text-align: ${({ $align: e }) => e};
|
|
4899
|
-
`,
|
|
4917
|
+
`, Xl = l.span`
|
|
4900
4918
|
font-size: 14px;
|
|
4901
4919
|
font-weight: 600;
|
|
4902
4920
|
line-height: 1.4;
|
|
4903
|
-
`,
|
|
4921
|
+
`, Yl = l.span`
|
|
4904
4922
|
font-size: 12px;
|
|
4905
4923
|
color: #666;
|
|
4906
4924
|
line-height: 1.4;
|
|
4907
|
-
`,
|
|
4925
|
+
`, Me = z("user"), qd = ({
|
|
4908
4926
|
avatarPosition: e = "left",
|
|
4909
4927
|
avatarProps: t,
|
|
4910
4928
|
className: o,
|
|
4911
4929
|
classnames: r,
|
|
4912
4930
|
description: n,
|
|
4913
|
-
name:
|
|
4931
|
+
name: a,
|
|
4914
4932
|
ref: s,
|
|
4915
4933
|
src: c,
|
|
4916
4934
|
...p
|
|
4917
4935
|
}) => {
|
|
4918
4936
|
const u = e === "right";
|
|
4919
|
-
return /* @__PURE__ */ m(
|
|
4937
|
+
return /* @__PURE__ */ m(jl, { ...p, ref: s, className: Me("container", o), $reverse: u, children: [
|
|
4920
4938
|
/* @__PURE__ */ d(
|
|
4921
|
-
|
|
4939
|
+
yo,
|
|
4922
4940
|
{
|
|
4923
4941
|
size: "sm",
|
|
4924
4942
|
...t,
|
|
4925
|
-
name: typeof
|
|
4943
|
+
name: typeof a == "string" ? a : void 0,
|
|
4926
4944
|
src: c ?? (t == null ? void 0 : t.src),
|
|
4927
|
-
className:
|
|
4945
|
+
className: Me("avatar", r == null ? void 0 : r.avatar)
|
|
4928
4946
|
}
|
|
4929
4947
|
),
|
|
4930
|
-
/* @__PURE__ */ m(
|
|
4931
|
-
/* @__PURE__ */ d(
|
|
4932
|
-
n && /* @__PURE__ */ d(
|
|
4948
|
+
/* @__PURE__ */ m(Hl, { $align: u ? "right" : "left", children: [
|
|
4949
|
+
/* @__PURE__ */ d(Xl, { className: Me("name", r == null ? void 0 : r.name), children: a }),
|
|
4950
|
+
n && /* @__PURE__ */ d(Yl, { className: Me("description", r == null ? void 0 : r.description), children: n })
|
|
4933
4951
|
] })
|
|
4934
4952
|
] });
|
|
4935
4953
|
};
|
|
4936
4954
|
export {
|
|
4937
|
-
|
|
4938
|
-
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
|
|
4944
|
-
|
|
4945
|
-
|
|
4946
|
-
|
|
4955
|
+
td as Accordion,
|
|
4956
|
+
od as Alert,
|
|
4957
|
+
dc as Autocomplete,
|
|
4958
|
+
yo as Avatar,
|
|
4959
|
+
rd as AvatarGroup,
|
|
4960
|
+
se as BREAKPOINTS,
|
|
4961
|
+
nd as Badge,
|
|
4962
|
+
id as BreadcrumbItem,
|
|
4963
|
+
ad as Breadcrumbs,
|
|
4964
|
+
we as Button,
|
|
4947
4965
|
i as COLORS,
|
|
4948
|
-
|
|
4949
|
-
|
|
4950
|
-
|
|
4951
|
-
|
|
4952
|
-
|
|
4953
|
-
|
|
4954
|
-
|
|
4955
|
-
|
|
4956
|
-
|
|
4957
|
-
|
|
4958
|
-
|
|
4959
|
-
|
|
4960
|
-
|
|
4961
|
-
|
|
4962
|
-
|
|
4963
|
-
|
|
4964
|
-
|
|
4965
|
-
|
|
4966
|
-
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
|
|
4971
|
-
|
|
4972
|
-
|
|
4973
|
-
|
|
4966
|
+
ld as Card,
|
|
4967
|
+
dd as CardBody,
|
|
4968
|
+
cd as CardFooter,
|
|
4969
|
+
sd as CardHeader,
|
|
4970
|
+
cc as Checkbox,
|
|
4971
|
+
sc as CheckboxCard,
|
|
4972
|
+
pc as CheckboxGroup,
|
|
4973
|
+
gc as Chip,
|
|
4974
|
+
pd as ConfirmationProvider,
|
|
4975
|
+
ud as Container,
|
|
4976
|
+
uc as DatePicker,
|
|
4977
|
+
hd as DateRange,
|
|
4978
|
+
fd as Divider,
|
|
4979
|
+
xd as Drawer,
|
|
4980
|
+
bd as Dropdown,
|
|
4981
|
+
$d as EmptyState,
|
|
4982
|
+
hc as FieldLabel,
|
|
4983
|
+
fc as FieldMessage,
|
|
4984
|
+
yd as FieldRow,
|
|
4985
|
+
md as FileUpload,
|
|
4986
|
+
vd as FileUploadItem,
|
|
4987
|
+
ed as GlobalStyle,
|
|
4988
|
+
wd as Hashtag,
|
|
4989
|
+
Sd as Heading,
|
|
4990
|
+
kd as ImageCropper,
|
|
4991
|
+
xc as Input,
|
|
4974
4992
|
Z as KEYFRAMES,
|
|
4975
|
-
|
|
4976
|
-
|
|
4977
|
-
|
|
4978
|
-
|
|
4979
|
-
|
|
4980
|
-
|
|
4981
|
-
|
|
4982
|
-
|
|
4983
|
-
|
|
4984
|
-
|
|
4985
|
-
|
|
4986
|
-
|
|
4987
|
-
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
|
|
4993
|
-
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
|
|
5001
|
-
|
|
5002
|
-
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
|
|
5006
|
-
|
|
5007
|
-
|
|
5008
|
-
|
|
5009
|
-
|
|
5010
|
-
|
|
4993
|
+
Gd as KEY_SYMBOLS,
|
|
4994
|
+
bc as KeySymbol,
|
|
4995
|
+
$c as KeysBindings,
|
|
4996
|
+
zd as MenuButton,
|
|
4997
|
+
yc as Modal,
|
|
4998
|
+
mc as MultiSelect,
|
|
4999
|
+
Ed as NotificationProvider,
|
|
5000
|
+
Cd as NotifyConfirmationProvider,
|
|
5001
|
+
vc as OtpCode,
|
|
5002
|
+
Td as Overline,
|
|
5003
|
+
Rd as Pagination,
|
|
5004
|
+
Ad as Panel,
|
|
5005
|
+
Pd as PendingScreen,
|
|
5006
|
+
Bd as Progress,
|
|
5007
|
+
wc as Radio,
|
|
5008
|
+
Sc as RadioCard,
|
|
5009
|
+
kc as RadioGroup,
|
|
5010
|
+
_d as SaveProgressProvider,
|
|
5011
|
+
zc as Select,
|
|
5012
|
+
Ld as ShellScreen,
|
|
5013
|
+
Dd as Skeleton,
|
|
5014
|
+
qt as Spinner,
|
|
5015
|
+
Na as SplitFlapText,
|
|
5016
|
+
Fd as Stat,
|
|
5017
|
+
Od as StepLog,
|
|
5018
|
+
jd as Stepper,
|
|
5019
|
+
Hd as Tabs,
|
|
5020
|
+
Ec as Tags,
|
|
5021
|
+
Nc as Textarea,
|
|
5022
|
+
Xd as Timeline,
|
|
5023
|
+
Yd as ToastProvider,
|
|
5024
|
+
Cc as Toggle,
|
|
5025
|
+
Ic as ToggleCard,
|
|
5026
|
+
Tc as ToggleGroup,
|
|
5027
|
+
Ud as Tooltip,
|
|
5028
|
+
qd as User,
|
|
5029
|
+
ae as Z_INDEX,
|
|
5011
5030
|
O as alpha,
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
|
|
5016
|
-
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
-
|
|
5031
|
+
Lc as formatDateGo,
|
|
5032
|
+
Er as formatFileSize,
|
|
5033
|
+
Kd as getBrowser,
|
|
5034
|
+
Qd as getKeySymbols,
|
|
5035
|
+
Jd as getOperatingSystem,
|
|
5036
|
+
ec as isValid,
|
|
5037
|
+
nc as mediaBetween,
|
|
5038
|
+
ic as mediaDown,
|
|
5039
|
+
pe as mediaUp,
|
|
5021
5040
|
z as newClassNameGetter,
|
|
5022
|
-
|
|
5023
|
-
|
|
5024
|
-
|
|
5025
|
-
|
|
5026
|
-
|
|
5027
|
-
|
|
5028
|
-
|
|
5029
|
-
|
|
5030
|
-
|
|
5041
|
+
tc as toHEX,
|
|
5042
|
+
gd as useConfirmation,
|
|
5043
|
+
gi as useImageCropper,
|
|
5044
|
+
oc as useKeyBinding,
|
|
5045
|
+
Nd as useNotification,
|
|
5046
|
+
Id as useNotifyConfirmation,
|
|
5047
|
+
Md as useSaveProgress,
|
|
5048
|
+
Wd as useToastr,
|
|
5049
|
+
ac as validation
|
|
5031
5050
|
};
|
|
5032
5051
|
//# sourceMappingURL=index.js.map
|