@otfdashkit/ui 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +99 -0
  3. package/dist/index.js +302 -1926
  4. package/dist/index.mjs +234 -1869
  5. package/package.json +24 -5
  6. package/src/advanced/BulkActions/BulkActions.tsx +2 -2
  7. package/src/advanced/CommandBar/CommandBar.tsx +2 -2
  8. package/src/advanced/Filters/Filters.tsx +6 -6
  9. package/src/advanced/Kanban/Kanban.tsx +1 -1
  10. package/src/advanced/ToggleButton/ToggleButton.tsx +1 -1
  11. package/src/advanced/bulk-actions.tsx +1 -46
  12. package/src/advanced/command-bar.tsx +1 -115
  13. package/src/advanced/filters.tsx +1 -103
  14. package/src/advanced/kanban.tsx +1 -95
  15. package/src/advanced/toggle-button.tsx +1 -78
  16. package/src/blocks/ChatDetail/ChatDetail.tsx +4 -4
  17. package/src/blocks/FeedbackModal/FeedbackModal.tsx +3 -3
  18. package/src/blocks/FileCards/FileCards.tsx +2 -2
  19. package/src/blocks/FilesList/FilesList.tsx +3 -3
  20. package/src/blocks/IntegrationCard/IntegrationCard.tsx +3 -3
  21. package/src/blocks/InviteModal/InviteModal.tsx +7 -7
  22. package/src/blocks/ManageTagsModal/ManageTagsModal.tsx +4 -4
  23. package/src/blocks/MessagesCard/MessagesCard.tsx +3 -3
  24. package/src/blocks/MetricCard/MetricCard.tsx +3 -3
  25. package/src/blocks/NotificationSettings/NotificationSettings.tsx +4 -4
  26. package/src/blocks/OrganizationMenu/OrganizationMenu.tsx +30 -11
  27. package/src/blocks/RolesMenu/RolesMenu.tsx +4 -4
  28. package/src/blocks/SelectUsersModal/SelectUsersModal.tsx +5 -5
  29. package/src/blocks/SidebarLayoutDashboard/SidebarLayoutDashboard.tsx +5 -5
  30. package/src/blocks/SidebarLayoutGroups/SidebarLayoutGroups.tsx +2 -2
  31. package/src/blocks/SidebarLayoutMinimal/SidebarLayoutMinimal.tsx +3 -3
  32. package/src/blocks/SidebarLayoutSearch/SidebarLayoutSearch.tsx +3 -3
  33. package/src/blocks/SidebarLayoutUser/SidebarLayoutUser.tsx +4 -4
  34. package/src/blocks/SortableTaskList/SortableTaskList.tsx +3 -3
  35. package/src/blocks/StackedLayoutBranded/StackedLayoutBranded.tsx +4 -4
  36. package/src/blocks/StackedLayoutTabs/StackedLayoutTabs.tsx +4 -4
  37. package/src/blocks/TaskCard/TaskCard.tsx +4 -4
  38. package/src/blocks/UserMenu/UserMenu.tsx +3 -3
  39. package/src/blocks/WorkspaceMembers/WorkspaceMembers.tsx +5 -5
  40. package/src/blocks/chat-detail.tsx +1 -73
  41. package/src/blocks/feedback-modal.tsx +1 -68
  42. package/src/blocks/file-cards.tsx +1 -56
  43. package/src/blocks/files-list.tsx +1 -72
  44. package/src/blocks/integration-card.tsx +1 -50
  45. package/src/blocks/invite-modal.tsx +1 -69
  46. package/src/blocks/manage-tags-modal.tsx +1 -63
  47. package/src/blocks/messages-card.tsx +1 -59
  48. package/src/blocks/metric-card.tsx +1 -79
  49. package/src/blocks/notification-settings.tsx +1 -61
  50. package/src/blocks/organization-menu.tsx +1 -85
  51. package/src/blocks/roles-menu.tsx +1 -61
  52. package/src/blocks/select-users-modal.tsx +1 -64
  53. package/src/blocks/sidebar-layout-dashboard.tsx +1 -97
  54. package/src/blocks/sidebar-layout-groups.tsx +1 -79
  55. package/src/blocks/sidebar-layout-minimal.tsx +1 -73
  56. package/src/blocks/sidebar-layout-search.tsx +1 -79
  57. package/src/blocks/sidebar-layout-user.tsx +1 -82
  58. package/src/blocks/sortable-task-list.tsx +1 -70
  59. package/src/blocks/stacked-layout-branded.tsx +1 -64
  60. package/src/blocks/stacked-layout-tabs.tsx +1 -80
  61. package/src/blocks/task-card.tsx +1 -88
  62. package/src/blocks/user-menu.tsx +1 -62
  63. package/src/blocks/workspace-members.tsx +1 -61
  64. package/src/charts/sparkline.tsx +1 -1
  65. package/src/components/DataGrid/DataGrid.tsx +1 -1
  66. package/src/components/DataTable/DataTable.tsx +4 -4
  67. package/src/components/EmptyState/EmptyState.tsx +6 -22
  68. package/src/components/Persona/Persona.tsx +1 -1
  69. package/src/components/Stat/Stat.tsx +1 -1
  70. package/src/components/Stepper/Stepper.tsx +13 -2
  71. package/src/components/banner.tsx +1 -203
  72. package/src/components/breadcrumb.tsx +1 -58
  73. package/src/components/command-item.tsx +1 -36
  74. package/src/components/data-grid.tsx +1 -125
  75. package/src/components/data-table.tsx +1 -139
  76. package/src/components/empty-state.tsx +1 -31
  77. package/src/components/hotkeys.tsx +1 -31
  78. package/src/components/icon-badge.tsx +1 -35
  79. package/src/components/loading-overlay.tsx +1 -38
  80. package/src/components/persona.tsx +1 -38
  81. package/src/components/property-list.tsx +1 -29
  82. package/src/components/stat.tsx +1 -51
  83. package/src/components/stepper.tsx +1 -69
  84. package/src/components/structured-list.tsx +1 -51
  85. package/src/components/timeline.tsx +1 -69
  86. package/src/components/toaster.tsx +1 -42
  87. package/src/data/DataList.tsx +1 -1
  88. package/src/engagement/Tour/Tour.tsx +1 -1
  89. package/src/engagement/beacon.tsx +1 -50
  90. package/src/engagement/tour.tsx +1 -106
  91. package/src/forms/ArrayField/ArrayField.tsx +2 -2
  92. package/src/forms/AutoForm/AutoForm.tsx +9 -8
  93. package/src/forms/DatePicker/DatePicker.tsx +3 -3
  94. package/src/forms/FloatingLabelInput/FloatingLabelInput.tsx +104 -0
  95. package/src/forms/FloatingLabelInput/index.ts +1 -0
  96. package/src/forms/PasswordInput/PasswordInput.tsx +2 -2
  97. package/src/forms/SearchInput/SearchInput.tsx +2 -2
  98. package/src/forms/StepForm/StepForm.tsx +2 -2
  99. package/src/forms/array-field.tsx +1 -61
  100. package/src/forms/auto-form.tsx +1 -133
  101. package/src/forms/date-picker.tsx +1 -109
  102. package/src/forms/field.tsx +1 -62
  103. package/src/forms/file-upload.tsx +1 -101
  104. package/src/forms/floating-label-input.tsx +1 -0
  105. package/src/forms/form.tsx +1 -57
  106. package/src/forms/object-field.tsx +1 -53
  107. package/src/forms/password-input.tsx +1 -54
  108. package/src/forms/search-input.tsx +1 -64
  109. package/src/forms/step-form.tsx +1 -113
  110. package/src/index.ts +6 -3
  111. package/src/primitives/Button/Button.tsx +18 -0
  112. package/src/primitives/code-block.tsx +1 -1
  113. package/src/primitives/comparison.tsx +1 -1
  114. package/src/primitives/qr-code.tsx +5 -1
  115. package/src/themes/base.css +18 -0
package/dist/index.js CHANGED
@@ -21,10 +21,9 @@ var DialogPrimitive = require('@radix-ui/react-dialog');
21
21
  var ContextMenuPrimitive = require('@radix-ui/react-context-menu');
22
22
  var vaul = require('vaul');
23
23
  var DropdownMenuPrimitive = require('@radix-ui/react-dropdown-menu');
24
- var reactHookForm = require('react-hook-form');
25
- var LabelPrimitive = require('@radix-ui/react-label');
26
24
  var HoverCardPrimitive = require('@radix-ui/react-hover-card');
27
25
  var inputOtp = require('input-otp');
26
+ var LabelPrimitive = require('@radix-ui/react-label');
28
27
  var MenubarPrimitive = require('@radix-ui/react-menubar');
29
28
  var NavigationMenuPrimitive = require('@radix-ui/react-navigation-menu');
30
29
  var PopoverPrimitive = require('@radix-ui/react-popover');
@@ -42,6 +41,7 @@ var ToggleGroupPrimitive = require('@radix-ui/react-toggle-group');
42
41
  var TogglePrimitive = require('@radix-ui/react-toggle');
43
42
  var TooltipPrimitive = require('@radix-ui/react-tooltip');
44
43
  var reactTable = require('@tanstack/react-table');
44
+ var dateFns = require('date-fns');
45
45
  var core = require('@dnd-kit/core');
46
46
  var sortable = require('@dnd-kit/sortable');
47
47
  var utilities = require('@dnd-kit/utilities');
@@ -55,6 +55,7 @@ var extensionTable = require('@tiptap/extension-table');
55
55
  var extensionTableRow = require('@tiptap/extension-table-row');
56
56
  var extensionTableCell = require('@tiptap/extension-table-cell');
57
57
  var extensionTableHeader = require('@tiptap/extension-table-header');
58
+ var reactHookForm = require('react-hook-form');
58
59
  var zod = require('@hookform/resolvers/zod');
59
60
  var z = require('zod');
60
61
  var reactColorful = require('react-colorful');
@@ -95,8 +96,8 @@ var CollapsiblePrimitive__namespace = /*#__PURE__*/_interopNamespace(Collapsible
95
96
  var DialogPrimitive__namespace = /*#__PURE__*/_interopNamespace(DialogPrimitive);
96
97
  var ContextMenuPrimitive__namespace = /*#__PURE__*/_interopNamespace(ContextMenuPrimitive);
97
98
  var DropdownMenuPrimitive__namespace = /*#__PURE__*/_interopNamespace(DropdownMenuPrimitive);
98
- var LabelPrimitive__namespace = /*#__PURE__*/_interopNamespace(LabelPrimitive);
99
99
  var HoverCardPrimitive__namespace = /*#__PURE__*/_interopNamespace(HoverCardPrimitive);
100
+ var LabelPrimitive__namespace = /*#__PURE__*/_interopNamespace(LabelPrimitive);
100
101
  var MenubarPrimitive__namespace = /*#__PURE__*/_interopNamespace(MenubarPrimitive);
101
102
  var NavigationMenuPrimitive__namespace = /*#__PURE__*/_interopNamespace(NavigationMenuPrimitive);
102
103
  var PopoverPrimitive__namespace = /*#__PURE__*/_interopNamespace(PopoverPrimitive);
@@ -416,7 +417,7 @@ function Calendar({
416
417
  showOutsideDays = true,
417
418
  captionLayout = "label",
418
419
  buttonVariant = "ghost",
419
- formatters: formatters2,
420
+ formatters,
420
421
  components,
421
422
  ...props
422
423
  }) {
@@ -434,7 +435,7 @@ function Calendar({
434
435
  captionLayout,
435
436
  formatters: {
436
437
  formatMonthDropdown: (date) => date.toLocaleString("default", { month: "short" }),
437
- ...formatters2
438
+ ...formatters
438
439
  },
439
440
  classNames: {
440
441
  root: cn("w-fit", defaultClassNames.root),
@@ -1633,104 +1634,6 @@ var DropdownMenuSubContent = React131__namespace.default.forwardRef(({ className
1633
1634
  DropdownMenuSubContent.displayName = DropdownMenuPrimitive__namespace.SubContent.displayName;
1634
1635
  var DropdownMenuShortcut = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("ml-auto text-xs tracking-widest opacity-60", className), ...props });
1635
1636
  DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
1636
- var labelVariants = classVarianceAuthority.cva(
1637
- "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
1638
- );
1639
- var Label3 = React131__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1640
- LabelPrimitive__namespace.Root,
1641
- {
1642
- ref,
1643
- className: cn(labelVariants(), className),
1644
- ...props
1645
- }
1646
- ));
1647
- Label3.displayName = LabelPrimitive__namespace.Root.displayName;
1648
- var FormFieldContext = React131__namespace.createContext(null);
1649
- var useFormField = () => {
1650
- const fieldContext = React131__namespace.useContext(FormFieldContext);
1651
- const itemContext = React131__namespace.useContext(FormItemContext);
1652
- const { getFieldState, formState } = reactHookForm.useFormContext();
1653
- if (!fieldContext) {
1654
- throw new Error("useFormField should be used within <FormField>");
1655
- }
1656
- if (!itemContext) {
1657
- throw new Error("useFormField should be used within <FormItem>");
1658
- }
1659
- const fieldState = getFieldState(fieldContext.name, formState);
1660
- const { id } = itemContext;
1661
- return {
1662
- id,
1663
- name: fieldContext.name,
1664
- formItemId: `${id}-form-item`,
1665
- formDescriptionId: `${id}-form-item-description`,
1666
- formMessageId: `${id}-form-item-message`,
1667
- ...fieldState
1668
- };
1669
- };
1670
- var FormItemContext = React131__namespace.createContext(null);
1671
- var FormItem = React131__namespace.forwardRef(({ className, ...props }, ref) => {
1672
- const id = React131__namespace.useId();
1673
- return /* @__PURE__ */ jsxRuntime.jsx(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("space-y-2", className), ...props }) });
1674
- });
1675
- FormItem.displayName = "FormItem";
1676
- var FormLabel = React131__namespace.forwardRef(({ className, ...props }, ref) => {
1677
- const { error, formItemId } = useFormField();
1678
- return /* @__PURE__ */ jsxRuntime.jsx(
1679
- Label3,
1680
- {
1681
- ref,
1682
- className: cn(error && "text-destructive", className),
1683
- htmlFor: formItemId,
1684
- ...props
1685
- }
1686
- );
1687
- });
1688
- FormLabel.displayName = "FormLabel";
1689
- var FormControl = React131__namespace.forwardRef(({ ...props }, ref) => {
1690
- const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
1691
- return /* @__PURE__ */ jsxRuntime.jsx(
1692
- reactSlot.Slot,
1693
- {
1694
- ref,
1695
- id: formItemId,
1696
- "aria-describedby": !error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`,
1697
- "aria-invalid": !!error,
1698
- ...props
1699
- }
1700
- );
1701
- });
1702
- FormControl.displayName = "FormControl";
1703
- var FormDescription = React131__namespace.forwardRef(({ className, ...props }, ref) => {
1704
- const { formDescriptionId } = useFormField();
1705
- return /* @__PURE__ */ jsxRuntime.jsx(
1706
- "p",
1707
- {
1708
- ref,
1709
- id: formDescriptionId,
1710
- className: cn("text-[0.8rem] text-muted-foreground", className),
1711
- ...props
1712
- }
1713
- );
1714
- });
1715
- FormDescription.displayName = "FormDescription";
1716
- var FormMessage = React131__namespace.forwardRef(({ className, children, ...props }, ref) => {
1717
- const { error, formMessageId } = useFormField();
1718
- const body = error ? String(error?.message ?? "") : children;
1719
- if (!body) {
1720
- return null;
1721
- }
1722
- return /* @__PURE__ */ jsxRuntime.jsx(
1723
- "p",
1724
- {
1725
- ref,
1726
- id: formMessageId,
1727
- className: cn("text-[0.8rem] font-medium text-destructive", className),
1728
- ...props,
1729
- children: body
1730
- }
1731
- );
1732
- });
1733
- FormMessage.displayName = "FormMessage";
1734
1637
  var HoverCard = HoverCardPrimitive__namespace.Root;
1735
1638
  var HoverCardTrigger = HoverCardPrimitive__namespace.Trigger;
1736
1639
  var HoverCardContent = React131__namespace.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
@@ -1804,6 +1707,18 @@ var Input = React131__namespace.default.forwardRef(
1804
1707
  )
1805
1708
  );
1806
1709
  Input.displayName = "Input";
1710
+ var labelVariants = classVarianceAuthority.cva(
1711
+ "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
1712
+ );
1713
+ var Label3 = React131__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1714
+ LabelPrimitive__namespace.Root,
1715
+ {
1716
+ ref,
1717
+ className: cn(labelVariants(), className),
1718
+ ...props
1719
+ }
1720
+ ));
1721
+ Label3.displayName = LabelPrimitive__namespace.Root.displayName;
1807
1722
  var LogoCarousel = React131__namespace.default.forwardRef(
1808
1723
  ({
1809
1724
  className,
@@ -3215,6 +3130,27 @@ function Breadcrumb({ children, className }) {
3215
3130
  });
3216
3131
  return /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": "breadcrumb", children: /* @__PURE__ */ jsxRuntime.jsx("ol", { className: cn("flex flex-wrap items-center gap-1", className), children: withSeparators }) });
3217
3132
  }
3133
+ function CommandItem2({ icon, label, description, shortcut, active, onClick, className }) {
3134
+ return /* @__PURE__ */ jsxRuntime.jsxs(
3135
+ "div",
3136
+ {
3137
+ onClick,
3138
+ className: cn(
3139
+ "flex items-center gap-3 rounded-md px-3 py-2 cursor-pointer transition-colors",
3140
+ active ? "bg-[hsl(var(--accent))] text-[hsl(var(--accent-foreground))]" : "hover:bg-[hsl(var(--accent)/0.6)]",
3141
+ className
3142
+ ),
3143
+ children: [
3144
+ icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 text-[hsl(var(--muted-foreground))] h-4 w-4 flex items-center justify-center", children: icon }),
3145
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
3146
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium truncate", children: label }),
3147
+ description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-[hsl(var(--muted-foreground))] truncate", children: description })
3148
+ ] }),
3149
+ shortcut && /* @__PURE__ */ jsxRuntime.jsx("kbd", { className: "shrink-0 pointer-events-none inline-flex h-5 items-center gap-1 rounded border border-[hsl(var(--border))] bg-[hsl(var(--muted))] px-1.5 text-[10px] font-medium text-[hsl(var(--muted-foreground))]", children: shortcut })
3150
+ ]
3151
+ }
3152
+ );
3153
+ }
3218
3154
  function EditableCell({ value: initial, onSave }) {
3219
3155
  const [editing, setEditing] = React131__namespace.default.useState(false);
3220
3156
  const [val, setVal] = React131__namespace.default.useState(String(initial ?? ""));
@@ -3370,14 +3306,53 @@ var EmptyStateIcon = React131__namespace.default.forwardRef(
3370
3306
  ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("flex h-12 w-12 items-center justify-center rounded-full bg-[hsl(var(--muted))] text-[hsl(var(--muted-foreground))]", className), ...props })
3371
3307
  );
3372
3308
  EmptyStateIcon.displayName = "EmptyStateIcon";
3373
- function EmptyState({ icon, title, description, action, className }) {
3374
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col items-center justify-center gap-3 py-12 text-center", className), children: [
3375
- icon && /* @__PURE__ */ jsxRuntime.jsx(EmptyStateIcon, { children: icon }),
3376
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
3377
- /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "font-semibold text-[hsl(var(--foreground))]", children: title }),
3378
- description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-[hsl(var(--muted-foreground))]", children: description })
3309
+ var sizeMap = {
3310
+ sm: "py-8 gap-2",
3311
+ default: "py-12 gap-3",
3312
+ lg: "py-20 gap-4"
3313
+ };
3314
+ var titleSizeMap = {
3315
+ sm: "text-sm font-semibold",
3316
+ default: "text-base font-semibold",
3317
+ lg: "text-lg font-semibold"
3318
+ };
3319
+ var descSizeMap = {
3320
+ sm: "text-xs",
3321
+ default: "text-sm",
3322
+ lg: "text-base"
3323
+ };
3324
+ var iconSizeMap = {
3325
+ sm: "h-10 w-10",
3326
+ default: "h-12 w-12",
3327
+ lg: "h-16 w-16"
3328
+ };
3329
+ function EmptyState({
3330
+ icon,
3331
+ title,
3332
+ description,
3333
+ action,
3334
+ secondaryAction,
3335
+ size = "default",
3336
+ className
3337
+ }) {
3338
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col items-center justify-center text-center", sizeMap[size], className), children: [
3339
+ icon && /* @__PURE__ */ jsxRuntime.jsx(EmptyStateIcon, { className: iconSizeMap[size], children: icon }),
3340
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1 max-w-sm", children: [
3341
+ /* @__PURE__ */ jsxRuntime.jsx("h3", { className: cn(titleSizeMap[size], "text-[hsl(var(--foreground))]"), children: title }),
3342
+ description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn(descSizeMap[size], "text-[hsl(var(--muted-foreground))]"), children: description })
3379
3343
  ] }),
3380
- action && /* @__PURE__ */ jsxRuntime.jsx(Button, { onClick: action.onClick, className: "mt-1", children: action.label })
3344
+ (action || secondaryAction) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 mt-1", children: [
3345
+ action && /* @__PURE__ */ jsxRuntime.jsx(Button, { size: size === "sm" ? "sm" : "default", onClick: action.onClick, children: action.label }),
3346
+ secondaryAction && /* @__PURE__ */ jsxRuntime.jsx(
3347
+ Button,
3348
+ {
3349
+ variant: "outline",
3350
+ size: size === "sm" ? "sm" : "default",
3351
+ onClick: secondaryAction.onClick,
3352
+ children: secondaryAction.label
3353
+ }
3354
+ )
3355
+ ] })
3381
3356
  ] });
3382
3357
  }
3383
3358
  function HotkeyBadge({ children, className }) {
@@ -3397,13 +3372,13 @@ var colorMap = {
3397
3372
  error: "bg-red-100 text-red-700 dark:bg-red-900/30 dark:text-red-400",
3398
3373
  purple: "bg-purple-100 text-purple-700 dark:bg-purple-900/30 dark:text-purple-400"
3399
3374
  };
3400
- var sizeMap = {
3375
+ var sizeMap2 = {
3401
3376
  sm: "h-7 w-7 [&>*]:h-3.5 [&>*]:w-3.5",
3402
3377
  md: "h-10 w-10 [&>*]:h-5 [&>*]:w-5",
3403
3378
  lg: "h-14 w-14 [&>*]:h-7 [&>*]:w-7"
3404
3379
  };
3405
3380
  function IconBadge({ icon, color = "default", size = "md", className }) {
3406
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("inline-flex items-center justify-center rounded-full shrink-0", colorMap[color], sizeMap[size], className), children: icon });
3381
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("inline-flex items-center justify-center rounded-full shrink-0", colorMap[color], sizeMap2[size], className), children: icon });
3407
3382
  }
3408
3383
  function LoadingOverlay({ loading, text, fullPage, children, className }) {
3409
3384
  if (fullPage) {
@@ -3420,13 +3395,13 @@ function LoadingOverlay({ loading, text, fullPage, children, className }) {
3420
3395
  ] }) })
3421
3396
  ] });
3422
3397
  }
3423
- var sizeMap2 = {
3398
+ var sizeMap3 = {
3424
3399
  sm: { avatar: "h-7 w-7", name: "text-sm", subtitle: "text-xs" },
3425
3400
  md: { avatar: "h-9 w-9", name: "text-sm font-medium", subtitle: "text-xs" },
3426
3401
  lg: { avatar: "h-12 w-12", name: "text-base font-medium", subtitle: "text-sm" }
3427
3402
  };
3428
3403
  function Persona({ name, subtitle, src, size = "md", badge, className }) {
3429
- const s = sizeMap2[size];
3404
+ const s = sizeMap3[size];
3430
3405
  const initials = name.split(" ").map((w) => w[0]).slice(0, 2).join("").toUpperCase();
3431
3406
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex items-center gap-2.5", className), children: [
3432
3407
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative shrink-0", children: [
@@ -3827,7 +3802,7 @@ function InviteModal({ className }) {
3827
3802
  pending.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
3828
3803
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-medium text-[hsl(var(--muted-foreground))]", children: "Pending invites" }),
3829
3804
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "divide-y divide-[hsl(var(--border))] rounded-md border border-[hsl(var(--border))]", children: pending.map((p, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 px-3 py-2", children: [
3830
- /* @__PURE__ */ jsxRuntime.jsx(Avatar, { className: "h-6 w-6", children: /* @__PURE__ */ jsxRuntime.jsx(AvatarFallback, { className: "text-[10px]", children: p.email[0].toUpperCase() }) }),
3805
+ /* @__PURE__ */ jsxRuntime.jsx(Avatar, { className: "h-6 w-6", children: /* @__PURE__ */ jsxRuntime.jsx(AvatarFallback, { className: "text-[10px]", children: p.email.charAt(0).toUpperCase() }) }),
3831
3806
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1 text-sm truncate", children: p.email }),
3832
3807
  /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "outline", className: "text-[10px] px-1.5 py-0.5 shrink-0", children: p.role }),
3833
3808
  /* @__PURE__ */ jsxRuntime.jsx("button", { onClick: () => setPending((ps) => ps.filter((_, j) => j !== i)), children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-3.5 w-3.5 text-[hsl(var(--muted-foreground))] hover:text-[hsl(var(--foreground))]" }) })
@@ -4520,7 +4495,7 @@ function NotificationSettings({ className }) {
4520
4495
  NotifRow,
4521
4496
  {
4522
4497
  ...n,
4523
- checked: states[n.id],
4498
+ checked: states[n.id] ?? false,
4524
4499
  onChange: (val) => setStates((s) => ({ ...s, [n.id]: val }))
4525
4500
  },
4526
4501
  n.id
@@ -4722,7 +4697,7 @@ var ROLES = [
4722
4697
  ];
4723
4698
  function RolesMenu({ value = "member", onChange, className }) {
4724
4699
  const [role, setRole] = React131.useState(value);
4725
- const current = ROLES.find((r) => r.value === role) ?? ROLES[2];
4700
+ const current = ROLES.find((r) => r.value === role) ?? ROLES[0];
4726
4701
  const handleChange = (v) => {
4727
4702
  setRole(v);
4728
4703
  onChange?.(v);
@@ -5447,1712 +5422,6 @@ function Filters({ filters, value, onChange, className }) {
5447
5422
  /* @__PURE__ */ jsxRuntime.jsx(AddFilterPopover, { filters, onAdd: (fv) => onChange([...value, fv]) })
5448
5423
  ] });
5449
5424
  }
5450
- var millisecondsInWeek = 6048e5;
5451
- var millisecondsInDay = 864e5;
5452
- var millisecondsInMinute = 6e4;
5453
- var millisecondsInHour = 36e5;
5454
- var constructFromSymbol = /* @__PURE__ */ Symbol.for("constructDateFrom");
5455
-
5456
- // node_modules/date-fns/constructFrom.js
5457
- function constructFrom(date, value) {
5458
- if (typeof date === "function") return date(value);
5459
- if (date && typeof date === "object" && constructFromSymbol in date)
5460
- return date[constructFromSymbol](value);
5461
- if (date instanceof Date) return new date.constructor(value);
5462
- return new Date(value);
5463
- }
5464
-
5465
- // node_modules/date-fns/toDate.js
5466
- function toDate(argument, context) {
5467
- return constructFrom(context || argument, argument);
5468
- }
5469
-
5470
- // node_modules/date-fns/addDays.js
5471
- function addDays(date, amount, options) {
5472
- const _date = toDate(date, options?.in);
5473
- if (isNaN(amount)) return constructFrom(date, NaN);
5474
- if (!amount) return _date;
5475
- _date.setDate(_date.getDate() + amount);
5476
- return _date;
5477
- }
5478
-
5479
- // node_modules/date-fns/addMonths.js
5480
- function addMonths(date, amount, options) {
5481
- const _date = toDate(date, options?.in);
5482
- if (isNaN(amount)) return constructFrom(date, NaN);
5483
- if (!amount) {
5484
- return _date;
5485
- }
5486
- const dayOfMonth = _date.getDate();
5487
- const endOfDesiredMonth = constructFrom(date, _date.getTime());
5488
- endOfDesiredMonth.setMonth(_date.getMonth() + amount + 1, 0);
5489
- const daysInMonth = endOfDesiredMonth.getDate();
5490
- if (dayOfMonth >= daysInMonth) {
5491
- return endOfDesiredMonth;
5492
- } else {
5493
- _date.setFullYear(
5494
- endOfDesiredMonth.getFullYear(),
5495
- endOfDesiredMonth.getMonth(),
5496
- dayOfMonth
5497
- );
5498
- return _date;
5499
- }
5500
- }
5501
-
5502
- // node_modules/date-fns/addMilliseconds.js
5503
- function addMilliseconds(date, amount, options) {
5504
- return constructFrom(date, +toDate(date) + amount);
5505
- }
5506
-
5507
- // node_modules/date-fns/addHours.js
5508
- function addHours(date, amount, options) {
5509
- return addMilliseconds(date, amount * millisecondsInHour);
5510
- }
5511
-
5512
- // node_modules/date-fns/_lib/defaultOptions.js
5513
- var defaultOptions = {};
5514
- function getDefaultOptions() {
5515
- return defaultOptions;
5516
- }
5517
-
5518
- // node_modules/date-fns/startOfWeek.js
5519
- function startOfWeek2(date, options) {
5520
- const defaultOptions2 = getDefaultOptions();
5521
- const weekStartsOn = options?.weekStartsOn ?? options?.locale?.options?.weekStartsOn ?? defaultOptions2.weekStartsOn ?? defaultOptions2.locale?.options?.weekStartsOn ?? 0;
5522
- const _date = toDate(date, options?.in);
5523
- const day = _date.getDay();
5524
- const diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
5525
- _date.setDate(_date.getDate() - diff);
5526
- _date.setHours(0, 0, 0, 0);
5527
- return _date;
5528
- }
5529
-
5530
- // node_modules/date-fns/startOfISOWeek.js
5531
- function startOfISOWeek(date, options) {
5532
- return startOfWeek2(date, { ...options, weekStartsOn: 1 });
5533
- }
5534
-
5535
- // node_modules/date-fns/getISOWeekYear.js
5536
- function getISOWeekYear(date, options) {
5537
- const _date = toDate(date, options?.in);
5538
- const year = _date.getFullYear();
5539
- const fourthOfJanuaryOfNextYear = constructFrom(_date, 0);
5540
- fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4);
5541
- fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0);
5542
- const startOfNextYear = startOfISOWeek(fourthOfJanuaryOfNextYear);
5543
- const fourthOfJanuaryOfThisYear = constructFrom(_date, 0);
5544
- fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4);
5545
- fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0);
5546
- const startOfThisYear = startOfISOWeek(fourthOfJanuaryOfThisYear);
5547
- if (_date.getTime() >= startOfNextYear.getTime()) {
5548
- return year + 1;
5549
- } else if (_date.getTime() >= startOfThisYear.getTime()) {
5550
- return year;
5551
- } else {
5552
- return year - 1;
5553
- }
5554
- }
5555
-
5556
- // node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js
5557
- function getTimezoneOffsetInMilliseconds(date) {
5558
- const _date = toDate(date);
5559
- const utcDate = new Date(
5560
- Date.UTC(
5561
- _date.getFullYear(),
5562
- _date.getMonth(),
5563
- _date.getDate(),
5564
- _date.getHours(),
5565
- _date.getMinutes(),
5566
- _date.getSeconds(),
5567
- _date.getMilliseconds()
5568
- )
5569
- );
5570
- utcDate.setUTCFullYear(_date.getFullYear());
5571
- return +date - +utcDate;
5572
- }
5573
-
5574
- // node_modules/date-fns/_lib/normalizeDates.js
5575
- function normalizeDates(context, ...dates) {
5576
- const normalize = constructFrom.bind(
5577
- null,
5578
- context || dates.find((date) => typeof date === "object")
5579
- );
5580
- return dates.map(normalize);
5581
- }
5582
-
5583
- // node_modules/date-fns/startOfDay.js
5584
- function startOfDay(date, options) {
5585
- const _date = toDate(date, options?.in);
5586
- _date.setHours(0, 0, 0, 0);
5587
- return _date;
5588
- }
5589
-
5590
- // node_modules/date-fns/differenceInCalendarDays.js
5591
- function differenceInCalendarDays(laterDate, earlierDate, options) {
5592
- const [laterDate_, earlierDate_] = normalizeDates(
5593
- options?.in,
5594
- laterDate,
5595
- earlierDate
5596
- );
5597
- const laterStartOfDay = startOfDay(laterDate_);
5598
- const earlierStartOfDay = startOfDay(earlierDate_);
5599
- const laterTimestamp = +laterStartOfDay - getTimezoneOffsetInMilliseconds(laterStartOfDay);
5600
- const earlierTimestamp = +earlierStartOfDay - getTimezoneOffsetInMilliseconds(earlierStartOfDay);
5601
- return Math.round((laterTimestamp - earlierTimestamp) / millisecondsInDay);
5602
- }
5603
-
5604
- // node_modules/date-fns/startOfISOWeekYear.js
5605
- function startOfISOWeekYear(date, options) {
5606
- const year = getISOWeekYear(date, options);
5607
- const fourthOfJanuary = constructFrom(date, 0);
5608
- fourthOfJanuary.setFullYear(year, 0, 4);
5609
- fourthOfJanuary.setHours(0, 0, 0, 0);
5610
- return startOfISOWeek(fourthOfJanuary);
5611
- }
5612
-
5613
- // node_modules/date-fns/addWeeks.js
5614
- function addWeeks(date, amount, options) {
5615
- return addDays(date, amount * 7, options);
5616
- }
5617
-
5618
- // node_modules/date-fns/isSameDay.js
5619
- function isSameDay(laterDate, earlierDate, options) {
5620
- const [dateLeft_, dateRight_] = normalizeDates(
5621
- options?.in,
5622
- laterDate,
5623
- earlierDate
5624
- );
5625
- return +startOfDay(dateLeft_) === +startOfDay(dateRight_);
5626
- }
5627
-
5628
- // node_modules/date-fns/isDate.js
5629
- function isDate(value) {
5630
- return value instanceof Date || typeof value === "object" && Object.prototype.toString.call(value) === "[object Date]";
5631
- }
5632
-
5633
- // node_modules/date-fns/isValid.js
5634
- function isValid(date) {
5635
- return !(!isDate(date) && typeof date !== "number" || isNaN(+toDate(date)));
5636
- }
5637
-
5638
- // node_modules/date-fns/differenceInCalendarMonths.js
5639
- function differenceInCalendarMonths(laterDate, earlierDate, options) {
5640
- const [laterDate_, earlierDate_] = normalizeDates(
5641
- options?.in,
5642
- laterDate,
5643
- earlierDate
5644
- );
5645
- const yearsDiff = laterDate_.getFullYear() - earlierDate_.getFullYear();
5646
- const monthsDiff = laterDate_.getMonth() - earlierDate_.getMonth();
5647
- return yearsDiff * 12 + monthsDiff;
5648
- }
5649
-
5650
- // node_modules/date-fns/differenceInCalendarWeeks.js
5651
- function differenceInCalendarWeeks(laterDate, earlierDate, options) {
5652
- const [laterDate_, earlierDate_] = normalizeDates(
5653
- options?.in,
5654
- laterDate,
5655
- earlierDate
5656
- );
5657
- const laterStartOfWeek = startOfWeek2(laterDate_, options);
5658
- const earlierStartOfWeek = startOfWeek2(earlierDate_, options);
5659
- const laterTimestamp = +laterStartOfWeek - getTimezoneOffsetInMilliseconds(laterStartOfWeek);
5660
- const earlierTimestamp = +earlierStartOfWeek - getTimezoneOffsetInMilliseconds(earlierStartOfWeek);
5661
- return Math.round((laterTimestamp - earlierTimestamp) / millisecondsInWeek);
5662
- }
5663
-
5664
- // node_modules/date-fns/_lib/getRoundingMethod.js
5665
- function getRoundingMethod(method) {
5666
- return (number) => {
5667
- const round = Math.trunc;
5668
- const result = round(number);
5669
- return result === 0 ? 0 : result;
5670
- };
5671
- }
5672
-
5673
- // node_modules/date-fns/differenceInMilliseconds.js
5674
- function differenceInMilliseconds(laterDate, earlierDate) {
5675
- return +toDate(laterDate) - +toDate(earlierDate);
5676
- }
5677
-
5678
- // node_modules/date-fns/differenceInMinutes.js
5679
- function differenceInMinutes(dateLeft, dateRight, options) {
5680
- const diff = differenceInMilliseconds(dateLeft, dateRight) / millisecondsInMinute;
5681
- return getRoundingMethod()(diff);
5682
- }
5683
-
5684
- // node_modules/date-fns/endOfDay.js
5685
- function endOfDay(date, options) {
5686
- const _date = toDate(date, options?.in);
5687
- _date.setHours(23, 59, 59, 999);
5688
- return _date;
5689
- }
5690
-
5691
- // node_modules/date-fns/endOfMonth.js
5692
- function endOfMonth(date, options) {
5693
- const _date = toDate(date, options?.in);
5694
- const month = _date.getMonth();
5695
- _date.setFullYear(_date.getFullYear(), month + 1, 0);
5696
- _date.setHours(23, 59, 59, 999);
5697
- return _date;
5698
- }
5699
-
5700
- // node_modules/date-fns/startOfMonth.js
5701
- function startOfMonth(date, options) {
5702
- const _date = toDate(date, options?.in);
5703
- _date.setDate(1);
5704
- _date.setHours(0, 0, 0, 0);
5705
- return _date;
5706
- }
5707
-
5708
- // node_modules/date-fns/startOfYear.js
5709
- function startOfYear(date, options) {
5710
- const date_ = toDate(date, options?.in);
5711
- date_.setFullYear(date_.getFullYear(), 0, 1);
5712
- date_.setHours(0, 0, 0, 0);
5713
- return date_;
5714
- }
5715
-
5716
- // node_modules/date-fns/endOfWeek.js
5717
- function endOfWeek(date, options) {
5718
- const weekStartsOn = options?.weekStartsOn;
5719
- const _date = toDate(date, options?.in);
5720
- const day = _date.getDay();
5721
- const diff = (day < weekStartsOn ? -7 : 0) + 6 - (day - weekStartsOn);
5722
- _date.setDate(_date.getDate() + diff);
5723
- _date.setHours(23, 59, 59, 999);
5724
- return _date;
5725
- }
5726
-
5727
- // node_modules/date-fns/locale/en-US/_lib/formatDistance.js
5728
- var formatDistanceLocale = {
5729
- lessThanXSeconds: {
5730
- one: "less than a second",
5731
- other: "less than {{count}} seconds"
5732
- },
5733
- xSeconds: {
5734
- one: "1 second",
5735
- other: "{{count}} seconds"
5736
- },
5737
- halfAMinute: "half a minute",
5738
- lessThanXMinutes: {
5739
- one: "less than a minute",
5740
- other: "less than {{count}} minutes"
5741
- },
5742
- xMinutes: {
5743
- one: "1 minute",
5744
- other: "{{count}} minutes"
5745
- },
5746
- aboutXHours: {
5747
- one: "about 1 hour",
5748
- other: "about {{count}} hours"
5749
- },
5750
- xHours: {
5751
- one: "1 hour",
5752
- other: "{{count}} hours"
5753
- },
5754
- xDays: {
5755
- one: "1 day",
5756
- other: "{{count}} days"
5757
- },
5758
- aboutXWeeks: {
5759
- one: "about 1 week",
5760
- other: "about {{count}} weeks"
5761
- },
5762
- xWeeks: {
5763
- one: "1 week",
5764
- other: "{{count}} weeks"
5765
- },
5766
- aboutXMonths: {
5767
- one: "about 1 month",
5768
- other: "about {{count}} months"
5769
- },
5770
- xMonths: {
5771
- one: "1 month",
5772
- other: "{{count}} months"
5773
- },
5774
- aboutXYears: {
5775
- one: "about 1 year",
5776
- other: "about {{count}} years"
5777
- },
5778
- xYears: {
5779
- one: "1 year",
5780
- other: "{{count}} years"
5781
- },
5782
- overXYears: {
5783
- one: "over 1 year",
5784
- other: "over {{count}} years"
5785
- },
5786
- almostXYears: {
5787
- one: "almost 1 year",
5788
- other: "almost {{count}} years"
5789
- }
5790
- };
5791
- var formatDistance = (token, count, options) => {
5792
- let result;
5793
- const tokenValue = formatDistanceLocale[token];
5794
- if (typeof tokenValue === "string") {
5795
- result = tokenValue;
5796
- } else if (count === 1) {
5797
- result = tokenValue.one;
5798
- } else {
5799
- result = tokenValue.other.replace("{{count}}", count.toString());
5800
- }
5801
- if (options?.addSuffix) {
5802
- if (options.comparison && options.comparison > 0) {
5803
- return "in " + result;
5804
- } else {
5805
- return result + " ago";
5806
- }
5807
- }
5808
- return result;
5809
- };
5810
-
5811
- // node_modules/date-fns/locale/_lib/buildFormatLongFn.js
5812
- function buildFormatLongFn(args) {
5813
- return (options = {}) => {
5814
- const width = options.width ? String(options.width) : args.defaultWidth;
5815
- const format2 = args.formats[width] || args.formats[args.defaultWidth];
5816
- return format2;
5817
- };
5818
- }
5819
-
5820
- // node_modules/date-fns/locale/en-US/_lib/formatLong.js
5821
- var dateFormats = {
5822
- full: "EEEE, MMMM do, y",
5823
- long: "MMMM do, y",
5824
- medium: "MMM d, y",
5825
- short: "MM/dd/yyyy"
5826
- };
5827
- var timeFormats = {
5828
- full: "h:mm:ss a zzzz",
5829
- long: "h:mm:ss a z",
5830
- medium: "h:mm:ss a",
5831
- short: "h:mm a"
5832
- };
5833
- var dateTimeFormats = {
5834
- full: "{{date}} 'at' {{time}}",
5835
- long: "{{date}} 'at' {{time}}",
5836
- medium: "{{date}}, {{time}}",
5837
- short: "{{date}}, {{time}}"
5838
- };
5839
- var formatLong = {
5840
- date: buildFormatLongFn({
5841
- formats: dateFormats,
5842
- defaultWidth: "full"
5843
- }),
5844
- time: buildFormatLongFn({
5845
- formats: timeFormats,
5846
- defaultWidth: "full"
5847
- }),
5848
- dateTime: buildFormatLongFn({
5849
- formats: dateTimeFormats,
5850
- defaultWidth: "full"
5851
- })
5852
- };
5853
-
5854
- // node_modules/date-fns/locale/en-US/_lib/formatRelative.js
5855
- var formatRelativeLocale = {
5856
- lastWeek: "'last' eeee 'at' p",
5857
- yesterday: "'yesterday at' p",
5858
- today: "'today at' p",
5859
- tomorrow: "'tomorrow at' p",
5860
- nextWeek: "eeee 'at' p",
5861
- other: "P"
5862
- };
5863
- var formatRelative = (token, _date, _baseDate, _options) => formatRelativeLocale[token];
5864
-
5865
- // node_modules/date-fns/locale/_lib/buildLocalizeFn.js
5866
- function buildLocalizeFn(args) {
5867
- return (value, options) => {
5868
- const context = options?.context ? String(options.context) : "standalone";
5869
- let valuesArray;
5870
- if (context === "formatting" && args.formattingValues) {
5871
- const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
5872
- const width = options?.width ? String(options.width) : defaultWidth;
5873
- valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
5874
- } else {
5875
- const defaultWidth = args.defaultWidth;
5876
- const width = options?.width ? String(options.width) : args.defaultWidth;
5877
- valuesArray = args.values[width] || args.values[defaultWidth];
5878
- }
5879
- const index = args.argumentCallback ? args.argumentCallback(value) : value;
5880
- return valuesArray[index];
5881
- };
5882
- }
5883
-
5884
- // node_modules/date-fns/locale/en-US/_lib/localize.js
5885
- var eraValues = {
5886
- narrow: ["B", "A"],
5887
- abbreviated: ["BC", "AD"],
5888
- wide: ["Before Christ", "Anno Domini"]
5889
- };
5890
- var quarterValues = {
5891
- narrow: ["1", "2", "3", "4"],
5892
- abbreviated: ["Q1", "Q2", "Q3", "Q4"],
5893
- wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
5894
- };
5895
- var monthValues = {
5896
- narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
5897
- abbreviated: [
5898
- "Jan",
5899
- "Feb",
5900
- "Mar",
5901
- "Apr",
5902
- "May",
5903
- "Jun",
5904
- "Jul",
5905
- "Aug",
5906
- "Sep",
5907
- "Oct",
5908
- "Nov",
5909
- "Dec"
5910
- ],
5911
- wide: [
5912
- "January",
5913
- "February",
5914
- "March",
5915
- "April",
5916
- "May",
5917
- "June",
5918
- "July",
5919
- "August",
5920
- "September",
5921
- "October",
5922
- "November",
5923
- "December"
5924
- ]
5925
- };
5926
- var dayValues = {
5927
- narrow: ["S", "M", "T", "W", "T", "F", "S"],
5928
- short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
5929
- abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
5930
- wide: [
5931
- "Sunday",
5932
- "Monday",
5933
- "Tuesday",
5934
- "Wednesday",
5935
- "Thursday",
5936
- "Friday",
5937
- "Saturday"
5938
- ]
5939
- };
5940
- var dayPeriodValues = {
5941
- narrow: {
5942
- am: "a",
5943
- pm: "p",
5944
- midnight: "mi",
5945
- noon: "n",
5946
- morning: "morning",
5947
- afternoon: "afternoon",
5948
- evening: "evening",
5949
- night: "night"
5950
- },
5951
- abbreviated: {
5952
- am: "AM",
5953
- pm: "PM",
5954
- midnight: "midnight",
5955
- noon: "noon",
5956
- morning: "morning",
5957
- afternoon: "afternoon",
5958
- evening: "evening",
5959
- night: "night"
5960
- },
5961
- wide: {
5962
- am: "a.m.",
5963
- pm: "p.m.",
5964
- midnight: "midnight",
5965
- noon: "noon",
5966
- morning: "morning",
5967
- afternoon: "afternoon",
5968
- evening: "evening",
5969
- night: "night"
5970
- }
5971
- };
5972
- var formattingDayPeriodValues = {
5973
- narrow: {
5974
- am: "a",
5975
- pm: "p",
5976
- midnight: "mi",
5977
- noon: "n",
5978
- morning: "in the morning",
5979
- afternoon: "in the afternoon",
5980
- evening: "in the evening",
5981
- night: "at night"
5982
- },
5983
- abbreviated: {
5984
- am: "AM",
5985
- pm: "PM",
5986
- midnight: "midnight",
5987
- noon: "noon",
5988
- morning: "in the morning",
5989
- afternoon: "in the afternoon",
5990
- evening: "in the evening",
5991
- night: "at night"
5992
- },
5993
- wide: {
5994
- am: "a.m.",
5995
- pm: "p.m.",
5996
- midnight: "midnight",
5997
- noon: "noon",
5998
- morning: "in the morning",
5999
- afternoon: "in the afternoon",
6000
- evening: "in the evening",
6001
- night: "at night"
6002
- }
6003
- };
6004
- var ordinalNumber = (dirtyNumber, _options) => {
6005
- const number = Number(dirtyNumber);
6006
- const rem100 = number % 100;
6007
- if (rem100 > 20 || rem100 < 10) {
6008
- switch (rem100 % 10) {
6009
- case 1:
6010
- return number + "st";
6011
- case 2:
6012
- return number + "nd";
6013
- case 3:
6014
- return number + "rd";
6015
- }
6016
- }
6017
- return number + "th";
6018
- };
6019
- var localize = {
6020
- ordinalNumber,
6021
- era: buildLocalizeFn({
6022
- values: eraValues,
6023
- defaultWidth: "wide"
6024
- }),
6025
- quarter: buildLocalizeFn({
6026
- values: quarterValues,
6027
- defaultWidth: "wide",
6028
- argumentCallback: (quarter) => quarter - 1
6029
- }),
6030
- month: buildLocalizeFn({
6031
- values: monthValues,
6032
- defaultWidth: "wide"
6033
- }),
6034
- day: buildLocalizeFn({
6035
- values: dayValues,
6036
- defaultWidth: "wide"
6037
- }),
6038
- dayPeriod: buildLocalizeFn({
6039
- values: dayPeriodValues,
6040
- defaultWidth: "wide",
6041
- formattingValues: formattingDayPeriodValues,
6042
- defaultFormattingWidth: "wide"
6043
- })
6044
- };
6045
-
6046
- // node_modules/date-fns/locale/_lib/buildMatchFn.js
6047
- function buildMatchFn(args) {
6048
- return (string, options = {}) => {
6049
- const width = options.width;
6050
- const matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
6051
- const matchResult = string.match(matchPattern);
6052
- if (!matchResult) {
6053
- return null;
6054
- }
6055
- const matchedString = matchResult[0];
6056
- const parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
6057
- const key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, (pattern) => pattern.test(matchedString)) : (
6058
- // [TODO] -- I challenge you to fix the type
6059
- findKey(parsePatterns, (pattern) => pattern.test(matchedString))
6060
- );
6061
- let value;
6062
- value = args.valueCallback ? args.valueCallback(key) : key;
6063
- value = options.valueCallback ? (
6064
- // [TODO] -- I challenge you to fix the type
6065
- options.valueCallback(value)
6066
- ) : value;
6067
- const rest = string.slice(matchedString.length);
6068
- return { value, rest };
6069
- };
6070
- }
6071
- function findKey(object, predicate) {
6072
- for (const key in object) {
6073
- if (Object.prototype.hasOwnProperty.call(object, key) && predicate(object[key])) {
6074
- return key;
6075
- }
6076
- }
6077
- return void 0;
6078
- }
6079
- function findIndex(array, predicate) {
6080
- for (let key = 0; key < array.length; key++) {
6081
- if (predicate(array[key])) {
6082
- return key;
6083
- }
6084
- }
6085
- return void 0;
6086
- }
6087
-
6088
- // node_modules/date-fns/locale/_lib/buildMatchPatternFn.js
6089
- function buildMatchPatternFn(args) {
6090
- return (string, options = {}) => {
6091
- const matchResult = string.match(args.matchPattern);
6092
- if (!matchResult) return null;
6093
- const matchedString = matchResult[0];
6094
- const parseResult = string.match(args.parsePattern);
6095
- if (!parseResult) return null;
6096
- let value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
6097
- value = options.valueCallback ? options.valueCallback(value) : value;
6098
- const rest = string.slice(matchedString.length);
6099
- return { value, rest };
6100
- };
6101
- }
6102
-
6103
- // node_modules/date-fns/locale/en-US/_lib/match.js
6104
- var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
6105
- var parseOrdinalNumberPattern = /\d+/i;
6106
- var matchEraPatterns = {
6107
- narrow: /^(b|a)/i,
6108
- abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
6109
- wide: /^(before christ|before common era|anno domini|common era)/i
6110
- };
6111
- var parseEraPatterns = {
6112
- any: [/^b/i, /^(a|c)/i]
6113
- };
6114
- var matchQuarterPatterns = {
6115
- narrow: /^[1234]/i,
6116
- abbreviated: /^q[1234]/i,
6117
- wide: /^[1234](th|st|nd|rd)? quarter/i
6118
- };
6119
- var parseQuarterPatterns = {
6120
- any: [/1/i, /2/i, /3/i, /4/i]
6121
- };
6122
- var matchMonthPatterns = {
6123
- narrow: /^[jfmasond]/i,
6124
- abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
6125
- wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
6126
- };
6127
- var parseMonthPatterns = {
6128
- narrow: [
6129
- /^j/i,
6130
- /^f/i,
6131
- /^m/i,
6132
- /^a/i,
6133
- /^m/i,
6134
- /^j/i,
6135
- /^j/i,
6136
- /^a/i,
6137
- /^s/i,
6138
- /^o/i,
6139
- /^n/i,
6140
- /^d/i
6141
- ],
6142
- any: [
6143
- /^ja/i,
6144
- /^f/i,
6145
- /^mar/i,
6146
- /^ap/i,
6147
- /^may/i,
6148
- /^jun/i,
6149
- /^jul/i,
6150
- /^au/i,
6151
- /^s/i,
6152
- /^o/i,
6153
- /^n/i,
6154
- /^d/i
6155
- ]
6156
- };
6157
- var matchDayPatterns = {
6158
- narrow: /^[smtwf]/i,
6159
- short: /^(su|mo|tu|we|th|fr|sa)/i,
6160
- abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
6161
- wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
6162
- };
6163
- var parseDayPatterns = {
6164
- narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
6165
- any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
6166
- };
6167
- var matchDayPeriodPatterns = {
6168
- narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
6169
- any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
6170
- };
6171
- var parseDayPeriodPatterns = {
6172
- any: {
6173
- am: /^a/i,
6174
- pm: /^p/i,
6175
- midnight: /^mi/i,
6176
- noon: /^no/i,
6177
- morning: /morning/i,
6178
- afternoon: /afternoon/i,
6179
- evening: /evening/i,
6180
- night: /night/i
6181
- }
6182
- };
6183
- var match = {
6184
- ordinalNumber: buildMatchPatternFn({
6185
- matchPattern: matchOrdinalNumberPattern,
6186
- parsePattern: parseOrdinalNumberPattern,
6187
- valueCallback: (value) => parseInt(value, 10)
6188
- }),
6189
- era: buildMatchFn({
6190
- matchPatterns: matchEraPatterns,
6191
- defaultMatchWidth: "wide",
6192
- parsePatterns: parseEraPatterns,
6193
- defaultParseWidth: "any"
6194
- }),
6195
- quarter: buildMatchFn({
6196
- matchPatterns: matchQuarterPatterns,
6197
- defaultMatchWidth: "wide",
6198
- parsePatterns: parseQuarterPatterns,
6199
- defaultParseWidth: "any",
6200
- valueCallback: (index) => index + 1
6201
- }),
6202
- month: buildMatchFn({
6203
- matchPatterns: matchMonthPatterns,
6204
- defaultMatchWidth: "wide",
6205
- parsePatterns: parseMonthPatterns,
6206
- defaultParseWidth: "any"
6207
- }),
6208
- day: buildMatchFn({
6209
- matchPatterns: matchDayPatterns,
6210
- defaultMatchWidth: "wide",
6211
- parsePatterns: parseDayPatterns,
6212
- defaultParseWidth: "any"
6213
- }),
6214
- dayPeriod: buildMatchFn({
6215
- matchPatterns: matchDayPeriodPatterns,
6216
- defaultMatchWidth: "any",
6217
- parsePatterns: parseDayPeriodPatterns,
6218
- defaultParseWidth: "any"
6219
- })
6220
- };
6221
-
6222
- // node_modules/date-fns/locale/en-US.js
6223
- var enUS = {
6224
- code: "en-US",
6225
- formatDistance,
6226
- formatLong,
6227
- formatRelative,
6228
- localize,
6229
- match,
6230
- options: {
6231
- weekStartsOn: 0,
6232
- firstWeekContainsDate: 1
6233
- }
6234
- };
6235
-
6236
- // node_modules/date-fns/getDayOfYear.js
6237
- function getDayOfYear(date, options) {
6238
- const _date = toDate(date, options?.in);
6239
- const diff = differenceInCalendarDays(_date, startOfYear(_date));
6240
- const dayOfYear = diff + 1;
6241
- return dayOfYear;
6242
- }
6243
-
6244
- // node_modules/date-fns/getISOWeek.js
6245
- function getISOWeek(date, options) {
6246
- const _date = toDate(date, options?.in);
6247
- const diff = +startOfISOWeek(_date) - +startOfISOWeekYear(_date);
6248
- return Math.round(diff / millisecondsInWeek) + 1;
6249
- }
6250
-
6251
- // node_modules/date-fns/getWeekYear.js
6252
- function getWeekYear(date, options) {
6253
- const _date = toDate(date, options?.in);
6254
- const year = _date.getFullYear();
6255
- const defaultOptions2 = getDefaultOptions();
6256
- const firstWeekContainsDate = options?.firstWeekContainsDate ?? options?.locale?.options?.firstWeekContainsDate ?? defaultOptions2.firstWeekContainsDate ?? defaultOptions2.locale?.options?.firstWeekContainsDate ?? 1;
6257
- const firstWeekOfNextYear = constructFrom(options?.in || date, 0);
6258
- firstWeekOfNextYear.setFullYear(year + 1, 0, firstWeekContainsDate);
6259
- firstWeekOfNextYear.setHours(0, 0, 0, 0);
6260
- const startOfNextYear = startOfWeek2(firstWeekOfNextYear, options);
6261
- const firstWeekOfThisYear = constructFrom(options?.in || date, 0);
6262
- firstWeekOfThisYear.setFullYear(year, 0, firstWeekContainsDate);
6263
- firstWeekOfThisYear.setHours(0, 0, 0, 0);
6264
- const startOfThisYear = startOfWeek2(firstWeekOfThisYear, options);
6265
- if (+_date >= +startOfNextYear) {
6266
- return year + 1;
6267
- } else if (+_date >= +startOfThisYear) {
6268
- return year;
6269
- } else {
6270
- return year - 1;
6271
- }
6272
- }
6273
-
6274
- // node_modules/date-fns/startOfWeekYear.js
6275
- function startOfWeekYear(date, options) {
6276
- const defaultOptions2 = getDefaultOptions();
6277
- const firstWeekContainsDate = options?.firstWeekContainsDate ?? options?.locale?.options?.firstWeekContainsDate ?? defaultOptions2.firstWeekContainsDate ?? defaultOptions2.locale?.options?.firstWeekContainsDate ?? 1;
6278
- const year = getWeekYear(date, options);
6279
- const firstWeek = constructFrom(options?.in || date, 0);
6280
- firstWeek.setFullYear(year, 0, firstWeekContainsDate);
6281
- firstWeek.setHours(0, 0, 0, 0);
6282
- const _date = startOfWeek2(firstWeek, options);
6283
- return _date;
6284
- }
6285
-
6286
- // node_modules/date-fns/getWeek.js
6287
- function getWeek(date, options) {
6288
- const _date = toDate(date, options?.in);
6289
- const diff = +startOfWeek2(_date, options) - +startOfWeekYear(_date, options);
6290
- return Math.round(diff / millisecondsInWeek) + 1;
6291
- }
6292
-
6293
- // node_modules/date-fns/_lib/addLeadingZeros.js
6294
- function addLeadingZeros(number, targetLength) {
6295
- const sign = number < 0 ? "-" : "";
6296
- const output = Math.abs(number).toString().padStart(targetLength, "0");
6297
- return sign + output;
6298
- }
6299
-
6300
- // node_modules/date-fns/_lib/format/lightFormatters.js
6301
- var lightFormatters = {
6302
- // Year
6303
- y(date, token) {
6304
- const signedYear = date.getFullYear();
6305
- const year = signedYear > 0 ? signedYear : 1 - signedYear;
6306
- return addLeadingZeros(token === "yy" ? year % 100 : year, token.length);
6307
- },
6308
- // Month
6309
- M(date, token) {
6310
- const month = date.getMonth();
6311
- return token === "M" ? String(month + 1) : addLeadingZeros(month + 1, 2);
6312
- },
6313
- // Day of the month
6314
- d(date, token) {
6315
- return addLeadingZeros(date.getDate(), token.length);
6316
- },
6317
- // AM or PM
6318
- a(date, token) {
6319
- const dayPeriodEnumValue = date.getHours() / 12 >= 1 ? "pm" : "am";
6320
- switch (token) {
6321
- case "a":
6322
- case "aa":
6323
- return dayPeriodEnumValue.toUpperCase();
6324
- case "aaa":
6325
- return dayPeriodEnumValue;
6326
- case "aaaaa":
6327
- return dayPeriodEnumValue[0];
6328
- case "aaaa":
6329
- default:
6330
- return dayPeriodEnumValue === "am" ? "a.m." : "p.m.";
6331
- }
6332
- },
6333
- // Hour [1-12]
6334
- h(date, token) {
6335
- return addLeadingZeros(date.getHours() % 12 || 12, token.length);
6336
- },
6337
- // Hour [0-23]
6338
- H(date, token) {
6339
- return addLeadingZeros(date.getHours(), token.length);
6340
- },
6341
- // Minute
6342
- m(date, token) {
6343
- return addLeadingZeros(date.getMinutes(), token.length);
6344
- },
6345
- // Second
6346
- s(date, token) {
6347
- return addLeadingZeros(date.getSeconds(), token.length);
6348
- },
6349
- // Fraction of second
6350
- S(date, token) {
6351
- const numberOfDigits = token.length;
6352
- const milliseconds = date.getMilliseconds();
6353
- const fractionalSeconds = Math.trunc(
6354
- milliseconds * Math.pow(10, numberOfDigits - 3)
6355
- );
6356
- return addLeadingZeros(fractionalSeconds, token.length);
6357
- }
6358
- };
6359
-
6360
- // node_modules/date-fns/_lib/format/formatters.js
6361
- var dayPeriodEnum = {
6362
- midnight: "midnight",
6363
- noon: "noon",
6364
- morning: "morning",
6365
- afternoon: "afternoon",
6366
- evening: "evening",
6367
- night: "night"
6368
- };
6369
- var formatters = {
6370
- // Era
6371
- G: function(date, token, localize2) {
6372
- const era = date.getFullYear() > 0 ? 1 : 0;
6373
- switch (token) {
6374
- // AD, BC
6375
- case "G":
6376
- case "GG":
6377
- case "GGG":
6378
- return localize2.era(era, { width: "abbreviated" });
6379
- // A, B
6380
- case "GGGGG":
6381
- return localize2.era(era, { width: "narrow" });
6382
- // Anno Domini, Before Christ
6383
- case "GGGG":
6384
- default:
6385
- return localize2.era(era, { width: "wide" });
6386
- }
6387
- },
6388
- // Year
6389
- y: function(date, token, localize2) {
6390
- if (token === "yo") {
6391
- const signedYear = date.getFullYear();
6392
- const year = signedYear > 0 ? signedYear : 1 - signedYear;
6393
- return localize2.ordinalNumber(year, { unit: "year" });
6394
- }
6395
- return lightFormatters.y(date, token);
6396
- },
6397
- // Local week-numbering year
6398
- Y: function(date, token, localize2, options) {
6399
- const signedWeekYear = getWeekYear(date, options);
6400
- const weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;
6401
- if (token === "YY") {
6402
- const twoDigitYear = weekYear % 100;
6403
- return addLeadingZeros(twoDigitYear, 2);
6404
- }
6405
- if (token === "Yo") {
6406
- return localize2.ordinalNumber(weekYear, { unit: "year" });
6407
- }
6408
- return addLeadingZeros(weekYear, token.length);
6409
- },
6410
- // ISO week-numbering year
6411
- R: function(date, token) {
6412
- const isoWeekYear = getISOWeekYear(date);
6413
- return addLeadingZeros(isoWeekYear, token.length);
6414
- },
6415
- // Extended year. This is a single number designating the year of this calendar system.
6416
- // The main difference between `y` and `u` localizers are B.C. years:
6417
- // | Year | `y` | `u` |
6418
- // |------|-----|-----|
6419
- // | AC 1 | 1 | 1 |
6420
- // | BC 1 | 1 | 0 |
6421
- // | BC 2 | 2 | -1 |
6422
- // Also `yy` always returns the last two digits of a year,
6423
- // while `uu` pads single digit years to 2 characters and returns other years unchanged.
6424
- u: function(date, token) {
6425
- const year = date.getFullYear();
6426
- return addLeadingZeros(year, token.length);
6427
- },
6428
- // Quarter
6429
- Q: function(date, token, localize2) {
6430
- const quarter = Math.ceil((date.getMonth() + 1) / 3);
6431
- switch (token) {
6432
- // 1, 2, 3, 4
6433
- case "Q":
6434
- return String(quarter);
6435
- // 01, 02, 03, 04
6436
- case "QQ":
6437
- return addLeadingZeros(quarter, 2);
6438
- // 1st, 2nd, 3rd, 4th
6439
- case "Qo":
6440
- return localize2.ordinalNumber(quarter, { unit: "quarter" });
6441
- // Q1, Q2, Q3, Q4
6442
- case "QQQ":
6443
- return localize2.quarter(quarter, {
6444
- width: "abbreviated",
6445
- context: "formatting"
6446
- });
6447
- // 1, 2, 3, 4 (narrow quarter; could be not numerical)
6448
- case "QQQQQ":
6449
- return localize2.quarter(quarter, {
6450
- width: "narrow",
6451
- context: "formatting"
6452
- });
6453
- // 1st quarter, 2nd quarter, ...
6454
- case "QQQQ":
6455
- default:
6456
- return localize2.quarter(quarter, {
6457
- width: "wide",
6458
- context: "formatting"
6459
- });
6460
- }
6461
- },
6462
- // Stand-alone quarter
6463
- q: function(date, token, localize2) {
6464
- const quarter = Math.ceil((date.getMonth() + 1) / 3);
6465
- switch (token) {
6466
- // 1, 2, 3, 4
6467
- case "q":
6468
- return String(quarter);
6469
- // 01, 02, 03, 04
6470
- case "qq":
6471
- return addLeadingZeros(quarter, 2);
6472
- // 1st, 2nd, 3rd, 4th
6473
- case "qo":
6474
- return localize2.ordinalNumber(quarter, { unit: "quarter" });
6475
- // Q1, Q2, Q3, Q4
6476
- case "qqq":
6477
- return localize2.quarter(quarter, {
6478
- width: "abbreviated",
6479
- context: "standalone"
6480
- });
6481
- // 1, 2, 3, 4 (narrow quarter; could be not numerical)
6482
- case "qqqqq":
6483
- return localize2.quarter(quarter, {
6484
- width: "narrow",
6485
- context: "standalone"
6486
- });
6487
- // 1st quarter, 2nd quarter, ...
6488
- case "qqqq":
6489
- default:
6490
- return localize2.quarter(quarter, {
6491
- width: "wide",
6492
- context: "standalone"
6493
- });
6494
- }
6495
- },
6496
- // Month
6497
- M: function(date, token, localize2) {
6498
- const month = date.getMonth();
6499
- switch (token) {
6500
- case "M":
6501
- case "MM":
6502
- return lightFormatters.M(date, token);
6503
- // 1st, 2nd, ..., 12th
6504
- case "Mo":
6505
- return localize2.ordinalNumber(month + 1, { unit: "month" });
6506
- // Jan, Feb, ..., Dec
6507
- case "MMM":
6508
- return localize2.month(month, {
6509
- width: "abbreviated",
6510
- context: "formatting"
6511
- });
6512
- // J, F, ..., D
6513
- case "MMMMM":
6514
- return localize2.month(month, {
6515
- width: "narrow",
6516
- context: "formatting"
6517
- });
6518
- // January, February, ..., December
6519
- case "MMMM":
6520
- default:
6521
- return localize2.month(month, { width: "wide", context: "formatting" });
6522
- }
6523
- },
6524
- // Stand-alone month
6525
- L: function(date, token, localize2) {
6526
- const month = date.getMonth();
6527
- switch (token) {
6528
- // 1, 2, ..., 12
6529
- case "L":
6530
- return String(month + 1);
6531
- // 01, 02, ..., 12
6532
- case "LL":
6533
- return addLeadingZeros(month + 1, 2);
6534
- // 1st, 2nd, ..., 12th
6535
- case "Lo":
6536
- return localize2.ordinalNumber(month + 1, { unit: "month" });
6537
- // Jan, Feb, ..., Dec
6538
- case "LLL":
6539
- return localize2.month(month, {
6540
- width: "abbreviated",
6541
- context: "standalone"
6542
- });
6543
- // J, F, ..., D
6544
- case "LLLLL":
6545
- return localize2.month(month, {
6546
- width: "narrow",
6547
- context: "standalone"
6548
- });
6549
- // January, February, ..., December
6550
- case "LLLL":
6551
- default:
6552
- return localize2.month(month, { width: "wide", context: "standalone" });
6553
- }
6554
- },
6555
- // Local week of year
6556
- w: function(date, token, localize2, options) {
6557
- const week = getWeek(date, options);
6558
- if (token === "wo") {
6559
- return localize2.ordinalNumber(week, { unit: "week" });
6560
- }
6561
- return addLeadingZeros(week, token.length);
6562
- },
6563
- // ISO week of year
6564
- I: function(date, token, localize2) {
6565
- const isoWeek = getISOWeek(date);
6566
- if (token === "Io") {
6567
- return localize2.ordinalNumber(isoWeek, { unit: "week" });
6568
- }
6569
- return addLeadingZeros(isoWeek, token.length);
6570
- },
6571
- // Day of the month
6572
- d: function(date, token, localize2) {
6573
- if (token === "do") {
6574
- return localize2.ordinalNumber(date.getDate(), { unit: "date" });
6575
- }
6576
- return lightFormatters.d(date, token);
6577
- },
6578
- // Day of year
6579
- D: function(date, token, localize2) {
6580
- const dayOfYear = getDayOfYear(date);
6581
- if (token === "Do") {
6582
- return localize2.ordinalNumber(dayOfYear, { unit: "dayOfYear" });
6583
- }
6584
- return addLeadingZeros(dayOfYear, token.length);
6585
- },
6586
- // Day of week
6587
- E: function(date, token, localize2) {
6588
- const dayOfWeek = date.getDay();
6589
- switch (token) {
6590
- // Tue
6591
- case "E":
6592
- case "EE":
6593
- case "EEE":
6594
- return localize2.day(dayOfWeek, {
6595
- width: "abbreviated",
6596
- context: "formatting"
6597
- });
6598
- // T
6599
- case "EEEEE":
6600
- return localize2.day(dayOfWeek, {
6601
- width: "narrow",
6602
- context: "formatting"
6603
- });
6604
- // Tu
6605
- case "EEEEEE":
6606
- return localize2.day(dayOfWeek, {
6607
- width: "short",
6608
- context: "formatting"
6609
- });
6610
- // Tuesday
6611
- case "EEEE":
6612
- default:
6613
- return localize2.day(dayOfWeek, {
6614
- width: "wide",
6615
- context: "formatting"
6616
- });
6617
- }
6618
- },
6619
- // Local day of week
6620
- e: function(date, token, localize2, options) {
6621
- const dayOfWeek = date.getDay();
6622
- const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
6623
- switch (token) {
6624
- // Numerical value (Nth day of week with current locale or weekStartsOn)
6625
- case "e":
6626
- return String(localDayOfWeek);
6627
- // Padded numerical value
6628
- case "ee":
6629
- return addLeadingZeros(localDayOfWeek, 2);
6630
- // 1st, 2nd, ..., 7th
6631
- case "eo":
6632
- return localize2.ordinalNumber(localDayOfWeek, { unit: "day" });
6633
- case "eee":
6634
- return localize2.day(dayOfWeek, {
6635
- width: "abbreviated",
6636
- context: "formatting"
6637
- });
6638
- // T
6639
- case "eeeee":
6640
- return localize2.day(dayOfWeek, {
6641
- width: "narrow",
6642
- context: "formatting"
6643
- });
6644
- // Tu
6645
- case "eeeeee":
6646
- return localize2.day(dayOfWeek, {
6647
- width: "short",
6648
- context: "formatting"
6649
- });
6650
- // Tuesday
6651
- case "eeee":
6652
- default:
6653
- return localize2.day(dayOfWeek, {
6654
- width: "wide",
6655
- context: "formatting"
6656
- });
6657
- }
6658
- },
6659
- // Stand-alone local day of week
6660
- c: function(date, token, localize2, options) {
6661
- const dayOfWeek = date.getDay();
6662
- const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
6663
- switch (token) {
6664
- // Numerical value (same as in `e`)
6665
- case "c":
6666
- return String(localDayOfWeek);
6667
- // Padded numerical value
6668
- case "cc":
6669
- return addLeadingZeros(localDayOfWeek, token.length);
6670
- // 1st, 2nd, ..., 7th
6671
- case "co":
6672
- return localize2.ordinalNumber(localDayOfWeek, { unit: "day" });
6673
- case "ccc":
6674
- return localize2.day(dayOfWeek, {
6675
- width: "abbreviated",
6676
- context: "standalone"
6677
- });
6678
- // T
6679
- case "ccccc":
6680
- return localize2.day(dayOfWeek, {
6681
- width: "narrow",
6682
- context: "standalone"
6683
- });
6684
- // Tu
6685
- case "cccccc":
6686
- return localize2.day(dayOfWeek, {
6687
- width: "short",
6688
- context: "standalone"
6689
- });
6690
- // Tuesday
6691
- case "cccc":
6692
- default:
6693
- return localize2.day(dayOfWeek, {
6694
- width: "wide",
6695
- context: "standalone"
6696
- });
6697
- }
6698
- },
6699
- // ISO day of week
6700
- i: function(date, token, localize2) {
6701
- const dayOfWeek = date.getDay();
6702
- const isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;
6703
- switch (token) {
6704
- // 2
6705
- case "i":
6706
- return String(isoDayOfWeek);
6707
- // 02
6708
- case "ii":
6709
- return addLeadingZeros(isoDayOfWeek, token.length);
6710
- // 2nd
6711
- case "io":
6712
- return localize2.ordinalNumber(isoDayOfWeek, { unit: "day" });
6713
- // Tue
6714
- case "iii":
6715
- return localize2.day(dayOfWeek, {
6716
- width: "abbreviated",
6717
- context: "formatting"
6718
- });
6719
- // T
6720
- case "iiiii":
6721
- return localize2.day(dayOfWeek, {
6722
- width: "narrow",
6723
- context: "formatting"
6724
- });
6725
- // Tu
6726
- case "iiiiii":
6727
- return localize2.day(dayOfWeek, {
6728
- width: "short",
6729
- context: "formatting"
6730
- });
6731
- // Tuesday
6732
- case "iiii":
6733
- default:
6734
- return localize2.day(dayOfWeek, {
6735
- width: "wide",
6736
- context: "formatting"
6737
- });
6738
- }
6739
- },
6740
- // AM or PM
6741
- a: function(date, token, localize2) {
6742
- const hours = date.getHours();
6743
- const dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
6744
- switch (token) {
6745
- case "a":
6746
- case "aa":
6747
- return localize2.dayPeriod(dayPeriodEnumValue, {
6748
- width: "abbreviated",
6749
- context: "formatting"
6750
- });
6751
- case "aaa":
6752
- return localize2.dayPeriod(dayPeriodEnumValue, {
6753
- width: "abbreviated",
6754
- context: "formatting"
6755
- }).toLowerCase();
6756
- case "aaaaa":
6757
- return localize2.dayPeriod(dayPeriodEnumValue, {
6758
- width: "narrow",
6759
- context: "formatting"
6760
- });
6761
- case "aaaa":
6762
- default:
6763
- return localize2.dayPeriod(dayPeriodEnumValue, {
6764
- width: "wide",
6765
- context: "formatting"
6766
- });
6767
- }
6768
- },
6769
- // AM, PM, midnight, noon
6770
- b: function(date, token, localize2) {
6771
- const hours = date.getHours();
6772
- let dayPeriodEnumValue;
6773
- if (hours === 12) {
6774
- dayPeriodEnumValue = dayPeriodEnum.noon;
6775
- } else if (hours === 0) {
6776
- dayPeriodEnumValue = dayPeriodEnum.midnight;
6777
- } else {
6778
- dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
6779
- }
6780
- switch (token) {
6781
- case "b":
6782
- case "bb":
6783
- return localize2.dayPeriod(dayPeriodEnumValue, {
6784
- width: "abbreviated",
6785
- context: "formatting"
6786
- });
6787
- case "bbb":
6788
- return localize2.dayPeriod(dayPeriodEnumValue, {
6789
- width: "abbreviated",
6790
- context: "formatting"
6791
- }).toLowerCase();
6792
- case "bbbbb":
6793
- return localize2.dayPeriod(dayPeriodEnumValue, {
6794
- width: "narrow",
6795
- context: "formatting"
6796
- });
6797
- case "bbbb":
6798
- default:
6799
- return localize2.dayPeriod(dayPeriodEnumValue, {
6800
- width: "wide",
6801
- context: "formatting"
6802
- });
6803
- }
6804
- },
6805
- // in the morning, in the afternoon, in the evening, at night
6806
- B: function(date, token, localize2) {
6807
- const hours = date.getHours();
6808
- let dayPeriodEnumValue;
6809
- if (hours >= 17) {
6810
- dayPeriodEnumValue = dayPeriodEnum.evening;
6811
- } else if (hours >= 12) {
6812
- dayPeriodEnumValue = dayPeriodEnum.afternoon;
6813
- } else if (hours >= 4) {
6814
- dayPeriodEnumValue = dayPeriodEnum.morning;
6815
- } else {
6816
- dayPeriodEnumValue = dayPeriodEnum.night;
6817
- }
6818
- switch (token) {
6819
- case "B":
6820
- case "BB":
6821
- case "BBB":
6822
- return localize2.dayPeriod(dayPeriodEnumValue, {
6823
- width: "abbreviated",
6824
- context: "formatting"
6825
- });
6826
- case "BBBBB":
6827
- return localize2.dayPeriod(dayPeriodEnumValue, {
6828
- width: "narrow",
6829
- context: "formatting"
6830
- });
6831
- case "BBBB":
6832
- default:
6833
- return localize2.dayPeriod(dayPeriodEnumValue, {
6834
- width: "wide",
6835
- context: "formatting"
6836
- });
6837
- }
6838
- },
6839
- // Hour [1-12]
6840
- h: function(date, token, localize2) {
6841
- if (token === "ho") {
6842
- let hours = date.getHours() % 12;
6843
- if (hours === 0) hours = 12;
6844
- return localize2.ordinalNumber(hours, { unit: "hour" });
6845
- }
6846
- return lightFormatters.h(date, token);
6847
- },
6848
- // Hour [0-23]
6849
- H: function(date, token, localize2) {
6850
- if (token === "Ho") {
6851
- return localize2.ordinalNumber(date.getHours(), { unit: "hour" });
6852
- }
6853
- return lightFormatters.H(date, token);
6854
- },
6855
- // Hour [0-11]
6856
- K: function(date, token, localize2) {
6857
- const hours = date.getHours() % 12;
6858
- if (token === "Ko") {
6859
- return localize2.ordinalNumber(hours, { unit: "hour" });
6860
- }
6861
- return addLeadingZeros(hours, token.length);
6862
- },
6863
- // Hour [1-24]
6864
- k: function(date, token, localize2) {
6865
- let hours = date.getHours();
6866
- if (hours === 0) hours = 24;
6867
- if (token === "ko") {
6868
- return localize2.ordinalNumber(hours, { unit: "hour" });
6869
- }
6870
- return addLeadingZeros(hours, token.length);
6871
- },
6872
- // Minute
6873
- m: function(date, token, localize2) {
6874
- if (token === "mo") {
6875
- return localize2.ordinalNumber(date.getMinutes(), { unit: "minute" });
6876
- }
6877
- return lightFormatters.m(date, token);
6878
- },
6879
- // Second
6880
- s: function(date, token, localize2) {
6881
- if (token === "so") {
6882
- return localize2.ordinalNumber(date.getSeconds(), { unit: "second" });
6883
- }
6884
- return lightFormatters.s(date, token);
6885
- },
6886
- // Fraction of second
6887
- S: function(date, token) {
6888
- return lightFormatters.S(date, token);
6889
- },
6890
- // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
6891
- X: function(date, token, _localize) {
6892
- const timezoneOffset = date.getTimezoneOffset();
6893
- if (timezoneOffset === 0) {
6894
- return "Z";
6895
- }
6896
- switch (token) {
6897
- // Hours and optional minutes
6898
- case "X":
6899
- return formatTimezoneWithOptionalMinutes(timezoneOffset);
6900
- // Hours, minutes and optional seconds without `:` delimiter
6901
- // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
6902
- // so this token always has the same output as `XX`
6903
- case "XXXX":
6904
- case "XX":
6905
- return formatTimezone(timezoneOffset);
6906
- // Hours, minutes and optional seconds with `:` delimiter
6907
- // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
6908
- // so this token always has the same output as `XXX`
6909
- case "XXXXX":
6910
- case "XXX":
6911
- // Hours and minutes with `:` delimiter
6912
- default:
6913
- return formatTimezone(timezoneOffset, ":");
6914
- }
6915
- },
6916
- // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
6917
- x: function(date, token, _localize) {
6918
- const timezoneOffset = date.getTimezoneOffset();
6919
- switch (token) {
6920
- // Hours and optional minutes
6921
- case "x":
6922
- return formatTimezoneWithOptionalMinutes(timezoneOffset);
6923
- // Hours, minutes and optional seconds without `:` delimiter
6924
- // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
6925
- // so this token always has the same output as `xx`
6926
- case "xxxx":
6927
- case "xx":
6928
- return formatTimezone(timezoneOffset);
6929
- // Hours, minutes and optional seconds with `:` delimiter
6930
- // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
6931
- // so this token always has the same output as `xxx`
6932
- case "xxxxx":
6933
- case "xxx":
6934
- // Hours and minutes with `:` delimiter
6935
- default:
6936
- return formatTimezone(timezoneOffset, ":");
6937
- }
6938
- },
6939
- // Timezone (GMT)
6940
- O: function(date, token, _localize) {
6941
- const timezoneOffset = date.getTimezoneOffset();
6942
- switch (token) {
6943
- // Short
6944
- case "O":
6945
- case "OO":
6946
- case "OOO":
6947
- return "GMT" + formatTimezoneShort(timezoneOffset, ":");
6948
- // Long
6949
- case "OOOO":
6950
- default:
6951
- return "GMT" + formatTimezone(timezoneOffset, ":");
6952
- }
6953
- },
6954
- // Timezone (specific non-location)
6955
- z: function(date, token, _localize) {
6956
- const timezoneOffset = date.getTimezoneOffset();
6957
- switch (token) {
6958
- // Short
6959
- case "z":
6960
- case "zz":
6961
- case "zzz":
6962
- return "GMT" + formatTimezoneShort(timezoneOffset, ":");
6963
- // Long
6964
- case "zzzz":
6965
- default:
6966
- return "GMT" + formatTimezone(timezoneOffset, ":");
6967
- }
6968
- },
6969
- // Seconds timestamp
6970
- t: function(date, token, _localize) {
6971
- const timestamp = Math.trunc(+date / 1e3);
6972
- return addLeadingZeros(timestamp, token.length);
6973
- },
6974
- // Milliseconds timestamp
6975
- T: function(date, token, _localize) {
6976
- return addLeadingZeros(+date, token.length);
6977
- }
6978
- };
6979
- function formatTimezoneShort(offset, delimiter = "") {
6980
- const sign = offset > 0 ? "-" : "+";
6981
- const absOffset = Math.abs(offset);
6982
- const hours = Math.trunc(absOffset / 60);
6983
- const minutes = absOffset % 60;
6984
- if (minutes === 0) {
6985
- return sign + String(hours);
6986
- }
6987
- return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);
6988
- }
6989
- function formatTimezoneWithOptionalMinutes(offset, delimiter) {
6990
- if (offset % 60 === 0) {
6991
- const sign = offset > 0 ? "-" : "+";
6992
- return sign + addLeadingZeros(Math.abs(offset) / 60, 2);
6993
- }
6994
- return formatTimezone(offset, delimiter);
6995
- }
6996
- function formatTimezone(offset, delimiter = "") {
6997
- const sign = offset > 0 ? "-" : "+";
6998
- const absOffset = Math.abs(offset);
6999
- const hours = addLeadingZeros(Math.trunc(absOffset / 60), 2);
7000
- const minutes = addLeadingZeros(absOffset % 60, 2);
7001
- return sign + hours + delimiter + minutes;
7002
- }
7003
-
7004
- // node_modules/date-fns/_lib/format/longFormatters.js
7005
- var dateLongFormatter = (pattern, formatLong2) => {
7006
- switch (pattern) {
7007
- case "P":
7008
- return formatLong2.date({ width: "short" });
7009
- case "PP":
7010
- return formatLong2.date({ width: "medium" });
7011
- case "PPP":
7012
- return formatLong2.date({ width: "long" });
7013
- case "PPPP":
7014
- default:
7015
- return formatLong2.date({ width: "full" });
7016
- }
7017
- };
7018
- var timeLongFormatter = (pattern, formatLong2) => {
7019
- switch (pattern) {
7020
- case "p":
7021
- return formatLong2.time({ width: "short" });
7022
- case "pp":
7023
- return formatLong2.time({ width: "medium" });
7024
- case "ppp":
7025
- return formatLong2.time({ width: "long" });
7026
- case "pppp":
7027
- default:
7028
- return formatLong2.time({ width: "full" });
7029
- }
7030
- };
7031
- var dateTimeLongFormatter = (pattern, formatLong2) => {
7032
- const matchResult = pattern.match(/(P+)(p+)?/) || [];
7033
- const datePattern = matchResult[1];
7034
- const timePattern = matchResult[2];
7035
- if (!timePattern) {
7036
- return dateLongFormatter(pattern, formatLong2);
7037
- }
7038
- let dateTimeFormat;
7039
- switch (datePattern) {
7040
- case "P":
7041
- dateTimeFormat = formatLong2.dateTime({ width: "short" });
7042
- break;
7043
- case "PP":
7044
- dateTimeFormat = formatLong2.dateTime({ width: "medium" });
7045
- break;
7046
- case "PPP":
7047
- dateTimeFormat = formatLong2.dateTime({ width: "long" });
7048
- break;
7049
- case "PPPP":
7050
- default:
7051
- dateTimeFormat = formatLong2.dateTime({ width: "full" });
7052
- break;
7053
- }
7054
- return dateTimeFormat.replace("{{date}}", dateLongFormatter(datePattern, formatLong2)).replace("{{time}}", timeLongFormatter(timePattern, formatLong2));
7055
- };
7056
- var longFormatters = {
7057
- p: timeLongFormatter,
7058
- P: dateTimeLongFormatter
7059
- };
7060
-
7061
- // node_modules/date-fns/_lib/protectedTokens.js
7062
- var dayOfYearTokenRE = /^D+$/;
7063
- var weekYearTokenRE = /^Y+$/;
7064
- var throwTokens = ["D", "DD", "YY", "YYYY"];
7065
- function isProtectedDayOfYearToken(token) {
7066
- return dayOfYearTokenRE.test(token);
7067
- }
7068
- function isProtectedWeekYearToken(token) {
7069
- return weekYearTokenRE.test(token);
7070
- }
7071
- function warnOrThrowProtectedError(token, format2, input) {
7072
- const _message = message(token, format2, input);
7073
- console.warn(_message);
7074
- if (throwTokens.includes(token)) throw new RangeError(_message);
7075
- }
7076
- function message(token, format2, input) {
7077
- const subject = token[0] === "Y" ? "years" : "days of the month";
7078
- return `Use \`${token.toLowerCase()}\` instead of \`${token}\` (in \`${format2}\`) for formatting ${subject} to the input \`${input}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
7079
- }
7080
-
7081
- // node_modules/date-fns/format.js
7082
- var formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g;
7083
- var longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;
7084
- var escapedStringRegExp = /^'([^]*?)'?$/;
7085
- var doubleQuoteRegExp = /''/g;
7086
- var unescapedLatinCharacterRegExp = /[a-zA-Z]/;
7087
- function format(date, formatStr, options) {
7088
- const defaultOptions2 = getDefaultOptions();
7089
- const locale = defaultOptions2.locale ?? enUS;
7090
- const firstWeekContainsDate = defaultOptions2.firstWeekContainsDate ?? defaultOptions2.locale?.options?.firstWeekContainsDate ?? 1;
7091
- const weekStartsOn = defaultOptions2.weekStartsOn ?? defaultOptions2.locale?.options?.weekStartsOn ?? 0;
7092
- const originalDate = toDate(date, options?.in);
7093
- if (!isValid(originalDate)) {
7094
- throw new RangeError("Invalid time value");
7095
- }
7096
- let parts = formatStr.match(longFormattingTokensRegExp).map((substring) => {
7097
- const firstCharacter = substring[0];
7098
- if (firstCharacter === "p" || firstCharacter === "P") {
7099
- const longFormatter = longFormatters[firstCharacter];
7100
- return longFormatter(substring, locale.formatLong);
7101
- }
7102
- return substring;
7103
- }).join("").match(formattingTokensRegExp).map((substring) => {
7104
- if (substring === "''") {
7105
- return { isToken: false, value: "'" };
7106
- }
7107
- const firstCharacter = substring[0];
7108
- if (firstCharacter === "'") {
7109
- return { isToken: false, value: cleanEscapedString(substring) };
7110
- }
7111
- if (formatters[firstCharacter]) {
7112
- return { isToken: true, value: substring };
7113
- }
7114
- if (firstCharacter.match(unescapedLatinCharacterRegExp)) {
7115
- throw new RangeError(
7116
- "Format string contains an unescaped latin alphabet character `" + firstCharacter + "`"
7117
- );
7118
- }
7119
- return { isToken: false, value: substring };
7120
- });
7121
- if (locale.localize.preprocessor) {
7122
- parts = locale.localize.preprocessor(originalDate, parts);
7123
- }
7124
- const formatterOptions = {
7125
- firstWeekContainsDate,
7126
- weekStartsOn,
7127
- locale
7128
- };
7129
- return parts.map((part) => {
7130
- if (!part.isToken) return part.value;
7131
- const token = part.value;
7132
- if (isProtectedWeekYearToken(token) || isProtectedDayOfYearToken(token)) {
7133
- warnOrThrowProtectedError(token, formatStr, String(date));
7134
- }
7135
- const formatter = formatters[token[0]];
7136
- return formatter(originalDate, token, locale.localize, formatterOptions);
7137
- }).join("");
7138
- }
7139
- function cleanEscapedString(input) {
7140
- const matched = input.match(escapedStringRegExp);
7141
- if (!matched) {
7142
- return input;
7143
- }
7144
- return matched[1].replace(doubleQuoteRegExp, "'");
7145
- }
7146
-
7147
- // node_modules/date-fns/isSameMonth.js
7148
- function isSameMonth(laterDate, earlierDate, options) {
7149
- const [laterDate_, earlierDate_] = normalizeDates(
7150
- options?.in,
7151
- laterDate,
7152
- earlierDate
7153
- );
7154
- return laterDate_.getFullYear() === earlierDate_.getFullYear() && laterDate_.getMonth() === earlierDate_.getMonth();
7155
- }
7156
5425
  var DEFAULT_COLUMN_WIDTH = {
7157
5426
  days: 56,
7158
5427
  weeks: 80,
@@ -7165,19 +5434,19 @@ var DEFAULT_COLOR2 = "hsl(var(--chart-1))";
7165
5434
  var EDGE_HIT_PX = 8;
7166
5435
  var LONG_PRESS_MS = 300;
7167
5436
  function startOfScale(date, scale) {
7168
- if (scale === "days") return startOfDay(date);
7169
- if (scale === "weeks") return startOfWeek2(date, { weekStartsOn: 1 });
7170
- return startOfMonth(date);
5437
+ if (scale === "days") return dateFns.startOfDay(date);
5438
+ if (scale === "weeks") return dateFns.startOfWeek(date, { weekStartsOn: 1 });
5439
+ return dateFns.startOfMonth(date);
7171
5440
  }
7172
5441
  function endOfScale(date, scale) {
7173
- if (scale === "days") return startOfDay(date);
7174
- if (scale === "weeks") return endOfWeek(date, { weekStartsOn: 1 });
7175
- return endOfMonth(date);
5442
+ if (scale === "days") return dateFns.startOfDay(date);
5443
+ if (scale === "weeks") return dateFns.endOfWeek(date, { weekStartsOn: 1 });
5444
+ return dateFns.endOfMonth(date);
7176
5445
  }
7177
5446
  function addUnits(date, n, scale) {
7178
- if (scale === "days") return addDays(date, n);
7179
- if (scale === "weeks") return addWeeks(date, n);
7180
- return addMonths(date, n);
5447
+ if (scale === "days") return dateFns.addDays(date, n);
5448
+ if (scale === "weeks") return dateFns.addWeeks(date, n);
5449
+ return dateFns.addMonths(date, n);
7181
5450
  }
7182
5451
  function unitsBetween(a, b, scale) {
7183
5452
  if (scale === "days") {
@@ -7186,29 +5455,29 @@ function unitsBetween(a, b, scale) {
7186
5455
  if (scale === "weeks") {
7187
5456
  return (b.getTime() - a.getTime()) / (7 * 864e5);
7188
5457
  }
7189
- const wholeMonths = differenceInCalendarMonths(b, a);
7190
- const monthAnchor = addMonths(a, wholeMonths);
7191
- const monthLen = (endOfMonth(monthAnchor).getTime() - startOfMonth(monthAnchor).getTime()) / 864e5 + 1;
5458
+ const wholeMonths = dateFns.differenceInCalendarMonths(b, a);
5459
+ const monthAnchor = dateFns.addMonths(a, wholeMonths);
5460
+ const monthLen = (dateFns.endOfMonth(monthAnchor).getTime() - dateFns.startOfMonth(monthAnchor).getTime()) / 864e5 + 1;
7192
5461
  const remainderDays = (b.getTime() - monthAnchor.getTime()) / 864e5;
7193
5462
  return wholeMonths + remainderDays / monthLen;
7194
5463
  }
7195
5464
  function totalColumns(viewportStart, viewportEnd, scale) {
7196
5465
  if (scale === "days") {
7197
- return Math.max(1, differenceInCalendarDays(viewportEnd, viewportStart) + 1);
5466
+ return Math.max(1, dateFns.differenceInCalendarDays(viewportEnd, viewportStart) + 1);
7198
5467
  }
7199
5468
  if (scale === "weeks") {
7200
- return Math.max(1, differenceInCalendarWeeks(viewportEnd, viewportStart, { weekStartsOn: 1 }) + 1);
5469
+ return Math.max(1, dateFns.differenceInCalendarWeeks(viewportEnd, viewportStart, { weekStartsOn: 1 }) + 1);
7201
5470
  }
7202
- return Math.max(1, differenceInCalendarMonths(viewportEnd, viewportStart) + 1);
5471
+ return Math.max(1, dateFns.differenceInCalendarMonths(viewportEnd, viewportStart) + 1);
7203
5472
  }
7204
5473
  function formatColumnLabel(date, scale) {
7205
- if (scale === "days") return format(date, "EEE d");
7206
- if (scale === "weeks") return `Week ${format(date, "w")}`;
7207
- return format(date, "MMM yyyy");
5474
+ if (scale === "days") return dateFns.format(date, "EEE d");
5475
+ if (scale === "weeks") return `Week ${dateFns.format(date, "w")}`;
5476
+ return dateFns.format(date, "MMM yyyy");
7208
5477
  }
7209
5478
  function formatColumnSubLabel(date, scale) {
7210
- if (scale === "days") return format(date, "MMM");
7211
- if (scale === "weeks") return format(date, "MMM yyyy");
5479
+ if (scale === "days") return dateFns.format(date, "MMM");
5480
+ if (scale === "weeks") return dateFns.format(date, "MMM yyyy");
7212
5481
  return null;
7213
5482
  }
7214
5483
  function snapDate(date, scale) {
@@ -7234,7 +5503,7 @@ var Gantt = React131__namespace.default.forwardRef(
7234
5503
  const columnWidth = DEFAULT_COLUMN_WIDTH[scale];
7235
5504
  const viewport = React131__namespace.default.useMemo(() => {
7236
5505
  const earliest = startDate ?? (items.length ? new Date(Math.min(...items.map((i) => i.start.getTime()))) : /* @__PURE__ */ new Date());
7237
- const latest = endDate ?? (items.length ? new Date(Math.max(...items.map((i) => i.end.getTime()))) : addDays(/* @__PURE__ */ new Date(), 14));
5506
+ const latest = endDate ?? (items.length ? new Date(Math.max(...items.map((i) => i.end.getTime()))) : dateFns.addDays(/* @__PURE__ */ new Date(), 14));
7238
5507
  return {
7239
5508
  start: startOfScale(earliest, scale),
7240
5509
  end: endOfScale(latest, scale)
@@ -7631,7 +5900,7 @@ function GanttBar({
7631
5900
  const newEnd = addUnits(item.end, units, scale);
7632
5901
  onItemMove(item.id, newStart, newEnd);
7633
5902
  };
7634
- const ariaLabel = `${item.title}, ${format(item.start, "PP")} to ${format(
5903
+ const ariaLabel = `${item.title}, ${dateFns.format(item.start, "PP")} to ${dateFns.format(
7635
5904
  item.end,
7636
5905
  "PP"
7637
5906
  )}`;
@@ -8773,7 +7042,7 @@ function Sparkline({
8773
7042
  const max = Math.max(...data);
8774
7043
  const range = max - min || 1;
8775
7044
  const pad = 2;
8776
- const lastY = pad + (1 - (data[data.length - 1] - min) / range) * (height - pad * 2);
7045
+ const lastY = pad + (1 - ((data.at(-1) ?? 0) - min) / range) * (height - pad * 2);
8777
7046
  const areaPath = type === "area" ? `${path} L ${width - pad},${height - pad} L ${pad},${height - pad} Z` : void 0;
8778
7047
  return /* @__PURE__ */ jsxRuntime.jsxs(
8779
7048
  "svg",
@@ -8797,7 +7066,7 @@ var colorMap2 = {
8797
7066
  warning: "bg-yellow-500",
8798
7067
  error: "bg-red-500"
8799
7068
  };
8800
- var sizeMap3 = {
7069
+ var sizeMap4 = {
8801
7070
  sm: "h-1.5 w-1.5",
8802
7071
  md: "h-2.5 w-2.5",
8803
7072
  lg: "h-3.5 w-3.5"
@@ -8805,7 +7074,7 @@ var sizeMap3 = {
8805
7074
  function BeaconDot({ color = "primary", size = "md" }) {
8806
7075
  return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "relative flex", children: [
8807
7076
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("animate-ping absolute inline-flex h-full w-full rounded-full opacity-75", colorMap2[color]) }),
8808
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("relative inline-flex rounded-full", sizeMap3[size], colorMap2[color]) })
7077
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("relative inline-flex rounded-full", sizeMap4[size], colorMap2[color]) })
8809
7078
  ] });
8810
7079
  }
8811
7080
  function Beacon({ color = "primary", size = "md", children, className }) {
@@ -9248,7 +7517,7 @@ function ArrayField({
9248
7517
  }
9249
7518
  var DAYS2 = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
9250
7519
  var MONTHS2 = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
9251
- function isSameDay2(a, b) {
7520
+ function isSameDay(a, b) {
9252
7521
  return a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();
9253
7522
  }
9254
7523
  function getDaysInMonth(year, month) {
@@ -9267,8 +7536,8 @@ function CalendarGrid({ year, month, selected, onSelect }) {
9267
7536
  cells.map((day, i) => {
9268
7537
  if (!day) return /* @__PURE__ */ jsxRuntime.jsx("div", {}, i);
9269
7538
  const date = new Date(year, month, day);
9270
- const isToday = isSameDay2(date, today);
9271
- const isSelected = selected && isSameDay2(date, selected);
7539
+ const isToday = isSameDay(date, today);
7540
+ const isSelected = selected && isSameDay(date, selected);
9272
7541
  return /* @__PURE__ */ jsxRuntime.jsx(
9273
7542
  "button",
9274
7543
  {
@@ -9425,6 +7694,7 @@ function FieldRenderer({ name, field, register, setValue, watch, error }) {
9425
7694
  }
9426
7695
  function AutoForm({ schema, onSubmit, defaultValues, submitLabel = "Submit" }) {
9427
7696
  const { register, handleSubmit, setValue, watch, formState } = reactHookForm.useForm({
7697
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
9428
7698
  resolver: zod.zodResolver(schema),
9429
7699
  defaultValues
9430
7700
  });
@@ -9448,18 +7718,18 @@ function AutoForm({ schema, onSubmit, defaultValues, submitLabel = "Submit" }) {
9448
7718
  var HEX_RE = /^#([0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i;
9449
7719
  var RGB_RE = /^rgba?\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*(,\s*(0|1|0?\.\d+)\s*)?\)$/i;
9450
7720
  var HSL_RE = /^hsla?\(\s*\d+\s*,\s*\d+%\s*,\s*\d+%\s*(,\s*(0|1|0?\.\d+)\s*)?\)$/i;
9451
- function isValid2(value, format2, showAlpha) {
9452
- if (format2 === "hex") {
7721
+ function isValid(value, format3, showAlpha) {
7722
+ if (format3 === "hex") {
9453
7723
  if (!HEX_RE.test(value)) return false;
9454
7724
  if (!showAlpha && (value.length === 5 || value.length === 9)) return false;
9455
7725
  return true;
9456
7726
  }
9457
- if (format2 === "rgb") return RGB_RE.test(value);
7727
+ if (format3 === "rgb") return RGB_RE.test(value);
9458
7728
  return HSL_RE.test(value);
9459
7729
  }
9460
- function defaultFor(format2, showAlpha) {
9461
- if (format2 === "hex") return showAlpha ? "#3b82f6ff" : "#3b82f6";
9462
- if (format2 === "rgb") return showAlpha ? "rgba(59, 130, 246, 1)" : "rgb(59, 130, 246)";
7730
+ function defaultFor(format3, showAlpha) {
7731
+ if (format3 === "hex") return showAlpha ? "#3b82f6ff" : "#3b82f6";
7732
+ if (format3 === "rgb") return showAlpha ? "rgba(59, 130, 246, 1)" : "rgb(59, 130, 246)";
9463
7733
  return showAlpha ? "hsla(217, 91%, 60%, 1)" : "hsl(217, 91%, 60%)";
9464
7734
  }
9465
7735
  var ColorPicker = React131__namespace.default.forwardRef(
@@ -9467,7 +7737,7 @@ var ColorPicker = React131__namespace.default.forwardRef(
9467
7737
  value: valueProp,
9468
7738
  defaultValue,
9469
7739
  onValueChange,
9470
- format: format2 = "hex",
7740
+ format: format3 = "hex",
9471
7741
  showAlpha = false,
9472
7742
  swatches,
9473
7743
  showEyeDropper = true,
@@ -9475,7 +7745,7 @@ var ColorPicker = React131__namespace.default.forwardRef(
9475
7745
  className,
9476
7746
  ...props
9477
7747
  }, ref) => {
9478
- const fallback = defaultValue ?? defaultFor(format2, showAlpha);
7748
+ const fallback = defaultValue ?? defaultFor(format3, showAlpha);
9479
7749
  const isControlled = valueProp !== void 0;
9480
7750
  const [internal, setInternal] = React131__namespace.default.useState(fallback);
9481
7751
  const value = isControlled ? valueProp : internal;
@@ -9501,7 +7771,7 @@ var ColorPicker = React131__namespace.default.forwardRef(
9501
7771
  const handleDraftChange = (e) => {
9502
7772
  const next = e.target.value;
9503
7773
  setDraft(next);
9504
- const valid = isValid2(next, format2, showAlpha);
7774
+ const valid = isValid(next, format3, showAlpha);
9505
7775
  setDraftValid(valid || next === "");
9506
7776
  if (valid) commit(next);
9507
7777
  };
@@ -9524,9 +7794,9 @@ var ColorPicker = React131__namespace.default.forwardRef(
9524
7794
  disabled && "pointer-events-none opacity-50 grayscale"
9525
7795
  )
9526
7796
  };
9527
- if (format2 === "hex" && showAlpha) return /* @__PURE__ */ jsxRuntime.jsx(reactColorful.HexAlphaColorPicker, { ...common });
9528
- if (format2 === "hex") return /* @__PURE__ */ jsxRuntime.jsx(reactColorful.HexColorPicker, { ...common });
9529
- if (format2 === "rgb") return /* @__PURE__ */ jsxRuntime.jsx(reactColorful.RgbStringColorPicker, { ...common });
7797
+ if (format3 === "hex" && showAlpha) return /* @__PURE__ */ jsxRuntime.jsx(reactColorful.HexAlphaColorPicker, { ...common });
7798
+ if (format3 === "hex") return /* @__PURE__ */ jsxRuntime.jsx(reactColorful.HexColorPicker, { ...common });
7799
+ if (format3 === "rgb") return /* @__PURE__ */ jsxRuntime.jsx(reactColorful.RgbStringColorPicker, { ...common });
9530
7800
  return /* @__PURE__ */ jsxRuntime.jsx(reactColorful.HslStringColorPicker, { ...common });
9531
7801
  })();
9532
7802
  const showDropper = showEyeDropper && eyeDropperSupported;
@@ -9594,7 +7864,7 @@ var ColorPicker = React131__namespace.default.forwardRef(
9594
7864
  "font-mono text-xs",
9595
7865
  !draftValid && "border-[hsl(var(--destructive))] focus-visible:ring-[hsl(var(--destructive))]"
9596
7866
  ),
9597
- "aria-label": `Color value (${format2})`,
7867
+ "aria-label": `Color value (${format3})`,
9598
7868
  "aria-invalid": !draftValid
9599
7869
  }
9600
7870
  ),
@@ -9728,7 +7998,91 @@ function FileUploadPreview({ files, onRemove, className }) {
9728
7998
  ] })
9729
7999
  ] }, i)) });
9730
8000
  }
9731
- var FormLabel2 = React131__namespace.default.forwardRef(
8001
+ var FloatingLabelInput = React131__namespace.default.forwardRef(
8002
+ ({ label, error, hint, wrapperClassName, className, id, value, defaultValue, onFocus, onBlur, onChange, ...props }, ref) => {
8003
+ const autoId = React131.useId();
8004
+ const inputId = id ?? autoId;
8005
+ const errorId = error ? `${inputId}-error` : void 0;
8006
+ const hintId = hint ? `${inputId}-hint` : void 0;
8007
+ const describedBy = [errorId, hintId].filter(Boolean).join(" ") || void 0;
8008
+ const [focused, setFocused] = React131.useState(false);
8009
+ const [filled, setFilled] = React131.useState(() => {
8010
+ if (value !== void 0 && value !== null && value !== "") return true;
8011
+ if (defaultValue !== void 0 && defaultValue !== null && defaultValue !== "") return true;
8012
+ return false;
8013
+ });
8014
+ const isFloated = focused || filled;
8015
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "floating-label-input", className: cn("flex flex-col gap-1.5", wrapperClassName), children: [
8016
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
8017
+ /* @__PURE__ */ jsxRuntime.jsx(
8018
+ "input",
8019
+ {
8020
+ ref,
8021
+ id: inputId,
8022
+ value,
8023
+ defaultValue,
8024
+ "data-slot": "input",
8025
+ "data-state": isFloated ? "floated" : "rest",
8026
+ "aria-invalid": Boolean(error) || void 0,
8027
+ "aria-describedby": describedBy,
8028
+ onFocus: (e) => {
8029
+ setFocused(true);
8030
+ onFocus?.(e);
8031
+ },
8032
+ onBlur: (e) => {
8033
+ setFocused(false);
8034
+ onBlur?.(e);
8035
+ },
8036
+ onChange: (e) => {
8037
+ setFilled(e.target.value.length > 0);
8038
+ onChange?.(e);
8039
+ },
8040
+ className: cn(
8041
+ // Reset + structure
8042
+ "peer w-full appearance-none bg-transparent",
8043
+ "h-14 rounded-md border px-3 pt-5 pb-1.5",
8044
+ "text-base text-foreground leading-tight",
8045
+ // Border / focus ring colors
8046
+ "border-input focus:border-ring focus:outline-none focus:ring-2 focus:ring-ring/30",
8047
+ error && "border-destructive focus:border-destructive focus:ring-destructive/30",
8048
+ "disabled:cursor-not-allowed disabled:opacity-50",
8049
+ "placeholder:text-transparent",
8050
+ // hide native placeholder; label takes its job
8051
+ className
8052
+ ),
8053
+ ...props
8054
+ }
8055
+ ),
8056
+ /* @__PURE__ */ jsxRuntime.jsx(
8057
+ "label",
8058
+ {
8059
+ htmlFor: inputId,
8060
+ className: cn(
8061
+ "pointer-events-none absolute left-3",
8062
+ "origin-[0_50%] transition-all duration-150 ease-out",
8063
+ "text-muted-foreground",
8064
+ // Rest: centered vertically inside the field, full size
8065
+ !isFloated && "top-1/2 -translate-y-1/2 text-base",
8066
+ // Floated: tucked into the top with a small subtle background
8067
+ isFloated && "top-1.5 text-[11px] uppercase tracking-wider text-foreground/85",
8068
+ error && "text-destructive"
8069
+ ),
8070
+ children: label
8071
+ }
8072
+ )
8073
+ ] }),
8074
+ error ? /* @__PURE__ */ jsxRuntime.jsx("p", { id: errorId, className: "text-xs text-destructive", children: error }) : hint ? /* @__PURE__ */ jsxRuntime.jsx("p", { id: hintId, className: "text-xs text-muted-foreground", children: hint }) : null
8075
+ ] });
8076
+ }
8077
+ );
8078
+ FloatingLabelInput.displayName = "FloatingLabelInput";
8079
+ function FormField(props) {
8080
+ return /* @__PURE__ */ jsxRuntime.jsx(reactHookForm.Controller, { ...props });
8081
+ }
8082
+ function FormItem({ className, ...props }) {
8083
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex flex-col gap-1.5", className), ...props });
8084
+ }
8085
+ var FormLabel = React131__namespace.default.forwardRef(
9732
8086
  ({ className, error, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
9733
8087
  "label",
9734
8088
  {
@@ -9742,14 +8096,24 @@ var FormLabel2 = React131__namespace.default.forwardRef(
9742
8096
  }
9743
8097
  )
9744
8098
  );
9745
- FormLabel2.displayName = "FormLabel";
9746
- var FormControl2 = React131__namespace.default.forwardRef(
8099
+ FormLabel.displayName = "FormLabel";
8100
+ var FormControl = React131__namespace.default.forwardRef(
9747
8101
  ({ ...props }, ref) => {
9748
8102
  const id = React131.useId();
9749
8103
  return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, id, ...props });
9750
8104
  }
9751
8105
  );
9752
- FormControl2.displayName = "FormControl";
8106
+ FormControl.displayName = "FormControl";
8107
+ function FormDescription({ className, ...props }) {
8108
+ return /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("text-xs text-[hsl(var(--muted-foreground))]", className), ...props });
8109
+ }
8110
+ function FormMessage({ className, children, name }) {
8111
+ const { formState } = reactHookForm.useFormContext();
8112
+ const error = name ? formState.errors[name] : void 0;
8113
+ const message = error?.message ? String(error.message) : children;
8114
+ if (!message) return null;
8115
+ return /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("text-xs text-[hsl(var(--destructive))]", className), children: message });
8116
+ }
9753
8117
  function ObjectField({
9754
8118
  title,
9755
8119
  description,
@@ -10232,7 +8596,7 @@ var MobileSidebarTrigger = React131__namespace.default.forwardRef(
10232
8596
  }
10233
8597
  );
10234
8598
  MobileSidebarTrigger.displayName = "MobileSidebarTrigger";
10235
- var sizeMap4 = {
8599
+ var sizeMap5 = {
10236
8600
  sm: "max-w-screen-sm",
10237
8601
  md: "max-w-screen-md",
10238
8602
  lg: "max-w-screen-lg",
@@ -10246,7 +8610,7 @@ var Container = React131__namespace.default.forwardRef(
10246
8610
  ref,
10247
8611
  className: cn(
10248
8612
  "mx-auto w-full",
10249
- sizeMap4[size],
8613
+ sizeMap5[size],
10250
8614
  !noPadding && "px-4 sm:px-6 lg:px-8",
10251
8615
  className
10252
8616
  ),
@@ -10849,9 +9213,9 @@ function nextId() {
10849
9213
  return `toast-${++_id}`;
10850
9214
  }
10851
9215
  var toastEmitter = {
10852
- emit(message2, options = {}) {
9216
+ emit(message, options = {}) {
10853
9217
  const id = options.id ?? nextId();
10854
- const event = { id, message: message2, options };
9218
+ const event = { id, message, options };
10855
9219
  listeners.forEach((fn) => fn(event));
10856
9220
  return id;
10857
9221
  },
@@ -10873,13 +9237,13 @@ var toastEmitter = {
10873
9237
  };
10874
9238
  }
10875
9239
  };
10876
- function toastFn(message2, opts) {
10877
- return toastEmitter.emit(message2, opts);
9240
+ function toastFn(message, opts) {
9241
+ return toastEmitter.emit(message, opts);
10878
9242
  }
10879
- toastFn.success = (message2, opts) => toastEmitter.emit(message2, { ...opts, type: "success" });
10880
- toastFn.error = (message2, opts) => toastEmitter.emit(message2, { ...opts, type: "error" });
10881
- toastFn.warning = (message2, opts) => toastEmitter.emit(message2, { ...opts, type: "warning" });
10882
- toastFn.info = (message2, opts) => toastEmitter.emit(message2, { ...opts, type: "info" });
9243
+ toastFn.success = (message, opts) => toastEmitter.emit(message, { ...opts, type: "success" });
9244
+ toastFn.error = (message, opts) => toastEmitter.emit(message, { ...opts, type: "error" });
9245
+ toastFn.warning = (message, opts) => toastEmitter.emit(message, { ...opts, type: "warning" });
9246
+ toastFn.info = (message, opts) => toastEmitter.emit(message, { ...opts, type: "info" });
10883
9247
  toastFn.dismiss = (id) => toastEmitter.dismiss(id);
10884
9248
  var iconMap = {
10885
9249
  success: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckCircle, { className: "h-4 w-4 text-green-500" }),
@@ -11041,8 +9405,8 @@ GradientHeading.displayName = "GradientHeading";
11041
9405
  function easeOutExpo(t) {
11042
9406
  return t === 1 ? 1 : 1 - Math.pow(2, -10 * t);
11043
9407
  }
11044
- function formatNumber(value, decimals, format2, locale) {
11045
- if (format2) {
9408
+ function formatNumber(value, decimals, format3, locale) {
9409
+ if (format3) {
11046
9410
  return new Intl.NumberFormat(locale, {
11047
9411
  minimumFractionDigits: decimals,
11048
9412
  maximumFractionDigits: decimals
@@ -11061,7 +9425,7 @@ var AnimatedNumber = React131__namespace.default.forwardRef(
11061
9425
  easing = easeOutExpo,
11062
9426
  autoStart = true,
11063
9427
  locale,
11064
- format: format2 = true,
9428
+ format: format3 = true,
11065
9429
  className,
11066
9430
  ...props
11067
9431
  }, ref) => {
@@ -11139,7 +9503,7 @@ var AnimatedNumber = React131__namespace.default.forwardRef(
11139
9503
  ...props,
11140
9504
  children: [
11141
9505
  prefix,
11142
- formatNumber(displayed, decimals, format2, locale),
9506
+ formatNumber(displayed, decimals, format3, locale),
11143
9507
  suffix
11144
9508
  ]
11145
9509
  }
@@ -12243,25 +10607,25 @@ DataListItem.displayName = "DataListItem";
12243
10607
  var HOUR_ROW_PX = 40;
12244
10608
  var DEFAULT_COLOR3 = "hsl(var(--chart-1))";
12245
10609
  function clampToDay(date, target) {
12246
- if (date < startOfDay(target)) return startOfDay(target);
12247
- if (date > endOfDay(target)) return endOfDay(target);
10610
+ if (date < dateFns.startOfDay(target)) return dateFns.startOfDay(target);
10611
+ if (date > dateFns.endOfDay(target)) return dateFns.endOfDay(target);
12248
10612
  return date;
12249
10613
  }
12250
10614
  function eventOverlapsDay(event, day) {
12251
- const dayStart = startOfDay(day);
12252
- const dayEnd = endOfDay(day);
10615
+ const dayStart = dateFns.startOfDay(day);
10616
+ const dayEnd = dateFns.endOfDay(day);
12253
10617
  return event.end >= dayStart && event.start <= dayEnd;
12254
10618
  }
12255
10619
  function getMonthMatrix(date, weekStartsOn) {
12256
- const monthStart = startOfMonth(date);
12257
- const gridStart = startOfWeek2(monthStart, { weekStartsOn });
10620
+ const monthStart = dateFns.startOfMonth(date);
10621
+ const gridStart = dateFns.startOfWeek(monthStart, { weekStartsOn });
12258
10622
  const cells = [];
12259
- for (let i = 0; i < 42; i++) cells.push(addDays(gridStart, i));
10623
+ for (let i = 0; i < 42; i++) cells.push(dateFns.addDays(gridStart, i));
12260
10624
  return cells;
12261
10625
  }
12262
10626
  function getWeekDays(date, weekStartsOn) {
12263
- const start = startOfWeek2(date, { weekStartsOn });
12264
- return Array.from({ length: 7 }, (_, i) => addDays(start, i));
10627
+ const start = dateFns.startOfWeek(date, { weekStartsOn });
10628
+ return Array.from({ length: 7 }, (_, i) => dateFns.addDays(start, i));
12265
10629
  }
12266
10630
  var EventCalendar = React131__namespace.default.forwardRef(
12267
10631
  ({
@@ -12299,14 +10663,14 @@ var EventCalendar = React131__namespace.default.forwardRef(
12299
10663
  [dateProp, onDateChange]
12300
10664
  );
12301
10665
  const handlePrev = () => {
12302
- if (view === "month") commitDate(addMonths(date, -1));
12303
- else if (view === "week") commitDate(addWeeks(date, -1));
12304
- else commitDate(addDays(date, -1));
10666
+ if (view === "month") commitDate(dateFns.addMonths(date, -1));
10667
+ else if (view === "week") commitDate(dateFns.addWeeks(date, -1));
10668
+ else commitDate(dateFns.addDays(date, -1));
12305
10669
  };
12306
10670
  const handleNext = () => {
12307
- if (view === "month") commitDate(addMonths(date, 1));
12308
- else if (view === "week") commitDate(addWeeks(date, 1));
12309
- else commitDate(addDays(date, 1));
10671
+ if (view === "month") commitDate(dateFns.addMonths(date, 1));
10672
+ else if (view === "week") commitDate(dateFns.addWeeks(date, 1));
10673
+ else commitDate(dateFns.addDays(date, 1));
12310
10674
  };
12311
10675
  const handleToday = () => commitDate(/* @__PURE__ */ new Date());
12312
10676
  const handleRootKeyDown = (e) => {
@@ -12318,14 +10682,14 @@ var EventCalendar = React131__namespace.default.forwardRef(
12318
10682
  }
12319
10683
  };
12320
10684
  const headerLabel = React131__namespace.default.useMemo(() => {
12321
- if (view === "month") return format(date, "MMMM yyyy");
10685
+ if (view === "month") return dateFns.format(date, "MMMM yyyy");
12322
10686
  if (view === "week") {
12323
- const start = startOfWeek2(date, { weekStartsOn });
12324
- const end = addDays(start, 6);
12325
- if (isSameMonth(start, end)) return `${format(start, "MMM d")} \u2013 ${format(end, "d, yyyy")}`;
12326
- return `${format(start, "MMM d")} \u2013 ${format(end, "MMM d, yyyy")}`;
10687
+ const start = dateFns.startOfWeek(date, { weekStartsOn });
10688
+ const end = dateFns.addDays(start, 6);
10689
+ if (dateFns.isSameMonth(start, end)) return `${dateFns.format(start, "MMM d")} \u2013 ${dateFns.format(end, "d, yyyy")}`;
10690
+ return `${dateFns.format(start, "MMM d")} \u2013 ${dateFns.format(end, "MMM d, yyyy")}`;
12327
10691
  }
12328
- return format(date, "EEEE, MMMM d, yyyy");
10692
+ return dateFns.format(date, "EEEE, MMMM d, yyyy");
12329
10693
  }, [date, view, weekStartsOn]);
12330
10694
  return /* @__PURE__ */ jsxRuntime.jsxs(
12331
10695
  "div",
@@ -12471,8 +10835,8 @@ function MonthView({
12471
10835
  [date, weekStartsOn]
12472
10836
  );
12473
10837
  const weekdayLabels = React131__namespace.default.useMemo(() => {
12474
- const start = startOfWeek2(/* @__PURE__ */ new Date(), { weekStartsOn });
12475
- return Array.from({ length: 7 }, (_, i) => format(addDays(start, i), "EEE"));
10838
+ const start = dateFns.startOfWeek(/* @__PURE__ */ new Date(), { weekStartsOn });
10839
+ return Array.from({ length: 7 }, (_, i) => dateFns.format(dateFns.addDays(start, i), "EEE"));
12476
10840
  }, [weekStartsOn]);
12477
10841
  const today = /* @__PURE__ */ new Date();
12478
10842
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col", "data-slot": "event-calendar-month", children: [
@@ -12485,8 +10849,8 @@ function MonthView({
12485
10849
  label
12486
10850
  )) }),
12487
10851
  /* @__PURE__ */ jsxRuntime.jsx("div", { role: "grid", "aria-label": "Month grid", className: "grid grid-cols-7", children: cells.map((cell) => {
12488
- const inMonth = isSameMonth(cell, date);
12489
- const isToday = isSameDay(cell, today);
10852
+ const inMonth = dateFns.isSameMonth(cell, date);
10853
+ const isToday = dateFns.isSameDay(cell, today);
12490
10854
  const dayEvents = events.filter((ev) => eventOverlapsDay(ev, cell)).sort((a, b) => a.start.getTime() - b.start.getTime());
12491
10855
  const visible = dayEvents.slice(0, 3);
12492
10856
  const overflow = dayEvents.length - visible.length;
@@ -12494,13 +10858,13 @@ function MonthView({
12494
10858
  "div",
12495
10859
  {
12496
10860
  role: "gridcell",
12497
- "aria-label": format(cell, "EEEE, MMMM d, yyyy"),
10861
+ "aria-label": dateFns.format(cell, "EEEE, MMMM d, yyyy"),
12498
10862
  tabIndex: 0,
12499
10863
  onClick: (e) => {
12500
10864
  if (e.target.closest("[data-event-chip]")) return;
12501
10865
  if (e.target.closest("[data-overflow]")) return;
12502
10866
  if (onEventCreate) {
12503
- onEventCreate({ start: startOfDay(cell), end: endOfDay(cell) });
10867
+ onEventCreate({ start: dateFns.startOfDay(cell), end: dateFns.endOfDay(cell) });
12504
10868
  } else {
12505
10869
  onDayPick(cell);
12506
10870
  }
@@ -12509,7 +10873,7 @@ function MonthView({
12509
10873
  if (e.key === "Enter" || e.key === " ") {
12510
10874
  e.preventDefault();
12511
10875
  if (onEventCreate) {
12512
- onEventCreate({ start: startOfDay(cell), end: endOfDay(cell) });
10876
+ onEventCreate({ start: dateFns.startOfDay(cell), end: dateFns.endOfDay(cell) });
12513
10877
  } else {
12514
10878
  onDayPick(cell);
12515
10879
  }
@@ -12530,7 +10894,7 @@ function MonthView({
12530
10894
  isToday && "bg-primary text-primary-foreground",
12531
10895
  !isToday && !inMonth && "text-muted-foreground"
12532
10896
  ),
12533
- children: format(cell, "d")
10897
+ children: dateFns.format(cell, "d")
12534
10898
  }
12535
10899
  ) }),
12536
10900
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-0.5", children: [
@@ -12558,7 +10922,7 @@ function MonthView({
12558
10922
  }
12559
10923
  ) }),
12560
10924
  /* @__PURE__ */ jsxRuntime.jsxs(PopoverContent, { className: "w-64 p-2", align: "start", children: [
12561
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-1 px-1 text-xs font-medium text-muted-foreground", children: format(cell, "EEEE, MMM d") }),
10925
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-1 px-1 text-xs font-medium text-muted-foreground", children: dateFns.format(cell, "EEEE, MMM d") }),
12562
10926
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-1", children: dayEvents.map((ev) => /* @__PURE__ */ jsxRuntime.jsx(
12563
10927
  EventChip,
12564
10928
  {
@@ -12633,7 +10997,7 @@ function HourGrid({
12633
10997
  {
12634
10998
  style: { height: HOUR_ROW_PX },
12635
10999
  className: "relative -mt-px text-right text-[10px] text-muted-foreground",
12636
- children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute -top-1.5 right-1.5 bg-card px-1", children: format(new Date(2e3, 0, 1, h), "h a") })
11000
+ children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute -top-1.5 right-1.5 bg-card px-1", children: dateFns.format(new Date(2e3, 0, 1, h), "h a") })
12637
11001
  },
12638
11002
  h
12639
11003
  ))
@@ -12647,7 +11011,7 @@ function HourGrid({
12647
11011
  DayColumn,
12648
11012
  {
12649
11013
  day,
12650
- isToday: isSameDay(day, today),
11014
+ isToday: dateFns.isSameDay(day, today),
12651
11015
  events: events.filter((ev) => eventOverlapsDay(ev, day)),
12652
11016
  onEventClick,
12653
11017
  onEventCreate,
@@ -12679,8 +11043,8 @@ function DayColumn({
12679
11043
  if (!rect) return;
12680
11044
  const offsetY = e.clientY - rect.top;
12681
11045
  const hour = Math.max(0, Math.min(23, Math.floor(offsetY / HOUR_ROW_PX)));
12682
- const start = addHours(startOfDay(day), hour);
12683
- const end = addHours(start, 1);
11046
+ const start = dateFns.addHours(dateFns.startOfDay(day), hour);
11047
+ const end = dateFns.addHours(start, 1);
12684
11048
  onEventCreate({ start, end });
12685
11049
  };
12686
11050
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col border-r border-border last:border-r-0", children: [
@@ -12692,7 +11056,7 @@ function DayColumn({
12692
11056
  isToday && "bg-primary/10"
12693
11057
  ),
12694
11058
  children: [
12695
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium uppercase tracking-wide text-muted-foreground", children: format(day, "EEE") }),
11059
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium uppercase tracking-wide text-muted-foreground", children: dateFns.format(day, "EEE") }),
12696
11060
  /* @__PURE__ */ jsxRuntime.jsx(
12697
11061
  "span",
12698
11062
  {
@@ -12700,7 +11064,7 @@ function DayColumn({
12700
11064
  "tabular-nums",
12701
11065
  isToday ? "font-semibold text-primary" : "text-foreground"
12702
11066
  ),
12703
- children: format(day, "d")
11067
+ children: dateFns.format(day, "d")
12704
11068
  }
12705
11069
  )
12706
11070
  ]
@@ -12711,7 +11075,7 @@ function DayColumn({
12711
11075
  {
12712
11076
  ref: bodyRef,
12713
11077
  role: "row",
12714
- "aria-label": format(day, "EEEE, MMMM d"),
11078
+ "aria-label": dateFns.format(day, "EEEE, MMMM d"),
12715
11079
  onClick: handleEmptyClick,
12716
11080
  className: cn(
12717
11081
  "relative",
@@ -12746,10 +11110,10 @@ function EventBlock({ event, day, onClick, onResize }) {
12746
11110
  const color = event.color ?? DEFAULT_COLOR3;
12747
11111
  const visibleStart = clampToDay(event.start, day);
12748
11112
  const visibleEnd = clampToDay(event.end, day);
12749
- const startMinutes = differenceInMinutes(visibleStart, startOfDay(day));
11113
+ const startMinutes = dateFns.differenceInMinutes(visibleStart, dateFns.startOfDay(day));
12750
11114
  const durationMinutes = Math.max(
12751
11115
  20,
12752
- differenceInMinutes(visibleEnd, visibleStart)
11116
+ dateFns.differenceInMinutes(visibleEnd, visibleStart)
12753
11117
  );
12754
11118
  const top = startMinutes / 60 * HOUR_ROW_PX;
12755
11119
  const [resizingDelta, setResizingDelta] = React131__namespace.default.useState(0);
@@ -12814,9 +11178,9 @@ function EventBlock({ event, day, onClick, onResize }) {
12814
11178
  children: [
12815
11179
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "truncate font-medium", children: event.title }),
12816
11180
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "truncate text-[10px] text-muted-foreground", children: [
12817
- format(event.start, "h:mm a"),
11181
+ dateFns.format(event.start, "h:mm a"),
12818
11182
  " \u2013 ",
12819
- format(event.end, "h:mm a")
11183
+ dateFns.format(event.end, "h:mm a")
12820
11184
  ] }),
12821
11185
  onResize && /* @__PURE__ */ jsxRuntime.jsx(
12822
11186
  "div",
@@ -12942,7 +11306,7 @@ function buildDefaultCrop(defaultCrop, aspect, imgWidth, imgHeight) {
12942
11306
  }
12943
11307
  return { unit: "%", x: 10, y: 10, width: 80, height: 80 };
12944
11308
  }
12945
- async function extractCroppedDataUrl(image, crop, format2, quality) {
11309
+ async function extractCroppedDataUrl(image, crop, format3, quality) {
12946
11310
  const scaleX = image.naturalWidth / image.width;
12947
11311
  const scaleY = image.naturalHeight / image.height;
12948
11312
  const canvas = document.createElement("canvas");
@@ -12962,7 +11326,7 @@ async function extractCroppedDataUrl(image, crop, format2, quality) {
12962
11326
  canvas.width,
12963
11327
  canvas.height
12964
11328
  );
12965
- const mime = format2 === "jpeg" ? "image/jpeg" : format2 === "webp" ? "image/webp" : "image/png";
11329
+ const mime = format3 === "jpeg" ? "image/jpeg" : format3 === "webp" ? "image/webp" : "image/png";
12966
11330
  return canvas.toDataURL(mime, quality);
12967
11331
  }
12968
11332
  var ImageCrop = React131__namespace.default.forwardRef(
@@ -14438,6 +12802,10 @@ function SortableNav({ items, onReorder, className }) {
14438
12802
  return /* @__PURE__ */ jsxRuntime.jsx(core.DndContext, { sensors, collisionDetection: core.closestCenter, onDragEnd: handleDragEnd, children: /* @__PURE__ */ jsxRuntime.jsx(sortable.SortableContext, { items: items.map((i) => i.id), strategy: sortable.verticalListSortingStrategy, children: /* @__PURE__ */ jsxRuntime.jsx("nav", { "data-slot": "sortable-nav", className: cn("space-y-0.5 px-2 py-1", className), children: items.map((item) => /* @__PURE__ */ jsxRuntime.jsx(SortableNavItemWrapper, { item }, item.id)) }) }) });
14439
12803
  }
14440
12804
 
12805
+ Object.defineProperty(exports, "Form", {
12806
+ enumerable: true,
12807
+ get: function () { return reactHookForm.FormProvider; }
12808
+ });
14441
12809
  Object.defineProperty(exports, "AnimatePresence", {
14442
12810
  enumerable: true,
14443
12811
  get: function () { return react.AnimatePresence; }
@@ -14554,7 +12922,9 @@ exports.CommandDialog = CommandDialog;
14554
12922
  exports.CommandEmpty = CommandEmpty;
14555
12923
  exports.CommandGroup = CommandGroup;
14556
12924
  exports.CommandInput = CommandInput;
12925
+ exports.CommandItem = CommandItem;
14557
12926
  exports.CommandList = CommandList;
12927
+ exports.CommandListItem = CommandItem2;
14558
12928
  exports.CommandPalette = CommandPalette;
14559
12929
  exports.CommandPaletteProvider = CommandPaletteProvider;
14560
12930
  exports.CommandSeparator = CommandSeparator;
@@ -14639,7 +13009,14 @@ exports.FilterBadge = FilterBadge;
14639
13009
  exports.FilterItem = FilterItem;
14640
13010
  exports.Filters = Filters;
14641
13011
  exports.FloatingActionButton = FloatingActionButton;
13012
+ exports.FloatingLabelInput = FloatingLabelInput;
14642
13013
  exports.FloatingThemePicker = FloatingThemePicker;
13014
+ exports.FormControl = FormControl;
13015
+ exports.FormDescription = FormDescription;
13016
+ exports.FormField = FormField;
13017
+ exports.FormItem = FormItem;
13018
+ exports.FormLabel = FormLabel;
13019
+ exports.FormMessage = FormMessage;
14643
13020
  exports.Gantt = Gantt;
14644
13021
  exports.GradientBackground = GradientBackground;
14645
13022
  exports.GradientHeading = GradientHeading;
@@ -14877,7 +13254,6 @@ exports.toggleVariants = toggleVariants;
14877
13254
  exports.useAppShell = useAppShell;
14878
13255
  exports.useCommandBar = useCommandBar;
14879
13256
  exports.useCommandPalette = useCommandPalette;
14880
- exports.useFormField = useFormField;
14881
13257
  exports.useHotkeys = useHotkeys;
14882
13258
  exports.useLayoutId = useLayoutId;
14883
13259
  exports.useSidebar = useSidebar;