ivt 0.1.1 → 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.
- package/dist/accordion/index.d.ts +13 -1
- package/dist/accordion/index.mjs +1 -1
- package/dist/alert/index.d.ts +13 -1
- package/dist/alert/index.mjs +1 -1
- package/dist/alert/index.mjs.map +1 -1
- package/dist/alert-dialog/index.d.ts +17 -0
- package/dist/alert-dialog/index.mjs +2 -0
- package/dist/alert-dialog/index.mjs.map +1 -0
- package/dist/avatar/index.d.ts +9 -1
- package/dist/avatar/index.mjs +1 -1
- package/dist/avatar/index.mjs.map +1 -1
- package/dist/badge/index.d.ts +17 -1
- package/dist/badge/index.mjs +1 -1
- package/dist/base/index.d.ts +39 -4
- package/dist/base/index.mjs +1 -1
- package/dist/base/index.mjs.map +1 -1
- package/dist/button/index.d.ts +15 -1
- package/dist/button/index.mjs +1 -1
- package/dist/calendar/index.d.ts +12 -1
- package/dist/calendar/index.mjs +1 -1
- package/dist/card/index.d.ts +12 -1
- package/dist/card/index.mjs +1 -1
- package/dist/card/index.mjs.map +1 -1
- package/dist/checkbox/index.d.ts +7 -1
- package/dist/checkbox/index.mjs +1 -1
- package/dist/checkbox/index.mjs.map +1 -1
- package/dist/chunks/TextWrap-DM8p5RY0.mjs +2 -0
- package/dist/{src/components/default/base/TextWrap/index.mjs.map → chunks/TextWrap-DM8p5RY0.mjs.map} +1 -1
- package/dist/chunks/accordion-CJbwVC50.mjs +2 -0
- package/dist/chunks/accordion-CJbwVC50.mjs.map +1 -0
- package/dist/chunks/badge-Bl0X9ruG.mjs +2 -0
- package/dist/chunks/badge-Bl0X9ruG.mjs.map +1 -0
- package/dist/chunks/bundle-mjs-BYGwPY3j.mjs +2 -0
- package/dist/chunks/bundle-mjs-BYGwPY3j.mjs.map +1 -0
- package/dist/chunks/button-B7K2JEBG.mjs +2 -0
- package/dist/chunks/button-B7K2JEBG.mjs.map +1 -0
- package/dist/chunks/calendar-CDaopDjB.mjs +2 -0
- package/dist/chunks/calendar-CDaopDjB.mjs.map +1 -0
- package/dist/chunks/check-DoBi3iW5.mjs +2 -0
- package/dist/chunks/check-DoBi3iW5.mjs.map +1 -0
- package/dist/chunks/chevron-down-BlskY22a.mjs +2 -0
- package/dist/chunks/chevron-down-BlskY22a.mjs.map +1 -0
- package/dist/chunks/chevron-left-BXFDtxhQ.mjs +2 -0
- package/dist/chunks/chevron-left-BXFDtxhQ.mjs.map +1 -0
- package/dist/chunks/chevron-right-DAqTCOj7.mjs +2 -0
- package/dist/chunks/chevron-right-DAqTCOj7.mjs.map +1 -0
- package/dist/chunks/command-DYONarI_.mjs +2 -0
- package/dist/chunks/command-DYONarI_.mjs.map +1 -0
- package/dist/chunks/createLucideIcon-CkKdyF_L.mjs +2 -0
- package/dist/chunks/createLucideIcon-CkKdyF_L.mjs.map +1 -0
- package/dist/chunks/dialog-Bs3UmyLz.mjs +2 -0
- package/dist/chunks/dialog-Bs3UmyLz.mjs.map +1 -0
- package/dist/chunks/hover-card-CujP4Atn.mjs +2 -0
- package/dist/chunks/hover-card-CujP4Atn.mjs.map +1 -0
- package/dist/chunks/index-BSf-atXx.mjs +2 -0
- package/dist/chunks/index-BSf-atXx.mjs.map +1 -0
- package/dist/{node_modules/@radix-ui/react-context/dist/index/index.mjs → chunks/index-BX6nSpY1.mjs} +2 -2
- package/dist/chunks/index-BX6nSpY1.mjs.map +1 -0
- package/dist/chunks/index-CAVVTG3h.mjs +2 -0
- package/dist/chunks/index-CAVVTG3h.mjs.map +1 -0
- package/dist/chunks/index-CUXMuJ__.mjs +2 -0
- package/dist/chunks/index-CUXMuJ__.mjs.map +1 -0
- package/dist/chunks/index-Ck1fOwnt.mjs +2 -0
- package/dist/chunks/index-Ck1fOwnt.mjs.map +1 -0
- package/dist/{node_modules/@radix-ui/react-direction/dist/index/index.mjs → chunks/index-DB6P4Tz1.mjs} +2 -2
- package/dist/chunks/index-DB6P4Tz1.mjs.map +1 -0
- package/dist/chunks/index-DZldl4eo.mjs +2 -0
- package/dist/chunks/index-DZldl4eo.mjs.map +1 -0
- package/dist/chunks/index-DdNjMgpV.mjs +2 -0
- package/dist/chunks/index-DdNjMgpV.mjs.map +1 -0
- package/dist/chunks/index-Dix9fE1x.mjs +2 -0
- package/dist/chunks/index-Dix9fE1x.mjs.map +1 -0
- package/dist/chunks/index-DuMyb05s.mjs +2 -0
- package/dist/chunks/index-DuMyb05s.mjs.map +1 -0
- package/dist/chunks/index-DyUn0c26.mjs +2 -0
- package/dist/chunks/index-DyUn0c26.mjs.map +1 -0
- package/dist/chunks/index-IXx8l3RV.mjs +2 -0
- package/dist/chunks/index-IXx8l3RV.mjs.map +1 -0
- package/dist/chunks/index-XatPIL6c.mjs +2 -0
- package/dist/chunks/index-XatPIL6c.mjs.map +1 -0
- package/dist/chunks/index-qP_a6BiF.mjs +2 -0
- package/dist/chunks/index-qP_a6BiF.mjs.map +1 -0
- package/dist/chunks/input-BtSMyTkT.mjs +2 -0
- package/dist/chunks/input-BtSMyTkT.mjs.map +1 -0
- package/dist/chunks/label-BL5NIn0A.mjs +2 -0
- package/dist/chunks/label-BL5NIn0A.mjs.map +1 -0
- package/dist/chunks/pagination-BiktkEzi.mjs +2 -0
- package/dist/chunks/pagination-BiktkEzi.mjs.map +1 -0
- package/dist/chunks/popover-CSY_ub7s.mjs +2 -0
- package/dist/chunks/popover-CSY_ub7s.mjs.map +1 -0
- package/dist/chunks/progress-CmBH1a8S.mjs +2 -0
- package/dist/chunks/progress-CmBH1a8S.mjs.map +1 -0
- package/dist/chunks/scroll-area-B-b-oQYr.mjs +2 -0
- package/dist/chunks/scroll-area-B-b-oQYr.mjs.map +1 -0
- package/dist/chunks/select-Co76oy2I.mjs +2 -0
- package/dist/chunks/select-Co76oy2I.mjs.map +1 -0
- package/dist/chunks/skeleton-cvIjllDp.mjs +2 -0
- package/dist/{src/components/ui/skeleton/skeleton/index.mjs.map → chunks/skeleton-cvIjllDp.mjs.map} +1 -1
- package/dist/chunks/sortable-DaXPlC2-.mjs +2 -0
- package/dist/chunks/sortable-DaXPlC2-.mjs.map +1 -0
- package/dist/chunks/table-xzX2584j.mjs +2 -0
- package/dist/chunks/table-xzX2584j.mjs.map +1 -0
- package/dist/{node_modules/tslib/tslib.es6/index.mjs → chunks/tslib.es6-CC_zzJ2l.mjs} +2 -2
- package/dist/chunks/tslib.es6-CC_zzJ2l.mjs.map +1 -0
- package/dist/chunks/utils-B9uwc_lt.mjs +2 -0
- package/dist/chunks/utils-B9uwc_lt.mjs.map +1 -0
- package/dist/chunks/x-Bdqqbrz4.mjs +2 -0
- package/dist/chunks/x-Bdqqbrz4.mjs.map +1 -0
- package/dist/command/index.d.ts +20 -1
- package/dist/command/index.mjs +1 -1
- package/dist/data-table/index.d.ts +133 -9
- package/dist/data-table/index.mjs +1 -1
- package/dist/data-table/index.mjs.map +1 -1
- package/dist/dialog/index.d.ts +16 -1
- package/dist/dialog/index.mjs +1 -1
- package/dist/dropdown-menu/index.d.ts +28 -1
- package/dist/dropdown-menu/index.mjs +1 -1
- package/dist/dropdown-menu/index.mjs.map +1 -1
- package/dist/dropzone/index.d.ts +96 -1
- package/dist/dropzone/index.mjs +1 -1
- package/dist/dropzone/index.mjs.map +1 -1
- package/dist/form/index.d.ts +28 -1
- package/dist/form/index.mjs +1 -1
- package/dist/form/index.mjs.map +1 -1
- package/dist/hover-card/index.d.ts +9 -1
- package/dist/hover-card/index.mjs +1 -1
- package/dist/icon/index.mjs +1 -1
- package/dist/icon/index.mjs.map +1 -1
- package/dist/index.css +1 -1
- package/dist/input/index.d.ts +6 -1
- package/dist/input/index.mjs +1 -1
- package/dist/label/index.d.ts +7 -1
- package/dist/label/index.mjs +1 -1
- package/dist/pagination/index.d.ts +18 -1
- package/dist/pagination/index.mjs +1 -1
- package/dist/popover/index.d.ts +10 -1
- package/dist/popover/index.mjs +1 -1
- package/dist/progress/index.d.ts +7 -1
- package/dist/progress/index.mjs +1 -1
- package/dist/scroll-area/index.d.ts +8 -1
- package/dist/scroll-area/index.mjs +1 -1
- package/dist/select/index.d.ts +16 -1
- package/dist/select/index.mjs +1 -1
- package/dist/separator/index.d.ts +7 -1
- package/dist/separator/index.mjs +1 -1
- package/dist/separator/index.mjs.map +1 -1
- package/dist/sheet/index.d.ts +16 -1
- package/dist/sheet/index.mjs +1 -1
- package/dist/sheet/index.mjs.map +1 -1
- package/dist/skeleton/index.d.ts +6 -1
- package/dist/skeleton/index.mjs +1 -1
- package/dist/sonner/index.d.ts +5 -1
- package/dist/sonner/index.mjs +1 -1
- package/dist/sonner/index.mjs.map +1 -1
- package/dist/sortable/index.d.ts +109 -1
- package/dist/sortable/index.mjs +1 -1
- package/dist/table/index.d.ts +13 -1
- package/dist/table/index.mjs +1 -1
- package/dist/tabs/index.d.ts +10 -1
- package/dist/tabs/index.mjs +1 -1
- package/dist/tabs/index.mjs.map +1 -1
- package/dist/toast/index.d.ts +21 -1
- package/dist/toast/index.mjs +1 -1
- package/dist/toast/index.mjs.map +1 -1
- package/dist/tooltip/index.d.ts +10 -1
- package/dist/tooltip/index.mjs +1 -1
- package/dist/tooltip/index.mjs.map +1 -1
- package/package.json +21 -16
- package/dist/_virtual/_commonjsHelpers/index.mjs +0 -2
- package/dist/_virtual/_commonjsHelpers/index.mjs.map +0 -1
- package/dist/_virtual/index/index.mjs +0 -2
- package/dist/_virtual/index/index.mjs.map +0 -1
- package/dist/_virtual/index/index2.mjs +0 -2
- package/dist/_virtual/index/index2.mjs.map +0 -1
- package/dist/_virtual/index/index3.mjs +0 -2
- package/dist/_virtual/index/index3.mjs.map +0 -1
- package/dist/_virtual/index/index4.mjs +0 -2
- package/dist/_virtual/index/index4.mjs.map +0 -1
- package/dist/_virtual/index/index5.mjs +0 -2
- package/dist/_virtual/index/index5.mjs.map +0 -1
- package/dist/_virtual/react-is.development/index.mjs +0 -2
- package/dist/_virtual/react-is.development/index.mjs.map +0 -1
- package/dist/_virtual/react-is.production.min/index.mjs +0 -2
- package/dist/_virtual/react-is.production.min/index.mjs.map +0 -1
- package/dist/components/default/base/CalendarPopover/index.d.ts +0 -13
- package/dist/components/default/base/Header/index.d.ts +0 -10
- package/dist/components/default/base/HoverBadge/index.d.ts +0 -12
- package/dist/components/default/base/TextWrap/index.d.ts +0 -9
- package/dist/components/default/data-table/DataTableMainFrame/index.d.ts +0 -19
- package/dist/components/default/data-table/DataTableMainFrameSortable/index.d.ts +0 -25
- package/dist/components/default/data-table/DataTablePagination/index.d.ts +0 -11
- package/dist/components/default/data-table/DataTablePaginationSkeleton/index.d.ts +0 -7
- package/dist/components/default/data-table/DataTableRowSkeleton/index.d.ts +0 -11
- package/dist/components/default/data-table/DataTableSearch/index.d.ts +0 -11
- package/dist/components/default/data-table/DataTableSkeleton/index.d.ts +0 -57
- package/dist/components/default/data-table/DataTableStatus/index.d.ts +0 -12
- package/dist/components/default/data-table/DataTableViewOptions/index.d.ts +0 -10
- package/dist/components/default/dropzone/FileUploader/index.d.ts +0 -96
- package/dist/components/ui/accordion/accordion/index.d.ts +0 -13
- package/dist/components/ui/alert/alert/index.d.ts +0 -13
- package/dist/components/ui/avatar/avatar/index.d.ts +0 -9
- package/dist/components/ui/badge/badge/index.d.ts +0 -17
- package/dist/components/ui/button/button/index.d.ts +0 -15
- package/dist/components/ui/calendar/calendar/index.d.ts +0 -12
- package/dist/components/ui/card/card/index.d.ts +0 -12
- package/dist/components/ui/checkbox/checkbox/index.d.ts +0 -7
- package/dist/components/ui/command/command/index.d.ts +0 -19
- package/dist/components/ui/dialog/dialog/index.d.ts +0 -16
- package/dist/components/ui/dropdown-menu/dropdown-menu/index.d.ts +0 -28
- package/dist/components/ui/form/form/index.d.ts +0 -28
- package/dist/components/ui/hover-card/hover-card/index.d.ts +0 -9
- package/dist/components/ui/input/input/index.d.ts +0 -6
- package/dist/components/ui/label/label/index.d.ts +0 -7
- package/dist/components/ui/pagination/pagination/index.d.ts +0 -16
- package/dist/components/ui/popover/popover/index.d.ts +0 -10
- package/dist/components/ui/progress/progress/index.d.ts +0 -7
- package/dist/components/ui/scroll-area/scroll-area/index.d.ts +0 -8
- package/dist/components/ui/select/select/index.d.ts +0 -16
- package/dist/components/ui/separator/separator/index.d.ts +0 -7
- package/dist/components/ui/sheet/sheet/index.d.ts +0 -16
- package/dist/components/ui/skeleton/skeleton/index.d.ts +0 -6
- package/dist/components/ui/sonner/sonner/index.d.ts +0 -5
- package/dist/components/ui/sortable/sortable/index.d.ts +0 -107
- package/dist/components/ui/table/table/index.d.ts +0 -13
- package/dist/components/ui/tabs/tabs/index.d.ts +0 -10
- package/dist/components/ui/toast/toast/index.d.ts +0 -21
- package/dist/components/ui/tooltip/tooltip/index.d.ts +0 -10
- package/dist/node_modules/@date-fns/tz/date/index/index.mjs +0 -2
- package/dist/node_modules/@date-fns/tz/date/index/index.mjs.map +0 -1
- package/dist/node_modules/@date-fns/tz/date/mini/index.mjs +0 -2
- package/dist/node_modules/@date-fns/tz/date/mini/index.mjs.map +0 -1
- package/dist/node_modules/@date-fns/tz/tzOffset/index/index.mjs +0 -2
- package/dist/node_modules/@date-fns/tz/tzOffset/index/index.mjs.map +0 -1
- package/dist/node_modules/@dnd-kit/accessibility/dist/accessibility.esm/index.mjs +0 -2
- package/dist/node_modules/@dnd-kit/accessibility/dist/accessibility.esm/index.mjs.map +0 -1
- package/dist/node_modules/@dnd-kit/core/dist/core.esm/index.mjs +0 -2
- package/dist/node_modules/@dnd-kit/core/dist/core.esm/index.mjs.map +0 -1
- package/dist/node_modules/@dnd-kit/modifiers/dist/modifiers.esm/index.mjs +0 -2
- package/dist/node_modules/@dnd-kit/modifiers/dist/modifiers.esm/index.mjs.map +0 -1
- package/dist/node_modules/@dnd-kit/sortable/dist/sortable.esm/index.mjs +0 -2
- package/dist/node_modules/@dnd-kit/sortable/dist/sortable.esm/index.mjs.map +0 -1
- package/dist/node_modules/@dnd-kit/utilities/dist/utilities.esm/index.mjs +0 -2
- package/dist/node_modules/@dnd-kit/utilities/dist/utilities.esm/index.mjs.map +0 -1
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core/index.mjs +0 -2
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core/index.mjs.map +0 -1
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom/index.mjs +0 -2
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom/index.mjs.map +0 -1
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom/index.mjs +0 -2
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom/index.mjs.map +0 -1
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils/index.mjs +0 -2
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils/index.mjs.map +0 -1
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom/index.mjs +0 -2
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom/index.mjs.map +0 -1
- package/dist/node_modules/@radix-ui/number/dist/index/index.mjs +0 -2
- package/dist/node_modules/@radix-ui/number/dist/index/index.mjs.map +0 -1
- package/dist/node_modules/@radix-ui/primitive/dist/index/index.mjs +0 -2
- package/dist/node_modules/@radix-ui/primitive/dist/index/index.mjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-accordion/dist/index/index.mjs +0 -3
- package/dist/node_modules/@radix-ui/react-accordion/dist/index/index.mjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-arrow/dist/index/index.mjs +0 -2
- package/dist/node_modules/@radix-ui/react-arrow/dist/index/index.mjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-avatar/dist/index/index.mjs +0 -3
- package/dist/node_modules/@radix-ui/react-avatar/dist/index/index.mjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-checkbox/dist/index/index.mjs +0 -3
- package/dist/node_modules/@radix-ui/react-checkbox/dist/index/index.mjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-collapsible/dist/index/index.mjs +0 -3
- package/dist/node_modules/@radix-ui/react-collapsible/dist/index/index.mjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index/index.mjs +0 -2
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index/index.mjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-context/dist/index/index.mjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-dialog/dist/index/index.mjs +0 -3
- package/dist/node_modules/@radix-ui/react-dialog/dist/index/index.mjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-direction/dist/index/index.mjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index/index.mjs +0 -3
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index/index.mjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index/index.mjs +0 -3
- package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index/index.mjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index/index.mjs +0 -3
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index/index.mjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index/index.mjs +0 -3
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index/index.mjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-hover-card/dist/index/index.mjs +0 -3
- package/dist/node_modules/@radix-ui/react-hover-card/dist/index/index.mjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-icons/dist/react-icons.esm/index.mjs +0 -2
- package/dist/node_modules/@radix-ui/react-icons/dist/react-icons.esm/index.mjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-id/dist/index/index.mjs +0 -2
- package/dist/node_modules/@radix-ui/react-id/dist/index/index.mjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-label/dist/index/index.mjs +0 -3
- package/dist/node_modules/@radix-ui/react-label/dist/index/index.mjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-menu/dist/index/index.mjs +0 -3
- package/dist/node_modules/@radix-ui/react-menu/dist/index/index.mjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-popover/dist/index/index.mjs +0 -3
- package/dist/node_modules/@radix-ui/react-popover/dist/index/index.mjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-popper/dist/index/index.mjs +0 -3
- package/dist/node_modules/@radix-ui/react-popper/dist/index/index.mjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-portal/dist/index/index.mjs +0 -3
- package/dist/node_modules/@radix-ui/react-portal/dist/index/index.mjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-presence/dist/index/index.mjs +0 -3
- package/dist/node_modules/@radix-ui/react-presence/dist/index/index.mjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-primitive/dist/index/index.mjs +0 -2
- package/dist/node_modules/@radix-ui/react-primitive/dist/index/index.mjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-progress/dist/index/index.mjs +0 -3
- package/dist/node_modules/@radix-ui/react-progress/dist/index/index.mjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-roving-focus/dist/index/index.mjs +0 -3
- package/dist/node_modules/@radix-ui/react-roving-focus/dist/index/index.mjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-scroll-area/dist/index/index.mjs +0 -3
- package/dist/node_modules/@radix-ui/react-scroll-area/dist/index/index.mjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-separator/dist/index/index.mjs +0 -2
- package/dist/node_modules/@radix-ui/react-separator/dist/index/index.mjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-tabs/dist/index/index.mjs +0 -3
- package/dist/node_modules/@radix-ui/react-tabs/dist/index/index.mjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-toast/dist/index/index.mjs +0 -3
- package/dist/node_modules/@radix-ui/react-toast/dist/index/index.mjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-tooltip/dist/index/index.mjs +0 -3
- package/dist/node_modules/@radix-ui/react-tooltip/dist/index/index.mjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index/index.mjs +0 -2
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index/index.mjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index/index.mjs +0 -2
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index/index.mjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index/index.mjs +0 -2
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index/index.mjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index/index.mjs +0 -2
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index/index.mjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-use-previous/dist/index/index.mjs +0 -2
- package/dist/node_modules/@radix-ui/react-use-previous/dist/index/index.mjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-use-size/dist/index/index.mjs +0 -2
- package/dist/node_modules/@radix-ui/react-use-size/dist/index/index.mjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index/index.mjs +0 -2
- package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index/index.mjs.map +0 -1
- package/dist/node_modules/@tanstack/react-table/build/lib/index/index.mjs +0 -2
- package/dist/node_modules/@tanstack/react-table/build/lib/index/index.mjs.map +0 -1
- package/dist/node_modules/aria-hidden/dist/es2015/index/index.mjs +0 -2
- package/dist/node_modules/aria-hidden/dist/es2015/index/index.mjs.map +0 -1
- package/dist/node_modules/attr-accept/dist/es/index/index.mjs +0 -2
- package/dist/node_modules/attr-accept/dist/es/index/index.mjs.map +0 -1
- package/dist/node_modules/clsx/dist/clsx/index.mjs +0 -2
- package/dist/node_modules/clsx/dist/clsx/index.mjs.map +0 -1
- package/dist/node_modules/cmdk/dist/chunk-NZJY6EH4/index.mjs +0 -2
- package/dist/node_modules/cmdk/dist/chunk-NZJY6EH4/index.mjs.map +0 -1
- package/dist/node_modules/cmdk/dist/index/index.mjs +0 -3
- package/dist/node_modules/cmdk/dist/index/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/_lib/addLeadingZeros/index.mjs +0 -2
- package/dist/node_modules/date-fns/_lib/addLeadingZeros/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/_lib/defaultOptions/index.mjs +0 -2
- package/dist/node_modules/date-fns/_lib/defaultOptions/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/_lib/format/formatters/index.mjs +0 -2
- package/dist/node_modules/date-fns/_lib/format/formatters/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/_lib/format/lightFormatters/index.mjs +0 -2
- package/dist/node_modules/date-fns/_lib/format/lightFormatters/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/_lib/format/longFormatters/index.mjs +0 -2
- package/dist/node_modules/date-fns/_lib/format/longFormatters/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds/index.mjs +0 -2
- package/dist/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/_lib/normalizeDates/index.mjs +0 -2
- package/dist/node_modules/date-fns/_lib/normalizeDates/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/_lib/normalizeInterval/index.mjs +0 -2
- package/dist/node_modules/date-fns/_lib/normalizeInterval/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/_lib/protectedTokens/index.mjs +0 -2
- package/dist/node_modules/date-fns/_lib/protectedTokens/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/addDays/index.mjs +0 -2
- package/dist/node_modules/date-fns/addDays/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/addMonths/index.mjs +0 -2
- package/dist/node_modules/date-fns/addMonths/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/addWeeks/index.mjs +0 -2
- package/dist/node_modules/date-fns/addWeeks/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/addYears/index.mjs +0 -2
- package/dist/node_modules/date-fns/addYears/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/constants/index.mjs +0 -2
- package/dist/node_modules/date-fns/constants/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/constructFrom/index.mjs +0 -2
- package/dist/node_modules/date-fns/constructFrom/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/differenceInCalendarDays/index.mjs +0 -2
- package/dist/node_modules/date-fns/differenceInCalendarDays/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/differenceInCalendarMonths/index.mjs +0 -2
- package/dist/node_modules/date-fns/differenceInCalendarMonths/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/eachMonthOfInterval/index.mjs +0 -2
- package/dist/node_modules/date-fns/eachMonthOfInterval/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/endOfISOWeek/index.mjs +0 -2
- package/dist/node_modules/date-fns/endOfISOWeek/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/endOfMonth/index.mjs +0 -2
- package/dist/node_modules/date-fns/endOfMonth/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/endOfWeek/index.mjs +0 -2
- package/dist/node_modules/date-fns/endOfWeek/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/endOfYear/index.mjs +0 -2
- package/dist/node_modules/date-fns/endOfYear/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/format/index.mjs +0 -2
- package/dist/node_modules/date-fns/format/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/getDayOfYear/index.mjs +0 -2
- package/dist/node_modules/date-fns/getDayOfYear/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/getDaysInMonth/index.mjs +0 -2
- package/dist/node_modules/date-fns/getDaysInMonth/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/getISOWeek/index.mjs +0 -2
- package/dist/node_modules/date-fns/getISOWeek/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/getISOWeekYear/index.mjs +0 -2
- package/dist/node_modules/date-fns/getISOWeekYear/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/getMonth/index.mjs +0 -2
- package/dist/node_modules/date-fns/getMonth/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/getWeek/index.mjs +0 -2
- package/dist/node_modules/date-fns/getWeek/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/getWeekYear/index.mjs +0 -2
- package/dist/node_modules/date-fns/getWeekYear/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/getYear/index.mjs +0 -2
- package/dist/node_modules/date-fns/getYear/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/isAfter/index.mjs +0 -2
- package/dist/node_modules/date-fns/isAfter/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/isBefore/index.mjs +0 -2
- package/dist/node_modules/date-fns/isBefore/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/isDate/index.mjs +0 -2
- package/dist/node_modules/date-fns/isDate/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/isSameDay/index.mjs +0 -2
- package/dist/node_modules/date-fns/isSameDay/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/isSameMonth/index.mjs +0 -2
- package/dist/node_modules/date-fns/isSameMonth/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/isSameYear/index.mjs +0 -2
- package/dist/node_modules/date-fns/isSameYear/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/isValid/index.mjs +0 -2
- package/dist/node_modules/date-fns/isValid/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/isWeekend/index.mjs +0 -2
- package/dist/node_modules/date-fns/isWeekend/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/locale/_lib/buildFormatLongFn/index.mjs +0 -2
- package/dist/node_modules/date-fns/locale/_lib/buildFormatLongFn/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn/index.mjs +0 -2
- package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/locale/_lib/buildMatchFn/index.mjs +0 -2
- package/dist/node_modules/date-fns/locale/_lib/buildMatchFn/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/locale/_lib/buildMatchPatternFn/index.mjs +0 -2
- package/dist/node_modules/date-fns/locale/_lib/buildMatchPatternFn/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance/index.mjs +0 -2
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatLong/index.mjs +0 -2
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatLong/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatRelative/index.mjs +0 -2
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatRelative/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/locale/en-US/_lib/localize/index.mjs +0 -2
- package/dist/node_modules/date-fns/locale/en-US/_lib/localize/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/locale/en-US/_lib/match/index.mjs +0 -2
- package/dist/node_modules/date-fns/locale/en-US/_lib/match/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/locale/en-US/index.mjs +0 -2
- package/dist/node_modules/date-fns/locale/en-US/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/locale/pt-BR/_lib/formatDistance/index.mjs +0 -2
- package/dist/node_modules/date-fns/locale/pt-BR/_lib/formatDistance/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/locale/pt-BR/_lib/formatLong/index.mjs +0 -2
- package/dist/node_modules/date-fns/locale/pt-BR/_lib/formatLong/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/locale/pt-BR/_lib/formatRelative/index.mjs +0 -2
- package/dist/node_modules/date-fns/locale/pt-BR/_lib/formatRelative/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/locale/pt-BR/_lib/localize/index.mjs +0 -2
- package/dist/node_modules/date-fns/locale/pt-BR/_lib/localize/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/locale/pt-BR/_lib/match/index.mjs +0 -2
- package/dist/node_modules/date-fns/locale/pt-BR/_lib/match/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/locale/pt-BR/index.mjs +0 -2
- package/dist/node_modules/date-fns/locale/pt-BR/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/max/index.mjs +0 -2
- package/dist/node_modules/date-fns/max/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/min/index.mjs +0 -2
- package/dist/node_modules/date-fns/min/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/setMonth/index.mjs +0 -2
- package/dist/node_modules/date-fns/setMonth/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/setYear/index.mjs +0 -2
- package/dist/node_modules/date-fns/setYear/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/startOfDay/index.mjs +0 -2
- package/dist/node_modules/date-fns/startOfDay/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/startOfISOWeek/index.mjs +0 -2
- package/dist/node_modules/date-fns/startOfISOWeek/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/startOfISOWeekYear/index.mjs +0 -2
- package/dist/node_modules/date-fns/startOfISOWeekYear/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/startOfMonth/index.mjs +0 -2
- package/dist/node_modules/date-fns/startOfMonth/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/startOfWeek/index.mjs +0 -2
- package/dist/node_modules/date-fns/startOfWeek/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/startOfWeekYear/index.mjs +0 -2
- package/dist/node_modules/date-fns/startOfWeekYear/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/startOfYear/index.mjs +0 -2
- package/dist/node_modules/date-fns/startOfYear/index.mjs.map +0 -1
- package/dist/node_modules/date-fns/toDate/index.mjs +0 -2
- package/dist/node_modules/date-fns/toDate/index.mjs.map +0 -1
- package/dist/node_modules/file-selector/dist/es2015/file/index.mjs +0 -2
- package/dist/node_modules/file-selector/dist/es2015/file/index.mjs.map +0 -1
- package/dist/node_modules/file-selector/dist/es2015/file-selector/index.mjs +0 -2
- package/dist/node_modules/file-selector/dist/es2015/file-selector/index.mjs.map +0 -1
- package/dist/node_modules/get-nonce/dist/es2015/index/index.mjs +0 -2
- package/dist/node_modules/get-nonce/dist/es2015/index/index.mjs.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/Icon/index.mjs +0 -2
- package/dist/node_modules/lucide-react/dist/esm/Icon/index.mjs.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/createLucideIcon/index.mjs +0 -2
- package/dist/node_modules/lucide-react/dist/esm/createLucideIcon/index.mjs.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/defaultAttributes/index.mjs +0 -8
- package/dist/node_modules/lucide-react/dist/esm/defaultAttributes/index.mjs.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/arrow-down/index.mjs +0 -2
- package/dist/node_modules/lucide-react/dist/esm/icons/arrow-down/index.mjs.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/arrow-up/index.mjs +0 -2
- package/dist/node_modules/lucide-react/dist/esm/icons/arrow-up/index.mjs.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/calendar/index.mjs +0 -2
- package/dist/node_modules/lucide-react/dist/esm/icons/calendar/index.mjs.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/check/index.mjs +0 -2
- package/dist/node_modules/lucide-react/dist/esm/icons/check/index.mjs.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-down/index.mjs +0 -2
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-down/index.mjs.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-left/index.mjs +0 -2
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-left/index.mjs.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right/index.mjs +0 -2
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right/index.mjs.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up/index.mjs +0 -2
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up/index.mjs.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/circle/index.mjs +0 -2
- package/dist/node_modules/lucide-react/dist/esm/icons/circle/index.mjs.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/ellipsis/index.mjs +0 -2
- package/dist/node_modules/lucide-react/dist/esm/icons/ellipsis/index.mjs.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/loader-circle/index.mjs +0 -2
- package/dist/node_modules/lucide-react/dist/esm/icons/loader-circle/index.mjs.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/rotate-cw/index.mjs +0 -2
- package/dist/node_modules/lucide-react/dist/esm/icons/rotate-cw/index.mjs.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/search/index.mjs +0 -2
- package/dist/node_modules/lucide-react/dist/esm/icons/search/index.mjs.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/upload/index.mjs +0 -2
- package/dist/node_modules/lucide-react/dist/esm/icons/upload/index.mjs.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/x/index.mjs +0 -2
- package/dist/node_modules/lucide-react/dist/esm/icons/x/index.mjs.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/index.mjs +0 -8
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/index.mjs.map +0 -1
- package/dist/node_modules/object-assign/index/index.mjs +0 -7
- package/dist/node_modules/object-assign/index/index.mjs.map +0 -1
- package/dist/node_modules/prop-types/checkPropTypes/index.mjs +0 -2
- package/dist/node_modules/prop-types/checkPropTypes/index.mjs.map +0 -1
- package/dist/node_modules/prop-types/factoryWithThrowingShims/index.mjs +0 -2
- package/dist/node_modules/prop-types/factoryWithThrowingShims/index.mjs.map +0 -1
- package/dist/node_modules/prop-types/factoryWithTypeCheckers/index.mjs +0 -2
- package/dist/node_modules/prop-types/factoryWithTypeCheckers/index.mjs.map +0 -1
- package/dist/node_modules/prop-types/index/index.mjs +0 -2
- package/dist/node_modules/prop-types/index/index.mjs.map +0 -1
- package/dist/node_modules/prop-types/lib/ReactPropTypesSecret/index.mjs +0 -2
- package/dist/node_modules/prop-types/lib/ReactPropTypesSecret/index.mjs.map +0 -1
- package/dist/node_modules/prop-types/lib/has/index.mjs +0 -2
- package/dist/node_modules/prop-types/lib/has/index.mjs.map +0 -1
- package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.development/index.mjs +0 -2
- package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.development/index.mjs.map +0 -1
- package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min/index.mjs +0 -2
- package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min/index.mjs.map +0 -1
- package/dist/node_modules/prop-types/node_modules/react-is/index/index.mjs +0 -2
- package/dist/node_modules/prop-types/node_modules/react-is/index/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/DayPicker/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/DayPicker/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/UI/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/UI/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/classes/CalendarDay/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/classes/CalendarDay/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/classes/CalendarMonth/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/classes/CalendarMonth/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/classes/CalendarWeek/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/classes/CalendarWeek/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/classes/DateLib/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/classes/DateLib/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/components/Button/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/components/Button/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/components/CaptionLabel/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/components/CaptionLabel/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/components/Chevron/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/components/Chevron/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/components/Day/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/components/Day/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/components/DayButton/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/components/DayButton/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/components/Dropdown/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/components/Dropdown/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/components/DropdownNav/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/components/DropdownNav/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/components/Footer/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/components/Footer/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/components/Month/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/components/Month/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/components/MonthCaption/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/components/MonthCaption/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/components/MonthGrid/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/components/MonthGrid/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/components/Months/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/components/Months/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/components/MonthsDropdown/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/components/MonthsDropdown/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/components/Nav/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/components/Nav/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/components/NextMonthButton/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/components/NextMonthButton/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/components/Option/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/components/Option/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/components/PreviousMonthButton/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/components/PreviousMonthButton/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/components/Root/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/components/Root/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/components/Select/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/components/Select/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/components/Week/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/components/Week/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/components/WeekNumber/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/components/WeekNumber/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/components/WeekNumberHeader/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/components/WeekNumberHeader/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/components/Weekday/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/components/Weekday/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/components/Weekdays/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/components/Weekdays/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/components/Weeks/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/components/Weeks/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/components/YearsDropdown/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/components/YearsDropdown/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/components/custom-components/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/components/custom-components/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatCaption/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatCaption/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatDay/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatDay/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatMonthDropdown/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatMonthDropdown/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumber/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumber/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumberHeader/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumberHeader/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatWeekdayName/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatWeekdayName/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatYearDropdown/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatYearDropdown/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/formatters/index/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/formatters/index/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/helpers/calculateFocusTarget/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/helpers/calculateFocusTarget/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/helpers/endOfBroadcastWeek/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/helpers/endOfBroadcastWeek/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getBroadcastWeeksInMonth/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getBroadcastWeeksInMonth/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getClassNamesForModifiers/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getClassNamesForModifiers/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getComponents/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getComponents/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDataAttributes/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDataAttributes/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDates/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDates/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDays/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDays/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDefaultClassNames/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDefaultClassNames/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDisplayMonths/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDisplayMonths/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getFocusableDate/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getFocusableDate/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getFormatters/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getFormatters/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getInitialMonth/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getInitialMonth/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getMonthOptions/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getMonthOptions/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getMonths/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getMonths/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getNavMonth/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getNavMonth/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getNextFocus/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getNextFocus/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getNextMonth/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getNextMonth/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getPreviousMonth/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getPreviousMonth/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getStyleForModifiers/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getStyleForModifiers/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getWeekdays/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getWeekdays/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getWeeks/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getWeeks/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getYearOptions/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getYearOptions/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/helpers/startOfBroadcastWeek/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/helpers/startOfBroadcastWeek/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/helpers/useControlledValue/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/helpers/useControlledValue/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/labels/index/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/labels/index/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelDayButton/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelDayButton/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelGrid/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelGrid/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelGridcell/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelGridcell/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelMonthDropdown/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelMonthDropdown/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelNav/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelNav/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelNext/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelNext/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelPrevious/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelPrevious/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelWeekNumber/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelWeekNumber/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelWeekNumberHeader/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelWeekNumberHeader/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelWeekday/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelWeekday/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelYearDropdown/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelYearDropdown/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/selection/useMulti/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/selection/useMulti/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/selection/useRange/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/selection/useRange/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/selection/useSingle/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/selection/useSingle/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/useAnimation/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/useAnimation/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/useCalendar/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/useCalendar/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/useDayPicker/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/useDayPicker/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/useFocus/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/useFocus/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/useGetModifiers/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/useGetModifiers/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/useSelection/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/useSelection/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/utils/addToRange/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/utils/addToRange/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/utils/dateMatchModifiers/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/utils/dateMatchModifiers/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/utils/rangeContainsDayOfWeek/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/utils/rangeContainsDayOfWeek/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/utils/rangeContainsModifiers/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/utils/rangeContainsModifiers/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/utils/rangeIncludesDate/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/utils/rangeIncludesDate/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/utils/rangeOverlaps/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/utils/rangeOverlaps/index.mjs.map +0 -1
- package/dist/node_modules/react-day-picker/dist/esm/utils/typeguards/index.mjs +0 -2
- package/dist/node_modules/react-day-picker/dist/esm/utils/typeguards/index.mjs.map +0 -1
- package/dist/node_modules/react-dropzone/dist/es/index/index.mjs +0 -2
- package/dist/node_modules/react-dropzone/dist/es/index/index.mjs.map +0 -1
- package/dist/node_modules/react-dropzone/dist/es/utils/index/index.mjs +0 -2
- package/dist/node_modules/react-dropzone/dist/es/utils/index/index.mjs.map +0 -1
- package/dist/node_modules/react-hook-form/dist/index.esm/index.mjs +0 -2
- package/dist/node_modules/react-hook-form/dist/index.esm/index.mjs.map +0 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/Combination/index.mjs +0 -2
- package/dist/node_modules/react-remove-scroll/dist/es2015/Combination/index.mjs.map +0 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect/index.mjs +0 -2
- package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect/index.mjs.map +0 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/UI/index.mjs +0 -2
- package/dist/node_modules/react-remove-scroll/dist/es2015/UI/index.mjs.map +0 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture/index.mjs +0 -2
- package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture/index.mjs.map +0 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll/index.mjs +0 -2
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll/index.mjs.map +0 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/medium/index.mjs +0 -2
- package/dist/node_modules/react-remove-scroll/dist/es2015/medium/index.mjs.map +0 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar/index.mjs +0 -2
- package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar/index.mjs.map +0 -1
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component/index.mjs +0 -2
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component/index.mjs.map +0 -1
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants/index.mjs +0 -2
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants/index.mjs.map +0 -1
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils/index.mjs +0 -2
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils/index.mjs.map +0 -1
- package/dist/node_modules/react-style-singleton/dist/es2015/component/index.mjs +0 -2
- package/dist/node_modules/react-style-singleton/dist/es2015/component/index.mjs.map +0 -1
- package/dist/node_modules/react-style-singleton/dist/es2015/hook/index.mjs +0 -2
- package/dist/node_modules/react-style-singleton/dist/es2015/hook/index.mjs.map +0 -1
- package/dist/node_modules/react-style-singleton/dist/es2015/singleton/index.mjs +0 -2
- package/dist/node_modules/react-style-singleton/dist/es2015/singleton/index.mjs.map +0 -1
- package/dist/node_modules/sonner/dist/index/index.mjs +0 -3
- package/dist/node_modules/sonner/dist/index/index.mjs.map +0 -1
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs/index.mjs +0 -2
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs/index.mjs.map +0 -1
- package/dist/node_modules/tslib/tslib.es6/index.mjs.map +0 -1
- package/dist/node_modules/use-callback-ref/dist/es2015/assignRef/index.mjs +0 -2
- package/dist/node_modules/use-callback-ref/dist/es2015/assignRef/index.mjs.map +0 -1
- package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef/index.mjs +0 -2
- package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef/index.mjs.map +0 -1
- package/dist/node_modules/use-callback-ref/dist/es2015/useRef/index.mjs +0 -2
- package/dist/node_modules/use-callback-ref/dist/es2015/useRef/index.mjs.map +0 -1
- package/dist/node_modules/use-sidecar/dist/es2015/exports/index.mjs +0 -2
- package/dist/node_modules/use-sidecar/dist/es2015/exports/index.mjs.map +0 -1
- package/dist/node_modules/use-sidecar/dist/es2015/medium/index.mjs +0 -2
- package/dist/node_modules/use-sidecar/dist/es2015/medium/index.mjs.map +0 -1
- package/dist/src/components/default/base/CalendarPopover/index.mjs +0 -2
- package/dist/src/components/default/base/CalendarPopover/index.mjs.map +0 -1
- package/dist/src/components/default/base/Header/index.mjs +0 -2
- package/dist/src/components/default/base/Header/index.mjs.map +0 -1
- package/dist/src/components/default/base/HoverBadge/index.mjs +0 -2
- package/dist/src/components/default/base/HoverBadge/index.mjs.map +0 -1
- package/dist/src/components/default/base/TextWrap/index.mjs +0 -2
- package/dist/src/components/default/data-table/DataTableMainFrame/index.mjs +0 -2
- package/dist/src/components/default/data-table/DataTableMainFrame/index.mjs.map +0 -1
- package/dist/src/components/default/data-table/DataTableMainFrameSortable/index.mjs +0 -2
- package/dist/src/components/default/data-table/DataTableMainFrameSortable/index.mjs.map +0 -1
- package/dist/src/components/default/data-table/DataTablePagination/index.mjs +0 -2
- package/dist/src/components/default/data-table/DataTablePagination/index.mjs.map +0 -1
- package/dist/src/components/default/data-table/DataTablePaginationSkeleton/index.mjs +0 -2
- package/dist/src/components/default/data-table/DataTablePaginationSkeleton/index.mjs.map +0 -1
- package/dist/src/components/default/data-table/DataTableRowSkeleton/index.mjs +0 -2
- package/dist/src/components/default/data-table/DataTableRowSkeleton/index.mjs.map +0 -1
- package/dist/src/components/default/data-table/DataTableSearch/index.mjs +0 -2
- package/dist/src/components/default/data-table/DataTableSearch/index.mjs.map +0 -1
- package/dist/src/components/default/data-table/DataTableSkeleton/index.mjs +0 -2
- package/dist/src/components/default/data-table/DataTableSkeleton/index.mjs.map +0 -1
- package/dist/src/components/default/data-table/DataTableStatus/index.mjs +0 -2
- package/dist/src/components/default/data-table/DataTableStatus/index.mjs.map +0 -1
- package/dist/src/components/default/data-table/DataTableViewOptions/index.mjs +0 -2
- package/dist/src/components/default/data-table/DataTableViewOptions/index.mjs.map +0 -1
- package/dist/src/components/default/dropzone/FileUploader/index.mjs +0 -2
- package/dist/src/components/default/dropzone/FileUploader/index.mjs.map +0 -1
- package/dist/src/components/icon/IconActive/index.mjs +0 -2
- package/dist/src/components/icon/IconActive/index.mjs.map +0 -1
- package/dist/src/components/icon/IconBuilding/index.mjs +0 -2
- package/dist/src/components/icon/IconBuilding/index.mjs.map +0 -1
- package/dist/src/components/icon/IconCommand/index.mjs +0 -2
- package/dist/src/components/icon/IconCommand/index.mjs.map +0 -1
- package/dist/src/components/icon/IconFilter/index.mjs +0 -2
- package/dist/src/components/icon/IconFilter/index.mjs.map +0 -1
- package/dist/src/components/icon/IconLineChart/index.mjs +0 -2
- package/dist/src/components/icon/IconLineChart/index.mjs.map +0 -1
- package/dist/src/components/icon/IconLoading/index.mjs +0 -2
- package/dist/src/components/icon/IconLoading/index.mjs.map +0 -1
- package/dist/src/components/icon/IconMenuDashboard/index.mjs +0 -2
- package/dist/src/components/icon/IconMenuDashboard/index.mjs.map +0 -1
- package/dist/src/components/icon/IconNotAllow/index.mjs +0 -2
- package/dist/src/components/icon/IconNotAllow/index.mjs.map +0 -1
- package/dist/src/components/icon/IconPending/index.mjs +0 -2
- package/dist/src/components/icon/IconPending/index.mjs.map +0 -1
- package/dist/src/components/icon/IconTable/index.mjs +0 -2
- package/dist/src/components/icon/IconTable/index.mjs.map +0 -1
- package/dist/src/components/ui/accordion/accordion/index.mjs +0 -2
- package/dist/src/components/ui/accordion/accordion/index.mjs.map +0 -1
- package/dist/src/components/ui/alert/alert/index.mjs +0 -2
- package/dist/src/components/ui/alert/alert/index.mjs.map +0 -1
- package/dist/src/components/ui/avatar/avatar/index.mjs +0 -2
- package/dist/src/components/ui/avatar/avatar/index.mjs.map +0 -1
- package/dist/src/components/ui/badge/badge/index.mjs +0 -2
- package/dist/src/components/ui/badge/badge/index.mjs.map +0 -1
- package/dist/src/components/ui/button/button/index.mjs +0 -2
- package/dist/src/components/ui/button/button/index.mjs.map +0 -1
- package/dist/src/components/ui/calendar/calendar/index.mjs +0 -2
- package/dist/src/components/ui/calendar/calendar/index.mjs.map +0 -1
- package/dist/src/components/ui/card/card/index.mjs +0 -2
- package/dist/src/components/ui/card/card/index.mjs.map +0 -1
- package/dist/src/components/ui/checkbox/checkbox/index.mjs +0 -2
- package/dist/src/components/ui/checkbox/checkbox/index.mjs.map +0 -1
- package/dist/src/components/ui/command/command/index.mjs +0 -2
- package/dist/src/components/ui/command/command/index.mjs.map +0 -1
- package/dist/src/components/ui/dialog/dialog/index.mjs +0 -2
- package/dist/src/components/ui/dialog/dialog/index.mjs.map +0 -1
- package/dist/src/components/ui/dropdown-menu/dropdown-menu/index.mjs +0 -2
- package/dist/src/components/ui/dropdown-menu/dropdown-menu/index.mjs.map +0 -1
- package/dist/src/components/ui/form/form/index.mjs +0 -2
- package/dist/src/components/ui/form/form/index.mjs.map +0 -1
- package/dist/src/components/ui/hover-card/hover-card/index.mjs +0 -2
- package/dist/src/components/ui/hover-card/hover-card/index.mjs.map +0 -1
- package/dist/src/components/ui/input/input/index.mjs +0 -2
- package/dist/src/components/ui/input/input/index.mjs.map +0 -1
- package/dist/src/components/ui/label/label/index.mjs +0 -2
- package/dist/src/components/ui/label/label/index.mjs.map +0 -1
- package/dist/src/components/ui/pagination/pagination/index.mjs +0 -2
- package/dist/src/components/ui/pagination/pagination/index.mjs.map +0 -1
- package/dist/src/components/ui/popover/popover/index.mjs +0 -2
- package/dist/src/components/ui/popover/popover/index.mjs.map +0 -1
- package/dist/src/components/ui/progress/progress/index.mjs +0 -2
- package/dist/src/components/ui/progress/progress/index.mjs.map +0 -1
- package/dist/src/components/ui/scroll-area/scroll-area/index.mjs +0 -2
- package/dist/src/components/ui/scroll-area/scroll-area/index.mjs.map +0 -1
- package/dist/src/components/ui/select/select/index.mjs +0 -2
- package/dist/src/components/ui/select/select/index.mjs.map +0 -1
- package/dist/src/components/ui/separator/separator/index.mjs +0 -2
- package/dist/src/components/ui/separator/separator/index.mjs.map +0 -1
- package/dist/src/components/ui/sheet/sheet/index.mjs +0 -2
- package/dist/src/components/ui/sheet/sheet/index.mjs.map +0 -1
- package/dist/src/components/ui/skeleton/skeleton/index.mjs +0 -2
- package/dist/src/components/ui/sonner/sonner/index.mjs +0 -2
- package/dist/src/components/ui/sonner/sonner/index.mjs.map +0 -1
- package/dist/src/components/ui/sortable/sortable/index.mjs +0 -2
- package/dist/src/components/ui/sortable/sortable/index.mjs.map +0 -1
- package/dist/src/components/ui/table/table/index.mjs +0 -2
- package/dist/src/components/ui/table/table/index.mjs.map +0 -1
- package/dist/src/components/ui/tabs/tabs/index.mjs +0 -2
- package/dist/src/components/ui/tabs/tabs/index.mjs.map +0 -1
- package/dist/src/components/ui/toast/toast/index.mjs +0 -2
- package/dist/src/components/ui/toast/toast/index.mjs.map +0 -1
- package/dist/src/components/ui/tooltip/tooltip/index.mjs +0 -2
- package/dist/src/components/ui/tooltip/tooltip/index.mjs.map +0 -1
- package/dist/src/examples/hooks/use-callback-ref/index.mjs +0 -2
- package/dist/src/examples/hooks/use-callback-ref/index.mjs.map +0 -1
- package/dist/src/hooks/use-controllable-state/index.mjs +0 -2
- package/dist/src/hooks/use-controllable-state/index.mjs.map +0 -1
- package/dist/src/hooks/use-toast/index.mjs +0 -2
- package/dist/src/hooks/use-toast/index.mjs.map +0 -1
- package/dist/src/lib/compose-refs/index.mjs +0 -2
- package/dist/src/lib/compose-refs/index.mjs.map +0 -1
- package/dist/src/lib/utils/index.mjs +0 -2
- package/dist/src/lib/utils/index.mjs.map +0 -1
@@ -1,2 +0,0 @@
|
|
1
|
-
import{defaultDateLib as r}from"../../classes/DateLib/index.mjs";import{dateMatchModifiers as e}from"../dateMatchModifiers/index.mjs";import{rangeContainsDayOfWeek as t}from"../rangeContainsDayOfWeek/index.mjs";import{rangeIncludesDate as o}from"../rangeIncludesDate/index.mjs";import{rangeOverlaps as f}from"../rangeOverlaps/index.mjs";import{isDatesArray as n,isDateRange as i,isDayOfWeekType as m,isDateInterval as a,isDateAfterType as s,isDateBeforeType as d}from"../typeguards/index.mjs";function u(u,p,y=r){const c=Array.isArray(p)?p:[p];if(c.filter((r=>"function"!=typeof r)).some((r=>{if("boolean"==typeof r)return r;if(y.isDate(r))return o(u,r,!1,y);if(n(r,y))return r.some((r=>o(u,r,!1,y)));if(i(r))return!(!r.from||!r.to)&&f(u,{from:r.from,to:r.to},y);if(m(r))return t(u,r.dayOfWeek,y);if(a(r)){return y.isAfter(r.before,r.after)?f(u,{from:y.addDays(r.after,1),to:y.addDays(r.before,-1)},y):e(u.from,r,y)||e(u.to,r,y)}return!(!s(r)&&!d(r))&&(e(u.from,r,y)||e(u.to,r,y))})))return!0;const l=c.filter((r=>"function"==typeof r));if(l.length){let r=u.from;const e=y.differenceInCalendarDays(u.to,u.from);for(let t=0;t<=e;t++){if(l.some((e=>e(r))))return!0;r=y.addDays(r,1)}}return!1}export{u as rangeContainsModifiers};
|
2
|
-
//# sourceMappingURL=index.mjs.map
|
package/dist/node_modules/react-day-picker/dist/esm/utils/rangeContainsModifiers/index.mjs.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../../../node_modules/react-day-picker/dist/esm/utils/rangeContainsModifiers.js"],"sourcesContent":["import { defaultDateLib } from \"../classes/DateLib.js\";\nimport { dateMatchModifiers } from \"./dateMatchModifiers.js\";\nimport { rangeContainsDayOfWeek } from \"./rangeContainsDayOfWeek.js\";\nimport { rangeIncludesDate } from \"./rangeIncludesDate.js\";\nimport { rangeOverlaps } from \"./rangeOverlaps.js\";\nimport { isDateAfterType, isDateBeforeType, isDateInterval, isDateRange, isDatesArray, isDayOfWeekType } from \"./typeguards.js\";\n/**\n * Returns whether a range contains dates that match the given modifiers.\n *\n * ```tsx\n * const range: DateRange = {\n * from: new Date(2021, 12, 21),\n * to: new Date(2021, 12, 30)\n * };\n * const matcher1: Date = new Date(2021, 12, 21);\n * const matcher2: DateRange = {\n * from: new Date(2022, 5, 1),\n * to: new Date(2022, 5, 23)\n * };\n * rangeContainsModifiers(range, [matcher1, matcher2]); // true, since matcher1 is in the date.\n * ```\n *\n * @since 9.2.2\n * @group Utilities\n */\nexport function rangeContainsModifiers(range, modifiers, dateLib = defaultDateLib) {\n const matchers = Array.isArray(modifiers) ? modifiers : [modifiers];\n // Defer function matchers evaluation as they are the least performant.\n const nonFunctionMatchers = matchers.filter((matcher) => typeof matcher !== \"function\");\n const nonFunctionMatchersResult = nonFunctionMatchers.some((matcher) => {\n if (typeof matcher === \"boolean\")\n return matcher;\n if (dateLib.isDate(matcher)) {\n return rangeIncludesDate(range, matcher, false, dateLib);\n }\n if (isDatesArray(matcher, dateLib)) {\n return matcher.some((date) => rangeIncludesDate(range, date, false, dateLib));\n }\n if (isDateRange(matcher)) {\n if (matcher.from && matcher.to) {\n return rangeOverlaps(range, { from: matcher.from, to: matcher.to }, dateLib);\n }\n return false;\n }\n if (isDayOfWeekType(matcher)) {\n return rangeContainsDayOfWeek(range, matcher.dayOfWeek, dateLib);\n }\n if (isDateInterval(matcher)) {\n const isClosedInterval = dateLib.isAfter(matcher.before, matcher.after);\n if (isClosedInterval) {\n return rangeOverlaps(range, {\n from: dateLib.addDays(matcher.after, 1),\n to: dateLib.addDays(matcher.before, -1)\n }, dateLib);\n }\n return (dateMatchModifiers(range.from, matcher, dateLib) ||\n dateMatchModifiers(range.to, matcher, dateLib));\n }\n if (isDateAfterType(matcher) || isDateBeforeType(matcher)) {\n return (dateMatchModifiers(range.from, matcher, dateLib) ||\n dateMatchModifiers(range.to, matcher, dateLib));\n }\n return false;\n });\n if (nonFunctionMatchersResult) {\n return true;\n }\n const functionMatchers = matchers.filter((matcher) => typeof matcher === \"function\");\n if (functionMatchers.length) {\n let date = range.from;\n const totalDays = dateLib.differenceInCalendarDays(range.to, range.from);\n for (let i = 0; i <= totalDays; i++) {\n if (functionMatchers.some((matcher) => matcher(date))) {\n return true;\n }\n date = dateLib.addDays(date, 1);\n }\n }\n return false;\n}\n//# sourceMappingURL=rangeContainsModifiers.js.map"],"names":["rangeContainsModifiers","range","modifiers","dateLib","defaultDateLib","matchers","Array","isArray","filter","matcher","some","isDate","rangeIncludesDate","isDatesArray","date","isDateRange","from","to","rangeOverlaps","isDayOfWeekType","rangeContainsDayOfWeek","dayOfWeek","isDateInterval","isAfter","before","after","addDays","dateMatchModifiers","isDateAfterType","isDateBeforeType","functionMatchers","length","totalDays","differenceInCalendarDays","i"],"mappings":"6eAmCM,SAAUA,EACdC,EACAC,EACAC,EAAmBC,GAEnB,MAAMC,EAAWC,MAAMC,QAAQL,GAAaA,EAAY,CAACA,GA+DzD,GA5D4BG,EAASG,QAClCC,GAA+B,mBAAZA,IAGgCC,MAAMD,IAC1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../../classes/DateLib/index.mjs";function r(r,n,t=!1,a=e){let{from:i,to:o}=r;const{differenceInCalendarDays:s,isSameDay:f}=a;if(i&&o){s(o,i)<0&&([i,o]=[o,i]);return s(n,i)>=(t?1:0)&&s(o,n)>=(t?1:0)}return!t&&o?f(o,n):!(t||!i)&&f(i,n)}export{r as rangeIncludesDate};
|
2
|
-
//# sourceMappingURL=index.mjs.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../../../node_modules/react-day-picker/dist/esm/utils/rangeIncludesDate.js"],"sourcesContent":["import { defaultDateLib } from \"../classes/index.js\";\n/**\n * Determines whether a given date is inside a specified date range.\n *\n * @since 9.0.0\n * @group Utilities\n */\nexport function rangeIncludesDate(range, date, \n/** If `true`, the ends of the range are excluded. */\nexcludeEnds = false, dateLib = defaultDateLib) {\n let { from, to } = range;\n const { differenceInCalendarDays, isSameDay } = dateLib;\n if (from && to) {\n const isRangeInverted = differenceInCalendarDays(to, from) < 0;\n if (isRangeInverted) {\n [from, to] = [to, from];\n }\n const isInRange = differenceInCalendarDays(date, from) >= (excludeEnds ? 1 : 0) &&\n differenceInCalendarDays(to, date) >= (excludeEnds ? 1 : 0);\n return isInRange;\n }\n if (!excludeEnds && to) {\n return isSameDay(to, date);\n }\n if (!excludeEnds && from) {\n return isSameDay(from, date);\n }\n return false;\n}\n/**\n * @private\n * @deprecated Use {@link rangeIncludesDate} instead.\n */\nexport const isDateInRange = (range, date) => rangeIncludesDate(range, date, false, defaultDateLib);\n//# sourceMappingURL=rangeIncludesDate.js.map"],"names":["rangeIncludesDate","range","date","excludeEnds","dateLib","defaultDateLib","from","to","differenceInCalendarDays","isSameDay"],"mappings":"iEASM,SAAUA,EACdC,EACAC,EAEAC,GAAc,EACdC,EAAUC,GAEV,IAAIC,KAAEA,EAAIC,GAAEA,GAAON,EACnB,MAAMO,yBAAEA,EAAwBC,UAAEA,GAAcL,EAChD,GAAIE,GAAQC,EAAI,CACUC,EAAyBD,EAAID,GAAQ,KAE1DA,EAAMC,GAAM,CAACA,EAAID,IAKpB,OAFEE,EAAyBN,EAAMI,KAAUH,EAAc,EAAI,IAC3DK,EAAyBD,EAAIL,KAAUC,EAAc,EAAI,GAG7D,OAAKA,GAAeI,EACXE,EAAUF,EAAIL,KAElBC,IAAeG,IACXG,EAAUH,EAAMJ,EAG3B","x_google_ignoreList":[0]}
|
@@ -1,2 +0,0 @@
|
|
1
|
-
import{rangeIncludesDate as o}from"../rangeIncludesDate/index.mjs";import{defaultDateLib as r}from"../../classes/DateLib/index.mjs";function e(e,t,m=r){return o(e,t.from,!1,m)||o(e,t.to,!1,m)||o(t,e.from,!1,m)||o(t,e.to,!1,m)}export{e as rangeOverlaps};
|
2
|
-
//# sourceMappingURL=index.mjs.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../../../node_modules/react-day-picker/dist/esm/utils/rangeOverlaps.js"],"sourcesContent":["import { defaultDateLib } from \"../classes/index.js\";\nimport { rangeIncludesDate } from \"./rangeIncludesDate.js\";\n/**\n * Determines whether a given range overlaps with another range.\n *\n * @since 9.2.2\n * @group Utilities\n */\nexport function rangeOverlaps(rangeLeft, rangeRight, dateLib = defaultDateLib) {\n return (rangeIncludesDate(rangeLeft, rangeRight.from, false, dateLib) ||\n rangeIncludesDate(rangeLeft, rangeRight.to, false, dateLib) ||\n rangeIncludesDate(rangeRight, rangeLeft.from, false, dateLib) ||\n rangeIncludesDate(rangeRight, rangeLeft.to, false, dateLib));\n}\n//# sourceMappingURL=rangeOverlaps.js.map"],"names":["rangeOverlaps","rangeLeft","rangeRight","dateLib","defaultDateLib","rangeIncludesDate","from","to"],"mappings":"oIAUM,SAAUA,EACdC,EACAC,EACAC,EAAUC,GAEV,OACEC,EAAkBJ,EAAWC,EAAWI,MAAM,EAAOH,IACrDE,EAAkBJ,EAAWC,EAAWK,IAAI,EAAOJ,IACnDE,EAAkBH,EAAYD,EAAUK,MAAM,EAAOH,IACrDE,EAAkBH,EAAYD,EAAUM,IAAI,EAAOJ,EAEvD","x_google_ignoreList":[0]}
|
@@ -1,2 +0,0 @@
|
|
1
|
-
function e(e){return Boolean(e&&"object"==typeof e&&"before"in e&&"after"in e)}function o(e){return Boolean(e&&"object"==typeof e&&"from"in e)}function n(e){return Boolean(e&&"object"==typeof e&&"after"in e)}function t(e){return Boolean(e&&"object"==typeof e&&"before"in e)}function r(e){return Boolean(e&&"object"==typeof e&&"dayOfWeek"in e)}function f(e,o){return Array.isArray(e)&&e.every(o.isDate)}export{n as isDateAfterType,t as isDateBeforeType,e as isDateInterval,o as isDateRange,f as isDatesArray,r as isDayOfWeekType};
|
2
|
-
//# sourceMappingURL=index.mjs.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../../../node_modules/react-day-picker/dist/esm/utils/typeguards.js"],"sourcesContent":["/**\n * Returns true if `matcher` is of type {@link DateInterval}.\n *\n * @group Utilities\n */\nexport function isDateInterval(matcher) {\n return Boolean(matcher &&\n typeof matcher === \"object\" &&\n \"before\" in matcher &&\n \"after\" in matcher);\n}\n/**\n * Returns true if `value` is a {@link DateRange} type.\n *\n * @group Utilities\n */\nexport function isDateRange(value) {\n return Boolean(value && typeof value === \"object\" && \"from\" in value);\n}\n/**\n * Returns true if `value` is of type {@link DateAfter}.\n *\n * @group Utilities\n */\nexport function isDateAfterType(value) {\n return Boolean(value && typeof value === \"object\" && \"after\" in value);\n}\n/**\n * Returns true if `value` is of type {@link DateBefore}.\n *\n * @group Utilities\n */\nexport function isDateBeforeType(value) {\n return Boolean(value && typeof value === \"object\" && \"before\" in value);\n}\n/**\n * Returns true if `value` is a {@link DayOfWeek} type.\n *\n * @group Utilities\n */\nexport function isDayOfWeekType(value) {\n return Boolean(value && typeof value === \"object\" && \"dayOfWeek\" in value);\n}\n/**\n * Returns true if `value` is an array of valid dates.\n *\n * @private\n */\nexport function isDatesArray(value, dateLib) {\n return Array.isArray(value) && value.every(dateLib.isDate);\n}\n//# sourceMappingURL=typeguards.js.map"],"names":["isDateInterval","matcher","Boolean","isDateRange","value","isDateAfterType","isDateBeforeType","isDayOfWeekType","isDatesArray","dateLib","Array","isArray","every","isDate"],"mappings":"AAcM,SAAUA,EAAeC,GAC7B,OAAOC,QACLD,GACqB,iBAAZA,GACP,WAAYA,GACZ,UAAWA,EAEjB,CAOM,SAAUE,EAAYC,GAC1B,OAAOF,QAAQE,GAA0B,iBAAVA,GAAsB,SAAUA,EACjE,CAOM,SAAUC,EAAgBD,GAC9B,OAAOF,QAAQE,GAA0B,iBAAVA,GAAsB,UAAWA,EAClE,CAOM,SAAUE,EAAiBF,GAC/B,OAAOF,QAAQE,GAA0B,iBAAVA,GAAsB,WAAYA,EACnE,CAOM,SAAUG,EAAgBH,GAC9B,OAAOF,QAAQE,GAA0B,iBAAVA,GAAsB,cAAeA,EACtE,CAOM,SAAUI,EACdJ,EACAK,GAEA,OAAOC,MAAMC,QAAQP,IAAUA,EAAMQ,MAAMH,EAAQI,OACrD","x_google_ignoreList":[0]}
|
@@ -1,2 +0,0 @@
|
|
1
|
-
import e,{forwardRef as n,useImperativeHandle as r,Fragment as t,useMemo as o,useRef as i,useReducer as c,useEffect as u,useCallback as a}from"react";import l from"../../../../../_virtual/index/index.mjs";import{fromEvent as s}from"../../../../file-selector/dist/es2015/file-selector/index.mjs";import{acceptPropAsAcceptAttr as f,pickerOptionsFromAccept as p,canUseFileSystemAccessAPI as g,onDocumentDragOver as d,isEvtWithFiles as v,isPropagationStopped as D,allFilesAccepted as y,fileAccepted as m,fileMatchSize as b,TOO_MANY_FILES_REJECTION as h,isAbort as F,isSecurityError as O,isIeOrEdge as j,composeEventHandlers as w}from"../utils/index/index.mjs";var A=["children"],E=["open"],x=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],S=["refKey","onChange","onClick"];function P(e){return function(e){if(Array.isArray(e))return R(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||C(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var t,o,i=[],c=!0,u=!1;try{for(r=r.call(e);!(c=(t=r.next()).done)&&(i.push(t.value),!n||i.length!==n);c=!0);}catch(e){u=!0,o=e}finally{try{c||null==r.return||r.return()}finally{if(u)throw o}}return i}(e,n)||C(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function C(e,n){if(e){if("string"==typeof e)return R(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?R(e,n):void 0}}function R(e,n){(null==n||n>e.length)&&(n=e.length);for(var r=0,t=new Array(n);r<n;r++)t[r]=e[r];return t}function I(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function L(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?I(Object(r),!0).forEach((function(n){z(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):I(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}function z(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function K(e,n){if(null==e)return{};var r,t,o=function(e,n){if(null==e)return{};var r,t,o={},i=Object.keys(e);for(t=0;t<i.length;t++)r=i[t],n.indexOf(r)>=0||(o[r]=e[r]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t<i.length;t++)r=i[t],n.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var T=n((function(n,o){var i=n.children,c=N(K(n,A)),u=c.open,a=K(c,E);return r(o,(function(){return{open:u}}),[u]),e.createElement(t,null,i(L(L({},a),{},{open:u})))}));T.displayName="Dropzone";var B={disabled:!1,getFilesFromEvent:s,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};T.defaultProps=B,T.propTypes={children:l.func,accept:l.objectOf(l.arrayOf(l.string)),multiple:l.bool,preventDropOnDocument:l.bool,noClick:l.bool,noKeyboard:l.bool,noDrag:l.bool,noDragEventsBubbling:l.bool,minSize:l.number,maxSize:l.number,maxFiles:l.number,disabled:l.bool,getFilesFromEvent:l.func,onFileDialogCancel:l.func,onFileDialogOpen:l.func,useFsAccessApi:l.bool,autoFocus:l.bool,onDragEnter:l.func,onDragLeave:l.func,onDragOver:l.func,onDrop:l.func,onDropAccepted:l.func,onDropRejected:l.func,onError:l.func,validator:l.func};var _={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function N(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=L(L({},B),e),r=n.accept,t=n.disabled,l=n.getFilesFromEvent,s=n.maxSize,A=n.minSize,E=n.multiple,C=n.maxFiles,R=n.onDragEnter,I=n.onDragLeave,T=n.onDragOver,N=n.onDrop,M=n.onDropAccepted,W=n.onDropRejected,$=n.onFileDialogCancel,G=n.onFileDialogOpen,H=n.useFsAccessApi,J=n.autoFocus,Q=n.preventDropOnDocument,V=n.noClick,X=n.noKeyboard,Y=n.noDrag,Z=n.noDragEventsBubbling,ee=n.onError,ne=n.validator,re=o((function(){return f(r)}),[r]),te=o((function(){return p(r)}),[r]),oe=o((function(){return"function"==typeof G?G:q}),[G]),ie=o((function(){return"function"==typeof $?$:q}),[$]),ce=i(null),ue=i(null),ae=k(c(U,_),2),le=ae[0],se=ae[1],fe=le.isFocused,pe=le.isFileDialogActive,ge=i("undefined"!=typeof window&&window.isSecureContext&&H&&g()),de=function(){!ge.current&&pe&&setTimeout((function(){ue.current&&(ue.current.files.length||(se({type:"closeDialog"}),ie()))}),300)};u((function(){return window.addEventListener("focus",de,!1),function(){window.removeEventListener("focus",de,!1)}}),[ue,pe,ie,ge]);var ve=i([]),De=function(e){ce.current&&ce.current.contains(e.target)||(e.preventDefault(),ve.current=[])};u((function(){return Q&&(document.addEventListener("dragover",d,!1),document.addEventListener("drop",De,!1)),function(){Q&&(document.removeEventListener("dragover",d),document.removeEventListener("drop",De))}}),[ce,Q]),u((function(){return!t&&J&&ce.current&&ce.current.focus(),function(){}}),[ce,J,t]);var ye=a((function(e){ee?ee(e):console.error(e)}),[ee]),me=a((function(e){e.preventDefault(),e.persist(),Ce(e),ve.current=[].concat(P(ve.current),[e.target]),v(e)&&Promise.resolve(l(e)).then((function(n){if(!D(e)||Z){var r=n.length,t=r>0&&y({files:n,accept:re,minSize:A,maxSize:s,multiple:E,maxFiles:C,validator:ne});se({isDragAccept:t,isDragReject:r>0&&!t,isDragActive:!0,type:"setDraggedFiles"}),R&&R(e)}})).catch((function(e){return ye(e)}))}),[l,R,ye,Z,re,A,s,E,C,ne]),be=a((function(e){e.preventDefault(),e.persist(),Ce(e);var n=v(e);if(n&&e.dataTransfer)try{e.dataTransfer.dropEffect="copy"}catch(e){}return n&&T&&T(e),!1}),[T,Z]),he=a((function(e){e.preventDefault(),e.persist(),Ce(e);var n=ve.current.filter((function(e){return ce.current&&ce.current.contains(e)})),r=n.indexOf(e.target);-1!==r&&n.splice(r,1),ve.current=n,n.length>0||(se({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),v(e)&&I&&I(e))}),[ce,I,Z]),Fe=a((function(e,n){var r=[],t=[];e.forEach((function(e){var n=k(m(e,re),2),o=n[0],i=n[1],c=k(b(e,A,s),2),u=c[0],a=c[1],l=ne?ne(e):null;if(o&&u&&!l)r.push(e);else{var f=[i,a];l&&(f=f.concat(l)),t.push({file:e,errors:f.filter((function(e){return e}))})}})),(!E&&r.length>1||E&&C>=1&&r.length>C)&&(r.forEach((function(e){t.push({file:e,errors:[h]})})),r.splice(0)),se({acceptedFiles:r,fileRejections:t,isDragReject:t.length>0,type:"setFiles"}),N&&N(r,t,n),t.length>0&&W&&W(t,n),r.length>0&&M&&M(r,n)}),[se,E,re,A,s,C,N,M,W,ne]),Oe=a((function(e){e.preventDefault(),e.persist(),Ce(e),ve.current=[],v(e)&&Promise.resolve(l(e)).then((function(n){D(e)&&!Z||Fe(n,e)})).catch((function(e){return ye(e)})),se({type:"reset"})}),[l,Fe,ye,Z]),je=a((function(){if(ge.current){se({type:"openDialog"}),oe();var e={multiple:E,types:te};window.showOpenFilePicker(e).then((function(e){return l(e)})).then((function(e){Fe(e,null),se({type:"closeDialog"})})).catch((function(e){F(e)?(ie(e),se({type:"closeDialog"})):O(e)?(ge.current=!1,ue.current?(ue.current.value=null,ue.current.click()):ye(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):ye(e)}))}else ue.current&&(se({type:"openDialog"}),oe(),ue.current.value=null,ue.current.click())}),[se,oe,ie,H,Fe,ye,te,E]),we=a((function(e){ce.current&&ce.current.isEqualNode(e.target)&&(" "!==e.key&&"Enter"!==e.key&&32!==e.keyCode&&13!==e.keyCode||(e.preventDefault(),je()))}),[ce,je]),Ae=a((function(){se({type:"focus"})}),[]),Ee=a((function(){se({type:"blur"})}),[]),xe=a((function(){V||(j()?setTimeout(je,0):je())}),[V,je]),Se=function(e){return t?null:e},Pe=function(e){return X?null:Se(e)},ke=function(e){return Y?null:Se(e)},Ce=function(e){Z&&e.stopPropagation()},Re=o((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.refKey,r=void 0===n?"ref":n,o=e.role,i=e.onKeyDown,c=e.onFocus,u=e.onBlur,a=e.onClick,l=e.onDragEnter,s=e.onDragOver,f=e.onDragLeave,p=e.onDrop,g=K(e,x);return L(L(z({onKeyDown:Pe(w(i,we)),onFocus:Pe(w(c,Ae)),onBlur:Pe(w(u,Ee)),onClick:Se(w(a,xe)),onDragEnter:ke(w(l,me)),onDragOver:ke(w(s,be)),onDragLeave:ke(w(f,he)),onDrop:ke(w(p,Oe)),role:"string"==typeof o&&""!==o?o:"presentation"},r,ce),t||X?{}:{tabIndex:0}),g)}}),[ce,we,Ae,Ee,xe,me,be,he,Oe,X,Y,t]),Ie=a((function(e){e.stopPropagation()}),[]),Le=o((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.refKey,r=void 0===n?"ref":n,t=e.onChange,o=e.onClick,i=K(e,S);return L(L({},z({accept:re,multiple:E,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:Se(w(t,Oe)),onClick:Se(w(o,Ie)),tabIndex:-1},r,ue)),i)}}),[ue,r,E,Oe,t]);return L(L({},le),{},{isFocused:fe&&!t,getRootProps:Re,getInputProps:Le,rootRef:ce,inputRef:ue,open:Se(je)})}function U(e,n){switch(n.type){case"focus":return L(L({},e),{},{isFocused:!0});case"blur":return L(L({},e),{},{isFocused:!1});case"openDialog":return L(L({},_),{},{isFileDialogActive:!0});case"closeDialog":return L(L({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return L(L({},e),{},{isDragActive:n.isDragActive,isDragAccept:n.isDragAccept,isDragReject:n.isDragReject});case"setFiles":return L(L({},e),{},{acceptedFiles:n.acceptedFiles,fileRejections:n.fileRejections,isDragReject:n.isDragReject});case"reset":return L({},_);default:return e}}function q(){}export{T as default,N as useDropzone};
|
2
|
-
//# sourceMappingURL=index.mjs.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../../node_modules/react-dropzone/dist/es/index.js"],"sourcesContent":["var _excluded = [\"children\"],\n _excluded2 = [\"open\"],\n _excluded3 = [\"refKey\", \"role\", \"onKeyDown\", \"onFocus\", \"onBlur\", \"onClick\", \"onDragEnter\", \"onDragOver\", \"onDragLeave\", \"onDrop\"],\n _excluded4 = [\"refKey\", \"onChange\", \"onClick\"];\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/* eslint prefer-template: 0 */\nimport React, { forwardRef, Fragment, useCallback, useEffect, useImperativeHandle, useMemo, useReducer, useRef } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { fromEvent } from \"file-selector\";\nimport { acceptPropAsAcceptAttr, allFilesAccepted, composeEventHandlers, fileAccepted, fileMatchSize, canUseFileSystemAccessAPI, isAbort, isEvtWithFiles, isIeOrEdge, isPropagationStopped, isSecurityError, onDocumentDragOver, pickerOptionsFromAccept, TOO_MANY_FILES_REJECTION } from \"./utils/index.js\";\n/**\n * Convenience wrapper component for the `useDropzone` hook\n *\n * ```jsx\n * <Dropzone>\n * {({getRootProps, getInputProps}) => (\n * <div {...getRootProps()}>\n * <input {...getInputProps()} />\n * <p>Drag 'n' drop some files here, or click to select files</p>\n * </div>\n * )}\n * </Dropzone>\n * ```\n */\n\nvar Dropzone = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var children = _ref.children,\n params = _objectWithoutProperties(_ref, _excluded);\n\n var _useDropzone = useDropzone(params),\n open = _useDropzone.open,\n props = _objectWithoutProperties(_useDropzone, _excluded2);\n\n useImperativeHandle(ref, function () {\n return {\n open: open\n };\n }, [open]); // TODO: Figure out why react-styleguidist cannot create docs if we don't return a jsx element\n\n return /*#__PURE__*/React.createElement(Fragment, null, children(_objectSpread(_objectSpread({}, props), {}, {\n open: open\n })));\n});\nDropzone.displayName = \"Dropzone\"; // Add default props for react-docgen\n\nvar defaultProps = {\n disabled: false,\n getFilesFromEvent: fromEvent,\n maxSize: Infinity,\n minSize: 0,\n multiple: true,\n maxFiles: 0,\n preventDropOnDocument: true,\n noClick: false,\n noKeyboard: false,\n noDrag: false,\n noDragEventsBubbling: false,\n validator: null,\n useFsAccessApi: false,\n autoFocus: false\n};\nDropzone.defaultProps = defaultProps;\nDropzone.propTypes = {\n /**\n * Render function that exposes the dropzone state and prop getter fns\n *\n * @param {object} params\n * @param {Function} params.getRootProps Returns the props you should apply to the root drop container you render\n * @param {Function} params.getInputProps Returns the props you should apply to hidden file input you render\n * @param {Function} params.open Open the native file selection dialog\n * @param {boolean} params.isFocused Dropzone area is in focus\n * @param {boolean} params.isFileDialogActive File dialog is opened\n * @param {boolean} params.isDragActive Active drag is in progress\n * @param {boolean} params.isDragAccept Dragged files are accepted\n * @param {boolean} params.isDragReject Some dragged files are rejected\n * @param {File[]} params.acceptedFiles Accepted files\n * @param {FileRejection[]} params.fileRejections Rejected files and why they were rejected\n */\n children: PropTypes.func,\n\n /**\n * Set accepted file types.\n * Checkout https://developer.mozilla.org/en-US/docs/Web/API/window/showOpenFilePicker types option for more information.\n * Keep in mind that mime type determination is not reliable across platforms. CSV files,\n * for example, are reported as text/plain under macOS but as application/vnd.ms-excel under\n * Windows. In some cases there might not be a mime type set at all (https://github.com/react-dropzone/react-dropzone/issues/276).\n */\n accept: PropTypes.objectOf(PropTypes.arrayOf(PropTypes.string)),\n\n /**\n * Allow drag 'n' drop (or selection from the file dialog) of multiple files\n */\n multiple: PropTypes.bool,\n\n /**\n * If false, allow dropped items to take over the current browser window\n */\n preventDropOnDocument: PropTypes.bool,\n\n /**\n * If true, disables click to open the native file selection dialog\n */\n noClick: PropTypes.bool,\n\n /**\n * If true, disables SPACE/ENTER to open the native file selection dialog.\n * Note that it also stops tracking the focus state.\n */\n noKeyboard: PropTypes.bool,\n\n /**\n * If true, disables drag 'n' drop\n */\n noDrag: PropTypes.bool,\n\n /**\n * If true, stops drag event propagation to parents\n */\n noDragEventsBubbling: PropTypes.bool,\n\n /**\n * Minimum file size (in bytes)\n */\n minSize: PropTypes.number,\n\n /**\n * Maximum file size (in bytes)\n */\n maxSize: PropTypes.number,\n\n /**\n * Maximum accepted number of files\n * The default value is 0 which means there is no limitation to how many files are accepted.\n */\n maxFiles: PropTypes.number,\n\n /**\n * Enable/disable the dropzone\n */\n disabled: PropTypes.bool,\n\n /**\n * Use this to provide a custom file aggregator\n *\n * @param {(DragEvent|Event|Array<FileSystemFileHandle>)} event A drag event or input change event (if files were selected via the file dialog)\n */\n getFilesFromEvent: PropTypes.func,\n\n /**\n * Cb for when closing the file dialog with no selection\n */\n onFileDialogCancel: PropTypes.func,\n\n /**\n * Cb for when opening the file dialog\n */\n onFileDialogOpen: PropTypes.func,\n\n /**\n * Set to true to use the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API\n * to open the file picker instead of using an `<input type=\"file\">` click event.\n */\n useFsAccessApi: PropTypes.bool,\n\n /**\n * Set to true to focus the root element on render\n */\n autoFocus: PropTypes.bool,\n\n /**\n * Cb for when the `dragenter` event occurs.\n *\n * @param {DragEvent} event\n */\n onDragEnter: PropTypes.func,\n\n /**\n * Cb for when the `dragleave` event occurs\n *\n * @param {DragEvent} event\n */\n onDragLeave: PropTypes.func,\n\n /**\n * Cb for when the `dragover` event occurs\n *\n * @param {DragEvent} event\n */\n onDragOver: PropTypes.func,\n\n /**\n * Cb for when the `drop` event occurs.\n * Note that this callback is invoked after the `getFilesFromEvent` callback is done.\n *\n * Files are accepted or rejected based on the `accept`, `multiple`, `minSize` and `maxSize` props.\n * `accept` must be a valid [MIME type](http://www.iana.org/assignments/media-types/media-types.xhtml) according to [input element specification](https://www.w3.org/wiki/HTML/Elements/input/file) or a valid file extension.\n * If `multiple` is set to false and additional files are dropped,\n * all files besides the first will be rejected.\n * Any file which does not have a size in the [`minSize`, `maxSize`] range, will be rejected as well.\n *\n * Note that the `onDrop` callback will always be invoked regardless if the dropped files were accepted or rejected.\n * If you'd like to react to a specific scenario, use the `onDropAccepted`/`onDropRejected` props.\n *\n * `onDrop` will provide you with an array of [File](https://developer.mozilla.org/en-US/docs/Web/API/File) objects which you can then process and send to a server.\n * For example, with [SuperAgent](https://github.com/visionmedia/superagent) as a http/ajax library:\n *\n * ```js\n * function onDrop(acceptedFiles) {\n * const req = request.post('/upload')\n * acceptedFiles.forEach(file => {\n * req.attach(file.name, file)\n * })\n * req.end(callback)\n * }\n * ```\n *\n * @param {File[]} acceptedFiles\n * @param {FileRejection[]} fileRejections\n * @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)\n */\n onDrop: PropTypes.func,\n\n /**\n * Cb for when the `drop` event occurs.\n * Note that if no files are accepted, this callback is not invoked.\n *\n * @param {File[]} files\n * @param {(DragEvent|Event)} event\n */\n onDropAccepted: PropTypes.func,\n\n /**\n * Cb for when the `drop` event occurs.\n * Note that if no files are rejected, this callback is not invoked.\n *\n * @param {FileRejection[]} fileRejections\n * @param {(DragEvent|Event)} event\n */\n onDropRejected: PropTypes.func,\n\n /**\n * Cb for when there's some error from any of the promises.\n *\n * @param {Error} error\n */\n onError: PropTypes.func,\n\n /**\n * Custom validation function. It must return null if there's no errors.\n * @param {File} file\n * @returns {FileError|FileError[]|null}\n */\n validator: PropTypes.func\n};\nexport default Dropzone;\n/**\n * A function that is invoked for the `dragenter`,\n * `dragover` and `dragleave` events.\n * It is not invoked if the items are not files (such as link, text, etc.).\n *\n * @callback dragCb\n * @param {DragEvent} event\n */\n\n/**\n * A function that is invoked for the `drop` or input change event.\n * It is not invoked if the items are not files (such as link, text, etc.).\n *\n * @callback dropCb\n * @param {File[]} acceptedFiles List of accepted files\n * @param {FileRejection[]} fileRejections List of rejected files and why they were rejected\n * @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)\n */\n\n/**\n * A function that is invoked for the `drop` or input change event.\n * It is not invoked if the items are files (such as link, text, etc.).\n *\n * @callback dropAcceptedCb\n * @param {File[]} files List of accepted files that meet the given criteria\n * (`accept`, `multiple`, `minSize`, `maxSize`)\n * @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)\n */\n\n/**\n * A function that is invoked for the `drop` or input change event.\n *\n * @callback dropRejectedCb\n * @param {File[]} files List of rejected files that do not meet the given criteria\n * (`accept`, `multiple`, `minSize`, `maxSize`)\n * @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)\n */\n\n/**\n * A function that is used aggregate files,\n * in a asynchronous fashion, from drag or input change events.\n *\n * @callback getFilesFromEvent\n * @param {(DragEvent|Event|Array<FileSystemFileHandle>)} event A drag event or input change event (if files were selected via the file dialog)\n * @returns {(File[]|Promise<File[]>)}\n */\n\n/**\n * An object with the current dropzone state.\n *\n * @typedef {object} DropzoneState\n * @property {boolean} isFocused Dropzone area is in focus\n * @property {boolean} isFileDialogActive File dialog is opened\n * @property {boolean} isDragActive Active drag is in progress\n * @property {boolean} isDragAccept Dragged files are accepted\n * @property {boolean} isDragReject Some dragged files are rejected\n * @property {File[]} acceptedFiles Accepted files\n * @property {FileRejection[]} fileRejections Rejected files and why they were rejected\n */\n\n/**\n * An object with the dropzone methods.\n *\n * @typedef {object} DropzoneMethods\n * @property {Function} getRootProps Returns the props you should apply to the root drop container you render\n * @property {Function} getInputProps Returns the props you should apply to hidden file input you render\n * @property {Function} open Open the native file selection dialog\n */\n\nvar initialState = {\n isFocused: false,\n isFileDialogActive: false,\n isDragActive: false,\n isDragAccept: false,\n isDragReject: false,\n acceptedFiles: [],\n fileRejections: []\n};\n/**\n * A React hook that creates a drag 'n' drop area.\n *\n * ```jsx\n * function MyDropzone(props) {\n * const {getRootProps, getInputProps} = useDropzone({\n * onDrop: acceptedFiles => {\n * // do something with the File objects, e.g. upload to some server\n * }\n * });\n * return (\n * <div {...getRootProps()}>\n * <input {...getInputProps()} />\n * <p>Drag and drop some files here, or click to select files</p>\n * </div>\n * )\n * }\n * ```\n *\n * @function useDropzone\n *\n * @param {object} props\n * @param {import(\"./utils\").AcceptProp} [props.accept] Set accepted file types.\n * Checkout https://developer.mozilla.org/en-US/docs/Web/API/window/showOpenFilePicker types option for more information.\n * Keep in mind that mime type determination is not reliable across platforms. CSV files,\n * for example, are reported as text/plain under macOS but as application/vnd.ms-excel under\n * Windows. In some cases there might not be a mime type set at all (https://github.com/react-dropzone/react-dropzone/issues/276).\n * @param {boolean} [props.multiple=true] Allow drag 'n' drop (or selection from the file dialog) of multiple files\n * @param {boolean} [props.preventDropOnDocument=true] If false, allow dropped items to take over the current browser window\n * @param {boolean} [props.noClick=false] If true, disables click to open the native file selection dialog\n * @param {boolean} [props.noKeyboard=false] If true, disables SPACE/ENTER to open the native file selection dialog.\n * Note that it also stops tracking the focus state.\n * @param {boolean} [props.noDrag=false] If true, disables drag 'n' drop\n * @param {boolean} [props.noDragEventsBubbling=false] If true, stops drag event propagation to parents\n * @param {number} [props.minSize=0] Minimum file size (in bytes)\n * @param {number} [props.maxSize=Infinity] Maximum file size (in bytes)\n * @param {boolean} [props.disabled=false] Enable/disable the dropzone\n * @param {getFilesFromEvent} [props.getFilesFromEvent] Use this to provide a custom file aggregator\n * @param {Function} [props.onFileDialogCancel] Cb for when closing the file dialog with no selection\n * @param {boolean} [props.useFsAccessApi] Set to true to use the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API\n * to open the file picker instead of using an `<input type=\"file\">` click event.\n * @param {boolean} autoFocus Set to true to auto focus the root element.\n * @param {Function} [props.onFileDialogOpen] Cb for when opening the file dialog\n * @param {dragCb} [props.onDragEnter] Cb for when the `dragenter` event occurs.\n * @param {dragCb} [props.onDragLeave] Cb for when the `dragleave` event occurs\n * @param {dragCb} [props.onDragOver] Cb for when the `dragover` event occurs\n * @param {dropCb} [props.onDrop] Cb for when the `drop` event occurs.\n * Note that this callback is invoked after the `getFilesFromEvent` callback is done.\n *\n * Files are accepted or rejected based on the `accept`, `multiple`, `minSize` and `maxSize` props.\n * `accept` must be an object with keys as a valid [MIME type](http://www.iana.org/assignments/media-types/media-types.xhtml) according to [input element specification](https://www.w3.org/wiki/HTML/Elements/input/file) and the value an array of file extensions (optional).\n * If `multiple` is set to false and additional files are dropped,\n * all files besides the first will be rejected.\n * Any file which does not have a size in the [`minSize`, `maxSize`] range, will be rejected as well.\n *\n * Note that the `onDrop` callback will always be invoked regardless if the dropped files were accepted or rejected.\n * If you'd like to react to a specific scenario, use the `onDropAccepted`/`onDropRejected` props.\n *\n * `onDrop` will provide you with an array of [File](https://developer.mozilla.org/en-US/docs/Web/API/File) objects which you can then process and send to a server.\n * For example, with [SuperAgent](https://github.com/visionmedia/superagent) as a http/ajax library:\n *\n * ```js\n * function onDrop(acceptedFiles) {\n * const req = request.post('/upload')\n * acceptedFiles.forEach(file => {\n * req.attach(file.name, file)\n * })\n * req.end(callback)\n * }\n * ```\n * @param {dropAcceptedCb} [props.onDropAccepted]\n * @param {dropRejectedCb} [props.onDropRejected]\n * @param {(error: Error) => void} [props.onError]\n *\n * @returns {DropzoneState & DropzoneMethods}\n */\n\nexport function useDropzone() {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n var _defaultProps$props = _objectSpread(_objectSpread({}, defaultProps), props),\n accept = _defaultProps$props.accept,\n disabled = _defaultProps$props.disabled,\n getFilesFromEvent = _defaultProps$props.getFilesFromEvent,\n maxSize = _defaultProps$props.maxSize,\n minSize = _defaultProps$props.minSize,\n multiple = _defaultProps$props.multiple,\n maxFiles = _defaultProps$props.maxFiles,\n onDragEnter = _defaultProps$props.onDragEnter,\n onDragLeave = _defaultProps$props.onDragLeave,\n onDragOver = _defaultProps$props.onDragOver,\n onDrop = _defaultProps$props.onDrop,\n onDropAccepted = _defaultProps$props.onDropAccepted,\n onDropRejected = _defaultProps$props.onDropRejected,\n onFileDialogCancel = _defaultProps$props.onFileDialogCancel,\n onFileDialogOpen = _defaultProps$props.onFileDialogOpen,\n useFsAccessApi = _defaultProps$props.useFsAccessApi,\n autoFocus = _defaultProps$props.autoFocus,\n preventDropOnDocument = _defaultProps$props.preventDropOnDocument,\n noClick = _defaultProps$props.noClick,\n noKeyboard = _defaultProps$props.noKeyboard,\n noDrag = _defaultProps$props.noDrag,\n noDragEventsBubbling = _defaultProps$props.noDragEventsBubbling,\n onError = _defaultProps$props.onError,\n validator = _defaultProps$props.validator;\n\n var acceptAttr = useMemo(function () {\n return acceptPropAsAcceptAttr(accept);\n }, [accept]);\n var pickerTypes = useMemo(function () {\n return pickerOptionsFromAccept(accept);\n }, [accept]);\n var onFileDialogOpenCb = useMemo(function () {\n return typeof onFileDialogOpen === \"function\" ? onFileDialogOpen : noop;\n }, [onFileDialogOpen]);\n var onFileDialogCancelCb = useMemo(function () {\n return typeof onFileDialogCancel === \"function\" ? onFileDialogCancel : noop;\n }, [onFileDialogCancel]);\n /**\n * @constant\n * @type {React.MutableRefObject<HTMLElement>}\n */\n\n var rootRef = useRef(null);\n var inputRef = useRef(null);\n\n var _useReducer = useReducer(reducer, initialState),\n _useReducer2 = _slicedToArray(_useReducer, 2),\n state = _useReducer2[0],\n dispatch = _useReducer2[1];\n\n var isFocused = state.isFocused,\n isFileDialogActive = state.isFileDialogActive;\n var fsAccessApiWorksRef = useRef(typeof window !== \"undefined\" && window.isSecureContext && useFsAccessApi && canUseFileSystemAccessAPI()); // Update file dialog active state when the window is focused on\n\n var onWindowFocus = function onWindowFocus() {\n // Execute the timeout only if the file dialog is opened in the browser\n if (!fsAccessApiWorksRef.current && isFileDialogActive) {\n setTimeout(function () {\n if (inputRef.current) {\n var files = inputRef.current.files;\n\n if (!files.length) {\n dispatch({\n type: \"closeDialog\"\n });\n onFileDialogCancelCb();\n }\n }\n }, 300);\n }\n };\n\n useEffect(function () {\n window.addEventListener(\"focus\", onWindowFocus, false);\n return function () {\n window.removeEventListener(\"focus\", onWindowFocus, false);\n };\n }, [inputRef, isFileDialogActive, onFileDialogCancelCb, fsAccessApiWorksRef]);\n var dragTargetsRef = useRef([]);\n\n var onDocumentDrop = function onDocumentDrop(event) {\n if (rootRef.current && rootRef.current.contains(event.target)) {\n // If we intercepted an event for our instance, let it propagate down to the instance's onDrop handler\n return;\n }\n\n event.preventDefault();\n dragTargetsRef.current = [];\n };\n\n useEffect(function () {\n if (preventDropOnDocument) {\n document.addEventListener(\"dragover\", onDocumentDragOver, false);\n document.addEventListener(\"drop\", onDocumentDrop, false);\n }\n\n return function () {\n if (preventDropOnDocument) {\n document.removeEventListener(\"dragover\", onDocumentDragOver);\n document.removeEventListener(\"drop\", onDocumentDrop);\n }\n };\n }, [rootRef, preventDropOnDocument]); // Auto focus the root when autoFocus is true\n\n useEffect(function () {\n if (!disabled && autoFocus && rootRef.current) {\n rootRef.current.focus();\n }\n\n return function () {};\n }, [rootRef, autoFocus, disabled]);\n var onErrCb = useCallback(function (e) {\n if (onError) {\n onError(e);\n } else {\n // Let the user know something's gone wrong if they haven't provided the onError cb.\n console.error(e);\n }\n }, [onError]);\n var onDragEnterCb = useCallback(function (event) {\n event.preventDefault(); // Persist here because we need the event later after getFilesFromEvent() is done\n\n event.persist();\n stopPropagation(event);\n dragTargetsRef.current = [].concat(_toConsumableArray(dragTargetsRef.current), [event.target]);\n\n if (isEvtWithFiles(event)) {\n Promise.resolve(getFilesFromEvent(event)).then(function (files) {\n if (isPropagationStopped(event) && !noDragEventsBubbling) {\n return;\n }\n\n var fileCount = files.length;\n var isDragAccept = fileCount > 0 && allFilesAccepted({\n files: files,\n accept: acceptAttr,\n minSize: minSize,\n maxSize: maxSize,\n multiple: multiple,\n maxFiles: maxFiles,\n validator: validator\n });\n var isDragReject = fileCount > 0 && !isDragAccept;\n dispatch({\n isDragAccept: isDragAccept,\n isDragReject: isDragReject,\n isDragActive: true,\n type: \"setDraggedFiles\"\n });\n\n if (onDragEnter) {\n onDragEnter(event);\n }\n }).catch(function (e) {\n return onErrCb(e);\n });\n }\n }, [getFilesFromEvent, onDragEnter, onErrCb, noDragEventsBubbling, acceptAttr, minSize, maxSize, multiple, maxFiles, validator]);\n var onDragOverCb = useCallback(function (event) {\n event.preventDefault();\n event.persist();\n stopPropagation(event);\n var hasFiles = isEvtWithFiles(event);\n\n if (hasFiles && event.dataTransfer) {\n try {\n event.dataTransfer.dropEffect = \"copy\";\n } catch (_unused) {}\n /* eslint-disable-line no-empty */\n\n }\n\n if (hasFiles && onDragOver) {\n onDragOver(event);\n }\n\n return false;\n }, [onDragOver, noDragEventsBubbling]);\n var onDragLeaveCb = useCallback(function (event) {\n event.preventDefault();\n event.persist();\n stopPropagation(event); // Only deactivate once the dropzone and all children have been left\n\n var targets = dragTargetsRef.current.filter(function (target) {\n return rootRef.current && rootRef.current.contains(target);\n }); // Make sure to remove a target present multiple times only once\n // (Firefox may fire dragenter/dragleave multiple times on the same element)\n\n var targetIdx = targets.indexOf(event.target);\n\n if (targetIdx !== -1) {\n targets.splice(targetIdx, 1);\n }\n\n dragTargetsRef.current = targets;\n\n if (targets.length > 0) {\n return;\n }\n\n dispatch({\n type: \"setDraggedFiles\",\n isDragActive: false,\n isDragAccept: false,\n isDragReject: false\n });\n\n if (isEvtWithFiles(event) && onDragLeave) {\n onDragLeave(event);\n }\n }, [rootRef, onDragLeave, noDragEventsBubbling]);\n var setFiles = useCallback(function (files, event) {\n var acceptedFiles = [];\n var fileRejections = [];\n files.forEach(function (file) {\n var _fileAccepted = fileAccepted(file, acceptAttr),\n _fileAccepted2 = _slicedToArray(_fileAccepted, 2),\n accepted = _fileAccepted2[0],\n acceptError = _fileAccepted2[1];\n\n var _fileMatchSize = fileMatchSize(file, minSize, maxSize),\n _fileMatchSize2 = _slicedToArray(_fileMatchSize, 2),\n sizeMatch = _fileMatchSize2[0],\n sizeError = _fileMatchSize2[1];\n\n var customErrors = validator ? validator(file) : null;\n\n if (accepted && sizeMatch && !customErrors) {\n acceptedFiles.push(file);\n } else {\n var errors = [acceptError, sizeError];\n\n if (customErrors) {\n errors = errors.concat(customErrors);\n }\n\n fileRejections.push({\n file: file,\n errors: errors.filter(function (e) {\n return e;\n })\n });\n }\n });\n\n if (!multiple && acceptedFiles.length > 1 || multiple && maxFiles >= 1 && acceptedFiles.length > maxFiles) {\n // Reject everything and empty accepted files\n acceptedFiles.forEach(function (file) {\n fileRejections.push({\n file: file,\n errors: [TOO_MANY_FILES_REJECTION]\n });\n });\n acceptedFiles.splice(0);\n }\n\n dispatch({\n acceptedFiles: acceptedFiles,\n fileRejections: fileRejections,\n isDragReject: fileRejections.length > 0,\n type: \"setFiles\"\n });\n\n if (onDrop) {\n onDrop(acceptedFiles, fileRejections, event);\n }\n\n if (fileRejections.length > 0 && onDropRejected) {\n onDropRejected(fileRejections, event);\n }\n\n if (acceptedFiles.length > 0 && onDropAccepted) {\n onDropAccepted(acceptedFiles, event);\n }\n }, [dispatch, multiple, acceptAttr, minSize, maxSize, maxFiles, onDrop, onDropAccepted, onDropRejected, validator]);\n var onDropCb = useCallback(function (event) {\n event.preventDefault(); // Persist here because we need the event later after getFilesFromEvent() is done\n\n event.persist();\n stopPropagation(event);\n dragTargetsRef.current = [];\n\n if (isEvtWithFiles(event)) {\n Promise.resolve(getFilesFromEvent(event)).then(function (files) {\n if (isPropagationStopped(event) && !noDragEventsBubbling) {\n return;\n }\n\n setFiles(files, event);\n }).catch(function (e) {\n return onErrCb(e);\n });\n }\n\n dispatch({\n type: \"reset\"\n });\n }, [getFilesFromEvent, setFiles, onErrCb, noDragEventsBubbling]); // Fn for opening the file dialog programmatically\n\n var openFileDialog = useCallback(function () {\n // No point to use FS access APIs if context is not secure\n // https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts#feature_detection\n if (fsAccessApiWorksRef.current) {\n dispatch({\n type: \"openDialog\"\n });\n onFileDialogOpenCb(); // https://developer.mozilla.org/en-US/docs/Web/API/window/showOpenFilePicker\n\n var opts = {\n multiple: multiple,\n types: pickerTypes\n };\n window.showOpenFilePicker(opts).then(function (handles) {\n return getFilesFromEvent(handles);\n }).then(function (files) {\n setFiles(files, null);\n dispatch({\n type: \"closeDialog\"\n });\n }).catch(function (e) {\n // AbortError means the user canceled\n if (isAbort(e)) {\n onFileDialogCancelCb(e);\n dispatch({\n type: \"closeDialog\"\n });\n } else if (isSecurityError(e)) {\n fsAccessApiWorksRef.current = false; // CORS, so cannot use this API\n // Try using the input\n\n if (inputRef.current) {\n inputRef.current.value = null;\n inputRef.current.click();\n } else {\n onErrCb(new Error(\"Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided.\"));\n }\n } else {\n onErrCb(e);\n }\n });\n return;\n }\n\n if (inputRef.current) {\n dispatch({\n type: \"openDialog\"\n });\n onFileDialogOpenCb();\n inputRef.current.value = null;\n inputRef.current.click();\n }\n }, [dispatch, onFileDialogOpenCb, onFileDialogCancelCb, useFsAccessApi, setFiles, onErrCb, pickerTypes, multiple]); // Cb to open the file dialog when SPACE/ENTER occurs on the dropzone\n\n var onKeyDownCb = useCallback(function (event) {\n // Ignore keyboard events bubbling up the DOM tree\n if (!rootRef.current || !rootRef.current.isEqualNode(event.target)) {\n return;\n }\n\n if (event.key === \" \" || event.key === \"Enter\" || event.keyCode === 32 || event.keyCode === 13) {\n event.preventDefault();\n openFileDialog();\n }\n }, [rootRef, openFileDialog]); // Update focus state for the dropzone\n\n var onFocusCb = useCallback(function () {\n dispatch({\n type: \"focus\"\n });\n }, []);\n var onBlurCb = useCallback(function () {\n dispatch({\n type: \"blur\"\n });\n }, []); // Cb to open the file dialog when click occurs on the dropzone\n\n var onClickCb = useCallback(function () {\n if (noClick) {\n return;\n } // In IE11/Edge the file-browser dialog is blocking, therefore, use setTimeout()\n // to ensure React can handle state changes\n // See: https://github.com/react-dropzone/react-dropzone/issues/450\n\n\n if (isIeOrEdge()) {\n setTimeout(openFileDialog, 0);\n } else {\n openFileDialog();\n }\n }, [noClick, openFileDialog]);\n\n var composeHandler = function composeHandler(fn) {\n return disabled ? null : fn;\n };\n\n var composeKeyboardHandler = function composeKeyboardHandler(fn) {\n return noKeyboard ? null : composeHandler(fn);\n };\n\n var composeDragHandler = function composeDragHandler(fn) {\n return noDrag ? null : composeHandler(fn);\n };\n\n var stopPropagation = function stopPropagation(event) {\n if (noDragEventsBubbling) {\n event.stopPropagation();\n }\n };\n\n var getRootProps = useMemo(function () {\n return function () {\n var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref2$refKey = _ref2.refKey,\n refKey = _ref2$refKey === void 0 ? \"ref\" : _ref2$refKey,\n role = _ref2.role,\n onKeyDown = _ref2.onKeyDown,\n onFocus = _ref2.onFocus,\n onBlur = _ref2.onBlur,\n onClick = _ref2.onClick,\n onDragEnter = _ref2.onDragEnter,\n onDragOver = _ref2.onDragOver,\n onDragLeave = _ref2.onDragLeave,\n onDrop = _ref2.onDrop,\n rest = _objectWithoutProperties(_ref2, _excluded3);\n\n return _objectSpread(_objectSpread(_defineProperty({\n onKeyDown: composeKeyboardHandler(composeEventHandlers(onKeyDown, onKeyDownCb)),\n onFocus: composeKeyboardHandler(composeEventHandlers(onFocus, onFocusCb)),\n onBlur: composeKeyboardHandler(composeEventHandlers(onBlur, onBlurCb)),\n onClick: composeHandler(composeEventHandlers(onClick, onClickCb)),\n onDragEnter: composeDragHandler(composeEventHandlers(onDragEnter, onDragEnterCb)),\n onDragOver: composeDragHandler(composeEventHandlers(onDragOver, onDragOverCb)),\n onDragLeave: composeDragHandler(composeEventHandlers(onDragLeave, onDragLeaveCb)),\n onDrop: composeDragHandler(composeEventHandlers(onDrop, onDropCb)),\n role: typeof role === \"string\" && role !== \"\" ? role : \"presentation\"\n }, refKey, rootRef), !disabled && !noKeyboard ? {\n tabIndex: 0\n } : {}), rest);\n };\n }, [rootRef, onKeyDownCb, onFocusCb, onBlurCb, onClickCb, onDragEnterCb, onDragOverCb, onDragLeaveCb, onDropCb, noKeyboard, noDrag, disabled]);\n var onInputElementClick = useCallback(function (event) {\n event.stopPropagation();\n }, []);\n var getInputProps = useMemo(function () {\n return function () {\n var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref3$refKey = _ref3.refKey,\n refKey = _ref3$refKey === void 0 ? \"ref\" : _ref3$refKey,\n onChange = _ref3.onChange,\n onClick = _ref3.onClick,\n rest = _objectWithoutProperties(_ref3, _excluded4);\n\n var inputProps = _defineProperty({\n accept: acceptAttr,\n multiple: multiple,\n type: \"file\",\n style: {\n border: 0,\n clip: \"rect(0, 0, 0, 0)\",\n clipPath: \"inset(50%)\",\n height: \"1px\",\n margin: \"0 -1px -1px 0\",\n overflow: \"hidden\",\n padding: 0,\n position: \"absolute\",\n width: \"1px\",\n whiteSpace: \"nowrap\"\n },\n onChange: composeHandler(composeEventHandlers(onChange, onDropCb)),\n onClick: composeHandler(composeEventHandlers(onClick, onInputElementClick)),\n tabIndex: -1\n }, refKey, inputRef);\n\n return _objectSpread(_objectSpread({}, inputProps), rest);\n };\n }, [inputRef, accept, multiple, onDropCb, disabled]);\n return _objectSpread(_objectSpread({}, state), {}, {\n isFocused: isFocused && !disabled,\n getRootProps: getRootProps,\n getInputProps: getInputProps,\n rootRef: rootRef,\n inputRef: inputRef,\n open: composeHandler(openFileDialog)\n });\n}\n/**\n * @param {DropzoneState} state\n * @param {{type: string} & DropzoneState} action\n * @returns {DropzoneState}\n */\n\nfunction reducer(state, action) {\n /* istanbul ignore next */\n switch (action.type) {\n case \"focus\":\n return _objectSpread(_objectSpread({}, state), {}, {\n isFocused: true\n });\n\n case \"blur\":\n return _objectSpread(_objectSpread({}, state), {}, {\n isFocused: false\n });\n\n case \"openDialog\":\n return _objectSpread(_objectSpread({}, initialState), {}, {\n isFileDialogActive: true\n });\n\n case \"closeDialog\":\n return _objectSpread(_objectSpread({}, state), {}, {\n isFileDialogActive: false\n });\n\n case \"setDraggedFiles\":\n return _objectSpread(_objectSpread({}, state), {}, {\n isDragActive: action.isDragActive,\n isDragAccept: action.isDragAccept,\n isDragReject: action.isDragReject\n });\n\n case \"setFiles\":\n return _objectSpread(_objectSpread({}, state), {}, {\n acceptedFiles: action.acceptedFiles,\n fileRejections: action.fileRejections,\n isDragReject: action.isDragReject\n });\n\n case \"reset\":\n return _objectSpread({}, initialState);\n\n default:\n return state;\n }\n}\n\nfunction noop() {}\n\nexport { ErrorCode } from \"./utils/index.js\";"],"names":["_excluded","_excluded2","_excluded3","_excluded4","_toConsumableArray","arr","Array","isArray","_arrayLikeToArray","_arrayWithoutHoles","iter","Symbol","iterator","from","_iterableToArray","_unsupportedIterableToArray","TypeError","_nonIterableSpread","_slicedToArray","i","_arrayWithHoles","_i","_s","_e","_arr","_n","_d","call","next","done","push","value","length","err","_iterableToArrayLimit","_nonIterableRest","o","minLen","n","Object","prototype","toString","slice","constructor","name","test","len","arr2","ownKeys","object","enumerableOnly","keys","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","apply","_objectSpread","target","arguments","source","forEach","key","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","obj","configurable","writable","_objectWithoutProperties","excluded","sourceKeys","indexOf","_objectWithoutPropertiesLoose","sourceSymbolKeys","propertyIsEnumerable","Dropzone","forwardRef","_ref","ref","children","_useDropzone","useDropzone","open","props","useImperativeHandle","React","createElement","Fragment","displayName","defaultProps","disabled","getFilesFromEvent","fromEvent","maxSize","Infinity","minSize","multiple","maxFiles","preventDropOnDocument","noClick","noKeyboard","noDrag","noDragEventsBubbling","validator","useFsAccessApi","autoFocus","propTypes","PropTypes","func","accept","objectOf","arrayOf","string","bool","number","onFileDialogCancel","onFileDialogOpen","onDragEnter","onDragLeave","onDragOver","onDrop","onDropAccepted","onDropRejected","onError","initialState","isFocused","isFileDialogActive","isDragActive","isDragAccept","isDragReject","acceptedFiles","fileRejections","undefined","_defaultProps$props","acceptAttr","useMemo","acceptPropAsAcceptAttr","pickerTypes","pickerOptionsFromAccept","onFileDialogOpenCb","noop","onFileDialogCancelCb","rootRef","useRef","inputRef","_useReducer2","useReducer","reducer","state","dispatch","fsAccessApiWorksRef","window","isSecureContext","canUseFileSystemAccessAPI","onWindowFocus","current","setTimeout","files","type","useEffect","addEventListener","removeEventListener","dragTargetsRef","onDocumentDrop","event","contains","preventDefault","document","onDocumentDragOver","focus","onErrCb","useCallback","e","console","error","onDragEnterCb","persist","stopPropagation","concat","isEvtWithFiles","Promise","resolve","then","isPropagationStopped","fileCount","allFilesAccepted","catch","onDragOverCb","hasFiles","dataTransfer","dropEffect","_unused","onDragLeaveCb","targets","targetIdx","splice","setFiles","file","_fileAccepted2","fileAccepted","accepted","acceptError","_fileMatchSize2","fileMatchSize","sizeMatch","sizeError","customErrors","errors","TOO_MANY_FILES_REJECTION","onDropCb","openFileDialog","opts","types","showOpenFilePicker","handles","isAbort","isSecurityError","click","Error","onKeyDownCb","isEqualNode","keyCode","onFocusCb","onBlurCb","onClickCb","isIeOrEdge","composeHandler","fn","composeKeyboardHandler","composeDragHandler","getRootProps","_ref2","_ref2$refKey","refKey","role","onKeyDown","onFocus","onBlur","onClick","rest","composeEventHandlers","tabIndex","onInputElementClick","getInputProps","_ref3","_ref3$refKey","onChange","style","border","clip","clipPath","height","margin","overflow","padding","position","width","whiteSpace","action"],"mappings":"gpBAAA,IAAIA,EAAY,CAAC,YACbC,EAAa,CAAC,QACdC,EAAa,CAAC,SAAU,OAAQ,YAAa,UAAW,SAAU,UAAW,cAAe,aAAc,cAAe,UACzHC,EAAa,CAAC,SAAU,WAAY,WAExC,SAASC,EAAmBC,GAAO,OAMnC,SAA4BA,GAAO,GAAIC,MAAMC,QAAQF,GAAM,OAAOG,EAAkBH,EAAM,CANhDI,CAAmBJ,IAI7D,SAA0BK,GAAQ,GAAsB,oBAAXC,QAAmD,MAAzBD,EAAKC,OAAOC,WAA2C,MAAtBF,EAAK,cAAuB,OAAOJ,MAAMO,KAAKH,EAAO,CAJxFI,CAAiBT,IAAQU,EAA4BV,IAE1H,WAAgC,MAAM,IAAIW,UAAU,uIAAyI,CAF3DC,EAAsB,CAQxJ,SAASC,EAAeb,EAAKc,GAAK,OAUlC,SAAyBd,GAAO,GAAIC,MAAMC,QAAQF,GAAM,OAAOA,CAAK,CAV3Be,CAAgBf,IAQzD,SAA+BA,EAAKc,GAAK,IAAIE,EAAY,MAAPhB,EAAc,KAAyB,oBAAXM,QAA0B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AeA,GACfrG,QAASA,GACTE,SAAUA,GACV9D,KAAMgJ,GAAehB,KAEzB,CAOA,SAAS/D,EAAQC,EAAO8G,GAEtB,OAAQA,EAAOpG,MACb,IAAK,QACH,OAAOvG,EAAcA,EAAc,CAAI6F,EAAAA,GAAQ,CAAA,EAAI,CACjDvB,WAAW,IAGf,IAAK,OACH,OAAOtE,EAAcA,EAAc,CAAI6F,EAAAA,GAAQ,CAAA,EAAI,CACjDvB,WAAW,IAGf,IAAK,aACH,OAAOtE,EAAcA,EAAc,CAAIqE,EAAAA,GAAe,CAAA,EAAI,CACxDE,oBAAoB,IAGxB,IAAK,cACH,OAAOvE,EAAcA,EAAc,CAAI6F,EAAAA,GAAQ,CAAA,EAAI,CACjDtB,oBAAoB,IAGxB,IAAK,kBACH,OAAOvE,EAAcA,EAAc,CAAI6F,EAAAA,GAAQ,CAAA,EAAI,CACjDrB,aAAcmI,EAAOnI,aACrBC,aAAckI,EAAOlI,aACrBC,aAAciI,EAAOjI,eAGzB,IAAK,WACH,OAAO1E,EAAcA,EAAc,CAAI6F,EAAAA,GAAQ,CAAA,EAAI,CACjDlB,cAAegI,EAAOhI,cACtBC,eAAgB+H,EAAO/H,eACvBF,aAAciI,EAAOjI,eAGzB,IAAK,QACH,OAAO1E,EAAc,CAAIqE,EAAAA,GAE3B,QACE,OAAOwB,EAEb,CAEA,SAASR,IAAQ","x_google_ignoreList":[0]}
|
@@ -1,2 +0,0 @@
|
|
1
|
-
import e from"../../../../../../_virtual/index/index2.mjs";function t(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||a(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function r(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){c=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(c)throw o}}return i}(e,t)||a(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var u="function"==typeof e?e:e.default,l="file-invalid-type",f="file-too-large",s="file-too-small",p="too-many-files",y=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split(","),t=e.length>1?"one of ".concat(e.join(", ")):e[0];return{code:l,message:"File type must be ".concat(t)}},d=function(e){return{code:f,message:"File is larger than ".concat(e," ").concat(1===e?"byte":"bytes")}},b=function(e){return{code:s,message:"File is smaller than ".concat(e," ").concat(1===e?"byte":"bytes")}},m={code:p,message:"Too many files"};function v(e,t){var n="application/x-moz-file"===e.type||u(e,t);return[n,n?null:y(t)]}function g(e,t,n){if(O(e.size))if(O(t)&&O(n)){if(e.size>n)return[!1,d(n)];if(e.size<t)return[!1,b(t)]}else{if(O(t)&&e.size<t)return[!1,b(t)];if(O(n)&&e.size>n)return[!1,d(n)]}return[!0,null]}function O(e){return null!=e}function h(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,a=e.multiple,c=e.maxFiles,u=e.validator;return!(!a&&t.length>1||a&&c>=1&&t.length>c)&&t.every((function(e){var t=i(v(e,n),1)[0],a=i(g(e,r,o),1)[0],c=u?u(e):null;return t&&a&&!c}))}function w(e){return"function"==typeof e.isPropagationStopped?e.isPropagationStopped():void 0!==e.cancelBubble&&e.cancelBubble}function j(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,(function(e){return"Files"===e||"application/x-moz-file"===e})):!!e.target&&!!e.target.files}function S(e){e.preventDefault()}function A(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.navigator.userAgent;return function(e){return-1!==e.indexOf("MSIE")||-1!==e.indexOf("Trident/")}(e)||function(e){return-1!==e.indexOf("Edge/")}(e)}function E(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return t.some((function(t){return!w(e)&&t&&t.apply(void 0,[e].concat(r)),w(e)}))}}function x(){return"showOpenFilePicker"in window}function P(e){return O(e)?[{description:"Files",accept:Object.entries(e).filter((function(e){var t=i(e,2),n=t[0],r=t[1],o=!0;return M(n)||(console.warn('Skipped "'.concat(n,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),o=!1),Array.isArray(r)&&r.every(D)||(console.warn('Skipped "'.concat(n,'" because an invalid file extension was provided.')),o=!1),o})).reduce((function(e,t){var n=i(t,2),a=n[0],c=n[1];return r(r({},e),{},o({},a,c))}),{})}]:e}function T(e){if(O(e))return Object.entries(e).reduce((function(e,n){var r=i(n,2),o=r[0],a=r[1];return[].concat(t(e),[o],t(a))}),[]).filter((function(e){return M(e)||D(e)})).join(",")}function z(e){return e instanceof DOMException&&("AbortError"===e.name||e.code===e.ABORT_ERR)}function I(e){return e instanceof DOMException&&("SecurityError"===e.name||e.code===e.SECURITY_ERR)}function M(e){return"audio/*"===e||"video/*"===e||"image/*"===e||"text/*"===e||"application/*"===e||/\w+\/[-+.\w]+/g.test(e)}function D(e){return/^.*\.[\w]+$/.test(e)}export{l as FILE_INVALID_TYPE,f as FILE_TOO_LARGE,s as FILE_TOO_SMALL,p as TOO_MANY_FILES,m as TOO_MANY_FILES_REJECTION,T as acceptPropAsAcceptAttr,h as allFilesAccepted,x as canUseFileSystemAccessAPI,E as composeEventHandlers,v as fileAccepted,g as fileMatchSize,y as getInvalidTypeRejectionErr,d as getTooLargeRejectionErr,b as getTooSmallRejectionErr,z as isAbort,j as isEvtWithFiles,D as isExt,A as isIeOrEdge,M as isMIMEType,w as isPropagationStopped,I as isSecurityError,S as onDocumentDragOver,P as pickerOptionsFromAccept};
|
2
|
-
//# sourceMappingURL=index.mjs.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../../../node_modules/react-dropzone/dist/es/utils/index.js"],"sourcesContent":["function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nimport _accepts from \"attr-accept\";\nvar accepts = typeof _accepts === \"function\" ? _accepts : _accepts.default; // Error codes\n\nexport var FILE_INVALID_TYPE = \"file-invalid-type\";\nexport var FILE_TOO_LARGE = \"file-too-large\";\nexport var FILE_TOO_SMALL = \"file-too-small\";\nexport var TOO_MANY_FILES = \"too-many-files\";\nexport var ErrorCode = {\n FileInvalidType: FILE_INVALID_TYPE,\n FileTooLarge: FILE_TOO_LARGE,\n FileTooSmall: FILE_TOO_SMALL,\n TooManyFiles: TOO_MANY_FILES\n};\n/**\n *\n * @param {string} accept\n */\n\nexport var getInvalidTypeRejectionErr = function getInvalidTypeRejectionErr() {\n var accept = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"\";\n var acceptArr = accept.split(\",\");\n var msg = acceptArr.length > 1 ? \"one of \".concat(acceptArr.join(\", \")) : acceptArr[0];\n return {\n code: FILE_INVALID_TYPE,\n message: \"File type must be \".concat(msg)\n };\n};\nexport var getTooLargeRejectionErr = function getTooLargeRejectionErr(maxSize) {\n return {\n code: FILE_TOO_LARGE,\n message: \"File is larger than \".concat(maxSize, \" \").concat(maxSize === 1 ? \"byte\" : \"bytes\")\n };\n};\nexport var getTooSmallRejectionErr = function getTooSmallRejectionErr(minSize) {\n return {\n code: FILE_TOO_SMALL,\n message: \"File is smaller than \".concat(minSize, \" \").concat(minSize === 1 ? \"byte\" : \"bytes\")\n };\n};\nexport var TOO_MANY_FILES_REJECTION = {\n code: TOO_MANY_FILES,\n message: \"Too many files\"\n};\n/**\n * Check if file is accepted.\n *\n * Firefox versions prior to 53 return a bogus MIME type for every file drag,\n * so dragovers with that MIME type will always be accepted.\n *\n * @param {File} file\n * @param {string} accept\n * @returns\n */\n\nexport function fileAccepted(file, accept) {\n var isAcceptable = file.type === \"application/x-moz-file\" || accepts(file, accept);\n return [isAcceptable, isAcceptable ? null : getInvalidTypeRejectionErr(accept)];\n}\nexport function fileMatchSize(file, minSize, maxSize) {\n if (isDefined(file.size)) {\n if (isDefined(minSize) && isDefined(maxSize)) {\n if (file.size > maxSize) return [false, getTooLargeRejectionErr(maxSize)];\n if (file.size < minSize) return [false, getTooSmallRejectionErr(minSize)];\n } else if (isDefined(minSize) && file.size < minSize) return [false, getTooSmallRejectionErr(minSize)];else if (isDefined(maxSize) && file.size > maxSize) return [false, getTooLargeRejectionErr(maxSize)];\n }\n\n return [true, null];\n}\n\nfunction isDefined(value) {\n return value !== undefined && value !== null;\n}\n/**\n *\n * @param {object} options\n * @param {File[]} options.files\n * @param {string} [options.accept]\n * @param {number} [options.minSize]\n * @param {number} [options.maxSize]\n * @param {boolean} [options.multiple]\n * @param {number} [options.maxFiles]\n * @param {(f: File) => FileError|FileError[]|null} [options.validator]\n * @returns\n */\n\n\nexport function allFilesAccepted(_ref) {\n var files = _ref.files,\n accept = _ref.accept,\n minSize = _ref.minSize,\n maxSize = _ref.maxSize,\n multiple = _ref.multiple,\n maxFiles = _ref.maxFiles,\n validator = _ref.validator;\n\n if (!multiple && files.length > 1 || multiple && maxFiles >= 1 && files.length > maxFiles) {\n return false;\n }\n\n return files.every(function (file) {\n var _fileAccepted = fileAccepted(file, accept),\n _fileAccepted2 = _slicedToArray(_fileAccepted, 1),\n accepted = _fileAccepted2[0];\n\n var _fileMatchSize = fileMatchSize(file, minSize, maxSize),\n _fileMatchSize2 = _slicedToArray(_fileMatchSize, 1),\n sizeMatch = _fileMatchSize2[0];\n\n var customErrors = validator ? validator(file) : null;\n return accepted && sizeMatch && !customErrors;\n });\n} // React's synthetic events has event.isPropagationStopped,\n// but to remain compatibility with other libs (Preact) fall back\n// to check event.cancelBubble\n\nexport function isPropagationStopped(event) {\n if (typeof event.isPropagationStopped === \"function\") {\n return event.isPropagationStopped();\n } else if (typeof event.cancelBubble !== \"undefined\") {\n return event.cancelBubble;\n }\n\n return false;\n}\nexport function isEvtWithFiles(event) {\n if (!event.dataTransfer) {\n return !!event.target && !!event.target.files;\n } // https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/types\n // https://developer.mozilla.org/en-US/docs/Web/API/HTML_Drag_and_Drop_API/Recommended_drag_types#file\n\n\n return Array.prototype.some.call(event.dataTransfer.types, function (type) {\n return type === \"Files\" || type === \"application/x-moz-file\";\n });\n}\nexport function isKindFile(item) {\n return _typeof(item) === \"object\" && item !== null && item.kind === \"file\";\n} // allow the entire document to be a drag target\n\nexport function onDocumentDragOver(event) {\n event.preventDefault();\n}\n\nfunction isIe(userAgent) {\n return userAgent.indexOf(\"MSIE\") !== -1 || userAgent.indexOf(\"Trident/\") !== -1;\n}\n\nfunction isEdge(userAgent) {\n return userAgent.indexOf(\"Edge/\") !== -1;\n}\n\nexport function isIeOrEdge() {\n var userAgent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window.navigator.userAgent;\n return isIe(userAgent) || isEdge(userAgent);\n}\n/**\n * This is intended to be used to compose event handlers\n * They are executed in order until one of them calls `event.isPropagationStopped()`.\n * Note that the check is done on the first invoke too,\n * meaning that if propagation was stopped before invoking the fns,\n * no handlers will be executed.\n *\n * @param {Function} fns the event hanlder functions\n * @return {Function} the event handler to add to an element\n */\n\nexport function composeEventHandlers() {\n for (var _len = arguments.length, fns = new Array(_len), _key = 0; _key < _len; _key++) {\n fns[_key] = arguments[_key];\n }\n\n return function (event) {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n return fns.some(function (fn) {\n if (!isPropagationStopped(event) && fn) {\n fn.apply(void 0, [event].concat(args));\n }\n\n return isPropagationStopped(event);\n });\n };\n}\n/**\n * canUseFileSystemAccessAPI checks if the [File System Access API](https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API)\n * is supported by the browser.\n * @returns {boolean}\n */\n\nexport function canUseFileSystemAccessAPI() {\n return \"showOpenFilePicker\" in window;\n}\n/**\n * Convert the `{accept}` dropzone prop to the\n * `{types}` option for https://developer.mozilla.org/en-US/docs/Web/API/window/showOpenFilePicker\n *\n * @param {AcceptProp} accept\n * @returns {{accept: string[]}[]}\n */\n\nexport function pickerOptionsFromAccept(accept) {\n if (isDefined(accept)) {\n var acceptForPicker = Object.entries(accept).filter(function (_ref2) {\n var _ref3 = _slicedToArray(_ref2, 2),\n mimeType = _ref3[0],\n ext = _ref3[1];\n\n var ok = true;\n\n if (!isMIMEType(mimeType)) {\n console.warn(\"Skipped \\\"\".concat(mimeType, \"\\\" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.\"));\n ok = false;\n }\n\n if (!Array.isArray(ext) || !ext.every(isExt)) {\n console.warn(\"Skipped \\\"\".concat(mimeType, \"\\\" because an invalid file extension was provided.\"));\n ok = false;\n }\n\n return ok;\n }).reduce(function (agg, _ref4) {\n var _ref5 = _slicedToArray(_ref4, 2),\n mimeType = _ref5[0],\n ext = _ref5[1];\n\n return _objectSpread(_objectSpread({}, agg), {}, _defineProperty({}, mimeType, ext));\n }, {});\n return [{\n // description is required due to https://crbug.com/1264708\n description: \"Files\",\n accept: acceptForPicker\n }];\n }\n\n return accept;\n}\n/**\n * Convert the `{accept}` dropzone prop to an array of MIME types/extensions.\n * @param {AcceptProp} accept\n * @returns {string}\n */\n\nexport function acceptPropAsAcceptAttr(accept) {\n if (isDefined(accept)) {\n return Object.entries(accept).reduce(function (a, _ref6) {\n var _ref7 = _slicedToArray(_ref6, 2),\n mimeType = _ref7[0],\n ext = _ref7[1];\n\n return [].concat(_toConsumableArray(a), [mimeType], _toConsumableArray(ext));\n }, []) // Silently discard invalid entries as pickerOptionsFromAccept warns about these\n .filter(function (v) {\n return isMIMEType(v) || isExt(v);\n }).join(\",\");\n }\n\n return undefined;\n}\n/**\n * Check if v is an exception caused by aborting a request (e.g window.showOpenFilePicker()).\n *\n * See https://developer.mozilla.org/en-US/docs/Web/API/DOMException.\n * @param {any} v\n * @returns {boolean} True if v is an abort exception.\n */\n\nexport function isAbort(v) {\n return v instanceof DOMException && (v.name === \"AbortError\" || v.code === v.ABORT_ERR);\n}\n/**\n * Check if v is a security error.\n *\n * See https://developer.mozilla.org/en-US/docs/Web/API/DOMException.\n * @param {any} v\n * @returns {boolean} True if v is a security error.\n */\n\nexport function isSecurityError(v) {\n return v instanceof DOMException && (v.name === \"SecurityError\" || v.code === v.SECURITY_ERR);\n}\n/**\n * Check if v is a MIME type string.\n *\n * See accepted format: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#unique_file_type_specifiers.\n *\n * @param {string} v\n */\n\nexport function isMIMEType(v) {\n return v === \"audio/*\" || v === \"video/*\" || v === \"image/*\" || v === \"text/*\" || v === \"application/*\" || /\\w+\\/[-+.\\w]+/g.test(v);\n}\n/**\n * Check if v is a file extension.\n * @param {string} v\n */\n\nexport function isExt(v) {\n return /^.*\\.[\\w]+$/.test(v);\n}\n/**\n * @typedef {Object.<string, string[]>} AcceptProp\n */\n\n/**\n * @typedef {object} FileError\n * @property {string} message\n * @property {ErrorCode|string} code\n */\n\n/**\n * @typedef {\"file-invalid-type\"|\"file-too-large\"|\"file-too-small\"|\"too-many-files\"} ErrorCode\n */"],"names":["_toConsumableArray","arr","Array","isArray","_arrayLikeToArray","_arrayWithoutHoles","iter","Symbol","iterator","from","_iterableToArray","_unsupportedIterableToArray","TypeError","_nonIterableSpread","ownKeys","object","enumerableOnly","keys","Object","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","key","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","obj","value","configurable","writable","_slicedToArray","_arrayWithHoles","_i","_s","_e","_arr","_n","_d","call","next","done","err","_iterableToArrayLimit","_nonIterableRest","o","minLen","n","prototype","toString","slice","constructor","name","test","len","arr2","accepts","_accepts","default","FILE_INVALID_TYPE","FILE_TOO_LARGE","FILE_TOO_SMALL","TOO_MANY_FILES","getInvalidTypeRejectionErr","acceptArr","undefined","split","msg","concat","join","code","message","getTooLargeRejectionErr","maxSize","getTooSmallRejectionErr","minSize","TOO_MANY_FILES_REJECTION","fileAccepted","file","accept","isAcceptable","type","fileMatchSize","isDefined","size","allFilesAccepted","_ref","files","multiple","maxFiles","validator","every","accepted","sizeMatch","customErrors","isPropagationStopped","event","cancelBubble","isEvtWithFiles","dataTransfer","some","types","onDocumentDragOver","preventDefault","isIeOrEdge","userAgent","window","navigator","indexOf","isIe","isEdge","composeEventHandlers","_len","fns","_key","_len2","args","_key2","fn","canUseFileSystemAccessAPI","pickerOptionsFromAccept","description","entries","_ref2","_ref3","mimeType","ext","ok","isMIMEType","console","warn","isExt","reduce","agg","_ref4","_ref5","acceptPropAsAcceptAttr","a","_ref6","_ref7","v","isAbort","DOMException","ABORT_ERR","isSecurityError","SECURITY_ERR"],"mappings":"2DAAA,SAASA,EAAmBC,GAAO,OAMnC,SAA4BA,GAAO,GAAIC,MAAMC,QAAQF,GAAM,OAAOG,EAAkBH,EAAM,CANhDI,CAAmBJ,IAI7D,SAA0BK,GAAQ,GAAsB,oBAAXC,QAAmD,MAAzBD,EAAKC,OAAOC,WAA2C,MAAtBF,EAAK,cAAuB,OAAOJ,MAAMO,KAAKH,EAAO,CAJxFI,CAAiBT,IAAQU,EAA4B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AA,IACFrH,QAAO,SAAUmI,GAChB,OAAOZ,EAAWY,IAAMT,EAAMS,EAChC,IAAGvE,KAAK,IAIZ,CASO,SAASwE,EAAQD,GACtB,OAAOA,aAAaE,eAA4B,eAAXF,EAAExF,MAAyBwF,EAAEtE,OAASsE,EAAEG,UAC/E,CASO,SAASC,EAAgBJ,GAC9B,OAAOA,aAAaE,eAA4B,kBAAXF,EAAExF,MAA4BwF,EAAEtE,OAASsE,EAAEK,aAClF,CASO,SAASjB,EAAWY,GACzB,MAAa,YAANA,GAAyB,YAANA,GAAyB,YAANA,GAAyB,WAANA,GAAwB,kBAANA,GAAyB,iBAAiBvF,KAAKuF,EACnI,CAMO,SAAST,EAAMS,GACpB,MAAO,cAAcvF,KAAKuF,EAC5B","x_google_ignoreList":[0]}
|
@@ -1,2 +0,0 @@
|
|
1
|
-
import e from"react";var t=e=>null==e;var r=e=>!t(e)&&!Array.isArray(e)&&(e=>"object"==typeof e)(e)&&!(e=>e instanceof Date)(e),a=e=>r(e)&&e.target?"checkbox"===e.target.type?e.target.checked:e.target.value:e,s="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function n(e){let t;const a=Array.isArray(e),o="undefined"!=typeof FileList&&e instanceof FileList;if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else{if(s&&(e instanceof Blob||o)||!a&&!r(e))return e;if(t=a?[]:{},a||(e=>{const t=e.constructor&&e.constructor.prototype;return r(t)&&t.hasOwnProperty("isPrototypeOf")})(e))for(const r in e)e.hasOwnProperty(r)&&(t[r]=n(e[r]));else t=e}return t}var o=e=>Array.isArray(e)?e.filter(Boolean):[],l=e=>void 0===e,i=(e,a,s)=>{if(!a||!r(e))return s;const n=o(a.split(/[,[\].]+?/)).reduce(((e,r)=>t(e)?e:e[r]),e);return l(n)||n===e?l(e[a])?s:e[a]:n},u=e=>"boolean"==typeof e,c=(e,t,a)=>{let s=-1;const n=(e=>/^\w*$/.test(e))(t)?[t]:o(t.replace(/["|']|\]/g,"").split(/\.|\[/));const l=n.length,i=l-1;for(;++s<l;){const t=n[s];let o=a;if(s!==i){const a=e[t];o=r(a)||Array.isArray(a)?a:isNaN(+n[s+1])?{}:[]}if("__proto__"===t||"constructor"===t||"prototype"===t)return;e[t]=o,e=e[t]}};const d="blur",f="change",m="all",b=e.createContext(null),y=()=>e.useContext(b),_=t=>{const{children:r,...a}=t;return e.createElement(b.Provider,{value:a},r)};function g(t){const r=y(),{control:a=r.control,disabled:s,name:n,exact:o}=t||{},[l,i]=e.useState(a._formState),u=e.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),c=e.useRef(n);return c.current=n,e.useEffect((()=>a._subscribe({name:c.current,formState:u.current,exact:o,callback:e=>{!s&&i({...a._formState,...e})}})),[a,s,o]),e.useEffect((()=>{u.current.isValid&&a._setValid(!0)}),[a]),e.useMemo((()=>((e,t,r,a=!0)=>{const s={defaultValues:t._defaultValues};for(const n in e)Object.defineProperty(s,n,{get:()=>{const s=n;return t._proxyFormState[s]!==m&&(t._proxyFormState[s]=!a||m),r&&(r[s]=!0),e[s]}});return s})(l,a,u.current,!1)),[l,a])}function p(t){const r=y(),{control:a=r.control,name:s,defaultValue:n,disabled:o,exact:l}=t||{},u=e.useRef(s),c=e.useRef(n);u.current=s,e.useEffect((()=>a._subscribe({name:u.current,formState:{values:!0},exact:l,callback:e=>!o&&f(((e,t,r,a,s)=>"string"==typeof e?i(r,e,s):Array.isArray(e)?e.map((e=>i(r,e))):r)(u.current,a._names,e.values||a._formValues,0,c.current))})),[a,o,l]);const[d,f]=e.useState(a._getWatch(s,n));return e.useEffect((()=>a._removeUnmounted())),d}function V(t){const r=y(),{name:s,disabled:o,control:m=r.control,shouldUnregister:b}=t,_=((e,t)=>e.has((e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e)(t)))(m._names.array,s),V=p({control:m,name:s,defaultValue:i(m._formValues,s,i(m._defaultValues,s,t.defaultValue)),exact:!0}),v=g({control:m,name:s,exact:!0}),h=e.useRef(t),x=e.useRef(m.register(s,{...t.rules,value:V,...u(t.disabled)?{disabled:t.disabled}:{}})),S=e.useMemo((()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!i(v.errors,s)},isDirty:{enumerable:!0,get:()=>!!i(v.dirtyFields,s)},isTouched:{enumerable:!0,get:()=>!!i(v.touchedFields,s)},isValidating:{enumerable:!0,get:()=>!!i(v.validatingFields,s)},error:{enumerable:!0,get:()=>i(v.errors,s)}})),[v,s]),F=e.useCallback((e=>x.current.onChange({target:{value:a(e),name:s},type:f})),[s]),A=e.useCallback((()=>x.current.onBlur({target:{value:i(m._formValues,s),name:s},type:d})),[s,m._formValues]),w=e.useCallback((e=>{const t=i(m._fields,s);t&&e&&(t._f.ref={focus:()=>e.focus(),select:()=>e.select(),setCustomValidity:t=>e.setCustomValidity(t),reportValidity:()=>e.reportValidity()})}),[m._fields,s]),C=e.useMemo((()=>({name:s,value:V,...u(o)||v.disabled?{disabled:v.disabled||o}:{},onChange:F,onBlur:A,ref:w})),[s,o,v.disabled,F,A,w,V]);return e.useEffect((()=>{const e=m._options.shouldUnregister||b;m.register(s,{...h.current.rules,...u(h.current.disabled)?{disabled:h.current.disabled}:{}});const t=(e,t)=>{const r=i(m._fields,e);r&&r._f&&(r._f.mount=t)};if(t(s,!0),e){const e=n(i(m._options.defaultValues,s));c(m._defaultValues,s,e),l(i(m._formValues,s))&&c(m._formValues,s,e)}return!_&&m.register(s),()=>{(_?e&&!m._state.action:e)?m.unregister(s):t(s,!1)}}),[s,m,_,b]),e.useEffect((()=>{m._setDisabledField({disabled:o,name:s})}),[o,s,m]),e.useMemo((()=>({field:C,formState:v,fieldState:S})),[C,v,S])}const v=e=>e.render(V(e));export{v as Controller,_ as FormProvider,i as get,c as set,V as useController,y as useFormContext,g as useFormState,p as useWatch};
|
2
|
-
//# sourceMappingURL=index.mjs.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../node_modules/react-hook-form/dist/index.esm.mjs"],"sourcesContent":["import React from 'react';\n\nvar isCheckBoxInput = (element) => element.type === 'checkbox';\n\nvar isDateObject = (value) => value instanceof Date;\n\nvar isNullOrUndefined = (value) => value == null;\n\nconst isObjectType = (value) => typeof value === 'object';\nvar isObject = (value) => !isNullOrUndefined(value) &&\n !Array.isArray(value) &&\n isObjectType(value) &&\n !isDateObject(value);\n\nvar getEventValue = (event) => isObject(event) && event.target\n ? isCheckBoxInput(event.target)\n ? event.target.checked\n : event.target.value\n : event;\n\nvar getNodeParentName = (name) => name.substring(0, name.search(/\\.\\d+(\\.|$)/)) || name;\n\nvar isNameInFieldArray = (names, name) => names.has(getNodeParentName(name));\n\nvar isPlainObject = (tempObject) => {\n const prototypeCopy = tempObject.constructor && tempObject.constructor.prototype;\n return (isObject(prototypeCopy) && prototypeCopy.hasOwnProperty('isPrototypeOf'));\n};\n\nvar isWeb = typeof window !== 'undefined' &&\n typeof window.HTMLElement !== 'undefined' &&\n typeof document !== 'undefined';\n\nfunction cloneObject(data) {\n let copy;\n const isArray = Array.isArray(data);\n const isFileListInstance = typeof FileList !== 'undefined' ? data instanceof FileList : false;\n if (data instanceof Date) {\n copy = new Date(data);\n }\n else if (data instanceof Set) {\n copy = new Set(data);\n }\n else if (!(isWeb && (data instanceof Blob || isFileListInstance)) &&\n (isArray || isObject(data))) {\n copy = isArray ? [] : {};\n if (!isArray && !isPlainObject(data)) {\n copy = data;\n }\n else {\n for (const key in data) {\n if (data.hasOwnProperty(key)) {\n copy[key] = cloneObject(data[key]);\n }\n }\n }\n }\n else {\n return data;\n }\n return copy;\n}\n\nvar compact = (value) => Array.isArray(value) ? value.filter(Boolean) : [];\n\nvar isUndefined = (val) => val === undefined;\n\nvar get = (object, path, defaultValue) => {\n if (!path || !isObject(object)) {\n return defaultValue;\n }\n const result = compact(path.split(/[,[\\].]+?/)).reduce((result, key) => isNullOrUndefined(result) ? result : result[key], object);\n return isUndefined(result) || result === object\n ? isUndefined(object[path])\n ? defaultValue\n : object[path]\n : result;\n};\n\nvar isBoolean = (value) => typeof value === 'boolean';\n\nvar isKey = (value) => /^\\w*$/.test(value);\n\nvar stringToPath = (input) => compact(input.replace(/[\"|']|\\]/g, '').split(/\\.|\\[/));\n\nvar set = (object, path, value) => {\n let index = -1;\n const tempPath = isKey(path) ? [path] : stringToPath(path);\n const length = tempPath.length;\n const lastIndex = length - 1;\n while (++index < length) {\n const key = tempPath[index];\n let newValue = value;\n if (index !== lastIndex) {\n const objValue = object[key];\n newValue =\n isObject(objValue) || Array.isArray(objValue)\n ? objValue\n : !isNaN(+tempPath[index + 1])\n ? []\n : {};\n }\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n return;\n }\n object[key] = newValue;\n object = object[key];\n }\n};\n\nconst EVENTS = {\n BLUR: 'blur',\n FOCUS_OUT: 'focusout',\n CHANGE: 'change',\n};\nconst VALIDATION_MODE = {\n onBlur: 'onBlur',\n onChange: 'onChange',\n onSubmit: 'onSubmit',\n onTouched: 'onTouched',\n all: 'all',\n};\nconst INPUT_VALIDATION_RULES = {\n max: 'max',\n min: 'min',\n maxLength: 'maxLength',\n minLength: 'minLength',\n pattern: 'pattern',\n required: 'required',\n validate: 'validate',\n};\n\nconst HookFormContext = React.createContext(null);\n/**\n * This custom hook allows you to access the form context. useFormContext is intended to be used in deeply nested structures, where it would become inconvenient to pass the context as a prop. To be used with {@link FormProvider}.\n *\n * @remarks\n * [API](https://react-hook-form.com/docs/useformcontext) • [Demo](https://codesandbox.io/s/react-hook-form-v7-form-context-ytudi)\n *\n * @returns return all useForm methods\n *\n * @example\n * ```tsx\n * function App() {\n * const methods = useForm();\n * const onSubmit = data => console.log(data);\n *\n * return (\n * <FormProvider {...methods} >\n * <form onSubmit={methods.handleSubmit(onSubmit)}>\n * <NestedInput />\n * <input type=\"submit\" />\n * </form>\n * </FormProvider>\n * );\n * }\n *\n * function NestedInput() {\n * const { register } = useFormContext(); // retrieve all hook methods\n * return <input {...register(\"test\")} />;\n * }\n * ```\n */\nconst useFormContext = () => React.useContext(HookFormContext);\n/**\n * A provider component that propagates the `useForm` methods to all children components via [React Context](https://reactjs.org/docs/context.html) API. To be used with {@link useFormContext}.\n *\n * @remarks\n * [API](https://react-hook-form.com/docs/useformcontext) • [Demo](https://codesandbox.io/s/react-hook-form-v7-form-context-ytudi)\n *\n * @param props - all useForm methods\n *\n * @example\n * ```tsx\n * function App() {\n * const methods = useForm();\n * const onSubmit = data => console.log(data);\n *\n * return (\n * <FormProvider {...methods} >\n * <form onSubmit={methods.handleSubmit(onSubmit)}>\n * <NestedInput />\n * <input type=\"submit\" />\n * </form>\n * </FormProvider>\n * );\n * }\n *\n * function NestedInput() {\n * const { register } = useFormContext(); // retrieve all hook methods\n * return <input {...register(\"test\")} />;\n * }\n * ```\n */\nconst FormProvider = (props) => {\n const { children, ...data } = props;\n return (React.createElement(HookFormContext.Provider, { value: data }, children));\n};\n\nvar getProxyFormState = (formState, control, localProxyFormState, isRoot = true) => {\n const result = {\n defaultValues: control._defaultValues,\n };\n for (const key in formState) {\n Object.defineProperty(result, key, {\n get: () => {\n const _key = key;\n if (control._proxyFormState[_key] !== VALIDATION_MODE.all) {\n control._proxyFormState[_key] = !isRoot || VALIDATION_MODE.all;\n }\n localProxyFormState && (localProxyFormState[_key] = true);\n return formState[_key];\n },\n });\n }\n return result;\n};\n\n/**\n * This custom hook allows you to subscribe to each form state, and isolate the re-render at the custom hook level. It has its scope in terms of form state subscription, so it would not affect other useFormState and useForm. Using this hook can reduce the re-render impact on large and complex form application.\n *\n * @remarks\n * [API](https://react-hook-form.com/docs/useformstate) • [Demo](https://codesandbox.io/s/useformstate-75xly)\n *\n * @param props - include options on specify fields to subscribe. {@link UseFormStateReturn}\n *\n * @example\n * ```tsx\n * function App() {\n * const { register, handleSubmit, control } = useForm({\n * defaultValues: {\n * firstName: \"firstName\"\n * }});\n * const { dirtyFields } = useFormState({\n * control\n * });\n * const onSubmit = (data) => console.log(data);\n *\n * return (\n * <form onSubmit={handleSubmit(onSubmit)}>\n * <input {...register(\"firstName\")} placeholder=\"First Name\" />\n * {dirtyFields.firstName && <p>Field is dirty.</p>}\n * <input type=\"submit\" />\n * </form>\n * );\n * }\n * ```\n */\nfunction useFormState(props) {\n const methods = useFormContext();\n const { control = methods.control, disabled, name, exact } = props || {};\n const [formState, updateFormState] = React.useState(control._formState);\n const _localProxyFormState = React.useRef({\n isDirty: false,\n isLoading: false,\n dirtyFields: false,\n touchedFields: false,\n validatingFields: false,\n isValidating: false,\n isValid: false,\n errors: false,\n });\n const _name = React.useRef(name);\n _name.current = name;\n React.useEffect(() => control._subscribe({\n name: _name.current,\n formState: _localProxyFormState.current,\n exact,\n callback: (formState) => {\n !disabled &&\n updateFormState({\n ...control._formState,\n ...formState,\n });\n },\n }), [control, disabled, exact]);\n React.useEffect(() => {\n _localProxyFormState.current.isValid && control._setValid(true);\n }, [control]);\n return React.useMemo(() => getProxyFormState(formState, control, _localProxyFormState.current, false), [formState, control]);\n}\n\nvar isString = (value) => typeof value === 'string';\n\nvar generateWatchOutput = (names, _names, formValues, isGlobal, defaultValue) => {\n if (isString(names)) {\n isGlobal && _names.watch.add(names);\n return get(formValues, names, defaultValue);\n }\n if (Array.isArray(names)) {\n return names.map((fieldName) => (isGlobal && _names.watch.add(fieldName), get(formValues, fieldName)));\n }\n isGlobal && (_names.watchAll = true);\n return formValues;\n};\n\n/**\n * Custom hook to subscribe to field change and isolate re-rendering at the component level.\n *\n * @remarks\n *\n * [API](https://react-hook-form.com/docs/usewatch) • [Demo](https://codesandbox.io/s/react-hook-form-v7-ts-usewatch-h9i5e)\n *\n * @example\n * ```tsx\n * const { control } = useForm();\n * const values = useWatch({\n * name: \"fieldName\"\n * control,\n * })\n * ```\n */\nfunction useWatch(props) {\n const methods = useFormContext();\n const { control = methods.control, name, defaultValue, disabled, exact, } = props || {};\n const _name = React.useRef(name);\n const _defaultValue = React.useRef(defaultValue);\n _name.current = name;\n React.useEffect(() => control._subscribe({\n name: _name.current,\n formState: {\n values: true,\n },\n exact,\n callback: (formState) => !disabled &&\n updateValue(generateWatchOutput(_name.current, control._names, formState.values || control._formValues, false, _defaultValue.current)),\n }), [control, disabled, exact]);\n const [value, updateValue] = React.useState(control._getWatch(name, defaultValue));\n React.useEffect(() => control._removeUnmounted());\n return value;\n}\n\n/**\n * Custom hook to work with controlled component, this function provide you with both form and field level state. Re-render is isolated at the hook level.\n *\n * @remarks\n * [API](https://react-hook-form.com/docs/usecontroller) • [Demo](https://codesandbox.io/s/usecontroller-0o8px)\n *\n * @param props - the path name to the form field value, and validation rules.\n *\n * @returns field properties, field and form state. {@link UseControllerReturn}\n *\n * @example\n * ```tsx\n * function Input(props) {\n * const { field, fieldState, formState } = useController(props);\n * return (\n * <div>\n * <input {...field} placeholder={props.name} />\n * <p>{fieldState.isTouched && \"Touched\"}</p>\n * <p>{formState.isSubmitted ? \"submitted\" : \"\"}</p>\n * </div>\n * );\n * }\n * ```\n */\nfunction useController(props) {\n const methods = useFormContext();\n const { name, disabled, control = methods.control, shouldUnregister } = props;\n const isArrayField = isNameInFieldArray(control._names.array, name);\n const value = useWatch({\n control,\n name,\n defaultValue: get(control._formValues, name, get(control._defaultValues, name, props.defaultValue)),\n exact: true,\n });\n const formState = useFormState({\n control,\n name,\n exact: true,\n });\n const _props = React.useRef(props);\n const _registerProps = React.useRef(control.register(name, {\n ...props.rules,\n value,\n ...(isBoolean(props.disabled) ? { disabled: props.disabled } : {}),\n }));\n const fieldState = React.useMemo(() => Object.defineProperties({}, {\n invalid: {\n enumerable: true,\n get: () => !!get(formState.errors, name),\n },\n isDirty: {\n enumerable: true,\n get: () => !!get(formState.dirtyFields, name),\n },\n isTouched: {\n enumerable: true,\n get: () => !!get(formState.touchedFields, name),\n },\n isValidating: {\n enumerable: true,\n get: () => !!get(formState.validatingFields, name),\n },\n error: {\n enumerable: true,\n get: () => get(formState.errors, name),\n },\n }), [formState, name]);\n const onChange = React.useCallback((event) => _registerProps.current.onChange({\n target: {\n value: getEventValue(event),\n name: name,\n },\n type: EVENTS.CHANGE,\n }), [name]);\n const onBlur = React.useCallback(() => _registerProps.current.onBlur({\n target: {\n value: get(control._formValues, name),\n name: name,\n },\n type: EVENTS.BLUR,\n }), [name, control._formValues]);\n const ref = React.useCallback((elm) => {\n const field = get(control._fields, name);\n if (field && elm) {\n field._f.ref = {\n focus: () => elm.focus(),\n select: () => elm.select(),\n setCustomValidity: (message) => elm.setCustomValidity(message),\n reportValidity: () => elm.reportValidity(),\n };\n }\n }, [control._fields, name]);\n const field = React.useMemo(() => ({\n name,\n value,\n ...(isBoolean(disabled) || formState.disabled\n ? { disabled: formState.disabled || disabled }\n : {}),\n onChange,\n onBlur,\n ref,\n }), [name, disabled, formState.disabled, onChange, onBlur, ref, value]);\n React.useEffect(() => {\n const _shouldUnregisterField = control._options.shouldUnregister || shouldUnregister;\n control.register(name, {\n ..._props.current.rules,\n ...(isBoolean(_props.current.disabled)\n ? { disabled: _props.current.disabled }\n : {}),\n });\n const updateMounted = (name, value) => {\n const field = get(control._fields, name);\n if (field && field._f) {\n field._f.mount = value;\n }\n };\n updateMounted(name, true);\n if (_shouldUnregisterField) {\n const value = cloneObject(get(control._options.defaultValues, name));\n set(control._defaultValues, name, value);\n if (isUndefined(get(control._formValues, name))) {\n set(control._formValues, name, value);\n }\n }\n !isArrayField && control.register(name);\n return () => {\n (isArrayField\n ? _shouldUnregisterField && !control._state.action\n : _shouldUnregisterField)\n ? control.unregister(name)\n : updateMounted(name, false);\n };\n }, [name, control, isArrayField, shouldUnregister]);\n React.useEffect(() => {\n control._setDisabledField({\n disabled,\n name,\n });\n }, [disabled, name, control]);\n return React.useMemo(() => ({\n field,\n formState,\n fieldState,\n }), [field, formState, fieldState]);\n}\n\n/**\n * Component based on `useController` hook to work with controlled component.\n *\n * @remarks\n * [API](https://react-hook-form.com/docs/usecontroller/controller) • [Demo](https://codesandbox.io/s/react-hook-form-v6-controller-ts-jwyzw) • [Video](https://www.youtube.com/watch?v=N2UNk_UCVyA)\n *\n * @param props - the path name to the form field value, and validation rules.\n *\n * @returns provide field handler functions, field and form state.\n *\n * @example\n * ```tsx\n * function App() {\n * const { control } = useForm<FormValues>({\n * defaultValues: {\n * test: \"\"\n * }\n * });\n *\n * return (\n * <form>\n * <Controller\n * control={control}\n * name=\"test\"\n * render={({ field: { onChange, onBlur, value, ref }, formState, fieldState }) => (\n * <>\n * <input\n * onChange={onChange} // send value to hook form\n * onBlur={onBlur} // notify when input is touched\n * value={value} // return updated value\n * ref={ref} // set ref for focus management\n * />\n * <p>{formState.isSubmitted ? \"submitted\" : \"\"}</p>\n * <p>{fieldState.isTouched ? \"touched\" : \"\"}</p>\n * </>\n * )}\n * />\n * </form>\n * );\n * }\n * ```\n */\nconst Controller = (props) => props.render(useController(props));\n\nconst flatten = (obj) => {\n const output = {};\n for (const key of Object.keys(obj)) {\n if (isObjectType(obj[key]) && obj[key] !== null) {\n const nested = flatten(obj[key]);\n for (const nestedKey of Object.keys(nested)) {\n output[`${key}.${nestedKey}`] = nested[nestedKey];\n }\n }\n else {\n output[key] = obj[key];\n }\n }\n return output;\n};\n\nconst POST_REQUEST = 'post';\n/**\n * Form component to manage submission.\n *\n * @param props - to setup submission detail. {@link FormProps}\n *\n * @returns form component or headless render prop.\n *\n * @example\n * ```tsx\n * function App() {\n * const { control, formState: { errors } } = useForm();\n *\n * return (\n * <Form action=\"/api\" control={control}>\n * <input {...register(\"name\")} />\n * <p>{errors?.root?.server && 'Server error'}</p>\n * <button>Submit</button>\n * </Form>\n * );\n * }\n * ```\n */\nfunction Form(props) {\n const methods = useFormContext();\n const [mounted, setMounted] = React.useState(false);\n const { control = methods.control, onSubmit, children, action, method = POST_REQUEST, headers, encType, onError, render, onSuccess, validateStatus, ...rest } = props;\n const submit = async (event) => {\n let hasError = false;\n let type = '';\n await control.handleSubmit(async (data) => {\n const formData = new FormData();\n let formDataJson = '';\n try {\n formDataJson = JSON.stringify(data);\n }\n catch (_a) { }\n const flattenFormValues = flatten(control._formValues);\n for (const key in flattenFormValues) {\n formData.append(key, flattenFormValues[key]);\n }\n if (onSubmit) {\n await onSubmit({\n data,\n event,\n method,\n formData,\n formDataJson,\n });\n }\n if (action) {\n try {\n const shouldStringifySubmissionData = [\n headers && headers['Content-Type'],\n encType,\n ].some((value) => value && value.includes('json'));\n const response = await fetch(String(action), {\n method,\n headers: {\n ...headers,\n ...(encType ? { 'Content-Type': encType } : {}),\n },\n body: shouldStringifySubmissionData ? formDataJson : formData,\n });\n if (response &&\n (validateStatus\n ? !validateStatus(response.status)\n : response.status < 200 || response.status >= 300)) {\n hasError = true;\n onError && onError({ response });\n type = String(response.status);\n }\n else {\n onSuccess && onSuccess({ response });\n }\n }\n catch (error) {\n hasError = true;\n onError && onError({ error });\n }\n }\n })(event);\n if (hasError && props.control) {\n props.control._subjects.state.next({\n isSubmitSuccessful: false,\n });\n props.control.setError('root.server', {\n type,\n });\n }\n };\n React.useEffect(() => {\n setMounted(true);\n }, []);\n return render ? (React.createElement(React.Fragment, null, render({\n submit,\n }))) : (React.createElement(\"form\", { noValidate: mounted, action: action, method: method, encType: encType, onSubmit: submit, ...rest }, children));\n}\n\nvar appendErrors = (name, validateAllFieldCriteria, errors, type, message) => validateAllFieldCriteria\n ? {\n ...errors[name],\n types: {\n ...(errors[name] && errors[name].types ? errors[name].types : {}),\n [type]: message || true,\n },\n }\n : {};\n\nvar convertToArrayPayload = (value) => (Array.isArray(value) ? value : [value]);\n\nvar createSubject = () => {\n let _observers = [];\n const next = (value) => {\n for (const observer of _observers) {\n observer.next && observer.next(value);\n }\n };\n const subscribe = (observer) => {\n _observers.push(observer);\n return {\n unsubscribe: () => {\n _observers = _observers.filter((o) => o !== observer);\n },\n };\n };\n const unsubscribe = () => {\n _observers = [];\n };\n return {\n get observers() {\n return _observers;\n },\n next,\n subscribe,\n unsubscribe,\n };\n};\n\nvar isPrimitive = (value) => isNullOrUndefined(value) || !isObjectType(value);\n\nfunction deepEqual(object1, object2) {\n if (isPrimitive(object1) || isPrimitive(object2)) {\n return object1 === object2;\n }\n if (isDateObject(object1) && isDateObject(object2)) {\n return object1.getTime() === object2.getTime();\n }\n const keys1 = Object.keys(object1);\n const keys2 = Object.keys(object2);\n if (keys1.length !== keys2.length) {\n return false;\n }\n for (const key of keys1) {\n const val1 = object1[key];\n if (!keys2.includes(key)) {\n return false;\n }\n if (key !== 'ref') {\n const val2 = object2[key];\n if ((isDateObject(val1) && isDateObject(val2)) ||\n (isObject(val1) && isObject(val2)) ||\n (Array.isArray(val1) && Array.isArray(val2))\n ? !deepEqual(val1, val2)\n : val1 !== val2) {\n return false;\n }\n }\n }\n return true;\n}\n\nvar isEmptyObject = (value) => isObject(value) && !Object.keys(value).length;\n\nvar isFileInput = (element) => element.type === 'file';\n\nvar isFunction = (value) => typeof value === 'function';\n\nvar isHTMLElement = (value) => {\n if (!isWeb) {\n return false;\n }\n const owner = value ? value.ownerDocument : 0;\n return (value instanceof\n (owner && owner.defaultView ? owner.defaultView.HTMLElement : HTMLElement));\n};\n\nvar isMultipleSelect = (element) => element.type === `select-multiple`;\n\nvar isRadioInput = (element) => element.type === 'radio';\n\nvar isRadioOrCheckbox = (ref) => isRadioInput(ref) || isCheckBoxInput(ref);\n\nvar live = (ref) => isHTMLElement(ref) && ref.isConnected;\n\nfunction baseGet(object, updatePath) {\n const length = updatePath.slice(0, -1).length;\n let index = 0;\n while (index < length) {\n object = isUndefined(object) ? index++ : object[updatePath[index++]];\n }\n return object;\n}\nfunction isEmptyArray(obj) {\n for (const key in obj) {\n if (obj.hasOwnProperty(key) && !isUndefined(obj[key])) {\n return false;\n }\n }\n return true;\n}\nfunction unset(object, path) {\n const paths = Array.isArray(path)\n ? path\n : isKey(path)\n ? [path]\n : stringToPath(path);\n const childObject = paths.length === 1 ? object : baseGet(object, paths);\n const index = paths.length - 1;\n const key = paths[index];\n if (childObject) {\n delete childObject[key];\n }\n if (index !== 0 &&\n ((isObject(childObject) && isEmptyObject(childObject)) ||\n (Array.isArray(childObject) && isEmptyArray(childObject)))) {\n unset(object, paths.slice(0, -1));\n }\n return object;\n}\n\nvar objectHasFunction = (data) => {\n for (const key in data) {\n if (isFunction(data[key])) {\n return true;\n }\n }\n return false;\n};\n\nfunction markFieldsDirty(data, fields = {}) {\n const isParentNodeArray = Array.isArray(data);\n if (isObject(data) || isParentNodeArray) {\n for (const key in data) {\n if (Array.isArray(data[key]) ||\n (isObject(data[key]) && !objectHasFunction(data[key]))) {\n fields[key] = Array.isArray(data[key]) ? [] : {};\n markFieldsDirty(data[key], fields[key]);\n }\n else if (!isNullOrUndefined(data[key])) {\n fields[key] = true;\n }\n }\n }\n return fields;\n}\nfunction getDirtyFieldsFromDefaultValues(data, formValues, dirtyFieldsFromValues) {\n const isParentNodeArray = Array.isArray(data);\n if (isObject(data) || isParentNodeArray) {\n for (const key in data) {\n if (Array.isArray(data[key]) ||\n (isObject(data[key]) && !objectHasFunction(data[key]))) {\n if (isUndefined(formValues) ||\n isPrimitive(dirtyFieldsFromValues[key])) {\n dirtyFieldsFromValues[key] = Array.isArray(data[key])\n ? markFieldsDirty(data[key], [])\n : { ...markFieldsDirty(data[key]) };\n }\n else {\n getDirtyFieldsFromDefaultValues(data[key], isNullOrUndefined(formValues) ? {} : formValues[key], dirtyFieldsFromValues[key]);\n }\n }\n else {\n dirtyFieldsFromValues[key] = !deepEqual(data[key], formValues[key]);\n }\n }\n }\n return dirtyFieldsFromValues;\n}\nvar getDirtyFields = (defaultValues, formValues) => getDirtyFieldsFromDefaultValues(defaultValues, formValues, markFieldsDirty(formValues));\n\nconst defaultResult = {\n value: false,\n isValid: false,\n};\nconst validResult = { value: true, isValid: true };\nvar getCheckboxValue = (options) => {\n if (Array.isArray(options)) {\n if (options.length > 1) {\n const values = options\n .filter((option) => option && option.checked && !option.disabled)\n .map((option) => option.value);\n return { value: values, isValid: !!values.length };\n }\n return options[0].checked && !options[0].disabled\n ? // @ts-expect-error expected to work in the browser\n options[0].attributes && !isUndefined(options[0].attributes.value)\n ? isUndefined(options[0].value) || options[0].value === ''\n ? validResult\n : { value: options[0].value, isValid: true }\n : validResult\n : defaultResult;\n }\n return defaultResult;\n};\n\nvar getFieldValueAs = (value, { valueAsNumber, valueAsDate, setValueAs }) => isUndefined(value)\n ? value\n : valueAsNumber\n ? value === ''\n ? NaN\n : value\n ? +value\n : value\n : valueAsDate && isString(value)\n ? new Date(value)\n : setValueAs\n ? setValueAs(value)\n : value;\n\nconst defaultReturn = {\n isValid: false,\n value: null,\n};\nvar getRadioValue = (options) => Array.isArray(options)\n ? options.reduce((previous, option) => option && option.checked && !option.disabled\n ? {\n isValid: true,\n value: option.value,\n }\n : previous, defaultReturn)\n : defaultReturn;\n\nfunction getFieldValue(_f) {\n const ref = _f.ref;\n if (isFileInput(ref)) {\n return ref.files;\n }\n if (isRadioInput(ref)) {\n return getRadioValue(_f.refs).value;\n }\n if (isMultipleSelect(ref)) {\n return [...ref.selectedOptions].map(({ value }) => value);\n }\n if (isCheckBoxInput(ref)) {\n return getCheckboxValue(_f.refs).value;\n }\n return getFieldValueAs(isUndefined(ref.value) ? _f.ref.value : ref.value, _f);\n}\n\nvar getResolverOptions = (fieldsNames, _fields, criteriaMode, shouldUseNativeValidation) => {\n const fields = {};\n for (const name of fieldsNames) {\n const field = get(_fields, name);\n field && set(fields, name, field._f);\n }\n return {\n criteriaMode,\n names: [...fieldsNames],\n fields,\n shouldUseNativeValidation,\n };\n};\n\nvar isRegex = (value) => value instanceof RegExp;\n\nvar getRuleValue = (rule) => isUndefined(rule)\n ? rule\n : isRegex(rule)\n ? rule.source\n : isObject(rule)\n ? isRegex(rule.value)\n ? rule.value.source\n : rule.value\n : rule;\n\nvar getValidationModes = (mode) => ({\n isOnSubmit: !mode || mode === VALIDATION_MODE.onSubmit,\n isOnBlur: mode === VALIDATION_MODE.onBlur,\n isOnChange: mode === VALIDATION_MODE.onChange,\n isOnAll: mode === VALIDATION_MODE.all,\n isOnTouch: mode === VALIDATION_MODE.onTouched,\n});\n\nconst ASYNC_FUNCTION = 'AsyncFunction';\nvar hasPromiseValidation = (fieldReference) => !!fieldReference &&\n !!fieldReference.validate &&\n !!((isFunction(fieldReference.validate) &&\n fieldReference.validate.constructor.name === ASYNC_FUNCTION) ||\n (isObject(fieldReference.validate) &&\n Object.values(fieldReference.validate).find((validateFunction) => validateFunction.constructor.name === ASYNC_FUNCTION)));\n\nvar hasValidation = (options) => options.mount &&\n (options.required ||\n options.min ||\n options.max ||\n options.maxLength ||\n options.minLength ||\n options.pattern ||\n options.validate);\n\nvar isWatched = (name, _names, isBlurEvent) => !isBlurEvent &&\n (_names.watchAll ||\n _names.watch.has(name) ||\n [..._names.watch].some((watchName) => name.startsWith(watchName) &&\n /^\\.\\w+/.test(name.slice(watchName.length))));\n\nconst iterateFieldsByAction = (fields, action, fieldsNames, abortEarly) => {\n for (const key of fieldsNames || Object.keys(fields)) {\n const field = get(fields, key);\n if (field) {\n const { _f, ...currentField } = field;\n if (_f) {\n if (_f.refs && _f.refs[0] && action(_f.refs[0], key) && !abortEarly) {\n return true;\n }\n else if (_f.ref && action(_f.ref, _f.name) && !abortEarly) {\n return true;\n }\n else {\n if (iterateFieldsByAction(currentField, action)) {\n break;\n }\n }\n }\n else if (isObject(currentField)) {\n if (iterateFieldsByAction(currentField, action)) {\n break;\n }\n }\n }\n }\n return;\n};\n\nfunction schemaErrorLookup(errors, _fields, name) {\n const error = get(errors, name);\n if (error || isKey(name)) {\n return {\n error,\n name,\n };\n }\n const names = name.split('.');\n while (names.length) {\n const fieldName = names.join('.');\n const field = get(_fields, fieldName);\n const foundError = get(errors, fieldName);\n if (field && !Array.isArray(field) && name !== fieldName) {\n return { name };\n }\n if (foundError && foundError.type) {\n return {\n name: fieldName,\n error: foundError,\n };\n }\n names.pop();\n }\n return {\n name,\n };\n}\n\nvar shouldRenderFormState = (formStateData, _proxyFormState, updateFormState, isRoot) => {\n updateFormState(formStateData);\n const { name, ...formState } = formStateData;\n return (isEmptyObject(formState) ||\n Object.keys(formState).length >= Object.keys(_proxyFormState).length ||\n Object.keys(formState).find((key) => _proxyFormState[key] ===\n (!isRoot || VALIDATION_MODE.all)));\n};\n\nvar shouldSubscribeByName = (name, signalName, exact) => !name ||\n !signalName ||\n name === signalName ||\n convertToArrayPayload(name).some((currentName) => currentName &&\n (exact\n ? currentName === signalName\n : currentName.startsWith(signalName) ||\n signalName.startsWith(currentName)));\n\nvar skipValidation = (isBlurEvent, isTouched, isSubmitted, reValidateMode, mode) => {\n if (mode.isOnAll) {\n return false;\n }\n else if (!isSubmitted && mode.isOnTouch) {\n return !(isTouched || isBlurEvent);\n }\n else if (isSubmitted ? reValidateMode.isOnBlur : mode.isOnBlur) {\n return !isBlurEvent;\n }\n else if (isSubmitted ? reValidateMode.isOnChange : mode.isOnChange) {\n return isBlurEvent;\n }\n return true;\n};\n\nvar unsetEmptyArray = (ref, name) => !compact(get(ref, name)).length && unset(ref, name);\n\nvar updateFieldArrayRootError = (errors, error, name) => {\n const fieldArrayErrors = convertToArrayPayload(get(errors, name));\n set(fieldArrayErrors, 'root', error[name]);\n set(errors, name, fieldArrayErrors);\n return errors;\n};\n\nvar isMessage = (value) => isString(value);\n\nfunction getValidateError(result, ref, type = 'validate') {\n if (isMessage(result) ||\n (Array.isArray(result) && result.every(isMessage)) ||\n (isBoolean(result) && !result)) {\n return {\n type,\n message: isMessage(result) ? result : '',\n ref,\n };\n }\n}\n\nvar getValueAndMessage = (validationData) => isObject(validationData) && !isRegex(validationData)\n ? validationData\n : {\n value: validationData,\n message: '',\n };\n\nvar validateField = async (field, disabledFieldNames, formValues, validateAllFieldCriteria, shouldUseNativeValidation, isFieldArray) => {\n const { ref, refs, required, maxLength, minLength, min, max, pattern, validate, name, valueAsNumber, mount, } = field._f;\n const inputValue = get(formValues, name);\n if (!mount || disabledFieldNames.has(name)) {\n return {};\n }\n const inputRef = refs ? refs[0] : ref;\n const setCustomValidity = (message) => {\n if (shouldUseNativeValidation && inputRef.reportValidity) {\n inputRef.setCustomValidity(isBoolean(message) ? '' : message || '');\n inputRef.reportValidity();\n }\n };\n const error = {};\n const isRadio = isRadioInput(ref);\n const isCheckBox = isCheckBoxInput(ref);\n const isRadioOrCheckbox = isRadio || isCheckBox;\n const isEmpty = ((valueAsNumber || isFileInput(ref)) &&\n isUndefined(ref.value) &&\n isUndefined(inputValue)) ||\n (isHTMLElement(ref) && ref.value === '') ||\n inputValue === '' ||\n (Array.isArray(inputValue) && !inputValue.length);\n const appendErrorsCurry = appendErrors.bind(null, name, validateAllFieldCriteria, error);\n const getMinMaxMessage = (exceedMax, maxLengthMessage, minLengthMessage, maxType = INPUT_VALIDATION_RULES.maxLength, minType = INPUT_VALIDATION_RULES.minLength) => {\n const message = exceedMax ? maxLengthMessage : minLengthMessage;\n error[name] = {\n type: exceedMax ? maxType : minType,\n message,\n ref,\n ...appendErrorsCurry(exceedMax ? maxType : minType, message),\n };\n };\n if (isFieldArray\n ? !Array.isArray(inputValue) || !inputValue.length\n : required &&\n ((!isRadioOrCheckbox && (isEmpty || isNullOrUndefined(inputValue))) ||\n (isBoolean(inputValue) && !inputValue) ||\n (isCheckBox && !getCheckboxValue(refs).isValid) ||\n (isRadio && !getRadioValue(refs).isValid))) {\n const { value, message } = isMessage(required)\n ? { value: !!required, message: required }\n : getValueAndMessage(required);\n if (value) {\n error[name] = {\n type: INPUT_VALIDATION_RULES.required,\n message,\n ref: inputRef,\n ...appendErrorsCurry(INPUT_VALIDATION_RULES.required, message),\n };\n if (!validateAllFieldCriteria) {\n setCustomValidity(message);\n return error;\n }\n }\n }\n if (!isEmpty && (!isNullOrUndefined(min) || !isNullOrUndefined(max))) {\n let exceedMax;\n let exceedMin;\n const maxOutput = getValueAndMessage(max);\n const minOutput = getValueAndMessage(min);\n if (!isNullOrUndefined(inputValue) && !isNaN(inputValue)) {\n const valueNumber = ref.valueAsNumber ||\n (inputValue ? +inputValue : inputValue);\n if (!isNullOrUndefined(maxOutput.value)) {\n exceedMax = valueNumber > maxOutput.value;\n }\n if (!isNullOrUndefined(minOutput.value)) {\n exceedMin = valueNumber < minOutput.value;\n }\n }\n else {\n const valueDate = ref.valueAsDate || new Date(inputValue);\n const convertTimeToDate = (time) => new Date(new Date().toDateString() + ' ' + time);\n const isTime = ref.type == 'time';\n const isWeek = ref.type == 'week';\n if (isString(maxOutput.value) && inputValue) {\n exceedMax = isTime\n ? convertTimeToDate(inputValue) > convertTimeToDate(maxOutput.value)\n : isWeek\n ? inputValue > maxOutput.value\n : valueDate > new Date(maxOutput.value);\n }\n if (isString(minOutput.value) && inputValue) {\n exceedMin = isTime\n ? convertTimeToDate(inputValue) < convertTimeToDate(minOutput.value)\n : isWeek\n ? inputValue < minOutput.value\n : valueDate < new Date(minOutput.value);\n }\n }\n if (exceedMax || exceedMin) {\n getMinMaxMessage(!!exceedMax, maxOutput.message, minOutput.message, INPUT_VALIDATION_RULES.max, INPUT_VALIDATION_RULES.min);\n if (!validateAllFieldCriteria) {\n setCustomValidity(error[name].message);\n return error;\n }\n }\n }\n if ((maxLength || minLength) &&\n !isEmpty &&\n (isString(inputValue) || (isFieldArray && Array.isArray(inputValue)))) {\n const maxLengthOutput = getValueAndMessage(maxLength);\n const minLengthOutput = getValueAndMessage(minLength);\n const exceedMax = !isNullOrUndefined(maxLengthOutput.value) &&\n inputValue.length > +maxLengthOutput.value;\n const exceedMin = !isNullOrUndefined(minLengthOutput.value) &&\n inputValue.length < +minLengthOutput.value;\n if (exceedMax || exceedMin) {\n getMinMaxMessage(exceedMax, maxLengthOutput.message, minLengthOutput.message);\n if (!validateAllFieldCriteria) {\n setCustomValidity(error[name].message);\n return error;\n }\n }\n }\n if (pattern && !isEmpty && isString(inputValue)) {\n const { value: patternValue, message } = getValueAndMessage(pattern);\n if (isRegex(patternValue) && !inputValue.match(patternValue)) {\n error[name] = {\n type: INPUT_VALIDATION_RULES.pattern,\n message,\n ref,\n ...appendErrorsCurry(INPUT_VALIDATION_RULES.pattern, message),\n };\n if (!validateAllFieldCriteria) {\n setCustomValidity(message);\n return error;\n }\n }\n }\n if (validate) {\n if (isFunction(validate)) {\n const result = await validate(inputValue, formValues);\n const validateError = getValidateError(result, inputRef);\n if (validateError) {\n error[name] = {\n ...validateError,\n ...appendErrorsCurry(INPUT_VALIDATION_RULES.validate, validateError.message),\n };\n if (!validateAllFieldCriteria) {\n setCustomValidity(validateError.message);\n return error;\n }\n }\n }\n else if (isObject(validate)) {\n let validationResult = {};\n for (const key in validate) {\n if (!isEmptyObject(validationResult) && !validateAllFieldCriteria) {\n break;\n }\n const validateError = getValidateError(await validate[key](inputValue, formValues), inputRef, key);\n if (validateError) {\n validationResult = {\n ...validateError,\n ...appendErrorsCurry(key, validateError.message),\n };\n setCustomValidity(validateError.message);\n if (validateAllFieldCriteria) {\n error[name] = validationResult;\n }\n }\n }\n if (!isEmptyObject(validationResult)) {\n error[name] = {\n ref: inputRef,\n ...validationResult,\n };\n if (!validateAllFieldCriteria) {\n return error;\n }\n }\n }\n }\n setCustomValidity(true);\n return error;\n};\n\nconst defaultOptions = {\n mode: VALIDATION_MODE.onSubmit,\n reValidateMode: VALIDATION_MODE.onChange,\n shouldFocusError: true,\n};\nfunction createFormControl(props = {}) {\n let _options = {\n ...defaultOptions,\n ...props,\n };\n let _formState = {\n submitCount: 0,\n isDirty: false,\n isLoading: isFunction(_options.defaultValues),\n isValidating: false,\n isSubmitted: false,\n isSubmitting: false,\n isSubmitSuccessful: false,\n isValid: false,\n touchedFields: {},\n dirtyFields: {},\n validatingFields: {},\n errors: _options.errors || {},\n disabled: _options.disabled || false,\n };\n const _fields = {};\n let _defaultValues = isObject(_options.defaultValues) || isObject(_options.values)\n ? cloneObject(_options.values || _options.defaultValues) || {}\n : {};\n let _formValues = _options.shouldUnregister\n ? {}\n : cloneObject(_defaultValues);\n let _state = {\n action: false,\n mount: false,\n watch: false,\n };\n let _names = {\n mount: new Set(),\n disabled: new Set(),\n unMount: new Set(),\n array: new Set(),\n watch: new Set(),\n };\n let delayErrorCallback;\n let timer = 0;\n const _proxyFormState = {\n isDirty: false,\n dirtyFields: false,\n validatingFields: false,\n touchedFields: false,\n isValidating: false,\n isValid: false,\n errors: false,\n };\n let _proxySubscribeFormState = {\n ..._proxyFormState,\n };\n const _subjects = {\n array: createSubject(),\n state: createSubject(),\n };\n const validationModeBeforeSubmit = getValidationModes(_options.mode);\n const validationModeAfterSubmit = getValidationModes(_options.reValidateMode);\n const shouldDisplayAllAssociatedErrors = _options.criteriaMode === VALIDATION_MODE.all;\n const debounce = (callback) => (wait) => {\n clearTimeout(timer);\n timer = setTimeout(callback, wait);\n };\n const _setValid = async (shouldUpdateValid) => {\n if (!_options.disabled &&\n (_proxyFormState.isValid ||\n _proxySubscribeFormState.isValid ||\n shouldUpdateValid)) {\n const isValid = _options.resolver\n ? isEmptyObject((await _runSchema()).errors)\n : await executeBuiltInValidation(_fields, true);\n if (isValid !== _formState.isValid) {\n _subjects.state.next({\n isValid,\n });\n }\n }\n };\n const _updateIsValidating = (names, isValidating) => {\n if (!_options.disabled &&\n (_proxyFormState.isValidating ||\n _proxyFormState.validatingFields ||\n _proxySubscribeFormState.isValidating ||\n _proxySubscribeFormState.validatingFields)) {\n (names || Array.from(_names.mount)).forEach((name) => {\n if (name) {\n isValidating\n ? set(_formState.validatingFields, name, isValidating)\n : unset(_formState.validatingFields, name);\n }\n });\n _subjects.state.next({\n validatingFields: _formState.validatingFields,\n isValidating: !isEmptyObject(_formState.validatingFields),\n });\n }\n };\n const _setFieldArray = (name, values = [], method, args, shouldSetValues = true, shouldUpdateFieldsAndState = true) => {\n if (args && method && !_options.disabled) {\n _state.action = true;\n if (shouldUpdateFieldsAndState && Array.isArray(get(_fields, name))) {\n const fieldValues = method(get(_fields, name), args.argA, args.argB);\n shouldSetValues && set(_fields, name, fieldValues);\n }\n if (shouldUpdateFieldsAndState &&\n Array.isArray(get(_formState.errors, name))) {\n const errors = method(get(_formState.errors, name), args.argA, args.argB);\n shouldSetValues && set(_formState.errors, name, errors);\n unsetEmptyArray(_formState.errors, name);\n }\n if ((_proxyFormState.touchedFields ||\n _proxySubscribeFormState.touchedFields) &&\n shouldUpdateFieldsAndState &&\n Array.isArray(get(_formState.touchedFields, name))) {\n const touchedFields = method(get(_formState.touchedFields, name), args.argA, args.argB);\n shouldSetValues && set(_formState.touchedFields, name, touchedFields);\n }\n if (_proxyFormState.dirtyFields || _proxySubscribeFormState.dirtyFields) {\n _formState.dirtyFields = getDirtyFields(_defaultValues, _formValues);\n }\n _subjects.state.next({\n name,\n isDirty: _getDirty(name, values),\n dirtyFields: _formState.dirtyFields,\n errors: _formState.errors,\n isValid: _formState.isValid,\n });\n }\n else {\n set(_formValues, name, values);\n }\n };\n const updateErrors = (name, error) => {\n set(_formState.errors, name, error);\n _subjects.state.next({\n errors: _formState.errors,\n });\n };\n const _setErrors = (errors) => {\n _formState.errors = errors;\n _subjects.state.next({\n errors: _formState.errors,\n isValid: false,\n });\n };\n const updateValidAndValue = (name, shouldSkipSetValueAs, value, ref) => {\n const field = get(_fields, name);\n if (field) {\n const defaultValue = get(_formValues, name, isUndefined(value) ? get(_defaultValues, name) : value);\n isUndefined(defaultValue) ||\n (ref && ref.defaultChecked) ||\n shouldSkipSetValueAs\n ? set(_formValues, name, shouldSkipSetValueAs ? defaultValue : getFieldValue(field._f))\n : setFieldValue(name, defaultValue);\n _state.mount && _setValid();\n }\n };\n const updateTouchAndDirty = (name, fieldValue, isBlurEvent, shouldDirty, shouldRender) => {\n let shouldUpdateField = false;\n let isPreviousDirty = false;\n const output = {\n name,\n };\n if (!_options.disabled) {\n if (!isBlurEvent || shouldDirty) {\n if (_proxyFormState.isDirty || _proxySubscribeFormState.isDirty) {\n isPreviousDirty = _formState.isDirty;\n _formState.isDirty = output.isDirty = _getDirty();\n shouldUpdateField = isPreviousDirty !== output.isDirty;\n }\n const isCurrentFieldPristine = deepEqual(get(_defaultValues, name), fieldValue);\n isPreviousDirty = !!get(_formState.dirtyFields, name);\n isCurrentFieldPristine\n ? unset(_formState.dirtyFields, name)\n : set(_formState.dirtyFields, name, true);\n output.dirtyFields = _formState.dirtyFields;\n shouldUpdateField =\n shouldUpdateField ||\n ((_proxyFormState.dirtyFields ||\n _proxySubscribeFormState.dirtyFields) &&\n isPreviousDirty !== !isCurrentFieldPristine);\n }\n if (isBlurEvent) {\n const isPreviousFieldTouched = get(_formState.touchedFields, name);\n if (!isPreviousFieldTouched) {\n set(_formState.touchedFields, name, isBlurEvent);\n output.touchedFields = _formState.touchedFields;\n shouldUpdateField =\n shouldUpdateField ||\n ((_proxyFormState.touchedFields ||\n _proxySubscribeFormState.touchedFields) &&\n isPreviousFieldTouched !== isBlurEvent);\n }\n }\n shouldUpdateField && shouldRender && _subjects.state.next(output);\n }\n return shouldUpdateField ? output : {};\n };\n const shouldRenderByError = (name, isValid, error, fieldState) => {\n const previousFieldError = get(_formState.errors, name);\n const shouldUpdateValid = (_proxyFormState.isValid || _proxySubscribeFormState.isValid) &&\n isBoolean(isValid) &&\n _formState.isValid !== isValid;\n if (_options.delayError && error) {\n delayErrorCallback = debounce(() => updateErrors(name, error));\n delayErrorCallback(_options.delayError);\n }\n else {\n clearTimeout(timer);\n delayErrorCallback = null;\n error\n ? set(_formState.errors, name, error)\n : unset(_formState.errors, name);\n }\n if ((error ? !deepEqual(previousFieldError, error) : previousFieldError) ||\n !isEmptyObject(fieldState) ||\n shouldUpdateValid) {\n const updatedFormState = {\n ...fieldState,\n ...(shouldUpdateValid && isBoolean(isValid) ? { isValid } : {}),\n errors: _formState.errors,\n name,\n };\n _formState = {\n ..._formState,\n ...updatedFormState,\n };\n _subjects.state.next(updatedFormState);\n }\n };\n const _runSchema = async (name) => {\n _updateIsValidating(name, true);\n const result = await _options.resolver(_formValues, _options.context, getResolverOptions(name || _names.mount, _fields, _options.criteriaMode, _options.shouldUseNativeValidation));\n _updateIsValidating(name);\n return result;\n };\n const executeSchemaAndUpdateState = async (names) => {\n const { errors } = await _runSchema(names);\n if (names) {\n for (const name of names) {\n const error = get(errors, name);\n error\n ? set(_formState.errors, name, error)\n : unset(_formState.errors, name);\n }\n }\n else {\n _formState.errors = errors;\n }\n return errors;\n };\n const executeBuiltInValidation = async (fields, shouldOnlyCheckValid, context = {\n valid: true,\n }) => {\n for (const name in fields) {\n const field = fields[name];\n if (field) {\n const { _f, ...fieldValue } = field;\n if (_f) {\n const isFieldArrayRoot = _names.array.has(_f.name);\n const isPromiseFunction = field._f && hasPromiseValidation(field._f);\n if (isPromiseFunction && _proxyFormState.validatingFields) {\n _updateIsValidating([name], true);\n }\n const fieldError = await validateField(field, _names.disabled, _formValues, shouldDisplayAllAssociatedErrors, _options.shouldUseNativeValidation && !shouldOnlyCheckValid, isFieldArrayRoot);\n if (isPromiseFunction && _proxyFormState.validatingFields) {\n _updateIsValidating([name]);\n }\n if (fieldError[_f.name]) {\n context.valid = false;\n if (shouldOnlyCheckValid) {\n break;\n }\n }\n !shouldOnlyCheckValid &&\n (get(fieldError, _f.name)\n ? isFieldArrayRoot\n ? updateFieldArrayRootError(_formState.errors, fieldError, _f.name)\n : set(_formState.errors, _f.name, fieldError[_f.name])\n : unset(_formState.errors, _f.name));\n }\n !isEmptyObject(fieldValue) &&\n (await executeBuiltInValidation(fieldValue, shouldOnlyCheckValid, context));\n }\n }\n return context.valid;\n };\n const _removeUnmounted = () => {\n for (const name of _names.unMount) {\n const field = get(_fields, name);\n field &&\n (field._f.refs\n ? field._f.refs.every((ref) => !live(ref))\n : !live(field._f.ref)) &&\n unregister(name);\n }\n _names.unMount = new Set();\n };\n const _getDirty = (name, data) => !_options.disabled &&\n (name && data && set(_formValues, name, data),\n !deepEqual(getValues(), _defaultValues));\n const _getWatch = (names, defaultValue, isGlobal) => generateWatchOutput(names, _names, {\n ...(_state.mount\n ? _formValues\n : isUndefined(defaultValue)\n ? _defaultValues\n : isString(names)\n ? { [names]: defaultValue }\n : defaultValue),\n }, isGlobal, defaultValue);\n const _getFieldArray = (name) => compact(get(_state.mount ? _formValues : _defaultValues, name, _options.shouldUnregister ? get(_defaultValues, name, []) : []));\n const setFieldValue = (name, value, options = {}) => {\n const field = get(_fields, name);\n let fieldValue = value;\n if (field) {\n const fieldReference = field._f;\n if (fieldReference) {\n !fieldReference.disabled &&\n set(_formValues, name, getFieldValueAs(value, fieldReference));\n fieldValue =\n isHTMLElement(fieldReference.ref) && isNullOrUndefined(value)\n ? ''\n : value;\n if (isMultipleSelect(fieldReference.ref)) {\n [...fieldReference.ref.options].forEach((optionRef) => (optionRef.selected = fieldValue.includes(optionRef.value)));\n }\n else if (fieldReference.refs) {\n if (isCheckBoxInput(fieldReference.ref)) {\n fieldReference.refs.length > 1\n ? fieldReference.refs.forEach((checkboxRef) => (!checkboxRef.defaultChecked || !checkboxRef.disabled) &&\n (checkboxRef.checked = Array.isArray(fieldValue)\n ? !!fieldValue.find((data) => data === checkboxRef.value)\n : fieldValue === checkboxRef.value))\n : fieldReference.refs[0] &&\n (fieldReference.refs[0].checked = !!fieldValue);\n }\n else {\n fieldReference.refs.forEach((radioRef) => (radioRef.checked = radioRef.value === fieldValue));\n }\n }\n else if (isFileInput(fieldReference.ref)) {\n fieldReference.ref.value = '';\n }\n else {\n fieldReference.ref.value = fieldValue;\n if (!fieldReference.ref.type) {\n _subjects.state.next({\n name,\n values: cloneObject(_formValues),\n });\n }\n }\n }\n }\n (options.shouldDirty || options.shouldTouch) &&\n updateTouchAndDirty(name, fieldValue, options.shouldTouch, options.shouldDirty, true);\n options.shouldValidate && trigger(name);\n };\n const setValues = (name, value, options) => {\n for (const fieldKey in value) {\n const fieldValue = value[fieldKey];\n const fieldName = `${name}.${fieldKey}`;\n const field = get(_fields, fieldName);\n (_names.array.has(name) ||\n isObject(fieldValue) ||\n (field && !field._f)) &&\n !isDateObject(fieldValue)\n ? setValues(fieldName, fieldValue, options)\n : setFieldValue(fieldName, fieldValue, options);\n }\n };\n const setValue = (name, value, options = {}) => {\n const field = get(_fields, name);\n const isFieldArray = _names.array.has(name);\n const cloneValue = cloneObject(value);\n set(_formValues, name, cloneValue);\n if (isFieldArray) {\n _subjects.array.next({\n name,\n values: cloneObject(_formValues),\n });\n if ((_proxyFormState.isDirty ||\n _proxyFormState.dirtyFields ||\n _proxySubscribeFormState.isDirty ||\n _proxySubscribeFormState.dirtyFields) &&\n options.shouldDirty) {\n _subjects.state.next({\n name,\n dirtyFields: getDirtyFields(_defaultValues, _formValues),\n isDirty: _getDirty(name, cloneValue),\n });\n }\n }\n else {\n field && !field._f && !isNullOrUndefined(cloneValue)\n ? setValues(name, cloneValue, options)\n : setFieldValue(name, cloneValue, options);\n }\n isWatched(name, _names) && _subjects.state.next({ ..._formState });\n _subjects.state.next({\n name: _state.mount ? name : undefined,\n values: cloneObject(_formValues),\n });\n };\n const onChange = async (event) => {\n _state.mount = true;\n const target = event.target;\n let name = target.name;\n let isFieldValueUpdated = true;\n const field = get(_fields, name);\n const _updateIsFieldValueUpdated = (fieldValue) => {\n isFieldValueUpdated =\n Number.isNaN(fieldValue) ||\n (isDateObject(fieldValue) && isNaN(fieldValue.getTime())) ||\n deepEqual(fieldValue, get(_formValues, name, fieldValue));\n };\n if (field) {\n let error;\n let isValid;\n const fieldValue = target.type\n ? getFieldValue(field._f)\n : getEventValue(event);\n const isBlurEvent = event.type === EVENTS.BLUR || event.type === EVENTS.FOCUS_OUT;\n const shouldSkipValidation = (!hasValidation(field._f) &&\n !_options.resolver &&\n !get(_formState.errors, name) &&\n !field._f.deps) ||\n skipValidation(isBlurEvent, get(_formState.touchedFields, name), _formState.isSubmitted, validationModeAfterSubmit, validationModeBeforeSubmit);\n const watched = isWatched(name, _names, isBlurEvent);\n set(_formValues, name, fieldValue);\n if (isBlurEvent) {\n field._f.onBlur && field._f.onBlur(event);\n delayErrorCallback && delayErrorCallback(0);\n }\n else if (field._f.onChange) {\n field._f.onChange(event);\n }\n const fieldState = updateTouchAndDirty(name, fieldValue, isBlurEvent);\n const shouldRender = !isEmptyObject(fieldState) || watched;\n !isBlurEvent &&\n _subjects.state.next({\n name,\n type: event.type,\n values: cloneObject(_formValues),\n });\n if (shouldSkipValidation) {\n if (_proxyFormState.isValid || _proxySubscribeFormState.isValid) {\n if (_options.mode === 'onBlur') {\n if (isBlurEvent) {\n _setValid();\n }\n }\n else if (!isBlurEvent) {\n _setValid();\n }\n }\n return (shouldRender &&\n _subjects.state.next({ name, ...(watched ? {} : fieldState) }));\n }\n !isBlurEvent && watched && _subjects.state.next({ ..._formState });\n if (_options.resolver) {\n const { errors } = await _runSchema([name]);\n _updateIsFieldValueUpdated(fieldValue);\n if (isFieldValueUpdated) {\n const previousErrorLookupResult = schemaErrorLookup(_formState.errors, _fields, name);\n const errorLookupResult = schemaErrorLookup(errors, _fields, previousErrorLookupResult.name || name);\n error = errorLookupResult.error;\n name = errorLookupResult.name;\n isValid = isEmptyObject(errors);\n }\n }\n else {\n _updateIsValidating([name], true);\n error = (await validateField(field, _names.disabled, _formValues, shouldDisplayAllAssociatedErrors, _options.shouldUseNativeValidation))[name];\n _updateIsValidating([name]);\n _updateIsFieldValueUpdated(fieldValue);\n if (isFieldValueUpdated) {\n if (error) {\n isValid = false;\n }\n else if (_proxyFormState.isValid ||\n _proxySubscribeFormState.isValid) {\n isValid = await executeBuiltInValidation(_fields, true);\n }\n }\n }\n if (isFieldValueUpdated) {\n field._f.deps &&\n trigger(field._f.deps);\n shouldRenderByError(name, isValid, error, fieldState);\n }\n }\n };\n const _focusInput = (ref, key) => {\n if (get(_formState.errors, key) && ref.focus) {\n ref.focus();\n return 1;\n }\n return;\n };\n const trigger = async (name, options = {}) => {\n let isValid;\n let validationResult;\n const fieldNames = convertToArrayPayload(name);\n if (_options.resolver) {\n const errors = await executeSchemaAndUpdateState(isUndefined(name) ? name : fieldNames);\n isValid = isEmptyObject(errors);\n validationResult = name\n ? !fieldNames.some((name) => get(errors, name))\n : isValid;\n }\n else if (name) {\n validationResult = (await Promise.all(fieldNames.map(async (fieldName) => {\n const field = get(_fields, fieldName);\n return await executeBuiltInValidation(field && field._f ? { [fieldName]: field } : field);\n }))).every(Boolean);\n !(!validationResult && !_formState.isValid) && _setValid();\n }\n else {\n validationResult = isValid = await executeBuiltInValidation(_fields);\n }\n _subjects.state.next({\n ...(!isString(name) ||\n ((_proxyFormState.isValid || _proxySubscribeFormState.isValid) &&\n isValid !== _formState.isValid)\n ? {}\n : { name }),\n ...(_options.resolver || !name ? { isValid } : {}),\n errors: _formState.errors,\n });\n options.shouldFocus &&\n !validationResult &&\n iterateFieldsByAction(_fields, _focusInput, name ? fieldNames : _names.mount);\n return validationResult;\n };\n const getValues = (fieldNames) => {\n const values = {\n ...(_state.mount ? _formValues : _defaultValues),\n };\n return isUndefined(fieldNames)\n ? values\n : isString(fieldNames)\n ? get(values, fieldNames)\n : fieldNames.map((name) => get(values, name));\n };\n const getFieldState = (name, formState) => ({\n invalid: !!get((formState || _formState).errors, name),\n isDirty: !!get((formState || _formState).dirtyFields, name),\n error: get((formState || _formState).errors, name),\n isValidating: !!get(_formState.validatingFields, name),\n isTouched: !!get((formState || _formState).touchedFields, name),\n });\n const clearErrors = (name) => {\n name &&\n convertToArrayPayload(name).forEach((inputName) => unset(_formState.errors, inputName));\n _subjects.state.next({\n errors: name ? _formState.errors : {},\n });\n };\n const setError = (name, error, options) => {\n const ref = (get(_fields, name, { _f: {} })._f || {}).ref;\n const currentError = get(_formState.errors, name) || {};\n // Don't override existing error messages elsewhere in the object tree.\n const { ref: currentRef, message, type, ...restOfErrorTree } = currentError;\n set(_formState.errors, name, {\n ...restOfErrorTree,\n ...error,\n ref,\n });\n _subjects.state.next({\n name,\n errors: _formState.errors,\n isValid: false,\n });\n options && options.shouldFocus && ref && ref.focus && ref.focus();\n };\n const watch = (name, defaultValue) => isFunction(name)\n ? _subjects.state.subscribe({\n next: (payload) => name(_getWatch(undefined, defaultValue), payload),\n })\n : _getWatch(name, defaultValue, true);\n const _subscribe = (props) => _subjects.state.subscribe({\n next: (formState) => {\n if (shouldSubscribeByName(props.name, formState.name, props.exact) &&\n shouldRenderFormState(formState, props.formState || _proxyFormState, _setFormState, props.reRenderRoot)) {\n props.callback({\n values: { ..._formValues },\n ..._formState,\n ...formState,\n });\n }\n },\n }).unsubscribe;\n const subscribe = (props) => {\n _state.mount = true;\n _proxySubscribeFormState = {\n ..._proxySubscribeFormState,\n ...props.formState,\n };\n return _subscribe({\n ...props,\n formState: _proxySubscribeFormState,\n });\n };\n const unregister = (name, options = {}) => {\n for (const fieldName of name ? convertToArrayPayload(name) : _names.mount) {\n _names.mount.delete(fieldName);\n _names.array.delete(fieldName);\n if (!options.keepValue) {\n unset(_fields, fieldName);\n unset(_formValues, fieldName);\n }\n !options.keepError && unset(_formState.errors, fieldName);\n !options.keepDirty && unset(_formState.dirtyFields, fieldName);\n !options.keepTouched && unset(_formState.touchedFields, fieldName);\n !options.keepIsValidating &&\n unset(_formState.validatingFields, fieldName);\n !_options.shouldUnregister &&\n !options.keepDefaultValue &&\n unset(_defaultValues, fieldName);\n }\n _subjects.state.next({\n values: cloneObject(_formValues),\n });\n _subjects.state.next({\n ..._formState,\n ...(!options.keepDirty ? {} : { isDirty: _getDirty() }),\n });\n !options.keepIsValid && _setValid();\n };\n const _setDisabledField = ({ disabled, name, }) => {\n if ((isBoolean(disabled) && _state.mount) ||\n !!disabled ||\n _names.disabled.has(name)) {\n disabled ? _names.disabled.add(name) : _names.disabled.delete(name);\n }\n };\n const register = (name, options = {}) => {\n let field = get(_fields, name);\n const disabledIsDefined = isBoolean(options.disabled) || isBoolean(_options.disabled);\n set(_fields, name, {\n ...(field || {}),\n _f: {\n ...(field && field._f ? field._f : { ref: { name } }),\n name,\n mount: true,\n ...options,\n },\n });\n _names.mount.add(name);\n if (field) {\n _setDisabledField({\n disabled: isBoolean(options.disabled)\n ? options.disabled\n : _options.disabled,\n name,\n });\n }\n else {\n updateValidAndValue(name, true, options.value);\n }\n return {\n ...(disabledIsDefined\n ? { disabled: options.disabled || _options.disabled }\n : {}),\n ...(_options.progressive\n ? {\n required: !!options.required,\n min: getRuleValue(options.min),\n max: getRuleValue(options.max),\n minLength: getRuleValue(options.minLength),\n maxLength: getRuleValue(options.maxLength),\n pattern: getRuleValue(options.pattern),\n }\n : {}),\n name,\n onChange,\n onBlur: onChange,\n ref: (ref) => {\n if (ref) {\n register(name, options);\n field = get(_fields, name);\n const fieldRef = isUndefined(ref.value)\n ? ref.querySelectorAll\n ? ref.querySelectorAll('input,select,textarea')[0] || ref\n : ref\n : ref;\n const radioOrCheckbox = isRadioOrCheckbox(fieldRef);\n const refs = field._f.refs || [];\n if (radioOrCheckbox\n ? refs.find((option) => option === fieldRef)\n : fieldRef === field._f.ref) {\n return;\n }\n set(_fields, name, {\n _f: {\n ...field._f,\n ...(radioOrCheckbox\n ? {\n refs: [\n ...refs.filter(live),\n fieldRef,\n ...(Array.isArray(get(_defaultValues, name)) ? [{}] : []),\n ],\n ref: { type: fieldRef.type, name },\n }\n : { ref: fieldRef }),\n },\n });\n updateValidAndValue(name, false, undefined, fieldRef);\n }\n else {\n field = get(_fields, name, {});\n if (field._f) {\n field._f.mount = false;\n }\n (_options.shouldUnregister || options.shouldUnregister) &&\n !(isNameInFieldArray(_names.array, name) && _state.action) &&\n _names.unMount.add(name);\n }\n },\n };\n };\n const _focusError = () => _options.shouldFocusError &&\n iterateFieldsByAction(_fields, _focusInput, _names.mount);\n const _disableForm = (disabled) => {\n if (isBoolean(disabled)) {\n _subjects.state.next({ disabled });\n iterateFieldsByAction(_fields, (ref, name) => {\n const currentField = get(_fields, name);\n if (currentField) {\n ref.disabled = currentField._f.disabled || disabled;\n if (Array.isArray(currentField._f.refs)) {\n currentField._f.refs.forEach((inputRef) => {\n inputRef.disabled = currentField._f.disabled || disabled;\n });\n }\n }\n }, 0, false);\n }\n };\n const handleSubmit = (onValid, onInvalid) => async (e) => {\n let onValidError = undefined;\n if (e) {\n e.preventDefault && e.preventDefault();\n e.persist &&\n e.persist();\n }\n let fieldValues = cloneObject(_formValues);\n _subjects.state.next({\n isSubmitting: true,\n });\n if (_options.resolver) {\n const { errors, values } = await _runSchema();\n _formState.errors = errors;\n fieldValues = values;\n }\n else {\n await executeBuiltInValidation(_fields);\n }\n if (_names.disabled.size) {\n for (const name of _names.disabled) {\n set(fieldValues, name, undefined);\n }\n }\n unset(_formState.errors, 'root');\n if (isEmptyObject(_formState.errors)) {\n _subjects.state.next({\n errors: {},\n });\n try {\n await onValid(fieldValues, e);\n }\n catch (error) {\n onValidError = error;\n }\n }\n else {\n if (onInvalid) {\n await onInvalid({ ..._formState.errors }, e);\n }\n _focusError();\n setTimeout(_focusError);\n }\n _subjects.state.next({\n isSubmitted: true,\n isSubmitting: false,\n isSubmitSuccessful: isEmptyObject(_formState.errors) && !onValidError,\n submitCount: _formState.submitCount + 1,\n errors: _formState.errors,\n });\n if (onValidError) {\n throw onValidError;\n }\n };\n const resetField = (name, options = {}) => {\n if (get(_fields, name)) {\n if (isUndefined(options.defaultValue)) {\n setValue(name, cloneObject(get(_defaultValues, name)));\n }\n else {\n setValue(name, options.defaultValue);\n set(_defaultValues, name, cloneObject(options.defaultValue));\n }\n if (!options.keepTouched) {\n unset(_formState.touchedFields, name);\n }\n if (!options.keepDirty) {\n unset(_formState.dirtyFields, name);\n _formState.isDirty = options.defaultValue\n ? _getDirty(name, cloneObject(get(_defaultValues, name)))\n : _getDirty();\n }\n if (!options.keepError) {\n unset(_formState.errors, name);\n _proxyFormState.isValid && _setValid();\n }\n _subjects.state.next({ ..._formState });\n }\n };\n const _reset = (formValues, keepStateOptions = {}) => {\n const updatedValues = formValues ? cloneObject(formValues) : _defaultValues;\n const cloneUpdatedValues = cloneObject(updatedValues);\n const isEmptyResetValues = isEmptyObject(formValues);\n const values = isEmptyResetValues ? _defaultValues : cloneUpdatedValues;\n if (!keepStateOptions.keepDefaultValues) {\n _defaultValues = updatedValues;\n }\n if (!keepStateOptions.keepValues) {\n if (keepStateOptions.keepDirtyValues) {\n const fieldsToCheck = new Set([\n ..._names.mount,\n ...Object.keys(getDirtyFields(_defaultValues, _formValues)),\n ]);\n for (const fieldName of Array.from(fieldsToCheck)) {\n get(_formState.dirtyFields, fieldName)\n ? set(values, fieldName, get(_formValues, fieldName))\n : setValue(fieldName, get(values, fieldName));\n }\n }\n else {\n if (isWeb && isUndefined(formValues)) {\n for (const name of _names.mount) {\n const field = get(_fields, name);\n if (field && field._f) {\n const fieldReference = Array.isArray(field._f.refs)\n ? field._f.refs[0]\n : field._f.ref;\n if (isHTMLElement(fieldReference)) {\n const form = fieldReference.closest('form');\n if (form) {\n form.reset();\n break;\n }\n }\n }\n }\n }\n for (const fieldName of _names.mount) {\n setValue(fieldName, get(values, fieldName));\n }\n }\n _formValues = cloneObject(values);\n _subjects.array.next({\n values: { ...values },\n });\n _subjects.state.next({\n values: { ...values },\n });\n }\n _names = {\n mount: keepStateOptions.keepDirtyValues ? _names.mount : new Set(),\n unMount: new Set(),\n array: new Set(),\n disabled: new Set(),\n watch: new Set(),\n watchAll: false,\n focus: '',\n };\n _state.mount =\n !_proxyFormState.isValid ||\n !!keepStateOptions.keepIsValid ||\n !!keepStateOptions.keepDirtyValues;\n _state.watch = !!_options.shouldUnregister;\n _subjects.state.next({\n submitCount: keepStateOptions.keepSubmitCount\n ? _formState.submitCount\n : 0,\n isDirty: isEmptyResetValues\n ? false\n : keepStateOptions.keepDirty\n ? _formState.isDirty\n : !!(keepStateOptions.keepDefaultValues &&\n !deepEqual(formValues, _defaultValues)),\n isSubmitted: keepStateOptions.keepIsSubmitted\n ? _formState.isSubmitted\n : false,\n dirtyFields: isEmptyResetValues\n ? {}\n : keepStateOptions.keepDirtyValues\n ? keepStateOptions.keepDefaultValues && _formValues\n ? getDirtyFields(_defaultValues, _formValues)\n : _formState.dirtyFields\n : keepStateOptions.keepDefaultValues && formValues\n ? getDirtyFields(_defaultValues, formValues)\n : keepStateOptions.keepDirty\n ? _formState.dirtyFields\n : {},\n touchedFields: keepStateOptions.keepTouched\n ? _formState.touchedFields\n : {},\n errors: keepStateOptions.keepErrors ? _formState.errors : {},\n isSubmitSuccessful: keepStateOptions.keepIsSubmitSuccessful\n ? _formState.isSubmitSuccessful\n : false,\n isSubmitting: false,\n });\n };\n const reset = (formValues, keepStateOptions) => _reset(isFunction(formValues)\n ? formValues(_formValues)\n : formValues, keepStateOptions);\n const setFocus = (name, options = {}) => {\n const field = get(_fields, name);\n const fieldReference = field && field._f;\n if (fieldReference) {\n const fieldRef = fieldReference.refs\n ? fieldReference.refs[0]\n : fieldReference.ref;\n if (fieldRef.focus) {\n fieldRef.focus();\n options.shouldSelect &&\n isFunction(fieldRef.select) &&\n fieldRef.select();\n }\n }\n };\n const _setFormState = (updatedFormState) => {\n _formState = {\n ..._formState,\n ...updatedFormState,\n };\n };\n const _resetDefaultValues = () => isFunction(_options.defaultValues) &&\n _options.defaultValues().then((values) => {\n reset(values, _options.resetOptions);\n _subjects.state.next({\n isLoading: false,\n });\n });\n const methods = {\n control: {\n register,\n unregister,\n getFieldState,\n handleSubmit,\n setError,\n _subscribe,\n _runSchema,\n _getWatch,\n _getDirty,\n _setValid,\n _setFieldArray,\n _setDisabledField,\n _setErrors,\n _getFieldArray,\n _reset,\n _resetDefaultValues,\n _removeUnmounted,\n _disableForm,\n _subjects,\n _proxyFormState,\n get _fields() {\n return _fields;\n },\n get _formValues() {\n return _formValues;\n },\n get _state() {\n return _state;\n },\n set _state(value) {\n _state = value;\n },\n get _defaultValues() {\n return _defaultValues;\n },\n get _names() {\n return _names;\n },\n set _names(value) {\n _names = value;\n },\n get _formState() {\n return _formState;\n },\n get _options() {\n return _options;\n },\n set _options(value) {\n _options = {\n ..._options,\n ...value,\n };\n },\n },\n subscribe,\n trigger,\n register,\n handleSubmit,\n watch,\n setValue,\n getValues,\n reset,\n resetField,\n clearErrors,\n unregister,\n setError,\n setFocus,\n getFieldState,\n };\n return {\n ...methods,\n formControl: methods,\n };\n}\n\nvar generateId = () => {\n const d = typeof performance === 'undefined' ? Date.now() : performance.now() * 1000;\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {\n const r = (Math.random() * 16 + d) % 16 | 0;\n return (c == 'x' ? r : (r & 0x3) | 0x8).toString(16);\n });\n};\n\nvar getFocusFieldName = (name, index, options = {}) => options.shouldFocus || isUndefined(options.shouldFocus)\n ? options.focusName ||\n `${name}.${isUndefined(options.focusIndex) ? index : options.focusIndex}.`\n : '';\n\nvar appendAt = (data, value) => [\n ...data,\n ...convertToArrayPayload(value),\n];\n\nvar fillEmptyArray = (value) => Array.isArray(value) ? value.map(() => undefined) : undefined;\n\nfunction insert(data, index, value) {\n return [\n ...data.slice(0, index),\n ...convertToArrayPayload(value),\n ...data.slice(index),\n ];\n}\n\nvar moveArrayAt = (data, from, to) => {\n if (!Array.isArray(data)) {\n return [];\n }\n if (isUndefined(data[to])) {\n data[to] = undefined;\n }\n data.splice(to, 0, data.splice(from, 1)[0]);\n return data;\n};\n\nvar prependAt = (data, value) => [\n ...convertToArrayPayload(value),\n ...convertToArrayPayload(data),\n];\n\nfunction removeAtIndexes(data, indexes) {\n let i = 0;\n const temp = [...data];\n for (const index of indexes) {\n temp.splice(index - i, 1);\n i++;\n }\n return compact(temp).length ? temp : [];\n}\nvar removeArrayAt = (data, index) => isUndefined(index)\n ? []\n : removeAtIndexes(data, convertToArrayPayload(index).sort((a, b) => a - b));\n\nvar swapArrayAt = (data, indexA, indexB) => {\n [data[indexA], data[indexB]] = [data[indexB], data[indexA]];\n};\n\nvar updateAt = (fieldValues, index, value) => {\n fieldValues[index] = value;\n return fieldValues;\n};\n\n/**\n * A custom hook that exposes convenient methods to perform operations with a list of dynamic inputs that need to be appended, updated, removed etc. • [Demo](https://codesandbox.io/s/react-hook-form-usefieldarray-ssugn) • [Video](https://youtu.be/4MrbfGSFY2A)\n *\n * @remarks\n * [API](https://react-hook-form.com/docs/usefieldarray) • [Demo](https://codesandbox.io/s/react-hook-form-usefieldarray-ssugn)\n *\n * @param props - useFieldArray props\n *\n * @returns methods - functions to manipulate with the Field Arrays (dynamic inputs) {@link UseFieldArrayReturn}\n *\n * @example\n * ```tsx\n * function App() {\n * const { register, control, handleSubmit, reset, trigger, setError } = useForm({\n * defaultValues: {\n * test: []\n * }\n * });\n * const { fields, append } = useFieldArray({\n * control,\n * name: \"test\"\n * });\n *\n * return (\n * <form onSubmit={handleSubmit(data => console.log(data))}>\n * {fields.map((item, index) => (\n * <input key={item.id} {...register(`test.${index}.firstName`)} />\n * ))}\n * <button type=\"button\" onClick={() => append({ firstName: \"bill\" })}>\n * append\n * </button>\n * <input type=\"submit\" />\n * </form>\n * );\n * }\n * ```\n */\nfunction useFieldArray(props) {\n const methods = useFormContext();\n const { control = methods.control, name, keyName = 'id', shouldUnregister, rules, } = props;\n const [fields, setFields] = React.useState(control._getFieldArray(name));\n const ids = React.useRef(control._getFieldArray(name).map(generateId));\n const _fieldIds = React.useRef(fields);\n const _name = React.useRef(name);\n const _actioned = React.useRef(false);\n _name.current = name;\n _fieldIds.current = fields;\n control._names.array.add(name);\n rules &&\n control.register(name, rules);\n React.useEffect(() => control._subjects.array.subscribe({\n next: ({ values, name: fieldArrayName, }) => {\n if (fieldArrayName === _name.current || !fieldArrayName) {\n const fieldValues = get(values, _name.current);\n if (Array.isArray(fieldValues)) {\n setFields(fieldValues);\n ids.current = fieldValues.map(generateId);\n }\n }\n },\n }).unsubscribe, [control]);\n const updateValues = React.useCallback((updatedFieldArrayValues) => {\n _actioned.current = true;\n control._setFieldArray(name, updatedFieldArrayValues);\n }, [control, name]);\n const append = (value, options) => {\n const appendValue = convertToArrayPayload(cloneObject(value));\n const updatedFieldArrayValues = appendAt(control._getFieldArray(name), appendValue);\n control._names.focus = getFocusFieldName(name, updatedFieldArrayValues.length - 1, options);\n ids.current = appendAt(ids.current, appendValue.map(generateId));\n updateValues(updatedFieldArrayValues);\n setFields(updatedFieldArrayValues);\n control._setFieldArray(name, updatedFieldArrayValues, appendAt, {\n argA: fillEmptyArray(value),\n });\n };\n const prepend = (value, options) => {\n const prependValue = convertToArrayPayload(cloneObject(value));\n const updatedFieldArrayValues = prependAt(control._getFieldArray(name), prependValue);\n control._names.focus = getFocusFieldName(name, 0, options);\n ids.current = prependAt(ids.current, prependValue.map(generateId));\n updateValues(updatedFieldArrayValues);\n setFields(updatedFieldArrayValues);\n control._setFieldArray(name, updatedFieldArrayValues, prependAt, {\n argA: fillEmptyArray(value),\n });\n };\n const remove = (index) => {\n const updatedFieldArrayValues = removeArrayAt(control._getFieldArray(name), index);\n ids.current = removeArrayAt(ids.current, index);\n updateValues(updatedFieldArrayValues);\n setFields(updatedFieldArrayValues);\n !Array.isArray(get(control._fields, name)) &&\n set(control._fields, name, undefined);\n control._setFieldArray(name, updatedFieldArrayValues, removeArrayAt, {\n argA: index,\n });\n };\n const insert$1 = (index, value, options) => {\n const insertValue = convertToArrayPayload(cloneObject(value));\n const updatedFieldArrayValues = insert(control._getFieldArray(name), index, insertValue);\n control._names.focus = getFocusFieldName(name, index, options);\n ids.current = insert(ids.current, index, insertValue.map(generateId));\n updateValues(updatedFieldArrayValues);\n setFields(updatedFieldArrayValues);\n control._setFieldArray(name, updatedFieldArrayValues, insert, {\n argA: index,\n argB: fillEmptyArray(value),\n });\n };\n const swap = (indexA, indexB) => {\n const updatedFieldArrayValues = control._getFieldArray(name);\n swapArrayAt(updatedFieldArrayValues, indexA, indexB);\n swapArrayAt(ids.current, indexA, indexB);\n updateValues(updatedFieldArrayValues);\n setFields(updatedFieldArrayValues);\n control._setFieldArray(name, updatedFieldArrayValues, swapArrayAt, {\n argA: indexA,\n argB: indexB,\n }, false);\n };\n const move = (from, to) => {\n const updatedFieldArrayValues = control._getFieldArray(name);\n moveArrayAt(updatedFieldArrayValues, from, to);\n moveArrayAt(ids.current, from, to);\n updateValues(updatedFieldArrayValues);\n setFields(updatedFieldArrayValues);\n control._setFieldArray(name, updatedFieldArrayValues, moveArrayAt, {\n argA: from,\n argB: to,\n }, false);\n };\n const update = (index, value) => {\n const updateValue = cloneObject(value);\n const updatedFieldArrayValues = updateAt(control._getFieldArray(name), index, updateValue);\n ids.current = [...updatedFieldArrayValues].map((item, i) => !item || i === index ? generateId() : ids.current[i]);\n updateValues(updatedFieldArrayValues);\n setFields([...updatedFieldArrayValues]);\n control._setFieldArray(name, updatedFieldArrayValues, updateAt, {\n argA: index,\n argB: updateValue,\n }, true, false);\n };\n const replace = (value) => {\n const updatedFieldArrayValues = convertToArrayPayload(cloneObject(value));\n ids.current = updatedFieldArrayValues.map(generateId);\n updateValues([...updatedFieldArrayValues]);\n setFields([...updatedFieldArrayValues]);\n control._setFieldArray(name, [...updatedFieldArrayValues], (data) => data, {}, true, false);\n };\n React.useEffect(() => {\n control._state.action = false;\n isWatched(name, control._names) &&\n control._subjects.state.next({\n ...control._formState,\n });\n if (_actioned.current &&\n (!getValidationModes(control._options.mode).isOnSubmit ||\n control._formState.isSubmitted) &&\n !getValidationModes(control._options.reValidateMode).isOnSubmit) {\n if (control._options.resolver) {\n control._runSchema([name]).then((result) => {\n const error = get(result.errors, name);\n const existingError = get(control._formState.errors, name);\n if (existingError\n ? (!error && existingError.type) ||\n (error &&\n (existingError.type !== error.type ||\n existingError.message !== error.message))\n : error && error.type) {\n error\n ? set(control._formState.errors, name, error)\n : unset(control._formState.errors, name);\n control._subjects.state.next({\n errors: control._formState.errors,\n });\n }\n });\n }\n else {\n const field = get(control._fields, name);\n if (field &&\n field._f &&\n !(getValidationModes(control._options.reValidateMode).isOnSubmit &&\n getValidationModes(control._options.mode).isOnSubmit)) {\n validateField(field, control._names.disabled, control._formValues, control._options.criteriaMode === VALIDATION_MODE.all, control._options.shouldUseNativeValidation, true).then((error) => !isEmptyObject(error) &&\n control._subjects.state.next({\n errors: updateFieldArrayRootError(control._formState.errors, error, name),\n }));\n }\n }\n }\n control._subjects.state.next({\n name,\n values: cloneObject(control._formValues),\n });\n control._names.focus &&\n iterateFieldsByAction(control._fields, (ref, key) => {\n if (control._names.focus &&\n key.startsWith(control._names.focus) &&\n ref.focus) {\n ref.focus();\n return 1;\n }\n return;\n });\n control._names.focus = '';\n control._setValid();\n _actioned.current = false;\n }, [fields, name, control]);\n React.useEffect(() => {\n !get(control._formValues, name) && control._setFieldArray(name);\n return () => {\n const updateMounted = (name, value) => {\n const field = get(control._fields, name);\n if (field && field._f) {\n field._f.mount = value;\n }\n };\n control._options.shouldUnregister || shouldUnregister\n ? control.unregister(name)\n : updateMounted(name, false);\n };\n }, [name, control, keyName, shouldUnregister]);\n return {\n swap: React.useCallback(swap, [updateValues, name, control]),\n move: React.useCallback(move, [updateValues, name, control]),\n prepend: React.useCallback(prepend, [updateValues, name, control]),\n append: React.useCallback(append, [updateValues, name, control]),\n remove: React.useCallback(remove, [updateValues, name, control]),\n insert: React.useCallback(insert$1, [updateValues, name, control]),\n update: React.useCallback(update, [updateValues, name, control]),\n replace: React.useCallback(replace, [updateValues, name, control]),\n fields: React.useMemo(() => fields.map((field, index) => ({\n ...field,\n [keyName]: ids.current[index] || generateId(),\n })), [fields, keyName]),\n };\n}\n\n/**\n * Custom hook to manage the entire form.\n *\n * @remarks\n * [API](https://react-hook-form.com/docs/useform) • [Demo](https://codesandbox.io/s/react-hook-form-get-started-ts-5ksmm) • [Video](https://www.youtube.com/watch?v=RkXv4AXXC_4)\n *\n * @param props - form configuration and validation parameters.\n *\n * @returns methods - individual functions to manage the form state. {@link UseFormReturn}\n *\n * @example\n * ```tsx\n * function App() {\n * const { register, handleSubmit, watch, formState: { errors } } = useForm();\n * const onSubmit = data => console.log(data);\n *\n * console.log(watch(\"example\"));\n *\n * return (\n * <form onSubmit={handleSubmit(onSubmit)}>\n * <input defaultValue=\"test\" {...register(\"example\")} />\n * <input {...register(\"exampleRequired\", { required: true })} />\n * {errors.exampleRequired && <span>This field is required</span>}\n * <button>Submit</button>\n * </form>\n * );\n * }\n * ```\n */\nfunction useForm(props = {}) {\n const _formControl = React.useRef(undefined);\n const _values = React.useRef(undefined);\n const [formState, updateFormState] = React.useState({\n isDirty: false,\n isValidating: false,\n isLoading: isFunction(props.defaultValues),\n isSubmitted: false,\n isSubmitting: false,\n isSubmitSuccessful: false,\n isValid: false,\n submitCount: 0,\n dirtyFields: {},\n touchedFields: {},\n validatingFields: {},\n errors: props.errors || {},\n disabled: props.disabled || false,\n defaultValues: isFunction(props.defaultValues)\n ? undefined\n : props.defaultValues,\n });\n if (!_formControl.current) {\n _formControl.current = {\n ...(props.formControl ? props.formControl : createFormControl(props)),\n formState,\n };\n if (props.formControl &&\n props.defaultValues &&\n !isFunction(props.defaultValues)) {\n props.formControl.reset(props.defaultValues, props.resetOptions);\n }\n }\n const control = _formControl.current.control;\n control._options = props;\n React.useLayoutEffect(() => control._subscribe({\n formState: control._proxyFormState,\n callback: () => updateFormState({ ...control._formState }),\n reRenderRoot: true,\n }), [control]);\n React.useEffect(() => control._disableForm(props.disabled), [control, props.disabled]);\n React.useEffect(() => {\n if (control._proxyFormState.isDirty) {\n const isDirty = control._getDirty();\n if (isDirty !== formState.isDirty) {\n control._subjects.state.next({\n isDirty,\n });\n }\n }\n }, [control, formState.isDirty]);\n React.useEffect(() => {\n if (props.values && !deepEqual(props.values, _values.current)) {\n control._reset(props.values, control._options.resetOptions);\n _values.current = props.values;\n updateFormState((state) => ({ ...state }));\n }\n else {\n control._resetDefaultValues();\n }\n }, [props.values, control]);\n React.useEffect(() => {\n if (props.errors && !isEmptyObject(props.errors)) {\n control._setErrors(props.errors);\n }\n }, [props.errors, control]);\n React.useEffect(() => {\n if (!control._state.mount) {\n control._setValid();\n control._state.mount = true;\n }\n if (control._state.watch) {\n control._state.watch = false;\n control._subjects.state.next({ ...control._formState });\n }\n control._removeUnmounted();\n });\n React.useEffect(() => {\n props.shouldUnregister &&\n control._subjects.state.next({\n values: control._getWatch(),\n });\n }, [props.shouldUnregister, control]);\n _formControl.current.formState = getProxyFormState(formState, control);\n return _formControl.current;\n}\n\nexport { Controller, Form, FormProvider, appendErrors, createFormControl, get, set, useController, useFieldArray, useForm, useFormContext, useFormState, useWatch };\n//# sourceMappingURL=index.esm.mjs.map\n"],"names":["type"],"mappings":"qBAEA,+HACmB,sBAATA","x_google_ignoreList":[0]}
|
@@ -1,2 +0,0 @@
|
|
1
|
-
import{__assign as r}from"../../../../tslib/tslib.es6/index.mjs";import*as e from"react";import{RemoveScroll as s}from"../UI/index.mjs";import m from"../sidecar/index.mjs";var a=e.forwardRef((function(a,t){return e.createElement(s,r({},a,{ref:t,sideCar:m}))}));a.classNames=s.classNames;export{a as default};
|
2
|
-
//# sourceMappingURL=index.mjs.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../../node_modules/react-remove-scroll/dist/es2015/Combination.js"],"sourcesContent":["import { __assign } from \"tslib\";\nimport * as React from 'react';\nimport { RemoveScroll } from './UI';\nimport SideCar from './sidecar';\nvar ReactRemoveScroll = React.forwardRef(function (props, ref) { return (React.createElement(RemoveScroll, __assign({}, props, { ref: ref, sideCar: SideCar }))); });\nReactRemoveScroll.classNames = RemoveScroll.classNames;\nexport default ReactRemoveScroll;\n"],"names":["ReactRemoveScroll","React","forwardRef","props","ref","createElement","RemoveScroll","__assign","sideCar","SideCar","classNames"],"mappings":"4KAIA,IAAIA,EAAoBC,EAAMC,YAAW,SAAUC,EAAOC,GAAO,OAAQH,EAAMI,cAAcC,EAAcC,EAAS,CAAA,EAAIJ,EAAO,CAAEC,IAAKA,EAAKI,QAASC,IAAc,IAClKT,EAAkBU,WAAaJ,EAAaI","x_google_ignoreList":[0]}
|