@rpcbase/ui 0.113.0 → 0.114.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ImagesField/index.d.ts.map +1 -1
- package/dist/index.js +432 -419
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as I from "react";
|
|
2
|
-
import Se, { useState as ae, useEffect as
|
|
2
|
+
import Se, { useState as ae, useEffect as te, useRef as J, useMemo as se, useLayoutEffect as $s, useCallback as fe, createContext as an, memo as vl, useReducer as $l, useContext as St, forwardRef as Ui, cloneElement as yl, Component as Cl, Fragment as Si } from "react";
|
|
3
3
|
import Qi, { clsx as Il } from "clsx";
|
|
4
4
|
import * as Et from "@radix-ui/react-dialog";
|
|
5
5
|
import { XIcon as xl, Plus as Do, X as ys, Maximize2 as Al, Loader2 as Sl } from "lucide-react";
|
|
@@ -70,7 +70,7 @@ const qr = /* @__PURE__ */ new Map(), Ll = (e) => {
|
|
|
70
70
|
return qr.set(n, i), i;
|
|
71
71
|
}, kl = (e, t) => {
|
|
72
72
|
const [n, r] = ae(null);
|
|
73
|
-
return
|
|
73
|
+
return te(() => {
|
|
74
74
|
if (typeof window > "u")
|
|
75
75
|
return;
|
|
76
76
|
let i = !1;
|
|
@@ -113,7 +113,7 @@ function Wl() {
|
|
|
113
113
|
function e($) {
|
|
114
114
|
if ($ == null) return null;
|
|
115
115
|
if (typeof $ == "function")
|
|
116
|
-
return $.$$typeof ===
|
|
116
|
+
return $.$$typeof === V ? null : $.displayName || $.name || null;
|
|
117
117
|
if (typeof $ == "string") return $;
|
|
118
118
|
switch ($) {
|
|
119
119
|
case b:
|
|
@@ -144,7 +144,7 @@ function Wl() {
|
|
|
144
144
|
return $ = $.displayName, $ || ($ = P.displayName || P.name || "", $ = $ !== "" ? "ForwardRef(" + $ + ")" : "ForwardRef"), $;
|
|
145
145
|
case N:
|
|
146
146
|
return P = $.displayName || null, P !== null ? P : e($.type) || "Memo";
|
|
147
|
-
case
|
|
147
|
+
case L:
|
|
148
148
|
P = $._payload, $ = $._init;
|
|
149
149
|
try {
|
|
150
150
|
return e($(P));
|
|
@@ -165,17 +165,17 @@ function Wl() {
|
|
|
165
165
|
}
|
|
166
166
|
if (P) {
|
|
167
167
|
P = console;
|
|
168
|
-
var T = P.error,
|
|
168
|
+
var T = P.error, _ = typeof Symbol == "function" && Symbol.toStringTag && $[Symbol.toStringTag] || $.constructor.name || "Object";
|
|
169
169
|
return T.call(
|
|
170
170
|
P,
|
|
171
171
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
172
|
-
|
|
172
|
+
_
|
|
173
173
|
), t($);
|
|
174
174
|
}
|
|
175
175
|
}
|
|
176
176
|
function r($) {
|
|
177
177
|
if ($ === b) return "<>";
|
|
178
|
-
if (typeof $ == "object" && $ !== null && $.$$typeof ===
|
|
178
|
+
if (typeof $ == "object" && $ !== null && $.$$typeof === L)
|
|
179
179
|
return "<...>";
|
|
180
180
|
try {
|
|
181
181
|
var P = e($);
|
|
@@ -200,7 +200,7 @@ function Wl() {
|
|
|
200
200
|
}
|
|
201
201
|
function u($, P) {
|
|
202
202
|
function T() {
|
|
203
|
-
|
|
203
|
+
D || (D = !0, console.error(
|
|
204
204
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
205
205
|
P
|
|
206
206
|
));
|
|
@@ -212,18 +212,18 @@ function Wl() {
|
|
|
212
212
|
}
|
|
213
213
|
function s() {
|
|
214
214
|
var $ = e(this.type);
|
|
215
|
-
return
|
|
215
|
+
return j[$] || (j[$] = !0, console.error(
|
|
216
216
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
217
217
|
)), $ = this.props.ref, $ !== void 0 ? $ : null;
|
|
218
218
|
}
|
|
219
|
-
function l($, P, T,
|
|
219
|
+
function l($, P, T, _, H, ee) {
|
|
220
220
|
var q = T.ref;
|
|
221
221
|
return $ = {
|
|
222
222
|
$$typeof: h,
|
|
223
223
|
type: $,
|
|
224
224
|
key: P,
|
|
225
225
|
props: T,
|
|
226
|
-
_owner:
|
|
226
|
+
_owner: _
|
|
227
227
|
}, (q !== void 0 ? q : null) !== null ? Object.defineProperty($, "ref", {
|
|
228
228
|
enumerable: !1,
|
|
229
229
|
get: s
|
|
@@ -249,13 +249,13 @@ function Wl() {
|
|
|
249
249
|
value: ee
|
|
250
250
|
}), Object.freeze && (Object.freeze($.props), Object.freeze($)), $;
|
|
251
251
|
}
|
|
252
|
-
function d($, P, T,
|
|
252
|
+
function d($, P, T, _, H, ee) {
|
|
253
253
|
var q = P.children;
|
|
254
254
|
if (q !== void 0)
|
|
255
|
-
if (
|
|
255
|
+
if (_)
|
|
256
256
|
if (R(q)) {
|
|
257
|
-
for (
|
|
258
|
-
c(q[
|
|
257
|
+
for (_ = 0; _ < q.length; _++)
|
|
258
|
+
c(q[_]);
|
|
259
259
|
Object.freeze && Object.freeze(q);
|
|
260
260
|
} else
|
|
261
261
|
console.error(
|
|
@@ -264,21 +264,21 @@ function Wl() {
|
|
|
264
264
|
else c(q);
|
|
265
265
|
if (K.call(P, "key")) {
|
|
266
266
|
q = e($);
|
|
267
|
-
var ie = Object.keys(P).filter(function(
|
|
268
|
-
return
|
|
267
|
+
var ie = Object.keys(P).filter(function(ne) {
|
|
268
|
+
return ne !== "key";
|
|
269
269
|
});
|
|
270
|
-
|
|
270
|
+
_ = 0 < ie.length ? "{key: someKey, " + ie.join(": ..., ") + ": ...}" : "{key: someKey}", U[q + _] || (ie = 0 < ie.length ? "{" + ie.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
271
271
|
`A props object containing a "key" prop is being spread into JSX:
|
|
272
272
|
let props = %s;
|
|
273
273
|
<%s {...props} />
|
|
274
274
|
React keys must be passed directly to JSX without using spread:
|
|
275
275
|
let props = %s;
|
|
276
276
|
<%s key={someKey} {...props} />`,
|
|
277
|
-
|
|
277
|
+
_,
|
|
278
278
|
q,
|
|
279
279
|
ie,
|
|
280
280
|
q
|
|
281
|
-
), U[q +
|
|
281
|
+
), U[q + _] = !0);
|
|
282
282
|
}
|
|
283
283
|
if (q = null, T !== void 0 && (n(T), q = "" + T), a(P) && (n(P.key), q = "" + P.key), "key" in P) {
|
|
284
284
|
T = {};
|
|
@@ -298,12 +298,12 @@ React keys must be passed directly to JSX without using spread:
|
|
|
298
298
|
);
|
|
299
299
|
}
|
|
300
300
|
function c($) {
|
|
301
|
-
f($) ? $._store && ($._store.validated = 1) : typeof $ == "object" && $ !== null && $.$$typeof ===
|
|
301
|
+
f($) ? $._store && ($._store.validated = 1) : typeof $ == "object" && $ !== null && $.$$typeof === L && ($._payload.status === "fulfilled" ? f($._payload.value) && $._payload.value._store && ($._payload.value._store.validated = 1) : $._store && ($._store.validated = 1));
|
|
302
302
|
}
|
|
303
303
|
function f($) {
|
|
304
304
|
return typeof $ == "object" && $ !== null && $.$$typeof === h;
|
|
305
305
|
}
|
|
306
|
-
var g = Se, h = Symbol.for("react.transitional.element"), p = Symbol.for("react.portal"), b = Symbol.for("react.fragment"), m = Symbol.for("react.strict_mode"), y = Symbol.for("react.profiler"), C = Symbol.for("react.consumer"), S = Symbol.for("react.context"), v = Symbol.for("react.forward_ref"), E = Symbol.for("react.suspense"), A = Symbol.for("react.suspense_list"), N = Symbol.for("react.memo"),
|
|
306
|
+
var g = Se, h = Symbol.for("react.transitional.element"), p = Symbol.for("react.portal"), b = Symbol.for("react.fragment"), m = Symbol.for("react.strict_mode"), y = Symbol.for("react.profiler"), C = Symbol.for("react.consumer"), S = Symbol.for("react.context"), v = Symbol.for("react.forward_ref"), E = Symbol.for("react.suspense"), A = Symbol.for("react.suspense_list"), N = Symbol.for("react.memo"), L = Symbol.for("react.lazy"), G = Symbol.for("react.activity"), V = Symbol.for("react.client.reference"), X = g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, K = Object.prototype.hasOwnProperty, R = Array.isArray, k = console.createTask ? console.createTask : function() {
|
|
307
307
|
return null;
|
|
308
308
|
};
|
|
309
309
|
g = {
|
|
@@ -311,29 +311,29 @@ React keys must be passed directly to JSX without using spread:
|
|
|
311
311
|
return $();
|
|
312
312
|
}
|
|
313
313
|
};
|
|
314
|
-
var
|
|
314
|
+
var D, j = {}, O = g.react_stack_bottom_frame.bind(
|
|
315
315
|
g,
|
|
316
316
|
o
|
|
317
|
-
)(), M =
|
|
317
|
+
)(), M = k(r(o)), U = {};
|
|
318
318
|
mn.Fragment = b, mn.jsx = function($, P, T) {
|
|
319
|
-
var
|
|
319
|
+
var _ = 1e4 > X.recentlyCreatedOwnerStacks++;
|
|
320
320
|
return d(
|
|
321
321
|
$,
|
|
322
322
|
P,
|
|
323
323
|
T,
|
|
324
324
|
!1,
|
|
325
|
-
|
|
326
|
-
|
|
325
|
+
_ ? Error("react-stack-top-frame") : O,
|
|
326
|
+
_ ? k(r($)) : M
|
|
327
327
|
);
|
|
328
328
|
}, mn.jsxs = function($, P, T) {
|
|
329
|
-
var
|
|
329
|
+
var _ = 1e4 > X.recentlyCreatedOwnerStacks++;
|
|
330
330
|
return d(
|
|
331
331
|
$,
|
|
332
332
|
P,
|
|
333
333
|
T,
|
|
334
334
|
!0,
|
|
335
|
-
|
|
336
|
-
|
|
335
|
+
_ ? Error("react-stack-top-frame") : O,
|
|
336
|
+
_ ? k(r($)) : M
|
|
337
337
|
);
|
|
338
338
|
};
|
|
339
339
|
})()), mn;
|
|
@@ -430,31 +430,31 @@ const _l = /* @__PURE__ */ new Set([
|
|
|
430
430
|
locationRestriction: d,
|
|
431
431
|
allowedTypes: c
|
|
432
432
|
}) => {
|
|
433
|
-
const [f, g] = ae(r ?? ""), [h, p] = ae([]), [b, m] = ae(!1), [y, C] = ae(-1), S = J(null), v = J(null), E = J(!1), A = J(!1), N = J(null),
|
|
433
|
+
const [f, g] = ae(r ?? ""), [h, p] = ae([]), [b, m] = ae(!1), [y, C] = ae(-1), S = J(null), v = J(null), E = J(!1), A = J(!1), N = J(null), L = J([]), G = J("smooth"), V = kl("places", l), X = se(() => {
|
|
434
434
|
if (!c)
|
|
435
435
|
return _l;
|
|
436
|
-
const
|
|
436
|
+
const O = /* @__PURE__ */ new Set();
|
|
437
437
|
for (const M of c)
|
|
438
|
-
|
|
439
|
-
return
|
|
438
|
+
O.add(M);
|
|
439
|
+
return O;
|
|
440
440
|
}, [c]);
|
|
441
|
-
|
|
441
|
+
te(() => {
|
|
442
442
|
g(r ?? ""), A.current = !1;
|
|
443
|
-
}, [r]),
|
|
443
|
+
}, [r]), te(() => {
|
|
444
444
|
if (E.current) {
|
|
445
445
|
E.current = !1;
|
|
446
446
|
return;
|
|
447
447
|
}
|
|
448
|
-
let
|
|
448
|
+
let O = !0;
|
|
449
449
|
const M = setTimeout(() => {
|
|
450
|
-
if (!
|
|
450
|
+
if (!O)
|
|
451
451
|
return;
|
|
452
452
|
if (f.trim() === "") {
|
|
453
453
|
p([]), m(!1), N.current = null, r !== "" && i("");
|
|
454
454
|
return;
|
|
455
455
|
}
|
|
456
|
-
if (!
|
|
457
|
-
const { AutocompleteSuggestion: $, AutocompleteSessionToken: P } =
|
|
456
|
+
if (!V) return;
|
|
457
|
+
const { AutocompleteSuggestion: $, AutocompleteSessionToken: P } = V;
|
|
458
458
|
if (!$ || !P) {
|
|
459
459
|
console.error("AddressAutocompleteInput: missing AutocompleteSuggestion or AutocompleteSessionToken exports"), p([]), m(!1);
|
|
460
460
|
return;
|
|
@@ -466,69 +466,69 @@ const _l = /* @__PURE__ */ new Set([
|
|
|
466
466
|
locationRestriction: d,
|
|
467
467
|
includedRegionCodes: ["fr"]
|
|
468
468
|
};
|
|
469
|
-
$.fetchAutocompleteSuggestions(T).then((
|
|
470
|
-
if (!
|
|
469
|
+
$.fetchAutocompleteSuggestions(T).then((_) => {
|
|
470
|
+
if (!O)
|
|
471
471
|
return;
|
|
472
|
-
const H =
|
|
472
|
+
const H = _.suggestions.map((re) => re.placePrediction).filter((re) => !!re), ee = Ql(H, X), q = ee[0], ie = q && ee.length === 1 && Kl(q, f);
|
|
473
473
|
if (!A.current && ie) {
|
|
474
474
|
p(ee), m(!1);
|
|
475
475
|
return;
|
|
476
476
|
}
|
|
477
477
|
ee.length > 0 ? (p(ee), A.current && m(!0), C(-1)) : (p([]), m(!1));
|
|
478
|
-
}).catch((
|
|
479
|
-
|
|
478
|
+
}).catch((_) => {
|
|
479
|
+
O && (console.error("AddressAutocompleteInput: suggestion fetch failed", _), p([]), m(!1));
|
|
480
480
|
});
|
|
481
481
|
}, 300);
|
|
482
482
|
return () => {
|
|
483
|
-
|
|
483
|
+
O = !1, clearTimeout(M);
|
|
484
484
|
};
|
|
485
|
-
}, [f,
|
|
486
|
-
const
|
|
485
|
+
}, [f, V, i, r, d, X]), te(() => {
|
|
486
|
+
const O = (M) => {
|
|
487
487
|
S.current && !S.current.contains(M.target) && v.current && !v.current.contains(M.target) && m(!1);
|
|
488
488
|
};
|
|
489
|
-
return document.addEventListener("mousedown",
|
|
490
|
-
document.removeEventListener("mousedown",
|
|
489
|
+
return document.addEventListener("mousedown", O), () => {
|
|
490
|
+
document.removeEventListener("mousedown", O);
|
|
491
491
|
};
|
|
492
492
|
}, []);
|
|
493
|
-
const K = (
|
|
493
|
+
const K = (O) => {
|
|
494
494
|
E.current = !0;
|
|
495
|
-
const M = eo(
|
|
495
|
+
const M = eo(O);
|
|
496
496
|
g(M), i(M), p([]), m(!1), N.current = null;
|
|
497
|
-
}, R = (
|
|
498
|
-
A.current = !0, g(
|
|
499
|
-
},
|
|
497
|
+
}, R = (O) => {
|
|
498
|
+
A.current = !0, g(O.target.value);
|
|
499
|
+
}, k = (O) => {
|
|
500
500
|
if (!b || h.length === 0) {
|
|
501
|
-
|
|
501
|
+
O.key === "Enter" && (O.preventDefault(), i(f), m(!1), N.current = null);
|
|
502
502
|
return;
|
|
503
503
|
}
|
|
504
|
-
|
|
505
|
-
},
|
|
504
|
+
O.key === "ArrowDown" ? (G.current = O.repeat ? "auto" : "smooth", O.preventDefault(), C((M) => h.length === 0 ? -1 : M < 0 ? 0 : (M + 1) % h.length)) : O.key === "ArrowUp" ? (G.current = O.repeat ? "auto" : "smooth", O.preventDefault(), C((M) => h.length === 0 ? -1 : M <= 0 ? h.length - 1 : (M - 1) % h.length)) : O.key === "Enter" ? (O.preventDefault(), y > -1 && h[y] ? K(h[y]) : (i(f), m(!1), N.current = null)) : O.key === "Escape" && m(!1);
|
|
505
|
+
}, D = () => {
|
|
506
506
|
m(!1), r !== f && i(f), N.current = null;
|
|
507
|
-
},
|
|
508
|
-
return
|
|
507
|
+
}, j = s ?? (a ? `${a}_shim` : void 0);
|
|
508
|
+
return te(() => {
|
|
509
509
|
if (!b || y < 0) {
|
|
510
510
|
G.current = "smooth";
|
|
511
511
|
return;
|
|
512
512
|
}
|
|
513
|
-
const
|
|
514
|
-
if (!
|
|
513
|
+
const O = L.current[y], M = v.current;
|
|
514
|
+
if (!O || !M) {
|
|
515
515
|
G.current = "smooth";
|
|
516
516
|
return;
|
|
517
517
|
}
|
|
518
518
|
const U = G.current;
|
|
519
519
|
G.current = "smooth";
|
|
520
|
-
const $ =
|
|
521
|
-
$ >= T && P <=
|
|
520
|
+
const $ = O.offsetTop, P = $ + O.offsetHeight, T = M.scrollTop, _ = T + M.clientHeight;
|
|
521
|
+
$ >= T && P <= _ || O.scrollIntoView({
|
|
522
522
|
block: "nearest",
|
|
523
523
|
behavior: U
|
|
524
524
|
});
|
|
525
|
-
}, [y, b]),
|
|
526
|
-
|
|
525
|
+
}, [y, b]), L.current.length = h.length, /* @__PURE__ */ x.jsxs("div", { className: "relative", children: [
|
|
526
|
+
j && /* @__PURE__ */ x.jsx(
|
|
527
527
|
"input",
|
|
528
528
|
{
|
|
529
529
|
tabIndex: -1,
|
|
530
530
|
autoComplete: "street-address",
|
|
531
|
-
name:
|
|
531
|
+
name: j,
|
|
532
532
|
"aria-hidden": "true",
|
|
533
533
|
className: "pointer-events-none absolute left-0 top-0 h-0 w-0 opacity-0"
|
|
534
534
|
}
|
|
@@ -544,11 +544,11 @@ const _l = /* @__PURE__ */ new Set([
|
|
|
544
544
|
name: a ?? `${e}_input`,
|
|
545
545
|
value: f,
|
|
546
546
|
onChange: R,
|
|
547
|
-
onKeyDown:
|
|
547
|
+
onKeyDown: k,
|
|
548
548
|
onFocus: () => {
|
|
549
549
|
h.length > 0 && f && m(!0);
|
|
550
550
|
},
|
|
551
|
-
onBlur:
|
|
551
|
+
onBlur: D,
|
|
552
552
|
disabled: o,
|
|
553
553
|
autoComplete: "off",
|
|
554
554
|
className: Re("w-full", u)
|
|
@@ -560,11 +560,11 @@ const _l = /* @__PURE__ */ new Set([
|
|
|
560
560
|
ref: v,
|
|
561
561
|
className: "absolute z-10 mt-1 w-full max-h-60 overflow-y-auto rounded-md border border-gray-200 bg-white text-left shadow-lg",
|
|
562
562
|
role: "listbox",
|
|
563
|
-
children: h.map((
|
|
563
|
+
children: h.map((O, M) => /* @__PURE__ */ x.jsx(
|
|
564
564
|
"li",
|
|
565
565
|
{
|
|
566
566
|
ref: (U) => {
|
|
567
|
-
|
|
567
|
+
L.current[M] = U;
|
|
568
568
|
},
|
|
569
569
|
className: Qi(
|
|
570
570
|
"cursor-pointer px-3 py-2 text-sm text-gray-700 hover:bg-gray-100",
|
|
@@ -572,11 +572,11 @@ const _l = /* @__PURE__ */ new Set([
|
|
|
572
572
|
),
|
|
573
573
|
role: "option",
|
|
574
574
|
onMouseDown: (U) => {
|
|
575
|
-
U.preventDefault(), K(
|
|
575
|
+
U.preventDefault(), K(O);
|
|
576
576
|
},
|
|
577
|
-
children: /* @__PURE__ */ x.jsx(Hl, { prediction:
|
|
577
|
+
children: /* @__PURE__ */ x.jsx(Hl, { prediction: O })
|
|
578
578
|
},
|
|
579
|
-
Yl(
|
|
579
|
+
Yl(O, M)
|
|
580
580
|
))
|
|
581
581
|
}
|
|
582
582
|
)
|
|
@@ -830,7 +830,7 @@ const $3 = ({
|
|
|
830
830
|
className: r
|
|
831
831
|
}) => {
|
|
832
832
|
const [i, o] = ae(!1), [a, u] = ae(null), s = J(null);
|
|
833
|
-
|
|
833
|
+
te(() => {
|
|
834
834
|
if (!t) return;
|
|
835
835
|
const [c, f, g] = t, h = ld(g, c, f), p = document.createElement("canvas"), b = p.getContext("2d");
|
|
836
836
|
if (b) {
|
|
@@ -842,7 +842,7 @@ const $3 = ({
|
|
|
842
842
|
);
|
|
843
843
|
b.putImageData(m, 0, 0), u(p.toDataURL());
|
|
844
844
|
}
|
|
845
|
-
}, [t]),
|
|
845
|
+
}, [t]), te(() => {
|
|
846
846
|
s.current && s.current.complete && o(!0);
|
|
847
847
|
}, [e]);
|
|
848
848
|
const l = () => {
|
|
@@ -934,7 +934,7 @@ function xs(e) {
|
|
|
934
934
|
function un(e) {
|
|
935
935
|
return e ? sn(e) ? e.document : to(e) ? no(e) ? e : _n(e) || xs(e) ? e.ownerDocument : document : document : document;
|
|
936
936
|
}
|
|
937
|
-
const mt = Lr ? $s :
|
|
937
|
+
const mt = Lr ? $s : te;
|
|
938
938
|
function Vr(e) {
|
|
939
939
|
const t = J(e);
|
|
940
940
|
return mt(() => {
|
|
@@ -983,7 +983,7 @@ function Ir(e) {
|
|
|
983
983
|
}
|
|
984
984
|
function xr(e) {
|
|
985
985
|
const t = J();
|
|
986
|
-
return
|
|
986
|
+
return te(() => {
|
|
987
987
|
t.current = e;
|
|
988
988
|
}, [e]), t.current;
|
|
989
989
|
}
|
|
@@ -1155,7 +1155,7 @@ function vd() {
|
|
|
1155
1155
|
const Ss = /* @__PURE__ */ an(null);
|
|
1156
1156
|
function $d(e) {
|
|
1157
1157
|
const t = St(Ss);
|
|
1158
|
-
|
|
1158
|
+
te(() => {
|
|
1159
1159
|
if (!t)
|
|
1160
1160
|
throw new Error("useDndMonitor must be used within a children of <DndContext>");
|
|
1161
1161
|
return t(e);
|
|
@@ -1219,7 +1219,7 @@ function xd(e) {
|
|
|
1219
1219
|
announce: o,
|
|
1220
1220
|
announcement: a
|
|
1221
1221
|
} = vd(), u = Zn("DndLiveRegion"), [s, l] = ae(!1);
|
|
1222
|
-
if (
|
|
1222
|
+
if (te(() => {
|
|
1223
1223
|
l(!0);
|
|
1224
1224
|
}, []), $d(se(() => ({
|
|
1225
1225
|
onDragStart(c) {
|
|
@@ -1894,31 +1894,31 @@ class io {
|
|
|
1894
1894
|
} = Gs(p), A = Xd(p), N = {
|
|
1895
1895
|
x: Math.min(b === oe.Right ? A.right - A.width / 2 : A.right, Math.max(b === oe.Right ? A.left : A.left + A.width / 2, c.x)),
|
|
1896
1896
|
y: Math.min(b === oe.Down ? A.bottom - A.height / 2 : A.bottom, Math.max(b === oe.Down ? A.top : A.top + A.height / 2, c.y))
|
|
1897
|
-
},
|
|
1898
|
-
if (
|
|
1899
|
-
const
|
|
1897
|
+
}, L = b === oe.Right && !y || b === oe.Left && !C, G = b === oe.Down && !S || b === oe.Up && !m;
|
|
1898
|
+
if (L && N.x !== c.x) {
|
|
1899
|
+
const V = p.scrollLeft + f.x, X = b === oe.Right && V <= v.x || b === oe.Left && V >= E.x;
|
|
1900
1900
|
if (X && !f.y) {
|
|
1901
1901
|
p.scrollTo({
|
|
1902
|
-
left:
|
|
1902
|
+
left: V,
|
|
1903
1903
|
behavior: u
|
|
1904
1904
|
});
|
|
1905
1905
|
return;
|
|
1906
1906
|
}
|
|
1907
|
-
X ? g.x = p.scrollLeft -
|
|
1907
|
+
X ? g.x = p.scrollLeft - V : g.x = b === oe.Right ? p.scrollLeft - v.x : p.scrollLeft - E.x, g.x && p.scrollBy({
|
|
1908
1908
|
left: -g.x,
|
|
1909
1909
|
behavior: u
|
|
1910
1910
|
});
|
|
1911
1911
|
break;
|
|
1912
1912
|
} else if (G && N.y !== c.y) {
|
|
1913
|
-
const
|
|
1913
|
+
const V = p.scrollTop + f.y, X = b === oe.Down && V <= v.y || b === oe.Up && V >= E.y;
|
|
1914
1914
|
if (X && !f.x) {
|
|
1915
1915
|
p.scrollTo({
|
|
1916
|
-
top:
|
|
1916
|
+
top: V,
|
|
1917
1917
|
behavior: u
|
|
1918
1918
|
});
|
|
1919
1919
|
return;
|
|
1920
1920
|
}
|
|
1921
|
-
X ? g.y = p.scrollTop -
|
|
1921
|
+
X ? g.y = p.scrollTop - V : g.y = b === oe.Down ? p.scrollTop - v.y : p.scrollTop - E.y, g.y && p.scrollBy({
|
|
1922
1922
|
top: -g.y,
|
|
1923
1923
|
behavior: u
|
|
1924
1924
|
});
|
|
@@ -2245,7 +2245,7 @@ function Kd(e) {
|
|
|
2245
2245
|
const A = b.current.x * m.current.x, N = b.current.y * m.current.y;
|
|
2246
2246
|
E.scrollBy(A, N);
|
|
2247
2247
|
}, []), v = se(() => u === Er.TreeOrder ? [...l].reverse() : l, [u, l]);
|
|
2248
|
-
|
|
2248
|
+
te(
|
|
2249
2249
|
() => {
|
|
2250
2250
|
if (!o || !l.length || !y) {
|
|
2251
2251
|
p();
|
|
@@ -2258,13 +2258,13 @@ function Kd(e) {
|
|
|
2258
2258
|
if (!N)
|
|
2259
2259
|
continue;
|
|
2260
2260
|
const {
|
|
2261
|
-
direction:
|
|
2261
|
+
direction: L,
|
|
2262
2262
|
speed: G
|
|
2263
2263
|
} = kd(E, N, y, t, f);
|
|
2264
|
-
for (const
|
|
2265
|
-
g[
|
|
2264
|
+
for (const V of ["x", "y"])
|
|
2265
|
+
g[V][L[V]] || (G[V] = 0, L[V] = 0);
|
|
2266
2266
|
if (G.x > 0 || G.y > 0) {
|
|
2267
|
-
p(), C.current = E, h(S, a), b.current = G, m.current =
|
|
2267
|
+
p(), C.current = E, h(S, a), b.current = G, m.current = L;
|
|
2268
2268
|
return;
|
|
2269
2269
|
}
|
|
2270
2270
|
}
|
|
@@ -2390,21 +2390,21 @@ function rc(e, t) {
|
|
|
2390
2390
|
}
|
|
2391
2391
|
return m;
|
|
2392
2392
|
}, [e, o, n, c, s]);
|
|
2393
|
-
return
|
|
2393
|
+
return te(() => {
|
|
2394
2394
|
d.current = e;
|
|
2395
|
-
}, [e]),
|
|
2395
|
+
}, [e]), te(
|
|
2396
2396
|
() => {
|
|
2397
2397
|
c || g();
|
|
2398
2398
|
},
|
|
2399
2399
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2400
2400
|
[n, c]
|
|
2401
|
-
),
|
|
2401
|
+
), te(
|
|
2402
2402
|
() => {
|
|
2403
2403
|
o && o.length > 0 && a(null);
|
|
2404
2404
|
},
|
|
2405
2405
|
//eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2406
2406
|
[JSON.stringify(o)]
|
|
2407
|
-
),
|
|
2407
|
+
), te(
|
|
2408
2408
|
() => {
|
|
2409
2409
|
c || typeof u != "number" || h.current !== null || (h.current = setTimeout(() => {
|
|
2410
2410
|
g(), h.current = null;
|
|
@@ -2447,7 +2447,7 @@ function oc(e) {
|
|
|
2447
2447
|
} = window;
|
|
2448
2448
|
return new o(r);
|
|
2449
2449
|
}, [r, n]);
|
|
2450
|
-
return
|
|
2450
|
+
return te(() => () => i?.disconnect(), [i]), i;
|
|
2451
2451
|
}
|
|
2452
2452
|
function Wr(e) {
|
|
2453
2453
|
let {
|
|
@@ -2466,7 +2466,7 @@ function Wr(e) {
|
|
|
2466
2466
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2467
2467
|
[n]
|
|
2468
2468
|
);
|
|
2469
|
-
return
|
|
2469
|
+
return te(() => () => i?.disconnect(), [i]), i;
|
|
2470
2470
|
}
|
|
2471
2471
|
function ac(e) {
|
|
2472
2472
|
return new ro(ln(e), e);
|
|
@@ -2517,7 +2517,7 @@ function sc(e) {
|
|
|
2517
2517
|
const Uo = [];
|
|
2518
2518
|
function uc(e) {
|
|
2519
2519
|
const t = J(e), n = Hn((r) => e ? r && r !== Uo && e && t.current && e.parentNode === t.current.parentNode ? r : Xr(e) : Uo, [e]);
|
|
2520
|
-
return
|
|
2520
|
+
return te(() => {
|
|
2521
2521
|
t.current = e;
|
|
2522
2522
|
}, [e]), n;
|
|
2523
2523
|
}
|
|
@@ -2526,7 +2526,7 @@ function lc(e) {
|
|
|
2526
2526
|
const a = ii(o.target);
|
|
2527
2527
|
a && n((u) => u ? (u.set(a, Ni(a)), new Map(u)) : null);
|
|
2528
2528
|
}, []);
|
|
2529
|
-
return
|
|
2529
|
+
return te(() => {
|
|
2530
2530
|
const o = r.current;
|
|
2531
2531
|
if (e !== o) {
|
|
2532
2532
|
a(o);
|
|
@@ -2552,19 +2552,19 @@ function lc(e) {
|
|
|
2552
2552
|
function Qo(e, t) {
|
|
2553
2553
|
t === void 0 && (t = []);
|
|
2554
2554
|
const n = J(null);
|
|
2555
|
-
return
|
|
2555
|
+
return te(
|
|
2556
2556
|
() => {
|
|
2557
2557
|
n.current = null;
|
|
2558
2558
|
},
|
|
2559
2559
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2560
2560
|
t
|
|
2561
|
-
),
|
|
2561
|
+
), te(() => {
|
|
2562
2562
|
const r = e !== vt;
|
|
2563
2563
|
r && !n.current && (n.current = e), !r && n.current && (n.current = null);
|
|
2564
2564
|
}, [e]), n.current ? En(e, n.current) : vt;
|
|
2565
2565
|
}
|
|
2566
2566
|
function dc(e) {
|
|
2567
|
-
|
|
2567
|
+
te(
|
|
2568
2568
|
() => {
|
|
2569
2569
|
if (!Lr)
|
|
2570
2570
|
return;
|
|
@@ -2856,7 +2856,7 @@ function $c(e) {
|
|
|
2856
2856
|
activatorEvent: r,
|
|
2857
2857
|
draggableNodes: i
|
|
2858
2858
|
} = St(Yn), o = xr(r), a = xr(n?.id);
|
|
2859
|
-
return
|
|
2859
|
+
return te(() => {
|
|
2860
2860
|
if (!t && !r && o && a != null) {
|
|
2861
2861
|
if (!kr(o) || document.activeElement === o.target)
|
|
2862
2862
|
return;
|
|
@@ -2973,12 +2973,12 @@ const Ic = /* @__PURE__ */ vl(function(t) {
|
|
|
2973
2973
|
draggable: {
|
|
2974
2974
|
active: A,
|
|
2975
2975
|
nodes: N,
|
|
2976
|
-
translate:
|
|
2976
|
+
translate: L
|
|
2977
2977
|
},
|
|
2978
2978
|
droppable: {
|
|
2979
2979
|
containers: G
|
|
2980
2980
|
}
|
|
2981
|
-
} = b,
|
|
2981
|
+
} = b, V = A != null ? N.get(A) : null, X = J({
|
|
2982
2982
|
initial: null,
|
|
2983
2983
|
translated: null
|
|
2984
2984
|
}), K = se(() => {
|
|
@@ -2986,25 +2986,25 @@ const Ic = /* @__PURE__ */ vl(function(t) {
|
|
|
2986
2986
|
return A != null ? {
|
|
2987
2987
|
id: A,
|
|
2988
2988
|
// It's possible for the active node to unmount while dragging
|
|
2989
|
-
data: (Fe =
|
|
2989
|
+
data: (Fe = V?.data) != null ? Fe : bc,
|
|
2990
2990
|
rect: X
|
|
2991
2991
|
} : null;
|
|
2992
|
-
}, [A,
|
|
2992
|
+
}, [A, V]), R = J(null), [k, D] = ae(null), [j, O] = ae(null), M = Sn(h, Object.values(h)), U = Zn("DndDescribedBy", a), $ = se(() => G.getEnabled(), [G]), P = yc(f), {
|
|
2993
2993
|
droppableRects: T,
|
|
2994
|
-
measureDroppableContainers:
|
|
2994
|
+
measureDroppableContainers: _,
|
|
2995
2995
|
measuringScheduled: H
|
|
2996
2996
|
} = rc($, {
|
|
2997
2997
|
dragging: E,
|
|
2998
|
-
dependencies: [
|
|
2998
|
+
dependencies: [L.x, L.y],
|
|
2999
2999
|
config: P.droppable
|
|
3000
|
-
}), ee = tc(N, A), q = se(() =>
|
|
3000
|
+
}), ee = tc(N, A), q = se(() => j ? Ar(j) : null, [j]), ie = Qn(), re = ic(ee, P.draggable.measure);
|
|
3001
3001
|
Cc({
|
|
3002
3002
|
activeNode: A != null ? N.get(A) : null,
|
|
3003
3003
|
config: ie.layoutShiftCompensation,
|
|
3004
3004
|
initialRect: re,
|
|
3005
3005
|
measure: P.draggable.measure
|
|
3006
3006
|
});
|
|
3007
|
-
const
|
|
3007
|
+
const ne = Jo(ee, P.draggable.measure, re), ye = Jo(ee ? ee.parentElement : null), F = J({
|
|
3008
3008
|
activatorEvent: null,
|
|
3009
3009
|
active: null,
|
|
3010
3010
|
activeNode: ee,
|
|
@@ -3020,16 +3020,16 @@ const Ic = /* @__PURE__ */ vl(function(t) {
|
|
|
3020
3020
|
scrollAdjustedTranslate: null
|
|
3021
3021
|
}), me = G.getNodeFor((n = F.current.over) == null ? void 0 : n.id), ve = gc({
|
|
3022
3022
|
measure: P.dragOverlay.measure
|
|
3023
|
-
}), Pe = (r = ve.nodeRef.current) != null ? r : ee, Xe = E ? (i = ve.rect) != null ? i :
|
|
3023
|
+
}), Pe = (r = ve.nodeRef.current) != null ? r : ee, Xe = E ? (i = ve.rect) != null ? i : ne : null, nt = !!(ve.nodeRef.current && ve.rect), Te = sc(nt ? null : ne), $t = Vs(Pe ? qe(Pe) : null), Ie = uc(E ? me ?? ee : null), ot = fc(Ie), Mt = js(g, {
|
|
3024
3024
|
transform: {
|
|
3025
|
-
x:
|
|
3026
|
-
y:
|
|
3025
|
+
x: L.x - Te.x,
|
|
3026
|
+
y: L.y - Te.y,
|
|
3027
3027
|
scaleX: 1,
|
|
3028
3028
|
scaleY: 1
|
|
3029
3029
|
},
|
|
3030
|
-
activatorEvent:
|
|
3030
|
+
activatorEvent: j,
|
|
3031
3031
|
active: K,
|
|
3032
|
-
activeNodeRect:
|
|
3032
|
+
activeNodeRect: ne,
|
|
3033
3033
|
containerNodeRect: ye,
|
|
3034
3034
|
draggingNodeRect: Xe,
|
|
3035
3035
|
over: F.current.over,
|
|
@@ -3037,13 +3037,13 @@ const Ic = /* @__PURE__ */ vl(function(t) {
|
|
|
3037
3037
|
scrollableAncestors: Ie,
|
|
3038
3038
|
scrollableAncestorRects: ot,
|
|
3039
3039
|
windowRect: $t
|
|
3040
|
-
}), Xt = q ? en(q,
|
|
3040
|
+
}), Xt = q ? en(q, L) : null, Nt = lc(Ie), cn = Qo(Nt), Wt = Qo(Nt, [ne]), ct = en(Mt, cn), B = Xe ? Od(Xe, Mt) : null, ue = K && B ? c({
|
|
3041
3041
|
active: K,
|
|
3042
|
-
collisionRect:
|
|
3042
|
+
collisionRect: B,
|
|
3043
3043
|
droppableRects: T,
|
|
3044
3044
|
droppableContainers: $,
|
|
3045
3045
|
pointerCoordinates: Xt
|
|
3046
|
-
}) : null, $e = ws(ue, "id"), [Ne, at] = ae(null), Ze = nt ? Mt : en(Mt, Wt), wt = Td(Ze, (o = Ne?.rect) != null ? o : null,
|
|
3046
|
+
}) : null, $e = ws(ue, "id"), [Ne, at] = ae(null), Ze = nt ? Mt : en(Mt, Wt), wt = Td(Ze, (o = Ne?.rect) != null ? o : null, ne), Bt = J(null), Un = fe(
|
|
3047
3047
|
(Fe, je) => {
|
|
3048
3048
|
let {
|
|
3049
3049
|
sensor: Ye,
|
|
@@ -3116,7 +3116,7 @@ const Ic = /* @__PURE__ */ vl(function(t) {
|
|
|
3116
3116
|
}), y({
|
|
3117
3117
|
type: "onDragStart",
|
|
3118
3118
|
event: jt
|
|
3119
|
-
}),
|
|
3119
|
+
}), D(Bt.current), O(Je);
|
|
3120
3120
|
});
|
|
3121
3121
|
},
|
|
3122
3122
|
onMove(Oe) {
|
|
@@ -3153,7 +3153,7 @@ const Ic = /* @__PURE__ */ vl(function(t) {
|
|
|
3153
3153
|
R.current = null, nr(() => {
|
|
3154
3154
|
m({
|
|
3155
3155
|
type: Oe
|
|
3156
|
-
}), v(Vt.Uninitialized), at(null),
|
|
3156
|
+
}), v(Vt.Uninitialized), at(null), D(null), O(null), Bt.current = null;
|
|
3157
3157
|
const w = Oe === Ve.DragEnd ? "onDragEnd" : "onDragCancel";
|
|
3158
3158
|
if (pt) {
|
|
3159
3159
|
const W = M.current[w];
|
|
@@ -3185,8 +3185,8 @@ const Ic = /* @__PURE__ */ vl(function(t) {
|
|
|
3185
3185
|
}, R.current = st, Un(Ye, je));
|
|
3186
3186
|
}, [N, Un]), xe = nc(d, fn);
|
|
3187
3187
|
dc(d), mt(() => {
|
|
3188
|
-
|
|
3189
|
-
}, [
|
|
3188
|
+
ne && S === Vt.Initializing && v(Vt.Initialized);
|
|
3189
|
+
}, [ne, S]), te(
|
|
3190
3190
|
() => {
|
|
3191
3191
|
const {
|
|
3192
3192
|
onDragMove: Fe
|
|
@@ -3217,7 +3217,7 @@ const Ic = /* @__PURE__ */ vl(function(t) {
|
|
|
3217
3217
|
},
|
|
3218
3218
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3219
3219
|
[ct.x, ct.y]
|
|
3220
|
-
),
|
|
3220
|
+
), te(
|
|
3221
3221
|
() => {
|
|
3222
3222
|
const {
|
|
3223
3223
|
active: Fe,
|
|
@@ -3256,10 +3256,10 @@ const Ic = /* @__PURE__ */ vl(function(t) {
|
|
|
3256
3256
|
[$e]
|
|
3257
3257
|
), mt(() => {
|
|
3258
3258
|
F.current = {
|
|
3259
|
-
activatorEvent:
|
|
3259
|
+
activatorEvent: j,
|
|
3260
3260
|
active: K,
|
|
3261
3261
|
activeNode: ee,
|
|
3262
|
-
collisionRect:
|
|
3262
|
+
collisionRect: B,
|
|
3263
3263
|
collisions: ue,
|
|
3264
3264
|
droppableRects: T,
|
|
3265
3265
|
draggableNodes: N,
|
|
@@ -3271,12 +3271,12 @@ const Ic = /* @__PURE__ */ vl(function(t) {
|
|
|
3271
3271
|
scrollAdjustedTranslate: ct
|
|
3272
3272
|
}, X.current = {
|
|
3273
3273
|
initial: Xe,
|
|
3274
|
-
translated:
|
|
3274
|
+
translated: B
|
|
3275
3275
|
};
|
|
3276
|
-
}, [K, ee, ue,
|
|
3276
|
+
}, [K, ee, ue, B, N, Pe, Xe, T, G, Ne, Ie, ct]), Kd({
|
|
3277
3277
|
...ie,
|
|
3278
|
-
delta:
|
|
3279
|
-
draggingRect:
|
|
3278
|
+
delta: L,
|
|
3279
|
+
draggingRect: B,
|
|
3280
3280
|
pointerCoordinates: Xt,
|
|
3281
3281
|
scrollableAncestors: Ie,
|
|
3282
3282
|
scrollableAncestorRects: ot
|
|
@@ -3284,8 +3284,8 @@ const Ic = /* @__PURE__ */ vl(function(t) {
|
|
|
3284
3284
|
const yt = se(() => ({
|
|
3285
3285
|
active: K,
|
|
3286
3286
|
activeNode: ee,
|
|
3287
|
-
activeNodeRect:
|
|
3288
|
-
activatorEvent:
|
|
3287
|
+
activeNodeRect: ne,
|
|
3288
|
+
activatorEvent: j,
|
|
3289
3289
|
collisions: ue,
|
|
3290
3290
|
containerNodeRect: ye,
|
|
3291
3291
|
dragOverlay: ve,
|
|
@@ -3293,25 +3293,25 @@ const Ic = /* @__PURE__ */ vl(function(t) {
|
|
|
3293
3293
|
droppableContainers: G,
|
|
3294
3294
|
droppableRects: T,
|
|
3295
3295
|
over: Ne,
|
|
3296
|
-
measureDroppableContainers:
|
|
3296
|
+
measureDroppableContainers: _,
|
|
3297
3297
|
scrollableAncestors: Ie,
|
|
3298
3298
|
scrollableAncestorRects: ot,
|
|
3299
3299
|
measuringConfiguration: P,
|
|
3300
3300
|
measuringScheduled: H,
|
|
3301
3301
|
windowRect: $t
|
|
3302
|
-
}), [K, ee,
|
|
3303
|
-
activatorEvent:
|
|
3302
|
+
}), [K, ee, ne, j, ue, ye, ve, N, G, T, Ne, _, Ie, ot, P, H, $t]), zt = se(() => ({
|
|
3303
|
+
activatorEvent: j,
|
|
3304
3304
|
activators: xe,
|
|
3305
3305
|
active: K,
|
|
3306
|
-
activeNodeRect:
|
|
3306
|
+
activeNodeRect: ne,
|
|
3307
3307
|
ariaDescribedById: {
|
|
3308
3308
|
draggable: U
|
|
3309
3309
|
},
|
|
3310
3310
|
dispatch: m,
|
|
3311
3311
|
draggableNodes: N,
|
|
3312
3312
|
over: Ne,
|
|
3313
|
-
measureDroppableContainers:
|
|
3314
|
-
}), [
|
|
3313
|
+
measureDroppableContainers: _
|
|
3314
|
+
}), [j, xe, K, ne, m, U, N, Ne, _]);
|
|
3315
3315
|
return Se.createElement(Ss.Provider, {
|
|
3316
3316
|
value: C
|
|
3317
3317
|
}, Se.createElement(Yn.Provider, {
|
|
@@ -3327,7 +3327,7 @@ const Ic = /* @__PURE__ */ vl(function(t) {
|
|
|
3327
3327
|
hiddenTextDescribedById: U
|
|
3328
3328
|
}));
|
|
3329
3329
|
function Qn() {
|
|
3330
|
-
const Fe =
|
|
3330
|
+
const Fe = k?.autoScrollEnabled === !1, je = typeof s == "object" ? s.enabled === !1 : s === !1, Ye = E && !Fe && !je;
|
|
3331
3331
|
return typeof s == "object" ? {
|
|
3332
3332
|
...s,
|
|
3333
3333
|
enabled: Ye
|
|
@@ -3364,8 +3364,8 @@ function Sc(e) {
|
|
|
3364
3364
|
activatorNode: S,
|
|
3365
3365
|
data: A
|
|
3366
3366
|
}), () => {
|
|
3367
|
-
const
|
|
3368
|
-
|
|
3367
|
+
const L = c.get(t);
|
|
3368
|
+
L && L.key === o && c.delete(t);
|
|
3369
3369
|
}),
|
|
3370
3370
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3371
3371
|
[c, t]
|
|
@@ -3434,12 +3434,12 @@ function wc(e) {
|
|
|
3434
3434
|
), C = Wr({
|
|
3435
3435
|
callback: y,
|
|
3436
3436
|
disabled: h || !a
|
|
3437
|
-
}), S = fe((N,
|
|
3438
|
-
C && (
|
|
3437
|
+
}), S = fe((N, L) => {
|
|
3438
|
+
C && (L && (C.unobserve(L), c.current = !1), N && C.observe(N));
|
|
3439
3439
|
}, [C]), [v, E] = Ir(S), A = Sn(t);
|
|
3440
|
-
return
|
|
3440
|
+
return te(() => {
|
|
3441
3441
|
!C || !v.current || (C.disconnect(), c.current = !1, C.observe(v.current));
|
|
3442
|
-
}, [v, C]),
|
|
3442
|
+
}, [v, C]), te(
|
|
3443
3443
|
() => (u({
|
|
3444
3444
|
type: Ve.RegisterDroppable,
|
|
3445
3445
|
element: {
|
|
@@ -3457,7 +3457,7 @@ function wc(e) {
|
|
|
3457
3457
|
})),
|
|
3458
3458
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3459
3459
|
[r]
|
|
3460
|
-
),
|
|
3460
|
+
), te(() => {
|
|
3461
3461
|
n !== d.current.disabled && (u({
|
|
3462
3462
|
type: Ve.SetDroppableDisabled,
|
|
3463
3463
|
id: r,
|
|
@@ -3734,24 +3734,24 @@ const Xc = /* @__PURE__ */ Se.memo((e) => {
|
|
|
3734
3734
|
scrollableAncestorRects: S,
|
|
3735
3735
|
transform: E,
|
|
3736
3736
|
windowRect: v
|
|
3737
|
-
}),
|
|
3737
|
+
}), L = so(f), G = Lc({
|
|
3738
3738
|
config: r,
|
|
3739
3739
|
draggableNodes: h,
|
|
3740
3740
|
droppableContainers: p,
|
|
3741
3741
|
measuringConfiguration: y
|
|
3742
|
-
}),
|
|
3742
|
+
}), V = L ? b.setRef : void 0;
|
|
3743
3743
|
return Se.createElement(Tc, null, Se.createElement(Pc, {
|
|
3744
3744
|
animation: G
|
|
3745
3745
|
}, c && A ? Se.createElement(Dc, {
|
|
3746
3746
|
key: A,
|
|
3747
3747
|
id: c.id,
|
|
3748
|
-
ref:
|
|
3748
|
+
ref: V,
|
|
3749
3749
|
as: u,
|
|
3750
3750
|
activatorEvent: d,
|
|
3751
3751
|
adjustScale: t,
|
|
3752
3752
|
className: s,
|
|
3753
3753
|
transition: o,
|
|
3754
|
-
rect:
|
|
3754
|
+
rect: L,
|
|
3755
3755
|
style: {
|
|
3756
3756
|
zIndex: l,
|
|
3757
3757
|
...i
|
|
@@ -3833,7 +3833,7 @@ function Hc(e) {
|
|
|
3833
3833
|
} = _s(), c = Zn(Hs, n), f = u.rect !== null, g = se(() => r.map((E) => typeof E == "object" && "id" in E ? E.id : E), [r]), h = a != null, p = a ? g.indexOf(a.id) : -1, b = l ? g.indexOf(l.id) : -1, m = J(g), y = !jc(g, m.current), C = b !== -1 && p === -1 || y, S = _c(o);
|
|
3834
3834
|
mt(() => {
|
|
3835
3835
|
y && h && d(g);
|
|
3836
|
-
}, [y, g, h, d]),
|
|
3836
|
+
}, [y, g, h, d]), te(() => {
|
|
3837
3837
|
m.current = g;
|
|
3838
3838
|
}, [g]);
|
|
3839
3839
|
const v = se(
|
|
@@ -3910,7 +3910,7 @@ function Qc(e) {
|
|
|
3910
3910
|
}
|
|
3911
3911
|
}
|
|
3912
3912
|
n !== u.current && (u.current = n);
|
|
3913
|
-
}, [t, n, r, i]),
|
|
3913
|
+
}, [t, n, r, i]), te(() => {
|
|
3914
3914
|
o && a(null);
|
|
3915
3915
|
}, [o]), o;
|
|
3916
3916
|
}
|
|
@@ -3946,7 +3946,7 @@ function Kc(e) {
|
|
|
3946
3946
|
}), [c, i, S, d]), E = se(() => d.slice(d.indexOf(a)), [d, a]), {
|
|
3947
3947
|
rect: A,
|
|
3948
3948
|
node: N,
|
|
3949
|
-
isOver:
|
|
3949
|
+
isOver: L,
|
|
3950
3950
|
setNodeRef: G
|
|
3951
3951
|
} = wc({
|
|
3952
3952
|
id: a,
|
|
@@ -3957,14 +3957,14 @@ function Kc(e) {
|
|
|
3957
3957
|
...s
|
|
3958
3958
|
}
|
|
3959
3959
|
}), {
|
|
3960
|
-
active:
|
|
3960
|
+
active: V,
|
|
3961
3961
|
activatorEvent: X,
|
|
3962
3962
|
activeNodeRect: K,
|
|
3963
3963
|
attributes: R,
|
|
3964
|
-
setNodeRef:
|
|
3965
|
-
listeners:
|
|
3966
|
-
isDragging:
|
|
3967
|
-
over:
|
|
3964
|
+
setNodeRef: k,
|
|
3965
|
+
listeners: D,
|
|
3966
|
+
isDragging: j,
|
|
3967
|
+
over: O,
|
|
3968
3968
|
setActivatorNodeRef: M,
|
|
3969
3969
|
transform: U
|
|
3970
3970
|
} = Sc({
|
|
@@ -3975,7 +3975,7 @@ function Kc(e) {
|
|
|
3975
3975
|
...n
|
|
3976
3976
|
},
|
|
3977
3977
|
disabled: C.draggable
|
|
3978
|
-
}), $ = dd(G,
|
|
3978
|
+
}), $ = dd(G, k), P = !!V, T = P && !h && or(f) && or(b), _ = !m && j, H = _ && T ? U : null, q = T ? H ?? (u ?? y)({
|
|
3979
3979
|
rects: p,
|
|
3980
3980
|
activeNodeRect: K,
|
|
3981
3981
|
activeIndex: f,
|
|
@@ -3986,45 +3986,45 @@ function Kc(e) {
|
|
|
3986
3986
|
items: d,
|
|
3987
3987
|
activeIndex: f,
|
|
3988
3988
|
overIndex: b
|
|
3989
|
-
}) : S, re =
|
|
3989
|
+
}) : S, re = V?.id, ne = J({
|
|
3990
3990
|
activeId: re,
|
|
3991
3991
|
items: d,
|
|
3992
3992
|
newIndex: ie,
|
|
3993
3993
|
containerId: c
|
|
3994
|
-
}), ye = d !==
|
|
3995
|
-
active:
|
|
3994
|
+
}), ye = d !== ne.current.items, F = t({
|
|
3995
|
+
active: V,
|
|
3996
3996
|
containerId: c,
|
|
3997
|
-
isDragging:
|
|
3997
|
+
isDragging: j,
|
|
3998
3998
|
isSorting: P,
|
|
3999
3999
|
id: a,
|
|
4000
4000
|
index: S,
|
|
4001
4001
|
items: d,
|
|
4002
|
-
newIndex:
|
|
4003
|
-
previousItems:
|
|
4004
|
-
previousContainerId:
|
|
4002
|
+
newIndex: ne.current.newIndex,
|
|
4003
|
+
previousItems: ne.current.items,
|
|
4004
|
+
previousContainerId: ne.current.containerId,
|
|
4005
4005
|
transition: l,
|
|
4006
|
-
wasDragging:
|
|
4006
|
+
wasDragging: ne.current.activeId != null
|
|
4007
4007
|
}), me = Qc({
|
|
4008
4008
|
disabled: !F,
|
|
4009
4009
|
index: S,
|
|
4010
4010
|
node: N,
|
|
4011
4011
|
rect: A
|
|
4012
4012
|
});
|
|
4013
|
-
return
|
|
4014
|
-
P &&
|
|
4015
|
-
}, [P, ie, c, d]),
|
|
4016
|
-
if (re ===
|
|
4013
|
+
return te(() => {
|
|
4014
|
+
P && ne.current.newIndex !== ie && (ne.current.newIndex = ie), c !== ne.current.containerId && (ne.current.containerId = c), d !== ne.current.items && (ne.current.items = d);
|
|
4015
|
+
}, [P, ie, c, d]), te(() => {
|
|
4016
|
+
if (re === ne.current.activeId)
|
|
4017
4017
|
return;
|
|
4018
|
-
if (re != null &&
|
|
4019
|
-
|
|
4018
|
+
if (re != null && ne.current.activeId == null) {
|
|
4019
|
+
ne.current.activeId = re;
|
|
4020
4020
|
return;
|
|
4021
4021
|
}
|
|
4022
4022
|
const Pe = setTimeout(() => {
|
|
4023
|
-
|
|
4023
|
+
ne.current.activeId = re;
|
|
4024
4024
|
}, 50);
|
|
4025
4025
|
return () => clearTimeout(Pe);
|
|
4026
4026
|
}, [re]), {
|
|
4027
|
-
active:
|
|
4027
|
+
active: V,
|
|
4028
4028
|
activeIndex: f,
|
|
4029
4029
|
attributes: R,
|
|
4030
4030
|
data: v,
|
|
@@ -4032,17 +4032,17 @@ function Kc(e) {
|
|
|
4032
4032
|
index: S,
|
|
4033
4033
|
newIndex: ie,
|
|
4034
4034
|
items: d,
|
|
4035
|
-
isOver:
|
|
4035
|
+
isOver: L,
|
|
4036
4036
|
isSorting: P,
|
|
4037
|
-
isDragging:
|
|
4038
|
-
listeners:
|
|
4037
|
+
isDragging: j,
|
|
4038
|
+
listeners: D,
|
|
4039
4039
|
node: N,
|
|
4040
4040
|
overIndex: b,
|
|
4041
|
-
over:
|
|
4041
|
+
over: O,
|
|
4042
4042
|
setNodeRef: $,
|
|
4043
4043
|
setActivatorNodeRef: M,
|
|
4044
4044
|
setDroppableNodeRef: G,
|
|
4045
|
-
setDraggableNodeRef:
|
|
4045
|
+
setDraggableNodeRef: k,
|
|
4046
4046
|
transform: me ?? q,
|
|
4047
4047
|
transition: ve()
|
|
4048
4048
|
};
|
|
@@ -4050,10 +4050,10 @@ function Kc(e) {
|
|
|
4050
4050
|
if (
|
|
4051
4051
|
// Temporarily disable transitions for a single frame to set up derived transforms
|
|
4052
4052
|
me || // Or to prevent items jumping to back to their "new" position when items change
|
|
4053
|
-
ye &&
|
|
4053
|
+
ye && ne.current.newIndex === S
|
|
4054
4054
|
)
|
|
4055
4055
|
return Jc;
|
|
4056
|
-
if (!(
|
|
4056
|
+
if (!(_ && !kr(X) || !l) && (P || F))
|
|
4057
4057
|
return kt.Transition.toString({
|
|
4058
4058
|
...l,
|
|
4059
4059
|
property: Ys
|
|
@@ -4171,6 +4171,8 @@ function r0({
|
|
|
4171
4171
|
s,
|
|
4172
4172
|
b && "z-20 ring-2 ring-sky-400 shadow-xl",
|
|
4173
4173
|
d && "opacity-0",
|
|
4174
|
+
!l && "cursor-grab active:cursor-grabbing",
|
|
4175
|
+
b && "cursor-grabbing",
|
|
4174
4176
|
l && "cursor-default"
|
|
4175
4177
|
),
|
|
4176
4178
|
onMouseEnter: n,
|
|
@@ -4255,64 +4257,72 @@ function y3({
|
|
|
4255
4257
|
Xo(ao, { activationConstraint: { distance: 6 } }),
|
|
4256
4258
|
Xo(io, { coordinateGetter: t0 })
|
|
4257
4259
|
);
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
|
|
4261
|
-
|
|
4260
|
+
te(() => {
|
|
4261
|
+
if (!(typeof document > "u")) {
|
|
4262
|
+
if (g)
|
|
4263
|
+
return document.body.style.cursor = "grabbing", () => {
|
|
4264
|
+
document.body.style.cursor = "";
|
|
4265
|
+
};
|
|
4266
|
+
document.body.style.cursor = "";
|
|
4267
|
+
}
|
|
4268
|
+
}, [g]), te(() => {
|
|
4269
|
+
const R = e.map((k) => ({
|
|
4270
|
+
...k,
|
|
4271
|
+
previewUrl: k.url,
|
|
4262
4272
|
status: "uploaded",
|
|
4263
4273
|
progress: 100
|
|
4264
4274
|
}));
|
|
4265
|
-
a((
|
|
4275
|
+
a((k) => k.length === R.length && k.every((O, M) => {
|
|
4266
4276
|
const U = R[M];
|
|
4267
|
-
return U &&
|
|
4268
|
-
}) ?
|
|
4269
|
-
}, [e]),
|
|
4277
|
+
return U && O.id === U.id && O.url === U.url && O.alt === U.alt;
|
|
4278
|
+
}) ? k : (b.current = !0, R));
|
|
4279
|
+
}, [e]), te(() => {
|
|
4270
4280
|
if (b.current) {
|
|
4271
4281
|
b.current = !1;
|
|
4272
4282
|
return;
|
|
4273
4283
|
}
|
|
4274
|
-
t?.(o.map(({ id: R, url:
|
|
4275
|
-
}, [o, t]),
|
|
4284
|
+
t?.(o.map(({ id: R, url: k, alt: D }) => ({ id: R, url: k, alt: D })));
|
|
4285
|
+
}, [o, t]), te(() => {
|
|
4276
4286
|
if (l === null)
|
|
4277
4287
|
return;
|
|
4278
|
-
const R = (
|
|
4279
|
-
if (
|
|
4288
|
+
const R = (k) => {
|
|
4289
|
+
if (k.key === "Escape") {
|
|
4280
4290
|
d(null);
|
|
4281
4291
|
return;
|
|
4282
4292
|
}
|
|
4283
|
-
if (
|
|
4284
|
-
d((
|
|
4293
|
+
if (k.key === "ArrowRight") {
|
|
4294
|
+
d((D) => D === null ? D : (D + 1) % o.length);
|
|
4285
4295
|
return;
|
|
4286
4296
|
}
|
|
4287
|
-
|
|
4297
|
+
k.key === "ArrowLeft" && d((D) => D === null ? D : (D - 1 + o.length) % o.length);
|
|
4288
4298
|
};
|
|
4289
4299
|
return window.addEventListener("keydown", R), () => window.removeEventListener("keydown", R);
|
|
4290
4300
|
}, [l, o.length]);
|
|
4291
4301
|
const y = async (R) => {
|
|
4292
4302
|
if (r) return;
|
|
4293
|
-
const
|
|
4294
|
-
const
|
|
4303
|
+
const D = Array.from(R).map((j) => {
|
|
4304
|
+
const O = o0(j), M = crypto.randomUUID(), U = {
|
|
4295
4305
|
id: M,
|
|
4296
|
-
url:
|
|
4297
|
-
previewUrl:
|
|
4298
|
-
alt:
|
|
4306
|
+
url: O,
|
|
4307
|
+
previewUrl: O,
|
|
4308
|
+
alt: j.name,
|
|
4299
4309
|
status: "uploading",
|
|
4300
4310
|
progress: 0,
|
|
4301
|
-
fileName:
|
|
4311
|
+
fileName: j.name
|
|
4302
4312
|
};
|
|
4303
4313
|
a((T) => [...T, U]);
|
|
4304
4314
|
const $ = (T) => {
|
|
4305
4315
|
a(
|
|
4306
|
-
(
|
|
4316
|
+
(_) => _.map(
|
|
4307
4317
|
(H) => H.id === M ? { ...H, progress: T, status: T >= 100 ? "uploaded" : H.status } : H
|
|
4308
4318
|
)
|
|
4309
4319
|
);
|
|
4310
4320
|
};
|
|
4311
4321
|
return (async () => {
|
|
4312
4322
|
try {
|
|
4313
|
-
const T = await n(
|
|
4323
|
+
const T = await n(j, $);
|
|
4314
4324
|
a(
|
|
4315
|
-
(
|
|
4325
|
+
(_) => _.map(
|
|
4316
4326
|
(H) => H.id === M ? {
|
|
4317
4327
|
...H,
|
|
4318
4328
|
...T,
|
|
@@ -4324,39 +4334,42 @@ function y3({
|
|
|
4324
4334
|
)
|
|
4325
4335
|
);
|
|
4326
4336
|
} catch (T) {
|
|
4327
|
-
console.error("Upload failed", T), a((
|
|
4337
|
+
console.error("Upload failed", T), a((_) => _.map((H) => H.id === M ? { ...H, status: "error" } : H));
|
|
4328
4338
|
}
|
|
4329
4339
|
})();
|
|
4330
4340
|
});
|
|
4331
|
-
await Promise.allSettled(
|
|
4341
|
+
await Promise.allSettled(D);
|
|
4332
4342
|
}, C = (R) => {
|
|
4333
4343
|
R.target.files && (y(R.target.files), R.target.value = "");
|
|
4334
4344
|
}, S = () => {
|
|
4335
4345
|
r || i.current?.click();
|
|
4336
4346
|
}, v = (R) => {
|
|
4337
|
-
a((
|
|
4347
|
+
a((k) => k.filter((D) => D.id !== R));
|
|
4338
4348
|
}, E = (R) => {
|
|
4339
|
-
const
|
|
4340
|
-
|
|
4349
|
+
const k = o.findIndex((D) => D.id === R);
|
|
4350
|
+
k !== -1 && d(k);
|
|
4341
4351
|
}, A = (R) => {
|
|
4342
4352
|
h(String(R.active.id));
|
|
4343
4353
|
}, N = (R) => {
|
|
4344
|
-
const { active:
|
|
4345
|
-
if (!
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
|
|
4354
|
+
const { active: k, over: D } = R;
|
|
4355
|
+
if (!D) {
|
|
4356
|
+
h(null);
|
|
4357
|
+
return;
|
|
4358
|
+
}
|
|
4359
|
+
const j = String(k.id), O = String(D.id);
|
|
4360
|
+
j !== O && a((M) => {
|
|
4361
|
+
const U = M.findIndex((P) => P.id === j), $ = M.findIndex((P) => P.id === O);
|
|
4349
4362
|
return U === -1 || $ === -1 ? M : uo(M, U, $);
|
|
4350
4363
|
}), h(null);
|
|
4351
|
-
},
|
|
4364
|
+
}, L = () => {
|
|
4352
4365
|
h(null);
|
|
4353
4366
|
}, G = () => {
|
|
4354
4367
|
p.current !== null && (window.clearTimeout(p.current), p.current = null);
|
|
4355
|
-
},
|
|
4368
|
+
}, V = se(() => l === null ? null : o[l] ?? null, [l, o]), X = Re(
|
|
4356
4369
|
"rounded-xl border border-dashed border-slate-300 bg-white/70 p-4 shadow-sm transition-colors dark:border-slate-700 dark:bg-slate-900/60",
|
|
4357
4370
|
u && "border-sky-500 ring-2 ring-sky-500/50",
|
|
4358
4371
|
r && "opacity-70"
|
|
4359
|
-
), K = "group relative size-20 overflow-visible rounded-lg border border-slate-200 bg-slate-50 shadow-inner transition hover
|
|
4372
|
+
), K = "group relative size-20 overflow-visible rounded-lg border border-slate-200 bg-slate-50 shadow-inner transition hover:shadow md:size-24 dark:border-slate-700 dark:bg-slate-800";
|
|
4360
4373
|
return /* @__PURE__ */ x.jsxs(
|
|
4361
4374
|
"div",
|
|
4362
4375
|
{
|
|
@@ -4392,11 +4405,11 @@ function y3({
|
|
|
4392
4405
|
collisionDetection: Nd,
|
|
4393
4406
|
onDragStart: A,
|
|
4394
4407
|
onDragEnd: N,
|
|
4395
|
-
onDragCancel:
|
|
4408
|
+
onDragCancel: L,
|
|
4396
4409
|
children: [
|
|
4397
4410
|
/* @__PURE__ */ x.jsx(Hc, { items: o.map((R) => R.id), strategy: lo, children: /* @__PURE__ */ x.jsxs("div", { className: "flex flex-wrap gap-3", children: [
|
|
4398
4411
|
o.map((R) => {
|
|
4399
|
-
const
|
|
4412
|
+
const k = R.status === "uploading", D = R.status === "error";
|
|
4400
4413
|
return /* @__PURE__ */ x.jsx(
|
|
4401
4414
|
r0,
|
|
4402
4415
|
{
|
|
@@ -4407,13 +4420,13 @@ function y3({
|
|
|
4407
4420
|
},
|
|
4408
4421
|
onHoverLeave: () => {
|
|
4409
4422
|
G(), p.current = window.setTimeout(() => {
|
|
4410
|
-
f((
|
|
4423
|
+
f((j) => j === R.id ? null : j), p.current = null;
|
|
4411
4424
|
}, 120);
|
|
4412
4425
|
},
|
|
4413
4426
|
onRemove: v,
|
|
4414
4427
|
startFullscreen: E,
|
|
4415
|
-
isUploading:
|
|
4416
|
-
isError:
|
|
4428
|
+
isUploading: k,
|
|
4429
|
+
isError: D,
|
|
4417
4430
|
tileClasses: K,
|
|
4418
4431
|
disabled: r,
|
|
4419
4432
|
isDraggingExternal: g === R.id
|
|
@@ -4441,12 +4454,12 @@ function y3({
|
|
|
4441
4454
|
] }) }),
|
|
4442
4455
|
(() => {
|
|
4443
4456
|
const R = /* @__PURE__ */ x.jsx(Xc, { children: g ? (() => {
|
|
4444
|
-
const
|
|
4445
|
-
return
|
|
4457
|
+
const k = o.find((D) => D.id === g);
|
|
4458
|
+
return k ? /* @__PURE__ */ x.jsx("div", { className: "pointer-events-none", children: /* @__PURE__ */ x.jsx(
|
|
4446
4459
|
"img",
|
|
4447
4460
|
{
|
|
4448
|
-
src:
|
|
4449
|
-
alt:
|
|
4461
|
+
src: k.previewUrl,
|
|
4462
|
+
alt: k.alt ?? "Dragged image",
|
|
4450
4463
|
className: "h-24 w-24 rounded-lg object-cover shadow-2xl"
|
|
4451
4464
|
}
|
|
4452
4465
|
) }) : null;
|
|
@@ -4468,7 +4481,7 @@ function y3({
|
|
|
4468
4481
|
"aria-hidden": !0
|
|
4469
4482
|
}
|
|
4470
4483
|
),
|
|
4471
|
-
|
|
4484
|
+
V && /* @__PURE__ */ x.jsxs("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black/90", children: [
|
|
4472
4485
|
/* @__PURE__ */ x.jsx(
|
|
4473
4486
|
"button",
|
|
4474
4487
|
{
|
|
@@ -4483,8 +4496,8 @@ function y3({
|
|
|
4483
4496
|
/* @__PURE__ */ x.jsx(
|
|
4484
4497
|
"img",
|
|
4485
4498
|
{
|
|
4486
|
-
src:
|
|
4487
|
-
alt:
|
|
4499
|
+
src: V.url,
|
|
4500
|
+
alt: V.alt ?? "Fullscreen",
|
|
4488
4501
|
className: "max-h-[80vh] max-w-full rounded-lg object-contain shadow-2xl"
|
|
4489
4502
|
}
|
|
4490
4503
|
),
|
|
@@ -7723,24 +7736,24 @@ function Gt(e, t) {
|
|
|
7723
7736
|
}
|
|
7724
7737
|
var F2 = ["defaultInputValue", "defaultMenuIsOpen", "defaultValue", "inputValue", "menuIsOpen", "onChange", "onInputChange", "onMenuClose", "onMenuOpen", "value"];
|
|
7725
7738
|
function O2(e) {
|
|
7726
|
-
var t = e.defaultInputValue, n = t === void 0 ? "" : t, r = e.defaultMenuIsOpen, i = r === void 0 ? !1 : r, o = e.defaultValue, a = o === void 0 ? null : o, u = e.inputValue, s = e.menuIsOpen, l = e.onChange, d = e.onInputChange, c = e.onMenuClose, f = e.onMenuOpen, g = e.value, h = Gt(e, F2), p = ae(u !== void 0 ? u : n), b = Ft(p, 2), m = b[0], y = b[1], C = ae(s !== void 0 ? s : i), S = Ft(C, 2), v = S[0], E = S[1], A = ae(g !== void 0 ? g : a), N = Ft(A, 2),
|
|
7727
|
-
typeof l == "function" && l(
|
|
7728
|
-
}, [l]), X = fe(function(
|
|
7739
|
+
var t = e.defaultInputValue, n = t === void 0 ? "" : t, r = e.defaultMenuIsOpen, i = r === void 0 ? !1 : r, o = e.defaultValue, a = o === void 0 ? null : o, u = e.inputValue, s = e.menuIsOpen, l = e.onChange, d = e.onInputChange, c = e.onMenuClose, f = e.onMenuOpen, g = e.value, h = Gt(e, F2), p = ae(u !== void 0 ? u : n), b = Ft(p, 2), m = b[0], y = b[1], C = ae(s !== void 0 ? s : i), S = Ft(C, 2), v = S[0], E = S[1], A = ae(g !== void 0 ? g : a), N = Ft(A, 2), L = N[0], G = N[1], V = fe(function(O, M) {
|
|
7740
|
+
typeof l == "function" && l(O, M), G(O);
|
|
7741
|
+
}, [l]), X = fe(function(O, M) {
|
|
7729
7742
|
var U;
|
|
7730
|
-
typeof d == "function" && (U = d(
|
|
7743
|
+
typeof d == "function" && (U = d(O, M)), y(U !== void 0 ? U : O);
|
|
7731
7744
|
}, [d]), K = fe(function() {
|
|
7732
7745
|
typeof f == "function" && f(), E(!0);
|
|
7733
7746
|
}, [f]), R = fe(function() {
|
|
7734
7747
|
typeof c == "function" && c(), E(!1);
|
|
7735
|
-
}, [c]),
|
|
7748
|
+
}, [c]), k = u !== void 0 ? u : m, D = s !== void 0 ? s : v, j = g !== void 0 ? g : L;
|
|
7736
7749
|
return Y(Y({}, h), {}, {
|
|
7737
|
-
inputValue:
|
|
7738
|
-
menuIsOpen:
|
|
7739
|
-
onChange:
|
|
7750
|
+
inputValue: k,
|
|
7751
|
+
menuIsOpen: D,
|
|
7752
|
+
onChange: V,
|
|
7740
7753
|
onInputChange: X,
|
|
7741
7754
|
onMenuClose: R,
|
|
7742
7755
|
onMenuOpen: K,
|
|
7743
|
-
value:
|
|
7756
|
+
value: j
|
|
7744
7757
|
});
|
|
7745
7758
|
}
|
|
7746
7759
|
function z() {
|
|
@@ -8557,9 +8570,9 @@ function yg() {
|
|
|
8557
8570
|
}
|
|
8558
8571
|
}
|
|
8559
8572
|
}
|
|
8560
|
-
var v = s, E = l, A = u, N = a,
|
|
8573
|
+
var v = s, E = l, A = u, N = a, L = t, G = d, V = r, X = h, K = g, R = n, k = o, D = i, j = c, O = !1;
|
|
8561
8574
|
function M(F) {
|
|
8562
|
-
return
|
|
8575
|
+
return O || (O = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), U(F) || S(F) === s;
|
|
8563
8576
|
}
|
|
8564
8577
|
function U(F) {
|
|
8565
8578
|
return S(F) === l;
|
|
@@ -8573,7 +8586,7 @@ function yg() {
|
|
|
8573
8586
|
function T(F) {
|
|
8574
8587
|
return typeof F == "object" && F !== null && F.$$typeof === t;
|
|
8575
8588
|
}
|
|
8576
|
-
function
|
|
8589
|
+
function _(F) {
|
|
8577
8590
|
return S(F) === d;
|
|
8578
8591
|
}
|
|
8579
8592
|
function H(F) {
|
|
@@ -8591,13 +8604,13 @@ function yg() {
|
|
|
8591
8604
|
function re(F) {
|
|
8592
8605
|
return S(F) === o;
|
|
8593
8606
|
}
|
|
8594
|
-
function
|
|
8607
|
+
function ne(F) {
|
|
8595
8608
|
return S(F) === i;
|
|
8596
8609
|
}
|
|
8597
8610
|
function ye(F) {
|
|
8598
8611
|
return S(F) === c;
|
|
8599
8612
|
}
|
|
8600
|
-
he.AsyncMode = v, he.ConcurrentMode = E, he.ContextConsumer = A, he.ContextProvider = N, he.Element =
|
|
8613
|
+
he.AsyncMode = v, he.ConcurrentMode = E, he.ContextConsumer = A, he.ContextProvider = N, he.Element = L, he.ForwardRef = G, he.Fragment = V, he.Lazy = X, he.Memo = K, he.Portal = R, he.Profiler = k, he.StrictMode = D, he.Suspense = j, he.isAsyncMode = M, he.isConcurrentMode = U, he.isContextConsumer = $, he.isContextProvider = P, he.isElement = T, he.isForwardRef = _, he.isFragment = H, he.isLazy = ee, he.isMemo = q, he.isPortal = ie, he.isProfiler = re, he.isStrictMode = ne, he.isSuspense = ye, he.isValidElementType = C, he.typeOf = S;
|
|
8601
8614
|
})()), he;
|
|
8602
8615
|
}
|
|
8603
8616
|
var Va;
|
|
@@ -9343,7 +9356,7 @@ function vp(e) {
|
|
|
9343
9356
|
maxHeight: t
|
|
9344
9357
|
};
|
|
9345
9358
|
if (!n || !n.offsetParent) return l;
|
|
9346
|
-
var d = s.getBoundingClientRect(), c = d.height, f = n.getBoundingClientRect(), g = f.bottom, h = f.height, p = f.top, b = n.offsetParent.getBoundingClientRect(), m = b.top, y = a ? window.innerHeight : ap(s), C = Ou(s), S = parseInt(getComputedStyle(n).marginBottom, 10), v = parseInt(getComputedStyle(n).marginTop, 10), E = m - v, A = y - p, N = E + C,
|
|
9359
|
+
var d = s.getBoundingClientRect(), c = d.height, f = n.getBoundingClientRect(), g = f.bottom, h = f.height, p = f.top, b = n.offsetParent.getBoundingClientRect(), m = b.top, y = a ? window.innerHeight : ap(s), C = Ou(s), S = parseInt(getComputedStyle(n).marginBottom, 10), v = parseInt(getComputedStyle(n).marginTop, 10), E = m - v, A = y - p, N = E + C, L = c - C - p, G = g - y + C + S, V = C + p - v, X = 160;
|
|
9347
9360
|
switch (i) {
|
|
9348
9361
|
case "auto":
|
|
9349
9362
|
case "bottom":
|
|
@@ -9352,22 +9365,22 @@ function vp(e) {
|
|
|
9352
9365
|
placement: "bottom",
|
|
9353
9366
|
maxHeight: t
|
|
9354
9367
|
};
|
|
9355
|
-
if (
|
|
9368
|
+
if (L >= h && !a)
|
|
9356
9369
|
return o && lr(s, G, X), {
|
|
9357
9370
|
placement: "bottom",
|
|
9358
9371
|
maxHeight: t
|
|
9359
9372
|
};
|
|
9360
|
-
if (!a &&
|
|
9373
|
+
if (!a && L >= r || a && A >= r) {
|
|
9361
9374
|
o && lr(s, G, X);
|
|
9362
|
-
var K = a ? A - S :
|
|
9375
|
+
var K = a ? A - S : L - S;
|
|
9363
9376
|
return {
|
|
9364
9377
|
placement: "bottom",
|
|
9365
9378
|
maxHeight: K
|
|
9366
9379
|
};
|
|
9367
9380
|
}
|
|
9368
9381
|
if (i === "auto" || a) {
|
|
9369
|
-
var R = t,
|
|
9370
|
-
return
|
|
9382
|
+
var R = t, k = a ? E : N;
|
|
9383
|
+
return k >= r && (R = Math.min(k - S - u, t)), {
|
|
9371
9384
|
placement: "top",
|
|
9372
9385
|
maxHeight: R
|
|
9373
9386
|
};
|
|
@@ -9385,15 +9398,15 @@ function vp(e) {
|
|
|
9385
9398
|
maxHeight: t
|
|
9386
9399
|
};
|
|
9387
9400
|
if (N >= h && !a)
|
|
9388
|
-
return o && lr(s,
|
|
9401
|
+
return o && lr(s, V, X), {
|
|
9389
9402
|
placement: "top",
|
|
9390
9403
|
maxHeight: t
|
|
9391
9404
|
};
|
|
9392
9405
|
if (!a && N >= r || a && E >= r) {
|
|
9393
|
-
var
|
|
9394
|
-
return (!a && N >= r || a && E >= r) && (
|
|
9406
|
+
var D = t;
|
|
9407
|
+
return (!a && N >= r || a && E >= r) && (D = a ? E - v : N - v), o && lr(s, V, X), {
|
|
9395
9408
|
placement: "top",
|
|
9396
|
-
maxHeight:
|
|
9409
|
+
maxHeight: D
|
|
9397
9410
|
};
|
|
9398
9411
|
}
|
|
9399
9412
|
return {
|
|
@@ -9517,9 +9530,9 @@ var Gu = function(t) {
|
|
|
9517
9530
|
};
|
|
9518
9531
|
}, []), p = ae(null), b = Ft(p, 2), m = b[0], y = b[1], C = fe(function() {
|
|
9519
9532
|
if (i) {
|
|
9520
|
-
var A = lp(i), N = u === "fixed" ? 0 : window.pageYOffset,
|
|
9521
|
-
(
|
|
9522
|
-
offset:
|
|
9533
|
+
var A = lp(i), N = u === "fixed" ? 0 : window.pageYOffset, L = A[f] + N;
|
|
9534
|
+
(L !== m?.offset || A.left !== m?.rect.left || A.width !== m?.rect.width) && y({
|
|
9535
|
+
offset: L,
|
|
9523
9536
|
rect: A
|
|
9524
9537
|
});
|
|
9525
9538
|
}
|
|
@@ -10119,56 +10132,56 @@ var Db = process.env.NODE_ENV === "production" ? {
|
|
|
10119
10132
|
}, Bb = function(t) {
|
|
10120
10133
|
var n = t.ariaSelection, r = t.focusedOption, i = t.focusedValue, o = t.focusableOptions, a = t.isFocused, u = t.selectValue, s = t.selectProps, l = t.id, d = t.isAppleDevice, c = s.ariaLiveMessages, f = s.getOptionLabel, g = s.inputValue, h = s.isMulti, p = s.isOptionDisabled, b = s.isSearchable, m = s.menuIsOpen, y = s.options, C = s.screenReaderStatus, S = s.tabSelectsValue, v = s.isLoading, E = s["aria-label"], A = s["aria-live"], N = se(function() {
|
|
10121
10134
|
return Y(Y({}, Mb), c || {});
|
|
10122
|
-
}, [c]),
|
|
10123
|
-
var
|
|
10135
|
+
}, [c]), L = se(function() {
|
|
10136
|
+
var k = "";
|
|
10124
10137
|
if (n && N.onChange) {
|
|
10125
|
-
var
|
|
10138
|
+
var D = n.option, j = n.options, O = n.removedValue, M = n.removedValues, U = n.value, $ = function(ie) {
|
|
10126
10139
|
return Array.isArray(ie) ? null : ie;
|
|
10127
|
-
}, P =
|
|
10140
|
+
}, P = O || D || $(U), T = P ? f(P) : "", _ = j || M || void 0, H = _ ? _.map(f) : [], ee = Y({
|
|
10128
10141
|
// multiSelected items are usually items that have already been selected
|
|
10129
10142
|
// or set by the user as a default value so we assume they are not disabled
|
|
10130
10143
|
isDisabled: P && p(P, u),
|
|
10131
10144
|
label: T,
|
|
10132
10145
|
labels: H
|
|
10133
10146
|
}, n);
|
|
10134
|
-
|
|
10147
|
+
k = N.onChange(ee);
|
|
10135
10148
|
}
|
|
10136
|
-
return
|
|
10149
|
+
return k;
|
|
10137
10150
|
}, [n, N, p, u, f]), G = se(function() {
|
|
10138
|
-
var
|
|
10139
|
-
if (
|
|
10140
|
-
var
|
|
10141
|
-
focused:
|
|
10142
|
-
label: f(
|
|
10143
|
-
isDisabled: p(
|
|
10144
|
-
isSelected:
|
|
10151
|
+
var k = "", D = r || i, j = !!(r && u && u.includes(r));
|
|
10152
|
+
if (D && N.onFocus) {
|
|
10153
|
+
var O = {
|
|
10154
|
+
focused: D,
|
|
10155
|
+
label: f(D),
|
|
10156
|
+
isDisabled: p(D, u),
|
|
10157
|
+
isSelected: j,
|
|
10145
10158
|
options: o,
|
|
10146
|
-
context:
|
|
10159
|
+
context: D === r ? "menu" : "value",
|
|
10147
10160
|
selectValue: u,
|
|
10148
10161
|
isAppleDevice: d
|
|
10149
10162
|
};
|
|
10150
|
-
|
|
10163
|
+
k = N.onFocus(O);
|
|
10151
10164
|
}
|
|
10152
|
-
return
|
|
10153
|
-
}, [r, i, f, p, N, o, u, d]),
|
|
10154
|
-
var
|
|
10165
|
+
return k;
|
|
10166
|
+
}, [r, i, f, p, N, o, u, d]), V = se(function() {
|
|
10167
|
+
var k = "";
|
|
10155
10168
|
if (m && y.length && !v && N.onFilter) {
|
|
10156
|
-
var
|
|
10169
|
+
var D = C({
|
|
10157
10170
|
count: o.length
|
|
10158
10171
|
});
|
|
10159
|
-
|
|
10172
|
+
k = N.onFilter({
|
|
10160
10173
|
inputValue: g,
|
|
10161
|
-
resultsMessage:
|
|
10174
|
+
resultsMessage: D
|
|
10162
10175
|
});
|
|
10163
10176
|
}
|
|
10164
|
-
return
|
|
10177
|
+
return k;
|
|
10165
10178
|
}, [o, g, m, N, y, C, v]), X = n?.action === "initial-input-focus", K = se(function() {
|
|
10166
|
-
var
|
|
10179
|
+
var k = "";
|
|
10167
10180
|
if (N.guidance) {
|
|
10168
|
-
var
|
|
10169
|
-
|
|
10181
|
+
var D = i ? "value" : m ? "menu" : "input";
|
|
10182
|
+
k = N.guidance({
|
|
10170
10183
|
"aria-label": E,
|
|
10171
|
-
context:
|
|
10184
|
+
context: D,
|
|
10172
10185
|
isDisabled: r && p(r, u),
|
|
10173
10186
|
isMulti: h,
|
|
10174
10187
|
isSearchable: b,
|
|
@@ -10176,14 +10189,14 @@ var Db = process.env.NODE_ENV === "production" ? {
|
|
|
10176
10189
|
isInitialFocus: X
|
|
10177
10190
|
});
|
|
10178
10191
|
}
|
|
10179
|
-
return
|
|
10192
|
+
return k;
|
|
10180
10193
|
}, [E, r, i, h, p, b, m, N, u, S, X]), R = Z(Si, null, Z("span", {
|
|
10181
10194
|
id: "aria-selection"
|
|
10182
|
-
},
|
|
10195
|
+
}, L), Z("span", {
|
|
10183
10196
|
id: "aria-focused"
|
|
10184
10197
|
}, G), Z("span", {
|
|
10185
10198
|
id: "aria-results"
|
|
10186
|
-
},
|
|
10199
|
+
}, V), Z("span", {
|
|
10187
10200
|
id: "aria-guidance"
|
|
10188
10201
|
}, K));
|
|
10189
10202
|
return Z(Si, null, Z(Ka, {
|
|
@@ -10507,8 +10520,8 @@ var Hb = function(t) {
|
|
|
10507
10520
|
function Zb(e) {
|
|
10508
10521
|
var t = e.isEnabled, n = e.onBottomArrive, r = e.onBottomLeave, i = e.onTopArrive, o = e.onTopLeave, a = J(!1), u = J(!1), s = J(0), l = J(null), d = fe(function(b, m) {
|
|
10509
10522
|
if (l.current !== null) {
|
|
10510
|
-
var y = l.current, C = y.scrollTop, S = y.scrollHeight, v = y.clientHeight, E = l.current, A = m > 0, N = S - v - C,
|
|
10511
|
-
N > m && a.current && (r && r(b), a.current = !1), A && u.current && (o && o(b), u.current = !1), A && m > N ? (n && !a.current && n(b), E.scrollTop = S,
|
|
10523
|
+
var y = l.current, C = y.scrollTop, S = y.scrollHeight, v = y.clientHeight, E = l.current, A = m > 0, N = S - v - C, L = !1;
|
|
10524
|
+
N > m && a.current && (r && r(b), a.current = !1), A && u.current && (o && o(b), u.current = !1), A && m > N ? (n && !a.current && n(b), E.scrollTop = S, L = !0, a.current = !0) : !A && -m > C && (i && !u.current && i(b), E.scrollTop = 0, L = !0, u.current = !0), L && Hb(b);
|
|
10512
10525
|
}
|
|
10513
10526
|
}, [n, r, i, o]), c = fe(function(b) {
|
|
10514
10527
|
d(b, b.deltaY);
|
|
@@ -10527,7 +10540,7 @@ function Zb(e) {
|
|
|
10527
10540
|
}, [g, f, c]), p = fe(function(b) {
|
|
10528
10541
|
b && (b.removeEventListener("wheel", c, !1), b.removeEventListener("touchstart", f, !1), b.removeEventListener("touchmove", g, !1));
|
|
10529
10542
|
}, [g, f, c]);
|
|
10530
|
-
return
|
|
10543
|
+
return te(function() {
|
|
10531
10544
|
if (t) {
|
|
10532
10545
|
var b = l.current;
|
|
10533
10546
|
return h(b), function() {
|
|
@@ -10587,7 +10600,7 @@ function Yb(e) {
|
|
|
10587
10600
|
}), l && os() && (l.removeEventListener("touchmove", ns, Kt), s && (s.removeEventListener("touchstart", is, Kt), s.removeEventListener("touchmove", rs, Kt)));
|
|
10588
10601
|
}
|
|
10589
10602
|
}, [r]);
|
|
10590
|
-
return
|
|
10603
|
+
return te(function() {
|
|
10591
10604
|
if (t) {
|
|
10592
10605
|
var s = o.current;
|
|
10593
10606
|
return a(s), function() {
|
|
@@ -11477,8 +11490,8 @@ var qu = function(t) {
|
|
|
11477
11490
|
}
|
|
11478
11491
|
}), y);
|
|
11479
11492
|
if (b)
|
|
11480
|
-
return S.map(function(N,
|
|
11481
|
-
var G = N === v,
|
|
11493
|
+
return S.map(function(N, L) {
|
|
11494
|
+
var G = N === v, V = "".concat(i.getOptionLabel(N), "-").concat(i.getOptionValue(N));
|
|
11482
11495
|
return /* @__PURE__ */ I.createElement(a, z({}, f, {
|
|
11483
11496
|
components: {
|
|
11484
11497
|
Container: u,
|
|
@@ -11487,8 +11500,8 @@ var qu = function(t) {
|
|
|
11487
11500
|
},
|
|
11488
11501
|
isFocused: G,
|
|
11489
11502
|
isDisabled: p,
|
|
11490
|
-
key:
|
|
11491
|
-
index:
|
|
11503
|
+
key: V,
|
|
11504
|
+
index: L,
|
|
11492
11505
|
removeProps: {
|
|
11493
11506
|
onClick: function() {
|
|
11494
11507
|
return i.removeValue(N);
|
|
@@ -11571,14 +11584,14 @@ var qu = function(t) {
|
|
|
11571
11584
|
}, {
|
|
11572
11585
|
key: "renderMenu",
|
|
11573
11586
|
value: function() {
|
|
11574
|
-
var i = this, o = this.getComponents(), a = o.Group, u = o.GroupHeading, s = o.Menu, l = o.MenuList, d = o.MenuPortal, c = o.LoadingMessage, f = o.NoOptionsMessage, g = o.Option, h = this.commonProps, p = this.state.focusedOption, b = this.props, m = b.captureMenuScroll, y = b.inputValue, C = b.isLoading, S = b.loadingMessage, v = b.minMenuHeight, E = b.maxMenuHeight, A = b.menuIsOpen, N = b.menuPlacement,
|
|
11587
|
+
var i = this, o = this.getComponents(), a = o.Group, u = o.GroupHeading, s = o.Menu, l = o.MenuList, d = o.MenuPortal, c = o.LoadingMessage, f = o.NoOptionsMessage, g = o.Option, h = this.commonProps, p = this.state.focusedOption, b = this.props, m = b.captureMenuScroll, y = b.inputValue, C = b.isLoading, S = b.loadingMessage, v = b.minMenuHeight, E = b.maxMenuHeight, A = b.menuIsOpen, N = b.menuPlacement, L = b.menuPosition, G = b.menuPortalTarget, V = b.menuShouldBlockScroll, X = b.menuShouldScrollIntoView, K = b.noOptionsMessage, R = b.onMenuScrollToTop, k = b.onMenuScrollToBottom;
|
|
11575
11588
|
if (!A) return null;
|
|
11576
|
-
var
|
|
11577
|
-
var H = T.type, ee = T.data, q = T.isDisabled, ie = T.isSelected, re = T.label,
|
|
11589
|
+
var D = function(T, _) {
|
|
11590
|
+
var H = T.type, ee = T.data, q = T.isDisabled, ie = T.isSelected, re = T.label, ne = T.value, ye = p === ee, F = q ? void 0 : function() {
|
|
11578
11591
|
return i.onOptionHover(ee);
|
|
11579
11592
|
}, me = q ? void 0 : function() {
|
|
11580
11593
|
return i.selectOption(ee);
|
|
11581
|
-
}, ve = "".concat(i.getElementId("option"), "-").concat(
|
|
11594
|
+
}, ve = "".concat(i.getElementId("option"), "-").concat(_), Pe = {
|
|
11582
11595
|
id: ve,
|
|
11583
11596
|
onClick: me,
|
|
11584
11597
|
onMouseMove: F,
|
|
@@ -11596,19 +11609,19 @@ var qu = function(t) {
|
|
|
11596
11609
|
key: ve,
|
|
11597
11610
|
label: re,
|
|
11598
11611
|
type: H,
|
|
11599
|
-
value:
|
|
11612
|
+
value: ne,
|
|
11600
11613
|
isFocused: ye,
|
|
11601
11614
|
innerRef: ye ? i.getFocusedOptionRef : void 0
|
|
11602
11615
|
}), i.formatOptionLabel(T.data, "menu"));
|
|
11603
|
-
},
|
|
11616
|
+
}, j;
|
|
11604
11617
|
if (this.hasOptions())
|
|
11605
|
-
|
|
11618
|
+
j = this.getCategorizedOptions().map(function(P) {
|
|
11606
11619
|
if (P.type === "group") {
|
|
11607
|
-
var T = P.data,
|
|
11620
|
+
var T = P.data, _ = P.options, H = P.index, ee = "".concat(i.getElementId("group"), "-").concat(H), q = "".concat(ee, "-heading");
|
|
11608
11621
|
return /* @__PURE__ */ I.createElement(a, z({}, h, {
|
|
11609
11622
|
key: ee,
|
|
11610
11623
|
data: T,
|
|
11611
|
-
options:
|
|
11624
|
+
options: _,
|
|
11612
11625
|
Heading: u,
|
|
11613
11626
|
headingProps: {
|
|
11614
11627
|
id: q,
|
|
@@ -11616,32 +11629,32 @@ var qu = function(t) {
|
|
|
11616
11629
|
},
|
|
11617
11630
|
label: i.formatGroupLabel(P.data)
|
|
11618
11631
|
}), P.options.map(function(ie) {
|
|
11619
|
-
return
|
|
11632
|
+
return D(ie, "".concat(H, "-").concat(ie.index));
|
|
11620
11633
|
}));
|
|
11621
11634
|
} else if (P.type === "option")
|
|
11622
|
-
return
|
|
11635
|
+
return D(P, "".concat(P.index));
|
|
11623
11636
|
});
|
|
11624
11637
|
else if (C) {
|
|
11625
|
-
var
|
|
11638
|
+
var O = S({
|
|
11626
11639
|
inputValue: y
|
|
11627
11640
|
});
|
|
11628
|
-
if (
|
|
11629
|
-
|
|
11641
|
+
if (O === null) return null;
|
|
11642
|
+
j = /* @__PURE__ */ I.createElement(c, h, O);
|
|
11630
11643
|
} else {
|
|
11631
11644
|
var M = K({
|
|
11632
11645
|
inputValue: y
|
|
11633
11646
|
});
|
|
11634
11647
|
if (M === null) return null;
|
|
11635
|
-
|
|
11648
|
+
j = /* @__PURE__ */ I.createElement(f, h, M);
|
|
11636
11649
|
}
|
|
11637
11650
|
var U = {
|
|
11638
11651
|
minMenuHeight: v,
|
|
11639
11652
|
maxMenuHeight: E,
|
|
11640
11653
|
menuPlacement: N,
|
|
11641
|
-
menuPosition:
|
|
11654
|
+
menuPosition: L,
|
|
11642
11655
|
menuShouldScrollIntoView: X
|
|
11643
11656
|
}, $ = /* @__PURE__ */ I.createElement(Cp, z({}, h, U), function(P) {
|
|
11644
|
-
var T = P.ref,
|
|
11657
|
+
var T = P.ref, _ = P.placerProps, H = _.placement, ee = _.maxHeight;
|
|
11645
11658
|
return /* @__PURE__ */ I.createElement(s, z({}, h, U, {
|
|
11646
11659
|
innerRef: T,
|
|
11647
11660
|
innerProps: {
|
|
@@ -11653,8 +11666,8 @@ var qu = function(t) {
|
|
|
11653
11666
|
}), /* @__PURE__ */ I.createElement(Qb, {
|
|
11654
11667
|
captureEnabled: m,
|
|
11655
11668
|
onTopArrive: R,
|
|
11656
|
-
onBottomArrive:
|
|
11657
|
-
lockEnabled:
|
|
11669
|
+
onBottomArrive: k,
|
|
11670
|
+
lockEnabled: V
|
|
11658
11671
|
}, function(q) {
|
|
11659
11672
|
return /* @__PURE__ */ I.createElement(l, z({}, h, {
|
|
11660
11673
|
innerRef: function(re) {
|
|
@@ -11668,14 +11681,14 @@ var qu = function(t) {
|
|
|
11668
11681
|
isLoading: C,
|
|
11669
11682
|
maxHeight: ee,
|
|
11670
11683
|
focusedOption: p
|
|
11671
|
-
}),
|
|
11684
|
+
}), j);
|
|
11672
11685
|
}));
|
|
11673
11686
|
});
|
|
11674
|
-
return G ||
|
|
11687
|
+
return G || L === "fixed" ? /* @__PURE__ */ I.createElement(d, z({}, h, {
|
|
11675
11688
|
appendTo: G,
|
|
11676
11689
|
controlElement: this.controlRef,
|
|
11677
11690
|
menuPlacement: N,
|
|
11678
|
-
menuPosition:
|
|
11691
|
+
menuPosition: L
|
|
11679
11692
|
}), $) : $;
|
|
11680
11693
|
}
|
|
11681
11694
|
}, {
|
|
@@ -11779,18 +11792,18 @@ var qu = function(t) {
|
|
|
11779
11792
|
clearFocusValueOnUpdate: !1
|
|
11780
11793
|
};
|
|
11781
11794
|
}
|
|
11782
|
-
var
|
|
11795
|
+
var L = s != null && i !== a ? {
|
|
11783
11796
|
inputIsHidden: s,
|
|
11784
11797
|
inputIsHiddenAfterUpdate: void 0
|
|
11785
|
-
} : {}, G = l,
|
|
11786
|
-
return d && !
|
|
11798
|
+
} : {}, G = l, V = d && c;
|
|
11799
|
+
return d && !V && (G = {
|
|
11787
11800
|
value: cr(m, y, y[0] || null),
|
|
11788
11801
|
options: y,
|
|
11789
11802
|
action: "initial-input-focus"
|
|
11790
|
-
},
|
|
11803
|
+
}, V = !c), l?.action === "initial-input-focus" && (G = null), Y(Y(Y({}, C), L), {}, {
|
|
11791
11804
|
prevProps: i,
|
|
11792
11805
|
ariaSelection: G,
|
|
11793
|
-
prevWasFocused:
|
|
11806
|
+
prevWasFocused: V
|
|
11794
11807
|
});
|
|
11795
11808
|
}
|
|
11796
11809
|
}]), n;
|
|
@@ -11929,10 +11942,10 @@ const wh = I.forwardRef(
|
|
|
11929
11942
|
selectFooter: h,
|
|
11930
11943
|
disabled: p,
|
|
11931
11944
|
...b
|
|
11932
|
-
} = t, { rows: m, ...y } = b, C = I.useMemo(() => r ?? i ?? {}, [i, r]), [S, v] = I.useState(C), E = r !== void 0, A = E ? r ?? {} : S, [N,
|
|
11945
|
+
} = t, { rows: m, ...y } = b, C = I.useMemo(() => r ?? i ?? {}, [i, r]), [S, v] = I.useState(C), E = r !== void 0, A = E ? r ?? {} : S, [N, L] = I.useState(""), G = I.useContext(nl), V = I.useMemo(
|
|
11933
11946
|
() => Ah(void 0, Array.from(/* @__PURE__ */ new Set([...l ?? mo(), ...Object.keys(A)]))),
|
|
11934
11947
|
[A, l]
|
|
11935
|
-
), X = I.useMemo(() => o ?? G?.locale ?? a ?? Object.keys(A)[0] ??
|
|
11948
|
+
), X = I.useMemo(() => o ?? G?.locale ?? a ?? Object.keys(A)[0] ?? V[0]?.value ?? Zi, [A, a, G?.locale, V, o]), [K, R] = I.useState(X), k = o ?? G?.locale ?? K;
|
|
11936
11949
|
I.useEffect(() => {
|
|
11937
11950
|
E || v(C);
|
|
11938
11951
|
}, [C, E]), I.useEffect(() => {
|
|
@@ -11940,56 +11953,56 @@ const wh = I.forwardRef(
|
|
|
11940
11953
|
}, [K, o]), I.useEffect(() => {
|
|
11941
11954
|
!o && G?.locale && G.locale !== K && R(G.locale);
|
|
11942
11955
|
}, [K, G?.locale, o]);
|
|
11943
|
-
const
|
|
11956
|
+
const D = V.find((B) => B.value === k) ?? V.find((B) => B.value === Zi) ?? V[0] ?? null, [j, O] = I.useState(!1), M = I.useRef(null), U = I.useRef(null), $ = I.useRef(null), P = I.useRef(null), T = I.useRef(null), _ = I.useRef(null), H = I.useRef(null), [ee, q] = I.useState({ left: 0, top: 0 });
|
|
11944
11957
|
I.useImperativeHandle(n, () => U.current, []);
|
|
11945
|
-
const ie = (
|
|
11946
|
-
if (!
|
|
11947
|
-
const ue =
|
|
11948
|
-
E || R(ue), s?.(ue,
|
|
11949
|
-
}, re = (
|
|
11958
|
+
const ie = (B) => {
|
|
11959
|
+
if (!B) return;
|
|
11960
|
+
const ue = B.value;
|
|
11961
|
+
E || R(ue), s?.(ue, B), G?.setLocale(ue), nt(!0);
|
|
11962
|
+
}, re = (B) => {
|
|
11950
11963
|
const ue = {
|
|
11951
11964
|
...A,
|
|
11952
|
-
[
|
|
11965
|
+
[k]: B.target.value
|
|
11953
11966
|
};
|
|
11954
11967
|
E || v(ue), u?.(ue);
|
|
11955
|
-
},
|
|
11956
|
-
(
|
|
11968
|
+
}, ne = A[k] ?? "", ye = I.useCallback(
|
|
11969
|
+
(B) => {
|
|
11957
11970
|
if (!N) return !0;
|
|
11958
11971
|
const ue = Yi(N);
|
|
11959
|
-
return
|
|
11972
|
+
return B.data.searchable.some(($e) => $e.includes(ue));
|
|
11960
11973
|
},
|
|
11961
11974
|
[N]
|
|
11962
11975
|
), F = d ? "left-2 top-2 -translate-y-0" : "left-3 top-1/2 -translate-y-1/2", me = "pl-10 pr-3", ve = I.useCallback(() => {
|
|
11963
|
-
const
|
|
11964
|
-
if (!
|
|
11965
|
-
const $e =
|
|
11976
|
+
const B = $.current, ue = P.current;
|
|
11977
|
+
if (!B || !ue) return;
|
|
11978
|
+
const $e = B.getBoundingClientRect(), Ne = ue.getBoundingClientRect();
|
|
11966
11979
|
q({
|
|
11967
11980
|
left: $e.left - Ne.left,
|
|
11968
11981
|
top: $e.bottom - Ne.top + 4
|
|
11969
11982
|
});
|
|
11970
|
-
}, []), Pe = I.useCallback((
|
|
11971
|
-
const
|
|
11972
|
-
if (!
|
|
11973
|
-
|
|
11983
|
+
}, []), Pe = I.useCallback((B) => !B || !(B instanceof Node) ? !1 : !!M.current?.contains(B), []), Xe = I.useCallback(() => {
|
|
11984
|
+
const B = U.current;
|
|
11985
|
+
if (!B) return;
|
|
11986
|
+
B.focus();
|
|
11974
11987
|
const ue = H.current;
|
|
11975
|
-
ue && ue.start != null && ue.end != null &&
|
|
11988
|
+
ue && ue.start != null && ue.end != null && B.setSelectionRange(ue.start, ue.end);
|
|
11976
11989
|
}, []);
|
|
11977
11990
|
I.useEffect(() => {
|
|
11978
|
-
if (!
|
|
11979
|
-
const
|
|
11980
|
-
|
|
11981
|
-
if (document.activeElement ===
|
|
11982
|
-
|
|
11983
|
-
const ue =
|
|
11991
|
+
if (!j) return;
|
|
11992
|
+
const B = _.current;
|
|
11993
|
+
B && requestAnimationFrame(() => {
|
|
11994
|
+
if (document.activeElement === B) return;
|
|
11995
|
+
B.focus();
|
|
11996
|
+
const ue = B.value.length;
|
|
11984
11997
|
try {
|
|
11985
|
-
|
|
11998
|
+
B.setSelectionRange(ue, ue);
|
|
11986
11999
|
} catch {
|
|
11987
12000
|
}
|
|
11988
12001
|
});
|
|
11989
|
-
}, [
|
|
12002
|
+
}, [j, N]);
|
|
11990
12003
|
const nt = I.useCallback(
|
|
11991
|
-
(
|
|
11992
|
-
|
|
12004
|
+
(B = !0) => {
|
|
12005
|
+
O(!1), L(""), B && requestAnimationFrame(() => {
|
|
11993
12006
|
Xe();
|
|
11994
12007
|
});
|
|
11995
12008
|
},
|
|
@@ -12002,30 +12015,30 @@ const wh = I.forwardRef(
|
|
|
12002
12015
|
noOptionsMessage: Mt,
|
|
12003
12016
|
...Xt
|
|
12004
12017
|
} = g ?? {}, Nt = I.useMemo(() => {
|
|
12005
|
-
const
|
|
12018
|
+
const B = Yi(N), ue = ($e) => {
|
|
12006
12019
|
const Ne = $e.code.toLowerCase();
|
|
12007
|
-
return
|
|
12020
|
+
return B && Ne === B ? 0 : B && Ne.startsWith(B) ? 1 : B && $e.searchable.some((at) => at.startsWith(B)) ? 2 : B && $e.searchable.some((at) => at.includes(B)) ? 3 : 4;
|
|
12008
12021
|
};
|
|
12009
|
-
return
|
|
12022
|
+
return V.filter(($e) => ye({ data: $e })).sort(($e, Ne) => {
|
|
12010
12023
|
const at = ue($e) - ue(Ne);
|
|
12011
12024
|
return at !== 0 ? at : $e.name.localeCompare(Ne.name);
|
|
12012
12025
|
});
|
|
12013
|
-
}, [ye,
|
|
12026
|
+
}, [ye, V, N]), cn = I.useMemo(
|
|
12014
12027
|
() => ({
|
|
12015
12028
|
Control: Eh,
|
|
12016
12029
|
IndicatorsContainer: fr,
|
|
12017
12030
|
DropdownIndicator: fr,
|
|
12018
12031
|
IndicatorSeparator: fr,
|
|
12019
12032
|
ValueContainer: fr,
|
|
12020
|
-
MenuList: (
|
|
12021
|
-
const { children: ue } =
|
|
12022
|
-
return /* @__PURE__ */ x.jsxs(ju.MenuList, { ...
|
|
12033
|
+
MenuList: (B) => {
|
|
12034
|
+
const { children: ue } = B;
|
|
12035
|
+
return /* @__PURE__ */ x.jsxs(ju.MenuList, { ...B, className: "!p-0 flex flex-col overflow-hidden", children: [
|
|
12023
12036
|
/* @__PURE__ */ x.jsx("div", { className: "border-b border-muted px-2 pb-2 pt-2", children: /* @__PURE__ */ x.jsx(
|
|
12024
12037
|
"input",
|
|
12025
12038
|
{
|
|
12026
|
-
ref:
|
|
12039
|
+
ref: _,
|
|
12027
12040
|
value: N,
|
|
12028
|
-
onChange: ($e) =>
|
|
12041
|
+
onChange: ($e) => L($e.target.value),
|
|
12029
12042
|
onKeyDown: ($e) => {
|
|
12030
12043
|
if ($e.key === "Escape") {
|
|
12031
12044
|
$e.preventDefault(), nt(!0);
|
|
@@ -12050,7 +12063,7 @@ const wh = I.forwardRef(
|
|
|
12050
12063
|
...Te ?? {},
|
|
12051
12064
|
Option: Nh
|
|
12052
12065
|
}),
|
|
12053
|
-
[nt, ye, Nt, ie,
|
|
12066
|
+
[nt, ye, Nt, ie, V, N, h, Te]
|
|
12054
12067
|
), Wt = I.useMemo(
|
|
12055
12068
|
() => ({
|
|
12056
12069
|
...Sh,
|
|
@@ -12059,22 +12072,22 @@ const wh = I.forwardRef(
|
|
|
12059
12072
|
[$t]
|
|
12060
12073
|
);
|
|
12061
12074
|
I.useLayoutEffect(() => {
|
|
12062
|
-
if (!
|
|
12075
|
+
if (!j) return;
|
|
12063
12076
|
ve();
|
|
12064
|
-
const
|
|
12065
|
-
return window.addEventListener("resize",
|
|
12066
|
-
}, [
|
|
12077
|
+
const B = () => ve();
|
|
12078
|
+
return window.addEventListener("resize", B), () => window.removeEventListener("resize", B);
|
|
12079
|
+
}, [j, ve]);
|
|
12067
12080
|
const ct = {
|
|
12068
12081
|
...y,
|
|
12069
12082
|
ref: U,
|
|
12070
12083
|
disabled: p,
|
|
12071
|
-
value:
|
|
12084
|
+
value: ne,
|
|
12072
12085
|
onChange: re,
|
|
12073
|
-
onFocus: (
|
|
12074
|
-
|
|
12086
|
+
onFocus: (B) => {
|
|
12087
|
+
j && nt(!1), y.onFocus?.(B);
|
|
12075
12088
|
},
|
|
12076
|
-
onBlur: (
|
|
12077
|
-
Pe(
|
|
12089
|
+
onBlur: (B) => {
|
|
12090
|
+
Pe(B.relatedTarget) || nt(!1), y.onBlur?.(B);
|
|
12078
12091
|
},
|
|
12079
12092
|
className: Re(
|
|
12080
12093
|
"w-full rounded-md border border-input bg-background text-base ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
@@ -12089,8 +12102,8 @@ const wh = I.forwardRef(
|
|
|
12089
12102
|
{
|
|
12090
12103
|
ref: M,
|
|
12091
12104
|
className: Re("relative flex flex-col", c),
|
|
12092
|
-
onBlur: (
|
|
12093
|
-
Pe(
|
|
12105
|
+
onBlur: (B) => {
|
|
12106
|
+
Pe(B.relatedTarget) || nt(!1);
|
|
12094
12107
|
},
|
|
12095
12108
|
children: [
|
|
12096
12109
|
/* @__PURE__ */ x.jsxs("div", { ref: P, className: "relative", children: [
|
|
@@ -12103,23 +12116,23 @@ const wh = I.forwardRef(
|
|
|
12103
12116
|
"absolute flex h-6 w-6 items-center justify-center rounded border text-lg leading-none transition focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
12104
12117
|
F,
|
|
12105
12118
|
p ? "cursor-not-allowed opacity-50 pointer-events-none" : "cursor-pointer hover:bg-muted",
|
|
12106
|
-
|
|
12119
|
+
D ? "border-transparent" : "border-dashed border-border text-muted-foreground"
|
|
12107
12120
|
),
|
|
12108
|
-
"aria-label":
|
|
12109
|
-
onMouseDown: (
|
|
12121
|
+
"aria-label": D ? `${D.name} flag` : "Select language",
|
|
12122
|
+
onMouseDown: (B) => B.preventDefault(),
|
|
12110
12123
|
onClick: () => {
|
|
12111
12124
|
if (p) return;
|
|
12112
|
-
const
|
|
12113
|
-
|
|
12114
|
-
start:
|
|
12115
|
-
end:
|
|
12116
|
-
}),
|
|
12117
|
-
|
|
12125
|
+
const B = U.current;
|
|
12126
|
+
B && (H.current = {
|
|
12127
|
+
start: B.selectionStart,
|
|
12128
|
+
end: B.selectionEnd
|
|
12129
|
+
}), L(""), O(!0), requestAnimationFrame(() => {
|
|
12130
|
+
_.current ? (_.current.focus(), _.current.select()) : T.current?.focus();
|
|
12118
12131
|
});
|
|
12119
12132
|
},
|
|
12120
12133
|
disabled: p,
|
|
12121
12134
|
ref: $,
|
|
12122
|
-
children: /* @__PURE__ */ x.jsx("span", { "aria-hidden": "true", children:
|
|
12135
|
+
children: /* @__PURE__ */ x.jsx("span", { "aria-hidden": "true", children: D?.flag ?? "?" })
|
|
12123
12136
|
}
|
|
12124
12137
|
)
|
|
12125
12138
|
] }),
|
|
@@ -12128,7 +12141,7 @@ const wh = I.forwardRef(
|
|
|
12128
12141
|
{
|
|
12129
12142
|
className: "absolute left-0 top-full z-30 mt-1",
|
|
12130
12143
|
style: {
|
|
12131
|
-
pointerEvents:
|
|
12144
|
+
pointerEvents: j ? "auto" : "none",
|
|
12132
12145
|
width: "min(260px, 100%)",
|
|
12133
12146
|
left: ee.left,
|
|
12134
12147
|
top: ee.top
|
|
@@ -12137,7 +12150,7 @@ const wh = I.forwardRef(
|
|
|
12137
12150
|
tl,
|
|
12138
12151
|
{
|
|
12139
12152
|
...Xt,
|
|
12140
|
-
menuIsOpen:
|
|
12153
|
+
menuIsOpen: j,
|
|
12141
12154
|
options: Nt,
|
|
12142
12155
|
value: null,
|
|
12143
12156
|
onChange: ie,
|
|
@@ -12670,13 +12683,13 @@ const e3 = I.forwardRef(
|
|
|
12670
12683
|
} = b, A = Mh(a), N = I.useMemo(
|
|
12671
12684
|
() => Bh(A),
|
|
12672
12685
|
[A]
|
|
12673
|
-
),
|
|
12686
|
+
), L = I.useMemo(
|
|
12674
12687
|
() => Ph(N, p),
|
|
12675
12688
|
[N, p]
|
|
12676
12689
|
), G = I.useMemo(
|
|
12677
12690
|
() => Lh(N, A),
|
|
12678
12691
|
[A, N]
|
|
12679
|
-
),
|
|
12692
|
+
), V = I.useCallback(
|
|
12680
12693
|
(w) => {
|
|
12681
12694
|
const W = G.find((ge) => ge.value === w);
|
|
12682
12695
|
return W ? Vh(W) : kh(w);
|
|
@@ -12747,12 +12760,12 @@ const e3 = I.forwardRef(
|
|
|
12747
12760
|
}, R.current = w;
|
|
12748
12761
|
}
|
|
12749
12762
|
}
|
|
12750
|
-
const
|
|
12751
|
-
|
|
12763
|
+
const k = K.current, [D, j] = I.useState(k.country), [O, M] = I.useState(k.inputValue), [U, $] = I.useState(""), [P, T] = I.useState(!1), [_, H] = I.useState(-1), [ee, q] = I.useState(!1), [ie, re] = I.useState(null), [ne, ye] = I.useState(
|
|
12764
|
+
k.hasExplicitCountrySelection
|
|
12752
12765
|
), F = I.useRef(null), me = I.useRef(""), ve = I.useRef(null), Pe = I.useRef("smooth"), Xe = I.useRef(null), nt = I.useCallback(() => {
|
|
12753
12766
|
const w = Pe.current;
|
|
12754
12767
|
return Pe.current = "smooth", w;
|
|
12755
|
-
}, []), Te = typeof o == "string", $t = Te ? o :
|
|
12768
|
+
}, []), Te = typeof o == "string", $t = Te ? o : D, Ie = $t ?? X, ot = I.useRef(null);
|
|
12756
12769
|
I.useImperativeHandle(n, () => ot.current, []), I.useLayoutEffect(() => {
|
|
12757
12770
|
const w = Xe.current;
|
|
12758
12771
|
if (!w)
|
|
@@ -12762,14 +12775,14 @@ const e3 = I.forwardRef(
|
|
|
12762
12775
|
return;
|
|
12763
12776
|
const { start: ge, end: Me } = w;
|
|
12764
12777
|
W.setSelectionRange(ge, Me);
|
|
12765
|
-
}, [
|
|
12778
|
+
}, [O]);
|
|
12766
12779
|
const Mt = g ?? {}, {
|
|
12767
12780
|
styles: Xt,
|
|
12768
12781
|
components: Nt,
|
|
12769
12782
|
classNamePrefix: cn,
|
|
12770
12783
|
formatOptionLabel: Wt,
|
|
12771
12784
|
...ct
|
|
12772
|
-
} = Mt, { noOptionsMessage:
|
|
12785
|
+
} = Mt, { noOptionsMessage: B, ...ue } = ct, $e = I.useMemo(
|
|
12773
12786
|
() => ({
|
|
12774
12787
|
...Kh,
|
|
12775
12788
|
...Xt ?? {}
|
|
@@ -12794,10 +12807,10 @@ const e3 = I.forwardRef(
|
|
|
12794
12807
|
}, [Nt]), at = I.useRef(!1), Ze = I.useCallback(
|
|
12795
12808
|
(w) => {
|
|
12796
12809
|
at.current = !0;
|
|
12797
|
-
const W =
|
|
12810
|
+
const W = V(w);
|
|
12798
12811
|
return s?.(w, W), W;
|
|
12799
12812
|
},
|
|
12800
|
-
[s,
|
|
12813
|
+
[s, V]
|
|
12801
12814
|
);
|
|
12802
12815
|
I.useEffect(() => () => {
|
|
12803
12816
|
ve.current != null && typeof window < "u" && window.clearTimeout(ve.current);
|
|
@@ -12809,7 +12822,7 @@ const e3 = I.forwardRef(
|
|
|
12809
12822
|
previousValue: w
|
|
12810
12823
|
});
|
|
12811
12824
|
if (R.current = W, me.current = "", !W) {
|
|
12812
|
-
M(""), T(!1), $(""), re(null), F.current = null, ye(!1), !Te &&
|
|
12825
|
+
M(""), T(!1), $(""), re(null), F.current = null, ye(!1), !Te && D !== X && (j(X), Ze(X));
|
|
12813
12826
|
return;
|
|
12814
12827
|
}
|
|
12815
12828
|
if (W === "0") {
|
|
@@ -12817,7 +12830,7 @@ const e3 = I.forwardRef(
|
|
|
12817
12830
|
return;
|
|
12818
12831
|
}
|
|
12819
12832
|
if (W === "+") {
|
|
12820
|
-
M("+"), T(!0), $(""), re(null), F.current = null, ye(!1), !Te &&
|
|
12833
|
+
M("+"), T(!0), $(""), re(null), F.current = null, ye(!1), !Te && D !== X && (j(X), Ze(X));
|
|
12821
12834
|
return;
|
|
12822
12835
|
}
|
|
12823
12836
|
const {
|
|
@@ -12843,7 +12856,7 @@ const e3 = I.forwardRef(
|
|
|
12843
12856
|
hasExplicitInternationalPrefix: le
|
|
12844
12857
|
}
|
|
12845
12858
|
), Ht = !lt.shouldSuggest && !Q ? Ae : void 0, Ct = Ht ?? pe;
|
|
12846
|
-
!Te && Ct !==
|
|
12859
|
+
!Te && Ct !== D && (j(Ct), Ze(Ct)), pe = Ct, F.current && F.current !== pe && (F.current = null);
|
|
12847
12860
|
const Jt = Le(pe), gn = Ht ? qt(
|
|
12848
12861
|
Ee,
|
|
12849
12862
|
Ue,
|
|
@@ -12862,24 +12875,24 @@ const e3 = I.forwardRef(
|
|
|
12862
12875
|
X,
|
|
12863
12876
|
Te,
|
|
12864
12877
|
Ze,
|
|
12865
|
-
|
|
12878
|
+
D
|
|
12866
12879
|
]), I.useEffect(() => {
|
|
12867
12880
|
if (at.current)
|
|
12868
12881
|
return;
|
|
12869
12882
|
const w = $t ?? X;
|
|
12870
12883
|
w && Ze(w);
|
|
12871
12884
|
}, [X, Ze, $t]), I.useEffect(() => {
|
|
12872
|
-
Te && o && o !==
|
|
12873
|
-
}, [o, Te,
|
|
12885
|
+
Te && o && o !== D && j(o);
|
|
12886
|
+
}, [o, Te, D]);
|
|
12874
12887
|
const wt = I.useCallback(
|
|
12875
12888
|
(w) => {
|
|
12876
|
-
const W =
|
|
12889
|
+
const W = V(w.country);
|
|
12877
12890
|
u?.({
|
|
12878
12891
|
...w,
|
|
12879
12892
|
selectedCountry: W
|
|
12880
12893
|
});
|
|
12881
12894
|
},
|
|
12882
|
-
[u,
|
|
12895
|
+
[u, V]
|
|
12883
12896
|
), Bt = I.useCallback(() => {
|
|
12884
12897
|
typeof window > "u" || (ve.current != null && window.clearTimeout(ve.current), ve.current = window.setTimeout(() => {
|
|
12885
12898
|
me.current = "", ve.current = null;
|
|
@@ -12896,7 +12909,7 @@ const e3 = I.forwardRef(
|
|
|
12896
12909
|
if (R.current = Qe, !Qe) {
|
|
12897
12910
|
M(""), T(!1), $(""), H(-1), re(null), F.current = null, ye(!1), Xe.current = pr(ge, "");
|
|
12898
12911
|
const Be = X;
|
|
12899
|
-
!Te &&
|
|
12912
|
+
!Te && D !== Be && (j(Be), Ze(Be));
|
|
12900
12913
|
const bn = Le(Be);
|
|
12901
12914
|
wt({
|
|
12902
12915
|
formattedInternational: "",
|
|
@@ -12913,7 +12926,7 @@ const e3 = I.forwardRef(
|
|
|
12913
12926
|
if (Qe === "0") {
|
|
12914
12927
|
M("0"), T(!1), $(""), H(-1), re(null), F.current = null, ye(!1), Xe.current = pr(ge, "0");
|
|
12915
12928
|
const Be = X;
|
|
12916
|
-
!Te &&
|
|
12929
|
+
!Te && D !== Be && (j(Be), Ze(Be));
|
|
12917
12930
|
const bn = Le(Be);
|
|
12918
12931
|
wt({
|
|
12919
12932
|
formattedInternational: "0",
|
|
@@ -12930,7 +12943,7 @@ const e3 = I.forwardRef(
|
|
|
12930
12943
|
if (Qe === "+") {
|
|
12931
12944
|
M("+"), T(!0), $(""), H(0), re(null), F.current = null, ye(!1), Xe.current = pr(ge, "+");
|
|
12932
12945
|
const Be = X;
|
|
12933
|
-
!Te &&
|
|
12946
|
+
!Te && D !== Be && (j(Be), Ze(Be));
|
|
12934
12947
|
const bn = Le(Be);
|
|
12935
12948
|
wt({
|
|
12936
12949
|
formattedInternational: "+",
|
|
@@ -12968,7 +12981,7 @@ const e3 = I.forwardRef(
|
|
|
12968
12981
|
hasExplicitInternationalPrefix: Kn
|
|
12969
12982
|
}
|
|
12970
12983
|
), Fo = !pn.shouldSuggest && !Ut ? gn : void 0, er = Fo ?? Rt;
|
|
12971
|
-
!Te && er !==
|
|
12984
|
+
!Te && er !== D && (j(er), Ze(er)), Rt = er, F.current && F.current !== Rt && (F.current = null);
|
|
12972
12985
|
const tr = Le(Rt), gl = He(Qe), pl = Ji(gl, tr), bl = Fo ? qt(
|
|
12973
12986
|
le,
|
|
12974
12987
|
qn,
|
|
@@ -12999,13 +13012,13 @@ const e3 = I.forwardRef(
|
|
|
12999
13012
|
X,
|
|
13000
13013
|
Te,
|
|
13001
13014
|
Ze,
|
|
13002
|
-
|
|
13015
|
+
D
|
|
13003
13016
|
]
|
|
13004
13017
|
), fn = I.useCallback(
|
|
13005
13018
|
(w) => {
|
|
13006
13019
|
if (!w)
|
|
13007
13020
|
return;
|
|
13008
|
-
const W = He(R.current ||
|
|
13021
|
+
const W = He(R.current || O), ge = Le(Ie);
|
|
13009
13022
|
let Ce = W.startsWith(ge) ? W.slice(ge.length) : W;
|
|
13010
13023
|
Ce ? Ce.startsWith(w.dialCode) || (Ce = `${w.dialCode}${Ce}`) : Ce = w.dialCode;
|
|
13011
13024
|
const Ae = `+${Ce}`;
|
|
@@ -13017,7 +13030,7 @@ const e3 = I.forwardRef(
|
|
|
13017
13030
|
F.current = Ee, M(le), Xe.current = {
|
|
13018
13031
|
start: le.length,
|
|
13019
13032
|
end: le.length
|
|
13020
|
-
}, T(!1), $(""), H(-1), re(Ii(Ae, Ee)), !Te && Ee !==
|
|
13033
|
+
}, T(!1), $(""), H(-1), re(Ii(Ae, Ee)), !Te && Ee !== D && j(Ee), Ze(Ee);
|
|
13021
13034
|
const et = He(Ae), Ue = pe?.countryCallingCode ?? w.dialCode, Lt = Ji(et, Ue);
|
|
13022
13035
|
ye(!0), wt({
|
|
13023
13036
|
formattedInternational: le,
|
|
@@ -13032,7 +13045,7 @@ const e3 = I.forwardRef(
|
|
|
13032
13045
|
ot.current?.focus();
|
|
13033
13046
|
});
|
|
13034
13047
|
},
|
|
13035
|
-
[Ie, wt,
|
|
13048
|
+
[Ie, wt, O, Te, Ze, D]
|
|
13036
13049
|
), xe = I.useMemo(() => {
|
|
13037
13050
|
if (!P)
|
|
13038
13051
|
return [];
|
|
@@ -13062,10 +13075,10 @@ const e3 = I.forwardRef(
|
|
|
13062
13075
|
}
|
|
13063
13076
|
H((w) => w < 0 || w >= xe.length ? 0 : w);
|
|
13064
13077
|
}, [xe, yt]);
|
|
13065
|
-
const zt =
|
|
13078
|
+
const zt = _ >= 0 ? xe[_] ?? null : null;
|
|
13066
13079
|
I.useEffect(() => {
|
|
13067
|
-
|
|
13068
|
-
}, [
|
|
13080
|
+
_ < 0 && (Pe.current = "smooth");
|
|
13081
|
+
}, [_]);
|
|
13069
13082
|
const Qn = I.useCallback(
|
|
13070
13083
|
(w) => {
|
|
13071
13084
|
const W = xe.findIndex((ge) => ge.value === w.value);
|
|
@@ -13090,7 +13103,7 @@ const e3 = I.forwardRef(
|
|
|
13090
13103
|
consumeScrollBehavior: nt
|
|
13091
13104
|
}),
|
|
13092
13105
|
[nt, zt, je, Qn]
|
|
13093
|
-
), st = G.find((w) => w.value === Ie), ze = st?.flag ?? "", Je =
|
|
13106
|
+
), st = G.find((w) => w.value === Ie), ze = st?.flag ?? "", Je = ne ? L.selectedCountryLabel(st?.name ?? Ie ?? null) : L.selectCountryLabel, rt = ne && !!ze, Pt = ie === "TOO_LONG" ? L.lengthTooLong(st?.name ?? Ie ?? null) : null, Oe = I.useCallback(
|
|
13094
13107
|
(w) => {
|
|
13095
13108
|
me.current = `${me.current}${w}`.slice(-12), $(me.current), T(!0), Bt();
|
|
13096
13109
|
},
|
|
@@ -13198,7 +13211,7 @@ const e3 = I.forwardRef(
|
|
|
13198
13211
|
d
|
|
13199
13212
|
),
|
|
13200
13213
|
name: S,
|
|
13201
|
-
value:
|
|
13214
|
+
value: O,
|
|
13202
13215
|
onChange: Un,
|
|
13203
13216
|
onFocus: gt,
|
|
13204
13217
|
onBlur: jt,
|
|
@@ -13263,7 +13276,7 @@ const e3 = I.forwardRef(
|
|
|
13263
13276
|
classNamePrefix: cn ?? "phone-number-suggestions",
|
|
13264
13277
|
placeholder: "",
|
|
13265
13278
|
formatOptionLabel: Fe,
|
|
13266
|
-
noOptionsMessage:
|
|
13279
|
+
noOptionsMessage: B ?? (() => L.noMatches)
|
|
13267
13280
|
}
|
|
13268
13281
|
) })
|
|
13269
13282
|
}
|
|
@@ -13288,7 +13301,7 @@ const t3 = ({
|
|
|
13288
13301
|
u(!1);
|
|
13289
13302
|
}, 120);
|
|
13290
13303
|
};
|
|
13291
|
-
return
|
|
13304
|
+
return te(() => () => {
|
|
13292
13305
|
s.current && clearTimeout(s.current);
|
|
13293
13306
|
}, []), /* @__PURE__ */ x.jsxs(
|
|
13294
13307
|
"div",
|