@udixio/ui-react 2.7.0 → 2.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { jsx as m, jsxs as X, Fragment as me } from "react/jsx-runtime";
2
2
  import { clsx as He } from "clsx";
3
3
  import { extendTailwindMerge as ut } from "tailwind-merge";
4
- import Z, { useMemo as Me, useState as $, useEffect as M, useRef as D, useLayoutEffect as Xe, isValidElement as pe, cloneElement as xe, Children as dt, Fragment as ft } from "react";
5
- import { motion as q, AnimatePresence as le, useScroll as mt, useMotionValueEvent as We, animate as ht } from "motion/react";
4
+ import Z, { useMemo as Me, useState as R, useEffect as $, useRef as D, useLayoutEffect as Xe, isValidElement as pe, cloneElement as xe, Children as dt, Fragment as ft } from "react";
5
+ import { motion as q, AnimatePresence as se, useScroll as mt, useMotionValueEvent as We, animate as ht } from "motion/react";
6
6
  import { animate as pt } from "motion";
7
7
  import { createPortal as Ue } from "react-dom";
8
8
  import { loader as yt, defineConfig as wt, FontPlugin as vt, Variants as xt } from "@udixio/theme";
@@ -41,22 +41,22 @@ function Lt(e) {
41
41
  const $e = (e) => {
42
42
  const t = {};
43
43
  e.classNameList.forEach((a) => {
44
- var o;
44
+ var r;
45
45
  if (a)
46
46
  if (typeof a == "string")
47
- (t[o = e.default] ?? (t[o] = [])).push(a);
47
+ (t[r = e.default] ?? (t[r] = [])).push(a);
48
48
  else {
49
- const c = a(e.states);
50
- Object.entries(c).map((l) => {
51
- const [s, f] = l;
52
- (t[s] ?? (t[s] = [])).push(f);
49
+ const s = a(e.states);
50
+ Object.entries(s).map((c) => {
51
+ const [l, i] = c;
52
+ (t[l] ?? (t[l] = [])).push(i);
53
53
  });
54
54
  }
55
55
  });
56
56
  const n = t;
57
57
  return Object.entries(t).map((a) => {
58
- let [o, c] = a;
59
- c = c.reverse(), o == e.default && c.unshift("relative"), c.unshift(Lt(o)), n[o] = gt(...c);
58
+ let [r, s] = a;
59
+ s = s.reverse(), r == e.default && s.unshift("relative"), s.unshift(Lt(r)), n[r] = gt(...s);
60
60
  }), n;
61
61
  }, Q = (e, t) => (n) => $e({
62
62
  classNameList: [n.className, t],
@@ -85,60 +85,60 @@ const qe = ({
85
85
  disableTextMargins: t,
86
86
  disabled: n,
87
87
  iconPosition: a,
88
- icon: o,
89
- isActive: c,
90
- loading: l,
91
- shape: s,
92
- onToggle: f,
93
- size: r,
88
+ icon: r,
89
+ isActive: s,
90
+ loading: c,
91
+ shape: l,
92
+ onToggle: i,
93
+ size: o,
94
94
  allowShapeTransformation: h
95
95
  }) => ({
96
96
  button: p(
97
97
  " relative cursor-pointer group/button outline-none inline-block flex justify-center items-center ",
98
- r === "xSmall" && "text-label-large px-3 py-1.5 gap-1",
99
- r === "small" && "text-label-large px-4 py-2.5 gap-2",
100
- r === "medium" && "text-title-medium px-6 py-4 gap-2",
101
- r === "large" && "text-headline-small px-12 py-8 gap-3",
102
- r === "xLarge" && "text-headline-large px-16 py-12 gap-4",
103
- s === "rounded" && {
104
- "rounded-[30px]": r === "xSmall" || r == "small",
105
- "rounded-[40px]": r === "medium",
106
- "rounded-[70px]": r === "large" || r == "xLarge"
98
+ o === "xSmall" && "text-label-large px-3 py-1.5 gap-1",
99
+ o === "small" && "text-label-large px-4 py-2.5 gap-2",
100
+ o === "medium" && "text-title-medium px-6 py-4 gap-2",
101
+ o === "large" && "text-headline-small px-12 py-8 gap-3",
102
+ o === "xLarge" && "text-headline-large px-16 py-12 gap-4",
103
+ l === "rounded" && {
104
+ "rounded-[30px]": o === "xSmall" || o == "small",
105
+ "rounded-[40px]": o === "medium",
106
+ "rounded-[70px]": o === "large" || o == "xLarge"
107
107
  },
108
- (s === "squared" || h && c) && {
109
- "rounded-[12px]": r === "xSmall" || r == "small",
110
- "rounded-[16px]": r === "medium",
111
- "rounded-[28px]": r === "large" || r == "xLarge"
108
+ (l === "squared" || h && s) && {
109
+ "rounded-[12px]": o === "xSmall" || o == "small",
110
+ "rounded-[16px]": o === "medium",
111
+ "rounded-[28px]": o === "large" || o == "xLarge"
112
112
  },
113
113
  h && !n && {
114
- "active:rounded-[12px]": r === "xSmall" || r == "small",
115
- "active:rounded-[16px]": r === "medium",
116
- "active:rounded-[28px]": r === "large" || r == "xLarge"
114
+ "active:rounded-[12px]": o === "xSmall" || o == "small",
115
+ "active:rounded-[16px]": o === "medium",
116
+ "active:rounded-[28px]": o === "large" || o == "xLarge"
117
117
  },
118
118
  e === "elevated" && {
119
119
  "shadow-1 hover:shadow-2": !n,
120
- "bg-surface-container-low text-primary": !n && !c,
121
- "bg-primary text-on-primary": !n && c,
120
+ "bg-surface-container-low text-primary": !n && !s,
121
+ "bg-primary text-on-primary": !n && s,
122
122
  "text-on-surface/[38%]": n
123
123
  },
124
124
  e === "filled" && {
125
125
  "hover:shadow-1": !n,
126
- "bg-surface-container text-on-surface-variant": !n && !c && f,
127
- "bg-primary text-on-primary": !n && (c && f || !f),
126
+ "bg-surface-container text-on-surface-variant": !n && !s && i,
127
+ "bg-primary text-on-primary": !n && (s && i || !i),
128
128
  "text-on-surface/[38%]": n
129
129
  },
130
130
  e === "tonal" && {
131
131
  "hover:shadow-1": !n,
132
- "bg-secondary-container text-on-secondary-container": !n && !c,
133
- "bg-secondary text-on-secondary": !n && c,
132
+ "bg-secondary-container text-on-secondary-container": !n && !s,
133
+ "bg-secondary text-on-secondary": !n && s,
134
134
  "text-on-surface/[0.38]": n
135
135
  },
136
136
  e === "outlined" && [
137
137
  " border",
138
138
  {
139
139
  "border-on-surface/[0.12] text-on-surface/[0.38]": n,
140
- "text-primary border-outline focus:border-primary": !n && !c,
141
- "text-inverse-on-surface bg-inverse-surface border-inverse-surface": !n && c
140
+ "text-primary border-outline focus:border-primary": !n && !s,
141
+ "text-inverse-on-surface bg-inverse-surface border-inverse-surface": !n && s
142
142
  }
143
143
  ],
144
144
  e === "text" && [
@@ -148,11 +148,11 @@ const qe = ({
148
148
  "text-on-surface/[0.38]": n
149
149
  },
150
150
  t && [
151
- r === "xSmall" && "-mx-3 ",
152
- r === "small" && "-mx-4 ",
153
- r === "medium" && "-mx-6 ",
154
- r === "large" && "-mx-12",
155
- r === "xLarge" && "-mx-16 "
151
+ o === "xSmall" && "-mx-3 ",
152
+ o === "small" && "-mx-4 ",
153
+ o === "medium" && "-mx-6 ",
154
+ o === "large" && "-mx-12",
155
+ o === "xLarge" && "-mx-16 "
156
156
  // size === 'small' && ' -my-2.5',
157
157
  // size === 'medium' && ' -my-4',
158
158
  // size === 'large' && '-my-8',
@@ -166,30 +166,30 @@ const qe = ({
166
166
  ),
167
167
  stateLayer: p(
168
168
  "overflow-hidden",
169
- s === "rounded" && {
170
- "rounded-[30px]": r === "xSmall" || r == "small",
171
- "rounded-[40px]": r === "medium",
172
- "rounded-[70px]": r === "large" || r == "xLarge"
169
+ l === "rounded" && {
170
+ "rounded-[30px]": o === "xSmall" || o == "small",
171
+ "rounded-[40px]": o === "medium",
172
+ "rounded-[70px]": o === "large" || o == "xLarge"
173
173
  },
174
- (s === "squared" || h && c) && {
175
- "rounded-[12px]": r === "xSmall" || r == "small",
176
- "rounded-[16px]": r === "medium",
177
- "rounded-[28px]": r === "large" || r == "xLarge"
174
+ (l === "squared" || h && s) && {
175
+ "rounded-[12px]": o === "xSmall" || o == "small",
176
+ "rounded-[16px]": o === "medium",
177
+ "rounded-[28px]": o === "large" || o == "xLarge"
178
178
  },
179
179
  h && !n && {
180
- "group-active/button:rounded-[12px]": r === "xSmall" || r == "small",
181
- "group-active/button:rounded-[16px]": r === "medium",
182
- "group-active/button:rounded-[28px]": r === "large" || r == "xLarge"
180
+ "group-active/button:rounded-[12px]": o === "xSmall" || o == "small",
181
+ "group-active/button:rounded-[16px]": o === "medium",
182
+ "group-active/button:rounded-[28px]": o === "large" || o == "xLarge"
183
183
  }
184
184
  ),
185
- label: p({ invisible: l }),
185
+ label: p({ invisible: c }),
186
186
  icon: p(
187
- { invisible: l },
188
- r === "xSmall" && "size-5",
189
- r === "small" && "size-5",
190
- r === "medium" && "size-6",
191
- r === "large" && "size-8",
192
- r === "xLarge" && "size-10"
187
+ { invisible: c },
188
+ o === "xSmall" && "size-5",
189
+ o === "small" && "size-5",
190
+ o === "medium" && "size-6",
191
+ o === "large" && "size-8",
192
+ o === "xLarge" && "size-10"
193
193
  )
194
194
  }), $n = Q(
195
195
  "button",
@@ -258,14 +258,14 @@ const qe = ({
258
258
  fab: p(
259
259
  "flex shadow-3 hover:shadow-4 group/fab overflow-hidden outline-none items-center cursor-pointer",
260
260
  {
261
- "rounded-[12px]": e == "small" && !n,
262
- "rounded-[16px]": e == "medium" || n,
263
- "rounded-[28px]": e == "large" && !n
261
+ "rounded-[12px]": e == "small",
262
+ "rounded-[16px]": e == "medium",
263
+ "rounded-[28px]": e == "large"
264
264
  },
265
265
  {
266
- "p-2": e == "small" && !n,
267
- "p-4": e == "medium" || n,
268
- "p-[30px]": e == "large" && !n
266
+ "p-2": e == "small",
267
+ "p-4": e == "medium",
268
+ "p-[30px]": e == "large"
269
269
  },
270
270
  t === "primary" && "bg-primary text-on-primary",
271
271
  t === "secondary" && "bg-secondary text-on-secondary",
@@ -275,10 +275,14 @@ const qe = ({
275
275
  t === "tertiaryContainer" && "bg-tertiary-container text-on-tertiary-container"
276
276
  ),
277
277
  icon: p({
278
- "size-6": e == "small" || e == "medium" || n,
279
- "size-9": e == "large" && !n
278
+ "size-6": e == "small" || e == "medium",
279
+ "size-9": e == "large"
280
280
  }),
281
- label: p("text-title-medium text-nowrap")
281
+ label: p("text-nowrap", {
282
+ "text-title-medium": e == "small",
283
+ "text-title-large": e == "medium",
284
+ "text-headline-small": e == "large"
285
+ })
282
286
  }), An = Q("fab", Ze), Ct = J("fab", Ze), Qe = ({
283
287
  size: e,
284
288
  variant: t,
@@ -299,10 +303,10 @@ const qe = ({
299
303
  disabled: t,
300
304
  onToggle: n,
301
305
  isActive: a,
302
- size: o,
303
- width: c,
304
- shape: l,
305
- allowShapeTransformation: s
306
+ size: r,
307
+ width: s,
308
+ shape: c,
309
+ allowShapeTransformation: l
306
310
  }) => ({
307
311
  iconButton: p(
308
312
  "rounded-full relative flex transition-all duration-300",
@@ -310,20 +314,20 @@ const qe = ({
310
314
  {
311
315
  "cursor-default": t
312
316
  },
313
- l === "rounded" && {
314
- "rounded-[30px]": o === "xSmall" || o == "small",
315
- "rounded-[40px]": o === "medium",
316
- "rounded-[70px]": o === "large" || o == "xLarge"
317
+ c === "rounded" && {
318
+ "rounded-[30px]": r === "xSmall" || r == "small",
319
+ "rounded-[40px]": r === "medium",
320
+ "rounded-[70px]": r === "large" || r == "xLarge"
317
321
  },
318
- (l === "squared" || s && a) && {
319
- "rounded-[12px]": o === "xSmall" || o == "small",
320
- "rounded-[16px]": o === "medium",
321
- "rounded-[28px]": o === "large" || o == "xLarge"
322
+ (c === "squared" || l && a) && {
323
+ "rounded-[12px]": r === "xSmall" || r == "small",
324
+ "rounded-[16px]": r === "medium",
325
+ "rounded-[28px]": r === "large" || r == "xLarge"
322
326
  },
323
- s && !t && {
324
- "active:rounded-[12px]": o === "xSmall" || o == "small",
325
- "active:rounded-[16px]": o === "medium",
326
- "active:rounded-[28px]": o === "large" || o == "xLarge"
327
+ l && !t && {
328
+ "active:rounded-[12px]": r === "xSmall" || r == "small",
329
+ "active:rounded-[16px]": r === "medium",
330
+ "active:rounded-[28px]": r === "large" || r == "xLarge"
327
331
  },
328
332
  e === "filled" && [
329
333
  !t && {
@@ -355,20 +359,20 @@ const qe = ({
355
359
  ),
356
360
  stateLayer: p(
357
361
  "absolute top-0 left-0 h-full w-full overflow-hidden",
358
- (l === "rounded" || l === "squared" && n && !t && a && s) && {
359
- "rounded-[30px]": o === "xSmall" || o == "small",
360
- "rounded-[40px]": o === "medium",
361
- "rounded-[70px]": o === "large" || o == "xLarge"
362
+ (c === "rounded" || c === "squared" && n && !t && a && l) && {
363
+ "rounded-[30px]": r === "xSmall" || r == "small",
364
+ "rounded-[40px]": r === "medium",
365
+ "rounded-[70px]": r === "large" || r == "xLarge"
362
366
  },
363
- (l === "squared" || l === "rounded" && n && !t && a && s) && {
364
- "rounded-[12px]": o === "xSmall" || o == "small",
365
- "rounded-[16px]": o === "medium",
366
- "rounded-[28px]": o === "large" || o == "xLarge"
367
+ (c === "squared" || c === "rounded" && n && !t && a && l) && {
368
+ "rounded-[12px]": r === "xSmall" || r == "small",
369
+ "rounded-[16px]": r === "medium",
370
+ "rounded-[28px]": r === "large" || r == "xLarge"
367
371
  },
368
- s && !t && {
369
- "group-active/icon-button:rounded-[12px]": o === "xSmall" || o == "small",
370
- "group-active/icon-button:rounded-[16px]": o === "medium",
371
- "group-active/icon-button:rounded-[28px]": o === "large" || o == "xLarge"
372
+ l && !t && {
373
+ "group-active/icon-button:rounded-[12px]": r === "xSmall" || r == "small",
374
+ "group-active/icon-button:rounded-[16px]": r === "medium",
375
+ "group-active/icon-button:rounded-[28px]": r === "large" || r == "xLarge"
372
376
  },
373
377
  !t && [
374
378
  e === "standard" && {
@@ -391,24 +395,24 @@ const qe = ({
391
395
  ),
392
396
  icon: p(
393
397
  " transition-all duration-300",
394
- { "size-5 p-1.5": o === "xSmall" },
395
- { "size-6 p-2": o === "small" },
396
- { "size-6 p-4": o === "medium" },
397
- { "size-8 p-8": o === "large" },
398
- { "size-10 p-12": o === "xLarge" },
399
- c == "narrow" && [
400
- { "px-1": o === "xSmall" },
401
- { "px-1": o === "small" },
402
- { "px-3": o === "medium" },
403
- { "px-4": o === "large" },
404
- { "px-8": o === "xLarge" }
398
+ { "size-5 p-1.5": r === "xSmall" },
399
+ { "size-6 p-2": r === "small" },
400
+ { "size-6 p-4": r === "medium" },
401
+ { "size-8 p-8": r === "large" },
402
+ { "size-10 p-12": r === "xLarge" },
403
+ s == "narrow" && [
404
+ { "px-1": r === "xSmall" },
405
+ { "px-1": r === "small" },
406
+ { "px-3": r === "medium" },
407
+ { "px-4": r === "large" },
408
+ { "px-8": r === "xLarge" }
405
409
  ],
406
- c == "wide" && [
407
- { "px-2.5": o === "xSmall" },
408
- { "px-3.5": o === "small" },
409
- { "px-6": o === "medium" },
410
- { "px-12": o === "large" },
411
- { "px-[72px]": o === "xLarge" }
410
+ s == "wide" && [
411
+ { "px-2.5": r === "xSmall" },
412
+ { "px-3.5": r === "small" },
413
+ { "px-6": r === "medium" },
414
+ { "px-12": r === "large" },
415
+ { "px-[72px]": r === "xLarge" }
412
416
  ],
413
417
  !t && [
414
418
  e === "standard" && {
@@ -659,28 +663,28 @@ const qe = ({
659
663
  }), jn = Q("tabs", at), Ft = J(
660
664
  "tabs",
661
665
  at
662
- ), st = ({
666
+ ), lt = ({
663
667
  disabled: e,
664
668
  leadingIcon: t,
665
669
  trailingIcon: n,
666
670
  variant: a,
667
- errorText: o,
668
- isFocused: c,
669
- value: l,
670
- suffix: s,
671
- textLine: f
671
+ errorText: r,
672
+ isFocused: s,
673
+ value: c,
674
+ suffix: l,
675
+ textLine: i
672
676
  }) => ({
673
677
  textField: p({
674
678
  "opacity-[.38]": e
675
679
  }),
676
680
  content: p(
677
681
  "group/text-field transition-border duration-200 relative flex items-center ",
678
- { "h-14": f == "singleLine" },
682
+ { "h-14": i == "singleLine" },
679
683
  {
680
- "border-on-surface-variant": !(o != null && o.length) && !c && a == "filled",
681
- "border-outline": !(o != null && o.length) && !c && a == "outlined",
682
- "border-primary": !(o != null && o.length) && c,
683
- "border-error": !!(o != null && o.length)
684
+ "border-on-surface-variant": !(r != null && r.length) && !s && a == "filled",
685
+ "border-outline": !(r != null && r.length) && !s && a == "outlined",
686
+ "border-primary": !(r != null && r.length) && s,
687
+ "border-error": !!(r != null && r.length)
684
688
  },
685
689
  { "bg-on-surface/[0.04]": e },
686
690
  a == "filled" && [
@@ -690,7 +694,7 @@ const qe = ({
690
694
  a == "outlined" && [
691
695
  "border rounded box-border",
692
696
  {
693
- "border-[3px]": c
697
+ "border-[3px]": s
694
698
  }
695
699
  ]
696
700
  ),
@@ -701,15 +705,15 @@ const qe = ({
701
705
  },
702
706
  {
703
707
  "group-state-on-surface": !e,
704
- "focus-state-on-surface": c
708
+ "focus-state-on-surface": s
705
709
  }
706
710
  ),
707
711
  label: p(
708
712
  "inline-flex outline-none whitespace-nowrap",
709
- { "text-on-surface-variant": !e && !(o != null && o.length) },
713
+ { "text-on-surface-variant": !e && !(r != null && r.length) },
710
714
  { "text-on-surface": e },
711
- { "text-error": !!(o != null && o.length) },
712
- { "text-primary": !(o != null && o.length) && c }
715
+ { "text-error": !!(r != null && r.length) },
716
+ { "text-primary": !(r != null && r.length) && s }
713
717
  ),
714
718
  input: p(
715
719
  "w-full resize-none px-4 text-body-large bg-[inherit] outline-none autofill:transition-colors autofill:duration-[5000000ms]",
@@ -718,7 +722,7 @@ const qe = ({
718
722
  "placeholder:text-on-surface text-on-surface": e
719
723
  },
720
724
  {
721
- "pr-0": !!s
725
+ "pr-0": !!l
722
726
  },
723
727
  a == "filled" && " pb-2 pt-6",
724
728
  a == "outlined" && "py-4 relative z-10"
@@ -727,17 +731,17 @@ const qe = ({
727
731
  "absolute w-0 inset-x-0 border-rounded mx-auto bottom-0",
728
732
  a == "filled" && [
729
733
  "h-[2px] transition-all duration-300",
730
- { "bg-primary": !(o != null && o.length) },
731
- { "bg-error": !!(o != null && o.length) },
732
- { "!w-full": c }
734
+ { "bg-primary": !(r != null && r.length) },
735
+ { "bg-error": !!(r != null && r.length) },
736
+ { "!w-full": s }
733
737
  ]
734
738
  ),
735
739
  supportingText: p(
736
740
  " text-body-small px-4 pt-1",
737
- { "text-on-surface-variant": !e && !(o != null && o.length) },
741
+ { "text-on-surface-variant": !e && !(r != null && r.length) },
738
742
  { "text-on-surface": e },
739
- { "!w-full": c },
740
- { "text-error": !!(o != null && o.length) }
743
+ { "!w-full": s },
744
+ { "text-error": !!(r != null && r.length) }
741
745
  ),
742
746
  leadingIcon: p([
743
747
  "h-12 ml-3 flex items-center justify-center",
@@ -753,11 +757,11 @@ const qe = ({
753
757
  )
754
758
  }), qn = Q(
755
759
  "textField",
756
- st
760
+ lt
757
761
  ), Ot = J(
758
762
  "textField",
759
- st
760
- ), lt = ({
763
+ lt
764
+ ), st = ({
761
765
  position: e,
762
766
  variant: t
763
767
  }) => ({
@@ -784,17 +788,17 @@ const qe = ({
784
788
  supportingText: p("")
785
789
  }), _n = Q(
786
790
  "toolTip",
787
- lt
791
+ st
788
792
  ), Vt = J(
789
793
  "toolTip",
790
- lt
794
+ st
791
795
  ), ie = ({ icon: e, colors: t = [], className: n }) => {
792
796
  if (typeof e == "string") {
793
- let r = e;
794
- return t[0] && (r = r.replace(
797
+ let o = e;
798
+ return t[0] && (o = o.replace(
795
799
  /<svg([^>]*)>/,
796
800
  `<svg$1 fill="${t[0]}" color="${t[0]}">`
797
- ), r = r.replace(
801
+ ), o = o.replace(
798
802
  /<path([^>]*?)>/g,
799
803
  '<path$1 fill="currentColor">'
800
804
  )), /* @__PURE__ */ m(
@@ -805,18 +809,18 @@ const qe = ({
805
809
  n
806
810
  ),
807
811
  style: { color: t[0] || "inherit" },
808
- dangerouslySetInnerHTML: { __html: r }
812
+ dangerouslySetInnerHTML: { __html: o }
809
813
  }
810
814
  );
811
815
  }
812
816
  if (e && typeof e == "object" && "src" in e) {
813
- const r = e;
817
+ const o = e;
814
818
  return /* @__PURE__ */ m(
815
819
  "img",
816
820
  {
817
- src: r.src,
818
- width: r.width,
819
- height: r.height,
821
+ src: o.src,
822
+ width: o.width,
823
+ height: o.height,
820
824
  className: p("size-5 box-content", n),
821
825
  style: {
822
826
  filter: t[0] ? "brightness(0) saturate(100%) invert(1)" : void 0
@@ -829,15 +833,15 @@ const qe = ({
829
833
  const a = e;
830
834
  if (!(a != null && a.prefix))
831
835
  throw new Error(`Invalid icon type: ${typeof e}`);
832
- const { icon: o } = a, [c, l, , , s] = o || [], f = (r) => {
833
- switch (r.length) {
836
+ const { icon: r } = a, [s, c, , , l] = r || [], i = (o) => {
837
+ switch (o.length) {
834
838
  case 2:
835
839
  return {
836
- "--fa-primary-color": r[0] || "inherit",
837
- "--fa-secondary-color": r[1] || "inherit"
840
+ "--fa-primary-color": o[0] || "inherit",
841
+ "--fa-secondary-color": o[1] || "inherit"
838
842
  };
839
843
  case 1:
840
- return { color: r[0] };
844
+ return { color: o[0] };
841
845
  default:
842
846
  return {};
843
847
  }
@@ -846,12 +850,12 @@ const qe = ({
846
850
  "svg",
847
851
  {
848
852
  className: p("size-5 box-content", n),
849
- style: { ...f(t) },
853
+ style: { ...i(t) },
850
854
  xmlns: "http://www.w3.org/2000/svg",
851
- viewBox: `0 0 ${c} ${l}`,
855
+ viewBox: `0 0 ${s} ${c}`,
852
856
  role: "img",
853
857
  "aria-hidden": "true",
854
- children: typeof s == "string" ? /* @__PURE__ */ m("path", { className: "fill-current", d: s }) : s.map((r, h) => /* @__PURE__ */ m("path", { d: r }, h))
858
+ children: typeof l == "string" ? /* @__PURE__ */ m("path", { className: "fill-current", d: l }) : l.map((o, h) => /* @__PURE__ */ m("path", { d: o }, h))
855
859
  }
856
860
  );
857
861
  }, Ht = ({
@@ -859,34 +863,34 @@ const qe = ({
859
863
  value: t = 0,
860
864
  transitionDuration: n = 1e3,
861
865
  className: a,
862
- ...o
866
+ ...r
863
867
  }) => {
864
- const [c, l] = $(t), [s] = $(1.5);
865
- M(() => {
866
- t > 100 && (t = 100), t < 0 && (t = 0), l(t);
868
+ const [s, c] = R(t), [l] = R(1.5);
869
+ $(() => {
870
+ t > 100 && (t = 100), t < 0 && (t = 0), c(t);
867
871
  }, [t]);
868
- const [f, r] = $(!0), h = () => f ? s : s * 0.5;
869
- M(() => {
870
- if ((e === "circular-indeterminate" || e === "linear-indeterminate") && c !== 100) {
871
- const d = setInterval(() => {
872
- l(f ? 10 : 90), r(!f);
872
+ const [i, o] = R(!0), h = () => i ? l : l * 0.5;
873
+ $(() => {
874
+ if ((e === "circular-indeterminate" || e === "linear-indeterminate") && s !== 100) {
875
+ const f = setInterval(() => {
876
+ c(i ? 10 : 90), o(!i);
873
877
  }, h() * 1e3);
874
- return () => clearInterval(d);
878
+ return () => clearInterval(f);
875
879
  }
876
- }, [e, f, c]);
877
- const [w, i] = $(!1);
878
- M(() => {
879
- if (c >= 100) {
880
- const d = setTimeout(() => {
881
- i(!1);
880
+ }, [e, i, s]);
881
+ const [w, u] = R(!1);
882
+ $(() => {
883
+ if (s >= 100) {
884
+ const f = setTimeout(() => {
885
+ u(!1);
882
886
  }, n);
883
887
  return () => {
884
- clearTimeout(d);
888
+ clearTimeout(f);
885
889
  };
886
890
  } else
887
- i(!0);
888
- }, [c, n]);
889
- const u = Rt({
891
+ u(!0);
892
+ }, [s, n]);
893
+ const d = Rt({
890
894
  className: a,
891
895
  variant: e,
892
896
  value: t,
@@ -894,25 +898,25 @@ const qe = ({
894
898
  isVisible: w
895
899
  });
896
900
  return /* @__PURE__ */ X(me, { children: [
897
- (e === "linear-determinate" || e == "linear-indeterminate") && /* @__PURE__ */ X("div", { className: u.progressIndicator, ...o, children: [
901
+ (e === "linear-determinate" || e == "linear-indeterminate") && /* @__PURE__ */ X("div", { className: d.progressIndicator, ...r, children: [
898
902
  /* @__PURE__ */ m(
899
903
  "div",
900
904
  {
901
905
  style: {
902
- width: `${c}%`,
903
- transition: `width ${n}ms ease-in-out ${c == 100 ? ", max-height 200ms 0.5s ease-in-out" : ""}`
906
+ width: `${s}%`,
907
+ transition: `width ${n}ms ease-in-out ${s == 100 ? ", max-height 200ms 0.5s ease-in-out" : ""}`
904
908
  },
905
- className: u.track
909
+ className: d.track
906
910
  }
907
911
  ),
908
912
  /* @__PURE__ */ m(
909
913
  "div",
910
914
  {
911
915
  style: {
912
- marginLeft: c != 100 ? "6px" : "0px",
913
- transition: `width ${n}ms ease-in-out ${c == 100 ? `, max-height 200ms 0.5s ease-in-out, margin-left ${n}ms ${n / 1.5}ms` : ""}`
916
+ marginLeft: s != 100 ? "6px" : "0px",
917
+ transition: `width ${n}ms ease-in-out ${s == 100 ? `, max-height 200ms 0.5s ease-in-out, margin-left ${n}ms ${n / 1.5}ms` : ""}`
914
918
  },
915
- className: u.activeIndicator
919
+ className: d.activeIndicator
916
920
  }
917
921
  ),
918
922
  /* @__PURE__ */ m(
@@ -922,7 +926,7 @@ const qe = ({
922
926
  width: "4 px",
923
927
  transition: `width ${n}ms ease-in-out, max-height 200ms 0.5s ease-in-out`
924
928
  },
925
- className: u.stop
929
+ className: d.stop
926
930
  }
927
931
  )
928
932
  ] }),
@@ -939,8 +943,8 @@ const qe = ({
939
943
  duration: h(),
940
944
  ease: "linear"
941
945
  },
942
- className: u.progressIndicator,
943
- ...o,
946
+ className: d.progressIndicator,
947
+ ...r,
944
948
  children: /* @__PURE__ */ m(
945
949
  q.circle,
946
950
  {
@@ -952,13 +956,13 @@ const qe = ({
952
956
  },
953
957
  initial: "hidden",
954
958
  animate: "visible",
955
- className: u.activeIndicator,
959
+ className: d.activeIndicator,
956
960
  variants: {
957
961
  hidden: {
958
- pathLength: f ? 10 / 100 : 90 / 100
962
+ pathLength: i ? 10 / 100 : 90 / 100
959
963
  },
960
964
  visible: {
961
- pathLength: f ? 90 / 100 : 10 / 100
965
+ pathLength: i ? 90 / 100 : 10 / 100
962
966
  }
963
967
  },
964
968
  transition: {
@@ -972,7 +976,7 @@ const qe = ({
972
976
  }
973
977
  )
974
978
  },
975
- f + ""
979
+ i + ""
976
980
  )
977
981
  ] });
978
982
  }, Xt = ({
@@ -998,48 +1002,48 @@ const qe = ({
998
1002
  duration: 0.3
999
1003
  }
1000
1004
  }
1001
- }, [a, o] = $(!0), [c, l] = $(!1), [s, f] = $({ x: 50, y: 50 });
1002
- M(() => {
1003
- c && (o(!0), o(!1));
1004
- }, [c]), M(() => {
1005
- const d = t == null ? void 0 : t.current;
1006
- if (d)
1007
- return d.addEventListener("mousedown", r), d.addEventListener("mouseup", w), d.addEventListener("mouseleave", h), () => {
1008
- d.removeEventListener("mousedown", r), d.removeEventListener("mouseup", w), d.removeEventListener("mouseleave", h);
1005
+ }, [a, r] = R(!0), [s, c] = R(!1), [l, i] = R({ x: 50, y: 50 });
1006
+ $(() => {
1007
+ s && (r(!0), r(!1));
1008
+ }, [s]), $(() => {
1009
+ const f = t == null ? void 0 : t.current;
1010
+ if (f)
1011
+ return f.addEventListener("mousedown", o), f.addEventListener("mouseup", w), f.addEventListener("mouseleave", h), () => {
1012
+ f.removeEventListener("mousedown", o), f.removeEventListener("mouseup", w), f.removeEventListener("mouseleave", h);
1009
1013
  };
1010
1014
  }, [t]);
1011
- const r = (d) => {
1015
+ const o = (f) => {
1012
1016
  const y = t == null ? void 0 : t.current, v = y.getBoundingClientRect();
1013
- l(!0), f({
1014
- x: (d.clientX - v.left) / y.clientWidth * 100,
1015
- y: (d.clientY - v.top) / y.clientHeight * 100
1017
+ c(!0), i({
1018
+ x: (f.clientX - v.left) / y.clientWidth * 100,
1019
+ y: (f.clientY - v.top) / y.clientHeight * 100
1016
1020
  });
1017
- }, h = (d) => {
1018
- l(!1);
1019
- }, w = (d) => {
1020
- l(!1);
1021
- }, i = `color-mix(in srgb, var(--state-color,_var(--color-${e})) 10%, transparent)`, u = {
1021
+ }, h = (f) => {
1022
+ c(!1);
1023
+ }, w = (f) => {
1024
+ c(!1);
1025
+ }, u = `color-mix(in srgb, var(--state-color,_var(--color-${e})) 10%, transparent)`, d = {
1022
1026
  position: "absolute",
1023
1027
  inset: 0,
1024
1028
  width: "100%",
1025
1029
  height: "100%",
1026
1030
  // supply CSS variables for gradient center and radius
1027
- "--x": s.x + "%",
1028
- "--y": s.y + "%",
1031
+ "--x": l.x + "%",
1032
+ "--y": l.y + "%",
1029
1033
  "--r": "0%",
1030
1034
  // will be animated by motion
1031
- background: `radial-gradient(ellipse at var(--x) var(--y), ${i} var(--r), transparent calc(var(--r) * 2))`,
1035
+ background: `radial-gradient(ellipse at var(--x) var(--y), ${u} var(--r), transparent calc(var(--r) * 2))`,
1032
1036
  pointerEvents: "none"
1033
1037
  };
1034
- return /* @__PURE__ */ m(le, { mode: "wait", children: (c || !c && !a) && /* @__PURE__ */ m(
1038
+ return /* @__PURE__ */ m(se, { mode: "wait", children: (s || !s && !a) && /* @__PURE__ */ m(
1035
1039
  q.div,
1036
1040
  {
1037
- style: u,
1041
+ style: d,
1038
1042
  variants: n,
1039
1043
  initial: "initial",
1040
1044
  animate: "animate",
1041
1045
  exit: "exit",
1042
- onAnimationComplete: () => o(!0)
1046
+ onAnimationComplete: () => r(!0)
1043
1047
  }
1044
1048
  ) });
1045
1049
  }, Ut = Q(
@@ -1072,17 +1076,17 @@ const qe = ({
1072
1076
  })
1073
1077
  );
1074
1078
  function Yt(e, t) {
1075
- let n = 0, a = null, o = null;
1076
- const c = (l, s) => {
1077
- n = Date.now(), t(l, s);
1079
+ let n = 0, a = null, r = null;
1080
+ const s = (c, l) => {
1081
+ n = Date.now(), t(c, l);
1078
1082
  };
1079
- return (l, s) => {
1080
- const f = Date.now(), r = e - (f - n);
1081
- r <= 0 ? (a && (clearTimeout(a), a = null), c(l, s)) : (o = { v: l, o: s }, a || (a = setTimeout(() => {
1083
+ return (c, l) => {
1084
+ const i = Date.now(), o = e - (i - n);
1085
+ o <= 0 ? (a && (clearTimeout(a), a = null), s(c, l)) : (r = { v: c, o: l }, a || (a = setTimeout(() => {
1082
1086
  a = null;
1083
- const h = o;
1084
- o = null, h && c(h.v, h.o);
1085
- }, r)));
1087
+ const h = r;
1088
+ r = null, h && s(h.v, h.o);
1089
+ }, o)));
1086
1090
  };
1087
1091
  }
1088
1092
  const jt = ({
@@ -1090,141 +1094,141 @@ const jt = ({
1090
1094
  orientation: t = "vertical",
1091
1095
  scrollSize: n,
1092
1096
  onScroll: a,
1093
- className: o,
1094
- draggable: c = !1,
1095
- throttleDuration: l = 75,
1096
- scroll: s,
1097
- setScroll: f
1097
+ className: r,
1098
+ draggable: s = !1,
1099
+ throttleDuration: c = 75,
1100
+ scroll: l,
1101
+ setScroll: i
1098
1102
  }) => {
1099
1103
  var ae, ue;
1100
- const r = D(null), h = D(null), [w, i] = $({
1104
+ const o = D(null), h = D(null), [w, u] = R({
1101
1105
  width: null,
1102
1106
  height: null
1103
1107
  });
1104
- M(() => {
1105
- if (!r.current) return;
1106
- const k = new ResizeObserver((L) => {
1108
+ $(() => {
1109
+ if (!o.current) return;
1110
+ const C = new ResizeObserver((L) => {
1107
1111
  for (const W of L)
1108
- W.target === r.current && i({
1112
+ W.target === o.current && u({
1109
1113
  width: W.contentRect.width,
1110
1114
  height: W.contentRect.height
1111
1115
  // On observe aussi la hauteur maintenant
1112
1116
  });
1113
1117
  });
1114
- return k.observe(r.current), () => {
1115
- k.disconnect();
1118
+ return C.observe(o.current), () => {
1119
+ C.disconnect();
1116
1120
  };
1117
- }, [r]);
1118
- const u = D(null), d = D(null), y = () => {
1119
- const k = h.current;
1120
- return k ? {
1121
- width: n ?? k.scrollWidth,
1122
- height: n ?? k.scrollHeight
1121
+ }, [o]);
1122
+ const d = D(null), f = D(null), y = () => {
1123
+ const C = h.current;
1124
+ return C ? {
1125
+ width: n ?? C.scrollWidth,
1126
+ height: n ?? C.scrollHeight
1123
1127
  } : null;
1124
1128
  }, v = () => {
1125
- const k = r.current;
1126
- return k ? {
1127
- width: k.clientWidth,
1128
- height: k.clientHeight
1129
+ const C = o.current;
1130
+ return C ? {
1131
+ width: C.clientWidth,
1132
+ height: C.clientHeight
1129
1133
  // Correction ici pour retourner la bonne hauteur
1130
1134
  } : null;
1131
1135
  }, { scrollYProgress: I, scrollXProgress: b } = mt({
1132
- container: r
1133
- }), B = D(null);
1134
- B.current || (B.current = Yt(
1135
- l,
1136
- (k, L) => {
1137
- !d.current || !u.current || !r.current || (L === (t === "horizontal" ? "x" : "y") && (f == null || f(k)), a && (t === "horizontal" && L === "x" && a({
1138
- scrollProgress: k,
1139
- scroll: k * (u.current.width - r.current.clientWidth),
1140
- scrollTotal: u.current.width - r.current.clientWidth,
1141
- scrollVisible: d.current.width
1136
+ container: o
1137
+ }), E = D(null);
1138
+ E.current || (E.current = Yt(
1139
+ c,
1140
+ (C, L) => {
1141
+ !f.current || !d.current || !o.current || (L === (t === "horizontal" ? "x" : "y") && (i == null || i(C)), a && (t === "horizontal" && L === "x" && a({
1142
+ scrollProgress: C,
1143
+ scroll: C * (d.current.width - o.current.clientWidth),
1144
+ scrollTotal: d.current.width - o.current.clientWidth,
1145
+ scrollVisible: f.current.width
1142
1146
  }), t === "vertical" && L === "y" && a({
1143
- scrollProgress: k,
1144
- scroll: k * (u.current.height - r.current.clientHeight),
1145
- scrollTotal: u.current.height - r.current.clientHeight,
1146
- scrollVisible: d.current.height
1147
+ scrollProgress: C,
1148
+ scroll: C * (d.current.height - o.current.clientHeight),
1149
+ scrollTotal: d.current.height - o.current.clientHeight,
1150
+ scrollVisible: f.current.height
1147
1151
  })));
1148
1152
  }
1149
1153
  ));
1150
- const N = (k, L) => {
1151
- B.current && B.current(k, L);
1154
+ const N = (C, L) => {
1155
+ E.current && E.current(C, L);
1152
1156
  };
1153
- M(() => {
1157
+ $(() => {
1154
1158
  w.width && N(b.get(), "x"), w.height && N(I.get(), "y");
1155
- }, [w]), M(() => {
1156
- const k = r.current, L = h.current;
1157
- if (!k || !L || typeof s != "number") return;
1159
+ }, [w]), $(() => {
1160
+ const C = o.current, L = h.current;
1161
+ if (!C || !L || typeof l != "number") return;
1158
1162
  const W = (O, j, Y) => Math.min(Y, Math.max(j, O));
1159
1163
  if (t === "horizontal") {
1160
- const O = Math.max(0, (n ?? L.scrollWidth) - k.clientWidth);
1161
- k.scrollLeft = W(s * O, 0, O);
1164
+ const O = Math.max(0, (n ?? L.scrollWidth) - C.clientWidth);
1165
+ C.scrollLeft = W(l * O, 0, O);
1162
1166
  } else {
1163
- const O = Math.max(0, (n ?? L.scrollHeight) - k.clientHeight);
1164
- k.scrollTop = W(s * O, 0, O);
1167
+ const O = Math.max(0, (n ?? L.scrollHeight) - C.clientHeight);
1168
+ C.scrollTop = W(l * O, 0, O);
1165
1169
  }
1166
- }, [s, t, n]), We(b, "change", (k) => {
1167
- N(k, "x");
1168
- }), We(I, "change", (k) => {
1169
- N(k, "y");
1170
+ }, [l, t, n]), We(b, "change", (C) => {
1171
+ N(C, "x");
1172
+ }), We(I, "change", (C) => {
1173
+ N(C, "y");
1170
1174
  });
1171
- const [A, g] = $(!1);
1175
+ const [A, g] = R(!1);
1172
1176
  Xe(() => {
1173
- A || !d.current || !u.current || !a || (a({
1177
+ A || !f.current || !d.current || !a || (a({
1174
1178
  scrollProgress: 0,
1175
1179
  scroll: 0,
1176
- scrollTotal: t == "vertical" ? u.current.height : u.current.width,
1177
- scrollVisible: t == "vertical" ? d.current.height : d.current.width
1180
+ scrollTotal: t == "vertical" ? d.current.height : d.current.width,
1181
+ scrollVisible: t == "vertical" ? f.current.height : f.current.width
1178
1182
  }), g(!0));
1179
- }, [d, u, a]), u.current = y(), d.current = v();
1180
- const [V, F] = $(!1), C = Ut({
1181
- isDragging: V,
1183
+ }, [f, d, a]), d.current = y(), f.current = v();
1184
+ const [H, F] = R(!1), M = Ut({
1185
+ isDragging: H,
1182
1186
  children: e,
1183
- className: o,
1187
+ className: r,
1184
1188
  onScroll: a,
1185
1189
  orientation: t,
1186
1190
  scrollSize: n,
1187
- draggable: c,
1188
- throttleDuration: l
1189
- }), [x, E] = $(0), [H, G] = $(0), te = (k) => {
1190
- if (!c) return;
1191
- const L = r.current;
1191
+ draggable: s,
1192
+ throttleDuration: c
1193
+ }), [x, S] = R(0), [V, G] = R(0), T = (C) => {
1194
+ if (!s) return;
1195
+ const L = o.current;
1192
1196
  if (!L || x == null) return;
1193
- const O = (k.pageX - L.offsetLeft - x) * 1.5;
1194
- L.scrollLeft = H - O;
1195
- }, _ = (k) => {
1196
- const L = r.current;
1197
- L && (F(!0), E(k.pageX - L.offsetLeft), G(L.scrollLeft));
1198
- }, ne = (k) => {
1199
- V && (k.preventDefault(), te(k));
1200
- }, R = () => {
1197
+ const O = (C.pageX - L.offsetLeft - x) * 1.5;
1198
+ L.scrollLeft = V - O;
1199
+ }, _ = (C) => {
1200
+ const L = o.current;
1201
+ L && (F(!0), S(C.pageX - L.offsetLeft), G(L.scrollLeft));
1202
+ }, ne = (C) => {
1203
+ H && (C.preventDefault(), T(C));
1204
+ }, B = () => {
1201
1205
  F(!1);
1202
- }, S = () => {
1206
+ }, k = () => {
1203
1207
  F(!1);
1204
- }, U = (k) => {
1205
- k.preventDefault();
1208
+ }, U = (C) => {
1209
+ C.preventDefault();
1206
1210
  }, K = D(null);
1207
- return M(() => () => {
1211
+ return $(() => () => {
1208
1212
  K.current && clearTimeout(K.current);
1209
- }, []), M(() => {
1210
- const k = r.current;
1211
- if (!k) return;
1213
+ }, []), $(() => {
1214
+ const C = o.current;
1215
+ if (!C) return;
1212
1216
  const L = (W) => {
1213
- var re, se, de, ce;
1214
- const O = W.detail, j = r.current;
1217
+ var re, le, de, ce;
1218
+ const O = W.detail, j = o.current;
1215
1219
  if (!j || !O) return;
1216
1220
  const Y = O.orientation ?? t;
1217
1221
  if (typeof O.progress == "number")
1218
1222
  if (Y === "horizontal") {
1219
1223
  const oe = Math.max(
1220
1224
  0,
1221
- (((re = u.current) == null ? void 0 : re.width) ?? 0) - j.clientWidth
1225
+ (((re = d.current) == null ? void 0 : re.width) ?? 0) - j.clientWidth
1222
1226
  );
1223
1227
  j.scrollLeft = Math.min(oe, Math.max(0, O.progress * oe));
1224
1228
  } else {
1225
1229
  const oe = Math.max(
1226
1230
  0,
1227
- (((se = u.current) == null ? void 0 : se.height) ?? 0) - j.clientHeight
1231
+ (((le = d.current) == null ? void 0 : le.height) ?? 0) - j.clientHeight
1228
1232
  );
1229
1233
  j.scrollTop = Math.min(oe, Math.max(0, O.progress * oe));
1230
1234
  }
@@ -1232,32 +1236,32 @@ const jt = ({
1232
1236
  if (Y === "horizontal") {
1233
1237
  const oe = Math.max(
1234
1238
  0,
1235
- (((de = u.current) == null ? void 0 : de.width) ?? 0) - j.clientWidth
1239
+ (((de = d.current) == null ? void 0 : de.width) ?? 0) - j.clientWidth
1236
1240
  );
1237
1241
  j.scrollLeft = Math.min(oe, Math.max(0, O.scroll));
1238
1242
  } else {
1239
1243
  const oe = Math.max(
1240
1244
  0,
1241
- (((ce = u.current) == null ? void 0 : ce.height) ?? 0) - j.clientHeight
1245
+ (((ce = d.current) == null ? void 0 : ce.height) ?? 0) - j.clientHeight
1242
1246
  );
1243
1247
  j.scrollTop = Math.min(oe, Math.max(0, O.scroll));
1244
1248
  }
1245
1249
  };
1246
- return k.addEventListener("udx:customScroll:set", L), () => {
1247
- k.removeEventListener("udx:customScroll:set", L);
1250
+ return C.addEventListener("udx:customScroll:set", L), () => {
1251
+ C.removeEventListener("udx:customScroll:set", L);
1248
1252
  };
1249
1253
  }, [t]), /* @__PURE__ */ X(
1250
1254
  "div",
1251
1255
  {
1252
- className: C.customScroll,
1253
- ref: r,
1256
+ className: M.customScroll,
1257
+ ref: o,
1254
1258
  onMouseDown: _,
1255
1259
  onMouseMove: ne,
1256
- onMouseUp: R,
1257
- onMouseLeave: S,
1260
+ onMouseUp: B,
1261
+ onMouseLeave: k,
1258
1262
  onDragStart: U,
1259
- onScroll: (k) => {
1260
- V || (E(null), F(!0), K.current && clearTimeout(K.current), K.current = setTimeout(() => {
1263
+ onScroll: (C) => {
1264
+ H || (S(null), F(!0), K.current && clearTimeout(K.current), K.current = setTimeout(() => {
1261
1265
  F(!1);
1262
1266
  }, 1e3));
1263
1267
  },
@@ -1266,27 +1270,27 @@ const jt = ({
1266
1270
  "div",
1267
1271
  {
1268
1272
  ref: h,
1269
- style: t === "vertical" ? { height: ((ae = d == null ? void 0 : d.current) == null ? void 0 : ae.height) ?? "100%" } : { width: ((ue = d == null ? void 0 : d.current) == null ? void 0 : ue.width) ?? "100%" },
1270
- className: C.track,
1273
+ style: t === "vertical" ? { height: ((ae = f == null ? void 0 : f.current) == null ? void 0 : ae.height) ?? "100%" } : { width: ((ue = f == null ? void 0 : f.current) == null ? void 0 : ue.width) ?? "100%" },
1274
+ className: M.track,
1271
1275
  children: e
1272
1276
  }
1273
1277
  ),
1274
- d.current && u.current && /* @__PURE__ */ X(me, { children: [
1275
- t === "vertical" && u.current.height > d.current.height && /* @__PURE__ */ m(
1278
+ f.current && d.current && /* @__PURE__ */ X(me, { children: [
1279
+ t === "vertical" && d.current.height > f.current.height && /* @__PURE__ */ m(
1276
1280
  q.div,
1277
1281
  {
1278
1282
  className: "flex-none",
1279
1283
  style: {
1280
- height: u.current.height - d.current.height
1284
+ height: d.current.height - f.current.height
1281
1285
  }
1282
1286
  }
1283
1287
  ),
1284
- t === "horizontal" && u.current.width > d.current.width && /* @__PURE__ */ m(
1288
+ t === "horizontal" && d.current.width > f.current.width && /* @__PURE__ */ m(
1285
1289
  q.div,
1286
1290
  {
1287
1291
  className: "flex-none",
1288
1292
  style: {
1289
- width: u.current.width - d.current.width
1293
+ width: d.current.width - f.current.width
1290
1294
  }
1291
1295
  }
1292
1296
  )
@@ -1299,43 +1303,43 @@ const jt = ({
1299
1303
  el: t,
1300
1304
  touch: n = !0
1301
1305
  }) => {
1302
- const a = D(null), o = D(0), c = D(0);
1303
- M(() => {
1306
+ const a = D(null), r = D(0), s = D(0);
1307
+ $(() => {
1304
1308
  if (!t) return;
1305
- o.current = t.scrollTop, c.current = t.scrollLeft;
1306
- const l = (i) => {
1307
- e == null || e(i);
1308
- }, s = (i) => {
1309
- i.preventDefault(), l({
1309
+ r.current = t.scrollTop, s.current = t.scrollLeft;
1310
+ const c = (u) => {
1311
+ e == null || e(u);
1312
+ }, l = (u) => {
1313
+ u.preventDefault(), c({
1310
1314
  type: "intent",
1311
1315
  source: "wheel",
1312
- deltaX: i.deltaX,
1313
- deltaY: i.deltaY,
1314
- originalEvent: i
1316
+ deltaX: u.deltaX,
1317
+ deltaY: u.deltaY,
1318
+ originalEvent: u
1315
1319
  });
1316
- }, f = (i) => {
1320
+ }, i = (u) => {
1317
1321
  if (!n) return;
1318
- const u = i.touches[0];
1319
- u && (a.current = { x: u.clientX, y: u.clientY });
1320
- }, r = (i) => {
1322
+ const d = u.touches[0];
1323
+ d && (a.current = { x: d.clientX, y: d.clientY });
1324
+ }, o = (u) => {
1321
1325
  if (!n) return;
1322
- const u = i.touches[0];
1323
- if (!u || !a.current) return;
1324
- i.preventDefault();
1325
- const d = a.current.x - u.clientX, y = a.current.y - u.clientY;
1326
- a.current = { x: u.clientX, y: u.clientY }, l({
1326
+ const d = u.touches[0];
1327
+ if (!d || !a.current) return;
1328
+ u.preventDefault();
1329
+ const f = a.current.x - d.clientX, y = a.current.y - d.clientY;
1330
+ a.current = { x: d.clientX, y: d.clientY }, c({
1327
1331
  type: "intent",
1328
1332
  source: "touch",
1329
- deltaX: d,
1333
+ deltaX: f,
1330
1334
  deltaY: y,
1331
- originalEvent: i
1335
+ originalEvent: u
1332
1336
  });
1333
1337
  }, h = () => {
1334
1338
  n && (a.current = null);
1335
- }, w = (i) => {
1336
- const d = t.clientHeight * 0.9;
1339
+ }, w = (u) => {
1340
+ const f = t.clientHeight * 0.9;
1337
1341
  let y = 0, v = 0;
1338
- switch (i.key) {
1342
+ switch (u.key) {
1339
1343
  case "ArrowDown":
1340
1344
  v = 40;
1341
1345
  break;
@@ -1349,10 +1353,10 @@ const jt = ({
1349
1353
  y = -40;
1350
1354
  break;
1351
1355
  case "PageDown":
1352
- v = d;
1356
+ v = f;
1353
1357
  break;
1354
1358
  case "PageUp":
1355
- v = -d;
1359
+ v = -f;
1356
1360
  break;
1357
1361
  case "Home":
1358
1362
  v = Number.NEGATIVE_INFINITY;
@@ -1361,21 +1365,21 @@ const jt = ({
1361
1365
  v = Number.POSITIVE_INFINITY;
1362
1366
  break;
1363
1367
  case " ":
1364
- v = i.shiftKey ? -d : d;
1368
+ v = u.shiftKey ? -f : f;
1365
1369
  break;
1366
1370
  default:
1367
1371
  return;
1368
1372
  }
1369
- i.preventDefault(), l({
1373
+ u.preventDefault(), c({
1370
1374
  type: "intent",
1371
1375
  source: "keyboard",
1372
1376
  deltaX: y,
1373
1377
  deltaY: v,
1374
- originalEvent: i
1378
+ originalEvent: u
1375
1379
  });
1376
1380
  };
1377
- return t.addEventListener("wheel", s, { passive: !1 }), t.addEventListener("touchstart", f, { passive: !0 }), t.addEventListener("touchmove", r, { passive: !1 }), t.addEventListener("touchend", h, { passive: !0 }), t.addEventListener("keydown", w), () => {
1378
- t.removeEventListener("wheel", s), t.removeEventListener("touchstart", f), t.removeEventListener("touchmove", r), t.removeEventListener("touchend", h), t.removeEventListener("keydown", w);
1381
+ return t.addEventListener("wheel", l, { passive: !1 }), t.addEventListener("touchstart", i, { passive: !0 }), t.addEventListener("touchmove", o, { passive: !1 }), t.addEventListener("touchend", h, { passive: !0 }), t.addEventListener("keydown", w), () => {
1382
+ t.removeEventListener("wheel", l), t.removeEventListener("touchstart", i), t.removeEventListener("touchmove", o), t.removeEventListener("touchend", h), t.removeEventListener("keydown", w);
1379
1383
  };
1380
1384
  }, [e]);
1381
1385
  }, Kn = ({
@@ -1383,52 +1387,52 @@ const jt = ({
1383
1387
  orientation: t = "vertical",
1384
1388
  throttleDuration: n = 25
1385
1389
  }) => {
1386
- const [a, o] = $(0), [c, l] = $(), s = D(!1), f = D(), r = D(0);
1387
- M(() => {
1388
- l(document);
1389
- const i = document.documentElement.scrollTop;
1390
- o(i), r.current = i;
1391
- }, []), M(() => {
1392
- const i = () => {
1393
- s.current || o(document.documentElement.scrollTop);
1390
+ const [a, r] = R(0), [s, c] = R(), l = D(!1), i = D(), o = D(0);
1391
+ $(() => {
1392
+ c(document);
1393
+ const u = document.documentElement.scrollTop;
1394
+ r(u), o.current = u;
1395
+ }, []), $(() => {
1396
+ const u = () => {
1397
+ l.current || r(document.documentElement.scrollTop);
1394
1398
  };
1395
- return c == null || c.addEventListener("scroll", i), () => {
1396
- f.current && clearTimeout(f.current), c == null || c.removeEventListener("scroll", i);
1399
+ return s == null || s.addEventListener("scroll", u), () => {
1400
+ i.current && clearTimeout(i.current), s == null || s.removeEventListener("scroll", u);
1397
1401
  };
1398
- }, [c]);
1402
+ }, [s]);
1399
1403
  const h = D(), w = D(null);
1400
- return M(() => {
1401
- const i = a;
1402
- if (w.current && (w.current.stop(), w.current = null), !s.current) {
1403
- h.current = i;
1404
+ return $(() => {
1405
+ const u = a;
1406
+ if (w.current && (w.current.stop(), w.current = null), !l.current) {
1407
+ h.current = u;
1404
1408
  return;
1405
1409
  }
1406
- return w.current = pt(h.current ?? i, i, {
1410
+ return w.current = pt(h.current ?? u, u, {
1407
1411
  duration: ((e == null ? void 0 : e.duration) ?? 500) / 1e3,
1408
1412
  ease: (e == null ? void 0 : e.ease) ?? "easeOut",
1409
- onUpdate: (u) => {
1410
- f.current && clearTimeout(f.current), h.current = u;
1411
- const d = document.documentElement, y = Math.round(u * 1e3) / 1e3, v = r.current;
1412
- Math.abs(y - v) < 0.1 || (r.current = y, s.current && d.scrollTo({ top: y }));
1413
+ onUpdate: (d) => {
1414
+ i.current && clearTimeout(i.current), h.current = d;
1415
+ const f = document.documentElement, y = Math.round(d * 1e3) / 1e3, v = o.current;
1416
+ Math.abs(y - v) < 0.1 || (o.current = y, l.current && f.scrollTo({ top: y }));
1413
1417
  },
1414
1418
  onComplete: () => {
1415
- f.current = setTimeout(() => {
1416
- s.current = !1;
1419
+ i.current = setTimeout(() => {
1420
+ l.current = !1;
1417
1421
  }, 300), w.current = null;
1418
1422
  }
1419
1423
  }), () => {
1420
1424
  w.current && (w.current.stop(), w.current = null);
1421
1425
  };
1422
- }, [a]), c ? /* @__PURE__ */ m(
1426
+ }, [a]), s ? /* @__PURE__ */ m(
1423
1427
  qt,
1424
1428
  {
1425
1429
  touch: !1,
1426
- el: c,
1427
- onScroll: (i) => {
1428
- if ("deltaY" in i && i.deltaY !== 0 && c && a !== null) {
1429
- let u = a + i.deltaY;
1430
- const d = c.querySelector("html");
1431
- d && (u = Math.min(u, d.scrollHeight - d.clientHeight)), u = Math.max(u, 0), o(u), s.current = !0;
1430
+ el: s,
1431
+ onScroll: (u) => {
1432
+ if ("deltaY" in u && u.deltaY !== 0 && s && a !== null) {
1433
+ let d = a + u.deltaY;
1434
+ const f = s.querySelector("html");
1435
+ f && (d = Math.min(d, f.scrollHeight - f.clientHeight)), d = Math.max(d, 0), r(d), l.current = !0;
1432
1436
  }
1433
1437
  }
1434
1438
  }
@@ -1439,30 +1443,30 @@ const jt = ({
1439
1443
  stateClassName: n = "state-ripple-group",
1440
1444
  className: a
1441
1445
  }) => {
1442
- const o = D(null), c = D(null), [l, s] = $(!1), f = Kt({
1443
- isClient: l,
1446
+ const r = D(null), s = D(null), [c, l] = R(!1), i = Kt({
1447
+ isClient: c,
1444
1448
  stateClassName: n,
1445
1449
  className: a,
1446
1450
  colorName: t
1447
1451
  });
1448
- return M(() => {
1449
- if (o.current && n !== "state-layer") {
1450
- const r = n.includes("[") ? n.split("[")[1].split("]")[0] : "group", h = o.current.closest(
1451
- `.${r}:not(.${r} .${r})`
1452
+ return $(() => {
1453
+ if (r.current && n !== "state-layer") {
1454
+ const o = n.includes("[") ? n.split("[")[1].split("]")[0] : "group", h = r.current.closest(
1455
+ `.${o}:not(.${o} .${o})`
1452
1456
  );
1453
- c.current = h;
1457
+ s.current = h;
1454
1458
  }
1455
- s(!0);
1459
+ l(!0);
1456
1460
  }, []), /* @__PURE__ */ m(
1457
1461
  "div",
1458
1462
  {
1459
- ref: o,
1460
- className: f.stateLayer,
1463
+ ref: r,
1464
+ className: i.stateLayer,
1461
1465
  style: {
1462
1466
  "--state-color": `var(--default-color, var(--color-${t}))`,
1463
1467
  ...e
1464
1468
  },
1465
- children: l && /* @__PURE__ */ m(Xt, { triggerRef: c })
1469
+ children: c && /* @__PURE__ */ m(Xt, { triggerRef: s })
1466
1470
  }
1467
1471
  );
1468
1472
  }, _t = ({
@@ -1480,28 +1484,28 @@ const jt = ({
1480
1484
  targetRef: e,
1481
1485
  children: t
1482
1486
  }) => {
1483
- const [n, a] = $(null), o = D(null), c = () => {
1484
- const l = e.current;
1485
- if (!l) return;
1486
- const s = l.getBoundingClientRect();
1487
+ const [n, a] = R(null), r = D(null), s = () => {
1488
+ const c = e.current;
1489
+ if (!c) return;
1490
+ const l = c.getBoundingClientRect();
1487
1491
  a({
1488
1492
  position: "fixed",
1489
- top: s.top,
1490
- left: s.left,
1491
- width: s.width,
1492
- height: s.height,
1493
+ top: l.top,
1494
+ left: l.left,
1495
+ width: l.width,
1496
+ height: l.height,
1493
1497
  pointerEvents: "none",
1494
1498
  // si le wrapper ne doit pas capter les events
1495
1499
  zIndex: 999
1496
1500
  // personnalise si besoin
1497
1501
  });
1498
1502
  };
1499
- return M(() => {
1500
- const l = e.current;
1501
- if (l)
1502
- return c(), window.addEventListener("scroll", c, !0), window.addEventListener("resize", c), o.current = new ResizeObserver(c), o.current.observe(l), () => {
1503
- var s;
1504
- window.removeEventListener("scroll", c, !0), window.removeEventListener("resize", c), (s = o.current) == null || s.disconnect();
1503
+ return $(() => {
1504
+ const c = e.current;
1505
+ if (c)
1506
+ return s(), window.addEventListener("scroll", s, !0), window.addEventListener("resize", s), r.current = new ResizeObserver(s), r.current.observe(c), () => {
1507
+ var l;
1508
+ window.removeEventListener("scroll", s, !0), window.removeEventListener("resize", s), (l = r.current) == null || l.disconnect();
1505
1509
  };
1506
1510
  }, [e]), n ? Ue(/* @__PURE__ */ m("div", { style: n, children: t }), document.body) : null;
1507
1511
  };
@@ -1515,48 +1519,48 @@ const Gn = ({
1515
1519
  onLoad: n,
1516
1520
  loadTheme: a = !1
1517
1521
  }) => {
1518
- const [o, c] = $(null);
1519
- M(() => {
1522
+ const [r, s] = R(null);
1523
+ $(() => {
1520
1524
  (async () => {
1521
- const i = await yt(e, a);
1522
- c(i);
1525
+ const u = await yt(e, a);
1526
+ s(u);
1523
1527
  })();
1524
1528
  }, []);
1525
- const [l, s] = $(null), f = D(null), r = D(0), h = D(null);
1526
- M(() => {
1527
- if (!o) return;
1528
- const i = {
1529
+ const [c, l] = R(null), i = D(null), o = D(0), h = D(null);
1530
+ $(() => {
1531
+ if (!r) return;
1532
+ const u = {
1529
1533
  ...e,
1530
1534
  // Assurer la compatibilité avec l'API qui attend sourceColorHex
1531
1535
  sourceColor: e.sourceColor
1532
- }, u = Date.now(), d = u - r.current, y = async (v) => {
1536
+ }, d = Date.now(), f = d - o.current, y = async (v) => {
1533
1537
  await w(v);
1534
1538
  };
1535
- if (r.current === 0 || d >= t)
1536
- f.current && (clearTimeout(f.current), f.current = null), h.current = null, r.current = u, y(i);
1537
- else if (h.current = i, !f.current) {
1538
- const v = Math.max(0, t - d);
1539
- f.current = setTimeout(async () => {
1540
- f.current = null;
1539
+ if (o.current === 0 || f >= t)
1540
+ i.current && (clearTimeout(i.current), i.current = null), h.current = null, o.current = d, y(u);
1541
+ else if (h.current = u, !i.current) {
1542
+ const v = Math.max(0, t - f);
1543
+ i.current = setTimeout(async () => {
1544
+ i.current = null;
1541
1545
  const I = h.current;
1542
- h.current = null, I && (r.current = Date.now(), await y(I));
1546
+ h.current = null, I && (o.current = Date.now(), await y(I));
1543
1547
  }, v);
1544
1548
  }
1545
1549
  return () => {
1546
1550
  };
1547
- }, [e, t, o]);
1548
- const w = async (i) => {
1549
- if (typeof i.sourceColor == "string" && !Jt(i.sourceColor))
1551
+ }, [e, t, r]);
1552
+ const w = async (u) => {
1553
+ if (typeof u.sourceColor == "string" && !Jt(u.sourceColor))
1550
1554
  throw new Error("Invalid hex color");
1551
- if (!o)
1555
+ if (!r)
1552
1556
  return;
1553
- o.context.update(i), await o.load();
1554
- const u = o == null ? void 0 : o.plugins.getPlugin(Ye).getInstance().outputCss;
1555
- s(u), n == null || n(o);
1557
+ r.context.update(u), await r.load();
1558
+ const d = r == null ? void 0 : r.plugins.getPlugin(Ye).getInstance().outputCss;
1559
+ l(d), n == null || n(r);
1556
1560
  };
1557
- return M(() => () => {
1558
- f.current && (clearTimeout(f.current), f.current = null);
1559
- }, []), l ? /* @__PURE__ */ m("style", { dangerouslySetInnerHTML: { __html: l } }) : null;
1561
+ return $(() => () => {
1562
+ i.current && (clearTimeout(i.current), i.current = null);
1563
+ }, []), c ? /* @__PURE__ */ m("style", { dangerouslySetInnerHTML: { __html: c } }) : null;
1560
1564
  };
1561
1565
  function Zt() {
1562
1566
  if (typeof window > "u") return !1;
@@ -1586,15 +1590,15 @@ function De(e) {
1586
1590
  function Ee(e, t) {
1587
1591
  if (!Re(e)) return;
1588
1592
  if (e.hasAttribute(`data-${t}-scroll`)) {
1589
- const l = (e.getAttribute(`data-${t}-scroll`) || "").trim().toLowerCase(), s = l === "x" || l === "inline" ? "inline" : l === "y" || l === "block" ? "block" : "auto";
1590
- e.classList.contains(`${t}-timeline`) || e.classList.contains(`${t}-timeline-inline`) || e.classList.contains(`${t}-timeline-block`) || e.classList.contains(`${t}-timeline-x`) || e.classList.contains(`${t}-timeline-y`) || (s === "inline" ? e.classList.add(`${t}-timeline-inline`) : s === "block" ? e.classList.add(`${t}-timeline-block`) : e.classList.add(`${t}-scroll`));
1593
+ const c = (e.getAttribute(`data-${t}-scroll`) || "").trim().toLowerCase(), l = c === "x" || c === "inline" ? "inline" : c === "y" || c === "block" ? "block" : "auto";
1594
+ e.classList.contains(`${t}-timeline`) || e.classList.contains(`${t}-timeline-inline`) || e.classList.contains(`${t}-timeline-block`) || e.classList.contains(`${t}-timeline-x`) || e.classList.contains(`${t}-timeline-y`) || (l === "inline" ? e.classList.add(`${t}-timeline-inline`) : l === "block" ? e.classList.add(`${t}-timeline-block`) : e.classList.add(`${t}-scroll`));
1591
1595
  }
1592
1596
  const n = e.getAttribute(`data-${t}-start`);
1593
1597
  n && e.style.setProperty(`--${t}-range-start`, n);
1594
1598
  const a = e.getAttribute(`data-${t}-end`);
1595
1599
  a && e.style.setProperty(`--${t}-range-end`, a);
1596
- const o = e.hasAttribute(`data-${t}-paused`) || e.classList.contains(`${t}-paused`), c = e.hasAttribute(`data-${t}-run`) || e.classList.contains(`${t}-run`);
1597
- !o && !c && e.setAttribute(`data-${t}-run`, "");
1600
+ const r = e.hasAttribute(`data-${t}-paused`) || e.classList.contains(`${t}-paused`), s = e.hasAttribute(`data-${t}-run`) || e.classList.contains(`${t}-run`);
1601
+ !r && !s && e.setAttribute(`data-${t}-run`, "");
1598
1602
  }
1599
1603
  function Ie(e = document, t) {
1600
1604
  return Array.from(
@@ -1620,12 +1624,12 @@ function Tt(e = document, t) {
1620
1624
  `${t}-timeline-y`,
1621
1625
  `${t}-scroll`
1622
1626
  ]);
1623
- return n.filter((o) => {
1624
- if (!(o instanceof HTMLElement)) return !1;
1625
- const c = o.classList;
1626
- return c.contains(`${t}-in`) || c.contains(`${t}-out`) || Array.from(c).some(
1627
- (f) => f.startsWith(`${t}-`) && !f.includes("scroll") && !a.has(f)
1628
- ) ? !0 : !Re(o);
1627
+ return n.filter((r) => {
1628
+ if (!(r instanceof HTMLElement)) return !1;
1629
+ const s = r.classList;
1630
+ return s.contains(`${t}-in`) || s.contains(`${t}-out`) || Array.from(s).some(
1631
+ (i) => i.startsWith(`${t}-`) && !i.includes("scroll") && !a.has(i)
1632
+ ) ? !0 : !Re(r);
1629
1633
  });
1630
1634
  }
1631
1635
  function zt(e, t) {
@@ -1644,10 +1648,10 @@ const en = [0, 0.2], Fe = /* @__PURE__ */ new WeakSet();
1644
1648
  function Oe(e, t) {
1645
1649
  if (Fe.has(e)) return;
1646
1650
  Fe.add(e);
1647
- const n = (o) => {
1648
- o.target === e && (e.hasAttribute(`data-${t}-in-run`) || e.hasAttribute(`data-${t}-out-run`)) && e.setAttribute(`data-${t}-animating`, "");
1649
- }, a = (o) => {
1650
- o.target === e && e.removeAttribute(`data-${t}-animating`);
1651
+ const n = (r) => {
1652
+ r.target === e && (e.hasAttribute(`data-${t}-in-run`) || e.hasAttribute(`data-${t}-out-run`)) && e.setAttribute(`data-${t}-animating`, "");
1653
+ }, a = (r) => {
1654
+ r.target === e && e.removeAttribute(`data-${t}-animating`);
1651
1655
  };
1652
1656
  e.addEventListener("animationstart", n), e.addEventListener("animationend", a), e.addEventListener("animationcancel", a);
1653
1657
  }
@@ -1656,48 +1660,48 @@ function ct(e = {}) {
1656
1660
  if (Qt())
1657
1661
  return () => {
1658
1662
  };
1659
- const a = Zt(), o = /* @__PURE__ */ new WeakSet();
1660
- let c = typeof window < "u" && (window.pageYOffset || window.scrollY) || 0, l = !0;
1661
- const s = () => {
1662
- const u = window.pageYOffset || window.scrollY || 0;
1663
- l = u >= c, c = u;
1663
+ const a = Zt(), r = /* @__PURE__ */ new WeakSet();
1664
+ let s = typeof window < "u" && (window.pageYOffset || window.scrollY) || 0, c = !0;
1665
+ const l = () => {
1666
+ const d = window.pageYOffset || window.scrollY || 0;
1667
+ c = d >= s, s = d;
1664
1668
  };
1665
- typeof window < "u" && window.addEventListener("scroll", s, { passive: !0 });
1666
- const f = new IntersectionObserver(
1667
- (u) => {
1668
- for (const d of u) {
1669
- const y = d.target;
1669
+ typeof window < "u" && window.addEventListener("scroll", l, { passive: !0 });
1670
+ const i = new IntersectionObserver(
1671
+ (d) => {
1672
+ for (const f of d) {
1673
+ const y = f.target;
1670
1674
  if (!De(y) || y.hasAttribute(`data-${t}-animating`)) continue;
1671
1675
  const v = zt(y.classList, t);
1672
- d.isIntersecting ? (v && Pe(y, t, "out"), Ae(y, t, "in"), n && f.unobserve(y)) : n || (l || Pe(y, t, "in"), v && Ae(y, t, "out"));
1676
+ f.isIntersecting ? (v && Pe(y, t, "out"), Ae(y, t, "in"), n && i.unobserve(y)) : n || (c || Pe(y, t, "in"), v && Ae(y, t, "out"));
1673
1677
  }
1674
1678
  },
1675
1679
  { threshold: en }
1676
- ), r = (u) => {
1677
- const d = Tt(u || document, t);
1678
- for (const y of d)
1679
- o.has(y) || (o.add(y), f.observe(y), Oe(y, t));
1680
+ ), o = (d) => {
1681
+ const f = Tt(d || document, t);
1682
+ for (const y of f)
1683
+ r.has(y) || (r.add(y), i.observe(y), Oe(y, t));
1680
1684
  };
1681
- r();
1682
- let h, w = null, i = null;
1685
+ o();
1686
+ let h, w = null, u = null;
1683
1687
  if (a)
1684
1688
  (() => {
1685
- i == null && (i = requestAnimationFrame(() => {
1686
- i = null;
1687
- const d = Ie(void 0, t);
1688
- for (const y of d) Ee(y, t);
1689
+ u == null && (u = requestAnimationFrame(() => {
1690
+ u = null;
1691
+ const f = Ie(void 0, t);
1692
+ for (const y of f) Ee(y, t);
1689
1693
  }));
1690
- })(), w = new MutationObserver((d) => {
1691
- for (const y of d)
1694
+ })(), w = new MutationObserver((f) => {
1695
+ for (const y of f)
1692
1696
  if (y.type === "attributes") {
1693
1697
  const v = y.target;
1694
- v instanceof HTMLElement && (Ee(v, t), De(v) && (o.has(v) || (o.add(v), f.observe(v), Oe(v, t))));
1698
+ v instanceof HTMLElement && (Ee(v, t), De(v) && (r.has(v) || (r.add(v), i.observe(v), Oe(v, t))));
1695
1699
  } else if (y.type === "childList" && y.addedNodes && y.addedNodes.length) {
1696
1700
  for (const v of Array.from(y.addedNodes))
1697
1701
  if (v instanceof HTMLElement) {
1698
1702
  const I = Ie(v, t);
1699
1703
  for (const b of I) Ee(b, t);
1700
- r(v);
1704
+ o(v);
1701
1705
  }
1702
1706
  }
1703
1707
  }), w.observe(document.documentElement, {
@@ -1713,18 +1717,18 @@ function ct(e = {}) {
1713
1717
  `data-${t}-run`
1714
1718
  ]
1715
1719
  }), h = () => {
1716
- i != null && cancelAnimationFrame(i), w && w.disconnect();
1720
+ u != null && cancelAnimationFrame(u), w && w.disconnect();
1717
1721
  };
1718
1722
  else {
1719
- let u;
1723
+ let d;
1720
1724
  Ie(void 0, t).length > 0 && import("./scrollDriven-AP2yWhzi.js").then((y) => {
1721
- u = y.initScrollViewFallback({ once: n });
1725
+ d = y.initScrollViewFallback({ once: n });
1722
1726
  }), h = () => {
1723
- typeof u == "function" && u();
1727
+ typeof d == "function" && d();
1724
1728
  };
1725
1729
  }
1726
1730
  return () => {
1727
- h && h(), typeof window < "u" && window.removeEventListener("scroll", s), f.disconnect();
1731
+ h && h(), typeof window < "u" && window.removeEventListener("scroll", l), i.disconnect();
1728
1732
  };
1729
1733
  }
1730
1734
  const Jn = ct, Zn = ct;
@@ -1740,76 +1744,76 @@ const ke = ({
1740
1744
  disabled: t = !1,
1741
1745
  icon: n,
1742
1746
  href: a,
1743
- label: o,
1744
- disableTextMargins: c,
1745
- className: l,
1746
- iconPosition: s = "left",
1747
- loading: f = !1,
1748
- shape: r = "rounded",
1747
+ label: r,
1748
+ disableTextMargins: s,
1749
+ className: c,
1750
+ iconPosition: l = "left",
1751
+ loading: i = !1,
1752
+ shape: o = "rounded",
1749
1753
  onClick: h,
1750
1754
  onToggle: w,
1751
- activated: i,
1752
- ref: u,
1753
- size: d = "medium",
1755
+ activated: u,
1756
+ ref: d,
1757
+ size: f = "medium",
1754
1758
  allowShapeTransformation: y = !0,
1755
1759
  transition: v,
1756
1760
  children: I,
1757
1761
  ...b
1758
1762
  }) => {
1759
- if (I && (o = I), !o)
1763
+ if (I && (r = I), !r)
1760
1764
  throw new Error(
1761
1765
  "Button component requires either a label prop or children content"
1762
1766
  );
1763
1767
  e = tn(e);
1764
- const B = a ? "a" : "button", N = D(null), A = u || N, [g, V] = Z.useState(i);
1765
- M(() => {
1766
- V(i);
1767
- }, [i]), v = { duration: 0.3, ...v };
1768
+ const E = a ? "a" : "button", N = D(null), A = d || N, [g, H] = Z.useState(u);
1769
+ $(() => {
1770
+ H(u);
1771
+ }, [u]), v = { duration: 0.3, ...v };
1768
1772
  let F;
1769
- w ? w && (F = (E) => {
1770
- t && E.preventDefault();
1771
- const H = !g;
1772
- V(H), w(H);
1773
- }) : F = (E) => {
1774
- t && E.preventDefault(), h && h(E);
1773
+ w ? w && (F = (S) => {
1774
+ t && S.preventDefault();
1775
+ const V = !g;
1776
+ H(V), w(V);
1777
+ }) : F = (S) => {
1778
+ t && S.preventDefault(), h && h(S);
1775
1779
  };
1776
- const C = Nt({
1780
+ const M = Nt({
1777
1781
  allowShapeTransformation: y,
1778
- size: d,
1779
- disableTextMargins: c,
1780
- shape: r,
1782
+ size: f,
1783
+ disableTextMargins: s,
1784
+ shape: o,
1781
1785
  href: a,
1782
1786
  disabled: t,
1783
1787
  icon: n,
1784
- iconPosition: s,
1785
- loading: f,
1788
+ iconPosition: l,
1789
+ loading: i,
1786
1790
  variant: e,
1787
1791
  transition: v,
1788
- className: l,
1792
+ className: c,
1789
1793
  isActive: g ?? !1,
1790
1794
  onToggle: w,
1791
1795
  activated: g,
1792
- label: o,
1793
- children: o
1794
- }), x = n ? /* @__PURE__ */ m(ie, { icon: n, className: C.icon }) : /* @__PURE__ */ m(me, {});
1796
+ label: r,
1797
+ children: r
1798
+ }), x = n ? /* @__PURE__ */ m(ie, { icon: n, className: M.icon }) : /* @__PURE__ */ m(me, {});
1795
1799
  return /* @__PURE__ */ X(
1796
- B,
1800
+ E,
1797
1801
  {
1798
1802
  ref: A,
1799
1803
  href: a,
1800
- className: C.button,
1804
+ className: M.button,
1801
1805
  ...b,
1802
1806
  onClick: F,
1803
1807
  disabled: t,
1804
1808
  "aria-pressed": w ? g : void 0,
1805
1809
  style: { transition: v.duration + "s" },
1806
1810
  children: [
1807
- /* @__PURE__ */ m("div", { className: C.touchTarget }),
1811
+ /* @__PURE__ */ m("div", { className: M.touchTarget }),
1808
1812
  /* @__PURE__ */ m(
1809
1813
  ye,
1810
1814
  {
1811
1815
  style: { transition: v.duration + "s" },
1812
- className: C.stateLayer,
1816
+ className: M.stateLayer,
1813
1817
  colorName: p(
1814
1818
  e === "filled" && {
1815
1819
  "on-surface-variant": !g && !!w,
@@ -1832,8 +1836,8 @@ const ke = ({
1832
1836
  stateClassName: "state-ripple-group-[button]"
1833
1837
  }
1834
1838
  ),
1835
- s === "left" && x,
1836
- f && /* @__PURE__ */ m(
1839
+ l === "left" && x,
1840
+ i && /* @__PURE__ */ m(
1837
1841
  "div",
1838
1842
  {
1839
1843
  className: "!absolute left-1/2 -translate-x-1/2 top-1/2 -translate-y-1/2",
@@ -1870,8 +1874,8 @@ const ke = ({
1870
1874
  )
1871
1875
  }
1872
1876
  ),
1873
- /* @__PURE__ */ m("span", { className: C.label, children: o }),
1874
- s === "right" && x
1877
+ /* @__PURE__ */ m("span", { className: M.label, children: r }),
1878
+ l === "right" && x
1875
1879
  ]
1876
1880
  }
1877
1881
  );
@@ -1880,15 +1884,15 @@ const ke = ({
1880
1884
  className: t,
1881
1885
  children: n,
1882
1886
  isInteractive: a = !1,
1883
- ref: o,
1884
- ...c
1887
+ ref: r,
1888
+ ...s
1885
1889
  }) => {
1886
- const l = Et({ className: t, isInteractive: a, variant: e, children: n }), s = D(null);
1887
- return /* @__PURE__ */ X("div", { ...c, ref: o || s, className: l.card, children: [
1890
+ const c = Et({ className: t, isInteractive: a, variant: e, children: n }), l = D(null);
1891
+ return /* @__PURE__ */ X("div", { ...s, ref: r || l, className: c.card, children: [
1888
1892
  a && /* @__PURE__ */ m(
1889
1893
  ye,
1890
1894
  {
1891
- className: l.stateLayer,
1895
+ className: c.stateLayer,
1892
1896
  colorName: "on-surface",
1893
1897
  stateClassName: "state-ripple-group-[card]"
1894
1898
  }
@@ -1896,40 +1900,40 @@ const ke = ({
1896
1900
  n
1897
1901
  ] });
1898
1902
  }, he = (e, t, n = [0, 1]) => {
1899
- const [a, o] = t, [c, l] = n, f = (Math.max(a, Math.min(e, o)) - a) / (o - a);
1900
- return c + f * (l - c);
1903
+ const [a, r] = t, [s, c] = n, i = (Math.max(a, Math.min(e, r)) - a) / (r - a);
1904
+ return s + i * (c - s);
1901
1905
  }, nn = ({
1902
1906
  className: e,
1903
1907
  children: t,
1904
1908
  width: n,
1905
1909
  index: a = 0,
1906
- outputRange: o,
1907
- ref: c,
1908
- ...l
1910
+ outputRange: r,
1911
+ ref: s,
1912
+ ...c
1909
1913
  }) => {
1910
- const s = D(null), f = c || s, r = It({
1914
+ const l = D(null), i = s || l, o = It({
1911
1915
  className: e,
1912
1916
  index: a,
1913
1917
  width: n,
1914
1918
  children: t,
1915
- outputRange: o
1919
+ outputRange: r
1916
1920
  });
1917
1921
  return /* @__PURE__ */ m(
1918
1922
  "div",
1919
1923
  {
1920
- ref: f,
1924
+ ref: i,
1921
1925
  style: {
1922
1926
  width: n + "px",
1923
- maxWidth: o[1] + "px",
1924
- minWidth: o[0] + "px",
1927
+ maxWidth: r[1] + "px",
1928
+ minWidth: r[0] + "px",
1925
1929
  willChange: "width"
1926
1930
  },
1927
1931
  transition: {
1928
1932
  duration: 0.5,
1929
1933
  ease: "linear"
1930
1934
  },
1931
- className: r.carouselItem,
1932
- ...l,
1935
+ className: o.carouselItem,
1936
+ ...c,
1933
1937
  children: t
1934
1938
  }
1935
1939
  );
@@ -1938,82 +1942,82 @@ const ke = ({
1938
1942
  className: t,
1939
1943
  children: n,
1940
1944
  ref: a,
1941
- marginPourcent: o = 0,
1942
- inputRange: c = [0.21, 0.65],
1943
- outputRange: l = [42, 300],
1944
- gap: s = 8,
1945
- onChange: f,
1946
- onMetricsChange: r,
1945
+ marginPourcent: r = 0,
1946
+ inputRange: s = [0.21, 0.65],
1947
+ outputRange: c = [42, 300],
1948
+ gap: l = 8,
1949
+ onChange: i,
1950
+ onMetricsChange: o,
1947
1951
  index: h,
1948
1952
  scrollSensitivity: w = 1.25,
1949
- ...i
1953
+ ...u
1950
1954
  }) => {
1951
- const u = D(null), d = a || u, [y, v] = $(0), I = St({
1955
+ const d = D(null), f = a || d, [y, v] = R(0), I = St({
1952
1956
  index: h,
1953
1957
  className: t,
1954
1958
  children: n,
1955
1959
  variant: e,
1956
- inputRange: c,
1957
- outputRange: l,
1958
- marginPourcent: o,
1959
- onChange: f,
1960
- gap: s,
1960
+ inputRange: s,
1961
+ outputRange: c,
1962
+ marginPourcent: r,
1963
+ onChange: i,
1964
+ gap: l,
1961
1965
  scrollSensitivity: w,
1962
- onMetricsChange: r
1966
+ onMetricsChange: o
1963
1967
  }), b = Z.Children.toArray(n).filter(
1964
1968
  (L) => Z.isValidElement(L) && L.type === nn
1965
- ), B = D(null), [N, A] = $(
1969
+ ), E = D(null), [N, A] = R(
1966
1970
  {}
1967
- ), [g, V] = $(null), F = D(0), C = D(null), x = () => {
1971
+ ), [g, H] = R(null), F = D(0), M = D(null), x = () => {
1968
1972
  var fe, we;
1969
- if (!B.current || !d.current || (g == null ? void 0 : g.scrollProgress) === void 0)
1973
+ if (!E.current || !f.current || (g == null ? void 0 : g.scrollProgress) === void 0)
1970
1974
  return [];
1971
- const L = (g == null ? void 0 : g.scrollVisible) ?? ((fe = d.current) == null ? void 0 : fe.clientWidth) ?? 0;
1972
- function W(P, T) {
1973
- return P.map((ee, ve) => {
1974
- const Ne = (ee - T) / Math.abs(P[1] - P[0]);
1975
+ const L = (g == null ? void 0 : g.scrollVisible) ?? ((fe = f.current) == null ? void 0 : fe.clientWidth) ?? 0;
1976
+ function W(P, z) {
1977
+ return P.map((te, ve) => {
1978
+ const Ne = (te - z) / Math.abs(P[1] - P[0]);
1975
1979
  return {
1976
- itemScrollXCenter: ee,
1980
+ itemScrollXCenter: te,
1977
1981
  relativeIndex: Ne,
1978
1982
  index: ve,
1979
1983
  width: 0
1980
1984
  };
1981
1985
  });
1982
1986
  }
1983
- const O = b.map((P, T) => {
1984
- if (!E[T].current || !B.current) return 0;
1985
- const ve = T / (b.length - 1);
1987
+ const O = b.map((P, z) => {
1988
+ if (!S[z].current || !E.current) return 0;
1989
+ const ve = z / (b.length - 1);
1986
1990
  return he(ve, [0, 1], [0, 1]);
1987
1991
  }), j = W(
1988
1992
  O,
1989
1993
  (g == null ? void 0 : g.scrollProgress) ?? 0
1990
- ).sort((P, T) => P.index - T.index);
1991
- let Y = (((we = d.current) == null ? void 0 : we.clientWidth) ?? L) + s + l[0] + s;
1992
- const re = j.sort((P, T) => Math.abs(P.relativeIndex) - Math.abs(T.relativeIndex)).map((P, T) => {
1994
+ ).sort((P, z) => P.index - z.index);
1995
+ let Y = (((we = f.current) == null ? void 0 : we.clientWidth) ?? L) + l + c[0] + l;
1996
+ const re = j.sort((P, z) => Math.abs(P.relativeIndex) - Math.abs(z.relativeIndex)).map((P, z) => {
1993
1997
  if (!(Y <= 0)) {
1994
- if (T == 0 && G(P.index), P.width = he(
1995
- Y - s,
1996
- [l[0], l[1]],
1997
- [l[0], l[1]]
1998
- ), Y -= P.width + s, Y != 0 && Y < (l[0] + s) * 2) {
1999
- const ee = P.width - ((l[0] + s) * 2 - Y);
2000
- Y += P.width, P.width = ee, Y -= P.width;
2001
- } else if (Y == 0 && P.width >= l[0] * 2 + s) {
2002
- const ee = P.width - (l[0] + s - Y);
2003
- Y += P.width, P.width = ee, Y -= P.width;
1998
+ if (z == 0 && G(P.index), P.width = he(
1999
+ Y - l,
2000
+ [c[0], c[1]],
2001
+ [c[0], c[1]]
2002
+ ), Y -= P.width + l, Y != 0 && Y < (c[0] + l) * 2) {
2003
+ const te = P.width - ((c[0] + l) * 2 - Y);
2004
+ Y += P.width, P.width = te, Y -= P.width;
2005
+ } else if (Y == 0 && P.width >= c[0] * 2 + l) {
2006
+ const te = P.width - (c[0] + l - Y);
2007
+ Y += P.width, P.width = te, Y -= P.width;
2004
2008
  }
2005
2009
  return P;
2006
2010
  }
2007
- }).filter(Boolean), se = re.reverse(), de = [...re].sort(
2008
- (P, T) => Math.abs(P.index) - Math.abs(T.index)
2011
+ }).filter(Boolean), le = re.reverse(), de = [...re].sort(
2012
+ (P, z) => Math.abs(P.index) - Math.abs(z.index)
2009
2013
  );
2010
- se.forEach((P, T) => {
2011
- const ee = se[T + 1];
2012
- if (!ee) return;
2013
- const ve = 1 - (Math.abs(P.relativeIndex) - Math.abs(ee == null ? void 0 : ee.relativeIndex)), Ne = he(
2014
+ le.forEach((P, z) => {
2015
+ const te = le[z + 1];
2016
+ if (!te) return;
2017
+ const ve = 1 - (Math.abs(P.relativeIndex) - Math.abs(te == null ? void 0 : te.relativeIndex)), Ne = he(
2014
2018
  ve,
2015
2019
  [0, 2],
2016
- [P.width + Y, ee.width]
2020
+ [P.width + Y, te.width]
2017
2021
  );
2018
2022
  Y += P.width, P.width = Ne, Y -= P.width;
2019
2023
  });
@@ -2021,30 +2025,30 @@ const ke = ({
2021
2025
  Math.abs(de[0].relativeIndex),
2022
2026
  [de[0].index == 0 ? 0 : ce - 1, ce],
2023
2027
  [0, 1]
2024
- ), Le = he(oe, [0, 1], [0, 1]) * -(l[0] + s);
2028
+ ), Le = he(oe, [0, 1], [0, 1]) * -(c[0] + l);
2025
2029
  return v(Le), Object.fromEntries(
2026
2030
  re.map((P) => [P.index, P.width])
2027
2031
  );
2028
- }, E = D([]).current, [H, G] = $(0);
2029
- M(() => {
2030
- f && f(H);
2031
- }, [H]), M(() => {
2032
- typeof h == "number" && b.length > 0 && h !== H && ne(h);
2033
- }, [h, b.length]), M(() => {
2034
- _(H);
2035
- }, [H]), E.length !== b.length && b.forEach((L, W) => {
2036
- E[W] || (E[W] = Z.createRef());
2032
+ }, S = D([]).current, [V, G] = R(0);
2033
+ $(() => {
2034
+ i && i(V);
2035
+ }, [V]), $(() => {
2036
+ typeof h == "number" && b.length > 0 && h !== V && ne(h);
2037
+ }, [h, b.length]), $(() => {
2038
+ _(V);
2039
+ }, [V]), S.length !== b.length && b.forEach((L, W) => {
2040
+ S[W] || (S[W] = Z.createRef());
2037
2041
  });
2038
- const [te, _] = $(0), ne = (L, W = {}) => {
2042
+ const [T, _] = R(0), ne = (L, W = {}) => {
2039
2043
  if (!b.length) return 0;
2040
- const O = E[L];
2041
- if (!O || !O.current || !B.current) return 0;
2044
+ const O = S[L];
2045
+ if (!O || !O.current || !E.current) return 0;
2042
2046
  const j = he(
2043
2047
  L / Math.max(1, b.length - 1),
2044
2048
  [0, 1],
2045
2049
  [0, 1]
2046
2050
  );
2047
- return _(L), B.current.dispatchEvent(
2051
+ return _(L), E.current.dispatchEvent(
2048
2052
  new CustomEvent("udx:customScroll:set", {
2049
2053
  bubbles: !0,
2050
2054
  detail: {
@@ -2054,32 +2058,32 @@ const ke = ({
2054
2058
  }
2055
2059
  })
2056
2060
  ), j;
2057
- }, R = b.map((L, W) => {
2061
+ }, B = b.map((L, W) => {
2058
2062
  var re;
2059
- const O = (re = L.props) == null ? void 0 : re.onClick, j = (se) => {
2060
- O == null || O(se);
2063
+ const O = (re = L.props) == null ? void 0 : re.onClick, j = (le) => {
2064
+ O == null || O(le);
2061
2065
  }, Y = () => _(W);
2062
2066
  return Z.cloneElement(
2063
2067
  L,
2064
2068
  {
2065
2069
  width: N[W],
2066
- outputRange: l,
2067
- ref: E[W],
2070
+ outputRange: c,
2071
+ ref: S[W],
2068
2072
  key: W,
2069
2073
  index: W,
2070
2074
  role: "option",
2071
- "aria-selected": H === W,
2072
- tabIndex: H === W ? 0 : -1,
2075
+ "aria-selected": V === W,
2076
+ tabIndex: V === W ? 0 : -1,
2073
2077
  onClick: j,
2074
2078
  onFocus: Y
2075
2079
  }
2076
2080
  );
2077
- }), S = (L) => {
2081
+ }), k = (L) => {
2078
2082
  var W;
2079
2083
  if (L.scrollTotal > 0) {
2080
- (W = C.current) == null || W.stop();
2084
+ (W = M.current) == null || W.stop();
2081
2085
  const O = F.current ?? 0, j = L.scrollProgress ?? 0;
2082
- C.current = ht(O, j, {
2086
+ M.current = ht(O, j, {
2083
2087
  // Spring tuning to add a bit of inertia and smoothness
2084
2088
  type: "spring",
2085
2089
  stiffness: 260,
@@ -2087,65 +2091,65 @@ const ke = ({
2087
2091
  mass: 0.6,
2088
2092
  restDelta: 5e-4,
2089
2093
  onUpdate: (Y) => {
2090
- F.current = Y, V({ ...L, scrollProgress: Y });
2094
+ F.current = Y, H({ ...L, scrollProgress: Y });
2091
2095
  }
2092
2096
  });
2093
2097
  }
2094
2098
  };
2095
- M(() => {
2099
+ $(() => {
2096
2100
  const L = x();
2097
2101
  A(L);
2098
2102
  }, [g]);
2099
- const U = D(r);
2100
- M(() => {
2101
- U.current = r;
2102
- }, [r]);
2103
+ const U = D(o);
2104
+ $(() => {
2105
+ U.current = o;
2106
+ }, [o]);
2103
2107
  const K = D(null);
2104
- M(() => {
2105
- var T;
2108
+ $(() => {
2109
+ var z;
2106
2110
  const L = U.current;
2107
- if (!L || !(d != null && d.current)) return;
2111
+ if (!L || !(f != null && f.current)) return;
2108
2112
  const W = b.length;
2109
2113
  if (W <= 0) return;
2110
- const O = ((T = d.current) == null ? void 0 : T.clientWidth) ?? 0, j = l[1], Y = F.current ?? (g == null ? void 0 : g.scrollProgress) ?? 0, re = (O + s) / (j + s), se = Math.max(1, Math.floor(re)), de = Math.max(1, Math.round(se * (2 / 3))), ce = Math.min(
2111
- Math.max(0, H),
2114
+ const O = ((z = f.current) == null ? void 0 : z.clientWidth) ?? 0, j = c[1], Y = F.current ?? (g == null ? void 0 : g.scrollProgress) ?? 0, re = (O + l) / (j + l), le = Math.max(1, Math.floor(re)), de = Math.max(1, Math.round(le * (2 / 3))), ce = Math.min(
2115
+ Math.max(0, V),
2112
2116
  Math.max(0, W - 1)
2113
2117
  ), oe = ce > 0, Le = ce < W - 1, fe = {
2114
2118
  total: W,
2115
2119
  selectedIndex: ce,
2116
2120
  visibleApprox: re,
2117
- visibleFull: se,
2121
+ visibleFull: le,
2118
2122
  stepHalf: de,
2119
2123
  canPrev: oe,
2120
2124
  canNext: Le,
2121
2125
  scrollProgress: Y,
2122
2126
  viewportWidth: O,
2123
2127
  itemMaxWidth: j,
2124
- gap: s
2128
+ gap: l
2125
2129
  }, we = K.current;
2126
2130
  let P = !we;
2127
2131
  if (!P) {
2128
- for (const ee in fe)
2129
- if (fe[ee] !== we[ee]) {
2132
+ for (const te in fe)
2133
+ if (fe[te] !== we[te]) {
2130
2134
  P = !0;
2131
2135
  break;
2132
2136
  }
2133
2137
  }
2134
2138
  P && (K.current = fe, L(fe));
2135
- }, [d, b.length, H, g, s, l]), M(() => () => {
2139
+ }, [f, b.length, V, g, l, c]), $(() => () => {
2136
2140
  var L;
2137
- (L = C.current) == null || L.stop();
2141
+ (L = M.current) == null || L.stop();
2138
2142
  }, []);
2139
- const [ae, ue] = $(0);
2143
+ const [ae, ue] = R(0);
2140
2144
  Xe(() => {
2141
- let L = l[1];
2145
+ let L = c[1];
2142
2146
  g && L > g.scrollVisible && (L = g.scrollVisible);
2143
- const W = (L + s) * R.length / w;
2147
+ const W = (L + l) * B.length / w;
2144
2148
  ue(W);
2145
- }, [d, E, g]);
2146
- const k = (L) => {
2149
+ }, [f, S, g]);
2150
+ const C = (L) => {
2147
2151
  if (!b.length) return;
2148
- const W = te ?? H;
2152
+ const W = T ?? V;
2149
2153
  switch (L.key) {
2150
2154
  case "ArrowLeft":
2151
2155
  L.preventDefault(), ne(Math.max(0, W - 1));
@@ -2165,8 +2169,8 @@ const ke = ({
2165
2169
  break;
2166
2170
  }
2167
2171
  };
2168
- return M(() => {
2169
- const L = d.current;
2172
+ return $(() => {
2173
+ const L = f.current;
2170
2174
  if (!L) return;
2171
2175
  const W = (O) => {
2172
2176
  const j = O.detail;
@@ -2178,33 +2182,33 @@ const ke = ({
2178
2182
  W
2179
2183
  );
2180
2184
  };
2181
- }, [d, b.length]), /* @__PURE__ */ m(
2185
+ }, [f, b.length]), /* @__PURE__ */ m(
2182
2186
  "div",
2183
2187
  {
2184
2188
  className: I.carousel,
2185
- ref: d,
2189
+ ref: f,
2186
2190
  role: "listbox",
2187
2191
  "aria-orientation": "horizontal",
2188
- onKeyDown: k,
2189
- ...i,
2192
+ onKeyDown: C,
2193
+ ...u,
2190
2194
  children: /* @__PURE__ */ m(
2191
2195
  jt,
2192
2196
  {
2193
2197
  draggable: !0,
2194
2198
  orientation: "horizontal",
2195
- onScroll: S,
2199
+ onScroll: k,
2196
2200
  scrollSize: ae,
2197
2201
  children: /* @__PURE__ */ m(
2198
2202
  "div",
2199
2203
  {
2200
2204
  className: I.track,
2201
- ref: B,
2205
+ ref: E,
2202
2206
  style: {
2203
- gap: `${s}px`,
2207
+ gap: `${l}px`,
2204
2208
  translate: y,
2205
2209
  willChange: "translate"
2206
2210
  },
2207
- children: R
2211
+ children: B
2208
2212
  }
2209
2213
  )
2210
2214
  }
@@ -2218,15 +2222,15 @@ const ke = ({
2218
2222
  }) => {
2219
2223
  const a = kt({ orientation: e, className: t });
2220
2224
  return /* @__PURE__ */ m("hr", { className: a.divider, ...n });
2221
- }, z = [];
2225
+ }, ee = [];
2222
2226
  for (let e = 0; e < 256; ++e)
2223
- z.push((e + 256).toString(16).slice(1));
2227
+ ee.push((e + 256).toString(16).slice(1));
2224
2228
  function on(e, t = 0) {
2225
- return (z[e[t + 0]] + z[e[t + 1]] + z[e[t + 2]] + z[e[t + 3]] + "-" + z[e[t + 4]] + z[e[t + 5]] + "-" + z[e[t + 6]] + z[e[t + 7]] + "-" + z[e[t + 8]] + z[e[t + 9]] + "-" + z[e[t + 10]] + z[e[t + 11]] + z[e[t + 12]] + z[e[t + 13]] + z[e[t + 14]] + z[e[t + 15]]).toLowerCase();
2229
+ return (ee[e[t + 0]] + ee[e[t + 1]] + ee[e[t + 2]] + ee[e[t + 3]] + "-" + ee[e[t + 4]] + ee[e[t + 5]] + "-" + ee[e[t + 6]] + ee[e[t + 7]] + "-" + ee[e[t + 8]] + ee[e[t + 9]] + "-" + ee[e[t + 10]] + ee[e[t + 11]] + ee[e[t + 12]] + ee[e[t + 13]] + ee[e[t + 14]] + ee[e[t + 15]]).toLowerCase();
2226
2230
  }
2227
2231
  let Se;
2228
2232
  const an = new Uint8Array(16);
2229
- function sn() {
2233
+ function ln() {
2230
2234
  if (!Se) {
2231
2235
  if (typeof crypto > "u" || !crypto.getRandomValues)
2232
2236
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
@@ -2234,13 +2238,13 @@ function sn() {
2234
2238
  }
2235
2239
  return Se(an);
2236
2240
  }
2237
- const ln = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Ve = { randomUUID: ln };
2241
+ const sn = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Ve = { randomUUID: sn };
2238
2242
  function Be(e, t, n) {
2239
- var o;
2243
+ var r;
2240
2244
  if (Ve.randomUUID && !e)
2241
2245
  return Ve.randomUUID();
2242
2246
  e = e || {};
2243
- const a = e.random ?? ((o = e.rng) == null ? void 0 : o.call(e)) ?? sn();
2247
+ const a = e.random ?? ((r = e.rng) == null ? void 0 : r.call(e)) ?? ln();
2244
2248
  if (a.length < 16)
2245
2249
  throw new Error("Random bytes length must be >= 16");
2246
2250
  return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, on(a);
@@ -2250,21 +2254,21 @@ const it = ({
2250
2254
  buttons: t,
2251
2255
  className: n,
2252
2256
  children: a,
2253
- title: o,
2254
- text: c,
2255
- position: l,
2256
- targetRef: s,
2257
- ref: f,
2258
- trigger: r = ["hover", "focus"],
2257
+ title: r,
2258
+ text: s,
2259
+ position: c,
2260
+ targetRef: l,
2261
+ ref: i,
2262
+ trigger: o = ["hover", "focus"],
2259
2263
  ...h
2260
2264
  }) => {
2261
- if (!a && !s)
2265
+ if (!a && !l)
2262
2266
  throw new Error("ToolTip must have a child or a targetRef");
2263
- Array.isArray(r) || (r = [r]), t && !Array.isArray(t) && (t = [t]);
2264
- const w = D(null), i = s || w, [u, d] = $(null), [y] = $(Be()), [v, I] = $(!1), b = D(null);
2265
- M(() => {
2266
- const x = (E) => {
2267
- d(E.detail);
2267
+ Array.isArray(o) || (o = [o]), t && !Array.isArray(t) && (t = [t]);
2268
+ const w = D(null), u = l || w, [d, f] = R(null), [y] = R(Be()), [v, I] = R(!1), b = D(null);
2269
+ $(() => {
2270
+ const x = (S) => {
2271
+ f(S.detail);
2268
2272
  };
2269
2273
  return document.addEventListener("tooltip-update", x), () => {
2270
2274
  document.removeEventListener(
@@ -2272,80 +2276,80 @@ const it = ({
2272
2276
  x
2273
2277
  );
2274
2278
  };
2275
- }, []), M(() => {
2276
- b.current && clearTimeout(b.current), u ? I(u === y) : b.current = setTimeout(() => {
2279
+ }, []), $(() => {
2280
+ b.current && clearTimeout(b.current), d ? I(d === y) : b.current = setTimeout(() => {
2277
2281
  I(!1);
2278
2282
  }, 1200);
2279
- }, [u, y]);
2280
- const B = () => {
2281
- if (r.includes("hover")) {
2283
+ }, [d, y]);
2284
+ const E = () => {
2285
+ if (o.includes("hover")) {
2282
2286
  const x = new CustomEvent("tooltip-update", { detail: y });
2283
2287
  document.dispatchEvent(x);
2284
2288
  }
2285
2289
  }, N = () => {
2286
- if (r.includes("hover")) {
2290
+ if (o.includes("hover")) {
2287
2291
  const x = new CustomEvent("tooltip-update", { detail: null });
2288
2292
  document.dispatchEvent(x);
2289
2293
  }
2290
2294
  }, A = () => {
2291
- if (r.includes("click")) {
2295
+ if (o.includes("click")) {
2292
2296
  const x = new CustomEvent("tooltip-update", {
2293
2297
  detail: v ? null : y
2294
2298
  });
2295
2299
  document.dispatchEvent(x);
2296
2300
  }
2297
2301
  }, g = () => {
2298
- if (r.includes("focus")) {
2302
+ if (o.includes("focus")) {
2299
2303
  const x = new CustomEvent("tooltip-update", { detail: y });
2300
2304
  document.dispatchEvent(x);
2301
2305
  }
2302
- }, V = () => {
2303
- if (r.includes("focus")) {
2306
+ }, H = () => {
2307
+ if (o.includes("focus")) {
2304
2308
  const x = new CustomEvent("tooltip-update", { detail: null });
2305
2309
  document.dispatchEvent(x);
2306
2310
  }
2307
2311
  };
2308
- M(() => {
2309
- if (i != null && i.current) {
2310
- const x = i.current;
2311
- return x.addEventListener("mouseenter", B), x.addEventListener("mouseleave", N), x.addEventListener("click", A), x.addEventListener("focus", g), x.addEventListener("blur", V), () => {
2312
- x.removeEventListener("mouseenter", B), x.removeEventListener("mouseleave", N), x.removeEventListener("click", A), x.removeEventListener("focus", g), x.removeEventListener("blur", V);
2312
+ $(() => {
2313
+ if (u != null && u.current) {
2314
+ const x = u.current;
2315
+ return x.addEventListener("mouseenter", E), x.addEventListener("mouseleave", N), x.addEventListener("click", A), x.addEventListener("focus", g), x.addEventListener("blur", H), () => {
2316
+ x.removeEventListener("mouseenter", E), x.removeEventListener("mouseleave", N), x.removeEventListener("click", A), x.removeEventListener("focus", g), x.removeEventListener("blur", H);
2313
2317
  };
2314
2318
  }
2315
- }, [i, r, y, v]);
2316
- const F = !s && pe(a) ? xe(a, { ref: w }) : a;
2317
- if (!l && typeof window < "u" && i != null && i.current && !l) {
2318
- const x = i.current.getBoundingClientRect(), E = window.innerWidth, H = window.innerHeight, G = x.left / E, te = x.top / H;
2319
- e === "plain" ? G < 1 / 3 ? l = "right" : G > 2 / 3 ? l = "left" : l = te > 0.5 ? "top" : "bottom" : G < 1 / 2 && te < 1 / 2 ? l = "bottom-right" : G > 1 / 2 && te < 1 / 2 ? l = "bottom-left" : G > 1 / 2 && te > 1 / 2 ? l = "top-left" : G < 1 / 2 && te > 1 / 2 && (l = "top-right");
2319
+ }, [u, o, y, v]);
2320
+ const F = !l && pe(a) ? xe(a, { ref: w }) : a;
2321
+ if (!c && typeof window < "u" && u != null && u.current && !c) {
2322
+ const x = u.current.getBoundingClientRect(), S = window.innerWidth, V = window.innerHeight, G = x.left / S, T = x.top / V;
2323
+ e === "plain" ? G < 1 / 3 ? c = "right" : G > 2 / 3 ? c = "left" : c = T > 0.5 ? "top" : "bottom" : G < 1 / 2 && T < 1 / 2 ? c = "bottom-right" : G > 1 / 2 && T < 1 / 2 ? c = "bottom-left" : G > 1 / 2 && T > 1 / 2 ? c = "top-left" : G < 1 / 2 && T > 1 / 2 && (c = "top-right");
2320
2324
  }
2321
- const C = Vt({
2325
+ const M = Vt({
2322
2326
  variant: e,
2323
2327
  buttons: t,
2324
2328
  className: n,
2325
- title: o,
2326
- text: c,
2327
- position: l,
2328
- trigger: r,
2329
- targetRef: s,
2329
+ title: r,
2330
+ text: s,
2331
+ position: c,
2332
+ trigger: o,
2333
+ targetRef: l,
2330
2334
  children: a
2331
2335
  });
2332
2336
  return /* @__PURE__ */ X(me, { children: [
2333
2337
  F,
2334
- /* @__PURE__ */ m(le, { children: v && /* @__PURE__ */ m(Gt, { targetRef: i, children: /* @__PURE__ */ m(
2338
+ /* @__PURE__ */ m(se, { children: v && /* @__PURE__ */ m(Gt, { targetRef: u, children: /* @__PURE__ */ m(
2335
2339
  q.div,
2336
2340
  {
2337
- initial: { opacity: u ? 1 : 0 },
2341
+ initial: { opacity: d ? 1 : 0 },
2338
2342
  animate: { opacity: 1 },
2339
- transition: { duration: u ? 0 : 0.3 },
2340
- exit: { opacity: u ? 1 : 0 },
2341
- className: C.toolTip,
2343
+ transition: { duration: d ? 0 : 0.3 },
2344
+ exit: { opacity: d ? 1 : 0 },
2345
+ className: M.toolTip,
2342
2346
  ...h,
2343
- onMouseEnter: B,
2347
+ onMouseEnter: E,
2344
2348
  onMouseLeave: N,
2345
2349
  children: /* @__PURE__ */ X(
2346
2350
  q.div,
2347
2351
  {
2348
- className: C.container,
2352
+ className: M.container,
2349
2353
  layoutId: "tool-tip",
2350
2354
  transition: {
2351
2355
  type: "spring",
@@ -2353,16 +2357,16 @@ const it = ({
2353
2357
  damping: 20
2354
2358
  },
2355
2359
  children: [
2356
- o && /* @__PURE__ */ m("div", { className: C.subHead, children: o }),
2357
- /* @__PURE__ */ m("div", { className: C.supportingText, children: c }),
2358
- t && /* @__PURE__ */ m("div", { className: C.actions, children: Array.isArray(t) && t.map((x, E) => /* @__PURE__ */ m(
2360
+ r && /* @__PURE__ */ m("div", { className: M.subHead, children: r }),
2361
+ /* @__PURE__ */ m("div", { className: M.supportingText, children: s }),
2362
+ t && /* @__PURE__ */ m("div", { className: M.actions, children: Array.isArray(t) && t.map((x, S) => /* @__PURE__ */ m(
2359
2363
  ke,
2360
2364
  {
2361
2365
  size: "small",
2362
2366
  variant: "text",
2363
2367
  ...x
2364
2368
  },
2365
- E
2369
+ S
2366
2370
  )) })
2367
2371
  ]
2368
2372
  }
@@ -2375,12 +2379,12 @@ const it = ({
2375
2379
  label: t,
2376
2380
  variant: n = "primary",
2377
2381
  size: a = "medium",
2378
- href: o,
2379
- type: c,
2380
- icon: l,
2381
- extended: s = !1,
2382
- ref: f,
2383
- transition: r,
2382
+ href: r,
2383
+ type: s,
2384
+ icon: c,
2385
+ extended: l = !1,
2386
+ ref: i,
2387
+ transition: o,
2384
2388
  children: h,
2385
2389
  ...w
2386
2390
  }) => {
@@ -2388,28 +2392,28 @@ const it = ({
2388
2392
  throw new Error(
2389
2393
  "FAB component requires either a label prop or children content"
2390
2394
  );
2391
- const i = o ? "a" : "button", u = Ct({
2392
- href: o,
2393
- icon: l,
2394
- extended: s,
2395
+ const u = r ? "a" : "button", d = Ct({
2396
+ href: r,
2397
+ icon: c,
2398
+ extended: l,
2395
2399
  label: t,
2396
2400
  size: a,
2397
2401
  variant: n,
2398
2402
  className: e,
2399
- transition: r,
2403
+ transition: o,
2400
2404
  children: t
2401
2405
  });
2402
- r = { duration: 0.3, ...r };
2403
- const d = D(null), y = f || d, v = {
2406
+ o = { duration: 0.3, ...o };
2407
+ const f = D(null), y = i || f, v = {
2404
2408
  visible: {
2405
2409
  width: "auto",
2406
2410
  marginLeft: 12,
2407
2411
  opacity: 1,
2408
2412
  transition: {
2409
- ...r,
2413
+ ...o,
2410
2414
  opacity: {
2411
- duration: r.duration / 2,
2412
- delay: r.duration - r.duration / 2
2415
+ duration: o.duration / 2,
2416
+ delay: o.duration - o.duration / 2
2413
2417
  }
2414
2418
  }
2415
2419
  },
@@ -2418,27 +2422,27 @@ const it = ({
2418
2422
  marginLeft: 0,
2419
2423
  opacity: 0,
2420
2424
  transition: {
2421
- ...r,
2425
+ ...o,
2422
2426
  marginLeft: {
2423
- duration: r.duration / 2,
2424
- delay: r.duration - r.duration / 2
2427
+ duration: o.duration / 2,
2428
+ delay: o.duration - o.duration / 2
2425
2429
  }
2426
2430
  }
2427
2431
  }
2428
2432
  };
2429
2433
  return /* @__PURE__ */ X(
2430
- i,
2434
+ u,
2431
2435
  {
2432
2436
  ...w,
2433
2437
  ref: y,
2434
- href: o,
2435
- "aria-label": s ? void 0 : t,
2436
- className: u.fab,
2438
+ href: r,
2439
+ "aria-label": l ? void 0 : t,
2440
+ className: d.fab,
2437
2441
  children: [
2438
2442
  /* @__PURE__ */ m(
2439
2443
  it,
2440
2444
  {
2441
- trigger: s ? null : void 0,
2445
+ trigger: l ? null : void 0,
2442
2446
  text: t,
2443
2447
  targetRef: y
2444
2448
  }
@@ -2446,8 +2450,8 @@ const it = ({
2446
2450
  /* @__PURE__ */ m(
2447
2451
  ye,
2448
2452
  {
2449
- style: { transition: r.duration + "s" },
2450
- className: u.stateLayer,
2453
+ style: { transition: o.duration + "s" },
2454
+ className: d.stateLayer,
2451
2455
  colorName: p({
2452
2456
  "on-primary": n == "primary",
2453
2457
  "on-secondary": n == "secondary",
@@ -2459,15 +2463,15 @@ const it = ({
2459
2463
  stateClassName: "state-ripple-group-[fab]"
2460
2464
  }
2461
2465
  ),
2462
- /* @__PURE__ */ m(ie, { icon: l, className: u.icon }),
2463
- /* @__PURE__ */ m(le, { children: s && /* @__PURE__ */ m(
2466
+ /* @__PURE__ */ m(ie, { icon: c, className: d.icon }),
2467
+ /* @__PURE__ */ m(se, { children: l && /* @__PURE__ */ m(
2464
2468
  q.span,
2465
2469
  {
2466
2470
  variants: v,
2467
2471
  initial: "hidden",
2468
2472
  animate: "visible",
2469
2473
  exit: "hidden",
2470
- className: u.label,
2474
+ className: d.label,
2471
2475
  children: t
2472
2476
  }
2473
2477
  ) })
@@ -2479,65 +2483,65 @@ const it = ({
2479
2483
  href: t,
2480
2484
  disabled: n = !1,
2481
2485
  type: a = "button",
2482
- title: o,
2483
- label: c,
2484
- onToggle: l,
2485
- activated: s = !1,
2486
- onClick: f,
2487
- icon: r,
2486
+ title: r,
2487
+ label: s,
2488
+ onToggle: c,
2489
+ activated: l = !1,
2490
+ onClick: i,
2491
+ icon: o,
2488
2492
  size: h = "medium",
2489
2493
  iconSelected: w,
2490
- className: i,
2491
- ref: u,
2492
- width: d = "default",
2494
+ className: u,
2495
+ ref: d,
2496
+ width: f = "default",
2493
2497
  shape: y = "rounded",
2494
2498
  allowShapeTransformation: v = !0,
2495
2499
  transition: I,
2496
2500
  children: b,
2497
- ...B
2501
+ ...E
2498
2502
  }) => {
2499
- if (b && (c = b), !c)
2503
+ if (b && (s = b), !s)
2500
2504
  throw new Error(
2501
2505
  "IconButton component requires either a label prop or children content to provide an accessible aria-label"
2502
2506
  );
2503
- o || (o = c);
2504
- const [N, A] = Z.useState(s);
2507
+ r || (r = s);
2508
+ const [N, A] = Z.useState(l);
2505
2509
  let g;
2506
- l ? l && (g = (E) => {
2507
- n && E.preventDefault(), A(!N), l(!!N);
2508
- }, r = N && w || r) : g = (E) => {
2509
- n && E.preventDefault(), f && f(E);
2510
- }, M(() => {
2511
- A(s);
2512
- }, [s]);
2513
- const V = t ? "a" : "button", F = $t({
2510
+ c ? c && (g = (S) => {
2511
+ n && S.preventDefault(), A(!N), c(!!N);
2512
+ }, o = N && w || o) : g = (S) => {
2513
+ n && S.preventDefault(), i && i(S);
2514
+ }, $(() => {
2515
+ A(l);
2516
+ }, [l]);
2517
+ const H = t ? "a" : "button", F = $t({
2514
2518
  transition: I,
2515
2519
  shape: y,
2516
2520
  allowShapeTransformation: v,
2517
- width: d,
2521
+ width: f,
2518
2522
  href: t,
2519
2523
  activated: N,
2520
- label: c,
2524
+ label: s,
2521
2525
  iconSelected: w,
2522
2526
  isActive: N,
2523
- onToggle: l,
2527
+ onToggle: c,
2524
2528
  disabled: n,
2525
- icon: r,
2529
+ icon: o,
2526
2530
  variant: e,
2527
- className: i,
2531
+ className: u,
2528
2532
  size: h,
2529
- children: c,
2530
- ...B
2531
- }), C = D(null), x = u || C;
2533
+ children: s,
2534
+ ...E
2535
+ }), M = D(null), x = d || M;
2532
2536
  return I = { duration: 0.3, ...I }, /* @__PURE__ */ X(
2533
- V,
2537
+ H,
2534
2538
  {
2535
2539
  disabled: n,
2536
2540
  href: t,
2537
2541
  style: { transition: I.duration + "s" },
2538
2542
  className: F.iconButton,
2539
- "aria-label": c,
2540
- ...B,
2543
+ "aria-label": s,
2544
+ ...E,
2541
2545
  title: void 0,
2542
2546
  onClick: g,
2543
2547
  ref: x,
@@ -2547,7 +2551,7 @@ const it = ({
2547
2551
  {
2548
2552
  targetRef: x,
2549
2553
  trigger: n ? null : void 0,
2550
- text: o
2554
+ text: r
2551
2555
  }
2552
2556
  ),
2553
2557
  /* @__PURE__ */ m("div", { className: F.touchTarget }),
@@ -2562,22 +2566,22 @@ const it = ({
2562
2566
  "on-primary": N
2563
2567
  },
2564
2568
  e === "filled" && {
2565
- "on-surface-variant": !N && !!l,
2566
- "on-primary": N || !l
2569
+ "on-surface-variant": !N && !!c,
2570
+ "on-primary": N || !c
2567
2571
  },
2568
2572
  e === "tonal" && {
2569
- "on-secondary": N && !!l,
2570
- "on-secondary-container": !N || !l
2573
+ "on-secondary": N && !!c,
2574
+ "on-secondary-container": !N || !c
2571
2575
  },
2572
2576
  e === "outlined" && {
2573
- "inverse-on-surface": N && !!l,
2574
- "on-surface-variant": !N || !l
2577
+ "inverse-on-surface": N && !!c,
2578
+ "on-surface-variant": !N || !c
2575
2579
  }
2576
2580
  ),
2577
2581
  stateClassName: "state-ripple-group-[icon-button]"
2578
2582
  }
2579
2583
  ),
2580
- r && /* @__PURE__ */ m(ie, { icon: r, className: F.icon })
2584
+ o && /* @__PURE__ */ m(ie, { icon: o, className: F.icon })
2581
2585
  ]
2582
2586
  }
2583
2587
  );
@@ -2605,83 +2609,84 @@ const zn = ({
2605
2609
  label: t,
2606
2610
  variant: n = "primary",
2607
2611
  size: a = "medium",
2608
- href: o,
2609
- type: c,
2610
- icon: l,
2611
- extended: s = !1,
2612
- ref: f,
2613
- transition: r,
2614
- children: h,
2615
- open: w,
2616
- defaultOpen: i = !1,
2612
+ href: r,
2613
+ icon: s,
2614
+ extended: c = !1,
2615
+ ref: l,
2616
+ transition: i,
2617
+ children: o,
2618
+ open: h,
2619
+ defaultOpen: w = !1,
2617
2620
  onOpenChange: u,
2618
2621
  ...d
2619
2622
  }) => {
2620
- r = { duration: 0.3, ease: "easeInOut", ...r };
2621
- const y = D(null), v = f || y, I = typeof w == "boolean", [b, B] = $(i), N = I ? w : b, A = (E) => {
2622
- I || B(E), u == null || u(E);
2623
- }, g = Z.Children.toArray(h).filter(
2624
- (E) => Z.isValidElement(E) && E.type === ke
2625
- ), V = Mt({
2626
- href: o,
2627
- icon: l,
2628
- extended: s,
2623
+ i = { duration: 0.3, ease: "easeInOut", ...i };
2624
+ const f = D(null), y = l || f, v = typeof h == "boolean", [I, b] = R(w), E = v ? h : I, N = (x) => {
2625
+ v || b(x), u == null || u(x);
2626
+ }, A = Z.Children.toArray(o).filter(
2627
+ (x) => Z.isValidElement(x) && x.type === ke
2628
+ ), g = Mt({
2629
+ href: r,
2630
+ icon: s,
2631
+ extended: c,
2629
2632
  label: t,
2630
2633
  size: a,
2631
2634
  variant: n,
2632
2635
  className: e,
2633
- transition: r,
2636
+ transition: i,
2634
2637
  children: t,
2635
- open: N
2636
- }), F = q.create(Ce), C = q.create(be);
2638
+ open: E
2639
+ }), H = q.create(Ce), F = q.create(be);
2637
2640
  q.create(ke);
2638
- const x = (E) => /* @__PURE__ */ m(
2639
- F,
2641
+ const M = (x) => /* @__PURE__ */ m(
2642
+ H,
2640
2643
  {
2641
- icon: l,
2642
- extended: s,
2644
+ icon: s,
2645
+ extended: c,
2643
2646
  label: t,
2644
2647
  variant: n + "Container",
2645
2648
  size: a,
2646
- className: V.fab + " " + (e ?? ""),
2647
- "aria-expanded": N,
2648
- onClick: () => A(!0),
2649
+ className: g.fab + " " + (e ?? ""),
2650
+ "aria-expanded": E,
2651
+ onClick: () => N(!0),
2649
2652
  style: { transition: "border-radius 0.3s ease-in-out" },
2650
2653
  transition: {
2651
- duration: r.duration,
2654
+ duration: i.duration,
2652
2655
  ease: "easeInOut",
2653
- borderRadius: { duration: r.duration, ease: "easeInOut" },
2654
- background: { duration: r.duration, ease: "easeInOut" },
2655
- ...r
2656
+ borderRadius: { duration: i.duration, ease: "easeInOut" },
2657
+ background: { duration: i.duration, ease: "easeInOut" },
2658
+ ...i
2656
2659
  },
2657
- ...E
2660
+ ...x
2658
2661
  }
2659
2662
  );
2660
- return /* @__PURE__ */ X("div", { className: V.fabMenu, ref: v, ...d, children: [
2661
- /* @__PURE__ */ m(le, { children: N && /* @__PURE__ */ m("div", { className: V.actions, role: "menu", "aria-hidden": !N, children: (() => {
2662
- const E = g.length;
2663
- return g.map((H, G) => {
2664
- H.props;
2665
- const te = E - 1 - G, _ = ((r == null ? void 0 : r.delay) ?? 0) + te * 0.06, ne = {
2663
+ return /* @__PURE__ */ X("div", { className: g.fabMenu, ref: y, ...d, children: [
2664
+ /* @__PURE__ */ m(se, { children: E && /* @__PURE__ */ m("div", { className: g.actions, role: "menu", "aria-hidden": !E, children: (() => {
2665
+ const x = A.length;
2666
+ return A.map((S, V) => {
2667
+ S.props;
2668
+ const G = x - 1 - V, T = ((i == null ? void 0 : i.delay) ?? 0) + G * 0.06, _ = {
2666
2669
  open: {
2670
+ overflow: "visible",
2667
2671
  opacity: 1,
2668
2672
  width: "auto",
2669
2673
  transition: {
2670
- ...r,
2671
- delay: _,
2674
+ ...i,
2675
+ delay: T,
2672
2676
  opacity: {
2673
- delay: (r == null ? void 0 : r.duration) / 2 + _
2677
+ delay: (i == null ? void 0 : i.duration) / 2 + T
2674
2678
  }
2675
2679
  }
2676
2680
  },
2677
2681
  close: {
2682
+ overflow: "hidden",
2678
2683
  opacity: 0,
2679
2684
  width: 0,
2680
2685
  transition: {
2681
- ...r,
2682
- delay: _,
2686
+ ...i,
2687
+ delay: T,
2683
2688
  opacity: {
2684
- duration: (r == null ? void 0 : r.duration) / 2
2689
+ duration: (i == null ? void 0 : i.duration) / 1.5
2685
2690
  }
2686
2691
  }
2687
2692
  }
@@ -2691,19 +2696,18 @@ const zn = ({
2691
2696
  {
2692
2697
  initial: "close",
2693
2698
  animate: "open",
2694
- className: "overflow-hidden",
2695
- variants: ne,
2696
- transition: r,
2699
+ variants: _,
2700
+ transition: i,
2697
2701
  exit: "close",
2698
2702
  children: Z.cloneElement(
2699
- H,
2703
+ S,
2700
2704
  {
2701
- key: G,
2705
+ key: V,
2702
2706
  shape: "rounded",
2703
2707
  variant: "filled",
2704
2708
  className: () => ({
2705
2709
  button: p("max-w-full overflow-hidden", {
2706
- "px-0": !N,
2710
+ "px-0": !E,
2707
2711
  "bg-primary-container text-on-primary-container ": n === "primary",
2708
2712
  "bg-secondary-container text-on-secondary-container": n === "secondary",
2709
2713
  "bg-tertiary-container text-on-tertiary-container": n === "tertiary"
@@ -2720,17 +2724,17 @@ const zn = ({
2720
2724
  );
2721
2725
  });
2722
2726
  })() }) }),
2723
- x({
2727
+ M({
2724
2728
  className: "invisible pointer-events-none"
2725
2729
  }),
2726
2730
  /* @__PURE__ */ X("div", { className: "absolute right-0 top-0", children: [
2727
- !N && x({
2731
+ !E && M({
2728
2732
  className: "",
2729
2733
  layout: !0,
2730
2734
  layoutId: "fab-menu"
2731
2735
  }),
2732
- N && /* @__PURE__ */ m(me, { children: /* @__PURE__ */ m(
2733
- C,
2736
+ E && /* @__PURE__ */ m(me, { children: /* @__PURE__ */ m(
2737
+ F,
2734
2738
  {
2735
2739
  layout: !0,
2736
2740
  layoutId: "fab-menu",
@@ -2749,20 +2753,20 @@ const zn = ({
2749
2753
  }),
2750
2754
  style: { transition: "border-radius 0.3s ease-in-out" },
2751
2755
  transition: {
2752
- duration: r.duration,
2756
+ duration: i.duration,
2753
2757
  ease: "easeInOut",
2754
2758
  borderRadius: {
2755
- duration: r.duration,
2759
+ duration: i.duration,
2756
2760
  ease: "easeInOut"
2757
2761
  },
2758
2762
  background: {
2759
- duration: r.duration,
2763
+ duration: i.duration,
2760
2764
  ease: "easeInOut"
2761
2765
  },
2762
- ...r
2766
+ ...i
2763
2767
  },
2764
2768
  icon: un,
2765
- onClick: () => A(!1),
2769
+ onClick: () => N(!1),
2766
2770
  children: "Close"
2767
2771
  }
2768
2772
  ) })
@@ -2773,10 +2777,10 @@ const zn = ({
2773
2777
  valueFormatter: t,
2774
2778
  step: n = 10,
2775
2779
  name: a,
2776
- value: o = 0,
2777
- min: c = 0,
2778
- max: l = 100,
2779
- marks: s = [
2780
+ value: r = 0,
2781
+ min: s = 0,
2782
+ max: c = 100,
2783
+ marks: l = [
2780
2784
  {
2781
2785
  value: 0,
2782
2786
  label: "0"
@@ -2786,99 +2790,99 @@ const zn = ({
2786
2790
  label: "100"
2787
2791
  }
2788
2792
  ],
2789
- ref: f,
2790
- onChange: r,
2793
+ ref: i,
2794
+ onChange: o,
2791
2795
  ...h
2792
2796
  }) => {
2793
- const w = (R) => {
2794
- const S = u(), U = i();
2795
- return R === 1 / 0 ? 100 : R === -1 / 0 ? 0 : (R - S) / (U - S) * 100;
2796
- }, i = (R = !1) => R ? l : l == 1 / 0 ? s[(s == null ? void 0 : s.length) - 1].value : l, u = (R = !1) => R ? c : c == -1 / 0 ? s[0].value : c, d = (R) => {
2797
- const S = u(!1);
2798
- return (i(!1) - S) * R / 100 + S;
2799
- }, [y, v] = $(!1), I = D(null), b = f || I, [B, N] = $(o), [A, g] = $(w(o)), [V, F] = $(!1), C = (R) => {
2800
- F(!0), v(!0), H(R);
2797
+ const w = (B) => {
2798
+ const k = d(), U = u();
2799
+ return B === 1 / 0 ? 100 : B === -1 / 0 ? 0 : (B - k) / (U - k) * 100;
2800
+ }, u = (B = !1) => B ? c : c == 1 / 0 ? l[(l == null ? void 0 : l.length) - 1].value : c, d = (B = !1) => B ? s : s == -1 / 0 ? l[0].value : s, f = (B) => {
2801
+ const k = d(!1);
2802
+ return (u(!1) - k) * B / 100 + k;
2803
+ }, [y, v] = R(!1), I = D(null), b = i || I, [E, N] = R(r), [A, g] = R(w(r)), [H, F] = R(!1), M = (B) => {
2804
+ F(!0), v(!0), V(B);
2801
2805
  }, x = () => {
2802
2806
  F(!1), v(!1);
2803
2807
  };
2804
- M(() => (V ? (window.addEventListener("mouseup", x), window.addEventListener("mousemove", H), window.addEventListener("touchend", x), window.addEventListener("touchmove", H)) : (window.removeEventListener("mouseup", x), window.removeEventListener("mousemove", H), window.removeEventListener("touchend", x), window.removeEventListener("touchmove", H)), () => {
2805
- window.removeEventListener("mouseup", x), window.removeEventListener("mousemove", H), window.removeEventListener("touchend", x), window.removeEventListener("touchmove", H);
2806
- }), [V]);
2807
- const E = Wt({
2808
+ $(() => (H ? (window.addEventListener("mouseup", x), window.addEventListener("mousemove", V), window.addEventListener("touchend", x), window.addEventListener("touchmove", V)) : (window.removeEventListener("mouseup", x), window.removeEventListener("mousemove", V), window.removeEventListener("touchend", x), window.removeEventListener("touchmove", V)), () => {
2809
+ window.removeEventListener("mouseup", x), window.removeEventListener("mousemove", V), window.removeEventListener("touchend", x), window.removeEventListener("touchmove", V);
2810
+ }), [H]);
2811
+ const S = Wt({
2808
2812
  className: e,
2809
2813
  isChanging: y,
2810
- marks: s,
2811
- max: l,
2812
- min: c,
2814
+ marks: l,
2815
+ max: c,
2816
+ min: s,
2813
2817
  name: a,
2814
2818
  step: n,
2815
- value: B,
2819
+ value: E,
2816
2820
  valueFormatter: t,
2817
- onChange: r
2818
- }), H = (R) => {
2819
- const S = b == null ? void 0 : b.current;
2820
- if (S) {
2821
- const U = S.getBoundingClientRect().left, ae = ((R.type === "touchmove" || R.type === "touchstart" ? R.touches[0].clientX : R.clientX) - U) / S.offsetWidth * 100;
2821
+ onChange: o
2822
+ }), V = (B) => {
2823
+ const k = b == null ? void 0 : b.current;
2824
+ if (k) {
2825
+ const U = k.getBoundingClientRect().left, ae = ((B.type === "touchmove" || B.type === "touchstart" ? B.touches[0].clientX : B.clientX) - U) / k.offsetWidth * 100;
2822
2826
  G({ percent: ae });
2823
2827
  }
2824
2828
  }, G = ({
2825
- percent: R,
2826
- value: S
2829
+ percent: B,
2830
+ value: k
2827
2831
  }) => {
2828
- if (R) {
2829
- if (R >= 100) {
2830
- N(i(!0)), g(100);
2832
+ if (B) {
2833
+ if (B >= 100) {
2834
+ N(u(!0)), g(100);
2831
2835
  return;
2832
2836
  }
2833
- if (R <= 0) {
2834
- N(u(!0)), g(0);
2837
+ if (B <= 0) {
2838
+ N(d(!0)), g(0);
2835
2839
  return;
2836
2840
  }
2837
- S = d(R), S == u() && (S = u(!0)), S == i() && (S = i(!0));
2838
- } else if (S != null) {
2839
- if (S >= i()) {
2840
- N(i(!0)), g(100);
2841
+ k = f(B), k == d() && (k = d(!0)), k == u() && (k = u(!0));
2842
+ } else if (k != null) {
2843
+ if (k >= u()) {
2844
+ N(u(!0)), g(100);
2841
2845
  return;
2842
2846
  }
2843
- if (S <= u()) {
2844
- N(u(!0)), g(0);
2847
+ if (k <= d()) {
2848
+ N(d(!0)), g(0);
2845
2849
  return;
2846
2850
  }
2847
- R = w(S);
2851
+ B = w(k);
2848
2852
  } else
2849
2853
  return;
2850
- n != null ? S = Math.round((S - u()) / n) * n + u() : s && (S = s.reduce((U, K, ae) => {
2851
- let ue = K.value === 1 / 0 ? i() : K.value === -1 / 0 ? u() : K.value, k = U.value === 1 / 0 ? i() : U.value === -1 / 0 ? u() : U.value;
2852
- return ue = Math.abs(ue - S), k = Math.abs(k - S), ue < k ? K : U;
2853
- }).value), S >= i() && (S = i(!0)), S <= u() && (S = u(!0)), R = w(S), N(S), g(R), r && r(S);
2854
- }, [te, _] = $(0);
2855
- return M(() => {
2856
- const R = () => {
2854
+ n != null ? k = Math.round((k - d()) / n) * n + d() : l && (k = l.reduce((U, K, ae) => {
2855
+ let ue = K.value === 1 / 0 ? u() : K.value === -1 / 0 ? d() : K.value, C = U.value === 1 / 0 ? u() : U.value === -1 / 0 ? d() : U.value;
2856
+ return ue = Math.abs(ue - k), C = Math.abs(C - k), ue < C ? K : U;
2857
+ }).value), k >= u() && (k = u(!0)), k <= d() && (k = d(!0)), B = w(k), N(k), g(B), o && o(k);
2858
+ }, [T, _] = R(0);
2859
+ return $(() => {
2860
+ const B = () => {
2857
2861
  b.current && _(b.current.offsetWidth);
2858
2862
  };
2859
- return R(), window.addEventListener("resize", R), () => {
2860
- window.removeEventListener("resize", R);
2863
+ return B(), window.addEventListener("resize", B), () => {
2864
+ window.removeEventListener("resize", B);
2861
2865
  };
2862
2866
  }, []), /* @__PURE__ */ X(
2863
2867
  "div",
2864
2868
  {
2865
2869
  tabIndex: 0,
2866
- onKeyDown: (R) => {
2867
- switch (R.key) {
2870
+ onKeyDown: (B) => {
2871
+ switch (B.key) {
2868
2872
  case "ArrowRight":
2869
2873
  if (n)
2870
- G({ value: B + n });
2871
- else if (s) {
2872
- const S = s.find((U) => U.value > B);
2873
- S && G({ value: S.value });
2874
+ G({ value: E + n });
2875
+ else if (l) {
2876
+ const k = l.find((U) => U.value > E);
2877
+ k && G({ value: k.value });
2874
2878
  }
2875
2879
  break;
2876
2880
  case "ArrowLeft":
2877
2881
  if (n)
2878
- G({ value: B - n });
2879
- else if (s) {
2880
- const S = s.slice(0).reverse().find((U, K, ae) => B === 1 / 0 ? K === 1 : U.value < B);
2881
- S && G({ value: S.value });
2882
+ G({ value: E - n });
2883
+ else if (l) {
2884
+ const k = l.slice(0).reverse().find((U, K, ae) => E === 1 / 0 ? K === 1 : U.value < E);
2885
+ k && G({ value: k.value });
2882
2886
  }
2883
2887
  break;
2884
2888
  default:
@@ -2886,24 +2890,24 @@ const zn = ({
2886
2890
  }
2887
2891
  },
2888
2892
  role: "slider",
2889
- "aria-valuemin": u(!0),
2890
- "aria-valuemax": i(!0),
2891
- "aria-valuenow": B,
2892
- "aria-valuetext": B.toString(),
2893
- className: E.slider,
2894
- onMouseDown: C,
2895
- onClick: H,
2893
+ "aria-valuemin": d(!0),
2894
+ "aria-valuemax": u(!0),
2895
+ "aria-valuenow": E,
2896
+ "aria-valuetext": E.toString(),
2897
+ className: S.slider,
2898
+ onMouseDown: M,
2899
+ onClick: V,
2896
2900
  ref: b,
2897
- onTouchStart: C,
2898
- onDragStart: (R) => R.preventDefault(),
2901
+ onTouchStart: M,
2902
+ onDragStart: (B) => B.preventDefault(),
2899
2903
  ...h,
2900
2904
  children: [
2901
- /* @__PURE__ */ m("input", { type: "hidden", name: a, value: B }),
2902
- /* @__PURE__ */ m("div", { className: E.activeTrack, style: { flex: A / 100 } }),
2903
- /* @__PURE__ */ m("div", { className: E.handle, children: /* @__PURE__ */ m(le, { children: y && /* @__PURE__ */ m(
2905
+ /* @__PURE__ */ m("input", { type: "hidden", name: a, value: E }),
2906
+ /* @__PURE__ */ m("div", { className: S.activeTrack, style: { flex: A / 100 } }),
2907
+ /* @__PURE__ */ m("div", { className: S.handle, children: /* @__PURE__ */ m(se, { children: y && /* @__PURE__ */ m(
2904
2908
  q.div,
2905
2909
  {
2906
- className: E.valueIndicator,
2910
+ className: S.valueIndicator,
2907
2911
  initial: "hidden",
2908
2912
  animate: "visible",
2909
2913
  exit: "hidden",
@@ -2917,13 +2921,13 @@ const zn = ({
2917
2921
  hidden: { opacity: 1, scale: 0 }
2918
2922
  },
2919
2923
  transition: { duration: 0.1 },
2920
- children: t ? t(B) : B
2924
+ children: t ? t(E) : E
2921
2925
  }
2922
2926
  ) }) }),
2923
2927
  /* @__PURE__ */ m(
2924
2928
  "div",
2925
2929
  {
2926
- className: E.inactiveTrack,
2930
+ className: S.inactiveTrack,
2927
2931
  style: { flex: 1 - A / 100 }
2928
2932
  }
2929
2933
  ),
@@ -2931,21 +2935,21 @@ const zn = ({
2931
2935
  "div",
2932
2936
  {
2933
2937
  className: "w-[calc(100%-12px)] h-full absolute -translate-x-1/2 transform left-1/2",
2934
- children: s && s.map((R, S) => {
2938
+ children: l && l.map((B, k) => {
2935
2939
  let U = null;
2936
- const K = (y ? 9 : 10) / te * 100, ae = w(R.value);
2940
+ const K = (y ? 9 : 10) / T * 100, ae = w(B.value);
2937
2941
  return ae <= A - K ? U = !0 : ae >= A + K && (U = !1), /* @__PURE__ */ m(
2938
2942
  "div",
2939
2943
  {
2940
- className: p(E.dot, {
2944
+ className: p(S.dot, {
2941
2945
  "bg-primary-container": U != null && U,
2942
2946
  "bg-primary": U != null && !U
2943
2947
  }),
2944
2948
  style: {
2945
- left: `${w(R.value)}%`
2949
+ left: `${w(B.value)}%`
2946
2950
  }
2947
2951
  },
2948
- S
2952
+ k
2949
2953
  );
2950
2954
  })
2951
2955
  }
@@ -2958,34 +2962,34 @@ const zn = ({
2958
2962
  className: t,
2959
2963
  children: n,
2960
2964
  title: a,
2961
- position: o = "right",
2962
- extended: c,
2963
- divider: l,
2964
- onExtendedChange: s,
2965
- closeIcon: f = ge,
2966
- transition: r,
2965
+ position: r = "right",
2966
+ extended: s,
2967
+ divider: c,
2968
+ onExtendedChange: l,
2969
+ closeIcon: i = ge,
2970
+ transition: o,
2967
2971
  ...h
2968
2972
  }) => {
2969
- r = { duration: 0.3, ...r };
2970
- const [w, i] = $(c ?? !0), u = Bt({
2971
- transition: r,
2973
+ o = { duration: 0.3, ...o };
2974
+ const [w, u] = R(s ?? !0), d = Bt({
2975
+ transition: o,
2972
2976
  title: a,
2973
- position: o,
2974
- closeIcon: f,
2977
+ position: r,
2978
+ closeIcon: i,
2975
2979
  className: t,
2976
2980
  children: n,
2977
- onExtendedChange: s,
2978
- divider: l,
2981
+ onExtendedChange: l,
2982
+ divider: c,
2979
2983
  isExtended: w,
2980
2984
  extended: w,
2981
2985
  variant: e
2982
2986
  });
2983
- M(() => {
2984
- s == null || s(w ?? !1);
2985
- }, [w]), M(() => {
2986
- c != null && i(c);
2987
- }, [c]);
2988
- const d = {
2987
+ $(() => {
2988
+ l == null || l(w ?? !1);
2989
+ }, [w]), $(() => {
2990
+ s != null && u(s);
2991
+ }, [s]);
2992
+ const f = {
2989
2993
  close: {
2990
2994
  width: 0
2991
2995
  },
@@ -2993,58 +2997,58 @@ const zn = ({
2993
2997
  width: "auto"
2994
2998
  }
2995
2999
  }, y = () => /* @__PURE__ */ X(me, { children: [
2996
- /* @__PURE__ */ m(le, { children: e == "modal" && w && /* @__PURE__ */ m(
3000
+ /* @__PURE__ */ m(se, { children: e == "modal" && w && /* @__PURE__ */ m(
2997
3001
  q.div,
2998
3002
  {
2999
3003
  initial: { opacity: 0 },
3000
3004
  animate: { opacity: 1 },
3001
3005
  exit: { opacity: 0 },
3002
- transition: r,
3003
- onClick: () => i(!1),
3004
- className: u.overlay
3006
+ transition: o,
3007
+ onClick: () => u(!1),
3008
+ className: d.overlay
3005
3009
  }
3006
3010
  ) }),
3007
- /* @__PURE__ */ m(le, { children: w && /* @__PURE__ */ X(
3011
+ /* @__PURE__ */ m(se, { children: w && /* @__PURE__ */ X(
3008
3012
  "div",
3009
3013
  {
3010
3014
  ...h,
3011
- className: u.sideSheet,
3012
- style: { transition: r.duration + "s" },
3015
+ className: d.sideSheet,
3016
+ style: { transition: o.duration + "s" },
3013
3017
  children: [
3014
3018
  /* @__PURE__ */ X(
3015
3019
  q.div,
3016
3020
  {
3017
- variants: d,
3018
- initial: c === !1 ? "open" : "close",
3021
+ variants: f,
3022
+ initial: s === !1 ? "open" : "close",
3019
3023
  animate: "open",
3020
3024
  exit: "close",
3021
- className: u.container,
3025
+ className: d.container,
3022
3026
  children: [
3023
- /* @__PURE__ */ X("div", { className: u.header, children: [
3024
- a && /* @__PURE__ */ m("p", { className: u.title, children: a }),
3027
+ /* @__PURE__ */ X("div", { className: d.header, children: [
3028
+ a && /* @__PURE__ */ m("p", { className: d.title, children: a }),
3025
3029
  /* @__PURE__ */ m(
3026
3030
  be,
3027
3031
  {
3028
3032
  size: "small",
3029
3033
  label: "close",
3030
- icon: f,
3031
- onClick: () => i(!1),
3032
- className: u.closeButton
3034
+ icon: i,
3035
+ onClick: () => u(!1),
3036
+ className: d.closeButton
3033
3037
  }
3034
3038
  )
3035
3039
  ] }),
3036
3040
  /* @__PURE__ */ m(
3037
3041
  "div",
3038
3042
  {
3039
- className: u.content,
3040
- style: { transition: r.duration + "s" },
3043
+ className: d.content,
3044
+ style: { transition: o.duration + "s" },
3041
3045
  children: n
3042
3046
  }
3043
3047
  )
3044
3048
  ]
3045
3049
  }
3046
3050
  ),
3047
- (l == null && e == "standard" ? !0 : l) && /* @__PURE__ */ m(rn, { className: u.divider, orientation: "vertical" })
3051
+ (c == null && e == "standard" ? !0 : c) && /* @__PURE__ */ m(rn, { className: d.divider, orientation: "vertical" })
3048
3052
  ]
3049
3053
  }
3050
3054
  ) })
@@ -3055,41 +3059,41 @@ const zn = ({
3055
3059
  className: t,
3056
3060
  duration: n,
3057
3061
  closeIcon: a = ge,
3058
- onClose: o,
3059
- ...c
3062
+ onClose: r,
3063
+ ...s
3060
3064
  }) => {
3061
- const [l, s] = $(!0), f = Dt({
3065
+ const [c, l] = R(!0), i = Dt({
3062
3066
  className: t,
3063
3067
  closeIcon: a,
3064
3068
  duration: n,
3065
- isVisible: l,
3066
- onClose: o,
3069
+ isVisible: c,
3070
+ onClose: r,
3067
3071
  message: e
3068
3072
  });
3069
- M(() => {
3073
+ $(() => {
3070
3074
  n && setTimeout(() => {
3071
- r();
3075
+ o();
3072
3076
  }, n);
3073
3077
  }, [n]);
3074
- const r = () => {
3075
- s(!1), o == null || o();
3078
+ const o = () => {
3079
+ l(!1), r == null || r();
3076
3080
  };
3077
- return /* @__PURE__ */ m(le, { children: l && /* @__PURE__ */ m(
3081
+ return /* @__PURE__ */ m(se, { children: c && /* @__PURE__ */ m(
3078
3082
  q.div,
3079
3083
  {
3080
3084
  initial: { height: 0 },
3081
3085
  animate: { height: "auto" },
3082
3086
  exit: { height: 0 },
3083
3087
  transition: { duration: 0.1 },
3084
- className: f.snackbar,
3085
- ...c,
3086
- children: /* @__PURE__ */ X("div", { className: f.container, children: [
3087
- /* @__PURE__ */ m("p", { className: f.supportingText, children: e }),
3088
+ className: i.snackbar,
3089
+ ...s,
3090
+ children: /* @__PURE__ */ X("div", { className: i.container, children: [
3091
+ /* @__PURE__ */ m("p", { className: i.supportingText, children: e }),
3088
3092
  /* @__PURE__ */ m(
3089
3093
  be,
3090
3094
  {
3091
- onClick: () => r(),
3092
- className: f.icon,
3095
+ onClick: () => o(),
3096
+ className: i.icon,
3093
3097
  icon: a,
3094
3098
  label: "close the snackbar"
3095
3099
  }
@@ -3102,39 +3106,39 @@ const zn = ({
3102
3106
  className: t,
3103
3107
  activeIcon: n,
3104
3108
  disabled: a = !1,
3105
- inactiveIcon: o,
3106
- onChange: c,
3107
- onClick: l,
3108
- onKeyDown: s,
3109
- ref: f,
3110
- ...r
3109
+ inactiveIcon: r,
3110
+ onChange: s,
3111
+ onClick: c,
3112
+ onKeyDown: l,
3113
+ ref: i,
3114
+ ...o
3111
3115
  }) => {
3112
- const [h, w] = $(e), i = (b) => {
3113
- a || (d(), l && l(b));
3114
- }, u = (b) => {
3115
- a || ((b.key === " " || b.key === "Enter") && (b.preventDefault(), d()), s && s(b));
3116
- }, d = () => {
3117
- w(!h), c == null || c(!h);
3116
+ const [h, w] = R(e), u = (b) => {
3117
+ a || (f(), c && c(b));
3118
+ }, d = (b) => {
3119
+ a || ((b.key === " " || b.key === "Enter") && (b.preventDefault(), f()), l && l(b));
3120
+ }, f = () => {
3121
+ w(!h), s == null || s(!h);
3118
3122
  }, y = At({
3119
3123
  className: t,
3120
3124
  isSelected: h,
3121
3125
  activeIcon: n,
3122
- inactiveIcon: o,
3126
+ inactiveIcon: r,
3123
3127
  disabled: a,
3124
3128
  selected: h,
3125
- onChange: c
3126
- }), v = D(null), I = f || v;
3129
+ onChange: s
3130
+ }), v = D(null), I = i || v;
3127
3131
  return /* @__PURE__ */ X(
3128
3132
  q.div,
3129
3133
  {
3130
3134
  role: "switch",
3131
3135
  "aria-checked": h,
3132
3136
  tabIndex: a ? -1 : 0,
3133
- onKeyDown: u,
3134
- onClick: i,
3137
+ onKeyDown: d,
3138
+ onClick: u,
3135
3139
  ref: I,
3136
3140
  className: y.switch,
3137
- ...r,
3141
+ ...o,
3138
3142
  children: [
3139
3143
  /* @__PURE__ */ m("input", { type: "hidden", value: h ? "1" : "0" }),
3140
3144
  /* @__PURE__ */ X(
@@ -3149,11 +3153,11 @@ const zn = ({
3149
3153
  },
3150
3154
  className: y.handleContainer,
3151
3155
  children: [
3152
- /* @__PURE__ */ m("div", { className: y.handle, children: (h ? n : o) && /* @__PURE__ */ m(
3156
+ /* @__PURE__ */ m("div", { className: y.handle, children: (h ? n : r) && /* @__PURE__ */ m(
3153
3157
  ie,
3154
3158
  {
3155
3159
  className: y.icon,
3156
- icon: h ? n : o
3160
+ icon: h ? n : r
3157
3161
  }
3158
3162
  ) }),
3159
3163
  /* @__PURE__ */ m("div", { className: y.handleStateLayer })
@@ -3168,57 +3172,57 @@ const zn = ({
3168
3172
  onClick: t,
3169
3173
  label: n,
3170
3174
  variant: a = "primary",
3171
- href: o,
3172
- icon: c,
3173
- selectedTab: l,
3174
- setSelectedTab: s,
3175
- tabsId: f,
3176
- index: r,
3175
+ href: r,
3176
+ icon: s,
3177
+ selectedTab: c,
3178
+ setSelectedTab: l,
3179
+ tabsId: i,
3180
+ index: o,
3177
3181
  onTabSelected: h,
3178
3182
  scrollable: w = !1,
3179
- selected: i = !1,
3180
- ref: u,
3181
- ...d
3183
+ selected: u = !1,
3184
+ ref: d,
3185
+ ...f
3182
3186
  }) => {
3183
- const y = D(null), v = u || y, [I, b] = $(i);
3184
- M(() => {
3185
- i && l == null ? b(!0) : b(l == r && r != null);
3186
- }, [l]), M(() => {
3187
- l == r && h && h({
3187
+ const y = D(null), v = d || y, [I, b] = R(u);
3188
+ $(() => {
3189
+ u && c == null ? b(!0) : b(c == o && o != null);
3190
+ }, [c]), $(() => {
3191
+ c == o && h && h({
3188
3192
  ref: v,
3189
- index: r || 0,
3193
+ index: o || 0,
3190
3194
  label: n,
3191
- icon: c
3195
+ icon: s
3192
3196
  });
3193
- }, [l]);
3194
- const B = o ? "a" : "button", N = (g) => {
3195
- s && s(r ?? null), t && t(g);
3197
+ }, [c]);
3198
+ const E = r ? "a" : "button", N = (g) => {
3199
+ l && l(o ?? null), t && t(g);
3196
3200
  }, A = Pt({
3197
3201
  className: e,
3198
3202
  onTabSelected: h,
3199
3203
  scrollable: w,
3200
- selectedTab: l,
3201
- index: r,
3202
- tabsId: f,
3204
+ selectedTab: c,
3205
+ index: o,
3206
+ tabsId: i,
3203
3207
  selected: I,
3204
3208
  variant: a,
3205
- icon: c,
3209
+ icon: s,
3206
3210
  label: n,
3207
3211
  isSelected: I,
3208
- setSelectedTab: s,
3209
- href: o
3212
+ setSelectedTab: l,
3213
+ href: r
3210
3214
  });
3211
3215
  return /* @__PURE__ */ X(
3212
- B,
3216
+ E,
3213
3217
  {
3214
- ...d,
3218
+ ...f,
3215
3219
  role: "tab",
3216
3220
  "aria-selected": I,
3217
3221
  ref: v,
3218
- href: o,
3222
+ href: r,
3219
3223
  className: A.tab,
3220
3224
  onClick: N,
3221
- ...d,
3225
+ ...f,
3222
3226
  children: [
3223
3227
  /* @__PURE__ */ m(
3224
3228
  ye,
@@ -3230,12 +3234,12 @@ const zn = ({
3230
3234
  }
3231
3235
  ),
3232
3236
  /* @__PURE__ */ X("span", { className: A.content, children: [
3233
- c && /* @__PURE__ */ m(ie, { icon: c, className: A.icon }),
3237
+ s && /* @__PURE__ */ m(ie, { icon: s, className: A.icon }),
3234
3238
  /* @__PURE__ */ m("span", { className: A.label, children: n }),
3235
3239
  I && /* @__PURE__ */ m(
3236
3240
  q.span,
3237
3241
  {
3238
- layoutId: `underline-${f}`,
3242
+ layoutId: `underline-${i}`,
3239
3243
  className: A.underline,
3240
3244
  transition: { duration: 0.3 }
3241
3245
  }
@@ -3249,121 +3253,121 @@ const zn = ({
3249
3253
  onTabSelected: t,
3250
3254
  children: n,
3251
3255
  className: a,
3252
- selectedTab: o,
3253
- setSelectedTab: c,
3254
- scrollable: l = !1
3256
+ selectedTab: r,
3257
+ setSelectedTab: s,
3258
+ scrollable: c = !1
3255
3259
  }) => {
3256
- const [s, f] = $(
3260
+ const [l, i] = R(
3257
3261
  null
3258
3262
  );
3259
- let r;
3260
- o == 0 || o != null ? r = o : r = s;
3261
- const h = c || f, w = Z.Children.toArray(n).filter(
3263
+ let o;
3264
+ r == 0 || r != null ? o = r : o = l;
3265
+ const h = s || i, w = Z.Children.toArray(n).filter(
3262
3266
  (v) => Z.isValidElement(v) && v.type === fn
3263
- ), i = Z.useRef(null), u = (v) => {
3264
- if (t == null || t(v), l) {
3265
- const I = i.current, b = v.ref.current;
3267
+ ), u = Z.useRef(null), d = (v) => {
3268
+ if (t == null || t(v), c) {
3269
+ const I = u.current, b = v.ref.current;
3266
3270
  if (I && b) {
3267
- const B = b.offsetLeft + b.offsetWidth / 2 - I.offsetWidth / 2;
3268
- I.scrollTo({ left: B, behavior: "smooth" });
3271
+ const E = b.offsetLeft + b.offsetWidth / 2 - I.offsetWidth / 2;
3272
+ I.scrollTo({ left: E, behavior: "smooth" });
3269
3273
  }
3270
3274
  }
3271
- }, d = Me(() => Be(), []), y = Ft({
3275
+ }, f = Me(() => Be(), []), y = Ft({
3272
3276
  children: n,
3273
3277
  onTabSelected: t,
3274
- scrollable: l,
3275
- selectedTab: r,
3278
+ scrollable: c,
3279
+ selectedTab: o,
3276
3280
  setSelectedTab: h,
3277
3281
  className: a,
3278
3282
  variant: e
3279
3283
  });
3280
- return /* @__PURE__ */ m("div", { ref: i, role: "tablist", className: y.tabs, children: w.map((v, I) => Z.cloneElement(v, {
3284
+ return /* @__PURE__ */ m("div", { ref: u, role: "tablist", className: y.tabs, children: w.map((v, I) => Z.cloneElement(v, {
3281
3285
  key: I,
3282
3286
  index: I,
3283
3287
  variant: e,
3284
- selectedTab: r,
3288
+ selectedTab: o,
3285
3289
  setSelectedTab: h,
3286
- tabsId: d,
3287
- onTabSelected: u,
3288
- scrollable: l
3290
+ tabsId: f,
3291
+ onTabSelected: d,
3292
+ scrollable: c
3289
3293
  })) });
3290
3294
  }, ar = ({
3291
3295
  variant: e = "filled",
3292
3296
  disabled: t = !1,
3293
3297
  errorText: n,
3294
3298
  placeholder: a,
3295
- suffix: o,
3296
- name: c,
3297
- label: l,
3298
- className: s,
3299
- supportingText: f,
3300
- trailingIcon: r,
3299
+ suffix: r,
3300
+ name: s,
3301
+ label: c,
3302
+ className: l,
3303
+ supportingText: i,
3304
+ trailingIcon: o,
3301
3305
  leadingIcon: h,
3302
3306
  type: w = "text",
3303
- textLine: i = "singleLine",
3304
- autoComplete: u = "on",
3305
- onChange: d,
3307
+ textLine: u = "singleLine",
3308
+ autoComplete: d = "on",
3309
+ onChange: f,
3306
3310
  value: y,
3307
3311
  showSupportingText: v = !1,
3308
3312
  ...I
3309
3313
  }) => {
3310
- const [b, B] = $(y ?? ""), [N, A] = $(!1), [g, V] = $(!1), [F, C] = $(
3314
+ const [b, E] = R(y ?? ""), [N, A] = R(!1), [g, H] = R(!1), [F, M] = R(
3311
3315
  v
3312
3316
  );
3313
- M(() => {
3314
- B(y ?? "");
3315
- }, [y]), M(() => {
3316
- n != null && n.length ? V(!0) : V(!1);
3317
- }, [n]), M(() => {
3318
- v ? C(v) : f != null && f.length ? C(!0) : C(!1);
3319
- }, [F, f]), M(() => {
3320
- N && V(!1);
3317
+ $(() => {
3318
+ E(y ?? "");
3319
+ }, [y]), $(() => {
3320
+ n != null && n.length ? H(!0) : H(!1);
3321
+ }, [n]), $(() => {
3322
+ v ? M(v) : i != null && i.length ? M(!0) : M(!1);
3323
+ }, [F, i]), $(() => {
3324
+ N && H(!1);
3321
3325
  }, [N]);
3322
- const x = Z.useRef(null), E = () => {
3326
+ const x = Z.useRef(null), S = () => {
3323
3327
  x.current && !N && x.current.focus();
3324
- }, H = () => {
3328
+ }, V = () => {
3325
3329
  A(!0);
3326
3330
  }, G = (U) => {
3327
3331
  const K = U.target.value;
3328
- B(K), V(!1), typeof d == "function" && d(K);
3329
- }, te = () => {
3332
+ E(K), H(!1), typeof f == "function" && f(K);
3333
+ }, T = () => {
3330
3334
  A(!1);
3331
3335
  }, _ = Ot({
3332
3336
  showSupportingText: F,
3333
3337
  isFocused: N,
3334
3338
  showErrorIcon: g,
3335
3339
  disabled: t,
3336
- name: c,
3337
- label: l,
3338
- autoComplete: u,
3339
- className: s,
3340
- onChange: d,
3340
+ name: s,
3341
+ label: c,
3342
+ autoComplete: d,
3343
+ className: l,
3344
+ onChange: f,
3341
3345
  placeholder: a,
3342
- supportingText: f,
3346
+ supportingText: i,
3343
3347
  type: w,
3344
3348
  leadingIcon: h,
3345
- trailingIcon: r,
3349
+ trailingIcon: o,
3346
3350
  variant: e,
3347
3351
  errorText: n,
3348
3352
  value: b,
3349
- suffix: o,
3350
- textLine: i
3351
- }), [ne] = $(Be());
3352
- let R, S;
3353
- switch (i) {
3353
+ suffix: r,
3354
+ textLine: u
3355
+ }), [ne] = R(Be());
3356
+ let B, k;
3357
+ switch (u) {
3354
3358
  case "multiLine":
3355
- S = bt, R = {};
3359
+ k = bt, B = {};
3356
3360
  break;
3357
3361
  case "textAreas":
3358
- S = "textarea", R = {};
3362
+ k = "textarea", B = {};
3359
3363
  break;
3360
3364
  case "singleLine":
3361
3365
  default:
3362
- S = "input", R = { type: w };
3366
+ k = "input", B = { type: w };
3363
3367
  break;
3364
3368
  }
3365
3369
  return /* @__PURE__ */ X("div", { className: _.textField, ...I, children: [
3366
- /* @__PURE__ */ X("fieldset", { onClick: E, className: _.content, children: [
3370
+ /* @__PURE__ */ X("fieldset", { onClick: S, className: _.content, children: [
3367
3371
  /* @__PURE__ */ m("div", { className: _.stateLayer }),
3368
3372
  h && /* @__PURE__ */ m("div", { className: _.leadingIcon, children: Z.isValidElement(h) ? h : /* @__PURE__ */ m(ie, { className: "w-5 h-5", icon: h }) }),
3369
3373
  !(!N && !b.length || e == "filled") && /* @__PURE__ */ m(
@@ -3383,7 +3387,7 @@ const zn = ({
3383
3387
  className: _.label,
3384
3388
  transition: { duration: 0.3 },
3385
3389
  layoutId: ne,
3386
- children: l
3390
+ children: c
3387
3391
  }
3388
3392
  ) })
3389
3393
  }
@@ -3392,7 +3396,7 @@ const zn = ({
3392
3396
  (!N && !b.length || e == "filled") && /* @__PURE__ */ m(
3393
3397
  q.label,
3394
3398
  {
3395
- htmlFor: c,
3399
+ htmlFor: s,
3396
3400
  className: p(
3397
3401
  "absolute left-4 transition-all duration-300",
3398
3402
  {
@@ -3407,50 +3411,50 @@ const zn = ({
3407
3411
  className: _.label,
3408
3412
  transition: { duration: 0.3 },
3409
3413
  layoutId: e == "outlined" ? ne : void 0,
3410
- children: l
3414
+ children: c
3411
3415
  }
3412
3416
  )
3413
3417
  }
3414
3418
  ),
3415
3419
  /* @__PURE__ */ m(
3416
- S,
3420
+ k,
3417
3421
  {
3418
3422
  ref: x,
3419
3423
  value: b,
3420
3424
  onChange: G,
3421
3425
  className: _.input,
3422
- id: c,
3423
- name: c,
3426
+ id: s,
3427
+ name: s,
3424
3428
  placeholder: N ? a ?? void 0 : "",
3425
- onFocus: H,
3426
- onBlur: te,
3429
+ onFocus: V,
3430
+ onBlur: T,
3427
3431
  disabled: t,
3428
- autoComplete: u,
3432
+ autoComplete: d,
3429
3433
  "aria-invalid": !!(n != null && n.length),
3430
- "aria-label": l,
3431
- ...R
3434
+ "aria-label": c,
3435
+ ...B
3432
3436
  }
3433
3437
  )
3434
3438
  ] }),
3435
3439
  /* @__PURE__ */ m("div", { className: _.activeIndicator }),
3436
3440
  !g && /* @__PURE__ */ X(me, { children: [
3437
- r && /* @__PURE__ */ m(
3441
+ o && /* @__PURE__ */ m(
3438
3442
  "div",
3439
3443
  {
3440
3444
  onClick: (U) => {
3441
3445
  U.stopPropagation();
3442
3446
  },
3443
3447
  className: _.trailingIcon,
3444
- children: Z.isValidElement(r) ? r : /* @__PURE__ */ m(ie, { className: "h-5", icon: r })
3448
+ children: Z.isValidElement(o) ? o : /* @__PURE__ */ m(ie, { className: "h-5", icon: o })
3445
3449
  }
3446
3450
  ),
3447
- !r && o && /* @__PURE__ */ m("span", { className: _.suffix, children: o })
3451
+ !o && r && /* @__PURE__ */ m("span", { className: _.suffix, children: r })
3448
3452
  ] }),
3449
3453
  g && /* @__PURE__ */ m(
3450
3454
  "div",
3451
3455
  {
3452
3456
  className: p(_.trailingIcon, {
3453
- " absolute right-0": !r
3457
+ " absolute right-0": !o
3454
3458
  }),
3455
3459
  children: /* @__PURE__ */ m(
3456
3460
  ie,
@@ -3462,7 +3466,7 @@ const zn = ({
3462
3466
  }
3463
3467
  )
3464
3468
  ] }),
3465
- F && /* @__PURE__ */ m("p", { className: _.supportingText, children: n != null && n.length ? n : f != null && f.length ? f : " " })
3469
+ F && /* @__PURE__ */ m("p", { className: _.supportingText, children: n != null && n.length ? n : i != null && i.length ? i : " " })
3466
3470
  ] });
3467
3471
  }, mn = ({ isSelected: e, icon: t, label: n, variant: a }) => ({
3468
3472
  navigationRailItem: p(
@@ -3504,83 +3508,83 @@ const zn = ({
3504
3508
  onClick: t,
3505
3509
  label: n,
3506
3510
  variant: a = "vertical",
3507
- href: o,
3508
- icon: c,
3509
- selectedItem: l,
3510
- setSelectedItem: s,
3511
- index: f,
3512
- onItemSelected: r,
3511
+ href: r,
3512
+ icon: s,
3513
+ selectedItem: c,
3514
+ setSelectedItem: l,
3515
+ index: i,
3516
+ onItemSelected: o,
3513
3517
  selected: h = !1,
3514
3518
  ref: w,
3515
- transition: i,
3516
- isExtended: u,
3517
- iconSelected: d,
3519
+ transition: u,
3520
+ isExtended: d,
3521
+ iconSelected: f,
3518
3522
  style: y,
3519
3523
  extendedOnly: v,
3520
3524
  children: I,
3521
3525
  ...b
3522
3526
  }) => {
3523
3527
  I && (n = I);
3524
- const B = D(null), N = w || B, [A, g] = $(h);
3525
- M(() => {
3526
- h && l == null ? g(!0) : g(l == f && f != null);
3527
- }, [l]), M(() => {
3528
- l == f && r && r({
3528
+ const E = D(null), N = w || E, [A, g] = R(h);
3529
+ $(() => {
3530
+ h && c == null ? g(!0) : g(c == i && i != null);
3531
+ }, [c]), $(() => {
3532
+ c == i && o && o({
3529
3533
  ref: N,
3530
- index: f || 0,
3534
+ index: i || 0,
3531
3535
  label: n,
3532
- icon: c
3536
+ icon: s
3533
3537
  });
3534
- }, [l]);
3535
- const V = o ? "a" : "button", F = (x) => {
3536
- s && s(f ?? null), t && t(x);
3537
- }, C = hn({
3538
- isExtended: u,
3538
+ }, [c]);
3539
+ const H = r ? "a" : "button", F = (x) => {
3540
+ l && l(i ?? null), t && t(x);
3541
+ }, M = hn({
3542
+ isExtended: d,
3539
3543
  extendedOnly: v,
3540
3544
  className: e,
3541
- onItemSelected: r,
3542
- selectedItem: l,
3543
- index: f,
3544
- transition: i,
3545
+ onItemSelected: o,
3546
+ selectedItem: c,
3547
+ index: i,
3548
+ transition: u,
3545
3549
  selected: A,
3546
3550
  variant: a,
3547
- icon: c,
3551
+ icon: s,
3548
3552
  label: n,
3549
3553
  isSelected: A,
3550
- setSelectedItem: s,
3551
- href: o,
3554
+ setSelectedItem: l,
3555
+ href: r,
3552
3556
  children: n,
3553
- iconSelected: d
3557
+ iconSelected: f
3554
3558
  });
3555
- return i = { duration: 0.3, ...i }, v && !u ? null : (
3559
+ return u = { duration: 0.3, ...u }, v && !d ? null : (
3556
3560
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
3557
3561
  // @ts-expect-error
3558
3562
  /* @__PURE__ */ X(
3559
- V,
3563
+ H,
3560
3564
  {
3561
3565
  ...b,
3562
3566
  role: "tab",
3563
3567
  "aria-selected": A,
3564
3568
  ref: N,
3565
- href: o,
3566
- className: C.navigationRailItem,
3569
+ href: r,
3570
+ className: M.navigationRailItem,
3567
3571
  onClick: F,
3568
- style: { transition: i.duration + "s", ...y },
3572
+ style: { transition: u.duration + "s", ...y },
3569
3573
  children: [
3570
3574
  /* @__PURE__ */ X(
3571
3575
  q.div,
3572
3576
  {
3573
3577
  style: {
3574
- transition: a == "horizontal" ? i.duration + `s, gap ${i.duration / 2}s ${i.duration - i.duration / 2}s` : i.duration + `s, gap ${i.duration / 3}s ${i.duration - i.duration / 3}s`
3578
+ transition: a == "horizontal" ? u.duration + `s, gap ${u.duration / 2}s ${u.duration - u.duration / 2}s` : u.duration + `s, gap ${u.duration / 3}s ${u.duration - u.duration / 3}s`
3575
3579
  },
3576
- transition: i,
3577
- className: C.container,
3580
+ transition: u,
3581
+ className: M.container,
3578
3582
  children: [
3579
3583
  /* @__PURE__ */ m(
3580
3584
  ye,
3581
3585
  {
3582
- style: { transition: i.duration + "s" },
3583
- className: C.stateLayer,
3586
+ style: { transition: u.duration + "s" },
3587
+ className: M.stateLayer,
3584
3588
  colorName: p({
3585
3589
  "on-surface": !A,
3586
3590
  "on-secondary-container": A
@@ -3588,28 +3592,28 @@ const zn = ({
3588
3592
  stateClassName: "state-ripple-group-[navigation-rail-item]"
3589
3593
  }
3590
3594
  ),
3591
- c && /* @__PURE__ */ m(
3595
+ s && /* @__PURE__ */ m(
3592
3596
  ie,
3593
3597
  {
3594
- icon: A ? d : c,
3595
- className: C.icon
3598
+ icon: A ? f : s,
3599
+ className: M.icon
3596
3600
  }
3597
3601
  ),
3598
- /* @__PURE__ */ m(le, { children: a == "horizontal" && (() => {
3602
+ /* @__PURE__ */ m(se, { children: a == "horizontal" && (() => {
3599
3603
  const x = {
3600
3604
  width: 0,
3601
3605
  opacity: 0,
3602
3606
  transition: {
3603
- ...i
3607
+ ...u
3604
3608
  }
3605
- }, E = {
3609
+ }, S = {
3606
3610
  width: "auto",
3607
3611
  opacity: 1,
3608
3612
  transition: {
3609
- ...i,
3613
+ ...u,
3610
3614
  opacity: {
3611
- duration: i.duration / 2,
3612
- delay: i.duration - i.duration / 2
3615
+ duration: u.duration / 2,
3616
+ delay: u.duration - u.duration / 2
3613
3617
  }
3614
3618
  }
3615
3619
  };
@@ -3617,9 +3621,9 @@ const zn = ({
3617
3621
  q.span,
3618
3622
  {
3619
3623
  initial: x,
3620
- animate: E,
3624
+ animate: S,
3621
3625
  exit: x,
3622
- className: C.label,
3626
+ className: M.label,
3623
3627
  children: n
3624
3628
  }
3625
3629
  );
@@ -3627,35 +3631,35 @@ const zn = ({
3627
3631
  ]
3628
3632
  }
3629
3633
  ),
3630
- /* @__PURE__ */ m(le, { children: a == "vertical" && (() => {
3634
+ /* @__PURE__ */ m(se, { children: a == "vertical" && (() => {
3631
3635
  const x = {
3632
3636
  height: 0,
3633
3637
  opacity: 0,
3634
3638
  transition: {
3635
- ...i,
3639
+ ...u,
3636
3640
  opacity: {
3637
3641
  duration: 0
3638
3642
  }
3639
3643
  }
3640
- }, E = {
3644
+ }, S = {
3641
3645
  height: "auto",
3642
3646
  opacity: 1,
3643
3647
  transition: {
3644
- ...i,
3648
+ ...u,
3645
3649
  opacity: {
3646
- duration: i.duration / 3,
3647
- delay: i.duration - i.duration / 3
3650
+ duration: u.duration / 3,
3651
+ delay: u.duration - u.duration / 3
3648
3652
  }
3649
3653
  }
3650
3654
  };
3651
3655
  return /* @__PURE__ */ m(
3652
3656
  q.span,
3653
3657
  {
3654
- initial: E,
3655
- animate: E,
3658
+ initial: S,
3659
+ animate: S,
3656
3660
  exit: x,
3657
- className: C.label,
3658
- transition: i,
3661
+ className: M.label,
3662
+ transition: u,
3659
3663
  children: n
3660
3664
  }
3661
3665
  );
@@ -3683,15 +3687,15 @@ const zn = ({
3683
3687
  }), vn = J(
3684
3688
  "navigationRail",
3685
3689
  wn
3686
- ), sr = ({
3690
+ ), lr = ({
3687
3691
  variant: e = "standard",
3688
3692
  onItemSelected: t,
3689
3693
  children: n,
3690
3694
  className: a,
3691
- selectedItem: o,
3692
- extended: c,
3693
- alignment: l = "top",
3694
- menu: s = {
3695
+ selectedItem: r,
3696
+ extended: s,
3697
+ alignment: c = "top",
3698
+ menu: l = {
3695
3699
  closed: {
3696
3700
  icon: dn,
3697
3701
  label: "Open menu"
@@ -3701,90 +3705,90 @@ const zn = ({
3701
3705
  label: "Close menu"
3702
3706
  }
3703
3707
  },
3704
- style: f,
3705
- onExtendedChange: r,
3708
+ style: i,
3709
+ onExtendedChange: o,
3706
3710
  transition: h,
3707
3711
  setSelectedItem: w
3708
3712
  }) => {
3709
- const [i, u] = $(null), [d, y] = $(c);
3713
+ const [u, d] = R(null), [f, y] = R(s);
3710
3714
  let v;
3711
- o == 0 || o != null ? v = o : v = i;
3712
- const I = w || u, b = D(null), B = (C) => {
3713
- t == null || t(C);
3715
+ r == 0 || r != null ? v = r : v = u;
3716
+ const I = w || d, b = D(null), E = (M) => {
3717
+ t == null || t(M);
3714
3718
  };
3715
- function N(C) {
3719
+ function N(M) {
3716
3720
  const x = [];
3717
- return dt.forEach(C, (E) => {
3718
- pe(E) && E.type === ft ? x.push(...N(E.props.children)) : x.push(E);
3721
+ return dt.forEach(M, (S) => {
3722
+ pe(S) && S.type === ft ? x.push(...N(S.props.children)) : x.push(S);
3719
3723
  }), x;
3720
3724
  }
3721
3725
  const A = N(n), g = A.filter(
3722
- (C) => pe(C) && C.type === Ce
3723
- ), V = vn({
3726
+ (M) => pe(M) && M.type === Ce
3727
+ ), H = vn({
3724
3728
  children: n,
3725
3729
  onItemSelected: t,
3726
3730
  selectedItem: v,
3727
3731
  setSelectedItem: I,
3728
3732
  className: a,
3729
3733
  variant: e,
3730
- extended: d,
3731
- isExtended: d,
3732
- alignment: l,
3733
- menu: s,
3734
+ extended: f,
3735
+ isExtended: f,
3736
+ alignment: c,
3737
+ menu: l,
3734
3738
  transition: h,
3735
- onExtendedChange: r
3739
+ onExtendedChange: o
3736
3740
  });
3737
3741
  h = { duration: 0.3, ...h };
3738
3742
  const F = D(!1);
3739
- return F.current = !1, M(() => {
3740
- r == null || r(d ?? !1);
3741
- }, [d]), /* @__PURE__ */ X(
3743
+ return F.current = !1, $(() => {
3744
+ o == null || o(f ?? !1);
3745
+ }, [f]), /* @__PURE__ */ X(
3742
3746
  "div",
3743
3747
  {
3744
- style: { transition: h.duration + "s", ...f },
3748
+ style: { transition: h.duration + "s", ...i },
3745
3749
  ref: b,
3746
- className: V.navigationRail,
3750
+ className: H.navigationRail,
3747
3751
  children: [
3748
- /* @__PURE__ */ X("div", { className: V.header, children: [
3752
+ /* @__PURE__ */ X("div", { className: H.header, children: [
3749
3753
  /* @__PURE__ */ m(
3750
3754
  be,
3751
3755
  {
3752
- onClick: () => y(!d),
3753
- label: d ? s == null ? void 0 : s.opened.label : s == null ? void 0 : s.closed.label,
3754
- className: V.menuIcon,
3755
- icon: d ? s.opened.icon : s == null ? void 0 : s.closed.icon
3756
+ onClick: () => y(!f),
3757
+ label: f ? l == null ? void 0 : l.opened.label : l == null ? void 0 : l.closed.label,
3758
+ className: H.menuIcon,
3759
+ icon: f ? l.opened.icon : l == null ? void 0 : l.closed.icon
3756
3760
  }
3757
3761
  ),
3758
3762
  g.length > 0 && xe(g[0], {
3759
3763
  transition: h,
3760
- isExtended: d,
3764
+ isExtended: f,
3761
3765
  className: "!shadow-none mx-5 " + g[0].props.className
3762
3766
  })
3763
3767
  ] }),
3764
- /* @__PURE__ */ m("div", { className: V.segments, children: (() => {
3765
- let C = 0;
3768
+ /* @__PURE__ */ m("div", { className: H.segments, children: (() => {
3769
+ let M = 0;
3766
3770
  return A.map((x) => pe(x) && x.type === yn ? xe(
3767
3771
  x,
3768
3772
  {
3769
- key: C,
3770
- index: C++,
3773
+ key: M,
3774
+ index: M++,
3771
3775
  // Utilise et incrémente le compteur dédié
3772
- variant: d ? "horizontal" : "vertical",
3776
+ variant: f ? "horizontal" : "vertical",
3773
3777
  selectedItem: v,
3774
3778
  setSelectedItem: I,
3775
- onItemSelected: B,
3779
+ onItemSelected: E,
3776
3780
  transition: h,
3777
3781
  extendedOnly: F.current,
3778
- isExtended: d
3782
+ isExtended: f
3779
3783
  }
3780
- ) : pe(x) && x.type === Ce ? null : pe(x) && x.type === pn ? (F.current = !0, d ? xe(x, {}) : null) : x);
3784
+ ) : pe(x) && x.type === Ce ? null : pe(x) && x.type === pn ? (F.current = !0, f ? xe(x, {}) : null) : x);
3781
3785
  })() }),
3782
3786
  /* @__PURE__ */ m("div", { className: "flex-1 max-h-[160px]" })
3783
3787
  ]
3784
3788
  }
3785
3789
  );
3786
3790
  };
3787
- function lr(e) {
3791
+ function sr(e) {
3788
3792
  return wt({
3789
3793
  variant: xt.Udixio,
3790
3794
  ...e,
@@ -3803,7 +3807,7 @@ export {
3803
3807
  zn as FabMenu,
3804
3808
  ie as Icon,
3805
3809
  be as IconButton,
3806
- sr as NavigationRail,
3810
+ lr as NavigationRail,
3807
3811
  yn as NavigationRailItem,
3808
3812
  pn as NavigationRailSection,
3809
3813
  Ht as ProgressIndicator,
@@ -3831,7 +3835,7 @@ export {
3831
3835
  J as createUseClassNames,
3832
3836
  Ut as customScrollStyle,
3833
3837
  Q as defaultClassNames,
3834
- lr as defineConfig,
3838
+ sr as defineConfig,
3835
3839
  Dn as dividerStyle,
3836
3840
  Pn as fabMenuStyle,
3837
3841
  An as fabStyle,