@memobit/libs 2.1.0 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Accordion/Accordion.css +1 -0
- package/dist/components/Accordion/Accordion2.js +79 -0
- package/dist/components/AlertDialog/AlertDialog.css +1 -0
- package/dist/components/AlertDialog/AlertDialog2.js +26 -0
- package/dist/components/AnalogClock/AnalogClock.css +1 -0
- package/dist/components/AnalogClock/AnalogClock2.js +293 -0
- package/dist/components/AngleSlider/AngleSlider.css +1 -0
- package/dist/components/AngleSlider/AngleSlider2.js +135 -0
- package/dist/components/AppHeader/AppHeader.css +1 -0
- package/dist/components/AppHeader/AppHeader2.js +44 -0
- package/dist/components/Auth/ChangePasswordModal/ChangePasswordModal.css +1 -0
- package/dist/components/Auth/ChangePasswordModal/ChangePasswordModal2.js +138 -0
- package/dist/components/Auth/Login/Login.css +1 -0
- package/dist/components/Auth/Login/Login2.js +155 -0
- package/dist/components/Auth/MfaSetupModal/MfaSetupModal.css +1 -0
- package/dist/components/Auth/MfaSetupModal/MfaSetupModal2.js +327 -0
- package/dist/components/AvatarInitials/AvatarInitials.css +1 -0
- package/dist/components/AvatarInitials/AvatarInitials2.js +73 -0
- package/dist/components/BMI/BMI.css +1 -0
- package/dist/components/BMI/BMI2.js +53 -0
- package/dist/components/BMI/bmiUtils.js +265 -0
- package/dist/components/Badge/Badge.css +1 -0
- package/dist/components/Badge/Badge2.js +30 -0
- package/dist/components/Banner/Banner.css +1 -0
- package/dist/components/Banner/Banner2.js +57 -0
- package/dist/components/Blockquote/Blockquote.css +1 -0
- package/dist/components/Blockquote/Blockquote2.js +55 -0
- package/dist/components/Breadcrumb/Breadcrumb.css +1 -0
- package/dist/components/Breadcrumb/Breadcrumb2.js +36 -0
- package/dist/components/BulkActionBar/BulkActionBar.css +1 -0
- package/dist/components/BulkActionBar/BulkActionBar2.js +39 -0
- package/dist/components/Button/Button.css +1 -0
- package/dist/components/Button/Button2.js +32 -0
- package/dist/components/Calendar/Calendar.css +1 -0
- package/dist/components/Calendar/Calendar2.js +279 -0
- package/dist/components/CalendarHeatmap/CalendarHeatmap.css +1 -0
- package/dist/components/CalendarHeatmap/CalendarHeatmap2.js +91 -0
- package/dist/components/Card/Card.css +1 -0
- package/dist/components/Card/Card2.js +47 -0
- package/dist/components/Checkbox/Checkbox.css +1 -0
- package/dist/components/Checkbox/Checkbox2.js +35 -0
- package/dist/components/Chip/Chip.css +1 -0
- package/dist/components/Chip/Chip2.js +31 -0
- package/dist/components/CollapsibleSection/CollapsibleSection.css +1 -0
- package/dist/components/CollapsibleSection/CollapsibleSection2.js +68 -0
- package/dist/components/ColorPicker/ColorPicker.css +1 -0
- package/dist/components/ColorPicker/ColorPicker2.js +257 -0
- package/dist/components/CommandPalette/CommandPalette.css +1 -0
- package/dist/components/CommandPalette/CommandPalette2.js +97 -0
- package/dist/components/Confetti/Confetti.css +1 -0
- package/dist/components/Confetti/Confetti2.js +175 -0
- package/dist/components/ConfirmDialog/ConfirmDialog.css +1 -0
- package/dist/components/ConfirmDialog/ConfirmDialog2.js +37 -0
- package/dist/components/ConfirmPopover/ConfirmPopover.css +1 -0
- package/dist/components/ConfirmPopover/ConfirmPopover2.js +55 -0
- package/dist/components/ContextMenu/ContextMenu.css +1 -0
- package/dist/components/ContextMenu/ContextMenu2.js +53 -0
- package/dist/components/ContextToast/ContextToast.css +1 -0
- package/dist/components/ContextToast/ContextToast2.js +96 -0
- package/dist/components/ControlPanel/ControlPanel.css +1 -0
- package/dist/components/ControlPanel/ControlPanel.types.js +21 -0
- package/dist/components/ControlPanel/ControlPanel2.js +137 -0
- package/dist/components/ControlPanel/ControlPanelContext.js +31 -0
- package/dist/components/ControlPanel/ControlPanelFilter.js +386 -0
- package/dist/components/ControlPanel/ControlPanelNav.js +74 -0
- package/dist/components/ControlPanel/ControlPanelOptions.js +197 -0
- package/dist/components/CopyButton/CopyButton.css +1 -0
- package/dist/components/CopyButton/CopyButton2.js +48 -0
- package/dist/components/CountryWithFlag/CountryWithFlag.css +1 -0
- package/dist/components/CountryWithFlag/CountryWithFlag2.js +21 -0
- package/dist/components/DataView/DataView.CardView.js +189 -0
- package/dist/components/DataView/DataView.ColumnSelector.js +51 -0
- package/dist/components/DataView/DataView.MiniSort.js +25 -0
- package/dist/components/DataView/DataView.css +1 -0
- package/dist/components/DataView/DataView2.js +433 -0
- package/dist/components/DatePicker/DatePicker.css +1 -0
- package/dist/components/DatePicker/DatePicker2.js +151 -0
- package/dist/components/DateRangePicker/DateRangePicker.css +1 -0
- package/dist/components/DateRangePicker/DateRangePicker2.js +223 -0
- package/dist/components/DayAgenda/DayAgenda.css +1 -0
- package/dist/components/DayAgenda/DayAgenda2.js +120 -0
- package/dist/components/DiffViewer/DiffViewer.css +1 -0
- package/dist/components/DiffViewer/DiffViewer2.js +270 -0
- package/dist/components/Drawer/Drawer.css +1 -0
- package/dist/components/Drawer/Drawer2.js +119 -0
- package/dist/components/Dropdown/Dropdown.css +1 -0
- package/dist/components/Dropdown/Dropdown2.js +413 -0
- package/dist/components/EmojiPicker/EmojiPicker.css +1 -0
- package/dist/components/EmojiPicker/EmojiPicker2.js +789 -0
- package/dist/components/EmojiPicker/emojiKeywords/activities.js +508 -0
- package/dist/components/EmojiPicker/emojiKeywords/animals.js +501 -0
- package/dist/components/EmojiPicker/emojiKeywords/food.js +540 -0
- package/dist/components/EmojiPicker/emojiKeywords/index.js +21 -0
- package/dist/components/EmojiPicker/emojiKeywords/objects.js +652 -0
- package/dist/components/EmojiPicker/emojiKeywords/people.js +488 -0
- package/dist/components/EmojiPicker/emojiKeywords/smileys.js +538 -0
- package/dist/components/EmojiPicker/emojiKeywords/symbols.js +597 -0
- package/dist/components/EmojiPicker/emojiKeywords/travel.js +507 -0
- package/dist/components/EmptyState/EmptyState.css +1 -0
- package/dist/components/EmptyState/EmptyState2.js +47 -0
- package/dist/components/ErrorBoundary/ErrorBoundary.css +1 -0
- package/dist/components/ErrorBoundary/ErrorBoundary2.js +37 -0
- package/dist/components/EventCalendar/EventCalendar.Chip.js +45 -0
- package/dist/components/EventCalendar/EventCalendar.Month.js +118 -0
- package/dist/components/EventCalendar/EventCalendar.Week.js +131 -0
- package/dist/components/EventCalendar/EventCalendar.css +1 -0
- package/dist/components/EventCalendar/EventCalendar.helpers.js +72 -0
- package/dist/components/EventCalendar/EventCalendar2.js +157 -0
- package/dist/components/FileDropzone/FileDropzone.css +1 -0
- package/dist/components/FileDropzone/FileDropzone2.js +71 -0
- package/dist/components/Flag/Flag.css +1 -0
- package/dist/components/Flag/Flag2.js +36 -0
- package/dist/components/FloatButton/FloatButton.css +1 -0
- package/dist/components/FloatButton/FloatButton2.js +68 -0
- package/dist/components/FloatingWindow/FloatingWindow.css +1 -0
- package/dist/components/FloatingWindow/FloatingWindow2.js +203 -0
- package/dist/components/FolderBrowserModal/FolderBrowserModal.css +1 -0
- package/dist/components/FolderBrowserModal/FolderBrowserModal2.js +144 -0
- package/dist/components/Grid/Col.js +17 -0
- package/dist/components/Grid/Grid.css +1 -0
- package/dist/components/Grid/Grid2.js +28 -0
- package/dist/components/Icon/Icon.css +1 -0
- package/dist/components/Icon/Icon2.js +23 -0
- package/dist/components/IconPicker/IconPicker.css +1 -0
- package/dist/components/IconPicker/IconPicker2.js +51 -0
- package/dist/components/InfiniteScroll/InfiniteScroll.css +1 -0
- package/dist/components/InfiniteScroll/InfiniteScroll2.js +66 -0
- package/dist/components/InputDate/InputDate.css +1 -0
- package/dist/components/InputDate/InputDate2.js +87 -0
- package/dist/components/InputEmail/InputEmail.css +1 -0
- package/dist/components/InputEmail/InputEmail2.js +73 -0
- package/dist/components/InputFile/InputFile.css +1 -0
- package/dist/components/InputFile/InputFile2.js +41 -0
- package/dist/components/InputMask/InputMask.css +1 -0
- package/dist/components/InputMask/InputMask2.js +163 -0
- package/dist/components/InputNumber/InputNumber.css +1 -0
- package/dist/components/InputNumber/InputNumber2.js +60 -0
- package/dist/components/InputPIN/InputPIN.css +1 -0
- package/dist/components/InputPIN/InputPIN2.js +121 -0
- package/dist/components/InputPassword/InputPassword.css +1 -0
- package/dist/components/InputPassword/InputPassword2.js +47 -0
- package/dist/components/InputPhone/InputPhone.css +1 -0
- package/dist/components/InputPhone/InputPhone2.js +82 -0
- package/dist/components/InputSearch/InputSearch.css +1 -0
- package/dist/components/InputSearch/InputSearch2.js +53 -0
- package/dist/components/InputText/InputText.css +1 -0
- package/dist/components/InputText/InputText2.js +47 -0
- package/dist/components/InputTextarea/InputTextarea.css +1 -0
- package/dist/components/InputTextarea/InputTextarea2.js +46 -0
- package/dist/components/InputTime/InputTime.css +1 -0
- package/dist/components/InputTime/InputTime2.js +85 -0
- package/dist/components/InputUrl/InputUrl.css +1 -0
- package/dist/components/InputUrl/InputUrl2.js +65 -0
- package/dist/components/JourneyWizard/JourneyWizard.css +1 -0
- package/dist/components/JourneyWizard/JourneyWizard2.js +147 -0
- package/dist/components/List/List.css +1 -0
- package/dist/components/List/List2.js +28 -0
- package/dist/components/Loading/Loading.css +1 -0
- package/dist/components/Loading/Loading2.js +11 -0
- package/dist/components/MenuHamburger/MenuHamburger.css +1 -0
- package/dist/components/MenuHamburger/MenuHamburger2.js +65 -0
- package/dist/components/MiniSort/MiniSort.css +1 -0
- package/dist/components/MiniSort/MiniSort2.js +52 -0
- package/dist/components/MiniStatsCard/MiniStatsCard.css +1 -0
- package/dist/components/MiniStatsCard/MiniStatsCard2.js +67 -0
- package/dist/components/Minimap/Minimap.css +1 -0
- package/dist/components/Minimap/Minimap2.js +62 -0
- package/dist/components/Modal/Modal.css +1 -0
- package/dist/components/Modal/Modal2.js +87 -0
- package/dist/components/NavBar/NavBar.css +1 -0
- package/dist/components/NavBar/NavBar2.js +64 -0
- package/dist/components/NotificationPanel/NotificationPanel.css +1 -0
- package/dist/components/NotificationPanel/NotificationPanel2.js +66 -0
- package/dist/components/Pagination/Pagination.css +1 -0
- package/dist/components/Pagination/Pagination2.js +92 -0
- package/dist/components/PieChart/PieChart.css +1 -0
- package/dist/components/PieChart/PieChart2.js +142 -0
- package/dist/components/Popover/Popover.css +1 -0
- package/dist/components/Popover/Popover2.js +109 -0
- package/dist/components/Popover/hooks/Popover.hook.js +33 -0
- package/dist/components/ProgressBar/ProgressBar.css +1 -0
- package/dist/components/ProgressBar/ProgressBar2.js +48 -0
- package/dist/components/ProgressRing/ProgressRing.css +1 -0
- package/dist/components/ProgressRing/ProgressRing2.js +54 -0
- package/dist/components/QuantitySelector/QuantitySelector.css +1 -0
- package/dist/components/QuantitySelector/QuantitySelector2.js +94 -0
- package/dist/components/QuickAdd/QuickAdd.css +1 -0
- package/dist/components/QuickAdd/QuickAdd2.js +56 -0
- package/dist/components/QuickNumberUpdate/QuickNumberUpdate.css +1 -0
- package/dist/components/QuickNumberUpdate/QuickNumberUpdate2.js +52 -0
- package/dist/components/QuickOptionUpdate/QuickOptionUpdate.css +1 -0
- package/dist/components/QuickOptionUpdate/QuickOptionUpdate2.js +67 -0
- package/dist/components/Radio/Radio.css +1 -0
- package/dist/components/Radio/Radio2.js +36 -0
- package/dist/components/RangeSlider/RangeSlider.css +1 -0
- package/dist/components/RangeSlider/RangeSlider2.js +157 -0
- package/dist/components/Rating/Rating.css +1 -0
- package/dist/components/Rating/Rating2.js +148 -0
- package/dist/components/Rating/RatingIcon.js +102 -0
- package/dist/components/RichTextEditor/RichTextEditor.css +1 -0
- package/dist/components/RichTextEditor/RichTextEditor2.js +212 -0
- package/dist/components/RichTextEditor/RteLinkPrompt.js +42 -0
- package/dist/components/RichTextEditor/RteTableToolbar.js +95 -0
- package/dist/components/RichTextEditor/RteToolbar.js +106 -0
- package/dist/components/RichTextEditor/helpers.js +73 -0
- package/dist/components/RichTextEditor/hooks/useEditorHistory.js +39 -0
- package/dist/components/RichTextEditor/hooks/useLinkPrompt.js +61 -0
- package/dist/components/RichTextEditor/hooks/useTableOps.js +134 -0
- package/dist/components/RollingNumber/RollingNumber.css +1 -0
- package/dist/components/RollingNumber/RollingNumber2.js +71 -0
- package/dist/components/ScrollToTop/ScrollToTop.css +1 -0
- package/dist/components/ScrollToTop/ScrollToTop2.js +40 -0
- package/dist/components/Separator/Separator.css +1 -0
- package/dist/components/Separator/Separator2.js +39 -0
- package/dist/components/Sidebar/Sidebar.css +1 -0
- package/dist/components/Sidebar/Sidebar2.js +115 -0
- package/dist/components/Sidebar/SidebarContext.js +31 -0
- package/dist/components/SignalStrength/SignalStrength.css +1 -0
- package/dist/components/SignalStrength/SignalStrength2.js +56 -0
- package/dist/components/Skeleton/Skeleton.css +1 -0
- package/dist/components/Skeleton/Skeleton2.js +50 -0
- package/dist/components/Slider/Slider.css +1 -0
- package/dist/components/Slider/Slider2.js +39 -0
- package/dist/components/SplitPanel/SplitPanel.css +1 -0
- package/dist/components/SplitPanel/SplitPanel2.js +69 -0
- package/dist/components/Splitter/Splitter.css +1 -0
- package/dist/components/Splitter/Splitter2.js +89 -0
- package/dist/components/StackedBar/StackedBar.css +1 -0
- package/dist/components/StackedBar/StackedBar2.js +50 -0
- package/dist/components/Stats/Stats.css +1 -0
- package/dist/components/Stats/Stats2.js +26 -0
- package/dist/components/StickyBar/StickyBar.css +1 -0
- package/dist/components/StickyBar/StickyBar2.js +29 -0
- package/dist/components/SuggestionsList/SuggestionsList.css +1 -0
- package/dist/components/SuggestionsList/SuggestionsList2.js +121 -0
- package/dist/components/ThemeSettings/ThemeContext.js +138 -0
- package/dist/components/ThemeSettings/ThemeContextValue.js +5 -0
- package/dist/components/ThemeSettings/ThemeSettings.css +1 -0
- package/dist/components/ThemeSettings/ThemeSettings2.js +245 -0
- package/dist/components/ThemeSettings/themeConfig.js +7 -0
- package/dist/components/ThemeSettings/useTheme.js +10 -0
- package/dist/components/TimePicker/TimePicker.css +1 -0
- package/dist/components/TimePicker/TimePicker2.js +118 -0
- package/dist/components/TimePicker/TimeSpinner.js +59 -0
- package/dist/components/Timeline/Timeline.css +1 -0
- package/dist/components/Timeline/Timeline2.js +57 -0
- package/dist/components/TimelineMarkers/TimelineMarkers.css +1 -0
- package/dist/components/TimelineMarkers/TimelineMarkers2.js +73 -0
- package/dist/components/TipsOfTheDay/TipsOfTheDay.css +1 -0
- package/dist/components/TipsOfTheDay/TipsOfTheDay2.js +24 -0
- package/dist/components/Toast/Toast.css +1 -0
- package/dist/components/Toast/Toast2.js +39 -0
- package/dist/components/ToggleButtons/ToggleButtons.css +1 -0
- package/dist/components/ToggleButtons/ToggleButtons2.js +47 -0
- package/dist/components/ToggleSwitch/ToggleSwitch.css +1 -0
- package/dist/components/ToggleSwitch/ToggleSwitch2.js +27 -0
- package/dist/components/Toolbar/Toolbar.css +1 -0
- package/dist/components/Toolbar/Toolbar2.js +129 -0
- package/dist/components/Tooltip/Tooltip.css +1 -0
- package/dist/components/Tooltip/Tooltip2.js +93 -0
- package/dist/components/TourHud/TourHud.css +1 -0
- package/dist/components/TourHud/TourHud2.js +70 -0
- package/dist/components/Transition/Transition.css +1 -0
- package/dist/components/Transition/Transition2.js +68 -0
- package/dist/components/Tree/Tree.css +1 -0
- package/dist/components/Tree/Tree2.js +95 -0
- package/dist/components/VirtualList/VirtualList.css +1 -0
- package/dist/components/VirtualList/VirtualList2.js +64 -0
- package/dist/components/WHtR/WHtR.css +1 -0
- package/dist/components/WHtR/WHtR2.js +115 -0
- package/dist/contexts/AuthContext/AuthContext.js +113 -0
- package/dist/helpers/AppPersistenceStorage.js +50 -0
- package/dist/helpers/Datetime.js +114 -0
- package/dist/helpers/Format.js +21 -0
- package/dist/helpers/Highlight.js +36 -0
- package/dist/helpers/HtmlContent.js +118 -0
- package/dist/helpers/LogicalOperators.js +15 -0
- package/dist/helpers/Numbers.js +15 -0
- package/dist/helpers/Pagination.js +7 -0
- package/dist/helpers/Search.js +15 -0
- package/dist/helpers/Strings.js +10 -0
- package/dist/helpers/Urls.js +68 -0
- package/dist/helpers/VersionInfo.js +36 -0
- package/dist/hooks/useAppPersistence.js +51 -0
- package/dist/hooks/useAuth/useAuth.js +10 -0
- package/dist/hooks/useBodyScrollLock.js +31 -0
- package/dist/hooks/useBreakpoint.js +65 -0
- package/dist/hooks/useComponentEffect.js +8 -0
- package/dist/hooks/useSwipe.js +45 -0
- package/dist/index.css +1 -2
- package/dist/index.d.ts +6 -10
- package/dist/index.esm.js +1 -17738
- package/dist/index.js +348 -0
- package/dist/mfa.js +4 -0
- package/dist/node_modules/qrcode.react/lib/esm/index.js +979 -0
- package/dist/validators/Vin.js +69 -0
- package/dist/version.js +8 -0
- package/dist/version.json +4 -4
- package/package.json +11 -75
- package/dist/mfa.esm.js +0 -1293
- package/dist/styles/themes.scss +0 -74
- package/dist/styles/theming/_profile-theme.scss +0 -317
- package/dist/styles/theming/amber-meridian.scss +0 -271
- package/dist/styles/theming/archive-indigo.scss +0 -270
- package/dist/styles/theming/arctic-blue.scss +0 -266
- package/dist/styles/theming/asphalt-code.scss +0 -271
- package/dist/styles/theming/atelier-media.scss +0 -272
- package/dist/styles/theming/audit-ember.scss +0 -286
- package/dist/styles/theming/azure-night.scss +0 -269
- package/dist/styles/theming/blossom-meadow.scss +0 -273
- package/dist/styles/theming/blueprint-clay.scss +0 -271
- package/dist/styles/theming/blush-market.scss +0 -271
- package/dist/styles/theming/brass-chronicle.scss +0 -271
- package/dist/styles/theming/carbon-velocity.scss +0 -270
- package/dist/styles/theming/chalk-circuit.scss +0 -271
- package/dist/styles/theming/chrono-atlas.scss +0 -279
- package/dist/styles/theming/citrus-vital.scss +0 -34
- package/dist/styles/theming/clinical-aqua.scss +0 -270
- package/dist/styles/theming/cobalt-pulse.scss +0 -272
- package/dist/styles/theming/command-slate.scss +0 -34
- package/dist/styles/theming/crawler-dusk.scss +0 -270
- package/dist/styles/theming/crimson-dusk.scss +0 -269
- package/dist/styles/theming/cyber-forest.scss +0 -269
- package/dist/styles/theming/dashdarkx.scss +0 -269
- package/dist/styles/theming/ember-night.scss +0 -269
- package/dist/styles/theming/emerald-ledger.scss +0 -271
- package/dist/styles/theming/frost-petal.scss +0 -269
- package/dist/styles/theming/garden-harvest.scss +0 -271
- package/dist/styles/theming/gilded-bear.scss +0 -271
- package/dist/styles/theming/graphite-shell.scss +0 -270
- package/dist/styles/theming/horizon-amber.scss +0 -270
- package/dist/styles/theming/horizon-drift.scss +0 -271
- package/dist/styles/theming/ivory-serif.scss +0 -271
- package/dist/styles/theming/lavender-mist.scss +0 -269
- package/dist/styles/theming/light-blue.scss +0 -269
- package/dist/styles/theming/lumen.scss +0 -276
- package/dist/styles/theming/luna.scss +0 -269
- package/dist/styles/theming/mesh-circuit.scss +0 -271
- package/dist/styles/theming/midnight-amber.scss +0 -273
- package/dist/styles/theming/midnight-atlas.scss +0 -35
- package/dist/styles/theming/midnight-folio.scss +0 -34
- package/dist/styles/theming/mint-meadow.scss +0 -269
- package/dist/styles/theming/mintone.scss +0 -269
- package/dist/styles/theming/neon-tokyo.scss +0 -269
- package/dist/styles/theming/noir-marquee.scss +0 -34
- package/dist/styles/theming/ocean-breeze.scss +0 -269
- package/dist/styles/theming/ocean-depths.scss +0 -269
- package/dist/styles/theming/orbital-night.scss +0 -276
- package/dist/styles/theming/sandstone.scss +0 -269
- package/dist/styles/theming/sandy-parchment.scss +0 -270
- package/dist/styles/theming/screening-room.scss +0 -34
- package/dist/styles/theming/signal-burst.scss +0 -271
- package/dist/styles/theming/signal-clarity.scss +0 -34
- package/dist/styles/theming/slate-bazaar.scss +0 -34
- package/dist/styles/theming/slate-focus.scss +0 -270
- package/dist/styles/theming/spectrum-vault.scss +0 -271
- package/dist/styles/theming/tailwind-vue-dark.scss +0 -269
- package/dist/styles/theming/terminal-phosphor.scss +0 -272
- package/dist/styles/theming/terracotta-kitchen.scss +0 -271
- package/dist/styles/theming/twilight-pulse.scss +0 -269
- package/dist/styles/theming/vault-guard.scss +0 -271
- package/dist/styles/theming/velvet-reel.scss +0 -272
- package/dist/styles/theming/velvet-tome.scss +0 -271
- package/dist/styles/theming/verdant-pulse.scss +0 -34
- package/dist/styles/theming/vital-aurora.scss +0 -45
- package/dist/styles/theming/vital-signal.scss +0 -270
- package/dist/useAuth-BBqdDG2z.js +0 -467
package/dist/useAuth-BBqdDG2z.js
DELETED
|
@@ -1,467 +0,0 @@
|
|
|
1
|
-
import Q, { createContext as z, forwardRef as q, useCallback as A, useContext as O, useEffect as _, useRef as E, useState as j } from "react";
|
|
2
|
-
import { iconMap as W } from "@memobit/icons/map";
|
|
3
|
-
import { Fragment as F, jsx as n, jsxs as b } from "react/jsx-runtime";
|
|
4
|
-
import { createPortal as Y } from "react-dom";
|
|
5
|
-
var U = ({ className: s = "", fade: e, fadeOnHover: f, name: a, pulse: m, pulseOnHover: o, size: i, spin: l, spinOnHover: c, variant: u }) => /* @__PURE__ */ n("span", {
|
|
6
|
-
className: [
|
|
7
|
-
"icon",
|
|
8
|
-
i ? `icon--${i}` : "",
|
|
9
|
-
u && u !== "default" ? `icon--${u}` : "",
|
|
10
|
-
l ? "icon--spin" : "",
|
|
11
|
-
e ? "icon--fade" : "",
|
|
12
|
-
m ? "icon--pulse" : "",
|
|
13
|
-
c ? "icon--spin-hover" : "",
|
|
14
|
-
f ? "icon--fade-hover" : "",
|
|
15
|
-
o ? "icon--pulse-hover" : "",
|
|
16
|
-
s
|
|
17
|
-
].filter(Boolean).join(" "),
|
|
18
|
-
children: W[a]
|
|
19
|
-
}), X = (s) => {
|
|
20
|
-
const e = E(null);
|
|
21
|
-
_(() => {
|
|
22
|
-
const f = () => {
|
|
23
|
-
if (!e.current) return;
|
|
24
|
-
const { overflow: a, position: m, top: o, left: i, right: l, width: c, scrollY: u } = e.current;
|
|
25
|
-
document.body.style.overflow = a, document.body.style.position = m, document.body.style.top = o, document.body.style.left = i, document.body.style.right = l, document.body.style.width = c, window.scrollTo(0, u), e.current = null;
|
|
26
|
-
};
|
|
27
|
-
if (s) {
|
|
28
|
-
if (!e.current) {
|
|
29
|
-
const a = window.scrollY;
|
|
30
|
-
e.current = {
|
|
31
|
-
overflow: document.body.style.overflow,
|
|
32
|
-
position: document.body.style.position,
|
|
33
|
-
top: document.body.style.top,
|
|
34
|
-
left: document.body.style.left,
|
|
35
|
-
right: document.body.style.right,
|
|
36
|
-
width: document.body.style.width,
|
|
37
|
-
scrollY: a
|
|
38
|
-
}, document.body.style.overflow = "hidden", document.body.style.position = "fixed", document.body.style.top = `-${a}px`, document.body.style.left = "0", document.body.style.right = "0", document.body.style.width = "100%";
|
|
39
|
-
}
|
|
40
|
-
} else f();
|
|
41
|
-
return () => {
|
|
42
|
-
f();
|
|
43
|
-
};
|
|
44
|
-
}, [s]);
|
|
45
|
-
}, Z = z(void 0), H = () => {
|
|
46
|
-
const s = O(Z);
|
|
47
|
-
if (s === void 0) throw new Error("useTheme must be used within a ThemeProvider");
|
|
48
|
-
return s;
|
|
49
|
-
}, ee = (s) => {
|
|
50
|
-
const { effects: e } = H();
|
|
51
|
-
return e.effect && e.components.includes(s) ? e.effect : "";
|
|
52
|
-
}, B = Q.forwardRef(({ borders: s = "rounded", children: e, className: f, disabled: a = !1, fullWidth: m = !1, icon: o, iconVariant: i = "default", loading: l = !1, onClick: c, emojiIcon: u, size: r = "medium", style: d, sufixIcon: t, title: h, type: v = "button", variant: g = "default" }, w) => /* @__PURE__ */ n("button", {
|
|
53
|
-
ref: w,
|
|
54
|
-
className: `button button-${r} button-${g} ${s === "rounded" ? "button-rounded" : ""} ${m ? "is-full-width" : ""} ${f || ""}`,
|
|
55
|
-
disabled: a,
|
|
56
|
-
onClick: c,
|
|
57
|
-
style: d,
|
|
58
|
-
title: h,
|
|
59
|
-
type: v,
|
|
60
|
-
children: l ? /* @__PURE__ */ b(F, { children: [/* @__PURE__ */ n("span", { className: "button__spinner" }), /* @__PURE__ */ n("span", { children: e || "Loading..." })] }) : /* @__PURE__ */ b(F, { children: [
|
|
61
|
-
o !== void 0 && (typeof o == "string" ? /* @__PURE__ */ n(U, {
|
|
62
|
-
size: "lg",
|
|
63
|
-
name: o,
|
|
64
|
-
variant: i
|
|
65
|
-
}) : o),
|
|
66
|
-
u && /* @__PURE__ */ n("span", { children: u }),
|
|
67
|
-
e && /* @__PURE__ */ n("span", { children: e }),
|
|
68
|
-
t !== void 0 && (typeof t == "string" ? /* @__PURE__ */ n(U, {
|
|
69
|
-
size: "lg",
|
|
70
|
-
name: t,
|
|
71
|
-
variant: i
|
|
72
|
-
}) : t)
|
|
73
|
-
] })
|
|
74
|
-
}));
|
|
75
|
-
B.displayName = "Button";
|
|
76
|
-
var I = ({ title: s, position: e = "top", delay: f = 200, children: a, disabled: m = !1, className: o = "", maxWidth: i, maxHeight: l }) => {
|
|
77
|
-
const [c, u] = j(!1), [r, d] = j({
|
|
78
|
-
top: 0,
|
|
79
|
-
left: 0
|
|
80
|
-
}), t = E(null), h = E(null), v = E(null), g = E(null), w = E(!1), T = l !== void 0, $ = T ? 150 : 0, y = () => {
|
|
81
|
-
if (!v.current || !g.current) return;
|
|
82
|
-
const N = v.current.firstElementChild?.getBoundingClientRect();
|
|
83
|
-
let p = N && N.width > 0 ? N : v.current.getBoundingClientRect();
|
|
84
|
-
if (p.width === 0 && p.height === 0) {
|
|
85
|
-
const D = document.createRange();
|
|
86
|
-
D.selectNodeContents(v.current);
|
|
87
|
-
const S = D.getBoundingClientRect();
|
|
88
|
-
(S.width > 0 || S.height > 0) && (p = S);
|
|
89
|
-
}
|
|
90
|
-
const C = g.current.getBoundingClientRect(), M = 8;
|
|
91
|
-
let k = 0, R = 0;
|
|
92
|
-
switch (e) {
|
|
93
|
-
case "top":
|
|
94
|
-
k = p.top - C.height - M, R = p.left + p.width / 2 - C.width / 2;
|
|
95
|
-
break;
|
|
96
|
-
case "bottom":
|
|
97
|
-
k = p.bottom + M, R = p.left + p.width / 2 - C.width / 2;
|
|
98
|
-
break;
|
|
99
|
-
case "left":
|
|
100
|
-
k = p.top + p.height / 2 - C.height / 2, R = p.left - C.width - M;
|
|
101
|
-
break;
|
|
102
|
-
case "right":
|
|
103
|
-
k = p.top + p.height / 2 - C.height / 2, R = p.right + M;
|
|
104
|
-
break;
|
|
105
|
-
}
|
|
106
|
-
const x = 8;
|
|
107
|
-
R < x && (R = x), R + C.width > window.innerWidth - x && (R = window.innerWidth - C.width - x), k < x && (k = x), k + C.height > window.innerHeight - x && (k = window.innerHeight - C.height - x), d({
|
|
108
|
-
top: k,
|
|
109
|
-
left: R
|
|
110
|
-
});
|
|
111
|
-
}, L = () => {
|
|
112
|
-
m || w.current || (h.current && (clearTimeout(h.current), h.current = null), t.current = setTimeout(() => {
|
|
113
|
-
u(!0);
|
|
114
|
-
}, f));
|
|
115
|
-
}, P = () => {
|
|
116
|
-
w.current || (t.current && clearTimeout(t.current), $ > 0 ? h.current = setTimeout(() => u(!1), $) : u(!1));
|
|
117
|
-
}, V = (N) => {
|
|
118
|
-
N.pointerType !== "touch" && N.pointerType !== "pen" || m || (w.current = !0, t.current && (clearTimeout(t.current), t.current = null), N.stopPropagation(), u((p) => !p));
|
|
119
|
-
};
|
|
120
|
-
_(() => (c && (y(), window.addEventListener("scroll", y, !0), window.addEventListener("resize", y)), () => {
|
|
121
|
-
window.removeEventListener("scroll", y, !0), window.removeEventListener("resize", y);
|
|
122
|
-
}), [c]), _(() => {
|
|
123
|
-
if (!c) return;
|
|
124
|
-
const N = (p) => {
|
|
125
|
-
v.current?.contains(p.target) || g.current?.contains(p.target) || u(!1);
|
|
126
|
-
};
|
|
127
|
-
return document.addEventListener("pointerdown", N), () => {
|
|
128
|
-
document.removeEventListener("pointerdown", N), w.current = !1;
|
|
129
|
-
};
|
|
130
|
-
}, [c]), _(() => () => {
|
|
131
|
-
t.current && clearTimeout(t.current), h.current && clearTimeout(h.current);
|
|
132
|
-
}, []);
|
|
133
|
-
const G = () => {
|
|
134
|
-
T && h.current && (clearTimeout(h.current), h.current = null);
|
|
135
|
-
}, K = () => {
|
|
136
|
-
T && (h.current = setTimeout(() => u(!1), $));
|
|
137
|
-
};
|
|
138
|
-
return /* @__PURE__ */ b(F, { children: [/* @__PURE__ */ n("span", {
|
|
139
|
-
ref: v,
|
|
140
|
-
className: "tooltip-trigger",
|
|
141
|
-
onMouseEnter: L,
|
|
142
|
-
onMouseLeave: P,
|
|
143
|
-
onFocus: L,
|
|
144
|
-
onBlur: P,
|
|
145
|
-
onPointerDown: V,
|
|
146
|
-
children: a
|
|
147
|
-
}), c && s && Y(/* @__PURE__ */ b("div", {
|
|
148
|
-
ref: g,
|
|
149
|
-
className: `tooltip tooltip--${e} ${T ? "tooltip--scrollable" : ""} ${o}`,
|
|
150
|
-
style: {
|
|
151
|
-
top: `${r.top}px`,
|
|
152
|
-
left: `${r.left}px`,
|
|
153
|
-
...i !== void 0 && { maxWidth: typeof i == "number" ? `${i}px` : i },
|
|
154
|
-
...l !== void 0 && { maxHeight: typeof l == "number" ? `${l}px` : l }
|
|
155
|
-
},
|
|
156
|
-
onMouseEnter: G,
|
|
157
|
-
onMouseLeave: K,
|
|
158
|
-
children: [s, /* @__PURE__ */ n("div", { className: `tooltip__arrow tooltip__arrow--${e}` })]
|
|
159
|
-
}), document.body)] });
|
|
160
|
-
}, se = ({ children: s, className: e, fullHeight: f = !1, isOpen: a, noPadding: m = !1, onClose: o, onOverlayClick: i, primary: l, secondary: c, size: u = "auto", tertiary: r, title: d, titleIcon: t, usePortal: h = !1 }) => {
|
|
161
|
-
const v = ee("Modal");
|
|
162
|
-
X(a);
|
|
163
|
-
const g = E(null), w = E(null);
|
|
164
|
-
if (_(() => {
|
|
165
|
-
if (!a) return;
|
|
166
|
-
const y = (L) => {
|
|
167
|
-
if (L.key !== "Escape" || !o) return;
|
|
168
|
-
const P = document.querySelectorAll(".modal-overlay");
|
|
169
|
-
P[P.length - 1] === w.current && (L.stopPropagation(), o());
|
|
170
|
-
};
|
|
171
|
-
return document.addEventListener("keydown", y), () => document.removeEventListener("keydown", y);
|
|
172
|
-
}, [a, o]), !a) return null;
|
|
173
|
-
const T = l || c || r, $ = /* @__PURE__ */ n("div", {
|
|
174
|
-
ref: w,
|
|
175
|
-
className: "modal-overlay",
|
|
176
|
-
onClick: i,
|
|
177
|
-
children: /* @__PURE__ */ b("div", {
|
|
178
|
-
ref: g,
|
|
179
|
-
className: `modal modal--${u} ${f ? "modal--full-height" : ""} ${e || ""} ${v}`,
|
|
180
|
-
onClick: (y) => y.stopPropagation(),
|
|
181
|
-
children: [
|
|
182
|
-
/* @__PURE__ */ b("div", {
|
|
183
|
-
className: "modal__header",
|
|
184
|
-
children: [/* @__PURE__ */ b("h2", { children: [
|
|
185
|
-
t ? /* @__PURE__ */ n(U, { name: t }) : null,
|
|
186
|
-
" ",
|
|
187
|
-
d
|
|
188
|
-
] }), /* @__PURE__ */ n(I, {
|
|
189
|
-
title: "Close modal",
|
|
190
|
-
children: /* @__PURE__ */ n(B, {
|
|
191
|
-
className: "modal__close",
|
|
192
|
-
icon: "clear",
|
|
193
|
-
onClick: o,
|
|
194
|
-
size: "medium",
|
|
195
|
-
variant: "ghost"
|
|
196
|
-
})
|
|
197
|
-
})]
|
|
198
|
-
}),
|
|
199
|
-
s != null && /* @__PURE__ */ n("div", {
|
|
200
|
-
className: `modal__body ${m ? "modal__body--no-padding" : ""}`,
|
|
201
|
-
children: s
|
|
202
|
-
}),
|
|
203
|
-
T && /* @__PURE__ */ b("div", {
|
|
204
|
-
className: "modal__footer",
|
|
205
|
-
children: [
|
|
206
|
-
r && /* @__PURE__ */ n(B, {
|
|
207
|
-
variant: r.variant || "default",
|
|
208
|
-
icon: r.icon,
|
|
209
|
-
onClick: r.onClick,
|
|
210
|
-
disabled: r.disabled,
|
|
211
|
-
children: r.text
|
|
212
|
-
}),
|
|
213
|
-
c && /* @__PURE__ */ n(B, {
|
|
214
|
-
variant: c.variant || "default",
|
|
215
|
-
icon: c.icon || "clear",
|
|
216
|
-
onClick: c.onClick,
|
|
217
|
-
disabled: c.disabled,
|
|
218
|
-
children: c.text
|
|
219
|
-
}),
|
|
220
|
-
l && /* @__PURE__ */ n(B, {
|
|
221
|
-
variant: l.variant || "success",
|
|
222
|
-
icon: l.icon || "checkmark",
|
|
223
|
-
onClick: l.onClick,
|
|
224
|
-
disabled: l.disabled,
|
|
225
|
-
children: l.text
|
|
226
|
-
})
|
|
227
|
-
]
|
|
228
|
-
})
|
|
229
|
-
]
|
|
230
|
-
})
|
|
231
|
-
});
|
|
232
|
-
return h ? Y($, document.body) : $;
|
|
233
|
-
}, ae = q(({ autoComplete: s = "on", autoFocus: e, disabled: f, error: a, highlighted: m, id: o, label: i, maxLength: l, onBlur: c, onChange: u, onClick: r, onKeyDown: d, onKeyUp: t, placeholder: h, readOnly: v = !1, required: g = !1, success: w, value: T }, $) => /* @__PURE__ */ b("div", {
|
|
234
|
-
className: `input-text-wrapper${m ? " input-text-highlighted" : ""}`,
|
|
235
|
-
children: [
|
|
236
|
-
i && /* @__PURE__ */ b("label", {
|
|
237
|
-
htmlFor: o,
|
|
238
|
-
className: "input-text-label",
|
|
239
|
-
children: [i, g && /* @__PURE__ */ n("span", {
|
|
240
|
-
className: "input-text-required",
|
|
241
|
-
children: "*"
|
|
242
|
-
})]
|
|
243
|
-
}),
|
|
244
|
-
/* @__PURE__ */ n("input", {
|
|
245
|
-
autoComplete: s,
|
|
246
|
-
autoFocus: e,
|
|
247
|
-
disabled: f,
|
|
248
|
-
type: "text",
|
|
249
|
-
className: `input-text ${a ? "input-text-error" : ""} ${w ? "input-text-success" : ""}`,
|
|
250
|
-
id: o,
|
|
251
|
-
maxLength: l,
|
|
252
|
-
placeholder: h,
|
|
253
|
-
ref: $,
|
|
254
|
-
value: T,
|
|
255
|
-
onBlur: c,
|
|
256
|
-
onChange: (y) => u?.(y.target.value),
|
|
257
|
-
onClick: r,
|
|
258
|
-
onKeyDown: d,
|
|
259
|
-
onKeyUp: t,
|
|
260
|
-
readOnly: v,
|
|
261
|
-
required: g
|
|
262
|
-
}),
|
|
263
|
-
a && /* @__PURE__ */ n("span", {
|
|
264
|
-
className: "input-text-error-message",
|
|
265
|
-
children: a
|
|
266
|
-
}),
|
|
267
|
-
w && /* @__PURE__ */ n("span", {
|
|
268
|
-
className: "input-text-success-message",
|
|
269
|
-
children: w
|
|
270
|
-
})
|
|
271
|
-
]
|
|
272
|
-
})), ie = q(({ autoComplete: s = "on", autoFocus: e, disabled: f, error: a, highlighted: m, id: o, label: i, maxLength: l, onBlur: c, onChange: u, onClick: r, onKeyDown: d, onKeyUp: t, placeholder: h, readOnly: v = !1, required: g = !1, success: w, value: T }, $) => /* @__PURE__ */ b("div", {
|
|
273
|
-
className: `input-password-wrapper${m ? " input-password-highlighted" : ""}`,
|
|
274
|
-
children: [
|
|
275
|
-
i && /* @__PURE__ */ b("label", {
|
|
276
|
-
htmlFor: o,
|
|
277
|
-
className: "input-password-label",
|
|
278
|
-
children: [i, g && /* @__PURE__ */ n("span", {
|
|
279
|
-
className: "input-password-required",
|
|
280
|
-
children: "*"
|
|
281
|
-
})]
|
|
282
|
-
}),
|
|
283
|
-
/* @__PURE__ */ n("input", {
|
|
284
|
-
autoComplete: s,
|
|
285
|
-
autoFocus: e,
|
|
286
|
-
disabled: f,
|
|
287
|
-
type: "password",
|
|
288
|
-
className: `input-password${a ? " input-password-error" : ""}${w ? " input-password-success" : ""}`,
|
|
289
|
-
id: o,
|
|
290
|
-
maxLength: l,
|
|
291
|
-
placeholder: h,
|
|
292
|
-
ref: $,
|
|
293
|
-
value: T,
|
|
294
|
-
onBlur: c,
|
|
295
|
-
onChange: (y) => u?.(y.target.value),
|
|
296
|
-
onClick: r,
|
|
297
|
-
onKeyDown: d,
|
|
298
|
-
onKeyUp: t,
|
|
299
|
-
readOnly: v,
|
|
300
|
-
required: g
|
|
301
|
-
}),
|
|
302
|
-
a && /* @__PURE__ */ n("span", {
|
|
303
|
-
className: "input-password-error-message",
|
|
304
|
-
children: a
|
|
305
|
-
}),
|
|
306
|
-
w && /* @__PURE__ */ n("span", {
|
|
307
|
-
className: "input-password-success-message",
|
|
308
|
-
children: w
|
|
309
|
-
})
|
|
310
|
-
]
|
|
311
|
-
})), le = ({ message: s, type: e = "success", onClose: f, position: a = "top-right", showDismissButton: m = !0, timeout: o = 3e3, action: i }) => (_(() => {
|
|
312
|
-
const l = setTimeout(() => {
|
|
313
|
-
f();
|
|
314
|
-
}, o);
|
|
315
|
-
return () => clearTimeout(l);
|
|
316
|
-
}, [f, o]), /* @__PURE__ */ b("div", {
|
|
317
|
-
className: `toast toast--fixed toast-${e} toast--${a}`,
|
|
318
|
-
children: [
|
|
319
|
-
/* @__PURE__ */ n("span", {
|
|
320
|
-
className: "toast__message",
|
|
321
|
-
children: s
|
|
322
|
-
}),
|
|
323
|
-
i && /* @__PURE__ */ n("button", {
|
|
324
|
-
className: "toast__action",
|
|
325
|
-
onClick: i.onClick,
|
|
326
|
-
children: i.label
|
|
327
|
-
}),
|
|
328
|
-
m && /* @__PURE__ */ n(I, {
|
|
329
|
-
title: "Close",
|
|
330
|
-
children: /* @__PURE__ */ n("button", {
|
|
331
|
-
className: "toast__close",
|
|
332
|
-
onClick: f,
|
|
333
|
-
children: /* @__PURE__ */ n(U, {
|
|
334
|
-
name: "clear",
|
|
335
|
-
size: "sm"
|
|
336
|
-
})
|
|
337
|
-
})
|
|
338
|
-
})
|
|
339
|
-
]
|
|
340
|
-
})), J = z(void 0);
|
|
341
|
-
function ce({ children: s, config: e }) {
|
|
342
|
-
const [f, a] = j(null), [m, o] = j(!0);
|
|
343
|
-
_(() => {
|
|
344
|
-
(async () => {
|
|
345
|
-
try {
|
|
346
|
-
const d = await fetch(`${e.apiBaseUrl}/auth/verify`, {
|
|
347
|
-
method: "GET",
|
|
348
|
-
credentials: "include",
|
|
349
|
-
headers: { "Content-Type": "application/json" }
|
|
350
|
-
});
|
|
351
|
-
if (d.ok) {
|
|
352
|
-
const t = await d.json();
|
|
353
|
-
a({
|
|
354
|
-
id: t.user.id,
|
|
355
|
-
username: t.user.username,
|
|
356
|
-
createdAt: new Date(t.user.createdAt)
|
|
357
|
-
});
|
|
358
|
-
}
|
|
359
|
-
} catch (d) {
|
|
360
|
-
console.error("Failed to restore auth state:", d);
|
|
361
|
-
} finally {
|
|
362
|
-
o(!1);
|
|
363
|
-
}
|
|
364
|
-
})();
|
|
365
|
-
}, [e.apiBaseUrl]);
|
|
366
|
-
const i = A((r) => {
|
|
367
|
-
r.user && a({
|
|
368
|
-
id: r.user.id,
|
|
369
|
-
username: r.user.username,
|
|
370
|
-
createdAt: new Date(r.user.createdAt)
|
|
371
|
-
});
|
|
372
|
-
}, []), l = A(async (r) => {
|
|
373
|
-
o(!0);
|
|
374
|
-
try {
|
|
375
|
-
const d = await fetch(`${e.apiBaseUrl}/auth/login`, {
|
|
376
|
-
method: "POST",
|
|
377
|
-
credentials: "include",
|
|
378
|
-
headers: { "Content-Type": "application/json" },
|
|
379
|
-
body: JSON.stringify({
|
|
380
|
-
username: r.username,
|
|
381
|
-
password: r.password,
|
|
382
|
-
rememberMe: r.rememberMe
|
|
383
|
-
})
|
|
384
|
-
});
|
|
385
|
-
if (!d.ok) {
|
|
386
|
-
const h = await d.json();
|
|
387
|
-
throw new Error(h.error || "Login failed");
|
|
388
|
-
}
|
|
389
|
-
const t = await d.json();
|
|
390
|
-
return t.mfaRequired ? {
|
|
391
|
-
mfaRequired: !0,
|
|
392
|
-
method: t.method
|
|
393
|
-
} : (i(t), { mfaRequired: !1 });
|
|
394
|
-
} catch (d) {
|
|
395
|
-
throw console.error("Login failed:", d), d;
|
|
396
|
-
} finally {
|
|
397
|
-
o(!1);
|
|
398
|
-
}
|
|
399
|
-
}, [e.apiBaseUrl, i]), c = A(async (r, d) => {
|
|
400
|
-
o(!0);
|
|
401
|
-
try {
|
|
402
|
-
const t = await fetch(`${e.apiBaseUrl}/auth/verifyMfa`, {
|
|
403
|
-
method: "POST",
|
|
404
|
-
credentials: "include",
|
|
405
|
-
headers: { "Content-Type": "application/json" },
|
|
406
|
-
body: JSON.stringify({
|
|
407
|
-
code: r,
|
|
408
|
-
trustDevice: d
|
|
409
|
-
})
|
|
410
|
-
});
|
|
411
|
-
if (!t.ok) {
|
|
412
|
-
const h = await t.json();
|
|
413
|
-
throw new Error(h.error || "Verification failed");
|
|
414
|
-
}
|
|
415
|
-
i(await t.json());
|
|
416
|
-
} catch (t) {
|
|
417
|
-
throw console.error("MFA verification failed:", t), t;
|
|
418
|
-
} finally {
|
|
419
|
-
o(!1);
|
|
420
|
-
}
|
|
421
|
-
}, [e.apiBaseUrl, i]), u = A(async () => {
|
|
422
|
-
try {
|
|
423
|
-
await fetch(`${e.apiBaseUrl}/auth/logout`, {
|
|
424
|
-
method: "POST",
|
|
425
|
-
credentials: "include",
|
|
426
|
-
headers: { "Content-Type": "application/json" }
|
|
427
|
-
});
|
|
428
|
-
} catch (r) {
|
|
429
|
-
console.error("Logout error:", r);
|
|
430
|
-
} finally {
|
|
431
|
-
a(null);
|
|
432
|
-
}
|
|
433
|
-
}, [e.apiBaseUrl]);
|
|
434
|
-
return /* @__PURE__ */ n(J.Provider, {
|
|
435
|
-
value: {
|
|
436
|
-
user: f,
|
|
437
|
-
isAuthenticated: !!f,
|
|
438
|
-
isLoading: m,
|
|
439
|
-
config: e,
|
|
440
|
-
login: l,
|
|
441
|
-
verifyMfa: c,
|
|
442
|
-
logout: u
|
|
443
|
-
},
|
|
444
|
-
children: s
|
|
445
|
-
});
|
|
446
|
-
}
|
|
447
|
-
var ue = () => {
|
|
448
|
-
const s = O(J);
|
|
449
|
-
if (s === void 0) throw new Error("useAuth must be used within an AuthProvider");
|
|
450
|
-
return s;
|
|
451
|
-
};
|
|
452
|
-
export {
|
|
453
|
-
ie as a,
|
|
454
|
-
I as c,
|
|
455
|
-
H as d,
|
|
456
|
-
Z as f,
|
|
457
|
-
le as i,
|
|
458
|
-
B as l,
|
|
459
|
-
U as m,
|
|
460
|
-
J as n,
|
|
461
|
-
ae as o,
|
|
462
|
-
X as p,
|
|
463
|
-
ce as r,
|
|
464
|
-
se as s,
|
|
465
|
-
ue as t,
|
|
466
|
-
ee as u
|
|
467
|
-
};
|