react-semaphor 0.0.484 → 0.0.485

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.
@@ -18,7 +18,7 @@ import J, { createContext as Tt, useState as ue, useEffect as de, useContext as
18
18
  import * as tl from "react-dom";
19
19
  import cu, { createPortal as Cx, flushSync as xs, unstable_batchedUpdates as Dh } from "react-dom";
20
20
  import * as kE from "react/jsx-runtime";
21
- import { jsx as b, Fragment as Xe, jsxs as F } from "react/jsx-runtime";
21
+ import { jsx as b, Fragment as Ye, jsxs as F } from "react/jsx-runtime";
22
22
  function uN(e) {
23
23
  var t, n, r = "";
24
24
  if (typeof e == "string" || typeof e == "number") r += e;
@@ -5240,7 +5240,7 @@ xg.exports;
5240
5240
  var Z = this.has(H) && delete this.__data__[H];
5241
5241
  return this.size -= Z ? 1 : 0, Z;
5242
5242
  }
5243
- function Ye(H) {
5243
+ function Ke(H) {
5244
5244
  var Z = this.__data__;
5245
5245
  if (Ci) {
5246
5246
  var oe = Z[H];
@@ -5256,7 +5256,7 @@ xg.exports;
5256
5256
  var oe = this.__data__;
5257
5257
  return this.size += this.has(H) ? 0 : 1, oe[H] = Ci && Z === void 0 ? r : Z, this;
5258
5258
  }
5259
- Pt.prototype.clear = Hn, Pt.prototype.delete = Ie, Pt.prototype.get = Ye, Pt.prototype.has = at, Pt.prototype.set = nn;
5259
+ Pt.prototype.clear = Hn, Pt.prototype.delete = Ie, Pt.prototype.get = Ke, Pt.prototype.has = at, Pt.prototype.set = nn;
5260
5260
  function zt(H) {
5261
5261
  var Z = -1, oe = H == null ? 0 : H.length;
5262
5262
  for (this.clear(); ++Z < oe; ) {
@@ -7446,7 +7446,7 @@ function GB({
7446
7446
  });
7447
7447
  return o.isSemaphorClient = !0, o;
7448
7448
  });
7449
- return n ? /* @__PURE__ */ b(Xe, { children: e }) : /* @__PURE__ */ b(OB, { client: r, children: e });
7449
+ return n ? /* @__PURE__ */ b(Ye, { children: e }) : /* @__PURE__ */ b(OB, { client: r, children: e });
7450
7450
  }
7451
7451
  const Wa = Fn(({ children: e, className: t, ...n }, r) => /* @__PURE__ */ b("div", { className: se("semaphor-scope", t), ref: r, ...n, children: e })), YB = {
7452
7452
  id: "",
@@ -7879,7 +7879,7 @@ var lw = S.forwardRef((e, t) => {
7879
7879
  return S.Children.count(n) > 1 ? S.Children.only(null) : null;
7880
7880
  });
7881
7881
  lw.displayName = "SlotClone";
7882
- var oV = ({ children: e }) => /* @__PURE__ */ b(Xe, { children: e });
7882
+ var oV = ({ children: e }) => /* @__PURE__ */ b(Ye, { children: e });
7883
7883
  function iV(e) {
7884
7884
  return S.isValidElement(e) && e.type === oV;
7885
7885
  }
@@ -7965,7 +7965,7 @@ var cw = S.forwardRef((e, t) => {
7965
7965
  return S.Children.count(n) > 1 ? S.Children.only(null) : null;
7966
7966
  });
7967
7967
  cw.displayName = "SlotClone";
7968
- var uV = ({ children: e }) => /* @__PURE__ */ b(Xe, { children: e });
7968
+ var uV = ({ children: e }) => /* @__PURE__ */ b(Ye, { children: e });
7969
7969
  function dV(e) {
7970
7970
  return S.isValidElement(e) && e.type === uV;
7971
7971
  }
@@ -31153,7 +31153,7 @@ var i1 = S.forwardRef((e, t) => {
31153
31153
  return S.Children.count(n) > 1 ? S.Children.only(null) : null;
31154
31154
  });
31155
31155
  i1.displayName = "SlotClone";
31156
- var tI = ({ children: e }) => /* @__PURE__ */ b(Xe, { children: e });
31156
+ var tI = ({ children: e }) => /* @__PURE__ */ b(Ye, { children: e });
31157
31157
  function _te(e) {
31158
31158
  return S.isValidElement(e) && e.type === tI;
31159
31159
  }
@@ -31564,7 +31564,7 @@ function l1({ card: e, isLoading: t, data: n }) {
31564
31564
  }
31565
31565
  return (
31566
31566
  // <ScrollArea className="mx-3 my-6 overflow-y-auto break-words px-3">
31567
- /* @__PURE__ */ F(Xe, { children: [
31567
+ /* @__PURE__ */ F(Ye, { children: [
31568
31568
  !s && d(),
31569
31569
  s === !0 && u()
31570
31570
  ] })
@@ -31824,7 +31824,7 @@ function eP() {
31824
31824
  x && (s == null || s(x, C));
31825
31825
  }
31826
31826
  function _() {
31827
- return /* @__PURE__ */ F(Xe, { children: [
31827
+ return /* @__PURE__ */ F(Ye, { children: [
31828
31828
  /* @__PURE__ */ b(Zc, {}),
31829
31829
  /* @__PURE__ */ F("div", { className: "space-y-3", children: [
31830
31830
  /* @__PURE__ */ b("p", { className: "text-xs text-muted-foreground", children: "Start with these filters? Set them as default." }),
@@ -34036,7 +34036,7 @@ var m1 = S.forwardRef((e, t) => {
34036
34036
  return S.Children.count(n) > 1 ? S.Children.only(null) : null;
34037
34037
  });
34038
34038
  m1.displayName = "SlotClone";
34039
- var ure = ({ children: e }) => /* @__PURE__ */ b(Xe, { children: e });
34039
+ var ure = ({ children: e }) => /* @__PURE__ */ b(Ye, { children: e });
34040
34040
  function dre(e) {
34041
34041
  return S.isValidElement(e) && e.type === ure;
34042
34042
  }
@@ -34718,7 +34718,7 @@ var UI = "SelectValue", qI = S.forwardRef(
34718
34718
  ...s,
34719
34719
  ref: d,
34720
34720
  style: { pointerEvents: "none" },
34721
- children: h4(l.value) ? /* @__PURE__ */ b(Xe, { children: a }) : i
34721
+ children: h4(l.value) ? /* @__PURE__ */ b(Ye, { children: a }) : i
34722
34722
  }
34723
34723
  );
34724
34724
  }
@@ -35057,7 +35057,7 @@ y1.displayName = coe;
35057
35057
  var [uoe, mC] = xu(pl, {}), v1 = "SelectViewport", JI = S.forwardRef(
35058
35058
  (e, t) => {
35059
35059
  const { __scopeSelect: n, nonce: r, ...o } = e, i = Ka(v1, n), a = mC(v1, n), s = Ue(t, i.onViewportChange), l = S.useRef(0);
35060
- return /* @__PURE__ */ F(Xe, { children: [
35060
+ return /* @__PURE__ */ F(Ye, { children: [
35061
35061
  /* @__PURE__ */ b(
35062
35062
  "style",
35063
35063
  {
@@ -35219,7 +35219,7 @@ var gd = "SelectItemText", a4 = S.forwardRef(
35219
35219
  () => /* @__PURE__ */ b("option", { value: l.value, disabled: l.disabled, children: h }, l.value),
35220
35220
  [l.disabled, l.value, h]
35221
35221
  ), { onNativeOptionAdd: g, onNativeOptionRemove: m } = c;
35222
- return Yn(() => (g(p), () => m(p)), [g, m, p]), /* @__PURE__ */ F(Xe, { children: [
35222
+ return Yn(() => (g(p), () => m(p)), [g, m, p]), /* @__PURE__ */ F(Ye, { children: [
35223
35223
  /* @__PURE__ */ b(Ce.span, { id: l.textId, ...i, ref: f }),
35224
35224
  l.isSelected && a.valueNode && !a.valueNodeHasChildren ? tl.createPortal(i.children, a.valueNode) : null
35225
35225
  ] });
@@ -35505,7 +35505,7 @@ var C1 = S.forwardRef((e, t) => {
35505
35505
  return S.Children.count(n) > 1 ? S.Children.only(null) : null;
35506
35506
  });
35507
35507
  C1.displayName = "SlotClone";
35508
- var Eoe = ({ children: e }) => /* @__PURE__ */ b(Xe, { children: e });
35508
+ var Eoe = ({ children: e }) => /* @__PURE__ */ b(Ye, { children: e });
35509
35509
  function Roe(e) {
35510
35510
  return S.isValidElement(e) && e.type === Eoe;
35511
35511
  }
@@ -35990,7 +35990,7 @@ function Zoe({
35990
35990
  (T) => T.actions.setCardPreferences
35991
35991
  );
35992
35992
  function P() {
35993
- return /* @__PURE__ */ F(Xe, { children: [
35993
+ return /* @__PURE__ */ F(Ye, { children: [
35994
35994
  /* @__PURE__ */ F("div", { className: "grid grid-cols-9 items-center gap-2", children: [
35995
35995
  /* @__PURE__ */ b(Ne, { className: "col-span-3", htmlFor: "format", children: "Text Align" }),
35996
35996
  /* @__PURE__ */ F(
@@ -36029,7 +36029,7 @@ function Zoe({
36029
36029
  const T = [
36030
36030
  ...new Set(WE.map((I) => I.currency))
36031
36031
  ];
36032
- return /* @__PURE__ */ b(Xe, { children: /* @__PURE__ */ F("div", { className: "grid grid-cols-9 items-center gap-2", children: [
36032
+ return /* @__PURE__ */ b(Ye, { children: /* @__PURE__ */ F("div", { className: "grid grid-cols-9 items-center gap-2", children: [
36033
36033
  /* @__PURE__ */ b(Ne, { className: "col-span-3", htmlFor: "format", children: "Locale" }),
36034
36034
  /* @__PURE__ */ F(mn, { value: h, onValueChange: (I) => p(I), children: [
36035
36035
  /* @__PURE__ */ b(un, { className: "col-span-6 h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ b(bn, {}) }),
@@ -36080,7 +36080,7 @@ function Zoe({
36080
36080
  ] }) });
36081
36081
  }
36082
36082
  function O() {
36083
- return /* @__PURE__ */ b(Xe, { children: /* @__PURE__ */ F("div", { className: "grid grid-cols-9 items-center gap-2", children: [
36083
+ return /* @__PURE__ */ b(Ye, { children: /* @__PURE__ */ F("div", { className: "grid grid-cols-9 items-center gap-2", children: [
36084
36084
  /* @__PURE__ */ b(Ne, { className: "col-span-3", htmlFor: "format", children: "Locale" }),
36085
36085
  /* @__PURE__ */ F(
36086
36086
  mn,
@@ -36261,7 +36261,7 @@ function Zoe({
36261
36261
  /* @__PURE__ */ b(lg, {}),
36262
36262
  i === "number" && N(),
36263
36263
  i === "date" && O(),
36264
- i === "number" && /* @__PURE__ */ F(Xe, { children: [
36264
+ i === "number" && /* @__PURE__ */ F(Ye, { children: [
36265
36265
  /* @__PURE__ */ b(lg, {}),
36266
36266
  /* @__PURE__ */ b(
36267
36267
  joe,
@@ -36499,7 +36499,7 @@ $4.displayName = vC;
36499
36499
  var z4 = "ScrollAreaViewport", B4 = S.forwardRef(
36500
36500
  (e, t) => {
36501
36501
  const { __scopeScrollArea: n, children: r, nonce: o, ...i } = e, a = bo(z4, n), s = S.useRef(null), l = Ue(t, s, a.onViewportChange);
36502
- return /* @__PURE__ */ F(Xe, { children: [
36502
+ return /* @__PURE__ */ F(Ye, { children: [
36503
36503
  /* @__PURE__ */ b(
36504
36504
  "style",
36505
36505
  {
@@ -37112,20 +37112,22 @@ function bie({
37112
37112
  align: "start",
37113
37113
  className: "min-w-[200px] p-0",
37114
37114
  children: /* @__PURE__ */ F("div", { className: "flex flex-col gap-1 p-2", children: [
37115
- /* @__PURE__ */ b(
37116
- tt,
37117
- {
37118
- variant: "ghost",
37119
- size: "sm",
37120
- className: "justify-start font-normal",
37121
- onClick: () => i(!o),
37122
- children: /* @__PURE__ */ F("div", { className: "flex w-full items-center", children: [
37123
- /* @__PURE__ */ b("div", { className: "mr-2 flex h-4 w-4 items-center justify-center", children: o ? /* @__PURE__ */ b(Xi, { className: "h-4 w-4" }) : null }),
37124
- /* @__PURE__ */ b("span", { children: "Show Select Checkbox" })
37125
- ] })
37126
- }
37127
- ),
37128
- /* @__PURE__ */ b(Zc, { className: "my-1" }),
37115
+ v && /* @__PURE__ */ F(Ye, { children: [
37116
+ /* @__PURE__ */ b(
37117
+ tt,
37118
+ {
37119
+ variant: "ghost",
37120
+ size: "sm",
37121
+ className: "justify-start font-normal",
37122
+ onClick: () => i(!o),
37123
+ children: /* @__PURE__ */ F("div", { className: "flex w-full items-center", children: [
37124
+ /* @__PURE__ */ b("div", { className: "mr-2 flex h-4 w-4 items-center justify-center", children: o ? /* @__PURE__ */ b(Xi, { className: "h-4 w-4" }) : null }),
37125
+ /* @__PURE__ */ b("span", { children: "Show Select Checkbox" })
37126
+ ] })
37127
+ }
37128
+ ),
37129
+ /* @__PURE__ */ b(Zc, { className: "my-1" })
37130
+ ] }),
37129
37131
  /* @__PURE__ */ b("div", { className: "max-h-[300px] overflow-y-auto bg-popover", children: /* @__PURE__ */ b("div", { className: "p-1", children: r.filter(
37130
37132
  (_) => _.getCanHide() && _.id !== "select"
37131
37133
  ).map((_) => {
@@ -37182,21 +37184,22 @@ function yie({
37182
37184
  nextPage: u,
37183
37185
  onClearSelection: d
37184
37186
  }) {
37185
- const f = ie((y) => y.themeStyle), h = f == null ? void 0 : f.controlInputRadius, p = ie((y) => y.isVisualEditing), { updatePageSize: g } = hu();
37186
- function m(y) {
37187
- a(Number(y)), p && g(Number(y));
37187
+ const f = ie((v) => v.themeStyle), h = f == null ? void 0 : f.controlInputRadius, p = ie((v) => v.isVisualEditing), { updatePageSize: g } = hu();
37188
+ function m(v) {
37189
+ a(Number(v)), p && g(Number(v));
37188
37190
  }
37191
+ const y = r.toLocaleString();
37189
37192
  return /* @__PURE__ */ F("div", { className: "flex items-center justify-between", children: [
37190
37193
  /* @__PURE__ */ F("div", { className: "hidden flex-1 items-center gap-2 text-sm text-muted-foreground md:flex", children: [
37191
- o > 0 && /* @__PURE__ */ F(Xe, { children: [
37194
+ o > 0 && /* @__PURE__ */ F(Ye, { children: [
37192
37195
  o,
37193
37196
  " of ",
37194
- r,
37197
+ y,
37195
37198
  " row(s) selected",
37196
37199
  " "
37197
37200
  ] }),
37198
- o === 0 && /* @__PURE__ */ F(Xe, { children: [
37199
- r,
37201
+ o === 0 && /* @__PURE__ */ F(Ye, { children: [
37202
+ y,
37200
37203
  " rows"
37201
37204
  ] }),
37202
37205
  o > 0 && /* @__PURE__ */ b(
@@ -37231,7 +37234,7 @@ function yie({
37231
37234
  children: /* @__PURE__ */ b(bn, { placeholder: n })
37232
37235
  }
37233
37236
  ),
37234
- /* @__PURE__ */ b(dn, { side: "top", children: [10, 20, 30, 40, 50].map((y) => /* @__PURE__ */ b(Re, { value: `${y}`, children: y }, y)) })
37237
+ /* @__PURE__ */ b(dn, { side: "top", children: [10, 20, 30, 40, 50].map((v) => /* @__PURE__ */ b(Re, { value: `${v}`, children: v }, v)) })
37235
37238
  ] })
37236
37239
  ] }),
37237
37240
  /* @__PURE__ */ F("div", { className: "flex w-fit items-center justify-center text-sm font-normal text-muted-foreground", children: [
@@ -37681,7 +37684,7 @@ var _1 = S.forwardRef((e, t) => {
37681
37684
  return S.Children.count(n) > 1 ? S.Children.only(null) : null;
37682
37685
  });
37683
37686
  _1.displayName = "SlotClone";
37684
- var Tie = ({ children: e }) => /* @__PURE__ */ b(Xe, { children: e });
37687
+ var Tie = ({ children: e }) => /* @__PURE__ */ b(Ye, { children: e });
37685
37688
  function Iie(e) {
37686
37689
  return S.isValidElement(e) && e.type === Tie;
37687
37690
  }
@@ -37842,7 +37845,7 @@ var Vie = S.forwardRef(
37842
37845
  ), E3 = S.forwardRef(
37843
37846
  (e, t) => {
37844
37847
  const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: i, ...a } = e, s = $o(gl, n), l = S.useRef(null), c = Ue(t, l);
37845
- return Sb(), /* @__PURE__ */ F(Xe, { children: [
37848
+ return Sb(), /* @__PURE__ */ F(Ye, { children: [
37846
37849
  /* @__PURE__ */ b(
37847
37850
  Zf,
37848
37851
  {
@@ -37866,7 +37869,7 @@ var Vie = S.forwardRef(
37866
37869
  )
37867
37870
  }
37868
37871
  ),
37869
- /* @__PURE__ */ F(Xe, { children: [
37872
+ /* @__PURE__ */ F(Ye, { children: [
37870
37873
  /* @__PURE__ */ b(Wie, { titleId: s.titleId }),
37871
37874
  /* @__PURE__ */ b(qie, { contentRef: l, descriptionId: s.descriptionId })
37872
37875
  ] })
@@ -38026,7 +38029,7 @@ var E1 = S.forwardRef((e, t) => {
38026
38029
  return S.Children.count(n) > 1 ? S.Children.only(null) : null;
38027
38030
  });
38028
38031
  E1.displayName = "SlotClone";
38029
- var Kie = ({ children: e }) => /* @__PURE__ */ b(Xe, { children: e });
38032
+ var Kie = ({ children: e }) => /* @__PURE__ */ b(Ye, { children: e });
38030
38033
  function Xie(e) {
38031
38034
  return S.isValidElement(e) && e.type === Kie;
38032
38035
  }
@@ -39221,7 +39224,7 @@ function pse({
39221
39224
  }
39222
39225
  )
39223
39226
  ] }),
39224
- !t.dateFormat.useRelativeTime && /* @__PURE__ */ F(Xe, { children: [
39227
+ !t.dateFormat.useRelativeTime && /* @__PURE__ */ F(Ye, { children: [
39225
39228
  /* @__PURE__ */ F("div", { className: "grid grid-cols-4 items-center gap-4", children: [
39226
39229
  /* @__PURE__ */ b(Ne, { htmlFor: "date-format", className: "text-right", children: "Date Format" }),
39227
39230
  /* @__PURE__ */ F(
@@ -39532,7 +39535,7 @@ function pse({
39532
39535
  /* @__PURE__ */ b(Ne, { htmlFor: "show-databar", className: "ml-2", children: "Display value with a data bar" })
39533
39536
  ] })
39534
39537
  ] }),
39535
- t.numberFormat.showDataBar && /* @__PURE__ */ F(Xe, { children: [
39538
+ t.numberFormat.showDataBar && /* @__PURE__ */ F(Ye, { children: [
39536
39539
  /* @__PURE__ */ F("div", { className: "grid grid-cols-4 items-center gap-4", children: [
39537
39540
  /* @__PURE__ */ b(Ne, { htmlFor: "databar-color", className: "text-right", children: "Bar Color" }),
39538
39541
  /* @__PURE__ */ b("div", { className: "col-span-3", children: /* @__PURE__ */ b(
@@ -40759,7 +40762,7 @@ function Ese({
40759
40762
  e == null || e(o);
40760
40763
  }, [r, o, e]), de(() => {
40761
40764
  t(n.id, (i == null ? void 0 : i.records) || []);
40762
- }, [i == null ? void 0 : i.records, n.id, s, t]), /* @__PURE__ */ b(Xe, {});
40765
+ }, [i == null ? void 0 : i.records, n.id, s, t]), /* @__PURE__ */ b(Ye, {});
40763
40766
  }
40764
40767
  function Rse({
40765
40768
  card: e,
@@ -40791,7 +40794,7 @@ function Rse({
40791
40794
  return /* @__PURE__ */ b("div", { className: "semaphor-custom mb-3 flex grow basis-0 flex-col space-y-2 overflow-y-auto", children: /* @__PURE__ */ F(
40792
40795
  F$,
40793
40796
  {
40794
- fallback: /* @__PURE__ */ b(Xe, {}),
40797
+ fallback: /* @__PURE__ */ b(Ye, {}),
40795
40798
  children: [
40796
40799
  g && d === "single" && /* @__PURE__ */ b(
40797
40800
  g,
@@ -41490,7 +41493,7 @@ const nt = (e, t = null) => e.length >= 3 ? Array.prototype.slice.call(e) : dt(e
41490
41493
  function QF(e) {
41491
41494
  return [...e.slice(0, 3).reverse(), ...e.slice(3)];
41492
41495
  }
41493
- const Ke = {
41496
+ const Xe = {
41494
41497
  format: {},
41495
41498
  autodetect: []
41496
41499
  };
@@ -41501,12 +41504,12 @@ class be {
41501
41504
  return t[0];
41502
41505
  let r = Su(t), o = !1;
41503
41506
  if (!r) {
41504
- o = !0, Ke.sorted || (Ke.autodetect = Ke.autodetect.sort((i, a) => a.p - i.p), Ke.sorted = !0);
41505
- for (let i of Ke.autodetect)
41507
+ o = !0, Xe.sorted || (Xe.autodetect = Xe.autodetect.sort((i, a) => a.p - i.p), Xe.sorted = !0);
41508
+ for (let i of Xe.autodetect)
41506
41509
  if (r = i.test(...t), r) break;
41507
41510
  }
41508
- if (Ke.format[r]) {
41509
- const i = Ke.format[r].apply(
41511
+ if (Xe.format[r]) {
41512
+ const i = Xe.format[r].apply(
41510
41513
  null,
41511
41514
  o ? t : t.slice(0, -1)
41512
41515
  );
@@ -41709,11 +41712,11 @@ be.prototype.name = function() {
41709
41712
  if (ru[t] === e) return t.toLowerCase();
41710
41713
  return e;
41711
41714
  };
41712
- Ke.format.named = (e) => {
41715
+ Xe.format.named = (e) => {
41713
41716
  if (e = e.toLowerCase(), ru[e]) return ZF(ru[e]);
41714
41717
  throw new Error("unknown color name: " + e);
41715
41718
  };
41716
- Ke.autodetect.push({
41719
+ Xe.autodetect.push({
41717
41720
  p: 5,
41718
41721
  test: (e, ...t) => {
41719
41722
  if (!t.length && dt(e) === "string" && ru[e.toLowerCase()])
@@ -41867,8 +41870,8 @@ be.prototype.lab = function() {
41867
41870
  };
41868
41871
  const ile = (...e) => new be(...e, "lab");
41869
41872
  Object.assign(pt, { lab: ile, getLabWhitePoint: hf, setLabWhitePoint: Ui });
41870
- Ke.format.lab = GC;
41871
- Ke.autodetect.push({
41873
+ Xe.format.lab = GC;
41874
+ Xe.autodetect.push({
41872
41875
  p: 2,
41873
41876
  test: (...e) => {
41874
41877
  if (e = nt(e, "lab"), dt(e) === "array" && e.length === 3)
@@ -41950,10 +41953,10 @@ be.prototype.hcl = function() {
41950
41953
  };
41951
41954
  const mle = (...e) => new be(...e, "lch"), ble = (...e) => new be(...e, "hcl");
41952
41955
  Object.assign(pt, { lch: mle, hcl: ble });
41953
- Ke.format.lch = KC;
41954
- Ke.format.hcl = fle;
41956
+ Xe.format.lch = KC;
41957
+ Xe.format.hcl = fle;
41955
41958
  ["lch", "hcl"].forEach(
41956
- (e) => Ke.autodetect.push({
41959
+ (e) => Xe.autodetect.push({
41957
41960
  p: 2,
41958
41961
  test: (...t) => {
41959
41962
  if (t = nt(t, e), dt(t) === "array" && t.length === 3)
@@ -42062,8 +42065,8 @@ be.prototype.num = function() {
42062
42065
  };
42063
42066
  const Cle = (...e) => new be(...e, "num");
42064
42067
  Object.assign(pt, { num: Cle });
42065
- Ke.format.num = xle;
42066
- Ke.autodetect.push({
42068
+ Xe.format.num = xle;
42069
+ Xe.autodetect.push({
42067
42070
  p: 5,
42068
42071
  test: (...e) => {
42069
42072
  if (e.length === 1 && dt(e[0]) === "number" && e[0] >= 0 && e[0] <= 16777215)
@@ -42117,8 +42120,8 @@ be.prototype.hcg = function() {
42117
42120
  };
42118
42121
  const Ple = (...e) => new be(...e, "hcg");
42119
42122
  pt.hcg = Ple;
42120
- Ke.format.hcg = Rle;
42121
- Ke.autodetect.push({
42123
+ Xe.format.hcg = Rle;
42124
+ Xe.autodetect.push({
42122
42125
  p: 1,
42123
42126
  test: (...e) => {
42124
42127
  if (e = nt(e, "hcg"), dt(e) === "array" && e.length === 3)
@@ -42143,8 +42146,8 @@ be.prototype.hsi = function() {
42143
42146
  };
42144
42147
  const Ile = (...e) => new be(...e, "hsi");
42145
42148
  pt.hsi = Ile;
42146
- Ke.format.hsi = Dle;
42147
- Ke.autodetect.push({
42149
+ Xe.format.hsi = Dle;
42150
+ Xe.autodetect.push({
42148
42151
  p: 2,
42149
42152
  test: (...e) => {
42150
42153
  if (e = nt(e, "hsi"), dt(e) === "array" && e.length === 3)
@@ -42180,8 +42183,8 @@ be.prototype.hsl = function() {
42180
42183
  };
42181
42184
  const Lle = (...e) => new be(...e, "hsl");
42182
42185
  pt.hsl = Lle;
42183
- Ke.format.hsl = M1;
42184
- Ke.autodetect.push({
42186
+ Xe.format.hsl = M1;
42187
+ Xe.autodetect.push({
42185
42188
  p: 2,
42186
42189
  test: (...e) => {
42187
42190
  if (e = nt(e, "hsl"), dt(e) === "array" && e.length === 3)
@@ -42232,8 +42235,8 @@ be.prototype.hsv = function() {
42232
42235
  };
42233
42236
  const Wle = (...e) => new be(...e, "hsv");
42234
42237
  pt.hsv = Wle;
42235
- Ke.format.hsv = Ble;
42236
- Ke.autodetect.push({
42238
+ Xe.format.hsv = Ble;
42239
+ Xe.autodetect.push({
42237
42240
  p: 2,
42238
42241
  test: (...e) => {
42239
42242
  if (e = nt(e, "hsv"), dt(e) === "array" && e.length === 3)
@@ -42294,8 +42297,8 @@ be.prototype.oklab = function() {
42294
42297
  };
42295
42298
  const Yle = (...e) => new be(...e, "oklab");
42296
42299
  Object.assign(pt, { oklab: Yle });
42297
- Ke.format.oklab = QC;
42298
- Ke.autodetect.push({
42300
+ Xe.format.oklab = QC;
42301
+ Xe.autodetect.push({
42299
42302
  p: 2,
42300
42303
  test: (...e) => {
42301
42304
  if (e = nt(e, "oklab"), dt(e) === "array" && e.length === 3)
@@ -42574,11 +42577,11 @@ be.prototype.rgba = function(e = !0) {
42574
42577
  };
42575
42578
  const ice = (...e) => new be(...e, "rgb");
42576
42579
  Object.assign(pt, { rgb: ice });
42577
- Ke.format.rgb = (...e) => {
42580
+ Xe.format.rgb = (...e) => {
42578
42581
  const t = nt(e, "rgba");
42579
42582
  return t[3] === void 0 && (t[3] = 1), t;
42580
42583
  };
42581
- Ke.autodetect.push({
42584
+ Xe.autodetect.push({
42582
42585
  p: 3,
42583
42586
  test: (...e) => {
42584
42587
  if (e = nt(e, "rgba"), dt(e) === "array" && (e.length === 3 || e.length === 4 && dt(e[3]) == "number" && e[3] >= 0 && e[3] <= 1))
@@ -42863,8 +42866,8 @@ be.prototype.cmyk = function() {
42863
42866
  };
42864
42867
  const zce = (...e) => new be(...e, "cmyk");
42865
42868
  Object.assign(pt, { cmyk: zce });
42866
- Ke.format.cmyk = Lce;
42867
- Ke.autodetect.push({
42869
+ Xe.format.cmyk = Lce;
42870
+ Xe.autodetect.push({
42868
42871
  p: 2,
42869
42872
  test: (...e) => {
42870
42873
  if (e = nt(e, "cmyk"), dt(e) === "array" && e.length === 4)
@@ -42936,9 +42939,9 @@ const Bce = (...e) => {
42936
42939
  if (e = e.toLowerCase().trim(), e === "transparent")
42937
42940
  return [0, 0, 0, 0];
42938
42941
  let t;
42939
- if (Ke.format.named)
42942
+ if (Xe.format.named)
42940
42943
  try {
42941
- return Ke.format.named(e);
42944
+ return Xe.format.named(e);
42942
42945
  } catch {
42943
42946
  }
42944
42947
  if ((t = e.match(f6)) || (t = e.match(h6))) {
@@ -43012,15 +43015,15 @@ be.prototype.css = function(e) {
43012
43015
  };
43013
43016
  const qce = (...e) => new be(...e, "css");
43014
43017
  pt.css = qce;
43015
- Ke.format.css = e_;
43016
- Ke.autodetect.push({
43018
+ Xe.format.css = e_;
43019
+ Xe.autodetect.push({
43017
43020
  p: 5,
43018
43021
  test: (e, ...t) => {
43019
43022
  if (!t.length && dt(e) === "string" && e_.test(e))
43020
43023
  return "css";
43021
43024
  }
43022
43025
  });
43023
- Ke.format.gl = (...e) => {
43026
+ Xe.format.gl = (...e) => {
43024
43027
  const t = nt(e, "rgba");
43025
43028
  return t[0] *= 255, t[1] *= 255, t[2] *= 255, t;
43026
43029
  };
@@ -43035,8 +43038,8 @@ be.prototype.hex = function(e) {
43035
43038
  };
43036
43039
  const Yce = (...e) => new be(...e, "hex");
43037
43040
  pt.hex = Yce;
43038
- Ke.format.hex = ZF;
43039
- Ke.autodetect.push({
43041
+ Xe.format.hex = ZF;
43042
+ Xe.autodetect.push({
43040
43043
  p: 4,
43041
43044
  test: (e, ...t) => {
43042
43045
  if (!t.length && dt(e) === "string" && [3, 4, 5, 6, 7, 8, 9].indexOf(e.length) >= 0)
@@ -43064,14 +43067,14 @@ be.prototype.temp = be.prototype.kelvin = be.prototype.temperature = function()
43064
43067
  };
43065
43068
  const Vy = (...e) => new be(...e, "temp");
43066
43069
  Object.assign(pt, { temp: Vy, kelvin: Vy, temperature: Vy });
43067
- Ke.format.temp = Ke.format.kelvin = Ke.format.temperature = C6;
43070
+ Xe.format.temp = Xe.format.kelvin = Xe.format.temperature = C6;
43068
43071
  be.prototype.oklch = function() {
43069
43072
  return u6(this._rgb);
43070
43073
  };
43071
43074
  const Qce = (...e) => new be(...e, "oklch");
43072
43075
  Object.assign(pt, { oklch: Qce });
43073
- Ke.format.oklch = d6;
43074
- Ke.autodetect.push({
43076
+ Xe.format.oklch = d6;
43077
+ Xe.autodetect.push({
43075
43078
  p: 2,
43076
43079
  test: (...e) => {
43077
43080
  if (e = nt(e, "oklch"), dt(e) === "array" && e.length === 3)
@@ -43091,7 +43094,7 @@ Object.assign(pt, {
43091
43094
  cubehelix: bce,
43092
43095
  deltaE: Ace,
43093
43096
  distance: Oce,
43094
- input: Ke,
43097
+ input: Xe,
43095
43098
  interpolate: ou,
43096
43099
  limits: l6,
43097
43100
  mix: ou,
@@ -44998,9 +45001,9 @@ function z6(e) {
44998
45001
  function Tde(e) {
44999
45002
  var t, n = Yt(), r = n.fromDate, o = n.toDate, i = n.styles, a = n.locale, s = n.formatters.formatMonthCaption, l = n.classNames, c = n.components, u = n.labels.labelMonthDropdown;
45000
45003
  if (!r)
45001
- return b(Xe, {});
45004
+ return b(Ye, {});
45002
45005
  if (!o)
45003
- return b(Xe, {});
45006
+ return b(Ye, {});
45004
45007
  var d = [];
45005
45008
  if (dde(r, o))
45006
45009
  for (var f = Tr(r), h = r.getMonth(); h <= o.getMonth(); h++)
@@ -45019,9 +45022,9 @@ function Tde(e) {
45019
45022
  function Ide(e) {
45020
45023
  var t, n = e.displayMonth, r = Yt(), o = r.fromDate, i = r.toDate, a = r.locale, s = r.styles, l = r.classNames, c = r.components, u = r.formatters.formatYearCaption, d = r.labels.labelYearDropdown, f = [];
45021
45024
  if (!o)
45022
- return b(Xe, {});
45025
+ return b(Ye, {});
45023
45026
  if (!i)
45024
- return b(Xe, {});
45027
+ return b(Ye, {});
45025
45028
  for (var h = o.getFullYear(), p = i.getFullYear(), g = h; g <= p; g++)
45026
45029
  f.push(BP(k6(/* @__PURE__ */ new Date()), g));
45027
45030
  var m = function(v) {
@@ -45127,7 +45130,7 @@ var gm = Fn(function(e, t) {
45127
45130
  function Ude(e) {
45128
45131
  var t, n, r = Yt(), o = r.dir, i = r.locale, a = r.classNames, s = r.styles, l = r.labels, c = l.labelPrevious, u = l.labelNext, d = r.components;
45129
45132
  if (!e.nextMonth && !e.previousMonth)
45130
- return b(Xe, {});
45133
+ return b(Ye, {});
45131
45134
  var f = c(e.previousMonth, { locale: i }), h = [
45132
45135
  a.nav_button,
45133
45136
  a.nav_button_previous
@@ -45149,11 +45152,11 @@ function jP(e) {
45149
45152
  }
45150
45153
  function qde(e) {
45151
45154
  var t, n = Yt(), r = n.classNames, o = n.disableNavigation, i = n.styles, a = n.captionLayout, s = n.components, l = (t = s == null ? void 0 : s.CaptionLabel) !== null && t !== void 0 ? t : $6, c;
45152
- return o ? c = b(l, { id: e.id, displayMonth: e.displayMonth }) : a === "dropdown" ? c = b(VP, { displayMonth: e.displayMonth, id: e.id }) : a === "dropdown-buttons" ? c = F(Xe, { children: [b(VP, { displayMonth: e.displayMonth, displayIndex: e.displayIndex, id: e.id }), b(jP, { displayMonth: e.displayMonth, displayIndex: e.displayIndex, id: e.id })] }) : c = F(Xe, { children: [b(l, { id: e.id, displayMonth: e.displayMonth, displayIndex: e.displayIndex }), b(jP, { displayMonth: e.displayMonth, id: e.id })] }), b("div", { className: r.caption, style: i.caption, children: c });
45155
+ return o ? c = b(l, { id: e.id, displayMonth: e.displayMonth }) : a === "dropdown" ? c = b(VP, { displayMonth: e.displayMonth, id: e.id }) : a === "dropdown-buttons" ? c = F(Ye, { children: [b(VP, { displayMonth: e.displayMonth, displayIndex: e.displayIndex, id: e.id }), b(jP, { displayMonth: e.displayMonth, displayIndex: e.displayIndex, id: e.id })] }) : c = F(Ye, { children: [b(l, { id: e.id, displayMonth: e.displayMonth, displayIndex: e.displayIndex }), b(jP, { displayMonth: e.displayMonth, id: e.id })] }), b("div", { className: r.caption, style: i.caption, children: c });
45153
45156
  }
45154
45157
  function Gde(e) {
45155
45158
  var t = Yt(), n = t.footer, r = t.styles, o = t.classNames.tfoot;
45156
- return n ? b("tfoot", { className: o, style: r.tfoot, children: b("tr", { children: b("td", { colSpan: 8, children: n }) }) }) : b(Xe, {});
45159
+ return n ? b("tfoot", { className: o, style: r.tfoot, children: b("tr", { children: b("td", { colSpan: 8, children: n }) }) }) : b(Ye, {});
45157
45160
  }
45158
45161
  function Yde(e, t, n) {
45159
45162
  for (var r = n ? ml(/* @__PURE__ */ new Date()) : hi(/* @__PURE__ */ new Date(), { locale: e, weekStartsOn: t }), o = [], i = 0; i < 7; i++) {
@@ -45174,7 +45177,7 @@ function Xde() {
45174
45177
  }
45175
45178
  function Qde(e) {
45176
45179
  var t = Yt(), n = t.locale, r = t.formatters.formatDay;
45177
- return b(Xe, { children: r(e.date, { locale: n }) });
45180
+ return b(Ye, { children: r(e.date, { locale: n }) });
45178
45181
  }
45179
45182
  var a_ = Tt(void 0);
45180
45183
  function Zde(e) {
@@ -45858,7 +45861,7 @@ function Ufe({
45858
45861
  ),
45859
45862
  children: [
45860
45863
  /* @__PURE__ */ b(LW, { className: "mr-2 h-4 w-4" }),
45861
- n != null && n.from ? n.to ? /* @__PURE__ */ F(Xe, { children: [
45864
+ n != null && n.from ? n.to ? /* @__PURE__ */ F(Ye, { children: [
45862
45865
  si(n.from, "LLL dd, y"),
45863
45866
  " -",
45864
45867
  " ",
@@ -48797,7 +48800,7 @@ function Yge({
48797
48800
  value: n,
48798
48801
  onChange: g,
48799
48802
  onClose: () => d(""),
48800
- children: ({ open: v }) => /* @__PURE__ */ F(Xe, { children: [
48803
+ children: ({ open: v }) => /* @__PURE__ */ F(Ye, { children: [
48801
48804
  /* @__PURE__ */ F("div", { className: "relative flex items-center gap-0.5", children: [
48802
48805
  c && /* @__PURE__ */ b("div", { className: "h-8 w-0.5 bg-red-400" }),
48803
48806
  /* @__PURE__ */ b(
@@ -49173,7 +49176,7 @@ function Jge({ card: e, frame: t }) {
49173
49176
  renderFilterInfo: () => /* @__PURE__ */ b(eP, {}),
49174
49177
  card: A
49175
49178
  }
49176
- ) }) : /* @__PURE__ */ F(Xe, { children: [
49179
+ ) }) : /* @__PURE__ */ F(Ye, { children: [
49177
49180
  /* @__PURE__ */ F("div", { role: "card-title-container", className: "flex items-center gap-2", children: [
49178
49181
  /* @__PURE__ */ b(
49179
49182
  Gi,
@@ -49232,7 +49235,7 @@ function Jge({ card: e, frame: t }) {
49232
49235
  ] });
49233
49236
  }
49234
49237
  if (!e.id) return null;
49235
- const N = /* @__PURE__ */ F(Xe, { children: [
49238
+ const N = /* @__PURE__ */ F(Ye, { children: [
49236
49239
  p ? /* @__PURE__ */ b(zx, { children: /* @__PURE__ */ F("div", { className: "flex flex-wrap items-start justify-between gap-2", children: [
49237
49240
  /* @__PURE__ */ b("div", { className: "grow", role: "header-container", children: P() }),
49238
49241
  /* @__PURE__ */ F("div", { className: "flex flex-wrap items-center gap-2", children: [
@@ -49690,7 +49693,7 @@ function ame({ sheet: e }) {
49690
49693
  const m = ((y = r == null ? void 0 : r.gridLayout) == null ? void 0 : y.margin) || [10, 10];
49691
49694
  return (
49692
49695
  //Use version 1.4.2 of react-grid-layout for this to work. https://github.com/react-grid-layout/react-grid-layout/issues/1980
49693
- /* @__PURE__ */ b(Xe, { children: /* @__PURE__ */ F(
49696
+ /* @__PURE__ */ b(Ye, { children: /* @__PURE__ */ F(
49694
49697
  ime,
49695
49698
  {
49696
49699
  margin: m,
@@ -51287,7 +51290,7 @@ var H1 = S.forwardRef((e, t) => {
51287
51290
  return S.Children.count(n) > 1 ? S.Children.only(null) : null;
51288
51291
  });
51289
51292
  H1.displayName = "SlotClone";
51290
- var eL = ({ children: e }) => /* @__PURE__ */ b(Xe, { children: e });
51293
+ var eL = ({ children: e }) => /* @__PURE__ */ b(Ye, { children: e });
51291
51294
  function Bme(e) {
51292
51295
  return S.isValidElement(e) && e.type === eL;
51293
51296
  }
@@ -58300,7 +58303,7 @@ function qwe(e, t) {
58300
58303
  e.type === "root" ? e.children : [e]
58301
58304
  )
58302
58305
  }), d9(e, c), r0e(e, {
58303
- Fragment: Xe,
58306
+ Fragment: Ye,
58304
58307
  // @ts-expect-error
58305
58308
  // React components are allowed to return numbers,
58306
58309
  // but not according to the types in hast-util-to-jsx-runtime
@@ -64204,7 +64207,7 @@ var SCe = (e) => {
64204
64207
  let { invert: f, toast: h, unstyled: p, interacting: g, setHeights: m, visibleToasts: y, heights: v, index: w, toasts: E, expanded: _, removeToast: C, defaultRichColors: x, closeButton: R, style: M, cancelButtonStyle: P, actionButtonStyle: N, className: O = "", descriptionClassName: z = "", duration: L, position: A, gap: T, loadingIcon: I, expandByDefault: B, classNames: V, icons: D, closeButtonAriaLabel: W = "Close toast", pauseWhenPageIsHidden: $ } = e, [k, j] = J.useState(null), [q, Y] = J.useState(null), [U, G] = J.useState(!1), [X, ee] = J.useState(!1), [ne, Q] = J.useState(!1), [ae, te] = J.useState(!1), [fe, me] = J.useState(!1), [Pe, xe] = J.useState(0), [Se, pe] = J.useState(0), _e = J.useRef(h.duration || L || ND), Fe = J.useRef(null), Me = J.useRef(null), gn = w === 0, It = w + 1 <= y, re = h.type, ce = h.dismissible !== !1, ke = h.className || "", Oe = h.descriptionClassName || "", Ge = J.useMemo(() => v.findIndex((Ie) => Ie.toastId === h.id) || 0, [v, h.id]), Lt = J.useMemo(() => {
64205
64208
  var Ie;
64206
64209
  return (Ie = h.closeButton) != null ? Ie : R;
64207
- }, [h.closeButton, R]), An = J.useMemo(() => h.duration || L || ND, [h.duration, L]), wn = J.useRef(0), ve = J.useRef(0), xn = J.useRef(0), $t = J.useRef(null), [to, jn] = A.split("-"), Al = J.useMemo(() => v.reduce((Ie, Ye, at) => at >= Ge ? Ie : Ie + Ye.height, 0), [v, Ge]), es = iCe(), Ci = h.invert || f, ln = re === "loading";
64210
+ }, [h.closeButton, R]), An = J.useMemo(() => h.duration || L || ND, [h.duration, L]), wn = J.useRef(0), ve = J.useRef(0), xn = J.useRef(0), $t = J.useRef(null), [to, jn] = A.split("-"), Al = J.useMemo(() => v.reduce((Ie, Ke, at) => at >= Ge ? Ie : Ie + Ke.height, 0), [v, Ge]), es = iCe(), Ci = h.invert || f, ln = re === "loading";
64208
64211
  ve.current = J.useMemo(() => Ge * T + Al, [Ge, Al]), J.useEffect(() => {
64209
64212
  _e.current = An;
64210
64213
  }, [An]), J.useEffect(() => {
@@ -64212,18 +64215,18 @@ var SCe = (e) => {
64212
64215
  }, []), J.useEffect(() => {
64213
64216
  let Ie = Me.current;
64214
64217
  if (Ie) {
64215
- let Ye = Ie.getBoundingClientRect().height;
64216
- return pe(Ye), m((at) => [{ toastId: h.id, height: Ye, position: h.position }, ...at]), () => m((at) => at.filter((nn) => nn.toastId !== h.id));
64218
+ let Ke = Ie.getBoundingClientRect().height;
64219
+ return pe(Ke), m((at) => [{ toastId: h.id, height: Ke, position: h.position }, ...at]), () => m((at) => at.filter((nn) => nn.toastId !== h.id));
64217
64220
  }
64218
64221
  }, [m, h.id]), J.useLayoutEffect(() => {
64219
64222
  if (!U) return;
64220
- let Ie = Me.current, Ye = Ie.style.height;
64223
+ let Ie = Me.current, Ke = Ie.style.height;
64221
64224
  Ie.style.height = "auto";
64222
64225
  let at = Ie.getBoundingClientRect().height;
64223
- Ie.style.height = Ye, pe(at), m((nn) => nn.find((zt) => zt.toastId === h.id) ? nn.map((zt) => zt.toastId === h.id ? { ...zt, height: at } : zt) : [{ toastId: h.id, height: at, position: h.position }, ...nn]);
64226
+ Ie.style.height = Ke, pe(at), m((nn) => nn.find((zt) => zt.toastId === h.id) ? nn.map((zt) => zt.toastId === h.id ? { ...zt, height: at } : zt) : [{ toastId: h.id, height: at, position: h.position }, ...nn]);
64224
64227
  }, [U, h.title, h.description, m, h.id]);
64225
64228
  let Pt = J.useCallback(() => {
64226
- ee(!0), xe(ve.current), m((Ie) => Ie.filter((Ye) => Ye.toastId !== h.id)), setTimeout(() => {
64229
+ ee(!0), xe(ve.current), m((Ie) => Ie.filter((Ke) => Ke.toastId !== h.id)), setTimeout(() => {
64227
64230
  C(h);
64228
64231
  }, wCe);
64229
64232
  }, [h, C, m, ve]);
@@ -64232,38 +64235,38 @@ var SCe = (e) => {
64232
64235
  let Ie;
64233
64236
  return _ || g || $ && es ? (() => {
64234
64237
  if (xn.current < wn.current) {
64235
- let Ye = (/* @__PURE__ */ new Date()).getTime() - wn.current;
64236
- _e.current = _e.current - Ye;
64238
+ let Ke = (/* @__PURE__ */ new Date()).getTime() - wn.current;
64239
+ _e.current = _e.current - Ke;
64237
64240
  }
64238
64241
  xn.current = (/* @__PURE__ */ new Date()).getTime();
64239
64242
  })() : _e.current !== 1 / 0 && (wn.current = (/* @__PURE__ */ new Date()).getTime(), Ie = setTimeout(() => {
64240
- var Ye;
64241
- (Ye = h.onAutoClose) == null || Ye.call(h, h), Pt();
64243
+ var Ke;
64244
+ (Ke = h.onAutoClose) == null || Ke.call(h, h), Pt();
64242
64245
  }, _e.current)), () => clearTimeout(Ie);
64243
64246
  }, [_, g, h, re, $, es, Pt]), J.useEffect(() => {
64244
64247
  h.delete && Pt();
64245
64248
  }, [Pt, h.delete]);
64246
64249
  function Hn() {
64247
- var Ie, Ye, at;
64248
- return D != null && D.loading ? J.createElement("div", { className: vo(V == null ? void 0 : V.loader, (Ie = h == null ? void 0 : h.classNames) == null ? void 0 : Ie.loader, "sonner-loader"), "data-visible": re === "loading" }, D.loading) : I ? J.createElement("div", { className: vo(V == null ? void 0 : V.loader, (Ye = h == null ? void 0 : h.classNames) == null ? void 0 : Ye.loader, "sonner-loader"), "data-visible": re === "loading" }, I) : J.createElement(JSe, { className: vo(V == null ? void 0 : V.loader, (at = h == null ? void 0 : h.classNames) == null ? void 0 : at.loader), visible: re === "loading" });
64250
+ var Ie, Ke, at;
64251
+ return D != null && D.loading ? J.createElement("div", { className: vo(V == null ? void 0 : V.loader, (Ie = h == null ? void 0 : h.classNames) == null ? void 0 : Ie.loader, "sonner-loader"), "data-visible": re === "loading" }, D.loading) : I ? J.createElement("div", { className: vo(V == null ? void 0 : V.loader, (Ke = h == null ? void 0 : h.classNames) == null ? void 0 : Ke.loader, "sonner-loader"), "data-visible": re === "loading" }, I) : J.createElement(JSe, { className: vo(V == null ? void 0 : V.loader, (at = h == null ? void 0 : h.classNames) == null ? void 0 : at.loader), visible: re === "loading" });
64249
64252
  }
64250
64253
  return J.createElement("li", { tabIndex: 0, ref: Me, className: vo(O, ke, V == null ? void 0 : V.toast, (t = h == null ? void 0 : h.classNames) == null ? void 0 : t.toast, V == null ? void 0 : V.default, V == null ? void 0 : V[re], (n = h == null ? void 0 : h.classNames) == null ? void 0 : n[re]), "data-sonner-toast": "", "data-rich-colors": (r = h.richColors) != null ? r : x, "data-styled": !(h.jsx || h.unstyled || p), "data-mounted": U, "data-promise": !!h.promise, "data-swiped": fe, "data-removed": X, "data-visible": It, "data-y-position": to, "data-x-position": jn, "data-index": w, "data-front": gn, "data-swiping": ne, "data-dismissible": ce, "data-type": re, "data-invert": Ci, "data-swipe-out": ae, "data-swipe-direction": q, "data-expanded": !!(_ || B && U), style: { "--index": w, "--toasts-before": w, "--z-index": E.length - w, "--offset": `${X ? Pe : ve.current}px`, "--initial-height": B ? "auto" : `${Se}px`, ...M, ...h.style }, onDragEnd: () => {
64251
64254
  Q(!1), j(null), $t.current = null;
64252
64255
  }, onPointerDown: (Ie) => {
64253
64256
  ln || !ce || (Fe.current = /* @__PURE__ */ new Date(), xe(ve.current), Ie.target.setPointerCapture(Ie.pointerId), Ie.target.tagName !== "BUTTON" && (Q(!0), $t.current = { x: Ie.clientX, y: Ie.clientY }));
64254
64257
  }, onPointerUp: () => {
64255
- var Ie, Ye, at, nn;
64258
+ var Ie, Ke, at, nn;
64256
64259
  if (ae || !ce) return;
64257
64260
  $t.current = null;
64258
- let zt = Number(((Ie = Me.current) == null ? void 0 : Ie.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), Bt = Number(((Ye = Me.current) == null ? void 0 : Ye.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0), $n = (/* @__PURE__ */ new Date()).getTime() - ((at = Fe.current) == null ? void 0 : at.getTime()), rn = k === "x" ? zt : Bt, Sn = Math.abs(rn) / $n;
64261
+ let zt = Number(((Ie = Me.current) == null ? void 0 : Ie.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), Bt = Number(((Ke = Me.current) == null ? void 0 : Ke.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0), $n = (/* @__PURE__ */ new Date()).getTime() - ((at = Fe.current) == null ? void 0 : at.getTime()), rn = k === "x" ? zt : Bt, Sn = Math.abs(rn) / $n;
64259
64262
  if (Math.abs(rn) >= vCe || Sn > 0.11) {
64260
64263
  xe(ve.current), (nn = h.onDismiss) == null || nn.call(h, h), Y(k === "x" ? zt > 0 ? "right" : "left" : Bt > 0 ? "down" : "up"), Pt(), te(!0), me(!1);
64261
64264
  return;
64262
64265
  }
64263
64266
  Q(!1), j(null);
64264
64267
  }, onPointerMove: (Ie) => {
64265
- var Ye, at, nn, zt;
64266
- if (!$t.current || !ce || ((Ye = window.getSelection()) == null ? void 0 : Ye.toString().length) > 0) return;
64268
+ var Ke, at, nn, zt;
64269
+ if (!$t.current || !ce || ((Ke = window.getSelection()) == null ? void 0 : Ke.toString().length) > 0) return;
64267
64270
  let Bt = Ie.clientY - $t.current.y, $n = Ie.clientX - $t.current.x, rn = (at = e.swipeDirections) != null ? at : xCe(A);
64268
64271
  !k && (Math.abs($n) > 1 || Math.abs(Bt) > 1) && j(Math.abs($n) > Math.abs(Bt) ? "x" : "y");
64269
64272
  let Sn = { x: 0, y: 0 };
@@ -64273,11 +64276,11 @@ var SCe = (e) => {
64273
64276
  var Ie;
64274
64277
  Pt(), (Ie = h.onDismiss) == null || Ie.call(h, h);
64275
64278
  }, className: vo(V == null ? void 0 : V.closeButton, (o = h == null ? void 0 : h.classNames) == null ? void 0 : o.closeButton) }, (i = D == null ? void 0 : D.close) != null ? i : oCe) : null, h.jsx || qp(h.title) ? h.jsx ? h.jsx : typeof h.title == "function" ? h.title() : h.title : J.createElement(J.Fragment, null, re || h.icon || h.promise ? J.createElement("div", { "data-icon": "", className: vo(V == null ? void 0 : V.icon, (a = h == null ? void 0 : h.classNames) == null ? void 0 : a.icon) }, h.promise || h.type === "loading" && !h.icon ? h.icon || Hn() : null, h.type !== "loading" ? h.icon || (D == null ? void 0 : D[re]) || QSe(re) : null) : null, J.createElement("div", { "data-content": "", className: vo(V == null ? void 0 : V.content, (s = h == null ? void 0 : h.classNames) == null ? void 0 : s.content) }, J.createElement("div", { "data-title": "", className: vo(V == null ? void 0 : V.title, (l = h == null ? void 0 : h.classNames) == null ? void 0 : l.title) }, typeof h.title == "function" ? h.title() : h.title), h.description ? J.createElement("div", { "data-description": "", className: vo(z, Oe, V == null ? void 0 : V.description, (c = h == null ? void 0 : h.classNames) == null ? void 0 : c.description) }, typeof h.description == "function" ? h.description() : h.description) : null), qp(h.cancel) ? h.cancel : h.cancel && $p(h.cancel) ? J.createElement("button", { "data-button": !0, "data-cancel": !0, style: h.cancelButtonStyle || P, onClick: (Ie) => {
64276
- var Ye, at;
64277
- $p(h.cancel) && ce && ((at = (Ye = h.cancel).onClick) == null || at.call(Ye, Ie), Pt());
64279
+ var Ke, at;
64280
+ $p(h.cancel) && ce && ((at = (Ke = h.cancel).onClick) == null || at.call(Ke, Ie), Pt());
64278
64281
  }, className: vo(V == null ? void 0 : V.cancelButton, (u = h == null ? void 0 : h.classNames) == null ? void 0 : u.cancelButton) }, h.cancel.label) : null, qp(h.action) ? h.action : h.action && $p(h.action) ? J.createElement("button", { "data-button": !0, "data-action": !0, style: h.actionButtonStyle || N, onClick: (Ie) => {
64279
- var Ye, at;
64280
- $p(h.action) && ((at = (Ye = h.action).onClick) == null || at.call(Ye, Ie), !Ie.defaultPrevented && Pt());
64282
+ var Ke, at;
64283
+ $p(h.action) && ((at = (Ke = h.action).onClick) == null || at.call(Ke, Ie), !Ie.defaultPrevented && Pt());
64281
64284
  }, className: vo(V == null ? void 0 : V.actionButton, (d = h == null ? void 0 : h.classNames) == null ? void 0 : d.actionButton) }, h.action.label) : null));
64282
64285
  };
64283
64286
  function AD() {
@@ -64581,7 +64584,7 @@ function RCe() {
64581
64584
  }
64582
64585
  return l ? /* @__PURE__ */ F(Lme, { className: "grow", direction: "horizontal", children: [
64583
64586
  /* @__PURE__ */ b(xM, { children: R() }),
64584
- e === !0 && /* @__PURE__ */ F(Xe, { children: [
64587
+ e === !0 && /* @__PURE__ */ F(Ye, { children: [
64585
64588
  /* @__PURE__ */ b(
64586
64589
  $me,
64587
64590
  {
@@ -67083,12 +67086,12 @@ const Tke = /* @__PURE__ */ If(function(t) {
67083
67086
  } = Pt;
67084
67087
  if (L.current == null)
67085
67088
  return;
67086
- const Ye = R.get(L.current);
67087
- if (!Ye)
67089
+ const Ke = R.get(L.current);
67090
+ if (!Ke)
67088
67091
  return;
67089
67092
  const at = ln.nativeEvent, nn = new Hn({
67090
67093
  active: L.current,
67091
- activeNode: Ye,
67094
+ activeNode: Ke,
67092
67095
  event: at,
67093
67096
  options: Ie,
67094
67097
  // Sensors need to be instantiated with refs for arguments that change over time
@@ -67201,18 +67204,18 @@ const Tke = /* @__PURE__ */ If(function(t) {
67201
67204
  // eslint-disable-next-line react-hooks/exhaustive-deps
67202
67205
  [R]
67203
67206
  ), to = Ae((ln, Pt) => (Hn, Ie) => {
67204
- const Ye = Hn.nativeEvent, at = R.get(Ie);
67207
+ const Ke = Hn.nativeEvent, at = R.get(Ie);
67205
67208
  if (
67206
67209
  // Another sensor is already instantiating
67207
67210
  L.current !== null || // No active draggable
67208
67211
  !at || // Event has already been captured
67209
- Ye.dndKit || Ye.defaultPrevented
67212
+ Ke.dndKit || Ke.defaultPrevented
67210
67213
  )
67211
67214
  return;
67212
67215
  const nn = {
67213
67216
  active: at
67214
67217
  };
67215
- ln(Hn, Pt.options, nn) === !0 && (Ye.dndKit = {
67218
+ ln(Hn, Pt.options, nn) === !0 && (Ke.dndKit = {
67216
67219
  capturedBy: Pt.sensor
67217
67220
  }, L.current = Ie, $t(Hn, Pt));
67218
67221
  }, [R, $t]), jn = Q_e(u, to);
@@ -67226,7 +67229,7 @@ const Tke = /* @__PURE__ */ If(function(t) {
67226
67229
  active: Pt,
67227
67230
  activatorEvent: Hn,
67228
67231
  collisions: Ie,
67229
- over: Ye
67232
+ over: Ke
67230
67233
  } = Q.current;
67231
67234
  if (!Pt || !Hn)
67232
67235
  return;
@@ -67238,7 +67241,7 @@ const Tke = /* @__PURE__ */ If(function(t) {
67238
67241
  x: ce.x,
67239
67242
  y: ce.y
67240
67243
  },
67241
- over: Ye
67244
+ over: Ke
67242
67245
  };
67243
67246
  Dh(() => {
67244
67247
  ln == null || ln(at), v({
@@ -67256,9 +67259,9 @@ const Tke = /* @__PURE__ */ If(function(t) {
67256
67259
  activatorEvent: Pt,
67257
67260
  collisions: Hn,
67258
67261
  droppableContainers: Ie,
67259
- scrollAdjustedTranslate: Ye
67262
+ scrollAdjustedTranslate: Ke
67260
67263
  } = Q.current;
67261
- if (!ln || L.current == null || !Pt || !Ye)
67264
+ if (!ln || L.current == null || !Pt || !Ke)
67262
67265
  return;
67263
67266
  const {
67264
67267
  onDragOver: at
@@ -67272,8 +67275,8 @@ const Tke = /* @__PURE__ */ If(function(t) {
67272
67275
  activatorEvent: Pt,
67273
67276
  collisions: Hn,
67274
67277
  delta: {
67275
- x: Ye.x,
67276
- y: Ye.y
67278
+ x: Ke.x,
67279
+ y: Ke.y
67277
67280
  },
67278
67281
  over: zt
67279
67282
  };
@@ -349,7 +349,7 @@ Valid keys: `+JSON.stringify(Object.keys(N),null," "));var Q=te(U,J,V,q,Y+"."+J
349
349
  .block-interactivity-`.concat(e,` {pointer-events: none;}
350
350
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
351
351
  `)},Ooe=0,jl=[];function Toe(e){var t=S.useRef([]),n=S.useRef([0,0]),r=S.useRef(),o=S.useState(Ooe++)[0],i=S.useState(rj)[0],s=S.useRef(e);S.useEffect(function(){s.current=e},[e]),S.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var m=toe([e.lockRef.current],(e.shards||[]).map(AP),!0).filter(Boolean);return m.forEach(function(b){return b.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=S.useCallback(function(m,b){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!s.current.allowPinchZoom;var y=xp(m),v=n.current,x="deltaX"in m?m.deltaX:v[0]-y[0],E="deltaY"in m?m.deltaY:v[1]-y[1],_,C=m.target,w=Math.abs(x)>Math.abs(E)?"h":"v";if("touches"in m&&w==="h"&&C.type==="range")return!1;var k=DP(w,C);if(!k)return!0;if(k?_=w:(_=w==="v"?"h":"v",k=DP(w,C)),!k)return!1;if(!r.current&&"changedTouches"in m&&(x||E)&&(r.current=_),!_)return!0;var D=r.current||_;return Doe(D,b,m,D==="h"?x:E)},[]),l=S.useCallback(function(m){var b=m;if(!(!jl.length||jl[jl.length-1]!==i)){var y="deltaY"in b?NP(b):xp(b),v=t.current.filter(function(_){return _.name===b.type&&(_.target===b.target||b.target===_.shadowParent)&&Noe(_.delta,y)})[0];if(v&&v.should){b.cancelable&&b.preventDefault();return}if(!v){var x=(s.current.shards||[]).map(AP).filter(Boolean).filter(function(_){return _.contains(b.target)}),E=x.length>0?a(b,x[0]):!s.current.noIsolation;E&&b.cancelable&&b.preventDefault()}}},[]),c=S.useCallback(function(m,b,y,v){var x={name:m,delta:b,target:y,should:v,shadowParent:Ioe(y)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(E){return E!==x})},1)},[]),u=S.useCallback(function(m){n.current=xp(m),r.current=void 0},[]),d=S.useCallback(function(m){c(m.type,NP(m),m.target,a(m,e.lockRef.current))},[]),f=S.useCallback(function(m){c(m.type,xp(m),m.target,a(m,e.lockRef.current))},[]);S.useEffect(function(){return jl.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,Il),document.addEventListener("touchmove",l,Il),document.addEventListener("touchstart",u,Il),function(){jl=jl.filter(function(m){return m!==i}),document.removeEventListener("wheel",l,Il),document.removeEventListener("touchmove",l,Il),document.removeEventListener("touchstart",u,Il)}},[]);var h=e.removeScrollBar,g=e.inert;return S.createElement(S.Fragment,null,g?S.createElement(i,{styles:Aoe(o)}):null,h?S.createElement(Coe,{gapMode:e.gapMode}):null)}function Ioe(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const joe=uoe(nj,Toe);var Jf=S.forwardRef(function(e,t){return S.createElement(_b,Vo({},e,{ref:t,sideCar:joe}))});Jf.classNames=_b.classNames;var Foe=[" ","Enter","ArrowUp","ArrowDown"],Loe=[" ","Enter"],eh="Select",[Eb,Rb,$oe]=Tm(eh),[fu,oke]=kn(eh,[$oe,pi]),kb=pi(),[zoe,Hs]=fu(eh),[Boe,Voe]=fu(eh),aj=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:i,value:s,defaultValue:a,onValueChange:l,dir:c,name:u,autoComplete:d,disabled:f,required:h,form:g}=e,m=kb(t),[b,y]=S.useState(null),[v,x]=S.useState(null),[E,_]=S.useState(!1),C=ml(c),[w=!1,k]=Xn({prop:r,defaultProp:o,onChange:i}),[D,M]=Xn({prop:s,defaultProp:a,onChange:l}),A=S.useRef(null),T=b?g||!!b.closest("form"):!0,[$,F]=S.useState(new Set),O=Array.from($).map(I=>I.props.value).join(";");return p.jsx(Gf,{...m,children:p.jsxs(zoe,{required:h,scope:t,trigger:b,onTriggerChange:y,valueNode:v,onValueNodeChange:x,valueNodeHasChildren:E,onValueNodeHasChildrenChange:_,contentId:wn(),value:D,onValueChange:M,open:w,onOpenChange:k,dir:C,triggerPointerDownPosRef:A,disabled:f,children:[p.jsx(Eb.Provider,{scope:t,children:p.jsx(Boe,{scope:e.__scopeSelect,onNativeOptionAdd:S.useCallback(I=>{F(j=>new Set(j).add(I))},[]),onNativeOptionRemove:S.useCallback(I=>{F(j=>{const z=new Set(j);return z.delete(I),z})},[]),children:n})}),T?p.jsxs(Oj,{"aria-hidden":!0,required:h,tabIndex:-1,name:u,autoComplete:d,value:D,onChange:I=>M(I.target.value),disabled:f,form:g,children:[D===void 0?p.jsx("option",{value:""}):null,Array.from($)]},O):null]})})};aj.displayName=eh;var lj="SelectTrigger",cj=S.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,i=kb(n),s=Hs(lj,n),a=s.disabled||r,l=$e(t,s.onTriggerChange),c=Rb(n),u=S.useRef("touch"),[d,f,h]=Tj(m=>{const b=c().filter(x=>!x.disabled),y=b.find(x=>x.value===s.value),v=Ij(b,m,y);v!==void 0&&s.onValueChange(v.value)}),g=m=>{a||(s.onOpenChange(!0),h()),m&&(s.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return p.jsx(du,{asChild:!0,...i,children:p.jsx(ve.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":Aj(s.value)?"":void 0,...o,ref:l,onClick:ue(o.onClick,m=>{m.currentTarget.focus(),u.current!=="mouse"&&g(m)}),onPointerDown:ue(o.onPointerDown,m=>{u.current=m.pointerType;const b=m.target;b.hasPointerCapture(m.pointerId)&&b.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(g(m),m.preventDefault())}),onKeyDown:ue(o.onKeyDown,m=>{const b=d.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&f(m.key),!(b&&m.key===" ")&&Foe.includes(m.key)&&(g(),m.preventDefault())})})})});cj.displayName=lj;var uj="SelectValue",dj=S.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:i,placeholder:s="",...a}=e,l=Hs(uj,n),{onValueNodeHasChildrenChange:c}=l,u=i!==void 0,d=$e(t,l.onValueNodeChange);return Ln(()=>{c(u)},[c,u]),p.jsx(ve.span,{...a,ref:d,style:{pointerEvents:"none"},children:Aj(l.value)?p.jsx(p.Fragment,{children:s}):i})});dj.displayName=uj;var Hoe="SelectIcon",fj=S.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return p.jsx(ve.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});fj.displayName=Hoe;var Woe="SelectPortal",hj=e=>p.jsx(Xf,{asChild:!0,...e});hj.displayName=Woe;var sl="SelectContent",pj=S.forwardRef((e,t)=>{const n=Hs(sl,e.__scopeSelect),[r,o]=S.useState();if(Ln(()=>{o(new DocumentFragment)},[]),!n.open){const i=r;return i?Ga.createPortal(p.jsx(gj,{scope:e.__scopeSelect,children:p.jsx(Eb.Slot,{scope:e.__scopeSelect,children:p.jsx("div",{children:e.children})})}),i):null}return p.jsx(mj,{...e,ref:t})});pj.displayName=sl;var fo=10,[gj,Ws]=fu(sl),Uoe="SelectContentImpl",mj=S.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:s,side:a,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:h,sticky:g,hideWhenDetached:m,avoidCollisions:b,...y}=e,v=Hs(sl,n),[x,E]=S.useState(null),[_,C]=S.useState(null),w=$e(t,U=>E(U)),[k,D]=S.useState(null),[M,A]=S.useState(null),T=Rb(n),[$,F]=S.useState(!1),O=S.useRef(!1);S.useEffect(()=>{if(x)return Cb(x)},[x]),wb();const I=S.useCallback(U=>{const[G,...X]=T().map(Q=>Q.ref.current),[J]=X.slice(-1),te=document.activeElement;for(const Q of U)if(Q===te||(Q==null||Q.scrollIntoView({block:"nearest"}),Q===G&&_&&(_.scrollTop=0),Q===J&&_&&(_.scrollTop=_.scrollHeight),Q==null||Q.focus(),document.activeElement!==te))return},[T,_]),j=S.useCallback(()=>I([k,x]),[I,k,x]);S.useEffect(()=>{$&&j()},[$,j]);const{onOpenChange:z,triggerPointerDownPosRef:B}=v;S.useEffect(()=>{if(x){let U={x:0,y:0};const G=J=>{var te,Q;U={x:Math.abs(Math.round(J.pageX)-(((te=B.current)==null?void 0:te.x)??0)),y:Math.abs(Math.round(J.pageY)-(((Q=B.current)==null?void 0:Q.y)??0))}},X=J=>{U.x<=10&&U.y<=10?J.preventDefault():x.contains(J.target)||z(!1),document.removeEventListener("pointermove",G),B.current=null};return B.current!==null&&(document.addEventListener("pointermove",G),document.addEventListener("pointerup",X,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",G),document.removeEventListener("pointerup",X,{capture:!0})}}},[x,z,B]),S.useEffect(()=>{const U=()=>z(!1);return window.addEventListener("blur",U),window.addEventListener("resize",U),()=>{window.removeEventListener("blur",U),window.removeEventListener("resize",U)}},[z]);const[N,W]=Tj(U=>{const G=T().filter(te=>!te.disabled),X=G.find(te=>te.ref.current===document.activeElement),J=Ij(G,U,X);J&&setTimeout(()=>J.ref.current.focus())}),L=S.useCallback((U,G,X)=>{const J=!O.current&&!X;(v.value!==void 0&&v.value===G||J)&&(D(U),J&&(O.current=!0))},[v.value]),P=S.useCallback(()=>x==null?void 0:x.focus(),[x]),V=S.useCallback((U,G,X)=>{const J=!O.current&&!X;(v.value!==void 0&&v.value===G||J)&&A(U)},[v.value]),q=r==="popper"?pw:bj,Y=q===pw?{side:a,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:h,sticky:g,hideWhenDetached:m,avoidCollisions:b}:{};return p.jsx(gj,{scope:n,content:x,viewport:_,onViewportChange:C,itemRefCallback:L,selectedItem:k,onItemLeave:P,itemTextRefCallback:V,focusSelectedItem:j,selectedItemText:M,position:r,isPositioned:$,searchRef:N,children:p.jsx(Jf,{as:ZI,allowPinchZoom:!0,children:p.jsx(Zf,{asChild:!0,trapped:v.open,onMountAutoFocus:U=>{U.preventDefault()},onUnmountAutoFocus:ue(o,U=>{var G;(G=v.trigger)==null||G.focus({preventScroll:!0}),U.preventDefault()}),children:p.jsx(wl,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:U=>U.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:p.jsx(q,{role:"listbox",id:v.contentId,"data-state":v.open?"open":"closed",dir:v.dir,onContextMenu:U=>U.preventDefault(),...y,...Y,onPlaced:()=>F(!0),ref:w,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:ue(y.onKeyDown,U=>{const G=U.ctrlKey||U.altKey||U.metaKey;if(U.key==="Tab"&&U.preventDefault(),!G&&U.key.length===1&&W(U.key),["ArrowUp","ArrowDown","Home","End"].includes(U.key)){let J=T().filter(te=>!te.disabled).map(te=>te.ref.current);if(["ArrowUp","End"].includes(U.key)&&(J=J.slice().reverse()),["ArrowUp","ArrowDown"].includes(U.key)){const te=U.target,Q=J.indexOf(te);J=J.slice(Q+1)}setTimeout(()=>I(J)),U.preventDefault()}})})})})})})});mj.displayName=Uoe;var qoe="SelectItemAlignedPosition",bj=S.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,i=Hs(sl,n),s=Ws(sl,n),[a,l]=S.useState(null),[c,u]=S.useState(null),d=$e(t,w=>u(w)),f=Rb(n),h=S.useRef(!1),g=S.useRef(!0),{viewport:m,selectedItem:b,selectedItemText:y,focusSelectedItem:v}=s,x=S.useCallback(()=>{if(i.trigger&&i.valueNode&&a&&c&&m&&b&&y){const w=i.trigger.getBoundingClientRect(),k=c.getBoundingClientRect(),D=i.valueNode.getBoundingClientRect(),M=y.getBoundingClientRect();if(i.dir!=="rtl"){const te=M.left-k.left,Q=D.left-te,ie=w.left-Q,ee=w.width+ie,ce=Math.max(ee,k.width),fe=window.innerWidth-fo,_e=dw(Q,[fo,Math.max(fo,fe-ce)]);a.style.minWidth=ee+"px",a.style.left=_e+"px"}else{const te=k.right-M.right,Q=window.innerWidth-D.right-te,ie=window.innerWidth-w.right-Q,ee=w.width+ie,ce=Math.max(ee,k.width),fe=window.innerWidth-fo,_e=dw(Q,[fo,Math.max(fo,fe-ce)]);a.style.minWidth=ee+"px",a.style.right=_e+"px"}const A=f(),T=window.innerHeight-fo*2,$=m.scrollHeight,F=window.getComputedStyle(c),O=parseInt(F.borderTopWidth,10),I=parseInt(F.paddingTop,10),j=parseInt(F.borderBottomWidth,10),z=parseInt(F.paddingBottom,10),B=O+I+$+z+j,N=Math.min(b.offsetHeight*5,B),W=window.getComputedStyle(m),L=parseInt(W.paddingTop,10),P=parseInt(W.paddingBottom,10),V=w.top+w.height/2-fo,q=T-V,Y=b.offsetHeight/2,U=b.offsetTop+Y,G=O+I+U,X=B-G;if(G<=V){const te=A.length>0&&b===A[A.length-1].ref.current;a.style.bottom="0px";const Q=c.clientHeight-m.offsetTop-m.offsetHeight,ie=Math.max(q,Y+(te?P:0)+Q+j),ee=G+ie;a.style.height=ee+"px"}else{const te=A.length>0&&b===A[0].ref.current;a.style.top="0px";const ie=Math.max(V,O+m.offsetTop+(te?L:0)+Y)+X;a.style.height=ie+"px",m.scrollTop=G-V+m.offsetTop}a.style.margin=`${fo}px 0`,a.style.minHeight=N+"px",a.style.maxHeight=T+"px",r==null||r(),requestAnimationFrame(()=>h.current=!0)}},[f,i.trigger,i.valueNode,a,c,m,b,y,i.dir,r]);Ln(()=>x(),[x]);const[E,_]=S.useState();Ln(()=>{c&&_(window.getComputedStyle(c).zIndex)},[c]);const C=S.useCallback(w=>{w&&g.current===!0&&(x(),v==null||v(),g.current=!1)},[x,v]);return p.jsx(Yoe,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:h,onScrollButtonChange:C,children:p.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:E},children:p.jsx(ve.div,{...o,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});bj.displayName=qoe;var Goe="SelectPopperPosition",pw=S.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=fo,...i}=e,s=kb(n);return p.jsx(Yf,{...s,...i,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});pw.displayName=Goe;var[Yoe,PC]=fu(sl,{}),gw="SelectViewport",yj=S.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,i=Ws(gw,n),s=PC(gw,n),a=$e(t,i.onViewportChange),l=S.useRef(0);return p.jsxs(p.Fragment,{children:[p.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),p.jsx(Eb.Slot,{scope:n,children:p.jsx(ve.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:ue(o.onScroll,c=>{const u=c.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:f}=s;if(f!=null&&f.current&&d){const h=Math.abs(l.current-u.scrollTop);if(h>0){const g=window.innerHeight-fo*2,m=parseFloat(d.style.minHeight),b=parseFloat(d.style.height),y=Math.max(m,b);if(y<g){const v=y+h,x=Math.min(g,v),E=v-x;d.style.height=x+"px",d.style.bottom==="0px"&&(u.scrollTop=E>0?E:0,d.style.justifyContent="flex-end")}}}l.current=u.scrollTop})})})]})});yj.displayName=gw;var vj="SelectGroup",[Koe,Xoe]=fu(vj),xj=S.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=wn();return p.jsx(Koe,{scope:n,id:o,children:p.jsx(ve.div,{role:"group","aria-labelledby":o,...r,ref:t})})});xj.displayName=vj;var wj="SelectLabel",Sj=S.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Xoe(wj,n);return p.jsx(ve.div,{id:o.id,...r,ref:t})});Sj.displayName=wj;var Zg="SelectItem",[Qoe,Cj]=fu(Zg),_j=S.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:i,...s}=e,a=Hs(Zg,n),l=Ws(Zg,n),c=a.value===r,[u,d]=S.useState(i??""),[f,h]=S.useState(!1),g=$e(t,v=>{var x;return(x=l.itemRefCallback)==null?void 0:x.call(l,v,r,o)}),m=wn(),b=S.useRef("touch"),y=()=>{o||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return p.jsx(Qoe,{scope:n,value:r,disabled:o,textId:m,isSelected:c,onItemTextChange:S.useCallback(v=>{d(x=>x||((v==null?void 0:v.textContent)??"").trim())},[]),children:p.jsx(Eb.ItemSlot,{scope:n,value:r,disabled:o,textValue:u,children:p.jsx(ve.div,{role:"option","aria-labelledby":m,"data-highlighted":f?"":void 0,"aria-selected":c&&f,"data-state":c?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...s,ref:g,onFocus:ue(s.onFocus,()=>h(!0)),onBlur:ue(s.onBlur,()=>h(!1)),onClick:ue(s.onClick,()=>{b.current!=="mouse"&&y()}),onPointerUp:ue(s.onPointerUp,()=>{b.current==="mouse"&&y()}),onPointerDown:ue(s.onPointerDown,v=>{b.current=v.pointerType}),onPointerMove:ue(s.onPointerMove,v=>{var x;b.current=v.pointerType,o?(x=l.onItemLeave)==null||x.call(l):b.current==="mouse"&&v.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ue(s.onPointerLeave,v=>{var x;v.currentTarget===document.activeElement&&((x=l.onItemLeave)==null||x.call(l))}),onKeyDown:ue(s.onKeyDown,v=>{var E;((E=l.searchRef)==null?void 0:E.current)!==""&&v.key===" "||(Loe.includes(v.key)&&y(),v.key===" "&&v.preventDefault())})})})})});_j.displayName=Zg;var ad="SelectItemText",Ej=S.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...i}=e,s=Hs(ad,n),a=Ws(ad,n),l=Cj(ad,n),c=Voe(ad,n),[u,d]=S.useState(null),f=$e(t,y=>d(y),l.onItemTextChange,y=>{var v;return(v=a.itemTextRefCallback)==null?void 0:v.call(a,y,l.value,l.disabled)}),h=u==null?void 0:u.textContent,g=S.useMemo(()=>p.jsx("option",{value:l.value,disabled:l.disabled,children:h},l.value),[l.disabled,l.value,h]),{onNativeOptionAdd:m,onNativeOptionRemove:b}=c;return Ln(()=>(m(g),()=>b(g)),[m,b,g]),p.jsxs(p.Fragment,{children:[p.jsx(ve.span,{id:l.textId,...i,ref:f}),l.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Ga.createPortal(i.children,s.valueNode):null]})});Ej.displayName=ad;var Rj="SelectItemIndicator",kj=S.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Cj(Rj,n).isSelected?p.jsx(ve.span,{"aria-hidden":!0,...r,ref:t}):null});kj.displayName=Rj;var mw="SelectScrollUpButton",Pj=S.forwardRef((e,t)=>{const n=Ws(mw,e.__scopeSelect),r=PC(mw,e.__scopeSelect),[o,i]=S.useState(!1),s=$e(t,r.onScrollButtonChange);return Ln(()=>{if(n.viewport&&n.isPositioned){let a=function(){const c=l.scrollTop>0;i(c)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?p.jsx(Dj,{...e,ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}}):null});Pj.displayName=mw;var bw="SelectScrollDownButton",Mj=S.forwardRef((e,t)=>{const n=Ws(bw,e.__scopeSelect),r=PC(bw,e.__scopeSelect),[o,i]=S.useState(!1),s=$e(t,r.onScrollButtonChange);return Ln(()=>{if(n.viewport&&n.isPositioned){let a=function(){const c=l.scrollHeight-l.clientHeight,u=Math.ceil(l.scrollTop)<c;i(u)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?p.jsx(Dj,{...e,ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}}):null});Mj.displayName=bw;var Dj=S.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,i=Ws("SelectScrollButton",n),s=S.useRef(null),a=Rb(n),l=S.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return S.useEffect(()=>()=>l(),[l]),Ln(()=>{var u;const c=a().find(d=>d.ref.current===document.activeElement);(u=c==null?void 0:c.ref.current)==null||u.scrollIntoView({block:"nearest"})},[a]),p.jsx(ve.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:ue(o.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:ue(o.onPointerMove,()=>{var c;(c=i.onItemLeave)==null||c.call(i),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:ue(o.onPointerLeave,()=>{l()})})}),Zoe="SelectSeparator",Nj=S.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return p.jsx(ve.div,{"aria-hidden":!0,...r,ref:t})});Nj.displayName=Zoe;var yw="SelectArrow",Joe=S.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=kb(n),i=Hs(yw,n),s=Ws(yw,n);return i.open&&s.position==="popper"?p.jsx(Kf,{...o,...r,ref:t}):null});Joe.displayName=yw;function Aj(e){return e===""||e===void 0}var Oj=S.forwardRef((e,t)=>{const{value:n,...r}=e,o=S.useRef(null),i=$e(t,o),s=Sb(n);return S.useEffect(()=>{const a=o.current,l=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(s!==n&&u){const d=new Event("change",{bubbles:!0});u.call(a,n),a.dispatchEvent(d)}},[s,n]),p.jsx(dC,{asChild:!0,children:p.jsx("select",{...r,ref:i,defaultValue:n})})});Oj.displayName="BubbleSelect";function Tj(e){const t=Rn(e),n=S.useRef(""),r=S.useRef(0),o=S.useCallback(s=>{const a=n.current+s;t(a),function l(c){n.current=c,window.clearTimeout(r.current),c!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(a)},[t]),i=S.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return S.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,i]}function Ij(e,t,n){const o=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let s=eie(e,Math.max(i,0));o.length===1&&(s=s.filter(c=>c!==n));const l=s.find(c=>c.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function eie(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var tie=aj,jj=cj,nie=dj,rie=fj,oie=hj,Fj=pj,iie=yj,sie=xj,Lj=Sj,$j=_j,aie=Ej,lie=kj,zj=Pj,Bj=Mj,Vj=Nj;const tn=tie,Ul=sie,nn=nie,Xt=S.forwardRef(({className:e,children:t,...n},r)=>p.jsxs(jj,{ref:r,className:se("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,p.jsx(rie,{asChild:!0,children:p.jsx(Cs,{className:"h-4 w-4 opacity-50"})})]}));Xt.displayName=jj.displayName;const Hj=S.forwardRef(({className:e,...t},n)=>p.jsx(zj,{ref:n,className:se("flex cursor-default items-center justify-center py-1",e),...t,children:p.jsx(fd,{className:"h-4 w-4"})}));Hj.displayName=zj.displayName;const Wj=S.forwardRef(({className:e,...t},n)=>p.jsx(Bj,{ref:n,className:se("flex cursor-default items-center justify-center py-1",e),...t,children:p.jsx(Cs,{className:"h-4 w-4"})}));Wj.displayName=Bj.displayName;const Qt=S.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>p.jsx(oie,{children:p.jsx($s,{children:p.jsxs(Fj,{ref:o,className:se("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[p.jsx(Hj,{}),p.jsx(iie,{className:se("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),p.jsx(Wj,{})]})})}));Qt.displayName=Fj.displayName;const ha=S.forwardRef(({className:e,...t},n)=>p.jsx(Lj,{ref:n,className:se("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));ha.displayName=Lj.displayName;const Se=S.forwardRef(({className:e,children:t,...n},r)=>p.jsxs($j,{ref:r,className:se("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[p.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:p.jsx(lie,{children:p.jsx(ei,{className:"h-4 w-4"})})}),p.jsx(aie,{children:t})]}));Se.displayName=$j.displayName;const Rd=S.forwardRef(({className:e,...t},n)=>p.jsx(Vj,{ref:n,className:se("-mx-1 my-1 h-px bg-muted",e),...t}));Rd.displayName=Vj.displayName;const uc=S.forwardRef(({className:e,type:t,...n},r)=>p.jsx("input",{type:t,className:se("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...n}));uc.displayName="Input";var Uj=S.forwardRef((e,t)=>{const{children:n,...r}=e,o=S.Children.toArray(n),i=o.find(uie);if(i){const s=i.props.children,a=o.map(l=>l===i?S.Children.count(s)>1?S.Children.only(null):S.isValidElement(s)?s.props.children:null:l);return p.jsx(vw,{...r,ref:t,children:S.isValidElement(s)?S.cloneElement(s,void 0,a):null})}return p.jsx(vw,{...r,ref:t,children:n})});Uj.displayName="Slot";var vw=S.forwardRef((e,t)=>{const{children:n,...r}=e;if(S.isValidElement(n)){const o=fie(n),i=die(r,n.props);return n.type!==S.Fragment&&(i.ref=t?Po(t,o):o),S.cloneElement(n,i)}return S.Children.count(n)>1?S.Children.only(null):null});vw.displayName="SlotClone";var cie=({children:e})=>p.jsx(p.Fragment,{children:e});function uie(e){return S.isValidElement(e)&&e.type===cie}function die(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{i(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function fie(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var MC="Popover",[qj,ike]=kn(MC,[pi]),th=pi(),[hie,Us]=qj(MC),Gj=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:s=!1}=e,a=th(t),l=S.useRef(null),[c,u]=S.useState(!1),[d=!1,f]=Xn({prop:r,defaultProp:o,onChange:i});return p.jsx(Gf,{...a,children:p.jsx(hie,{scope:t,contentId:wn(),triggerRef:l,open:d,onOpenChange:f,onOpenToggle:S.useCallback(()=>f(h=>!h),[f]),hasCustomAnchor:c,onCustomAnchorAdd:S.useCallback(()=>u(!0),[]),onCustomAnchorRemove:S.useCallback(()=>u(!1),[]),modal:s,children:n})})};Gj.displayName=MC;var Yj="PopoverAnchor",pie=S.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Us(Yj,n),i=th(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:a}=o;return S.useEffect(()=>(s(),()=>a()),[s,a]),p.jsx(du,{...i,...r,ref:t})});pie.displayName=Yj;var Kj="PopoverTrigger",Xj=S.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Us(Kj,n),i=th(n),s=$e(t,o.triggerRef),a=p.jsx(ve.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":t4(o.open),...r,ref:s,onClick:ue(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?a:p.jsx(du,{asChild:!0,...i,children:a})});Xj.displayName=Kj;var DC="PopoverPortal",[gie,mie]=qj(DC,{forceMount:void 0}),Qj=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,i=Us(DC,t);return p.jsx(gie,{scope:t,forceMount:n,children:p.jsx(Cn,{present:n||i.open,children:p.jsx(Xf,{asChild:!0,container:o,children:r})})})};Qj.displayName=DC;var Gc="PopoverContent",Zj=S.forwardRef((e,t)=>{const n=mie(Gc,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,i=Us(Gc,e.__scopePopover);return p.jsx(Cn,{present:r||i.open,children:i.modal?p.jsx(bie,{...o,ref:t}):p.jsx(yie,{...o,ref:t})})});Zj.displayName=Gc;var bie=S.forwardRef((e,t)=>{const n=Us(Gc,e.__scopePopover),r=S.useRef(null),o=$e(t,r),i=S.useRef(!1);return S.useEffect(()=>{const s=r.current;if(s)return Cb(s)},[]),p.jsx(Jf,{as:Uj,allowPinchZoom:!0,children:p.jsx(Jj,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ue(e.onCloseAutoFocus,s=>{var a;s.preventDefault(),i.current||(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:ue(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,l=a.button===0&&a.ctrlKey===!0,c=a.button===2||l;i.current=c},{checkForDefaultPrevented:!1}),onFocusOutside:ue(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),yie=S.forwardRef((e,t)=>{const n=Us(Gc,e.__scopePopover),r=S.useRef(!1),o=S.useRef(!1);return p.jsx(Jj,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var s,a;(s=e.onCloseAutoFocus)==null||s.call(e,i),i.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{var l,c;(l=e.onInteractOutside)==null||l.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=i.target;((c=n.triggerRef.current)==null?void 0:c.contains(s))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),Jj=S.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:s,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:u,...d}=e,f=Us(Gc,n),h=th(n);return wb(),p.jsx(Zf,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:p.jsx(wl,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:u,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:c,onDismiss:()=>f.onOpenChange(!1),children:p.jsx(Yf,{"data-state":t4(f.open),role:"dialog",id:f.contentId,...h,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),e4="PopoverClose",vie=S.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Us(e4,n);return p.jsx(ve.button,{type:"button",...r,ref:t,onClick:ue(e.onClick,()=>o.onOpenChange(!1))})});vie.displayName=e4;var xie="PopoverArrow",wie=S.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=th(n);return p.jsx(Kf,{...o,...r,ref:t})});wie.displayName=xie;function t4(e){return e?"open":"closed"}var Sie=Gj,Cie=Xj,_ie=Qj,Pb=Zj;const nh=Sie,rh=Cie,hu=S.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},o)=>p.jsx(_ie,{children:p.jsx($s,{children:p.jsx(Pb,{ref:o,align:t,sideOffset:n,className:se("z-49 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})})}));hu.displayName=Pb.displayName;function Eie(e,t){switch(t){case"full-date-time":return{locale:e,format:"full-date-time",options:{weekday:"short",year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!0}};case"short-date-time":return{locale:e,format:"short-date-time",options:{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!0}};case"hours-date-time":return{locale:e,format:"hours-date-time",options:{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}};case"short-date":return{format:"short-date",locale:e,options:{}};case"long-date":return{format:"long-date",locale:e,options:{year:"numeric",month:"long",day:"numeric"}};default:return{format:"short-date-time",locale:e,options:{}}}}function n4({colorRanges:e,setColorRanges:t}){const n={start:-1/0,end:100,color:""};function r(s,a,l){const c=[...e];c[s]={...c[s],[a]:l},t(c)}function o(s){const a=[...e];a.splice(s,1),t(a)}function i(){t([...e,n])}return p.jsxs("div",{className:"space-y-3",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(ke,{children:"Color Range"}),p.jsx(We,{onClick:i,variant:"secondary",className:"h-5 p-1 text-muted-foreground",children:p.jsx(ru,{className:"size-3"})})]}),e.map((s,a)=>p.jsxs("div",{className:"flex items-center gap-2 px-2",children:[p.jsx(uc,{onChange:l=>r(a,"start",l.target.value),value:s.start,className:se(`h-7 ${$i}`)}),p.jsx("span",{children:"-"}),p.jsx(uc,{value:s.end,onChange:l=>r(a,"end",l.target.value),className:se(`h-7 ${$i}`)}),p.jsx(uc,{onChange:l=>r(a,"color",l.target.value),value:s.color,className:se(`h-7 min-w-14 p-0 ${$i}`),type:"color",list:"presetColors"}),p.jsxs("datalist",{id:"presetColors",children:[p.jsx("option",{children:Ct.green[600]}),p.jsx("option",{children:Ct.red[500]}),p.jsx("option",{children:Ct.yellow[400]}),p.jsx("option",{children:Ct.orange[500]})]}),p.jsx(We,{onClick:()=>o(a),variant:"secondary",className:"h-5 p-1 text-muted-foreground",children:p.jsx(ou,{className:"size-3"})})]},a))]})}function Rie(e,t){var r;const n=(r=e==null?void 0:e.columnSettings)==null?void 0:r.find(o=>o.columnIdx===t);return n==null?void 0:n.type}function kie(e,t){var r,o;const n=(r=e==null?void 0:e.columnSettings)==null?void 0:r.find(i=>i.columnIdx===t);return((o=n==null?void 0:n.options)==null?void 0:o.locale)||"en-US"}function Pie(e,t){var r,o;const n=(r=e==null?void 0:e.columnSettings)==null?void 0:r.find(i=>i.columnIdx===t&&i.type==="date");return((o=n==null?void 0:n.options)==null?void 0:o.format)||"short-date-time"}function Mie(e,t){var r,o;const n=(r=e==null?void 0:e.columnSettings)==null?void 0:r.find(i=>i.columnIdx===t);return(o=n==null?void 0:n.options)==null?void 0:o.currency}function Die(e,t){var r,o,i;const n=(r=e==null?void 0:e.columnSettings)==null?void 0:r.find(s=>s.columnIdx===t);return((i=(o=n==null?void 0:n.options)==null?void 0:o.options)==null?void 0:i.minimumFractionDigits)||0}function Nie(e,t){var r,o;const n=(r=e==null?void 0:e.columnSettings)==null?void 0:r.find(i=>i.columnIdx===t);return((o=n==null?void 0:n.options)==null?void 0:o.colorRanges)||[]}function Aie(e,t){var r,o,i;const n=(r=e==null?void 0:e.columnSettings)==null?void 0:r.find(s=>s.columnIdx===t);return((i=(o=n==null?void 0:n.options)==null?void 0:o.options)==null?void 0:i.style)==="percent"}function Oie(e,t){var r;const n=(r=e==null?void 0:e.columnSettings)==null?void 0:r.find(o=>o.columnIdx===t);return n==null?void 0:n.textAlign}function Tie(e,t){var r;const n=(r=e==null?void 0:e.columnSettings)==null?void 0:r.find(o=>o.columnIdx===t);return n==null?void 0:n.width}function Iie({columnIndex:e,columnName:t}){const[n,r]=R.useState(!1),o=rt(I=>{var j;return(j=I.card)==null?void 0:j.preferences}),[i,s]=R.useState(Rie(o,e)),[a,l]=R.useState(Oie(o,e)),[c,u]=R.useState(Tie(o,e)),[d,f]=R.useState(Nie(o,e)),[h,g]=R.useState(kie(o,e)),[m,b]=R.useState(Pie(o,e)),[y,v]=R.useState(Mie(o,e)),[x,E]=R.useState(Die(o,e).toString()),[_,C]=R.useState(Aie(o,e)),[w,k]=R.useState(""),D=rt(I=>I.actions.setCardPreferences);function M(){return p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"grid grid-cols-9 items-center gap-2",children:[p.jsx(ke,{className:"col-span-3",htmlFor:"format",children:"Text Align"}),p.jsxs(tn,{value:a||"left",onValueChange:I=>l(I),children:[p.jsx(Xt,{className:"col-span-6 h-8 w-full focus:ring-1 focus:ring-offset-0",children:p.jsx(nn,{})}),p.jsxs(Qt,{children:[p.jsx(Se,{value:"left",children:"Left"}),p.jsx(Se,{value:"center",children:"Center"}),p.jsx(Se,{value:"right",children:"Right"})]})]})]}),p.jsxs("div",{className:"grid grid-cols-9 items-center gap-2",children:[p.jsx(ke,{className:"col-span-3",htmlFor:"format",children:"Width (px)"}),p.jsx(uc,{placeholder:"Auto",value:c?c.toString():"",className:"col-span-6 h-8 w-full focus:ring-1 focus:ring-offset-0 focus-visible:ring-0 focus-visible:ring-ring focus-visible:ring-offset-0",onChange:I=>{I.target.value===""?u(void 0):u(Number(I.target.value))}})]})]})}function A(){const I=[...new Set(Vv.map(j=>j.currency))];return p.jsx(p.Fragment,{children:p.jsxs("div",{className:"grid grid-cols-9 items-center gap-2",children:[p.jsx(ke,{className:"col-span-3",htmlFor:"format",children:"Locale"}),p.jsxs(tn,{value:h,onValueChange:j=>g(j),children:[p.jsx(Xt,{className:"col-span-6 h-8 w-full focus:ring-1 focus:ring-offset-0",children:p.jsx(nn,{})}),p.jsx(Qt,{children:p.jsxs(Ul,{children:[p.jsx(ha,{children:"Locale"}),Vv.map(j=>p.jsx(Se,{value:j.locale,children:j.locale},j.locale))]})})]}),p.jsx(ke,{className:"col-span-3",htmlFor:"format",children:"Currency"}),p.jsxs(tn,{value:y||"none",onValueChange:j=>v(j==="none"?void 0:j),children:[p.jsx(Xt,{className:"col-span-6 h-8 w-full focus:ring-1 focus:ring-offset-0",children:p.jsx(nn,{})}),p.jsx(Qt,{children:p.jsxs(Ul,{children:[p.jsx(ha,{children:"Currency"}),p.jsx(Se,{value:"none",children:"None"}),I.map(j=>p.jsx(Se,{value:j,children:j},j))]})})]}),p.jsx(ke,{className:"col-span-3",htmlFor:"format",children:"Decimals"}),p.jsxs(tn,{value:x,onValueChange:j=>E(j),children:[p.jsx(Xt,{className:"col-span-3 h-8 w-full focus:ring-1 focus:ring-offset-0",children:p.jsx(nn,{})}),p.jsx(Qt,{children:["0","1","2","3","4"].map(j=>p.jsx(Se,{value:j,children:j},j))})]}),!y&&p.jsx(Uf,{onPressedChange:j=>C(j),variant:"outline",size:"sm",className:"col-span-3 h-8","aria-label":"Toggle italic",children:p.jsx(BU,{className:"size-3"})})]})})}function T(){return p.jsx(p.Fragment,{children:p.jsxs("div",{className:"grid grid-cols-9 items-center gap-2",children:[p.jsx(ke,{className:"col-span-3",htmlFor:"format",children:"Locale"}),p.jsxs(tn,{defaultValue:"en-US",value:h,onValueChange:I=>g(I),children:[p.jsx(Xt,{className:"col-span-6 h-8 w-full focus:ring-1 focus:ring-offset-0",children:p.jsx(nn,{})}),p.jsx(Qt,{children:Wz.map(I=>p.jsxs(Ul,{children:[p.jsx(ha,{children:I.label}),I.locales.map(j=>p.jsx(Se,{value:j.code,children:j.name},j.code))]},I.label))})]}),p.jsx(ke,{className:"col-span-3",htmlFor:"format",children:"Format"}),p.jsxs(tn,{defaultValue:"short-date-time",value:m,onValueChange:I=>{console.log("format",I),b(I)},children:[p.jsx(Xt,{className:"col-span-6 h-8 w-full focus:ring-1 focus:ring-offset-0",children:p.jsx(nn,{})}),p.jsx(Qt,{className:"",id:"type",children:p.jsxs(Ul,{children:[p.jsx(ha,{children:"Option"}),p.jsx(Se,{value:"full-date-time",children:"Full Date-Time"}),p.jsx(Se,{value:"short-date-time",children:"Short Date-Time"}),p.jsx(Se,{value:"hours-date-time",children:"24-Hour Date-Time"}),p.jsx(Se,{value:"short-date",children:"Short Date"}),p.jsx(Se,{value:"long-date",children:"Long Date"})]})})]})]})})}function $(){D({...o,columnSettings:[]})}function F(){var I;D({...o,columnSettings:[...((I=o==null?void 0:o.columnSettings)==null?void 0:I.filter(j=>j.columnIdx!==e))||[]]})}function O(){var I,j,z,B;if(i==="date"){const N=Eie(h,m),W={columnIdx:e,type:i,options:N};D({...o,columnSettings:[...((I=o==null?void 0:o.columnSettings)==null?void 0:I.filter(L=>L.columnIdx!==e))||[],W]})}else if(i==="number"){let N;y?N={locale:h,currency:y,options:{style:"currency",currency:y,minimumFractionDigits:Number(x)},colorRanges:d.length>0?d:void 0}:N={locale:h,currency:void 0,options:{style:_?"percent":"decimal",minimumFractionDigits:Number(x)},colorRanges:d.length>0?d:void 0};const W={columnIdx:e,type:i,textAlign:a,width:c,options:N};D({...o,columnSettings:[...((j=o==null?void 0:o.columnSettings)==null?void 0:j.filter(L=>L.columnIdx!==e))||[],W]})}else if(i==="html"){const N={columnIdx:e,type:i,options:{html:""}};D({...o,columnSettings:[...((z=o==null?void 0:o.columnSettings)==null?void 0:z.filter(W=>W.columnIdx!==e))||[],N]})}else{const N={columnIdx:e,type:"none",textAlign:a,width:c,options:{}};D({...o,columnSettings:[...((B=o==null?void 0:o.columnSettings)==null?void 0:B.filter(W=>W.columnIdx!==e))||[],N]})}}return p.jsxs(nh,{onOpenChange:I=>r(I),children:[p.jsx(rh,{asChild:!0,children:p.jsx(DU,{className:"size-3.5 cursor-pointer text-muted"})}),p.jsx(hu,{align:"center",className:"max-w-70 z-20",children:p.jsxs("div",{className:"grid gap-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx("h4",{className:"font-medium leading-none",children:"Display Settings"}),p.jsx("p",{className:"text-sm text-muted-foreground",children:`Display setting for '${t}'`})]}),p.jsxs("div",{className:"grid gap-2",children:[p.jsxs("div",{className:"grid grid-cols-3 items-center gap-2",children:[p.jsx(ke,{htmlFor:"scale",children:"Type"}),p.jsxs(tn,{value:i||"none",onValueChange:I=>s(I),children:[p.jsx(Xt,{className:"col-span-2 h-8 w-full focus:ring-1 focus:ring-offset-0",children:p.jsx(nn,{})}),p.jsx(Qt,{id:"type",children:p.jsxs(Ul,{children:[p.jsx(ha,{children:"Option"}),p.jsx(Se,{value:"number",children:"Number"}),p.jsx(Se,{value:"date",children:"Date"}),p.jsx(Se,{value:"html",children:"HTML"}),p.jsx(Se,{value:"none",children:"None"})]})})]})]}),M(),p.jsx(Rd,{}),i==="number"&&A(),i==="date"&&T(),i==="number"&&p.jsxs(p.Fragment,{children:[p.jsx(Rd,{}),p.jsx(n4,{colorRanges:d,setColorRanges:f})]}),p.jsx(Rd,{}),p.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[p.jsx(We,{onClick:$,variant:"secondary",className:"col-span-1 col-start-1 h-8 w-full text-destructive",children:"Reset All"}),p.jsx(We,{onClick:F,variant:"secondary",className:"col-span-1 col-start-2 h-8 w-full",children:"Reset"}),p.jsx(We,{onClick:O,variant:"secondary",className:"col-span-1 col-start-3 h-8 w-full",children:"Apply"})]})]})]})})]})}function jie({card:e,column:t,columnKey:n,columnIndex:r}){var d;const o=re(f=>f.isVisualEditing),i=e==null?void 0:e.preferences,s=t.getIsSorted(),a=(d=i==null?void 0:i.columnSettings)==null?void 0:d.find(f=>f.columnIdx===r),l=a==null?void 0:a.textAlign,c=a==null?void 0:a.width,u=c?{width:c}:{};return p.jsxs("div",{className:"flex w-full items-center justify-between",children:[p.jsxs("div",{className:se("flex grow cursor-pointer items-center justify-between gap-4",{"justify-center":l==="center","flex-row-reverse":l==="right","justify-start":l==="left"}),style:u,onClick:()=>t.toggleSorting(t.getIsSorted()==="asc"),children:[p.jsx("span",{className:"whitespace-nowrap",children:n}),p.jsx("span",{children:s==="asc"?p.jsx(RO,{className:"h-5 w-5"}):s==="desc"?p.jsx(EO,{className:"h-5 w-5"}):null})]}),o&&p.jsx("div",{className:"opacity-0 group-hover:opacity-100",children:p.jsx(Iie,{columnName:t.id,columnIndex:r})})]})}function Fie(e){const t=new Date(e);return!isNaN(t.getTime())}function Lie({card:e,cell:t,columnIndex:n}){var u,d;const r=e==null?void 0:e.preferences,o=t.getValue(),i=(u=r==null?void 0:r.columnSettings)==null?void 0:u.find(f=>f.columnIdx===n),s=c(o,i),a=SS(o,(d=i==null?void 0:i.options)==null?void 0:d.colorRanges),l=i==null?void 0:i.textAlign;i!=null&&i.width&&i.width;function c(f,h){const g=f;if((h==null?void 0:h.type)==="date"&&Fie(f)){const{locale:m,options:b}=h.options,y=new Date(f);return new Date(y.getTime()).toLocaleDateString(m,b)}if((h==null?void 0:h.type)==="number"){const{locale:m,currency:b,options:y}=h.options;return b?new Intl.NumberFormat(m,{style:"currency",currency:b,...y}).format(f):new Intl.NumberFormat(m,y).format(f)}return(h==null?void 0:h.type)==="html"?p.jsx("div",{className:"hover:underline",dangerouslySetInnerHTML:{__html:g}}):f}return p.jsx("p",{title:s,className:se("overflow-auto",{"text-center":l==="center","text-right":l==="right","text-left":l==="left"}),style:{backgroundColor:a},children:s})}function $ie(e,t){var d;const n=re(f=>f.selectedSheetId),r=re(f=>f.filterValues),o=(d=e==null?void 0:e.preferences)==null?void 0:d.onClickFilter,{addOrUpdateFilterValues:i,addFilteringCard:s}=sn(),{data:a}=ti(e),l=a==null?void 0:a.records;R.useEffect(()=>{(!r||(r==null?void 0:r.length)===0)&&t.getRowModel().rows.forEach(f=>{f.getIsSelected()&&f.toggleSelected()})},[r,t]);const c=R.useCallback(f=>e.id+"-"+f+"-"+n,[e.id,n]);function u(f){console.log("handleRowSelect",f);const h=f.id;if(o){t.getRow(h).toggleSelected();const g=t.getRow(h).getIsSelected();let m=[];const b=t.getRowModel().rows.filter(x=>x.getIsSelected());g===!1?m=[...b,f]:m=b.filter(x=>x!==f);const{dimensionKeys:y}=vn(l),v=o.map(x=>{const E=y==null?void 0:y[x.columnIndex],_=m==null?void 0:m.map(w=>w==null?void 0:w.getValue(E));return{filterId:c(E),connectionId:e==null?void 0:e.connectionId,tableName:e.lastSelectedTable,name:E,expression:x.expression,valueType:Nm(_[0]===void 0?"":_[0]),operation:"in",values:_}});i(v),s(e)}}return{handleRowSelect:u}}function zie(e,t){return S.useReducer((n,r)=>t[n][r]??n,e)}var NC="ScrollArea",[r4,ske]=kn(NC),[Bie,ao]=r4(NC),o4=S.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:i=600,...s}=e,[a,l]=S.useState(null),[c,u]=S.useState(null),[d,f]=S.useState(null),[h,g]=S.useState(null),[m,b]=S.useState(null),[y,v]=S.useState(0),[x,E]=S.useState(0),[_,C]=S.useState(!1),[w,k]=S.useState(!1),D=$e(t,A=>l(A)),M=ml(o);return p.jsx(Bie,{scope:n,type:r,dir:M,scrollHideDelay:i,scrollArea:a,viewport:c,onViewportChange:u,content:d,onContentChange:f,scrollbarX:h,onScrollbarXChange:g,scrollbarXEnabled:_,onScrollbarXEnabledChange:C,scrollbarY:m,onScrollbarYChange:b,scrollbarYEnabled:w,onScrollbarYEnabledChange:k,onCornerWidthChange:v,onCornerHeightChange:E,children:p.jsx(ve.div,{dir:M,...s,ref:D,style:{position:"relative","--radix-scroll-area-corner-width":y+"px","--radix-scroll-area-corner-height":x+"px",...e.style}})})});o4.displayName=NC;var i4="ScrollAreaViewport",s4=S.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:o,...i}=e,s=ao(i4,n),a=S.useRef(null),l=$e(t,a,s.onViewportChange);return p.jsxs(p.Fragment,{children:[p.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),p.jsx(ve.div,{"data-radix-scroll-area-viewport":"",...i,ref:l,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...e.style},children:p.jsx("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});s4.displayName=i4;var gi="ScrollAreaScrollbar",AC=S.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=ao(gi,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:s}=o,a=e.orientation==="horizontal";return S.useEffect(()=>(a?i(!0):s(!0),()=>{a?i(!1):s(!1)}),[a,i,s]),o.type==="hover"?p.jsx(Vie,{...r,ref:t,forceMount:n}):o.type==="scroll"?p.jsx(Hie,{...r,ref:t,forceMount:n}):o.type==="auto"?p.jsx(a4,{...r,ref:t,forceMount:n}):o.type==="always"?p.jsx(OC,{...r,ref:t}):null});AC.displayName=gi;var Vie=S.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=ao(gi,e.__scopeScrollArea),[i,s]=S.useState(!1);return S.useEffect(()=>{const a=o.scrollArea;let l=0;if(a){const c=()=>{window.clearTimeout(l),s(!0)},u=()=>{l=window.setTimeout(()=>s(!1),o.scrollHideDelay)};return a.addEventListener("pointerenter",c),a.addEventListener("pointerleave",u),()=>{window.clearTimeout(l),a.removeEventListener("pointerenter",c),a.removeEventListener("pointerleave",u)}}},[o.scrollArea,o.scrollHideDelay]),p.jsx(Cn,{present:n||i,children:p.jsx(a4,{"data-state":i?"visible":"hidden",...r,ref:t})})}),Hie=S.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=ao(gi,e.__scopeScrollArea),i=e.orientation==="horizontal",s=Db(()=>l("SCROLL_END"),100),[a,l]=zie("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return S.useEffect(()=>{if(a==="idle"){const c=window.setTimeout(()=>l("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(c)}},[a,o.scrollHideDelay,l]),S.useEffect(()=>{const c=o.viewport,u=i?"scrollLeft":"scrollTop";if(c){let d=c[u];const f=()=>{const h=c[u];d!==h&&(l("SCROLL"),s()),d=h};return c.addEventListener("scroll",f),()=>c.removeEventListener("scroll",f)}},[o.viewport,i,l,s]),p.jsx(Cn,{present:n||a!=="hidden",children:p.jsx(OC,{"data-state":a==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:ue(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:ue(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),a4=S.forwardRef((e,t)=>{const n=ao(gi,e.__scopeScrollArea),{forceMount:r,...o}=e,[i,s]=S.useState(!1),a=e.orientation==="horizontal",l=Db(()=>{if(n.viewport){const c=n.viewport.offsetWidth<n.viewport.scrollWidth,u=n.viewport.offsetHeight<n.viewport.scrollHeight;s(a?c:u)}},10);return Yc(n.viewport,l),Yc(n.content,l),p.jsx(Cn,{present:r||i,children:p.jsx(OC,{"data-state":i?"visible":"hidden",...o,ref:t})})}),OC=S.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,o=ao(gi,e.__scopeScrollArea),i=S.useRef(null),s=S.useRef(0),[a,l]=S.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=f4(a.viewport,a.content),u={...r,sizes:a,onSizesChange:l,hasThumb:c>0&&c<1,onThumbChange:f=>i.current=f,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:f=>s.current=f};function d(f,h){return Kie(f,s.current,a,h)}return n==="horizontal"?p.jsx(Wie,{...u,ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const f=o.viewport.scrollLeft,h=OP(f,a,o.dir);i.current.style.transform=`translate3d(${h}px, 0, 0)`}},onWheelScroll:f=>{o.viewport&&(o.viewport.scrollLeft=f)},onDragScroll:f=>{o.viewport&&(o.viewport.scrollLeft=d(f,o.dir))}}):n==="vertical"?p.jsx(Uie,{...u,ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const f=o.viewport.scrollTop,h=OP(f,a);i.current.style.transform=`translate3d(0, ${h}px, 0)`}},onWheelScroll:f=>{o.viewport&&(o.viewport.scrollTop=f)},onDragScroll:f=>{o.viewport&&(o.viewport.scrollTop=d(f))}}):null}),Wie=S.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,i=ao(gi,e.__scopeScrollArea),[s,a]=S.useState(),l=S.useRef(null),c=$e(t,l,i.onScrollbarXChange);return S.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),p.jsx(c4,{"data-orientation":"horizontal",...o,ref:c,sizes:n,style:{bottom:0,left:i.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:i.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Mb(n)+"px",...e.style},onThumbPointerDown:u=>e.onThumbPointerDown(u.x),onDragScroll:u=>e.onDragScroll(u.x),onWheelScroll:(u,d)=>{if(i.viewport){const f=i.viewport.scrollLeft+u.deltaX;e.onWheelScroll(f),p4(f,d)&&u.preventDefault()}},onResize:()=>{l.current&&i.viewport&&s&&r({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:em(s.paddingLeft),paddingEnd:em(s.paddingRight)}})}})}),Uie=S.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,i=ao(gi,e.__scopeScrollArea),[s,a]=S.useState(),l=S.useRef(null),c=$e(t,l,i.onScrollbarYChange);return S.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),p.jsx(c4,{"data-orientation":"vertical",...o,ref:c,sizes:n,style:{top:0,right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Mb(n)+"px",...e.style},onThumbPointerDown:u=>e.onThumbPointerDown(u.y),onDragScroll:u=>e.onDragScroll(u.y),onWheelScroll:(u,d)=>{if(i.viewport){const f=i.viewport.scrollTop+u.deltaY;e.onWheelScroll(f),p4(f,d)&&u.preventDefault()}},onResize:()=>{l.current&&i.viewport&&s&&r({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:em(s.paddingTop),paddingEnd:em(s.paddingBottom)}})}})}),[qie,l4]=r4(gi),c4=S.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:i,onThumbPointerUp:s,onThumbPointerDown:a,onThumbPositionChange:l,onDragScroll:c,onWheelScroll:u,onResize:d,...f}=e,h=ao(gi,n),[g,m]=S.useState(null),b=$e(t,D=>m(D)),y=S.useRef(null),v=S.useRef(""),x=h.viewport,E=r.content-r.viewport,_=Rn(u),C=Rn(l),w=Db(d,10);function k(D){if(y.current){const M=D.clientX-y.current.left,A=D.clientY-y.current.top;c({x:M,y:A})}}return S.useEffect(()=>{const D=M=>{const A=M.target;(g==null?void 0:g.contains(A))&&_(M,E)};return document.addEventListener("wheel",D,{passive:!1}),()=>document.removeEventListener("wheel",D,{passive:!1})},[x,g,E,_]),S.useEffect(C,[r,C]),Yc(g,w),Yc(h.content,w),p.jsx(qie,{scope:n,scrollbar:g,hasThumb:o,onThumbChange:Rn(i),onThumbPointerUp:Rn(s),onThumbPositionChange:C,onThumbPointerDown:Rn(a),children:p.jsx(ve.div,{...f,ref:b,style:{position:"absolute",...f.style},onPointerDown:ue(e.onPointerDown,D=>{D.button===0&&(D.target.setPointerCapture(D.pointerId),y.current=g.getBoundingClientRect(),v.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",h.viewport&&(h.viewport.style.scrollBehavior="auto"),k(D))}),onPointerMove:ue(e.onPointerMove,k),onPointerUp:ue(e.onPointerUp,D=>{const M=D.target;M.hasPointerCapture(D.pointerId)&&M.releasePointerCapture(D.pointerId),document.body.style.webkitUserSelect=v.current,h.viewport&&(h.viewport.style.scrollBehavior=""),y.current=null})})})}),Jg="ScrollAreaThumb",u4=S.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=l4(Jg,e.__scopeScrollArea);return p.jsx(Cn,{present:n||o.hasThumb,children:p.jsx(Gie,{ref:t,...r})})}),Gie=S.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,i=ao(Jg,n),s=l4(Jg,n),{onThumbPositionChange:a}=s,l=$e(t,d=>s.onThumbChange(d)),c=S.useRef(void 0),u=Db(()=>{c.current&&(c.current(),c.current=void 0)},100);return S.useEffect(()=>{const d=i.viewport;if(d){const f=()=>{if(u(),!c.current){const h=Xie(d,a);c.current=h,a()}};return a(),d.addEventListener("scroll",f),()=>d.removeEventListener("scroll",f)}},[i.viewport,u,a]),p.jsx(ve.div,{"data-state":s.hasThumb?"visible":"hidden",...o,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:ue(e.onPointerDownCapture,d=>{const h=d.target.getBoundingClientRect(),g=d.clientX-h.left,m=d.clientY-h.top;s.onThumbPointerDown({x:g,y:m})}),onPointerUp:ue(e.onPointerUp,s.onThumbPointerUp)})});u4.displayName=Jg;var TC="ScrollAreaCorner",d4=S.forwardRef((e,t)=>{const n=ao(TC,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?p.jsx(Yie,{...e,ref:t}):null});d4.displayName=TC;var Yie=S.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=ao(TC,n),[i,s]=S.useState(0),[a,l]=S.useState(0),c=!!(i&&a);return Yc(o.scrollbarX,()=>{var d;const u=((d=o.scrollbarX)==null?void 0:d.offsetHeight)||0;o.onCornerHeightChange(u),l(u)}),Yc(o.scrollbarY,()=>{var d;const u=((d=o.scrollbarY)==null?void 0:d.offsetWidth)||0;o.onCornerWidthChange(u),s(u)}),c?p.jsx(ve.div,{...r,ref:t,style:{width:i,height:a,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function em(e){return e?parseInt(e,10):0}function f4(e,t){const n=e/t;return isNaN(n)?0:n}function Mb(e){const t=f4(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function Kie(e,t,n,r="ltr"){const o=Mb(n),i=o/2,s=t||i,a=o-s,l=n.scrollbar.paddingStart+s,c=n.scrollbar.size-n.scrollbar.paddingEnd-a,u=n.content-n.viewport,d=r==="ltr"?[0,u]:[u*-1,0];return h4([l,c],d)(e)}function OP(e,t,n="ltr"){const r=Mb(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-o,s=t.content-t.viewport,a=i-r,l=n==="ltr"?[0,s]:[s*-1,0],c=dw(e,l);return h4([0,s],[0,a])(c)}function h4(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function p4(e,t){return e>0&&e<t}var Xie=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function o(){const i={left:e.scrollLeft,top:e.scrollTop},s=n.left!==i.left,a=n.top!==i.top;(s||a)&&t(),n=i,r=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(r)};function Db(e,t){const n=Rn(e),r=S.useRef(0);return S.useEffect(()=>()=>window.clearTimeout(r.current),[]),S.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function Yc(e,t){const n=Rn(t);Ln(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,n])}var Nb=o4,g4=s4,m4=d4;const uf=S.forwardRef(({className:e,children:t,...n},r)=>p.jsxs(Nb,{ref:r,className:se("relative overflow-hidden",e),...n,children:[p.jsx(g4,{className:"h-full w-full rounded-[inherit]",children:t}),p.jsx(pu,{}),p.jsx(m4,{})]}));uf.displayName=Nb.displayName;const pu=S.forwardRef(({className:e,orientation:t="vertical",...n},r)=>p.jsx(AC,{ref:r,orientation:t,className:se("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...n,children:p.jsx(u4,{className:"relative flex-1 rounded-full bg-border"})}));pu.displayName=AC.displayName;const oh=S.forwardRef(({className:e,children:t,style:n,...r},o)=>p.jsxs(Nb,{style:n,className:se("relative overflow-hidden",e),children:[p.jsx(g4,{ref:o,...r,className:"h-full w-full rounded-[inherit]",children:t}),p.jsx(pu,{}),p.jsx(m4,{})]}));oh.displayName=Nb.displayName;const Tr=S.forwardRef(({className:e,type:t,...n},r)=>p.jsx("input",{type:t,className:se("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-ring focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...n}));Tr.displayName="Input";function Qie(e,t=!0){if(e.length===0)return"";const n=new Set;e.forEach(i=>{Object.keys(i).forEach(s=>n.add(s))});const r=Array.from(n),o=[];return t&&o.push(r.map(TP).join(",")),e.forEach(i=>{const s=r.map(a=>{const l=i[a];return TP(l!==void 0?String(l):"")});o.push(s.join(","))}),o.join(`
352
- `)}function TP(e){return/[",\n\r]/.test(e)?`"${e.replace(/"/g,'""')}"`:e}function Zie(e,t,n){const r=new Blob([e],{type:n}),o=URL.createObjectURL(r),i=document.createElement("a");i.href=o,i.download=t,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(o)}function Jie(e,t="export.csv"){const n=Qie(e);Zie(n,t,"text/csv;charset=utf-8;")}function ese({globalFilter:e,onGlobalFilterChange:t,totalRows:n,columns:r,selectColumnVisible:o,onToggleSelectColumn:i,onColumnVisibilityChange:s,card:a,data:l,exportFileName:c="export"}){var E;const[u,d]=R.useState(!0),{eventHandlers:f}=Qn(),{onExportData:h}=f||{},g=re(_=>_.themeStyle),m=g==null?void 0:g.controlInputRadius,b=(E=a==null?void 0:a.preferences)==null?void 0:E.allowDownload,{data:y}=ti(a),v=re(_=>_.isVisualEditing);R.useEffect(()=>{const _=r.filter(w=>w.id!=="select"&&w.getCanHide()),C=_.every(w=>w.getIsVisible());d(C&&_.length>0)},[r]);const x=(_,C=!1)=>{const w=C?l.selectedRows:l.rows;if(h){h({cardId:a.id,title:a.title,data:w,sql:y==null?void 0:y.sql});return}Jie(w,`${c}.csv`)};return n<10?null:p.jsxs("div",{className:"flex w-full items-center gap-2",children:[p.jsx("div",{className:"flex items-center gap-2",children:p.jsx(Tr,{style:{borderRadius:m},placeholder:"Search all columns...",value:e,onChange:_=>t(_.target.value),className:"h-9 max-w-sm"})}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsxs(nh,{children:[p.jsx(rh,{asChild:!0,children:p.jsx(We,{variant:"outline",size:"sm",className:se("invisible group-hover:visible",{visible:v}),style:{borderRadius:m},children:p.jsx(TU,{className:"h-4 w-4"})})}),p.jsx(hu,{style:{borderRadius:m},align:"start",className:"min-w-[200px] p-0",children:p.jsxs("div",{className:"flex flex-col gap-1 p-2",children:[p.jsx(We,{variant:"ghost",size:"sm",className:"justify-start font-normal",onClick:()=>i(!o),children:p.jsxs("div",{className:"flex w-full items-center",children:[p.jsx("div",{className:"mr-2 flex h-4 w-4 items-center justify-center",children:o?p.jsx(ei,{className:"h-4 w-4"}):null}),p.jsx("span",{children:"Show Select Checkbox"})]})}),p.jsx(il,{className:"my-1"}),p.jsx("div",{className:"max-h-[300px] overflow-y-auto bg-popover",children:p.jsx("div",{className:"p-1",children:r.filter(_=>_.getCanHide()&&_.id!=="select").map(_=>{const C=_.getIsVisible();return p.jsx("div",{style:{borderRadius:m||2},className:"w-full justify-start px-2 py-1.5 text-sm font-normal capitalize hover:bg-muted",onClick:()=>{typeof _.id=="string"&&(s==null||s(_.id,!C))},children:p.jsxs("div",{className:"flex w-full items-center",children:[p.jsx("div",{className:"mr-2 flex h-4 w-4 items-center justify-center",children:C?p.jsx(ei,{className:"h-4 w-4"}):null}),p.jsx("span",{children:_.id})]})},_.id)})})})]})})]}),b&&p.jsxs(We,{className:se("invisible group-hover:visible",{visible:v}),variant:"outline",size:"sm",onClick:()=>x(),children:[p.jsx(mS,{className:"h-4 w-4"}),p.jsx("span",{className:"sr-only",children:"Export"})]})]})]})}function tse({pageCount:e,pageIndex:t,pageSize:n,rowCount:r,selectedRowCount:o,setPageIndex:i,setPageSize:s,canPreviousPage:a,canNextPage:l,previousPage:c,nextPage:u,onClearSelection:d}){const f=re(y=>y.themeStyle),h=f==null?void 0:f.controlInputRadius,g=re(y=>y.isVisualEditing),{updatePageSize:m}=vl();function b(y){s(Number(y)),g&&m(Number(y))}return p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsxs("div",{className:"hidden flex-1 items-center gap-2 text-sm text-muted-foreground md:flex",children:[o>0&&p.jsxs(p.Fragment,{children:[o," of ",r," row(s) selected"," "]}),o===0&&p.jsxs(p.Fragment,{children:[r," rows"]}),o>0&&p.jsx(We,{variant:"outline",size:"sm",style:{borderRadius:h},onClick:d,className:"h-8 text-foreground",children:"Clear"})]}),p.jsxs("div",{className:"flex w-full items-center gap-8 md:w-fit",children:[p.jsxs("div",{className:"hidden items-center gap-2 md:flex",children:[p.jsx(ke,{htmlFor:"rows-per-page",className:"text-sm font-normal text-muted-foreground",children:"Rows per page"}),p.jsxs(tn,{value:`${n}`,onValueChange:b,children:[p.jsx(Xt,{style:{borderRadius:h},className:`h-8 w-16 ${hr}`,id:"rows-per-page",children:p.jsx(nn,{placeholder:n})}),p.jsx(Qt,{side:"top",children:[10,20,30,40,50].map(y=>p.jsx(Se,{value:`${y}`,children:y},y))})]})]}),p.jsxs("div",{className:"flex w-fit items-center justify-center text-sm font-normal text-muted-foreground",children:["Page ",t+1," of ",e]}),p.jsxs("div",{className:"ml-auto flex items-center gap-2 md:ml-0",children:[p.jsxs(We,{style:{borderRadius:h},variant:"outline",className:"hidden h-8 w-8 p-0 md:flex",onClick:()=>i(0),disabled:!a,children:[p.jsx("span",{className:"sr-only",children:"Go to first page"}),p.jsx(NU,{className:"h-4 w-4"})]}),p.jsxs(We,{style:{borderRadius:h},variant:"outline",className:"h-8 w-8 p-0",onClick:c,disabled:!a,children:[p.jsx("span",{className:"sr-only",children:"Go to previous page"}),p.jsx(DO,{className:"h-4 w-4"})]}),p.jsxs(We,{style:{borderRadius:h},variant:"outline",className:"h-8 w-8 p-0",onClick:u,disabled:!l,children:[p.jsx("span",{className:"sr-only",children:"Go to next page"}),p.jsx(gS,{className:"h-4 w-4"})]}),p.jsxs(We,{style:{borderRadius:h},variant:"outline",className:"hidden h-8 w-8 p-0 md:flex",onClick:()=>i(e-1),disabled:!l,children:[p.jsx("span",{className:"sr-only",children:"Go to last page"}),p.jsx(AU,{className:"h-4 w-4"})]})]})]})]})}var IC="Checkbox",[nse,ake]=kn(IC),[rse,ose]=nse(IC),b4=S.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:i,required:s,disabled:a,value:l="on",onCheckedChange:c,form:u,...d}=e,[f,h]=S.useState(null),g=$e(t,E=>h(E)),m=S.useRef(!1),b=f?u||!!f.closest("form"):!0,[y=!1,v]=Xn({prop:o,defaultProp:i,onChange:c}),x=S.useRef(y);return S.useEffect(()=>{const E=f==null?void 0:f.form;if(E){const _=()=>v(x.current);return E.addEventListener("reset",_),()=>E.removeEventListener("reset",_)}},[f,v]),p.jsxs(rse,{scope:n,state:y,disabled:a,children:[p.jsx(ve.button,{type:"button",role:"checkbox","aria-checked":Es(y)?"mixed":y,"aria-required":s,"data-state":x4(y),"data-disabled":a?"":void 0,disabled:a,value:l,...d,ref:g,onKeyDown:ue(e.onKeyDown,E=>{E.key==="Enter"&&E.preventDefault()}),onClick:ue(e.onClick,E=>{v(_=>Es(_)?!0:!_),b&&(m.current=E.isPropagationStopped(),m.current||E.stopPropagation())})}),b&&p.jsx(ise,{control:f,bubbles:!m.current,name:r,value:l,checked:y,required:s,disabled:a,form:u,style:{transform:"translateX(-100%)"},defaultChecked:Es(i)?!1:i})]})});b4.displayName=IC;var y4="CheckboxIndicator",v4=S.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,i=ose(y4,n);return p.jsx(Cn,{present:r||Es(i.state)||i.state===!0,children:p.jsx(ve.span,{"data-state":x4(i.state),"data-disabled":i.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});v4.displayName=y4;var ise=e=>{const{control:t,checked:n,bubbles:r=!0,defaultChecked:o,...i}=e,s=S.useRef(null),a=Sb(n),l=db(t);S.useEffect(()=>{const u=s.current,d=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(d,"checked").set;if(a!==n&&h){const g=new Event("click",{bubbles:r});u.indeterminate=Es(n),h.call(u,Es(n)?!1:n),u.dispatchEvent(g)}},[a,n,r]);const c=S.useRef(Es(n)?!1:n);return p.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:o??c.current,...i,tabIndex:-1,ref:s,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Es(e){return e==="indeterminate"}function x4(e){return Es(e)?"indeterminate":e?"checked":"unchecked"}var w4=b4,sse=v4;const al=S.forwardRef(({className:e,...t},n)=>p.jsx(w4,{ref:n,className:se("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:p.jsx(sse,{className:se("flex items-center justify-center text-current"),children:p.jsx(ei,{className:"h-4 w-4"})})}));al.displayName=w4.displayName;var jC="Radio",[ase,S4]=kn(jC),[lse,cse]=ase(jC),C4=S.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:i,disabled:s,value:a="on",onCheck:l,form:c,...u}=e,[d,f]=S.useState(null),h=$e(t,b=>f(b)),g=S.useRef(!1),m=d?c||!!d.closest("form"):!0;return p.jsxs(lse,{scope:n,checked:o,disabled:s,children:[p.jsx(ve.button,{type:"button",role:"radio","aria-checked":o,"data-state":R4(o),"data-disabled":s?"":void 0,disabled:s,value:a,...u,ref:h,onClick:ue(e.onClick,b=>{o||l==null||l(),m&&(g.current=b.isPropagationStopped(),g.current||b.stopPropagation())})}),m&&p.jsx(use,{control:d,bubbles:!g.current,name:r,value:a,checked:o,required:i,disabled:s,form:c,style:{transform:"translateX(-100%)"}})]})});C4.displayName=jC;var _4="RadioIndicator",E4=S.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,i=cse(_4,n);return p.jsx(Cn,{present:r||i.checked,children:p.jsx(ve.span,{"data-state":R4(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:t})})});E4.displayName=_4;var use=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=S.useRef(null),s=Sb(n),a=db(t);return S.useEffect(()=>{const l=i.current,c=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(c,"checked").set;if(s!==n&&d){const f=new Event("click",{bubbles:r});d.call(l,n),l.dispatchEvent(f)}},[s,n,r]),p.jsx("input",{type:"radio","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:i,style:{...e.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function R4(e){return e?"checked":"unchecked"}var dse=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],FC="RadioGroup",[fse,lke]=kn(FC,[nu,S4]),k4=nu(),P4=S4(),[hse,pse]=fse(FC),M4=S.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:i,required:s=!1,disabled:a=!1,orientation:l,dir:c,loop:u=!0,onValueChange:d,...f}=e,h=k4(n),g=ml(c),[m,b]=Xn({prop:i,defaultProp:o,onChange:d});return p.jsx(hse,{scope:n,name:r,required:s,disabled:a,value:m,onValueChange:b,children:p.jsx(B1,{asChild:!0,...h,orientation:l,dir:g,loop:u,children:p.jsx(ve.div,{role:"radiogroup","aria-required":s,"aria-orientation":l,"data-disabled":a?"":void 0,dir:g,...f,ref:t})})})});M4.displayName=FC;var D4="RadioGroupItem",N4=S.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,i=pse(D4,n),s=i.disabled||r,a=k4(n),l=P4(n),c=S.useRef(null),u=$e(t,c),d=i.value===o.value,f=S.useRef(!1);return S.useEffect(()=>{const h=m=>{dse.includes(m.key)&&(f.current=!0)},g=()=>f.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",g),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",g)}},[]),p.jsx(V1,{asChild:!0,...a,focusable:!s,active:d,children:p.jsx(C4,{disabled:s,required:i.required,checked:d,...l,...o,name:i.name,ref:u,onCheck:()=>i.onValueChange(o.value),onKeyDown:ue(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:ue(o.onFocus,()=>{var h;f.current&&((h=c.current)==null||h.click())})})})});N4.displayName=D4;var gse="RadioGroupIndicator",A4=S.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=P4(n);return p.jsx(E4,{...o,...r,ref:t})});A4.displayName=gse;var O4=M4,T4=N4,mse=A4;const ll=S.forwardRef(({className:e,...t},n)=>p.jsx(O4,{className:se("grid gap-2",e),...t,ref:n}));ll.displayName=O4.displayName;const yo=S.forwardRef(({className:e,...t},n)=>p.jsx(T4,{ref:n,className:se("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:p.jsx(mse,{className:"flex items-center justify-center",children:p.jsx(NO,{className:"h-2.5 w-2.5 fill-current text-current"})})}));yo.displayName=T4.displayName;var I4=S.forwardRef((e,t)=>{const{children:n,...r}=e,o=S.Children.toArray(n),i=o.find(yse);if(i){const s=i.props.children,a=o.map(l=>l===i?S.Children.count(s)>1?S.Children.only(null):S.isValidElement(s)?s.props.children:null:l);return p.jsx(xw,{...r,ref:t,children:S.isValidElement(s)?S.cloneElement(s,void 0,a):null})}return p.jsx(xw,{...r,ref:t,children:n})});I4.displayName="Slot";var xw=S.forwardRef((e,t)=>{const{children:n,...r}=e;if(S.isValidElement(n)){const o=xse(n),i=vse(r,n.props);return n.type!==S.Fragment&&(i.ref=t?Po(t,o):o),S.cloneElement(n,i)}return S.Children.count(n)>1?S.Children.only(null):null});xw.displayName="SlotClone";var bse=({children:e})=>p.jsx(p.Fragment,{children:e});function yse(e){return S.isValidElement(e)&&e.type===bse}function vse(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{i(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function xse(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var LC="Dialog",[j4,F4]=kn(LC),[wse,Mo]=j4(LC),L4=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:s=!0}=e,a=S.useRef(null),l=S.useRef(null),[c=!1,u]=Xn({prop:r,defaultProp:o,onChange:i});return p.jsx(wse,{scope:t,triggerRef:a,contentRef:l,contentId:wn(),titleId:wn(),descriptionId:wn(),open:c,onOpenChange:u,onOpenToggle:S.useCallback(()=>u(d=>!d),[u]),modal:s,children:n})};L4.displayName=LC;var $4="DialogTrigger",z4=S.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Mo($4,n),i=$e(t,o.triggerRef);return p.jsx(ve.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":BC(o.open),...r,ref:i,onClick:ue(e.onClick,o.onOpenToggle)})});z4.displayName=$4;var $C="DialogPortal",[Sse,B4]=j4($C,{forceMount:void 0}),V4=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=Mo($C,t);return p.jsx(Sse,{scope:t,forceMount:n,children:S.Children.map(r,s=>p.jsx(Cn,{present:n||i.open,children:p.jsx(Xf,{asChild:!0,container:o,children:s})}))})};V4.displayName=$C;var tm="DialogOverlay",H4=S.forwardRef((e,t)=>{const n=B4(tm,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Mo(tm,e.__scopeDialog);return i.modal?p.jsx(Cn,{present:r||i.open,children:p.jsx(Cse,{...o,ref:t})}):null});H4.displayName=tm;var Cse=S.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Mo(tm,n);return p.jsx(Jf,{as:I4,allowPinchZoom:!0,shards:[o.contentRef],children:p.jsx(ve.div,{"data-state":BC(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),cl="DialogContent",W4=S.forwardRef((e,t)=>{const n=B4(cl,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Mo(cl,e.__scopeDialog);return p.jsx(Cn,{present:r||i.open,children:i.modal?p.jsx(_se,{...o,ref:t}):p.jsx(Ese,{...o,ref:t})})});W4.displayName=cl;var _se=S.forwardRef((e,t)=>{const n=Mo(cl,e.__scopeDialog),r=S.useRef(null),o=$e(t,n.contentRef,r);return S.useEffect(()=>{const i=r.current;if(i)return Cb(i)},[]),p.jsx(U4,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ue(e.onCloseAutoFocus,i=>{var s;i.preventDefault(),(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:ue(e.onPointerDownOutside,i=>{const s=i.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&i.preventDefault()}),onFocusOutside:ue(e.onFocusOutside,i=>i.preventDefault())})}),Ese=S.forwardRef((e,t)=>{const n=Mo(cl,e.__scopeDialog),r=S.useRef(!1),o=S.useRef(!1);return p.jsx(U4,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var s,a;(s=e.onCloseAutoFocus)==null||s.call(e,i),i.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{var l,c;(l=e.onInteractOutside)==null||l.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=i.target;((c=n.triggerRef.current)==null?void 0:c.contains(s))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),U4=S.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...s}=e,a=Mo(cl,n),l=S.useRef(null),c=$e(t,l);return wb(),p.jsxs(p.Fragment,{children:[p.jsx(Zf,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:p.jsx(wl,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":BC(a.open),...s,ref:c,onDismiss:()=>a.onOpenChange(!1)})}),p.jsxs(p.Fragment,{children:[p.jsx(kse,{titleId:a.titleId}),p.jsx(Mse,{contentRef:l,descriptionId:a.descriptionId})]})]})}),zC="DialogTitle",q4=S.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Mo(zC,n);return p.jsx(ve.h2,{id:o.titleId,...r,ref:t})});q4.displayName=zC;var G4="DialogDescription",Y4=S.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Mo(G4,n);return p.jsx(ve.p,{id:o.descriptionId,...r,ref:t})});Y4.displayName=G4;var K4="DialogClose",X4=S.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Mo(K4,n);return p.jsx(ve.button,{type:"button",...r,ref:t,onClick:ue(e.onClick,()=>o.onOpenChange(!1))})});X4.displayName=K4;function BC(e){return e?"open":"closed"}var Q4="DialogTitleWarning",[Rse,Z4]=ZB(Q4,{contentName:cl,titleName:zC,docsSlug:"dialog"}),kse=({titleId:e})=>{const t=Z4(Q4),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
352
+ `)}function TP(e){return/[",\n\r]/.test(e)?`"${e.replace(/"/g,'""')}"`:e}function Zie(e,t,n){const r=new Blob([e],{type:n}),o=URL.createObjectURL(r),i=document.createElement("a");i.href=o,i.download=t,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(o)}function Jie(e,t="export.csv"){const n=Qie(e);Zie(n,t,"text/csv;charset=utf-8;")}function ese({globalFilter:e,onGlobalFilterChange:t,totalRows:n,columns:r,selectColumnVisible:o,onToggleSelectColumn:i,onColumnVisibilityChange:s,card:a,data:l,exportFileName:c="export"}){var E;const[u,d]=R.useState(!0),{eventHandlers:f}=Qn(),{onExportData:h}=f||{},g=re(_=>_.themeStyle),m=g==null?void 0:g.controlInputRadius,b=(E=a==null?void 0:a.preferences)==null?void 0:E.allowDownload,{data:y}=ti(a),v=re(_=>_.isVisualEditing);R.useEffect(()=>{const _=r.filter(w=>w.id!=="select"&&w.getCanHide()),C=_.every(w=>w.getIsVisible());d(C&&_.length>0)},[r]);const x=(_,C=!1)=>{const w=C?l.selectedRows:l.rows;if(h){h({cardId:a.id,title:a.title,data:w,sql:y==null?void 0:y.sql});return}Jie(w,`${c}.csv`)};return n<10?null:p.jsxs("div",{className:"flex w-full items-center gap-2",children:[p.jsx("div",{className:"flex items-center gap-2",children:p.jsx(Tr,{style:{borderRadius:m},placeholder:"Search all columns...",value:e,onChange:_=>t(_.target.value),className:"h-9 max-w-sm"})}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsxs(nh,{children:[p.jsx(rh,{asChild:!0,children:p.jsx(We,{variant:"outline",size:"sm",className:se("invisible group-hover:visible",{visible:v}),style:{borderRadius:m},children:p.jsx(TU,{className:"h-4 w-4"})})}),p.jsx(hu,{style:{borderRadius:m},align:"start",className:"min-w-[200px] p-0",children:p.jsxs("div",{className:"flex flex-col gap-1 p-2",children:[v&&p.jsxs(p.Fragment,{children:[p.jsx(We,{variant:"ghost",size:"sm",className:"justify-start font-normal",onClick:()=>i(!o),children:p.jsxs("div",{className:"flex w-full items-center",children:[p.jsx("div",{className:"mr-2 flex h-4 w-4 items-center justify-center",children:o?p.jsx(ei,{className:"h-4 w-4"}):null}),p.jsx("span",{children:"Show Select Checkbox"})]})}),p.jsx(il,{className:"my-1"})]}),p.jsx("div",{className:"max-h-[300px] overflow-y-auto bg-popover",children:p.jsx("div",{className:"p-1",children:r.filter(_=>_.getCanHide()&&_.id!=="select").map(_=>{const C=_.getIsVisible();return p.jsx("div",{style:{borderRadius:m||2},className:"w-full justify-start px-2 py-1.5 text-sm font-normal capitalize hover:bg-muted",onClick:()=>{typeof _.id=="string"&&(s==null||s(_.id,!C))},children:p.jsxs("div",{className:"flex w-full items-center",children:[p.jsx("div",{className:"mr-2 flex h-4 w-4 items-center justify-center",children:C?p.jsx(ei,{className:"h-4 w-4"}):null}),p.jsx("span",{children:_.id})]})},_.id)})})})]})})]}),b&&p.jsxs(We,{className:se("invisible group-hover:visible",{visible:v}),variant:"outline",size:"sm",onClick:()=>x(),children:[p.jsx(mS,{className:"h-4 w-4"}),p.jsx("span",{className:"sr-only",children:"Export"})]})]})]})}function tse({pageCount:e,pageIndex:t,pageSize:n,rowCount:r,selectedRowCount:o,setPageIndex:i,setPageSize:s,canPreviousPage:a,canNextPage:l,previousPage:c,nextPage:u,onClearSelection:d}){const f=re(v=>v.themeStyle),h=f==null?void 0:f.controlInputRadius,g=re(v=>v.isVisualEditing),{updatePageSize:m}=vl();function b(v){s(Number(v)),g&&m(Number(v))}const y=r.toLocaleString();return p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsxs("div",{className:"hidden flex-1 items-center gap-2 text-sm text-muted-foreground md:flex",children:[o>0&&p.jsxs(p.Fragment,{children:[o," of ",y," row(s) selected"," "]}),o===0&&p.jsxs(p.Fragment,{children:[y," rows"]}),o>0&&p.jsx(We,{variant:"outline",size:"sm",style:{borderRadius:h},onClick:d,className:"h-8 text-foreground",children:"Clear"})]}),p.jsxs("div",{className:"flex w-full items-center gap-8 md:w-fit",children:[p.jsxs("div",{className:"hidden items-center gap-2 md:flex",children:[p.jsx(ke,{htmlFor:"rows-per-page",className:"text-sm font-normal text-muted-foreground",children:"Rows per page"}),p.jsxs(tn,{value:`${n}`,onValueChange:b,children:[p.jsx(Xt,{style:{borderRadius:h},className:`h-8 w-16 ${hr}`,id:"rows-per-page",children:p.jsx(nn,{placeholder:n})}),p.jsx(Qt,{side:"top",children:[10,20,30,40,50].map(v=>p.jsx(Se,{value:`${v}`,children:v},v))})]})]}),p.jsxs("div",{className:"flex w-fit items-center justify-center text-sm font-normal text-muted-foreground",children:["Page ",t+1," of ",e]}),p.jsxs("div",{className:"ml-auto flex items-center gap-2 md:ml-0",children:[p.jsxs(We,{style:{borderRadius:h},variant:"outline",className:"hidden h-8 w-8 p-0 md:flex",onClick:()=>i(0),disabled:!a,children:[p.jsx("span",{className:"sr-only",children:"Go to first page"}),p.jsx(NU,{className:"h-4 w-4"})]}),p.jsxs(We,{style:{borderRadius:h},variant:"outline",className:"h-8 w-8 p-0",onClick:c,disabled:!a,children:[p.jsx("span",{className:"sr-only",children:"Go to previous page"}),p.jsx(DO,{className:"h-4 w-4"})]}),p.jsxs(We,{style:{borderRadius:h},variant:"outline",className:"h-8 w-8 p-0",onClick:u,disabled:!l,children:[p.jsx("span",{className:"sr-only",children:"Go to next page"}),p.jsx(gS,{className:"h-4 w-4"})]}),p.jsxs(We,{style:{borderRadius:h},variant:"outline",className:"hidden h-8 w-8 p-0 md:flex",onClick:()=>i(e-1),disabled:!l,children:[p.jsx("span",{className:"sr-only",children:"Go to last page"}),p.jsx(AU,{className:"h-4 w-4"})]})]})]})]})}var IC="Checkbox",[nse,ake]=kn(IC),[rse,ose]=nse(IC),b4=S.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:i,required:s,disabled:a,value:l="on",onCheckedChange:c,form:u,...d}=e,[f,h]=S.useState(null),g=$e(t,E=>h(E)),m=S.useRef(!1),b=f?u||!!f.closest("form"):!0,[y=!1,v]=Xn({prop:o,defaultProp:i,onChange:c}),x=S.useRef(y);return S.useEffect(()=>{const E=f==null?void 0:f.form;if(E){const _=()=>v(x.current);return E.addEventListener("reset",_),()=>E.removeEventListener("reset",_)}},[f,v]),p.jsxs(rse,{scope:n,state:y,disabled:a,children:[p.jsx(ve.button,{type:"button",role:"checkbox","aria-checked":Es(y)?"mixed":y,"aria-required":s,"data-state":x4(y),"data-disabled":a?"":void 0,disabled:a,value:l,...d,ref:g,onKeyDown:ue(e.onKeyDown,E=>{E.key==="Enter"&&E.preventDefault()}),onClick:ue(e.onClick,E=>{v(_=>Es(_)?!0:!_),b&&(m.current=E.isPropagationStopped(),m.current||E.stopPropagation())})}),b&&p.jsx(ise,{control:f,bubbles:!m.current,name:r,value:l,checked:y,required:s,disabled:a,form:u,style:{transform:"translateX(-100%)"},defaultChecked:Es(i)?!1:i})]})});b4.displayName=IC;var y4="CheckboxIndicator",v4=S.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,i=ose(y4,n);return p.jsx(Cn,{present:r||Es(i.state)||i.state===!0,children:p.jsx(ve.span,{"data-state":x4(i.state),"data-disabled":i.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});v4.displayName=y4;var ise=e=>{const{control:t,checked:n,bubbles:r=!0,defaultChecked:o,...i}=e,s=S.useRef(null),a=Sb(n),l=db(t);S.useEffect(()=>{const u=s.current,d=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(d,"checked").set;if(a!==n&&h){const g=new Event("click",{bubbles:r});u.indeterminate=Es(n),h.call(u,Es(n)?!1:n),u.dispatchEvent(g)}},[a,n,r]);const c=S.useRef(Es(n)?!1:n);return p.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:o??c.current,...i,tabIndex:-1,ref:s,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Es(e){return e==="indeterminate"}function x4(e){return Es(e)?"indeterminate":e?"checked":"unchecked"}var w4=b4,sse=v4;const al=S.forwardRef(({className:e,...t},n)=>p.jsx(w4,{ref:n,className:se("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:p.jsx(sse,{className:se("flex items-center justify-center text-current"),children:p.jsx(ei,{className:"h-4 w-4"})})}));al.displayName=w4.displayName;var jC="Radio",[ase,S4]=kn(jC),[lse,cse]=ase(jC),C4=S.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:i,disabled:s,value:a="on",onCheck:l,form:c,...u}=e,[d,f]=S.useState(null),h=$e(t,b=>f(b)),g=S.useRef(!1),m=d?c||!!d.closest("form"):!0;return p.jsxs(lse,{scope:n,checked:o,disabled:s,children:[p.jsx(ve.button,{type:"button",role:"radio","aria-checked":o,"data-state":R4(o),"data-disabled":s?"":void 0,disabled:s,value:a,...u,ref:h,onClick:ue(e.onClick,b=>{o||l==null||l(),m&&(g.current=b.isPropagationStopped(),g.current||b.stopPropagation())})}),m&&p.jsx(use,{control:d,bubbles:!g.current,name:r,value:a,checked:o,required:i,disabled:s,form:c,style:{transform:"translateX(-100%)"}})]})});C4.displayName=jC;var _4="RadioIndicator",E4=S.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,i=cse(_4,n);return p.jsx(Cn,{present:r||i.checked,children:p.jsx(ve.span,{"data-state":R4(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:t})})});E4.displayName=_4;var use=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=S.useRef(null),s=Sb(n),a=db(t);return S.useEffect(()=>{const l=i.current,c=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(c,"checked").set;if(s!==n&&d){const f=new Event("click",{bubbles:r});d.call(l,n),l.dispatchEvent(f)}},[s,n,r]),p.jsx("input",{type:"radio","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:i,style:{...e.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function R4(e){return e?"checked":"unchecked"}var dse=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],FC="RadioGroup",[fse,lke]=kn(FC,[nu,S4]),k4=nu(),P4=S4(),[hse,pse]=fse(FC),M4=S.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:i,required:s=!1,disabled:a=!1,orientation:l,dir:c,loop:u=!0,onValueChange:d,...f}=e,h=k4(n),g=ml(c),[m,b]=Xn({prop:i,defaultProp:o,onChange:d});return p.jsx(hse,{scope:n,name:r,required:s,disabled:a,value:m,onValueChange:b,children:p.jsx(B1,{asChild:!0,...h,orientation:l,dir:g,loop:u,children:p.jsx(ve.div,{role:"radiogroup","aria-required":s,"aria-orientation":l,"data-disabled":a?"":void 0,dir:g,...f,ref:t})})})});M4.displayName=FC;var D4="RadioGroupItem",N4=S.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,i=pse(D4,n),s=i.disabled||r,a=k4(n),l=P4(n),c=S.useRef(null),u=$e(t,c),d=i.value===o.value,f=S.useRef(!1);return S.useEffect(()=>{const h=m=>{dse.includes(m.key)&&(f.current=!0)},g=()=>f.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",g),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",g)}},[]),p.jsx(V1,{asChild:!0,...a,focusable:!s,active:d,children:p.jsx(C4,{disabled:s,required:i.required,checked:d,...l,...o,name:i.name,ref:u,onCheck:()=>i.onValueChange(o.value),onKeyDown:ue(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:ue(o.onFocus,()=>{var h;f.current&&((h=c.current)==null||h.click())})})})});N4.displayName=D4;var gse="RadioGroupIndicator",A4=S.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=P4(n);return p.jsx(E4,{...o,...r,ref:t})});A4.displayName=gse;var O4=M4,T4=N4,mse=A4;const ll=S.forwardRef(({className:e,...t},n)=>p.jsx(O4,{className:se("grid gap-2",e),...t,ref:n}));ll.displayName=O4.displayName;const yo=S.forwardRef(({className:e,...t},n)=>p.jsx(T4,{ref:n,className:se("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:p.jsx(mse,{className:"flex items-center justify-center",children:p.jsx(NO,{className:"h-2.5 w-2.5 fill-current text-current"})})}));yo.displayName=T4.displayName;var I4=S.forwardRef((e,t)=>{const{children:n,...r}=e,o=S.Children.toArray(n),i=o.find(yse);if(i){const s=i.props.children,a=o.map(l=>l===i?S.Children.count(s)>1?S.Children.only(null):S.isValidElement(s)?s.props.children:null:l);return p.jsx(xw,{...r,ref:t,children:S.isValidElement(s)?S.cloneElement(s,void 0,a):null})}return p.jsx(xw,{...r,ref:t,children:n})});I4.displayName="Slot";var xw=S.forwardRef((e,t)=>{const{children:n,...r}=e;if(S.isValidElement(n)){const o=xse(n),i=vse(r,n.props);return n.type!==S.Fragment&&(i.ref=t?Po(t,o):o),S.cloneElement(n,i)}return S.Children.count(n)>1?S.Children.only(null):null});xw.displayName="SlotClone";var bse=({children:e})=>p.jsx(p.Fragment,{children:e});function yse(e){return S.isValidElement(e)&&e.type===bse}function vse(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{i(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function xse(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var LC="Dialog",[j4,F4]=kn(LC),[wse,Mo]=j4(LC),L4=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:s=!0}=e,a=S.useRef(null),l=S.useRef(null),[c=!1,u]=Xn({prop:r,defaultProp:o,onChange:i});return p.jsx(wse,{scope:t,triggerRef:a,contentRef:l,contentId:wn(),titleId:wn(),descriptionId:wn(),open:c,onOpenChange:u,onOpenToggle:S.useCallback(()=>u(d=>!d),[u]),modal:s,children:n})};L4.displayName=LC;var $4="DialogTrigger",z4=S.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Mo($4,n),i=$e(t,o.triggerRef);return p.jsx(ve.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":BC(o.open),...r,ref:i,onClick:ue(e.onClick,o.onOpenToggle)})});z4.displayName=$4;var $C="DialogPortal",[Sse,B4]=j4($C,{forceMount:void 0}),V4=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=Mo($C,t);return p.jsx(Sse,{scope:t,forceMount:n,children:S.Children.map(r,s=>p.jsx(Cn,{present:n||i.open,children:p.jsx(Xf,{asChild:!0,container:o,children:s})}))})};V4.displayName=$C;var tm="DialogOverlay",H4=S.forwardRef((e,t)=>{const n=B4(tm,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Mo(tm,e.__scopeDialog);return i.modal?p.jsx(Cn,{present:r||i.open,children:p.jsx(Cse,{...o,ref:t})}):null});H4.displayName=tm;var Cse=S.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Mo(tm,n);return p.jsx(Jf,{as:I4,allowPinchZoom:!0,shards:[o.contentRef],children:p.jsx(ve.div,{"data-state":BC(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),cl="DialogContent",W4=S.forwardRef((e,t)=>{const n=B4(cl,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Mo(cl,e.__scopeDialog);return p.jsx(Cn,{present:r||i.open,children:i.modal?p.jsx(_se,{...o,ref:t}):p.jsx(Ese,{...o,ref:t})})});W4.displayName=cl;var _se=S.forwardRef((e,t)=>{const n=Mo(cl,e.__scopeDialog),r=S.useRef(null),o=$e(t,n.contentRef,r);return S.useEffect(()=>{const i=r.current;if(i)return Cb(i)},[]),p.jsx(U4,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ue(e.onCloseAutoFocus,i=>{var s;i.preventDefault(),(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:ue(e.onPointerDownOutside,i=>{const s=i.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&i.preventDefault()}),onFocusOutside:ue(e.onFocusOutside,i=>i.preventDefault())})}),Ese=S.forwardRef((e,t)=>{const n=Mo(cl,e.__scopeDialog),r=S.useRef(!1),o=S.useRef(!1);return p.jsx(U4,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var s,a;(s=e.onCloseAutoFocus)==null||s.call(e,i),i.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{var l,c;(l=e.onInteractOutside)==null||l.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=i.target;((c=n.triggerRef.current)==null?void 0:c.contains(s))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),U4=S.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...s}=e,a=Mo(cl,n),l=S.useRef(null),c=$e(t,l);return wb(),p.jsxs(p.Fragment,{children:[p.jsx(Zf,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:p.jsx(wl,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":BC(a.open),...s,ref:c,onDismiss:()=>a.onOpenChange(!1)})}),p.jsxs(p.Fragment,{children:[p.jsx(kse,{titleId:a.titleId}),p.jsx(Mse,{contentRef:l,descriptionId:a.descriptionId})]})]})}),zC="DialogTitle",q4=S.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Mo(zC,n);return p.jsx(ve.h2,{id:o.titleId,...r,ref:t})});q4.displayName=zC;var G4="DialogDescription",Y4=S.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Mo(G4,n);return p.jsx(ve.p,{id:o.descriptionId,...r,ref:t})});Y4.displayName=G4;var K4="DialogClose",X4=S.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Mo(K4,n);return p.jsx(ve.button,{type:"button",...r,ref:t,onClick:ue(e.onClick,()=>o.onOpenChange(!1))})});X4.displayName=K4;function BC(e){return e?"open":"closed"}var Q4="DialogTitleWarning",[Rse,Z4]=ZB(Q4,{contentName:cl,titleName:zC,docsSlug:"dialog"}),kse=({titleId:e})=>{const t=Z4(Q4),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
353
353
 
354
354
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
355
355
 
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/index-DMlQ9R69.js"),r=require("../types/index.cjs");exports.Dashboard=e.Dashboard;exports.EMPTY_SELECTION=r.EMPTY_SELECTION;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/index-BYJosMLK.js"),r=require("../types/index.cjs");exports.Dashboard=e.Dashboard;exports.EMPTY_SELECTION=r.EMPTY_SELECTION;
@@ -1,4 +1,4 @@
1
- import { D as a } from "../chunks/index-BlBtNRR2.js";
1
+ import { D as a } from "../chunks/index-B7M8EcMr.js";
2
2
  import { EMPTY_SELECTION as e } from "../types/index.js";
3
3
  export {
4
4
  a as Dashboard,
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./chunks/index-DMlQ9R69.js"),Wt=require("./types/index.cjs"),e=require("react/jsx-runtime"),E=require("react");require("react-dom");function Kt(s){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const n in s)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(s,n);Object.defineProperty(a,n,r.get?r:{enumerable:!0,get:()=>s[n]})}}return a.default=s,Object.freeze(a)}const de=Kt(E);/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./chunks/index-BYJosMLK.js"),Wt=require("./types/index.cjs"),e=require("react/jsx-runtime"),E=require("react");require("react-dom");function Kt(s){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const n in s)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(s,n);Object.defineProperty(a,n,r.get?r:{enumerable:!0,get:()=>s[n]})}}return a.default=s,Object.freeze(a)}const de=Kt(E);/**
2
2
  * @license lucide-react v0.453.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { c as F, p as Wt, u as L, a as at, b as Ue, d as Tn, e as zn, B as K, P as Xe, f as An, g as Fn, h as En, i as Ln, L as H, I as ue, j as Vn, k as _n, l as qn, m as W, n as Rn, o as jn, q as Bn, r as vs, s as yn, t as R, C as Kt, v as xs, S as Ne, w as we, x as Se, y as ke, z as Te, A as Me, E as ce, T as Pn, F as $e, G as Qe, H as Mt, J as Oe, K as Yt, M as Dt, N as Zt, O as It, Q as ze, R as Hn, U as ot, V as Cs, W as Gn, X as Un, Y as bn, Z as Ns, _ as p, $ as $n, a0 as et, a1 as gt, a2 as ws, a3 as Qn, a4 as Jn, a5 as Wn, a6 as Kn, a7 as Yn, a8 as Zn, a9 as Xn, aa as ve, ab as ea, ac as ta, ad as na, ae as aa, af as sa, ag as ra, ah as be, ai as Ss, aj as xe, ak as ks, al as Pe, am as Ce, an as Ms, ao as Ds, ap as Is, aq as Os, ar as yt, as as Ae, at as Ts, au as zs, av as J, aw as la, ax as As, ay as Fs, az as Es, aA as Pt, aB as ia, aC as Xt, aD as Ot, aE as tt, aF as oa, aG as bt, aH as Ht, aI as fe, aJ as Ls, aK as Vs, aL as ct, aM as _s, aN as qs, aO as Rs, aP as ca, aQ as js, aR as Tt, aS as Bs, aT as Ps, aU as Hs, aV as vn, aW as Gs, aX as Us, aY as $s, aZ as en, a_ as De, a$ as Qs, b0 as Gt, b1 as Ve, b2 as he, b3 as _e, b4 as Js, b5 as Ws, b6 as Ks, b7 as Ys, b8 as Zs, b9 as At, ba as Xs, bb as xn, bc as er, bd as Cn, be as tr, bf as nr, bg as ar, bh as sr, bi as da, bj as rr, bk as tn, bl as ua, bm as lr, bn as ir, bo as Ye, bp as or, bq as cr, br as ma, bs as dr, bt as ur, bu as mr, bv as hr, bw as pr, bx as zt, by as ha, bz as fr, bA as nn, bB as an, bC as Ze, bD as ft, bE as gr, bF as yr, bG as br, bH as sn, bI as pa, bJ as vr, bK as vt, bL as fa, bM as xt, bN as ga, bO as ya, bP as ba, bQ as xr, bR as Cr, bS as Nr, bT as wr, bU as Ee, bV as le, bW as ie, bX as oe, bY as rn, bZ as Sr, b_ as kr, b$ as Mr, c0 as Dr, c1 as Ir, c2 as Nn, c3 as va, c4 as Or, c5 as Tr, c6 as zr, c7 as Ar, c8 as ln, c9 as xa, ca as Ca, cb as on, cc as Fr, cd as Er, ce as Na, cf as Lr, cg as Vr, ch as _r, ci as qr, cj as Rr, ck as jr, cl as Br, cm as Pr, cn as Hr, co as Gr, cp as Ft, cq as wa, cr as Ur, cs as $r, ct as Qr, cu as Jr, cv as Wr, cw as Kr, cx as Yr } from "./chunks/index-BlBtNRR2.js";
2
- import { D as Uo, cC as $o, cA as Qo, cA as Jo, cF as Wo, cE as Ko, cD as Yo, cG as Zo, cH as Xo, cB as ec, cy as tc, cz as nc } from "./chunks/index-BlBtNRR2.js";
1
+ import { c as F, p as Wt, u as L, a as at, b as Ue, d as Tn, e as zn, B as K, P as Xe, f as An, g as Fn, h as En, i as Ln, L as H, I as ue, j as Vn, k as _n, l as qn, m as W, n as Rn, o as jn, q as Bn, r as vs, s as yn, t as R, C as Kt, v as xs, S as Ne, w as we, x as Se, y as ke, z as Te, A as Me, E as ce, T as Pn, F as $e, G as Qe, H as Mt, J as Oe, K as Yt, M as Dt, N as Zt, O as It, Q as ze, R as Hn, U as ot, V as Cs, W as Gn, X as Un, Y as bn, Z as Ns, _ as p, $ as $n, a0 as et, a1 as gt, a2 as ws, a3 as Qn, a4 as Jn, a5 as Wn, a6 as Kn, a7 as Yn, a8 as Zn, a9 as Xn, aa as ve, ab as ea, ac as ta, ad as na, ae as aa, af as sa, ag as ra, ah as be, ai as Ss, aj as xe, ak as ks, al as Pe, am as Ce, an as Ms, ao as Ds, ap as Is, aq as Os, ar as yt, as as Ae, at as Ts, au as zs, av as J, aw as la, ax as As, ay as Fs, az as Es, aA as Pt, aB as ia, aC as Xt, aD as Ot, aE as tt, aF as oa, aG as bt, aH as Ht, aI as fe, aJ as Ls, aK as Vs, aL as ct, aM as _s, aN as qs, aO as Rs, aP as ca, aQ as js, aR as Tt, aS as Bs, aT as Ps, aU as Hs, aV as vn, aW as Gs, aX as Us, aY as $s, aZ as en, a_ as De, a$ as Qs, b0 as Gt, b1 as Ve, b2 as he, b3 as _e, b4 as Js, b5 as Ws, b6 as Ks, b7 as Ys, b8 as Zs, b9 as At, ba as Xs, bb as xn, bc as er, bd as Cn, be as tr, bf as nr, bg as ar, bh as sr, bi as da, bj as rr, bk as tn, bl as ua, bm as lr, bn as ir, bo as Ye, bp as or, bq as cr, br as ma, bs as dr, bt as ur, bu as mr, bv as hr, bw as pr, bx as zt, by as ha, bz as fr, bA as nn, bB as an, bC as Ze, bD as ft, bE as gr, bF as yr, bG as br, bH as sn, bI as pa, bJ as vr, bK as vt, bL as fa, bM as xt, bN as ga, bO as ya, bP as ba, bQ as xr, bR as Cr, bS as Nr, bT as wr, bU as Ee, bV as le, bW as ie, bX as oe, bY as rn, bZ as Sr, b_ as kr, b$ as Mr, c0 as Dr, c1 as Ir, c2 as Nn, c3 as va, c4 as Or, c5 as Tr, c6 as zr, c7 as Ar, c8 as ln, c9 as xa, ca as Ca, cb as on, cc as Fr, cd as Er, ce as Na, cf as Lr, cg as Vr, ch as _r, ci as qr, cj as Rr, ck as jr, cl as Br, cm as Pr, cn as Hr, co as Gr, cp as Ft, cq as wa, cr as Ur, cs as $r, ct as Qr, cu as Jr, cv as Wr, cw as Kr, cx as Yr } from "./chunks/index-B7M8EcMr.js";
2
+ import { D as Uo, cC as $o, cA as Qo, cA as Jo, cF as Wo, cE as Ko, cD as Yo, cG as Zo, cH as Xo, cB as ec, cy as tc, cz as nc } from "./chunks/index-B7M8EcMr.js";
3
3
  import { EMPTY_SELECTION as sc } from "./types/index.js";
4
4
  import { jsxs as r, jsx as e, Fragment as ae } from "react/jsx-runtime";
5
5
  import * as Ke from "react";
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "email": "support@semaphor.cloud"
6
6
  },
7
7
  "license": "MIT",
8
- "version": "0.0.484",
8
+ "version": "0.0.485",
9
9
  "description": "Fully interactive and customizable dashboards for your apps.",
10
10
  "keywords": [
11
11
  "react",