etudes 19.5.0 → 19.5.2
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/build/etudes.js +867 -844
- package/build/etudes.umd.cjs +8 -8
- package/build/hooks/useIntersectionObserver.d.ts +23 -0
- package/build/hooks/usePosition.d.ts +3 -1
- package/build/index.d.ts +1 -0
- package/package.json +1 -1
package/build/etudes.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import Ns, { useRef as Ee, useEffect as Ne, useLayoutEffect as
|
|
2
|
-
function
|
|
1
|
+
import Ns, { useRef as Ee, useEffect as Ne, useLayoutEffect as Re, useState as _e, Fragment as Io, cloneElement as Ss, Children as an, isValidElement as cn, forwardRef as Oe, useCallback as he, useMemo as fr, createContext as Ts, useContext as dr } from "react";
|
|
2
|
+
function jo(e) {
|
|
3
3
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
4
4
|
}
|
|
5
5
|
var Xt = { exports: {} }, Nt = {};
|
|
@@ -45,7 +45,7 @@ var St = {};
|
|
|
45
45
|
* LICENSE file in the root directory of this source tree.
|
|
46
46
|
*/
|
|
47
47
|
var fo;
|
|
48
|
-
function
|
|
48
|
+
function Os() {
|
|
49
49
|
return fo || (fo = 1, process.env.NODE_ENV !== "production" && function() {
|
|
50
50
|
function e(T) {
|
|
51
51
|
if (T == null) return null;
|
|
@@ -57,7 +57,7 @@ function Ps() {
|
|
|
57
57
|
return "Fragment";
|
|
58
58
|
case K:
|
|
59
59
|
return "Profiler";
|
|
60
|
-
case
|
|
60
|
+
case I:
|
|
61
61
|
return "StrictMode";
|
|
62
62
|
case E:
|
|
63
63
|
return "Suspense";
|
|
@@ -190,17 +190,17 @@ function Ps() {
|
|
|
190
190
|
if (Q)
|
|
191
191
|
if (X(me)) {
|
|
192
192
|
for (Q = 0; Q < me.length; Q++)
|
|
193
|
-
|
|
193
|
+
O(me[Q]);
|
|
194
194
|
Object.freeze && Object.freeze(me);
|
|
195
195
|
} else
|
|
196
196
|
console.error(
|
|
197
197
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
198
198
|
);
|
|
199
|
-
else
|
|
199
|
+
else O(me);
|
|
200
200
|
if (W.call(V, "key")) {
|
|
201
201
|
me = e(T);
|
|
202
|
-
var G = Object.keys(V).filter(function(
|
|
203
|
-
return
|
|
202
|
+
var G = Object.keys(V).filter(function(Ie) {
|
|
203
|
+
return Ie !== "key";
|
|
204
204
|
});
|
|
205
205
|
Q = 0 < G.length ? "{key: someKey, " + G.join(": ..., ") + ": ...}" : "{key: someKey}", F[me + Q] || (G = 0 < G.length ? "{" + G.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
206
206
|
`A props object containing a "key" prop is being spread into JSX:
|
|
@@ -234,10 +234,10 @@ React keys must be passed directly to JSX without using spread:
|
|
|
234
234
|
be
|
|
235
235
|
);
|
|
236
236
|
}
|
|
237
|
-
function
|
|
237
|
+
function O(T) {
|
|
238
238
|
typeof T == "object" && T !== null && T.$$typeof === $ && T._store && (T._store.validated = 1);
|
|
239
239
|
}
|
|
240
|
-
var C = Ns, $ = Symbol.for("react.transitional.element"), M = Symbol.for("react.portal"), w = Symbol.for("react.fragment"),
|
|
240
|
+
var C = Ns, $ = Symbol.for("react.transitional.element"), M = Symbol.for("react.portal"), w = Symbol.for("react.fragment"), I = Symbol.for("react.strict_mode"), K = Symbol.for("react.profiler"), J = Symbol.for("react.consumer"), Y = Symbol.for("react.context"), q = Symbol.for("react.forward_ref"), E = Symbol.for("react.suspense"), k = Symbol.for("react.suspense_list"), N = Symbol.for("react.memo"), A = Symbol.for("react.lazy"), B = Symbol.for("react.activity"), U = Symbol.for("react.client.reference"), oe = C.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, W = Object.prototype.hasOwnProperty, X = Array.isArray, L = console.createTask ? console.createTask : function() {
|
|
241
241
|
return null;
|
|
242
242
|
};
|
|
243
243
|
C = {
|
|
@@ -277,10 +277,10 @@ React keys must be passed directly to JSX without using spread:
|
|
|
277
277
|
}()), St;
|
|
278
278
|
}
|
|
279
279
|
var po;
|
|
280
|
-
function
|
|
281
|
-
return po || (po = 1, process.env.NODE_ENV === "production" ? Xt.exports = /* @__PURE__ */ _s() : Xt.exports = /* @__PURE__ */
|
|
280
|
+
function Ps() {
|
|
281
|
+
return po || (po = 1, process.env.NODE_ENV === "production" ? Xt.exports = /* @__PURE__ */ _s() : Xt.exports = /* @__PURE__ */ Os()), Xt.exports;
|
|
282
282
|
}
|
|
283
|
-
var x = /* @__PURE__ */
|
|
283
|
+
var x = /* @__PURE__ */ Ps();
|
|
284
284
|
function $o(e) {
|
|
285
285
|
var r, i, a = "";
|
|
286
286
|
if (typeof e == "string" || typeof e == "number") a += e;
|
|
@@ -294,9 +294,9 @@ function se() {
|
|
|
294
294
|
for (var e, r, i = 0, a = "", l = arguments.length; i < l; i++) (e = arguments[i]) && (r = $o(e)) && (a && (a += " "), a += r);
|
|
295
295
|
return a;
|
|
296
296
|
}
|
|
297
|
-
var
|
|
297
|
+
var jn, ho;
|
|
298
298
|
function ks() {
|
|
299
|
-
return ho || (ho = 1,
|
|
299
|
+
return ho || (ho = 1, jn = function e(r, i) {
|
|
300
300
|
if (r === i) return !0;
|
|
301
301
|
if (r && i && typeof r == "object" && typeof i == "object") {
|
|
302
302
|
if (r.constructor !== i.constructor) return !1;
|
|
@@ -321,16 +321,16 @@ function ks() {
|
|
|
321
321
|
return !0;
|
|
322
322
|
}
|
|
323
323
|
return r !== r && i !== i;
|
|
324
|
-
}),
|
|
324
|
+
}), jn;
|
|
325
325
|
}
|
|
326
326
|
var Cs = /* @__PURE__ */ ks();
|
|
327
|
-
const qe = /* @__PURE__ */
|
|
328
|
-
var
|
|
327
|
+
const qe = /* @__PURE__ */ jo(Cs);
|
|
328
|
+
var Te;
|
|
329
329
|
((e) => {
|
|
330
330
|
e.zero = r();
|
|
331
|
-
function r(w = 0,
|
|
331
|
+
function r(w = 0, I = 0) {
|
|
332
332
|
if (typeof w == "number")
|
|
333
|
-
return { x: w, y:
|
|
333
|
+
return { x: w, y: I };
|
|
334
334
|
if (!C(w)) throw Error("Invalid parameters passed to constructor");
|
|
335
335
|
return w instanceof Array ? {
|
|
336
336
|
x: w[0],
|
|
@@ -341,38 +341,38 @@ var Se;
|
|
|
341
341
|
};
|
|
342
342
|
}
|
|
343
343
|
e.make = r;
|
|
344
|
-
function i(w,
|
|
344
|
+
function i(w, I = {}) {
|
|
345
345
|
return r({
|
|
346
|
-
x: typeof
|
|
347
|
-
y: typeof
|
|
346
|
+
x: typeof I.x == "number" ? I.x : w.x,
|
|
347
|
+
y: typeof I.y == "number" ? I.y : w.y
|
|
348
348
|
});
|
|
349
349
|
}
|
|
350
350
|
e.clone = i;
|
|
351
|
-
function a(w,
|
|
351
|
+
function a(w, I) {
|
|
352
352
|
return r({
|
|
353
|
-
x: w.x +
|
|
354
|
-
y: w.y +
|
|
353
|
+
x: w.x + I.x,
|
|
354
|
+
y: w.y + I.y
|
|
355
355
|
});
|
|
356
356
|
}
|
|
357
357
|
e.add = a;
|
|
358
|
-
function l(w,
|
|
358
|
+
function l(w, I) {
|
|
359
359
|
return r({
|
|
360
|
-
x: w.x -
|
|
361
|
-
y: w.y -
|
|
360
|
+
x: w.x - I.x,
|
|
361
|
+
y: w.y - I.y
|
|
362
362
|
});
|
|
363
363
|
}
|
|
364
364
|
e.subtract = l;
|
|
365
|
-
function u(w,
|
|
365
|
+
function u(w, I) {
|
|
366
366
|
return r({
|
|
367
|
-
x: w.x *
|
|
368
|
-
y: w.y *
|
|
367
|
+
x: w.x * I.x,
|
|
368
|
+
y: w.y * I.y
|
|
369
369
|
});
|
|
370
370
|
}
|
|
371
371
|
e.multiply = u;
|
|
372
|
-
function p(w,
|
|
372
|
+
function p(w, I) {
|
|
373
373
|
return r({
|
|
374
|
-
x: w.x /
|
|
375
|
-
y: w.y /
|
|
374
|
+
x: w.x / I.x,
|
|
375
|
+
y: w.y / I.y
|
|
376
376
|
});
|
|
377
377
|
}
|
|
378
378
|
e.divide = p;
|
|
@@ -383,8 +383,8 @@ var Se;
|
|
|
383
383
|
});
|
|
384
384
|
}
|
|
385
385
|
e.invert = g;
|
|
386
|
-
function m(w,
|
|
387
|
-
return !(w.x !==
|
|
386
|
+
function m(w, I) {
|
|
387
|
+
return !(w.x !== I.x || w.y !== I.y);
|
|
388
388
|
}
|
|
389
389
|
e.isEqual = m;
|
|
390
390
|
function S(w) {
|
|
@@ -398,10 +398,10 @@ var Se;
|
|
|
398
398
|
});
|
|
399
399
|
}
|
|
400
400
|
e.toJSON = _;
|
|
401
|
-
function
|
|
401
|
+
function O(w) {
|
|
402
402
|
return [w.x, w.y];
|
|
403
403
|
}
|
|
404
|
-
e.toArray =
|
|
404
|
+
e.toArray = O;
|
|
405
405
|
function C(w) {
|
|
406
406
|
return w instanceof Array ? !(w.length !== 2 || typeof w[0] != "number" || typeof w[1] != "number") : typeof w == "object" ? !(typeof w.x != "number" || typeof w.y != "number") : !1;
|
|
407
407
|
}
|
|
@@ -414,10 +414,10 @@ var Se;
|
|
|
414
414
|
return w.x === 0 && w.y === 0;
|
|
415
415
|
}
|
|
416
416
|
e.isZero = M;
|
|
417
|
-
})(
|
|
418
|
-
function
|
|
417
|
+
})(Te || (Te = {}));
|
|
418
|
+
function Is(e, r) {
|
|
419
419
|
try {
|
|
420
|
-
const i =
|
|
420
|
+
const i = Te.isValidDescriptor(e) && Te.make(e), a = Te.isValidDescriptor(r) && Te.make(r);
|
|
421
421
|
if (i && !a) {
|
|
422
422
|
const l = r instanceof Array ? r : [r], u = l.length;
|
|
423
423
|
for (let p = 0; p < u; p++) {
|
|
@@ -438,7 +438,7 @@ function js(e, r) {
|
|
|
438
438
|
return !1;
|
|
439
439
|
} else {
|
|
440
440
|
if (i && a)
|
|
441
|
-
return
|
|
441
|
+
return Te.isEqual(i, a);
|
|
442
442
|
{
|
|
443
443
|
const l = [
|
|
444
444
|
...e instanceof Array ? e : [e],
|
|
@@ -451,12 +451,12 @@ function js(e, r) {
|
|
|
451
451
|
return console.error(i), !1;
|
|
452
452
|
}
|
|
453
453
|
}
|
|
454
|
-
var
|
|
454
|
+
var je;
|
|
455
455
|
((e) => {
|
|
456
456
|
e.zero = r();
|
|
457
|
-
function r(w = 0,
|
|
457
|
+
function r(w = 0, I = 0) {
|
|
458
458
|
if (typeof w == "number")
|
|
459
|
-
return { width: w, height:
|
|
459
|
+
return { width: w, height: I };
|
|
460
460
|
if (!C(w)) throw Error("Invalid parameters passed to constructor");
|
|
461
461
|
return w instanceof Array ? {
|
|
462
462
|
width: w[0],
|
|
@@ -467,38 +467,38 @@ var Ie;
|
|
|
467
467
|
};
|
|
468
468
|
}
|
|
469
469
|
e.make = r;
|
|
470
|
-
function i(w,
|
|
470
|
+
function i(w, I = {}) {
|
|
471
471
|
return r({
|
|
472
|
-
width: typeof
|
|
473
|
-
height: typeof
|
|
472
|
+
width: typeof I.width == "number" ? I.width : w.width,
|
|
473
|
+
height: typeof I.height == "number" ? I.height : w.height
|
|
474
474
|
});
|
|
475
475
|
}
|
|
476
476
|
e.clone = i;
|
|
477
|
-
function a(w,
|
|
477
|
+
function a(w, I) {
|
|
478
478
|
return r({
|
|
479
|
-
width: w.width +
|
|
480
|
-
height: w.height +
|
|
479
|
+
width: w.width + I.width,
|
|
480
|
+
height: w.height + I.height
|
|
481
481
|
});
|
|
482
482
|
}
|
|
483
483
|
e.add = a;
|
|
484
|
-
function l(w,
|
|
484
|
+
function l(w, I) {
|
|
485
485
|
return r({
|
|
486
|
-
width: w.width -
|
|
487
|
-
height: w.height -
|
|
486
|
+
width: w.width - I.width,
|
|
487
|
+
height: w.height - I.height
|
|
488
488
|
});
|
|
489
489
|
}
|
|
490
490
|
e.subtract = l;
|
|
491
|
-
function u(w,
|
|
491
|
+
function u(w, I) {
|
|
492
492
|
return r({
|
|
493
|
-
width: w.width *
|
|
494
|
-
height: w.height *
|
|
493
|
+
width: w.width * I.width,
|
|
494
|
+
height: w.height * I.height
|
|
495
495
|
});
|
|
496
496
|
}
|
|
497
497
|
e.multiply = u;
|
|
498
|
-
function p(w,
|
|
498
|
+
function p(w, I) {
|
|
499
499
|
return r({
|
|
500
|
-
width: w.width /
|
|
501
|
-
height: w.height /
|
|
500
|
+
width: w.width / I.width,
|
|
501
|
+
height: w.height / I.height
|
|
502
502
|
});
|
|
503
503
|
}
|
|
504
504
|
e.divide = p;
|
|
@@ -509,8 +509,8 @@ var Ie;
|
|
|
509
509
|
});
|
|
510
510
|
}
|
|
511
511
|
e.invert = g;
|
|
512
|
-
function m(w,
|
|
513
|
-
return !(w.width !==
|
|
512
|
+
function m(w, I) {
|
|
513
|
+
return !(w.width !== I.width || w.height !== I.height);
|
|
514
514
|
}
|
|
515
515
|
e.isEqual = m;
|
|
516
516
|
function S(w) {
|
|
@@ -524,10 +524,10 @@ var Ie;
|
|
|
524
524
|
});
|
|
525
525
|
}
|
|
526
526
|
e.toJSON = _;
|
|
527
|
-
function
|
|
527
|
+
function O(w) {
|
|
528
528
|
return [w.width, w.height];
|
|
529
529
|
}
|
|
530
|
-
e.toArray =
|
|
530
|
+
e.toArray = O;
|
|
531
531
|
function C(w) {
|
|
532
532
|
return w instanceof Array ? !(w.length !== 2 || typeof w[0] != "number" || typeof w[1] != "number") : typeof w == "object" ? !(typeof w.width != "number" || typeof w.height != "number") : !1;
|
|
533
533
|
}
|
|
@@ -540,7 +540,7 @@ var Ie;
|
|
|
540
540
|
return w.width === 0 && w.height === 0;
|
|
541
541
|
}
|
|
542
542
|
e.isZero = M;
|
|
543
|
-
})(
|
|
543
|
+
})(je || (je = {}));
|
|
544
544
|
var xe;
|
|
545
545
|
((e) => {
|
|
546
546
|
e.zero = r();
|
|
@@ -555,7 +555,7 @@ var xe;
|
|
|
555
555
|
width: N,
|
|
556
556
|
height: A
|
|
557
557
|
};
|
|
558
|
-
} else if (
|
|
558
|
+
} else if (Te.isPoint(E) && je.isSize(k)) {
|
|
559
559
|
const B = E, U = k;
|
|
560
560
|
return {
|
|
561
561
|
top: B.y,
|
|
@@ -580,14 +580,14 @@ var xe;
|
|
|
580
580
|
}
|
|
581
581
|
e.make = r;
|
|
582
582
|
function i(E) {
|
|
583
|
-
return
|
|
583
|
+
return Te.make({
|
|
584
584
|
x: (E.right - E.left) / 2 + E.left,
|
|
585
585
|
y: (E.bottom - E.top) / 2 + E.top
|
|
586
586
|
});
|
|
587
587
|
}
|
|
588
588
|
e.center = i;
|
|
589
589
|
function a(E) {
|
|
590
|
-
return
|
|
590
|
+
return je.make({
|
|
591
591
|
width: E.width,
|
|
592
592
|
height: E.height
|
|
593
593
|
});
|
|
@@ -671,7 +671,7 @@ var xe;
|
|
|
671
671
|
}
|
|
672
672
|
}
|
|
673
673
|
e.intersecting = _;
|
|
674
|
-
function
|
|
674
|
+
function O(E, k = {}) {
|
|
675
675
|
return r({
|
|
676
676
|
x: typeof k.x == "number" ? k.x : E.left,
|
|
677
677
|
y: typeof k.y == "number" ? k.y : E.top,
|
|
@@ -679,7 +679,7 @@ var xe;
|
|
|
679
679
|
height: typeof k.height == "number" ? k.height : E.height
|
|
680
680
|
});
|
|
681
681
|
}
|
|
682
|
-
e.clone =
|
|
682
|
+
e.clone = O;
|
|
683
683
|
function C(E, k) {
|
|
684
684
|
return r({
|
|
685
685
|
x: Math.min(E.left, k.left),
|
|
@@ -703,13 +703,13 @@ var xe;
|
|
|
703
703
|
}
|
|
704
704
|
e.isEqual = M;
|
|
705
705
|
function w(E, k) {
|
|
706
|
-
return
|
|
706
|
+
return Is(k, E);
|
|
707
707
|
}
|
|
708
708
|
e.contains = w;
|
|
709
|
-
function
|
|
709
|
+
function I(E) {
|
|
710
710
|
return `Rect(top=${E.top}, right=${E.right}, bottom=${E.bottom}, left=${E.left}, width=${E.width}, height=${E.height})`;
|
|
711
711
|
}
|
|
712
|
-
e.toString =
|
|
712
|
+
e.toString = I;
|
|
713
713
|
function K(E) {
|
|
714
714
|
return Object.freeze({
|
|
715
715
|
top: E.top,
|
|
@@ -737,15 +737,15 @@ var xe;
|
|
|
737
737
|
function Tt(e) {
|
|
738
738
|
return e === window;
|
|
739
739
|
}
|
|
740
|
-
function
|
|
740
|
+
function Se(e) {
|
|
741
741
|
const r = Ee(e);
|
|
742
742
|
return Ne(() => {
|
|
743
743
|
r.current = e;
|
|
744
744
|
}, [e]), r;
|
|
745
745
|
}
|
|
746
746
|
function pr(e, { onResize: r }) {
|
|
747
|
-
const i =
|
|
748
|
-
|
|
747
|
+
const i = Se(r);
|
|
748
|
+
Re(() => {
|
|
749
749
|
const a = e.current;
|
|
750
750
|
if (!a) return;
|
|
751
751
|
const l = new ResizeObserver(() => {
|
|
@@ -772,7 +772,7 @@ function ln({
|
|
|
772
772
|
}) {
|
|
773
773
|
if (e == null) return /* @__PURE__ */ x.jsx(x.Fragment, {});
|
|
774
774
|
if (!(e instanceof Array)) throw TypeError(`Provided list <${e}> is not an array`);
|
|
775
|
-
return /* @__PURE__ */ x.jsx(x.Fragment, { children: e.map((a, l) => /* @__PURE__ */ x.jsx(
|
|
775
|
+
return /* @__PURE__ */ x.jsx(x.Fragment, { children: e.map((a, l) => /* @__PURE__ */ x.jsx(Io, { children: i?.(a, l) ?? (typeof r == "function" ? r(a, l) : r) }, `item-${l}`)) });
|
|
776
776
|
}
|
|
777
777
|
process.env.NODE_ENV === "development" && (ln.displayName = "Each");
|
|
778
778
|
function hr(e, r = {}, ...i) {
|
|
@@ -830,7 +830,7 @@ function le(...e) {
|
|
|
830
830
|
...i || {}
|
|
831
831
|
}), {});
|
|
832
832
|
}
|
|
833
|
-
const gr = /* @__PURE__ */
|
|
833
|
+
const gr = /* @__PURE__ */ Oe(({
|
|
834
834
|
className: e,
|
|
835
835
|
children: r,
|
|
836
836
|
style: i,
|
|
@@ -842,12 +842,12 @@ const gr = /* @__PURE__ */ Pe(({
|
|
|
842
842
|
numSegments: m = 1,
|
|
843
843
|
orientation: S = "vertical",
|
|
844
844
|
selection: _,
|
|
845
|
-
selectionMode:
|
|
845
|
+
selectionMode: O = "none",
|
|
846
846
|
onActivateAt: C,
|
|
847
847
|
onDeselectAt: $,
|
|
848
848
|
onCustomEvent: M,
|
|
849
849
|
onSelectAt: w,
|
|
850
|
-
onSelectionChange:
|
|
850
|
+
onSelectionChange: I,
|
|
851
851
|
ItemComponent: K,
|
|
852
852
|
...J
|
|
853
853
|
}, Y) => {
|
|
@@ -856,7 +856,7 @@ const gr = /* @__PURE__ */ Pe(({
|
|
|
856
856
|
}, A = (X) => {
|
|
857
857
|
if (k(X)) return;
|
|
858
858
|
let L;
|
|
859
|
-
switch (
|
|
859
|
+
switch (O) {
|
|
860
860
|
case "multiple": {
|
|
861
861
|
L = (te) => Mo([...te.filter((ae) => ae !== X), X]);
|
|
862
862
|
break;
|
|
@@ -875,16 +875,16 @@ const gr = /* @__PURE__ */ Pe(({
|
|
|
875
875
|
const L = (te) => te.filter((ae) => ae !== X), R = q, Z = L(q);
|
|
876
876
|
oe(R, Z);
|
|
877
877
|
}, U = (X) => {
|
|
878
|
-
C?.(X),
|
|
878
|
+
C?.(X), O !== "none" && (a ? N(X) : A(X));
|
|
879
879
|
}, oe = (X, L) => {
|
|
880
880
|
if (qe(X, L)) return;
|
|
881
881
|
const R = X?.filter((te) => L.indexOf(te) === -1) ?? [], Z = L.filter((te) => X?.indexOf(te) === -1);
|
|
882
|
-
R.forEach((te) => $?.(te)), Z.forEach((te) => w?.(te)),
|
|
882
|
+
R.forEach((te) => $?.(te)), Z.forEach((te) => w?.(te)), I?.(L);
|
|
883
883
|
};
|
|
884
884
|
Ne(() => {
|
|
885
885
|
const X = q;
|
|
886
886
|
let L;
|
|
887
|
-
switch (
|
|
887
|
+
switch (O) {
|
|
888
888
|
case "multiple":
|
|
889
889
|
L = q;
|
|
890
890
|
break;
|
|
@@ -896,7 +896,7 @@ const gr = /* @__PURE__ */ Pe(({
|
|
|
896
896
|
break;
|
|
897
897
|
}
|
|
898
898
|
oe(X, L);
|
|
899
|
-
}, [
|
|
899
|
+
}, [O]);
|
|
900
900
|
const W = Le(r, {
|
|
901
901
|
item: kt
|
|
902
902
|
});
|
|
@@ -905,12 +905,12 @@ const gr = /* @__PURE__ */ Pe(({
|
|
|
905
905
|
{
|
|
906
906
|
...J,
|
|
907
907
|
ref: Y,
|
|
908
|
-
"aria-multiselectable":
|
|
908
|
+
"aria-multiselectable": O === "multiple",
|
|
909
909
|
className: se(e),
|
|
910
|
-
role: g === "grid" ? "grid" :
|
|
910
|
+
role: g === "grid" ? "grid" : O === "none" ? "list" : "listbox",
|
|
911
911
|
style: le(i, E.root),
|
|
912
912
|
children: /* @__PURE__ */ x.jsx(ln, { in: p, children: (X, L) => {
|
|
913
|
-
const R = g === "grid" ? "gridcell" :
|
|
913
|
+
const R = g === "grid" ? "gridcell" : O === "none" ? "listitem" : "option", Z = k(L), te = le(E.item, {
|
|
914
914
|
pointerEvents: a !== !0 && k(L) ? "none" : "auto",
|
|
915
915
|
...L >= p.length - 1 ? {} : {
|
|
916
916
|
...g === "list" ? {
|
|
@@ -943,7 +943,7 @@ const gr = /* @__PURE__ */ Pe(({
|
|
|
943
943
|
className: se({ active: Z }),
|
|
944
944
|
element: W.item ?? /* @__PURE__ */ x.jsx(kt, {}),
|
|
945
945
|
role: R,
|
|
946
|
-
selectionMode:
|
|
946
|
+
selectionMode: O,
|
|
947
947
|
style: te,
|
|
948
948
|
onActivateAt: C,
|
|
949
949
|
onClick: () => U(L),
|
|
@@ -954,11 +954,11 @@ const gr = /* @__PURE__ */ Pe(({
|
|
|
954
954
|
}
|
|
955
955
|
);
|
|
956
956
|
}), kt = ({ children: e, selectionMode: r, onActivateAt: i, ...a }) => i || r === "single" || r === "multiple" ? /* @__PURE__ */ x.jsx("button", { ...a, children: e }) : /* @__PURE__ */ x.jsx("div", { ...a, children: e });
|
|
957
|
-
function
|
|
957
|
+
function js(e, r) {
|
|
958
958
|
return !!(isNaN(e) || e >= r.length || e < 0);
|
|
959
959
|
}
|
|
960
960
|
function $s(e, r) {
|
|
961
|
-
return Mo(e).filter((i) => !
|
|
961
|
+
return Mo(e).filter((i) => !js(i, r));
|
|
962
962
|
}
|
|
963
963
|
function Mo(e) {
|
|
964
964
|
return e.sort((r, i) => r - i);
|
|
@@ -1004,7 +1004,7 @@ function As({ itemLength: e = NaN, itemPadding: r = 0, layout: i = "collection",
|
|
|
1004
1004
|
};
|
|
1005
1005
|
}
|
|
1006
1006
|
process.env.NODE_ENV === "development" && (gr.displayName = "Collection", kt.displayName = "CollectionItem");
|
|
1007
|
-
const Ms = /* @__PURE__ */
|
|
1007
|
+
const Ms = /* @__PURE__ */ Oe(({
|
|
1008
1008
|
children: e,
|
|
1009
1009
|
style: r,
|
|
1010
1010
|
autoCollapseSections: i = !1,
|
|
@@ -1016,12 +1016,12 @@ const Ms = /* @__PURE__ */ Pe(({
|
|
|
1016
1016
|
selectionMode: m = "single",
|
|
1017
1017
|
onActivateAt: S,
|
|
1018
1018
|
onCollapseSectionAt: _,
|
|
1019
|
-
onDeselectAt:
|
|
1019
|
+
onDeselectAt: O,
|
|
1020
1020
|
onExpandedSectionsChange: C,
|
|
1021
1021
|
onExpandSectionAt: $,
|
|
1022
1022
|
onHeaderCustomEvent: M,
|
|
1023
1023
|
onItemCustomEvent: w,
|
|
1024
|
-
onSelectAt:
|
|
1024
|
+
onSelectAt: I,
|
|
1025
1025
|
onSelectionChange: K,
|
|
1026
1026
|
HeaderComponent: J,
|
|
1027
1027
|
ItemComponent: Y,
|
|
@@ -1069,7 +1069,7 @@ const Ms = /* @__PURE__ */ Pe(({
|
|
|
1069
1069
|
const ue = F?.[ee] ?? [], pe = T[ee] ?? [], be = ue.filter((G) => pe.indexOf(G) === -1), me = pe.filter((G) => ue?.indexOf(G) === -1);
|
|
1070
1070
|
ne = [...ne, ...be.map((G) => [G, ee])], Q = [...Q, ...me.map((G) => [G, ee])];
|
|
1071
1071
|
}
|
|
1072
|
-
ne.forEach((ee) =>
|
|
1072
|
+
ne.forEach((ee) => O?.(ee[0], ee[1])), Q.forEach((ee) => I?.(ee[0], ee[1])), K?.(T);
|
|
1073
1073
|
}, ae = Le(e, {
|
|
1074
1074
|
collapseIcon: zo,
|
|
1075
1075
|
expandIcon: Ro,
|
|
@@ -1078,7 +1078,7 @@ const Ms = /* @__PURE__ */ Pe(({
|
|
|
1078
1078
|
section: go
|
|
1079
1079
|
});
|
|
1080
1080
|
return /* @__PURE__ */ x.jsx("div", { ...q, ref: E, style: le(r, A.root), children: /* @__PURE__ */ x.jsx(ln, { in: p, children: (F, T) => {
|
|
1081
|
-
const { collectionPadding: V = 0, items: ne = [], itemLength: Q = 50, itemPadding: ee = 0, isSelectionTogglable: ue, layout: pe = "list", maxVisible: be = -1, numSegments: me = 1 } = F, G = pe === "list" ? ne.length : Math.ceil(ne.length / me), De = be < 0 ? G : Math.min(G, be),
|
|
1081
|
+
const { collectionPadding: V = 0, items: ne = [], itemLength: Q = 50, itemPadding: ee = 0, isSelectionTogglable: ue, layout: pe = "list", maxVisible: be = -1, numSegments: me = 1 } = F, G = pe === "list" ? ne.length : Math.ceil(ne.length / me), De = be < 0 ? G : Math.min(G, be), Ie = Q * De + ee * (De - 1), ke = !W(T), He = U[T];
|
|
1082
1082
|
return /* @__PURE__ */ x.jsxs(
|
|
1083
1083
|
ge,
|
|
1084
1084
|
{
|
|
@@ -1086,14 +1086,14 @@ const Ms = /* @__PURE__ */ Pe(({
|
|
|
1086
1086
|
style: le(A.section, l === "vertical" ? {
|
|
1087
1087
|
marginTop: T === 0 ? "0px" : `${u}px`,
|
|
1088
1088
|
...He.height > 0 ? {
|
|
1089
|
-
height: ke ? `${He.height}px` : `${
|
|
1089
|
+
height: ke ? `${He.height}px` : `${Ie + He.height + V}px`
|
|
1090
1090
|
} : {
|
|
1091
1091
|
visibility: "hidden"
|
|
1092
1092
|
}
|
|
1093
1093
|
} : {
|
|
1094
1094
|
marginLeft: T === 0 ? "0px" : `${u}px`,
|
|
1095
1095
|
...He.width > 0 ? {
|
|
1096
|
-
width: ke ? `${He.width}px` : `${
|
|
1096
|
+
width: ke ? `${He.width}px` : `${Ie + He.width + V}px`
|
|
1097
1097
|
} : {
|
|
1098
1098
|
visibility: "hidden"
|
|
1099
1099
|
}
|
|
@@ -1115,7 +1115,7 @@ const Ms = /* @__PURE__ */ Pe(({
|
|
|
1115
1115
|
section: F,
|
|
1116
1116
|
style: le(A.header),
|
|
1117
1117
|
onClick: () => X(T),
|
|
1118
|
-
onCustomEvent: (
|
|
1118
|
+
onCustomEvent: (ze, Be) => M?.(T, ze, Be)
|
|
1119
1119
|
}
|
|
1120
1120
|
) : /* @__PURE__ */ x.jsxs(
|
|
1121
1121
|
ge,
|
|
@@ -1149,13 +1149,13 @@ const Ms = /* @__PURE__ */ Pe(({
|
|
|
1149
1149
|
pointerEvents: ke ? "none" : "auto"
|
|
1150
1150
|
}, l === "vertical" ? {
|
|
1151
1151
|
width: "100%",
|
|
1152
|
-
height: `${
|
|
1152
|
+
height: `${Ie}px`,
|
|
1153
1153
|
marginTop: `${V}px`,
|
|
1154
1154
|
overflowY: be < 0 || be >= G ? "hidden" : "scroll"
|
|
1155
1155
|
} : {
|
|
1156
1156
|
marginLeft: `${V}px`,
|
|
1157
1157
|
overflowX: be < 0 || be >= G ? "hidden" : "scroll",
|
|
1158
|
-
width: `${
|
|
1158
|
+
width: `${Ie}px`,
|
|
1159
1159
|
height: "100%"
|
|
1160
1160
|
}),
|
|
1161
1161
|
children: /* @__PURE__ */ x.jsx(
|
|
@@ -1173,10 +1173,10 @@ const Ms = /* @__PURE__ */ Pe(({
|
|
|
1173
1173
|
selection: k[T] ?? [],
|
|
1174
1174
|
selectionMode: m,
|
|
1175
1175
|
style: le(l === "vertical" ? { width: "100%" } : { height: "100%" }),
|
|
1176
|
-
onActivateAt: (
|
|
1177
|
-
onCustomEvent: (
|
|
1178
|
-
onDeselectAt: (
|
|
1179
|
-
onSelectAt: (
|
|
1176
|
+
onActivateAt: (ze) => S?.(ze, T),
|
|
1177
|
+
onCustomEvent: (ze, Be, Ye) => w?.(ze, T, Be, Ye),
|
|
1178
|
+
onDeselectAt: (ze) => R(ze, T),
|
|
1179
|
+
onSelectAt: (ze) => L(ze, T),
|
|
1180
1180
|
children: !Y && (ae.item ?? /* @__PURE__ */ x.jsx(Fn, {}))
|
|
1181
1181
|
}
|
|
1182
1182
|
)
|
|
@@ -1276,13 +1276,13 @@ function Dn({
|
|
|
1276
1276
|
children: r,
|
|
1277
1277
|
render: i
|
|
1278
1278
|
}) {
|
|
1279
|
-
return /* @__PURE__ */ x.jsx(x.Fragment, { children: [...Array(e)].map((a, l) => /* @__PURE__ */ x.jsx(
|
|
1279
|
+
return /* @__PURE__ */ x.jsx(x.Fragment, { children: [...Array(e)].map((a, l) => /* @__PURE__ */ x.jsx(Io, { children: i?.(l) ?? (typeof r == "function" ? r(l) : r) }, `element-${l}`)) });
|
|
1280
1280
|
}
|
|
1281
1281
|
process.env.NODE_ENV === "development" && (Dn.displayName = "Repeat");
|
|
1282
|
-
function
|
|
1282
|
+
function kl(e) {
|
|
1283
1283
|
return e;
|
|
1284
1284
|
}
|
|
1285
|
-
const Fo = /* @__PURE__ */
|
|
1285
|
+
const Fo = /* @__PURE__ */ Oe(({
|
|
1286
1286
|
children: e,
|
|
1287
1287
|
className: r,
|
|
1288
1288
|
isActive: i = !1,
|
|
@@ -1307,7 +1307,7 @@ const Fo = /* @__PURE__ */ Pe(({
|
|
|
1307
1307
|
...p,
|
|
1308
1308
|
ref: g,
|
|
1309
1309
|
className: se(r, S.root),
|
|
1310
|
-
children: /* @__PURE__ */ x.jsx(Dn, { count: l ? 2 : 1, children: (
|
|
1310
|
+
children: /* @__PURE__ */ x.jsx(Dn, { count: l ? 2 : 1, children: (O) => /* @__PURE__ */ x.jsx("div", { "aria-hidden": !0, style: le(_.section, _[`section${O}`]), children: /* @__PURE__ */ x.jsx(Dn, { count: u, children: (C) => /* @__PURE__ */ x.jsx(
|
|
1311
1311
|
ge,
|
|
1312
1312
|
{
|
|
1313
1313
|
"aria-hidden": !0,
|
|
@@ -1316,10 +1316,10 @@ const Fo = /* @__PURE__ */ Pe(({
|
|
|
1316
1316
|
style: (() => {
|
|
1317
1317
|
switch (u) {
|
|
1318
1318
|
case 2:
|
|
1319
|
-
return le(_.bar, _[`bar${
|
|
1319
|
+
return le(_.bar, _[`bar${O}${C === 0 ? 0 : 2}`]);
|
|
1320
1320
|
case 3:
|
|
1321
1321
|
default:
|
|
1322
|
-
return le(_.bar, _[`bar${
|
|
1322
|
+
return le(_.bar, _[`bar${O}${C}`]);
|
|
1323
1323
|
}
|
|
1324
1324
|
})()
|
|
1325
1325
|
}
|
|
@@ -1389,7 +1389,7 @@ function Ds({ isActive: e = !1, isSplit: r = !1, isTailHidden: i = !1 }) {
|
|
|
1389
1389
|
};
|
|
1390
1390
|
}
|
|
1391
1391
|
process.env.NODE_ENV === "development" && (Fo.displayName = "Burger", rn.displayName = "BurgerBar");
|
|
1392
|
-
const Vs = /* @__PURE__ */
|
|
1392
|
+
const Vs = /* @__PURE__ */ Oe(({
|
|
1393
1393
|
children: e,
|
|
1394
1394
|
className: r,
|
|
1395
1395
|
style: i,
|
|
@@ -1401,7 +1401,7 @@ const Vs = /* @__PURE__ */ Pe(({
|
|
|
1401
1401
|
onDeactivate: m,
|
|
1402
1402
|
onToggle: S,
|
|
1403
1403
|
..._
|
|
1404
|
-
},
|
|
1404
|
+
}, O) => {
|
|
1405
1405
|
const C = () => {
|
|
1406
1406
|
const w = !a;
|
|
1407
1407
|
S?.(w), w ? g?.() : m?.();
|
|
@@ -1414,7 +1414,7 @@ const Vs = /* @__PURE__ */ Pe(({
|
|
|
1414
1414
|
"button",
|
|
1415
1415
|
{
|
|
1416
1416
|
..._,
|
|
1417
|
-
ref:
|
|
1417
|
+
ref: O,
|
|
1418
1418
|
"aria-expanded": a,
|
|
1419
1419
|
className: se(r, $.root),
|
|
1420
1420
|
style: le(i, M.root),
|
|
@@ -1495,43 +1495,43 @@ function Gs(e, {
|
|
|
1495
1495
|
onDragMove: l,
|
|
1496
1496
|
onDragEnd: u
|
|
1497
1497
|
}) {
|
|
1498
|
-
const p = Ee(void 0), g = Ee(void 0), m =
|
|
1498
|
+
const p = Ee(void 0), g = Ee(void 0), m = Se(a), S = Se(l), _ = Se(u), O = he((M) => {
|
|
1499
1499
|
if (!p.current) return;
|
|
1500
|
-
const w =
|
|
1501
|
-
g.current = w, S.current?.(
|
|
1500
|
+
const w = Te.make(M.clientX, M.clientY), I = Te.subtract(w, g.current ?? p.current);
|
|
1501
|
+
g.current = w, S.current?.(I, w, p.current);
|
|
1502
1502
|
}, []), C = he((M) => {
|
|
1503
1503
|
const w = e.current;
|
|
1504
1504
|
if (!w || !p.current) return;
|
|
1505
|
-
const
|
|
1506
|
-
_.current?.(
|
|
1507
|
-
}, [i,
|
|
1505
|
+
const I = Te.make(M.clientX, M.clientY), K = Te.subtract(g.current ?? p.current, I);
|
|
1506
|
+
_.current?.(I, K, p.current), p.current = void 0, g.current = void 0, w.removeEventListener("mousemove", O), w.removeEventListener("mouseup", C, { capture: !0 }), w.removeEventListener("mouseleave", C), i && (w.style.cursor = "grab");
|
|
1507
|
+
}, [i, O]), $ = he((M) => {
|
|
1508
1508
|
const w = e.current;
|
|
1509
1509
|
if (!w) return;
|
|
1510
1510
|
M.preventDefault();
|
|
1511
|
-
const
|
|
1512
|
-
p.current =
|
|
1513
|
-
}, [i,
|
|
1514
|
-
|
|
1511
|
+
const I = Te.make(M.clientX, M.clientY);
|
|
1512
|
+
p.current = I, g.current = I, w.addEventListener("mousemove", O), w.addEventListener("mouseup", C, { capture: !0 }), w.addEventListener("mouseleave", C), i && (w.style.cursor = "grabbing"), m.current?.(I);
|
|
1513
|
+
}, [i, O, C]);
|
|
1514
|
+
Re(() => {
|
|
1515
1515
|
const M = e.current;
|
|
1516
1516
|
if (!M || !r || !i) return;
|
|
1517
1517
|
const w = M.style.cursor;
|
|
1518
1518
|
return M.style.cursor = "grab", () => {
|
|
1519
1519
|
M.style.cursor = w;
|
|
1520
1520
|
};
|
|
1521
|
-
}, [r, i]),
|
|
1521
|
+
}, [r, i]), Re(() => {
|
|
1522
1522
|
const M = e.current;
|
|
1523
1523
|
if (!(!M || !r))
|
|
1524
1524
|
return M.addEventListener("mousedown", $), () => {
|
|
1525
|
-
M.removeEventListener("mousedown", $), M.removeEventListener("mousemove",
|
|
1525
|
+
M.removeEventListener("mousedown", $), M.removeEventListener("mousemove", O), M.removeEventListener("mouseup", C, { capture: !0 }), M.removeEventListener("mouseleave", C);
|
|
1526
1526
|
};
|
|
1527
|
-
}, [r,
|
|
1527
|
+
}, [r, O, C, $]);
|
|
1528
1528
|
}
|
|
1529
1529
|
function qs(e, {
|
|
1530
1530
|
autoStarts: r = !0,
|
|
1531
1531
|
shouldInvokeInitially: i = !1,
|
|
1532
1532
|
onInterval: a
|
|
1533
1533
|
}, l = []) {
|
|
1534
|
-
const u = Ee(void 0), p =
|
|
1534
|
+
const u = Ee(void 0), p = Se(a), g = he(() => {
|
|
1535
1535
|
clearInterval(u.current), u.current = void 0;
|
|
1536
1536
|
}, []), m = he(() => {
|
|
1537
1537
|
g(), !(e < 0) && (i && p.current(), u.current = setInterval(() => {
|
|
@@ -1546,7 +1546,7 @@ function Ws() {
|
|
|
1546
1546
|
function Ks() {
|
|
1547
1547
|
return fr(() => Ws(), []);
|
|
1548
1548
|
}
|
|
1549
|
-
const Js = /* @__PURE__ */
|
|
1549
|
+
const Js = /* @__PURE__ */ Oe(({
|
|
1550
1550
|
autoAdvanceInterval: e = 0,
|
|
1551
1551
|
index: r = 0,
|
|
1552
1552
|
isDragEnabled: i = !0,
|
|
@@ -1558,25 +1558,25 @@ const Js = /* @__PURE__ */ Pe(({
|
|
|
1558
1558
|
onIndexChange: m,
|
|
1559
1559
|
ItemComponent: S,
|
|
1560
1560
|
..._
|
|
1561
|
-
},
|
|
1562
|
-
const C = Ee(void 0), $ = Ee(null), M = Ee(void 0), w = Ee(void 0),
|
|
1563
|
-
|
|
1561
|
+
}, O) => {
|
|
1562
|
+
const C = Ee(void 0), $ = Ee(null), M = Ee(void 0), w = Ee(void 0), I = Ee(void 0), K = 1e3, J = Se(p), Y = Se(g), q = Se(m), E = Ee(!1), k = Ee(!1), N = Ks(), [A, B] = _e(mo($, l)), [U, oe] = _e(!1), W = ea({ scrollSnapEnabled: N || !U, orientation: l }), X = e > 0, L = he(() => {
|
|
1563
|
+
I.current !== void 0 && (clearTimeout(I.current), I.current = void 0);
|
|
1564
1564
|
}, []), R = he(() => {
|
|
1565
|
-
L(),
|
|
1566
|
-
clearTimeout(
|
|
1565
|
+
L(), I.current = setTimeout(() => {
|
|
1566
|
+
clearTimeout(I.current), I.current = void 0;
|
|
1567
1567
|
}, K);
|
|
1568
1568
|
}, [K, L]), Z = he(() => {
|
|
1569
1569
|
Zs($, r, l), R();
|
|
1570
1570
|
}, [r, l]), te = he(() => {
|
|
1571
1571
|
B(mo($, l));
|
|
1572
1572
|
}, [l]), ae = he((ee) => {
|
|
1573
|
-
N || (M.current =
|
|
1573
|
+
N || (M.current = Te.make(ee.clientX, ee.clientY), oe(!0));
|
|
1574
1574
|
}, [N]), F = he((ee) => {
|
|
1575
|
-
N || (w.current =
|
|
1575
|
+
N || (w.current = Te.make(ee.clientX, ee.clientY), Z(), oe(!1));
|
|
1576
1576
|
}, [N, Z]), T = he((ee) => {
|
|
1577
1577
|
const ue = M.current, pe = w.current;
|
|
1578
1578
|
if (!ue || !pe) return;
|
|
1579
|
-
const be = 5, me =
|
|
1579
|
+
const be = 5, me = Te.subtract(ue, pe);
|
|
1580
1580
|
(Math.abs(me.x) > be || Math.abs(me.y) > be) && ee.stopPropagation(), M.current = void 0, w.current = void 0;
|
|
1581
1581
|
}, []), V = he(() => {
|
|
1582
1582
|
const ee = (r + a.length + 1) % a.length;
|
|
@@ -1598,7 +1598,7 @@ const Js = /* @__PURE__ */ Pe(({
|
|
|
1598
1598
|
}, [l]), Q = he(() => {
|
|
1599
1599
|
const ee = $.current;
|
|
1600
1600
|
!ee || k.current || (k.current = !0, requestAnimationFrame(() => {
|
|
1601
|
-
if (u && te(), !(
|
|
1601
|
+
if (u && te(), !(I.current !== void 0)) {
|
|
1602
1602
|
const pe = Math.round(l === "horizontal" ? ee.scrollLeft / ee.clientWidth : ee.scrollTop / ee.clientHeight), be = Math.max(0, Math.min(a.length - 1, pe));
|
|
1603
1603
|
be !== r && (C.current = be, q.current?.(be));
|
|
1604
1604
|
}
|
|
@@ -1610,9 +1610,9 @@ const Js = /* @__PURE__ */ Pe(({
|
|
|
1610
1610
|
onDragMove: ne
|
|
1611
1611
|
}), qs(U || !X ? -1 : e, {
|
|
1612
1612
|
onInterval: V
|
|
1613
|
-
}, [r]),
|
|
1613
|
+
}, [r]), Re(() => {
|
|
1614
1614
|
!X || N || (U ? J.current?.() : Y.current?.());
|
|
1615
|
-
}, [N, U, X]),
|
|
1615
|
+
}, [N, U, X]), Re(() => {
|
|
1616
1616
|
const ee = $.current;
|
|
1617
1617
|
if (!ee) return;
|
|
1618
1618
|
const ue = C.current === void 0, pe = C.current === r;
|
|
@@ -1623,7 +1623,7 @@ const Js = /* @__PURE__ */ Pe(({
|
|
|
1623
1623
|
"div",
|
|
1624
1624
|
{
|
|
1625
1625
|
..._,
|
|
1626
|
-
ref:
|
|
1626
|
+
ref: O,
|
|
1627
1627
|
role: "region",
|
|
1628
1628
|
onClick: T,
|
|
1629
1629
|
onPointerCancel: F,
|
|
@@ -1713,7 +1713,7 @@ function ta(e) {
|
|
|
1713
1713
|
r.current = e;
|
|
1714
1714
|
}, [e]), r.current;
|
|
1715
1715
|
}
|
|
1716
|
-
const Do = /* @__PURE__ */
|
|
1716
|
+
const Do = /* @__PURE__ */ Oe(({
|
|
1717
1717
|
className: e,
|
|
1718
1718
|
emptyValue: r = "",
|
|
1719
1719
|
isDisabled: i = !1,
|
|
@@ -1725,7 +1725,7 @@ const Do = /* @__PURE__ */ Pe(({
|
|
|
1725
1725
|
onUnfocus: m,
|
|
1726
1726
|
onChange: S,
|
|
1727
1727
|
..._
|
|
1728
|
-
},
|
|
1728
|
+
}, O) => {
|
|
1729
1729
|
const C = he(($) => {
|
|
1730
1730
|
const M = (p?.($) ?? $) || r;
|
|
1731
1731
|
S?.(M);
|
|
@@ -1734,7 +1734,7 @@ const Do = /* @__PURE__ */ Pe(({
|
|
|
1734
1734
|
"input",
|
|
1735
1735
|
{
|
|
1736
1736
|
..._,
|
|
1737
|
-
ref:
|
|
1737
|
+
ref: O,
|
|
1738
1738
|
"aria-disabled": i,
|
|
1739
1739
|
"aria-placeholder": l,
|
|
1740
1740
|
"aria-required": a,
|
|
@@ -1751,7 +1751,7 @@ const Do = /* @__PURE__ */ Pe(({
|
|
|
1751
1751
|
);
|
|
1752
1752
|
});
|
|
1753
1753
|
process.env.NODE_ENV === "development" && (Do.displayName = "TextField");
|
|
1754
|
-
const na = /* @__PURE__ */
|
|
1754
|
+
const na = /* @__PURE__ */ Oe(({
|
|
1755
1755
|
children: e,
|
|
1756
1756
|
style: r,
|
|
1757
1757
|
allowsInput: i = !0,
|
|
@@ -1765,7 +1765,7 @@ const na = /* @__PURE__ */ Pe(({
|
|
|
1765
1765
|
p?.(w(u - 1));
|
|
1766
1766
|
}, _ = () => {
|
|
1767
1767
|
p?.(w(u + 1));
|
|
1768
|
-
},
|
|
1768
|
+
}, O = (k) => {
|
|
1769
1769
|
K(k);
|
|
1770
1770
|
}, C = (k) => {
|
|
1771
1771
|
const N = M(k);
|
|
@@ -1776,7 +1776,7 @@ const na = /* @__PURE__ */ Pe(({
|
|
|
1776
1776
|
}, w = (k) => {
|
|
1777
1777
|
let N = k;
|
|
1778
1778
|
return isNaN(l) || (N = Math.max(l, N)), isNaN(a) || (N = Math.min(a, N)), N;
|
|
1779
|
-
}, [
|
|
1779
|
+
}, [I, K] = _e($(u)), J = ta(u), Y = !isNaN(a) && u + 1 > a, q = !isNaN(l) && u - 1 < l;
|
|
1780
1780
|
Ne(() => {
|
|
1781
1781
|
if (J === void 0 || J === u) return;
|
|
1782
1782
|
const k = w(u);
|
|
@@ -1803,8 +1803,8 @@ const na = /* @__PURE__ */ Pe(({
|
|
|
1803
1803
|
element: E.textField ?? /* @__PURE__ */ x.jsx(Vn, {}),
|
|
1804
1804
|
isDisabled: !i,
|
|
1805
1805
|
style: le(Ut.textField),
|
|
1806
|
-
value:
|
|
1807
|
-
onChange:
|
|
1806
|
+
value: I,
|
|
1807
|
+
onChange: O,
|
|
1808
1808
|
onUnfocus: C
|
|
1809
1809
|
}
|
|
1810
1810
|
),
|
|
@@ -1836,9 +1836,26 @@ const na = /* @__PURE__ */ Pe(({
|
|
|
1836
1836
|
}
|
|
1837
1837
|
};
|
|
1838
1838
|
process.env.NODE_ENV === "development" && (na.displayName = "Counter", Hn.displayName = "CounterAddButton", Bn.displayName = "CounterSubtractButton", Vn.displayName = "CounterTextField");
|
|
1839
|
-
function ra() {
|
|
1840
|
-
const
|
|
1841
|
-
|
|
1839
|
+
function ra(e, { onChange: r }) {
|
|
1840
|
+
const i = Se(r);
|
|
1841
|
+
Re(() => {
|
|
1842
|
+
const a = e.current;
|
|
1843
|
+
if (!a) return;
|
|
1844
|
+
const l = new IntersectionObserver((u) => {
|
|
1845
|
+
for (const p of u)
|
|
1846
|
+
if (p.target === a) {
|
|
1847
|
+
i.current?.(a);
|
|
1848
|
+
break;
|
|
1849
|
+
}
|
|
1850
|
+
});
|
|
1851
|
+
return l.observe(a), () => {
|
|
1852
|
+
l.disconnect();
|
|
1853
|
+
};
|
|
1854
|
+
}, [e.current]);
|
|
1855
|
+
}
|
|
1856
|
+
function oa() {
|
|
1857
|
+
const [e, r] = _e(je.zero);
|
|
1858
|
+
return Re(() => {
|
|
1842
1859
|
const i = () => {
|
|
1843
1860
|
const a = xe.size(xe.fromViewport());
|
|
1844
1861
|
r(a);
|
|
@@ -1849,16 +1866,21 @@ function ra() {
|
|
|
1849
1866
|
}, []), e;
|
|
1850
1867
|
}
|
|
1851
1868
|
function nt(e) {
|
|
1852
|
-
const [r, i] = _e(xe.zero), a =
|
|
1869
|
+
const [r, i] = _e(xe.zero), a = oa();
|
|
1853
1870
|
return pr(e, {
|
|
1854
1871
|
onResize: (l) => {
|
|
1855
1872
|
const u = xe.from(l);
|
|
1856
1873
|
u && i(u);
|
|
1857
1874
|
}
|
|
1858
|
-
}),
|
|
1875
|
+
}), ra(e, {
|
|
1876
|
+
onChange: (l) => {
|
|
1877
|
+
const u = xe.from(l);
|
|
1878
|
+
u && i(u);
|
|
1879
|
+
}
|
|
1880
|
+
}), Re(() => {
|
|
1859
1881
|
const l = e.current, u = xe.from(l);
|
|
1860
1882
|
u && i(u);
|
|
1861
|
-
}, [
|
|
1883
|
+
}, [je.toString(a)]), r;
|
|
1862
1884
|
}
|
|
1863
1885
|
var on;
|
|
1864
1886
|
((e) => {
|
|
@@ -1907,7 +1929,7 @@ var on;
|
|
|
1907
1929
|
}).filter(Boolean).join(", ");
|
|
1908
1930
|
}
|
|
1909
1931
|
})(on || (on = {}));
|
|
1910
|
-
function
|
|
1932
|
+
function ia({
|
|
1911
1933
|
src: e,
|
|
1912
1934
|
srcSet: r,
|
|
1913
1935
|
sizes: i
|
|
@@ -1916,17 +1938,17 @@ function oa({
|
|
|
1916
1938
|
onLoadComplete: l,
|
|
1917
1939
|
onLoadError: u
|
|
1918
1940
|
} = {}) {
|
|
1919
|
-
const p = Ee(void 0), g =
|
|
1920
|
-
|
|
1941
|
+
const p = Ee(void 0), g = Se(a), m = Se(l), S = Se(u);
|
|
1942
|
+
Re(() => {
|
|
1921
1943
|
const _ = (C) => {
|
|
1922
1944
|
const $ = C.currentTarget;
|
|
1923
1945
|
m.current?.($);
|
|
1924
|
-
},
|
|
1946
|
+
}, O = (C) => {
|
|
1925
1947
|
const $ = C.currentTarget;
|
|
1926
1948
|
S.current?.($);
|
|
1927
1949
|
};
|
|
1928
|
-
return p.current = new Image(), e && (p.current.src = e), r && (p.current.srcset = r), i && (p.current.sizes = i), g.current?.(p.current), p.current.addEventListener("load", _), p.current.addEventListener("error",
|
|
1929
|
-
p.current?.removeEventListener("load", _), p.current?.removeEventListener("error",
|
|
1950
|
+
return p.current = new Image(), e && (p.current.src = e), r && (p.current.srcset = r), i && (p.current.sizes = i), g.current?.(p.current), p.current.addEventListener("load", _), p.current.addEventListener("error", O), () => {
|
|
1951
|
+
p.current?.removeEventListener("load", _), p.current?.removeEventListener("error", O), p.current = void 0;
|
|
1930
1952
|
};
|
|
1931
1953
|
}, [e, r, i]);
|
|
1932
1954
|
}
|
|
@@ -1940,24 +1962,24 @@ function Vo({
|
|
|
1940
1962
|
onLoadComplete: u,
|
|
1941
1963
|
onLoadError: p
|
|
1942
1964
|
} = {}) {
|
|
1943
|
-
const [g, m] = _e(), S =
|
|
1965
|
+
const [g, m] = _e(), S = Se(l), _ = Se(u), O = Se(p), C = he((w) => {
|
|
1944
1966
|
a || m(void 0), S.current?.(w);
|
|
1945
1967
|
}, [a]), $ = he((w) => {
|
|
1946
|
-
m(
|
|
1968
|
+
m(sa(w)), _.current?.(w);
|
|
1947
1969
|
}, []), M = he((w) => {
|
|
1948
|
-
a || m(void 0),
|
|
1970
|
+
a || m(void 0), O.current?.(w);
|
|
1949
1971
|
}, [a]);
|
|
1950
|
-
return
|
|
1972
|
+
return ia({ src: e, srcSet: r, sizes: i }, {
|
|
1951
1973
|
onLoadStart: C,
|
|
1952
1974
|
onLoadComplete: $,
|
|
1953
1975
|
onLoadError: M
|
|
1954
1976
|
}), g;
|
|
1955
1977
|
}
|
|
1956
|
-
function
|
|
1978
|
+
function sa(e) {
|
|
1957
1979
|
if (e && typeof e.width == "number" && typeof e.height == "number")
|
|
1958
|
-
return
|
|
1980
|
+
return je.make(e.width, e.height);
|
|
1959
1981
|
}
|
|
1960
|
-
const Ho = /* @__PURE__ */
|
|
1982
|
+
const Ho = /* @__PURE__ */ Oe(({
|
|
1961
1983
|
alt: e,
|
|
1962
1984
|
source: r,
|
|
1963
1985
|
loadingMode: i,
|
|
@@ -1969,22 +1991,22 @@ const Ho = /* @__PURE__ */ Pe(({
|
|
|
1969
1991
|
onSizeChange: m,
|
|
1970
1992
|
...S
|
|
1971
1993
|
}, _) => {
|
|
1972
|
-
const
|
|
1994
|
+
const O = r ? on.asProps(r) : void 0, C = Vo({
|
|
1973
1995
|
src: a,
|
|
1974
|
-
srcSet:
|
|
1975
|
-
sizes:
|
|
1996
|
+
srcSet: O?.srcSet,
|
|
1997
|
+
sizes: O?.sizes
|
|
1976
1998
|
}, {
|
|
1977
1999
|
onLoadStart: u,
|
|
1978
2000
|
onLoadComplete: p,
|
|
1979
2001
|
onLoadError: g
|
|
1980
|
-
}), $ =
|
|
2002
|
+
}), $ = aa();
|
|
1981
2003
|
return Ne(() => {
|
|
1982
2004
|
m?.(C);
|
|
1983
2005
|
}, [C?.width, C?.height]), /* @__PURE__ */ x.jsx(
|
|
1984
2006
|
"img",
|
|
1985
2007
|
{
|
|
1986
2008
|
...S,
|
|
1987
|
-
...
|
|
2009
|
+
...O,
|
|
1988
2010
|
ref: _,
|
|
1989
2011
|
alt: e,
|
|
1990
2012
|
loading: i,
|
|
@@ -1993,7 +2015,7 @@ const Ho = /* @__PURE__ */ Pe(({
|
|
|
1993
2015
|
}
|
|
1994
2016
|
);
|
|
1995
2017
|
});
|
|
1996
|
-
function
|
|
2018
|
+
function aa() {
|
|
1997
2019
|
return {
|
|
1998
2020
|
root: {
|
|
1999
2021
|
fontSize: "0"
|
|
@@ -2001,7 +2023,7 @@ function sa() {
|
|
|
2001
2023
|
};
|
|
2002
2024
|
}
|
|
2003
2025
|
process.env.NODE_ENV === "development" && (Ho.displayName = "Image");
|
|
2004
|
-
const Bo = /* @__PURE__ */
|
|
2026
|
+
const Bo = /* @__PURE__ */ Oe(({
|
|
2005
2027
|
alt: e,
|
|
2006
2028
|
loadingMode: r,
|
|
2007
2029
|
sources: i = [],
|
|
@@ -2012,7 +2034,7 @@ const Bo = /* @__PURE__ */ Pe(({
|
|
|
2012
2034
|
onSizeChange: g,
|
|
2013
2035
|
...m
|
|
2014
2036
|
}, S) => /* @__PURE__ */ x.jsxs("picture", { ...m, ref: S, children: [
|
|
2015
|
-
i.map((_,
|
|
2037
|
+
i.map((_, O) => /* @__PURE__ */ x.jsx("source", { ...on.asProps(_) }, O)),
|
|
2016
2038
|
/* @__PURE__ */ x.jsx(
|
|
2017
2039
|
Ho,
|
|
2018
2040
|
{
|
|
@@ -2028,7 +2050,7 @@ const Bo = /* @__PURE__ */ Pe(({
|
|
|
2028
2050
|
)
|
|
2029
2051
|
] }));
|
|
2030
2052
|
process.env.NODE_ENV === "development" && (Bo.displayName = "Picture");
|
|
2031
|
-
const
|
|
2053
|
+
const ca = /* @__PURE__ */ Oe(({
|
|
2032
2054
|
children: e,
|
|
2033
2055
|
alt: r,
|
|
2034
2056
|
aspectRatio: i = NaN,
|
|
@@ -2040,10 +2062,10 @@ const aa = /* @__PURE__ */ Pe(({
|
|
|
2040
2062
|
onLoadComplete: m,
|
|
2041
2063
|
onLoadError: S,
|
|
2042
2064
|
..._
|
|
2043
|
-
},
|
|
2065
|
+
}, O) => {
|
|
2044
2066
|
const C = (k) => {
|
|
2045
|
-
|
|
2046
|
-
}, $ = Ee(null), M =
|
|
2067
|
+
I(k ? k.width / k.height : NaN);
|
|
2068
|
+
}, $ = Ee(null), M = O ?? $, [w, I] = _e(NaN), K = isNaN(i) ? w : i, J = nt(M), Y = J.width / J.height, q = je.make(
|
|
2047
2069
|
Y > 1 ? Math.max(J.width, J.height * K) : Math.max(J.width, Math.max(J.height, J.width / K) * K),
|
|
2048
2070
|
Y > 1 ? Math.max(J.height, Math.max(J.width, J.height * K) / K) : Math.max(J.height, J.width / K)
|
|
2049
2071
|
), E = Le(e, {
|
|
@@ -2101,14 +2123,14 @@ const aa = /* @__PURE__ */ Pe(({
|
|
|
2101
2123
|
transform: "translate(-50%, -50%)"
|
|
2102
2124
|
}
|
|
2103
2125
|
};
|
|
2104
|
-
process.env.NODE_ENV === "development" && (
|
|
2105
|
-
function
|
|
2126
|
+
process.env.NODE_ENV === "development" && (ca.displayName = "CoverImage", Yo.displayName = "CoverImageContent", Xo.displayName = "CoverImageViewport");
|
|
2127
|
+
function la(e, {
|
|
2106
2128
|
onLoadStart: r,
|
|
2107
2129
|
onLoadComplete: i,
|
|
2108
2130
|
onLoadError: a
|
|
2109
2131
|
} = {}) {
|
|
2110
|
-
const l =
|
|
2111
|
-
|
|
2132
|
+
const l = Se(r), u = Se(i), p = Se(a);
|
|
2133
|
+
Re(() => {
|
|
2112
2134
|
if (!e) return;
|
|
2113
2135
|
const g = window.document.createElement("video"), m = () => u.current?.(g), S = () => p.current?.(g);
|
|
2114
2136
|
return g.addEventListener("loadedmetadata", m), g.addEventListener("error", S), g.src = e, l.current?.(g), () => {
|
|
@@ -2116,30 +2138,30 @@ function ca(e, {
|
|
|
2116
2138
|
};
|
|
2117
2139
|
}, [e]);
|
|
2118
2140
|
}
|
|
2119
|
-
function
|
|
2141
|
+
function ua(e, {
|
|
2120
2142
|
preservesSizeBetweenLoads: r = !0,
|
|
2121
2143
|
onLoadStart: i,
|
|
2122
2144
|
onLoadComplete: a,
|
|
2123
2145
|
onLoadError: l
|
|
2124
2146
|
} = {}) {
|
|
2125
|
-
const [u, p] = _e(), g =
|
|
2147
|
+
const [u, p] = _e(), g = Se(i), m = Se(a), S = Se(l), _ = he(($) => {
|
|
2126
2148
|
r || p(void 0), g.current?.($);
|
|
2127
|
-
}, [r]),
|
|
2128
|
-
p(
|
|
2149
|
+
}, [r]), O = he(($) => {
|
|
2150
|
+
p(fa($)), m.current?.($);
|
|
2129
2151
|
}, []), C = he(($) => {
|
|
2130
2152
|
r || p(void 0), S.current?.($);
|
|
2131
2153
|
}, [r]);
|
|
2132
|
-
return
|
|
2154
|
+
return la(e, {
|
|
2133
2155
|
onLoadStart: _,
|
|
2134
|
-
onLoadComplete:
|
|
2156
|
+
onLoadComplete: O,
|
|
2135
2157
|
onLoadError: C
|
|
2136
2158
|
}), u;
|
|
2137
2159
|
}
|
|
2138
|
-
function
|
|
2160
|
+
function fa(e) {
|
|
2139
2161
|
if (e && typeof e.videoWidth == "number" && typeof e.videoHeight == "number")
|
|
2140
|
-
return
|
|
2162
|
+
return je.make(e.videoWidth, e.videoHeight);
|
|
2141
2163
|
}
|
|
2142
|
-
const Uo = /* @__PURE__ */
|
|
2164
|
+
const Uo = /* @__PURE__ */ Oe(({
|
|
2143
2165
|
autoLoop: e = !0,
|
|
2144
2166
|
autoPlay: r = !0,
|
|
2145
2167
|
hasControls: i = !1,
|
|
@@ -2151,20 +2173,20 @@ const Uo = /* @__PURE__ */ Pe(({
|
|
|
2151
2173
|
onCanPlay: m,
|
|
2152
2174
|
onEnd: S,
|
|
2153
2175
|
onFullscreenChange: _,
|
|
2154
|
-
onLoadMetadata:
|
|
2176
|
+
onLoadMetadata: O,
|
|
2155
2177
|
onLoadMetadataComplete: C,
|
|
2156
2178
|
onLoadMetadataError: $,
|
|
2157
2179
|
onPause: M,
|
|
2158
2180
|
onPlay: w,
|
|
2159
|
-
onSizeChange:
|
|
2181
|
+
onSizeChange: I,
|
|
2160
2182
|
onTimeUpdate: K,
|
|
2161
2183
|
...J
|
|
2162
2184
|
}, Y) => {
|
|
2163
|
-
const q = Ee(null), E = Y ?? q, k =
|
|
2164
|
-
onLoadStart:
|
|
2185
|
+
const q = Ee(null), E = Y ?? q, k = ua(p, {
|
|
2186
|
+
onLoadStart: O,
|
|
2165
2187
|
onLoadComplete: C,
|
|
2166
2188
|
onLoadError: $
|
|
2167
|
-
}), N =
|
|
2189
|
+
}), N = da();
|
|
2168
2190
|
Ne(() => {
|
|
2169
2191
|
if (!E.current) return;
|
|
2170
2192
|
if (p.toLowerCase().endsWith(".m3u8")) {
|
|
@@ -2182,7 +2204,7 @@ const Uo = /* @__PURE__ */ Pe(({
|
|
|
2182
2204
|
L(), E.current?.removeEventListener("webkitfullscreenchange", R), E.current?.removeEventListener("mozfullscreenchange", R), E.current?.removeEventListener("fullscreenchange", R);
|
|
2183
2205
|
};
|
|
2184
2206
|
}, [p]), Ne(() => {
|
|
2185
|
-
|
|
2207
|
+
I?.(k);
|
|
2186
2208
|
}, [k]);
|
|
2187
2209
|
const A = (R) => {
|
|
2188
2210
|
const Z = R.currentTarget;
|
|
@@ -2222,7 +2244,7 @@ const Uo = /* @__PURE__ */ Pe(({
|
|
|
2222
2244
|
}
|
|
2223
2245
|
);
|
|
2224
2246
|
});
|
|
2225
|
-
function
|
|
2247
|
+
function da() {
|
|
2226
2248
|
return {
|
|
2227
2249
|
root: {
|
|
2228
2250
|
fontSize: "0"
|
|
@@ -2230,7 +2252,7 @@ function fa() {
|
|
|
2230
2252
|
};
|
|
2231
2253
|
}
|
|
2232
2254
|
process.env.NODE_ENV === "development" && (Uo.displayName = "Video");
|
|
2233
|
-
const
|
|
2255
|
+
const pa = /* @__PURE__ */ Oe(({
|
|
2234
2256
|
className: e,
|
|
2235
2257
|
children: r,
|
|
2236
2258
|
style: i,
|
|
@@ -2242,12 +2264,12 @@ const da = /* @__PURE__ */ Pe(({
|
|
|
2242
2264
|
playsInline: m,
|
|
2243
2265
|
posterSrc: S,
|
|
2244
2266
|
src: _,
|
|
2245
|
-
onCanPlay:
|
|
2267
|
+
onCanPlay: O,
|
|
2246
2268
|
onEnd: C,
|
|
2247
2269
|
onFullscreenChange: $,
|
|
2248
2270
|
onLoadMetadata: M,
|
|
2249
2271
|
onLoadMetadataComplete: w,
|
|
2250
|
-
onLoadMetadataError:
|
|
2272
|
+
onLoadMetadataError: I,
|
|
2251
2273
|
onPause: K,
|
|
2252
2274
|
onPlay: J,
|
|
2253
2275
|
onSizeChange: Y,
|
|
@@ -2255,7 +2277,7 @@ const da = /* @__PURE__ */ Pe(({
|
|
|
2255
2277
|
}, E) => {
|
|
2256
2278
|
const k = (R) => {
|
|
2257
2279
|
U(R ? R.width / R.height : NaN), Y?.(R);
|
|
2258
|
-
}, N = E ?? Ee(null), A = nt(N), [B, U] = _e(NaN), oe = isNaN(a) ? B : a, W = A.width / A.height, X =
|
|
2280
|
+
}, N = E ?? Ee(null), A = nt(N), [B, U] = _e(NaN), oe = isNaN(a) ? B : a, W = A.width / A.height, X = je.make(
|
|
2259
2281
|
W > 1 ? Math.max(A.width, A.height * oe) : Math.max(A.width, Math.max(A.height, A.width / oe) * oe),
|
|
2260
2282
|
W > 1 ? Math.max(A.height, Math.max(A.width, A.height * oe) / oe) : Math.max(A.height, A.width / oe)
|
|
2261
2283
|
), L = Le(r, {
|
|
@@ -2285,12 +2307,12 @@ const da = /* @__PURE__ */ Pe(({
|
|
|
2285
2307
|
height: `${X.height}px`,
|
|
2286
2308
|
maxWidth: "unset"
|
|
2287
2309
|
}),
|
|
2288
|
-
onCanPlay:
|
|
2310
|
+
onCanPlay: O,
|
|
2289
2311
|
onEnd: C,
|
|
2290
2312
|
onFullscreenChange: $,
|
|
2291
2313
|
onLoadMetadata: M,
|
|
2292
2314
|
onLoadMetadataComplete: w,
|
|
2293
|
-
onLoadMetadataError:
|
|
2315
|
+
onLoadMetadataError: I,
|
|
2294
2316
|
onPause: K,
|
|
2295
2317
|
onPlay: J,
|
|
2296
2318
|
onSizeChange: (R) => k(R)
|
|
@@ -2323,8 +2345,8 @@ const da = /* @__PURE__ */ Pe(({
|
|
|
2323
2345
|
transform: "translate(-50%, -50%)"
|
|
2324
2346
|
}
|
|
2325
2347
|
};
|
|
2326
|
-
process.env.NODE_ENV === "development" && (
|
|
2327
|
-
const
|
|
2348
|
+
process.env.NODE_ENV === "development" && (pa.displayName = "CoverVideo", Go.displayName = "CoverVideoContent", qo.displayName = "CoverVideoViewport");
|
|
2349
|
+
const ha = /* @__PURE__ */ Oe(({
|
|
2328
2350
|
children: e,
|
|
2329
2351
|
style: r,
|
|
2330
2352
|
angle: i = 0,
|
|
@@ -2335,10 +2357,10 @@ const pa = /* @__PURE__ */ Pe(({
|
|
|
2335
2357
|
trackThickness: g = 2,
|
|
2336
2358
|
...m
|
|
2337
2359
|
}, S) => {
|
|
2338
|
-
const _ = u * 2,
|
|
2360
|
+
const _ = u * 2, O = Math.max(0, Math.min(360, a)), C = Le(e, {
|
|
2339
2361
|
track: Yn,
|
|
2340
2362
|
knob: Xn
|
|
2341
|
-
}), $ =
|
|
2363
|
+
}), $ = ma({ angle: i, diameter: _ });
|
|
2342
2364
|
return /* @__PURE__ */ x.jsxs("div", { ...m, ref: S, style: le(r, $.root), children: [
|
|
2343
2365
|
/* @__PURE__ */ x.jsx("div", { style: $.trackContainer, children: /* @__PURE__ */ x.jsx("svg", { height: _, style: $.svgContainer, viewBox: `0 0 ${_} ${_}`, width: _, children: /* @__PURE__ */ x.jsx(
|
|
2344
2366
|
ge,
|
|
@@ -2355,7 +2377,7 @@ const pa = /* @__PURE__ */ Pe(({
|
|
|
2355
2377
|
/* @__PURE__ */ x.jsx("div", { style: le($.knobContainer), children: /* @__PURE__ */ x.jsx("svg", { style: $.svgContainer, viewBox: `0 0 ${_} ${_}`, xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ x.jsx(
|
|
2356
2378
|
ge,
|
|
2357
2379
|
{
|
|
2358
|
-
d:
|
|
2380
|
+
d: ga(u, u, u - l / 2 - (g - l) / 2, -O / 2, O / 2),
|
|
2359
2381
|
element: C.knob ?? /* @__PURE__ */ x.jsx(Xn, {}),
|
|
2360
2382
|
fill: "none",
|
|
2361
2383
|
strokeWidth: l
|
|
@@ -2370,7 +2392,7 @@ function vo(e, r, i, a) {
|
|
|
2370
2392
|
y: r + i * Math.sin(l)
|
|
2371
2393
|
};
|
|
2372
2394
|
}
|
|
2373
|
-
function
|
|
2395
|
+
function ga(e, r, i, a, l) {
|
|
2374
2396
|
const u = vo(e, r, i, l), p = vo(e, r, i, a), g = l - a <= 180 ? "0" : "1";
|
|
2375
2397
|
return [
|
|
2376
2398
|
"M",
|
|
@@ -2386,7 +2408,7 @@ function ha(e, r, i, a, l) {
|
|
|
2386
2408
|
p.y
|
|
2387
2409
|
].join(" ");
|
|
2388
2410
|
}
|
|
2389
|
-
function
|
|
2411
|
+
function ma({ diameter: e = 0, angle: r = 0 }) {
|
|
2390
2412
|
return {
|
|
2391
2413
|
root: {
|
|
2392
2414
|
height: `${e}px`,
|
|
@@ -2420,8 +2442,8 @@ function ga({ diameter: e = 0, angle: r = 0 }) {
|
|
|
2420
2442
|
}
|
|
2421
2443
|
};
|
|
2422
2444
|
}
|
|
2423
|
-
process.env.NODE_ENV === "development" && (
|
|
2424
|
-
const
|
|
2445
|
+
process.env.NODE_ENV === "development" && (ha.displayName = "Dial", Yn.displayName = "DialTrack", Xn.displayName = "DialKnob");
|
|
2446
|
+
const va = /* @__PURE__ */ Oe(({
|
|
2425
2447
|
children: e,
|
|
2426
2448
|
className: r,
|
|
2427
2449
|
style: i,
|
|
@@ -2433,12 +2455,12 @@ const ma = /* @__PURE__ */ Pe(({
|
|
|
2433
2455
|
layout: m = "list",
|
|
2434
2456
|
isSelectionTogglable: S = !1,
|
|
2435
2457
|
itemLength: _,
|
|
2436
|
-
itemPadding:
|
|
2458
|
+
itemPadding: O = 0,
|
|
2437
2459
|
items: C = [],
|
|
2438
2460
|
maxVisibleItems: $ = -1,
|
|
2439
2461
|
numSegments: M = 1,
|
|
2440
2462
|
orientation: w = "vertical",
|
|
2441
|
-
selection:
|
|
2463
|
+
selection: I = [],
|
|
2442
2464
|
selectionMode: K = "single",
|
|
2443
2465
|
onActivateAt: J,
|
|
2444
2466
|
onCollapse: Y,
|
|
@@ -2451,7 +2473,7 @@ const ma = /* @__PURE__ */ Pe(({
|
|
|
2451
2473
|
ToggleComponent: U,
|
|
2452
2474
|
...oe
|
|
2453
2475
|
}, W) => {
|
|
2454
|
-
const X = Ee(null), L = nt(X), R = C.length, Z =
|
|
2476
|
+
const X = Ee(null), L = nt(X), R = C.length, Z = wa(C, $, M, m), te = _ ?? (w === "vertical" ? L.height : L.width), ae = te * Z + O * (Z - 1), F = xa(I, C), [T, V] = _e(u ?? !0), ne = Ea({ isCollapsed: T, collectionPadding: l, isInverted: p, maxVisibleItems: $, menuLength: ae, numItems: R, orientation: w }), Q = Le(e, {
|
|
2455
2477
|
collapseIcon: Wo,
|
|
2456
2478
|
collection: Un,
|
|
2457
2479
|
expandIcon: Ko,
|
|
@@ -2471,14 +2493,14 @@ const ma = /* @__PURE__ */ Pe(({
|
|
|
2471
2493
|
}, [u]), Ne(() => {
|
|
2472
2494
|
const me = (G) => {
|
|
2473
2495
|
if (T || !(G.target instanceof Node)) return;
|
|
2474
|
-
let De = !0,
|
|
2475
|
-
for (;
|
|
2476
|
-
if (
|
|
2496
|
+
let De = !0, Ie = G.target;
|
|
2497
|
+
for (; Ie; ) {
|
|
2498
|
+
if (Ie === X.current) {
|
|
2477
2499
|
De = !1;
|
|
2478
2500
|
break;
|
|
2479
2501
|
}
|
|
2480
|
-
if (!
|
|
2481
|
-
|
|
2502
|
+
if (!Ie.parentNode) break;
|
|
2503
|
+
Ie = Ie.parentNode;
|
|
2482
2504
|
}
|
|
2483
2505
|
De && ue();
|
|
2484
2506
|
};
|
|
@@ -2532,7 +2554,7 @@ const ma = /* @__PURE__ */ Pe(({
|
|
|
2532
2554
|
isSelectionTogglable: S,
|
|
2533
2555
|
ItemComponent: B,
|
|
2534
2556
|
itemLength: te,
|
|
2535
|
-
itemPadding:
|
|
2557
|
+
itemPadding: O,
|
|
2536
2558
|
items: C,
|
|
2537
2559
|
layout: m,
|
|
2538
2560
|
numSegments: M,
|
|
@@ -2551,16 +2573,16 @@ const ma = /* @__PURE__ */ Pe(({
|
|
|
2551
2573
|
}
|
|
2552
2574
|
);
|
|
2553
2575
|
}), Un = gr, Gn = kt, qn = ({ children: e, ...r }) => /* @__PURE__ */ x.jsx("button", { ...r, children: e }), Wo = ({ children: e, ...r }) => /* @__PURE__ */ x.jsx("figure", { ...r, "aria-hidden": !0, children: e }), Ko = ({ children: e, ...r }) => /* @__PURE__ */ x.jsx("figure", { ...r, "aria-hidden": !0, children: e });
|
|
2554
|
-
function
|
|
2576
|
+
function ya(e, r) {
|
|
2555
2577
|
return !!(isNaN(e) || e >= r.length || e < 0);
|
|
2556
2578
|
}
|
|
2557
|
-
function
|
|
2558
|
-
return
|
|
2579
|
+
function xa(e, r) {
|
|
2580
|
+
return ba(e).filter((i) => !ya(i, r));
|
|
2559
2581
|
}
|
|
2560
|
-
function
|
|
2582
|
+
function ba(e) {
|
|
2561
2583
|
return e.sort((r, i) => r - i);
|
|
2562
2584
|
}
|
|
2563
|
-
function
|
|
2585
|
+
function wa(e, r, i, a) {
|
|
2564
2586
|
const l = e.length;
|
|
2565
2587
|
switch (a) {
|
|
2566
2588
|
case "grid": {
|
|
@@ -2571,7 +2593,7 @@ function ba(e, r, i, a) {
|
|
|
2571
2593
|
return r < 0 ? l : Math.min(l, r);
|
|
2572
2594
|
}
|
|
2573
2595
|
}
|
|
2574
|
-
function
|
|
2596
|
+
function Ea({ isCollapsed: e = !0, isInverted: r = !1, collectionPadding: i = 0, maxVisibleItems: a = 0, menuLength: l = NaN, numItems: u = 0, orientation: p = "vertical" }) {
|
|
2575
2597
|
return {
|
|
2576
2598
|
root: {
|
|
2577
2599
|
alignItems: "center",
|
|
@@ -2634,8 +2656,8 @@ function wa({ isCollapsed: e = !0, isInverted: r = !1, collectionPadding: i = 0,
|
|
|
2634
2656
|
}
|
|
2635
2657
|
};
|
|
2636
2658
|
}
|
|
2637
|
-
process.env.NODE_ENV === "development" && (
|
|
2638
|
-
const Jo = ":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",
|
|
2659
|
+
process.env.NODE_ENV === "development" && (va.displayName = "Dropdown", Un.displayName = "DropdownCollection", Wo.displayName = "DropdownCollapseIcon", Ko.displayName = "DropdownExpandIcon", Gn.displayName = "DropdownItem", qn.displayName = "DropdownToggle");
|
|
2660
|
+
const Jo = ":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD", Na = Jo + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040", Sa = "[" + Jo + "][" + Na + "]*", Ta = new RegExp("^" + Sa + "$");
|
|
2639
2661
|
function Zo(e, r) {
|
|
2640
2662
|
const i = [];
|
|
2641
2663
|
let a = r.exec(e);
|
|
@@ -2650,19 +2672,19 @@ function Zo(e, r) {
|
|
|
2650
2672
|
return i;
|
|
2651
2673
|
}
|
|
2652
2674
|
const mr = function(e) {
|
|
2653
|
-
const r =
|
|
2675
|
+
const r = Ta.exec(e);
|
|
2654
2676
|
return !(r === null || typeof r > "u");
|
|
2655
2677
|
};
|
|
2656
|
-
function
|
|
2678
|
+
function _a(e) {
|
|
2657
2679
|
return typeof e < "u";
|
|
2658
2680
|
}
|
|
2659
|
-
const
|
|
2681
|
+
const Oa = {
|
|
2660
2682
|
allowBooleanAttributes: !1,
|
|
2661
2683
|
//A tag can have attributes without any value
|
|
2662
2684
|
unpairedTags: []
|
|
2663
2685
|
};
|
|
2664
2686
|
function Pa(e, r) {
|
|
2665
|
-
r = Object.assign({},
|
|
2687
|
+
r = Object.assign({}, Oa, r);
|
|
2666
2688
|
const i = [];
|
|
2667
2689
|
let a = !1, l = !1;
|
|
2668
2690
|
e[0] === "\uFEFF" && (e = e.substr(1));
|
|
@@ -2681,22 +2703,22 @@ function Pa(e, r) {
|
|
|
2681
2703
|
for (; u < e.length && e[u] !== ">" && e[u] !== " " && e[u] !== " " && e[u] !== `
|
|
2682
2704
|
` && e[u] !== "\r"; u++)
|
|
2683
2705
|
m += e[u];
|
|
2684
|
-
if (m = m.trim(), m[m.length - 1] === "/" && (m = m.substring(0, m.length - 1), u--), !
|
|
2685
|
-
let
|
|
2686
|
-
return m.trim().length === 0 ?
|
|
2706
|
+
if (m = m.trim(), m[m.length - 1] === "/" && (m = m.substring(0, m.length - 1), u--), !Ra(m)) {
|
|
2707
|
+
let O;
|
|
2708
|
+
return m.trim().length === 0 ? O = "Invalid space after '<'." : O = "Tag '" + m + "' is an invalid name.", Ce("InvalidTag", O, Me(e, u));
|
|
2687
2709
|
}
|
|
2688
|
-
const S =
|
|
2710
|
+
const S = Ia(e, u);
|
|
2689
2711
|
if (S === !1)
|
|
2690
2712
|
return Ce("InvalidAttr", "Attributes for '" + m + "' have open quote.", Me(e, u));
|
|
2691
2713
|
let _ = S.value;
|
|
2692
2714
|
if (u = S.index, _[_.length - 1] === "/") {
|
|
2693
|
-
const
|
|
2715
|
+
const O = u - _.length;
|
|
2694
2716
|
_ = _.substring(0, _.length - 1);
|
|
2695
2717
|
const C = wo(_, r);
|
|
2696
2718
|
if (C === !0)
|
|
2697
2719
|
a = !0;
|
|
2698
2720
|
else
|
|
2699
|
-
return Ce(C.err.code, C.err.msg, Me(e,
|
|
2721
|
+
return Ce(C.err.code, C.err.msg, Me(e, O + C.err.line));
|
|
2700
2722
|
} else if (g)
|
|
2701
2723
|
if (S.tagClosed) {
|
|
2702
2724
|
if (_.trim().length > 0)
|
|
@@ -2704,12 +2726,12 @@ function Pa(e, r) {
|
|
|
2704
2726
|
if (i.length === 0)
|
|
2705
2727
|
return Ce("InvalidTag", "Closing tag '" + m + "' has not been opened.", Me(e, p));
|
|
2706
2728
|
{
|
|
2707
|
-
const
|
|
2708
|
-
if (m !==
|
|
2709
|
-
let C = Me(e,
|
|
2729
|
+
const O = i.pop();
|
|
2730
|
+
if (m !== O.tagName) {
|
|
2731
|
+
let C = Me(e, O.tagStartPos);
|
|
2710
2732
|
return Ce(
|
|
2711
2733
|
"InvalidTag",
|
|
2712
|
-
"Expected closing tag '" +
|
|
2734
|
+
"Expected closing tag '" + O.tagName + "' (opened in line " + C.line + ", col " + C.col + ") instead of closing tag '" + m + "'.",
|
|
2713
2735
|
Me(e, p)
|
|
2714
2736
|
);
|
|
2715
2737
|
}
|
|
@@ -2717,9 +2739,9 @@ function Pa(e, r) {
|
|
|
2717
2739
|
}
|
|
2718
2740
|
} else return Ce("InvalidTag", "Closing tag '" + m + "' doesn't have proper closing.", Me(e, u));
|
|
2719
2741
|
else {
|
|
2720
|
-
const
|
|
2721
|
-
if (
|
|
2722
|
-
return Ce(
|
|
2742
|
+
const O = wo(_, r);
|
|
2743
|
+
if (O !== !0)
|
|
2744
|
+
return Ce(O.err.code, O.err.msg, Me(e, u - _.length + O.err.line));
|
|
2723
2745
|
if (l === !0)
|
|
2724
2746
|
return Ce("InvalidXml", "Multiple possible root nodes found.", Me(e, u));
|
|
2725
2747
|
r.unpairedTags.indexOf(m) !== -1 || i.push({ tagName: m, tagStartPos: p }), a = !0;
|
|
@@ -2734,10 +2756,10 @@ function Pa(e, r) {
|
|
|
2734
2756
|
} else
|
|
2735
2757
|
break;
|
|
2736
2758
|
else if (e[u] === "&") {
|
|
2737
|
-
const
|
|
2738
|
-
if (
|
|
2759
|
+
const O = Aa(e, u);
|
|
2760
|
+
if (O == -1)
|
|
2739
2761
|
return Ce("InvalidChar", "char '&' is not expected.", Me(e, u));
|
|
2740
|
-
u =
|
|
2762
|
+
u = O;
|
|
2741
2763
|
} else if (l === !0 && !yo(e[u]))
|
|
2742
2764
|
return Ce("InvalidXml", "Extra text at the end", Me(e, u));
|
|
2743
2765
|
e[u] === "<" && u--;
|
|
@@ -2797,11 +2819,11 @@ function bo(e, r) {
|
|
|
2797
2819
|
}
|
|
2798
2820
|
return r;
|
|
2799
2821
|
}
|
|
2800
|
-
const
|
|
2801
|
-
function
|
|
2822
|
+
const ka = '"', Ca = "'";
|
|
2823
|
+
function Ia(e, r) {
|
|
2802
2824
|
let i = "", a = "", l = !1;
|
|
2803
2825
|
for (; r < e.length; r++) {
|
|
2804
|
-
if (e[r] ===
|
|
2826
|
+
if (e[r] === ka || e[r] === Ca)
|
|
2805
2827
|
a === "" ? a = e[r] : a !== e[r] || (a = "");
|
|
2806
2828
|
else if (e[r] === ">" && a === "") {
|
|
2807
2829
|
l = !0;
|
|
@@ -2826,7 +2848,7 @@ function wo(e, r) {
|
|
|
2826
2848
|
if (i[l][3] === void 0 && !r.allowBooleanAttributes)
|
|
2827
2849
|
return Ce("InvalidAttr", "boolean attribute '" + i[l][2] + "' is not allowed.", _t(i[l]));
|
|
2828
2850
|
const u = i[l][2];
|
|
2829
|
-
if (!
|
|
2851
|
+
if (!Ma(u))
|
|
2830
2852
|
return Ce("InvalidAttr", "Attribute '" + u + "' is an invalid name.", _t(i[l]));
|
|
2831
2853
|
if (!a.hasOwnProperty(u))
|
|
2832
2854
|
a[u] = 1;
|
|
@@ -2835,7 +2857,7 @@ function wo(e, r) {
|
|
|
2835
2857
|
}
|
|
2836
2858
|
return !0;
|
|
2837
2859
|
}
|
|
2838
|
-
function
|
|
2860
|
+
function $a(e, r) {
|
|
2839
2861
|
let i = /\d/;
|
|
2840
2862
|
for (e[r] === "x" && (r++, i = /[\da-fA-F]/); r < e.length; r++) {
|
|
2841
2863
|
if (e[r] === ";")
|
|
@@ -2845,11 +2867,11 @@ function Ia(e, r) {
|
|
|
2845
2867
|
}
|
|
2846
2868
|
return -1;
|
|
2847
2869
|
}
|
|
2848
|
-
function
|
|
2870
|
+
function Aa(e, r) {
|
|
2849
2871
|
if (r++, e[r] === ";")
|
|
2850
2872
|
return -1;
|
|
2851
2873
|
if (e[r] === "#")
|
|
2852
|
-
return r++,
|
|
2874
|
+
return r++, $a(e, r);
|
|
2853
2875
|
let i = 0;
|
|
2854
2876
|
for (; r < e.length; r++, i++)
|
|
2855
2877
|
if (!(e[r].match(/\w/) && i < 20)) {
|
|
@@ -2869,10 +2891,10 @@ function Ce(e, r, i) {
|
|
|
2869
2891
|
}
|
|
2870
2892
|
};
|
|
2871
2893
|
}
|
|
2872
|
-
function
|
|
2894
|
+
function Ma(e) {
|
|
2873
2895
|
return mr(e);
|
|
2874
2896
|
}
|
|
2875
|
-
function
|
|
2897
|
+
function Ra(e) {
|
|
2876
2898
|
return mr(e);
|
|
2877
2899
|
}
|
|
2878
2900
|
function Me(e, r) {
|
|
@@ -2886,7 +2908,7 @@ function Me(e, r) {
|
|
|
2886
2908
|
function _t(e) {
|
|
2887
2909
|
return e.startIndex + e[1].length;
|
|
2888
2910
|
}
|
|
2889
|
-
const
|
|
2911
|
+
const za = {
|
|
2890
2912
|
preserveOrder: !1,
|
|
2891
2913
|
attributeNamePrefix: "@_",
|
|
2892
2914
|
attributesGroupName: !1,
|
|
@@ -2930,8 +2952,8 @@ const Ra = {
|
|
|
2930
2952
|
},
|
|
2931
2953
|
// skipEmptyListItem: false
|
|
2932
2954
|
captureMetaData: !1
|
|
2933
|
-
},
|
|
2934
|
-
return Object.assign({},
|
|
2955
|
+
}, La = function(e) {
|
|
2956
|
+
return Object.assign({}, za, e);
|
|
2935
2957
|
};
|
|
2936
2958
|
let sn;
|
|
2937
2959
|
typeof Symbol != "function" ? sn = "@@xmlMetadata" : sn = Symbol("XML Node Metadata");
|
|
@@ -2950,7 +2972,7 @@ class at {
|
|
|
2950
2972
|
return sn;
|
|
2951
2973
|
}
|
|
2952
2974
|
}
|
|
2953
|
-
function
|
|
2975
|
+
function Fa(e, r) {
|
|
2954
2976
|
const i = {};
|
|
2955
2977
|
if (e[r + 3] === "O" && e[r + 4] === "C" && e[r + 5] === "T" && e[r + 6] === "Y" && e[r + 7] === "P" && e[r + 8] === "E") {
|
|
2956
2978
|
r = r + 9;
|
|
@@ -2960,19 +2982,19 @@ function La(e, r) {
|
|
|
2960
2982
|
if (l && ct(e, "!ENTITY", r)) {
|
|
2961
2983
|
r += 7;
|
|
2962
2984
|
let p, g;
|
|
2963
|
-
[p, g, r] =
|
|
2985
|
+
[p, g, r] = Da(e, r + 1), g.indexOf("&") === -1 && (i[p] = {
|
|
2964
2986
|
regx: RegExp(`&${p};`, "g"),
|
|
2965
2987
|
val: g
|
|
2966
2988
|
});
|
|
2967
2989
|
} else if (l && ct(e, "!ELEMENT", r)) {
|
|
2968
2990
|
r += 8;
|
|
2969
|
-
const { index: p } =
|
|
2991
|
+
const { index: p } = Ha(e, r + 1);
|
|
2970
2992
|
r = p;
|
|
2971
2993
|
} else if (l && ct(e, "!ATTLIST", r))
|
|
2972
2994
|
r += 8;
|
|
2973
2995
|
else if (l && ct(e, "!NOTATION", r)) {
|
|
2974
2996
|
r += 9;
|
|
2975
|
-
const { index: p } =
|
|
2997
|
+
const { index: p } = Va(e, r + 1);
|
|
2976
2998
|
r = p;
|
|
2977
2999
|
} else if (ct(e, "!--", r)) u = !0;
|
|
2978
3000
|
else throw new Error("Invalid DOCTYPE");
|
|
@@ -2992,7 +3014,7 @@ const tt = (e, r) => {
|
|
|
2992
3014
|
r++;
|
|
2993
3015
|
return r;
|
|
2994
3016
|
};
|
|
2995
|
-
function
|
|
3017
|
+
function Da(e, r) {
|
|
2996
3018
|
r = tt(e, r);
|
|
2997
3019
|
let i = "";
|
|
2998
3020
|
for (; r < e.length && !/\s/.test(e[r]) && e[r] !== '"' && e[r] !== "'"; )
|
|
@@ -3004,7 +3026,7 @@ function Fa(e, r) {
|
|
|
3004
3026
|
let a = "";
|
|
3005
3027
|
return [r, a] = qt(e, r, "entity"), r--, [i, a, r];
|
|
3006
3028
|
}
|
|
3007
|
-
function
|
|
3029
|
+
function Va(e, r) {
|
|
3008
3030
|
r = tt(e, r);
|
|
3009
3031
|
let i = "";
|
|
3010
3032
|
for (; r < e.length && !/\s/.test(e[r]); )
|
|
@@ -3032,7 +3054,7 @@ function qt(e, r, i) {
|
|
|
3032
3054
|
throw new Error(`Unterminated ${i} value`);
|
|
3033
3055
|
return r++, [r, a];
|
|
3034
3056
|
}
|
|
3035
|
-
function
|
|
3057
|
+
function Ha(e, r) {
|
|
3036
3058
|
r = tt(e, r);
|
|
3037
3059
|
let i = "";
|
|
3038
3060
|
for (; r < e.length && !/\s/.test(e[r]); )
|
|
@@ -3066,7 +3088,7 @@ function vr(e) {
|
|
|
3066
3088
|
return e;
|
|
3067
3089
|
throw new Error(`Invalid entity name ${e}`);
|
|
3068
3090
|
}
|
|
3069
|
-
const
|
|
3091
|
+
const Ba = /^[-+]?0x[a-fA-F0-9]+$/, Ya = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, Xa = {
|
|
3070
3092
|
hex: !0,
|
|
3071
3093
|
// oct: false,
|
|
3072
3094
|
leadingZeros: !0,
|
|
@@ -3074,20 +3096,20 @@ const Ha = /^[-+]?0x[a-fA-F0-9]+$/, Ba = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, Y
|
|
|
3074
3096
|
eNotation: !0
|
|
3075
3097
|
//skipLike: /regex/
|
|
3076
3098
|
};
|
|
3077
|
-
function
|
|
3078
|
-
if (r = Object.assign({},
|
|
3099
|
+
function Ua(e, r = {}) {
|
|
3100
|
+
if (r = Object.assign({}, Xa, r), !e || typeof e != "string") return e;
|
|
3079
3101
|
let i = e.trim();
|
|
3080
3102
|
if (r.skipLike !== void 0 && r.skipLike.test(i)) return e;
|
|
3081
3103
|
if (e === "0") return 0;
|
|
3082
|
-
if (r.hex &&
|
|
3083
|
-
return
|
|
3104
|
+
if (r.hex && Ba.test(i))
|
|
3105
|
+
return Ka(i, 16);
|
|
3084
3106
|
if (i.search(/.+[eE].+/) !== -1)
|
|
3085
|
-
return
|
|
3107
|
+
return qa(e, i, r);
|
|
3086
3108
|
{
|
|
3087
|
-
const a =
|
|
3109
|
+
const a = Ya.exec(i);
|
|
3088
3110
|
if (a) {
|
|
3089
3111
|
const l = a[1] || "", u = a[2];
|
|
3090
|
-
let p =
|
|
3112
|
+
let p = Wa(a[3]);
|
|
3091
3113
|
const g = l ? (
|
|
3092
3114
|
// 0., -00., 000.
|
|
3093
3115
|
e[u.length + 1] === "."
|
|
@@ -3108,10 +3130,10 @@ function Xa(e, r = {}) {
|
|
|
3108
3130
|
return e;
|
|
3109
3131
|
}
|
|
3110
3132
|
}
|
|
3111
|
-
const
|
|
3112
|
-
function
|
|
3133
|
+
const Ga = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;
|
|
3134
|
+
function qa(e, r, i) {
|
|
3113
3135
|
if (!i.eNotation) return e;
|
|
3114
|
-
const a = r.match(
|
|
3136
|
+
const a = r.match(Ga);
|
|
3115
3137
|
if (a) {
|
|
3116
3138
|
let l = a[1] || "";
|
|
3117
3139
|
const u = a[3].indexOf("e") === -1 ? "E" : "e", p = a[2], g = l ? (
|
|
@@ -3122,10 +3144,10 @@ function Ga(e, r, i) {
|
|
|
3122
3144
|
} else
|
|
3123
3145
|
return e;
|
|
3124
3146
|
}
|
|
3125
|
-
function
|
|
3147
|
+
function Wa(e) {
|
|
3126
3148
|
return e && e.indexOf(".") !== -1 && (e = e.replace(/0+$/, ""), e === "." ? e = "0" : e[0] === "." ? e = "0" + e : e[e.length - 1] === "." && (e = e.substring(0, e.length - 1))), e;
|
|
3127
3149
|
}
|
|
3128
|
-
function
|
|
3150
|
+
function Ka(e, r) {
|
|
3129
3151
|
if (parseInt) return parseInt(e, r);
|
|
3130
3152
|
if (Number.parseInt) return Number.parseInt(e, r);
|
|
3131
3153
|
if (window && window.parseInt) return window.parseInt(e, r);
|
|
@@ -3138,7 +3160,7 @@ function Qo(e) {
|
|
|
3138
3160
|
return !0;
|
|
3139
3161
|
} : () => !1;
|
|
3140
3162
|
}
|
|
3141
|
-
class
|
|
3163
|
+
class Ja {
|
|
3142
3164
|
constructor(r) {
|
|
3143
3165
|
this.options = r, this.currentNode = null, this.tagsNodeStack = [], this.docTypeEntities = {}, this.lastEntities = {
|
|
3144
3166
|
apos: { regex: /&(apos|#39|#x27);/g, val: "'" },
|
|
@@ -3161,10 +3183,10 @@ class Ka {
|
|
|
3161
3183
|
inr: { regex: /&(inr|#8377);/g, val: "₹" },
|
|
3162
3184
|
num_dec: { regex: /&#([0-9]{1,7});/g, val: (i, a) => String.fromCodePoint(Number.parseInt(a, 10)) },
|
|
3163
3185
|
num_hex: { regex: /&#x([0-9a-fA-F]{1,6});/g, val: (i, a) => String.fromCodePoint(Number.parseInt(a, 16)) }
|
|
3164
|
-
}, this.addExternalEntities =
|
|
3186
|
+
}, this.addExternalEntities = Za, this.parseXml = rc, this.parseTextData = Qa, this.resolveNameSpace = ec, this.buildAttributesMap = nc, this.isItStopNode = ac, this.replaceEntitiesValue = ic, this.readStopNodeData = lc, this.saveTextToParentTag = sc, this.addChild = oc, this.ignoreAttributesFn = Qo(this.options.ignoreAttributes);
|
|
3165
3187
|
}
|
|
3166
3188
|
}
|
|
3167
|
-
function
|
|
3189
|
+
function Za(e) {
|
|
3168
3190
|
const r = Object.keys(e);
|
|
3169
3191
|
for (let i = 0; i < r.length; i++) {
|
|
3170
3192
|
const a = r[i];
|
|
@@ -3174,14 +3196,14 @@ function Ja(e) {
|
|
|
3174
3196
|
};
|
|
3175
3197
|
}
|
|
3176
3198
|
}
|
|
3177
|
-
function
|
|
3199
|
+
function Qa(e, r, i, a, l, u, p) {
|
|
3178
3200
|
if (e !== void 0 && (this.options.trimValues && !a && (e = e.trim()), e.length > 0)) {
|
|
3179
3201
|
p || (e = this.replaceEntitiesValue(e));
|
|
3180
3202
|
const g = this.options.tagValueProcessor(r, e, i, l, u);
|
|
3181
3203
|
return g == null ? e : typeof g != typeof e || g !== e ? g : this.options.trimValues ? Kn(e, this.options.parseTagValue, this.options.numberParseOptions) : e.trim() === e ? Kn(e, this.options.parseTagValue, this.options.numberParseOptions) : e;
|
|
3182
3204
|
}
|
|
3183
3205
|
}
|
|
3184
|
-
function
|
|
3206
|
+
function ec(e) {
|
|
3185
3207
|
if (this.options.removeNSPrefix) {
|
|
3186
3208
|
const r = e.split(":"), i = e.charAt(0) === "/" ? "/" : "";
|
|
3187
3209
|
if (r[0] === "xmlns")
|
|
@@ -3190,10 +3212,10 @@ function Qa(e) {
|
|
|
3190
3212
|
}
|
|
3191
3213
|
return e;
|
|
3192
3214
|
}
|
|
3193
|
-
const
|
|
3194
|
-
function
|
|
3215
|
+
const tc = new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`, "gm");
|
|
3216
|
+
function nc(e, r, i) {
|
|
3195
3217
|
if (this.options.ignoreAttributes !== !0 && typeof e == "string") {
|
|
3196
|
-
const a = Zo(e,
|
|
3218
|
+
const a = Zo(e, tc), l = a.length, u = {};
|
|
3197
3219
|
for (let p = 0; p < l; p++) {
|
|
3198
3220
|
const g = this.resolveNameSpace(a[p][1]);
|
|
3199
3221
|
if (this.ignoreAttributesFn(g, r))
|
|
@@ -3219,7 +3241,7 @@ function tc(e, r, i) {
|
|
|
3219
3241
|
return u;
|
|
3220
3242
|
}
|
|
3221
3243
|
}
|
|
3222
|
-
const
|
|
3244
|
+
const rc = function(e) {
|
|
3223
3245
|
e = e.replace(/\r\n?/g, `
|
|
3224
3246
|
`);
|
|
3225
3247
|
const r = new at("!xml");
|
|
@@ -3230,8 +3252,8 @@ const nc = function(e) {
|
|
|
3230
3252
|
const g = lt(e, ">", u, "Closing Tag is not closed.");
|
|
3231
3253
|
let m = e.substring(u + 2, g).trim();
|
|
3232
3254
|
if (this.options.removeNSPrefix) {
|
|
3233
|
-
const
|
|
3234
|
-
|
|
3255
|
+
const O = m.indexOf(":");
|
|
3256
|
+
O !== -1 && (m = m.substr(O + 1));
|
|
3235
3257
|
}
|
|
3236
3258
|
this.options.transformTagName && (m = this.options.transformTagName(m)), i && (a = this.saveTextToParentTag(a, i, l));
|
|
3237
3259
|
const S = l.substring(l.lastIndexOf(".") + 1);
|
|
@@ -3255,7 +3277,7 @@ const nc = function(e) {
|
|
|
3255
3277
|
}
|
|
3256
3278
|
u = g;
|
|
3257
3279
|
} else if (e.substr(u + 1, 2) === "!D") {
|
|
3258
|
-
const g =
|
|
3280
|
+
const g = Fa(e, u);
|
|
3259
3281
|
this.docTypeEntities = g.entities, u = g.i;
|
|
3260
3282
|
} else if (e.substr(u + 1, 2) === "![") {
|
|
3261
3283
|
const g = lt(e, "]]>", u, "CDATA is not closed.") - 2, m = e.substring(u + 9, g);
|
|
@@ -3265,7 +3287,7 @@ const nc = function(e) {
|
|
|
3265
3287
|
} else {
|
|
3266
3288
|
let g = Wn(e, u, this.options.removeNSPrefix), m = g.tagName;
|
|
3267
3289
|
const S = g.rawTagName;
|
|
3268
|
-
let _ = g.tagExp,
|
|
3290
|
+
let _ = g.tagExp, O = g.attrExpPresent, C = g.closeIndex;
|
|
3269
3291
|
this.options.transformTagName && (m = this.options.transformTagName(m)), i && a && i.tagname !== "!xml" && (a = this.saveTextToParentTag(a, i, l, !1));
|
|
3270
3292
|
const $ = i;
|
|
3271
3293
|
$ && this.options.unpairedTags.indexOf($.tagname) !== -1 && (i = this.tagsNodeStack.pop(), l = l.substring(0, l.lastIndexOf("."))), m !== r.tagname && (l += l ? "." + m : m);
|
|
@@ -3281,16 +3303,16 @@ const nc = function(e) {
|
|
|
3281
3303
|
if (!K) throw new Error(`Unexpected end of ${S}`);
|
|
3282
3304
|
u = K.i, w = K.tagContent;
|
|
3283
3305
|
}
|
|
3284
|
-
const
|
|
3285
|
-
m !== _ &&
|
|
3306
|
+
const I = new at(m);
|
|
3307
|
+
m !== _ && O && (I[":@"] = this.buildAttributesMap(_, l, m)), w && (w = this.parseTextData(w, m, l, !0, O, !0, !0)), l = l.substr(0, l.lastIndexOf(".")), I.add(this.options.textNodeName, w), this.addChild(i, I, l, M);
|
|
3286
3308
|
} else {
|
|
3287
3309
|
if (_.length > 0 && _.lastIndexOf("/") === _.length - 1) {
|
|
3288
3310
|
m[m.length - 1] === "/" ? (m = m.substr(0, m.length - 1), l = l.substr(0, l.length - 1), _ = m) : _ = _.substr(0, _.length - 1), this.options.transformTagName && (m = this.options.transformTagName(m));
|
|
3289
3311
|
const w = new at(m);
|
|
3290
|
-
m !== _ &&
|
|
3312
|
+
m !== _ && O && (w[":@"] = this.buildAttributesMap(_, l, m)), this.addChild(i, w, l, M), l = l.substr(0, l.lastIndexOf("."));
|
|
3291
3313
|
} else {
|
|
3292
3314
|
const w = new at(m);
|
|
3293
|
-
this.tagsNodeStack.push(i), m !== _ &&
|
|
3315
|
+
this.tagsNodeStack.push(i), m !== _ && O && (w[":@"] = this.buildAttributesMap(_, l, m)), this.addChild(i, w, l, M), i = w;
|
|
3294
3316
|
}
|
|
3295
3317
|
a = "", u = C;
|
|
3296
3318
|
}
|
|
@@ -3299,12 +3321,12 @@ const nc = function(e) {
|
|
|
3299
3321
|
a += e[u];
|
|
3300
3322
|
return r.child;
|
|
3301
3323
|
};
|
|
3302
|
-
function
|
|
3324
|
+
function oc(e, r, i, a) {
|
|
3303
3325
|
this.options.captureMetaData || (a = void 0);
|
|
3304
3326
|
const l = this.options.updateTag(r.tagname, i, r[":@"]);
|
|
3305
3327
|
l === !1 || (typeof l == "string" && (r.tagname = l), e.addChild(r, a));
|
|
3306
3328
|
}
|
|
3307
|
-
const
|
|
3329
|
+
const ic = function(e) {
|
|
3308
3330
|
if (this.options.processEntities) {
|
|
3309
3331
|
for (let r in this.docTypeEntities) {
|
|
3310
3332
|
const i = this.docTypeEntities[r];
|
|
@@ -3323,7 +3345,7 @@ const oc = function(e) {
|
|
|
3323
3345
|
}
|
|
3324
3346
|
return e;
|
|
3325
3347
|
};
|
|
3326
|
-
function
|
|
3348
|
+
function sc(e, r, i, a) {
|
|
3327
3349
|
return e && (a === void 0 && (a = r.child.length === 0), e = this.parseTextData(
|
|
3328
3350
|
e,
|
|
3329
3351
|
r.tagname,
|
|
@@ -3333,7 +3355,7 @@ function ic(e, r, i, a) {
|
|
|
3333
3355
|
a
|
|
3334
3356
|
), e !== void 0 && e !== "" && r.add(this.options.textNodeName, e), e = ""), e;
|
|
3335
3357
|
}
|
|
3336
|
-
function
|
|
3358
|
+
function ac(e, r, i) {
|
|
3337
3359
|
const a = "*." + i;
|
|
3338
3360
|
for (const l in e) {
|
|
3339
3361
|
const u = e[l];
|
|
@@ -3341,7 +3363,7 @@ function sc(e, r, i) {
|
|
|
3341
3363
|
}
|
|
3342
3364
|
return !1;
|
|
3343
3365
|
}
|
|
3344
|
-
function
|
|
3366
|
+
function cc(e, r, i = ">") {
|
|
3345
3367
|
let a, l = "";
|
|
3346
3368
|
for (let u = r; u < e.length; u++) {
|
|
3347
3369
|
let p = e[u];
|
|
@@ -3372,7 +3394,7 @@ function lt(e, r, i, a) {
|
|
|
3372
3394
|
return l + r.length - 1;
|
|
3373
3395
|
}
|
|
3374
3396
|
function Wn(e, r, i, a = ">") {
|
|
3375
|
-
const l =
|
|
3397
|
+
const l = cc(e, r + 1, a);
|
|
3376
3398
|
if (!l) return;
|
|
3377
3399
|
let u = l.data;
|
|
3378
3400
|
const p = l.index, g = u.search(/\s/);
|
|
@@ -3380,8 +3402,8 @@ function Wn(e, r, i, a = ">") {
|
|
|
3380
3402
|
g !== -1 && (m = u.substring(0, g), u = u.substring(g + 1).trimStart());
|
|
3381
3403
|
const _ = m;
|
|
3382
3404
|
if (i) {
|
|
3383
|
-
const
|
|
3384
|
-
|
|
3405
|
+
const O = m.indexOf(":");
|
|
3406
|
+
O !== -1 && (m = m.substr(O + 1), S = m !== l.data.substr(O + 1));
|
|
3385
3407
|
}
|
|
3386
3408
|
return {
|
|
3387
3409
|
tagName: m,
|
|
@@ -3391,7 +3413,7 @@ function Wn(e, r, i, a = ">") {
|
|
|
3391
3413
|
rawTagName: _
|
|
3392
3414
|
};
|
|
3393
3415
|
}
|
|
3394
|
-
function
|
|
3416
|
+
function lc(e, r, i) {
|
|
3395
3417
|
const a = i;
|
|
3396
3418
|
let l = 1;
|
|
3397
3419
|
for (; i < e.length; i++)
|
|
@@ -3418,19 +3440,19 @@ function cc(e, r, i) {
|
|
|
3418
3440
|
function Kn(e, r, i) {
|
|
3419
3441
|
if (r && typeof e == "string") {
|
|
3420
3442
|
const a = e.trim();
|
|
3421
|
-
return a === "true" ? !0 : a === "false" ? !1 :
|
|
3443
|
+
return a === "true" ? !0 : a === "false" ? !1 : Ua(e, i);
|
|
3422
3444
|
} else
|
|
3423
|
-
return
|
|
3445
|
+
return _a(e) ? e : "";
|
|
3424
3446
|
}
|
|
3425
3447
|
const Mn = at.getMetaDataSymbol();
|
|
3426
|
-
function
|
|
3448
|
+
function uc(e, r) {
|
|
3427
3449
|
return ei(e, r);
|
|
3428
3450
|
}
|
|
3429
3451
|
function ei(e, r, i) {
|
|
3430
3452
|
let a;
|
|
3431
3453
|
const l = {};
|
|
3432
3454
|
for (let u = 0; u < e.length; u++) {
|
|
3433
|
-
const p = e[u], g =
|
|
3455
|
+
const p = e[u], g = fc(p);
|
|
3434
3456
|
let m = "";
|
|
3435
3457
|
if (i === void 0 ? m = g : m = i + "." + g, g === r.textNodeName)
|
|
3436
3458
|
a === void 0 ? a = p[g] : a += "" + p[g];
|
|
@@ -3439,21 +3461,21 @@ function ei(e, r, i) {
|
|
|
3439
3461
|
continue;
|
|
3440
3462
|
if (p[g]) {
|
|
3441
3463
|
let S = ei(p[g], r, m);
|
|
3442
|
-
const _ =
|
|
3443
|
-
p[Mn] !== void 0 && (S[Mn] = p[Mn]), p[":@"] ?
|
|
3464
|
+
const _ = pc(S, r);
|
|
3465
|
+
p[Mn] !== void 0 && (S[Mn] = p[Mn]), p[":@"] ? dc(S, p[":@"], m, r) : Object.keys(S).length === 1 && S[r.textNodeName] !== void 0 && !r.alwaysCreateTextNode ? S = S[r.textNodeName] : Object.keys(S).length === 0 && (r.alwaysCreateTextNode ? S[r.textNodeName] = "" : S = ""), l[g] !== void 0 && l.hasOwnProperty(g) ? (Array.isArray(l[g]) || (l[g] = [l[g]]), l[g].push(S)) : r.isArray(g, m, _) ? l[g] = [S] : l[g] = S;
|
|
3444
3466
|
}
|
|
3445
3467
|
}
|
|
3446
3468
|
}
|
|
3447
3469
|
return typeof a == "string" ? a.length > 0 && (l[r.textNodeName] = a) : a !== void 0 && (l[r.textNodeName] = a), l;
|
|
3448
3470
|
}
|
|
3449
|
-
function
|
|
3471
|
+
function fc(e) {
|
|
3450
3472
|
const r = Object.keys(e);
|
|
3451
3473
|
for (let i = 0; i < r.length; i++) {
|
|
3452
3474
|
const a = r[i];
|
|
3453
3475
|
if (a !== ":@") return a;
|
|
3454
3476
|
}
|
|
3455
3477
|
}
|
|
3456
|
-
function
|
|
3478
|
+
function dc(e, r, i, a) {
|
|
3457
3479
|
if (r) {
|
|
3458
3480
|
const l = Object.keys(r), u = l.length;
|
|
3459
3481
|
for (let p = 0; p < u; p++) {
|
|
@@ -3462,13 +3484,13 @@ function fc(e, r, i, a) {
|
|
|
3462
3484
|
}
|
|
3463
3485
|
}
|
|
3464
3486
|
}
|
|
3465
|
-
function
|
|
3487
|
+
function pc(e, r) {
|
|
3466
3488
|
const { textNodeName: i } = r, a = Object.keys(e).length;
|
|
3467
3489
|
return !!(a === 0 || a === 1 && (e[i] || typeof e[i] == "boolean" || e[i] === 0));
|
|
3468
3490
|
}
|
|
3469
|
-
class
|
|
3491
|
+
class hc {
|
|
3470
3492
|
constructor(r) {
|
|
3471
|
-
this.externalEntities = {}, this.options =
|
|
3493
|
+
this.externalEntities = {}, this.options = La(r);
|
|
3472
3494
|
}
|
|
3473
3495
|
/**
|
|
3474
3496
|
* Parse XML dats to JS object
|
|
@@ -3486,10 +3508,10 @@ class pc {
|
|
|
3486
3508
|
if (u !== !0)
|
|
3487
3509
|
throw Error(`${u.err.msg}:${u.err.line}:${u.err.col}`);
|
|
3488
3510
|
}
|
|
3489
|
-
const a = new
|
|
3511
|
+
const a = new Ja(this.options);
|
|
3490
3512
|
a.addExternalEntities(this.externalEntities);
|
|
3491
3513
|
const l = a.parseXml(r);
|
|
3492
|
-
return this.options.preserveOrder || l === void 0 ? l :
|
|
3514
|
+
return this.options.preserveOrder || l === void 0 ? l : uc(l, this.options);
|
|
3493
3515
|
}
|
|
3494
3516
|
/**
|
|
3495
3517
|
* Add Entity which is not by default supported by this library
|
|
@@ -3519,21 +3541,21 @@ class pc {
|
|
|
3519
3541
|
return at.getMetaDataSymbol();
|
|
3520
3542
|
}
|
|
3521
3543
|
}
|
|
3522
|
-
const
|
|
3544
|
+
const gc = `
|
|
3523
3545
|
`;
|
|
3524
|
-
function
|
|
3546
|
+
function mc(e, r) {
|
|
3525
3547
|
let i = "";
|
|
3526
|
-
return r.format && r.indentBy.length > 0 && (i =
|
|
3548
|
+
return r.format && r.indentBy.length > 0 && (i = gc), ti(e, r, "", i);
|
|
3527
3549
|
}
|
|
3528
3550
|
function ti(e, r, i, a) {
|
|
3529
3551
|
let l = "", u = !1;
|
|
3530
3552
|
for (let p = 0; p < e.length; p++) {
|
|
3531
|
-
const g = e[p], m =
|
|
3553
|
+
const g = e[p], m = vc(g);
|
|
3532
3554
|
if (m === void 0) continue;
|
|
3533
3555
|
let S = "";
|
|
3534
3556
|
if (i.length === 0 ? S = m : S = `${i}.${m}`, m === r.textNodeName) {
|
|
3535
3557
|
let M = g[m];
|
|
3536
|
-
|
|
3558
|
+
yc(S, r) || (M = r.tagValueProcessor(m, M), M = ni(M, r)), u && (l += a), l += M, u = !1;
|
|
3537
3559
|
continue;
|
|
3538
3560
|
} else if (m === r.cdataPropName) {
|
|
3539
3561
|
u && (l += a), l += `<![CDATA[${g[m][0][r.textNodeName]}]]>`, u = !1;
|
|
@@ -3543,18 +3565,18 @@ function ti(e, r, i, a) {
|
|
|
3543
3565
|
continue;
|
|
3544
3566
|
} else if (m[0] === "?") {
|
|
3545
3567
|
const M = Eo(g[":@"], r), w = m === "?xml" ? "" : a;
|
|
3546
|
-
let
|
|
3547
|
-
|
|
3568
|
+
let I = g[m][0][r.textNodeName];
|
|
3569
|
+
I = I.length !== 0 ? " " + I : "", l += w + `<${m}${I}${M}?>`, u = !0;
|
|
3548
3570
|
continue;
|
|
3549
3571
|
}
|
|
3550
3572
|
let _ = a;
|
|
3551
3573
|
_ !== "" && (_ += r.indentBy);
|
|
3552
|
-
const
|
|
3574
|
+
const O = Eo(g[":@"], r), C = a + `<${m}${O}`, $ = ti(g[m], r, S, _);
|
|
3553
3575
|
r.unpairedTags.indexOf(m) !== -1 ? r.suppressUnpairedNode ? l += C + ">" : l += C + "/>" : (!$ || $.length === 0) && r.suppressEmptyNode ? l += C + "/>" : $ && $.endsWith(">") ? l += C + `>${$}${a}</${m}>` : (l += C + ">", $ && a !== "" && ($.includes("/>") || $.includes("</")) ? l += a + r.indentBy + $ + a : l += $, l += `</${m}>`), u = !0;
|
|
3554
3576
|
}
|
|
3555
3577
|
return l;
|
|
3556
3578
|
}
|
|
3557
|
-
function
|
|
3579
|
+
function vc(e) {
|
|
3558
3580
|
const r = Object.keys(e);
|
|
3559
3581
|
for (let i = 0; i < r.length; i++) {
|
|
3560
3582
|
const a = r[i];
|
|
@@ -3572,7 +3594,7 @@ function Eo(e, r) {
|
|
|
3572
3594
|
}
|
|
3573
3595
|
return i;
|
|
3574
3596
|
}
|
|
3575
|
-
function
|
|
3597
|
+
function yc(e, r) {
|
|
3576
3598
|
e = e.substr(0, e.length - r.textNodeName.length - 1);
|
|
3577
3599
|
let i = e.substr(e.lastIndexOf(".") + 1);
|
|
3578
3600
|
for (let a in r.stopNodes)
|
|
@@ -3587,7 +3609,7 @@ function ni(e, r) {
|
|
|
3587
3609
|
}
|
|
3588
3610
|
return e;
|
|
3589
3611
|
}
|
|
3590
|
-
const
|
|
3612
|
+
const xc = {
|
|
3591
3613
|
attributeNamePrefix: "@_",
|
|
3592
3614
|
attributesGroupName: !1,
|
|
3593
3615
|
textNodeName: "#text",
|
|
@@ -3622,16 +3644,16 @@ const yc = {
|
|
|
3622
3644
|
oneListGroup: !1
|
|
3623
3645
|
};
|
|
3624
3646
|
function rt(e) {
|
|
3625
|
-
this.options = Object.assign({},
|
|
3647
|
+
this.options = Object.assign({}, xc, e), this.options.ignoreAttributes === !0 || this.options.attributesGroupName ? this.isAttribute = function() {
|
|
3626
3648
|
return !1;
|
|
3627
|
-
} : (this.ignoreAttributesFn = Qo(this.options.ignoreAttributes), this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute =
|
|
3649
|
+
} : (this.ignoreAttributesFn = Qo(this.options.ignoreAttributes), this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = Ec), this.processTextOrObjNode = bc, this.options.format ? (this.indentate = wc, this.tagEndChar = `>
|
|
3628
3650
|
`, this.newLine = `
|
|
3629
3651
|
`) : (this.indentate = function() {
|
|
3630
3652
|
return "";
|
|
3631
3653
|
}, this.tagEndChar = ">", this.newLine = "");
|
|
3632
3654
|
}
|
|
3633
3655
|
rt.prototype.build = function(e) {
|
|
3634
|
-
return this.options.preserveOrder ?
|
|
3656
|
+
return this.options.preserveOrder ? mc(e, this.options) : (Array.isArray(e) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (e = {
|
|
3635
3657
|
[this.options.arrayNodeName]: e
|
|
3636
3658
|
}), this.j2x(e, 0, []).val);
|
|
3637
3659
|
};
|
|
@@ -3660,20 +3682,20 @@ rt.prototype.j2x = function(e, r, i) {
|
|
|
3660
3682
|
const g = e[p].length;
|
|
3661
3683
|
let m = "", S = "";
|
|
3662
3684
|
for (let _ = 0; _ < g; _++) {
|
|
3663
|
-
const
|
|
3664
|
-
if (!(typeof
|
|
3685
|
+
const O = e[p][_];
|
|
3686
|
+
if (!(typeof O > "u")) if (O === null)
|
|
3665
3687
|
p[0] === "?" ? l += this.indentate(r) + "<" + p + "?" + this.tagEndChar : l += this.indentate(r) + "<" + p + "/" + this.tagEndChar;
|
|
3666
|
-
else if (typeof
|
|
3688
|
+
else if (typeof O == "object")
|
|
3667
3689
|
if (this.options.oneListGroup) {
|
|
3668
|
-
const C = this.j2x(
|
|
3669
|
-
m += C.val, this.options.attributesGroupName &&
|
|
3690
|
+
const C = this.j2x(O, r + 1, i.concat(p));
|
|
3691
|
+
m += C.val, this.options.attributesGroupName && O.hasOwnProperty(this.options.attributesGroupName) && (S += C.attrStr);
|
|
3670
3692
|
} else
|
|
3671
|
-
m += this.processTextOrObjNode(
|
|
3693
|
+
m += this.processTextOrObjNode(O, p, r, i);
|
|
3672
3694
|
else if (this.options.oneListGroup) {
|
|
3673
|
-
let C = this.options.tagValueProcessor(p,
|
|
3695
|
+
let C = this.options.tagValueProcessor(p, O);
|
|
3674
3696
|
C = this.replaceEntitiesValue(C), m += C;
|
|
3675
3697
|
} else
|
|
3676
|
-
m += this.buildTextValNode(
|
|
3698
|
+
m += this.buildTextValNode(O, p, "", r);
|
|
3677
3699
|
}
|
|
3678
3700
|
this.options.oneListGroup && (m = this.buildObjectNode(m, p, S, r)), l += m;
|
|
3679
3701
|
} else if (this.options.attributesGroupName && p === this.options.attributesGroupName) {
|
|
@@ -3687,7 +3709,7 @@ rt.prototype.j2x = function(e, r, i) {
|
|
|
3687
3709
|
rt.prototype.buildAttrPairStr = function(e, r) {
|
|
3688
3710
|
return r = this.options.attributeValueProcessor(e, "" + r), r = this.replaceEntitiesValue(r), this.options.suppressBooleanAttributes && r === "true" ? " " + e : " " + e + '="' + r + '"';
|
|
3689
3711
|
};
|
|
3690
|
-
function
|
|
3712
|
+
function bc(e, r, i, a) {
|
|
3691
3713
|
const l = this.j2x(e, i + 1, a.concat(r));
|
|
3692
3714
|
return e[this.options.textNodeName] !== void 0 && Object.keys(e).length === 1 ? this.buildTextValNode(e[this.options.textNodeName], r, l.attrStr, i) : this.buildObjectNode(l.val, r, l.attrStr, i);
|
|
3693
3715
|
}
|
|
@@ -3723,13 +3745,13 @@ rt.prototype.replaceEntitiesValue = function(e) {
|
|
|
3723
3745
|
}
|
|
3724
3746
|
return e;
|
|
3725
3747
|
};
|
|
3726
|
-
function
|
|
3748
|
+
function wc(e) {
|
|
3727
3749
|
return this.options.indentBy.repeat(e);
|
|
3728
3750
|
}
|
|
3729
|
-
function
|
|
3751
|
+
function Ec(e) {
|
|
3730
3752
|
return e.startsWith(this.options.attributeNamePrefix) && e !== this.options.textNodeName ? e.substr(this.attrPrefixLen) : !1;
|
|
3731
3753
|
}
|
|
3732
|
-
const
|
|
3754
|
+
const Nc = /* @__PURE__ */ Oe(({
|
|
3733
3755
|
fillMode: e = "preserve",
|
|
3734
3756
|
svg: r,
|
|
3735
3757
|
shouldStripClasses: i = !0,
|
|
@@ -3738,8 +3760,8 @@ const Ec = /* @__PURE__ */ Pe(({
|
|
|
3738
3760
|
shouldStripStyles: u = !0,
|
|
3739
3761
|
...p
|
|
3740
3762
|
}, g) => {
|
|
3741
|
-
const S = ["id"].map((M) => `@_${M}`), _ = ["class"].map((M) => `@_${M}`),
|
|
3742
|
-
const M = new
|
|
3763
|
+
const S = ["id"].map((M) => `@_${M}`), _ = ["class"].map((M) => `@_${M}`), O = ["fill", "stroke", "style"].map((M) => `@_${M}`), C = ["x", "y"].map((M) => `@_${M}`), $ = () => {
|
|
3764
|
+
const M = new hc({
|
|
3743
3765
|
attributeNamePrefix: "@_",
|
|
3744
3766
|
ignoreAttributes: !1,
|
|
3745
3767
|
ignoreDeclaration: !0,
|
|
@@ -3750,7 +3772,7 @@ const Ec = /* @__PURE__ */ Pe(({
|
|
|
3750
3772
|
if (u && K.toLowerCase() === "style") return !1;
|
|
3751
3773
|
const q = Object.keys(Y);
|
|
3752
3774
|
for (const E of q)
|
|
3753
|
-
K.toLowerCase() === "svg" && (l && C.includes(E.toLowerCase()) && delete Y[E], e !== "preserve" && (E.toLowerCase() === "@_width" && delete Y[E], E.toLowerCase() === "@_height" && delete Y[E])), a && S.includes(E.toLowerCase()) && delete Y[E], i && _.includes(E.toLowerCase()) && delete Y[E], u &&
|
|
3775
|
+
K.toLowerCase() === "svg" && (l && C.includes(E.toLowerCase()) && delete Y[E], e !== "preserve" && (E.toLowerCase() === "@_width" && delete Y[E], E.toLowerCase() === "@_height" && delete Y[E])), a && S.includes(E.toLowerCase()) && delete Y[E], i && _.includes(E.toLowerCase()) && delete Y[E], u && O.includes(E.toLowerCase()) && delete Y[E];
|
|
3754
3776
|
if (K.toLowerCase() === "svg")
|
|
3755
3777
|
switch (e) {
|
|
3756
3778
|
case "fill":
|
|
@@ -3769,8 +3791,8 @@ const Ec = /* @__PURE__ */ Pe(({
|
|
|
3769
3791
|
attributeNamePrefix: "@_",
|
|
3770
3792
|
format: !0,
|
|
3771
3793
|
ignoreAttributes: !1
|
|
3772
|
-
}),
|
|
3773
|
-
return w.build(
|
|
3794
|
+
}), I = M.parse(r);
|
|
3795
|
+
return w.build(I);
|
|
3774
3796
|
};
|
|
3775
3797
|
return /* @__PURE__ */ x.jsx(
|
|
3776
3798
|
"figure",
|
|
@@ -3782,8 +3804,8 @@ const Ec = /* @__PURE__ */ Pe(({
|
|
|
3782
3804
|
}
|
|
3783
3805
|
);
|
|
3784
3806
|
});
|
|
3785
|
-
process.env.NODE_ENV === "development" && (
|
|
3786
|
-
const No = "base-",
|
|
3807
|
+
process.env.NODE_ENV === "development" && (Nc.displayName = "FlatSVG");
|
|
3808
|
+
const No = "base-", Sc = /* @__PURE__ */ Oe(({
|
|
3787
3809
|
alignSections: e = !1,
|
|
3788
3810
|
children: r,
|
|
3789
3811
|
className: i,
|
|
@@ -3794,7 +3816,7 @@ const No = "base-", Nc = /* @__PURE__ */ Pe(({
|
|
|
3794
3816
|
verticalSpacing: g = 0,
|
|
3795
3817
|
...m
|
|
3796
3818
|
}, S) => {
|
|
3797
|
-
const _ = Ee(null), [
|
|
3819
|
+
const _ = Ee(null), [O, C] = _e(NaN), [$, M] = _e(NaN), [w, I] = _e(NaN), [K, J] = _e(NaN), Y = () => xe.from(_.current)?.width ?? 0, q = () => xe.from(_.current)?.height ?? 0, E = () => {
|
|
3798
3820
|
const B = _.current;
|
|
3799
3821
|
if (!B) return;
|
|
3800
3822
|
const U = B.children, oe = p;
|
|
@@ -3811,12 +3833,12 @@ const No = "base-", Nc = /* @__PURE__ */ Pe(({
|
|
|
3811
3833
|
for (let F = 0; F < Z; F++)
|
|
3812
3834
|
W[te + F] = ae + (ae === 0 ? 0 : g) + (xe.from(R)?.height ?? 0);
|
|
3813
3835
|
if (e && te + Z === oe) {
|
|
3814
|
-
const F =
|
|
3836
|
+
const F = Pt(W);
|
|
3815
3837
|
for (let T = 0; T < oe; T++)
|
|
3816
3838
|
W[T] = F;
|
|
3817
3839
|
}
|
|
3818
3840
|
}
|
|
3819
|
-
const X = Y(), L =
|
|
3841
|
+
const X = Y(), L = Pt(W, oe);
|
|
3820
3842
|
if (C(X), M(L), isNaN(L) || (B.style.height = `${L}px`), l)
|
|
3821
3843
|
for (const R of Array.from(U))
|
|
3822
3844
|
R instanceof HTMLElement && (R.style.left = `calc(${X}px - ${R.style.left} - ${R.getBoundingClientRect().width}px)`);
|
|
@@ -3829,24 +3851,24 @@ const No = "base-", Nc = /* @__PURE__ */ Pe(({
|
|
|
3829
3851
|
for (let F = 0; F < Z; F++)
|
|
3830
3852
|
W[te + F] = ae + (ae === 0 ? 0 : a) + (xe.from(R)?.width ?? 0);
|
|
3831
3853
|
if (e && te + Z === oe) {
|
|
3832
|
-
const F =
|
|
3854
|
+
const F = Pt(W);
|
|
3833
3855
|
for (let T = 0; T < oe; T++)
|
|
3834
3856
|
W[T] = F;
|
|
3835
3857
|
}
|
|
3836
3858
|
}
|
|
3837
|
-
const X = q(), L =
|
|
3859
|
+
const X = q(), L = Pt(W, oe);
|
|
3838
3860
|
if (M(X), C(L), isNaN(L) || (B.style.width = `${L}px`), l)
|
|
3839
3861
|
for (const R of Array.from(U))
|
|
3840
3862
|
R instanceof HTMLElement && (R.style.top = `calc(${X}px - ${R.style.top} - ${R.getBoundingClientRect().height}px)`);
|
|
3841
3863
|
}
|
|
3842
3864
|
}, k = he((B) => {
|
|
3843
3865
|
const U = xe.size(xe.from(B) ?? xe.zero), oe = Y(), W = q();
|
|
3844
|
-
(
|
|
3866
|
+
(O !== oe || $ !== W || U.width !== w || U.height !== K) && (E(), I(U.width), J(U.height));
|
|
3845
3867
|
}, [e, a, l, p, g, u]);
|
|
3846
3868
|
pr(_, {
|
|
3847
3869
|
onResize: k
|
|
3848
3870
|
}), Ne(() => {
|
|
3849
|
-
const B =
|
|
3871
|
+
const B = Oc(_.current?.innerHTML);
|
|
3850
3872
|
if (B.length === 0) return E();
|
|
3851
3873
|
const U = B.length;
|
|
3852
3874
|
for (let oe = 0; oe < U; oe++) {
|
|
@@ -3854,7 +3876,7 @@ const No = "base-", Nc = /* @__PURE__ */ Pe(({
|
|
|
3854
3876
|
X.src = W, X.onload = () => E();
|
|
3855
3877
|
}
|
|
3856
3878
|
}, [r]);
|
|
3857
|
-
const N =
|
|
3879
|
+
const N = Tc({ orientation: u }), A = _c({ orientation: u, minHeight: $, minWidth: O });
|
|
3858
3880
|
return /* @__PURE__ */ x.jsx(
|
|
3859
3881
|
"div",
|
|
3860
3882
|
{
|
|
@@ -3866,12 +3888,12 @@ const No = "base-", Nc = /* @__PURE__ */ Pe(({
|
|
|
3866
3888
|
}
|
|
3867
3889
|
);
|
|
3868
3890
|
});
|
|
3869
|
-
function
|
|
3891
|
+
function Tc({ orientation: e = "horizontal" }) {
|
|
3870
3892
|
return {
|
|
3871
3893
|
root: se(e)
|
|
3872
3894
|
};
|
|
3873
3895
|
}
|
|
3874
|
-
function
|
|
3896
|
+
function _c({ orientation: e = "horizontal", minHeight: r = NaN, minWidth: i = NaN }) {
|
|
3875
3897
|
return {
|
|
3876
3898
|
body: {
|
|
3877
3899
|
height: e === "horizontal" ? "100%" : "auto",
|
|
@@ -3892,9 +3914,9 @@ function So(e, r) {
|
|
|
3892
3914
|
e[u + _] > p && (S = !1);
|
|
3893
3915
|
g && m && S && (a = u, l = p);
|
|
3894
3916
|
}
|
|
3895
|
-
return isNaN(a) ? [0,
|
|
3917
|
+
return isNaN(a) ? [0, Pt(e, r)] : [a, l];
|
|
3896
3918
|
}
|
|
3897
|
-
function
|
|
3919
|
+
function Pt(e, r) {
|
|
3898
3920
|
let i = e;
|
|
3899
3921
|
return r != null && !isNaN(r) && (i = i.slice(0, Math.max(1, Math.min(r, e.length)))), i.reduce((a, l, u) => l > a ? l : a, 0);
|
|
3900
3922
|
}
|
|
@@ -3907,7 +3929,7 @@ function To(e, r) {
|
|
|
3907
3929
|
}
|
|
3908
3930
|
return 1;
|
|
3909
3931
|
}
|
|
3910
|
-
function
|
|
3932
|
+
function Oc(e) {
|
|
3911
3933
|
if (!e) return [];
|
|
3912
3934
|
const r = /<img.*?src=(["'])(.*?)\1/g, i = /<img.*?src=(["'])(.*?)\1/, a = r.exec(e) ?? [], l = [];
|
|
3913
3935
|
for (const u of a) {
|
|
@@ -3916,8 +3938,8 @@ function _c(e) {
|
|
|
3916
3938
|
}
|
|
3917
3939
|
return l;
|
|
3918
3940
|
}
|
|
3919
|
-
process.env.NODE_ENV === "development" && (
|
|
3920
|
-
const Pc = /* @__PURE__ */
|
|
3941
|
+
process.env.NODE_ENV === "development" && (Sc.displayName = "MasonryGrid");
|
|
3942
|
+
const Pc = /* @__PURE__ */ Oe(({
|
|
3921
3943
|
index: e = 0,
|
|
3922
3944
|
isDisabled: r = !1,
|
|
3923
3945
|
options: i,
|
|
@@ -3926,7 +3948,7 @@ const Pc = /* @__PURE__ */ Pe(({
|
|
|
3926
3948
|
}, u) => {
|
|
3927
3949
|
const p = i.length - 1, g = i[e], m = typeof g == "string" ? g : g?.label, S = () => {
|
|
3928
3950
|
if (r) return;
|
|
3929
|
-
const _ = e < p ? e + 1 : 0,
|
|
3951
|
+
const _ = e < p ? e + 1 : 0, O = i[_], C = typeof O == "string" ? O : O?.value;
|
|
3930
3952
|
a?.(C, _);
|
|
3931
3953
|
};
|
|
3932
3954
|
return /* @__PURE__ */ x.jsx(
|
|
@@ -3943,12 +3965,12 @@ const Pc = /* @__PURE__ */ Pe(({
|
|
|
3943
3965
|
);
|
|
3944
3966
|
});
|
|
3945
3967
|
process.env.NODE_ENV === "development" && (Pc.displayName = "OptionButton");
|
|
3946
|
-
var Wt = { exports: {} },
|
|
3947
|
-
function
|
|
3968
|
+
var Wt = { exports: {} }, kc = Wt.exports, _o;
|
|
3969
|
+
function Cc() {
|
|
3948
3970
|
return _o || (_o = 1, function(e, r) {
|
|
3949
3971
|
(function(i, a) {
|
|
3950
3972
|
e.exports = a();
|
|
3951
|
-
})(
|
|
3973
|
+
})(kc, function() {
|
|
3952
3974
|
function i(n, t) {
|
|
3953
3975
|
var o = Object.keys(n);
|
|
3954
3976
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -3994,17 +4016,17 @@ function kc() {
|
|
|
3994
4016
|
}
|
|
3995
4017
|
function S(n, t) {
|
|
3996
4018
|
if (typeof t != "function" && t !== null) throw new TypeError("Super expression must either be null or a function");
|
|
3997
|
-
n.prototype = Object.create(t && t.prototype, { constructor: { value: n, writable: !0, configurable: !0 } }), Object.defineProperty(n, "prototype", { writable: !1 }), t &&
|
|
4019
|
+
n.prototype = Object.create(t && t.prototype, { constructor: { value: n, writable: !0, configurable: !0 } }), Object.defineProperty(n, "prototype", { writable: !1 }), t && O(n, t);
|
|
3998
4020
|
}
|
|
3999
4021
|
function _(n) {
|
|
4000
4022
|
return _ = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
|
|
4001
4023
|
return t.__proto__ || Object.getPrototypeOf(t);
|
|
4002
4024
|
}, _(n);
|
|
4003
4025
|
}
|
|
4004
|
-
function
|
|
4005
|
-
return
|
|
4026
|
+
function O(n, t) {
|
|
4027
|
+
return O = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(o, s) {
|
|
4006
4028
|
return o.__proto__ = s, o;
|
|
4007
|
-
},
|
|
4029
|
+
}, O(n, t);
|
|
4008
4030
|
}
|
|
4009
4031
|
function C(n) {
|
|
4010
4032
|
if (n === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
@@ -4059,7 +4081,7 @@ function kc() {
|
|
|
4059
4081
|
}(n, "string");
|
|
4060
4082
|
return typeof t == "symbol" ? t : t + "";
|
|
4061
4083
|
}
|
|
4062
|
-
var
|
|
4084
|
+
var I = function(n) {
|
|
4063
4085
|
return !(!n || !n.Window) && n instanceof n.Window;
|
|
4064
4086
|
}, K = void 0, J = void 0;
|
|
4065
4087
|
function Y(n) {
|
|
@@ -4068,7 +4090,7 @@ function kc() {
|
|
|
4068
4090
|
t.ownerDocument !== n.document && typeof n.wrap == "function" && n.wrap(t) === t && (n = n.wrap(n)), J = n;
|
|
4069
4091
|
}
|
|
4070
4092
|
function q(n) {
|
|
4071
|
-
return
|
|
4093
|
+
return I(n) ? n : (n.ownerDocument || n).defaultView || J.window;
|
|
4072
4094
|
}
|
|
4073
4095
|
typeof window < "u" && window && Y(window);
|
|
4074
4096
|
var E = function(n) {
|
|
@@ -4076,7 +4098,7 @@ function kc() {
|
|
|
4076
4098
|
}, k = function(n) {
|
|
4077
4099
|
return typeof n == "function";
|
|
4078
4100
|
}, N = { window: function(n) {
|
|
4079
|
-
return n === J ||
|
|
4101
|
+
return n === J || I(n);
|
|
4080
4102
|
}, docFrag: function(n) {
|
|
4081
4103
|
return E(n) && n.nodeType === 11;
|
|
4082
4104
|
}, object: E, func: k, number: function(n) {
|
|
@@ -4202,7 +4224,7 @@ function kc() {
|
|
|
4202
4224
|
function De(n, t, o) {
|
|
4203
4225
|
return n === "parent" ? F(o) : n === "self" ? t.getRect(o) : ae(o, n);
|
|
4204
4226
|
}
|
|
4205
|
-
function
|
|
4227
|
+
function Ie(n, t, o, s) {
|
|
4206
4228
|
var c = n;
|
|
4207
4229
|
return N.string(c) ? c = De(c, t, o) : N.func(c) && (c = c.apply(void 0, s)), N.element(c) && (c = pe(c)), c;
|
|
4208
4230
|
}
|
|
@@ -4212,12 +4234,12 @@ function kc() {
|
|
|
4212
4234
|
function He(n) {
|
|
4213
4235
|
return !n || "x" in n && "y" in n || ((n = G({}, n)).x = n.left || 0, n.y = n.top || 0, n.width = n.width || (n.right || 0) - n.x, n.height = n.height || (n.bottom || 0) - n.y), n;
|
|
4214
4236
|
}
|
|
4215
|
-
function
|
|
4237
|
+
function ze(n, t, o) {
|
|
4216
4238
|
n.left && (t.left += o.x), n.right && (t.right += o.x), n.top && (t.top += o.y), n.bottom && (t.bottom += o.y), t.width = t.right - t.left, t.height = t.bottom - t.top;
|
|
4217
4239
|
}
|
|
4218
4240
|
function Be(n, t, o) {
|
|
4219
4241
|
var s = o && n.options[o];
|
|
4220
|
-
return ke(
|
|
4242
|
+
return ke(Ie(s && s.origin || n.options.origin, n, t, [n && t])) || { x: 0, y: 0 };
|
|
4221
4243
|
}
|
|
4222
4244
|
function Ye(n, t) {
|
|
4223
4245
|
var o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : function(v) {
|
|
@@ -4243,7 +4265,7 @@ function kc() {
|
|
|
4243
4265
|
var pt = function(n, t) {
|
|
4244
4266
|
return Math.sqrt(n * n + t * t);
|
|
4245
4267
|
}, ui = ["webkit", "moz"];
|
|
4246
|
-
function
|
|
4268
|
+
function jt(n, t) {
|
|
4247
4269
|
n.__set || (n.__set = {});
|
|
4248
4270
|
var o = function(c) {
|
|
4249
4271
|
if (ui.some(function(f) {
|
|
@@ -4329,14 +4351,14 @@ function kc() {
|
|
|
4329
4351
|
return this._interaction._proxy;
|
|
4330
4352
|
}, set: function() {
|
|
4331
4353
|
} });
|
|
4332
|
-
var
|
|
4354
|
+
var Or = function(n, t) {
|
|
4333
4355
|
for (var o = 0; o < t.length; o++) {
|
|
4334
4356
|
var s = t[o];
|
|
4335
4357
|
n.push(s);
|
|
4336
4358
|
}
|
|
4337
4359
|
return n;
|
|
4338
|
-
},
|
|
4339
|
-
return
|
|
4360
|
+
}, Pr = function(n) {
|
|
4361
|
+
return Or([], n);
|
|
4340
4362
|
}, gt = function(n, t) {
|
|
4341
4363
|
for (var o = 0; o < n.length; o++) if (t(n[o], o, n)) return o;
|
|
4342
4364
|
return -1;
|
|
@@ -4380,9 +4402,9 @@ function kc() {
|
|
|
4380
4402
|
for (var h = [], v = 0, b = f.interactables.list; v < b.length; v++) {
|
|
4381
4403
|
var y = b[v];
|
|
4382
4404
|
if (y.options.drop.enabled) {
|
|
4383
|
-
var
|
|
4384
|
-
if (!(N.element(
|
|
4385
|
-
var z = D[
|
|
4405
|
+
var P = y.options.drop.accept;
|
|
4406
|
+
if (!(N.element(P) && P !== d || N.string(P) && !T(d, P) || N.func(P) && !P({ dropzone: y, draggableElement: d }))) for (var j = 0, D = y.getAllElements(); j < D.length; j++) {
|
|
4407
|
+
var z = D[j];
|
|
4386
4408
|
z !== d && h.push({ dropzone: y, element: z, rect: y.getRect(z) });
|
|
4387
4409
|
}
|
|
4388
4410
|
}
|
|
@@ -4396,19 +4418,19 @@ function kc() {
|
|
|
4396
4418
|
}
|
|
4397
4419
|
function Cr(n, t, o) {
|
|
4398
4420
|
for (var s = n.dropState, c = n.interactable, f = n.element, d = [], h = 0, v = s.activeDrops; h < v.length; h++) {
|
|
4399
|
-
var b = v[h], y = b.dropzone,
|
|
4400
|
-
d.push(D ?
|
|
4421
|
+
var b = v[h], y = b.dropzone, P = b.element, j = b.rect, D = y.dropCheck(t, o, c, f, P, j);
|
|
4422
|
+
d.push(D ? P : null);
|
|
4401
4423
|
}
|
|
4402
4424
|
var z = function(H) {
|
|
4403
4425
|
for (var ie, re, ce, ve = [], we = 0; we < H.length; we++) {
|
|
4404
4426
|
var fe = H[we], ye = H[ie];
|
|
4405
4427
|
if (fe && we !== ie) if (ye) {
|
|
4406
|
-
var Ae = V(fe),
|
|
4407
|
-
if (Ae !== fe.ownerDocument) if (
|
|
4428
|
+
var Ae = V(fe), Pe = V(ye);
|
|
4429
|
+
if (Ae !== fe.ownerDocument) if (Pe !== fe.ownerDocument) if (Ae !== Pe) {
|
|
4408
4430
|
ve = ve.length ? ve : ne(ye);
|
|
4409
4431
|
var Fe = void 0;
|
|
4410
4432
|
if (ye instanceof L.HTMLElement && fe instanceof L.SVGElement && !(fe instanceof L.SVGSVGElement)) {
|
|
4411
|
-
if (fe ===
|
|
4433
|
+
if (fe === Pe) continue;
|
|
4412
4434
|
Fe = fe.ownerSVGElement;
|
|
4413
4435
|
} else Fe = fe;
|
|
4414
4436
|
for (var Ve = ne(Fe, ye.ownerDocument), Ge = 0; Ve[Ge] && Ve[Ge] === ve[Ge]; ) Ge++;
|
|
@@ -4437,7 +4459,7 @@ function kc() {
|
|
|
4437
4459
|
var o = n.dropState, s = o.activeDrops, c = o.cur, f = o.prev;
|
|
4438
4460
|
t.leave && f.dropzone.fire(t.leave), t.enter && c.dropzone.fire(t.enter), t.move && c.dropzone.fire(t.move), t.drop && c.dropzone.fire(t.drop), t.deactivate && kr(s, t.deactivate), o.prev.dropzone = c.dropzone, o.prev.element = c.element;
|
|
4439
4461
|
}
|
|
4440
|
-
function
|
|
4462
|
+
function Ir(n, t) {
|
|
4441
4463
|
var o = n.interaction, s = n.iEvent, c = n.event;
|
|
4442
4464
|
if (s.type === "dragmove" || s.type === "dragend") {
|
|
4443
4465
|
var f = o.dropState;
|
|
@@ -4446,14 +4468,14 @@ function kc() {
|
|
|
4446
4468
|
f.rejected = f.rejected && !!h && h.dropzone === f.cur.dropzone && h.element === f.cur.element, f.cur.dropzone = h && h.dropzone, f.cur.element = h && h.element, f.events = gn(o, 0, d);
|
|
4447
4469
|
}
|
|
4448
4470
|
}
|
|
4449
|
-
var
|
|
4471
|
+
var jr = { id: "actions/drop", install: function(n) {
|
|
4450
4472
|
var t = n.actions, o = n.interactStatic, s = n.Interactable, c = n.defaults;
|
|
4451
4473
|
n.usePlugin(oe), s.prototype.dropzone = function(f) {
|
|
4452
4474
|
return function(d, h) {
|
|
4453
4475
|
if (N.object(h)) {
|
|
4454
4476
|
if (d.options.drop.enabled = h.enabled !== !1, h.listeners) {
|
|
4455
|
-
var v = Ye(h.listeners), b = Object.keys(v).reduce(function(
|
|
4456
|
-
return
|
|
4477
|
+
var v = Ye(h.listeners), b = Object.keys(v).reduce(function(P, j) {
|
|
4478
|
+
return P[/^(enter|leave)/.test(j) ? "drag".concat(j) : /^(activate|deactivate|move)/.test(j) ? "drop".concat(j) : j] = v[j], P;
|
|
4457
4479
|
}, {}), y = d.options.drop.listeners;
|
|
4458
4480
|
y && d.off(y), d.on(b), d.options.drop.listeners = b;
|
|
4459
4481
|
}
|
|
@@ -4462,26 +4484,26 @@ function kc() {
|
|
|
4462
4484
|
return N.bool(h) ? (d.options.drop.enabled = h, d) : d.options.drop;
|
|
4463
4485
|
}(this, f);
|
|
4464
4486
|
}, s.prototype.dropCheck = function(f, d, h, v, b, y) {
|
|
4465
|
-
return function(
|
|
4487
|
+
return function(P, j, D, z, H, ie, re) {
|
|
4466
4488
|
var ce = !1;
|
|
4467
|
-
if (!(re = re ||
|
|
4468
|
-
var ve =
|
|
4489
|
+
if (!(re = re || P.getRect(ie))) return !!P.options.drop.checker && P.options.drop.checker(j, D, ce, P, ie, z, H);
|
|
4490
|
+
var ve = P.options.drop.overlap;
|
|
4469
4491
|
if (ve === "pointer") {
|
|
4470
|
-
var we = Be(z, H, "drag"), fe = Nr(
|
|
4492
|
+
var we = Be(z, H, "drag"), fe = Nr(j);
|
|
4471
4493
|
fe.x += we.x, fe.y += we.y;
|
|
4472
4494
|
var ye = fe.x > re.left && fe.x < re.right, Ae = fe.y > re.top && fe.y < re.bottom;
|
|
4473
4495
|
ce = ye && Ae;
|
|
4474
4496
|
}
|
|
4475
|
-
var
|
|
4476
|
-
if (
|
|
4477
|
-
var Fe =
|
|
4497
|
+
var Pe = z.getRect(H);
|
|
4498
|
+
if (Pe && ve === "center") {
|
|
4499
|
+
var Fe = Pe.left + Pe.width / 2, Ve = Pe.top + Pe.height / 2;
|
|
4478
4500
|
ce = Fe >= re.left && Fe <= re.right && Ve >= re.top && Ve <= re.bottom;
|
|
4479
4501
|
}
|
|
4480
|
-
return
|
|
4502
|
+
return Pe && N.number(ve) && (ce = Math.max(0, Math.min(re.right, Pe.right) - Math.max(re.left, Pe.left)) * Math.max(0, Math.min(re.bottom, Pe.bottom) - Math.max(re.top, Pe.top)) / (Pe.width * Pe.height) >= ve), P.options.drop.checker && (ce = P.options.drop.checker(j, D, ce, P, ie, z, H)), ce;
|
|
4481
4503
|
}(this, f, d, h, v, b, y);
|
|
4482
4504
|
}, o.dynamicDrop = function(f) {
|
|
4483
4505
|
return N.bool(f) ? (n.dynamicDrop = f, o) : n.dynamicDrop;
|
|
4484
|
-
}, G(t.phaselessTypes, { dragenter: !0, dragleave: !0, dropactivate: !0, dropdeactivate: !0, dropmove: !0, drop: !0 }), t.methodDict.drop = "dropzone", n.dynamicDrop = !1, c.actions.drop =
|
|
4506
|
+
}, G(t.phaselessTypes, { dragenter: !0, dragleave: !0, dropactivate: !0, dropdeactivate: !0, dropmove: !0, drop: !0 }), t.methodDict.drop = "dropzone", n.dynamicDrop = !1, c.actions.drop = jr.defaults;
|
|
4485
4507
|
}, listeners: { "interactions:before-action-start": function(n) {
|
|
4486
4508
|
var t = n.interaction;
|
|
4487
4509
|
t.prepared.name === "drag" && (t.dropState = { cur: { dropzone: null, element: null }, prev: { dropzone: null, element: null }, rejected: null, events: null, activeDrops: [] });
|
|
@@ -4491,7 +4513,7 @@ function kc() {
|
|
|
4491
4513
|
var c = o.dropState;
|
|
4492
4514
|
c.activeDrops = [], c.events = {}, c.activeDrops = hn(t, o.element), c.events = gn(o, 0, s), c.events.activate && (kr(c.activeDrops, c.events.activate), t.fire("actions/drop:start", { interaction: o, dragEvent: s }));
|
|
4493
4515
|
}
|
|
4494
|
-
}, "interactions:action-move":
|
|
4516
|
+
}, "interactions:action-move": Ir, "interactions:after-action-move": function(n, t) {
|
|
4495
4517
|
var o = n.interaction, s = n.iEvent;
|
|
4496
4518
|
if (o.prepared.name === "drag") {
|
|
4497
4519
|
var c = o.dropState;
|
|
@@ -4500,7 +4522,7 @@ function kc() {
|
|
|
4500
4522
|
}, "interactions:action-end": function(n, t) {
|
|
4501
4523
|
if (n.interaction.prepared.name === "drag") {
|
|
4502
4524
|
var o = n.interaction, s = n.iEvent;
|
|
4503
|
-
|
|
4525
|
+
Ir(n, t), mn(o, o.dropState.events), t.fire("actions/drop:end", { interaction: o, dragEvent: s });
|
|
4504
4526
|
}
|
|
4505
4527
|
}, "interactions:stop": function(n) {
|
|
4506
4528
|
var t = n.interaction;
|
|
@@ -4510,7 +4532,7 @@ function kc() {
|
|
|
4510
4532
|
}
|
|
4511
4533
|
} }, getActiveDrops: hn, getDrop: Cr, getDropEvents: gn, fireDropEvents: mn, filterEventType: function(n) {
|
|
4512
4534
|
return n.search("drag") === 0 || n.search("drop") === 0;
|
|
4513
|
-
}, defaults: { enabled: !1, accept: null, overlap: "pointer" } }, di =
|
|
4535
|
+
}, defaults: { enabled: !1, accept: null, overlap: "pointer" } }, di = jr;
|
|
4514
4536
|
function vn(n) {
|
|
4515
4537
|
var t = n.interaction, o = n.iEvent, s = n.phase;
|
|
4516
4538
|
if (t.prepared.name === "gesture") {
|
|
@@ -4589,8 +4611,8 @@ function kc() {
|
|
|
4589
4611
|
(function(t) {
|
|
4590
4612
|
var o = t.iEvent, s = t.interaction;
|
|
4591
4613
|
if (s.prepared.name === "resize" && s.prepared.edges) {
|
|
4592
|
-
var c = o, f = s.interactable.options.resize.invert, d = f === "reposition" || f === "negate", h = s.rect, v = s._rects, b = v.start, y = v.corrected,
|
|
4593
|
-
if (G(
|
|
4614
|
+
var c = o, f = s.interactable.options.resize.invert, d = f === "reposition" || f === "negate", h = s.rect, v = s._rects, b = v.start, y = v.corrected, P = v.delta, j = v.previous;
|
|
4615
|
+
if (G(j, y), d) {
|
|
4594
4616
|
if (G(y, h), f === "reposition") {
|
|
4595
4617
|
if (y.top > y.bottom) {
|
|
4596
4618
|
var D = y.top;
|
|
@@ -4602,8 +4624,8 @@ function kc() {
|
|
|
4602
4624
|
}
|
|
4603
4625
|
}
|
|
4604
4626
|
} else y.top = Math.min(h.top, b.bottom), y.bottom = Math.max(h.bottom, b.top), y.left = Math.min(h.left, b.right), y.right = Math.max(h.right, b.left);
|
|
4605
|
-
for (var H in y.width = y.right - y.left, y.height = y.bottom - y.top, y)
|
|
4606
|
-
c.edges = s.prepared.edges, c.rect = y, c.deltaRect =
|
|
4627
|
+
for (var H in y.width = y.right - y.left, y.height = y.bottom - y.top, y) P[H] = y[H] - j[H];
|
|
4628
|
+
c.edges = s.prepared.edges, c.rect = y, c.deltaRect = P;
|
|
4607
4629
|
}
|
|
4608
4630
|
})(n), $r(n);
|
|
4609
4631
|
}, "interactions:action-end": function(n) {
|
|
@@ -4622,8 +4644,8 @@ function kc() {
|
|
|
4622
4644
|
for (var b in v) v[b] = hi(b, h.edges[b], d, t._latestPointer.eventTarget, s, c, h.margin || Ue.defaultMargin);
|
|
4623
4645
|
v.left = v.left && !v.right, v.top = v.top && !v.bottom, (v.left || v.right || v.top || v.bottom) && (n.action = { name: "resize", edges: v });
|
|
4624
4646
|
} else {
|
|
4625
|
-
var y = h.axis !== "y" && d.x > c.right - Ue.defaultMargin,
|
|
4626
|
-
(y ||
|
|
4647
|
+
var y = h.axis !== "y" && d.x > c.right - Ue.defaultMargin, P = h.axis !== "x" && d.y > c.bottom - Ue.defaultMargin;
|
|
4648
|
+
(y || P) && (n.action = { name: "resize", axes: (y ? "x" : "") + (P ? "y" : "") });
|
|
4627
4649
|
}
|
|
4628
4650
|
return !n.action && void 0;
|
|
4629
4651
|
}
|
|
@@ -4671,8 +4693,8 @@ function kc() {
|
|
|
4671
4693
|
if (b.x || b.y) {
|
|
4672
4694
|
var y = Rr(f);
|
|
4673
4695
|
N.window(f) ? f.scrollBy(b.x, b.y) : f && (f.scrollLeft += b.x, f.scrollTop += b.y);
|
|
4674
|
-
var
|
|
4675
|
-
(
|
|
4696
|
+
var P = Rr(f), j = { x: P.x - y.x, y: P.y - y.y };
|
|
4697
|
+
(j.x || j.y) && t.fire({ type: "autoscroll", target: o, interactable: t, delta: j, interaction: n, container: f });
|
|
4676
4698
|
}
|
|
4677
4699
|
de.prevTime = d;
|
|
4678
4700
|
}
|
|
@@ -4684,11 +4706,11 @@ function kc() {
|
|
|
4684
4706
|
var t = n.interaction, o = n.pointer;
|
|
4685
4707
|
if (t.interacting() && de.check(t.interactable, t.prepared.name)) if (t.simulation) de.x = de.y = 0;
|
|
4686
4708
|
else {
|
|
4687
|
-
var s, c, f, d, h = t.interactable, v = t.element, b = t.prepared.name, y = h.options[b].autoScroll,
|
|
4688
|
-
if (N.window(
|
|
4709
|
+
var s, c, f, d, h = t.interactable, v = t.element, b = t.prepared.name, y = h.options[b].autoScroll, P = Mr(y.container, h, v);
|
|
4710
|
+
if (N.window(P)) d = o.clientX < de.margin, s = o.clientY < de.margin, c = o.clientX > P.innerWidth - de.margin, f = o.clientY > P.innerHeight - de.margin;
|
|
4689
4711
|
else {
|
|
4690
|
-
var
|
|
4691
|
-
d = o.clientX <
|
|
4712
|
+
var j = ue(P);
|
|
4713
|
+
d = o.clientX < j.left + de.margin, s = o.clientY < j.top + de.margin, c = o.clientX > j.right - de.margin, f = o.clientY > j.bottom - de.margin;
|
|
4692
4714
|
}
|
|
4693
4715
|
de.x = c ? 1 : d ? -1 : 0, de.y = f ? 1 : s ? -1 : 0, de.isScrolling || (de.margin = y.margin, de.speed = y.speed, de.start(t));
|
|
4694
4716
|
}
|
|
@@ -4729,9 +4751,9 @@ function kc() {
|
|
|
4729
4751
|
var wi = { id: "auto-start/interactableMethods", install: function(n) {
|
|
4730
4752
|
var t = n.Interactable;
|
|
4731
4753
|
t.prototype.getAction = function(o, s, c, f) {
|
|
4732
|
-
var d = function(h, v, b, y,
|
|
4733
|
-
var
|
|
4734
|
-
return
|
|
4754
|
+
var d = function(h, v, b, y, P) {
|
|
4755
|
+
var j = h.getRect(y), D = v.buttons || { 0: 1, 1: 4, 3: 8, 4: 16 }[v.button], z = { action: null, interactable: h, interaction: b, element: y, rect: j, buttons: D };
|
|
4756
|
+
return P.fire("auto-start:check", z), z.action;
|
|
4735
4757
|
}(this, s, c, f, n);
|
|
4736
4758
|
return this.options.actionChecker ? this.options.actionChecker(o, s, d, this, f, c) : d;
|
|
4737
4759
|
}, t.prototype.ignoreFrom = vt(function(o) {
|
|
@@ -4745,10 +4767,10 @@ function kc() {
|
|
|
4745
4767
|
}
|
|
4746
4768
|
function Ei(n, t, o, s, c, f, d) {
|
|
4747
4769
|
for (var h = 0, v = s.length; h < v; h++) {
|
|
4748
|
-
var b = s[h], y = c[h],
|
|
4749
|
-
if (
|
|
4750
|
-
var
|
|
4751
|
-
if (
|
|
4770
|
+
var b = s[h], y = c[h], P = b.getAction(t, o, n, y);
|
|
4771
|
+
if (P) {
|
|
4772
|
+
var j = zr(P, b, y, f, d);
|
|
4773
|
+
if (j) return { action: j, interactable: b, element: y };
|
|
4752
4774
|
}
|
|
4753
4775
|
}
|
|
4754
4776
|
return { action: null, interactable: null, element: null };
|
|
@@ -4773,8 +4795,8 @@ function kc() {
|
|
|
4773
4795
|
function Rt(n, t, o, s) {
|
|
4774
4796
|
var c = n.options, f = c[o.name].max, d = c[o.name].maxPerElement, h = s.autoStart.maxInteractions, v = 0, b = 0, y = 0;
|
|
4775
4797
|
if (!(f && d && h)) return !1;
|
|
4776
|
-
for (var
|
|
4777
|
-
var D =
|
|
4798
|
+
for (var P = 0, j = s.interactions.list; P < j.length; P++) {
|
|
4799
|
+
var D = j[P], z = D.prepared.name;
|
|
4778
4800
|
if (D.interacting() && (++v >= h || D.interactable === n && ((b += z === o.name ? 1 : 0) >= f || D.element === t && (y++, z === o.name && y >= d))))
|
|
4779
4801
|
return !1;
|
|
4780
4802
|
}
|
|
@@ -4827,25 +4849,25 @@ function kc() {
|
|
|
4827
4849
|
var d = Math.abs(c), h = Math.abs(f), v = o.interactable.options.drag, b = v.startAxis, y = d > h ? "x" : d < h ? "y" : "xy";
|
|
4828
4850
|
if (o.prepared.axis = v.lockAxis === "start" ? y[0] : v.lockAxis, y !== "xy" && b !== "xy" && b !== y) {
|
|
4829
4851
|
o.prepared.name = null;
|
|
4830
|
-
for (var
|
|
4852
|
+
for (var P = s, j = function(z) {
|
|
4831
4853
|
if (z !== o.interactable) {
|
|
4832
4854
|
var H = o.interactable.options.drag;
|
|
4833
|
-
if (!H.manualStart && z.testIgnoreAllow(H,
|
|
4834
|
-
var ie = z.getAction(o.downPointer, o.downEvent, o,
|
|
4855
|
+
if (!H.manualStart && z.testIgnoreAllow(H, P, s)) {
|
|
4856
|
+
var ie = z.getAction(o.downPointer, o.downEvent, o, P);
|
|
4835
4857
|
if (ie && ie.name === "drag" && function(re, ce) {
|
|
4836
4858
|
if (!ce) return !1;
|
|
4837
4859
|
var ve = ce.options.drag.startAxis;
|
|
4838
4860
|
return re === "xy" || ve === "xy" || ve === re;
|
|
4839
|
-
}(y, z) && wn.validateAction(ie, z,
|
|
4861
|
+
}(y, z) && wn.validateAction(ie, z, P, s, t)) return z;
|
|
4840
4862
|
}
|
|
4841
4863
|
}
|
|
4842
|
-
}; N.element(
|
|
4843
|
-
var D = t.interactables.forEachMatch(
|
|
4864
|
+
}; N.element(P); ) {
|
|
4865
|
+
var D = t.interactables.forEachMatch(P, j);
|
|
4844
4866
|
if (D) {
|
|
4845
|
-
o.prepared.name = "drag", o.interactable = D, o.element =
|
|
4867
|
+
o.prepared.name = "drag", o.interactable = D, o.element = P;
|
|
4846
4868
|
break;
|
|
4847
4869
|
}
|
|
4848
|
-
|
|
4870
|
+
P = F(P);
|
|
4849
4871
|
}
|
|
4850
4872
|
}
|
|
4851
4873
|
}
|
|
@@ -4872,9 +4894,9 @@ function kc() {
|
|
|
4872
4894
|
}, "autoStart:before-start": function(n) {
|
|
4873
4895
|
var t = n.interaction;
|
|
4874
4896
|
En(t) > 0 && (t.prepared.name = null);
|
|
4875
|
-
} }, getHoldDuration: En }, _i = Ti,
|
|
4897
|
+
} }, getHoldDuration: En }, _i = Ti, Oi = { id: "auto-start", install: function(n) {
|
|
4876
4898
|
n.usePlugin(wn), n.usePlugin(_i), n.usePlugin(Si);
|
|
4877
|
-
} },
|
|
4899
|
+
} }, Pi = function(n) {
|
|
4878
4900
|
return /^(always|never|auto)$/.test(n) ? (this.options.preventDefault = n, this) : N.bool(n) ? (this.options.preventDefault = n ? "always" : "never", this) : this.options.preventDefault;
|
|
4879
4901
|
};
|
|
4880
4902
|
function ki(n) {
|
|
@@ -4883,7 +4905,7 @@ function kc() {
|
|
|
4883
4905
|
}
|
|
4884
4906
|
var Hr = { id: "core/interactablePreventDefault", install: function(n) {
|
|
4885
4907
|
var t = n.Interactable;
|
|
4886
|
-
t.prototype.preventDefault =
|
|
4908
|
+
t.prototype.preventDefault = Pi, t.prototype.checkAndPreventDefault = function(o) {
|
|
4887
4909
|
return function(s, c, f) {
|
|
4888
4910
|
var d = s.options.preventDefault;
|
|
4889
4911
|
if (d !== "never") if (d !== "always") {
|
|
@@ -4912,7 +4934,7 @@ function kc() {
|
|
|
4912
4934
|
var t = {};
|
|
4913
4935
|
for (var o in n) {
|
|
4914
4936
|
var s = n[o];
|
|
4915
|
-
N.plainObject(s) ? t[o] = ft(s) : N.array(s) ? t[o] =
|
|
4937
|
+
N.plainObject(s) ? t[o] = ft(s) : N.array(s) ? t[o] = Pr(s) : t[o] = s;
|
|
4916
4938
|
}
|
|
4917
4939
|
return t;
|
|
4918
4940
|
}
|
|
@@ -4922,12 +4944,12 @@ function kc() {
|
|
|
4922
4944
|
}
|
|
4923
4945
|
return g(n, [{ key: "start", value: function(t, o) {
|
|
4924
4946
|
var s, c, f = t.phase, d = this.interaction, h = function(b) {
|
|
4925
|
-
var y = b.interactable.options[b.prepared.name],
|
|
4926
|
-
return
|
|
4927
|
-
var D = y[
|
|
4947
|
+
var y = b.interactable.options[b.prepared.name], P = y.modifiers;
|
|
4948
|
+
return P && P.length ? P : ["snap", "snapSize", "snapEdges", "restrict", "restrictEdges", "restrictSize"].map(function(j) {
|
|
4949
|
+
var D = y[j];
|
|
4928
4950
|
return D && D.enabled && { options: D, methods: D._methods };
|
|
4929
|
-
}).filter(function(
|
|
4930
|
-
return !!
|
|
4951
|
+
}).filter(function(j) {
|
|
4952
|
+
return !!j;
|
|
4931
4953
|
});
|
|
4932
4954
|
}(d);
|
|
4933
4955
|
this.prepareStates(h), this.startEdges = G({}, d.edges), this.edges = G({}, this.startEdges), this.startOffset = (s = d.rect, c = o, s ? { left: c.x - s.left, top: c.y - s.top, right: s.right - c.x, bottom: s.bottom - c.y } : { left: 0, top: 0, right: 0, bottom: 0 }), this.startDelta = { x: 0, y: 0 };
|
|
@@ -4945,8 +4967,8 @@ function kc() {
|
|
|
4945
4967
|
var o = t.phase, s = t.preEnd, c = t.skipModifiers, f = t.rect, d = t.edges;
|
|
4946
4968
|
t.coords = G({}, t.pageCoords), t.rect = G({}, f), t.edges = G({}, d);
|
|
4947
4969
|
for (var h = c ? this.states.slice(c) : this.states, v = Lt(t.coords, t.rect), b = 0; b < h.length; b++) {
|
|
4948
|
-
var y,
|
|
4949
|
-
(y =
|
|
4970
|
+
var y, P = h[b], j = P.options, D = G({}, t.coords), z = null;
|
|
4971
|
+
(y = P.methods) != null && y.set && this.shouldDo(j, s, o) && (t.state = P, z = P.methods.set(t), ze(t.edges, t.rect, { x: t.coords.x - D.x, y: t.coords.y - D.y })), v.eventProps.push(z);
|
|
4950
4972
|
}
|
|
4951
4973
|
G(this.edges, t.edges), v.delta.x = t.coords.x - t.pageCoords.x, v.delta.y = t.coords.y - t.pageCoords.y, v.rectDelta.left = t.rect.left - f.left, v.rectDelta.right = t.rect.right - f.right, v.rectDelta.top = t.rect.top - f.top, v.rectDelta.bottom = t.rect.bottom - f.bottom;
|
|
4952
4974
|
var H = this.result.coords, ie = this.result.rect;
|
|
@@ -4959,8 +4981,8 @@ function kc() {
|
|
|
4959
4981
|
var o = this.interaction, s = t.phase, c = o.coords.cur, f = o.coords.start, d = this.result, h = this.startDelta, v = d.delta;
|
|
4960
4982
|
s === "start" && G(this.startDelta, d.delta);
|
|
4961
4983
|
for (var b = 0, y = [[f, h], [c, v]]; b < y.length; b++) {
|
|
4962
|
-
var
|
|
4963
|
-
|
|
4984
|
+
var P = y[b], j = P[0], D = P[1];
|
|
4985
|
+
j.page.x += D.x, j.page.y += D.y, j.client.x += D.x, j.client.y += D.y;
|
|
4964
4986
|
}
|
|
4965
4987
|
var z = this.result.rectDelta, H = t.rect || o.rect;
|
|
4966
4988
|
H.left += z.left, H.right += z.right, H.top += z.top, H.bottom += z.bottom, H.width = H.right - H.left, H.height = H.bottom - H.top;
|
|
@@ -5005,8 +5027,8 @@ function kc() {
|
|
|
5005
5027
|
} }, { key: "restoreInteractionCoords", value: function(t) {
|
|
5006
5028
|
var o = t.interaction, s = o.coords, c = o.rect, f = o.modification;
|
|
5007
5029
|
if (f.result) {
|
|
5008
|
-
for (var d = f.startDelta, h = f.result, v = h.delta, b = h.rectDelta, y = 0,
|
|
5009
|
-
var
|
|
5030
|
+
for (var d = f.startDelta, h = f.result, v = h.delta, b = h.rectDelta, y = 0, P = [[s.start, d], [s.cur, v]]; y < P.length; y++) {
|
|
5031
|
+
var j = P[y], D = j[0], z = j[1];
|
|
5010
5032
|
D.page.x -= z.x, D.page.y -= z.y, D.client.x -= z.x, D.client.y -= z.y;
|
|
5011
5033
|
}
|
|
5012
5034
|
c.left -= b.left, c.right -= b.right, c.top -= b.top, c.bottom -= b.bottom;
|
|
@@ -5067,8 +5089,8 @@ function kc() {
|
|
|
5067
5089
|
function o(s, c, f, d, h, v, b) {
|
|
5068
5090
|
var y;
|
|
5069
5091
|
u(this, o), (y = t.call(this, s)).relatedTarget = null, y.screenX = void 0, y.screenY = void 0, y.button = void 0, y.buttons = void 0, y.ctrlKey = void 0, y.shiftKey = void 0, y.altKey = void 0, y.metaKey = void 0, y.page = void 0, y.client = void 0, y.delta = void 0, y.rect = void 0, y.x0 = void 0, y.y0 = void 0, y.t0 = void 0, y.dt = void 0, y.duration = void 0, y.clientX0 = void 0, y.clientY0 = void 0, y.velocity = void 0, y.speed = void 0, y.swipe = void 0, y.axes = void 0, y.preEnd = void 0, h = h || s.element;
|
|
5070
|
-
var
|
|
5071
|
-
return y.page = G({}, re.page), y.client = G({}, re.client), y.rect = G({}, s.rect), y.timeStamp = re.timeStamp, H || (y.page.x -= D.x, y.page.y -= D.y, y.client.x -= D.x, y.client.y -= D.y), y.ctrlKey = c.ctrlKey, y.altKey = c.altKey, y.shiftKey = c.shiftKey, y.metaKey = c.metaKey, y.button = c.button, y.buttons = c.buttons, y.target = h, y.currentTarget = h, y.preEnd = v, y.type = b || f + (d || ""), y.interactable =
|
|
5092
|
+
var P = s.interactable, j = (P && P.options || Yr).deltaSource, D = Be(P, h, f), z = d === "start", H = d === "end", ie = z ? C(y) : s.prevEvent, re = z ? s.coords.start : H ? { page: ie.page, client: ie.client, timeStamp: s.coords.cur.timeStamp } : s.coords.cur;
|
|
5093
|
+
return y.page = G({}, re.page), y.client = G({}, re.client), y.rect = G({}, s.rect), y.timeStamp = re.timeStamp, H || (y.page.x -= D.x, y.page.y -= D.y, y.client.x -= D.x, y.client.y -= D.y), y.ctrlKey = c.ctrlKey, y.altKey = c.altKey, y.shiftKey = c.shiftKey, y.metaKey = c.metaKey, y.button = c.button, y.buttons = c.buttons, y.target = h, y.currentTarget = h, y.preEnd = v, y.type = b || f + (d || ""), y.interactable = P, y.t0 = z ? s.pointers[s.pointers.length - 1].downTime : ie.t0, y.x0 = s.coords.start.page.x - D.x, y.y0 = s.coords.start.page.y - D.y, y.clientX0 = s.coords.start.client.x - D.x, y.clientY0 = s.coords.start.client.y - D.y, y.delta = z || H ? { x: 0, y: 0 } : { x: y[j].x - ie[j].x, y: y[j].y - ie[j].y }, y.dt = s.coords.delta.timeStamp, y.duration = y.timeStamp - y.t0, y.velocity = G({}, s.coords.velocity[j]), y.speed = pt(y.velocity.x, y.velocity.y), y.swipe = H || d === "inertiastart" ? y.getSwipe() : null, y;
|
|
5072
5094
|
}
|
|
5073
5095
|
return g(o, [{ key: "getSwipe", value: function() {
|
|
5074
5096
|
var s = this._interaction;
|
|
@@ -5117,9 +5139,9 @@ function kc() {
|
|
|
5117
5139
|
}, set: function(n) {
|
|
5118
5140
|
this.velocity.y = n;
|
|
5119
5141
|
} } });
|
|
5120
|
-
var
|
|
5142
|
+
var Ii = g(function n(t, o, s, c, f) {
|
|
5121
5143
|
u(this, n), this.id = void 0, this.pointer = void 0, this.event = void 0, this.downTime = void 0, this.downTarget = void 0, this.id = t, this.pointer = o, this.event = s, this.downTime = c, this.downTarget = f;
|
|
5122
|
-
}),
|
|
5144
|
+
}), ji = function(n) {
|
|
5123
5145
|
return n.interactable = "", n.element = "", n.prepared = "", n.pointerIsDown = "", n.pointerWasMoved = "", n._proxy = "", n;
|
|
5124
5146
|
}({}), Xr = function(n) {
|
|
5125
5147
|
return n.start = "", n.move = "", n.end = "", n.stop = "", n.interacting = "", n;
|
|
@@ -5136,7 +5158,7 @@ function kc() {
|
|
|
5136
5158
|
return f[y];
|
|
5137
5159
|
} });
|
|
5138
5160
|
};
|
|
5139
|
-
for (var h in
|
|
5161
|
+
for (var h in ji) d(h);
|
|
5140
5162
|
var v = function(y) {
|
|
5141
5163
|
Object.defineProperty(o._proxy, y, { value: function() {
|
|
5142
5164
|
return f[y].apply(f, arguments);
|
|
@@ -5156,8 +5178,8 @@ function kc() {
|
|
|
5156
5178
|
this.simulation || this.modification && this.modification.endResult || this.updatePointer(t, o, s, !1);
|
|
5157
5179
|
var c, f, d = this.coords.cur.page.x === this.coords.prev.page.x && this.coords.cur.page.y === this.coords.prev.page.y && this.coords.cur.client.x === this.coords.prev.client.x && this.coords.cur.client.y === this.coords.prev.client.y;
|
|
5158
5180
|
this.pointerIsDown && !this.pointerWasMoved && (c = this.coords.cur.client.x - this.coords.start.client.x, f = this.coords.cur.client.y - this.coords.start.client.y, this.pointerWasMoved = pt(c, f) > this.pointerMoveTolerance);
|
|
5159
|
-
var h, v, b, y = this.getPointerIndex(t),
|
|
5160
|
-
d || (h = this.coords.velocity, v = this.coords.delta, b = Math.max(v.timeStamp / 1e3, 1e-3), h.page.x = v.page.x / b, h.page.y = v.page.y / b, h.client.x = v.client.x / b, h.client.y = v.client.y / b, h.timeStamp = b), this._scopeFire("interactions:move",
|
|
5181
|
+
var h, v, b, y = this.getPointerIndex(t), P = { pointer: t, pointerIndex: y, pointerInfo: this.pointers[y], event: o, type: "move", eventTarget: s, dx: c, dy: f, duplicate: d, interaction: this };
|
|
5182
|
+
d || (h = this.coords.velocity, v = this.coords.delta, b = Math.max(v.timeStamp / 1e3, 1e-3), h.page.x = v.page.x / b, h.page.y = v.page.y / b, h.client.x = v.client.x / b, h.client.y = v.client.y / b, h.timeStamp = b), this._scopeFire("interactions:move", P), d || this.simulation || (this.interacting() && (P.type = null, this.move(P)), this.pointerWasMoved && $t(this.coords.prev, this.coords.cur));
|
|
5161
5183
|
} }, { key: "move", value: function(t) {
|
|
5162
5184
|
t && t.event || wr(this.coords.delta), (t = G({ pointer: this._latestPointer.pointer, event: this._latestPointer.event, eventTarget: this._latestPointer.eventTarget, interaction: this }, t || {})).phase = "move", this._doPhase(t);
|
|
5163
5185
|
} }, { key: "pointerUp", value: function(t, o, s, c) {
|
|
@@ -5185,9 +5207,9 @@ function kc() {
|
|
|
5185
5207
|
return this.pointers[this.getPointerIndex(t)];
|
|
5186
5208
|
} }, { key: "updatePointer", value: function(t, o, s, c) {
|
|
5187
5209
|
var f, d, h, v = ht(t), b = this.getPointerIndex(t), y = this.pointers[b];
|
|
5188
|
-
return c = c !== !1 && (c || /(down|start)$/i.test(o.type)), y ? y.pointer = t : (y = new
|
|
5189
|
-
return
|
|
5190
|
-
}), this._now()), f = this.coords.delta, d = this.coords.prev, h = this.coords.cur, f.page.x = h.page.x - d.page.x, f.page.y = h.page.y - d.page.y, f.client.x = h.client.x - d.client.x, f.client.y = h.client.y - d.client.y, f.timeStamp = h.timeStamp - d.timeStamp, c && (this.pointerIsDown = !0, y.downTime = this.coords.cur.timeStamp, y.downTarget = s,
|
|
5210
|
+
return c = c !== !1 && (c || /(down|start)$/i.test(o.type)), y ? y.pointer = t : (y = new Ii(v, t, o, null, null), b = this.pointers.length, this.pointers.push(y)), fi(this.coords.cur, this.pointers.map(function(P) {
|
|
5211
|
+
return P.pointer;
|
|
5212
|
+
}), this._now()), f = this.coords.delta, d = this.coords.prev, h = this.coords.cur, f.page.x = h.page.x - d.page.x, f.page.y = h.page.y - d.page.y, f.client.x = h.client.x - d.client.x, f.client.y = h.client.y - d.client.y, f.timeStamp = h.timeStamp - d.timeStamp, c && (this.pointerIsDown = !0, y.downTime = this.coords.cur.timeStamp, y.downTarget = s, jt(this.downPointer, t), this.interacting() || ($t(this.coords.start, this.coords.cur), $t(this.coords.prev, this.coords.cur), this.downEvent = o, this.pointerWasMoved = !1)), this._updateLatestPointer(t, o, s), this._scopeFire("interactions:update-pointer", { pointer: t, event: o, eventTarget: s, down: c, pointerInfo: y, pointerIndex: b, interaction: this }), b;
|
|
5191
5213
|
} }, { key: "removePointer", value: function(t, o) {
|
|
5192
5214
|
var s = this.getPointerIndex(t);
|
|
5193
5215
|
if (s !== -1) {
|
|
@@ -5205,7 +5227,7 @@ function kc() {
|
|
|
5205
5227
|
(o = this.interactable) == null || o.fire(t), (!this.prevEvent || t.timeStamp >= this.prevEvent.timeStamp) && (this.prevEvent = t);
|
|
5206
5228
|
} }, { key: "_doPhase", value: function(t) {
|
|
5207
5229
|
var o = t.event, s = t.phase, c = t.preEnd, f = t.type, d = this.rect;
|
|
5208
|
-
if (d && s === "move" && (
|
|
5230
|
+
if (d && s === "move" && (ze(this.edges, d, this.coords.delta[this.interactable.options.deltaSource]), d.width = d.right - d.left, d.height = d.bottom - d.top), this._scopeFire("interactions:before-action-".concat(s), t) === !1) return !1;
|
|
5209
5231
|
var h = t.iEvent = this._createPreparedEvent(o, s, c, f);
|
|
5210
5232
|
return this._scopeFire("interactions:action-".concat(s), t), s === "start" && (this.prevEvent = h), this._fireEvent(h), this._scopeFire("interactions:after-action-".concat(s), t), !0;
|
|
5211
5233
|
} }, { key: "_now", value: function() {
|
|
@@ -5220,7 +5242,7 @@ function kc() {
|
|
|
5220
5242
|
return !(!o.offset.pending.x && !o.offset.pending.y);
|
|
5221
5243
|
}(n)) return !1;
|
|
5222
5244
|
var t = n.offset.pending;
|
|
5223
|
-
return Tn(n.coords.cur, t), Tn(n.coords.delta, t),
|
|
5245
|
+
return Tn(n.coords.cur, t), Tn(n.coords.delta, t), ze(n.edges, n.rect, t), t.x = 0, t.y = 0, !0;
|
|
5224
5246
|
}
|
|
5225
5247
|
function Mi(n) {
|
|
5226
5248
|
var t = n.x, o = n.y;
|
|
@@ -5277,11 +5299,11 @@ function kc() {
|
|
|
5277
5299
|
o.active && t();
|
|
5278
5300
|
});
|
|
5279
5301
|
} }, { key: "inertiaTick", value: function() {
|
|
5280
|
-
var t, o, s, c, f, d, h, v = this, b = this.interaction, y = Ft(b).resistance,
|
|
5281
|
-
if (
|
|
5282
|
-
var
|
|
5283
|
-
this.isModified ? (t = 0, o = 0, s = this.targetOffset.x, c = this.targetOffset.y, f = this.modifiedOffset.x, d = this.modifiedOffset.y,
|
|
5284
|
-
var z = { x:
|
|
5302
|
+
var t, o, s, c, f, d, h, v = this, b = this.interaction, y = Ft(b).resistance, P = (b._now() - this.t0) / 1e3;
|
|
5303
|
+
if (P < this.te) {
|
|
5304
|
+
var j, D = 1 - (Math.exp(-y * P) - this.lambda_v0) / this.one_ve_v0;
|
|
5305
|
+
this.isModified ? (t = 0, o = 0, s = this.targetOffset.x, c = this.targetOffset.y, f = this.modifiedOffset.x, d = this.modifiedOffset.y, j = { x: Wr(h = D, t, s, f), y: Wr(h, o, c, d) }) : j = { x: this.targetOffset.x * D, y: this.targetOffset.y * D };
|
|
5306
|
+
var z = { x: j.x - this.currentOffset.x, y: j.y - this.currentOffset.y };
|
|
5285
5307
|
this.currentOffset.x += z.x, this.currentOffset.y += z.y, b.offsetBy(z), b.move(), this.onNextFrame(function() {
|
|
5286
5308
|
return v.inertiaTick();
|
|
5287
5309
|
});
|
|
@@ -5362,7 +5384,7 @@ function kc() {
|
|
|
5362
5384
|
(o = this.types[t.type]) && Jr(t, o), !t.propagationStopped && s && (o = s[t.type]) && Jr(t, o);
|
|
5363
5385
|
} }, { key: "on", value: function(t, o) {
|
|
5364
5386
|
var s = Ye(t, o);
|
|
5365
|
-
for (t in s) this.types[t] =
|
|
5387
|
+
for (t in s) this.types[t] = Or(this.types[t] || [], s[t]);
|
|
5366
5388
|
} }, { key: "off", value: function(t, o) {
|
|
5367
5389
|
var s = Ye(t, o);
|
|
5368
5390
|
for (t in s) {
|
|
@@ -5377,7 +5399,7 @@ function kc() {
|
|
|
5377
5399
|
} }]), n;
|
|
5378
5400
|
}(), Di = function() {
|
|
5379
5401
|
function n(t) {
|
|
5380
|
-
u(this, n), this.currentTarget = void 0, this.originalEvent = void 0, this.type = void 0, this.originalEvent = t,
|
|
5402
|
+
u(this, n), this.currentTarget = void 0, this.originalEvent = void 0, this.type = void 0, this.originalEvent = t, jt(this, t);
|
|
5381
5403
|
}
|
|
5382
5404
|
return g(n, [{ key: "preventOriginalDefault", value: function() {
|
|
5383
5405
|
this.originalEvent.preventDefault();
|
|
@@ -5394,29 +5416,29 @@ function kc() {
|
|
|
5394
5416
|
return n === t || (typeof n == "boolean" ? !!t.capture === n && !t.passive : !!n.capture == !!t.capture && !!n.passive == !!t.passive);
|
|
5395
5417
|
}
|
|
5396
5418
|
var Vi = { id: "events", install: function(n) {
|
|
5397
|
-
var t, o = [], s = {}, c = [], f = { add: d, remove: h, addDelegate: function(y,
|
|
5419
|
+
var t, o = [], s = {}, c = [], f = { add: d, remove: h, addDelegate: function(y, P, j, D, z) {
|
|
5398
5420
|
var H = xt(z);
|
|
5399
|
-
if (!s[
|
|
5400
|
-
s[
|
|
5421
|
+
if (!s[j]) {
|
|
5422
|
+
s[j] = [];
|
|
5401
5423
|
for (var ie = 0; ie < c.length; ie++) {
|
|
5402
5424
|
var re = c[ie];
|
|
5403
|
-
d(re,
|
|
5425
|
+
d(re, j, v), d(re, j, b, !0);
|
|
5404
5426
|
}
|
|
5405
5427
|
}
|
|
5406
|
-
var ce = s[
|
|
5407
|
-
return we.selector === y && we.context ===
|
|
5428
|
+
var ce = s[j], ve = mt(ce, function(we) {
|
|
5429
|
+
return we.selector === y && we.context === P;
|
|
5408
5430
|
});
|
|
5409
|
-
ve || (ve = { selector: y, context:
|
|
5410
|
-
}, removeDelegate: function(y,
|
|
5411
|
-
var H, ie = xt(z), re = s[
|
|
5431
|
+
ve || (ve = { selector: y, context: P, listeners: [] }, ce.push(ve)), ve.listeners.push({ func: D, options: H });
|
|
5432
|
+
}, removeDelegate: function(y, P, j, D, z) {
|
|
5433
|
+
var H, ie = xt(z), re = s[j], ce = !1;
|
|
5412
5434
|
if (re)
|
|
5413
5435
|
for (H = re.length - 1; H >= 0; H--) {
|
|
5414
5436
|
var ve = re[H];
|
|
5415
|
-
if (ve.selector === y && ve.context ===
|
|
5437
|
+
if (ve.selector === y && ve.context === P) {
|
|
5416
5438
|
for (var we = ve.listeners, fe = we.length - 1; fe >= 0; fe--) {
|
|
5417
5439
|
var ye = we[fe];
|
|
5418
5440
|
if (ye.func === D && Dt(ye.options, ie)) {
|
|
5419
|
-
we.splice(fe, 1), we.length || (re.splice(H, 1), h(
|
|
5441
|
+
we.splice(fe, 1), we.length || (re.splice(H, 1), h(P, j, v), h(P, j, b, !0)), ce = !0;
|
|
5420
5442
|
break;
|
|
5421
5443
|
}
|
|
5422
5444
|
}
|
|
@@ -5424,45 +5446,45 @@ function kc() {
|
|
|
5424
5446
|
}
|
|
5425
5447
|
}
|
|
5426
5448
|
}, delegateListener: v, delegateUseCapture: b, delegatedEvents: s, documents: c, targets: o, supportsOptions: !1, supportsPassive: !1 };
|
|
5427
|
-
function d(y,
|
|
5449
|
+
function d(y, P, j, D) {
|
|
5428
5450
|
if (y.addEventListener) {
|
|
5429
5451
|
var z = xt(D), H = mt(o, function(ie) {
|
|
5430
5452
|
return ie.eventTarget === y;
|
|
5431
5453
|
});
|
|
5432
|
-
H || (H = { eventTarget: y, events: {} }, o.push(H)), H.events[
|
|
5433
|
-
return ie.func ===
|
|
5434
|
-
}) || (y.addEventListener(
|
|
5454
|
+
H || (H = { eventTarget: y, events: {} }, o.push(H)), H.events[P] || (H.events[P] = []), mt(H.events[P], function(ie) {
|
|
5455
|
+
return ie.func === j && Dt(ie.options, z);
|
|
5456
|
+
}) || (y.addEventListener(P, j, f.supportsOptions ? z : z.capture), H.events[P].push({ func: j, options: z }));
|
|
5435
5457
|
}
|
|
5436
5458
|
}
|
|
5437
|
-
function h(y,
|
|
5459
|
+
function h(y, P, j, D) {
|
|
5438
5460
|
if (y.addEventListener && y.removeEventListener) {
|
|
5439
5461
|
var z = gt(o, function(Ae) {
|
|
5440
5462
|
return Ae.eventTarget === y;
|
|
5441
5463
|
}), H = o[z];
|
|
5442
|
-
if (H && H.events) if (
|
|
5443
|
-
var ie = !1, re = H.events[
|
|
5464
|
+
if (H && H.events) if (P !== "all") {
|
|
5465
|
+
var ie = !1, re = H.events[P];
|
|
5444
5466
|
if (re) {
|
|
5445
|
-
if (
|
|
5467
|
+
if (j === "all") {
|
|
5446
5468
|
for (var ce = re.length - 1; ce >= 0; ce--) {
|
|
5447
5469
|
var ve = re[ce];
|
|
5448
|
-
h(y,
|
|
5470
|
+
h(y, P, ve.func, ve.options);
|
|
5449
5471
|
}
|
|
5450
5472
|
return;
|
|
5451
5473
|
}
|
|
5452
5474
|
for (var we = xt(D), fe = 0; fe < re.length; fe++) {
|
|
5453
5475
|
var ye = re[fe];
|
|
5454
|
-
if (ye.func ===
|
|
5455
|
-
y.removeEventListener(
|
|
5476
|
+
if (ye.func === j && Dt(ye.options, we)) {
|
|
5477
|
+
y.removeEventListener(P, j, f.supportsOptions ? we : we.capture), re.splice(fe, 1), re.length === 0 && (delete H.events[P], ie = !0);
|
|
5456
5478
|
break;
|
|
5457
5479
|
}
|
|
5458
5480
|
}
|
|
5459
5481
|
}
|
|
5460
5482
|
ie && !Object.keys(H.events).length && o.splice(z, 1);
|
|
5461
|
-
} else for (
|
|
5483
|
+
} else for (P in H.events) H.events.hasOwnProperty(P) && h(y, P, "all");
|
|
5462
5484
|
}
|
|
5463
5485
|
}
|
|
5464
|
-
function v(y,
|
|
5465
|
-
for (var
|
|
5486
|
+
function v(y, P) {
|
|
5487
|
+
for (var j = xt(P), D = new Di(y), z = s[y.type], H = _r(y)[0], ie = H; N.element(ie); ) {
|
|
5466
5488
|
for (var re = 0; re < z.length; re++) {
|
|
5467
5489
|
var ce = z[re], ve = ce.selector, we = ce.context;
|
|
5468
5490
|
if (T(ie, ve) && te(we, H) && te(we, ie)) {
|
|
@@ -5470,7 +5492,7 @@ function kc() {
|
|
|
5470
5492
|
D.currentTarget = ie;
|
|
5471
5493
|
for (var ye = 0; ye < fe.length; ye++) {
|
|
5472
5494
|
var Ae = fe[ye];
|
|
5473
|
-
Dt(Ae.options,
|
|
5495
|
+
Dt(Ae.options, j) && Ae.func(D);
|
|
5474
5496
|
}
|
|
5475
5497
|
}
|
|
5476
5498
|
}
|
|
@@ -5515,8 +5537,8 @@ function kc() {
|
|
|
5515
5537
|
}
|
|
5516
5538
|
if (t) return t;
|
|
5517
5539
|
for (var b = 0, y = f.interactions.list; b < y.length; b++) {
|
|
5518
|
-
var
|
|
5519
|
-
if (!(
|
|
5540
|
+
var P = y[b];
|
|
5541
|
+
if (!(P.pointerType !== s || /down/i.test(c) && P.simulation)) return P;
|
|
5520
5542
|
}
|
|
5521
5543
|
return null;
|
|
5522
5544
|
}, hasPointer: function(n) {
|
|
@@ -5541,15 +5563,15 @@ function kc() {
|
|
|
5541
5563
|
return o.id === t;
|
|
5542
5564
|
});
|
|
5543
5565
|
}
|
|
5544
|
-
var Hi = _n,
|
|
5566
|
+
var Hi = _n, On = ["pointerDown", "pointerMove", "pointerUp", "updatePointer", "removePointer", "windowBlur"];
|
|
5545
5567
|
function eo(n, t) {
|
|
5546
5568
|
return function(o) {
|
|
5547
5569
|
var s = t.interactions.list, c = Tr(o), f = _r(o), d = f[0], h = f[1], v = [];
|
|
5548
5570
|
if (/^touch/.test(o.type)) {
|
|
5549
5571
|
t.prevTouchTime = t.now();
|
|
5550
5572
|
for (var b = 0, y = o.changedTouches; b < y.length; b++) {
|
|
5551
|
-
var
|
|
5552
|
-
v.push([
|
|
5573
|
+
var P = y[b], j = { pointer: P, pointerId: ht(P), pointerType: c, eventType: o.type, eventTarget: d, curEventTarget: h, scope: t }, D = to(j);
|
|
5574
|
+
v.push([j.pointer, j.eventTarget, j.curEventTarget, D]);
|
|
5553
5575
|
}
|
|
5554
5576
|
} else {
|
|
5555
5577
|
var z = !1;
|
|
@@ -5572,17 +5594,17 @@ function kc() {
|
|
|
5572
5594
|
var t = n.pointerType, o = n.scope, s = { interaction: Hi.search(n), searchDetails: n };
|
|
5573
5595
|
return o.fire("interactions:find", s), s.interaction || o.interactions.new({ pointerType: t });
|
|
5574
5596
|
}
|
|
5575
|
-
function
|
|
5597
|
+
function Pn(n, t) {
|
|
5576
5598
|
var o = n.doc, s = n.scope, c = n.options, f = s.interactions.docEvents, d = s.events, h = d[t];
|
|
5577
5599
|
for (var v in s.browser.isIOS && !c.events && (c.events = { passive: !1 }), d.delegatedEvents) h(o, v, d.delegateListener), h(o, v, d.delegateUseCapture, !0);
|
|
5578
5600
|
for (var b = c && c.events, y = 0; y < f.length; y++) {
|
|
5579
|
-
var
|
|
5580
|
-
h(o,
|
|
5601
|
+
var P = f[y];
|
|
5602
|
+
h(o, P.type, P.listener, b);
|
|
5581
5603
|
}
|
|
5582
5604
|
}
|
|
5583
5605
|
var Bi = { id: "core/interactions", install: function(n) {
|
|
5584
|
-
for (var t = {}, o = 0; o <
|
|
5585
|
-
var s =
|
|
5606
|
+
for (var t = {}, o = 0; o < On.length; o++) {
|
|
5607
|
+
var s = On[o];
|
|
5586
5608
|
t[s] = eo(s, n);
|
|
5587
5609
|
}
|
|
5588
5610
|
var c, f = Z.pEventTypes;
|
|
@@ -5590,11 +5612,11 @@ function kc() {
|
|
|
5590
5612
|
for (var h = 0, v = n.interactions.list; h < v.length; h++) {
|
|
5591
5613
|
var b = v[h];
|
|
5592
5614
|
if (b.pointerIsDown && b.pointerType === "touch" && !b._interacting) for (var y = function() {
|
|
5593
|
-
var D =
|
|
5615
|
+
var D = j[P];
|
|
5594
5616
|
n.documents.some(function(z) {
|
|
5595
5617
|
return te(z.doc, D.downTarget);
|
|
5596
5618
|
}) || b.removePointer(D.pointer, D.event);
|
|
5597
|
-
},
|
|
5619
|
+
}, P = 0, j = b.pointers; P < j.length; P++) y();
|
|
5598
5620
|
}
|
|
5599
5621
|
}
|
|
5600
5622
|
(c = L.PointerEvent ? [{ type: f.down, listener: d }, { type: f.down, listener: t.pointerDown }, { type: f.move, listener: t.pointerMove }, { type: f.up, listener: t.pointerUp }, { type: f.cancel, listener: t.pointerUp }] : [{ type: "mousedown", listener: t.pointerDown }, { type: "mousemove", listener: t.pointerMove }, { type: "mouseup", listener: t.pointerUp }, { type: "touchstart", listener: d }, { type: "touchstart", listener: t.pointerDown }, { type: "touchmove", listener: t.pointerMove }, { type: "touchend", listener: t.pointerUp }, { type: "touchcancel", listener: t.pointerUp }]).push({ type: "blur", listener: function(h) {
|
|
@@ -5621,15 +5643,15 @@ function kc() {
|
|
|
5621
5643
|
return n.interactions.list.push(v), v;
|
|
5622
5644
|
}, listeners: t, docEvents: c, pointerMoveTolerance: 1 }, n.usePlugin(Hr);
|
|
5623
5645
|
}, listeners: { "scope:add-document": function(n) {
|
|
5624
|
-
return
|
|
5646
|
+
return Pn(n, "add");
|
|
5625
5647
|
}, "scope:remove-document": function(n) {
|
|
5626
|
-
return
|
|
5648
|
+
return Pn(n, "remove");
|
|
5627
5649
|
}, "interactable:unset": function(n, t) {
|
|
5628
5650
|
for (var o = n.interactable, s = t.interactions.list.length - 1; s >= 0; s--) {
|
|
5629
5651
|
var c = t.interactions.list[s];
|
|
5630
5652
|
c.interactable === o && (c.stop(), t.fire("interactions:destroy", { interaction: c }), c.destroy(), t.interactions.list.length > 2 && t.interactions.list.splice(s, 1));
|
|
5631
5653
|
}
|
|
5632
|
-
} }, onDocSignal:
|
|
5654
|
+
} }, onDocSignal: Pn, doOnInteractions: eo, methodNames: On }, Yi = Bi, Ze = function(n) {
|
|
5633
5655
|
return n[n.On = 0] = "On", n[n.Off = 1] = "Off", n;
|
|
5634
5656
|
}(Ze || {}), Xi = function() {
|
|
5635
5657
|
function n(t, o, s, c) {
|
|
@@ -5648,7 +5670,7 @@ function kc() {
|
|
|
5648
5670
|
var s = this._defaults;
|
|
5649
5671
|
for (var c in o) {
|
|
5650
5672
|
var f = c, d = this.options[t], h = o[f];
|
|
5651
|
-
f === "listeners" && this.updatePerActionListeners(t, d.listeners, h), N.array(h) ? d[f] =
|
|
5673
|
+
f === "listeners" && this.updatePerActionListeners(t, d.listeners, h), N.array(h) ? d[f] = Pr(h) : N.plainObject(h) ? (d[f] = G(d[f] || {}, ft(h)), N.object(s.perAction[f]) && "enabled" in s.perAction[f] && (d[f].enabled = h.enabled !== !1)) : N.bool(h) && N.object(s.perAction[f]) ? d[f].enabled = h : d[f] = h;
|
|
5652
5674
|
}
|
|
5653
5675
|
} }, { key: "getRect", value: function(t) {
|
|
5654
5676
|
return t = t || (N.element(this.target) ? this.target : null), N.string(this.target) && (t = t || this._context.querySelector(this.target)), pe(t);
|
|
@@ -5760,7 +5782,7 @@ function kc() {
|
|
|
5760
5782
|
return this;
|
|
5761
5783
|
}
|
|
5762
5784
|
if (N.object(f)) {
|
|
5763
|
-
for (var
|
|
5785
|
+
for (var P in f) this.on(P, f[P], d);
|
|
5764
5786
|
return this;
|
|
5765
5787
|
}
|
|
5766
5788
|
return zt(f, this.scope.actions) ? this.globalEvents[f] ? this.globalEvents[f].push(d) : this.globalEvents[f] = [d] : this.scope.events.add(this.scope.document, f, d, { options: h }), this;
|
|
@@ -5773,11 +5795,11 @@ function kc() {
|
|
|
5773
5795
|
return this;
|
|
5774
5796
|
}
|
|
5775
5797
|
if (N.object(f)) {
|
|
5776
|
-
for (var
|
|
5798
|
+
for (var P in f) this.off(P, f[P], d);
|
|
5777
5799
|
return this;
|
|
5778
5800
|
}
|
|
5779
|
-
var
|
|
5780
|
-
return zt(f, this.scope.actions) ? f in this.globalEvents && (
|
|
5801
|
+
var j;
|
|
5802
|
+
return zt(f, this.scope.actions) ? f in this.globalEvents && (j = this.globalEvents[f].indexOf(d)) !== -1 && this.globalEvents[f].splice(j, 1) : this.scope.events.remove(this.scope.document, f, d, h), this;
|
|
5781
5803
|
}, "The interact.off() method is being deprecated"), c.debug = function() {
|
|
5782
5804
|
return this.scope;
|
|
5783
5805
|
}, c.supportsTouch = function() {
|
|
@@ -5871,8 +5893,8 @@ function kc() {
|
|
|
5871
5893
|
var c = s[0], f = s[1];
|
|
5872
5894
|
return c in n || f in n;
|
|
5873
5895
|
}), o = function(s, c) {
|
|
5874
|
-
for (var f = n.range, d = n.limits, h = d === void 0 ? { left: -1 / 0, right: 1 / 0, top: -1 / 0, bottom: 1 / 0 } : d, v = n.offset, b = v === void 0 ? { x: 0, y: 0 } : v, y = { range: f, grid: n, x: null, y: null },
|
|
5875
|
-
var
|
|
5896
|
+
for (var f = n.range, d = n.limits, h = d === void 0 ? { left: -1 / 0, right: 1 / 0, top: -1 / 0, bottom: 1 / 0 } : d, v = n.offset, b = v === void 0 ? { x: 0, y: 0 } : v, y = { range: f, grid: n, x: null, y: null }, P = 0; P < t.length; P++) {
|
|
5897
|
+
var j = t[P], D = j[0], z = j[1], H = Math.round((s - b.x) / n[D]), ie = Math.round((c - b.y) / n[z]);
|
|
5876
5898
|
y[D] = Math.max(h.left, Math.min(h.right, H * n[D] + b.x)), y[z] = Math.max(h.top, Math.min(h.bottom, ie * n[z] + b.y));
|
|
5877
5899
|
}
|
|
5878
5900
|
return y;
|
|
@@ -5884,12 +5906,12 @@ function kc() {
|
|
|
5884
5906
|
} }, Ji = Ki, Zi = { start: function(n) {
|
|
5885
5907
|
var t = n.state, o = n.rect, s = n.edges, c = n.pageCoords, f = t.options, d = f.ratio, h = f.enabled, v = t.options, b = v.equalDelta, y = v.modifiers;
|
|
5886
5908
|
d === "preserve" && (d = o.width / o.height), t.startCoords = G({}, c), t.startRect = G({}, o), t.ratio = d, t.equalDelta = b;
|
|
5887
|
-
var
|
|
5909
|
+
var P = t.linkedEdges = { top: s.top || s.left && !s.bottom, left: s.left || s.top && !s.right, bottom: s.bottom || s.right && !s.top, right: s.right || s.bottom && !s.left };
|
|
5888
5910
|
if (t.xIsPrimaryAxis = !(!s.left && !s.right), t.equalDelta) {
|
|
5889
|
-
var
|
|
5890
|
-
t.edgeSign = { x:
|
|
5891
|
-
} else t.edgeSign = { x:
|
|
5892
|
-
if (h !== !1 && G(s,
|
|
5911
|
+
var j = (P.left ? 1 : -1) * (P.top ? 1 : -1);
|
|
5912
|
+
t.edgeSign = { x: j, y: j };
|
|
5913
|
+
} else t.edgeSign = { x: P.left ? -1 : 1, y: P.top ? -1 : 1 };
|
|
5914
|
+
if (h !== !1 && G(s, P), y != null && y.length) {
|
|
5893
5915
|
var D = new Nn(n.interaction);
|
|
5894
5916
|
D.copyFrom(n.interaction.modification), D.prepareStates(y), t.subModification = D, D.startAll(a({}, n));
|
|
5895
5917
|
}
|
|
@@ -5897,7 +5919,7 @@ function kc() {
|
|
|
5897
5919
|
var t = n.state, o = n.rect, s = n.coords, c = t.linkedEdges, f = G({}, s), d = t.equalDelta ? Qi : es;
|
|
5898
5920
|
if (G(n.edges, c), d(t, t.xIsPrimaryAxis, s, o), !t.subModification) return null;
|
|
5899
5921
|
var h = G({}, o);
|
|
5900
|
-
|
|
5922
|
+
ze(c, h, { x: s.x - f.x, y: s.y - f.y });
|
|
5901
5923
|
var v = t.subModification.setAll(a(a({}, n), {}, { rect: h, edges: c, pageCoords: s, prevCoords: s, prevRect: h })), b = v.delta;
|
|
5902
5924
|
return v.changed && (d(t, Math.abs(b.x) > Math.abs(b.y), v.coords, v.rect), G(s, v.coords)), v.eventProps;
|
|
5903
5925
|
}, defaults: { ratio: "preserve", equalDelta: !1, modifiers: [], enabled: !1 } };
|
|
@@ -5920,15 +5942,15 @@ function kc() {
|
|
|
5920
5942
|
oo._defaults = {};
|
|
5921
5943
|
var Vt = oo;
|
|
5922
5944
|
function it(n, t, o) {
|
|
5923
|
-
return N.func(n) ?
|
|
5945
|
+
return N.func(n) ? Ie(n, t.interactable, t.element, [o.x, o.y, t]) : Ie(n, t.interactable, t.element);
|
|
5924
5946
|
}
|
|
5925
5947
|
var Ht = { start: function(n) {
|
|
5926
5948
|
var t = n.rect, o = n.startOffset, s = n.state, c = n.interaction, f = n.pageCoords, d = s.options, h = d.elementRect, v = G({ left: 0, top: 0, right: 0, bottom: 0 }, d.offset || {});
|
|
5927
5949
|
if (t && h) {
|
|
5928
5950
|
var b = it(d.restriction, c, f);
|
|
5929
5951
|
if (b) {
|
|
5930
|
-
var y = b.right - b.left - t.width,
|
|
5931
|
-
y < 0 && (v.left += y, v.right += y),
|
|
5952
|
+
var y = b.right - b.left - t.width, P = b.bottom - b.top - t.height;
|
|
5953
|
+
y < 0 && (v.left += y, v.right += y), P < 0 && (v.top += P, v.bottom += P);
|
|
5932
5954
|
}
|
|
5933
5955
|
v.left += o.left - t.width * h.left, v.top += o.top - t.height * h.top, v.right += o.right - t.width * (1 - h.right), v.bottom += o.bottom - t.height * (1 - h.bottom);
|
|
5934
5956
|
}
|
|
@@ -5970,29 +5992,29 @@ function kc() {
|
|
|
5970
5992
|
o.options = { endOnly: f.endOnly, inner: G({}, bt.noInner), outer: G({}, bt.noOuter) }, c.top ? (o.options.inner.top = s.bottom - d.height, o.options.outer.top = s.bottom - h.height) : c.bottom && (o.options.inner.bottom = s.top + d.height, o.options.outer.bottom = s.top + h.height), c.left ? (o.options.inner.left = s.right - d.width, o.options.outer.left = s.right - h.width) : c.right && (o.options.inner.right = s.left + d.width, o.options.outer.right = s.left + h.width), bt.set(n), o.options = f;
|
|
5971
5993
|
}
|
|
5972
5994
|
}, defaults: { min: null, max: null, endOnly: !1, enabled: !1 } }, "restrictSize"), kn = { start: function(n) {
|
|
5973
|
-
var t, o = n.interaction, s = n.interactable, c = n.element, f = n.rect, d = n.state, h = n.startOffset, v = d.options, b = v.offsetWithOrigin ? function(
|
|
5974
|
-
var D =
|
|
5995
|
+
var t, o = n.interaction, s = n.interactable, c = n.element, f = n.rect, d = n.state, h = n.startOffset, v = d.options, b = v.offsetWithOrigin ? function(j) {
|
|
5996
|
+
var D = j.interaction.element, z = ke(Ie(j.state.options.origin, null, null, [D])), H = z || Be(j.interactable, D, j.interaction.prepared.name);
|
|
5975
5997
|
return H;
|
|
5976
5998
|
}(n) : { x: 0, y: 0 };
|
|
5977
5999
|
if (v.offset === "startCoords") t = { x: o.coords.start.page.x, y: o.coords.start.page.y };
|
|
5978
6000
|
else {
|
|
5979
|
-
var y =
|
|
6001
|
+
var y = Ie(v.offset, s, c, [o]);
|
|
5980
6002
|
(t = ke(y) || { x: 0, y: 0 }).x += b.x, t.y += b.y;
|
|
5981
6003
|
}
|
|
5982
|
-
var
|
|
5983
|
-
d.offsets = f &&
|
|
5984
|
-
return { index: D, relativePoint:
|
|
6004
|
+
var P = v.relativePoints;
|
|
6005
|
+
d.offsets = f && P && P.length ? P.map(function(j, D) {
|
|
6006
|
+
return { index: D, relativePoint: j, x: h.left - f.width * j.x + t.x, y: h.top - f.height * j.y + t.y };
|
|
5985
6007
|
}) : [{ index: 0, relativePoint: null, x: t.x, y: t.y }];
|
|
5986
6008
|
}, set: function(n) {
|
|
5987
6009
|
var t = n.interaction, o = n.coords, s = n.state, c = s.options, f = s.offsets, d = Be(t.interactable, t.element, t.prepared.name), h = G({}, o), v = [];
|
|
5988
6010
|
c.offsetWithOrigin || (h.x -= d.x, h.y -= d.y);
|
|
5989
|
-
for (var b = 0, y = f; b < y.length; b++) for (var
|
|
6011
|
+
for (var b = 0, y = f; b < y.length; b++) for (var P = y[b], j = h.x - P.x, D = h.y - P.y, z = 0, H = c.targets.length; z < H; z++) {
|
|
5990
6012
|
var ie = c.targets[z], re = void 0;
|
|
5991
|
-
(re = N.func(ie) ? ie(
|
|
6013
|
+
(re = N.func(ie) ? ie(j, D, t._proxy, P, z) : ie) && v.push({ x: (N.number(re.x) ? re.x : j) + P.x, y: (N.number(re.y) ? re.y : D) + P.y, range: N.number(re.range) ? re.range : c.range, source: ie, index: z, offset: P });
|
|
5992
6014
|
}
|
|
5993
6015
|
for (var ce = { target: null, inRange: !1, distance: 0, range: 0, delta: { x: 0, y: 0 } }, ve = 0; ve < v.length; ve++) {
|
|
5994
|
-
var we = v[ve], fe = we.range, ye = we.x - h.x, Ae = we.y - h.y,
|
|
5995
|
-
fe === 1 / 0 && ce.inRange && ce.range !== 1 / 0 && (Fe = !1), ce.target && !(Fe ? ce.inRange && fe !== 1 / 0 ?
|
|
6016
|
+
var we = v[ve], fe = we.range, ye = we.x - h.x, Ae = we.y - h.y, Pe = pt(ye, Ae), Fe = Pe <= fe;
|
|
6017
|
+
fe === 1 / 0 && ce.inRange && ce.range !== 1 / 0 && (Fe = !1), ce.target && !(Fe ? ce.inRange && fe !== 1 / 0 ? Pe / fe < ce.distance / ce.range : fe === 1 / 0 && ce.range !== 1 / 0 || Pe < ce.distance : !ce.inRange && Pe < ce.distance) || (ce.target = we, ce.distance = Pe, ce.range = fe, ce.inRange = Fe, ce.delta.x = ye, ce.delta.y = Ae);
|
|
5996
6018
|
}
|
|
5997
6019
|
return ce.inRange && (o.x = ce.target.x, o.y = ce.target.y), s.closest = ce, ce;
|
|
5998
6020
|
}, defaults: { range: 1 / 0, targets: null, offset: null, offsetWithOrigin: !0, origin: null, relativePoints: null, endOnly: !1, enabled: !1 } }, ls = Je(kn, "snap"), Bt = { start: function(n) {
|
|
@@ -6005,8 +6027,8 @@ function kc() {
|
|
|
6005
6027
|
for (var h = 0, v = c.targets || []; h < v.length; h++) {
|
|
6006
6028
|
var b = v[h], y = void 0;
|
|
6007
6029
|
if (y = N.func(b) ? b(d.x, d.y, t) : b) {
|
|
6008
|
-
for (var
|
|
6009
|
-
var D =
|
|
6030
|
+
for (var P = 0, j = o.targetFields; P < j.length; P++) {
|
|
6031
|
+
var D = j[P], z = D[0], H = D[1];
|
|
6010
6032
|
if (z in y || H in y) {
|
|
6011
6033
|
y.x = y[z], y.y = y[H];
|
|
6012
6034
|
break;
|
|
@@ -6031,11 +6053,11 @@ function kc() {
|
|
|
6031
6053
|
var t = $(o);
|
|
6032
6054
|
function o(s, c, f, d, h, v) {
|
|
6033
6055
|
var b;
|
|
6034
|
-
if (u(this, o),
|
|
6056
|
+
if (u(this, o), jt(C(b = t.call(this, h)), f), f !== c && jt(C(b), c), b.timeStamp = v, b.originalEvent = f, b.type = s, b.pointerId = ht(c), b.pointerType = Tr(c), b.target = d, b.currentTarget = null, s === "tap") {
|
|
6035
6057
|
var y = h.getPointerIndex(c);
|
|
6036
6058
|
b.dt = b.timeStamp - h.pointers[y].downTime;
|
|
6037
|
-
var
|
|
6038
|
-
b.double = !!h.prevTap && h.prevTap.type !== "doubletap" && h.prevTap.target === b.target &&
|
|
6059
|
+
var P = b.timeStamp - h.tapTime;
|
|
6060
|
+
b.double = !!h.prevTap && h.prevTap.type !== "doubletap" && h.prevTap.target === b.target && P < 500;
|
|
6039
6061
|
} else s === "doubletap" && (b.dt = c.timeStamp - h.tapTime, b.double = !0);
|
|
6040
6062
|
return b;
|
|
6041
6063
|
}
|
|
@@ -6058,15 +6080,15 @@ function kc() {
|
|
|
6058
6080
|
!t && o.hold || (o.hold = { duration: 1 / 0, timeout: null });
|
|
6059
6081
|
}, "interactions:move": function(n, t) {
|
|
6060
6082
|
var o = n.interaction, s = n.pointer, c = n.event, f = n.eventTarget;
|
|
6061
|
-
n.duplicate || o.pointerIsDown && !o.pointerWasMoved || (o.pointerIsDown &&
|
|
6083
|
+
n.duplicate || o.pointerIsDown && !o.pointerWasMoved || (o.pointerIsDown && In(n), Qe({ interaction: o, pointer: s, event: c, eventTarget: f, type: "move" }, t));
|
|
6062
6084
|
}, "interactions:down": function(n, t) {
|
|
6063
6085
|
(function(o, s) {
|
|
6064
|
-
for (var c = o.interaction, f = o.pointer, d = o.event, h = o.eventTarget, v = o.pointerIndex, b = c.pointers[v].hold, y = be(h),
|
|
6065
|
-
var D = y[
|
|
6066
|
-
|
|
6086
|
+
for (var c = o.interaction, f = o.pointer, d = o.event, h = o.eventTarget, v = o.pointerIndex, b = c.pointers[v].hold, y = be(h), P = { interaction: c, pointer: f, event: d, eventTarget: h, type: "hold", targets: [], path: y, node: null }, j = 0; j < y.length; j++) {
|
|
6087
|
+
var D = y[j];
|
|
6088
|
+
P.node = D, s.fire("pointerEvents:collect-targets", P);
|
|
6067
6089
|
}
|
|
6068
|
-
if (
|
|
6069
|
-
for (var z = 1 / 0, H = 0, ie =
|
|
6090
|
+
if (P.targets.length) {
|
|
6091
|
+
for (var z = 1 / 0, H = 0, ie = P.targets; H < ie.length; H++) {
|
|
6070
6092
|
var re = ie[H].eventable.options.holdDuration;
|
|
6071
6093
|
re < z && (z = re);
|
|
6072
6094
|
}
|
|
@@ -6076,21 +6098,21 @@ function kc() {
|
|
|
6076
6098
|
}
|
|
6077
6099
|
})(n, t), Qe(n, t);
|
|
6078
6100
|
}, "interactions:up": function(n, t) {
|
|
6079
|
-
|
|
6101
|
+
In(n), Qe(n, t), function(o, s) {
|
|
6080
6102
|
var c = o.interaction, f = o.pointer, d = o.event, h = o.eventTarget;
|
|
6081
6103
|
c.pointerWasMoved || Qe({ interaction: c, eventTarget: h, pointer: f, event: d, type: "tap" }, s);
|
|
6082
6104
|
}(n, t);
|
|
6083
6105
|
}, "interactions:cancel": function(n, t) {
|
|
6084
|
-
|
|
6106
|
+
In(n), Qe(n, t);
|
|
6085
6107
|
} }, PointerEvent: co, fire: Qe, collectEventTargets: lo, defaults: { holdDuration: 600, ignoreFrom: null, allowFrom: null, origin: { x: 0, y: 0 } }, types: { down: !0, move: !0, up: !0, cancel: !0, tap: !0, doubletap: !0, hold: !0 } };
|
|
6086
6108
|
function Qe(n, t) {
|
|
6087
6109
|
var o = n.interaction, s = n.pointer, c = n.event, f = n.eventTarget, d = n.type, h = n.targets, v = h === void 0 ? lo(n, t) : h, b = new co(d, s, c, f, o, t.now());
|
|
6088
6110
|
t.fire("pointerEvents:new", { pointerEvent: b });
|
|
6089
|
-
for (var y = { interaction: o, pointer: s, event: c, eventTarget: f, targets: v, type: d, pointerEvent: b },
|
|
6090
|
-
var
|
|
6091
|
-
for (var D in
|
|
6092
|
-
var z = Be(
|
|
6093
|
-
if (b._subtractOrigin(z), b.eventable =
|
|
6111
|
+
for (var y = { interaction: o, pointer: s, event: c, eventTarget: f, targets: v, type: d, pointerEvent: b }, P = 0; P < v.length; P++) {
|
|
6112
|
+
var j = v[P];
|
|
6113
|
+
for (var D in j.props || {}) b[D] = j.props[D];
|
|
6114
|
+
var z = Be(j.eventable, j.node);
|
|
6115
|
+
if (b._subtractOrigin(z), b.eventable = j.eventable, b.currentTarget = j.node, j.eventable.fire(b), b._addOrigin(z), b.immediatePropagationStopped || b.propagationStopped && P + 1 < v.length && v[P + 1].node !== b.currentTarget) break;
|
|
6094
6116
|
}
|
|
6095
6117
|
if (t.fire("pointerEvents:fired", y), d === "tap") {
|
|
6096
6118
|
var H = b.double ? Qe({ interaction: o, pointer: s, event: c, eventTarget: f, type: "doubletap" }, t) : b;
|
|
@@ -6101,16 +6123,16 @@ function kc() {
|
|
|
6101
6123
|
function lo(n, t) {
|
|
6102
6124
|
var o = n.interaction, s = n.pointer, c = n.event, f = n.eventTarget, d = n.type, h = o.getPointerIndex(s), v = o.pointers[h];
|
|
6103
6125
|
if (d === "tap" && (o.pointerWasMoved || !v || v.downTarget !== f)) return [];
|
|
6104
|
-
for (var b = be(f), y = { interaction: o, pointer: s, event: c, eventTarget: f, type: d, path: b, targets: [], node: null },
|
|
6105
|
-
var
|
|
6106
|
-
y.node =
|
|
6126
|
+
for (var b = be(f), y = { interaction: o, pointer: s, event: c, eventTarget: f, type: d, path: b, targets: [], node: null }, P = 0; P < b.length; P++) {
|
|
6127
|
+
var j = b[P];
|
|
6128
|
+
y.node = j, t.fire("pointerEvents:collect-targets", y);
|
|
6107
6129
|
}
|
|
6108
6130
|
return d === "hold" && (y.targets = y.targets.filter(function(D) {
|
|
6109
6131
|
var z, H;
|
|
6110
6132
|
return D.eventable.options.holdDuration === ((z = o.pointers[h]) == null || (H = z.hold) == null ? void 0 : H.duration);
|
|
6111
6133
|
})), y.targets;
|
|
6112
6134
|
}
|
|
6113
|
-
function
|
|
6135
|
+
function In(n) {
|
|
6114
6136
|
var t = n.interaction, o = n.pointerIndex, s = t.pointers[o].hold;
|
|
6115
6137
|
s && s.timeout && (clearTimeout(s.timeout), s.timeout = null);
|
|
6116
6138
|
}
|
|
@@ -6167,16 +6189,16 @@ function kc() {
|
|
|
6167
6189
|
n.actions.phases.reflow = !0, t.prototype.reflow = function(o) {
|
|
6168
6190
|
return function(s, c, f) {
|
|
6169
6191
|
for (var d = s.getAllElements(), h = f.window.Promise, v = h ? [] : null, b = function() {
|
|
6170
|
-
var
|
|
6171
|
-
if (!
|
|
6192
|
+
var P = d[y], j = s.getRect(P);
|
|
6193
|
+
if (!j) return 1;
|
|
6172
6194
|
var D, z = mt(f.interactions.list, function(re) {
|
|
6173
|
-
return re.interacting() && re.interactable === s && re.element ===
|
|
6195
|
+
return re.interacting() && re.interactable === s && re.element === P && re.prepared.name === c.name;
|
|
6174
6196
|
});
|
|
6175
6197
|
if (z) z.move(), v && (D = z._reflowPromise || new h(function(re) {
|
|
6176
6198
|
z._reflowResolve = re;
|
|
6177
6199
|
}));
|
|
6178
6200
|
else {
|
|
6179
|
-
var H = He(
|
|
6201
|
+
var H = He(j), ie = /* @__PURE__ */ function(re) {
|
|
6180
6202
|
return { coords: re, get page() {
|
|
6181
6203
|
return this.coords.page;
|
|
6182
6204
|
}, get client() {
|
|
@@ -6207,11 +6229,11 @@ function kc() {
|
|
|
6207
6229
|
D = function(re, ce, ve, we, fe) {
|
|
6208
6230
|
var ye = re.interactions.new({ pointerType: "reflow" }), Ae = { interaction: ye, event: fe, pointer: fe, eventTarget: ve, phase: "reflow" };
|
|
6209
6231
|
ye.interactable = ce, ye.element = ve, ye.prevEvent = fe, ye.updatePointer(fe, fe, ve, !0), wr(ye.coords.delta), xn(ye.prepared, we), ye._doPhase(Ae);
|
|
6210
|
-
var
|
|
6232
|
+
var Pe = re.window, Fe = Pe.Promise, Ve = Fe ? new Fe(function(Ge) {
|
|
6211
6233
|
ye._reflowResolve = Ge;
|
|
6212
6234
|
}) : void 0;
|
|
6213
6235
|
return ye._reflowPromise = Ve, ye.start(we, ce, ve), ye._interacting ? (ye.move(Ae), ye.end(fe)) : (ye.stop(), ye._reflowResolve()), ye.removePointer(fe, fe), Ve;
|
|
6214
|
-
}(f, s,
|
|
6236
|
+
}(f, s, P, c, ie);
|
|
6215
6237
|
}
|
|
6216
6238
|
v && v.push(D);
|
|
6217
6239
|
}, y = 0; y < d.length && !b(); y++) ;
|
|
@@ -6226,7 +6248,7 @@ function kc() {
|
|
|
6226
6248
|
s.splice(s.indexOf(c), 1);
|
|
6227
6249
|
}(t.interactions.list, o));
|
|
6228
6250
|
} } }, Es = ws;
|
|
6229
|
-
if ($e.use(Hr), $e.use(qr), $e.use(bs), $e.use(Fi), $e.use(ds), $e.use(
|
|
6251
|
+
if ($e.use(Hr), $e.use(qr), $e.use(bs), $e.use(Fi), $e.use(ds), $e.use(Oi), $e.use(mi), $e.use(yi), $e.use(Es), $e.default = $e, l(e) === "object" && e) try {
|
|
6230
6252
|
e.exports = $e;
|
|
6231
6253
|
} catch {
|
|
6232
6254
|
}
|
|
@@ -6234,41 +6256,41 @@ function kc() {
|
|
|
6234
6256
|
});
|
|
6235
6257
|
}(Wt)), Wt.exports;
|
|
6236
6258
|
}
|
|
6237
|
-
var
|
|
6238
|
-
const jc = /* @__PURE__ */
|
|
6259
|
+
var Ic = /* @__PURE__ */ Cc();
|
|
6260
|
+
const jc = /* @__PURE__ */ jo(Ic);
|
|
6239
6261
|
function We(e) {
|
|
6240
6262
|
return e == null ? "" : typeof e == "string" || typeof e == "number" || typeof e == "boolean" ? String(e) : typeof e == "function" ? e.toString() : e instanceof Date ? e.toISOString() : e instanceof RegExp ? e.toString() : e instanceof Map ? JSON.stringify(Array.from(e.entries())) : e instanceof Set ? JSON.stringify(Array.from(e.values())) : e instanceof WeakMap || e instanceof WeakSet ? "" : e instanceof ArrayBuffer ? e.toString() : Array.isArray(e) ? JSON.stringify(e.map(We)) : typeof e == "object" ? JSON.stringify(Object.entries(e).sort(([r], [i]) => r.localeCompare(i))) : "";
|
|
6241
6263
|
}
|
|
6242
|
-
function
|
|
6264
|
+
function $c(e, {
|
|
6243
6265
|
isEnabled: r = !0,
|
|
6244
6266
|
onDragStart: i,
|
|
6245
6267
|
onDragMove: a,
|
|
6246
6268
|
onDragEnd: l,
|
|
6247
6269
|
...u
|
|
6248
6270
|
}) {
|
|
6249
|
-
const p =
|
|
6250
|
-
|
|
6271
|
+
const p = Se(i), g = Se(a), m = Se(l);
|
|
6272
|
+
Re(() => {
|
|
6251
6273
|
if (!r) return;
|
|
6252
6274
|
const S = e.current;
|
|
6253
6275
|
if (!S) return;
|
|
6254
6276
|
const _ = jc(S).draggable({
|
|
6255
6277
|
inertia: !0,
|
|
6256
6278
|
...u,
|
|
6257
|
-
onstart: ({ client:
|
|
6258
|
-
const C =
|
|
6279
|
+
onstart: ({ client: O }) => {
|
|
6280
|
+
const C = Te.make(O);
|
|
6259
6281
|
p.current?.(C);
|
|
6260
6282
|
},
|
|
6261
|
-
onmove: ({ client:
|
|
6262
|
-
const
|
|
6263
|
-
g.current?.(J, K,
|
|
6283
|
+
onmove: ({ client: O, clientX0: C, clientY0: $, dx: M, dy: w }) => {
|
|
6284
|
+
const I = Te.make(C, $), K = Te.make(O), J = Te.make(M, w);
|
|
6285
|
+
g.current?.(J, K, I);
|
|
6264
6286
|
},
|
|
6265
|
-
onend: ({ client:
|
|
6266
|
-
const M =
|
|
6287
|
+
onend: ({ client: O, clientX0: C, clientY0: $ }) => {
|
|
6288
|
+
const M = Te.make(C, $), w = Te.make(O);
|
|
6267
6289
|
m.current?.(w, M);
|
|
6268
6290
|
}
|
|
6269
6291
|
});
|
|
6270
6292
|
return () => {
|
|
6271
|
-
_.unset(), m.current?.(
|
|
6293
|
+
_.unset(), m.current?.(Te.zero, Te.zero);
|
|
6272
6294
|
};
|
|
6273
6295
|
}, [r, We(u)]);
|
|
6274
6296
|
}
|
|
@@ -6280,21 +6302,21 @@ function Ct(e, {
|
|
|
6280
6302
|
onDragEnd: u,
|
|
6281
6303
|
...p
|
|
6282
6304
|
}) {
|
|
6283
|
-
const g = Ee(r), [m, S] = _e(!1), [_,
|
|
6284
|
-
return
|
|
6305
|
+
const g = Ee(r), [m, S] = _e(!1), [_, O] = _e(!1), [C, $] = _e(r), M = Se(a), w = Se(l), I = Se(u), K = Se(i);
|
|
6306
|
+
return $c(e, {
|
|
6285
6307
|
onDragStart: (E) => {
|
|
6286
|
-
S(!0),
|
|
6308
|
+
S(!0), O(!1), M.current?.(E);
|
|
6287
6309
|
},
|
|
6288
6310
|
onDragMove: (E, k, N) => {
|
|
6289
6311
|
const A = K.current(g.current, E.x, E.y);
|
|
6290
|
-
|
|
6312
|
+
Oo(g, A) && $(A), S(!0), O(!1), w.current?.(E, k, N);
|
|
6291
6313
|
},
|
|
6292
6314
|
onDragEnd: (E, k) => {
|
|
6293
|
-
S(!1),
|
|
6315
|
+
S(!1), O(!0), I.current?.(E, k);
|
|
6294
6316
|
},
|
|
6295
6317
|
...p
|
|
6296
6318
|
}), Ne(() => {
|
|
6297
|
-
|
|
6319
|
+
Oo(g, C);
|
|
6298
6320
|
}, [C]), {
|
|
6299
6321
|
isDragging: m,
|
|
6300
6322
|
isReleasing: _,
|
|
@@ -6302,10 +6324,10 @@ function Ct(e, {
|
|
|
6302
6324
|
setValue: $
|
|
6303
6325
|
};
|
|
6304
6326
|
}
|
|
6305
|
-
function
|
|
6327
|
+
function Oo(e, r) {
|
|
6306
6328
|
return qe(e.current, r) ? !1 : (e.current = r, !0);
|
|
6307
6329
|
}
|
|
6308
|
-
const ri = /* @__PURE__ */
|
|
6330
|
+
const ri = /* @__PURE__ */ Oe(({
|
|
6309
6331
|
angle: e = 0,
|
|
6310
6332
|
speed: r = 1,
|
|
6311
6333
|
src: i,
|
|
@@ -6317,10 +6339,10 @@ const ri = /* @__PURE__ */ Pe(({
|
|
|
6317
6339
|
onLoadImageStart: m,
|
|
6318
6340
|
onLoadImageComplete: S,
|
|
6319
6341
|
onLoadImageError: _,
|
|
6320
|
-
onImageSizeChange:
|
|
6342
|
+
onImageSizeChange: O,
|
|
6321
6343
|
...C
|
|
6322
6344
|
}, $) => {
|
|
6323
|
-
const M = he((A, B, U) => A - B * r, [r]), w = Ee(null),
|
|
6345
|
+
const M = he((A, B, U) => A - B * r, [r]), w = Ee(null), I = nt(w), K = Vo({ src: i }, {
|
|
6324
6346
|
onLoadStart: m,
|
|
6325
6347
|
onLoadComplete: S,
|
|
6326
6348
|
onLoadError: _
|
|
@@ -6332,18 +6354,18 @@ const ri = /* @__PURE__ */ Pe(({
|
|
|
6332
6354
|
});
|
|
6333
6355
|
Ne(() => {
|
|
6334
6356
|
if (q || !K) return;
|
|
6335
|
-
const A =
|
|
6357
|
+
const A = Mc(e, K, xe.size(I), a);
|
|
6336
6358
|
A !== E && k(A), e !== J && Y(e);
|
|
6337
|
-
}, [e, K,
|
|
6359
|
+
}, [e, K, I.width, I.height, a]), Ne(() => {
|
|
6338
6360
|
if (!q || !K) return;
|
|
6339
|
-
const A =
|
|
6361
|
+
const A = Rc(E, K, xe.size(I), a);
|
|
6340
6362
|
J !== A && Y(A);
|
|
6341
|
-
}, [E, K,
|
|
6363
|
+
}, [E, K, I.width, I.height, a]), Ne(() => {
|
|
6342
6364
|
l?.(J, q), u?.(J / 360, q);
|
|
6343
6365
|
}, [J]), Ne(() => {
|
|
6344
|
-
|
|
6366
|
+
O?.(K);
|
|
6345
6367
|
}, [K?.width, K?.height]);
|
|
6346
|
-
const N =
|
|
6368
|
+
const N = Ac({ src: i, displacement: E });
|
|
6347
6369
|
return /* @__PURE__ */ x.jsx(
|
|
6348
6370
|
"div",
|
|
6349
6371
|
{
|
|
@@ -6355,7 +6377,7 @@ const ri = /* @__PURE__ */ Pe(({
|
|
|
6355
6377
|
}
|
|
6356
6378
|
);
|
|
6357
6379
|
});
|
|
6358
|
-
function
|
|
6380
|
+
function Ac({ src: e = "", displacement: r = NaN }) {
|
|
6359
6381
|
return {
|
|
6360
6382
|
body: {
|
|
6361
6383
|
backgroundImage: `url(${e})`,
|
|
@@ -6370,22 +6392,22 @@ function $c({ src: e = "", displacement: r = NaN }) {
|
|
|
6370
6392
|
}
|
|
6371
6393
|
function oi(e, r) {
|
|
6372
6394
|
const { width: i, height: a } = e, { height: l } = r;
|
|
6373
|
-
if (a <= 0) return
|
|
6395
|
+
if (a <= 0) return je.zero;
|
|
6374
6396
|
const p = l / a * i;
|
|
6375
|
-
return
|
|
6397
|
+
return je.make(p, l);
|
|
6376
6398
|
}
|
|
6377
|
-
function
|
|
6399
|
+
function Mc(e, r, i, a) {
|
|
6378
6400
|
const { width: l } = oi(r, i), { width: u } = i, p = u * a;
|
|
6379
6401
|
return e / 360 * l - p;
|
|
6380
6402
|
}
|
|
6381
|
-
function
|
|
6403
|
+
function Rc(e, r, i, a) {
|
|
6382
6404
|
const { width: l } = oi(r, i), { width: u } = i, p = u * a;
|
|
6383
6405
|
let g = (e + p) % l / l * 360;
|
|
6384
6406
|
for (; g < 0; ) g += 360;
|
|
6385
6407
|
return g;
|
|
6386
6408
|
}
|
|
6387
6409
|
process.env.NODE_ENV === "development" && (ri.displayName = "Panorama");
|
|
6388
|
-
const
|
|
6410
|
+
const zc = /* @__PURE__ */ Oe(({
|
|
6389
6411
|
className: e,
|
|
6390
6412
|
style: r,
|
|
6391
6413
|
angle: i = 0,
|
|
@@ -6397,12 +6419,12 @@ const Rc = /* @__PURE__ */ Pe(({
|
|
|
6397
6419
|
viewportSize: m,
|
|
6398
6420
|
zeroAnchor: S = 0,
|
|
6399
6421
|
onAngleChange: _,
|
|
6400
|
-
onDragEnd:
|
|
6422
|
+
onDragEnd: O,
|
|
6401
6423
|
onDragStart: C,
|
|
6402
6424
|
onLoadImageComplete: $,
|
|
6403
6425
|
onLoadImageError: M,
|
|
6404
6426
|
onLoadImageStart: w,
|
|
6405
|
-
onImageSizeChange:
|
|
6427
|
+
onImageSizeChange: I,
|
|
6406
6428
|
onPositionChange: K,
|
|
6407
6429
|
...J
|
|
6408
6430
|
}, Y) => {
|
|
@@ -6416,12 +6438,12 @@ const Rc = /* @__PURE__ */ Pe(({
|
|
|
6416
6438
|
}, [m?.width, m?.height, oe, E.width, u])(), R = he(() => E.width <= 0 ? S : ((E.width - X) * 0.5 + S * X) / E.width, [E.width, X, S])(), Z = he(() => {
|
|
6417
6439
|
B(!0), C?.();
|
|
6418
6440
|
}, [C]), te = he(() => {
|
|
6419
|
-
B(!1),
|
|
6420
|
-
}, [
|
|
6441
|
+
B(!1), O?.();
|
|
6442
|
+
}, [O]), ae = Le(l, {
|
|
6421
6443
|
track: Kt,
|
|
6422
6444
|
reticle: Zn,
|
|
6423
6445
|
indicator: Jn
|
|
6424
|
-
}), F =
|
|
6446
|
+
}), F = Lc({ autoDimension: a, panoramaRect: E, aspectRatio: oe, reticleWidth: X });
|
|
6425
6447
|
return /* @__PURE__ */ x.jsxs(
|
|
6426
6448
|
"div",
|
|
6427
6449
|
{
|
|
@@ -6459,7 +6481,7 @@ const Rc = /* @__PURE__ */ Pe(({
|
|
|
6459
6481
|
}
|
|
6460
6482
|
);
|
|
6461
6483
|
}), Jn = ({ ...e }) => /* @__PURE__ */ x.jsx("div", { ...e }), Zn = ({ ...e }) => /* @__PURE__ */ x.jsx("div", { ...e }), Kt = ({ ...e }) => /* @__PURE__ */ x.jsx("div", { ...e });
|
|
6462
|
-
function
|
|
6484
|
+
function Lc({ autoDimension: e = "width", panoramaRect: r = xe.zero, aspectRatio: i = 0, reticleWidth: a = 0 }) {
|
|
6463
6485
|
return {
|
|
6464
6486
|
root: {
|
|
6465
6487
|
...e === "width" ? {
|
|
@@ -6503,8 +6525,8 @@ function zc({ autoDimension: e = "width", panoramaRect: r = xe.zero, aspectRatio
|
|
|
6503
6525
|
}
|
|
6504
6526
|
};
|
|
6505
6527
|
}
|
|
6506
|
-
process.env.NODE_ENV === "development" && (
|
|
6507
|
-
const
|
|
6528
|
+
process.env.NODE_ENV === "development" && (zc.displayName = "PanoramaSlider", Jn.displayName = "PanoramaSliderIndicator", Zn.displayName = "PanoramaSliderReticle", Kt.displayName = "PanoramaSliderTrack");
|
|
6529
|
+
const Fc = /* @__PURE__ */ Oe(({
|
|
6508
6530
|
children: e,
|
|
6509
6531
|
className: r,
|
|
6510
6532
|
decimalPlaces: i = 2,
|
|
@@ -6516,29 +6538,29 @@ const Lc = /* @__PURE__ */ Pe(({
|
|
|
6516
6538
|
min: m,
|
|
6517
6539
|
orientation: S = "vertical",
|
|
6518
6540
|
range: _,
|
|
6519
|
-
steps:
|
|
6541
|
+
steps: O = -1,
|
|
6520
6542
|
onChange: C,
|
|
6521
6543
|
...$
|
|
6522
6544
|
}, M) => {
|
|
6523
|
-
const w = Ee(null),
|
|
6545
|
+
const w = Ee(null), I = nt(w), K = Ee(null), J = Ee(null), [Y, q] = _e(_ ?? [m, g]), E = Uc(m, g, O), [k, N] = Y.map((ne) => st(ne, m, g, S, I, p, l, a)), A = N - k, B = Le(e, {
|
|
6524
6546
|
gutter: Qn,
|
|
6525
6547
|
highlight: er,
|
|
6526
6548
|
knob: Zt,
|
|
6527
6549
|
knobContainer: Rn,
|
|
6528
6550
|
label: Jt
|
|
6529
6551
|
}), U = he((ne, Q, ee) => {
|
|
6530
|
-
const ue = S === "horizontal" ? Q : ee, pe = st(m, m, g, S,
|
|
6531
|
-
return
|
|
6532
|
-
}, [p, l, a, m, g, S, Y[1], xe.toString(
|
|
6533
|
-
const ue = S === "horizontal" ? Q : ee, pe = st(Y[0], m, g, S,
|
|
6534
|
-
return
|
|
6535
|
-
}, [p, l, a, m, g, S, Y[0], xe.toString(
|
|
6552
|
+
const ue = S === "horizontal" ? Q : ee, pe = st(m, m, g, S, I, p, l, a), be = st(Y[1], m, g, S, I, p, l, a), me = st(ne, m, g, S, I, p, l, a) + ue;
|
|
6553
|
+
return Po(Math.max(pe, Math.min(be, me)), m, g, S, I, p, l, a);
|
|
6554
|
+
}, [p, l, a, m, g, S, Y[1], xe.toString(I)]), oe = he((ne, Q, ee) => {
|
|
6555
|
+
const ue = S === "horizontal" ? Q : ee, pe = st(Y[0], m, g, S, I, p, l, a), be = st(g, m, g, S, I, p, l, a), me = st(ne, m, g, S, I, p, l, a) + ue;
|
|
6556
|
+
return Po(Math.max(pe, Math.min(be, me)), m, g, S, I, p, l, a);
|
|
6557
|
+
}, [p, l, a, m, g, S, Y[0], xe.toString(I)]), { isDragging: W, isReleasing: X, value: L, setValue: R } = Ct(K, {
|
|
6536
6558
|
initialValue: _?.[0] ?? m,
|
|
6537
6559
|
transform: U
|
|
6538
6560
|
}), { isDragging: Z, isReleasing: te, value: ae, setValue: F } = Ct(J, {
|
|
6539
6561
|
initialValue: _?.[1] ?? g,
|
|
6540
6562
|
transform: oe
|
|
6541
|
-
}), T =
|
|
6563
|
+
}), T = Dc({ isDraggingEndKnob: Z, isDraggingStartKnob: W, isReleasingEndKnob: te, isReleasingStartKnob: X }), V = Vc({ orientation: S, highlightLength: A, start: k, knobPadding: u, knobWidth: p, knobHeight: l });
|
|
6542
6564
|
return Ne(() => {
|
|
6543
6565
|
q([L, ae]);
|
|
6544
6566
|
}, [L, ae]), Ne(() => {
|
|
@@ -6572,9 +6594,9 @@ const Lc = /* @__PURE__ */ Pe(({
|
|
|
6572
6594
|
pointerEvents: qe([L, ae], [m, m]) ? "none" : "auto"
|
|
6573
6595
|
}, S === "horizontal" ? {
|
|
6574
6596
|
left: `${k}px`,
|
|
6575
|
-
top: `${
|
|
6597
|
+
top: `${I.height * 0.5}px`
|
|
6576
6598
|
} : {
|
|
6577
|
-
left: `${
|
|
6599
|
+
left: `${I.width * 0.5}px`,
|
|
6578
6600
|
top: `${k}px`
|
|
6579
6601
|
}),
|
|
6580
6602
|
children: /* @__PURE__ */ x.jsxs(ge, { className: T.startKnob, element: B.knob ?? /* @__PURE__ */ x.jsx(Zt, {}), style: le(V.knob), children: [
|
|
@@ -6594,9 +6616,9 @@ const Lc = /* @__PURE__ */ Pe(({
|
|
|
6594
6616
|
pointerEvents: qe([L, ae], [g, g]) ? "none" : "auto"
|
|
6595
6617
|
}, S === "horizontal" ? {
|
|
6596
6618
|
left: `${N}px`,
|
|
6597
|
-
top: `${
|
|
6619
|
+
top: `${I.height * 0.5}px`
|
|
6598
6620
|
} : {
|
|
6599
|
-
left: `${
|
|
6621
|
+
left: `${I.width * 0.5}px`,
|
|
6600
6622
|
top: `${N}px`
|
|
6601
6623
|
}),
|
|
6602
6624
|
children: /* @__PURE__ */ x.jsxs(ge, { className: T.endKnob, element: B.knob ?? /* @__PURE__ */ x.jsx(Zt, {}), style: le(V.knob), children: [
|
|
@@ -6609,7 +6631,7 @@ const Lc = /* @__PURE__ */ Pe(({
|
|
|
6609
6631
|
}
|
|
6610
6632
|
);
|
|
6611
6633
|
}), Qn = ({ ...e }) => /* @__PURE__ */ x.jsx("div", { ...e }), Jt = ({ ...e }) => /* @__PURE__ */ x.jsx("div", { ...e }), er = ({ ...e }) => /* @__PURE__ */ x.jsx("div", { ...e }), Zt = ({ ...e }) => /* @__PURE__ */ x.jsx("div", { ...e }), Rn = ({ ...e }) => /* @__PURE__ */ x.jsx("button", { ...e });
|
|
6612
|
-
function
|
|
6634
|
+
function Dc({ isDraggingStartKnob: e = !1, isReleasingStartKnob: r = !1, isDraggingEndKnob: i = !1, isReleasingEndKnob: a = !1 }) {
|
|
6613
6635
|
return {
|
|
6614
6636
|
startKnobContainer: se({
|
|
6615
6637
|
dragging: e,
|
|
@@ -6637,7 +6659,7 @@ function Fc({ isDraggingStartKnob: e = !1, isReleasingStartKnob: r = !1, isDragg
|
|
|
6637
6659
|
})
|
|
6638
6660
|
};
|
|
6639
6661
|
}
|
|
6640
|
-
function
|
|
6662
|
+
function Vc({ orientation: e = "horizontal", knobWidth: r = 0, knobHeight: i = 0, highlightLength: a = 0, start: l = 0, knobPadding: u = 0 }) {
|
|
6641
6663
|
return {
|
|
6642
6664
|
body: {
|
|
6643
6665
|
height: "100%",
|
|
@@ -6694,10 +6716,10 @@ function Dc({ orientation: e = "horizontal", knobWidth: r = 0, knobHeight: i = 0
|
|
|
6694
6716
|
}
|
|
6695
6717
|
};
|
|
6696
6718
|
}
|
|
6697
|
-
function
|
|
6719
|
+
function Hc(e, r, i) {
|
|
6698
6720
|
return (e - r) / (i - r);
|
|
6699
6721
|
}
|
|
6700
|
-
function
|
|
6722
|
+
function Bc(e, r, i, a, l, u) {
|
|
6701
6723
|
switch (r) {
|
|
6702
6724
|
case "horizontal": {
|
|
6703
6725
|
const p = u ? i.width - a : i.width;
|
|
@@ -6711,14 +6733,14 @@ function Hc(e, r, i, a, l, u) {
|
|
|
6711
6733
|
return console.error(`[etudes::RangeSlider] Invalid orientation: ${r}`), NaN;
|
|
6712
6734
|
}
|
|
6713
6735
|
}
|
|
6714
|
-
function
|
|
6736
|
+
function Yc(e, r, i) {
|
|
6715
6737
|
return e * (i - r) + r;
|
|
6716
6738
|
}
|
|
6717
|
-
function
|
|
6718
|
-
const m =
|
|
6719
|
-
return
|
|
6739
|
+
function Po(e, r, i, a, l, u, p, g) {
|
|
6740
|
+
const m = Bc(e, a, l, u, p, g);
|
|
6741
|
+
return Yc(m, r, i);
|
|
6720
6742
|
}
|
|
6721
|
-
function
|
|
6743
|
+
function Xc(e, r, i, a, l, u) {
|
|
6722
6744
|
switch (r) {
|
|
6723
6745
|
case "horizontal": {
|
|
6724
6746
|
const p = u ? i.width - a : i.width;
|
|
@@ -6733,8 +6755,8 @@ function Yc(e, r, i, a, l, u) {
|
|
|
6733
6755
|
}
|
|
6734
6756
|
}
|
|
6735
6757
|
function st(e, r, i, a, l, u, p, g) {
|
|
6736
|
-
const m =
|
|
6737
|
-
return
|
|
6758
|
+
const m = Hc(e, r, i);
|
|
6759
|
+
return Xc(m, a, l, u, p, g);
|
|
6738
6760
|
}
|
|
6739
6761
|
function ko(e, r) {
|
|
6740
6762
|
const i = r.length;
|
|
@@ -6745,7 +6767,7 @@ function ko(e, r) {
|
|
|
6745
6767
|
}
|
|
6746
6768
|
return r[a];
|
|
6747
6769
|
}
|
|
6748
|
-
function
|
|
6770
|
+
function Uc(e, r, i) {
|
|
6749
6771
|
if (!(i < 0))
|
|
6750
6772
|
return [
|
|
6751
6773
|
e,
|
|
@@ -6753,8 +6775,8 @@ function Xc(e, r, i) {
|
|
|
6753
6775
|
r
|
|
6754
6776
|
];
|
|
6755
6777
|
}
|
|
6756
|
-
process.env.NODE_ENV === "development" && (
|
|
6757
|
-
const
|
|
6778
|
+
process.env.NODE_ENV === "development" && (Fc.displayName = "RangeSlider", Qn.displayName = "RangeSliderGutter", Jt.displayName = "RangeSliderLabel", er.displayName = "RangeSliderHighlight", Zt.displayName = "RangeSliderKnob");
|
|
6779
|
+
const Gc = Oe(({
|
|
6758
6780
|
children: e,
|
|
6759
6781
|
id: r,
|
|
6760
6782
|
isRequired: i = !1,
|
|
@@ -6780,10 +6802,10 @@ const Uc = Pe(({
|
|
|
6780
6802
|
required: i,
|
|
6781
6803
|
style: zn.select,
|
|
6782
6804
|
value: p,
|
|
6783
|
-
onChange: (
|
|
6805
|
+
onChange: (O) => g?.(O.target.value),
|
|
6784
6806
|
children: [
|
|
6785
6807
|
u !== void 0 && /* @__PURE__ */ x.jsx(ge, { disabled: !0, hidden: !0, element: _.option ?? /* @__PURE__ */ x.jsx(Qt, {}), value: "", children: u }),
|
|
6786
|
-
l.map((
|
|
6808
|
+
l.map((O, C) => /* @__PURE__ */ x.jsx(ge, { element: _.option ?? /* @__PURE__ */ x.jsx(Qt, {}), value: O, children: O }, `${C}-${O}`))
|
|
6787
6809
|
]
|
|
6788
6810
|
}
|
|
6789
6811
|
),
|
|
@@ -6811,8 +6833,8 @@ const Uc = Pe(({
|
|
|
6811
6833
|
zIndex: 1
|
|
6812
6834
|
}
|
|
6813
6835
|
};
|
|
6814
|
-
process.env.NODE_ENV === "development" && (
|
|
6815
|
-
const
|
|
6836
|
+
process.env.NODE_ENV === "development" && (Gc.displayName = "Select", ii.displayName = "SelectExpandIcon", Qt.displayName = "SelectOption", tr.displayName = "SelectToggle");
|
|
6837
|
+
const qc = /* @__PURE__ */ Oe(({
|
|
6816
6838
|
children: e,
|
|
6817
6839
|
className: r,
|
|
6818
6840
|
isDeselectable: i = !1,
|
|
@@ -6824,7 +6846,7 @@ const Gc = /* @__PURE__ */ Pe(({
|
|
|
6824
6846
|
onToggle: m,
|
|
6825
6847
|
...S
|
|
6826
6848
|
}, _) => {
|
|
6827
|
-
const
|
|
6849
|
+
const O = () => {
|
|
6828
6850
|
if (!a)
|
|
6829
6851
|
if (l) {
|
|
6830
6852
|
if (!i) return;
|
|
@@ -6842,13 +6864,13 @@ const Gc = /* @__PURE__ */ Pe(({
|
|
|
6842
6864
|
"aria-selected": l,
|
|
6843
6865
|
className: se(r, { active: l, disabled: a || l && !i }),
|
|
6844
6866
|
disabled: a || l && !i,
|
|
6845
|
-
onClick:
|
|
6867
|
+
onClick: O,
|
|
6846
6868
|
children: e ?? u
|
|
6847
6869
|
}
|
|
6848
6870
|
);
|
|
6849
6871
|
});
|
|
6850
|
-
process.env.NODE_ENV === "development" && (
|
|
6851
|
-
const
|
|
6872
|
+
process.env.NODE_ENV === "development" && (qc.displayName = "SelectableButton");
|
|
6873
|
+
const Wc = /* @__PURE__ */ Oe(({
|
|
6852
6874
|
children: e,
|
|
6853
6875
|
className: r,
|
|
6854
6876
|
isClipped: i = !1,
|
|
@@ -6860,12 +6882,12 @@ const qc = /* @__PURE__ */ Pe(({
|
|
|
6860
6882
|
onlyDispatchesOnDragEnd: m = !1,
|
|
6861
6883
|
orientation: S = "vertical",
|
|
6862
6884
|
position: _ = 0,
|
|
6863
|
-
trackPadding:
|
|
6885
|
+
trackPadding: O = 0,
|
|
6864
6886
|
labelProvider: C,
|
|
6865
6887
|
onDragEnd: $,
|
|
6866
6888
|
onDragStart: M,
|
|
6867
6889
|
onChange: w,
|
|
6868
|
-
...
|
|
6890
|
+
...I
|
|
6869
6891
|
}, K) => {
|
|
6870
6892
|
const J = Ee(null), Y = Ee(null), q = he((Z, te, ae) => {
|
|
6871
6893
|
const F = xe.from(J.current) ?? xe.zero, T = a ? 1 - Z : Z;
|
|
@@ -6903,7 +6925,7 @@ const qc = /* @__PURE__ */ Pe(({
|
|
|
6903
6925
|
transform: q,
|
|
6904
6926
|
onDragStart: M,
|
|
6905
6927
|
onDragEnd: $
|
|
6906
|
-
}), U = a ? 1 - A : A, X =
|
|
6928
|
+
}), U = a ? 1 - A : A, X = Kc({ orientation: S, isAtEnd: a ? A === 0 : A === 1, isAtStart: a ? A === 1 : A === 0, isDragging: k, isReleasing: N }), L = Jc({ orientation: S, isClipped: i, naturalPosition: U, knobPadding: p, knobHeight: u, knobWidth: g, isTrackInteractive: l });
|
|
6907
6929
|
Ne(() => {
|
|
6908
6930
|
k || _ === A || B(_);
|
|
6909
6931
|
}, [_]), Ne(() => {
|
|
@@ -6920,7 +6942,7 @@ const qc = /* @__PURE__ */ Pe(({
|
|
|
6920
6942
|
return /* @__PURE__ */ x.jsx(
|
|
6921
6943
|
"div",
|
|
6922
6944
|
{
|
|
6923
|
-
...
|
|
6945
|
+
...I,
|
|
6924
6946
|
ref: K,
|
|
6925
6947
|
"aria-orientation": S,
|
|
6926
6948
|
"aria-valuenow": A,
|
|
@@ -6933,11 +6955,11 @@ const qc = /* @__PURE__ */ Pe(({
|
|
|
6933
6955
|
className: se(a ? "end" : "start", X.track),
|
|
6934
6956
|
element: R.track ?? /* @__PURE__ */ x.jsx(en, {}),
|
|
6935
6957
|
style: le(L.track, S === "vertical" ? {
|
|
6936
|
-
height: `calc(${U * 100}% - ${
|
|
6958
|
+
height: `calc(${U * 100}% - ${O <= 0 ? 0 : u * 0.5}px - ${O}px)`,
|
|
6937
6959
|
top: "0"
|
|
6938
6960
|
} : {
|
|
6939
6961
|
left: "0",
|
|
6940
|
-
width: `calc(${U * 100}% - ${
|
|
6962
|
+
width: `calc(${U * 100}% - ${O <= 0 ? 0 : g * 0.5}px - ${O}px)`
|
|
6941
6963
|
}),
|
|
6942
6964
|
onClick: E,
|
|
6943
6965
|
children: /* @__PURE__ */ x.jsx("div", { style: L.trackHitBox })
|
|
@@ -6950,10 +6972,10 @@ const qc = /* @__PURE__ */ Pe(({
|
|
|
6950
6972
|
element: R.track ?? /* @__PURE__ */ x.jsx(en, {}),
|
|
6951
6973
|
style: le(L.track, S === "vertical" ? {
|
|
6952
6974
|
bottom: "0",
|
|
6953
|
-
height: `calc(${(1 - U) * 100}% - ${
|
|
6975
|
+
height: `calc(${(1 - U) * 100}% - ${O <= 0 ? 0 : u * 0.5}px - ${O}px)`
|
|
6954
6976
|
} : {
|
|
6955
6977
|
right: "0",
|
|
6956
|
-
width: `calc(${(1 - U) * 100}% - ${
|
|
6978
|
+
width: `calc(${(1 - U) * 100}% - ${O <= 0 ? 0 : g * 0.5}px - ${O}px)`
|
|
6957
6979
|
}),
|
|
6958
6980
|
onClick: E,
|
|
6959
6981
|
children: /* @__PURE__ */ x.jsx("div", { style: L.trackHitBox })
|
|
@@ -6976,7 +6998,7 @@ const qc = /* @__PURE__ */ Pe(({
|
|
|
6976
6998
|
}
|
|
6977
6999
|
);
|
|
6978
7000
|
}), en = ({ ...e }) => /* @__PURE__ */ x.jsx("div", { ...e }), nr = ({ ...e }) => /* @__PURE__ */ x.jsx("div", { ...e }), rr = ({ ...e }) => /* @__PURE__ */ x.jsx("button", { ...e }), or = ({ ...e }) => /* @__PURE__ */ x.jsx("div", { ...e });
|
|
6979
|
-
function
|
|
7001
|
+
function Kc({ orientation: e = "vertical", isAtEnd: r = !1, isAtStart: i = !1, isDragging: a = !1, isReleasing: l = !1 }) {
|
|
6980
7002
|
return {
|
|
6981
7003
|
root: se(e, {
|
|
6982
7004
|
"at-end": r,
|
|
@@ -7010,7 +7032,7 @@ function Wc({ orientation: e = "vertical", isAtEnd: r = !1, isAtStart: i = !1, i
|
|
|
7010
7032
|
})
|
|
7011
7033
|
};
|
|
7012
7034
|
}
|
|
7013
|
-
function
|
|
7035
|
+
function Jc({ orientation: e = "vertical", isClipped: r = !1, naturalPosition: i = 0, knobPadding: a = 0, knobHeight: l = 0, knobWidth: u = 0, isTrackInteractive: p = !0 }) {
|
|
7014
7036
|
return {
|
|
7015
7037
|
body: {
|
|
7016
7038
|
height: "100%",
|
|
@@ -7075,8 +7097,8 @@ function Kc({ orientation: e = "vertical", isClipped: r = !1, naturalPosition: i
|
|
|
7075
7097
|
}
|
|
7076
7098
|
};
|
|
7077
7099
|
}
|
|
7078
|
-
process.env.NODE_ENV === "development" && (
|
|
7079
|
-
const
|
|
7100
|
+
process.env.NODE_ENV === "development" && (Wc.displayName = "Slider", en.displayName = "SliderTrack", nr.displayName = "SliderKnob", rr.displayName = "SliderKnobContainer", or.displayName = "SliderLabel");
|
|
7101
|
+
const Zc = /* @__PURE__ */ Oe(({
|
|
7080
7102
|
children: e,
|
|
7081
7103
|
className: r,
|
|
7082
7104
|
index: i = 0,
|
|
@@ -7088,18 +7110,18 @@ const Jc = /* @__PURE__ */ Pe(({
|
|
|
7088
7110
|
knobWidth: m = 30,
|
|
7089
7111
|
labelProvider: S,
|
|
7090
7112
|
onlyDispatchesOnDragEnd: _ = !1,
|
|
7091
|
-
orientation:
|
|
7092
|
-
steps: C =
|
|
7113
|
+
orientation: O = "vertical",
|
|
7114
|
+
steps: C = Qc(10),
|
|
7093
7115
|
trackPadding: $ = 0,
|
|
7094
7116
|
onDragEnd: M,
|
|
7095
7117
|
onDragStart: w,
|
|
7096
|
-
onIndexChange:
|
|
7118
|
+
onIndexChange: I,
|
|
7097
7119
|
onPositionChange: K,
|
|
7098
7120
|
...J
|
|
7099
7121
|
}, Y) => {
|
|
7100
7122
|
const q = Ee(null), E = Ee(null), k = nt(q), [N, A] = _e(i), B = he((V, ne, Q) => {
|
|
7101
7123
|
const ee = l ? et(V) : V;
|
|
7102
|
-
switch (
|
|
7124
|
+
switch (O) {
|
|
7103
7125
|
case "horizontal": {
|
|
7104
7126
|
const ue = a ? k.width - m : k.width, pe = ee * ue + ne, be = Gt(pe / ue);
|
|
7105
7127
|
return l ? et(be) : be;
|
|
@@ -7109,9 +7131,9 @@ const Jc = /* @__PURE__ */ Pe(({
|
|
|
7109
7131
|
return l ? et(be) : be;
|
|
7110
7132
|
}
|
|
7111
7133
|
default:
|
|
7112
|
-
return console.error(`[etudes::StepSlider] Invalid orientation: ${
|
|
7134
|
+
return console.error(`[etudes::StepSlider] Invalid orientation: ${O}`), NaN;
|
|
7113
7135
|
}
|
|
7114
|
-
}, [k.width, k.height, a, l, m, p,
|
|
7136
|
+
}, [k.width, k.height, a, l, m, p, O]), { isDragging: U, isReleasing: oe, value: W, setValue: X } = Ct(E, {
|
|
7115
7137
|
initialValue: dt(i, C),
|
|
7116
7138
|
transform: B,
|
|
7117
7139
|
onDragStart: w,
|
|
@@ -7119,9 +7141,9 @@ const Jc = /* @__PURE__ */ Pe(({
|
|
|
7119
7141
|
}), L = he((V) => {
|
|
7120
7142
|
if (!u) return;
|
|
7121
7143
|
const ne = xe.fromViewport();
|
|
7122
|
-
switch (
|
|
7144
|
+
switch (O) {
|
|
7123
7145
|
case "horizontal": {
|
|
7124
|
-
const Q = (V.clientX + ne.left - k.left) / k.width, ee = l ? et(Q) : Q, ue =
|
|
7146
|
+
const Q = (V.clientX + ne.left - k.left) / k.width, ee = l ? et(Q) : Q, ue = Ot(ee, C);
|
|
7125
7147
|
if (ue === N) {
|
|
7126
7148
|
const pe = ee > W ? ue + 1 : ue - 1;
|
|
7127
7149
|
A(Gt(pe, C.length - 1));
|
|
@@ -7130,7 +7152,7 @@ const Jc = /* @__PURE__ */ Pe(({
|
|
|
7130
7152
|
break;
|
|
7131
7153
|
}
|
|
7132
7154
|
case "vertical": {
|
|
7133
|
-
const Q = (V.clientY + ne.top - k.top) / k.height, ee = l ? et(Q) : Q, ue =
|
|
7155
|
+
const Q = (V.clientY + ne.top - k.top) / k.height, ee = l ? et(Q) : Q, ue = Ot(ee, C);
|
|
7134
7156
|
if (ue === N) {
|
|
7135
7157
|
const pe = ee > W ? ue + 1 : ue - 1, be = dt(pe, C);
|
|
7136
7158
|
X(be), A(Gt(pe, C.length - 1));
|
|
@@ -7141,9 +7163,9 @@ const Jc = /* @__PURE__ */ Pe(({
|
|
|
7141
7163
|
break;
|
|
7142
7164
|
}
|
|
7143
7165
|
default:
|
|
7144
|
-
console.error(`[etudes::StepSlider] Invalid orientation: ${
|
|
7166
|
+
console.error(`[etudes::StepSlider] Invalid orientation: ${O}`);
|
|
7145
7167
|
}
|
|
7146
|
-
}, [k.width, k.left, k.top, k.height, N, W, l, u,
|
|
7168
|
+
}, [k.width, k.left, k.top, k.height, N, W, l, u, O, We(C)]), R = l ? et(W) : W, ae = el({ orientation: O, isAtEnd: l ? W === 0 : W === 1, isAtStart: l ? W === 1 : W === 0, isDragging: U, isReleasing: oe }), F = tl({ orientation: O, naturalPosition: R, isClipped: a, knobPadding: g, knobHeight: p, knobWidth: m, isTrackInteractive: u }), T = Le(e, {
|
|
7147
7169
|
knob: ir,
|
|
7148
7170
|
knobContainer: sr,
|
|
7149
7171
|
label: ar,
|
|
@@ -7154,15 +7176,15 @@ const Jc = /* @__PURE__ */ Pe(({
|
|
|
7154
7176
|
}, [i, U, We(C)]), Ne(() => {
|
|
7155
7177
|
if (U) {
|
|
7156
7178
|
if (_) return;
|
|
7157
|
-
A(
|
|
7179
|
+
A(Ot(W, C));
|
|
7158
7180
|
} else {
|
|
7159
|
-
const V =
|
|
7181
|
+
const V = Ot(W, C), ne = dt(V, C);
|
|
7160
7182
|
X(ne), A(V);
|
|
7161
7183
|
}
|
|
7162
7184
|
}, [W, U, _, We(C)]), Ne(() => {
|
|
7163
7185
|
K?.(W, U);
|
|
7164
7186
|
}, [W, U]), Ne(() => {
|
|
7165
|
-
|
|
7187
|
+
I?.(N, U);
|
|
7166
7188
|
}, [N, U]), /* @__PURE__ */ x.jsx(
|
|
7167
7189
|
"div",
|
|
7168
7190
|
{
|
|
@@ -7177,7 +7199,7 @@ const Jc = /* @__PURE__ */ Pe(({
|
|
|
7177
7199
|
{
|
|
7178
7200
|
className: se(l ? "end" : "start", ae.track),
|
|
7179
7201
|
element: T.track ?? /* @__PURE__ */ x.jsx(tn, {}),
|
|
7180
|
-
style: le(F.track,
|
|
7202
|
+
style: le(F.track, O === "vertical" ? {
|
|
7181
7203
|
height: `calc(${R * 100}% - ${$ <= 0 ? 0 : p * 0.5}px - ${$}px)`,
|
|
7182
7204
|
top: "0"
|
|
7183
7205
|
} : {
|
|
@@ -7193,7 +7215,7 @@ const Jc = /* @__PURE__ */ Pe(({
|
|
|
7193
7215
|
{
|
|
7194
7216
|
className: se(l ? "start" : "end", ae.track),
|
|
7195
7217
|
element: T.track ?? /* @__PURE__ */ x.jsx(tn, {}),
|
|
7196
|
-
style: le(F.track,
|
|
7218
|
+
style: le(F.track, O === "vertical" ? {
|
|
7197
7219
|
bottom: "0",
|
|
7198
7220
|
height: `calc(${et(R) * 100}% - ${$ <= 0 ? 0 : p * 0.5}px - ${$}px)`
|
|
7199
7221
|
} : {
|
|
@@ -7213,7 +7235,7 @@ const Jc = /* @__PURE__ */ Pe(({
|
|
|
7213
7235
|
style: le(F.knobContainer),
|
|
7214
7236
|
children: /* @__PURE__ */ x.jsxs(ge, { className: se(ae.knob), element: T.knob ?? /* @__PURE__ */ x.jsx(ir, {}), style: le(F.knob), children: [
|
|
7215
7237
|
/* @__PURE__ */ x.jsx("div", { style: F.knobHitBox }),
|
|
7216
|
-
C && S && /* @__PURE__ */ x.jsx(ge, { className: se(ae.label), element: T.label ?? /* @__PURE__ */ x.jsx(ar, {}), style: le(F.label), children: S(W,
|
|
7238
|
+
C && S && /* @__PURE__ */ x.jsx(ge, { className: se(ae.label), element: T.label ?? /* @__PURE__ */ x.jsx(ar, {}), style: le(F.label), children: S(W, Ot(W, C)) })
|
|
7217
7239
|
] })
|
|
7218
7240
|
}
|
|
7219
7241
|
)
|
|
@@ -7221,7 +7243,7 @@ const Jc = /* @__PURE__ */ Pe(({
|
|
|
7221
7243
|
}
|
|
7222
7244
|
);
|
|
7223
7245
|
}), ir = ({ ...e }) => /* @__PURE__ */ x.jsx("div", { ...e }), sr = ({ ...e }) => /* @__PURE__ */ x.jsx("button", { ...e }), ar = ({ ...e }) => /* @__PURE__ */ x.jsx("div", { ...e }), tn = ({ ...e }) => /* @__PURE__ */ x.jsx("div", { ...e });
|
|
7224
|
-
function
|
|
7246
|
+
function Qc(e) {
|
|
7225
7247
|
if (e <= 1)
|
|
7226
7248
|
return console.error("[etudes::StepSlider] `length` value must be greater than or equal to 2"), [];
|
|
7227
7249
|
if (Math.round(e) !== e)
|
|
@@ -7229,7 +7251,7 @@ function Zc(e) {
|
|
|
7229
7251
|
const r = 1 / (e - 1);
|
|
7230
7252
|
return Array(e).fill(null).map((i, a) => r * a);
|
|
7231
7253
|
}
|
|
7232
|
-
function
|
|
7254
|
+
function Ot(e, r) {
|
|
7233
7255
|
let i = -1, a = NaN;
|
|
7234
7256
|
for (let l = 0, u = r.length; l < u; l++) {
|
|
7235
7257
|
const p = dt(l, r);
|
|
@@ -7242,7 +7264,7 @@ function Pt(e, r) {
|
|
|
7242
7264
|
function dt(e, r) {
|
|
7243
7265
|
return e >= r.length ? NaN : r[e];
|
|
7244
7266
|
}
|
|
7245
|
-
function
|
|
7267
|
+
function el({ orientation: e = "vertical", isAtEnd: r = !1, isAtStart: i = !1, isDragging: a = !1, isReleasing: l = !1 }) {
|
|
7246
7268
|
return {
|
|
7247
7269
|
root: se(e, {
|
|
7248
7270
|
"at-end": r,
|
|
@@ -7276,7 +7298,7 @@ function Qc({ orientation: e = "vertical", isAtEnd: r = !1, isAtStart: i = !1, i
|
|
|
7276
7298
|
})
|
|
7277
7299
|
};
|
|
7278
7300
|
}
|
|
7279
|
-
function
|
|
7301
|
+
function tl({ orientation: e = "vertical", naturalPosition: r = 0, isClipped: i = !1, knobPadding: a = 0, knobHeight: l = 0, knobWidth: u = 0, isTrackInteractive: p = !1 }) {
|
|
7280
7302
|
return {
|
|
7281
7303
|
body: {
|
|
7282
7304
|
height: "100%",
|
|
@@ -7347,8 +7369,8 @@ function et(e) {
|
|
|
7347
7369
|
function Gt(e, r = 1, i = 0) {
|
|
7348
7370
|
return Math.max(i, Math.min(r, e));
|
|
7349
7371
|
}
|
|
7350
|
-
process.env.NODE_ENV === "development" && (
|
|
7351
|
-
const
|
|
7372
|
+
process.env.NODE_ENV === "development" && (Zc.displayName = "StepSlider", tn.displayName = "StepSliderTrack", ir.displayName = "StepSliderKnob", sr.displayName = "StepSliderKnobContainer", ar.displayName = "StepSliderLabel");
|
|
7373
|
+
const nl = /* @__PURE__ */ Oe(({
|
|
7352
7374
|
children: e,
|
|
7353
7375
|
isEnabled: r = !0,
|
|
7354
7376
|
threshold: i = 0.5,
|
|
@@ -7358,16 +7380,16 @@ const tl = /* @__PURE__ */ Pe(({
|
|
|
7358
7380
|
onSwipeUp: p,
|
|
7359
7381
|
...g
|
|
7360
7382
|
}, m) => {
|
|
7361
|
-
const [S, _] = _e(void 0), [
|
|
7383
|
+
const [S, _] = _e(void 0), [O, C] = _e(void 0), [$, M] = _e(NaN), w = (Y, q) => {
|
|
7362
7384
|
if (isNaN(Y) || isNaN(q)) return J();
|
|
7363
|
-
_(
|
|
7364
|
-
},
|
|
7385
|
+
_(Te.make(Y, q));
|
|
7386
|
+
}, I = (Y, q) => {
|
|
7365
7387
|
const E = S;
|
|
7366
7388
|
if (E === void 0) return;
|
|
7367
7389
|
const k = E.x !== Y || E.y !== q, N = !isNaN($);
|
|
7368
|
-
k && (N || M(Date.now()), C(
|
|
7390
|
+
k && (N || M(Date.now()), C(Te.make(Y, q)));
|
|
7369
7391
|
}, K = () => {
|
|
7370
|
-
const Y = $, q = S, E =
|
|
7392
|
+
const Y = $, q = S, E = O;
|
|
7371
7393
|
if (isNaN(Y) || q === void 0 || E === void 0) return;
|
|
7372
7394
|
const k = Date.now() - Y, N = E.x - q.x, A = E.y - q.y, B = N / k, U = A / k;
|
|
7373
7395
|
r && (Math.abs(B) >= i && Math.abs(B) > Math.abs(U) ? B > 0 ? u?.() : l?.() : Math.abs(U) >= i && Math.abs(U) > Math.abs(B) && (U > 0 ? a?.() : p?.())), J();
|
|
@@ -7381,17 +7403,17 @@ const tl = /* @__PURE__ */ Pe(({
|
|
|
7381
7403
|
ref: m,
|
|
7382
7404
|
onMouseDown: (Y) => w(Y.clientX, Y.clientY),
|
|
7383
7405
|
onMouseLeave: () => J(),
|
|
7384
|
-
onMouseMove: (Y) =>
|
|
7406
|
+
onMouseMove: (Y) => I(Y.clientX, Y.clientY),
|
|
7385
7407
|
onMouseUp: () => K(),
|
|
7386
7408
|
onTouchEnd: () => K(),
|
|
7387
|
-
onTouchMove: (Y) =>
|
|
7409
|
+
onTouchMove: (Y) => I(Y.targetTouches[0].clientX, Y.targetTouches[0].clientY),
|
|
7388
7410
|
onTouchStart: (Y) => w(Y.targetTouches[0].clientX, Y.targetTouches[0].clientY),
|
|
7389
7411
|
children: e
|
|
7390
7412
|
}
|
|
7391
7413
|
);
|
|
7392
7414
|
});
|
|
7393
|
-
process.env.NODE_ENV === "development" && (
|
|
7394
|
-
const
|
|
7415
|
+
process.env.NODE_ENV === "development" && (nl.displayName = "SwipeRegion");
|
|
7416
|
+
const rl = Oe(({
|
|
7395
7417
|
onChange: e,
|
|
7396
7418
|
...r
|
|
7397
7419
|
}, i) => /* @__PURE__ */ x.jsx(
|
|
@@ -7402,8 +7424,8 @@ const nl = Pe(({
|
|
|
7402
7424
|
onChange: (a) => e(a.target.value)
|
|
7403
7425
|
}
|
|
7404
7426
|
));
|
|
7405
|
-
process.env.NODE_ENV === "development" && (
|
|
7406
|
-
const
|
|
7427
|
+
process.env.NODE_ENV === "development" && (rl.displayName = "TextArea");
|
|
7428
|
+
const ol = Oe(({
|
|
7407
7429
|
className: e,
|
|
7408
7430
|
children: r,
|
|
7409
7431
|
isInverted: i = !1,
|
|
@@ -7413,23 +7435,23 @@ const rl = Pe(({
|
|
|
7413
7435
|
onChange: p,
|
|
7414
7436
|
...g
|
|
7415
7437
|
}, m) => {
|
|
7416
|
-
const S = Ee(null), _ = Ao(S),
|
|
7438
|
+
const S = Ee(null), _ = Ao(S), O = Le(r, {
|
|
7417
7439
|
knob: lr,
|
|
7418
7440
|
track: cr
|
|
7419
|
-
}), C =
|
|
7441
|
+
}), C = il({ isOn: a }), $ = sl({ isOn: a, isInverted: i, orientation: l, knobSize: _ });
|
|
7420
7442
|
return /* @__PURE__ */ x.jsxs("label", { ...g, ref: m, className: se(e, C.root), style: le(u, $.root), children: [
|
|
7421
7443
|
/* @__PURE__ */ x.jsx("input", { checked: a, style: $.input, type: "checkbox", onChange: (M) => p?.(M.target.checked) }),
|
|
7422
|
-
/* @__PURE__ */ x.jsx(ge, { className: C.track, element:
|
|
7444
|
+
/* @__PURE__ */ x.jsx(ge, { className: C.track, element: O.track ?? /* @__PURE__ */ x.jsx(cr, {}), style: $.track, children: /* @__PURE__ */ x.jsx("div", { style: { position: "relative", width: "100%", height: "100%" }, children: /* @__PURE__ */ x.jsx(ge, { ref: S, className: C.knob, element: O.knob ?? /* @__PURE__ */ x.jsx(lr, {}), style: $.knob }) }) })
|
|
7423
7445
|
] });
|
|
7424
7446
|
}), cr = ({ children: e, ...r }) => /* @__PURE__ */ x.jsx("div", { ...r, children: e }), lr = ({ children: e, ...r }) => /* @__PURE__ */ x.jsx("div", { ...r, children: e });
|
|
7425
|
-
function
|
|
7447
|
+
function il({ isOn: e = !1 }) {
|
|
7426
7448
|
return {
|
|
7427
7449
|
root: se({ active: e }),
|
|
7428
7450
|
knob: se({ active: e }),
|
|
7429
7451
|
track: se({ active: e })
|
|
7430
7452
|
};
|
|
7431
7453
|
}
|
|
7432
|
-
function
|
|
7454
|
+
function sl({ isOn: e = !1, isInverted: r = !1, knobSize: i = je.zero, orientation: a = "horizontal" }) {
|
|
7433
7455
|
return {
|
|
7434
7456
|
root: {
|
|
7435
7457
|
alignItems: "center",
|
|
@@ -7489,8 +7511,8 @@ function il({ isOn: e = !1, isInverted: r = !1, knobSize: i = Ie.zero, orientati
|
|
|
7489
7511
|
}
|
|
7490
7512
|
};
|
|
7491
7513
|
}
|
|
7492
|
-
process.env.NODE_ENV === "development" && (
|
|
7493
|
-
const si = /* @__PURE__ */
|
|
7514
|
+
process.env.NODE_ENV === "development" && (ol.displayName = "Toggle", lr.displayName = "ToggleKnob", cr.displayName = "ToggleTrack");
|
|
7515
|
+
const si = /* @__PURE__ */ Oe(({
|
|
7494
7516
|
children: e,
|
|
7495
7517
|
...r
|
|
7496
7518
|
}, i) => (Array.isArray(e) && console.error(`[etudes::ExtractChild] Only one child is expected, but found ${e.length}. Only the first child is extracted while the rest are discarded.`), an.map(e, (a, l) => {
|
|
@@ -7498,7 +7520,7 @@ const si = /* @__PURE__ */ Pe(({
|
|
|
7498
7520
|
return cn(a) ? hr(a, { ...r, ref: i }) : a;
|
|
7499
7521
|
})));
|
|
7500
7522
|
process.env.NODE_ENV === "development" && (si.displayName = "ExtractChild");
|
|
7501
|
-
function
|
|
7523
|
+
function al({
|
|
7502
7524
|
children: e,
|
|
7503
7525
|
className: r,
|
|
7504
7526
|
style: i,
|
|
@@ -7510,22 +7532,22 @@ function sl({
|
|
|
7510
7532
|
maxWidth: m = 200,
|
|
7511
7533
|
threshold: S = 100
|
|
7512
7534
|
}) {
|
|
7513
|
-
const _ = Ee(null),
|
|
7514
|
-
const
|
|
7515
|
-
|
|
7516
|
-
const K = a ?? (_.current ?
|
|
7517
|
-
Object.keys(q).forEach((k) =>
|
|
7535
|
+
const _ = Ee(null), O = Ee(void 0), C = nt(_), $ = he(() => {
|
|
7536
|
+
const I = window.document.createElement("span");
|
|
7537
|
+
I.className = se(r), I.innerHTML = g, I.role = "tooltip";
|
|
7538
|
+
const K = a ?? (_.current ? ll(_.current, S) : "tl"), J = cl(I), Y = dl({ alignment: K, arrowSize: je.make(u, l), gap: p, maxDialogWidth: m, fullDialogWidth: J.width, targetWidth: C.width }), q = le(i, Y.dialog);
|
|
7539
|
+
Object.keys(q).forEach((k) => I.style[k] = q[k]);
|
|
7518
7540
|
const E = window.document.createElement("span");
|
|
7519
|
-
return Object.keys(Y.arrow).forEach((k) => E.style[k] = Y.arrow[k]),
|
|
7541
|
+
return Object.keys(Y.arrow).forEach((k) => E.style[k] = Y.arrow[k]), I.appendChild(E), I;
|
|
7520
7542
|
}, [r, a, g, m, We(i), C.width, S, l, u, p]), M = he(() => {
|
|
7521
|
-
|
|
7543
|
+
O.current && (O.current.style.opacity = "1", O.current.ariaHidden = "false");
|
|
7522
7544
|
}, []), w = he(() => {
|
|
7523
|
-
|
|
7545
|
+
O.current && (O.current.style.opacity = "0", O.current.ariaHidden = "true");
|
|
7524
7546
|
}, []);
|
|
7525
7547
|
return Ne(() => {
|
|
7526
|
-
const
|
|
7527
|
-
return _.current?.appendChild(
|
|
7528
|
-
_.current?.removeChild(
|
|
7548
|
+
const I = $();
|
|
7549
|
+
return _.current?.appendChild(I), O.current = I, () => {
|
|
7550
|
+
_.current?.removeChild(I), O.current = void 0;
|
|
7529
7551
|
};
|
|
7530
7552
|
}, [$]), /* @__PURE__ */ x.jsx(
|
|
7531
7553
|
si,
|
|
@@ -7537,14 +7559,14 @@ function sl({
|
|
|
7537
7559
|
}
|
|
7538
7560
|
);
|
|
7539
7561
|
}
|
|
7540
|
-
function
|
|
7541
|
-
if (typeof window > "u") return
|
|
7562
|
+
function cl(e) {
|
|
7563
|
+
if (typeof window > "u") return je.zero;
|
|
7542
7564
|
const r = e.cloneNode(!1);
|
|
7543
7565
|
r.innerHTML = e.innerHTML, r.style.visibility = "hidden", r.style.whiteSpace = "pre", window.document.body.appendChild(r);
|
|
7544
7566
|
const i = r.getBoundingClientRect();
|
|
7545
|
-
return window.document.body.removeChild(r),
|
|
7567
|
+
return window.document.body.removeChild(r), je.make(i.width, i.height);
|
|
7546
7568
|
}
|
|
7547
|
-
function
|
|
7569
|
+
function ll(e, r) {
|
|
7548
7570
|
const i = xe.fromViewport(), a = xe.intersecting(e);
|
|
7549
7571
|
if (a) {
|
|
7550
7572
|
const l = a.left - i.left < r, u = i.right - a.right < r, p = a.top - i.top < r, g = i.bottom - a.bottom < r;
|
|
@@ -7558,7 +7580,7 @@ function cl(e, r) {
|
|
|
7558
7580
|
}
|
|
7559
7581
|
return "tc";
|
|
7560
7582
|
}
|
|
7561
|
-
function
|
|
7583
|
+
function ul({ alignment: e, arrowSize: r, fullDialogWidth: i, gap: a, maxDialogWidth: l, targetWidth: u }) {
|
|
7562
7584
|
const p = Math.min(i, l), g = u > p;
|
|
7563
7585
|
switch (e) {
|
|
7564
7586
|
case "tl":
|
|
@@ -7615,7 +7637,7 @@ function ll({ alignment: e, arrowSize: r, fullDialogWidth: i, gap: a, maxDialogW
|
|
|
7615
7637
|
return console.error(`[etudes::WithTooltip] Invalid alignment: ${e}`), {};
|
|
7616
7638
|
}
|
|
7617
7639
|
}
|
|
7618
|
-
function
|
|
7640
|
+
function fl({ alignment: e, arrowSize: r, fullDialogWidth: i, maxDialogWidth: a, targetWidth: l }) {
|
|
7619
7641
|
const u = Math.min(i, a), p = l > u;
|
|
7620
7642
|
switch (e) {
|
|
7621
7643
|
case "tl":
|
|
@@ -7696,7 +7718,7 @@ function ul({ alignment: e, arrowSize: r, fullDialogWidth: i, maxDialogWidth: a,
|
|
|
7696
7718
|
return console.error(`[etudes::WithTooltip] Invalid alignment: ${e}`), {};
|
|
7697
7719
|
}
|
|
7698
7720
|
}
|
|
7699
|
-
function
|
|
7721
|
+
function dl({ alignment: e, arrowSize: r, fullDialogWidth: i, gap: a, maxDialogWidth: l, targetWidth: u }) {
|
|
7700
7722
|
return {
|
|
7701
7723
|
dialog: {
|
|
7702
7724
|
boxSizing: "border-box",
|
|
@@ -7708,19 +7730,19 @@ function fl({ alignment: e, arrowSize: r, fullDialogWidth: i, gap: a, maxDialogW
|
|
|
7708
7730
|
userSelect: "none",
|
|
7709
7731
|
whiteSpace: i > l ? "normal" : "pre",
|
|
7710
7732
|
width: i > l ? `${l}px` : "",
|
|
7711
|
-
...
|
|
7733
|
+
...ul({ alignment: e, arrowSize: r, fullDialogWidth: i, gap: a, maxDialogWidth: l, targetWidth: u })
|
|
7712
7734
|
},
|
|
7713
7735
|
arrow: {
|
|
7714
7736
|
background: "inherit",
|
|
7715
7737
|
position: "absolute",
|
|
7716
|
-
...
|
|
7738
|
+
...fl({ alignment: e, arrowSize: r, fullDialogWidth: i, maxDialogWidth: l, targetWidth: u })
|
|
7717
7739
|
}
|
|
7718
7740
|
};
|
|
7719
7741
|
}
|
|
7720
|
-
process.env.NODE_ENV === "development" && (
|
|
7721
|
-
function
|
|
7722
|
-
const i =
|
|
7723
|
-
|
|
7742
|
+
process.env.NODE_ENV === "development" && (al.displayName = "WithTooltip");
|
|
7743
|
+
function Cl(e, r) {
|
|
7744
|
+
const i = Se(r);
|
|
7745
|
+
Re(() => {
|
|
7724
7746
|
const a = (l) => {
|
|
7725
7747
|
if (!(l.target instanceof Node)) return;
|
|
7726
7748
|
let u = !0, p = l.target;
|
|
@@ -7740,32 +7762,32 @@ function kl(e, r) {
|
|
|
7740
7762
|
};
|
|
7741
7763
|
}, []);
|
|
7742
7764
|
}
|
|
7743
|
-
function
|
|
7744
|
-
return window.getComputedStyle(window.document.documentElement).getPropertyValue(e) || void 0;
|
|
7765
|
+
function pl(e) {
|
|
7766
|
+
return typeof window > "u" ? void 0 : window.getComputedStyle(window.document.documentElement).getPropertyValue(e) || void 0;
|
|
7745
7767
|
}
|
|
7746
|
-
function
|
|
7747
|
-
return
|
|
7768
|
+
function Il(e, r) {
|
|
7769
|
+
return pl(`--color-${e}`) ?? r;
|
|
7748
7770
|
}
|
|
7749
7771
|
function jl(e, { isEnabled: r = !0 } = {}) {
|
|
7750
|
-
|
|
7772
|
+
Re(() => {
|
|
7751
7773
|
if (r)
|
|
7752
7774
|
return window.document.documentElement.classList.add(e), () => {
|
|
7753
7775
|
window.document.documentElement.classList.remove(e);
|
|
7754
7776
|
};
|
|
7755
7777
|
}, [e, r]);
|
|
7756
7778
|
}
|
|
7757
|
-
function
|
|
7758
|
-
|
|
7779
|
+
function $l(e, { isEnabled: r = !0 } = {}) {
|
|
7780
|
+
Re(() => {
|
|
7759
7781
|
if (r)
|
|
7760
7782
|
return window.document.documentElement.style = e, () => {
|
|
7761
7783
|
window.document.documentElement.style = "";
|
|
7762
7784
|
};
|
|
7763
7785
|
}, [e]);
|
|
7764
7786
|
}
|
|
7765
|
-
function
|
|
7787
|
+
function Al() {
|
|
7766
7788
|
return typeof window > "u" ? 1 : window.devicePixelRatio || 1;
|
|
7767
7789
|
}
|
|
7768
|
-
function
|
|
7790
|
+
function Ml(e) {
|
|
7769
7791
|
const [r, i] = _e(!1), a = he((p) => {
|
|
7770
7792
|
p.preventDefault(), p.stopPropagation(), i(!0);
|
|
7771
7793
|
}, []), l = he((p) => {
|
|
@@ -7785,8 +7807,8 @@ function Al(e) {
|
|
|
7785
7807
|
onDrop: u
|
|
7786
7808
|
};
|
|
7787
7809
|
}
|
|
7788
|
-
function
|
|
7789
|
-
const i =
|
|
7810
|
+
function Rl(e, r) {
|
|
7811
|
+
const i = Se(r);
|
|
7790
7812
|
Ne(() => {
|
|
7791
7813
|
const a = (l) => {
|
|
7792
7814
|
l.key === e && i.current?.();
|
|
@@ -7797,32 +7819,32 @@ function Ml(e, r) {
|
|
|
7797
7819
|
}, [e]);
|
|
7798
7820
|
}
|
|
7799
7821
|
const yr = typeof window < "u" ? window.localStorage : void 0;
|
|
7800
|
-
function
|
|
7822
|
+
function hl({ defaultTTL: e = 300 } = {}) {
|
|
7801
7823
|
return {
|
|
7802
|
-
get:
|
|
7824
|
+
get: ml,
|
|
7803
7825
|
invalidate: ai,
|
|
7804
|
-
set: (r, i, a = e) =>
|
|
7826
|
+
set: (r, i, a = e) => vl(r, i, a)
|
|
7805
7827
|
};
|
|
7806
7828
|
}
|
|
7807
7829
|
function ai(e) {
|
|
7808
7830
|
yr?.removeItem(e);
|
|
7809
7831
|
}
|
|
7810
|
-
function
|
|
7832
|
+
function gl(e) {
|
|
7811
7833
|
const { timestamp: r, ttl: i } = e;
|
|
7812
7834
|
return (Date.now() - r) / 1e3 >= i;
|
|
7813
7835
|
}
|
|
7814
|
-
function
|
|
7836
|
+
function ml(e) {
|
|
7815
7837
|
const r = yr?.getItem(e);
|
|
7816
7838
|
if (!r) return;
|
|
7817
7839
|
const i = JSON.parse(r);
|
|
7818
7840
|
if (i)
|
|
7819
|
-
if (
|
|
7841
|
+
if (gl(i)) {
|
|
7820
7842
|
ai(e);
|
|
7821
7843
|
return;
|
|
7822
7844
|
} else
|
|
7823
7845
|
return i.value;
|
|
7824
7846
|
}
|
|
7825
|
-
function
|
|
7847
|
+
function vl(e, r, i) {
|
|
7826
7848
|
const a = {
|
|
7827
7849
|
value: e,
|
|
7828
7850
|
timestamp: Date.now(),
|
|
@@ -7830,69 +7852,69 @@ function ml(e, r, i) {
|
|
|
7830
7852
|
};
|
|
7831
7853
|
return yr?.setItem(r, JSON.stringify(a)), e;
|
|
7832
7854
|
}
|
|
7833
|
-
function
|
|
7834
|
-
return fr(() =>
|
|
7855
|
+
function zl(e) {
|
|
7856
|
+
return fr(() => hl({ defaultTTL: e }), [e]);
|
|
7835
7857
|
}
|
|
7836
|
-
function
|
|
7858
|
+
function Ll() {
|
|
7837
7859
|
const [e, r] = _e(!1);
|
|
7838
7860
|
return Ne(() => (r(!0), () => {
|
|
7839
7861
|
r(!1);
|
|
7840
7862
|
}), []), e;
|
|
7841
7863
|
}
|
|
7842
|
-
function
|
|
7843
|
-
const
|
|
7844
|
-
|
|
7845
|
-
const
|
|
7846
|
-
const
|
|
7847
|
-
|
|
7848
|
-
},
|
|
7849
|
-
|
|
7850
|
-
|
|
7864
|
+
function Fl(e, r = []) {
|
|
7865
|
+
const i = Se(e), a = Ee(void 0), l = Ee(!1);
|
|
7866
|
+
Re(() => {
|
|
7867
|
+
const u = () => {
|
|
7868
|
+
const g = yl();
|
|
7869
|
+
g && (i.current(g, a.current), a.current = g);
|
|
7870
|
+
}, p = () => {
|
|
7871
|
+
l.current || typeof requestAnimationFrame == "function" && (l.current = !0, requestAnimationFrame(() => {
|
|
7872
|
+
u(), l.current = !1;
|
|
7851
7873
|
}));
|
|
7852
7874
|
};
|
|
7853
|
-
return window.addEventListener("scroll",
|
|
7854
|
-
window.removeEventListener("scroll",
|
|
7875
|
+
return window.addEventListener("scroll", p, { passive: !0 }), window.addEventListener("resize", p), window.addEventListener("orientationchange", p), p(), () => {
|
|
7876
|
+
window.removeEventListener("scroll", p), window.removeEventListener("resize", p), window.removeEventListener("orientationchange", p);
|
|
7855
7877
|
};
|
|
7856
|
-
}, []);
|
|
7878
|
+
}, [...r]);
|
|
7857
7879
|
}
|
|
7858
|
-
function
|
|
7880
|
+
function yl() {
|
|
7859
7881
|
const e = xe.fromViewport(), r = xe.clone(e, { x: 0, y: 0 }), i = xe.from(window, { overflow: !0 });
|
|
7860
7882
|
if (!i) return;
|
|
7861
|
-
const a = xe.clone(r, { x: i.width - e.width, y: i.height - e.height }), l =
|
|
7883
|
+
const a = xe.clone(r, { x: i.width - e.width, y: i.height - e.height }), l = Te.make(e.left / a.left, e.top / a.top);
|
|
7862
7884
|
return {
|
|
7863
|
-
minPos:
|
|
7864
|
-
maxPos:
|
|
7865
|
-
pos:
|
|
7885
|
+
minPos: Te.make(r.left, r.top),
|
|
7886
|
+
maxPos: Te.make(a.left, a.top),
|
|
7887
|
+
pos: Te.make(e.left, e.top),
|
|
7866
7888
|
step: l
|
|
7867
7889
|
};
|
|
7868
7890
|
}
|
|
7869
7891
|
const xr = typeof window < "u" ? window.sessionStorage : void 0;
|
|
7870
|
-
function
|
|
7892
|
+
function xl({ defaultTTL: e = 300 } = {}) {
|
|
7871
7893
|
return {
|
|
7872
|
-
get:
|
|
7894
|
+
get: wl,
|
|
7873
7895
|
invalidate: ci,
|
|
7874
|
-
set: (r, i, a = e) =>
|
|
7896
|
+
set: (r, i, a = e) => El(r, i, a)
|
|
7875
7897
|
};
|
|
7876
7898
|
}
|
|
7877
7899
|
function ci(e) {
|
|
7878
7900
|
xr?.removeItem(e);
|
|
7879
7901
|
}
|
|
7880
|
-
function
|
|
7902
|
+
function bl(e) {
|
|
7881
7903
|
const { timestamp: r, ttl: i } = e;
|
|
7882
7904
|
return (Date.now() - r) / 1e3 >= i;
|
|
7883
7905
|
}
|
|
7884
|
-
function
|
|
7906
|
+
function wl(e) {
|
|
7885
7907
|
const r = xr?.getItem(e);
|
|
7886
7908
|
if (!r) return;
|
|
7887
7909
|
const i = JSON.parse(r);
|
|
7888
7910
|
if (i)
|
|
7889
|
-
if (
|
|
7911
|
+
if (bl(i)) {
|
|
7890
7912
|
ci(e);
|
|
7891
7913
|
return;
|
|
7892
7914
|
} else
|
|
7893
7915
|
return i.value;
|
|
7894
7916
|
}
|
|
7895
|
-
function
|
|
7917
|
+
function El(e, r, i) {
|
|
7896
7918
|
const a = {
|
|
7897
7919
|
value: e,
|
|
7898
7920
|
timestamp: Date.now(),
|
|
@@ -7900,14 +7922,14 @@ function wl(e, r, i) {
|
|
|
7900
7922
|
};
|
|
7901
7923
|
return xr?.setItem(r, JSON.stringify(a)), e;
|
|
7902
7924
|
}
|
|
7903
|
-
function
|
|
7904
|
-
return fr(() =>
|
|
7925
|
+
function Dl(e) {
|
|
7926
|
+
return fr(() => xl({ defaultTTL: e }), [e]);
|
|
7905
7927
|
}
|
|
7906
|
-
function
|
|
7928
|
+
function Vl(e, {
|
|
7907
7929
|
autoStarts: r = !0,
|
|
7908
7930
|
onTimeout: i
|
|
7909
7931
|
}, a = []) {
|
|
7910
|
-
const l = Ee(void 0), u =
|
|
7932
|
+
const l = Ee(void 0), u = Se(i), p = he(() => {
|
|
7911
7933
|
l.current !== void 0 && (clearTimeout(l.current), l.current = void 0);
|
|
7912
7934
|
}, []), g = he(() => {
|
|
7913
7935
|
p(), !(e < 0) && (l.current = setTimeout(() => {
|
|
@@ -7916,7 +7938,7 @@ function Dl(e, {
|
|
|
7916
7938
|
}, [e, p]);
|
|
7917
7939
|
return Ne(() => (r && e >= 0 && g(), p), [r, e, g, p, ...a]), { start: g, stop: p };
|
|
7918
7940
|
}
|
|
7919
|
-
function
|
|
7941
|
+
function Nl({ children: e, if: r }) {
|
|
7920
7942
|
switch (typeof r) {
|
|
7921
7943
|
case "function":
|
|
7922
7944
|
return r() ? /* @__PURE__ */ x.jsx(x.Fragment, { children: e }) : /* @__PURE__ */ x.jsx(x.Fragment, {});
|
|
@@ -7924,22 +7946,22 @@ function El({ children: e, if: r }) {
|
|
|
7924
7946
|
return r ? /* @__PURE__ */ x.jsx(x.Fragment, { children: e }) : /* @__PURE__ */ x.jsx(x.Fragment, {});
|
|
7925
7947
|
}
|
|
7926
7948
|
}
|
|
7927
|
-
process.env.NODE_ENV === "development" && (
|
|
7928
|
-
function
|
|
7949
|
+
process.env.NODE_ENV === "development" && (Nl.displayName = "Conditional");
|
|
7950
|
+
function Sl({
|
|
7929
7951
|
children: e,
|
|
7930
7952
|
...r
|
|
7931
7953
|
}) {
|
|
7932
7954
|
return /* @__PURE__ */ x.jsx(x.Fragment, { children: an.map(e, (i) => cn(i) ? hr(i, { ...r }) : i) });
|
|
7933
7955
|
}
|
|
7934
|
-
process.env.NODE_ENV === "development" && (
|
|
7935
|
-
function
|
|
7956
|
+
process.env.NODE_ENV === "development" && (Sl.displayName = "ExtractChildren");
|
|
7957
|
+
function Hl({
|
|
7936
7958
|
children: e,
|
|
7937
7959
|
condition: r
|
|
7938
7960
|
}) {
|
|
7939
7961
|
const i = an.toArray(e);
|
|
7940
7962
|
if (i.length === 0)
|
|
7941
7963
|
return console.error("[etudes::Switch] `Switch` must have at least one child"), /* @__PURE__ */ x.jsx(x.Fragment, {});
|
|
7942
|
-
if (!
|
|
7964
|
+
if (!_l(i))
|
|
7943
7965
|
return console.error("[etudes::Switch] `Switch` children must be of `Case` type or `Default` type"), /* @__PURE__ */ x.jsx(x.Fragment, {});
|
|
7944
7966
|
const a = i.filter((u) => u.type === li);
|
|
7945
7967
|
if (a.length > 1)
|
|
@@ -7954,14 +7976,14 @@ function Vl({
|
|
|
7954
7976
|
if (l)
|
|
7955
7977
|
return l;
|
|
7956
7978
|
}
|
|
7957
|
-
function
|
|
7979
|
+
function Tl({ children: e }) {
|
|
7958
7980
|
return e;
|
|
7959
7981
|
}
|
|
7960
7982
|
function li({ children: e }) {
|
|
7961
7983
|
return e;
|
|
7962
7984
|
}
|
|
7963
|
-
function
|
|
7964
|
-
return e.every((r) => cn(r) && (r.type ===
|
|
7985
|
+
function _l(e) {
|
|
7986
|
+
return e.every((r) => cn(r) && (r.type === Tl || r.type === li));
|
|
7965
7987
|
}
|
|
7966
7988
|
var ur;
|
|
7967
7989
|
((e) => {
|
|
@@ -7970,7 +7992,7 @@ var ur;
|
|
|
7970
7992
|
}
|
|
7971
7993
|
e.toggled = r;
|
|
7972
7994
|
})(ur || (ur = {}));
|
|
7973
|
-
function
|
|
7995
|
+
function Bl({ children: e }) {
|
|
7974
7996
|
const r = () => {
|
|
7975
7997
|
if (typeof window > "u") return "light";
|
|
7976
7998
|
const l = window.localStorage.getItem("color-scheme");
|
|
@@ -7978,26 +8000,26 @@ function Hl({ children: e }) {
|
|
|
7978
8000
|
}, [i, a] = _e(r());
|
|
7979
8001
|
return Ne(() => {
|
|
7980
8002
|
window.localStorage.setItem("color-scheme", i), window.document.documentElement.classList.toggle("dark", i === "dark");
|
|
7981
|
-
}, [i]), /* @__PURE__ */ x.jsx(
|
|
8003
|
+
}, [i]), /* @__PURE__ */ x.jsx(It.Provider, { value: { colorScheme: i, setColorScheme: a }, children: e });
|
|
7982
8004
|
}
|
|
7983
|
-
const
|
|
7984
|
-
function
|
|
7985
|
-
const e = dr(
|
|
8005
|
+
const It = Ts(void 0);
|
|
8006
|
+
function Yl() {
|
|
8007
|
+
const e = dr(It);
|
|
7986
8008
|
return e ? e.colorScheme : "light";
|
|
7987
8009
|
}
|
|
7988
|
-
function
|
|
7989
|
-
const e = dr(
|
|
8010
|
+
function Xl() {
|
|
8011
|
+
const e = dr(It);
|
|
7990
8012
|
return e ? e.setColorScheme : () => {
|
|
7991
8013
|
};
|
|
7992
8014
|
}
|
|
7993
|
-
function
|
|
7994
|
-
const e = dr(
|
|
8015
|
+
function Ul() {
|
|
8016
|
+
const e = dr(It);
|
|
7995
8017
|
return e ? he(() => {
|
|
7996
8018
|
e.setColorScheme((r) => ur.toggled(r));
|
|
7997
8019
|
}, []) : () => {
|
|
7998
8020
|
};
|
|
7999
8021
|
}
|
|
8000
|
-
process.env.NODE_ENV === "development" && (
|
|
8022
|
+
process.env.NODE_ENV === "development" && (It.displayName = "ColorSchemeContext");
|
|
8001
8023
|
function Co(e) {
|
|
8002
8024
|
return e == null ? "" : Array.isArray(e) ? JSON.stringify(e.map(Co)) : typeof e == "object" ? JSON.stringify(Object.entries(e).sort(([r], [i]) => r.localeCompare(i)).map(([r, i]) => [r, Co(i)])) : We(e);
|
|
8003
8025
|
}
|
|
@@ -8014,28 +8036,28 @@ export {
|
|
|
8014
8036
|
Hs as BurgerButtonBar,
|
|
8015
8037
|
Ys as Button,
|
|
8016
8038
|
Js as Carousel,
|
|
8017
|
-
|
|
8039
|
+
Tl as Case,
|
|
8018
8040
|
gr as Collection,
|
|
8019
8041
|
kt as CollectionItem,
|
|
8020
8042
|
ur as ColorScheme,
|
|
8021
|
-
|
|
8022
|
-
|
|
8023
|
-
|
|
8043
|
+
It as ColorSchemeContext,
|
|
8044
|
+
Bl as ColorSchemeProvider,
|
|
8045
|
+
Nl as Conditional,
|
|
8024
8046
|
na as Counter,
|
|
8025
8047
|
Hn as CounterAddButton,
|
|
8026
8048
|
Bn as CounterSubtractButton,
|
|
8027
8049
|
Vn as CounterTextField,
|
|
8028
|
-
|
|
8050
|
+
ca as CoverImage,
|
|
8029
8051
|
Yo as CoverImageContent,
|
|
8030
8052
|
Xo as CoverImageViewport,
|
|
8031
|
-
|
|
8053
|
+
pa as CoverVideo,
|
|
8032
8054
|
Go as CoverVideoContent,
|
|
8033
8055
|
qo as CoverVideoViewport,
|
|
8034
8056
|
li as Default,
|
|
8035
|
-
|
|
8057
|
+
ha as Dial,
|
|
8036
8058
|
Xn as DialKnob,
|
|
8037
8059
|
Yn as DialTrack,
|
|
8038
|
-
|
|
8060
|
+
va as Dropdown,
|
|
8039
8061
|
Wo as DropdownCollapseIcon,
|
|
8040
8062
|
Un as DropdownCollection,
|
|
8041
8063
|
Ko as DropdownExpandIcon,
|
|
@@ -8043,89 +8065,90 @@ export {
|
|
|
8043
8065
|
qn as DropdownToggle,
|
|
8044
8066
|
ln as Each,
|
|
8045
8067
|
si as ExtractChild,
|
|
8046
|
-
|
|
8047
|
-
|
|
8068
|
+
Sl as ExtractChildren,
|
|
8069
|
+
Nc as FlatSVG,
|
|
8048
8070
|
Ho as Image,
|
|
8049
8071
|
on as ImageSource,
|
|
8050
|
-
|
|
8072
|
+
Sc as MasonryGrid,
|
|
8051
8073
|
Pc as OptionButton,
|
|
8052
8074
|
ri as Panorama,
|
|
8053
|
-
|
|
8075
|
+
zc as PanoramaSlider,
|
|
8054
8076
|
Jn as PanoramaSliderIndicator,
|
|
8055
8077
|
Zn as PanoramaSliderReticle,
|
|
8056
8078
|
Kt as PanoramaSliderTrack,
|
|
8057
8079
|
Bo as Picture,
|
|
8058
|
-
|
|
8080
|
+
Fc as RangeSlider,
|
|
8059
8081
|
Qn as RangeSliderGutter,
|
|
8060
8082
|
er as RangeSliderHighlight,
|
|
8061
8083
|
Zt as RangeSliderKnob,
|
|
8062
8084
|
Rn as RangeSliderKnobContainer,
|
|
8063
8085
|
Jt as RangeSliderLabel,
|
|
8064
8086
|
Dn as Repeat,
|
|
8065
|
-
|
|
8087
|
+
Gc as Select,
|
|
8066
8088
|
ii as SelectExpandIcon,
|
|
8067
8089
|
Qt as SelectOption,
|
|
8068
8090
|
tr as SelectToggle,
|
|
8069
|
-
|
|
8070
|
-
|
|
8091
|
+
qc as SelectableButton,
|
|
8092
|
+
Wc as Slider,
|
|
8071
8093
|
nr as SliderKnob,
|
|
8072
8094
|
rr as SliderKnobContainer,
|
|
8073
8095
|
or as SliderLabel,
|
|
8074
8096
|
en as SliderTrack,
|
|
8075
|
-
|
|
8097
|
+
Zc as StepSlider,
|
|
8076
8098
|
ir as StepSliderKnob,
|
|
8077
8099
|
sr as StepSliderKnobContainer,
|
|
8078
8100
|
ar as StepSliderLabel,
|
|
8079
8101
|
tn as StepSliderTrack,
|
|
8080
|
-
|
|
8081
|
-
|
|
8082
|
-
|
|
8102
|
+
nl as SwipeRegion,
|
|
8103
|
+
Hl as Switch,
|
|
8104
|
+
rl as TextArea,
|
|
8083
8105
|
Do as TextField,
|
|
8084
|
-
|
|
8106
|
+
ol as Toggle,
|
|
8085
8107
|
lr as ToggleKnob,
|
|
8086
8108
|
cr as ToggleTrack,
|
|
8087
8109
|
Uo as Video,
|
|
8088
|
-
|
|
8089
|
-
|
|
8110
|
+
al as WithTooltip,
|
|
8111
|
+
kl as asClassNameDict,
|
|
8090
8112
|
Le as asComponentDict,
|
|
8091
8113
|
Pl as asStyleDict,
|
|
8092
8114
|
hr as cloneStyledElement,
|
|
8093
8115
|
We as createKey,
|
|
8094
8116
|
Co as createKeyDeep,
|
|
8095
|
-
|
|
8096
|
-
|
|
8097
|
-
|
|
8117
|
+
hl as createLocalCache,
|
|
8118
|
+
xl as createSessionCache,
|
|
8119
|
+
Qc as generateSteps,
|
|
8098
8120
|
Ws as isTouchDevice,
|
|
8099
8121
|
le as styles,
|
|
8100
|
-
|
|
8101
|
-
|
|
8102
|
-
|
|
8103
|
-
|
|
8104
|
-
|
|
8122
|
+
Il as useCSSColor,
|
|
8123
|
+
pl as useCSSProperty,
|
|
8124
|
+
Cl as useClickOutside,
|
|
8125
|
+
Yl as useColorScheme,
|
|
8126
|
+
Al as useDPR,
|
|
8105
8127
|
jl as useDocumentClassName,
|
|
8106
|
-
|
|
8128
|
+
$l as useDocumentStyle,
|
|
8107
8129
|
Gs as useDrag,
|
|
8108
|
-
|
|
8109
|
-
|
|
8130
|
+
Ml as useDropzone,
|
|
8131
|
+
ia as useImageLoader,
|
|
8110
8132
|
Vo as useImageSize,
|
|
8111
|
-
|
|
8133
|
+
$c as useInertiaDrag,
|
|
8112
8134
|
Ct as useInertiaDragValue,
|
|
8135
|
+
ra as useIntersectionObserver,
|
|
8113
8136
|
qs as useInterval,
|
|
8114
8137
|
Ks as useIsTouchDevice,
|
|
8115
|
-
|
|
8116
|
-
|
|
8117
|
-
|
|
8118
|
-
|
|
8119
|
-
|
|
8138
|
+
Rl as useKeyboardShortcut,
|
|
8139
|
+
Se as useLatest,
|
|
8140
|
+
zl as useLocalCache,
|
|
8141
|
+
Ll as useMounted,
|
|
8142
|
+
Fl as usePosition,
|
|
8120
8143
|
ta as usePrevious,
|
|
8121
8144
|
nt as useRect,
|
|
8122
|
-
|
|
8123
|
-
|
|
8145
|
+
Dl as useSessionCache,
|
|
8146
|
+
Xl as useSetColorScheme,
|
|
8124
8147
|
Ao as useSize,
|
|
8125
8148
|
pr as useSizeObserver,
|
|
8126
|
-
|
|
8127
|
-
|
|
8128
|
-
|
|
8129
|
-
|
|
8130
|
-
|
|
8149
|
+
Vl as useTimeout,
|
|
8150
|
+
Ul as useToggleColorScheme,
|
|
8151
|
+
la as useVideoMetadataLoader,
|
|
8152
|
+
ua as useVideoSize,
|
|
8153
|
+
oa as useViewportSize
|
|
8131
8154
|
};
|