hazo_ui 3.0.1 → 3.1.1

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.cjs CHANGED
@@ -1,12 +1,14 @@
1
1
  "use client";
2
2
  'use strict';
3
3
 
4
- var React25 = require('react');
5
- var reactSlot = require('@radix-ui/react-slot');
6
- var classVarianceAuthority = require('class-variance-authority');
7
4
  var clsx = require('clsx');
8
5
  var tailwindMerge = require('tailwind-merge');
6
+ var React26 = require('react');
7
+ var hazoCore = require('hazo_core');
8
+ var client = require('hazo_core/client');
9
9
  var jsxRuntime = require('react/jsx-runtime');
10
+ var reactSlot = require('@radix-ui/react-slot');
11
+ var classVarianceAuthority = require('class-variance-authority');
10
12
  var DialogPrimitive = require('@radix-ui/react-dialog');
11
13
  var lucideReact = require('lucide-react');
12
14
  var PopoverPrimitive = require('@radix-ui/react-popover');
@@ -90,7 +92,8 @@ function _interopNamespace(e) {
90
92
  return Object.freeze(n);
91
93
  }
92
94
 
93
- var React25__namespace = /*#__PURE__*/_interopNamespace(React25);
95
+ var React26__namespace = /*#__PURE__*/_interopNamespace(React26);
96
+ var hazoCore__namespace = /*#__PURE__*/_interopNamespace(hazoCore);
94
97
  var DialogPrimitive__namespace = /*#__PURE__*/_interopNamespace(DialogPrimitive);
95
98
  var PopoverPrimitive__namespace = /*#__PURE__*/_interopNamespace(PopoverPrimitive);
96
99
  var SelectPrimitive__namespace = /*#__PURE__*/_interopNamespace(SelectPrimitive);
@@ -195,6 +198,56 @@ var require_objectWithoutPropertiesLoose = __commonJS({
195
198
  module.exports = _objectWithoutPropertiesLoose10, module.exports.__esModule = true, module.exports["default"] = module.exports;
196
199
  }
197
200
  });
201
+ function cn(...inputs) {
202
+ return tailwindMerge.twMerge(clsx.clsx(inputs));
203
+ }
204
+ function HazoContextProvider({
205
+ correlationId,
206
+ userId,
207
+ children
208
+ }) {
209
+ const id = React26__namespace.useMemo(
210
+ () => correlationId ?? hazoCore.generateRequestId(),
211
+ [correlationId]
212
+ );
213
+ React26__namespace.useEffect(() => {
214
+ client.withContext({ correlationId: id, userId }, () => {
215
+ client.setBrowserCorrelationId(id);
216
+ });
217
+ return () => {
218
+ client.setBrowserCorrelationId(void 0);
219
+ };
220
+ }, [id, userId]);
221
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
222
+ }
223
+ var console_logger = {
224
+ info: (m, d) => d ? console.log(`[hazo_ui] ${m}`, d) : console.log(`[hazo_ui] ${m}`),
225
+ debug: (m, d) => d ? console.debug(`[hazo_ui] ${m}`, d) : console.debug(`[hazo_ui] ${m}`),
226
+ warn: (m, d) => d ? console.warn(`[hazo_ui] ${m}`, d) : console.warn(`[hazo_ui] ${m}`),
227
+ error: (m, d) => d ? console.error(`[hazo_ui] ${m}`, d) : console.error(`[hazo_ui] ${m}`)
228
+ };
229
+ function build_default_logger() {
230
+ const factory = hazoCore__namespace.createLogger;
231
+ if (typeof factory !== "function") return console_logger;
232
+ try {
233
+ return factory("hazo_ui");
234
+ } catch {
235
+ return console_logger;
236
+ }
237
+ }
238
+ var current_logger = null;
239
+ function set_logger(logger) {
240
+ current_logger = logger ?? null;
241
+ }
242
+ function get_logger() {
243
+ if (!current_logger) {
244
+ current_logger = build_default_logger();
245
+ }
246
+ return current_logger;
247
+ }
248
+ function generateUUID() {
249
+ return hazoCore.generateRequestId().slice(4);
250
+ }
198
251
 
199
252
  // src/lib/hazo_ui_config.ts
200
253
  var default_config = {
@@ -226,9 +279,6 @@ function set_hazo_ui_config(config) {
226
279
  function reset_hazo_ui_config() {
227
280
  global_config = { ...default_config };
228
281
  }
229
- function cn(...inputs) {
230
- return tailwindMerge.twMerge(clsx.clsx(inputs));
231
- }
232
282
  var buttonVariants = classVarianceAuthority.cva(
233
283
  "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
234
284
  {
@@ -275,7 +325,7 @@ var variant_styles = {
275
325
  color: "hsl(var(--secondary-foreground))"
276
326
  }
277
327
  };
278
- var Button = React25__namespace.forwardRef(
328
+ var Button = React26__namespace.forwardRef(
279
329
  ({ className, variant, size, asChild = false, style, ...props }, ref) => {
280
330
  const Comp = asChild ? reactSlot.Slot : "button";
281
331
  const fallback_styles = variant_styles[variant ?? "default"] ?? {};
@@ -295,7 +345,7 @@ var Dialog = DialogPrimitive__namespace.Root;
295
345
  var DialogTrigger = DialogPrimitive__namespace.Trigger;
296
346
  var DialogPortal = DialogPrimitive__namespace.Portal;
297
347
  var DialogClose = DialogPrimitive__namespace.Close;
298
- var DialogOverlay = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
348
+ var DialogOverlay = React26__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
299
349
  DialogPrimitive__namespace.Overlay,
300
350
  {
301
351
  ref,
@@ -307,7 +357,7 @@ var DialogOverlay = React25__namespace.forwardRef(({ className, ...props }, ref)
307
357
  }
308
358
  ));
309
359
  DialogOverlay.displayName = DialogPrimitive__namespace.Overlay.displayName;
310
- var DialogContent = React25__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(DialogPortal, { children: [
360
+ var DialogContent = React26__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(DialogPortal, { children: [
311
361
  /* @__PURE__ */ jsxRuntime.jsx(DialogOverlay, {}),
312
362
  /* @__PURE__ */ jsxRuntime.jsxs(
313
363
  DialogPrimitive__namespace.Content,
@@ -357,7 +407,7 @@ var DialogFooter = ({
357
407
  }
358
408
  );
359
409
  DialogFooter.displayName = "DialogFooter";
360
- var DialogTitle = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
410
+ var DialogTitle = React26__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
361
411
  DialogPrimitive__namespace.Title,
362
412
  {
363
413
  ref,
@@ -370,7 +420,7 @@ var DialogTitle = React25__namespace.forwardRef(({ className, ...props }, ref) =
370
420
  }
371
421
  ));
372
422
  DialogTitle.displayName = DialogPrimitive__namespace.Title.displayName;
373
- var DialogDescription = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
423
+ var DialogDescription = React26__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
374
424
  DialogPrimitive__namespace.Description,
375
425
  {
376
426
  ref,
@@ -379,7 +429,7 @@ var DialogDescription = React25__namespace.forwardRef(({ className, ...props },
379
429
  }
380
430
  ));
381
431
  DialogDescription.displayName = DialogPrimitive__namespace.Description.displayName;
382
- var Command = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
432
+ var Command = React26__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
383
433
  "div",
384
434
  {
385
435
  ref,
@@ -391,7 +441,7 @@ var Command = React25__namespace.forwardRef(({ className, ...props }, ref) => /*
391
441
  }
392
442
  ));
393
443
  Command.displayName = "Command";
394
- var CommandInput = React25__namespace.forwardRef(({ className, onValueChange, onChange, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
444
+ var CommandInput = React26__namespace.forwardRef(({ className, onValueChange, onChange, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
395
445
  "input",
396
446
  {
397
447
  ref,
@@ -407,7 +457,7 @@ var CommandInput = React25__namespace.forwardRef(({ className, onValueChange, on
407
457
  }
408
458
  ));
409
459
  CommandInput.displayName = "CommandInput";
410
- var CommandList = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
460
+ var CommandList = React26__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
411
461
  "div",
412
462
  {
413
463
  ref,
@@ -416,7 +466,7 @@ var CommandList = React25__namespace.forwardRef(({ className, ...props }, ref) =
416
466
  }
417
467
  ));
418
468
  CommandList.displayName = "CommandList";
419
- var CommandEmpty = React25__namespace.forwardRef((props, ref) => /* @__PURE__ */ jsxRuntime.jsx(
469
+ var CommandEmpty = React26__namespace.forwardRef((props, ref) => /* @__PURE__ */ jsxRuntime.jsx(
420
470
  "div",
421
471
  {
422
472
  ref,
@@ -425,7 +475,7 @@ var CommandEmpty = React25__namespace.forwardRef((props, ref) => /* @__PURE__ */
425
475
  }
426
476
  ));
427
477
  CommandEmpty.displayName = "CommandEmpty";
428
- var CommandGroup = React25__namespace.forwardRef(({ className, heading, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
478
+ var CommandGroup = React26__namespace.forwardRef(({ className, heading, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
429
479
  "div",
430
480
  {
431
481
  ref,
@@ -441,7 +491,7 @@ var CommandGroup = React25__namespace.forwardRef(({ className, heading, children
441
491
  }
442
492
  ));
443
493
  CommandGroup.displayName = "CommandGroup";
444
- var CommandItem = React25__namespace.forwardRef(({ className, onSelect, value, selected, style, ...props }, ref) => {
494
+ var CommandItem = React26__namespace.forwardRef(({ className, onSelect, value, selected, style, ...props }, ref) => {
445
495
  const handleClick = () => {
446
496
  if (onSelect && value) {
447
497
  onSelect(value);
@@ -472,7 +522,7 @@ var CommandItem = React25__namespace.forwardRef(({ className, onSelect, value, s
472
522
  CommandItem.displayName = "CommandItem";
473
523
  var Popover = PopoverPrimitive__namespace.Root;
474
524
  var PopoverTrigger = PopoverPrimitive__namespace.Trigger;
475
- var PopoverContent = React25__namespace.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
525
+ var PopoverContent = React26__namespace.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
476
526
  PopoverPrimitive__namespace.Content,
477
527
  {
478
528
  ref,
@@ -486,7 +536,7 @@ var PopoverContent = React25__namespace.forwardRef(({ className, align = "center
486
536
  }
487
537
  ) }));
488
538
  PopoverContent.displayName = PopoverPrimitive__namespace.Content.displayName;
489
- var Input = React25__namespace.forwardRef(
539
+ var Input = React26__namespace.forwardRef(
490
540
  ({ className, type, ...props }, ref) => {
491
541
  return /* @__PURE__ */ jsxRuntime.jsx(
492
542
  "input",
@@ -506,7 +556,7 @@ Input.displayName = "Input";
506
556
  var Select = SelectPrimitive__namespace.Root;
507
557
  var SelectGroup = SelectPrimitive__namespace.Group;
508
558
  var SelectValue = SelectPrimitive__namespace.Value;
509
- var SelectTrigger = React25__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
559
+ var SelectTrigger = React26__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
510
560
  SelectPrimitive__namespace.Trigger,
511
561
  {
512
562
  ref,
@@ -522,7 +572,7 @@ var SelectTrigger = React25__namespace.forwardRef(({ className, children, ...pro
522
572
  }
523
573
  ));
524
574
  SelectTrigger.displayName = SelectPrimitive__namespace.Trigger.displayName;
525
- var SelectScrollUpButton = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
575
+ var SelectScrollUpButton = React26__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
526
576
  SelectPrimitive__namespace.ScrollUpButton,
527
577
  {
528
578
  ref,
@@ -535,7 +585,7 @@ var SelectScrollUpButton = React25__namespace.forwardRef(({ className, ...props
535
585
  }
536
586
  ));
537
587
  SelectScrollUpButton.displayName = SelectPrimitive__namespace.ScrollUpButton.displayName;
538
- var SelectScrollDownButton = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
588
+ var SelectScrollDownButton = React26__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
539
589
  SelectPrimitive__namespace.ScrollDownButton,
540
590
  {
541
591
  ref,
@@ -548,7 +598,7 @@ var SelectScrollDownButton = React25__namespace.forwardRef(({ className, ...prop
548
598
  }
549
599
  ));
550
600
  SelectScrollDownButton.displayName = SelectPrimitive__namespace.ScrollDownButton.displayName;
551
- var SelectContent = React25__namespace.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs(
601
+ var SelectContent = React26__namespace.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs(
552
602
  SelectPrimitive__namespace.Content,
553
603
  {
554
604
  ref,
@@ -576,7 +626,7 @@ var SelectContent = React25__namespace.forwardRef(({ className, children, positi
576
626
  }
577
627
  ) }));
578
628
  SelectContent.displayName = SelectPrimitive__namespace.Content.displayName;
579
- var SelectLabel = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
629
+ var SelectLabel = React26__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
580
630
  SelectPrimitive__namespace.Label,
581
631
  {
582
632
  ref,
@@ -585,7 +635,7 @@ var SelectLabel = React25__namespace.forwardRef(({ className, ...props }, ref) =
585
635
  }
586
636
  ));
587
637
  SelectLabel.displayName = SelectPrimitive__namespace.Label.displayName;
588
- var SelectItem = React25__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
638
+ var SelectItem = React26__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
589
639
  SelectPrimitive__namespace.Item,
590
640
  {
591
641
  ref,
@@ -601,7 +651,7 @@ var SelectItem = React25__namespace.forwardRef(({ className, children, ...props
601
651
  }
602
652
  ));
603
653
  SelectItem.displayName = SelectPrimitive__namespace.Item.displayName;
604
- var SelectSeparator = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
654
+ var SelectSeparator = React26__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
605
655
  SelectPrimitive__namespace.Separator,
606
656
  {
607
657
  ref,
@@ -613,7 +663,7 @@ SelectSeparator.displayName = SelectPrimitive__namespace.Separator.displayName;
613
663
  var TooltipProvider = TooltipPrimitive__namespace.Provider;
614
664
  var Tooltip = TooltipPrimitive__namespace.Root;
615
665
  var TooltipTrigger = TooltipPrimitive__namespace.Trigger;
616
- var TooltipContent = React25__namespace.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
666
+ var TooltipContent = React26__namespace.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
617
667
  TooltipPrimitive__namespace.Content,
618
668
  {
619
669
  ref,
@@ -681,7 +731,7 @@ function FilterFieldItem({
681
731
  onOperatorChange,
682
732
  onDelete
683
733
  }) {
684
- const [isCalendarOpen, setIsCalendarOpen] = React25.useState(false);
734
+ const [isCalendarOpen, setIsCalendarOpen] = React26.useState(false);
685
735
  const renderInput = () => {
686
736
  switch (fieldConfig.type) {
687
737
  case "text":
@@ -908,10 +958,10 @@ function HazoUiMultiFilterDialog({
908
958
  ...finalHeaderBgColor && { backgroundColor: finalHeaderBgColor },
909
959
  ...finalHeaderTextColor && { color: finalHeaderTextColor }
910
960
  };
911
- const [isOpen, setIsOpen] = React25.useState(false);
912
- const [filterFields, setFilterFields] = React25.useState(initialFilters);
913
- const [isComboboxOpen, setIsComboboxOpen] = React25.useState(false);
914
- React25.useEffect(() => {
961
+ const [isOpen, setIsOpen] = React26.useState(false);
962
+ const [filterFields, setFilterFields] = React26.useState(initialFilters);
963
+ const [isComboboxOpen, setIsComboboxOpen] = React26.useState(false);
964
+ React26.useEffect(() => {
915
965
  if (isOpen) {
916
966
  setFilterFields(initialFilters);
917
967
  }
@@ -1272,16 +1322,16 @@ function HazoUiMultiSortDialog({
1272
1322
  ...finalHeaderBgColor && { backgroundColor: finalHeaderBgColor },
1273
1323
  ...finalHeaderTextColor && { color: finalHeaderTextColor }
1274
1324
  };
1275
- const [isOpen, setIsOpen] = React25.useState(false);
1276
- const [sortFields, setSortFields] = React25.useState(initialSortFields);
1277
- const [isComboboxOpen, setIsComboboxOpen] = React25.useState(false);
1325
+ const [isOpen, setIsOpen] = React26.useState(false);
1326
+ const [sortFields, setSortFields] = React26.useState(initialSortFields);
1327
+ const [isComboboxOpen, setIsComboboxOpen] = React26.useState(false);
1278
1328
  const sensors = core$1.useSensors(
1279
1329
  core$1.useSensor(core$1.PointerSensor, { activationConstraint: { distance: 4 } }),
1280
1330
  core$1.useSensor(core$1.KeyboardSensor, {
1281
1331
  coordinateGetter: sortable.sortableKeyboardCoordinates
1282
1332
  })
1283
1333
  );
1284
- React25.useEffect(() => {
1334
+ React26.useEffect(() => {
1285
1335
  if (isOpen) {
1286
1336
  setSortFields(initialSortFields);
1287
1337
  }
@@ -1475,7 +1525,7 @@ function HazoUiMultiSortDialog({
1475
1525
  ] })
1476
1526
  ] });
1477
1527
  }
1478
- var RadioGroup = React25__namespace.forwardRef(({ className, ...props }, ref) => {
1528
+ var RadioGroup = React26__namespace.forwardRef(({ className, ...props }, ref) => {
1479
1529
  return /* @__PURE__ */ jsxRuntime.jsx(
1480
1530
  RadioGroupPrimitive__namespace.Root,
1481
1531
  {
@@ -1486,7 +1536,7 @@ var RadioGroup = React25__namespace.forwardRef(({ className, ...props }, ref) =>
1486
1536
  );
1487
1537
  });
1488
1538
  RadioGroup.displayName = RadioGroupPrimitive__namespace.Root.displayName;
1489
- var RadioGroupItem = React25__namespace.forwardRef(({ className, ...props }, ref) => {
1539
+ var RadioGroupItem = React26__namespace.forwardRef(({ className, ...props }, ref) => {
1490
1540
  return /* @__PURE__ */ jsxRuntime.jsx(
1491
1541
  RadioGroupPrimitive__namespace.Item,
1492
1542
  {
@@ -1943,7 +1993,7 @@ function filterInputValue(value, input_type, num_decimals) {
1943
1993
  }
1944
1994
  }
1945
1995
  }
1946
- var HazoUiFlexInput = React25__namespace.forwardRef(
1996
+ var HazoUiFlexInput = React26__namespace.forwardRef(
1947
1997
  ({
1948
1998
  className,
1949
1999
  input_type = "mixed",
@@ -1960,13 +2010,13 @@ var HazoUiFlexInput = React25__namespace.forwardRef(
1960
2010
  onBlur,
1961
2011
  ...props
1962
2012
  }, ref) => {
1963
- const [internalValue, setInternalValue] = React25__namespace.useState(
2013
+ const [internalValue, setInternalValue] = React26__namespace.useState(
1964
2014
  typeof controlledValue === "string" ? controlledValue : typeof controlledValue === "number" ? String(controlledValue) : ""
1965
2015
  );
1966
- const [errorMessage, setErrorMessage] = React25__namespace.useState();
2016
+ const [errorMessage, setErrorMessage] = React26__namespace.useState();
1967
2017
  const isControlled = controlledValue !== void 0;
1968
2018
  const currentValue = isControlled ? typeof controlledValue === "string" ? controlledValue : String(controlledValue || "") : internalValue;
1969
- React25__namespace.useEffect(() => {
2019
+ React26__namespace.useEffect(() => {
1970
2020
  if (isControlled) {
1971
2021
  const newValue = typeof controlledValue === "string" ? controlledValue : String(controlledValue || "");
1972
2022
  if (newValue !== internalValue) {
@@ -2046,7 +2096,7 @@ var HazoUiFlexInput = React25__namespace.forwardRef(
2046
2096
  }
2047
2097
  );
2048
2098
  HazoUiFlexInput.displayName = "HazoUiFlexInput";
2049
- var ToolbarButton = React25__namespace.forwardRef(
2099
+ var ToolbarButton = React26__namespace.forwardRef(
2050
2100
  ({ onClick, is_active = false, disabled = false, tooltip, className, children }, ref) => {
2051
2101
  const button = /* @__PURE__ */ jsxRuntime.jsx(
2052
2102
  "button",
@@ -2084,25 +2134,20 @@ var ToolbarButton = React25__namespace.forwardRef(
2084
2134
  );
2085
2135
  ToolbarButton.displayName = "ToolbarButton";
2086
2136
 
2087
- // node_modules/@uiw/react-color-sketch/esm/index.js
2137
+ // ../node_modules/@uiw/react-color-sketch/esm/index.js
2088
2138
  var import_extends10 = __toESM(require_extends());
2089
2139
  var import_objectWithoutPropertiesLoose9 = __toESM(require_objectWithoutPropertiesLoose());
2090
2140
 
2091
- // node_modules/@uiw/react-color-saturation/esm/index.js
2141
+ // ../node_modules/@uiw/react-color-saturation/esm/index.js
2092
2142
  var import_extends3 = __toESM(require_extends());
2093
2143
  var import_objectWithoutPropertiesLoose2 = __toESM(require_objectWithoutPropertiesLoose());
2094
2144
 
2095
- // node_modules/@uiw/color-convert/esm/index.js
2145
+ // ../node_modules/@uiw/color-convert/esm/index.js
2096
2146
  var import_extends = __toESM(require_extends());
2097
2147
  var RGB_MAX = 255;
2098
2148
  var SV_MAX = 100;
2099
2149
  var rgbaToHsva = (_ref) => {
2100
- var {
2101
- r,
2102
- g,
2103
- b,
2104
- a
2105
- } = _ref;
2150
+ var r = _ref.r, g = _ref.g, b = _ref.b, a = _ref.a;
2106
2151
  var max = Math.max(r, g, b);
2107
2152
  var delta = max - Math.min(r, g, b);
2108
2153
  var hh = delta ? max === r ? (g - b) / delta : max === g ? 2 + (b - r) / delta : 4 + (r - g) / delta : 0;
@@ -2114,21 +2159,11 @@ var rgbaToHsva = (_ref) => {
2114
2159
  };
2115
2160
  };
2116
2161
  var hsvaToHslaString = (hsva) => {
2117
- var {
2118
- h,
2119
- s,
2120
- l,
2121
- a
2122
- } = hsvaToHsla(hsva);
2162
+ var _hsvaToHsla2 = hsvaToHsla(hsva), h = _hsvaToHsla2.h, s = _hsvaToHsla2.s, l = _hsvaToHsla2.l, a = _hsvaToHsla2.a;
2123
2163
  return "hsla(" + h + ", " + s + "%, " + l + "%, " + a + ")";
2124
2164
  };
2125
2165
  var hsvaToHsla = (_ref5) => {
2126
- var {
2127
- h,
2128
- s,
2129
- v,
2130
- a
2131
- } = _ref5;
2166
+ var h = _ref5.h, s = _ref5.s, v = _ref5.v, a = _ref5.a;
2132
2167
  var hh = (200 - s) * v / SV_MAX;
2133
2168
  return {
2134
2169
  h,
@@ -2138,21 +2173,12 @@ var hsvaToHsla = (_ref5) => {
2138
2173
  };
2139
2174
  };
2140
2175
  var rgbToHex = (_ref7) => {
2141
- var {
2142
- r,
2143
- g,
2144
- b
2145
- } = _ref7;
2176
+ var r = _ref7.r, g = _ref7.g, b = _ref7.b;
2146
2177
  var bin = r << 16 | g << 8 | b;
2147
2178
  return "#" + ((h) => new Array(7 - h.length).join("0") + h)(bin.toString(16));
2148
2179
  };
2149
2180
  var rgbaToHexa = (_ref8) => {
2150
- var {
2151
- r,
2152
- g,
2153
- b,
2154
- a
2155
- } = _ref8;
2181
+ var r = _ref8.r, g = _ref8.g, b = _ref8.b, a = _ref8.a;
2156
2182
  var alpha = typeof a === "number" && (a * 255 | 1 << 8).toString(16).slice(1);
2157
2183
  return "" + rgbToHex({
2158
2184
  r,
@@ -2167,7 +2193,7 @@ var hexToRgba = (hex) => {
2167
2193
  hex = "#" + htemp.charAt(0) + htemp.charAt(0) + htemp.charAt(1) + htemp.charAt(1) + htemp.charAt(2) + htemp.charAt(2);
2168
2194
  }
2169
2195
  var reg = new RegExp("[A-Za-z0-9]{2}", "g");
2170
- var [r, g, b = 0, a] = hex.match(reg).map((v) => parseInt(v, 16));
2196
+ var _map2 = hex.match(reg).map((v) => parseInt(v, 16)), r = _map2[0], g = _map2[1], _map2$ = _map2[2], b = _map2$ === void 0 ? 0 : _map2$, a = _map2[3];
2171
2197
  return {
2172
2198
  r,
2173
2199
  g,
@@ -2176,12 +2202,7 @@ var hexToRgba = (hex) => {
2176
2202
  };
2177
2203
  };
2178
2204
  var hsvaToRgba = (_ref9) => {
2179
- var {
2180
- h,
2181
- s,
2182
- v,
2183
- a
2184
- } = _ref9;
2205
+ var h = _ref9.h, s = _ref9.s, v = _ref9.v, a = _ref9.a;
2185
2206
  var _h = h / 60, _s = s / SV_MAX, _v = v / SV_MAX, hi = Math.floor(_h) % 6;
2186
2207
  var f = _h - Math.floor(_h), _p = RGB_MAX * _v * (1 - _s), _q = RGB_MAX * _v * (1 - _s * f), _t = RGB_MAX * _v * (1 - _s * (1 - f));
2187
2208
  _v *= RGB_MAX;
@@ -2226,20 +2247,11 @@ var hsvaToRgba = (_ref9) => {
2226
2247
  });
2227
2248
  };
2228
2249
  var hsvaToRgbaString = (hsva) => {
2229
- var {
2230
- r,
2231
- g,
2232
- b,
2233
- a
2234
- } = hsvaToRgba(hsva);
2250
+ var _hsvaToRgba2 = hsvaToRgba(hsva), r = _hsvaToRgba2.r, g = _hsvaToRgba2.g, b = _hsvaToRgba2.b, a = _hsvaToRgba2.a;
2235
2251
  return "rgba(" + r + ", " + g + ", " + b + ", " + a + ")";
2236
2252
  };
2237
2253
  var rgbaToRgb = (_ref0) => {
2238
- var {
2239
- r,
2240
- g,
2241
- b
2242
- } = _ref0;
2254
+ var r = _ref0.r, g = _ref0.g, b = _ref0.b;
2243
2255
  return {
2244
2256
  r,
2245
2257
  g,
@@ -2247,11 +2259,7 @@ var rgbaToRgb = (_ref0) => {
2247
2259
  };
2248
2260
  };
2249
2261
  var hslaToHsl = (_ref1) => {
2250
- var {
2251
- h,
2252
- s,
2253
- l
2254
- } = _ref1;
2262
+ var h = _ref1.h, s = _ref1.s, l = _ref1.l;
2255
2263
  return {
2256
2264
  h,
2257
2265
  s,
@@ -2260,11 +2268,7 @@ var hslaToHsl = (_ref1) => {
2260
2268
  };
2261
2269
  var hsvaToHex = (hsva) => rgbToHex(hsvaToRgba(hsva));
2262
2270
  var hsvaToHsv = (_ref10) => {
2263
- var {
2264
- h,
2265
- s,
2266
- v
2267
- } = _ref10;
2271
+ var h = _ref10.h, s = _ref10.s, v = _ref10.v;
2268
2272
  return {
2269
2273
  h,
2270
2274
  s,
@@ -2272,11 +2276,7 @@ var hsvaToHsv = (_ref10) => {
2272
2276
  };
2273
2277
  };
2274
2278
  var rgbToXY = (_ref12) => {
2275
- var {
2276
- r,
2277
- g,
2278
- b
2279
- } = _ref12;
2279
+ var r = _ref12.r, g = _ref12.g, b = _ref12.b;
2280
2280
  var translateColor = function translateColor2(color2) {
2281
2281
  return color2 <= 0.04045 ? color2 / 12.92 : Math.pow((color2 + 0.055) / 1.055, 2.4);
2282
2282
  };
@@ -2329,15 +2329,15 @@ var color = (str) => {
2329
2329
  };
2330
2330
  var validHex = (hex) => /^#?([A-Fa-f0-9]{3,4}){1,2}$/.test(hex);
2331
2331
 
2332
- // node_modules/@uiw/react-drag-event-interactive/esm/index.js
2332
+ // ../node_modules/@uiw/react-drag-event-interactive/esm/index.js
2333
2333
  var import_extends2 = __toESM(require_extends());
2334
2334
  var import_objectWithoutPropertiesLoose = __toESM(require_objectWithoutPropertiesLoose());
2335
2335
  function useEventCallback(handler) {
2336
- var callbackRef = React25.useRef(handler);
2337
- React25.useEffect(() => {
2336
+ var callbackRef = React26.useRef(handler);
2337
+ React26.useEffect(() => {
2338
2338
  callbackRef.current = handler;
2339
2339
  });
2340
- return React25.useCallback((value, event) => callbackRef.current && callbackRef.current(value, event), []);
2340
+ return React26.useCallback((value, event) => callbackRef.current && callbackRef.current(value, event), []);
2341
2341
  }
2342
2342
  var isTouch = (event) => "touches" in event;
2343
2343
  var preventDefaultMove = (event) => {
@@ -2365,16 +2365,11 @@ var getRelativePosition = (node, event) => {
2365
2365
  };
2366
2366
  };
2367
2367
  var _excluded = ["prefixCls", "className", "onMove", "onDown"];
2368
- var Interactive = /* @__PURE__ */ React25__namespace.default.forwardRef((props, ref) => {
2369
- var {
2370
- prefixCls = "w-color-interactive",
2371
- className,
2372
- onMove,
2373
- onDown
2374
- } = props, reset = (0, import_objectWithoutPropertiesLoose.default)(props, _excluded);
2375
- var container = React25.useRef(null);
2376
- var hasTouched = React25.useRef(false);
2377
- var [isDragging, setDragging] = React25.useState(false);
2368
+ var Interactive = /* @__PURE__ */ React26__namespace.default.forwardRef((props, ref) => {
2369
+ var _props$prefixCls = props.prefixCls, prefixCls = _props$prefixCls === void 0 ? "w-color-interactive" : _props$prefixCls, className = props.className, onMove = props.onMove, onDown = props.onDown, reset = (0, import_objectWithoutPropertiesLoose.default)(props, _excluded);
2370
+ var container = React26.useRef(null);
2371
+ var hasTouched = React26.useRef(false);
2372
+ var _useState = React26.useState(false), isDragging = _useState[0], setDragging = _useState[1];
2378
2373
  var onMoveCallback = useEventCallback(onMove);
2379
2374
  var onKeyCallback = useEventCallback(onDown);
2380
2375
  var isValid = (event) => {
@@ -2382,7 +2377,7 @@ var Interactive = /* @__PURE__ */ React25__namespace.default.forwardRef((props,
2382
2377
  hasTouched.current = isTouch(event);
2383
2378
  return true;
2384
2379
  };
2385
- var handleMove = React25.useCallback((event) => {
2380
+ var handleMove = React26.useCallback((event) => {
2386
2381
  preventDefaultMove(event);
2387
2382
  if (!container.current) return;
2388
2383
  var isDown = isTouch(event) ? event.touches.length > 0 : event.buttons > 0;
@@ -2392,8 +2387,8 @@ var Interactive = /* @__PURE__ */ React25__namespace.default.forwardRef((props,
2392
2387
  }
2393
2388
  onMoveCallback == null || onMoveCallback(getRelativePosition(container.current, event), event);
2394
2389
  }, [onMoveCallback]);
2395
- var handleMoveEnd = React25.useCallback(() => setDragging(false), []);
2396
- var toggleDocumentEvents = React25.useCallback((state) => {
2390
+ var handleMoveEnd = React26.useCallback(() => setDragging(false), []);
2391
+ var toggleDocumentEvents = React26.useCallback((state) => {
2397
2392
  if (state) {
2398
2393
  window.addEventListener(hasTouched.current ? "touchmove" : "mousemove", handleMove);
2399
2394
  window.addEventListener(hasTouched.current ? "touchend" : "mouseup", handleMoveEnd);
@@ -2404,13 +2399,13 @@ var Interactive = /* @__PURE__ */ React25__namespace.default.forwardRef((props,
2404
2399
  window.removeEventListener("touchend", handleMoveEnd);
2405
2400
  }
2406
2401
  }, [handleMove, handleMoveEnd]);
2407
- React25.useEffect(() => {
2402
+ React26.useEffect(() => {
2408
2403
  toggleDocumentEvents(isDragging);
2409
2404
  return () => {
2410
2405
  toggleDocumentEvents(false);
2411
2406
  };
2412
2407
  }, [isDragging, handleMove, handleMoveEnd, toggleDocumentEvents]);
2413
- var handleMoveStart = React25.useCallback((event) => {
2408
+ var handleMoveStart = React26.useCallback((event) => {
2414
2409
  var activeEl = document.activeElement;
2415
2410
  activeEl == null || activeEl.blur();
2416
2411
  preventDefaultMove(event.nativeEvent);
@@ -2433,13 +2428,7 @@ var Interactive = /* @__PURE__ */ React25__namespace.default.forwardRef((props,
2433
2428
  Interactive.displayName = "Interactive";
2434
2429
  var esm_default = Interactive;
2435
2430
  var Pointer = (_ref) => {
2436
- var {
2437
- className,
2438
- color: color2,
2439
- left,
2440
- top,
2441
- prefixCls
2442
- } = _ref;
2431
+ var className = _ref.className, color2 = _ref.color, left = _ref.left, top = _ref.top, prefixCls = _ref.prefixCls;
2443
2432
  var style = {
2444
2433
  position: "absolute",
2445
2434
  top,
@@ -2454,7 +2443,7 @@ var Pointer = (_ref) => {
2454
2443
  borderRadius: "50%",
2455
2444
  backgroundColor: color2
2456
2445
  };
2457
- return React25.useMemo(() => /* @__PURE__ */ jsxRuntime.jsx("div", {
2446
+ return React26.useMemo(() => /* @__PURE__ */ jsxRuntime.jsx("div", {
2458
2447
  className: prefixCls + "-pointer " + (className || ""),
2459
2448
  style,
2460
2449
  children: /* @__PURE__ */ jsxRuntime.jsx("div", {
@@ -2464,18 +2453,9 @@ var Pointer = (_ref) => {
2464
2453
  }), [top, left, color2, className, prefixCls]);
2465
2454
  };
2466
2455
  var _excluded2 = ["prefixCls", "radius", "pointer", "className", "hue", "style", "hsva", "onChange"];
2467
- var Saturation = /* @__PURE__ */ React25__namespace.default.forwardRef((props, ref) => {
2456
+ var Saturation = /* @__PURE__ */ React26__namespace.default.forwardRef((props, ref) => {
2468
2457
  var _hsva$h;
2469
- var {
2470
- prefixCls = "w-color-saturation",
2471
- radius = 0,
2472
- pointer,
2473
- className,
2474
- hue = 0,
2475
- style,
2476
- hsva,
2477
- onChange
2478
- } = props, other = (0, import_objectWithoutPropertiesLoose2.default)(props, _excluded2);
2458
+ var _props$prefixCls = props.prefixCls, prefixCls = _props$prefixCls === void 0 ? "w-color-saturation" : _props$prefixCls, _props$radius = props.radius, radius = _props$radius === void 0 ? 0 : _props$radius, pointer = props.pointer, className = props.className, _props$hue = props.hue, hue = _props$hue === void 0 ? 0 : _props$hue, style = props.style, hsva = props.hsva, onChange = props.onChange, other = (0, import_objectWithoutPropertiesLoose2.default)(props, _excluded2);
2479
2459
  var containerStyle = (0, import_extends3.default)({
2480
2460
  width: 200,
2481
2461
  height: 200,
@@ -2483,7 +2463,16 @@ var Saturation = /* @__PURE__ */ React25__namespace.default.forwardRef((props, r
2483
2463
  }, style, {
2484
2464
  position: "relative"
2485
2465
  });
2486
- var handleChange = (interaction, event) => {
2466
+ var containerRef = React26.useRef(null);
2467
+ var combinedRef = React26.useCallback((node) => {
2468
+ containerRef.current = node;
2469
+ if (typeof ref === "function") {
2470
+ ref(node);
2471
+ } else if (ref && "current" in ref) {
2472
+ ref.current = node;
2473
+ }
2474
+ }, [ref]);
2475
+ var handleChange = React26.useCallback((interaction, event) => {
2487
2476
  onChange && hsva && onChange({
2488
2477
  h: hsva.h,
2489
2478
  s: interaction.left * 100,
@@ -2491,8 +2480,12 @@ var Saturation = /* @__PURE__ */ React25__namespace.default.forwardRef((props, r
2491
2480
  a: hsva.a
2492
2481
  // source: 'hsv',
2493
2482
  });
2494
- };
2495
- var handleKeyDown = React25.useCallback((event) => {
2483
+ var element = containerRef.current;
2484
+ if (element) {
2485
+ element.focus();
2486
+ }
2487
+ }, [hsva, onChange]);
2488
+ var handleKeyDown = React26.useCallback((event) => {
2496
2489
  if (!hsva || !onChange) return;
2497
2490
  var step = 1;
2498
2491
  var newS = hsva.s;
@@ -2531,7 +2524,7 @@ var Saturation = /* @__PURE__ */ React25__namespace.default.forwardRef((props, r
2531
2524
  });
2532
2525
  }
2533
2526
  }, [hsva, onChange]);
2534
- var pointerElement = React25.useMemo(() => {
2527
+ var pointerElement = React26.useMemo(() => {
2535
2528
  if (!hsva) return null;
2536
2529
  var comProps = {
2537
2530
  top: 100 - hsva.v + "%",
@@ -2547,7 +2540,7 @@ var Saturation = /* @__PURE__ */ React25__namespace.default.forwardRef((props, r
2547
2540
  prefixCls
2548
2541
  }, comProps));
2549
2542
  }, [hsva, pointer, prefixCls]);
2550
- var handleClick = React25.useCallback((event) => {
2543
+ var handleClick = React26.useCallback((event) => {
2551
2544
  event.target.focus();
2552
2545
  }, []);
2553
2546
  return /* @__PURE__ */ jsxRuntime.jsx(esm_default, (0, import_extends3.default)({
@@ -2561,7 +2554,7 @@ var Saturation = /* @__PURE__ */ React25__namespace.default.forwardRef((props, r
2561
2554
  }, containerStyle, {
2562
2555
  outline: "none"
2563
2556
  }),
2564
- ref,
2557
+ ref: combinedRef,
2565
2558
  onMove: handleChange,
2566
2559
  onDown: handleChange,
2567
2560
  onKeyDown: handleKeyDown,
@@ -2572,23 +2565,16 @@ var Saturation = /* @__PURE__ */ React25__namespace.default.forwardRef((props, r
2572
2565
  Saturation.displayName = "Saturation";
2573
2566
  var esm_default2 = Saturation;
2574
2567
 
2575
- // node_modules/@uiw/react-color-alpha/esm/index.js
2568
+ // ../node_modules/@uiw/react-color-alpha/esm/index.js
2576
2569
  var import_extends5 = __toESM(require_extends());
2577
2570
  var import_objectWithoutPropertiesLoose4 = __toESM(require_objectWithoutPropertiesLoose());
2578
2571
 
2579
- // node_modules/@uiw/react-color-alpha/esm/Pointer.js
2572
+ // ../node_modules/@uiw/react-color-alpha/esm/Pointer.js
2580
2573
  var import_extends4 = __toESM(require_extends());
2581
2574
  var import_objectWithoutPropertiesLoose3 = __toESM(require_objectWithoutPropertiesLoose());
2582
2575
  var _excluded3 = ["className", "prefixCls", "left", "top", "style", "fillProps"];
2583
2576
  var Pointer2 = (_ref) => {
2584
- var {
2585
- className,
2586
- prefixCls,
2587
- left,
2588
- top,
2589
- style,
2590
- fillProps
2591
- } = _ref, reset = (0, import_objectWithoutPropertiesLoose3.default)(_ref, _excluded3);
2577
+ var className = _ref.className, prefixCls = _ref.prefixCls, left = _ref.left, top = _ref.top, style = _ref.style, fillProps = _ref.fillProps, reset = (0, import_objectWithoutPropertiesLoose3.default)(_ref, _excluded3);
2592
2578
  var styleWrapper = (0, import_extends4.default)({}, style, {
2593
2579
  position: "absolute",
2594
2580
  left,
@@ -2614,39 +2600,40 @@ var Pointer2 = (_ref) => {
2614
2600
  }))
2615
2601
  }));
2616
2602
  };
2617
- var _excluded4 = ["prefixCls", "className", "hsva", "background", "bgProps", "innerProps", "pointerProps", "radius", "width", "height", "direction", "style", "onChange", "pointer"];
2603
+ var _excluded4 = ["prefixCls", "className", "hsva", "background", "bgProps", "innerProps", "pointerProps", "radius", "width", "height", "direction", "reverse", "style", "onChange", "pointer"];
2618
2604
  var BACKGROUND_IMG = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAMUlEQVQ4T2NkYGAQYcAP3uCTZhw1gGGYhAGBZIA/nYDCgBDAm9BGDWAAJyRCgLaBCAAgXwixzAS0pgAAAABJRU5ErkJggg==";
2619
- var Alpha = /* @__PURE__ */ React25__namespace.default.forwardRef((props, ref) => {
2620
- var {
2621
- prefixCls = "w-color-alpha",
2622
- className,
2623
- hsva,
2624
- background,
2625
- bgProps = {},
2626
- innerProps = {},
2627
- pointerProps = {},
2628
- radius = 0,
2629
- width,
2630
- height = 16,
2631
- direction = "horizontal",
2632
- style,
2633
- onChange,
2634
- pointer
2635
- } = props, other = (0, import_objectWithoutPropertiesLoose4.default)(props, _excluded4);
2605
+ var Alpha = /* @__PURE__ */ React26__namespace.default.forwardRef((props, ref) => {
2606
+ var _props$prefixCls = props.prefixCls, prefixCls = _props$prefixCls === void 0 ? "w-color-alpha" : _props$prefixCls, className = props.className, hsva = props.hsva, background = props.background, _props$bgProps = props.bgProps, bgProps = _props$bgProps === void 0 ? {} : _props$bgProps, _props$innerProps = props.innerProps, innerProps = _props$innerProps === void 0 ? {} : _props$innerProps, _props$pointerProps = props.pointerProps, pointerProps = _props$pointerProps === void 0 ? {} : _props$pointerProps, _props$radius = props.radius, radius = _props$radius === void 0 ? 0 : _props$radius, width = props.width, _props$height = props.height, height = _props$height === void 0 ? 16 : _props$height, _props$direction = props.direction, direction = _props$direction === void 0 ? "horizontal" : _props$direction, _props$reverse = props.reverse, reverse = _props$reverse === void 0 ? false : _props$reverse, style = props.style, onChange = props.onChange, pointer = props.pointer, other = (0, import_objectWithoutPropertiesLoose4.default)(props, _excluded4);
2607
+ var offsetToAlpha = React26.useCallback((offset) => {
2608
+ var value = direction === "horizontal" ? offset.left : offset.top;
2609
+ if (direction === "horizontal") {
2610
+ return reverse ? 1 - value : value;
2611
+ }
2612
+ return reverse ? value : 1 - value;
2613
+ }, [direction, reverse]);
2614
+ var alphaToOffset = React26.useCallback((alpha) => {
2615
+ if (direction === "horizontal") {
2616
+ return reverse ? 1 - alpha : alpha;
2617
+ }
2618
+ return reverse ? alpha : 1 - alpha;
2619
+ }, [direction, reverse]);
2636
2620
  var handleChange = (offset) => {
2621
+ var alpha = offsetToAlpha(offset);
2637
2622
  onChange && onChange((0, import_extends5.default)({}, hsva, {
2638
- a: direction === "horizontal" ? offset.left : offset.top
2623
+ a: alpha
2639
2624
  }), offset);
2640
2625
  };
2641
2626
  var colorTo = hsvaToHslaString(Object.assign({}, hsva, {
2642
2627
  a: 1
2643
2628
  }));
2644
- var innerBackground = "linear-gradient(to " + (direction === "horizontal" ? "right" : "bottom") + ", rgba(244, 67, 54, 0) 0%, " + colorTo + " 100%)";
2629
+ var horizontalGradient = reverse ? "linear-gradient(to right, " + colorTo + " 0%, rgba(244, 67, 54, 0) 100%)" : "linear-gradient(to right, rgba(244, 67, 54, 0) 0%, " + colorTo + " 100%)";
2630
+ var verticalGradient = reverse ? "linear-gradient(to bottom, rgba(244, 67, 54, 0) 0%, " + colorTo + " 100%)" : "linear-gradient(to bottom, " + colorTo + " 0%, rgba(244, 67, 54, 0) 100%)";
2631
+ var innerBackground = direction === "horizontal" ? horizontalGradient : verticalGradient;
2645
2632
  var comProps = {};
2646
2633
  if (direction === "horizontal") {
2647
- comProps.left = hsva.a * 100 + "%";
2634
+ comProps.left = alphaToOffset(hsva.a) * 100 + "%";
2648
2635
  } else {
2649
- comProps.top = hsva.a * 100 + "%";
2636
+ comProps.top = alphaToOffset(hsva.a) * 100 + "%";
2650
2637
  }
2651
2638
  var styleWrapper = (0, import_extends5.default)({
2652
2639
  "--alpha-background-color": "#fff",
@@ -2661,32 +2648,32 @@ var Alpha = /* @__PURE__ */ React25__namespace.default.forwardRef((props, ref) =
2661
2648
  }, style, {
2662
2649
  position: "relative"
2663
2650
  });
2664
- var handleKeyDown = React25.useCallback((event) => {
2651
+ var handleKeyDown = React26.useCallback((event) => {
2665
2652
  var step = 0.01;
2666
2653
  var currentAlpha = hsva.a;
2667
2654
  var newAlpha = currentAlpha;
2668
2655
  switch (event.key) {
2669
2656
  case "ArrowLeft":
2670
2657
  if (direction === "horizontal") {
2671
- newAlpha = Math.max(0, currentAlpha - step);
2658
+ newAlpha = reverse ? Math.min(1, currentAlpha + step) : Math.max(0, currentAlpha - step);
2672
2659
  event.preventDefault();
2673
2660
  }
2674
2661
  break;
2675
2662
  case "ArrowRight":
2676
2663
  if (direction === "horizontal") {
2677
- newAlpha = Math.min(1, currentAlpha + step);
2664
+ newAlpha = reverse ? Math.max(0, currentAlpha - step) : Math.min(1, currentAlpha + step);
2678
2665
  event.preventDefault();
2679
2666
  }
2680
2667
  break;
2681
2668
  case "ArrowUp":
2682
2669
  if (direction === "vertical") {
2683
- newAlpha = Math.max(0, currentAlpha - step);
2670
+ newAlpha = reverse ? Math.max(0, currentAlpha - step) : Math.min(1, currentAlpha + step);
2684
2671
  event.preventDefault();
2685
2672
  }
2686
2673
  break;
2687
2674
  case "ArrowDown":
2688
2675
  if (direction === "vertical") {
2689
- newAlpha = Math.min(1, currentAlpha + step);
2676
+ newAlpha = reverse ? Math.min(1, currentAlpha + step) : Math.max(0, currentAlpha - step);
2690
2677
  event.preventDefault();
2691
2678
  }
2692
2679
  break;
@@ -2694,9 +2681,10 @@ var Alpha = /* @__PURE__ */ React25__namespace.default.forwardRef((props, ref) =
2694
2681
  return;
2695
2682
  }
2696
2683
  if (newAlpha !== currentAlpha) {
2684
+ var syntheticAxisOffset = alphaToOffset(newAlpha);
2697
2685
  var syntheticOffset = {
2698
- left: direction === "horizontal" ? newAlpha : hsva.a,
2699
- top: direction === "vertical" ? newAlpha : hsva.a,
2686
+ left: direction === "horizontal" ? syntheticAxisOffset : hsva.a,
2687
+ top: direction === "vertical" ? syntheticAxisOffset : hsva.a,
2700
2688
  width: 0,
2701
2689
  height: 0,
2702
2690
  x: 0,
@@ -2706,8 +2694,8 @@ var Alpha = /* @__PURE__ */ React25__namespace.default.forwardRef((props, ref) =
2706
2694
  a: newAlpha
2707
2695
  }), syntheticOffset);
2708
2696
  }
2709
- }, [hsva, direction, onChange]);
2710
- var handleClick = React25.useCallback((event) => {
2697
+ }, [alphaToOffset, hsva, direction, onChange, reverse]);
2698
+ var handleClick = React26.useCallback((event) => {
2711
2699
  event.target.focus();
2712
2700
  }, []);
2713
2701
  var pointerElement = pointer && typeof pointer === "function" ? pointer((0, import_extends5.default)({
@@ -2744,29 +2732,19 @@ var Alpha = /* @__PURE__ */ React25__namespace.default.forwardRef((props, ref) =
2744
2732
  Alpha.displayName = "Alpha";
2745
2733
  var esm_default3 = Alpha;
2746
2734
 
2747
- // node_modules/@uiw/react-color-editable-input/esm/index.js
2735
+ // ../node_modules/@uiw/react-color-editable-input/esm/index.js
2748
2736
  var import_extends6 = __toESM(require_extends());
2749
2737
  var import_objectWithoutPropertiesLoose5 = __toESM(require_objectWithoutPropertiesLoose());
2750
2738
  var _excluded5 = ["prefixCls", "placement", "label", "value", "className", "style", "labelStyle", "inputStyle", "onChange", "onBlur", "renderInput"];
2751
2739
  var validHex2 = (hex) => /^#?([A-Fa-f0-9]{3,4}){1,2}$/.test(hex);
2752
2740
  var getNumberValue = (value) => Number(String(value).replace(/%/g, ""));
2753
- var EditableInput = /* @__PURE__ */ React25__namespace.default.forwardRef((props, ref) => {
2754
- var {
2755
- prefixCls = "w-color-editable-input",
2756
- placement = "bottom",
2757
- label,
2758
- value: initValue,
2759
- className,
2760
- style,
2761
- labelStyle,
2762
- inputStyle,
2763
- onChange,
2764
- onBlur,
2765
- renderInput
2766
- } = props, other = (0, import_objectWithoutPropertiesLoose5.default)(props, _excluded5);
2767
- var [value, setValue] = React25.useState(initValue);
2768
- var isFocus = React25.useRef(false);
2769
- React25.useEffect(() => {
2741
+ var EditableInput = /* @__PURE__ */ React26__namespace.default.forwardRef((props, ref) => {
2742
+ var _props$prefixCls = props.prefixCls, prefixCls = _props$prefixCls === void 0 ? "w-color-editable-input" : _props$prefixCls, _props$placement = props.placement, placement = _props$placement === void 0 ? "bottom" : _props$placement, label = props.label, initValue = props.value, className = props.className, style = props.style, labelStyle = props.labelStyle, inputStyle = props.inputStyle, onChange = props.onChange, onBlur = props.onBlur, renderInput = props.renderInput, other = (0, import_objectWithoutPropertiesLoose5.default)(props, _excluded5);
2743
+ var _useState = React26.useState(initValue), value = _useState[0], setValue = _useState[1];
2744
+ var isFocus = React26.useRef(false);
2745
+ var inputIdRef = React26.useRef(other.id || prefixCls + "-" + Math.random().toString(36).slice(2, 11));
2746
+ var inputId = other.id || inputIdRef.current;
2747
+ React26.useEffect(() => {
2770
2748
  if (props.value !== value) {
2771
2749
  if (!isFocus.current) {
2772
2750
  setValue(props.value);
@@ -2828,6 +2806,7 @@ var EditableInput = /* @__PURE__ */ React25__namespace.default.forwardRef((props
2828
2806
  autoComplete: "off",
2829
2807
  onFocus: () => isFocus.current = true
2830
2808
  }, other, {
2809
+ id: inputId,
2831
2810
  style: editableStyle,
2832
2811
  onFocusCapture: (e) => {
2833
2812
  var elm = e.target;
@@ -2839,7 +2818,8 @@ var EditableInput = /* @__PURE__ */ React25__namespace.default.forwardRef((props
2839
2818
  style: wrapperStyle,
2840
2819
  children: [renderInput ? renderInput(inputProps, ref) : /* @__PURE__ */ jsxRuntime.jsx("input", (0, import_extends6.default)({
2841
2820
  ref
2842
- }, inputProps)), label && /* @__PURE__ */ jsxRuntime.jsx("span", {
2821
+ }, inputProps)), label && /* @__PURE__ */ jsxRuntime.jsx("label", {
2822
+ htmlFor: inputId,
2843
2823
  style: (0, import_extends6.default)({
2844
2824
  color: "var(--editable-input-label-color)",
2845
2825
  textTransform: "capitalize"
@@ -2851,23 +2831,12 @@ var EditableInput = /* @__PURE__ */ React25__namespace.default.forwardRef((props
2851
2831
  EditableInput.displayName = "EditableInput";
2852
2832
  var esm_default4 = EditableInput;
2853
2833
 
2854
- // node_modules/@uiw/react-color-editable-input-rgba/esm/index.js
2834
+ // ../node_modules/@uiw/react-color-editable-input-rgba/esm/index.js
2855
2835
  var import_extends7 = __toESM(require_extends());
2856
2836
  var import_objectWithoutPropertiesLoose6 = __toESM(require_objectWithoutPropertiesLoose());
2857
2837
  var _excluded6 = ["prefixCls", "hsva", "placement", "rProps", "gProps", "bProps", "aProps", "className", "style", "onChange"];
2858
- var EditableInputRGBA = /* @__PURE__ */ React25__namespace.default.forwardRef((props, ref) => {
2859
- var {
2860
- prefixCls = "w-color-editable-input-rgba",
2861
- hsva,
2862
- placement = "bottom",
2863
- rProps = {},
2864
- gProps = {},
2865
- bProps = {},
2866
- aProps = {},
2867
- className,
2868
- style,
2869
- onChange
2870
- } = props, other = (0, import_objectWithoutPropertiesLoose6.default)(props, _excluded6);
2838
+ var EditableInputRGBA = /* @__PURE__ */ React26__namespace.default.forwardRef((props, ref) => {
2839
+ var _props$prefixCls = props.prefixCls, prefixCls = _props$prefixCls === void 0 ? "w-color-editable-input-rgba" : _props$prefixCls, hsva = props.hsva, _props$placement = props.placement, placement = _props$placement === void 0 ? "bottom" : _props$placement, _props$rProps = props.rProps, rProps = _props$rProps === void 0 ? {} : _props$rProps, _props$gProps = props.gProps, gProps = _props$gProps === void 0 ? {} : _props$gProps, _props$bProps = props.bProps, bProps = _props$bProps === void 0 ? {} : _props$bProps, _props$aProps = props.aProps, aProps = _props$aProps === void 0 ? {} : _props$aProps, className = props.className, style = props.style, onChange = props.onChange, other = (0, import_objectWithoutPropertiesLoose6.default)(props, _excluded6);
2871
2840
  var rgba = hsva ? hsvaToRgba(hsva) : {};
2872
2841
  function handleBlur(evn) {
2873
2842
  var value = Number(evn.target.value);
@@ -2947,7 +2916,7 @@ var EditableInputRGBA = /* @__PURE__ */ React25__namespace.default.forwardRef((p
2947
2916
  }, gProps, {
2948
2917
  style: (0, import_extends7.default)({
2949
2918
  marginLeft: 5
2950
- }, rProps.style)
2919
+ }, gProps.style)
2951
2920
  })), /* @__PURE__ */ jsxRuntime.jsx(esm_default4, (0, import_extends7.default)({
2952
2921
  label: "B",
2953
2922
  value: rgba.b || 0,
@@ -2974,24 +2943,43 @@ var EditableInputRGBA = /* @__PURE__ */ React25__namespace.default.forwardRef((p
2974
2943
  EditableInputRGBA.displayName = "EditableInputRGBA";
2975
2944
  var esm_default5 = EditableInputRGBA;
2976
2945
 
2977
- // node_modules/@uiw/react-color-hue/esm/index.js
2946
+ // ../node_modules/@uiw/react-color-hue/esm/index.js
2978
2947
  var import_extends8 = __toESM(require_extends());
2979
2948
  var import_objectWithoutPropertiesLoose7 = __toESM(require_objectWithoutPropertiesLoose());
2980
- var _excluded7 = ["prefixCls", "className", "hue", "onChange", "direction"];
2981
- var Hue = /* @__PURE__ */ React25__namespace.default.forwardRef((props, ref) => {
2982
- var {
2983
- prefixCls = "w-color-hue",
2984
- className,
2985
- hue = 0,
2986
- onChange: _onChange,
2987
- direction = "horizontal"
2988
- } = props, other = (0, import_objectWithoutPropertiesLoose7.default)(props, _excluded7);
2949
+ var _excluded7 = ["prefixCls", "className", "hue", "onChange", "direction", "reverse"];
2950
+ var NORMAL_COLORS = "rgb(255, 0, 0) 0%, rgb(255, 255, 0) 17%, rgb(0, 255, 0) 33%, rgb(0, 255, 255) 50%, rgb(0, 0, 255) 67%, rgb(255, 0, 255) 83%, rgb(255, 0, 0) 100%";
2951
+ var REVERSED_COLORS = "rgb(255, 0, 0) 0%, rgb(255, 0, 255) 17%, rgb(0, 0, 255) 33%, rgb(0, 255, 255) 50%, rgb(0, 255, 0) 67%, rgb(255, 255, 0) 83%, rgb(255, 0, 0) 100%";
2952
+ var Hue = /* @__PURE__ */ React26__namespace.default.forwardRef((props, ref) => {
2953
+ var _props$prefixCls = props.prefixCls, prefixCls = _props$prefixCls === void 0 ? "w-color-hue" : _props$prefixCls, className = props.className, _props$hue = props.hue, hue = _props$hue === void 0 ? 0 : _props$hue, _onChange = props.onChange, _props$direction = props.direction, direction = _props$direction === void 0 ? "horizontal" : _props$direction, _props$reverse = props.reverse, reverse = _props$reverse === void 0 ? false : _props$reverse, other = (0, import_objectWithoutPropertiesLoose7.default)(props, _excluded7);
2954
+ var getGradientBackground = React26.useCallback(() => {
2955
+ if (direction === "horizontal") {
2956
+ var colors = reverse ? REVERSED_COLORS : NORMAL_COLORS;
2957
+ var gradientDirection = "right";
2958
+ return "linear-gradient(to " + gradientDirection + ", " + colors + ")";
2959
+ } else {
2960
+ var _colors = reverse ? NORMAL_COLORS : REVERSED_COLORS;
2961
+ var _gradientDirection = "bottom";
2962
+ return "linear-gradient(to " + _gradientDirection + ", " + _colors + ")";
2963
+ }
2964
+ }, [direction, reverse]);
2965
+ var getHueFromInteraction = React26.useCallback((interaction) => {
2966
+ var value = direction === "horizontal" ? interaction.left : interaction.top;
2967
+ var normalizedValue;
2968
+ if (direction === "horizontal") {
2969
+ normalizedValue = reverse ? 1 - value : value;
2970
+ } else {
2971
+ normalizedValue = reverse ? value : 1 - value;
2972
+ }
2973
+ return 360 * normalizedValue;
2974
+ }, [direction, reverse]);
2975
+ var gradientBackground = React26.useMemo(() => getGradientBackground(), [getGradientBackground]);
2989
2976
  return /* @__PURE__ */ jsxRuntime.jsx(esm_default3, (0, import_extends8.default)({
2990
2977
  ref,
2991
2978
  className: prefixCls + " " + (className || "")
2992
2979
  }, other, {
2993
2980
  direction,
2994
- background: "linear-gradient(to " + (direction === "horizontal" ? "right" : "bottom") + ", rgb(255, 0, 0) 0%, rgb(255, 255, 0) 17%, rgb(0, 255, 0) 33%, rgb(0, 255, 255) 50%, rgb(0, 0, 255) 67%, rgb(255, 0, 255) 83%, rgb(255, 0, 0) 100%)",
2981
+ reverse,
2982
+ background: gradientBackground,
2995
2983
  hsva: {
2996
2984
  h: hue,
2997
2985
  s: 100,
@@ -3000,7 +2988,7 @@ var Hue = /* @__PURE__ */ React25__namespace.default.forwardRef((props, ref) =>
3000
2988
  },
3001
2989
  onChange: (_, interaction) => {
3002
2990
  _onChange && _onChange({
3003
- h: direction === "horizontal" ? 360 * interaction.left : 360 * interaction.top
2991
+ h: getHueFromInteraction(interaction)
3004
2992
  });
3005
2993
  }
3006
2994
  }));
@@ -3008,23 +2996,12 @@ var Hue = /* @__PURE__ */ React25__namespace.default.forwardRef((props, ref) =>
3008
2996
  Hue.displayName = "Hue";
3009
2997
  var esm_default6 = Hue;
3010
2998
 
3011
- // node_modules/@uiw/react-color-swatch/esm/index.js
2999
+ // ../node_modules/@uiw/react-color-swatch/esm/index.js
3012
3000
  var import_extends9 = __toESM(require_extends());
3013
3001
  var import_objectWithoutPropertiesLoose8 = __toESM(require_objectWithoutPropertiesLoose());
3014
3002
  var _excluded8 = ["prefixCls", "className", "color", "colors", "style", "rectProps", "onChange", "addonAfter", "addonBefore", "rectRender"];
3015
- var Swatch = /* @__PURE__ */ React25__namespace.default.forwardRef((props, ref) => {
3016
- var {
3017
- prefixCls = "w-color-swatch",
3018
- className,
3019
- color: color2,
3020
- colors = [],
3021
- style,
3022
- rectProps = {},
3023
- onChange,
3024
- addonAfter,
3025
- addonBefore,
3026
- rectRender
3027
- } = props, other = (0, import_objectWithoutPropertiesLoose8.default)(props, _excluded8);
3003
+ var Swatch = /* @__PURE__ */ React26__namespace.default.forwardRef((props, ref) => {
3004
+ var _props$prefixCls = props.prefixCls, prefixCls = _props$prefixCls === void 0 ? "w-color-swatch" : _props$prefixCls, className = props.className, color2 = props.color, _props$colors = props.colors, colors = _props$colors === void 0 ? [] : _props$colors, style = props.style, _props$rectProps = props.rectProps, rectProps = _props$rectProps === void 0 ? {} : _props$rectProps, onChange = props.onChange, addonAfter = props.addonAfter, addonBefore = props.addonBefore, rectRender = props.rectRender, other = (0, import_objectWithoutPropertiesLoose8.default)(props, _excluded8);
3028
3005
  var rectStyle = (0, import_extends9.default)({
3029
3006
  "--swatch-background-color": "rgb(144, 19, 254)",
3030
3007
  background: "var(--swatch-background-color)",
@@ -3049,7 +3026,7 @@ var Swatch = /* @__PURE__ */ React25__namespace.default.forwardRef((props, ref)
3049
3026
  flexWrap: "wrap",
3050
3027
  position: "relative"
3051
3028
  }, style),
3052
- children: [addonBefore && /* @__PURE__ */ React25__namespace.default.isValidElement(addonBefore) && addonBefore, colors && Array.isArray(colors) && colors.map((item, idx) => {
3029
+ children: [addonBefore && /* @__PURE__ */ React26__namespace.default.isValidElement(addonBefore) && addonBefore, colors && Array.isArray(colors) && colors.map((item, idx) => {
3053
3030
  var title = "";
3054
3031
  var background = "";
3055
3032
  if (typeof item === "string") {
@@ -3071,11 +3048,11 @@ var Swatch = /* @__PURE__ */ React25__namespace.default.forwardRef((props, ref)
3071
3048
  onClick: (evn) => handleClick(background, evn)
3072
3049
  });
3073
3050
  if (render) {
3074
- return /* @__PURE__ */ jsxRuntime.jsx(React25.Fragment, {
3051
+ return /* @__PURE__ */ jsxRuntime.jsx(React26.Fragment, {
3075
3052
  children: render
3076
3053
  }, idx);
3077
3054
  }
3078
- var child = rectProps.children && /* @__PURE__ */ React25__namespace.default.isValidElement(rectProps.children) ? /* @__PURE__ */ React25__namespace.default.cloneElement(rectProps.children, {
3055
+ var child = rectProps.children && /* @__PURE__ */ React26__namespace.default.isValidElement(rectProps.children) ? /* @__PURE__ */ React26__namespace.default.cloneElement(rectProps.children, {
3079
3056
  color: background,
3080
3057
  checked
3081
3058
  }) : null;
@@ -3089,7 +3066,7 @@ var Swatch = /* @__PURE__ */ React25__namespace.default.forwardRef((props, ref)
3089
3066
  background
3090
3067
  })
3091
3068
  }), idx);
3092
- }), addonAfter && /* @__PURE__ */ React25__namespace.default.isValidElement(addonAfter) && addonAfter]
3069
+ }), addonAfter && /* @__PURE__ */ React26__namespace.default.isValidElement(addonAfter) && addonAfter]
3093
3070
  }));
3094
3071
  });
3095
3072
  Swatch.displayName = "Swatch";
@@ -3108,25 +3085,15 @@ var Bar = (props) => /* @__PURE__ */ jsxRuntime.jsx("div", {
3108
3085
  backgroundColor: "#fff"
3109
3086
  }
3110
3087
  });
3111
- var Sketch = /* @__PURE__ */ React25__namespace.default.forwardRef((props, ref) => {
3112
- var {
3113
- prefixCls = "w-color-sketch",
3114
- className,
3115
- onChange,
3116
- width = 218,
3117
- presetColors = PRESET_COLORS,
3118
- color: color2,
3119
- editableDisable = true,
3120
- disableAlpha = false,
3121
- style
3122
- } = props, other = (0, import_objectWithoutPropertiesLoose9.default)(props, _excluded9);
3123
- var [hsva, setHsva] = React25.useState({
3088
+ var Sketch = /* @__PURE__ */ React26__namespace.default.forwardRef((props, ref) => {
3089
+ var _props$prefixCls = props.prefixCls, prefixCls = _props$prefixCls === void 0 ? "w-color-sketch" : _props$prefixCls, className = props.className, onChange = props.onChange, _props$width = props.width, width = _props$width === void 0 ? 218 : _props$width, _props$presetColors = props.presetColors, presetColors = _props$presetColors === void 0 ? PRESET_COLORS : _props$presetColors, color2 = props.color, _props$editableDisabl = props.editableDisable, editableDisable = _props$editableDisabl === void 0 ? true : _props$editableDisabl, _props$disableAlpha = props.disableAlpha, disableAlpha = _props$disableAlpha === void 0 ? false : _props$disableAlpha, style = props.style, other = (0, import_objectWithoutPropertiesLoose9.default)(props, _excluded9);
3090
+ var _useState = React26.useState({
3124
3091
  h: 209,
3125
3092
  s: 36,
3126
3093
  v: 90,
3127
3094
  a: 1
3128
- });
3129
- React25.useEffect(() => {
3095
+ }), hsva = _useState[0], setHsva = _useState[1];
3096
+ React26.useEffect(() => {
3130
3097
  if (typeof color2 === "string" && validHex(color2)) {
3131
3098
  setHsva(hexToHsva(color2));
3132
3099
  }
@@ -3244,7 +3211,7 @@ var Sketch = /* @__PURE__ */ React25__namespace.default.forwardRef((props, ref)
3244
3211
  innerProps: {
3245
3212
  style: styleAlpha
3246
3213
  },
3247
- pointer: () => /* @__PURE__ */ jsxRuntime.jsx(React25.Fragment, {})
3214
+ pointer: () => /* @__PURE__ */ jsxRuntime.jsx(React26.Fragment, {})
3248
3215
  })]
3249
3216
  })]
3250
3217
  }), editableDisable && /* @__PURE__ */ jsxRuntime.jsxs("div", {
@@ -3359,19 +3326,19 @@ var Toolbar = ({
3359
3326
  on_attachments_change,
3360
3327
  disabled = false
3361
3328
  }) => {
3362
- const [link_url, set_link_url] = React25__namespace.useState("https://");
3363
- const [link_popover_open, set_link_popover_open] = React25__namespace.useState(false);
3364
- const [text_color_open, set_text_color_open] = React25__namespace.useState(false);
3365
- const [highlight_color_open, set_highlight_color_open] = React25__namespace.useState(false);
3366
- const [variables_menu_open, set_variables_menu_open] = React25__namespace.useState(false);
3367
- const [table_menu_open, set_table_menu_open] = React25__namespace.useState(false);
3368
- const [text_color, set_text_color] = React25__namespace.useState("#000000");
3369
- const [highlight_color, set_highlight_color] = React25__namespace.useState("#ffff00");
3370
- const [table_rows, set_table_rows] = React25__namespace.useState(3);
3371
- const [table_cols, set_table_cols] = React25__namespace.useState(3);
3372
- const [hovered_cell, set_hovered_cell] = React25__namespace.useState(null);
3373
- const file_input_ref = React25__namespace.useRef(null);
3374
- const image_input_ref = React25__namespace.useRef(null);
3329
+ const [link_url, set_link_url] = React26__namespace.useState("https://");
3330
+ const [link_popover_open, set_link_popover_open] = React26__namespace.useState(false);
3331
+ const [text_color_open, set_text_color_open] = React26__namespace.useState(false);
3332
+ const [highlight_color_open, set_highlight_color_open] = React26__namespace.useState(false);
3333
+ const [variables_menu_open, set_variables_menu_open] = React26__namespace.useState(false);
3334
+ const [table_menu_open, set_table_menu_open] = React26__namespace.useState(false);
3335
+ const [text_color, set_text_color] = React26__namespace.useState("#000000");
3336
+ const [highlight_color, set_highlight_color] = React26__namespace.useState("#ffff00");
3337
+ const [table_rows, set_table_rows] = React26__namespace.useState(3);
3338
+ const [table_cols, set_table_cols] = React26__namespace.useState(3);
3339
+ const [hovered_cell, set_hovered_cell] = React26__namespace.useState(null);
3340
+ const file_input_ref = React26__namespace.useRef(null);
3341
+ const image_input_ref = React26__namespace.useRef(null);
3375
3342
  if (!editor) {
3376
3343
  return null;
3377
3344
  }
@@ -4304,7 +4271,7 @@ var VariableExtension = core.Node.create({
4304
4271
  }
4305
4272
  });
4306
4273
  var Tabs = TabsPrimitive__namespace.Root;
4307
- var TabsList = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
4274
+ var TabsList = React26__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
4308
4275
  TabsPrimitive__namespace.List,
4309
4276
  {
4310
4277
  ref,
@@ -4316,7 +4283,7 @@ var TabsList = React25__namespace.forwardRef(({ className, ...props }, ref) => /
4316
4283
  }
4317
4284
  ));
4318
4285
  TabsList.displayName = TabsPrimitive__namespace.List.displayName;
4319
- var TabsTrigger = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
4286
+ var TabsTrigger = React26__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
4320
4287
  TabsPrimitive__namespace.Trigger,
4321
4288
  {
4322
4289
  ref,
@@ -4328,7 +4295,7 @@ var TabsTrigger = React25__namespace.forwardRef(({ className, ...props }, ref) =
4328
4295
  }
4329
4296
  ));
4330
4297
  TabsTrigger.displayName = TabsPrimitive__namespace.Trigger.displayName;
4331
- var TabsContent = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
4298
+ var TabsContent = React26__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
4332
4299
  TabsPrimitive__namespace.Content,
4333
4300
  {
4334
4301
  ref,
@@ -4363,14 +4330,14 @@ var HazoUiRte = ({
4363
4330
  className,
4364
4331
  show_output_viewer = false
4365
4332
  }) => {
4366
- const [attachments, set_attachments] = React25__namespace.useState(
4333
+ const [attachments, set_attachments] = React26__namespace.useState(
4367
4334
  initial_attachments
4368
4335
  );
4369
- const [active_tab, set_active_tab] = React25__namespace.useState("html");
4336
+ const [active_tab, set_active_tab] = React26__namespace.useState("html");
4370
4337
  const is_view_only = active_tab !== "html";
4371
- const attachments_ref = React25__namespace.useRef(attachments);
4338
+ const attachments_ref = React26__namespace.useRef(attachments);
4372
4339
  attachments_ref.current = attachments;
4373
- const debounced_on_change = React25__namespace.useMemo(
4340
+ const debounced_on_change = React26__namespace.useMemo(
4374
4341
  () => debounce_fn((output) => {
4375
4342
  if (on_change) {
4376
4343
  on_change(output);
@@ -4469,7 +4436,7 @@ var HazoUiRte = ({
4469
4436
  debounced_on_change(output);
4470
4437
  }
4471
4438
  });
4472
- React25__namespace.useEffect(() => {
4439
+ React26__namespace.useEffect(() => {
4473
4440
  if (editor && html !== void 0) {
4474
4441
  const current_html = editor.getHTML();
4475
4442
  if (html !== current_html && !editor.isFocused) {
@@ -4477,21 +4444,21 @@ var HazoUiRte = ({
4477
4444
  }
4478
4445
  }
4479
4446
  }, [html, editor]);
4480
- React25__namespace.useEffect(() => {
4447
+ React26__namespace.useEffect(() => {
4481
4448
  if (editor) {
4482
4449
  editor.setEditable(!disabled);
4483
4450
  }
4484
4451
  }, [disabled, editor]);
4485
- const attachments_from_props_ref = React25__namespace.useRef(false);
4486
- const prev_initial_attachments_ref = React25__namespace.useRef(initial_attachments);
4487
- React25__namespace.useEffect(() => {
4452
+ const attachments_from_props_ref = React26__namespace.useRef(false);
4453
+ const prev_initial_attachments_ref = React26__namespace.useRef(initial_attachments);
4454
+ React26__namespace.useEffect(() => {
4488
4455
  if (JSON.stringify(initial_attachments) !== JSON.stringify(prev_initial_attachments_ref.current)) {
4489
4456
  prev_initial_attachments_ref.current = initial_attachments;
4490
4457
  attachments_from_props_ref.current = true;
4491
4458
  set_attachments(initial_attachments);
4492
4459
  }
4493
4460
  }, [initial_attachments]);
4494
- React25__namespace.useEffect(() => {
4461
+ React26__namespace.useEffect(() => {
4495
4462
  if (attachments_from_props_ref.current) {
4496
4463
  attachments_from_props_ref.current = false;
4497
4464
  return;
@@ -4993,12 +4960,12 @@ var CommandPopover = ({
4993
4960
  on_selection_change: _on_selection_change,
4994
4961
  prefix_color
4995
4962
  }) => {
4996
- const container_ref = React25__namespace.useRef(null);
4997
- const grouped_commands = React25__namespace.useMemo(
4963
+ const container_ref = React26__namespace.useRef(null);
4964
+ const grouped_commands = React26__namespace.useMemo(
4998
4965
  () => group_commands(commands),
4999
4966
  [commands]
5000
4967
  );
5001
- React25__namespace.useEffect(() => {
4968
+ React26__namespace.useEffect(() => {
5002
4969
  const handle_click_outside = (e) => {
5003
4970
  if (container_ref.current && !container_ref.current.contains(e.target)) {
5004
4971
  on_close();
@@ -5011,8 +4978,8 @@ var CommandPopover = ({
5011
4978
  };
5012
4979
  }
5013
4980
  }, [is_open, on_close]);
5014
- const [mounted, set_mounted] = React25__namespace.useState(false);
5015
- React25__namespace.useEffect(() => {
4981
+ const [mounted, set_mounted] = React26__namespace.useState(false);
4982
+ React26__namespace.useEffect(() => {
5016
4983
  set_mounted(true);
5017
4984
  }, []);
5018
4985
  if (!is_open || !mounted) return null;
@@ -5322,21 +5289,21 @@ var HazoUiTextbox = ({
5322
5289
  on_command_change,
5323
5290
  on_command_remove
5324
5291
  }) => {
5325
- const generated_instance_id = React25__namespace.useId();
5292
+ const generated_instance_id = React26__namespace.useId();
5326
5293
  const instance_id = provided_instance_id || generated_instance_id;
5327
- const [suggestion_state, set_suggestion_state] = React25__namespace.useState(null);
5328
- const [selected_index, set_selected_index] = React25__namespace.useState(0);
5329
- const [popover_position, set_popover_position] = React25__namespace.useState({ top: 0, left: 0 });
5330
- const [edit_context, set_edit_context] = React25__namespace.useState(null);
5331
- const [edit_selected_index, set_edit_selected_index] = React25__namespace.useState(0);
5294
+ const [suggestion_state, set_suggestion_state] = React26__namespace.useState(null);
5295
+ const [selected_index, set_selected_index] = React26__namespace.useState(0);
5296
+ const [popover_position, set_popover_position] = React26__namespace.useState({ top: 0, left: 0 });
5297
+ const [edit_context, set_edit_context] = React26__namespace.useState(null);
5298
+ const [edit_selected_index, set_edit_selected_index] = React26__namespace.useState(0);
5332
5299
  const is_controlled = value !== void 0;
5333
- const editor_container_ref = React25__namespace.useRef(null);
5334
- const edit_popover_ref = React25__namespace.useRef(null);
5335
- const [mounted, set_mounted] = React25__namespace.useState(false);
5336
- React25__namespace.useEffect(() => {
5300
+ const editor_container_ref = React26__namespace.useRef(null);
5301
+ const edit_popover_ref = React26__namespace.useRef(null);
5302
+ const [mounted, set_mounted] = React26__namespace.useState(false);
5303
+ React26__namespace.useEffect(() => {
5337
5304
  set_mounted(true);
5338
5305
  }, []);
5339
- const suggestion_extensions = React25__namespace.useMemo(() => {
5306
+ const suggestion_extensions = React26__namespace.useMemo(() => {
5340
5307
  return create_command_suggestion_extension({
5341
5308
  prefixes,
5342
5309
  instance_id,
@@ -5387,7 +5354,7 @@ var HazoUiTextbox = ({
5387
5354
  }
5388
5355
  }
5389
5356
  });
5390
- React25__namespace.useEffect(() => {
5357
+ React26__namespace.useEffect(() => {
5391
5358
  if (suggestion_state?.is_active && editor) {
5392
5359
  requestAnimationFrame(() => {
5393
5360
  const { from } = suggestion_state.range;
@@ -5411,7 +5378,7 @@ var HazoUiTextbox = ({
5411
5378
  });
5412
5379
  }
5413
5380
  }, [suggestion_state, editor]);
5414
- React25__namespace.useEffect(() => {
5381
+ React26__namespace.useEffect(() => {
5415
5382
  if (is_controlled && editor && !editor.isFocused) {
5416
5383
  const current_text = editor.getText();
5417
5384
  if (value !== current_text) {
@@ -5420,12 +5387,12 @@ var HazoUiTextbox = ({
5420
5387
  }
5421
5388
  }
5422
5389
  }, [value, editor, is_controlled, prefixes, pill_variant]);
5423
- React25__namespace.useEffect(() => {
5390
+ React26__namespace.useEffect(() => {
5424
5391
  if (editor) {
5425
5392
  editor.setEditable(!disabled);
5426
5393
  }
5427
5394
  }, [disabled, editor]);
5428
- const handle_command_select = React25__namespace.useCallback(
5395
+ const handle_command_select = React26__namespace.useCallback(
5429
5396
  (command) => {
5430
5397
  if (!editor || !suggestion_state) return;
5431
5398
  const prefix_config = prefixes.find((p) => p.char === suggestion_state.prefix);
@@ -5445,15 +5412,15 @@ var HazoUiTextbox = ({
5445
5412
  },
5446
5413
  [editor, suggestion_state, pill_variant, on_command_insert, prefixes]
5447
5414
  );
5448
- const handle_popover_close = React25__namespace.useCallback(() => {
5415
+ const handle_popover_close = React26__namespace.useCallback(() => {
5449
5416
  set_suggestion_state(null);
5450
5417
  editor?.commands.focus();
5451
5418
  }, [editor]);
5452
- const handle_edit_close = React25__namespace.useCallback(() => {
5419
+ const handle_edit_close = React26__namespace.useCallback(() => {
5453
5420
  set_edit_context(null);
5454
5421
  editor?.commands.focus();
5455
5422
  }, [editor]);
5456
- const handle_command_update = React25__namespace.useCallback(
5423
+ const handle_command_update = React26__namespace.useCallback(
5457
5424
  (new_command) => {
5458
5425
  if (!editor || !edit_context) return;
5459
5426
  const old_command = edit_context.command;
@@ -5469,7 +5436,7 @@ var HazoUiTextbox = ({
5469
5436
  },
5470
5437
  [editor, edit_context, on_command_change]
5471
5438
  );
5472
- const handle_command_remove = React25__namespace.useCallback(() => {
5439
+ const handle_command_remove = React26__namespace.useCallback(() => {
5473
5440
  if (!editor || !edit_context) return;
5474
5441
  const command = edit_context.command;
5475
5442
  editor.state.doc.descendants((node, pos) => {
@@ -5483,7 +5450,7 @@ var HazoUiTextbox = ({
5483
5450
  }
5484
5451
  set_edit_context(null);
5485
5452
  }, [editor, edit_context, on_command_remove]);
5486
- const filtered_commands = React25__namespace.useMemo(() => {
5453
+ const filtered_commands = React26__namespace.useMemo(() => {
5487
5454
  if (!suggestion_state) return [];
5488
5455
  const query = suggestion_state.query.toLowerCase();
5489
5456
  if (!query) return suggestion_state.commands;
@@ -5491,7 +5458,7 @@ var HazoUiTextbox = ({
5491
5458
  (cmd) => cmd.action_label.toLowerCase().includes(query) || cmd.action.toLowerCase().includes(query) || cmd.action_description?.toLowerCase().includes(query)
5492
5459
  );
5493
5460
  }, [suggestion_state]);
5494
- React25__namespace.useEffect(() => {
5461
+ React26__namespace.useEffect(() => {
5495
5462
  if (!suggestion_state?.is_active) return;
5496
5463
  const handle_keydown = (e) => {
5497
5464
  switch (e.key) {
@@ -5526,7 +5493,7 @@ var HazoUiTextbox = ({
5526
5493
  handle_command_select,
5527
5494
  handle_popover_close
5528
5495
  ]);
5529
- React25__namespace.useEffect(() => {
5496
+ React26__namespace.useEffect(() => {
5530
5497
  if (!edit_context) return;
5531
5498
  const handle_click_outside = (e) => {
5532
5499
  if (edit_popover_ref.current && !edit_popover_ref.current.contains(e.target)) {
@@ -5541,12 +5508,12 @@ var HazoUiTextbox = ({
5541
5508
  document.removeEventListener("mousedown", handle_click_outside);
5542
5509
  };
5543
5510
  }, [edit_context]);
5544
- const edit_commands = React25__namespace.useMemo(() => {
5511
+ const edit_commands = React26__namespace.useMemo(() => {
5545
5512
  if (!edit_context) return [];
5546
5513
  const prefix_config = prefixes.find((p) => p.char === edit_context.command.prefix);
5547
5514
  return prefix_config?.commands || [];
5548
5515
  }, [edit_context, prefixes]);
5549
- React25__namespace.useEffect(() => {
5516
+ React26__namespace.useEffect(() => {
5550
5517
  if (!edit_context) return;
5551
5518
  const handle_keydown = (e) => {
5552
5519
  switch (e.key) {
@@ -5584,7 +5551,7 @@ var HazoUiTextbox = ({
5584
5551
  handle_command_remove,
5585
5552
  handle_edit_close
5586
5553
  ]);
5587
- React25__namespace.useEffect(() => {
5554
+ React26__namespace.useEffect(() => {
5588
5555
  const handle_pill_click = (e) => {
5589
5556
  const detail = e.detail;
5590
5557
  const { id, prefix, action, action_label, node_pos } = detail;
@@ -5867,22 +5834,22 @@ var HazoUiTextarea = ({
5867
5834
  on_command_change,
5868
5835
  on_command_remove
5869
5836
  }) => {
5870
- const generated_instance_id = React25__namespace.useId();
5837
+ const generated_instance_id = React26__namespace.useId();
5871
5838
  const instance_id = provided_instance_id || generated_instance_id;
5872
- const [suggestion_state, set_suggestion_state] = React25__namespace.useState(null);
5873
- const [selected_index, set_selected_index] = React25__namespace.useState(0);
5874
- const [popover_position, set_popover_position] = React25__namespace.useState({ top: 0, left: 0 });
5875
- const [edit_context, set_edit_context] = React25__namespace.useState(null);
5876
- const [edit_selected_index, set_edit_selected_index] = React25__namespace.useState(0);
5839
+ const [suggestion_state, set_suggestion_state] = React26__namespace.useState(null);
5840
+ const [selected_index, set_selected_index] = React26__namespace.useState(0);
5841
+ const [popover_position, set_popover_position] = React26__namespace.useState({ top: 0, left: 0 });
5842
+ const [edit_context, set_edit_context] = React26__namespace.useState(null);
5843
+ const [edit_selected_index, set_edit_selected_index] = React26__namespace.useState(0);
5877
5844
  const is_controlled = value !== void 0;
5878
- const editor_container_ref = React25__namespace.useRef(null);
5879
- const edit_popover_ref = React25__namespace.useRef(null);
5880
- const [mounted, set_mounted] = React25__namespace.useState(false);
5881
- React25__namespace.useEffect(() => {
5845
+ const editor_container_ref = React26__namespace.useRef(null);
5846
+ const edit_popover_ref = React26__namespace.useRef(null);
5847
+ const [mounted, set_mounted] = React26__namespace.useState(false);
5848
+ React26__namespace.useEffect(() => {
5882
5849
  set_mounted(true);
5883
5850
  }, []);
5884
5851
  const calculated_min_height = rows ? `${rows * 1.5}em` : min_height;
5885
- const suggestion_extensions = React25__namespace.useMemo(() => {
5852
+ const suggestion_extensions = React26__namespace.useMemo(() => {
5886
5853
  return create_command_suggestion_extension({
5887
5854
  prefixes,
5888
5855
  instance_id,
@@ -5931,7 +5898,7 @@ var HazoUiTextarea = ({
5931
5898
  }
5932
5899
  }
5933
5900
  });
5934
- React25__namespace.useEffect(() => {
5901
+ React26__namespace.useEffect(() => {
5935
5902
  if (suggestion_state?.is_active && editor) {
5936
5903
  requestAnimationFrame(() => {
5937
5904
  const { from } = suggestion_state.range;
@@ -5955,7 +5922,7 @@ var HazoUiTextarea = ({
5955
5922
  });
5956
5923
  }
5957
5924
  }, [suggestion_state, editor]);
5958
- React25__namespace.useEffect(() => {
5925
+ React26__namespace.useEffect(() => {
5959
5926
  if (is_controlled && editor && !editor.isFocused) {
5960
5927
  const current_text = editor.getText();
5961
5928
  if (value !== current_text) {
@@ -5968,12 +5935,12 @@ var HazoUiTextarea = ({
5968
5935
  }
5969
5936
  }
5970
5937
  }, [value, editor, is_controlled, prefixes, pill_variant]);
5971
- React25__namespace.useEffect(() => {
5938
+ React26__namespace.useEffect(() => {
5972
5939
  if (editor) {
5973
5940
  editor.setEditable(!disabled);
5974
5941
  }
5975
5942
  }, [disabled, editor]);
5976
- const handle_command_select = React25__namespace.useCallback(
5943
+ const handle_command_select = React26__namespace.useCallback(
5977
5944
  (command) => {
5978
5945
  if (!editor || !suggestion_state) return;
5979
5946
  const prefix_config = prefixes.find((p) => p.char === suggestion_state.prefix);
@@ -5993,15 +5960,15 @@ var HazoUiTextarea = ({
5993
5960
  },
5994
5961
  [editor, suggestion_state, pill_variant, on_command_insert, prefixes]
5995
5962
  );
5996
- const handle_popover_close = React25__namespace.useCallback(() => {
5963
+ const handle_popover_close = React26__namespace.useCallback(() => {
5997
5964
  set_suggestion_state(null);
5998
5965
  editor?.commands.focus();
5999
5966
  }, [editor]);
6000
- const handle_edit_close = React25__namespace.useCallback(() => {
5967
+ const handle_edit_close = React26__namespace.useCallback(() => {
6001
5968
  set_edit_context(null);
6002
5969
  editor?.commands.focus();
6003
5970
  }, [editor]);
6004
- const handle_command_update = React25__namespace.useCallback(
5971
+ const handle_command_update = React26__namespace.useCallback(
6005
5972
  (new_command) => {
6006
5973
  if (!editor || !edit_context) return;
6007
5974
  const old_command = edit_context.command;
@@ -6017,7 +5984,7 @@ var HazoUiTextarea = ({
6017
5984
  },
6018
5985
  [editor, edit_context, on_command_change]
6019
5986
  );
6020
- const handle_command_remove = React25__namespace.useCallback(() => {
5987
+ const handle_command_remove = React26__namespace.useCallback(() => {
6021
5988
  if (!editor || !edit_context) return;
6022
5989
  const command = edit_context.command;
6023
5990
  editor.state.doc.descendants((node, pos) => {
@@ -6031,7 +5998,7 @@ var HazoUiTextarea = ({
6031
5998
  }
6032
5999
  set_edit_context(null);
6033
6000
  }, [editor, edit_context, on_command_remove]);
6034
- const filtered_commands = React25__namespace.useMemo(() => {
6001
+ const filtered_commands = React26__namespace.useMemo(() => {
6035
6002
  if (!suggestion_state) return [];
6036
6003
  const query = suggestion_state.query.toLowerCase();
6037
6004
  if (!query) return suggestion_state.commands;
@@ -6039,7 +6006,7 @@ var HazoUiTextarea = ({
6039
6006
  (cmd) => cmd.action_label.toLowerCase().includes(query) || cmd.action.toLowerCase().includes(query) || cmd.action_description?.toLowerCase().includes(query)
6040
6007
  );
6041
6008
  }, [suggestion_state]);
6042
- React25__namespace.useEffect(() => {
6009
+ React26__namespace.useEffect(() => {
6043
6010
  if (!suggestion_state?.is_active) return;
6044
6011
  const handle_keydown = (e) => {
6045
6012
  switch (e.key) {
@@ -6074,7 +6041,7 @@ var HazoUiTextarea = ({
6074
6041
  handle_command_select,
6075
6042
  handle_popover_close
6076
6043
  ]);
6077
- React25__namespace.useEffect(() => {
6044
+ React26__namespace.useEffect(() => {
6078
6045
  if (!edit_context) return;
6079
6046
  const handle_click_outside = (e) => {
6080
6047
  if (edit_popover_ref.current && !edit_popover_ref.current.contains(e.target)) {
@@ -6089,12 +6056,12 @@ var HazoUiTextarea = ({
6089
6056
  document.removeEventListener("mousedown", handle_click_outside);
6090
6057
  };
6091
6058
  }, [edit_context]);
6092
- const edit_commands = React25__namespace.useMemo(() => {
6059
+ const edit_commands = React26__namespace.useMemo(() => {
6093
6060
  if (!edit_context) return [];
6094
6061
  const prefix_config = prefixes.find((p) => p.char === edit_context.command.prefix);
6095
6062
  return prefix_config?.commands || [];
6096
6063
  }, [edit_context, prefixes]);
6097
- React25__namespace.useEffect(() => {
6064
+ React26__namespace.useEffect(() => {
6098
6065
  if (!edit_context) return;
6099
6066
  const handle_keydown = (e) => {
6100
6067
  switch (e.key) {
@@ -6132,7 +6099,7 @@ var HazoUiTextarea = ({
6132
6099
  handle_command_remove,
6133
6100
  handle_edit_close
6134
6101
  ]);
6135
- React25__namespace.useEffect(() => {
6102
+ React26__namespace.useEffect(() => {
6136
6103
  const handle_pill_click = (e) => {
6137
6104
  const detail = e.detail;
6138
6105
  const { id, prefix, action, action_label, node_pos } = detail;
@@ -6679,7 +6646,7 @@ function HazoUiConfirmDialog({
6679
6646
  openAnimation = "zoom",
6680
6647
  closeAnimation = "zoom"
6681
6648
  }) {
6682
- const [internal_loading, set_internal_loading] = React25__namespace.useState(false);
6649
+ const [internal_loading, set_internal_loading] = React26__namespace.useState(false);
6683
6650
  const config = get_hazo_ui_config();
6684
6651
  const variant_preset = variant !== "default" ? CONFIRM_VARIANT_PRESETS[variant] : void 0;
6685
6652
  const is_loading = external_loading ?? internal_loading;
@@ -6716,7 +6683,7 @@ function HazoUiConfirmDialog({
6716
6683
  onCancel?.();
6717
6684
  onOpenChange(false);
6718
6685
  };
6719
- const cancel_ref = React25__namespace.useRef(null);
6686
+ const cancel_ref = React26__namespace.useRef(null);
6720
6687
  return /* @__PURE__ */ jsxRuntime.jsx(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxRuntime.jsxs(DialogPortal, { children: [
6721
6688
  /* @__PURE__ */ jsxRuntime.jsx(
6722
6689
  DialogOverlay,
@@ -6801,7 +6768,7 @@ Drawer.displayName = "Drawer";
6801
6768
  var DrawerTrigger = vaul.Drawer.Trigger;
6802
6769
  var DrawerPortal = vaul.Drawer.Portal;
6803
6770
  var DrawerClose = vaul.Drawer.Close;
6804
- var DrawerOverlay = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
6771
+ var DrawerOverlay = React26__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
6805
6772
  vaul.Drawer.Overlay,
6806
6773
  {
6807
6774
  ref,
@@ -6813,7 +6780,7 @@ var DrawerOverlay = React25__namespace.forwardRef(({ className, ...props }, ref)
6813
6780
  }
6814
6781
  ));
6815
6782
  DrawerOverlay.displayName = "DrawerOverlay";
6816
- var DrawerContent = React25__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(DrawerPortal, { children: [
6783
+ var DrawerContent = React26__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(DrawerPortal, { children: [
6817
6784
  /* @__PURE__ */ jsxRuntime.jsx(DrawerOverlay, {}),
6818
6785
  /* @__PURE__ */ jsxRuntime.jsxs(
6819
6786
  vaul.Drawer.Content,
@@ -6854,7 +6821,7 @@ var DrawerFooter = ({
6854
6821
  }
6855
6822
  );
6856
6823
  DrawerFooter.displayName = "DrawerFooter";
6857
- var DrawerTitle = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
6824
+ var DrawerTitle = React26__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
6858
6825
  vaul.Drawer.Title,
6859
6826
  {
6860
6827
  ref,
@@ -6866,7 +6833,7 @@ var DrawerTitle = React25__namespace.forwardRef(({ className, ...props }, ref) =
6866
6833
  }
6867
6834
  ));
6868
6835
  DrawerTitle.displayName = "DrawerTitle";
6869
- var DrawerDescription = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
6836
+ var DrawerDescription = React26__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
6870
6837
  vaul.Drawer.Description,
6871
6838
  {
6872
6839
  ref,
@@ -6876,14 +6843,14 @@ var DrawerDescription = React25__namespace.forwardRef(({ className, ...props },
6876
6843
  ));
6877
6844
  DrawerDescription.displayName = "DrawerDescription";
6878
6845
  function useMediaQuery(query) {
6879
- const get_match = React25__namespace.useCallback(() => {
6846
+ const get_match = React26__namespace.useCallback(() => {
6880
6847
  if (typeof window === "undefined" || typeof window.matchMedia !== "function") {
6881
6848
  return false;
6882
6849
  }
6883
6850
  return window.matchMedia(query).matches;
6884
6851
  }, [query]);
6885
- const [matches, set_matches] = React25__namespace.useState(false);
6886
- React25__namespace.useEffect(() => {
6852
+ const [matches, set_matches] = React26__namespace.useState(false);
6853
+ React26__namespace.useEffect(() => {
6887
6854
  if (typeof window === "undefined" || typeof window.matchMedia !== "function") {
6888
6855
  return;
6889
6856
  }
@@ -6900,7 +6867,7 @@ function useMediaQuery(query) {
6900
6867
  return matches;
6901
6868
  }
6902
6869
  var Accordion = AccordionPrimitive__namespace.Root;
6903
- var AccordionItem = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
6870
+ var AccordionItem = React26__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
6904
6871
  AccordionPrimitive__namespace.Item,
6905
6872
  {
6906
6873
  ref,
@@ -6909,7 +6876,7 @@ var AccordionItem = React25__namespace.forwardRef(({ className, ...props }, ref)
6909
6876
  }
6910
6877
  ));
6911
6878
  AccordionItem.displayName = "AccordionItem";
6912
- var AccordionTrigger = React25__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(AccordionPrimitive__namespace.Header, { className: "flex", children: /* @__PURE__ */ jsxRuntime.jsxs(
6879
+ var AccordionTrigger = React26__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(AccordionPrimitive__namespace.Header, { className: "flex", children: /* @__PURE__ */ jsxRuntime.jsxs(
6913
6880
  AccordionPrimitive__namespace.Trigger,
6914
6881
  {
6915
6882
  ref,
@@ -6925,7 +6892,7 @@ var AccordionTrigger = React25__namespace.forwardRef(({ className, children, ...
6925
6892
  }
6926
6893
  ) }));
6927
6894
  AccordionTrigger.displayName = AccordionPrimitive__namespace.Trigger.displayName;
6928
- var AccordionContent = React25__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
6895
+ var AccordionContent = React26__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
6929
6896
  AccordionPrimitive__namespace.Content,
6930
6897
  {
6931
6898
  ref,
@@ -6935,7 +6902,7 @@ var AccordionContent = React25__namespace.forwardRef(({ className, children, ...
6935
6902
  }
6936
6903
  ));
6937
6904
  AccordionContent.displayName = AccordionPrimitive__namespace.Content.displayName;
6938
- var Checkbox = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
6905
+ var Checkbox = React26__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
6939
6906
  CheckboxPrimitive__namespace.Root,
6940
6907
  {
6941
6908
  ref,
@@ -6960,7 +6927,7 @@ var DropdownMenuGroup = DropdownMenuPrimitive__namespace.Group;
6960
6927
  var DropdownMenuPortal = DropdownMenuPrimitive__namespace.Portal;
6961
6928
  var DropdownMenuSub = DropdownMenuPrimitive__namespace.Sub;
6962
6929
  var DropdownMenuRadioGroup = DropdownMenuPrimitive__namespace.RadioGroup;
6963
- var DropdownMenuSubTrigger = React25__namespace.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
6930
+ var DropdownMenuSubTrigger = React26__namespace.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
6964
6931
  DropdownMenuPrimitive__namespace.SubTrigger,
6965
6932
  {
6966
6933
  ref,
@@ -6977,7 +6944,7 @@ var DropdownMenuSubTrigger = React25__namespace.forwardRef(({ className, inset,
6977
6944
  }
6978
6945
  ));
6979
6946
  DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive__namespace.SubTrigger.displayName;
6980
- var DropdownMenuSubContent = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
6947
+ var DropdownMenuSubContent = React26__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
6981
6948
  DropdownMenuPrimitive__namespace.SubContent,
6982
6949
  {
6983
6950
  ref,
@@ -6989,7 +6956,7 @@ var DropdownMenuSubContent = React25__namespace.forwardRef(({ className, ...prop
6989
6956
  }
6990
6957
  ));
6991
6958
  DropdownMenuSubContent.displayName = DropdownMenuPrimitive__namespace.SubContent.displayName;
6992
- var DropdownMenuContent = React25__namespace.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
6959
+ var DropdownMenuContent = React26__namespace.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
6993
6960
  DropdownMenuPrimitive__namespace.Content,
6994
6961
  {
6995
6962
  ref,
@@ -7002,7 +6969,7 @@ var DropdownMenuContent = React25__namespace.forwardRef(({ className, sideOffset
7002
6969
  }
7003
6970
  ) }));
7004
6971
  DropdownMenuContent.displayName = DropdownMenuPrimitive__namespace.Content.displayName;
7005
- var DropdownMenuItem = React25__namespace.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
6972
+ var DropdownMenuItem = React26__namespace.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
7006
6973
  DropdownMenuPrimitive__namespace.Item,
7007
6974
  {
7008
6975
  ref,
@@ -7015,7 +6982,7 @@ var DropdownMenuItem = React25__namespace.forwardRef(({ className, inset, ...pro
7015
6982
  }
7016
6983
  ));
7017
6984
  DropdownMenuItem.displayName = DropdownMenuPrimitive__namespace.Item.displayName;
7018
- var DropdownMenuCheckboxItem = React25__namespace.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
6985
+ var DropdownMenuCheckboxItem = React26__namespace.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
7019
6986
  DropdownMenuPrimitive__namespace.CheckboxItem,
7020
6987
  {
7021
6988
  ref,
@@ -7032,7 +6999,7 @@ var DropdownMenuCheckboxItem = React25__namespace.forwardRef(({ className, child
7032
6999
  }
7033
7000
  ));
7034
7001
  DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive__namespace.CheckboxItem.displayName;
7035
- var DropdownMenuRadioItem = React25__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
7002
+ var DropdownMenuRadioItem = React26__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
7036
7003
  DropdownMenuPrimitive__namespace.RadioItem,
7037
7004
  {
7038
7005
  ref,
@@ -7048,7 +7015,7 @@ var DropdownMenuRadioItem = React25__namespace.forwardRef(({ className, children
7048
7015
  }
7049
7016
  ));
7050
7017
  DropdownMenuRadioItem.displayName = DropdownMenuPrimitive__namespace.RadioItem.displayName;
7051
- var DropdownMenuLabel = React25__namespace.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
7018
+ var DropdownMenuLabel = React26__namespace.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
7052
7019
  DropdownMenuPrimitive__namespace.Label,
7053
7020
  {
7054
7021
  ref,
@@ -7061,7 +7028,7 @@ var DropdownMenuLabel = React25__namespace.forwardRef(({ className, inset, ...pr
7061
7028
  }
7062
7029
  ));
7063
7030
  DropdownMenuLabel.displayName = DropdownMenuPrimitive__namespace.Label.displayName;
7064
- var DropdownMenuSeparator = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
7031
+ var DropdownMenuSeparator = React26__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
7065
7032
  DropdownMenuPrimitive__namespace.Separator,
7066
7033
  {
7067
7034
  ref,
@@ -7085,7 +7052,7 @@ var DropdownMenuShortcut = ({
7085
7052
  DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
7086
7053
  var HoverCard = HoverCardPrimitive__namespace.Root;
7087
7054
  var HoverCardTrigger = HoverCardPrimitive__namespace.Trigger;
7088
- var HoverCardContent = React25__namespace.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
7055
+ var HoverCardContent = React26__namespace.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
7089
7056
  HoverCardPrimitive__namespace.Content,
7090
7057
  {
7091
7058
  ref,
@@ -7099,7 +7066,7 @@ var HoverCardContent = React25__namespace.forwardRef(({ className, align = "cent
7099
7066
  }
7100
7067
  ));
7101
7068
  HoverCardContent.displayName = HoverCardPrimitive__namespace.Content.displayName;
7102
- var Label3 = React25__namespace.forwardRef(
7069
+ var Label3 = React26__namespace.forwardRef(
7103
7070
  ({ className, ...props }, ref) => {
7104
7071
  return /* @__PURE__ */ jsxRuntime.jsx(
7105
7072
  "label",
@@ -7115,7 +7082,7 @@ var Label3 = React25__namespace.forwardRef(
7115
7082
  }
7116
7083
  );
7117
7084
  Label3.displayName = "Label";
7118
- var Switch = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
7085
+ var Switch = React26__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
7119
7086
  SwitchPrimitives__namespace.Root,
7120
7087
  {
7121
7088
  className: cn(
@@ -7135,7 +7102,7 @@ var Switch = React25__namespace.forwardRef(({ className, ...props }, ref) => /*
7135
7102
  }
7136
7103
  ));
7137
7104
  Switch.displayName = SwitchPrimitives__namespace.Root.displayName;
7138
- var Textarea = React25__namespace.forwardRef(
7105
+ var Textarea = React26__namespace.forwardRef(
7139
7106
  ({ className, ...props }, ref) => {
7140
7107
  return /* @__PURE__ */ jsxRuntime.jsx(
7141
7108
  "textarea",
@@ -7155,7 +7122,7 @@ var Textarea = React25__namespace.forwardRef(
7155
7122
  }
7156
7123
  );
7157
7124
  Textarea.displayName = "Textarea";
7158
- var Separator3 = React25__namespace.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
7125
+ var Separator3 = React26__namespace.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
7159
7126
  SeparatorPrimitive__namespace.Root,
7160
7127
  {
7161
7128
  ref,
@@ -7173,7 +7140,7 @@ Separator3.displayName = SeparatorPrimitive__namespace.Root.displayName;
7173
7140
  var Collapsible = CollapsiblePrimitive__namespace.Root;
7174
7141
  var CollapsibleTrigger2 = CollapsiblePrimitive__namespace.CollapsibleTrigger;
7175
7142
  var CollapsibleContent2 = CollapsiblePrimitive__namespace.CollapsibleContent;
7176
- var ScrollArea = React25__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
7143
+ var ScrollArea = React26__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
7177
7144
  ScrollAreaPrimitive__namespace.Root,
7178
7145
  {
7179
7146
  ref,
@@ -7187,7 +7154,7 @@ var ScrollArea = React25__namespace.forwardRef(({ className, children, ...props
7187
7154
  }
7188
7155
  ));
7189
7156
  ScrollArea.displayName = ScrollAreaPrimitive__namespace.Root.displayName;
7190
- var ScrollBar = React25__namespace.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
7157
+ var ScrollBar = React26__namespace.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
7191
7158
  ScrollAreaPrimitive__namespace.ScrollAreaScrollbar,
7192
7159
  {
7193
7160
  ref,
@@ -7203,27 +7170,27 @@ var ScrollBar = React25__namespace.forwardRef(({ className, orientation = "verti
7203
7170
  }
7204
7171
  ));
7205
7172
  ScrollBar.displayName = ScrollAreaPrimitive__namespace.ScrollAreaScrollbar.displayName;
7206
- var Card = React25__namespace.forwardRef(
7173
+ var Card = React26__namespace.forwardRef(
7207
7174
  ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("rounded-lg border bg-card text-card-foreground shadow-sm", className), ...props })
7208
7175
  );
7209
7176
  Card.displayName = "Card";
7210
- var CardHeader = React25__namespace.forwardRef(
7177
+ var CardHeader = React26__namespace.forwardRef(
7211
7178
  ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("flex flex-col space-y-1.5 p-6", className), ...props })
7212
7179
  );
7213
7180
  CardHeader.displayName = "CardHeader";
7214
- var CardTitle = React25__namespace.forwardRef(
7181
+ var CardTitle = React26__namespace.forwardRef(
7215
7182
  ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("h3", { ref, className: cn("text-2xl font-semibold leading-none tracking-tight", className), ...props })
7216
7183
  );
7217
7184
  CardTitle.displayName = "CardTitle";
7218
- var CardDescription = React25__namespace.forwardRef(
7185
+ var CardDescription = React26__namespace.forwardRef(
7219
7186
  ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("p", { ref, className: cn("text-sm text-muted-foreground", className), ...props })
7220
7187
  );
7221
7188
  CardDescription.displayName = "CardDescription";
7222
- var CardContent = React25__namespace.forwardRef(
7189
+ var CardContent = React26__namespace.forwardRef(
7223
7190
  ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("p-6 pt-0", className), ...props })
7224
7191
  );
7225
7192
  CardContent.displayName = "CardContent";
7226
- var CardFooter = React25__namespace.forwardRef(
7193
+ var CardFooter = React26__namespace.forwardRef(
7227
7194
  ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("flex items-center p-6 pt-0", className), ...props })
7228
7195
  );
7229
7196
  CardFooter.displayName = "CardFooter";
@@ -7256,16 +7223,16 @@ var toggleVariants = classVarianceAuthority.cva(
7256
7223
  defaultVariants: { variant: "default", size: "default" }
7257
7224
  }
7258
7225
  );
7259
- var Toggle = React25__namespace.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(TogglePrimitive__namespace.Root, { ref, className: cn(toggleVariants({ variant, size, className })), ...props }));
7226
+ var Toggle = React26__namespace.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(TogglePrimitive__namespace.Root, { ref, className: cn(toggleVariants({ variant, size, className })), ...props }));
7260
7227
  Toggle.displayName = TogglePrimitive__namespace.Root.displayName;
7261
- var ToggleGroupContext = React25__namespace.createContext({
7228
+ var ToggleGroupContext = React26__namespace.createContext({
7262
7229
  size: "default",
7263
7230
  variant: "default"
7264
7231
  });
7265
- var ToggleGroup = React25__namespace.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(ToggleGroupPrimitive__namespace.Root, { ref, className: cn("flex items-center justify-center gap-1", className), ...props, children: /* @__PURE__ */ jsxRuntime.jsx(ToggleGroupContext.Provider, { value: { variant, size }, children }) }));
7232
+ var ToggleGroup = React26__namespace.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(ToggleGroupPrimitive__namespace.Root, { ref, className: cn("flex items-center justify-center gap-1", className), ...props, children: /* @__PURE__ */ jsxRuntime.jsx(ToggleGroupContext.Provider, { value: { variant, size }, children }) }));
7266
7233
  ToggleGroup.displayName = ToggleGroupPrimitive__namespace.Root.displayName;
7267
- var ToggleGroupItem = React25__namespace.forwardRef(({ className, children, variant, size, ...props }, ref) => {
7268
- const context = React25__namespace.useContext(ToggleGroupContext);
7234
+ var ToggleGroupItem = React26__namespace.forwardRef(({ className, children, variant, size, ...props }, ref) => {
7235
+ const context = React26__namespace.useContext(ToggleGroupContext);
7269
7236
  return /* @__PURE__ */ jsxRuntime.jsx(
7270
7237
  ToggleGroupPrimitive__namespace.Item,
7271
7238
  {
@@ -7280,7 +7247,7 @@ ToggleGroupItem.displayName = ToggleGroupPrimitive__namespace.Item.displayName;
7280
7247
  var AlertDialog = AlertDialogPrimitive__namespace.Root;
7281
7248
  var AlertDialogTrigger = AlertDialogPrimitive__namespace.Trigger;
7282
7249
  var AlertDialogPortal = AlertDialogPrimitive__namespace.Portal;
7283
- var AlertDialogOverlay = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
7250
+ var AlertDialogOverlay = React26__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
7284
7251
  AlertDialogPrimitive__namespace.Overlay,
7285
7252
  {
7286
7253
  ref,
@@ -7289,7 +7256,7 @@ var AlertDialogOverlay = React25__namespace.forwardRef(({ className, ...props },
7289
7256
  }
7290
7257
  ));
7291
7258
  AlertDialogOverlay.displayName = AlertDialogPrimitive__namespace.Overlay.displayName;
7292
- var AlertDialogContent = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(AlertDialogPortal, { children: [
7259
+ var AlertDialogContent = React26__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(AlertDialogPortal, { children: [
7293
7260
  /* @__PURE__ */ jsxRuntime.jsx(AlertDialogOverlay, {}),
7294
7261
  /* @__PURE__ */ jsxRuntime.jsx(
7295
7262
  AlertDialogPrimitive__namespace.Content,
@@ -7305,13 +7272,13 @@ var AlertDialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.
7305
7272
  AlertDialogHeader.displayName = "AlertDialogHeader";
7306
7273
  var AlertDialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className), ...props });
7307
7274
  AlertDialogFooter.displayName = "AlertDialogFooter";
7308
- var AlertDialogTitle = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(AlertDialogPrimitive__namespace.Title, { ref, className: cn("text-lg font-semibold", className), ...props }));
7275
+ var AlertDialogTitle = React26__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(AlertDialogPrimitive__namespace.Title, { ref, className: cn("text-lg font-semibold", className), ...props }));
7309
7276
  AlertDialogTitle.displayName = AlertDialogPrimitive__namespace.Title.displayName;
7310
- var AlertDialogDescription = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(AlertDialogPrimitive__namespace.Description, { ref, className: cn("text-sm text-muted-foreground", className), ...props }));
7277
+ var AlertDialogDescription = React26__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(AlertDialogPrimitive__namespace.Description, { ref, className: cn("text-sm text-muted-foreground", className), ...props }));
7311
7278
  AlertDialogDescription.displayName = AlertDialogPrimitive__namespace.Description.displayName;
7312
- var AlertDialogAction = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(AlertDialogPrimitive__namespace.Action, { ref, className: cn(buttonVariants(), className), ...props }));
7279
+ var AlertDialogAction = React26__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(AlertDialogPrimitive__namespace.Action, { ref, className: cn(buttonVariants(), className), ...props }));
7313
7280
  AlertDialogAction.displayName = AlertDialogPrimitive__namespace.Action.displayName;
7314
- var AlertDialogCancel = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(AlertDialogPrimitive__namespace.Cancel, { ref, className: cn(buttonVariants({ variant: "outline" }), "mt-2 sm:mt-0", className), ...props }));
7281
+ var AlertDialogCancel = React26__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(AlertDialogPrimitive__namespace.Cancel, { ref, className: cn(buttonVariants({ variant: "outline" }), "mt-2 sm:mt-0", className), ...props }));
7315
7282
  AlertDialogCancel.displayName = AlertDialogPrimitive__namespace.Cancel.displayName;
7316
7283
  var buttonGroupVariants = classVarianceAuthority.cva(
7317
7284
  "flex w-fit items-stretch [&>*]:focus-visible:relative [&>*]:focus-visible:z-10",
@@ -7339,7 +7306,7 @@ function ButtonGroupText({ className, asChild = false, ...props }) {
7339
7306
  function ButtonGroupSeparator({ className, orientation = "vertical", ...props }) {
7340
7307
  return /* @__PURE__ */ jsxRuntime.jsx(Separator3, { orientation, className: cn("bg-input relative !m-0 self-stretch data-[orientation=vertical]:h-auto", className), ...props });
7341
7308
  }
7342
- var SkeletonBase = React25__namespace.forwardRef(
7309
+ var SkeletonBase = React26__namespace.forwardRef(
7343
7310
  ({ className, ...rest }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
7344
7311
  "div",
7345
7312
  {
@@ -7515,8 +7482,8 @@ function LoadingTimeout({
7515
7482
  firm: thresholds?.firm ?? 15e3,
7516
7483
  expired: thresholds?.expired ?? 3e4
7517
7484
  };
7518
- const [phase, setPhase] = React25__namespace.useState(active ? "silent" : "idle");
7519
- React25__namespace.useEffect(() => {
7485
+ const [phase, setPhase] = React26__namespace.useState(active ? "silent" : "idle");
7486
+ React26__namespace.useEffect(() => {
7520
7487
  if (!active) {
7521
7488
  setPhase("idle");
7522
7489
  return;
@@ -7575,7 +7542,7 @@ function ProgressiveImage({
7575
7542
  onLoad,
7576
7543
  onError
7577
7544
  }) {
7578
- const [loaded, setLoaded] = React25__namespace.useState(false);
7545
+ const [loaded, setLoaded] = React26__namespace.useState(false);
7579
7546
  return /* @__PURE__ */ jsxRuntime.jsxs(
7580
7547
  "div",
7581
7548
  {
@@ -7656,8 +7623,8 @@ function errorToast({ title, description, duration = 5e3, action }) {
7656
7623
  });
7657
7624
  }
7658
7625
  function useLoadingState(initial = false) {
7659
- const [isLoading, setLoading] = React25.useState(initial);
7660
- const withLoading = React25.useCallback(async (fn) => {
7626
+ const [isLoading, setLoading] = React26.useState(initial);
7627
+ const withLoading = React26.useCallback(async (fn) => {
7661
7628
  setLoading(true);
7662
7629
  try {
7663
7630
  return await fn();
@@ -7668,8 +7635,8 @@ function useLoadingState(initial = false) {
7668
7635
  return { isLoading, setLoading, withLoading };
7669
7636
  }
7670
7637
  function useErrorDisplay() {
7671
- const [error, setRaw] = React25.useState(null);
7672
- const setError = React25.useCallback((value) => {
7638
+ const [error, setRaw] = React26.useState(null);
7639
+ const setError = React26.useCallback((value) => {
7673
7640
  if (value == null) {
7674
7641
  setRaw(null);
7675
7642
  return;
@@ -7684,12 +7651,12 @@ function useErrorDisplay() {
7684
7651
  }
7685
7652
  setRaw(String(value));
7686
7653
  }, []);
7687
- const clearError = React25.useCallback(() => setRaw(null), []);
7654
+ const clearError = React26.useCallback(() => setRaw(null), []);
7688
7655
  return { error, setError, clearError };
7689
7656
  }
7690
7657
  function useDebounce(value, delayMs) {
7691
- const [debounced_value, set_debounced_value] = React25.useState(value);
7692
- React25.useEffect(() => {
7658
+ const [debounced_value, set_debounced_value] = React26.useState(value);
7659
+ React26.useEffect(() => {
7693
7660
  const timer = setTimeout(() => {
7694
7661
  set_debounced_value(value);
7695
7662
  }, delayMs);
@@ -7698,8 +7665,8 @@ function useDebounce(value, delayMs) {
7698
7665
  return debounced_value;
7699
7666
  }
7700
7667
  function useCopyToClipboard() {
7701
- const [copied, set_copied] = React25.useState(false);
7702
- const copy = React25.useCallback(async (text) => {
7668
+ const [copied, set_copied] = React26.useState(false);
7669
+ const copy = React26.useCallback(async (text) => {
7703
7670
  if (typeof navigator === "undefined" || !navigator.clipboard) {
7704
7671
  return;
7705
7672
  }
@@ -7731,8 +7698,8 @@ function useLocalStorage(key, initialValue) {
7731
7698
  return initialValue;
7732
7699
  }
7733
7700
  };
7734
- const [stored_value, set_stored_value] = React25.useState(read_stored);
7735
- const set_value = React25.useCallback(
7701
+ const [stored_value, set_stored_value] = React26.useState(read_stored);
7702
+ const set_value = React26.useCallback(
7736
7703
  (value) => {
7737
7704
  set_stored_value((prev) => {
7738
7705
  const next = typeof value === "function" ? value(prev) : value;
@@ -7759,8 +7726,8 @@ function useSessionStorage(key, initialValue) {
7759
7726
  return initialValue;
7760
7727
  }
7761
7728
  };
7762
- const [stored_value, set_stored_value] = React25.useState(read_stored);
7763
- const set_value = React25.useCallback(
7729
+ const [stored_value, set_stored_value] = React26.useState(read_stored);
7730
+ const set_value = React26.useCallback(
7764
7731
  (value) => {
7765
7732
  set_stored_value((prev) => {
7766
7733
  const next = typeof value === "function" ? value(prev) : value;
@@ -7778,7 +7745,7 @@ function useSessionStorage(key, initialValue) {
7778
7745
  return [stored_value, set_value];
7779
7746
  }
7780
7747
  function useClickOutside(ref, handler) {
7781
- React25.useEffect(() => {
7748
+ React26.useEffect(() => {
7782
7749
  if (typeof document === "undefined") return;
7783
7750
  const handle_event = (event) => {
7784
7751
  const target = event.target;
@@ -7797,9 +7764,9 @@ function useClickOutside(ref, handler) {
7797
7764
  }
7798
7765
  function useWakeLock() {
7799
7766
  const supported = typeof navigator !== "undefined" && "wakeLock" in navigator;
7800
- const sentinel_ref = React25.useRef(null);
7801
- const [acquired, set_acquired] = React25.useState(false);
7802
- const request = React25.useCallback(async () => {
7767
+ const sentinel_ref = React26.useRef(null);
7768
+ const [acquired, set_acquired] = React26.useState(false);
7769
+ const request = React26.useCallback(async () => {
7803
7770
  if (!supported || sentinel_ref.current) return;
7804
7771
  try {
7805
7772
  const sentinel = await navigator.wakeLock.request("screen");
@@ -7812,7 +7779,7 @@ function useWakeLock() {
7812
7779
  } catch {
7813
7780
  }
7814
7781
  }, [supported]);
7815
- const release = React25.useCallback(async () => {
7782
+ const release = React26.useCallback(async () => {
7816
7783
  if (!sentinel_ref.current) return;
7817
7784
  try {
7818
7785
  await sentinel_ref.current.release();
@@ -7822,7 +7789,7 @@ function useWakeLock() {
7822
7789
  set_acquired(false);
7823
7790
  }
7824
7791
  }, []);
7825
- React25.useEffect(() => {
7792
+ React26.useEffect(() => {
7826
7793
  if (typeof document === "undefined") return;
7827
7794
  const handle_visibility = () => {
7828
7795
  if (document.visibilityState === "visible" && acquired && !sentinel_ref.current) {
@@ -7832,7 +7799,7 @@ function useWakeLock() {
7832
7799
  document.addEventListener("visibilitychange", handle_visibility);
7833
7800
  return () => document.removeEventListener("visibilitychange", handle_visibility);
7834
7801
  }, [acquired, request]);
7835
- React25.useEffect(() => {
7802
+ React26.useEffect(() => {
7836
7803
  return () => {
7837
7804
  if (sentinel_ref.current) {
7838
7805
  void sentinel_ref.current.release().catch(() => void 0);
@@ -7843,8 +7810,8 @@ function useWakeLock() {
7843
7810
  return { supported, acquired, request, release };
7844
7811
  }
7845
7812
  function useFullscreen(elementRef) {
7846
- const [is_fullscreen, set_is_fullscreen] = React25.useState(false);
7847
- React25.useEffect(() => {
7813
+ const [is_fullscreen, set_is_fullscreen] = React26.useState(false);
7814
+ React26.useEffect(() => {
7848
7815
  if (typeof document === "undefined") return;
7849
7816
  const handle_change = () => {
7850
7817
  set_is_fullscreen(!!document.fullscreenElement);
@@ -7853,10 +7820,10 @@ function useFullscreen(elementRef) {
7853
7820
  set_is_fullscreen(!!document.fullscreenElement);
7854
7821
  return () => document.removeEventListener("fullscreenchange", handle_change);
7855
7822
  }, []);
7856
- const get_target = React25.useCallback(() => {
7823
+ const get_target = React26.useCallback(() => {
7857
7824
  return elementRef?.current ?? document.documentElement;
7858
7825
  }, [elementRef]);
7859
- const enter = React25.useCallback(async () => {
7826
+ const enter = React26.useCallback(async () => {
7860
7827
  if (typeof document === "undefined" || !document.documentElement.requestFullscreen) return;
7861
7828
  if (document.fullscreenElement) return;
7862
7829
  try {
@@ -7864,7 +7831,7 @@ function useFullscreen(elementRef) {
7864
7831
  } catch {
7865
7832
  }
7866
7833
  }, [get_target]);
7867
- const exit = React25.useCallback(async () => {
7834
+ const exit = React26.useCallback(async () => {
7868
7835
  if (typeof document === "undefined") return;
7869
7836
  if (!document.fullscreenElement) return;
7870
7837
  try {
@@ -7872,7 +7839,7 @@ function useFullscreen(elementRef) {
7872
7839
  } catch {
7873
7840
  }
7874
7841
  }, []);
7875
- const toggle = React25.useCallback(async () => {
7842
+ const toggle = React26.useCallback(async () => {
7876
7843
  if (document.fullscreenElement) {
7877
7844
  await exit();
7878
7845
  } else {
@@ -8030,29 +7997,29 @@ function KanbanEditor({
8030
7997
  onSave,
8031
7998
  onClose
8032
7999
  }) {
8033
- const [draft, set_draft] = React25__namespace.useState(item);
8034
- const [saving, set_saving] = React25__namespace.useState(false);
8035
- const [error, set_error] = React25__namespace.useState(null);
8000
+ const [draft, set_draft] = React26__namespace.useState(item);
8001
+ const [saving, set_saving] = React26__namespace.useState(false);
8002
+ const [error, set_error] = React26__namespace.useState(null);
8036
8003
  const item_id = item?.id ?? null;
8037
- React25__namespace.useEffect(() => {
8004
+ React26__namespace.useEffect(() => {
8038
8005
  set_draft(item);
8039
8006
  set_error(null);
8040
8007
  set_saving(false);
8041
8008
  }, [item_id]);
8042
8009
  const resolved_columns = columns ?? [];
8043
8010
  const resolved_priorities = priorities ?? DEFAULT_PRIORITIES;
8044
- const resolved_fields = React25__namespace.useMemo(() => {
8011
+ const resolved_fields = React26__namespace.useMemo(() => {
8045
8012
  if (fields) return fields;
8046
8013
  if (!item) return [];
8047
8014
  return auto_detect_fields(item, resolved_columns);
8048
8015
  }, [fields, item, resolved_columns]);
8049
- const required_keys = React25__namespace.useMemo(
8016
+ const required_keys = React26__namespace.useMemo(
8050
8017
  () => resolved_fields.filter(
8051
8018
  (f) => f.required && (f.type === "text" || f.type === "textarea" || f.type === "number")
8052
8019
  ).map((f) => f.key),
8053
8020
  [resolved_fields]
8054
8021
  );
8055
- const all_required_filled = React25__namespace.useMemo(() => {
8022
+ const all_required_filled = React26__namespace.useMemo(() => {
8056
8023
  if (!draft) return false;
8057
8024
  for (const key of required_keys) {
8058
8025
  const v = draft[key];
@@ -8061,7 +8028,7 @@ function KanbanEditor({
8061
8028
  }
8062
8029
  return true;
8063
8030
  }, [draft, required_keys]);
8064
- const is_dirty = React25__namespace.useMemo(() => {
8031
+ const is_dirty = React26__namespace.useMemo(() => {
8065
8032
  if (!draft || !item) return false;
8066
8033
  try {
8067
8034
  return JSON.stringify(draft) !== JSON.stringify(item);
@@ -8069,7 +8036,7 @@ function KanbanEditor({
8069
8036
  return draft !== item;
8070
8037
  }
8071
8038
  }, [draft, item]);
8072
- const handle_save = React25__namespace.useCallback(async () => {
8039
+ const handle_save = React26__namespace.useCallback(async () => {
8073
8040
  if (!draft || !item) return;
8074
8041
  if (saving) return;
8075
8042
  set_error(null);
@@ -8288,11 +8255,11 @@ function HazoUiKanbanFilter({
8288
8255
  className
8289
8256
  }) {
8290
8257
  const is_controlled = value !== void 0;
8291
- const [internal, set_internal] = React25__namespace.useState(
8258
+ const [internal, set_internal] = React26__namespace.useState(
8292
8259
  defaultValue ?? EMPTY_FILTER
8293
8260
  );
8294
8261
  const current = is_controlled ? value : internal;
8295
- const update = React25__namespace.useCallback(
8262
+ const update = React26__namespace.useCallback(
8296
8263
  (next) => {
8297
8264
  if (!is_controlled) set_internal(next);
8298
8265
  onChange?.(next);
@@ -8455,29 +8422,29 @@ function HazoUiKanban({
8455
8422
  onCardSave,
8456
8423
  disableEdit = false
8457
8424
  }) {
8458
- const label_fn = React25__namespace.useCallback(
8425
+ const label_fn = React26__namespace.useCallback(
8459
8426
  (item) => itemLabel ? itemLabel(item) : item.id,
8460
8427
  [itemLabel]
8461
8428
  );
8462
- const dnd_context_id = React25__namespace.useId();
8463
- const [overlay, set_overlay] = React25__namespace.useState(
8429
+ const dnd_context_id = React26__namespace.useId();
8430
+ const [overlay, set_overlay] = React26__namespace.useState(
8464
8431
  /* @__PURE__ */ new Map()
8465
8432
  );
8466
- const [active_id, set_active_id] = React25__namespace.useState(null);
8467
- const [active_tab, set_active_tab] = React25__namespace.useState(columns[0]?.key ?? "");
8468
- const [editing_item, set_editing_item] = React25__namespace.useState(null);
8433
+ const [active_id, set_active_id] = React26__namespace.useState(null);
8434
+ const [active_tab, set_active_tab] = React26__namespace.useState(columns[0]?.key ?? "");
8435
+ const [editing_item, set_editing_item] = React26__namespace.useState(null);
8469
8436
  const show_edit = !disableEdit && typeof onCardSave === "function";
8470
- const handle_edit_request = React25__namespace.useCallback(
8437
+ const handle_edit_request = React26__namespace.useCallback(
8471
8438
  (it) => {
8472
8439
  const typed = items.find((x) => x.id === it.id);
8473
8440
  if (typed) set_editing_item(typed);
8474
8441
  },
8475
8442
  [items]
8476
8443
  );
8477
- const handle_editor_close = React25__namespace.useCallback(() => {
8444
+ const handle_editor_close = React26__namespace.useCallback(() => {
8478
8445
  set_editing_item(null);
8479
8446
  }, []);
8480
- React25__namespace.useEffect(() => {
8447
+ React26__namespace.useEffect(() => {
8481
8448
  if (overlay.size === 0) return;
8482
8449
  set_overlay((prev) => {
8483
8450
  let changed = false;
@@ -8492,11 +8459,11 @@ function HazoUiKanban({
8492
8459
  return changed ? next : prev;
8493
8460
  });
8494
8461
  }, [items, overlay]);
8495
- const grouped = React25__namespace.useMemo(
8462
+ const grouped = React26__namespace.useMemo(
8496
8463
  () => group_items_by_column(items, overlay, columns),
8497
8464
  [items, overlay, columns]
8498
8465
  );
8499
- const find_item = React25__namespace.useCallback(
8466
+ const find_item = React26__namespace.useCallback(
8500
8467
  (id) => items.find((i) => i.id === id),
8501
8468
  [items]
8502
8469
  );
@@ -8504,7 +8471,7 @@ function HazoUiKanban({
8504
8471
  core$1.useSensor(core$1.PointerSensor, { activationConstraint: { distance: 5 } }),
8505
8472
  core$1.useSensor(core$1.KeyboardSensor, { coordinateGetter: sortable.sortableKeyboardCoordinates })
8506
8473
  );
8507
- const merged_announcements = React25__namespace.useMemo(() => {
8474
+ const merged_announcements = React26__namespace.useMemo(() => {
8508
8475
  const defaults = default_announcements(label_fn);
8509
8476
  return {
8510
8477
  onDragStart: announcements?.onDragStart ?? defaults.onDragStart,
@@ -8513,7 +8480,7 @@ function HazoUiKanban({
8513
8480
  onDragCancel: announcements?.onDragCancel ?? defaults.onDragCancel
8514
8481
  };
8515
8482
  }, [announcements, label_fn]);
8516
- const dnd_announcements = React25__namespace.useMemo(
8483
+ const dnd_announcements = React26__namespace.useMemo(
8517
8484
  () => ({
8518
8485
  onDragStart({ active }) {
8519
8486
  const id = String(active.id);
@@ -8571,10 +8538,10 @@ function HazoUiKanban({
8571
8538
  }),
8572
8539
  [find_item, columns, grouped, merged_announcements]
8573
8540
  );
8574
- const handle_drag_start = React25__namespace.useCallback((event) => {
8541
+ const handle_drag_start = React26__namespace.useCallback((event) => {
8575
8542
  set_active_id(String(event.active.id));
8576
8543
  }, []);
8577
- const make_revert_handle = React25__namespace.useCallback(
8544
+ const make_revert_handle = React26__namespace.useCallback(
8578
8545
  (item_id) => ({
8579
8546
  revert: () => {
8580
8547
  set_overlay((prev) => {
@@ -8587,7 +8554,7 @@ function HazoUiKanban({
8587
8554
  }),
8588
8555
  []
8589
8556
  );
8590
- const handle_drag_end = React25__namespace.useCallback(
8557
+ const handle_drag_end = React26__namespace.useCallback(
8591
8558
  (event) => {
8592
8559
  const active_id_str = String(event.active.id);
8593
8560
  set_active_id(null);
@@ -8649,7 +8616,7 @@ function HazoUiKanban({
8649
8616
  },
8650
8617
  [find_item, columns, grouped, onMove, onReorder, make_revert_handle]
8651
8618
  );
8652
- const handle_drag_cancel = React25__namespace.useCallback(() => {
8619
+ const handle_drag_cancel = React26__namespace.useCallback(() => {
8653
8620
  set_active_id(null);
8654
8621
  }, []);
8655
8622
  const active_item = active_id ? find_item(active_id) : null;
@@ -8740,7 +8707,7 @@ function HazoUiKanban({
8740
8707
  }
8741
8708
  );
8742
8709
  }
8743
- var Table2 = React25__namespace.forwardRef(
8710
+ var Table2 = React26__namespace.forwardRef(
8744
8711
  ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "cls_table_wrap relative w-full overflow-auto", children: /* @__PURE__ */ jsxRuntime.jsx(
8745
8712
  "table",
8746
8713
  {
@@ -8751,11 +8718,11 @@ var Table2 = React25__namespace.forwardRef(
8751
8718
  ) })
8752
8719
  );
8753
8720
  Table2.displayName = "Table";
8754
- var TableHeader2 = React25__namespace.forwardRef(
8721
+ var TableHeader2 = React26__namespace.forwardRef(
8755
8722
  ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("thead", { ref, className: cn("[&_tr]:border-b", className), ...props })
8756
8723
  );
8757
8724
  TableHeader2.displayName = "TableHeader";
8758
- var TableBody = React25__namespace.forwardRef(
8725
+ var TableBody = React26__namespace.forwardRef(
8759
8726
  ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
8760
8727
  "tbody",
8761
8728
  {
@@ -8766,7 +8733,7 @@ var TableBody = React25__namespace.forwardRef(
8766
8733
  )
8767
8734
  );
8768
8735
  TableBody.displayName = "TableBody";
8769
- var TableFooter = React25__namespace.forwardRef(
8736
+ var TableFooter = React26__namespace.forwardRef(
8770
8737
  ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
8771
8738
  "tfoot",
8772
8739
  {
@@ -8777,7 +8744,7 @@ var TableFooter = React25__namespace.forwardRef(
8777
8744
  )
8778
8745
  );
8779
8746
  TableFooter.displayName = "TableFooter";
8780
- var TableRow2 = React25__namespace.forwardRef(
8747
+ var TableRow2 = React26__namespace.forwardRef(
8781
8748
  ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
8782
8749
  "tr",
8783
8750
  {
@@ -8791,7 +8758,7 @@ var TableRow2 = React25__namespace.forwardRef(
8791
8758
  )
8792
8759
  );
8793
8760
  TableRow2.displayName = "TableRow";
8794
- var TableHead = React25__namespace.forwardRef(
8761
+ var TableHead = React26__namespace.forwardRef(
8795
8762
  ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
8796
8763
  "th",
8797
8764
  {
@@ -8805,7 +8772,7 @@ var TableHead = React25__namespace.forwardRef(
8805
8772
  )
8806
8773
  );
8807
8774
  TableHead.displayName = "TableHead";
8808
- var TableCell2 = React25__namespace.forwardRef(
8775
+ var TableCell2 = React26__namespace.forwardRef(
8809
8776
  ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
8810
8777
  "td",
8811
8778
  {
@@ -8816,7 +8783,7 @@ var TableCell2 = React25__namespace.forwardRef(
8816
8783
  )
8817
8784
  );
8818
8785
  TableCell2.displayName = "TableCell";
8819
- var TableCaption = React25__namespace.forwardRef(
8786
+ var TableCaption = React26__namespace.forwardRef(
8820
8787
  ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
8821
8788
  "caption",
8822
8789
  {
@@ -8871,64 +8838,64 @@ function TableMobileCards(props) {
8871
8838
  }
8872
8839
  var DEFAULT_DEBOUNCE_MS = 200;
8873
8840
  function useTableState(props) {
8874
- const [sortInternal, setSortInternal] = React25.useState(
8841
+ const [sortInternal, setSortInternal] = React26.useState(
8875
8842
  () => normalizeSortProp(props.defaultSort)
8876
8843
  );
8877
8844
  const isSortControlled = props.sort !== void 0;
8878
8845
  const sort = isSortControlled ? normalizeSortProp(props.sort) : sortInternal;
8879
- const setSort = React25.useCallback(
8846
+ const setSort = React26.useCallback(
8880
8847
  (next) => {
8881
8848
  if (!isSortControlled) setSortInternal(next);
8882
8849
  props.onSortChange?.(next);
8883
8850
  },
8884
8851
  [isSortControlled, props.onSortChange]
8885
8852
  );
8886
- const cycleHeaderSort = React25.useCallback(
8853
+ const cycleHeaderSort = React26.useCallback(
8887
8854
  (key, append) => {
8888
8855
  const next = append ? cycleAppendColumn(sort, key) : cycleSingleColumn(sort, key);
8889
8856
  setSort(next);
8890
8857
  },
8891
8858
  [sort, setSort]
8892
8859
  );
8893
- const [filterInternal, setFilterInternal] = React25.useState(
8860
+ const [filterInternal, setFilterInternal] = React26.useState(
8894
8861
  () => props.defaultFilter ?? {}
8895
8862
  );
8896
8863
  const isFilterControlled = props.filter !== void 0;
8897
8864
  const filter = isFilterControlled ? props.filter : filterInternal;
8898
- const setFilter = React25.useCallback(
8865
+ const setFilter = React26.useCallback(
8899
8866
  (next) => {
8900
8867
  if (!isFilterControlled) setFilterInternal(next);
8901
8868
  props.onFilterChange?.(next);
8902
8869
  },
8903
8870
  [isFilterControlled, props.onFilterChange]
8904
8871
  );
8905
- const [searchDraft, setSearchDraft] = React25.useState(
8872
+ const [searchDraft, setSearchDraft] = React26.useState(
8906
8873
  filter.search ?? ""
8907
8874
  );
8908
8875
  const debounceMs = props.searchDebounceMs ?? DEFAULT_DEBOUNCE_MS;
8909
- React25.useEffect(() => {
8876
+ React26.useEffect(() => {
8910
8877
  const handle = setTimeout(() => {
8911
8878
  if (searchDraft === (filter.search ?? "")) return;
8912
8879
  setFilter({ ...filter, search: searchDraft || void 0 });
8913
8880
  }, debounceMs);
8914
8881
  return () => clearTimeout(handle);
8915
8882
  }, [searchDraft, debounceMs]);
8916
- const setSearch = React25.useCallback((s) => setSearchDraft(s), []);
8917
- const [pageInternal, setPageInternal] = React25.useState(
8883
+ const setSearch = React26.useCallback((s) => setSearchDraft(s), []);
8884
+ const [pageInternal, setPageInternal] = React26.useState(
8918
8885
  () => props.defaultPage ?? 0
8919
8886
  );
8920
8887
  const isPageControlled = props.page !== void 0;
8921
8888
  const page = isPageControlled ? props.page : pageInternal;
8922
- const setPage = React25.useCallback(
8889
+ const setPage = React26.useCallback(
8923
8890
  (next) => {
8924
8891
  if (!isPageControlled) setPageInternal(next);
8925
8892
  props.onPageChange?.(next);
8926
8893
  },
8927
8894
  [isPageControlled, props.onPageChange]
8928
8895
  );
8929
- const prevSortKey = React25.useRef(serializeSort(sort));
8930
- const prevFilterKey = React25.useRef(serializeFilter(filter));
8931
- React25.useEffect(() => {
8896
+ const prevSortKey = React26.useRef(serializeSort(sort));
8897
+ const prevFilterKey = React26.useRef(serializeFilter(filter));
8898
+ React26.useEffect(() => {
8932
8899
  const sk = serializeSort(sort);
8933
8900
  const fk = serializeFilter(filter);
8934
8901
  if (sk !== prevSortKey.current || fk !== prevFilterKey.current) {
@@ -8939,24 +8906,24 @@ function useTableState(props) {
8939
8906
  }, [sort, filter, isPageControlled]);
8940
8907
  const pageSize = props.pagination && typeof props.pagination === "object" ? props.pagination.pageSize : 0;
8941
8908
  const isServerMode = typeof props.onLoad === "function";
8942
- const filtered = React25.useMemo(
8909
+ const filtered = React26.useMemo(
8943
8910
  () => isServerMode ? props.rows : applyFilter(props.rows, filter, props.columns),
8944
8911
  [props.rows, filter, props.columns, isServerMode]
8945
8912
  );
8946
- const sorted = React25.useMemo(
8913
+ const sorted = React26.useMemo(
8947
8914
  () => isServerMode ? filtered : applySort(filtered, sort),
8948
8915
  [filtered, sort, isServerMode]
8949
8916
  );
8950
- const pagedInMemory = React25.useMemo(() => {
8917
+ const pagedInMemory = React26.useMemo(() => {
8951
8918
  if (isServerMode || pageSize <= 0) return sorted;
8952
8919
  const start = page * pageSize;
8953
8920
  return sorted.slice(start, start + pageSize);
8954
8921
  }, [sorted, page, pageSize, isServerMode]);
8955
- const [serverRows, setServerRows] = React25.useState([]);
8956
- const [serverTotal, setServerTotal] = React25.useState(0);
8957
- const [serverError, setServerError] = React25.useState(null);
8958
- const reqIdRef = React25.useRef(0);
8959
- React25.useEffect(() => {
8922
+ const [serverRows, setServerRows] = React26.useState([]);
8923
+ const [serverTotal, setServerTotal] = React26.useState(0);
8924
+ const [serverError, setServerError] = React26.useState(null);
8925
+ const reqIdRef = React26.useRef(0);
8926
+ React26.useEffect(() => {
8960
8927
  if (!isServerMode) return;
8961
8928
  const myId = ++reqIdRef.current;
8962
8929
  let cancelled = false;
@@ -9388,18 +9355,18 @@ function Toolbar2(props) {
9388
9355
  enableFilterDialog,
9389
9356
  searchPlaceholder
9390
9357
  } = props;
9391
- const sortFields = React25__namespace.useMemo(
9358
+ const sortFields = React26__namespace.useMemo(
9392
9359
  () => deriveSortFields(columns),
9393
9360
  [columns]
9394
9361
  );
9395
- const filterFields = React25__namespace.useMemo(
9362
+ const filterFields = React26__namespace.useMemo(
9396
9363
  () => deriveFilterFields(columns),
9397
9364
  [columns]
9398
9365
  );
9399
- const [searchValue, setSearchValue] = React25__namespace.useState(
9366
+ const [searchValue, setSearchValue] = React26__namespace.useState(
9400
9367
  filter.search ?? ""
9401
9368
  );
9402
- React25__namespace.useEffect(() => {
9369
+ React26__namespace.useEffect(() => {
9403
9370
  setSearchValue(filter.search ?? "");
9404
9371
  }, [filter.search]);
9405
9372
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "cls_hazo_ui_table_toolbar flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between", children: [
@@ -9655,9 +9622,9 @@ function LineChart({
9655
9622
  className
9656
9623
  }) {
9657
9624
  const geo = compute_geometry(data, width, height);
9658
- const svg_ref = React25__namespace.useRef(null);
9659
- const [hover_idx, set_hover_idx] = React25__namespace.useState(null);
9660
- const handle_mouse_move = React25__namespace.useCallback(
9625
+ const svg_ref = React26__namespace.useRef(null);
9626
+ const [hover_idx, set_hover_idx] = React26__namespace.useState(null);
9627
+ const handle_mouse_move = React26__namespace.useCallback(
9661
9628
  (e) => {
9662
9629
  if (!geo) return;
9663
9630
  const rect = e.currentTarget.getBoundingClientRect();
@@ -9690,7 +9657,7 @@ function LineChart({
9690
9657
  },
9691
9658
  [geo, data]
9692
9659
  );
9693
- const handle_mouse_leave = React25__namespace.useCallback(() => set_hover_idx(null), []);
9660
+ const handle_mouse_leave = React26__namespace.useCallback(() => set_hover_idx(null), []);
9694
9661
  if (!geo) {
9695
9662
  return /* @__PURE__ */ jsxRuntime.jsx(
9696
9663
  "svg",
@@ -9917,8 +9884,8 @@ function MultiLineChart({
9917
9884
  className
9918
9885
  }) {
9919
9886
  const geo = compute_geometry2(series, width, height);
9920
- const [hover_idx, set_hover_idx] = React25__namespace.useState(null);
9921
- const handle_mouse_move = React25__namespace.useCallback(
9887
+ const [hover_idx, set_hover_idx] = React26__namespace.useState(null);
9888
+ const handle_mouse_move = React26__namespace.useCallback(
9922
9889
  (e) => {
9923
9890
  if (!geo) return;
9924
9891
  const rect = e.currentTarget.getBoundingClientRect();
@@ -9935,7 +9902,7 @@ function MultiLineChart({
9935
9902
  },
9936
9903
  [geo]
9937
9904
  );
9938
- const handle_mouse_leave = React25__namespace.useCallback(() => set_hover_idx(null), []);
9905
+ const handle_mouse_leave = React26__namespace.useCallback(() => set_hover_idx(null), []);
9939
9906
  if (!geo) {
9940
9907
  return /* @__PURE__ */ jsxRuntime.jsx(
9941
9908
  "svg",
@@ -10317,21 +10284,21 @@ function celebrate(payload) {
10317
10284
  _enqueue(payload);
10318
10285
  }
10319
10286
  function CelebrationProvider({ children }) {
10320
- const [queue, set_queue] = React25__namespace.useState([]);
10321
- const enqueue = React25__namespace.useCallback((payload) => {
10287
+ const [queue, set_queue] = React26__namespace.useState([]);
10288
+ const enqueue = React26__namespace.useCallback((payload) => {
10322
10289
  const storage_key = `hazo_ui_celebration_${payload.id}`;
10323
10290
  if (typeof window !== "undefined" && sessionStorage.getItem(storage_key)) {
10324
10291
  return;
10325
10292
  }
10326
10293
  set_queue((q) => [...q, payload]);
10327
10294
  }, []);
10328
- React25__namespace.useEffect(() => {
10295
+ React26__namespace.useEffect(() => {
10329
10296
  _enqueue = enqueue;
10330
10297
  return () => {
10331
10298
  _enqueue = null;
10332
10299
  };
10333
10300
  }, [enqueue]);
10334
- const handle_close = React25__namespace.useCallback(() => {
10301
+ const handle_close = React26__namespace.useCallback(() => {
10335
10302
  set_queue((q) => q.slice(1));
10336
10303
  }, []);
10337
10304
  const current = queue[0] ?? null;
@@ -10360,14 +10327,14 @@ function CelebrationModalInner({
10360
10327
  autoDismissDelay = 8e3,
10361
10328
  audioChime = false
10362
10329
  } = payload;
10363
- const [visible, set_visible] = React25__namespace.useState(true);
10364
- const [is_downloading, set_is_downloading] = React25__namespace.useState(false);
10365
- const canvas_ref = React25__namespace.useRef(null);
10366
- const card_ref = React25__namespace.useRef(null);
10367
- React25__namespace.useEffect(() => {
10330
+ const [visible, set_visible] = React26__namespace.useState(true);
10331
+ const [is_downloading, set_is_downloading] = React26__namespace.useState(false);
10332
+ const canvas_ref = React26__namespace.useRef(null);
10333
+ const card_ref = React26__namespace.useRef(null);
10334
+ React26__namespace.useEffect(() => {
10368
10335
  sessionStorage.setItem(`hazo_ui_celebration_${id}`, "1");
10369
10336
  }, [id]);
10370
- React25__namespace.useEffect(() => {
10337
+ React26__namespace.useEffect(() => {
10371
10338
  if (!canvas_ref.current) return;
10372
10339
  let confetti_instance = null;
10373
10340
  import('canvas-confetti').then(({ default: confetti }) => {
@@ -10384,18 +10351,18 @@ function CelebrationModalInner({
10384
10351
  confetti_instance?.reset();
10385
10352
  };
10386
10353
  }, []);
10387
- React25__namespace.useEffect(() => {
10354
+ React26__namespace.useEffect(() => {
10388
10355
  if (!audioChime) return;
10389
10356
  const audio = new Audio(celebration_chime_default);
10390
10357
  audio.play().catch(() => {
10391
10358
  });
10392
10359
  }, [audioChime]);
10393
- React25__namespace.useEffect(() => {
10360
+ React26__namespace.useEffect(() => {
10394
10361
  if (!autoDismiss) return;
10395
10362
  const timer = window.setTimeout(close_modal, autoDismissDelay);
10396
10363
  return () => window.clearTimeout(timer);
10397
10364
  }, [autoDismiss, autoDismissDelay]);
10398
- React25__namespace.useEffect(() => {
10365
+ React26__namespace.useEffect(() => {
10399
10366
  const on_key = (e) => {
10400
10367
  if (e.key === "Escape") close_modal();
10401
10368
  };
@@ -10652,6 +10619,7 @@ exports.DropdownMenuTrigger = DropdownMenuTrigger;
10652
10619
  exports.EmptyState = EmptyState;
10653
10620
  exports.ErrorBanner = ErrorBanner;
10654
10621
  exports.ErrorPage = ErrorPage;
10622
+ exports.HazoContextProvider = HazoContextProvider;
10655
10623
  exports.HazoUiConfirmDialog = HazoUiConfirmDialog;
10656
10624
  exports.HazoUiDialog = HazoUiDialog;
10657
10625
  exports.HazoUiDialogClose = DialogClose;
@@ -10742,15 +10710,19 @@ exports.TooltipTrigger = TooltipTrigger;
10742
10710
  exports.applyKanbanFilter = applyKanbanFilter;
10743
10711
  exports.buttonGroupVariants = buttonGroupVariants;
10744
10712
  exports.celebrate = celebrate;
10713
+ exports.cn = cn;
10745
10714
  exports.create_command_suggestion_extension = create_command_suggestion_extension;
10746
10715
  exports.errorToast = errorToast;
10747
10716
  exports.format_num = format_num;
10717
+ exports.generateUUID = generateUUID;
10748
10718
  exports.get_hazo_ui_config = get_hazo_ui_config;
10719
+ exports.get_logger = get_logger;
10749
10720
  exports.parse_commands_from_text = parse_commands_from_text;
10750
10721
  exports.pick_x_label_indices = pick_x_label_indices;
10751
10722
  exports.reset_hazo_ui_config = reset_hazo_ui_config;
10752
10723
  exports.resolve_animation_classes = resolve_animation_classes;
10753
10724
  exports.set_hazo_ui_config = set_hazo_ui_config;
10725
+ exports.set_logger = set_logger;
10754
10726
  exports.successToast = successToast;
10755
10727
  exports.text_to_tiptap_content = text_to_tiptap_content;
10756
10728
  exports.toggleVariants = toggleVariants;