@duro-app/ui 0.5.1 → 0.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/dist/index.js CHANGED
@@ -1,6 +1,8 @@
1
- import { jsx as x, jsxs as H, Fragment as Y } from "react/jsx-runtime";
2
- import { useState as T, useCallback as I, useContext as G, createContext as L, useId as X, useMemo as we, useRef as y, useEffect as W, Children as ye } from "react";
3
- import ke, { Polyline as ee, Path as Me, Circle as Z, Line as xe } from "react-native-svg";
1
+ var Sr = Object.defineProperty;
2
+ var Ar = (r, s, u) => s in r ? Sr(r, s, { enumerable: !0, configurable: !0, writable: !0, value: u }) : r[s] = u;
3
+ var je = (r, s, u) => Ar(r, typeof s != "symbol" ? s + "" : s, u);
4
+ import { jsx as b, jsxs as le, Fragment as Te } from "react/jsx-runtime";
5
+ import Qt, { createElement as qr, useState as ne, useCallback as ee, useContext as de, createContext as me, useId as Se, useMemo as lr, useRef as K, useEffect as te, Children as cr } from "react";
4
6
  /**
5
7
  * @license react-strict-dom
6
8
  * Copyright (c) Meta Platforms, Inc. and affiliates.
@@ -8,81 +10,81 @@ import ke, { Polyline as ee, Path as Me, Circle as Z, Line as xe } from "react-n
8
10
  * This source code is licensed under the MIT license found in the
9
11
  * LICENSE file in the root directory of this source tree.
10
12
  */
11
- var ue = {};
12
- Object.defineProperty(ue, "__esModule", {
13
+ var Bt = {};
14
+ Object.defineProperty(Bt, "__esModule", {
13
15
  value: !0
14
16
  });
15
- var ze = ue.styleq = void 0, Ve = /* @__PURE__ */ new WeakMap(), Ne = "$$css";
16
- function je(e) {
17
- var t, r, n;
18
- return e != null && (t = e.disableCache === !0, r = e.disableMix === !0, n = e.transform), function() {
19
- for (var s = [], i = "", c = null, a = "", l = t ? null : Ve, k = new Array(arguments.length), f = 0; f < arguments.length; f++)
20
- k[f] = arguments[f];
21
- for (; k.length > 0; ) {
22
- var v = k.pop();
23
- if (!(v == null || v === !1)) {
24
- if (Array.isArray(v)) {
25
- for (var w = 0; w < v.length; w++)
26
- k.push(v[w]);
17
+ var ar = Bt.styleq = void 0, Tr = /* @__PURE__ */ new WeakMap(), Er = "$$css";
18
+ function ur(r) {
19
+ var s, u, l;
20
+ return r != null && (s = r.disableCache === !0, u = r.disableMix === !0, l = r.transform), function() {
21
+ for (var e = [], n = "", f = null, h = "", v = s ? null : Tr, w = new Array(arguments.length), M = 0; M < arguments.length; M++)
22
+ w[M] = arguments[M];
23
+ for (; w.length > 0; ) {
24
+ var y = w.pop();
25
+ if (!(y == null || y === !1)) {
26
+ if (Array.isArray(y)) {
27
+ for (var m = 0; m < y.length; m++)
28
+ w.push(y[m]);
27
29
  continue;
28
30
  }
29
- var p = n != null ? n(v) : v;
30
- if (p.$$css != null) {
31
- var $ = "";
32
- if (l != null && l.has(p)) {
33
- var h = l.get(p);
34
- h != null && ($ = h[0], a = h[2], s.push.apply(s, h[1]), l = h[3]);
31
+ var g = l != null ? l(y) : y;
32
+ if (g.$$css != null) {
33
+ var j = "";
34
+ if (v != null && v.has(g)) {
35
+ var A = v.get(g);
36
+ A != null && (j = A[0], h = A[2], e.push.apply(e, A[1]), v = A[3]);
35
37
  } else {
36
- var m = [];
37
- for (var g in p) {
38
- var b = p[g];
39
- if (g === Ne) {
40
- var O = p[g];
41
- O !== !0 && (a = a ? O + "; " + a : O);
38
+ var W = [];
39
+ for (var I in g) {
40
+ var N = g[I];
41
+ if (I === Er) {
42
+ var _ = g[I];
43
+ _ !== !0 && (h = h ? _ + "; " + h : _);
42
44
  continue;
43
45
  }
44
- typeof b == "string" || b === null ? s.includes(g) || (s.push(g), l != null && m.push(g), typeof b == "string" && ($ += $ ? " " + b : b)) : console.error("styleq: ".concat(g, " typeof ").concat(String(b), ' is not "string" or "null".'));
46
+ typeof N == "string" || N === null ? e.includes(I) || (e.push(I), v != null && W.push(I), typeof N == "string" && (j += j ? " " + N : N)) : console.error("styleq: ".concat(I, " typeof ").concat(String(N), ' is not "string" or "null".'));
45
47
  }
46
- if (l != null) {
47
- var q = /* @__PURE__ */ new WeakMap();
48
- l.set(p, [$, m, a, q]), l = q;
48
+ if (v != null) {
49
+ var V = /* @__PURE__ */ new WeakMap();
50
+ v.set(g, [j, W, h, V]), v = V;
49
51
  }
50
52
  }
51
- $ && (i = i ? $ + " " + i : $);
52
- } else if (r)
53
- c == null && (c = {}), c = Object.assign({}, p, c);
53
+ j && (n = n ? j + " " + n : j);
54
+ } else if (u)
55
+ f == null && (f = {}), f = Object.assign({}, g, f);
54
56
  else {
55
- var z = null;
56
- for (var M in p) {
57
- var j = p[M];
58
- j !== void 0 && (s.includes(M) || (j != null && (c == null && (c = {}), z == null && (z = {}), z[M] = j), s.push(M), l = null));
57
+ var G = null;
58
+ for (var X in g) {
59
+ var Y = g[X];
60
+ Y !== void 0 && (e.includes(X) || (Y != null && (f == null && (f = {}), G == null && (G = {}), G[X] = Y), e.push(X), v = null));
59
61
  }
60
- z != null && (c = Object.assign(z, c));
62
+ G != null && (f = Object.assign(G, f));
61
63
  }
62
64
  }
63
65
  }
64
- var V = [i, c, a];
65
- return V;
66
+ var ie = [n, f, h];
67
+ return ie;
66
68
  };
67
69
  }
68
- var Re = ze = ue.styleq = je();
69
- Re.factory = je;
70
- const Le = ze.factory({
70
+ var Ir = ar = Bt.styleq = ur();
71
+ Ir.factory = ur;
72
+ const Rr = ar.factory({
71
73
  disableMix: !0
72
74
  });
73
- function u(...e) {
74
- const [t, r, n] = Le(e), o = {};
75
- if (t != null && t !== "" && (o.className = t), r != null && (o.style = r), n != null && n !== "") {
76
- const s = n.split(";"), i = {};
77
- for (const c of s) {
78
- const a = c.trim(), [l, k] = a.split(":");
79
- k != null && (i[l] = i[l] != null ? `${i[l]},${k}` : k);
80
- }
81
- o["data-style-src"] = Object.keys(i).map((c) => `${c}:${i[c]}`).join("; ");
75
+ function q(...r) {
76
+ const [s, u, l] = Rr(r), a = {};
77
+ if (s != null && s !== "" && (a.className = s), u != null && (a.style = u), l != null && l !== "") {
78
+ const e = l.split(";"), n = {};
79
+ for (const f of e) {
80
+ const h = f.trim(), [v, w] = h.split(":");
81
+ w != null && (n[v] = n[v] != null ? `${n[v]},${w}` : w);
82
+ }
83
+ a["data-style-src"] = Object.keys(n).map((f) => `${f}:${n[f]}`).join("; ");
82
84
  }
83
- return o;
85
+ return a;
84
86
  }
85
- const C = {
87
+ const pe = {
86
88
  block: {
87
89
  kogj98: "x1ghz6dp",
88
90
  kmVPX3: "x1717udv",
@@ -117,17 +119,17 @@ const C = {
117
119
  kHenm0: "x288g5",
118
120
  $$css: !0
119
121
  }
120
- }, Oe = C.inline, De = [C.inlineblock, C.button], Be = C.block, Pe = [C.inlineblock, C.input], Xe = C.inline, Ye = C.block, Ke = C.block, Ue = C.inline, Je = [C.inlineblock, C.textarea], d = {
121
- a: Oe,
122
- button: De,
123
- div: Be,
124
- input: Pe,
125
- label: Xe,
126
- nav: Ye,
127
- p: Ke,
128
- span: Ue,
129
- textarea: Je
130
- }, ve = {
122
+ }, Cr = pe.inline, Wr = [pe.inlineblock, pe.button], Hr = pe.block, Gr = [pe.inlineblock, pe.input], Or = pe.inline, Nr = pe.block, Lr = pe.block, Dr = pe.inline, Pr = [pe.inlineblock, pe.textarea], T = {
123
+ a: Cr,
124
+ button: Wr,
125
+ div: Hr,
126
+ input: Gr,
127
+ label: Or,
128
+ nav: Nr,
129
+ p: Lr,
130
+ span: Dr,
131
+ textarea: Pr
132
+ }, Zt = {
131
133
  base: {
132
134
  kmVPX3: "x9l0hi5",
133
135
  kaIpWk: "x12fpg5d",
@@ -162,13 +164,13 @@ const C = {
162
164
  $$css: !0
163
165
  }
164
166
  };
165
- function Zt({
166
- variant: e = "info",
167
- children: t
167
+ function $s({
168
+ variant: r = "info",
169
+ children: s
168
170
  }) {
169
- return /* @__PURE__ */ x("div", { role: "alert", ...u(d.div, ve.base, ve[e]), children: t });
171
+ return /* @__PURE__ */ b("div", { role: "alert", ...q(T.div, Zt.base, Zt[r]), children: s });
170
172
  }
171
- const te = {
173
+ const lt = {
172
174
  base: {
173
175
  k1xSpc: "x3nfvp2",
174
176
  kGNEyG: "x6s0dn4",
@@ -221,18 +223,18 @@ const te = {
221
223
  kMwMTN: "xhrv3qp",
222
224
  $$css: !0
223
225
  }
224
- }, Qe = {
225
- sm: te.sizeSm,
226
- md: te.sizeMd
226
+ }, Vr = {
227
+ sm: lt.sizeSm,
228
+ md: lt.sizeMd
227
229
  };
228
- function er({
229
- variant: e = "default",
230
- size: t = "md",
231
- children: r
230
+ function ms({
231
+ variant: r = "default",
232
+ size: s = "md",
233
+ children: u
232
234
  }) {
233
- return /* @__PURE__ */ x("span", { ...u(d.span, te.base, Qe[t], te[e]), children: r });
235
+ return /* @__PURE__ */ b("span", { ...q(T.span, lt.base, Vr[s], lt[r]), children: u });
234
236
  }
235
- const U = {
237
+ const He = {
236
238
  base: {
237
239
  k1xSpc: "x3nfvp2",
238
240
  kGNEyG: "x6s0dn4",
@@ -307,22 +309,22 @@ const U = {
307
309
  kkrTdU: "x1h6gzvc",
308
310
  $$css: !0
309
311
  }
310
- }, _e = {
311
- default: U.sizeDefault,
312
- small: U.sizeSmall
312
+ }, Xr = {
313
+ default: He.sizeDefault,
314
+ small: He.sizeSmall
313
315
  };
314
- function tr({
315
- variant: e = "primary",
316
- size: t = "default",
317
- fullWidth: r = !1,
318
- disabled: n = !1,
319
- type: o = "button",
320
- onClick: s,
321
- children: i
316
+ function bs({
317
+ variant: r = "primary",
318
+ size: s = "default",
319
+ fullWidth: u = !1,
320
+ disabled: l = !1,
321
+ type: a = "button",
322
+ onClick: e,
323
+ children: n
322
324
  }) {
323
- return /* @__PURE__ */ x("button", { type: o, disabled: n, onClick: s, ...u(d.button, U.base, _e[t], U[e], r && U.fullWidth, n && U.disabled), children: i });
325
+ return /* @__PURE__ */ b("button", { type: a, disabled: l, onClick: e, ...q(T.button, He.base, Xr[s], He[r], u && He.fullWidth, l && He.disabled), children: n });
324
326
  }
325
- const J = {
327
+ const Ge = {
326
328
  base: {
327
329
  kWkggS: "xdz192t",
328
330
  kMwMTN: "x1q7k5ly",
@@ -379,24 +381,1230 @@ const J = {
379
381
  k1K539: "x94e8gg",
380
382
  $$css: !0
381
383
  }
382
- }, Fe = {
383
- default: J.sizeDefault,
384
- compact: J.sizeCompact,
385
- full: J.sizeFull
384
+ }, Br = {
385
+ default: Ge.sizeDefault,
386
+ compact: Ge.sizeCompact,
387
+ full: Ge.sizeFull
386
388
  };
387
- function rr({
388
- variant: e = "outlined",
389
- size: t = "default",
390
- header: r,
391
- onClick: n,
392
- children: o
389
+ function ws({
390
+ variant: r = "outlined",
391
+ size: s = "default",
392
+ header: u,
393
+ onClick: l,
394
+ children: a
393
395
  }) {
394
- return /* @__PURE__ */ H("div", { onClick: n, ...u(d.div, J.base, J[e], Fe[t]), children: [
395
- r && /* @__PURE__ */ x("div", { ...u(d.div, J.header), children: r }),
396
- o
396
+ return /* @__PURE__ */ le("div", { onClick: l, ...q(T.div, Ge.base, Ge[r], Br[s]), children: [
397
+ u && /* @__PURE__ */ b("div", { ...q(T.div, Ge.header), children: u }),
398
+ a
397
399
  ] });
398
400
  }
399
- const K = {
401
+ const Yr = {}, Fr = {
402
+ Mixin: {}
403
+ }, Ur = (r) => r.replace(/[A-Z]/g, (s) => "-" + s.toLowerCase()), Xt = (r) => {
404
+ if (r && r.nodeType === 1 && typeof r.getBoundingClientRect == "function")
405
+ return r.getBoundingClientRect();
406
+ throw new Error("Can not get boundingClientRect of " + r || "undefined");
407
+ }, Kr = (r, s) => {
408
+ const u = r?.parentNode;
409
+ u && setTimeout(() => {
410
+ const l = Xt(u), {
411
+ height: a,
412
+ left: e,
413
+ top: n,
414
+ width: f
415
+ } = Xt(r), h = e - l.left, v = n - l.top;
416
+ s(h, v, f, a, e, n);
417
+ }, 0);
418
+ };
419
+ function Jr() {
420
+ const r = this.state.touchable.responderID;
421
+ r !== null && Kr(r, this._handleQueryLayout);
422
+ }
423
+ function _r(r) {
424
+ return r.replace("<svg", ~r.indexOf("xmlns") ? "<svg" : '<svg xmlns="http://www.w3.org/2000/svg"').replace(/"/g, "'").replace(/%/g, "%25").replace(/#/g, "%23").replace(/{/g, "%7B").replace(/}/g, "%7D").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/\s+/g, " ");
425
+ }
426
+ const Qr = /* @__PURE__ */ new Set(["stdDeviation", "edgeMode", "kernelMatrix", "kernelUnitLength", "preserveAlpha", "baseFrequency", "targetX", "targetY", "numOctaves", "stitchTiles", "filterUnits", "primitiveUnits", "pathLength", "gradientUnits", "gradientTransform", "spreadMethod", "markerHeight", "markerUnits", "markerWidth", "viewBox", "refX", "refY", "maskContentUnits", "maskUnits", "patternContentUnits", "patternTransform", "patternUnits", "textLength", "lengthAdjust", "startOffset", "clipPathUnits"]), Zr = (r) => Qr.has(r) ? r : Ur(r);
427
+ function xr(r) {
428
+ return !!(r.onPress || r.onPressIn || r.onPressOut || r.onLongPress);
429
+ }
430
+ var Gt, er;
431
+ function en() {
432
+ if (er) return Gt;
433
+ er = 1;
434
+ function r(l, a) {
435
+ function e() {
436
+ this.constructor = l;
437
+ }
438
+ e.prototype = a.prototype, l.prototype = new e();
439
+ }
440
+ function s(l, a, e, n) {
441
+ this.message = l, this.expected = a, this.found = e, this.location = n, this.name = "SyntaxError", typeof Error.captureStackTrace == "function" && Error.captureStackTrace(this, s);
442
+ }
443
+ r(s, Error), s.buildMessage = function(l, a) {
444
+ var e = {
445
+ literal: function(y) {
446
+ return '"' + f(y.text) + '"';
447
+ },
448
+ class: function(y) {
449
+ var m = "", g;
450
+ for (g = 0; g < y.parts.length; g++)
451
+ m += y.parts[g] instanceof Array ? h(y.parts[g][0]) + "-" + h(y.parts[g][1]) : h(y.parts[g]);
452
+ return "[" + (y.inverted ? "^" : "") + m + "]";
453
+ },
454
+ any: function(y) {
455
+ return "any character";
456
+ },
457
+ end: function(y) {
458
+ return "end of input";
459
+ },
460
+ other: function(y) {
461
+ return y.description;
462
+ }
463
+ };
464
+ function n(y) {
465
+ return y.charCodeAt(0).toString(16).toUpperCase();
466
+ }
467
+ function f(y) {
468
+ return y.replace(/\\/g, "\\\\").replace(/"/g, '\\"').replace(/\0/g, "\\0").replace(/\t/g, "\\t").replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/[\x00-\x0F]/g, function(m) {
469
+ return "\\x0" + n(m);
470
+ }).replace(/[\x10-\x1F\x7F-\x9F]/g, function(m) {
471
+ return "\\x" + n(m);
472
+ });
473
+ }
474
+ function h(y) {
475
+ return y.replace(/\\/g, "\\\\").replace(/\]/g, "\\]").replace(/\^/g, "\\^").replace(/-/g, "\\-").replace(/\0/g, "\\0").replace(/\t/g, "\\t").replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/[\x00-\x0F]/g, function(m) {
476
+ return "\\x0" + n(m);
477
+ }).replace(/[\x10-\x1F\x7F-\x9F]/g, function(m) {
478
+ return "\\x" + n(m);
479
+ });
480
+ }
481
+ function v(y) {
482
+ return e[y.type](y);
483
+ }
484
+ function w(y) {
485
+ var m = new Array(y.length), g, j;
486
+ for (g = 0; g < y.length; g++)
487
+ m[g] = v(y[g]);
488
+ if (m.sort(), m.length > 0) {
489
+ for (g = 1, j = 1; g < m.length; g++)
490
+ m[g - 1] !== m[g] && (m[j] = m[g], j++);
491
+ m.length = j;
492
+ }
493
+ switch (m.length) {
494
+ case 1:
495
+ return m[0];
496
+ case 2:
497
+ return m[0] + " or " + m[1];
498
+ default:
499
+ return m.slice(0, -1).join(", ") + ", or " + m[m.length - 1];
500
+ }
501
+ }
502
+ function M(y) {
503
+ return y ? '"' + f(y) + '"' : "end of input";
504
+ }
505
+ return "Expected " + w(l) + " but " + M(a) + " found.";
506
+ };
507
+ function u(l, a) {
508
+ a = a !== void 0 ? a : {};
509
+ var e = {}, n = {
510
+ transformList: oe
511
+ }, f = oe, h = function(t) {
512
+ return t;
513
+ }, v = function(t, i) {
514
+ return U(t, i);
515
+ }, w = "matrix", M = Q("matrix", !1), y = "(", m = Q("(", !1), g = ")", j = Q(")", !1), A = function(t, i, x, d, C, E) {
516
+ return [t, x, C, i, d, E];
517
+ }, W = "translate", I = Q("translate", !1), N = function(t, i) {
518
+ return [1, 0, t, 0, 1, i || 0];
519
+ }, _ = "scale", V = Q("scale", !1), G = function(t, i) {
520
+ return [t, 0, 0, 0, i === null ? t : i, 0];
521
+ }, X = "rotate", Y = Q("rotate", !1), ie = function(t, i) {
522
+ var x = Math.cos(R * t), d = Math.sin(R * t);
523
+ if (i !== null) {
524
+ var C = i[0], E = i[1];
525
+ return [x, -d, x * -C + -d * -E + C, d, x, d * -C + x * -E + E];
526
+ }
527
+ return [x, -d, 0, d, x, 0];
528
+ }, J = "skewX", ae = Q("skewX", !1), ge = function(t) {
529
+ return [1, Math.tan(R * t), 0, 0, 1, 0];
530
+ }, Ae = "skewY", kt = Q("skewY", !1), dt = function(t) {
531
+ return [1, 0, 0, Math.tan(R * t), 1, 0];
532
+ }, pt = function(t) {
533
+ return parseFloat(t.join(""));
534
+ }, gt = function(t) {
535
+ return parseInt(t.join(""));
536
+ }, ht = function(t) {
537
+ return t;
538
+ }, vt = function(t, i) {
539
+ return [t, i];
540
+ }, $t = ",", mt = Q(",", !1), bt = function(t) {
541
+ return t.join("");
542
+ }, wt = function(t) {
543
+ return t.join("");
544
+ }, Je = function(t) {
545
+ return t.join("");
546
+ }, _e = qe("fractionalConstant"), Qe = ".", Ne = Q(".", !1), Ze = function(t, i) {
547
+ return [t ? t.join("") : null, ".", i.join("")].join("");
548
+ }, be = /^[eE]/, yt = ye(["e", "E"], !1, !1), Mt = function(t) {
549
+ return [t[0], t[1], t[2].join("")].join("");
550
+ }, jt = /^[+\-]/, zt = ye(["+", "-"], !1, !1), St = /^[0-9]/, At = ye([["0", "9"]], !1, !1), qt = /^[ \t\r\n]/, Tt = ye([" ", " ", "\r", `
551
+ `], !1, !1), c = 0, Ee = [{
552
+ line: 1,
553
+ column: 1
554
+ }], ue = 0, k = [], O = 0, he;
555
+ if ("startRule" in a) {
556
+ if (!(a.startRule in n))
557
+ throw new Error(`Can't start parsing from rule "` + a.startRule + '".');
558
+ f = n[a.startRule];
559
+ }
560
+ function Q(t, i) {
561
+ return {
562
+ type: "literal",
563
+ text: t,
564
+ ignoreCase: i
565
+ };
566
+ }
567
+ function ye(t, i, x) {
568
+ return {
569
+ type: "class",
570
+ parts: t,
571
+ inverted: i,
572
+ ignoreCase: x
573
+ };
574
+ }
575
+ function z() {
576
+ return {
577
+ type: "end"
578
+ };
579
+ }
580
+ function qe(t) {
581
+ return {
582
+ type: "other",
583
+ description: t
584
+ };
585
+ }
586
+ function et(t) {
587
+ var i = Ee[t], x;
588
+ if (i)
589
+ return i;
590
+ for (x = t - 1; !Ee[x]; )
591
+ x--;
592
+ for (i = Ee[x], i = {
593
+ line: i.line,
594
+ column: i.column
595
+ }; x < t; )
596
+ l.charCodeAt(x) === 10 ? (i.line++, i.column = 1) : i.column++, x++;
597
+ return Ee[t] = i, i;
598
+ }
599
+ function xe(t, i) {
600
+ var x = et(t), d = et(i);
601
+ return {
602
+ start: {
603
+ offset: t,
604
+ line: x.line,
605
+ column: x.column
606
+ },
607
+ end: {
608
+ offset: i,
609
+ line: d.line,
610
+ column: d.column
611
+ }
612
+ };
613
+ }
614
+ function D(t) {
615
+ c < ue || (c > ue && (ue = c, k = []), k.push(t));
616
+ }
617
+ function Et(t, i, x) {
618
+ return new s(s.buildMessage(t, i), t, i, x);
619
+ }
620
+ function oe() {
621
+ var t, i, x, d, C;
622
+ for (t = c, i = [], x = p(); x !== e; )
623
+ i.push(x), x = p();
624
+ if (i !== e)
625
+ if (x = Le(), x === e && (x = null), x !== e) {
626
+ for (d = [], C = p(); C !== e; )
627
+ d.push(C), C = p();
628
+ d !== e ? (i = h(x), t = i) : (c = t, t = e);
629
+ } else
630
+ c = t, t = e;
631
+ else
632
+ c = t, t = e;
633
+ return t;
634
+ }
635
+ function Le() {
636
+ var t, i, x, d;
637
+ if (t = c, i = De(), i !== e) {
638
+ for (x = [], d = fe(); d !== e; )
639
+ x.push(d), d = fe();
640
+ x !== e ? (d = Le(), d !== e ? (i = v(i, d), t = i) : (c = t, t = e)) : (c = t, t = e);
641
+ } else
642
+ c = t, t = e;
643
+ return t === e && (t = De()), t;
644
+ }
645
+ function De() {
646
+ var t;
647
+ return t = H(), t === e && (t = It(), t === e && (t = tt(), t === e && (t = Rt(), t === e && (t = Pe(), t === e && (t = Ct()))))), t;
648
+ }
649
+ function H() {
650
+ var t, i, x, d, C, E, P, L, B, Ie, Ve, Re, Xe, Ce, st, Be, Ye, Me;
651
+ if (t = c, l.substr(c, 6) === w ? (i = w, c += 6) : (i = e, O === 0 && D(M)), i !== e) {
652
+ for (x = [], d = p(); d !== e; )
653
+ x.push(d), d = p();
654
+ if (x !== e)
655
+ if (l.charCodeAt(c) === 40 ? (d = y, c++) : (d = e, O === 0 && D(m)), d !== e) {
656
+ for (C = [], E = p(); E !== e; )
657
+ C.push(E), E = p();
658
+ if (C !== e)
659
+ if (E = re(), E !== e)
660
+ if (P = fe(), P !== e)
661
+ if (L = re(), L !== e)
662
+ if (B = fe(), B !== e)
663
+ if (Ie = re(), Ie !== e)
664
+ if (Ve = fe(), Ve !== e)
665
+ if (Re = re(), Re !== e)
666
+ if (Xe = fe(), Xe !== e)
667
+ if (Ce = re(), Ce !== e)
668
+ if (st = fe(), st !== e)
669
+ if (Be = re(), Be !== e) {
670
+ for (Ye = [], Me = p(); Me !== e; )
671
+ Ye.push(Me), Me = p();
672
+ Ye !== e ? (l.charCodeAt(c) === 41 ? (Me = g, c++) : (Me = e, O === 0 && D(j)), Me !== e ? (i = A(E, L, Ie, Re, Ce, Be), t = i) : (c = t, t = e)) : (c = t, t = e);
673
+ } else
674
+ c = t, t = e;
675
+ else
676
+ c = t, t = e;
677
+ else
678
+ c = t, t = e;
679
+ else
680
+ c = t, t = e;
681
+ else
682
+ c = t, t = e;
683
+ else
684
+ c = t, t = e;
685
+ else
686
+ c = t, t = e;
687
+ else
688
+ c = t, t = e;
689
+ else
690
+ c = t, t = e;
691
+ else
692
+ c = t, t = e;
693
+ else
694
+ c = t, t = e;
695
+ else
696
+ c = t, t = e;
697
+ } else
698
+ c = t, t = e;
699
+ else
700
+ c = t, t = e;
701
+ } else
702
+ c = t, t = e;
703
+ return t;
704
+ }
705
+ function It() {
706
+ var t, i, x, d, C, E, P, L, B;
707
+ if (t = c, l.substr(c, 9) === W ? (i = W, c += 9) : (i = e, O === 0 && D(I)), i !== e) {
708
+ for (x = [], d = p(); d !== e; )
709
+ x.push(d), d = p();
710
+ if (x !== e)
711
+ if (l.charCodeAt(c) === 40 ? (d = y, c++) : (d = e, O === 0 && D(m)), d !== e) {
712
+ for (C = [], E = p(); E !== e; )
713
+ C.push(E), E = p();
714
+ if (C !== e)
715
+ if (E = re(), E !== e)
716
+ if (P = rt(), P === e && (P = null), P !== e) {
717
+ for (L = [], B = p(); B !== e; )
718
+ L.push(B), B = p();
719
+ L !== e ? (l.charCodeAt(c) === 41 ? (B = g, c++) : (B = e, O === 0 && D(j)), B !== e ? (i = N(E, P), t = i) : (c = t, t = e)) : (c = t, t = e);
720
+ } else
721
+ c = t, t = e;
722
+ else
723
+ c = t, t = e;
724
+ else
725
+ c = t, t = e;
726
+ } else
727
+ c = t, t = e;
728
+ else
729
+ c = t, t = e;
730
+ } else
731
+ c = t, t = e;
732
+ return t;
733
+ }
734
+ function tt() {
735
+ var t, i, x, d, C, E, P, L, B;
736
+ if (t = c, l.substr(c, 5) === _ ? (i = _, c += 5) : (i = e, O === 0 && D(V)), i !== e) {
737
+ for (x = [], d = p(); d !== e; )
738
+ x.push(d), d = p();
739
+ if (x !== e)
740
+ if (l.charCodeAt(c) === 40 ? (d = y, c++) : (d = e, O === 0 && D(m)), d !== e) {
741
+ for (C = [], E = p(); E !== e; )
742
+ C.push(E), E = p();
743
+ if (C !== e)
744
+ if (E = re(), E !== e)
745
+ if (P = rt(), P === e && (P = null), P !== e) {
746
+ for (L = [], B = p(); B !== e; )
747
+ L.push(B), B = p();
748
+ L !== e ? (l.charCodeAt(c) === 41 ? (B = g, c++) : (B = e, O === 0 && D(j)), B !== e ? (i = G(E, P), t = i) : (c = t, t = e)) : (c = t, t = e);
749
+ } else
750
+ c = t, t = e;
751
+ else
752
+ c = t, t = e;
753
+ else
754
+ c = t, t = e;
755
+ } else
756
+ c = t, t = e;
757
+ else
758
+ c = t, t = e;
759
+ } else
760
+ c = t, t = e;
761
+ return t;
762
+ }
763
+ function Rt() {
764
+ var t, i, x, d, C, E, P, L, B;
765
+ if (t = c, l.substr(c, 6) === X ? (i = X, c += 6) : (i = e, O === 0 && D(Y)), i !== e) {
766
+ for (x = [], d = p(); d !== e; )
767
+ x.push(d), d = p();
768
+ if (x !== e)
769
+ if (l.charCodeAt(c) === 40 ? (d = y, c++) : (d = e, O === 0 && D(m)), d !== e) {
770
+ for (C = [], E = p(); E !== e; )
771
+ C.push(E), E = p();
772
+ if (C !== e)
773
+ if (E = re(), E !== e)
774
+ if (P = Wt(), P === e && (P = null), P !== e) {
775
+ for (L = [], B = p(); B !== e; )
776
+ L.push(B), B = p();
777
+ L !== e ? (l.charCodeAt(c) === 41 ? (B = g, c++) : (B = e, O === 0 && D(j)), B !== e ? (i = ie(E, P), t = i) : (c = t, t = e)) : (c = t, t = e);
778
+ } else
779
+ c = t, t = e;
780
+ else
781
+ c = t, t = e;
782
+ else
783
+ c = t, t = e;
784
+ } else
785
+ c = t, t = e;
786
+ else
787
+ c = t, t = e;
788
+ } else
789
+ c = t, t = e;
790
+ return t;
791
+ }
792
+ function Pe() {
793
+ var t, i, x, d, C, E, P, L;
794
+ if (t = c, l.substr(c, 5) === J ? (i = J, c += 5) : (i = e, O === 0 && D(ae)), i !== e) {
795
+ for (x = [], d = p(); d !== e; )
796
+ x.push(d), d = p();
797
+ if (x !== e)
798
+ if (l.charCodeAt(c) === 40 ? (d = y, c++) : (d = e, O === 0 && D(m)), d !== e) {
799
+ for (C = [], E = p(); E !== e; )
800
+ C.push(E), E = p();
801
+ if (C !== e)
802
+ if (E = re(), E !== e) {
803
+ for (P = [], L = p(); L !== e; )
804
+ P.push(L), L = p();
805
+ P !== e ? (l.charCodeAt(c) === 41 ? (L = g, c++) : (L = e, O === 0 && D(j)), L !== e ? (i = ge(E), t = i) : (c = t, t = e)) : (c = t, t = e);
806
+ } else
807
+ c = t, t = e;
808
+ else
809
+ c = t, t = e;
810
+ } else
811
+ c = t, t = e;
812
+ else
813
+ c = t, t = e;
814
+ } else
815
+ c = t, t = e;
816
+ return t;
817
+ }
818
+ function Ct() {
819
+ var t, i, x, d, C, E, P, L;
820
+ if (t = c, l.substr(c, 5) === Ae ? (i = Ae, c += 5) : (i = e, O === 0 && D(kt)), i !== e) {
821
+ for (x = [], d = p(); d !== e; )
822
+ x.push(d), d = p();
823
+ if (x !== e)
824
+ if (l.charCodeAt(c) === 40 ? (d = y, c++) : (d = e, O === 0 && D(m)), d !== e) {
825
+ for (C = [], E = p(); E !== e; )
826
+ C.push(E), E = p();
827
+ if (C !== e)
828
+ if (E = re(), E !== e) {
829
+ for (P = [], L = p(); L !== e; )
830
+ P.push(L), L = p();
831
+ P !== e ? (l.charCodeAt(c) === 41 ? (L = g, c++) : (L = e, O === 0 && D(j)), L !== e ? (i = dt(E), t = i) : (c = t, t = e)) : (c = t, t = e);
832
+ } else
833
+ c = t, t = e;
834
+ else
835
+ c = t, t = e;
836
+ } else
837
+ c = t, t = e;
838
+ else
839
+ c = t, t = e;
840
+ } else
841
+ c = t, t = e;
842
+ return t;
843
+ }
844
+ function re() {
845
+ var t, i, x, d;
846
+ return t = c, i = c, x = o(), x === e && (x = null), x !== e ? (d = ce(), d !== e ? (x = [x, d], i = x) : (c = i, i = e)) : (c = i, i = e), i !== e && (i = pt(i)), t = i, t === e && (t = c, i = c, x = o(), x === e && (x = null), x !== e ? (d = Ht(), d !== e ? (x = [x, d], i = x) : (c = i, i = e)) : (c = i, i = e), i !== e && (i = gt(i)), t = i), t;
847
+ }
848
+ function rt() {
849
+ var t, i, x;
850
+ return t = c, i = fe(), i !== e ? (x = re(), x !== e ? (i = ht(x), t = i) : (c = t, t = e)) : (c = t, t = e), t;
851
+ }
852
+ function Wt() {
853
+ var t, i, x, d, C;
854
+ return t = c, i = fe(), i !== e ? (x = re(), x !== e ? (d = fe(), d !== e ? (C = re(), C !== e ? (i = vt(x, C), t = i) : (c = t, t = e)) : (c = t, t = e)) : (c = t, t = e)) : (c = t, t = e), t;
855
+ }
856
+ function fe() {
857
+ var t, i, x, d, C;
858
+ if (t = c, i = [], x = p(), x !== e)
859
+ for (; x !== e; )
860
+ i.push(x), x = p();
861
+ else
862
+ i = e;
863
+ if (i !== e)
864
+ if (x = nt(), x === e && (x = null), x !== e) {
865
+ for (d = [], C = p(); C !== e; )
866
+ d.push(C), C = p();
867
+ d !== e ? (i = [i, x, d], t = i) : (c = t, t = e);
868
+ } else
869
+ c = t, t = e;
870
+ else
871
+ c = t, t = e;
872
+ if (t === e)
873
+ if (t = c, i = nt(), i !== e) {
874
+ for (x = [], d = p(); d !== e; )
875
+ x.push(d), d = p();
876
+ x !== e ? (i = [i, x], t = i) : (c = t, t = e);
877
+ } else
878
+ c = t, t = e;
879
+ return t;
880
+ }
881
+ function nt() {
882
+ var t;
883
+ return l.charCodeAt(c) === 44 ? (t = $t, c++) : (t = e, O === 0 && D(mt)), t;
884
+ }
885
+ function Ht() {
886
+ var t, i;
887
+ return t = c, i = $(), i !== e && (i = bt(i)), t = i, t;
888
+ }
889
+ function ce() {
890
+ var t, i, x, d;
891
+ return t = c, i = c, x = F(), x !== e ? (d = Z(), d === e && (d = null), d !== e ? (x = [x, d], i = x) : (c = i, i = e)) : (c = i, i = e), i !== e && (i = wt(i)), t = i, t === e && (t = c, i = c, x = $(), x !== e ? (d = Z(), d !== e ? (x = [x, d], i = x) : (c = i, i = e)) : (c = i, i = e), i !== e && (i = Je(i)), t = i), t;
892
+ }
893
+ function F() {
894
+ var t, i, x, d;
895
+ return O++, t = c, i = $(), i === e && (i = null), i !== e ? (l.charCodeAt(c) === 46 ? (x = Qe, c++) : (x = e, O === 0 && D(Ne)), x !== e ? (d = $(), d !== e ? (i = Ze(i, d), t = i) : (c = t, t = e)) : (c = t, t = e)) : (c = t, t = e), t === e && (t = c, i = $(), i !== e ? (l.charCodeAt(c) === 46 ? (x = Qe, c++) : (x = e, O === 0 && D(Ne)), x !== e ? (i = Je(i), t = i) : (c = t, t = e)) : (c = t, t = e)), O--, t === e && (i = e, O === 0 && D(_e)), t;
896
+ }
897
+ function Z() {
898
+ var t, i, x, d, C;
899
+ return t = c, i = c, be.test(l.charAt(c)) ? (x = l.charAt(c), c++) : (x = e, O === 0 && D(yt)), x !== e ? (d = o(), d === e && (d = null), d !== e ? (C = $(), C !== e ? (x = [x, d, C], i = x) : (c = i, i = e)) : (c = i, i = e)) : (c = i, i = e), i !== e && (i = Mt(i)), t = i, t;
900
+ }
901
+ function o() {
902
+ var t;
903
+ return jt.test(l.charAt(c)) ? (t = l.charAt(c), c++) : (t = e, O === 0 && D(zt)), t;
904
+ }
905
+ function $() {
906
+ var t, i;
907
+ if (t = [], i = S(), i !== e)
908
+ for (; i !== e; )
909
+ t.push(i), i = S();
910
+ else
911
+ t = e;
912
+ return t;
913
+ }
914
+ function S() {
915
+ var t;
916
+ return St.test(l.charAt(c)) ? (t = l.charAt(c), c++) : (t = e, O === 0 && D(At)), t;
917
+ }
918
+ function p() {
919
+ var t;
920
+ return qt.test(l.charAt(c)) ? (t = l.charAt(c), c++) : (t = e, O === 0 && D(Tt)), t;
921
+ }
922
+ var R = Math.PI / 180;
923
+ function U(t, i) {
924
+ var x = t[0], d = t[1], C = t[2], E = t[3], P = t[4], L = t[5], B = i[0], Ie = i[1], Ve = i[2], Re = i[3], Xe = i[4], Ce = i[5], st = x * B + d * Re, Be = x * Ie + d * Xe, Ye = x * Ve + d * Ce + C, Me = E * B + P * Re, jr = E * Ie + P * Xe, zr = E * Ve + P * Ce + L;
925
+ return [st, Be, Ye, Me, jr, zr];
926
+ }
927
+ if (he = f(), he !== e && c === l.length)
928
+ return he;
929
+ throw he !== e && c < l.length && D(z()), Et(k, ue < l.length ? l.charAt(ue) : null, ue < l.length ? xe(ue, ue + 1) : xe(ue, ue));
930
+ }
931
+ return Gt = {
932
+ SyntaxError: s,
933
+ parse: u
934
+ }, Gt;
935
+ }
936
+ en();
937
+ var Ot, tr;
938
+ function tn() {
939
+ if (tr) return Ot;
940
+ tr = 1;
941
+ function r(a, e) {
942
+ function n() {
943
+ this.constructor = a;
944
+ }
945
+ n.prototype = e.prototype, a.prototype = new n();
946
+ }
947
+ function s(a, e, n, f) {
948
+ var h = Error.call(this, a);
949
+ return Object.setPrototypeOf && Object.setPrototypeOf(h, s.prototype), h.expected = e, h.found = n, h.location = f, h.name = "SyntaxError", h;
950
+ }
951
+ r(s, Error);
952
+ function u(a, e, n) {
953
+ return n = n || " ", a.length > e ? a : (e -= a.length, n += n.repeat(e), a + n.slice(0, e));
954
+ }
955
+ s.prototype.format = function(a) {
956
+ var e = "Error: " + this.message;
957
+ if (this.location) {
958
+ var n = null, f;
959
+ for (f = 0; f < a.length; f++)
960
+ if (a[f].source === this.location.source) {
961
+ n = a[f].text.split(/\r\n|\n|\r/g);
962
+ break;
963
+ }
964
+ var h = this.location.start, v = this.location.source && typeof this.location.source.offset == "function" ? this.location.source.offset(h) : h, w = this.location.source + ":" + v.line + ":" + v.column;
965
+ if (n) {
966
+ var M = this.location.end, y = u("", v.line.toString().length, " "), m = n[h.line - 1], g = h.line === M.line ? M.column : m.length + 1, j = g - h.column || 1;
967
+ e += `
968
+ --> ` + w + `
969
+ ` + y + ` |
970
+ ` + v.line + " | " + m + `
971
+ ` + y + " | " + u("", h.column - 1, " ") + u("", j, "^");
972
+ } else
973
+ e += `
974
+ at ` + w;
975
+ }
976
+ return e;
977
+ }, s.buildMessage = function(a, e) {
978
+ var n = {
979
+ literal: function(m) {
980
+ return '"' + h(m.text) + '"';
981
+ },
982
+ class: function(m) {
983
+ var g = m.parts.map(function(j) {
984
+ return Array.isArray(j) ? v(j[0]) + "-" + v(j[1]) : v(j);
985
+ });
986
+ return "[" + (m.inverted ? "^" : "") + g.join("") + "]";
987
+ },
988
+ any: function() {
989
+ return "any character";
990
+ },
991
+ end: function() {
992
+ return "end of input";
993
+ },
994
+ other: function(m) {
995
+ return m.description;
996
+ }
997
+ };
998
+ function f(m) {
999
+ return m.charCodeAt(0).toString(16).toUpperCase();
1000
+ }
1001
+ function h(m) {
1002
+ return m.replace(/\\/g, "\\\\").replace(/"/g, '\\"').replace(/\0/g, "\\0").replace(/\t/g, "\\t").replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/[\x00-\x0F]/g, function(g) {
1003
+ return "\\x0" + f(g);
1004
+ }).replace(/[\x10-\x1F\x7F-\x9F]/g, function(g) {
1005
+ return "\\x" + f(g);
1006
+ });
1007
+ }
1008
+ function v(m) {
1009
+ return m.replace(/\\/g, "\\\\").replace(/\]/g, "\\]").replace(/\^/g, "\\^").replace(/-/g, "\\-").replace(/\0/g, "\\0").replace(/\t/g, "\\t").replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/[\x00-\x0F]/g, function(g) {
1010
+ return "\\x0" + f(g);
1011
+ }).replace(/[\x10-\x1F\x7F-\x9F]/g, function(g) {
1012
+ return "\\x" + f(g);
1013
+ });
1014
+ }
1015
+ function w(m) {
1016
+ return n[m.type](m);
1017
+ }
1018
+ function M(m) {
1019
+ var g = m.map(w), j, A;
1020
+ if (g.sort(), g.length > 0) {
1021
+ for (j = 1, A = 1; j < g.length; j++)
1022
+ g[j - 1] !== g[j] && (g[A] = g[j], A++);
1023
+ g.length = A;
1024
+ }
1025
+ switch (g.length) {
1026
+ case 1:
1027
+ return g[0];
1028
+ case 2:
1029
+ return g[0] + " or " + g[1];
1030
+ default:
1031
+ return g.slice(0, -1).join(", ") + ", or " + g[g.length - 1];
1032
+ }
1033
+ }
1034
+ function y(m) {
1035
+ return m ? '"' + h(m) + '"' : "end of input";
1036
+ }
1037
+ return "Expected " + M(a) + " but " + y(e) + " found.";
1038
+ };
1039
+ function l(a, e) {
1040
+ e = e !== void 0 ? e : {};
1041
+ var n = {}, f = e.grammarSource, h = {
1042
+ start: tt
1043
+ }, v = tt, w = "matrix(", M = ")", y = "translate(", m = "scale(", g = "rotate(", j = "skewX(", A = "skewY(", W = ".", I = "e", N = /^[ \t\n\r,]/, _ = /^[ \t\n\r]/, V = /^[+\-]/, G = /^[0-9]/, X = oe("transform functions"), Y = oe("transformFunctions"), ie = oe("transform function"), J = oe("matrix"), ae = xe("matrix(", !1), ge = xe(")", !1), Ae = oe("translate"), kt = xe("translate(", !1), dt = oe("scale"), pt = xe("scale(", !1), gt = oe("rotate"), ht = xe("rotate(", !1), vt = oe("x, y"), $t = oe("skewX"), mt = xe("skewX(", !1), bt = oe("skewY"), wt = xe("skewY(", !1), Je = oe("space or comma"), _e = D([" ", " ", `
1044
+ `, "\r", ","], !1, !1), Qe = oe("whitespace"), Ne = D([" ", " ", `
1045
+ `, "\r"], !1, !1), Ze = D(["+", "-"], !1, !1), be = D([["0", "9"]], !1, !1), yt = xe(".", !1), Mt = xe("e", !1), jt = function(o, $) {
1046
+ const S = Array.isArray(o) ? o : [o];
1047
+ return $.forEach((p) => {
1048
+ Array.isArray(p[1]) ? S.push(...p[1]) : S.push(p[1]);
1049
+ }), S;
1050
+ }, zt = function(o, $, S, p, R, U, t, i, x) {
1051
+ return {
1052
+ matrix: [o, $, S, p, R, U, t, i, x]
1053
+ };
1054
+ }, St = function(o, $) {
1055
+ return $ == null ? {
1056
+ translate: o
1057
+ } : {
1058
+ translate: [o, $]
1059
+ };
1060
+ }, At = function(o, $) {
1061
+ return $ == null ? {
1062
+ scale: o
1063
+ } : [{
1064
+ scaleX: o
1065
+ }, {
1066
+ scaleY: $
1067
+ }];
1068
+ }, qt = function(o, $) {
1069
+ return $ !== null ? {
1070
+ rotate: `${o}deg`
1071
+ } : [{
1072
+ rotate: `${o}deg`
1073
+ }];
1074
+ }, Tt = function(o, $) {
1075
+ return [o, $];
1076
+ }, c = function(o) {
1077
+ return [{
1078
+ skewX: `${o}deg`
1079
+ }];
1080
+ }, Ee = function(o) {
1081
+ return [{
1082
+ skewY: `${o}deg`
1083
+ }];
1084
+ }, ue = function() {
1085
+ return parseFloat(et());
1086
+ }, k = e.peg$currPos | 0, O = k, he = [{
1087
+ line: 1,
1088
+ column: 1
1089
+ }], Q = k, ye = e.peg$maxFailExpected || [], z = e.peg$silentFails | 0, qe;
1090
+ if (e.startRule) {
1091
+ if (!(e.startRule in h))
1092
+ throw new Error(`Can't start parsing from rule "` + e.startRule + '".');
1093
+ v = h[e.startRule];
1094
+ }
1095
+ function et() {
1096
+ return a.substring(O, k);
1097
+ }
1098
+ function xe(o, $) {
1099
+ return {
1100
+ type: "literal",
1101
+ text: o,
1102
+ ignoreCase: $
1103
+ };
1104
+ }
1105
+ function D(o, $, S) {
1106
+ return {
1107
+ type: "class",
1108
+ parts: o,
1109
+ inverted: $,
1110
+ ignoreCase: S
1111
+ };
1112
+ }
1113
+ function Et() {
1114
+ return {
1115
+ type: "end"
1116
+ };
1117
+ }
1118
+ function oe(o) {
1119
+ return {
1120
+ type: "other",
1121
+ description: o
1122
+ };
1123
+ }
1124
+ function Le(o) {
1125
+ var $ = he[o], S;
1126
+ if ($)
1127
+ return $;
1128
+ if (o >= he.length)
1129
+ S = he.length - 1;
1130
+ else
1131
+ for (S = o; !he[--S]; )
1132
+ ;
1133
+ for ($ = he[S], $ = {
1134
+ line: $.line,
1135
+ column: $.column
1136
+ }; S < o; )
1137
+ a.charCodeAt(S) === 10 ? ($.line++, $.column = 1) : $.column++, S++;
1138
+ return he[o] = $, $;
1139
+ }
1140
+ function De(o, $, S) {
1141
+ var p = Le(o), R = Le($), U = {
1142
+ source: f,
1143
+ start: {
1144
+ offset: o,
1145
+ line: p.line,
1146
+ column: p.column
1147
+ },
1148
+ end: {
1149
+ offset: $,
1150
+ line: R.line,
1151
+ column: R.column
1152
+ }
1153
+ };
1154
+ return U;
1155
+ }
1156
+ function H(o) {
1157
+ k < Q || (k > Q && (Q = k, ye = []), ye.push(o));
1158
+ }
1159
+ function It(o, $, S) {
1160
+ return new s(s.buildMessage(o, $), o, $, S);
1161
+ }
1162
+ function tt() {
1163
+ var o;
1164
+ return z++, o = Rt(), z--, o === n && z === 0 && H(X), o;
1165
+ }
1166
+ function Rt() {
1167
+ var o, $, S, p, R, U;
1168
+ if (z++, o = k, $ = Pe(), $ !== n) {
1169
+ for (S = [], p = k, R = F(), U = Pe(), U !== n ? (R = [R, U], p = R) : (k = p, p = n); p !== n; )
1170
+ S.push(p), p = k, R = F(), U = Pe(), U !== n ? (R = [R, U], p = R) : (k = p, p = n);
1171
+ O = o, o = jt($, S);
1172
+ } else
1173
+ k = o, o = n;
1174
+ return z--, o === n && ($ = n, z === 0 && H(Y)), o;
1175
+ }
1176
+ function Pe() {
1177
+ var o;
1178
+ return z++, o = Ct(), o === n && (o = re(), o === n && (o = rt(), o === n && (o = Wt(), o === n && (o = nt(), o === n && (o = Ht()))))), z--, o === n && z === 0 && H(ie), o;
1179
+ }
1180
+ function Ct() {
1181
+ var o, $, S, p, R, U, t, i, x, d, C, E;
1182
+ return z++, o = k, F(), a.substr(k, 7) === w ? ($ = w, k += 7) : ($ = n, z === 0 && H(ae)), $ !== n ? (F(), S = Z(), S !== n ? (ce(), p = Z(), p !== n ? (ce(), R = Z(), R !== n ? (ce(), U = Z(), U !== n ? (ce(), t = Z(), t !== n ? (ce(), i = Z(), i !== n ? (ce(), x = Z(), x !== n ? (ce(), d = Z(), d !== n ? (ce(), C = Z(), C !== n ? (F(), a.charCodeAt(k) === 41 ? (E = M, k++) : (E = n, z === 0 && H(ge)), E !== n ? (F(), O = o, o = zt(S, p, R, U, t, i, x, d, C)) : (k = o, o = n)) : (k = o, o = n)) : (k = o, o = n)) : (k = o, o = n)) : (k = o, o = n)) : (k = o, o = n)) : (k = o, o = n)) : (k = o, o = n)) : (k = o, o = n)) : (k = o, o = n)) : (k = o, o = n), z--, o === n && z === 0 && H(J), o;
1183
+ }
1184
+ function re() {
1185
+ var o, $, S, p, R;
1186
+ return z++, o = k, F(), a.substr(k, 10) === y ? ($ = y, k += 10) : ($ = n, z === 0 && H(kt)), $ !== n ? (F(), S = Z(), S !== n ? (ce(), p = Z(), p === n && (p = null), F(), a.charCodeAt(k) === 41 ? (R = M, k++) : (R = n, z === 0 && H(ge)), R !== n ? (F(), O = o, o = St(S, p)) : (k = o, o = n)) : (k = o, o = n)) : (k = o, o = n), z--, o === n && z === 0 && H(Ae), o;
1187
+ }
1188
+ function rt() {
1189
+ var o, $, S, p, R;
1190
+ return z++, o = k, F(), a.substr(k, 6) === m ? ($ = m, k += 6) : ($ = n, z === 0 && H(pt)), $ !== n ? (F(), S = Z(), S !== n ? (ce(), p = Z(), p === n && (p = null), F(), a.charCodeAt(k) === 41 ? (R = M, k++) : (R = n, z === 0 && H(ge)), R !== n ? (F(), O = o, o = At(S, p)) : (k = o, o = n)) : (k = o, o = n)) : (k = o, o = n), z--, o === n && z === 0 && H(dt), o;
1191
+ }
1192
+ function Wt() {
1193
+ var o, $, S, p, R;
1194
+ return z++, o = k, F(), a.substr(k, 7) === g ? ($ = g, k += 7) : ($ = n, z === 0 && H(ht)), $ !== n ? (F(), S = Z(), S !== n ? (p = fe(), p === n && (p = null), F(), a.charCodeAt(k) === 41 ? (R = M, k++) : (R = n, z === 0 && H(ge)), R !== n ? (F(), O = o, o = qt(S, p)) : (k = o, o = n)) : (k = o, o = n)) : (k = o, o = n), z--, o === n && z === 0 && H(gt), o;
1195
+ }
1196
+ function fe() {
1197
+ var o, $, S;
1198
+ return z++, o = k, ce(), $ = Z(), $ !== n ? (ce(), S = Z(), S !== n ? (O = o, o = Tt($, S)) : (k = o, o = n)) : (k = o, o = n), z--, o === n && z === 0 && H(vt), o;
1199
+ }
1200
+ function nt() {
1201
+ var o, $, S, p;
1202
+ return z++, o = k, F(), a.substr(k, 6) === j ? ($ = j, k += 6) : ($ = n, z === 0 && H(mt)), $ !== n ? (F(), S = Z(), S !== n ? (F(), a.charCodeAt(k) === 41 ? (p = M, k++) : (p = n, z === 0 && H(ge)), p !== n ? (F(), O = o, o = c(S)) : (k = o, o = n)) : (k = o, o = n)) : (k = o, o = n), z--, o === n && z === 0 && H($t), o;
1203
+ }
1204
+ function Ht() {
1205
+ var o, $, S, p;
1206
+ return z++, o = k, F(), a.substr(k, 6) === A ? ($ = A, k += 6) : ($ = n, z === 0 && H(wt)), $ !== n ? (F(), S = Z(), S !== n ? (F(), a.charCodeAt(k) === 41 ? (p = M, k++) : (p = n, z === 0 && H(ge)), p !== n ? (F(), O = o, o = Ee(S)) : (k = o, o = n)) : (k = o, o = n)) : (k = o, o = n), z--, o === n && z === 0 && H(bt), o;
1207
+ }
1208
+ function ce() {
1209
+ var o, $;
1210
+ for (z++, o = [], $ = a.charAt(k), N.test($) ? k++ : ($ = n, z === 0 && H(_e)); $ !== n; )
1211
+ o.push($), $ = a.charAt(k), N.test($) ? k++ : ($ = n, z === 0 && H(_e));
1212
+ return z--, $ = n, z === 0 && H(Je), o;
1213
+ }
1214
+ function F() {
1215
+ var o, $;
1216
+ for (z++, o = [], $ = a.charAt(k), _.test($) ? k++ : ($ = n, z === 0 && H(Ne)); $ !== n; )
1217
+ o.push($), $ = a.charAt(k), _.test($) ? k++ : ($ = n, z === 0 && H(Ne));
1218
+ return z--, $ = n, z === 0 && H(Qe), o;
1219
+ }
1220
+ function Z() {
1221
+ var o, $, S, p, R, U, t, i;
1222
+ for (o = k, $ = a.charAt(k), V.test($) ? k++ : ($ = n, z === 0 && H(Ze)), $ === n && ($ = null), S = k, p = [], R = a.charAt(k), G.test(R) ? k++ : (R = n, z === 0 && H(be)); R !== n; )
1223
+ p.push(R), R = a.charAt(k), G.test(R) ? k++ : (R = n, z === 0 && H(be));
1224
+ if (a.charCodeAt(k) === 46 ? (R = W, k++) : (R = n, z === 0 && H(yt)), R !== n) {
1225
+ if (U = [], t = a.charAt(k), G.test(t) ? k++ : (t = n, z === 0 && H(be)), t !== n)
1226
+ for (; t !== n; )
1227
+ U.push(t), t = a.charAt(k), G.test(t) ? k++ : (t = n, z === 0 && H(be));
1228
+ else
1229
+ U = n;
1230
+ U !== n ? (p = [p, R, U], S = p) : (k = S, S = n);
1231
+ } else
1232
+ k = S, S = n;
1233
+ if (S === n)
1234
+ if (S = [], p = a.charAt(k), G.test(p) ? k++ : (p = n, z === 0 && H(be)), p !== n)
1235
+ for (; p !== n; )
1236
+ S.push(p), p = a.charAt(k), G.test(p) ? k++ : (p = n, z === 0 && H(be));
1237
+ else
1238
+ S = n;
1239
+ if (S !== n) {
1240
+ if (p = k, a.charCodeAt(k) === 101 ? (R = I, k++) : (R = n, z === 0 && H(Mt)), R !== n) {
1241
+ if (U = a.charAt(k), V.test(U) ? k++ : (U = n, z === 0 && H(Ze)), U === n && (U = null), t = [], i = a.charAt(k), G.test(i) ? k++ : (i = n, z === 0 && H(be)), i !== n)
1242
+ for (; i !== n; )
1243
+ t.push(i), i = a.charAt(k), G.test(i) ? k++ : (i = n, z === 0 && H(be));
1244
+ else
1245
+ t = n;
1246
+ t !== n ? (R = [R, U, t], p = R) : (k = p, p = n);
1247
+ } else
1248
+ k = p, p = n;
1249
+ p === n && (p = null), O = o, o = ue();
1250
+ } else
1251
+ k = o, o = n;
1252
+ return o;
1253
+ }
1254
+ if (qe = v(), e.peg$library)
1255
+ return (
1256
+ /** @type {any} */
1257
+ {
1258
+ peg$result: qe,
1259
+ peg$currPos: k,
1260
+ peg$FAILED: n,
1261
+ peg$maxFailExpected: ye,
1262
+ peg$maxFailPos: Q
1263
+ }
1264
+ );
1265
+ if (qe !== n && k === a.length)
1266
+ return qe;
1267
+ throw qe !== n && k < a.length && H(Et()), It(ye, Q < a.length ? a.charAt(Q) : null, Q < a.length ? De(Q, Q + 1) : De(Q, Q));
1268
+ }
1269
+ return Ot = {
1270
+ StartRules: ["start"],
1271
+ SyntaxError: s,
1272
+ parse: l
1273
+ }, Ot;
1274
+ }
1275
+ tn();
1276
+ const Nt = (r) => {
1277
+ if (r.endsWith("rad"))
1278
+ return parseFloat(r) * (180 / Math.PI);
1279
+ if (r.endsWith("deg"))
1280
+ return parseFloat(r);
1281
+ };
1282
+ function rn(r) {
1283
+ return r ? r.map((s) => {
1284
+ const [u, l] = Object.entries(s)[0];
1285
+ switch (u) {
1286
+ case "translateX":
1287
+ return `translate(${l}, 0)`;
1288
+ case "translateY":
1289
+ return `translate(0, ${l})`;
1290
+ case "rotate":
1291
+ return `rotate(${Nt(l)})`;
1292
+ case "scale":
1293
+ return `scale(${l})`;
1294
+ case "scaleX":
1295
+ return `scale(${l}, 1)`;
1296
+ case "scaleY":
1297
+ return `scale(1, ${l})`;
1298
+ case "skewX":
1299
+ return `skewX(${Nt(l)})`;
1300
+ case "skewY":
1301
+ return `skewY(${Nt(l)})`;
1302
+ case "matrix":
1303
+ return `matrix(${l.join(", ")})`;
1304
+ default:
1305
+ return "";
1306
+ }
1307
+ }).join(" ") : "";
1308
+ }
1309
+ function Lt(r, s) {
1310
+ const u = [];
1311
+ if (s && u.push(...nn(s)), Array.isArray(r))
1312
+ if (typeof r[0] == "number")
1313
+ u.push(`matrix(${r.join(" ")})`);
1314
+ else {
1315
+ const l = rn(
1316
+ // @ts-expect-error FIXME
1317
+ r
1318
+ ).split(" ");
1319
+ u.push(...l);
1320
+ }
1321
+ else typeof r == "string" && u.push(r);
1322
+ return u.length ? u.join(" ") : void 0;
1323
+ }
1324
+ function nn(r) {
1325
+ const s = [];
1326
+ return r.translate != null && s.push(`translate(${r.translate})`), (r.translateX != null || r.translateY != null) && s.push(`translate(${r.translateX || 0}, ${r.translateY || 0})`), r.scale != null && s.push(`scale(${r.scale})`), (r.scaleX != null || r.scaleY != null) && s.push(`scale(${r.scaleX || 1}, ${r.scaleY || 1})`), r.rotation != null && s.push(`rotate(${r.rotation})`), r.skewX != null && s.push(`skewX(${r.skewX})`), r.skewY != null && s.push(`skewY(${r.skewY})`), s;
1327
+ }
1328
+ function sn(r, s) {
1329
+ return r ? Yr ? [r, s] : (
1330
+ // Compatibility for arrays of styles in plain react web
1331
+ r[Symbol.iterator] ? Object.assign({}, ...r, s) : Object.assign({}, r, s)
1332
+ ) : s;
1333
+ }
1334
+ const on = /^(data:image\/svg\+xml;utf8,)(.*)/;
1335
+ function ln(r) {
1336
+ let s = {};
1337
+ if (typeof r == "number")
1338
+ throw new Error(`Image: asset with ID "${r}" could not be found. Please check the image source or packager.`);
1339
+ if (typeof r == "string" ? s.uri = r : r && !Array.isArray(r) && typeof r.uri == "string" && (s.uri = r.uri), s.uri) {
1340
+ var u;
1341
+ const l = (u = s) === null || u === void 0 || (u = u.uri) === null || u === void 0 ? void 0 : u.match(on);
1342
+ if (l) {
1343
+ const [, a, e] = l, n = encodeURIComponent(e);
1344
+ return s.uri = `${a}${n}`, s;
1345
+ }
1346
+ }
1347
+ return s;
1348
+ }
1349
+ const rr = (r, s = r.props) => {
1350
+ const {
1351
+ transform: u,
1352
+ origin: l,
1353
+ originX: a,
1354
+ originY: e,
1355
+ fontFamily: n,
1356
+ fontSize: f,
1357
+ fontWeight: h,
1358
+ fontStyle: v,
1359
+ style: w,
1360
+ forwardedRef: M,
1361
+ gradientTransform: y,
1362
+ patternTransform: m,
1363
+ onPress: g,
1364
+ ...j
1365
+ } = s, A = {
1366
+ ...xr(s) ? {
1367
+ onStartShouldSetResponder: r.touchableHandleStartShouldSetResponder,
1368
+ onResponderTerminationRequest: r.touchableHandleResponderTerminationRequest,
1369
+ onResponderGrant: r.touchableHandleResponderGrant,
1370
+ onResponderMove: r.touchableHandleResponderMove,
1371
+ onResponderRelease: r.touchableHandleResponderRelease,
1372
+ onResponderTerminate: r.touchableHandleResponderTerminate
1373
+ } : null,
1374
+ ...j
1375
+ };
1376
+ l != null ? A["transform-origin"] = l.toString().replace(",", " ") : (a != null || e != null) && (A["transform-origin"] = `${a || 0} ${e || 0}`);
1377
+ const W = Lt(u, s);
1378
+ W && (A.transform = W);
1379
+ const I = Lt(y);
1380
+ I && (A.gradientTransform = I);
1381
+ const N = Lt(m);
1382
+ N && (A.patternTransform = N), A.ref = (G) => {
1383
+ r.elementRef.current = G, typeof M == "function" ? M(G) : M && (M.current = G);
1384
+ };
1385
+ const _ = {};
1386
+ if (n != null && (_.fontFamily = n), f != null && (_.fontSize = f), h != null && (_.fontWeight = h), v != null && (_.fontStyle = v), A.style = sn(w, _), g !== null && (A.onClick = s.onPress), s.href !== null && s.href !== void 0) {
1387
+ var V;
1388
+ A.href = (V = ln(s.href)) === null || V === void 0 ? void 0 : V.uri;
1389
+ }
1390
+ return A;
1391
+ };
1392
+ function nr(r) {
1393
+ const s = r >> 16 & 255, u = r >> 8 & 255, l = r & 255, e = ((r >> 24 & 255) / 255).toFixed(2);
1394
+ return `rgba(${s},${u},${l},${e})`;
1395
+ }
1396
+ const cn = {
1397
+ top: 20,
1398
+ left: 20,
1399
+ right: 20,
1400
+ bottom: 30
1401
+ }, {
1402
+ Mixin: fr
1403
+ } = Fr, {
1404
+ touchableHandleStartShouldSetResponder: an,
1405
+ touchableHandleResponderTerminationRequest: un,
1406
+ touchableHandleResponderGrant: xn,
1407
+ touchableHandleResponderMove: fn,
1408
+ touchableHandleResponderRelease: kn,
1409
+ touchableHandleResponderTerminate: dn,
1410
+ touchableGetInitialState: pn
1411
+ } = fr, kr = {
1412
+ ...fr,
1413
+ touchableHandleStartShouldSetResponder(r) {
1414
+ const {
1415
+ onStartShouldSetResponder: s
1416
+ } = this.props;
1417
+ return s ? s(r) : an.call(this, r);
1418
+ },
1419
+ touchableHandleResponderTerminationRequest(r) {
1420
+ const {
1421
+ onResponderTerminationRequest: s
1422
+ } = this.props;
1423
+ return s ? s(r) : un.call(this, r);
1424
+ },
1425
+ touchableHandleResponderGrant(r) {
1426
+ const {
1427
+ onResponderGrant: s
1428
+ } = this.props;
1429
+ return s ? s(r) : xn.call(this, r);
1430
+ },
1431
+ touchableHandleResponderMove(r) {
1432
+ const {
1433
+ onResponderMove: s
1434
+ } = this.props;
1435
+ return s ? s(r) : fn.call(this, r);
1436
+ },
1437
+ touchableHandleResponderRelease(r) {
1438
+ const {
1439
+ onResponderRelease: s
1440
+ } = this.props;
1441
+ return s ? s(r) : kn.call(this, r);
1442
+ },
1443
+ touchableHandleResponderTerminate(r) {
1444
+ const {
1445
+ onResponderTerminate: s
1446
+ } = this.props;
1447
+ return s ? s(r) : dn.call(this, r);
1448
+ },
1449
+ touchableHandlePress(r) {
1450
+ const {
1451
+ onPress: s
1452
+ } = this.props;
1453
+ s && s(r);
1454
+ },
1455
+ touchableHandleActivePressIn(r) {
1456
+ const {
1457
+ onPressIn: s
1458
+ } = this.props;
1459
+ s && s(r);
1460
+ },
1461
+ touchableHandleActivePressOut(r) {
1462
+ const {
1463
+ onPressOut: s
1464
+ } = this.props;
1465
+ s && s(r);
1466
+ },
1467
+ touchableHandleLongPress(r) {
1468
+ const {
1469
+ onLongPress: s
1470
+ } = this.props;
1471
+ s && s(r);
1472
+ },
1473
+ touchableGetPressRectOffset() {
1474
+ const {
1475
+ pressRetentionOffset: r
1476
+ } = this.props;
1477
+ return r || cn;
1478
+ },
1479
+ touchableGetHitSlop() {
1480
+ const {
1481
+ hitSlop: r
1482
+ } = this.props;
1483
+ return r;
1484
+ },
1485
+ touchableGetHighlightDelayMS() {
1486
+ const {
1487
+ delayPressIn: r
1488
+ } = this.props;
1489
+ return r || 0;
1490
+ },
1491
+ touchableGetLongPressDelayMS() {
1492
+ const {
1493
+ delayLongPress: r
1494
+ } = this.props;
1495
+ return r === 0 ? 0 : r || 500;
1496
+ },
1497
+ touchableGetPressOutDelayMS() {
1498
+ const {
1499
+ delayPressOut: r
1500
+ } = this.props;
1501
+ return r || 0;
1502
+ }
1503
+ }, Yt = Object.keys(kr), gn = Yt.map((r) => kr[r]), hn = Yt.length, vn = (r) => {
1504
+ for (let s = 0; s < hn; s++) {
1505
+ const u = Yt[s], l = gn[s];
1506
+ typeof l == "function" ? r[u] = l.bind(r) : r[u] = l;
1507
+ }
1508
+ r.state = pn();
1509
+ };
1510
+ class Ue extends Qt.Component {
1511
+ constructor(u) {
1512
+ super(u);
1513
+ je(this, "elementRef", /* @__PURE__ */ Qt.createRef());
1514
+ je(this, "lastMergedProps", {});
1515
+ xr(u) && vn(this), this._remeasureMetricsOnActivation = Jr.bind(this);
1516
+ }
1517
+ prepareProps(u) {
1518
+ return u;
1519
+ }
1520
+ /**
1521
+ * disclaimer: I am not sure why the props are wrapped in a `style` attribute here, but that's how reanimated calls it
1522
+ */
1523
+ setNativeProps(u) {
1524
+ const l = Object.assign({}, this.props, this.lastMergedProps, u.style);
1525
+ this.lastMergedProps = l;
1526
+ const a = rr(this, this.prepareProps(l)), e = this.elementRef.current;
1527
+ if (e)
1528
+ for (const n of Object.keys(a)) {
1529
+ const f = a[n];
1530
+ switch (n) {
1531
+ case "ref":
1532
+ case "children":
1533
+ break;
1534
+ case "style":
1535
+ for (const h of [].concat(a.style ?? []))
1536
+ Object.assign(e.style, h);
1537
+ break;
1538
+ case "fill":
1539
+ if (f && typeof f == "object") {
1540
+ const h = f;
1541
+ e.setAttribute("fill", nr(h.payload));
1542
+ }
1543
+ break;
1544
+ case "stroke":
1545
+ if (f && typeof f == "object") {
1546
+ const h = f;
1547
+ e.setAttribute("stroke", nr(h.payload));
1548
+ }
1549
+ break;
1550
+ default:
1551
+ e.setAttribute(Zr(n), f);
1552
+ break;
1553
+ }
1554
+ }
1555
+ }
1556
+ render() {
1557
+ if (!this.tag)
1558
+ throw new Error("When extending `WebShape` you need to overwrite either `tag` or `render`!");
1559
+ return this.lastMergedProps = {}, qr(this.tag, rr(this, this.prepareProps(this.props)));
1560
+ }
1561
+ }
1562
+ class it extends Ue {
1563
+ constructor() {
1564
+ super(...arguments);
1565
+ je(this, "tag", "circle");
1566
+ }
1567
+ }
1568
+ class Dt extends Ue {
1569
+ constructor() {
1570
+ super(...arguments);
1571
+ je(this, "tag", "line");
1572
+ }
1573
+ }
1574
+ class dr extends Ue {
1575
+ constructor() {
1576
+ super(...arguments);
1577
+ je(this, "tag", "path");
1578
+ }
1579
+ }
1580
+ class ot extends Ue {
1581
+ constructor() {
1582
+ super(...arguments);
1583
+ je(this, "tag", "polyline");
1584
+ }
1585
+ }
1586
+ class Ft extends Ue {
1587
+ constructor() {
1588
+ super(...arguments);
1589
+ je(this, "tag", "svg");
1590
+ }
1591
+ toDataURL(u, l = {}) {
1592
+ const a = this.elementRef.current;
1593
+ if (a === null)
1594
+ return;
1595
+ const e = Xt(a), n = Number(l.width) || e.width, f = Number(l.height) || e.height, h = document.createElementNS("http://www.w3.org/2000/svg", "svg");
1596
+ h.setAttribute("viewBox", `0 0 ${e.width} ${e.height}`), h.setAttribute("width", String(n)), h.setAttribute("height", String(f)), h.appendChild(a.cloneNode(!0));
1597
+ const v = new window.Image();
1598
+ v.onload = () => {
1599
+ const w = document.createElement("canvas");
1600
+ w.width = n, w.height = f;
1601
+ const M = w.getContext("2d");
1602
+ M?.drawImage(v, 0, 0), u(w.toDataURL().replace("data:image/png;base64,", ""));
1603
+ }, v.src = `data:image/svg+xml;utf8,${_r(new window.XMLSerializer().serializeToString(h))}`;
1604
+ }
1605
+ }
1606
+ console.error.bind(console);
1607
+ const We = {
400
1608
  root: {
401
1609
  k1xSpc: "x3nfvp2",
402
1610
  kGNEyG: "x6s0dn4",
@@ -446,25 +1654,25 @@ const K = {
446
1654
  $$css: !0
447
1655
  }
448
1656
  };
449
- function nr({
450
- name: e,
451
- value: t,
452
- checked: r,
453
- defaultChecked: n = !1,
454
- disabled: o = !1,
455
- onChange: s,
456
- children: i
1657
+ function ys({
1658
+ name: r,
1659
+ value: s,
1660
+ checked: u,
1661
+ defaultChecked: l = !1,
1662
+ disabled: a = !1,
1663
+ onChange: e,
1664
+ children: n
457
1665
  }) {
458
- const c = r !== void 0, [a, l] = T(n), k = c ? r : a, f = I((v) => {
459
- c || l(v.target.checked), s?.(v);
460
- }, [c, s]);
461
- return /* @__PURE__ */ H("label", { ...u(d.label, K.root, o && K.rootDisabled), children: [
462
- /* @__PURE__ */ x("input", { type: "checkbox", name: e, value: t, checked: c ? r : void 0, defaultChecked: c ? void 0 : n, disabled: o, onChange: f, ...u(d.input, K.input), dir: "auto" }),
463
- /* @__PURE__ */ x("span", { ...u(d.span, K.box, k ? K.boxChecked : K.boxUnchecked), "aria-hidden": !0, children: k && /* @__PURE__ */ x(ke, { width: 12, height: 12, viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ x(ee, { points: "2.5 6 5 8.5 9.5 3.5", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" }) }) }),
464
- i && /* @__PURE__ */ x("span", { ...u(d.span), children: i })
1666
+ const f = u !== void 0, [h, v] = ne(l), w = f ? u : h, M = ee((y) => {
1667
+ f || v(y.target.checked), e?.(y);
1668
+ }, [f, e]);
1669
+ return /* @__PURE__ */ le("label", { ...q(T.label, We.root, a && We.rootDisabled), children: [
1670
+ /* @__PURE__ */ b("input", { type: "checkbox", name: r, value: s, checked: f ? u : void 0, defaultChecked: f ? void 0 : l, disabled: a, onChange: M, ...q(T.input, We.input), dir: "auto" }),
1671
+ /* @__PURE__ */ b("span", { ...q(T.span, We.box, w ? We.boxChecked : We.boxUnchecked), "aria-hidden": !0, children: w && /* @__PURE__ */ b(Ft, { width: 12, height: 12, viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ b(ot, { points: "2.5 6 5 8.5 9.5 3.5", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" }) }) }),
1672
+ n && /* @__PURE__ */ b("span", { ...q(T.span), children: n })
465
1673
  ] });
466
1674
  }
467
- const ie = {
1675
+ const Pt = {
468
1676
  root: {
469
1677
  k1xSpc: "x78zum5",
470
1678
  kXwgrk: "xdt5ytf",
@@ -487,22 +1695,22 @@ const ie = {
487
1695
  $$css: !0
488
1696
  }
489
1697
  };
490
- function or({
491
- message: e,
492
- icon: t,
493
- action: r
1698
+ function Ms({
1699
+ message: r,
1700
+ icon: s,
1701
+ action: u
494
1702
  }) {
495
- return /* @__PURE__ */ H("div", { ...u(d.div, ie.root), children: [
496
- t,
497
- /* @__PURE__ */ x("p", { ...u(d.p, ie.message), children: e }),
498
- r && /* @__PURE__ */ x("div", { ...u(d.div, ie.action), children: r })
1703
+ return /* @__PURE__ */ le("div", { ...q(T.div, Pt.root), children: [
1704
+ s,
1705
+ /* @__PURE__ */ b("p", { ...q(T.p, Pt.message), children: r }),
1706
+ u && /* @__PURE__ */ b("div", { ...q(T.div, Pt.action), children: u })
499
1707
  ] });
500
1708
  }
501
- const qe = L(null);
502
- function F() {
503
- return G(qe);
1709
+ const pr = me(null);
1710
+ function Ke() {
1711
+ return de(pr);
504
1712
  }
505
- const re = {
1713
+ const ct = {
506
1714
  root: {
507
1715
  k1xSpc: "x78zum5",
508
1716
  kXwgrk: "xdt5ytf",
@@ -526,42 +1734,42 @@ const re = {
526
1734
  $$css: !0
527
1735
  }
528
1736
  };
529
- function Ze({
530
- invalid: e = !1,
531
- children: t
1737
+ function $n({
1738
+ invalid: r = !1,
1739
+ children: s
532
1740
  }) {
533
- const r = X(), n = we(() => ({
534
- controlId: `${r}-control`,
535
- descriptionId: `${r}-description`,
536
- errorId: `${r}-error`,
537
- invalid: e
538
- }), [r, e]);
539
- return /* @__PURE__ */ x(qe.Provider, { value: n, children: /* @__PURE__ */ x("div", { ...u(d.div, re.root), children: t }) });
540
- }
541
- function et({
542
- children: e
1741
+ const u = Se(), l = lr(() => ({
1742
+ controlId: `${u}-control`,
1743
+ descriptionId: `${u}-description`,
1744
+ errorId: `${u}-error`,
1745
+ invalid: r
1746
+ }), [u, r]);
1747
+ return /* @__PURE__ */ b(pr.Provider, { value: l, children: /* @__PURE__ */ b("div", { ...q(T.div, ct.root), children: s }) });
1748
+ }
1749
+ function mn({
1750
+ children: r
543
1751
  }) {
544
- const t = F();
545
- return /* @__PURE__ */ x("label", { htmlFor: t?.controlId, ...u(d.label, re.label), children: e });
1752
+ const s = Ke();
1753
+ return /* @__PURE__ */ b("label", { htmlFor: s?.controlId, ...q(T.label, ct.label), children: r });
546
1754
  }
547
- function tt({
548
- children: e
1755
+ function bn({
1756
+ children: r
549
1757
  }) {
550
- const t = F();
551
- return /* @__PURE__ */ x("span", { id: t?.descriptionId, ...u(d.span, re.description), children: e });
1758
+ const s = Ke();
1759
+ return /* @__PURE__ */ b("span", { id: s?.descriptionId, ...q(T.span, ct.description), children: r });
552
1760
  }
553
- function rt({
554
- children: e
1761
+ function wn({
1762
+ children: r
555
1763
  }) {
556
- const t = F();
557
- return !t?.invalid && !e ? null : /* @__PURE__ */ x("span", { id: t?.errorId, role: "alert", ...u(d.span, re.error), children: e });
558
- }
559
- const sr = {
560
- Root: Ze,
561
- Label: et,
562
- Description: tt,
563
- Error: rt
564
- }, $e = {
1764
+ const s = Ke();
1765
+ return !s?.invalid && !r ? null : /* @__PURE__ */ b("span", { id: s?.errorId, role: "alert", ...q(T.span, ct.error), children: r });
1766
+ }
1767
+ const js = {
1768
+ Root: $n,
1769
+ Label: mn,
1770
+ Description: bn,
1771
+ Error: wn
1772
+ }, sr = {
565
1773
  base: {
566
1774
  kzqmXN: "xh8yej3",
567
1775
  kLKAdn: "x1g9jjt5",
@@ -594,26 +1802,26 @@ const sr = {
594
1802
  $$css: !0
595
1803
  }
596
1804
  };
597
- function cr({
598
- variant: e = "default",
599
- type: t = "text",
600
- name: r,
601
- placeholder: n,
602
- required: o,
603
- minLength: s,
604
- pattern: i,
605
- autoComplete: c,
606
- value: a,
607
- defaultValue: l,
608
- disabled: k,
609
- onChange: f
1805
+ function zs({
1806
+ variant: r = "default",
1807
+ type: s = "text",
1808
+ name: u,
1809
+ placeholder: l,
1810
+ required: a,
1811
+ minLength: e,
1812
+ pattern: n,
1813
+ autoComplete: f,
1814
+ value: h,
1815
+ defaultValue: v,
1816
+ disabled: w,
1817
+ onChange: M
610
1818
  }) {
611
- const v = F(), w = i !== void 0 ? {
612
- pattern: i
1819
+ const y = Ke(), m = n !== void 0 ? {
1820
+ pattern: n
613
1821
  } : void 0;
614
- return /* @__PURE__ */ x("input", { id: v?.controlId, type: t, name: r, placeholder: n, required: o, minLength: s, autoComplete: c, value: a, defaultValue: l, disabled: k, "aria-describedby": v ? `${v.descriptionId} ${v.invalid ? v.errorId : ""}`.trim() : void 0, "aria-invalid": v?.invalid || e === "error" || void 0, onChange: f, ...u(d.input, $e.base, $e[e]), ...w, dir: "auto" });
1822
+ return /* @__PURE__ */ b("input", { id: y?.controlId, type: s, name: u, placeholder: l, required: a, minLength: e, autoComplete: f, value: h, defaultValue: v, disabled: w, "aria-describedby": y ? `${y.descriptionId} ${y.invalid ? y.errorId : ""}`.trim() : void 0, "aria-invalid": y?.invalid || r === "error" || void 0, onChange: M, ...q(T.input, sr.base, sr[r]), ...m, dir: "auto" });
615
1823
  }
616
- const _ = {
1824
+ const Fe = {
617
1825
  base: {
618
1826
  k1xSpc: "x3nfvp2",
619
1827
  kGNEyG: "x6s0dn4",
@@ -663,22 +1871,22 @@ const _ = {
663
1871
  kzqmXN: "xh8yej3",
664
1872
  $$css: !0
665
1873
  }
666
- }, nt = {
667
- default: _.sizeDefault,
668
- small: _.sizeSmall
1874
+ }, yn = {
1875
+ default: Fe.sizeDefault,
1876
+ small: Fe.sizeSmall
669
1877
  };
670
- function xr({
671
- href: e,
672
- variant: t = "primary",
673
- size: r = "default",
674
- fullWidth: n = !1,
675
- target: o,
676
- rel: s,
677
- children: i
1878
+ function Ss({
1879
+ href: r,
1880
+ variant: s = "primary",
1881
+ size: u = "default",
1882
+ fullWidth: l = !1,
1883
+ target: a,
1884
+ rel: e,
1885
+ children: n
678
1886
  }) {
679
- return /* @__PURE__ */ x("a", { href: e, target: o, rel: s, ...u(d.a, _.base, nt[r], _[t], n && _.fullWidth), children: i });
1887
+ return /* @__PURE__ */ b("a", { href: r, target: a, rel: e, ...q(T.a, Fe.base, yn[u], Fe[s], l && Fe.fullWidth), children: n });
680
1888
  }
681
- const D = {
1889
+ const we = {
682
1890
  root: {
683
1891
  kVAEAm: "x1n2onr6",
684
1892
  k1xSpc: "x3nfvp2",
@@ -762,171 +1970,171 @@ const D = {
762
1970
  kMwMTN: "x1q7k5ly x1hcr4s8",
763
1971
  $$css: !0
764
1972
  }
765
- }, Se = L(null);
766
- function ne() {
767
- const e = G(Se);
768
- if (!e) throw new Error("Menu compound components must be used within Menu.Root");
769
- return e;
770
- }
771
- function ot() {
772
- const [e, t] = T(!1), [r, n] = T(null), o = X(), s = y(null), i = y(null), c = y(/* @__PURE__ */ new Map()), a = y([]), l = y(!1), k = I(() => {
773
- t(!1), n(null), l.current = !1, i.current?.focus();
774
- }, []), f = I(() => {
775
- t((p) => (p ? (n(null), l.current = !1) : l.current = !0, !p));
1973
+ }, gr = me(null);
1974
+ function at() {
1975
+ const r = de(gr);
1976
+ if (!r) throw new Error("Menu compound components must be used within Menu.Root");
1977
+ return r;
1978
+ }
1979
+ function Mn() {
1980
+ const [r, s] = ne(!1), [u, l] = ne(null), a = Se(), e = K(null), n = K(null), f = K(/* @__PURE__ */ new Map()), h = K([]), v = K(!1), w = ee(() => {
1981
+ s(!1), l(null), v.current = !1, n.current?.focus();
1982
+ }, []), M = ee(() => {
1983
+ s((g) => (g ? (l(null), v.current = !1) : v.current = !0, !g));
776
1984
  }, []);
777
- W(() => {
778
- if (e && l.current) {
779
- l.current = !1;
780
- const p = a.current;
781
- p.length > 0 && n(p[0]);
782
- }
783
- }, [e]);
784
- const v = I((p, $) => {
785
- c.current.set(p, $);
786
- const h = c.current, m = [...h.keys()];
787
- return m.sort((g, b) => {
788
- const O = h.get(g), q = h.get(b);
789
- return !O || !q ? 0 : O.compareDocumentPosition(q) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1;
790
- }), a.current = m, () => {
791
- c.current.delete(p), a.current = a.current.filter((g) => g !== p);
1985
+ te(() => {
1986
+ if (r && v.current) {
1987
+ v.current = !1;
1988
+ const g = h.current;
1989
+ g.length > 0 && l(g[0]);
1990
+ }
1991
+ }, [r]);
1992
+ const y = ee((g, j) => {
1993
+ f.current.set(g, j);
1994
+ const A = f.current, W = [...A.keys()];
1995
+ return W.sort((I, N) => {
1996
+ const _ = A.get(I), V = A.get(N);
1997
+ return !_ || !V ? 0 : _.compareDocumentPosition(V) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1;
1998
+ }), h.current = W, () => {
1999
+ f.current.delete(g), h.current = h.current.filter((I) => I !== g);
792
2000
  };
793
2001
  }, []);
794
- return W(() => {
795
- const p = s.current;
796
- if (!p || !e) return;
797
- function $(h) {
798
- const m = a.current;
799
- if (m.length !== 0)
800
- switch (h.key) {
2002
+ return te(() => {
2003
+ const g = e.current;
2004
+ if (!g || !r) return;
2005
+ function j(A) {
2006
+ const W = h.current;
2007
+ if (W.length !== 0)
2008
+ switch (A.key) {
801
2009
  case "ArrowDown": {
802
- h.preventDefault(), n((g) => {
803
- const b = g ? m.indexOf(g) : -1;
804
- return m[(b + 1) % m.length];
2010
+ A.preventDefault(), l((I) => {
2011
+ const N = I ? W.indexOf(I) : -1;
2012
+ return W[(N + 1) % W.length];
805
2013
  });
806
2014
  break;
807
2015
  }
808
2016
  case "ArrowUp": {
809
- h.preventDefault(), n((g) => {
810
- const b = g ? m.indexOf(g) : 0;
811
- return m[(b - 1 + m.length) % m.length];
2017
+ A.preventDefault(), l((I) => {
2018
+ const N = I ? W.indexOf(I) : 0;
2019
+ return W[(N - 1 + W.length) % W.length];
812
2020
  });
813
2021
  break;
814
2022
  }
815
2023
  case "Home": {
816
- h.preventDefault(), n(m[0]);
2024
+ A.preventDefault(), l(W[0]);
817
2025
  break;
818
2026
  }
819
2027
  case "End": {
820
- h.preventDefault(), n(m[m.length - 1]);
2028
+ A.preventDefault(), l(W[W.length - 1]);
821
2029
  break;
822
2030
  }
823
2031
  case "Enter":
824
2032
  case " ": {
825
- h.preventDefault();
826
- const g = c.current;
827
- n((b) => (b && g.get(b)?.click(), b));
2033
+ A.preventDefault();
2034
+ const I = f.current;
2035
+ l((N) => (N && I.get(N)?.click(), N));
828
2036
  break;
829
2037
  }
830
2038
  case "Escape":
831
2039
  case "Tab": {
832
- k();
2040
+ w();
833
2041
  break;
834
2042
  }
835
2043
  }
836
2044
  }
837
- return p.addEventListener("keydown", $), () => p.removeEventListener("keydown", $);
838
- }, [e, k]), {
2045
+ return g.addEventListener("keydown", j), () => g.removeEventListener("keydown", j);
2046
+ }, [r, w]), {
839
2047
  ctx: {
840
- open: e,
841
- toggle: f,
842
- close: k,
843
- menuId: o,
844
- highlightedId: r,
845
- setHighlightedId: n,
846
- registerItem: v,
847
- triggerRef: i
2048
+ open: r,
2049
+ toggle: M,
2050
+ close: w,
2051
+ menuId: a,
2052
+ highlightedId: u,
2053
+ setHighlightedId: l,
2054
+ registerItem: y,
2055
+ triggerRef: n
848
2056
  },
849
- rootRef: s
2057
+ rootRef: e
850
2058
  };
851
2059
  }
852
- function st({
853
- children: e
2060
+ function jn({
2061
+ children: r
854
2062
  }) {
855
2063
  const {
856
- ctx: t,
857
- rootRef: r
858
- } = ot();
859
- return /* @__PURE__ */ x(Se.Provider, { value: t, children: /* @__PURE__ */ x("div", { ref: r, ...u(d.div, D.root), children: e }) });
2064
+ ctx: s,
2065
+ rootRef: u
2066
+ } = Mn();
2067
+ return /* @__PURE__ */ b(gr.Provider, { value: s, children: /* @__PURE__ */ b("div", { ref: u, ...q(T.div, we.root), children: r }) });
860
2068
  }
861
- function ct({
862
- children: e
2069
+ function zn({
2070
+ children: r
863
2071
  }) {
864
2072
  const {
865
- open: t,
866
- toggle: r,
867
- menuId: n,
868
- triggerRef: o
869
- } = ne(), s = y(null);
870
- return W(() => {
871
- o.current = s.current;
872
- }), /* @__PURE__ */ x("button", { ref: s, type: "button", onClick: r, "aria-expanded": t, "aria-haspopup": "menu", "aria-controls": t ? n : void 0, ...u(d.button, D.trigger), children: e });
873
- }
874
- function xt({
875
- children: e,
876
- align: t = "start"
2073
+ open: s,
2074
+ toggle: u,
2075
+ menuId: l,
2076
+ triggerRef: a
2077
+ } = at(), e = K(null);
2078
+ return te(() => {
2079
+ a.current = e.current;
2080
+ }), /* @__PURE__ */ b("button", { ref: e, type: "button", onClick: u, "aria-expanded": s, "aria-haspopup": "menu", "aria-controls": s ? l : void 0, ...q(T.button, we.trigger), children: r });
2081
+ }
2082
+ function Sn({
2083
+ children: r,
2084
+ align: s = "start"
877
2085
  }) {
878
2086
  const {
879
- open: r,
880
- close: n,
881
- menuId: o,
882
- highlightedId: s
883
- } = ne();
884
- return r ? /* @__PURE__ */ H(Y, { children: [
885
- /* @__PURE__ */ x("div", { ...u(d.div, D.backdrop), onClick: n }),
886
- /* @__PURE__ */ x("div", { id: o, role: "menu", "aria-activedescendant": s ?? void 0, ...u(d.div, D.popup, t === "end" && D.popupEnd), children: e })
2087
+ open: u,
2088
+ close: l,
2089
+ menuId: a,
2090
+ highlightedId: e
2091
+ } = at();
2092
+ return u ? /* @__PURE__ */ le(Te, { children: [
2093
+ /* @__PURE__ */ b("div", { ...q(T.div, we.backdrop), onClick: l }),
2094
+ /* @__PURE__ */ b("div", { id: a, role: "menu", "aria-activedescendant": e ?? void 0, ...q(T.div, we.popup, s === "end" && we.popupEnd), children: r })
887
2095
  ] }) : null;
888
2096
  }
889
- function it({
890
- onClick: e,
891
- children: t
2097
+ function An({
2098
+ onClick: r,
2099
+ children: s
892
2100
  }) {
893
2101
  const {
894
- close: r,
895
- highlightedId: n,
896
- setHighlightedId: o,
897
- registerItem: s
898
- } = ne(), i = X(), c = y(null), a = n === i;
899
- return W(() => {
900
- const k = c.current;
901
- if (k)
902
- return s(i, k);
903
- }, [i, s]), /* @__PURE__ */ x("div", { ref: c, id: i, role: "menuitem", onClick: () => {
904
- e?.(), r();
905
- }, onPointerEnter: () => o(i), ...u(d.div, D.item, a && D.itemHighlighted), children: t });
906
- }
907
- function lt({
908
- href: e,
909
- children: t
2102
+ close: u,
2103
+ highlightedId: l,
2104
+ setHighlightedId: a,
2105
+ registerItem: e
2106
+ } = at(), n = Se(), f = K(null), h = l === n;
2107
+ return te(() => {
2108
+ const w = f.current;
2109
+ if (w)
2110
+ return e(n, w);
2111
+ }, [n, e]), /* @__PURE__ */ b("div", { ref: f, id: n, role: "menuitem", onClick: () => {
2112
+ r?.(), u();
2113
+ }, onPointerEnter: () => a(n), ...q(T.div, we.item, h && we.itemHighlighted), children: s });
2114
+ }
2115
+ function qn({
2116
+ href: r,
2117
+ children: s
910
2118
  }) {
911
2119
  const {
912
- close: r,
913
- highlightedId: n,
914
- setHighlightedId: o,
915
- registerItem: s
916
- } = ne(), i = X(), c = y(null), a = n === i;
917
- return W(() => {
918
- const l = c.current;
919
- if (l)
920
- return s(i, l);
921
- }, [i, s]), /* @__PURE__ */ x("a", { ref: c, id: i, href: e, onClick: r, role: "menuitem", onPointerEnter: () => o(i), ...u(d.a, D.item, D.linkItem, a && D.itemHighlighted), children: t });
2120
+ close: u,
2121
+ highlightedId: l,
2122
+ setHighlightedId: a,
2123
+ registerItem: e
2124
+ } = at(), n = Se(), f = K(null), h = l === n;
2125
+ return te(() => {
2126
+ const v = f.current;
2127
+ if (v)
2128
+ return e(n, v);
2129
+ }, [n, e]), /* @__PURE__ */ b("a", { ref: f, id: n, href: r, onClick: u, role: "menuitem", onPointerEnter: () => a(n), ...q(T.a, we.item, we.linkItem, h && we.itemHighlighted), children: s });
922
2130
  }
923
- const ir = {
924
- Root: st,
925
- Trigger: ct,
926
- Popup: xt,
927
- Item: it,
928
- LinkItem: lt
929
- }, E = {
2131
+ const As = {
2132
+ Root: jn,
2133
+ Trigger: zn,
2134
+ Popup: Sn,
2135
+ Item: An,
2136
+ LinkItem: qn
2137
+ }, ke = {
930
2138
  root: {
931
2139
  kVAEAm: "x1n2onr6",
932
2140
  kVQacm: "xb3r6kr",
@@ -995,131 +2203,131 @@ const ir = {
995
2203
  kIyJzY: "xx6bhzk",
996
2204
  $$css: !0
997
2205
  },
998
- viewportMaxHeight: (e) => [{
999
- kskxy: e != null ? "x1jols5v" : e,
2206
+ viewportMaxHeight: (r) => [{
2207
+ kskxy: r != null ? "x1jols5v" : r,
1000
2208
  $$css: !0
1001
2209
  }, {
1002
- "--x-maxHeight": ((t) => typeof t == "number" ? t + "px" : t ?? void 0)(e)
2210
+ "--x-maxHeight": ((s) => typeof s == "number" ? s + "px" : s ?? void 0)(r)
1003
2211
  }],
1004
- thumbVertical: (e, t) => [{
1005
- kZKoxP: e != null ? "x16ye13r" : e,
1006
- k3aq6I: t != null ? "xsqj5wx" : t,
2212
+ thumbVertical: (r, s) => [{
2213
+ kZKoxP: r != null ? "x16ye13r" : r,
2214
+ k3aq6I: s != null ? "xsqj5wx" : s,
1007
2215
  $$css: !0
1008
2216
  }, {
1009
- "--x-height": ((r) => typeof r == "number" ? r + "px" : r ?? void 0)(e),
1010
- "--x-transform": t ?? void 0
2217
+ "--x-height": ((u) => typeof u == "number" ? u + "px" : u ?? void 0)(r),
2218
+ "--x-transform": s ?? void 0
1011
2219
  }],
1012
- thumbHorizontal: (e, t) => [{
1013
- kzqmXN: e != null ? "x5lhr3w" : e,
1014
- k3aq6I: t != null ? "xsqj5wx" : t,
2220
+ thumbHorizontal: (r, s) => [{
2221
+ kzqmXN: r != null ? "x5lhr3w" : r,
2222
+ k3aq6I: s != null ? "xsqj5wx" : s,
1015
2223
  $$css: !0
1016
2224
  }, {
1017
- "--x-width": ((r) => typeof r == "number" ? r + "px" : r ?? void 0)(e),
1018
- "--x-transform": t ?? void 0
2225
+ "--x-width": ((u) => typeof u == "number" ? u + "px" : u ?? void 0)(r),
2226
+ "--x-transform": s ?? void 0
1019
2227
  }]
1020
- }, Ie = L(null);
1021
- function oe() {
1022
- const e = G(Ie);
1023
- if (!e) throw new Error("ScrollArea compound components must be used within ScrollArea.Root");
1024
- return e;
1025
- }
1026
- function kt() {
1027
- const e = y(null), t = y(null), [r, n] = T(0), [o, s] = T(0), [i, c] = T(0), [a, l] = T(0), [k, f] = T(0), [v, w] = T(0), [p, $] = T(!1), h = y(null), m = I(() => {
1028
- const g = e.current;
1029
- g && (n(g.scrollTop), s(g.scrollLeft), c(g.scrollHeight), l(g.scrollWidth), f(g.clientHeight), w(g.clientWidth), $(!0), h.current && clearTimeout(h.current), h.current = setTimeout(() => $(!1), 1e3));
2228
+ }, hr = me(null);
2229
+ function ut() {
2230
+ const r = de(hr);
2231
+ if (!r) throw new Error("ScrollArea compound components must be used within ScrollArea.Root");
2232
+ return r;
2233
+ }
2234
+ function Tn() {
2235
+ const r = K(null), s = K(null), [u, l] = ne(0), [a, e] = ne(0), [n, f] = ne(0), [h, v] = ne(0), [w, M] = ne(0), [y, m] = ne(0), [g, j] = ne(!1), A = K(null), W = ee(() => {
2236
+ const I = r.current;
2237
+ I && (l(I.scrollTop), e(I.scrollLeft), f(I.scrollHeight), v(I.scrollWidth), M(I.clientHeight), m(I.clientWidth), j(!0), A.current && clearTimeout(A.current), A.current = setTimeout(() => j(!1), 1e3));
1030
2238
  }, []);
1031
- return W(() => {
1032
- const g = e.current;
1033
- if (!g) return;
1034
- const b = new ResizeObserver(() => {
1035
- c(g.scrollHeight), l(g.scrollWidth), f(g.clientHeight), w(g.clientWidth);
2239
+ return te(() => {
2240
+ const I = r.current;
2241
+ if (!I) return;
2242
+ const N = new ResizeObserver(() => {
2243
+ f(I.scrollHeight), v(I.scrollWidth), M(I.clientHeight), m(I.clientWidth);
1036
2244
  });
1037
- return b.observe(g), c(g.scrollHeight), l(g.scrollWidth), f(g.clientHeight), w(g.clientWidth), () => b.disconnect();
1038
- }, []), W(() => {
1039
- const g = e.current;
1040
- if (g)
1041
- return g.addEventListener("scroll", m, {
2245
+ return N.observe(I), f(I.scrollHeight), v(I.scrollWidth), M(I.clientHeight), m(I.clientWidth), () => N.disconnect();
2246
+ }, []), te(() => {
2247
+ const I = r.current;
2248
+ if (I)
2249
+ return I.addEventListener("scroll", W, {
1042
2250
  passive: !0
1043
- }), () => g.removeEventListener("scroll", m);
1044
- }, [m]), {
1045
- viewportRef: e,
1046
- contentRef: t,
1047
- scrollTop: r,
1048
- scrollLeft: o,
1049
- scrollHeight: i,
1050
- scrollWidth: a,
1051
- clientHeight: k,
1052
- clientWidth: v,
1053
- scrolling: p
2251
+ }), () => I.removeEventListener("scroll", W);
2252
+ }, [W]), {
2253
+ viewportRef: r,
2254
+ contentRef: s,
2255
+ scrollTop: u,
2256
+ scrollLeft: a,
2257
+ scrollHeight: n,
2258
+ scrollWidth: h,
2259
+ clientHeight: w,
2260
+ clientWidth: y,
2261
+ scrolling: g
1054
2262
  };
1055
2263
  }
1056
- function ut({
1057
- children: e
2264
+ function En({
2265
+ children: r
1058
2266
  }) {
1059
- const t = kt();
1060
- return /* @__PURE__ */ x(Ie.Provider, { value: t, children: /* @__PURE__ */ x("div", { ...u(d.div, E.root), children: e }) });
2267
+ const s = Tn();
2268
+ return /* @__PURE__ */ b(hr.Provider, { value: s, children: /* @__PURE__ */ b("div", { ...q(T.div, ke.root), children: r }) });
1061
2269
  }
1062
- function dt({
1063
- children: e,
1064
- maxHeight: t
2270
+ function In({
2271
+ children: r,
2272
+ maxHeight: s
1065
2273
  }) {
1066
2274
  const {
1067
- viewportRef: r
1068
- } = oe();
1069
- return /* @__PURE__ */ x("div", { ref: r, ...u(d.div, E.viewport, t != null && E.viewportMaxHeight(t)), children: e });
2275
+ viewportRef: u
2276
+ } = ut();
2277
+ return /* @__PURE__ */ b("div", { ref: u, ...q(T.div, ke.viewport, s != null && ke.viewportMaxHeight(s)), children: r });
1070
2278
  }
1071
- function at({
1072
- children: e
2279
+ function Rn({
2280
+ children: r
1073
2281
  }) {
1074
2282
  const {
1075
- contentRef: t
1076
- } = oe();
1077
- return /* @__PURE__ */ x("div", { ref: t, ...u(d.div, E.content), children: e });
2283
+ contentRef: s
2284
+ } = ut();
2285
+ return /* @__PURE__ */ b("div", { ref: s, ...q(T.div, ke.content), children: r });
1078
2286
  }
1079
- function ft({
1080
- orientation: e = "vertical",
1081
- children: t
2287
+ function Cn({
2288
+ orientation: r = "vertical",
2289
+ children: s
1082
2290
  }) {
1083
2291
  const {
1084
- scrolling: r,
1085
- scrollHeight: n,
1086
- scrollWidth: o,
1087
- clientHeight: s,
1088
- clientWidth: i
1089
- } = oe();
1090
- return (e === "vertical" ? n > s : o > i) ? /* @__PURE__ */ x("div", { ...u(d.div, E.scrollbar, e === "vertical" ? E.scrollbarVertical : E.scrollbarHorizontal, r ? E.scrollbarVisible : E.scrollbarHidden), children: t }) : null;
1091
- }
1092
- function gt({
1093
- orientation: e = "vertical"
2292
+ scrolling: u,
2293
+ scrollHeight: l,
2294
+ scrollWidth: a,
2295
+ clientHeight: e,
2296
+ clientWidth: n
2297
+ } = ut();
2298
+ return (r === "vertical" ? l > e : a > n) ? /* @__PURE__ */ b("div", { ...q(T.div, ke.scrollbar, r === "vertical" ? ke.scrollbarVertical : ke.scrollbarHorizontal, u ? ke.scrollbarVisible : ke.scrollbarHidden), children: s }) : null;
2299
+ }
2300
+ function Wn({
2301
+ orientation: r = "vertical"
1094
2302
  }) {
1095
2303
  const {
1096
- viewportRef: t,
1097
- scrollTop: r,
1098
- scrollLeft: n,
1099
- scrollHeight: o,
1100
- scrollWidth: s,
1101
- clientHeight: i,
1102
- clientWidth: c
1103
- } = oe(), a = y(!1), l = y(0), k = y(0), f = e === "vertical", v = Math.max(f ? i / o * 100 : c / s * 100, 10), w = f ? o - i : s - c, p = f ? i : c, $ = v / 100 * p, h = f ? r : n, m = w > 0 ? h / w * (p - $) : 0, g = f ? E.thumbVertical(`${v}%`, `translateY(${m}px)`) : E.thumbHorizontal(`${v}%`, `translateX(${m}px)`), b = I((z) => {
1104
- z.preventDefault(), a.current = !0, l.current = f ? z.clientY : z.clientX, k.current = f ? t.current?.scrollTop ?? 0 : t.current?.scrollLeft ?? 0, z.target.setPointerCapture(z.pointerId);
1105
- }, [f, t]), O = I((z) => {
1106
- if (!a.current) return;
1107
- const M = t.current;
1108
- if (!M) return;
1109
- const j = (f ? z.clientY : z.clientX) - l.current, V = w / (p - $), S = j * V;
1110
- f ? M.scrollTop = k.current + S : M.scrollLeft = k.current + S;
1111
- }, [f, w, p, $, t]), q = I(() => {
1112
- a.current = !1;
2304
+ viewportRef: s,
2305
+ scrollTop: u,
2306
+ scrollLeft: l,
2307
+ scrollHeight: a,
2308
+ scrollWidth: e,
2309
+ clientHeight: n,
2310
+ clientWidth: f
2311
+ } = ut(), h = K(!1), v = K(0), w = K(0), M = r === "vertical", y = Math.max(M ? n / a * 100 : f / e * 100, 10), m = M ? a - n : e - f, g = M ? n : f, j = y / 100 * g, A = M ? u : l, W = m > 0 ? A / m * (g - j) : 0, I = M ? ke.thumbVertical(`${y}%`, `translateY(${W}px)`) : ke.thumbHorizontal(`${y}%`, `translateX(${W}px)`), N = ee((G) => {
2312
+ G.preventDefault(), h.current = !0, v.current = M ? G.clientY : G.clientX, w.current = M ? s.current?.scrollTop ?? 0 : s.current?.scrollLeft ?? 0, G.target.setPointerCapture(G.pointerId);
2313
+ }, [M, s]), _ = ee((G) => {
2314
+ if (!h.current) return;
2315
+ const X = s.current;
2316
+ if (!X) return;
2317
+ const Y = (M ? G.clientY : G.clientX) - v.current, ie = m / (g - j), J = Y * ie;
2318
+ M ? X.scrollTop = w.current + J : X.scrollLeft = w.current + J;
2319
+ }, [M, m, g, j, s]), V = ee(() => {
2320
+ h.current = !1;
1113
2321
  }, []);
1114
- return /* @__PURE__ */ x("div", { onPointerDown: b, onPointerMove: O, onPointerUp: q, ...u(d.div, E.thumb, g) });
1115
- }
1116
- const lr = {
1117
- Root: ut,
1118
- Viewport: dt,
1119
- Content: at,
1120
- Scrollbar: ft,
1121
- Thumb: gt
1122
- }, R = {
2322
+ return /* @__PURE__ */ b("div", { onPointerDown: N, onPointerMove: _, onPointerUp: V, ...q(T.div, ke.thumb, I) });
2323
+ }
2324
+ const qs = {
2325
+ Root: En,
2326
+ Viewport: In,
2327
+ Content: Rn,
2328
+ Scrollbar: Cn,
2329
+ Thumb: Wn
2330
+ }, $e = {
1123
2331
  root: {
1124
2332
  kVAEAm: "x1n2onr6",
1125
2333
  k1xSpc: "x3nfvp2",
@@ -1217,228 +2425,228 @@ const lr = {
1217
2425
  k1xSpc: "x1s85apg",
1218
2426
  $$css: !0
1219
2427
  }
1220
- }, We = L(null);
1221
- function se() {
1222
- const e = G(We);
1223
- if (!e) throw new Error("Select compound components must be used within Select.Root");
1224
- return e;
1225
- }
1226
- function de(e, t, r) {
1227
- const [n, o] = T(t), s = e !== void 0 ? e : n, i = I((c) => {
1228
- e === void 0 && o(c), r?.(c);
1229
- }, [e, r]);
1230
- return [s, i];
1231
- }
1232
- function pt({
1233
- defaultValue: e,
1234
- value: t,
1235
- onValueChange: r
2428
+ }, vr = me(null);
2429
+ function xt() {
2430
+ const r = de(vr);
2431
+ if (!r) throw new Error("Select compound components must be used within Select.Root");
2432
+ return r;
2433
+ }
2434
+ function Ut(r, s, u) {
2435
+ const [l, a] = ne(s), e = r !== void 0 ? r : l, n = ee((f) => {
2436
+ r === void 0 && a(f), u?.(f);
2437
+ }, [r, u]);
2438
+ return [e, n];
2439
+ }
2440
+ function Hn({
2441
+ defaultValue: r,
2442
+ value: s,
2443
+ onValueChange: u
1236
2444
  }) {
1237
- const [n, o] = de(t, e ?? null, r), [s, i] = T(!1), [c, a] = T({}), [l, k] = T(null), f = X(), v = y(null), w = y(null), p = y(/* @__PURE__ */ new Map()), $ = y([]), h = I(() => {
1238
- i(!1), k(null), w.current?.focus();
1239
- }, []), m = I(() => {
1240
- i((q) => {
1241
- if (q)
1242
- k(null);
2445
+ const [l, a] = Ut(s, r ?? null, u), [e, n] = ne(!1), [f, h] = ne({}), [v, w] = ne(null), M = Se(), y = K(null), m = K(null), g = K(/* @__PURE__ */ new Map()), j = K([]), A = ee(() => {
2446
+ n(!1), w(null), m.current?.focus();
2447
+ }, []), W = ee(() => {
2448
+ n((V) => {
2449
+ if (V)
2450
+ w(null);
1243
2451
  else {
1244
- const z = p.current, M = $.current;
1245
- let j = null;
1246
- for (const V of M) {
1247
- const S = z.get(V);
1248
- if (S && S.value === n) {
1249
- j = V;
2452
+ const G = g.current, X = j.current;
2453
+ let Y = null;
2454
+ for (const ie of X) {
2455
+ const J = G.get(ie);
2456
+ if (J && J.value === l) {
2457
+ Y = ie;
1250
2458
  break;
1251
2459
  }
1252
2460
  }
1253
- k(j ?? (M.length > 0 ? M[0] : null));
2461
+ w(Y ?? (X.length > 0 ? X[0] : null));
1254
2462
  }
1255
- return !q;
2463
+ return !V;
1256
2464
  });
1257
- }, [n]), g = I((q, z) => {
1258
- a((M) => M[q] === z ? M : {
1259
- ...M,
1260
- [q]: z
2465
+ }, [l]), I = ee((V, G) => {
2466
+ h((X) => X[V] === G ? X : {
2467
+ ...X,
2468
+ [V]: G
1261
2469
  });
1262
- }, []), b = I((q, z, M) => {
1263
- p.current.set(q, {
1264
- value: z,
1265
- element: M
2470
+ }, []), N = ee((V, G, X) => {
2471
+ g.current.set(V, {
2472
+ value: G,
2473
+ element: X
1266
2474
  });
1267
- const j = p.current, V = [...j.keys()];
1268
- return V.sort((S, B) => {
1269
- const pe = j.get(S)?.element, he = j.get(B)?.element;
1270
- return !pe || !he ? 0 : pe.compareDocumentPosition(he) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1;
1271
- }), $.current = V, () => {
1272
- p.current.delete(q), $.current = $.current.filter((S) => S !== q);
2475
+ const Y = g.current, ie = [...Y.keys()];
2476
+ return ie.sort((J, ae) => {
2477
+ const ge = Y.get(J)?.element, Ae = Y.get(ae)?.element;
2478
+ return !ge || !Ae ? 0 : ge.compareDocumentPosition(Ae) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1;
2479
+ }), j.current = ie, () => {
2480
+ g.current.delete(V), j.current = j.current.filter((J) => J !== V);
1273
2481
  };
1274
2482
  }, []);
1275
- return W(() => {
1276
- const q = v.current;
1277
- if (!q || !s) return;
1278
- function z(M) {
1279
- const j = $.current, V = p.current;
1280
- if (j.length !== 0)
1281
- switch (M.key) {
2483
+ return te(() => {
2484
+ const V = y.current;
2485
+ if (!V || !e) return;
2486
+ function G(X) {
2487
+ const Y = j.current, ie = g.current;
2488
+ if (Y.length !== 0)
2489
+ switch (X.key) {
1282
2490
  case "ArrowDown": {
1283
- M.preventDefault(), k((S) => {
1284
- const B = S ? j.indexOf(S) : -1;
1285
- return j[(B + 1) % j.length];
2491
+ X.preventDefault(), w((J) => {
2492
+ const ae = J ? Y.indexOf(J) : -1;
2493
+ return Y[(ae + 1) % Y.length];
1286
2494
  });
1287
2495
  break;
1288
2496
  }
1289
2497
  case "ArrowUp": {
1290
- M.preventDefault(), k((S) => {
1291
- const B = S ? j.indexOf(S) : 0;
1292
- return j[(B - 1 + j.length) % j.length];
2498
+ X.preventDefault(), w((J) => {
2499
+ const ae = J ? Y.indexOf(J) : 0;
2500
+ return Y[(ae - 1 + Y.length) % Y.length];
1293
2501
  });
1294
2502
  break;
1295
2503
  }
1296
2504
  case "Home": {
1297
- M.preventDefault(), k(j[0]);
2505
+ X.preventDefault(), w(Y[0]);
1298
2506
  break;
1299
2507
  }
1300
2508
  case "End": {
1301
- M.preventDefault(), k(j[j.length - 1]);
2509
+ X.preventDefault(), w(Y[Y.length - 1]);
1302
2510
  break;
1303
2511
  }
1304
2512
  case "Enter":
1305
2513
  case " ": {
1306
- M.preventDefault(), k((S) => {
1307
- if (S) {
1308
- const B = V.get(S);
1309
- B && (o(B.value), h());
2514
+ X.preventDefault(), w((J) => {
2515
+ if (J) {
2516
+ const ae = ie.get(J);
2517
+ ae && (a(ae.value), A());
1310
2518
  }
1311
- return S;
2519
+ return J;
1312
2520
  });
1313
2521
  break;
1314
2522
  }
1315
2523
  case "Escape":
1316
2524
  case "Tab": {
1317
- h();
2525
+ A();
1318
2526
  break;
1319
2527
  }
1320
2528
  }
1321
2529
  }
1322
- return q.addEventListener("keydown", z), () => q.removeEventListener("keydown", z);
1323
- }, [s, h, o]), {
1324
- ctx: we(() => ({
1325
- open: s,
1326
- toggle: m,
1327
- close: h,
1328
- value: n,
1329
- setValue: o,
1330
- labels: c,
1331
- registerLabel: g,
1332
- listboxId: f,
1333
- highlightedId: l,
1334
- setHighlightedId: k,
1335
- registerItem: b,
1336
- triggerRef: w
1337
- }), [s, m, h, n, o, c, g, f, l, k, b]),
1338
- rootRef: v
2530
+ return V.addEventListener("keydown", G), () => V.removeEventListener("keydown", G);
2531
+ }, [e, A, a]), {
2532
+ ctx: lr(() => ({
2533
+ open: e,
2534
+ toggle: W,
2535
+ close: A,
2536
+ value: l,
2537
+ setValue: a,
2538
+ labels: f,
2539
+ registerLabel: I,
2540
+ listboxId: M,
2541
+ highlightedId: v,
2542
+ setHighlightedId: w,
2543
+ registerItem: N,
2544
+ triggerRef: m
2545
+ }), [e, W, A, l, a, f, I, M, v, w, N]),
2546
+ rootRef: y
1339
2547
  };
1340
2548
  }
1341
- function ht({
1342
- name: e,
1343
- defaultValue: t,
1344
- value: r,
1345
- onValueChange: n,
1346
- children: o
2549
+ function Gn({
2550
+ name: r,
2551
+ defaultValue: s,
2552
+ value: u,
2553
+ onValueChange: l,
2554
+ children: a
1347
2555
  }) {
1348
2556
  const {
1349
- ctx: s,
1350
- rootRef: i
1351
- } = pt({
1352
- defaultValue: t,
1353
- value: r,
1354
- onValueChange: n
2557
+ ctx: e,
2558
+ rootRef: n
2559
+ } = Hn({
2560
+ defaultValue: s,
2561
+ value: u,
2562
+ onValueChange: l
1355
2563
  });
1356
- return /* @__PURE__ */ x(We.Provider, { value: s, children: /* @__PURE__ */ H("div", { ref: i, ...u(d.div, R.root), children: [
1357
- e && /* @__PURE__ */ x("input", { type: "hidden", name: e, value: s.value ?? "", dir: "auto", ...u(d.input) }),
1358
- o
2564
+ return /* @__PURE__ */ b(vr.Provider, { value: e, children: /* @__PURE__ */ le("div", { ref: n, ...q(T.div, $e.root), children: [
2565
+ r && /* @__PURE__ */ b("input", { type: "hidden", name: r, value: e.value ?? "", dir: "auto", ...q(T.input) }),
2566
+ a
1359
2567
  ] }) });
1360
2568
  }
1361
- function vt({
1362
- children: e
2569
+ function On({
2570
+ children: r
1363
2571
  }) {
1364
2572
  const {
1365
- open: t,
1366
- toggle: r,
1367
- listboxId: n,
1368
- highlightedId: o,
1369
- triggerRef: s
1370
- } = se(), i = y(null);
1371
- return W(() => {
1372
- s.current = i.current;
1373
- }), /* @__PURE__ */ x("button", { ref: i, type: "button", role: "combobox", onClick: r, "aria-expanded": t, "aria-haspopup": "listbox", "aria-controls": t ? n : void 0, "aria-activedescendant": o ?? void 0, ...u(d.button, R.trigger), children: e });
1374
- }
1375
- function $t({
1376
- placeholder: e
2573
+ open: s,
2574
+ toggle: u,
2575
+ listboxId: l,
2576
+ highlightedId: a,
2577
+ triggerRef: e
2578
+ } = xt(), n = K(null);
2579
+ return te(() => {
2580
+ e.current = n.current;
2581
+ }), /* @__PURE__ */ b("button", { ref: n, type: "button", role: "combobox", onClick: u, "aria-expanded": s, "aria-haspopup": "listbox", "aria-controls": s ? l : void 0, "aria-activedescendant": a ?? void 0, ...q(T.button, $e.trigger), children: r });
2582
+ }
2583
+ function Nn({
2584
+ placeholder: r
1377
2585
  }) {
1378
2586
  const {
1379
- value: t,
1380
- labels: r
1381
- } = se(), n = t ? r[t] ?? t : null;
1382
- return /* @__PURE__ */ x("span", { ...u(d.span, n ? R.value : R.placeholder), children: n ?? e });
2587
+ value: s,
2588
+ labels: u
2589
+ } = xt(), l = s ? u[s] ?? s : null;
2590
+ return /* @__PURE__ */ b("span", { ...q(T.span, l ? $e.value : $e.placeholder), children: l ?? r });
1383
2591
  }
1384
- function mt({
1385
- children: e
2592
+ function Ln({
2593
+ children: r
1386
2594
  }) {
1387
- return /* @__PURE__ */ x("span", { ...u(d.span, R.icon), children: e ?? /* @__PURE__ */ x("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ x("path", { d: "M6 9l6 6 6-6" }) }) });
2595
+ return /* @__PURE__ */ b("span", { ...q(T.span, $e.icon), children: r ?? /* @__PURE__ */ b("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ b("path", { d: "M6 9l6 6 6-6" }) }) });
1388
2596
  }
1389
- function bt({
1390
- children: e
2597
+ function Dn({
2598
+ children: r
1391
2599
  }) {
1392
2600
  const {
1393
- open: t,
1394
- close: r,
1395
- listboxId: n
1396
- } = se();
1397
- return /* @__PURE__ */ H(Y, { children: [
1398
- t && /* @__PURE__ */ x("div", { ...u(d.div, R.backdrop), onClick: r }),
1399
- /* @__PURE__ */ x("div", { id: n, role: "listbox", "aria-hidden": !t, ...u(d.div, R.popup, !t && R.hidden), children: e })
2601
+ open: s,
2602
+ close: u,
2603
+ listboxId: l
2604
+ } = xt();
2605
+ return /* @__PURE__ */ le(Te, { children: [
2606
+ s && /* @__PURE__ */ b("div", { ...q(T.div, $e.backdrop), onClick: u }),
2607
+ /* @__PURE__ */ b("div", { id: l, role: "listbox", "aria-hidden": !s, ...q(T.div, $e.popup, !s && $e.hidden), children: r })
1400
2608
  ] });
1401
2609
  }
1402
- function wt({
1403
- value: e,
1404
- children: t
2610
+ function Pn({
2611
+ value: r,
2612
+ children: s
1405
2613
  }) {
1406
2614
  const {
1407
- value: r,
1408
- setValue: n,
1409
- close: o,
1410
- registerLabel: s,
1411
- highlightedId: i,
1412
- setHighlightedId: c,
1413
- registerItem: a
1414
- } = se(), l = X(), k = y(null), f = r === e, v = i === l;
1415
- return W(() => {
1416
- const p = k.current;
1417
- if (!p) return;
1418
- const $ = p.textContent;
1419
- $ && s(e, $);
1420
- }, [e, s]), W(() => {
1421
- const p = k.current;
1422
- if (p)
1423
- return a(l, e, p);
1424
- }, [l, e, a]), /* @__PURE__ */ x("div", { ref: k, id: l, role: "option", "aria-selected": f, onClick: () => {
1425
- n(e), o();
1426
- }, onPointerEnter: () => c(l), ...u(d.div, R.item, f && R.itemSelected, v && R.itemHighlighted), children: t });
1427
- }
1428
- function yt({
1429
- children: e
2615
+ value: u,
2616
+ setValue: l,
2617
+ close: a,
2618
+ registerLabel: e,
2619
+ highlightedId: n,
2620
+ setHighlightedId: f,
2621
+ registerItem: h
2622
+ } = xt(), v = Se(), w = K(null), M = u === r, y = n === v;
2623
+ return te(() => {
2624
+ const g = w.current;
2625
+ if (!g) return;
2626
+ const j = g.textContent;
2627
+ j && e(r, j);
2628
+ }, [r, e]), te(() => {
2629
+ const g = w.current;
2630
+ if (g)
2631
+ return h(v, r, g);
2632
+ }, [v, r, h]), /* @__PURE__ */ b("div", { ref: w, id: v, role: "option", "aria-selected": M, onClick: () => {
2633
+ l(r), a();
2634
+ }, onPointerEnter: () => f(v), ...q(T.div, $e.item, M && $e.itemSelected, y && $e.itemHighlighted), children: s });
2635
+ }
2636
+ function Vn({
2637
+ children: r
1430
2638
  }) {
1431
- return /* @__PURE__ */ x("span", { ...u(d.span), children: e });
1432
- }
1433
- const kr = {
1434
- Root: ht,
1435
- Trigger: vt,
1436
- Value: $t,
1437
- Icon: mt,
1438
- Popup: bt,
1439
- Item: wt,
1440
- ItemText: yt
1441
- }, P = {
2639
+ return /* @__PURE__ */ b("span", { ...q(T.span), children: r });
2640
+ }
2641
+ const Ts = {
2642
+ Root: Gn,
2643
+ Trigger: On,
2644
+ Value: Nn,
2645
+ Icon: Ln,
2646
+ Popup: Dn,
2647
+ Item: Pn,
2648
+ ItemText: Vn
2649
+ }, ze = {
1442
2650
  root: {
1443
2651
  k1xSpc: "x78zum5",
1444
2652
  kXwgrk: "xdt5ytf",
@@ -1517,83 +2725,83 @@ const kr = {
1517
2725
  k63SB2: "x1oq67d7",
1518
2726
  $$css: !0
1519
2727
  }
1520
- }, Te = L(null);
1521
- function Ae() {
1522
- const e = G(Te);
1523
- if (!e) throw new Error("SideNav compound components must be used within SideNav.Root");
1524
- return e;
1525
- }
1526
- function Mt({
1527
- children: e,
1528
- value: t,
1529
- defaultValue: r,
1530
- onValueChange: n
2728
+ }, $r = me(null);
2729
+ function mr() {
2730
+ const r = de($r);
2731
+ if (!r) throw new Error("SideNav compound components must be used within SideNav.Root");
2732
+ return r;
2733
+ }
2734
+ function Xn({
2735
+ children: r,
2736
+ value: s,
2737
+ defaultValue: u,
2738
+ onValueChange: l
1531
2739
  }) {
1532
- const [o, s] = de(t, r ?? null, n ? (f) => {
1533
- f !== null && n(f);
1534
- } : void 0), [i, c] = T(/* @__PURE__ */ new Set()), a = y([]), l = I((f) => {
1535
- c((v) => {
1536
- const w = new Set(v);
1537
- return w.has(f) ? w.delete(f) : w.add(f), w;
2740
+ const [a, e] = Ut(s, u ?? null, l ? (M) => {
2741
+ M !== null && l(M);
2742
+ } : void 0), [n, f] = ne(/* @__PURE__ */ new Set()), h = K([]), v = ee((M) => {
2743
+ f((y) => {
2744
+ const m = new Set(y);
2745
+ return m.has(M) ? m.delete(M) : m.add(M), m;
1538
2746
  });
1539
- }, []), k = I((f) => (a.current.includes(f) || a.current.push(f), () => {
1540
- a.current = a.current.filter((v) => v !== f);
2747
+ }, []), w = ee((M) => (h.current.includes(M) || h.current.push(M), () => {
2748
+ h.current = h.current.filter((y) => y !== M);
1541
2749
  }), []);
1542
- return W(() => {
1543
- o && c((f) => f);
1544
- }, [o]), /* @__PURE__ */ x(Te.Provider, { value: {
1545
- activeValue: o,
1546
- onSelect: s,
1547
- expandedGroups: i,
1548
- toggleGroup: l,
1549
- registerItem: k,
1550
- orderRef: a
1551
- }, children: /* @__PURE__ */ x("nav", { role: "navigation", ...u(d.nav, P.root), children: e }) });
1552
- }
1553
- function zt({
1554
- children: e,
1555
- label: t,
1556
- groupKey: r,
1557
- defaultExpanded: n
2750
+ return te(() => {
2751
+ a && f((M) => M);
2752
+ }, [a]), /* @__PURE__ */ b($r.Provider, { value: {
2753
+ activeValue: a,
2754
+ onSelect: e,
2755
+ expandedGroups: n,
2756
+ toggleGroup: v,
2757
+ registerItem: w,
2758
+ orderRef: h
2759
+ }, children: /* @__PURE__ */ b("nav", { role: "navigation", ...q(T.nav, ze.root), children: r }) });
2760
+ }
2761
+ function Bn({
2762
+ children: r,
2763
+ label: s,
2764
+ groupKey: u,
2765
+ defaultExpanded: l
1558
2766
  }) {
1559
- const o = r ?? t, {
1560
- expandedGroups: s,
1561
- toggleGroup: i,
1562
- activeValue: c
1563
- } = Ae(), a = s.has(o), l = y(null);
1564
- W(() => {
1565
- if (!c || s.has(o)) return;
1566
- const f = l.current;
1567
- if (!f) return;
1568
- f.querySelector(`[data-nav-value="${c}"]`) && i(o);
1569
- }, [c, o, s, i]), W(() => {
1570
- n && !s.has(o) && i(o);
2767
+ const a = u ?? s, {
2768
+ expandedGroups: e,
2769
+ toggleGroup: n,
2770
+ activeValue: f
2771
+ } = mr(), h = e.has(a), v = K(null);
2772
+ te(() => {
2773
+ if (!f || e.has(a)) return;
2774
+ const M = v.current;
2775
+ if (!M) return;
2776
+ M.querySelector(`[data-nav-value="${f}"]`) && n(a);
2777
+ }, [f, a, e, n]), te(() => {
2778
+ l && !e.has(a) && n(a);
1571
2779
  }, []);
1572
- const k = !c || !l.current ? !1 : !!l.current.querySelector(`[data-nav-value="${c}"]`);
1573
- return /* @__PURE__ */ H("div", { ref: l, ...u(d.div, P.group), children: [
1574
- /* @__PURE__ */ H("button", { type: "button", onClick: () => i(o), ...u(d.button, P.groupTrigger, k && P.groupTriggerActive), "aria-expanded": a, children: [
1575
- /* @__PURE__ */ x("span", { ...u(d.span, P.chevron, a && P.chevronOpen), children: /* @__PURE__ */ x(ke, { width: 10, height: 10, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.5, strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ x(Me, { d: "M9 18l6-6-6-6" }) }) }),
1576
- t
2780
+ const w = !f || !v.current ? !1 : !!v.current.querySelector(`[data-nav-value="${f}"]`);
2781
+ return /* @__PURE__ */ le("div", { ref: v, ...q(T.div, ze.group), children: [
2782
+ /* @__PURE__ */ le("button", { type: "button", onClick: () => n(a), ...q(T.button, ze.groupTrigger, w && ze.groupTriggerActive), "aria-expanded": h, children: [
2783
+ /* @__PURE__ */ b("span", { ...q(T.span, ze.chevron, h && ze.chevronOpen), children: /* @__PURE__ */ b(Ft, { width: 10, height: 10, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.5, strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ b(dr, { d: "M9 18l6-6-6-6" }) }) }),
2784
+ s
1577
2785
  ] }),
1578
- a && e
2786
+ h && r
1579
2787
  ] });
1580
2788
  }
1581
- function jt({
1582
- value: e,
1583
- children: t
2789
+ function Yn({
2790
+ value: r,
2791
+ children: s
1584
2792
  }) {
1585
2793
  const {
1586
- activeValue: r,
1587
- onSelect: n,
1588
- registerItem: o
1589
- } = Ae(), s = r === e;
1590
- return W(() => o(e), [e, o]), /* @__PURE__ */ x("button", { type: "button", "data-nav-value": e, onClick: () => n(e), ...u(d.button, P.item, s && P.itemActive), "aria-current": s ? "page" : void 0, children: t });
1591
- }
1592
- const ur = {
1593
- Root: Mt,
1594
- Group: zt,
1595
- Item: jt
1596
- }, Q = {
2794
+ activeValue: u,
2795
+ onSelect: l,
2796
+ registerItem: a
2797
+ } = mr(), e = u === r;
2798
+ return te(() => a(r), [r, a]), /* @__PURE__ */ b("button", { type: "button", "data-nav-value": r, onClick: () => l(r), ...q(T.button, ze.item, e && ze.itemActive), "aria-current": e ? "page" : void 0, children: s });
2799
+ }
2800
+ const Es = {
2801
+ Root: Xn,
2802
+ Group: Bn,
2803
+ Item: Yn
2804
+ }, Oe = {
1597
2805
  root: {
1598
2806
  k1xSpc: "x3nfvp2",
1599
2807
  kGNEyG: "x6s0dn4",
@@ -1637,21 +2845,21 @@ const ur = {
1637
2845
  kMcinP: "xzpqnlu",
1638
2846
  $$css: !0
1639
2847
  }
1640
- }, qt = {
1641
- sm: Q.sm,
1642
- md: Q.md,
1643
- lg: Q.lg
2848
+ }, Fn = {
2849
+ sm: Oe.sm,
2850
+ md: Oe.md,
2851
+ lg: Oe.lg
1644
2852
  };
1645
- function dr({
1646
- size: e = "md",
1647
- label: t = "Loading"
2853
+ function Is({
2854
+ size: r = "md",
2855
+ label: s = "Loading"
1648
2856
  }) {
1649
- return /* @__PURE__ */ H("div", { role: "status", ...u(d.div, Q.root), children: [
1650
- /* @__PURE__ */ x("div", { ...u(d.div, Q.spinner, qt[e]), "aria-hidden": !0 }),
1651
- /* @__PURE__ */ x("span", { ...u(d.span, Q.srOnly), children: t })
2857
+ return /* @__PURE__ */ le("div", { role: "status", ...q(T.div, Oe.root), children: [
2858
+ /* @__PURE__ */ b("div", { ...q(T.div, Oe.spinner, Fn[r]), "aria-hidden": !0 }),
2859
+ /* @__PURE__ */ b("span", { ...q(T.span, Oe.srOnly), children: s })
1652
2860
  ] });
1653
2861
  }
1654
- const me = {
2862
+ const ir = {
1655
2863
  root: {
1656
2864
  k1xSpc: "x3nfvp2",
1657
2865
  kGNEyG: "x6s0dn4",
@@ -1675,40 +2883,40 @@ const me = {
1675
2883
  kMwMTN: "x3dll8l",
1676
2884
  $$css: !0
1677
2885
  }
1678
- }, St = {
1679
- "x-circle": /* @__PURE__ */ H(Y, { children: [
1680
- /* @__PURE__ */ x(Z, { cx: "12", cy: "12", r: "10" }),
1681
- /* @__PURE__ */ x(xe, { x1: "15", y1: "9", x2: "9", y2: "15" }),
1682
- /* @__PURE__ */ x(xe, { x1: "9", y1: "9", x2: "15", y2: "15" })
2886
+ }, Un = {
2887
+ "x-circle": /* @__PURE__ */ le(Te, { children: [
2888
+ /* @__PURE__ */ b(it, { cx: "12", cy: "12", r: "10" }),
2889
+ /* @__PURE__ */ b(Dt, { x1: "15", y1: "9", x2: "9", y2: "15" }),
2890
+ /* @__PURE__ */ b(Dt, { x1: "9", y1: "9", x2: "15", y2: "15" })
1683
2891
  ] }),
1684
- "check-circle": /* @__PURE__ */ H(Y, { children: [
1685
- /* @__PURE__ */ x(Z, { cx: "12", cy: "12", r: "10" }),
1686
- /* @__PURE__ */ x(ee, { points: "16 10 11 15 8 12" })
2892
+ "check-circle": /* @__PURE__ */ le(Te, { children: [
2893
+ /* @__PURE__ */ b(it, { cx: "12", cy: "12", r: "10" }),
2894
+ /* @__PURE__ */ b(ot, { points: "16 10 11 15 8 12" })
1687
2895
  ] }),
1688
- "check-done": /* @__PURE__ */ H(Y, { children: [
1689
- /* @__PURE__ */ x(Me, { d: "M22 11.08V12a10 10 0 1 1-5.93-9.14" }),
1690
- /* @__PURE__ */ x(ee, { points: "22 4 12 14.01 9 11.01" })
2896
+ "check-done": /* @__PURE__ */ le(Te, { children: [
2897
+ /* @__PURE__ */ b(dr, { d: "M22 11.08V12a10 10 0 1 1-5.93-9.14" }),
2898
+ /* @__PURE__ */ b(ot, { points: "22 4 12 14.01 9 11.01" })
1691
2899
  ] }),
1692
- clock: /* @__PURE__ */ H(Y, { children: [
1693
- /* @__PURE__ */ x(Z, { cx: "12", cy: "12", r: "10" }),
1694
- /* @__PURE__ */ x(ee, { points: "12 6 12 12 16 14" })
2900
+ clock: /* @__PURE__ */ le(Te, { children: [
2901
+ /* @__PURE__ */ b(it, { cx: "12", cy: "12", r: "10" }),
2902
+ /* @__PURE__ */ b(ot, { points: "12 6 12 12 16 14" })
1695
2903
  ] }),
1696
- forbidden: /* @__PURE__ */ H(Y, { children: [
1697
- /* @__PURE__ */ x(Z, { cx: "12", cy: "12", r: "10" }),
1698
- /* @__PURE__ */ x(xe, { x1: "4.93", y1: "4.93", x2: "19.07", y2: "19.07" })
2904
+ forbidden: /* @__PURE__ */ le(Te, { children: [
2905
+ /* @__PURE__ */ b(it, { cx: "12", cy: "12", r: "10" }),
2906
+ /* @__PURE__ */ b(Dt, { x1: "4.93", y1: "4.93", x2: "19.07", y2: "19.07" })
1699
2907
  ] })
1700
2908
  };
1701
- function ar({
1702
- name: e,
1703
- size: t = 48,
1704
- variant: r = "muted"
2909
+ function Rs({
2910
+ name: r,
2911
+ size: s = 48,
2912
+ variant: u = "muted"
1705
2913
  }) {
1706
- return /* @__PURE__ */ x("div", { ...u(d.div, me.root, me[r]), children: /* @__PURE__ */ x(ke, { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", width: t, height: t, children: St[e] }) });
2914
+ return /* @__PURE__ */ b("div", { ...q(T.div, ir.root, ir[u]), children: /* @__PURE__ */ b(Ft, { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", width: s, height: s, children: Un[r] }) });
1707
2915
  }
1708
- const It = {
2916
+ const Kn = {
1709
2917
  kumcoG: "xqketvx",
1710
2918
  $$css: !0
1711
- }, A = {
2919
+ }, se = {
1712
2920
  root: {
1713
2921
  kMzoRj: "xmkeg23",
1714
2922
  ksu8eU: "x1y0btm7",
@@ -1784,91 +2992,91 @@ const It = {
1784
2992
  kWqL5O: "xgfja2r",
1785
2993
  $$css: !0
1786
2994
  },
1787
- gridColumns: (e) => [It, {
1788
- "--x-gridTemplateColumns": `repeat(${e}, 1fr)` != null ? `repeat(${e}, 1fr)` : void 0
2995
+ gridColumns: (r) => [Kn, {
2996
+ "--x-gridTemplateColumns": `repeat(${r}, 1fr)` != null ? `repeat(${r}, 1fr)` : void 0
1789
2997
  }]
1790
- }, He = L(null);
1791
- function ce() {
1792
- const e = G(He);
1793
- if (!e) throw new Error("Table compound components must be used within Table.Root");
1794
- return e;
1795
- }
1796
- const ae = L(!1);
1797
- function Wt({
1798
- children: e,
1799
- variant: t = "default",
1800
- size: r = "md",
1801
- columns: n
2998
+ }, br = me(null);
2999
+ function ft() {
3000
+ const r = de(br);
3001
+ if (!r) throw new Error("Table compound components must be used within Table.Root");
3002
+ return r;
3003
+ }
3004
+ const Kt = me(!1);
3005
+ function Jn({
3006
+ children: r,
3007
+ variant: s = "default",
3008
+ size: u = "md",
3009
+ columns: l
1802
3010
  }) {
1803
- return /* @__PURE__ */ x(He.Provider, { value: {
1804
- variant: t,
1805
- size: r,
1806
- columns: n,
3011
+ return /* @__PURE__ */ b(br.Provider, { value: {
3012
+ variant: s,
3013
+ size: u,
3014
+ columns: l,
1807
3015
  isHeader: !1
1808
- }, children: /* @__PURE__ */ x("div", { role: "table", ...u(d.div, A.root), children: e }) });
3016
+ }, children: /* @__PURE__ */ b("div", { role: "table", ...q(T.div, se.root), children: r }) });
1809
3017
  }
1810
- function Tt({
1811
- children: e
3018
+ function _n({
3019
+ children: r
1812
3020
  }) {
1813
- return /* @__PURE__ */ x(ae.Provider, { value: !0, children: /* @__PURE__ */ x("div", { role: "rowgroup", ...u(d.div, A.header), children: e }) });
3021
+ return /* @__PURE__ */ b(Kt.Provider, { value: !0, children: /* @__PURE__ */ b("div", { role: "rowgroup", ...q(T.div, se.header), children: r }) });
1814
3022
  }
1815
- function At({
1816
- children: e
3023
+ function Qn({
3024
+ children: r
1817
3025
  }) {
1818
3026
  const {
1819
- variant: t
1820
- } = ce(), r = ye.toArray(e);
1821
- return /* @__PURE__ */ x(ae.Provider, { value: !1, children: /* @__PURE__ */ x("div", { role: "rowgroup", ...u(d.div), children: r.map((n, o) => t === "striped" ? /* @__PURE__ */ x(Ee.Provider, { value: o, children: n }, o) : n) }) });
3027
+ variant: s
3028
+ } = ft(), u = cr.toArray(r);
3029
+ return /* @__PURE__ */ b(Kt.Provider, { value: !1, children: /* @__PURE__ */ b("div", { role: "rowgroup", ...q(T.div), children: u.map((l, a) => s === "striped" ? /* @__PURE__ */ b(wr.Provider, { value: a, children: l }, a) : l) }) });
1822
3030
  }
1823
- const Ee = L(-1);
1824
- function Ht({
1825
- children: e
3031
+ const wr = me(-1);
3032
+ function Zn({
3033
+ children: r
1826
3034
  }) {
1827
3035
  const {
1828
- variant: t,
1829
- columns: r
1830
- } = ce(), n = G(ae), o = G(Ee), s = o >= 0 && o % 2 === 1, i = ye.toArray(e);
1831
- return /* @__PURE__ */ x("div", { role: "row", ...u(d.div, A.row, A.gridColumns(r), !n && A.bodyRow, !n && t === "striped" && s && A.stripedEven), children: t === "bordered" ? i.map((c, a) => /* @__PURE__ */ x(fe.Provider, { value: {
1832
- index: a,
1833
- total: i.length
1834
- }, children: c }, a)) : e });
1835
- }
1836
- const fe = L({
3036
+ variant: s,
3037
+ columns: u
3038
+ } = ft(), l = de(Kt), a = de(wr), e = a >= 0 && a % 2 === 1, n = cr.toArray(r);
3039
+ return /* @__PURE__ */ b("div", { role: "row", ...q(T.div, se.row, se.gridColumns(u), !l && se.bodyRow, !l && s === "striped" && e && se.stripedEven), children: s === "bordered" ? n.map((f, h) => /* @__PURE__ */ b(Jt.Provider, { value: {
3040
+ index: h,
3041
+ total: n.length
3042
+ }, children: f }, h)) : r });
3043
+ }
3044
+ const Jt = me({
1837
3045
  index: 0,
1838
3046
  total: 0
1839
3047
  });
1840
- function Et({
1841
- children: e
3048
+ function es({
3049
+ children: r
1842
3050
  }) {
1843
3051
  const {
1844
- size: t,
1845
- variant: r
1846
- } = ce(), {
1847
- index: n,
1848
- total: o
1849
- } = G(fe), s = r === "bordered" && n === o - 1;
1850
- return /* @__PURE__ */ x("div", { role: "columnheader", ...u(d.div, A.headerCell, t === "sm" ? A.cellSm : A.cellMd, r === "bordered" && A.borderedCell, s && A.borderedCellLast), children: e });
1851
- }
1852
- function Gt({
1853
- children: e
3052
+ size: s,
3053
+ variant: u
3054
+ } = ft(), {
3055
+ index: l,
3056
+ total: a
3057
+ } = de(Jt), e = u === "bordered" && l === a - 1;
3058
+ return /* @__PURE__ */ b("div", { role: "columnheader", ...q(T.div, se.headerCell, s === "sm" ? se.cellSm : se.cellMd, u === "bordered" && se.borderedCell, e && se.borderedCellLast), children: r });
3059
+ }
3060
+ function ts({
3061
+ children: r
1854
3062
  }) {
1855
3063
  const {
1856
- size: t,
1857
- variant: r
1858
- } = ce(), {
1859
- index: n,
1860
- total: o
1861
- } = G(fe), s = r === "bordered" && n === o - 1;
1862
- return /* @__PURE__ */ x("div", { role: "cell", ...u(d.div, A.cell, t === "sm" ? A.cellSm : A.cellMd, r === "bordered" && A.borderedCell, s && A.borderedCellLast), children: e });
1863
- }
1864
- const fr = {
1865
- Root: Wt,
1866
- Header: Tt,
1867
- Body: At,
1868
- Row: Ht,
1869
- HeaderCell: Et,
1870
- Cell: Gt
1871
- }, N = {
3064
+ size: s,
3065
+ variant: u
3066
+ } = ft(), {
3067
+ index: l,
3068
+ total: a
3069
+ } = de(Jt), e = u === "bordered" && l === a - 1;
3070
+ return /* @__PURE__ */ b("div", { role: "cell", ...q(T.div, se.cell, s === "sm" ? se.cellSm : se.cellMd, u === "bordered" && se.borderedCell, e && se.borderedCellLast), children: r });
3071
+ }
3072
+ const Cs = {
3073
+ Root: Jn,
3074
+ Header: _n,
3075
+ Body: Qn,
3076
+ Row: Zn,
3077
+ HeaderCell: es,
3078
+ Cell: ts
3079
+ }, ve = {
1872
3080
  root: {
1873
3081
  k1xSpc: "x78zum5",
1874
3082
  kXwgrk: "xdt5ytf",
@@ -1956,145 +3164,145 @@ const fr = {
1956
3164
  kE3dHu: "xsk07c1",
1957
3165
  $$css: !0
1958
3166
  }
1959
- }, Ge = L(null);
1960
- function ge() {
1961
- const e = G(Ge);
1962
- if (!e) throw new Error("Tabs compound components must be used within Tabs.Root");
1963
- return e;
3167
+ }, yr = me(null);
3168
+ function _t() {
3169
+ const r = de(yr);
3170
+ if (!r) throw new Error("Tabs compound components must be used within Tabs.Root");
3171
+ return r;
1964
3172
  }
1965
- function Ct({
1966
- value: e,
1967
- defaultValue: t,
1968
- onValueChange: r,
1969
- orientation: n = "horizontal"
3173
+ function rs({
3174
+ value: r,
3175
+ defaultValue: s,
3176
+ onValueChange: u,
3177
+ orientation: l = "horizontal"
1970
3178
  }) {
1971
- const [o, s] = de(e, t ?? null, r ? (l) => {
1972
- l !== null && r(l);
1973
- } : void 0), i = y(/* @__PURE__ */ new Map()), c = y([]), a = I((l, k) => (i.current.set(l, k), c.current.includes(l) || c.current.push(l), () => {
1974
- i.current.delete(l), c.current = c.current.filter((f) => f !== l);
3179
+ const [a, e] = Ut(r, s ?? null, u ? (v) => {
3180
+ v !== null && u(v);
3181
+ } : void 0), n = K(/* @__PURE__ */ new Map()), f = K([]), h = ee((v, w) => (n.current.set(v, w), f.current.includes(v) || f.current.push(v), () => {
3182
+ n.current.delete(v), f.current = f.current.filter((M) => M !== v);
1975
3183
  }), []);
1976
3184
  return {
1977
- activeValue: o,
1978
- onSelect: s,
1979
- orientation: n,
1980
- registerTab: a,
1981
- tabsRef: i,
1982
- orderRef: c
3185
+ activeValue: a,
3186
+ onSelect: e,
3187
+ orientation: l,
3188
+ registerTab: h,
3189
+ tabsRef: n,
3190
+ orderRef: f
1983
3191
  };
1984
3192
  }
1985
- function Vt({
1986
- children: e,
1987
- value: t,
1988
- defaultValue: r,
1989
- onValueChange: n,
1990
- orientation: o = "horizontal"
3193
+ function ns({
3194
+ children: r,
3195
+ value: s,
3196
+ defaultValue: u,
3197
+ onValueChange: l,
3198
+ orientation: a = "horizontal"
1991
3199
  }) {
1992
- const s = Ct({
1993
- value: t,
1994
- defaultValue: r,
1995
- onValueChange: n,
1996
- orientation: o
3200
+ const e = rs({
3201
+ value: s,
3202
+ defaultValue: u,
3203
+ onValueChange: l,
3204
+ orientation: a
1997
3205
  });
1998
- return /* @__PURE__ */ x(Ge.Provider, { value: s, children: /* @__PURE__ */ x("div", { ...u(d.div, N.root, o === "vertical" && N.rootVertical), children: e }) });
3206
+ return /* @__PURE__ */ b(yr.Provider, { value: e, children: /* @__PURE__ */ b("div", { ...q(T.div, ve.root, a === "vertical" && ve.rootVertical), children: r }) });
1999
3207
  }
2000
- function Nt({
2001
- children: e
3208
+ function ss({
3209
+ children: r
2002
3210
  }) {
2003
3211
  const {
2004
- orientation: t,
2005
- activeValue: r,
2006
- onSelect: n,
2007
- tabsRef: o,
2008
- orderRef: s
2009
- } = ge(), i = y(null);
2010
- return W(() => {
2011
- const c = i.current;
2012
- if (!c) return;
2013
- function a(l) {
2014
- const k = s.current, f = o.current;
2015
- if (k.length === 0) return;
2016
- const v = this, w = t === "horizontal" ? "ArrowLeft" : "ArrowUp", p = t === "horizontal" ? "ArrowRight" : "ArrowDown";
2017
- let $ = null;
2018
- switch (l.key) {
2019
- case p: {
2020
- l.preventDefault();
2021
- const h = r ? k.indexOf(r) : -1;
2022
- for (let m = 1; m <= k.length; m++) {
2023
- const g = (h + m) % k.length, b = k[g];
2024
- if (!f.get(b)) {
2025
- $ = b;
3212
+ orientation: s,
3213
+ activeValue: u,
3214
+ onSelect: l,
3215
+ tabsRef: a,
3216
+ orderRef: e
3217
+ } = _t(), n = K(null);
3218
+ return te(() => {
3219
+ const f = n.current;
3220
+ if (!f) return;
3221
+ function h(v) {
3222
+ const w = e.current, M = a.current;
3223
+ if (w.length === 0) return;
3224
+ const y = this, m = s === "horizontal" ? "ArrowLeft" : "ArrowUp", g = s === "horizontal" ? "ArrowRight" : "ArrowDown";
3225
+ let j = null;
3226
+ switch (v.key) {
3227
+ case g: {
3228
+ v.preventDefault();
3229
+ const A = u ? w.indexOf(u) : -1;
3230
+ for (let W = 1; W <= w.length; W++) {
3231
+ const I = (A + W) % w.length, N = w[I];
3232
+ if (!M.get(N)) {
3233
+ j = N;
2026
3234
  break;
2027
3235
  }
2028
3236
  }
2029
3237
  break;
2030
3238
  }
2031
- case w: {
2032
- l.preventDefault();
2033
- const h = r ? k.indexOf(r) : 0;
2034
- for (let m = 1; m <= k.length; m++) {
2035
- const g = (h - m + k.length) % k.length, b = k[g];
2036
- if (!f.get(b)) {
2037
- $ = b;
3239
+ case m: {
3240
+ v.preventDefault();
3241
+ const A = u ? w.indexOf(u) : 0;
3242
+ for (let W = 1; W <= w.length; W++) {
3243
+ const I = (A - W + w.length) % w.length, N = w[I];
3244
+ if (!M.get(N)) {
3245
+ j = N;
2038
3246
  break;
2039
3247
  }
2040
3248
  }
2041
3249
  break;
2042
3250
  }
2043
3251
  case "Home": {
2044
- l.preventDefault();
2045
- for (const h of k)
2046
- if (!f.get(h)) {
2047
- $ = h;
3252
+ v.preventDefault();
3253
+ for (const A of w)
3254
+ if (!M.get(A)) {
3255
+ j = A;
2048
3256
  break;
2049
3257
  }
2050
3258
  break;
2051
3259
  }
2052
3260
  case "End": {
2053
- l.preventDefault();
2054
- for (let h = k.length - 1; h >= 0; h--)
2055
- if (!f.get(k[h])) {
2056
- $ = k[h];
3261
+ v.preventDefault();
3262
+ for (let A = w.length - 1; A >= 0; A--)
3263
+ if (!M.get(w[A])) {
3264
+ j = w[A];
2057
3265
  break;
2058
3266
  }
2059
3267
  break;
2060
3268
  }
2061
3269
  }
2062
- $ && (n($), v.querySelector(`[data-tab-value="${$}"]`)?.focus());
3270
+ j && (l(j), y.querySelector(`[data-tab-value="${j}"]`)?.focus());
2063
3271
  }
2064
- return c.addEventListener("keydown", a), () => c.removeEventListener("keydown", a);
2065
- }, [t, r, n, o, s]), /* @__PURE__ */ x("div", { ref: i, role: "tablist", "aria-orientation": t, ...u(d.div, N.list, t === "vertical" && N.listVertical), children: e });
3272
+ return f.addEventListener("keydown", h), () => f.removeEventListener("keydown", h);
3273
+ }, [s, u, l, a, e]), /* @__PURE__ */ b("div", { ref: n, role: "tablist", "aria-orientation": s, ...q(T.div, ve.list, s === "vertical" && ve.listVertical), children: r });
2066
3274
  }
2067
- function Rt({
2068
- value: e,
2069
- disabled: t = !1,
2070
- children: r
3275
+ function is({
3276
+ value: r,
3277
+ disabled: s = !1,
3278
+ children: u
2071
3279
  }) {
2072
3280
  const {
2073
- activeValue: n,
2074
- onSelect: o,
2075
- orientation: s,
2076
- registerTab: i
2077
- } = ge(), c = n === e, a = X(), l = `${a}-panel`;
2078
- return W(() => i(e, t), [e, t, i]), /* @__PURE__ */ x("button", { type: "button", role: "tab", id: a, "aria-selected": c, "aria-controls": l, "aria-disabled": t || void 0, "data-tab-value": e, tabIndex: c ? 0 : -1, onClick: () => {
2079
- t || o(e);
2080
- }, ...u(d.button, N.tab, s === "vertical" && N.tabVertical, c && (s === "vertical" ? N.tabActiveVertical : N.tabActiveHorizontal), t && N.tabDisabled), children: r });
3281
+ activeValue: l,
3282
+ onSelect: a,
3283
+ orientation: e,
3284
+ registerTab: n
3285
+ } = _t(), f = l === r, h = Se(), v = `${h}-panel`;
3286
+ return te(() => n(r, s), [r, s, n]), /* @__PURE__ */ b("button", { type: "button", role: "tab", id: h, "aria-selected": f, "aria-controls": v, "aria-disabled": s || void 0, "data-tab-value": r, tabIndex: f ? 0 : -1, onClick: () => {
3287
+ s || a(r);
3288
+ }, ...q(T.button, ve.tab, e === "vertical" && ve.tabVertical, f && (e === "vertical" ? ve.tabActiveVertical : ve.tabActiveHorizontal), s && ve.tabDisabled), children: u });
2081
3289
  }
2082
- function Lt({
2083
- value: e,
2084
- children: t
3290
+ function os({
3291
+ value: r,
3292
+ children: s
2085
3293
  }) {
2086
3294
  const {
2087
- activeValue: r,
2088
- orientation: n
2089
- } = ge();
2090
- return r !== e ? null : /* @__PURE__ */ x("div", { role: "tabpanel", ...u(d.div, N.panel, n === "vertical" && N.panelVertical), children: t });
2091
- }
2092
- const gr = {
2093
- Root: Vt,
2094
- List: Nt,
2095
- Tab: Rt,
2096
- Panel: Lt
2097
- }, be = {
3295
+ activeValue: u,
3296
+ orientation: l
3297
+ } = _t();
3298
+ return u !== r ? null : /* @__PURE__ */ b("div", { role: "tabpanel", ...q(T.div, ve.panel, l === "vertical" && ve.panelVertical), children: s });
3299
+ }
3300
+ const Ws = {
3301
+ Root: ns,
3302
+ List: ss,
3303
+ Tab: is,
3304
+ Panel: os
3305
+ }, or = {
2098
3306
  base: {
2099
3307
  kzqmXN: "xh8yej3",
2100
3308
  kLKAdn: "x1g9jjt5",
@@ -2128,21 +3336,21 @@ const gr = {
2128
3336
  $$css: !0
2129
3337
  }
2130
3338
  };
2131
- function pr({
2132
- variant: e = "default",
2133
- name: t,
2134
- placeholder: r,
2135
- required: n,
2136
- rows: o = 3,
2137
- value: s,
2138
- defaultValue: i,
2139
- disabled: c,
2140
- onChange: a
3339
+ function Hs({
3340
+ variant: r = "default",
3341
+ name: s,
3342
+ placeholder: u,
3343
+ required: l,
3344
+ rows: a = 3,
3345
+ value: e,
3346
+ defaultValue: n,
3347
+ disabled: f,
3348
+ onChange: h
2141
3349
  }) {
2142
- const l = F();
2143
- return /* @__PURE__ */ x("textarea", { id: l?.controlId, name: t, placeholder: r, required: n, rows: o, value: s, defaultValue: i, disabled: c, "aria-describedby": l ? `${l.descriptionId} ${l.invalid ? l.errorId : ""}`.trim() : void 0, "aria-invalid": l?.invalid || e === "error" || void 0, onChange: a, ...u(d.textarea, be.base, be[e]), dir: "auto" });
3350
+ const v = Ke();
3351
+ return /* @__PURE__ */ b("textarea", { id: v?.controlId, name: s, placeholder: u, required: l, rows: a, value: e, defaultValue: n, disabled: f, "aria-describedby": v ? `${v.descriptionId} ${v.invalid ? v.errorId : ""}`.trim() : void 0, "aria-invalid": v?.invalid || r === "error" || void 0, onChange: h, ...q(T.textarea, or.base, or[r]), dir: "auto" });
2144
3352
  }
2145
- const hr = {
3353
+ const Gs = {
2146
3354
  bg: "var(--bg-xqkwqtp)",
2147
3355
  bgCard: "var(--bgCard-xj2l5r)",
2148
3356
  bgCardHover: "var(--bgCardHover-xlxk7vw)",
@@ -2170,7 +3378,7 @@ const hr = {
2170
3378
  infoBorder: "var(--infoBorder-xnevk3x)",
2171
3379
  infoText: "var(--infoText-x19pseus)",
2172
3380
  __varGroupHash__: "xjvd03b"
2173
- }, vr = {
3381
+ }, Os = {
2174
3382
  xs: "var(--xs-xxfyjsd)",
2175
3383
  sm: "var(--sm-xbh8y7f)",
2176
3384
  md: "var(--md-x3pkb85)",
@@ -2178,13 +3386,13 @@ const hr = {
2178
3386
  xl: "var(--xl-xttpygj)",
2179
3387
  xxl: "var(--xxl-xbe9eha)",
2180
3388
  __varGroupHash__: "x6uc9q"
2181
- }, $r = {
3389
+ }, Ns = {
2182
3390
  sm: "var(--sm-x1bhtfs5)",
2183
3391
  md: "var(--md-xx2g89g)",
2184
3392
  lg: "var(--lg-xwd56yl)",
2185
3393
  full: "var(--full-x9vxdtd)",
2186
3394
  __varGroupHash__: "xw3ffwm"
2187
- }, mr = {
3395
+ }, Ls = {
2188
3396
  fontFamily: "var(--fontFamily-xvrmnat)",
2189
3397
  fontSizeXs: "var(--fontSizeXs-x1w5m325)",
2190
3398
  fontSizeSm: "var(--fontSizeSm-x1bjjs4u)",
@@ -2198,40 +3406,40 @@ const hr = {
2198
3406
  fontWeightBold: "var(--fontWeightBold-x1pjkvwg)",
2199
3407
  lineHeight: "var(--lineHeight-x1gubzd5)",
2200
3408
  __varGroupHash__: "xs62swl"
2201
- }, br = {
3409
+ }, Ds = {
2202
3410
  sm: "var(--sm-x17hhtln)",
2203
3411
  md: "var(--md-x1oyt0aw)",
2204
3412
  lg: "var(--lg-x1mxd62i)",
2205
3413
  __varGroupHash__: "x13v825q"
2206
- }, Ot = {
3414
+ }, ls = {
2207
3415
  xjvd03b: "x18itf25 xjvd03b",
2208
3416
  $$css: !0
2209
- }, Dt = {
3417
+ }, cs = {
2210
3418
  x13v825q: "xv9ibj0 x13v825q",
2211
3419
  $$css: !0
2212
- }, Bt = {
3420
+ }, as = {
2213
3421
  xjvd03b: "x1qgt5a2 xjvd03b",
2214
3422
  $$css: !0
2215
- }, Pt = {
3423
+ }, us = {
2216
3424
  x13v825q: "x15e39jv x13v825q",
2217
3425
  $$css: !0
2218
- }, Xt = {
2219
- light: [Ot, Dt],
2220
- "high-contrast": [Bt, Pt]
2221
- }, Yt = {
3426
+ }, xs = {
3427
+ light: [ls, cs],
3428
+ "high-contrast": [as, us]
3429
+ }, fs = {
2222
3430
  root: {
2223
3431
  k1xSpc: "xjp7ctv",
2224
3432
  $$css: !0
2225
3433
  }
2226
3434
  };
2227
- function wr({
2228
- theme: e = "dark",
2229
- children: t
3435
+ function Ps({
3436
+ theme: r = "dark",
3437
+ children: s
2230
3438
  }) {
2231
- const r = Xt[e], n = [r?.[0], r?.[1], Yt.root];
2232
- return /* @__PURE__ */ x("div", { ...u(d.div, n), children: t });
3439
+ const u = xs[r], l = [u?.[0], u?.[1], fs.root];
3440
+ return /* @__PURE__ */ b("div", { ...q(T.div, l), children: s });
2233
3441
  }
2234
- const le = {
3442
+ const Vt = {
2235
3443
  root: {
2236
3444
  kVAEAm: "x1n2onr6",
2237
3445
  k1xSpc: "x3nfvp2",
@@ -2286,78 +3494,78 @@ const le = {
2286
3494
  koQZXg: "xkhkick",
2287
3495
  $$css: !0
2288
3496
  }
2289
- }, Ce = L(null);
2290
- function Kt() {
2291
- const e = G(Ce);
2292
- if (!e) throw new Error("Tooltip compound components must be used within Tooltip.Root");
2293
- return e;
2294
- }
2295
- function Ut({
2296
- children: e,
2297
- content: t,
2298
- placement: r = "top",
2299
- delay: n = 300
3497
+ }, Mr = me(null);
3498
+ function ks() {
3499
+ const r = de(Mr);
3500
+ if (!r) throw new Error("Tooltip compound components must be used within Tooltip.Root");
3501
+ return r;
3502
+ }
3503
+ function ds({
3504
+ children: r,
3505
+ content: s,
3506
+ placement: u = "top",
3507
+ delay: l = 300
2300
3508
  }) {
2301
- const [o, s] = T(!1), i = X(), c = y(null), a = I(() => {
2302
- c.current && clearTimeout(c.current), c.current = setTimeout(() => s(!0), n);
2303
- }, [n]), l = I(() => {
2304
- c.current && clearTimeout(c.current), c.current = null, s(!1);
3509
+ const [a, e] = ne(!1), n = Se(), f = K(null), h = ee(() => {
3510
+ f.current && clearTimeout(f.current), f.current = setTimeout(() => e(!0), l);
3511
+ }, [l]), v = ee(() => {
3512
+ f.current && clearTimeout(f.current), f.current = null, e(!1);
2305
3513
  }, []);
2306
- return /* @__PURE__ */ x(Ce.Provider, { value: {
2307
- open: o,
2308
- show: a,
2309
- hide: l,
2310
- tooltipId: i,
2311
- placement: r
2312
- }, children: /* @__PURE__ */ H("div", { ...u(d.div, le.root), children: [
2313
- e,
2314
- o && /* @__PURE__ */ x("div", { id: i, role: "tooltip", ...u(d.div, le.popup, le[r]), children: t })
3514
+ return /* @__PURE__ */ b(Mr.Provider, { value: {
3515
+ open: a,
3516
+ show: h,
3517
+ hide: v,
3518
+ tooltipId: n,
3519
+ placement: u
3520
+ }, children: /* @__PURE__ */ le("div", { ...q(T.div, Vt.root), children: [
3521
+ r,
3522
+ a && /* @__PURE__ */ b("div", { id: n, role: "tooltip", ...q(T.div, Vt.popup, Vt[u]), children: s })
2315
3523
  ] }) });
2316
3524
  }
2317
- function Jt({
2318
- children: e
3525
+ function ps({
3526
+ children: r
2319
3527
  }) {
2320
3528
  const {
2321
- open: t,
2322
- show: r,
2323
- hide: n,
2324
- tooltipId: o
2325
- } = Kt();
2326
- return /* @__PURE__ */ x("div", { onPointerEnter: r, onPointerLeave: n, onFocus: r, onBlur: n, "aria-describedby": t ? o : void 0, ...u(d.div), children: e });
2327
- }
2328
- const yr = {
2329
- Root: Ut,
2330
- Trigger: Jt
3529
+ open: s,
3530
+ show: u,
3531
+ hide: l,
3532
+ tooltipId: a
3533
+ } = ks();
3534
+ return /* @__PURE__ */ b("div", { onPointerEnter: u, onPointerLeave: l, onFocus: u, onBlur: l, "aria-describedby": s ? a : void 0, ...q(T.div), children: r });
3535
+ }
3536
+ const Vs = {
3537
+ Root: ds,
3538
+ Trigger: ps
2331
3539
  };
2332
3540
  export {
2333
- Zt as Alert,
2334
- er as Badge,
2335
- tr as Button,
2336
- rr as Card,
2337
- nr as Checkbox,
2338
- or as EmptyState,
2339
- sr as Field,
2340
- cr as Input,
2341
- xr as LinkButton,
2342
- ir as Menu,
2343
- lr as ScrollArea,
2344
- kr as Select,
2345
- ur as SideNav,
2346
- dr as Spinner,
2347
- ar as StatusIcon,
2348
- fr as Table,
2349
- gr as Tabs,
2350
- pr as Textarea,
2351
- wr as ThemeProvider,
2352
- yr as Tooltip,
2353
- hr as colors,
2354
- Pt as highContrastShadows,
2355
- Bt as highContrastTheme,
2356
- Dt as lightShadows,
2357
- Ot as lightTheme,
2358
- $r as radii,
2359
- br as shadows,
2360
- vr as spacing,
2361
- mr as typography
3541
+ $s as Alert,
3542
+ ms as Badge,
3543
+ bs as Button,
3544
+ ws as Card,
3545
+ ys as Checkbox,
3546
+ Ms as EmptyState,
3547
+ js as Field,
3548
+ zs as Input,
3549
+ Ss as LinkButton,
3550
+ As as Menu,
3551
+ qs as ScrollArea,
3552
+ Ts as Select,
3553
+ Es as SideNav,
3554
+ Is as Spinner,
3555
+ Rs as StatusIcon,
3556
+ Cs as Table,
3557
+ Ws as Tabs,
3558
+ Hs as Textarea,
3559
+ Ps as ThemeProvider,
3560
+ Vs as Tooltip,
3561
+ Gs as colors,
3562
+ us as highContrastShadows,
3563
+ as as highContrastTheme,
3564
+ cs as lightShadows,
3565
+ ls as lightTheme,
3566
+ Ns as radii,
3567
+ Ds as shadows,
3568
+ Os as spacing,
3569
+ Ls as typography
2362
3570
  };
2363
3571
  //# sourceMappingURL=index.js.map