@burdenoff/microfe-eventfullymanaged 2026.1101.1 → 2026.1101.3
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/_virtual/_rolldown/runtime.js +4 -5
- package/dist/eventfullymanaged/EventfullyManagedRoot.d.ts +1 -1
- package/dist/eventfullymanaged/EventfullyManagedRoot.d.ts.map +1 -1
- package/dist/eventfullymanaged/EventfullyManagedRoot.js +1 -2
- package/dist/eventfullymanaged/EventfullyManagedRoot.js.map +1 -1
- package/dist/eventfullymanaged/EventfullyManagedRoutes.d.ts +1 -1
- package/dist/eventfullymanaged/EventfullyManagedRoutes.d.ts.map +1 -1
- package/dist/eventfullymanaged/EventfullyManagedRoutes.js +1 -2
- package/dist/eventfullymanaged/EventfullyManagedRoutes.js.map +1 -1
- package/dist/eventfullymanaged/api/eventApi.d.ts +110 -110
- package/dist/eventfullymanaged/api/eventApi.d.ts.map +1 -1
- package/dist/eventfullymanaged/api/eventApi.js +262 -263
- package/dist/eventfullymanaged/api/eventApi.js.map +1 -1
- package/dist/eventfullymanaged/components/ActionMenu.d.ts +1 -1
- package/dist/eventfullymanaged/components/ActionMenu.d.ts.map +1 -1
- package/dist/eventfullymanaged/components/ActionMenu.js +7 -8
- package/dist/eventfullymanaged/components/ActionMenu.js.map +1 -1
- package/dist/eventfullymanaged/components/AttendanceForecast.d.ts +11 -0
- package/dist/eventfullymanaged/components/AttendanceForecast.d.ts.map +1 -0
- package/dist/eventfullymanaged/components/AttendanceForecast.js +215 -0
- package/dist/eventfullymanaged/components/AttendanceForecast.js.map +1 -0
- package/dist/eventfullymanaged/components/EntityFormShell.d.ts +1 -1
- package/dist/eventfullymanaged/components/EntityFormShell.d.ts.map +1 -1
- package/dist/eventfullymanaged/components/EntityFormShell.js +1 -2
- package/dist/eventfullymanaged/components/EntityFormShell.js.map +1 -1
- package/dist/eventfullymanaged/components/EntityTagsField.d.ts +1 -1
- package/dist/eventfullymanaged/components/EntityTagsField.d.ts.map +1 -1
- package/dist/eventfullymanaged/components/EntityTagsField.js +22 -23
- package/dist/eventfullymanaged/components/EntityTagsField.js.map +1 -1
- package/dist/eventfullymanaged/components/EventCharts.d.ts +4 -4
- package/dist/eventfullymanaged/components/EventCharts.d.ts.map +1 -1
- package/dist/eventfullymanaged/components/EventCharts.js +53 -54
- package/dist/eventfullymanaged/components/EventCharts.js.map +1 -1
- package/dist/eventfullymanaged/components/FloorPlanZoneEditor.d.ts +1 -1
- package/dist/eventfullymanaged/components/FloorPlanZoneEditor.d.ts.map +1 -1
- package/dist/eventfullymanaged/components/FloorPlanZoneEditor.js +1 -2
- package/dist/eventfullymanaged/components/FloorPlanZoneEditor.js.map +1 -1
- package/dist/eventfullymanaged/components/ImageUploadField.d.ts +1 -1
- package/dist/eventfullymanaged/components/ImageUploadField.d.ts.map +1 -1
- package/dist/eventfullymanaged/components/ImageUploadField.js +31 -33
- package/dist/eventfullymanaged/components/ImageUploadField.js.map +1 -1
- package/dist/eventfullymanaged/components/PageLayout.d.ts +1 -1
- package/dist/eventfullymanaged/components/PageLayout.d.ts.map +1 -1
- package/dist/eventfullymanaged/components/PageLayout.js +1 -2
- package/dist/eventfullymanaged/components/PageLayout.js.map +1 -1
- package/dist/eventfullymanaged/components/Pagination.d.ts +1 -1
- package/dist/eventfullymanaged/components/Pagination.d.ts.map +1 -1
- package/dist/eventfullymanaged/components/Pagination.js +1 -2
- package/dist/eventfullymanaged/components/Pagination.js.map +1 -1
- package/dist/eventfullymanaged/components/SafeLink.d.ts +1 -1
- package/dist/eventfullymanaged/components/SafeLink.d.ts.map +1 -1
- package/dist/eventfullymanaged/components/SafeLink.js +1 -2
- package/dist/eventfullymanaged/components/SafeLink.js.map +1 -1
- package/dist/eventfullymanaged/components/floorPlanEditor/ZoneCanvas.d.ts +1 -1
- package/dist/eventfullymanaged/components/floorPlanEditor/ZoneCanvas.d.ts.map +1 -1
- package/dist/eventfullymanaged/components/floorPlanEditor/ZoneCanvas.js +6 -13
- package/dist/eventfullymanaged/components/floorPlanEditor/ZoneCanvas.js.map +1 -1
- package/dist/eventfullymanaged/components/floorPlanEditor/ZonePanels.d.ts +3 -3
- package/dist/eventfullymanaged/components/floorPlanEditor/ZonePanels.d.ts.map +1 -1
- package/dist/eventfullymanaged/components/floorPlanEditor/ZonePanels.js +1 -2
- package/dist/eventfullymanaged/components/floorPlanEditor/ZonePanels.js.map +1 -1
- package/dist/eventfullymanaged/components/floorPlanEditor/useZoneEditorState.js +1 -2
- package/dist/eventfullymanaged/components/floorPlanEditor/useZoneEditorState.js.map +1 -1
- package/dist/eventfullymanaged/components/index.js +5 -4
- package/dist/eventfullymanaged/context/EventfullyManagedContext.d.ts +1 -1
- package/dist/eventfullymanaged/context/EventfullyManagedContext.d.ts.map +1 -1
- package/dist/eventfullymanaged/context/EventfullyManagedContext.js +4 -8
- package/dist/eventfullymanaged/context/EventfullyManagedContext.js.map +1 -1
- package/dist/eventfullymanaged/hooks/index.js +1 -1
- package/dist/eventfullymanaged/hooks/useEventDelete.js +8 -9
- package/dist/eventfullymanaged/hooks/useEventDelete.js.map +1 -1
- package/dist/eventfullymanaged/hooks/useEvmSubscription.js +7 -12
- package/dist/eventfullymanaged/hooks/useEvmSubscription.js.map +1 -1
- package/dist/eventfullymanaged/hooks/useVirtualCall.js +9 -17
- package/dist/eventfullymanaged/hooks/useVirtualCall.js.map +1 -1
- package/dist/eventfullymanaged/lib/floorPlanZones.js +26 -28
- package/dist/eventfullymanaged/lib/floorPlanZones.js.map +1 -1
- package/dist/eventfullymanaged/lib/format.js +1 -2
- package/dist/eventfullymanaged/lib/format.js.map +1 -1
- package/dist/eventfullymanaged/lib/mutationResult.js +1 -2
- package/dist/eventfullymanaged/lib/mutationResult.js.map +1 -1
- package/dist/eventfullymanaged/lib/offlineCheckInQueue.js +29 -30
- package/dist/eventfullymanaged/lib/offlineCheckInQueue.js.map +1 -1
- package/dist/eventfullymanaged/lib/toast.js +2 -3
- package/dist/eventfullymanaged/lib/toast.js.map +1 -1
- package/dist/eventfullymanaged/lib/useOfflineCheckInSync.js +1 -2
- package/dist/eventfullymanaged/lib/useOfflineCheckInSync.js.map +1 -1
- package/dist/eventfullymanaged/pages/dashboard/DashboardPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/dashboard/DashboardPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/dashboard/DashboardPage.js +46 -47
- package/dist/eventfullymanaged/pages/dashboard/DashboardPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/events/EventDetailPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/events/EventDetailPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/events/EventDetailPage.js +197 -195
- package/dist/eventfullymanaged/pages/events/EventDetailPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/events/EventFormPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/events/EventFormPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/events/EventFormPage.js +35 -36
- package/dist/eventfullymanaged/pages/events/EventFormPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/events/SessionFormPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/events/SessionFormPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/events/SessionFormPage.js +47 -48
- package/dist/eventfullymanaged/pages/events/SessionFormPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/events/TicketTypeFormPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/events/TicketTypeFormPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/events/TicketTypeFormPage.js +31 -32
- package/dist/eventfullymanaged/pages/events/TicketTypeFormPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/events/VirtualSessionPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/events/VirtualSessionPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/events/VirtualSessionPage.js +170 -171
- package/dist/eventfullymanaged/pages/events/VirtualSessionPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/events/eventFormUtils.js +1 -2
- package/dist/eventfullymanaged/pages/events/eventFormUtils.js.map +1 -1
- package/dist/eventfullymanaged/pages/exhibitors/ExhibitorFormPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/exhibitors/ExhibitorFormPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/exhibitors/ExhibitorFormPage.js +20 -21
- package/dist/eventfullymanaged/pages/exhibitors/ExhibitorFormPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/exhibitors/ExhibitorsPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/exhibitors/ExhibitorsPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/exhibitors/ExhibitorsPage.js +18 -19
- package/dist/eventfullymanaged/pages/exhibitors/ExhibitorsPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/leads/LeadCaptureDialog.d.ts +1 -1
- package/dist/eventfullymanaged/pages/leads/LeadCaptureDialog.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/leads/LeadCaptureDialog.js +13 -14
- package/dist/eventfullymanaged/pages/leads/LeadCaptureDialog.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/AnalyticsPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/modules/AnalyticsPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/modules/AnalyticsPage.js +89 -47
- package/dist/eventfullymanaged/pages/modules/AnalyticsPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/AttendeeProfilePage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/modules/AttendeeProfilePage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/modules/AttendeeProfilePage.js +8 -8
- package/dist/eventfullymanaged/pages/modules/AttendeeProfilePage.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/AttendeeRecommendations.d.ts +1 -1
- package/dist/eventfullymanaged/pages/modules/AttendeeRecommendations.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/modules/AttendeeRecommendations.js +3 -4
- package/dist/eventfullymanaged/pages/modules/AttendeeRecommendations.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/CommunicationPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/modules/CommunicationPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/modules/CommunicationPage.js +170 -171
- package/dist/eventfullymanaged/pages/modules/CommunicationPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/EntityListSection.d.ts +1 -1
- package/dist/eventfullymanaged/pages/modules/EntityListSection.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/modules/EntityListSection.js +1 -2
- package/dist/eventfullymanaged/pages/modules/EntityListSection.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/EventsPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/modules/EventsPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/modules/EventsPage.js +185 -186
- package/dist/eventfullymanaged/pages/modules/EventsPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/IntegrationsPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/modules/IntegrationsPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/modules/IntegrationsPage.js +73 -78
- package/dist/eventfullymanaged/pages/modules/IntegrationsPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/KioskPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/modules/KioskPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/modules/KioskPage.js +204 -208
- package/dist/eventfullymanaged/pages/modules/KioskPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/NetworkingPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/modules/NetworkingPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/modules/NetworkingPage.js +177 -181
- package/dist/eventfullymanaged/pages/modules/NetworkingPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/OperationsHubPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/modules/OperationsHubPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/modules/OperationsHubPage.js +18 -19
- package/dist/eventfullymanaged/pages/modules/OperationsHubPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/RegistrationPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/modules/RegistrationPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/modules/RegistrationPage.js +122 -123
- package/dist/eventfullymanaged/pages/modules/RegistrationPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/RoadmapPanel.d.ts +1 -1
- package/dist/eventfullymanaged/pages/modules/RoadmapPanel.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/modules/RoadmapPanel.js +1 -2
- package/dist/eventfullymanaged/pages/modules/RoadmapPanel.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/SponsorDetailsPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/modules/SponsorDetailsPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/modules/SponsorDetailsPage.js +11 -11
- package/dist/eventfullymanaged/pages/modules/SponsorDetailsPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/SponsorLeadsPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/modules/SponsorLeadsPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/modules/SponsorLeadsPage.js +7 -8
- package/dist/eventfullymanaged/pages/modules/SponsorLeadsPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/VenueResourcesPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/modules/VenueResourcesPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/modules/VenueResourcesPage.js +4 -5
- package/dist/eventfullymanaged/pages/modules/VenueResourcesPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/WorkflowsPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/modules/WorkflowsPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/modules/WorkflowsPage.js +14 -15
- package/dist/eventfullymanaged/pages/modules/WorkflowsPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/networking/MeetingFormPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/networking/MeetingFormPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/networking/MeetingFormPage.js +31 -32
- package/dist/eventfullymanaged/pages/networking/MeetingFormPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/networking/NetworkingProfileFormPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/networking/NetworkingProfileFormPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/networking/NetworkingProfileFormPage.js +19 -20
- package/dist/eventfullymanaged/pages/networking/NetworkingProfileFormPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/registration/AttendeeFormPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/registration/AttendeeFormPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/registration/AttendeeFormPage.js +19 -20
- package/dist/eventfullymanaged/pages/registration/AttendeeFormPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/registration/PromoCodeFormPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/registration/PromoCodeFormPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/registration/PromoCodeFormPage.js +21 -22
- package/dist/eventfullymanaged/pages/registration/PromoCodeFormPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/registration/RegisterAttendeePage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/registration/RegisterAttendeePage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/registration/RegisterAttendeePage.js +85 -103
- package/dist/eventfullymanaged/pages/registration/RegisterAttendeePage.js.map +1 -1
- package/dist/eventfullymanaged/pages/speakers/SpeakerFormPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/speakers/SpeakerFormPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/speakers/SpeakerFormPage.js +35 -36
- package/dist/eventfullymanaged/pages/speakers/SpeakerFormPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/speakers/SpeakersPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/speakers/SpeakersPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/speakers/SpeakersPage.js +40 -41
- package/dist/eventfullymanaged/pages/speakers/SpeakersPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/sponsors/SponsorFormPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/sponsors/SponsorFormPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/sponsors/SponsorFormPage.js +22 -23
- package/dist/eventfullymanaged/pages/sponsors/SponsorFormPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/sponsors/SponsorsListPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/sponsors/SponsorsListPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/sponsors/SponsorsListPage.js +29 -30
- package/dist/eventfullymanaged/pages/sponsors/SponsorsListPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/venues/FloorPlansPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/venues/FloorPlansPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/venues/FloorPlansPage.js +138 -147
- package/dist/eventfullymanaged/pages/venues/FloorPlansPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/venues/VenueDetailPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/venues/VenueDetailPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/venues/VenueDetailPage.js +6 -7
- package/dist/eventfullymanaged/pages/venues/VenueDetailPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/venues/VenueFormPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/venues/VenueFormPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/venues/VenueFormPage.js +14 -15
- package/dist/eventfullymanaged/pages/venues/VenueFormPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/venues/VenueListPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/venues/VenueListPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/venues/VenueListPage.js +18 -19
- package/dist/eventfullymanaged/pages/venues/VenueListPage.js.map +1 -1
- package/dist/eventfullymanaged/store/eventfullyManagedStore.js +0 -1
- package/dist/eventfullymanaged/store/eventfullyManagedStore.js.map +1 -1
- package/dist/eventfullymanaged/types/index.d.ts.map +1 -1
- package/dist/eventfullymanaged/utils/cn.js +1 -2
- package/dist/eventfullymanaged/utils/shellBridge.js +1 -2
- package/dist/eventfullymanaged/utils/shellBridge.js.map +1 -1
- package/dist/generated/wspace-operations.d.ts +93 -1
- package/dist/generated/wspace-operations.d.ts.map +1 -1
- package/dist/generated/wspace-operations.js +51 -0
- package/dist/generated/wspace-operations.js.map +1 -0
- package/dist/generated/wspace-types.d.ts +121703 -40790
- package/dist/generated/wspace-types.d.ts.map +1 -1
- package/dist/node_modules/@apollo/client/core/networkStatus.js +1 -2
- package/dist/node_modules/@apollo/client/core/networkStatus.js.map +1 -1
- package/dist/node_modules/@apollo/client/react/context/ApolloContext.js +2 -3
- package/dist/node_modules/@apollo/client/react/context/ApolloContext.js.map +1 -1
- package/dist/node_modules/@apollo/client/react/hooks/constants.js +1 -2
- package/dist/node_modules/@apollo/client/react/hooks/constants.js.map +1 -1
- package/dist/node_modules/@apollo/client/react/hooks/internal/useDeepMemo.js +2 -3
- package/dist/node_modules/@apollo/client/react/hooks/internal/useDeepMemo.js.map +1 -1
- package/dist/node_modules/@apollo/client/react/hooks/internal/useIsomorphicLayoutEffect.js +1 -2
- package/dist/node_modules/@apollo/client/react/hooks/internal/useIsomorphicLayoutEffect.js.map +1 -1
- package/dist/node_modules/@apollo/client/react/hooks/internal/wrapHook.js +6 -7
- package/dist/node_modules/@apollo/client/react/hooks/internal/wrapHook.js.map +1 -1
- package/dist/node_modules/@apollo/client/react/hooks/useApolloClient.js +2 -3
- package/dist/node_modules/@apollo/client/react/hooks/useApolloClient.js.map +1 -1
- package/dist/node_modules/@apollo/client/react/hooks/useMutation.js +23 -24
- package/dist/node_modules/@apollo/client/react/hooks/useMutation.js.map +1 -1
- package/dist/node_modules/@apollo/client/react/hooks/useQuery.js +51 -53
- package/dist/node_modules/@apollo/client/react/hooks/useQuery.js.map +1 -1
- package/dist/node_modules/@apollo/client/react/hooks/useSyncExternalStore.js +4 -5
- package/dist/node_modules/@apollo/client/react/hooks/useSyncExternalStore.js.map +1 -1
- package/dist/node_modules/@apollo/client/react/internal/index.js +1 -2
- package/dist/node_modules/@apollo/client/react/internal/index.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/canUseDOM.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/canUseDOM.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/compact.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/compact.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/constants.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/constants.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/deepFreeze.js +2 -3
- package/dist/node_modules/@apollo/client/utilities/internal/deepFreeze.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/globals/global.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/globals/global.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/globals/maybe.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/globals/maybe.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/isNonNullObject.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/isNonNullObject.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/makeUniqueId.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/makeUniqueId.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/maybeDeepFreeze.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/maybeDeepFreeze.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/mergeOptions.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/mergeOptions.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/preventUnhandledRejection.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/preventUnhandledRejection.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/stringifyForDisplay.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/stringifyForDisplay.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/invariant/index.js +2 -3
- package/dist/node_modules/@apollo/client/utilities/invariant/index.js.map +1 -1
- package/dist/node_modules/@apollo/client/version.js +2 -3
- package/dist/node_modules/@apollo/client/version.js.map +1 -1
- package/dist/node_modules/@wry/equality/lib/index.js +3 -4
- package/dist/node_modules/@wry/equality/lib/index.js.map +1 -1
- package/dist/node_modules/clsx/dist/clsx.js +8 -7
- package/dist/node_modules/clsx/dist/clsx.js.map +1 -1
- package/dist/node_modules/d3-array/src/ascending.js +1 -2
- package/dist/node_modules/d3-array/src/ascending.js.map +1 -1
- package/dist/node_modules/d3-array/src/bisect.js +2 -3
- package/dist/node_modules/d3-array/src/bisect.js.map +1 -1
- package/dist/node_modules/d3-array/src/bisector.js +1 -2
- package/dist/node_modules/d3-array/src/bisector.js.map +1 -1
- package/dist/node_modules/d3-array/src/descending.js +1 -2
- package/dist/node_modules/d3-array/src/descending.js.map +1 -1
- package/dist/node_modules/d3-array/src/max.js +1 -2
- package/dist/node_modules/d3-array/src/max.js.map +1 -1
- package/dist/node_modules/d3-array/src/min.js +1 -2
- package/dist/node_modules/d3-array/src/min.js.map +1 -1
- package/dist/node_modules/d3-array/src/number.js +1 -2
- package/dist/node_modules/d3-array/src/number.js.map +1 -1
- package/dist/node_modules/d3-array/src/quantile.js +17 -18
- package/dist/node_modules/d3-array/src/quantile.js.map +1 -1
- package/dist/node_modules/d3-array/src/quickselect.js +1 -2
- package/dist/node_modules/d3-array/src/quickselect.js.map +1 -1
- package/dist/node_modules/d3-array/src/range.js +1 -2
- package/dist/node_modules/d3-array/src/range.js.map +1 -1
- package/dist/node_modules/d3-array/src/sort.js +1 -2
- package/dist/node_modules/d3-array/src/sort.js.map +1 -1
- package/dist/node_modules/d3-array/src/ticks.js +5 -5
- package/dist/node_modules/d3-array/src/ticks.js.map +1 -1
- package/dist/node_modules/d3-color/src/color.js +2 -3
- package/dist/node_modules/d3-color/src/color.js.map +1 -1
- package/dist/node_modules/d3-color/src/define.js +1 -2
- package/dist/node_modules/d3-color/src/define.js.map +1 -1
- package/dist/node_modules/d3-format/src/defaultLocale.js +2 -3
- package/dist/node_modules/d3-format/src/defaultLocale.js.map +1 -1
- package/dist/node_modules/d3-format/src/exponent.js +1 -2
- package/dist/node_modules/d3-format/src/exponent.js.map +1 -1
- package/dist/node_modules/d3-format/src/formatDecimal.js +1 -2
- package/dist/node_modules/d3-format/src/formatDecimal.js.map +1 -1
- package/dist/node_modules/d3-format/src/formatGroup.js +1 -2
- package/dist/node_modules/d3-format/src/formatGroup.js.map +1 -1
- package/dist/node_modules/d3-format/src/formatNumerals.js +1 -2
- package/dist/node_modules/d3-format/src/formatNumerals.js.map +1 -1
- package/dist/node_modules/d3-format/src/formatPrefixAuto.js +1 -2
- package/dist/node_modules/d3-format/src/formatPrefixAuto.js.map +1 -1
- package/dist/node_modules/d3-format/src/formatRounded.js +1 -2
- package/dist/node_modules/d3-format/src/formatRounded.js.map +1 -1
- package/dist/node_modules/d3-format/src/formatSpecifier.js +2 -3
- package/dist/node_modules/d3-format/src/formatSpecifier.js.map +1 -1
- package/dist/node_modules/d3-format/src/formatTrim.js +1 -3
- package/dist/node_modules/d3-format/src/formatTrim.js.map +1 -1
- package/dist/node_modules/d3-format/src/formatTypes.js +1 -2
- package/dist/node_modules/d3-format/src/formatTypes.js.map +1 -1
- package/dist/node_modules/d3-format/src/identity.js +1 -2
- package/dist/node_modules/d3-format/src/identity.js.map +1 -1
- package/dist/node_modules/d3-format/src/locale.js +10 -13
- package/dist/node_modules/d3-format/src/locale.js.map +1 -1
- package/dist/node_modules/d3-format/src/precisionFixed.js +1 -2
- package/dist/node_modules/d3-format/src/precisionFixed.js.map +1 -1
- package/dist/node_modules/d3-format/src/precisionPrefix.js +1 -2
- package/dist/node_modules/d3-format/src/precisionPrefix.js.map +1 -1
- package/dist/node_modules/d3-format/src/precisionRound.js +1 -2
- package/dist/node_modules/d3-format/src/precisionRound.js.map +1 -1
- package/dist/node_modules/d3-interpolate/src/array.js +2 -4
- package/dist/node_modules/d3-interpolate/src/array.js.map +1 -1
- package/dist/node_modules/d3-interpolate/src/basis.js +1 -2
- package/dist/node_modules/d3-interpolate/src/basis.js.map +1 -1
- package/dist/node_modules/d3-interpolate/src/basisClosed.js +1 -2
- package/dist/node_modules/d3-interpolate/src/basisClosed.js.map +1 -1
- package/dist/node_modules/d3-interpolate/src/color.js +1 -2
- package/dist/node_modules/d3-interpolate/src/color.js.map +1 -1
- package/dist/node_modules/d3-interpolate/src/constant.js +1 -2
- package/dist/node_modules/d3-interpolate/src/constant.js.map +1 -1
- package/dist/node_modules/d3-interpolate/src/date.js +1 -2
- package/dist/node_modules/d3-interpolate/src/date.js.map +1 -1
- package/dist/node_modules/d3-interpolate/src/number.js +1 -2
- package/dist/node_modules/d3-interpolate/src/number.js.map +1 -1
- package/dist/node_modules/d3-interpolate/src/numberArray.js +1 -2
- package/dist/node_modules/d3-interpolate/src/numberArray.js.map +1 -1
- package/dist/node_modules/d3-interpolate/src/object.js +2 -3
- package/dist/node_modules/d3-interpolate/src/object.js.map +1 -1
- package/dist/node_modules/d3-interpolate/src/piecewise.js +1 -2
- package/dist/node_modules/d3-interpolate/src/piecewise.js.map +1 -1
- package/dist/node_modules/d3-interpolate/src/rgb.js +1 -2
- package/dist/node_modules/d3-interpolate/src/rgb.js.map +1 -1
- package/dist/node_modules/d3-interpolate/src/round.js +1 -2
- package/dist/node_modules/d3-interpolate/src/round.js.map +1 -1
- package/dist/node_modules/d3-interpolate/src/string.js +1 -2
- package/dist/node_modules/d3-interpolate/src/string.js.map +1 -1
- package/dist/node_modules/d3-interpolate/src/value.js +10 -11
- package/dist/node_modules/d3-interpolate/src/value.js.map +1 -1
- package/dist/node_modules/d3-path/src/path.js +8 -7
- package/dist/node_modules/d3-path/src/path.js.map +1 -1
- package/dist/node_modules/d3-scale/src/band.js +1 -2
- package/dist/node_modules/d3-scale/src/band.js.map +1 -1
- package/dist/node_modules/d3-scale/src/constant.js +1 -2
- package/dist/node_modules/d3-scale/src/constant.js.map +1 -1
- package/dist/node_modules/d3-scale/src/continuous.js +7 -8
- package/dist/node_modules/d3-scale/src/continuous.js.map +1 -1
- package/dist/node_modules/d3-scale/src/diverging.js +35 -36
- package/dist/node_modules/d3-scale/src/diverging.js.map +1 -1
- package/dist/node_modules/d3-scale/src/identity.js +6 -7
- package/dist/node_modules/d3-scale/src/identity.js.map +1 -1
- package/dist/node_modules/d3-scale/src/init.js +3 -8
- package/dist/node_modules/d3-scale/src/init.js.map +1 -1
- package/dist/node_modules/d3-scale/src/linear.js +6 -7
- package/dist/node_modules/d3-scale/src/linear.js.map +1 -1
- package/dist/node_modules/d3-scale/src/log.js +32 -33
- package/dist/node_modules/d3-scale/src/log.js.map +1 -1
- package/dist/node_modules/d3-scale/src/nice.js +1 -2
- package/dist/node_modules/d3-scale/src/nice.js.map +1 -1
- package/dist/node_modules/d3-scale/src/number.js +1 -2
- package/dist/node_modules/d3-scale/src/number.js.map +1 -1
- package/dist/node_modules/d3-scale/src/ordinal.js +1 -2
- package/dist/node_modules/d3-scale/src/ordinal.js.map +1 -1
- package/dist/node_modules/d3-scale/src/pow.js +13 -14
- package/dist/node_modules/d3-scale/src/pow.js.map +1 -1
- package/dist/node_modules/d3-scale/src/quantile.js +2 -3
- package/dist/node_modules/d3-scale/src/quantile.js.map +1 -1
- package/dist/node_modules/d3-scale/src/quantize.js +5 -6
- package/dist/node_modules/d3-scale/src/quantize.js.map +1 -1
- package/dist/node_modules/d3-scale/src/radial.js +8 -9
- package/dist/node_modules/d3-scale/src/radial.js.map +1 -1
- package/dist/node_modules/d3-scale/src/sequential.js +27 -28
- package/dist/node_modules/d3-scale/src/sequential.js.map +1 -1
- package/dist/node_modules/d3-scale/src/sequentialQuantile.js +6 -7
- package/dist/node_modules/d3-scale/src/sequentialQuantile.js.map +1 -1
- package/dist/node_modules/d3-scale/src/symlog.js +12 -13
- package/dist/node_modules/d3-scale/src/symlog.js.map +1 -1
- package/dist/node_modules/d3-scale/src/threshold.js +2 -3
- package/dist/node_modules/d3-scale/src/threshold.js.map +1 -1
- package/dist/node_modules/d3-scale/src/tickFormat.js +7 -10
- package/dist/node_modules/d3-scale/src/tickFormat.js.map +1 -1
- package/dist/node_modules/d3-scale/src/time.js +27 -28
- package/dist/node_modules/d3-scale/src/time.js.map +1 -1
- package/dist/node_modules/d3-scale/src/utcTime.js +13 -14
- package/dist/node_modules/d3-scale/src/utcTime.js.map +1 -1
- package/dist/node_modules/d3-shape/src/area.js +34 -33
- package/dist/node_modules/d3-shape/src/area.js.map +1 -1
- package/dist/node_modules/d3-shape/src/array.js +0 -1
- package/dist/node_modules/d3-shape/src/array.js.map +1 -1
- package/dist/node_modules/d3-shape/src/constant.js +1 -2
- package/dist/node_modules/d3-shape/src/constant.js.map +1 -1
- package/dist/node_modules/d3-shape/src/curve/basis.js +4 -9
- package/dist/node_modules/d3-shape/src/curve/basis.js.map +1 -1
- package/dist/node_modules/d3-shape/src/curve/basisClosed.js +3 -8
- package/dist/node_modules/d3-shape/src/curve/basisClosed.js.map +1 -1
- package/dist/node_modules/d3-shape/src/curve/basisOpen.js +2 -5
- package/dist/node_modules/d3-shape/src/curve/basisOpen.js.map +1 -1
- package/dist/node_modules/d3-shape/src/curve/bump.js +2 -5
- package/dist/node_modules/d3-shape/src/curve/bump.js.map +1 -1
- package/dist/node_modules/d3-shape/src/curve/linear.js +2 -5
- package/dist/node_modules/d3-shape/src/curve/linear.js.map +1 -1
- package/dist/node_modules/d3-shape/src/curve/linearClosed.js +1 -2
- package/dist/node_modules/d3-shape/src/curve/linearClosed.js.map +1 -1
- package/dist/node_modules/d3-shape/src/curve/monotone.js +4 -9
- package/dist/node_modules/d3-shape/src/curve/monotone.js.map +1 -1
- package/dist/node_modules/d3-shape/src/curve/natural.js +5 -4
- package/dist/node_modules/d3-shape/src/curve/natural.js.map +1 -1
- package/dist/node_modules/d3-shape/src/curve/step.js +6 -9
- package/dist/node_modules/d3-shape/src/curve/step.js.map +1 -1
- package/dist/node_modules/d3-shape/src/line.js +16 -17
- package/dist/node_modules/d3-shape/src/line.js.map +1 -1
- package/dist/node_modules/d3-shape/src/math.js +1 -2
- package/dist/node_modules/d3-shape/src/math.js.map +1 -1
- package/dist/node_modules/d3-shape/src/noop.js +1 -2
- package/dist/node_modules/d3-shape/src/noop.js.map +1 -1
- package/dist/node_modules/d3-shape/src/offset/expand.js +1 -2
- package/dist/node_modules/d3-shape/src/offset/expand.js.map +1 -1
- package/dist/node_modules/d3-shape/src/offset/none.js +1 -2
- package/dist/node_modules/d3-shape/src/offset/none.js.map +1 -1
- package/dist/node_modules/d3-shape/src/offset/silhouette.js +1 -2
- package/dist/node_modules/d3-shape/src/offset/silhouette.js.map +1 -1
- package/dist/node_modules/d3-shape/src/offset/wiggle.js +2 -3
- package/dist/node_modules/d3-shape/src/offset/wiggle.js.map +1 -1
- package/dist/node_modules/d3-shape/src/order/none.js +1 -2
- package/dist/node_modules/d3-shape/src/order/none.js.map +1 -1
- package/dist/node_modules/d3-shape/src/path.js +1 -2
- package/dist/node_modules/d3-shape/src/path.js.map +1 -1
- package/dist/node_modules/d3-shape/src/point.js +1 -2
- package/dist/node_modules/d3-shape/src/point.js.map +1 -1
- package/dist/node_modules/d3-shape/src/stack.js +13 -14
- package/dist/node_modules/d3-shape/src/stack.js.map +1 -1
- package/dist/node_modules/d3-shape/src/symbol/circle.js +1 -2
- package/dist/node_modules/d3-shape/src/symbol/circle.js.map +1 -1
- package/dist/node_modules/d3-shape/src/symbol/cross.js +1 -2
- package/dist/node_modules/d3-shape/src/symbol/cross.js.map +1 -1
- package/dist/node_modules/d3-shape/src/symbol/diamond.js +1 -2
- package/dist/node_modules/d3-shape/src/symbol/diamond.js.map +1 -1
- package/dist/node_modules/d3-shape/src/symbol/square.js +1 -2
- package/dist/node_modules/d3-shape/src/symbol/square.js.map +1 -1
- package/dist/node_modules/d3-shape/src/symbol/star.js +1 -2
- package/dist/node_modules/d3-shape/src/symbol/star.js.map +1 -1
- package/dist/node_modules/d3-shape/src/symbol/triangle.js +1 -2
- package/dist/node_modules/d3-shape/src/symbol/triangle.js.map +1 -1
- package/dist/node_modules/d3-shape/src/symbol/wye.js +1 -2
- package/dist/node_modules/d3-shape/src/symbol/wye.js.map +1 -1
- package/dist/node_modules/d3-shape/src/symbol.js +1 -2
- package/dist/node_modules/d3-shape/src/symbol.js.map +1 -1
- package/dist/node_modules/d3-time/src/day.js +1 -2
- package/dist/node_modules/d3-time/src/day.js.map +1 -1
- package/dist/node_modules/d3-time/src/duration.js +1 -2
- package/dist/node_modules/d3-time/src/duration.js.map +1 -1
- package/dist/node_modules/d3-time/src/hour.js +1 -2
- package/dist/node_modules/d3-time/src/hour.js.map +1 -1
- package/dist/node_modules/d3-time/src/interval.js +5 -4
- package/dist/node_modules/d3-time/src/interval.js.map +1 -1
- package/dist/node_modules/d3-time/src/millisecond.js +1 -2
- package/dist/node_modules/d3-time/src/millisecond.js.map +1 -1
- package/dist/node_modules/d3-time/src/minute.js +1 -2
- package/dist/node_modules/d3-time/src/minute.js.map +1 -1
- package/dist/node_modules/d3-time/src/month.js +1 -2
- package/dist/node_modules/d3-time/src/month.js.map +1 -1
- package/dist/node_modules/d3-time/src/second.js +1 -2
- package/dist/node_modules/d3-time/src/second.js.map +1 -1
- package/dist/node_modules/d3-time/src/ticks.js +27 -28
- package/dist/node_modules/d3-time/src/ticks.js.map +1 -1
- package/dist/node_modules/d3-time/src/week.js +2 -3
- package/dist/node_modules/d3-time/src/week.js.map +1 -1
- package/dist/node_modules/d3-time/src/year.js +1 -2
- package/dist/node_modules/d3-time/src/year.js.map +1 -1
- package/dist/node_modules/d3-time-format/src/defaultLocale.js +6 -7
- package/dist/node_modules/d3-time-format/src/defaultLocale.js.map +1 -1
- package/dist/node_modules/d3-time-format/src/locale.js +1 -2
- package/dist/node_modules/d3-time-format/src/locale.js.map +1 -1
- package/dist/node_modules/decimal.js-light/decimal.js +33 -30
- package/dist/node_modules/decimal.js-light/decimal.js.map +1 -1
- package/dist/node_modules/eventemitter3/index.js +2 -3
- package/dist/node_modules/eventemitter3/index.js.map +1 -1
- package/dist/node_modules/fast-equals/dist/es/index.js +3 -4
- package/dist/node_modules/fast-equals/dist/es/index.js.map +1 -1
- package/dist/node_modules/graphql/error/GraphQLError.js +1 -2
- package/dist/node_modules/graphql/error/GraphQLError.js.map +1 -1
- package/dist/node_modules/graphql/error/syntaxError.js +1 -2
- package/dist/node_modules/graphql/error/syntaxError.js.map +1 -1
- package/dist/node_modules/graphql/jsutils/devAssert.js +1 -2
- package/dist/node_modules/graphql/jsutils/devAssert.js.map +1 -1
- package/dist/node_modules/graphql/jsutils/inspect.js +24 -27
- package/dist/node_modules/graphql/jsutils/inspect.js.map +1 -1
- package/dist/node_modules/graphql/jsutils/instanceOf.js +0 -1
- package/dist/node_modules/graphql/jsutils/instanceOf.js.map +1 -1
- package/dist/node_modules/graphql/jsutils/invariant.js +1 -2
- package/dist/node_modules/graphql/jsutils/invariant.js.map +1 -1
- package/dist/node_modules/graphql/jsutils/isObjectLike.js +1 -2
- package/dist/node_modules/graphql/jsutils/isObjectLike.js.map +1 -1
- package/dist/node_modules/graphql/language/ast.js +7 -8
- package/dist/node_modules/graphql/language/ast.js.map +1 -1
- package/dist/node_modules/graphql/language/blockString.js +1 -2
- package/dist/node_modules/graphql/language/blockString.js.map +1 -1
- package/dist/node_modules/graphql/language/characterClasses.js +2 -3
- package/dist/node_modules/graphql/language/characterClasses.js.map +1 -1
- package/dist/node_modules/graphql/language/directiveLocation.js +1 -2
- package/dist/node_modules/graphql/language/directiveLocation.js.map +1 -1
- package/dist/node_modules/graphql/language/kinds.js +1 -2
- package/dist/node_modules/graphql/language/kinds.js.map +1 -1
- package/dist/node_modules/graphql/language/lexer.js +47 -50
- package/dist/node_modules/graphql/language/lexer.js.map +1 -1
- package/dist/node_modules/graphql/language/location.js +1 -2
- package/dist/node_modules/graphql/language/location.js.map +1 -1
- package/dist/node_modules/graphql/language/parser.js +100 -97
- package/dist/node_modules/graphql/language/parser.js.map +1 -1
- package/dist/node_modules/graphql/language/printLocation.js +1 -2
- package/dist/node_modules/graphql/language/printLocation.js.map +1 -1
- package/dist/node_modules/graphql/language/source.js +1 -2
- package/dist/node_modules/graphql/language/source.js.map +1 -1
- package/dist/node_modules/graphql/language/tokenKind.js +1 -2
- package/dist/node_modules/graphql/language/tokenKind.js.map +1 -1
- package/dist/node_modules/graphql-tag/lib/index.js +10 -11
- package/dist/node_modules/graphql-tag/lib/index.js.map +1 -1
- package/dist/node_modules/internmap/src/index.js +1 -2
- package/dist/node_modules/internmap/src/index.js.map +1 -1
- package/dist/node_modules/lodash/_DataView.js +4 -5
- package/dist/node_modules/lodash/_DataView.js.map +1 -1
- package/dist/node_modules/lodash/_Hash.js +1 -2
- package/dist/node_modules/lodash/_Hash.js.map +1 -1
- package/dist/node_modules/lodash/_ListCache.js +1 -2
- package/dist/node_modules/lodash/_ListCache.js.map +1 -1
- package/dist/node_modules/lodash/_Map.js +4 -5
- package/dist/node_modules/lodash/_Map.js.map +1 -1
- package/dist/node_modules/lodash/_MapCache.js +1 -2
- package/dist/node_modules/lodash/_MapCache.js.map +1 -1
- package/dist/node_modules/lodash/_Promise.js +4 -5
- package/dist/node_modules/lodash/_Promise.js.map +1 -1
- package/dist/node_modules/lodash/_Set.js +4 -5
- package/dist/node_modules/lodash/_Set.js.map +1 -1
- package/dist/node_modules/lodash/_SetCache.js +1 -2
- package/dist/node_modules/lodash/_SetCache.js.map +1 -1
- package/dist/node_modules/lodash/_Stack.js +3 -3
- package/dist/node_modules/lodash/_Stack.js.map +1 -1
- package/dist/node_modules/lodash/_Symbol.js +1 -2
- package/dist/node_modules/lodash/_Symbol.js.map +1 -1
- package/dist/node_modules/lodash/_Uint8Array.js +1 -2
- package/dist/node_modules/lodash/_Uint8Array.js.map +1 -1
- package/dist/node_modules/lodash/_WeakMap.js +4 -5
- package/dist/node_modules/lodash/_WeakMap.js.map +1 -1
- package/dist/node_modules/lodash/_apply.js +1 -2
- package/dist/node_modules/lodash/_apply.js.map +1 -1
- package/dist/node_modules/lodash/_arrayEvery.js +1 -2
- package/dist/node_modules/lodash/_arrayEvery.js.map +1 -1
- package/dist/node_modules/lodash/_arrayFilter.js +1 -2
- package/dist/node_modules/lodash/_arrayFilter.js.map +1 -1
- package/dist/node_modules/lodash/_arrayIncludes.js +1 -2
- package/dist/node_modules/lodash/_arrayIncludes.js.map +1 -1
- package/dist/node_modules/lodash/_arrayIncludesWith.js +1 -2
- package/dist/node_modules/lodash/_arrayIncludesWith.js.map +1 -1
- package/dist/node_modules/lodash/_arrayLikeKeys.js +5 -6
- package/dist/node_modules/lodash/_arrayLikeKeys.js.map +1 -1
- package/dist/node_modules/lodash/_arrayMap.js +1 -2
- package/dist/node_modules/lodash/_arrayMap.js.map +1 -1
- package/dist/node_modules/lodash/_arrayPush.js +1 -2
- package/dist/node_modules/lodash/_arrayPush.js.map +1 -1
- package/dist/node_modules/lodash/_arraySome.js +1 -2
- package/dist/node_modules/lodash/_arraySome.js.map +1 -1
- package/dist/node_modules/lodash/_asciiToArray.js +1 -2
- package/dist/node_modules/lodash/_asciiToArray.js.map +1 -1
- package/dist/node_modules/lodash/_assocIndexOf.js +1 -2
- package/dist/node_modules/lodash/_assocIndexOf.js.map +1 -1
- package/dist/node_modules/lodash/_baseAssignValue.js +1 -2
- package/dist/node_modules/lodash/_baseAssignValue.js.map +1 -1
- package/dist/node_modules/lodash/_baseEach.js +1 -2
- package/dist/node_modules/lodash/_baseEach.js.map +1 -1
- package/dist/node_modules/lodash/_baseEvery.js +1 -2
- package/dist/node_modules/lodash/_baseEvery.js.map +1 -1
- package/dist/node_modules/lodash/_baseExtremum.js +1 -2
- package/dist/node_modules/lodash/_baseExtremum.js.map +1 -1
- package/dist/node_modules/lodash/_baseFindIndex.js +1 -2
- package/dist/node_modules/lodash/_baseFindIndex.js.map +1 -1
- package/dist/node_modules/lodash/_baseFlatten.js +1 -2
- package/dist/node_modules/lodash/_baseFlatten.js.map +1 -1
- package/dist/node_modules/lodash/_baseFor.js +1 -2
- package/dist/node_modules/lodash/_baseFor.js.map +1 -1
- package/dist/node_modules/lodash/_baseForOwn.js +4 -5
- package/dist/node_modules/lodash/_baseForOwn.js.map +1 -1
- package/dist/node_modules/lodash/_baseGet.js +1 -2
- package/dist/node_modules/lodash/_baseGet.js.map +1 -1
- package/dist/node_modules/lodash/_baseGetAllKeys.js +4 -5
- package/dist/node_modules/lodash/_baseGetAllKeys.js.map +1 -1
- package/dist/node_modules/lodash/_baseGetTag.js +1 -2
- package/dist/node_modules/lodash/_baseGetTag.js.map +1 -1
- package/dist/node_modules/lodash/_baseGt.js +1 -2
- package/dist/node_modules/lodash/_baseGt.js.map +1 -1
- package/dist/node_modules/lodash/_baseHasIn.js +1 -2
- package/dist/node_modules/lodash/_baseHasIn.js.map +1 -1
- package/dist/node_modules/lodash/_baseIndexOf.js +1 -2
- package/dist/node_modules/lodash/_baseIndexOf.js.map +1 -1
- package/dist/node_modules/lodash/_baseIsArguments.js +1 -2
- package/dist/node_modules/lodash/_baseIsArguments.js.map +1 -1
- package/dist/node_modules/lodash/_baseIsEqual.js +4 -5
- package/dist/node_modules/lodash/_baseIsEqual.js.map +1 -1
- package/dist/node_modules/lodash/_baseIsEqualDeep.js +10 -11
- package/dist/node_modules/lodash/_baseIsEqualDeep.js.map +1 -1
- package/dist/node_modules/lodash/_baseIsMatch.js +1 -2
- package/dist/node_modules/lodash/_baseIsMatch.js.map +1 -1
- package/dist/node_modules/lodash/_baseIsNaN.js +1 -2
- package/dist/node_modules/lodash/_baseIsNaN.js.map +1 -1
- package/dist/node_modules/lodash/_baseIsNative.js +5 -6
- package/dist/node_modules/lodash/_baseIsNative.js.map +1 -1
- package/dist/node_modules/lodash/_baseIsTypedArray.js +4 -5
- package/dist/node_modules/lodash/_baseIsTypedArray.js.map +1 -1
- package/dist/node_modules/lodash/_baseIteratee.js +6 -7
- package/dist/node_modules/lodash/_baseIteratee.js.map +1 -1
- package/dist/node_modules/lodash/_baseKeys.js +1 -2
- package/dist/node_modules/lodash/_baseKeys.js.map +1 -1
- package/dist/node_modules/lodash/_baseLt.js +1 -2
- package/dist/node_modules/lodash/_baseLt.js.map +1 -1
- package/dist/node_modules/lodash/_baseMap.js +4 -5
- package/dist/node_modules/lodash/_baseMap.js.map +1 -1
- package/dist/node_modules/lodash/_baseMatches.js +1 -2
- package/dist/node_modules/lodash/_baseMatches.js.map +1 -1
- package/dist/node_modules/lodash/_baseMatchesProperty.js +7 -8
- package/dist/node_modules/lodash/_baseMatchesProperty.js.map +1 -1
- package/dist/node_modules/lodash/_baseOrderBy.js +11 -12
- package/dist/node_modules/lodash/_baseOrderBy.js.map +1 -1
- package/dist/node_modules/lodash/_baseProperty.js +1 -2
- package/dist/node_modules/lodash/_baseProperty.js.map +1 -1
- package/dist/node_modules/lodash/_basePropertyDeep.js +1 -2
- package/dist/node_modules/lodash/_basePropertyDeep.js.map +1 -1
- package/dist/node_modules/lodash/_baseRange.js +1 -2
- package/dist/node_modules/lodash/_baseRange.js.map +1 -1
- package/dist/node_modules/lodash/_baseRest.js +1 -2
- package/dist/node_modules/lodash/_baseRest.js.map +1 -1
- package/dist/node_modules/lodash/_baseSetToString.js +5 -6
- package/dist/node_modules/lodash/_baseSetToString.js.map +1 -1
- package/dist/node_modules/lodash/_baseSlice.js +1 -2
- package/dist/node_modules/lodash/_baseSlice.js.map +1 -1
- package/dist/node_modules/lodash/_baseSome.js +1 -2
- package/dist/node_modules/lodash/_baseSome.js.map +1 -1
- package/dist/node_modules/lodash/_baseSortBy.js +1 -2
- package/dist/node_modules/lodash/_baseSortBy.js.map +1 -1
- package/dist/node_modules/lodash/_baseTimes.js +1 -2
- package/dist/node_modules/lodash/_baseTimes.js.map +1 -1
- package/dist/node_modules/lodash/_baseToString.js +6 -7
- package/dist/node_modules/lodash/_baseToString.js.map +1 -1
- package/dist/node_modules/lodash/_baseTrim.js +1 -2
- package/dist/node_modules/lodash/_baseTrim.js.map +1 -1
- package/dist/node_modules/lodash/_baseUnary.js +1 -2
- package/dist/node_modules/lodash/_baseUnary.js.map +1 -1
- package/dist/node_modules/lodash/_baseUniq.js +7 -8
- package/dist/node_modules/lodash/_baseUniq.js.map +1 -1
- package/dist/node_modules/lodash/_cacheHas.js +1 -2
- package/dist/node_modules/lodash/_cacheHas.js.map +1 -1
- package/dist/node_modules/lodash/_castPath.js +1 -2
- package/dist/node_modules/lodash/_castPath.js.map +1 -1
- package/dist/node_modules/lodash/_castSlice.js +1 -2
- package/dist/node_modules/lodash/_castSlice.js.map +1 -1
- package/dist/node_modules/lodash/_compareAscending.js +1 -2
- package/dist/node_modules/lodash/_compareAscending.js.map +1 -1
- package/dist/node_modules/lodash/_compareMultiple.js +1 -2
- package/dist/node_modules/lodash/_compareMultiple.js.map +1 -1
- package/dist/node_modules/lodash/_coreJsData.js +1 -2
- package/dist/node_modules/lodash/_coreJsData.js.map +1 -1
- package/dist/node_modules/lodash/_createBaseEach.js +1 -2
- package/dist/node_modules/lodash/_createBaseEach.js.map +1 -1
- package/dist/node_modules/lodash/_createBaseFor.js +1 -2
- package/dist/node_modules/lodash/_createBaseFor.js.map +1 -1
- package/dist/node_modules/lodash/_createCaseFirst.js +6 -7
- package/dist/node_modules/lodash/_createCaseFirst.js.map +1 -1
- package/dist/node_modules/lodash/_createFind.js +5 -6
- package/dist/node_modules/lodash/_createFind.js.map +1 -1
- package/dist/node_modules/lodash/_createRange.js +4 -5
- package/dist/node_modules/lodash/_createRange.js.map +1 -1
- package/dist/node_modules/lodash/_createSet.js +6 -7
- package/dist/node_modules/lodash/_createSet.js.map +1 -1
- package/dist/node_modules/lodash/_defineProperty.js +1 -2
- package/dist/node_modules/lodash/_defineProperty.js.map +1 -1
- package/dist/node_modules/lodash/_equalArrays.js +1 -2
- package/dist/node_modules/lodash/_equalArrays.js.map +1 -1
- package/dist/node_modules/lodash/_equalByTag.js +5 -6
- package/dist/node_modules/lodash/_equalByTag.js.map +1 -1
- package/dist/node_modules/lodash/_equalObjects.js +1 -2
- package/dist/node_modules/lodash/_equalObjects.js.map +1 -1
- package/dist/node_modules/lodash/_freeGlobal.js +1 -2
- package/dist/node_modules/lodash/_freeGlobal.js.map +1 -1
- package/dist/node_modules/lodash/_getAllKeys.js +1 -2
- package/dist/node_modules/lodash/_getAllKeys.js.map +1 -1
- package/dist/node_modules/lodash/_getMapData.js +1 -2
- package/dist/node_modules/lodash/_getMapData.js.map +1 -1
- package/dist/node_modules/lodash/_getMatchData.js +4 -5
- package/dist/node_modules/lodash/_getMatchData.js.map +1 -1
- package/dist/node_modules/lodash/_getNative.js +1 -2
- package/dist/node_modules/lodash/_getNative.js.map +1 -1
- package/dist/node_modules/lodash/_getPrototype.js +1 -2
- package/dist/node_modules/lodash/_getPrototype.js.map +1 -1
- package/dist/node_modules/lodash/_getRawTag.js +1 -2
- package/dist/node_modules/lodash/_getRawTag.js.map +1 -1
- package/dist/node_modules/lodash/_getSymbols.js +1 -2
- package/dist/node_modules/lodash/_getSymbols.js.map +1 -1
- package/dist/node_modules/lodash/_getTag.js +9 -10
- package/dist/node_modules/lodash/_getTag.js.map +1 -1
- package/dist/node_modules/lodash/_getValue.js +1 -2
- package/dist/node_modules/lodash/_getValue.js.map +1 -1
- package/dist/node_modules/lodash/_hasPath.js +8 -9
- package/dist/node_modules/lodash/_hasPath.js.map +1 -1
- package/dist/node_modules/lodash/_hasUnicode.js +1 -2
- package/dist/node_modules/lodash/_hasUnicode.js.map +1 -1
- package/dist/node_modules/lodash/_hashClear.js +1 -2
- package/dist/node_modules/lodash/_hashClear.js.map +1 -1
- package/dist/node_modules/lodash/_hashDelete.js +1 -2
- package/dist/node_modules/lodash/_hashDelete.js.map +1 -1
- package/dist/node_modules/lodash/_hashGet.js +1 -2
- package/dist/node_modules/lodash/_hashGet.js.map +1 -1
- package/dist/node_modules/lodash/_hashHas.js +1 -2
- package/dist/node_modules/lodash/_hashHas.js.map +1 -1
- package/dist/node_modules/lodash/_hashSet.js +1 -2
- package/dist/node_modules/lodash/_hashSet.js.map +1 -1
- package/dist/node_modules/lodash/_isFlattenable.js +5 -6
- package/dist/node_modules/lodash/_isFlattenable.js.map +1 -1
- package/dist/node_modules/lodash/_isIndex.js +6 -7
- package/dist/node_modules/lodash/_isIndex.js.map +1 -1
- package/dist/node_modules/lodash/_isIterateeCall.js +5 -6
- package/dist/node_modules/lodash/_isIterateeCall.js.map +1 -1
- package/dist/node_modules/lodash/_isKey.js +1 -2
- package/dist/node_modules/lodash/_isKey.js.map +1 -1
- package/dist/node_modules/lodash/_isKeyable.js +1 -2
- package/dist/node_modules/lodash/_isKeyable.js.map +1 -1
- package/dist/node_modules/lodash/_isMasked.js +1 -2
- package/dist/node_modules/lodash/_isMasked.js.map +1 -1
- package/dist/node_modules/lodash/_isPrototype.js +1 -2
- package/dist/node_modules/lodash/_isPrototype.js.map +1 -1
- package/dist/node_modules/lodash/_isStrictComparable.js +1 -2
- package/dist/node_modules/lodash/_isStrictComparable.js.map +1 -1
- package/dist/node_modules/lodash/_listCacheClear.js +1 -2
- package/dist/node_modules/lodash/_listCacheClear.js.map +1 -1
- package/dist/node_modules/lodash/_listCacheDelete.js +1 -2
- package/dist/node_modules/lodash/_listCacheDelete.js.map +1 -1
- package/dist/node_modules/lodash/_listCacheGet.js +1 -2
- package/dist/node_modules/lodash/_listCacheGet.js.map +1 -1
- package/dist/node_modules/lodash/_listCacheHas.js +1 -2
- package/dist/node_modules/lodash/_listCacheHas.js.map +1 -1
- package/dist/node_modules/lodash/_listCacheSet.js +1 -2
- package/dist/node_modules/lodash/_listCacheSet.js.map +1 -1
- package/dist/node_modules/lodash/_mapCacheClear.js +1 -2
- package/dist/node_modules/lodash/_mapCacheClear.js.map +1 -1
- package/dist/node_modules/lodash/_mapCacheDelete.js +1 -2
- package/dist/node_modules/lodash/_mapCacheDelete.js.map +1 -1
- package/dist/node_modules/lodash/_mapCacheGet.js +1 -2
- package/dist/node_modules/lodash/_mapCacheGet.js.map +1 -1
- package/dist/node_modules/lodash/_mapCacheHas.js +1 -2
- package/dist/node_modules/lodash/_mapCacheHas.js.map +1 -1
- package/dist/node_modules/lodash/_mapCacheSet.js +1 -2
- package/dist/node_modules/lodash/_mapCacheSet.js.map +1 -1
- package/dist/node_modules/lodash/_mapToArray.js +1 -2
- package/dist/node_modules/lodash/_mapToArray.js.map +1 -1
- package/dist/node_modules/lodash/_matchesStrictComparable.js +2 -3
- package/dist/node_modules/lodash/_matchesStrictComparable.js.map +1 -1
- package/dist/node_modules/lodash/_memoizeCapped.js +1 -2
- package/dist/node_modules/lodash/_memoizeCapped.js.map +1 -1
- package/dist/node_modules/lodash/_nativeCreate.js +1 -2
- package/dist/node_modules/lodash/_nativeCreate.js.map +1 -1
- package/dist/node_modules/lodash/_nativeKeys.js +1 -2
- package/dist/node_modules/lodash/_nativeKeys.js.map +1 -1
- package/dist/node_modules/lodash/_nodeUtil.js +1 -2
- package/dist/node_modules/lodash/_nodeUtil.js.map +1 -1
- package/dist/node_modules/lodash/_objectToString.js +1 -2
- package/dist/node_modules/lodash/_objectToString.js.map +1 -1
- package/dist/node_modules/lodash/_overArg.js +1 -2
- package/dist/node_modules/lodash/_overArg.js.map +1 -1
- package/dist/node_modules/lodash/_overRest.js +1 -2
- package/dist/node_modules/lodash/_overRest.js.map +1 -1
- package/dist/node_modules/lodash/_root.js +1 -2
- package/dist/node_modules/lodash/_root.js.map +1 -1
- package/dist/node_modules/lodash/_setCacheAdd.js +4 -6
- package/dist/node_modules/lodash/_setCacheAdd.js.map +1 -1
- package/dist/node_modules/lodash/_setCacheHas.js +1 -2
- package/dist/node_modules/lodash/_setCacheHas.js.map +1 -1
- package/dist/node_modules/lodash/_setToArray.js +1 -2
- package/dist/node_modules/lodash/_setToArray.js.map +1 -1
- package/dist/node_modules/lodash/_setToString.js +1 -2
- package/dist/node_modules/lodash/_setToString.js.map +1 -1
- package/dist/node_modules/lodash/_shortOut.js +8 -9
- package/dist/node_modules/lodash/_shortOut.js.map +1 -1
- package/dist/node_modules/lodash/_stackClear.js +1 -2
- package/dist/node_modules/lodash/_stackClear.js.map +1 -1
- package/dist/node_modules/lodash/_stackDelete.js +1 -2
- package/dist/node_modules/lodash/_stackDelete.js.map +1 -1
- package/dist/node_modules/lodash/_stackGet.js +1 -2
- package/dist/node_modules/lodash/_stackGet.js.map +1 -1
- package/dist/node_modules/lodash/_stackHas.js +1 -2
- package/dist/node_modules/lodash/_stackHas.js.map +1 -1
- package/dist/node_modules/lodash/_stackSet.js +1 -2
- package/dist/node_modules/lodash/_stackSet.js.map +1 -1
- package/dist/node_modules/lodash/_strictIndexOf.js +1 -2
- package/dist/node_modules/lodash/_strictIndexOf.js.map +1 -1
- package/dist/node_modules/lodash/_stringToArray.js +4 -5
- package/dist/node_modules/lodash/_stringToArray.js.map +1 -1
- package/dist/node_modules/lodash/_stringToPath.js +1 -2
- package/dist/node_modules/lodash/_stringToPath.js.map +1 -1
- package/dist/node_modules/lodash/_toKey.js +2 -3
- package/dist/node_modules/lodash/_toKey.js.map +1 -1
- package/dist/node_modules/lodash/_toSource.js +1 -2
- package/dist/node_modules/lodash/_toSource.js.map +1 -1
- package/dist/node_modules/lodash/_trimmedEndIndex.js +1 -2
- package/dist/node_modules/lodash/_trimmedEndIndex.js.map +1 -1
- package/dist/node_modules/lodash/_unicodeToArray.js +1 -2
- package/dist/node_modules/lodash/_unicodeToArray.js.map +1 -1
- package/dist/node_modules/lodash/constant.js +1 -2
- package/dist/node_modules/lodash/constant.js.map +1 -1
- package/dist/node_modules/lodash/debounce.js +1 -2
- package/dist/node_modules/lodash/debounce.js.map +1 -1
- package/dist/node_modules/lodash/eq.js +1 -2
- package/dist/node_modules/lodash/eq.js.map +1 -1
- package/dist/node_modules/lodash/every.js +7 -8
- package/dist/node_modules/lodash/every.js.map +1 -1
- package/dist/node_modules/lodash/find.js +1 -2
- package/dist/node_modules/lodash/find.js.map +1 -1
- package/dist/node_modules/lodash/findIndex.js +4 -5
- package/dist/node_modules/lodash/findIndex.js.map +1 -1
- package/dist/node_modules/lodash/flatMap.js +1 -2
- package/dist/node_modules/lodash/flatMap.js.map +1 -1
- package/dist/node_modules/lodash/get.js +1 -2
- package/dist/node_modules/lodash/get.js.map +1 -1
- package/dist/node_modules/lodash/hasIn.js +1 -2
- package/dist/node_modules/lodash/hasIn.js.map +1 -1
- package/dist/node_modules/lodash/identity.js +1 -2
- package/dist/node_modules/lodash/identity.js.map +1 -1
- package/dist/node_modules/lodash/isArguments.js +4 -5
- package/dist/node_modules/lodash/isArguments.js.map +1 -1
- package/dist/node_modules/lodash/isArray.js +1 -2
- package/dist/node_modules/lodash/isArray.js.map +1 -1
- package/dist/node_modules/lodash/isArrayLike.js +1 -2
- package/dist/node_modules/lodash/isArrayLike.js.map +1 -1
- package/dist/node_modules/lodash/isBoolean.js +1 -2
- package/dist/node_modules/lodash/isBoolean.js.map +1 -1
- package/dist/node_modules/lodash/isBuffer.js +1 -2
- package/dist/node_modules/lodash/isBuffer.js.map +1 -1
- package/dist/node_modules/lodash/isEqual.js +1 -2
- package/dist/node_modules/lodash/isEqual.js.map +1 -1
- package/dist/node_modules/lodash/isFunction.js +1 -2
- package/dist/node_modules/lodash/isFunction.js.map +1 -1
- package/dist/node_modules/lodash/isLength.js +4 -6
- package/dist/node_modules/lodash/isLength.js.map +1 -1
- package/dist/node_modules/lodash/isNaN.js +1 -2
- package/dist/node_modules/lodash/isNaN.js.map +1 -1
- package/dist/node_modules/lodash/isNil.js +1 -2
- package/dist/node_modules/lodash/isNil.js.map +1 -1
- package/dist/node_modules/lodash/isNumber.js +1 -2
- package/dist/node_modules/lodash/isNumber.js.map +1 -1
- package/dist/node_modules/lodash/isObject.js +1 -2
- package/dist/node_modules/lodash/isObject.js.map +1 -1
- package/dist/node_modules/lodash/isObjectLike.js +1 -2
- package/dist/node_modules/lodash/isObjectLike.js.map +1 -1
- package/dist/node_modules/lodash/isPlainObject.js +4 -5
- package/dist/node_modules/lodash/isPlainObject.js.map +1 -1
- package/dist/node_modules/lodash/isString.js +4 -5
- package/dist/node_modules/lodash/isString.js.map +1 -1
- package/dist/node_modules/lodash/isSymbol.js +1 -2
- package/dist/node_modules/lodash/isSymbol.js.map +1 -1
- package/dist/node_modules/lodash/isTypedArray.js +1 -2
- package/dist/node_modules/lodash/isTypedArray.js.map +1 -1
- package/dist/node_modules/lodash/keys.js +1 -2
- package/dist/node_modules/lodash/keys.js.map +1 -1
- package/dist/node_modules/lodash/last.js +1 -2
- package/dist/node_modules/lodash/last.js.map +1 -1
- package/dist/node_modules/lodash/map.js +6 -7
- package/dist/node_modules/lodash/map.js.map +1 -1
- package/dist/node_modules/lodash/mapValues.js +4 -5
- package/dist/node_modules/lodash/mapValues.js.map +1 -1
- package/dist/node_modules/lodash/max.js +5 -6
- package/dist/node_modules/lodash/max.js.map +1 -1
- package/dist/node_modules/lodash/maxBy.js +5 -6
- package/dist/node_modules/lodash/maxBy.js.map +1 -1
- package/dist/node_modules/lodash/memoize.js +1 -2
- package/dist/node_modules/lodash/memoize.js.map +1 -1
- package/dist/node_modules/lodash/min.js +5 -6
- package/dist/node_modules/lodash/min.js.map +1 -1
- package/dist/node_modules/lodash/minBy.js +4 -5
- package/dist/node_modules/lodash/minBy.js.map +1 -1
- package/dist/node_modules/lodash/noop.js +1 -2
- package/dist/node_modules/lodash/noop.js.map +1 -1
- package/dist/node_modules/lodash/now.js +1 -2
- package/dist/node_modules/lodash/now.js.map +1 -1
- package/dist/node_modules/lodash/property.js +6 -7
- package/dist/node_modules/lodash/property.js.map +1 -1
- package/dist/node_modules/lodash/range.js +1 -2
- package/dist/node_modules/lodash/range.js.map +1 -1
- package/dist/node_modules/lodash/some.js +7 -8
- package/dist/node_modules/lodash/some.js.map +1 -1
- package/dist/node_modules/lodash/sortBy.js +1 -2
- package/dist/node_modules/lodash/sortBy.js.map +1 -1
- package/dist/node_modules/lodash/stubArray.js +1 -2
- package/dist/node_modules/lodash/stubArray.js.map +1 -1
- package/dist/node_modules/lodash/stubFalse.js +1 -2
- package/dist/node_modules/lodash/stubFalse.js.map +1 -1
- package/dist/node_modules/lodash/throttle.js +4 -5
- package/dist/node_modules/lodash/throttle.js.map +1 -1
- package/dist/node_modules/lodash/toFinite.js +2 -3
- package/dist/node_modules/lodash/toFinite.js.map +1 -1
- package/dist/node_modules/lodash/toInteger.js +1 -2
- package/dist/node_modules/lodash/toInteger.js.map +1 -1
- package/dist/node_modules/lodash/toNumber.js +4 -5
- package/dist/node_modules/lodash/toNumber.js.map +1 -1
- package/dist/node_modules/lodash/toString.js +1 -2
- package/dist/node_modules/lodash/toString.js.map +1 -1
- package/dist/node_modules/lodash/uniqBy.js +1 -2
- package/dist/node_modules/lodash/uniqBy.js.map +1 -1
- package/dist/node_modules/lodash/upperFirst.js +1 -2
- package/dist/node_modules/lodash/upperFirst.js.map +1 -1
- package/dist/node_modules/object-assign/index.js +1 -2
- package/dist/node_modules/object-assign/index.js.map +1 -1
- package/dist/node_modules/prop-types/checkPropTypes.js +1 -2
- package/dist/node_modules/prop-types/checkPropTypes.js.map +1 -1
- package/dist/node_modules/prop-types/factoryWithThrowingShims.js +1 -2
- package/dist/node_modules/prop-types/factoryWithThrowingShims.js.map +1 -1
- package/dist/node_modules/prop-types/factoryWithTypeCheckers.js +3 -3
- package/dist/node_modules/prop-types/factoryWithTypeCheckers.js.map +1 -1
- package/dist/node_modules/prop-types/index.js +1 -2
- package/dist/node_modules/prop-types/index.js.map +1 -1
- package/dist/node_modules/prop-types/lib/ReactPropTypesSecret.js +1 -2
- package/dist/node_modules/prop-types/lib/ReactPropTypesSecret.js.map +1 -1
- package/dist/node_modules/prop-types/lib/has.js +1 -2
- package/dist/node_modules/prop-types/lib/has.js.map +1 -1
- package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js +1 -2
- package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js.map +1 -1
- package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js +1 -2
- package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js.map +1 -1
- package/dist/node_modules/prop-types/node_modules/react-is/index.js +2 -3
- package/dist/node_modules/prop-types/node_modules/react-is/index.js.map +1 -1
- package/dist/node_modules/react-is/cjs/react-is.development.js +31 -32
- package/dist/node_modules/react-is/cjs/react-is.development.js.map +1 -1
- package/dist/node_modules/react-is/cjs/react-is.production.min.js +1 -2
- package/dist/node_modules/react-is/cjs/react-is.production.min.js.map +1 -1
- package/dist/node_modules/react-is/index.js +2 -3
- package/dist/node_modules/react-is/index.js.map +1 -1
- package/dist/node_modules/react-smooth/es6/Animate.js +33 -41
- package/dist/node_modules/react-smooth/es6/Animate.js.map +1 -1
- package/dist/node_modules/react-smooth/es6/AnimateManager.js +2 -5
- package/dist/node_modules/react-smooth/es6/AnimateManager.js.map +1 -1
- package/dist/node_modules/react-smooth/es6/configUpdate.js +1 -2
- package/dist/node_modules/react-smooth/es6/configUpdate.js.map +1 -1
- package/dist/node_modules/react-smooth/es6/easing.js +1 -2
- package/dist/node_modules/react-smooth/es6/easing.js.map +1 -1
- package/dist/node_modules/react-smooth/es6/index.js +1 -2
- package/dist/node_modules/react-smooth/es6/index.js.map +1 -1
- package/dist/node_modules/react-smooth/es6/setRafTimeout.js +1 -2
- package/dist/node_modules/react-smooth/es6/setRafTimeout.js.map +1 -1
- package/dist/node_modules/react-smooth/es6/util.js +17 -16
- package/dist/node_modules/react-smooth/es6/util.js.map +1 -1
- package/dist/node_modules/recharts/es6/cartesian/Area.js +99 -100
- package/dist/node_modules/recharts/es6/cartesian/Area.js.map +1 -1
- package/dist/node_modules/recharts/es6/cartesian/Bar.js +103 -104
- package/dist/node_modules/recharts/es6/cartesian/Bar.js.map +1 -1
- package/dist/node_modules/recharts/es6/cartesian/Brush.js +35 -36
- package/dist/node_modules/recharts/es6/cartesian/Brush.js.map +1 -1
- package/dist/node_modules/recharts/es6/cartesian/CartesianAxis.js +60 -67
- package/dist/node_modules/recharts/es6/cartesian/CartesianAxis.js.map +1 -1
- package/dist/node_modules/recharts/es6/cartesian/ErrorBar.js +20 -21
- package/dist/node_modules/recharts/es6/cartesian/ErrorBar.js.map +1 -1
- package/dist/node_modules/recharts/es6/cartesian/ReferenceArea.js +29 -30
- package/dist/node_modules/recharts/es6/cartesian/ReferenceArea.js.map +1 -1
- package/dist/node_modules/recharts/es6/cartesian/ReferenceDot.js +23 -24
- package/dist/node_modules/recharts/es6/cartesian/ReferenceDot.js.map +1 -1
- package/dist/node_modules/recharts/es6/cartesian/ReferenceLine.js +31 -32
- package/dist/node_modules/recharts/es6/cartesian/ReferenceLine.js.map +1 -1
- package/dist/node_modules/recharts/es6/cartesian/XAxis.js +10 -11
- package/dist/node_modules/recharts/es6/cartesian/XAxis.js.map +1 -1
- package/dist/node_modules/recharts/es6/cartesian/YAxis.js +10 -11
- package/dist/node_modules/recharts/es6/cartesian/YAxis.js.map +1 -1
- package/dist/node_modules/recharts/es6/cartesian/getEquidistantTicks.js +5 -6
- package/dist/node_modules/recharts/es6/cartesian/getEquidistantTicks.js.map +1 -1
- package/dist/node_modules/recharts/es6/cartesian/getTicks.js +7 -8
- package/dist/node_modules/recharts/es6/cartesian/getTicks.js.map +1 -1
- package/dist/node_modules/recharts/es6/chart/AccessibilityManager.js +2 -5
- package/dist/node_modules/recharts/es6/chart/AccessibilityManager.js.map +1 -1
- package/dist/node_modules/recharts/es6/chart/AreaChart.js +5 -6
- package/dist/node_modules/recharts/es6/chart/AreaChart.js.map +1 -1
- package/dist/node_modules/recharts/es6/chart/BarChart.js +7 -8
- package/dist/node_modules/recharts/es6/chart/BarChart.js.map +1 -1
- package/dist/node_modules/recharts/es6/chart/PieChart.js +11 -12
- package/dist/node_modules/recharts/es6/chart/PieChart.js.map +1 -1
- package/dist/node_modules/recharts/es6/chart/generateCategoricalChart.js +534 -533
- package/dist/node_modules/recharts/es6/chart/generateCategoricalChart.js.map +1 -1
- package/dist/node_modules/recharts/es6/component/Cell.js +1 -2
- package/dist/node_modules/recharts/es6/component/Cell.js.map +1 -1
- package/dist/node_modules/recharts/es6/component/Cursor.js +17 -18
- package/dist/node_modules/recharts/es6/component/Cursor.js.map +1 -1
- package/dist/node_modules/recharts/es6/component/DefaultLegendContent.js +35 -36
- package/dist/node_modules/recharts/es6/component/DefaultLegendContent.js.map +1 -1
- package/dist/node_modules/recharts/es6/component/DefaultTooltipContent.js +16 -17
- package/dist/node_modules/recharts/es6/component/DefaultTooltipContent.js.map +1 -1
- package/dist/node_modules/recharts/es6/component/Label.js +85 -86
- package/dist/node_modules/recharts/es6/component/Label.js.map +1 -1
- package/dist/node_modules/recharts/es6/component/LabelList.js +20 -21
- package/dist/node_modules/recharts/es6/component/LabelList.js.map +1 -1
- package/dist/node_modules/recharts/es6/component/Legend.js +26 -23
- package/dist/node_modules/recharts/es6/component/Legend.js.map +1 -1
- package/dist/node_modules/recharts/es6/component/ResponsiveContainer.js +16 -17
- package/dist/node_modules/recharts/es6/component/ResponsiveContainer.js.map +1 -1
- package/dist/node_modules/recharts/es6/component/Text.js +18 -21
- package/dist/node_modules/recharts/es6/component/Text.js.map +1 -1
- package/dist/node_modules/recharts/es6/component/Tooltip.js +16 -17
- package/dist/node_modules/recharts/es6/component/Tooltip.js.map +1 -1
- package/dist/node_modules/recharts/es6/component/TooltipBoundingBox.js +3 -4
- package/dist/node_modules/recharts/es6/component/TooltipBoundingBox.js.map +1 -1
- package/dist/node_modules/recharts/es6/container/Layer.js +5 -6
- package/dist/node_modules/recharts/es6/container/Layer.js.map +1 -1
- package/dist/node_modules/recharts/es6/container/Surface.js +5 -6
- package/dist/node_modules/recharts/es6/container/Surface.js.map +1 -1
- package/dist/node_modules/recharts/es6/context/chartLayoutContext.js +7 -8
- package/dist/node_modules/recharts/es6/context/chartLayoutContext.js.map +1 -1
- package/dist/node_modules/recharts/es6/polar/Pie.js +103 -107
- package/dist/node_modules/recharts/es6/polar/Pie.js.map +1 -1
- package/dist/node_modules/recharts/es6/polar/PolarAngleAxis.js +30 -31
- package/dist/node_modules/recharts/es6/polar/PolarAngleAxis.js.map +1 -1
- package/dist/node_modules/recharts/es6/polar/PolarRadiusAxis.js +38 -41
- package/dist/node_modules/recharts/es6/polar/PolarRadiusAxis.js.map +1 -1
- package/dist/node_modules/recharts/es6/shape/Cross.js +4 -5
- package/dist/node_modules/recharts/es6/shape/Cross.js.map +1 -1
- package/dist/node_modules/recharts/es6/shape/Curve.js +51 -52
- package/dist/node_modules/recharts/es6/shape/Curve.js.map +1 -1
- package/dist/node_modules/recharts/es6/shape/Dot.js +3 -4
- package/dist/node_modules/recharts/es6/shape/Dot.js.map +1 -1
- package/dist/node_modules/recharts/es6/shape/Polygon.js +7 -8
- package/dist/node_modules/recharts/es6/shape/Polygon.js.map +1 -1
- package/dist/node_modules/recharts/es6/shape/Rectangle.js +8 -9
- package/dist/node_modules/recharts/es6/shape/Rectangle.js.map +1 -1
- package/dist/node_modules/recharts/es6/shape/Sector.js +33 -34
- package/dist/node_modules/recharts/es6/shape/Sector.js.map +1 -1
- package/dist/node_modules/recharts/es6/shape/Symbols.js +33 -34
- package/dist/node_modules/recharts/es6/shape/Symbols.js.map +1 -1
- package/dist/node_modules/recharts/es6/shape/Trapezoid.js +8 -9
- package/dist/node_modules/recharts/es6/shape/Trapezoid.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/ActiveShapeUtils.js +24 -25
- package/dist/node_modules/recharts/es6/util/ActiveShapeUtils.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/BarUtils.js +10 -11
- package/dist/node_modules/recharts/es6/util/BarUtils.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/CartesianUtils.js +33 -34
- package/dist/node_modules/recharts/es6/util/CartesianUtils.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/ChartUtils.js +236 -235
- package/dist/node_modules/recharts/es6/util/ChartUtils.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/CssPrefixUtils.js +1 -2
- package/dist/node_modules/recharts/es6/util/CssPrefixUtils.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/DOMUtils.js +1 -2
- package/dist/node_modules/recharts/es6/util/DOMUtils.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/DataUtils.js +7 -8
- package/dist/node_modules/recharts/es6/util/DataUtils.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/DetectReferenceElementsDomain.js +20 -21
- package/dist/node_modules/recharts/es6/util/DetectReferenceElementsDomain.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/Events.js +0 -1
- package/dist/node_modules/recharts/es6/util/Events.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/Global.js +0 -1
- package/dist/node_modules/recharts/es6/util/Global.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/IfOverflowMatches.js +1 -2
- package/dist/node_modules/recharts/es6/util/IfOverflowMatches.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/LogUtils.js +9 -8
- package/dist/node_modules/recharts/es6/util/LogUtils.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/PolarUtils.js +6 -7
- package/dist/node_modules/recharts/es6/util/PolarUtils.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/ReactUtils.js +11 -12
- package/dist/node_modules/recharts/es6/util/ReactUtils.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/ReduceCSSCalc.js +5 -6
- package/dist/node_modules/recharts/es6/util/ReduceCSSCalc.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/ShallowEqual.js +1 -2
- package/dist/node_modules/recharts/es6/util/ShallowEqual.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/TickUtils.js +4 -4
- package/dist/node_modules/recharts/es6/util/TickUtils.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/calculateViewBox.js +0 -1
- package/dist/node_modules/recharts/es6/util/calculateViewBox.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/cursor/getCursorPoints.js +7 -6
- package/dist/node_modules/recharts/es6/util/cursor/getCursorPoints.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/cursor/getCursorRectangle.js +1 -2
- package/dist/node_modules/recharts/es6/util/cursor/getCursorRectangle.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/cursor/getRadialCursorPoints.js +1 -2
- package/dist/node_modules/recharts/es6/util/cursor/getRadialCursorPoints.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/getEveryNthWithCondition.js +1 -2
- package/dist/node_modules/recharts/es6/util/getEveryNthWithCondition.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/getLegendProps.js +9 -10
- package/dist/node_modules/recharts/es6/util/getLegendProps.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/isDomainSpecifiedByUser.js +1 -2
- package/dist/node_modules/recharts/es6/util/isDomainSpecifiedByUser.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/payload/getUniqPayload.js +4 -5
- package/dist/node_modules/recharts/es6/util/payload/getUniqPayload.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/tooltip/translate.js +3 -4
- package/dist/node_modules/recharts/es6/util/tooltip/translate.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/types.js +2 -3
- package/dist/node_modules/recharts/es6/util/types.js.map +1 -1
- package/dist/node_modules/recharts-scale/es6/getNiceTickValues.js +2 -3
- package/dist/node_modules/recharts-scale/es6/getNiceTickValues.js.map +1 -1
- package/dist/node_modules/recharts-scale/es6/index.js +1 -1
- package/dist/node_modules/recharts-scale/es6/util/arithmetic.js +1 -2
- package/dist/node_modules/recharts-scale/es6/util/arithmetic.js.map +1 -1
- package/dist/node_modules/recharts-scale/es6/util/utils.js +3 -4
- package/dist/node_modules/recharts-scale/es6/util/utils.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/NotificationFactories.js +2 -3
- package/dist/node_modules/rxjs/dist/esm5/internal/NotificationFactories.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/Scheduler.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/Scheduler.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/Subscriber.js +13 -14
- package/dist/node_modules/rxjs/dist/esm5/internal/Subscriber.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/Subscription.js +20 -17
- package/dist/node_modules/rxjs/dist/esm5/internal/Subscription.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/config.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/config.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js +3 -4
- package/dist/node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/operators/observeOn.js +12 -13
- package/dist/node_modules/rxjs/dist/esm5/internal/operators/observeOn.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/Action.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/Action.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/AsapAction.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/AsapAction.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/AsapScheduler.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/AsapScheduler.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/AsyncAction.js +17 -18
- package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/AsyncAction.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/AsyncScheduler.js +12 -14
- package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/AsyncScheduler.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/asap.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/asap.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/dateTimestampProvider.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/dateTimestampProvider.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/immediateProvider.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/immediateProvider.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/intervalProvider.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/intervalProvider.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/util/Immediate.js +2 -3
- package/dist/node_modules/rxjs/dist/esm5/internal/util/Immediate.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/util/errorContext.js +3 -6
- package/dist/node_modules/rxjs/dist/esm5/internal/util/errorContext.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/util/executeSchedule.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/util/executeSchedule.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/util/isFunction.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/util/isFunction.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/util/lift.js +2 -3
- package/dist/node_modules/rxjs/dist/esm5/internal/util/lift.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/util/noop.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/util/noop.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js.map +1 -1
- package/dist/node_modules/sonner/dist/index.js +75 -69
- package/dist/node_modules/sonner/dist/index.js.map +1 -1
- package/dist/node_modules/tiny-invariant/dist/esm/tiny-invariant.js +2 -3
- package/dist/node_modules/tiny-invariant/dist/esm/tiny-invariant.js.map +1 -1
- package/dist/node_modules/tslib/tslib.es6.js +1 -2
- package/dist/node_modules/tslib/tslib.es6.js.map +1 -1
- package/dist/node_modules/victory-vendor/es/d3-scale.js +2 -3
- package/dist/node_modules/victory-vendor/es/d3-scale.js.map +1 -1
- package/dist/services/createSandboxAssistantTransport.js +1 -2
- package/dist/services/createSandboxAssistantTransport.js.map +1 -1
- package/dist/shared/hooks/useTr.js +1 -2
- package/dist/shared/hooks/useTr.js.map +1 -1
- package/dist/utils/pageContext.js +3 -4
- package/dist/utils/pageContext.js.map +1 -1
- package/package.json +30 -16
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pagination.js","names":[],"sources":["../../../src/eventfullymanaged/components/Pagination.tsx"],"sourcesContent":["import { useState } from 'react';\nimport { Button } from '@burdenoff/fe-libs/ui';\nimport { ChevronLeft, ChevronRight } from 'lucide-react';\n\n/**\n * Server-side offset/limit pagination shared by every EventfullyManaged list page.\n *\n * The backend list resolvers (`eventfullyManagedEvents`, `...Sponsors`, etc.) all\n * accept `{ limit, offset }` and return `{ total, items }`. `usePagination` owns\n * the `limit`/`offset` window; the page feeds them straight into its query, then\n * renders `<Pagination>` with the page's `total` and the number of rows actually\n * returned so Prev/Next gate correctly on `offset + loadedCount < total`.\n */\n\nconst DEFAULT_PAGE_SIZE = 20;\n\nexport interface UsePaginationOptions {\n pageSize?: number;\n /**\n * When this value changes (e.g. a search term or active-event filter) the\n * window resets to the first page so the user is never stranded on an offset\n * that no longer has rows.\n */\n resetKey?: unknown;\n}\n\nexport interface UsePaginationResult {\n /** Page size — pass as the query's `limit`. */\n limit: number;\n /** Row offset — pass as the query's `offset`. */\n offset: number;\n /** 1-based page index, derived from offset/limit. */\n page: number;\n nextPage: () => void;\n prevPage: () => void;\n setPageSize: (size: number) => void;\n reset: () => void;\n}\n\nexport function usePagination(options: UsePaginationOptions = {}): UsePaginationResult {\n const { pageSize: initialPageSize = DEFAULT_PAGE_SIZE, resetKey } = options;\n const [limit, setLimit] = useState(initialPageSize);\n const [offset, setOffset] = useState(0);\n\n // Reset to the first page whenever the resetKey changes. Storing the previous\n // key in state and adjusting during render is React's documented pattern for\n // deriving state from props — it avoids an extra effect + render pass.\n const [prevResetKey, setPrevResetKey] = useState(resetKey);\n if (prevResetKey !== resetKey) {\n setPrevResetKey(resetKey);\n if (offset !== 0) {\n setOffset(0);\n }\n }\n\n return {\n limit,\n offset,\n page: Math.floor(offset / Math.max(1, limit)) + 1,\n nextPage: () => setOffset((current) => current + limit),\n prevPage: () => setOffset((current) => Math.max(0, current - limit)),\n setPageSize: (size: number) => {\n setLimit(Math.max(1, size));\n setOffset(0);\n },\n reset: () => setOffset(0),\n };\n}\n\nexport interface PaginationProps {\n offset: number;\n limit: number;\n /** Number of rows returned for the current page (`items.length`). */\n loadedCount: number;\n /** Total rows available across all pages (list `total`). */\n total: number;\n onPrev: () => void;\n onNext: () => void;\n /** Plural noun for the range label, e.g. \"sponsors\". Defaults to \"items\". */\n itemLabel?: string;\n /** Render a single \"Load more\" button instead of Prev/Next. */\n variant?: 'pager' | 'load-more';\n onLoadMore?: () => void;\n loading?: boolean;\n className?: string;\n}\n\nexport function Pagination({\n offset,\n limit,\n loadedCount,\n total,\n onPrev,\n onNext,\n itemLabel = 'items',\n variant = 'pager',\n onLoadMore,\n loading = false,\n className,\n}: PaginationProps) {\n if (total === 0) {\n return null;\n }\n\n const rangeStart = offset + 1;\n const rangeEnd = offset + loadedCount;\n const canPrev = offset > 0;\n const canNext = offset + loadedCount < total;\n const page = Math.floor(offset / Math.max(1, limit)) + 1;\n const pageCount = Math.max(1, Math.ceil(total / Math.max(1, limit)));\n\n if (variant === 'load-more') {\n if (!canNext) {\n return null;\n }\n return (\n <div className={`flex justify-center pt-4 ${className ?? ''}`}>\n <Button size=\"sm\" variant=\"outline\" onClick={onLoadMore ?? onNext} disabled={loading}>\n {loading ? 'Loading…' : `Load more ${itemLabel}`}\n </Button>\n </div>\n );\n }\n\n return (\n <div\n className={`flex flex-wrap items-center justify-between gap-3 pt-4 ${className ?? ''}`}\n role=\"navigation\"\n aria-label=\"Pagination\"\n >\n <p className=\"text-xs tabular-nums text-text-secondary\">\n Showing {rangeStart}–{rangeEnd} of {total} {itemLabel}\n </p>\n <div className=\"flex items-center gap-2\">\n <span className=\"text-xs tabular-nums text-text-secondary\">\n Page {page} of {pageCount}\n </span>\n <Button size=\"sm\" variant=\"outline\" onClick={onPrev} disabled={!canPrev || loading} aria-label=\"Previous page\">\n <ChevronLeft className=\"h-4 w-4\" />\n Prev\n </Button>\n <Button size=\"sm\" variant=\"outline\" onClick={onNext} disabled={!canNext || loading} aria-label=\"Next page\">\n Next\n <ChevronRight className=\"h-4 w-4\" />\n </Button>\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;AAcA,
|
|
1
|
+
{"version":3,"file":"Pagination.js","names":["DEFAULT_PAGE_SIZE","usePagination","initialPageSize","options","limit","setLimit","useState","offset","setOffset","prevResetKey","setPrevResetKey","resetKey","current","size","Pagination","total","rangeStart","rangeEnd","loadedCount","canPrev","canNext","page","pageCount","variant","className","Button","onLoadMore","onNext","loading","itemLabel","onPrev","ChevronLeft","ChevronRight"],"sources":["../../../src/eventfullymanaged/components/Pagination.tsx"],"sourcesContent":["import { useState } from 'react';\nimport { Button } from '@burdenoff/fe-libs/ui';\nimport { ChevronLeft, ChevronRight } from 'lucide-react';\n\n/**\n * Server-side offset/limit pagination shared by every EventfullyManaged list page.\n *\n * The backend list resolvers (`eventfullyManagedEvents`, `...Sponsors`, etc.) all\n * accept `{ limit, offset }` and return `{ total, items }`. `usePagination` owns\n * the `limit`/`offset` window; the page feeds them straight into its query, then\n * renders `<Pagination>` with the page's `total` and the number of rows actually\n * returned so Prev/Next gate correctly on `offset + loadedCount < total`.\n */\n\nconst DEFAULT_PAGE_SIZE = 20;\n\nexport interface UsePaginationOptions {\n pageSize?: number;\n /**\n * When this value changes (e.g. a search term or active-event filter) the\n * window resets to the first page so the user is never stranded on an offset\n * that no longer has rows.\n */\n resetKey?: unknown;\n}\n\nexport interface UsePaginationResult {\n /** Page size — pass as the query's `limit`. */\n limit: number;\n /** Row offset — pass as the query's `offset`. */\n offset: number;\n /** 1-based page index, derived from offset/limit. */\n page: number;\n nextPage: () => void;\n prevPage: () => void;\n setPageSize: (size: number) => void;\n reset: () => void;\n}\n\nexport function usePagination(options: UsePaginationOptions = {}): UsePaginationResult {\n const { pageSize: initialPageSize = DEFAULT_PAGE_SIZE, resetKey } = options;\n const [limit, setLimit] = useState(initialPageSize);\n const [offset, setOffset] = useState(0);\n\n // Reset to the first page whenever the resetKey changes. Storing the previous\n // key in state and adjusting during render is React's documented pattern for\n // deriving state from props — it avoids an extra effect + render pass.\n const [prevResetKey, setPrevResetKey] = useState(resetKey);\n if (prevResetKey !== resetKey) {\n setPrevResetKey(resetKey);\n if (offset !== 0) {\n setOffset(0);\n }\n }\n\n return {\n limit,\n offset,\n page: Math.floor(offset / Math.max(1, limit)) + 1,\n nextPage: () => setOffset((current) => current + limit),\n prevPage: () => setOffset((current) => Math.max(0, current - limit)),\n setPageSize: (size: number) => {\n setLimit(Math.max(1, size));\n setOffset(0);\n },\n reset: () => setOffset(0),\n };\n}\n\nexport interface PaginationProps {\n offset: number;\n limit: number;\n /** Number of rows returned for the current page (`items.length`). */\n loadedCount: number;\n /** Total rows available across all pages (list `total`). */\n total: number;\n onPrev: () => void;\n onNext: () => void;\n /** Plural noun for the range label, e.g. \"sponsors\". Defaults to \"items\". */\n itemLabel?: string;\n /** Render a single \"Load more\" button instead of Prev/Next. */\n variant?: 'pager' | 'load-more';\n onLoadMore?: () => void;\n loading?: boolean;\n className?: string;\n}\n\nexport function Pagination({\n offset,\n limit,\n loadedCount,\n total,\n onPrev,\n onNext,\n itemLabel = 'items',\n variant = 'pager',\n onLoadMore,\n loading = false,\n className,\n}: PaginationProps) {\n if (total === 0) {\n return null;\n }\n\n const rangeStart = offset + 1;\n const rangeEnd = offset + loadedCount;\n const canPrev = offset > 0;\n const canNext = offset + loadedCount < total;\n const page = Math.floor(offset / Math.max(1, limit)) + 1;\n const pageCount = Math.max(1, Math.ceil(total / Math.max(1, limit)));\n\n if (variant === 'load-more') {\n if (!canNext) {\n return null;\n }\n return (\n <div className={`flex justify-center pt-4 ${className ?? ''}`}>\n <Button size=\"sm\" variant=\"outline\" onClick={onLoadMore ?? onNext} disabled={loading}>\n {loading ? 'Loading…' : `Load more ${itemLabel}`}\n </Button>\n </div>\n );\n }\n\n return (\n <div\n className={`flex flex-wrap items-center justify-between gap-3 pt-4 ${className ?? ''}`}\n role=\"navigation\"\n aria-label=\"Pagination\"\n >\n <p className=\"text-xs tabular-nums text-text-secondary\">\n Showing {rangeStart}–{rangeEnd} of {total} {itemLabel}\n </p>\n <div className=\"flex items-center gap-2\">\n <span className=\"text-xs tabular-nums text-text-secondary\">\n Page {page} of {pageCount}\n </span>\n <Button size=\"sm\" variant=\"outline\" onClick={onPrev} disabled={!canPrev || loading} aria-label=\"Previous page\">\n <ChevronLeft className=\"h-4 w-4\" />\n Prev\n </Button>\n <Button size=\"sm\" variant=\"outline\" onClick={onNext} disabled={!canNext || loading} aria-label=\"Next page\">\n Next\n <ChevronRight className=\"h-4 w-4\" />\n </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E,UAAAA,IAAU,aAAa,aAAaC;EAC/B,CAAA;CACL,CAAA,IAPE,OAYT,kBAAC,OAAD;EACE,WAAW,0DAA0DL,KAAa;EAClF,MAAK;EACL,cAAW;EAHb,UAAA,CAKE,kBAAC,KAAD;GAAG,WAAU;GAAb,UAAA;IAAwD;IAC7CR;IAAW;IAAEC;IAAS;IAAKF;IAAM;IAAEc;GAC3C;EACH,CAAA,GAAA,kBAAC,OAAD;GAAK,WAAU;GAAf,UAAA;IACE,kBAAC,QAAD;KAAM,WAAU;KAAhB,UAAA;MAA2D;MACnDR;MAAK;MAAKC;KACZ;;IACN,kBAACG,GAAD;KAAQ,MAAK;KAAK,SAAQ;KAAU,SAASK;KAAQ,UAAU,CAACX,KAAWS;KAAS,cAAW;KAA/F,UAAA,CACE,kBAACG,GAAD,EAAa,WAAU,UAAW,CAAA,GAAC,MAE7B;;IACR,kBAACN,GAAD;KAAQ,MAAK;KAAK,SAAQ;KAAU,SAASE;KAAQ,UAAU,CAACP,KAAWQ;KAAS,cAAW;KAA/F,UAAA,CAA2G,QAEzG,kBAACI,GAAD,EAAc,WAAU,UAAW,CAAA,CAC7B;;GACL;EACF,CAAA,CAAA;;AAET"}
|
|
@@ -26,5 +26,5 @@ export interface SafeLinkProps extends Omit<AnchorHTMLAttributes<HTMLAnchorEleme
|
|
|
26
26
|
* can never be activated. Opens in a new tab with `noopener noreferrer` to
|
|
27
27
|
* prevent reverse-tabnabbing.
|
|
28
28
|
*/
|
|
29
|
-
export declare function SafeLink({ href, children, className, fallbackClassName, ...rest }: SafeLinkProps): import("react
|
|
29
|
+
export declare function SafeLink({ href, children, className, fallbackClassName, ...rest }: SafeLinkProps): import("react").JSX.Element;
|
|
30
30
|
//# sourceMappingURL=SafeLink.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SafeLink.d.ts","sourceRoot":"","sources":["../../../src/eventfullymanaged/components/SafeLink.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,E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@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
|
|
2
|
+
// src/eventfullymanaged/components/SafeLink.tsx
|
|
3
3
|
function t(e) {
|
|
4
4
|
if (!e) return null;
|
|
5
5
|
let t = e.trim();
|
|
@@ -26,7 +26,6 @@ function n({ href: n, children: r, className: i, fallbackClassName: a, ...o }) {
|
|
|
26
26
|
children: r ?? n ?? ""
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
|
-
//#endregion
|
|
30
29
|
export { n as SafeLink, t as safeUrl };
|
|
31
30
|
|
|
32
31
|
//# sourceMappingURL=SafeLink.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SafeLink.js","names":[],"sources":["../../../src/eventfullymanaged/components/SafeLink.tsx"],"sourcesContent":["import type { AnchorHTMLAttributes, ReactNode } from 'react';\n\n/**\n * Validate and normalise a user-supplied URL before it is ever placed in an\n * `href`. Sponsor/exhibitor websites are free-text fields persisted verbatim by\n * the backend, so rendering them directly into an anchor is a stored-XSS sink:\n * a value like `javascript:alert(1)` or `data:text/html,...` would execute on\n * click. This helper is the single choke point that neutralises that.\n *\n * Rules:\n * - empty / whitespace → `null` (caller renders plain text)\n * - bare domain → prefixed with `https://` (`acme.com` → `https://acme.com`)\n * - `http:` / `https:` → accepted, returned normalised\n * - anything else → `null` (rejects `javascript:`, `data:`, `file:`, `mailto:`…)\n */\nexport function safeUrl(raw: string | null | undefined): string | null {\n if (!raw) {\n return null;\n }\n const trimmed = raw.trim();\n if (!trimmed) {\n return null;\n }\n\n // A value carries an explicit scheme when it starts with `<scheme>:` per the\n // RFC-3986 scheme grammar (ALPHA followed by ALPHA/DIGIT/+/-/.). If it does\n // not, treat it as a bare domain/path and default it to https.\n const hasScheme = /^[a-zA-Z][a-zA-Z\\d+.-]*:/.test(trimmed);\n const candidate = hasScheme ? trimmed : `https://${trimmed}`;\n\n try {\n const url = new URL(candidate);\n if (url.protocol === 'http:' || url.protocol === 'https:') {\n return url.toString();\n }\n return null;\n } catch {\n return null;\n }\n}\n\nexport interface SafeLinkProps extends Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'href'> {\n href: string | null | undefined;\n children?: ReactNode;\n /** Class applied to the rendered plain-text span when the href is unsafe. */\n fallbackClassName?: string;\n}\n\n/**\n * Anchor that only renders a clickable link when `href` passes `safeUrl`.\n * Unsafe/blank values fall back to inert text so a malicious `javascript:` URL\n * can never be activated. Opens in a new tab with `noopener noreferrer` to\n * prevent reverse-tabnabbing.\n */\nexport function SafeLink({ href, children, className, fallbackClassName, ...rest }: SafeLinkProps) {\n const safe = safeUrl(href);\n\n if (!safe) {\n return <span className={fallbackClassName ?? className}>{children ?? href ?? ''}</span>;\n }\n\n return (\n <a href={safe} target=\"_blank\" rel=\"noopener noreferrer nofollow\" className={className} {...rest}>\n {children ?? safe}\n </a>\n );\n}\n"],"mappings":";;AAeA,
|
|
1
|
+
{"version":3,"file":"SafeLink.js","names":["safeUrl","raw","trimmed","candidate","url","SafeLink","rest","safe","href","children","fallbackClassName","className"],"sources":["../../../src/eventfullymanaged/components/SafeLink.tsx"],"sourcesContent":["import type { AnchorHTMLAttributes, ReactNode } from 'react';\n\n/**\n * Validate and normalise a user-supplied URL before it is ever placed in an\n * `href`. Sponsor/exhibitor websites are free-text fields persisted verbatim by\n * the backend, so rendering them directly into an anchor is a stored-XSS sink:\n * a value like `javascript:alert(1)` or `data:text/html,...` would execute on\n * click. This helper is the single choke point that neutralises that.\n *\n * Rules:\n * - empty / whitespace → `null` (caller renders plain text)\n * - bare domain → prefixed with `https://` (`acme.com` → `https://acme.com`)\n * - `http:` / `https:` → accepted, returned normalised\n * - anything else → `null` (rejects `javascript:`, `data:`, `file:`, `mailto:`…)\n */\nexport function safeUrl(raw: string | null | undefined): string | null {\n if (!raw) {\n return null;\n }\n const trimmed = raw.trim();\n if (!trimmed) {\n return null;\n }\n\n // A value carries an explicit scheme when it starts with `<scheme>:` per the\n // RFC-3986 scheme grammar (ALPHA followed by ALPHA/DIGIT/+/-/.). If it does\n // not, treat it as a bare domain/path and default it to https.\n const hasScheme = /^[a-zA-Z][a-zA-Z\\d+.-]*:/.test(trimmed);\n const candidate = hasScheme ? trimmed : `https://${trimmed}`;\n\n try {\n const url = new URL(candidate);\n if (url.protocol === 'http:' || url.protocol === 'https:') {\n return url.toString();\n }\n return null;\n } catch {\n return null;\n }\n}\n\nexport interface SafeLinkProps extends Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'href'> {\n href: string | null | undefined;\n children?: ReactNode;\n /** Class applied to the rendered plain-text span when the href is unsafe. */\n fallbackClassName?: string;\n}\n\n/**\n * Anchor that only renders a clickable link when `href` passes `safeUrl`.\n * Unsafe/blank values fall back to inert text so a malicious `javascript:` URL\n * can never be activated. Opens in a new tab with `noopener noreferrer` to\n * prevent reverse-tabnabbing.\n */\nexport function SafeLink({ href, children, className, fallbackClassName, ...rest }: SafeLinkProps) {\n const safe = safeUrl(href);\n\n if (!safe) {\n return <span className={fallbackClassName ?? className}>{children ?? href ?? ''}</span>;\n }\n\n return (\n <a href={safe} target=\"_blank\" rel=\"noopener noreferrer nofollow\" className={className} {...rest}>\n {children ?? safe}\n </a>\n );\n}\n"],"mappings":";;AAeA,SAAgBA,EAAQ,GAA+C;CACrE,IAAI,CAACC,GACH,OAAO;CAET,IAAMC,IAAUD,EAAI,KAAK;CACzB,IAAI,CAACC,GACH,OAAO;CAOT,IAAMC,IADY,2BAA2B,KAAKD,CAChC,IAAYA,IAAU,WAAWA;CAEnD,IAAI;EACF,IAAME,IAAM,IAAI,IAAID,CAAS;EAI7B,OAHIC,EAAI,aAAa,WAAWA,EAAI,aAAa,WACxCA,EAAI,SAAS,IAEf;CACT,QAAQ;EACN,OAAO;CACT;AACF;AAeA,SAAgBC,EAAS,EAAE,SAAM,aAAU,cAAW,sBAAmB,GAAGC,KAAuB;CACjG,IAAMC,IAAOP,EAAQQ,CAAI;CAMzB,OAJKD,IAKH,kBAAC,KAAD;EAAG,MAAMA;EAAM,QAAO;EAAS,KAAI;EAA0C;EAAW,GAAID;EACzF,UAAAG,KAAYF;CACZ,CAAA,IANI,kBAAC,QAAD;EAAM,WAAWG,KAAqBC;EAAY,UAAAF,KAAYD,KAAQ;CAAS,CAAA;AAQ1F"}
|
|
@@ -20,5 +20,5 @@ export type ZoneCanvasProps = {
|
|
|
20
20
|
* draw mode), moves and resizes zones; a focused zone also responds to the
|
|
21
21
|
* keyboard (arrows move, Alt+arrows resize, Shift for 5% steps, Delete removes).
|
|
22
22
|
*/
|
|
23
|
-
export declare function ZoneCanvas({ planName, imageUrl, zones, selectedId, mode, disabled, onSelect, onRectChange, onDrawn, onRemove, }: ZoneCanvasProps): import("react
|
|
23
|
+
export declare function ZoneCanvas({ planName, imageUrl, zones, selectedId, mode, disabled, onSelect, onRectChange, onDrawn, onRemove, }: ZoneCanvasProps): import("react").JSX.Element;
|
|
24
24
|
//# sourceMappingURL=ZoneCanvas.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ZoneCanvas.d.ts","sourceRoot":"","sources":["../../../../src/eventfullymanaged/components/floorPlanEditor/ZoneCanvas.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"ZoneCanvas.d.ts","sourceRoot":"","sources":["../../../../src/eventfullymanaged/components/floorPlanEditor/ZoneCanvas.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAiBvD,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,IAAI,EAAE,UAAU,CAAC;IACjB,0EAA0E;IAC1E,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAC1C,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;IACvD,OAAO,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;IAClC,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC,CAAC;AAMF;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,EACzB,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,UAAU,EACV,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,OAAO,EACP,QAAQ,GACT,EAAE,eAAe,+BAoJjB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isUsableRect as e, moveRect as t, rectFromPoints as n, resizeRect as r } from "../../lib/floorPlanZones.js";
|
|
2
2
|
import { useRef as i, useState as a } from "react";
|
|
3
3
|
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
4
|
-
|
|
4
|
+
// src/eventfullymanaged/components/floorPlanEditor/ZoneCanvas.tsx
|
|
5
5
|
var c = 1, l = 5, u = {
|
|
6
6
|
ArrowLeft: {
|
|
7
7
|
x: -1,
|
|
@@ -34,19 +34,13 @@ function f({ planName: d, imageUrl: f, zones: m, selectedId: h, mode: g, disable
|
|
|
34
34
|
e.preventDefault(), C.current = t, S.current?.setPointerCapture?.(e.pointerId);
|
|
35
35
|
}, O = (e) => {
|
|
36
36
|
let t = e.button === 0 && !_ ? E(e) : null;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
42
|
-
D(e, {
|
|
43
|
-
kind: "draw",
|
|
44
|
-
start: t
|
|
45
|
-
}), T(n(t, t));
|
|
46
|
-
}
|
|
37
|
+
t && (g === "draw" ? (D(e, {
|
|
38
|
+
kind: "draw",
|
|
39
|
+
start: t
|
|
40
|
+
}), T(n(t, t))) : v(null));
|
|
47
41
|
}, k = (e, t, n) => {
|
|
48
42
|
let r = e.button === 0 && !_ && t.rect ? E(e) : null;
|
|
49
|
-
|
|
43
|
+
r && t.rect && (e.stopPropagation(), v(t.id), D(e, {
|
|
50
44
|
kind: n,
|
|
51
45
|
zoneId: t.id,
|
|
52
46
|
origin: r,
|
|
@@ -163,7 +157,6 @@ function p({ zone: e, rect: t, active: n, mode: r, disabled: i, onPointerDown: a
|
|
|
163
157
|
]
|
|
164
158
|
});
|
|
165
159
|
}
|
|
166
|
-
//#endregion
|
|
167
160
|
export { f as ZoneCanvas };
|
|
168
161
|
|
|
169
162
|
//# sourceMappingURL=ZoneCanvas.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ZoneCanvas.js","names":[],"sources":["../../../../src/eventfullymanaged/components/floorPlanEditor/ZoneCanvas.tsx"],"sourcesContent":["import { useRef, useState } from 'react';\nimport type { KeyboardEvent as ReactKeyboardEvent, PointerEvent as ReactPointerEvent } from 'react';\n\nimport { isUsableRect, moveRect, rectFromPoints, resizeRect } from '../../lib/floorPlanZones';\nimport type { Zone, ZoneRect } from '../../lib/floorPlanZones';\nimport type { EditorMode } from './useZoneEditorState';\n\ntype Point = { x: number; y: number };\n\ntype Interaction =\n | { kind: 'draw'; start: Point }\n | { kind: 'move' | 'resize'; zoneId: string; origin: Point; startRect: ZoneRect };\n\nconst KEY_STEP = 1;\nconst KEY_STEP_LARGE = 5;\n\nconst ARROW_DELTAS: Record<string, Point> = {\n ArrowLeft: { x: -1, y: 0 },\n ArrowRight: { x: 1, y: 0 },\n ArrowUp: { x: 0, y: -1 },\n ArrowDown: { x: 0, y: 1 },\n};\n\nexport type ZoneCanvasProps = {\n planName: string;\n imageUrl: string;\n zones: Zone[];\n selectedId: string | null;\n mode: EditorMode;\n /** While true (e.g. a save is in flight) the canvas ignores all input. */\n disabled: boolean;\n onSelect: (zoneId: string | null) => void;\n onRectChange: (zoneId: string, rect: ZoneRect) => void;\n onDrawn: (rect: ZoneRect) => void;\n onRemove: (zoneId: string) => void;\n};\n\nfunction zoneAriaLabel(zone: Zone): string {\n return `Zone ${zone.label}${zone.capacity !== undefined ? `, capacity ${zone.capacity}` : ''}`;\n}\n\n/**\n * The floor-plan image with its zone overlay. The overlay box hugs the rendered\n * image, so percent-based zones line up at any size. Pointer input draws (in\n * draw mode), moves and resizes zones; a focused zone also responds to the\n * keyboard (arrows move, Alt+arrows resize, Shift for 5% steps, Delete removes).\n */\nexport function ZoneCanvas({\n planName,\n imageUrl,\n zones,\n selectedId,\n mode,\n disabled,\n onSelect,\n onRectChange,\n onDrawn,\n onRemove,\n}: ZoneCanvasProps) {\n const overlayRef = useRef<HTMLDivElement | null>(null);\n const interactionRef = useRef<Interaction | null>(null);\n const [draft, setDraft] = useState<ZoneRect | null>(null);\n\n const toPercent = (event: ReactPointerEvent): Point | null => {\n const box = overlayRef.current?.getBoundingClientRect();\n if (!box || box.width === 0 || box.height === 0) {\n return null;\n }\n return { x: ((event.clientX - box.left) / box.width) * 100, y: ((event.clientY - box.top) / box.height) * 100 };\n };\n\n const startInteraction = (event: ReactPointerEvent, interaction: Interaction) => {\n event.preventDefault();\n interactionRef.current = interaction;\n // jsdom (unit tests) has no pointer capture; real browsers always do.\n overlayRef.current?.setPointerCapture?.(event.pointerId);\n };\n\n const handleOverlayPointerDown = (event: ReactPointerEvent<HTMLDivElement>) => {\n const point = event.button === 0 && !disabled ? toPercent(event) : null;\n if (!point) {\n return;\n }\n if (mode !== 'draw') {\n onSelect(null);\n return;\n }\n startInteraction(event, { kind: 'draw', start: point });\n setDraft(rectFromPoints(point, point));\n };\n\n const beginZoneInteraction = (event: ReactPointerEvent, zone: Zone, kind: 'move' | 'resize') => {\n const point = event.button === 0 && !disabled && zone.rect ? toPercent(event) : null;\n if (!point || !zone.rect) {\n return;\n }\n event.stopPropagation();\n onSelect(zone.id);\n startInteraction(event, { kind, zoneId: zone.id, origin: point, startRect: zone.rect });\n };\n\n const handlePointerMove = (event: ReactPointerEvent<HTMLDivElement>) => {\n const interaction = interactionRef.current;\n const point = interaction ? toPercent(event) : null;\n if (!interaction || !point) {\n return;\n }\n if (interaction.kind === 'draw') {\n setDraft(rectFromPoints(interaction.start, point));\n return;\n }\n const dx = point.x - interaction.origin.x;\n const dy = point.y - interaction.origin.y;\n const transform = interaction.kind === 'move' ? moveRect : resizeRect;\n onRectChange(interaction.zoneId, transform(interaction.startRect, dx, dy));\n };\n\n const handlePointerUp = () => {\n const interaction = interactionRef.current;\n interactionRef.current = null;\n if (interaction?.kind !== 'draw') {\n return;\n }\n const rect = draft;\n setDraft(null);\n if (rect && isUsableRect(rect)) {\n onDrawn(rect);\n }\n };\n\n const handlePointerCancel = () => {\n interactionRef.current = null;\n setDraft(null);\n };\n\n const handleZoneKeyDown = (event: ReactKeyboardEvent, zone: Zone) => {\n if (disabled) {\n return;\n }\n if (event.key === 'Delete' || event.key === 'Backspace') {\n event.preventDefault();\n onRemove(zone.id);\n return;\n }\n if (event.key === 'Escape') {\n onSelect(null);\n return;\n }\n const direction = ARROW_DELTAS[event.key];\n if (!direction || !zone.rect) {\n return;\n }\n event.preventDefault();\n const step = event.shiftKey ? KEY_STEP_LARGE : KEY_STEP;\n const transform = event.altKey ? resizeRect : moveRect;\n onSelect(zone.id);\n onRectChange(zone.id, transform(zone.rect, direction.x * step, direction.y * step));\n };\n\n return (\n <div className=\"flex justify-center bg-bg-sunken p-3\">\n <div className=\"relative inline-block max-w-full select-none\">\n <img\n src={imageUrl}\n alt={`${planName} floor plan`}\n className=\"block h-auto max-h-[32rem] w-auto max-w-full\"\n draggable={false}\n />\n <div\n ref={overlayRef}\n data-testid=\"floor-plan-canvas\"\n role=\"group\"\n aria-label={`${planName} zone canvas`}\n aria-disabled={disabled}\n className={`absolute inset-0 touch-none ${mode === 'draw' && !disabled ? 'cursor-crosshair' : 'cursor-default'}`}\n onPointerDown={handleOverlayPointerDown}\n onPointerMove={handlePointerMove}\n onPointerUp={handlePointerUp}\n onPointerCancel={handlePointerCancel}\n >\n {zones.map((zone) =>\n zone.rect ? (\n <ZoneBox\n key={zone.id}\n zone={zone}\n rect={zone.rect}\n active={zone.id === selectedId}\n mode={mode}\n disabled={disabled}\n onPointerDown={(event, kind) => beginZoneInteraction(event, zone, kind)}\n onKeyDown={(event) => handleZoneKeyDown(event, zone)}\n onFocus={() => onSelect(zone.id)}\n />\n ) : null\n )}\n {draft ? (\n <div\n data-testid=\"zone-draft\"\n className=\"pointer-events-none absolute rounded-md border-2 border-dashed border-accent-primary bg-action-primary-bg/20\"\n style={{ left: `${draft.x}%`, top: `${draft.y}%`, width: `${draft.w}%`, height: `${draft.h}%` }}\n />\n ) : null}\n </div>\n </div>\n </div>\n );\n}\n\nfunction ZoneBox({\n zone,\n rect,\n active,\n mode,\n disabled,\n onPointerDown,\n onKeyDown,\n onFocus,\n}: {\n zone: Zone;\n rect: ZoneRect;\n active: boolean;\n mode: EditorMode;\n disabled: boolean;\n onPointerDown: (event: ReactPointerEvent, kind: 'move' | 'resize') => void;\n onKeyDown: (event: ReactKeyboardEvent) => void;\n onFocus: () => void;\n}) {\n const passive = mode === 'draw' || disabled;\n return (\n <button\n type=\"button\"\n aria-pressed={active}\n aria-label={zoneAriaLabel(zone)}\n data-zone-id={zone.id}\n className={`absolute flex flex-col items-center justify-center overflow-hidden rounded-md border p-0 text-[10px] font-medium leading-tight focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-primary ${\n passive ? 'pointer-events-none' : 'cursor-move'\n } ${\n active\n ? 'z-10 border-2 border-accent-primary bg-action-primary-bg/30 text-text-primary'\n : 'border-accent-primary/70 bg-action-primary-bg/15 text-accent-primary'\n }`}\n style={{ left: `${rect.x}%`, top: `${rect.y}%`, width: `${rect.w}%`, height: `${rect.h}%` }}\n title={zone.label}\n onPointerDown={(event) => onPointerDown(event, 'move')}\n onKeyDown={onKeyDown}\n onFocus={onFocus}\n >\n <span className=\"max-w-full truncate px-1\">{zone.label}</span>\n {zone.capacity !== undefined ? (\n <span className=\"max-w-full truncate px-1 text-text-muted\">{zone.capacity}</span>\n ) : null}\n {active && !passive ? (\n <span\n aria-hidden=\"true\"\n data-testid=\"zone-resize-handle\"\n className=\"absolute bottom-0 right-0 h-3 w-3 cursor-se-resize rounded-tl-sm bg-accent-primary\"\n onPointerDown={(event) => onPointerDown(event, 'resize')}\n />\n ) : null}\n </button>\n );\n}\n"],"mappings":";;;;AAaA,IAAM,IAAW,GACX,IAAiB,GAEjB,IAAsC;CAC1C,WAAW;EAAE,GAAG;EAAI,GAAG;EAAG;CAC1B,YAAY;EAAE,GAAG;EAAG,GAAG;EAAG;CAC1B,SAAS;EAAE,GAAG;EAAG,GAAG;EAAI;CACxB,WAAW;EAAE,GAAG;EAAG,GAAG;EAAG;CAC1B;AAgBD,SAAS,EAAc,GAAoB;AACzC,QAAO,QAAQ,EAAK,QAAQ,EAAK,aAAa,KAAA,IAA4C,KAAhC,cAAc,EAAK;;AAS/E,SAAgB,EAAW,EACzB,aACA,aACA,UACA,eACA,SACA,aACA,aACA,iBACA,YACA,eACkB;CAClB,IAAM,IAAa,EAA8B,KAAK,EAChD,IAAiB,EAA2B,KAAK,EACjD,CAAC,GAAO,KAAY,EAA0B,KAAK,EAEnD,KAAa,MAA2C;EAC5D,IAAM,IAAM,EAAW,SAAS,uBAAuB;AAIvD,SAHI,CAAC,KAAO,EAAI,UAAU,KAAK,EAAI,WAAW,IACrC,OAEF;GAAE,IAAK,EAAM,UAAU,EAAI,QAAQ,EAAI,QAAS;GAAK,IAAK,EAAM,UAAU,EAAI,OAAO,EAAI,SAAU;GAAK;IAG3G,KAAoB,GAA0B,MAA6B;AAI/E,EAHA,EAAM,gBAAgB,EACtB,EAAe,U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AA,GACA,KACA;MACF;;EACF,CAAA;;AAIV,SAAS,EAAQ,EACf,SACA,SACA,WACA,SACA,aACA,kBACA,cACA,cAUC;CACD,IAAM,IAAU,MAAS,UAAU;AACnC,QACE,kBAAC,UAAD;EACE,MAAK;EACL,gBAAc;EACd,cAAY,EAAc,EAAK;EAC/B,gBAAc,EAAK;EACnB,WAAW,oNACT,IAAU,wBAAwB,cACnC,GACC,IACI,kFACA;EAEN,OAAO;GAAE,MAAM,GAAG,EAAK,EAAE;GAAI,KAAK,GAAG,EAAK,EAAE;GAAI,OAAO,GAAG,EAAK,EAAE;GAAI,QAAQ,GAAG,EAAK,EAAE;GAAI;EAC3F,OAAO,EAAK;EACZ,gBAAgB,MAAU,EAAc,GAAO,OAAO;EAC3C;EACF;YAhBX;GAkBE,kBAAC,QAAD;IAAM,WAAU;cAA4B,EAAK;IAAa,CAAA;GAC7D,EAAK,aAAa,KAAA,IAEf,OADF,kBAAC,QAAD;IAAM,WAAU;cAA4C,EAAK;IAAgB,CAAA;GAElF,KAAU,CAAC,IACV,kBAAC,QAAD;IACE,eAAY;IACZ,eAAY;IACZ,WAAU;IACV,gBAAgB,MAAU,EAAc,GAAO,SAAS;IACxD,CAAA,GACA;GACG"}
|
|
1
|
+
{"version":3,"file":"ZoneCanvas.js","names":["KEY_STEP","KEY_STEP_LARGE","ARROW_DELTAS","zoneAriaLabel","zone","ZoneCanvas","overlayRef","useRef","interactionRef","draft","setDraft","useState","toPercent","box","event","startInteraction","interaction","handleOverlayPointerDown","point","disabled","mode","rectFromPoints","onSelect","beginZoneInteraction","handlePointerMove","dx","dy","transform","moveRect","resizeRect","handlePointerUp","rect","isUsableRect","onDrawn","handlePointerCancel","handleZoneKeyDown","onRemove","direction","step","onRectChange","imageUrl","planName","zones","ZoneBox","selectedId","kind","passive","active","onPointerDown"],"sources":["../../../../src/eventfullymanaged/components/floorPlanEditor/ZoneCanvas.tsx"],"sourcesContent":["import { useRef, useState } from 'react';\nimport type { KeyboardEvent as ReactKeyboardEvent, PointerEvent as ReactPointerEvent } from 'react';\n\nimport { isUsableRect, moveRect, rectFromPoints, resizeRect } from '../../lib/floorPlanZones';\nimport type { Zone, ZoneRect } from '../../lib/floorPlanZones';\nimport type { EditorMode } from './useZoneEditorState';\n\ntype Point = { x: number; y: number };\n\ntype Interaction =\n { kind: 'draw'; start: Point } | { kind: 'move' | 'resize'; zoneId: string; origin: Point; startRect: ZoneRect };\n\nconst KEY_STEP = 1;\nconst KEY_STEP_LARGE = 5;\n\nconst ARROW_DELTAS: Record<string, Point> = {\n ArrowLeft: { x: -1, y: 0 },\n ArrowRight: { x: 1, y: 0 },\n ArrowUp: { x: 0, y: -1 },\n ArrowDown: { x: 0, y: 1 },\n};\n\nexport type ZoneCanvasProps = {\n planName: string;\n imageUrl: string;\n zones: Zone[];\n selectedId: string | null;\n mode: EditorMode;\n /** While true (e.g. a save is in flight) the canvas ignores all input. */\n disabled: boolean;\n onSelect: (zoneId: string | null) => void;\n onRectChange: (zoneId: string, rect: ZoneRect) => void;\n onDrawn: (rect: ZoneRect) => void;\n onRemove: (zoneId: string) => void;\n};\n\nfunction zoneAriaLabel(zone: Zone): string {\n return `Zone ${zone.label}${zone.capacity !== undefined ? `, capacity ${zone.capacity}` : ''}`;\n}\n\n/**\n * The floor-plan image with its zone overlay. The overlay box hugs the rendered\n * image, so percent-based zones line up at any size. Pointer input draws (in\n * draw mode), moves and resizes zones; a focused zone also responds to the\n * keyboard (arrows move, Alt+arrows resize, Shift for 5% steps, Delete removes).\n */\nexport function ZoneCanvas({\n planName,\n imageUrl,\n zones,\n selectedId,\n mode,\n disabled,\n onSelect,\n onRectChange,\n onDrawn,\n onRemove,\n}: ZoneCanvasProps) {\n const overlayRef = useRef<HTMLDivElement | null>(null);\n const interactionRef = useRef<Interaction | null>(null);\n const [draft, setDraft] = useState<ZoneRect | null>(null);\n\n const toPercent = (event: ReactPointerEvent): Point | null => {\n const box = overlayRef.current?.getBoundingClientRect();\n if (!box || box.width === 0 || box.height === 0) {\n return null;\n }\n return { x: ((event.clientX - box.left) / box.width) * 100, y: ((event.clientY - box.top) / box.height) * 100 };\n };\n\n const startInteraction = (event: ReactPointerEvent, interaction: Interaction) => {\n event.preventDefault();\n interactionRef.current = interaction;\n // jsdom (unit tests) has no pointer capture; real browsers always do.\n overlayRef.current?.setPointerCapture?.(event.pointerId);\n };\n\n const handleOverlayPointerDown = (event: ReactPointerEvent<HTMLDivElement>) => {\n const point = event.button === 0 && !disabled ? toPercent(event) : null;\n if (!point) {\n return;\n }\n if (mode !== 'draw') {\n onSelect(null);\n return;\n }\n startInteraction(event, { kind: 'draw', start: point });\n setDraft(rectFromPoints(point, point));\n };\n\n const beginZoneInteraction = (event: ReactPointerEvent, zone: Zone, kind: 'move' | 'resize') => {\n const point = event.button === 0 && !disabled && zone.rect ? toPercent(event) : null;\n if (!point || !zone.rect) {\n return;\n }\n event.stopPropagation();\n onSelect(zone.id);\n startInteraction(event, { kind, zoneId: zone.id, origin: point, startRect: zone.rect });\n };\n\n const handlePointerMove = (event: ReactPointerEvent<HTMLDivElement>) => {\n const interaction = interactionRef.current;\n const point = interaction ? toPercent(event) : null;\n if (!interaction || !point) {\n return;\n }\n if (interaction.kind === 'draw') {\n setDraft(rectFromPoints(interaction.start, point));\n return;\n }\n const dx = point.x - interaction.origin.x;\n const dy = point.y - interaction.origin.y;\n const transform = interaction.kind === 'move' ? moveRect : resizeRect;\n onRectChange(interaction.zoneId, transform(interaction.startRect, dx, dy));\n };\n\n const handlePointerUp = () => {\n const interaction = interactionRef.current;\n interactionRef.current = null;\n if (interaction?.kind !== 'draw') {\n return;\n }\n const rect = draft;\n setDraft(null);\n if (rect && isUsableRect(rect)) {\n onDrawn(rect);\n }\n };\n\n const handlePointerCancel = () => {\n interactionRef.current = null;\n setDraft(null);\n };\n\n const handleZoneKeyDown = (event: ReactKeyboardEvent, zone: Zone) => {\n if (disabled) {\n return;\n }\n if (event.key === 'Delete' || event.key === 'Backspace') {\n event.preventDefault();\n onRemove(zone.id);\n return;\n }\n if (event.key === 'Escape') {\n onSelect(null);\n return;\n }\n const direction = ARROW_DELTAS[event.key];\n if (!direction || !zone.rect) {\n return;\n }\n event.preventDefault();\n const step = event.shiftKey ? KEY_STEP_LARGE : KEY_STEP;\n const transform = event.altKey ? resizeRect : moveRect;\n onSelect(zone.id);\n onRectChange(zone.id, transform(zone.rect, direction.x * step, direction.y * step));\n };\n\n return (\n <div className=\"flex justify-center bg-bg-sunken p-3\">\n <div className=\"relative inline-block max-w-full select-none\">\n <img\n src={imageUrl}\n alt={`${planName} floor plan`}\n className=\"block h-auto max-h-[32rem] w-auto max-w-full\"\n draggable={false}\n />\n <div\n ref={overlayRef}\n data-testid=\"floor-plan-canvas\"\n role=\"group\"\n aria-label={`${planName} zone canvas`}\n aria-disabled={disabled}\n className={`absolute inset-0 touch-none ${mode === 'draw' && !disabled ? 'cursor-crosshair' : 'cursor-default'}`}\n onPointerDown={handleOverlayPointerDown}\n onPointerMove={handlePointerMove}\n onPointerUp={handlePointerUp}\n onPointerCancel={handlePointerCancel}\n >\n {zones.map((zone) =>\n zone.rect ? (\n <ZoneBox\n key={zone.id}\n zone={zone}\n rect={zone.rect}\n active={zone.id === selectedId}\n mode={mode}\n disabled={disabled}\n onPointerDown={(event, kind) => beginZoneInteraction(event, zone, kind)}\n onKeyDown={(event) => handleZoneKeyDown(event, zone)}\n onFocus={() => onSelect(zone.id)}\n />\n ) : null\n )}\n {draft ? (\n <div\n data-testid=\"zone-draft\"\n className=\"pointer-events-none absolute rounded-md border-2 border-dashed border-accent-primary bg-action-primary-bg/20\"\n style={{ left: `${draft.x}%`, top: `${draft.y}%`, width: `${draft.w}%`, height: `${draft.h}%` }}\n />\n ) : null}\n </div>\n </div>\n </div>\n );\n}\n\nfunction ZoneBox({\n zone,\n rect,\n active,\n mode,\n disabled,\n onPointerDown,\n onKeyDown,\n onFocus,\n}: {\n zone: Zone;\n rect: ZoneRect;\n active: boolean;\n mode: EditorMode;\n disabled: boolean;\n onPointerDown: (event: ReactPointerEvent, kind: 'move' | 'resize') => void;\n onKeyDown: (event: ReactKeyboardEvent) => void;\n onFocus: () => void;\n}) {\n const passive = mode === 'draw' || disabled;\n return (\n <button\n type=\"button\"\n aria-pressed={active}\n aria-label={zoneAriaLabel(zone)}\n data-zone-id={zone.id}\n className={`absolute flex flex-col items-center justify-center overflow-hidden rounded-md border p-0 text-[10px] font-medium leading-tight focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-primary ${\n passive ? 'pointer-events-none' : 'cursor-move'\n } ${\n active\n ? 'z-10 border-2 border-accent-primary bg-action-primary-bg/30 text-text-primary'\n : 'border-accent-primary/70 bg-action-primary-bg/15 text-accent-primary'\n }`}\n style={{ left: `${rect.x}%`, top: `${rect.y}%`, width: `${rect.w}%`, height: `${rect.h}%` }}\n title={zone.label}\n onPointerDown={(event) => onPointerDown(event, 'move')}\n onKeyDown={onKeyDown}\n onFocus={onFocus}\n >\n <span className=\"max-w-full truncate px-1\">{zone.label}</span>\n {zone.capacity !== undefined ? (\n <span className=\"max-w-full truncate px-1 text-text-muted\">{zone.capacity}</span>\n ) : null}\n {active && !passive ? (\n <span\n aria-hidden=\"true\"\n data-testid=\"zone-resize-handle\"\n className=\"absolute bottom-0 right-0 h-3 w-3 cursor-se-resize rounded-tl-sm bg-accent-primary\"\n onPointerDown={(event) => onPointerDown(event, 'resize')}\n />\n ) : null}\n </button>\n );\n}\n"],"mappings":";;;;AAYA,IAAMA,IAAW,GACXC,IAAiB,GAEjBC,IAAsC;CAC1C,WAAW;EAAE,GAAG;EAAI,GAAG;CAAE;CACzB,YAAY;EAAE,GAAG;EAAG,GAAG;CAAE;CACzB,SAAS;EAAE,GAAG;EAAG,GAAG;CAAG;CACvB,WAAW;EAAE,GAAG;EAAG,GAAG;CAAE;AAC1B;AAgBA,SAASC,EAAc,GAAoB;CACzC,OAAO,QAAQC,EAAK,QAAQA,EAAK,aAAa,KAAA,IAA4C,KAAhC,cAAcA,EAA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AC1C;EACF;EAhBX,UAAA;GAkBE,kBAAC,QAAD;IAAM,WAAU;IAA4B,UAAAV,EAAK;GAAY,CAAA;GAC5DA,EAAK,aAAa,KAAA,IAEf,OADF,kBAAC,QAAD;IAAM,WAAU;IAA4C,UAAAA,EAAK;GAAe,CAAA;GAEjF2C,KAAU,CAACD,IACV,kBAAC,QAAD;IACE,eAAY;IACZ,eAAY;IACZ,WAAU;IACV,gBAAgB,MAAUE,EAAclC,GAAO,QAAQ;GACxD,CAAA,IACC;EACE;;AAEZ"}
|
|
@@ -9,7 +9,7 @@ export declare function ZoneEditorToolbar({ mode, dirty, saving, onModeChange, o
|
|
|
9
9
|
onAddZone: () => void;
|
|
10
10
|
onCancel: () => void;
|
|
11
11
|
onSave: () => void;
|
|
12
|
-
}): import("react
|
|
12
|
+
}): import("react").JSX.Element;
|
|
13
13
|
export declare function ZoneDetailsPanel({ selected, hasZones, capacityText, capacityInvalid, errors, disabled, onChange, onCapacityChange, onRemove, }: {
|
|
14
14
|
selected: Zone | null;
|
|
15
15
|
hasZones: boolean;
|
|
@@ -20,7 +20,7 @@ export declare function ZoneDetailsPanel({ selected, hasZones, capacityText, cap
|
|
|
20
20
|
onChange: (zoneId: string, patch: Partial<Zone>) => void;
|
|
21
21
|
onCapacityChange: (zoneId: string, text: string) => void;
|
|
22
22
|
onRemove: (zoneId: string) => void;
|
|
23
|
-
}): import("react
|
|
23
|
+
}): import("react").JSX.Element;
|
|
24
24
|
export declare function ZoneListPanel({ zones, selectedId, summary, unplacedCount, disabled, onSelect, onAddZone, }: {
|
|
25
25
|
zones: Zone[];
|
|
26
26
|
selectedId: string | null;
|
|
@@ -29,5 +29,5 @@ export declare function ZoneListPanel({ zones, selectedId, summary, unplacedCoun
|
|
|
29
29
|
disabled: boolean;
|
|
30
30
|
onSelect: (zoneId: string) => void;
|
|
31
31
|
onAddZone: () => void;
|
|
32
|
-
}): import("react
|
|
32
|
+
}): import("react").JSX.Element;
|
|
33
33
|
//# sourceMappingURL=ZonePanels.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ZonePanels.d.ts","sourceRoot":"","sources":["../../../../src/eventfullymanaged/components/floorPlanEditor/ZonePanels.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEvD,wBAAgB,iBAAiB,CAAC,EAChC,IAAI,EACJ,KAAK,EACL,MAAM,EACN,YAAY,EACZ,SAAS,EACT,QAAQ,EACR,MAAM,GACP,EAAE;IACD,IAAI,EAAE,UAAU,CAAC;IACjB,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,OAAO,CAAC;IAChB,YAAY,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;IACzC,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB
|
|
1
|
+
{"version":3,"file":"ZonePanels.d.ts","sourceRoot":"","sources":["../../../../src/eventfullymanaged/components/floorPlanEditor/ZonePanels.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEvD,wBAAgB,iBAAiB,CAAC,EAChC,IAAI,EACJ,KAAK,EACL,MAAM,EACN,YAAY,EACZ,SAAS,EACT,QAAQ,EACR,MAAM,GACP,EAAE;IACD,IAAI,EAAE,UAAU,CAAC;IACjB,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,OAAO,CAAC;IAChB,YAAY,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;IACzC,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB,+BAgDA;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,eAAe,EACf,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,gBAAgB,EAChB,QAAQ,GACT,EAAE;IACD,QAAQ,EAAE,IAAI,GAAG,IAAI,CAAC;IACtB,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,OAAO,CAAC;IACzB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC;IACzD,gBAAgB,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACzD,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC,+BAuFA;AAED,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,UAAU,EACV,OAAO,EACP,aAAa,EACb,QAAQ,EACR,QAAQ,EACR,SAAS,GACV,EAAE;IACD,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,OAAO,EAAE,WAAW,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB,+BAgCA"}
|
|
@@ -2,7 +2,7 @@ import { ZONE_TYPES as e, defaultPlacedRect as t, zoneTypeLabel as n } from "../
|
|
|
2
2
|
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
3
3
|
import { Crosshair as a, MousePointer2 as o, Plus as s, Save as c, SquareDashed as l, SquarePlus as u, Trash2 as d, X as f } from "lucide-react";
|
|
4
4
|
import { Badge as p, Button as m, Input as h, Select as g, SelectContent as _, SelectItem as v, SelectTrigger as y, SelectValue as b } from "@burdenoff/fe-libs/ui";
|
|
5
|
-
|
|
5
|
+
// src/eventfullymanaged/components/floorPlanEditor/ZonePanels.tsx
|
|
6
6
|
function x({ mode: e, dirty: t, saving: n, onModeChange: a, onAddZone: s, onCancel: d, onSave: p }) {
|
|
7
7
|
return /* @__PURE__ */ i("div", {
|
|
8
8
|
className: "flex flex-wrap items-center gap-2 border-b border-border-seam px-5 py-3",
|
|
@@ -242,7 +242,6 @@ function w({ zone: e, active: t, disabled: a, onSelect: o }) {
|
|
|
242
242
|
})]
|
|
243
243
|
});
|
|
244
244
|
}
|
|
245
|
-
//#endregion
|
|
246
245
|
export { S as ZoneDetailsPanel, x as ZoneEditorToolbar, C as ZoneListPanel };
|
|
247
246
|
|
|
248
247
|
//# sourceMappingURL=ZonePanels.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ZonePanels.js","names":[],"sources":["../../../../src/eventfullymanaged/components/floorPlanEditor/ZonePanels.tsx"],"sourcesContent":["import { Crosshair, MousePointer2, Plus, Save, SquareDashed, SquarePlus, Trash2, X } from 'lucide-react';\nimport {\n Badge,\n Button,\n Input,\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from '@burdenoff/fe-libs/ui';\n\nimport { MAX_LABEL_LENGTH, ZONE_TYPES, defaultPlacedRect, zoneTypeLabel } from '../../lib/floorPlanZones';\nimport type { Zone, ZoneSummary } from '../../lib/floorPlanZones';\nimport type { EditorMode } from './useZoneEditorState';\n\nexport function ZoneEditorToolbar({\n mode,\n dirty,\n saving,\n onModeChange,\n onAddZone,\n onCancel,\n onSave,\n}: {\n mode: EditorMode;\n dirty: boolean;\n saving: boolean;\n onModeChange: (mode: EditorMode) => void;\n onAddZone: () => void;\n onCancel: () => void;\n onSave: () => void;\n}) {\n return (\n <div className=\"flex flex-wrap items-center gap-2 border-b border-border-seam px-5 py-3\">\n <div role=\"group\" aria-label=\"Editor tool\" className=\"flex items-center gap-1\">\n <Button\n type=\"button\"\n size=\"sm\"\n variant={mode === 'select' ? 'secondary' : 'ghost'}\n aria-pressed={mode === 'select'}\n disabled={saving}\n onClick={() => onModeChange('select')}\n >\n <MousePointer2 className=\"h-4 w-4\" />\n Select\n </Button>\n <Button\n type=\"button\"\n size=\"sm\"\n variant={mode === 'draw' ? 'secondary' : 'ghost'}\n aria-pressed={mode === 'draw'}\n disabled={saving}\n onClick={() => onModeChange('draw')}\n >\n <SquareDashed className=\"h-4 w-4\" />\n Draw zone\n </Button>\n <Button type=\"button\" size=\"sm\" variant=\"ghost\" disabled={saving} onClick={onAddZone}>\n <SquarePlus className=\"h-4 w-4\" />\n Add zone\n </Button>\n </div>\n <span className=\"text-xs text-text-muted\">\n {mode === 'draw'\n ? 'Drag on the map to draw a zone.'\n : 'Drag a zone to move it, or its corner to resize. Arrow keys nudge the focused zone; Alt+arrows resize it.'}\n </span>\n <div className=\"ml-auto flex items-center gap-2\">\n <Button type=\"button\" size=\"sm\" variant=\"ghost\" onClick={onCancel} disabled={saving}>\n <X className=\"h-4 w-4\" />\n {dirty ? 'Discard changes' : 'Close editor'}\n </Button>\n <Button type=\"button\" size=\"sm\" onClick={onSave} disabled={saving || !dirty}>\n <Save className=\"h-4 w-4\" />\n {saving ? 'Saving…' : 'Save zones'}\n </Button>\n </div>\n </div>\n );\n}\n\nexport function ZoneDetailsPanel({\n selected,\n hasZones,\n capacityText,\n capacityInvalid,\n errors,\n disabled,\n onChange,\n onCapacityChange,\n onRemove,\n}: {\n selected: Zone | null;\n hasZones: boolean;\n capacityText: string;\n capacityInvalid: boolean;\n errors: string[];\n disabled: boolean;\n onChange: (zoneId: string, patch: Partial<Zone>) => void;\n onCapacityChange: (zoneId: string, text: string) => void;\n onRemove: (zoneId: string) => void;\n}) {\n const customType =\n selected?.type && !ZONE_TYPES.some((entry) => entry.value === selected.type) ? selected.type : null;\n return (\n <section aria-label=\"Selected zone\" className=\"space-y-3\">\n <h3 className=\"text-sm font-semibold text-text-primary\">Zone details</h3>\n {selected ? (\n <fieldset disabled={disabled} className=\"space-y-3\">\n <label className=\"block space-y-1 text-sm\">\n <span className=\"font-medium text-text-primary\">Label</span>\n <Input\n value={selected.label}\n maxLength={MAX_LABEL_LENGTH}\n onChange={(event) => onChange(selected.id, { label: event.target.value })}\n aria-label=\"Zone label\"\n />\n </label>\n <div className=\"grid grid-cols-2 gap-3\">\n <label className=\"block space-y-1 text-sm\">\n <span className=\"font-medium text-text-primary\">Type</span>\n <Select\n value={selected.type ?? 'other'}\n disabled={disabled}\n onValueChange={(value) => onChange(selected.id, { type: value })}\n >\n <SelectTrigger aria-label=\"Zone type\">\n <SelectValue />\n </SelectTrigger>\n <SelectContent>\n {ZONE_TYPES.map((entry) => (\n <SelectItem key={entry.value} value={entry.value}>\n {entry.label}\n </SelectItem>\n ))}\n {customType ? <SelectItem value={customType}>{customType}</SelectItem> : null}\n </SelectContent>\n </Select>\n </label>\n <label className=\"block space-y-1 text-sm\">\n <span className=\"font-medium text-text-primary\">Capacity</span>\n <Input\n inputMode=\"numeric\"\n value={capacityText}\n onChange={(event) => onCapacityChange(selected.id, event.target.value)}\n placeholder=\"e.g. 40\"\n aria-label=\"Zone capacity\"\n aria-invalid={capacityInvalid}\n />\n {capacityInvalid ? (\n <span className=\"text-xs text-status-error-text\">Use a whole number, or leave it empty.</span>\n ) : null}\n </label>\n </div>\n <div className=\"flex flex-wrap gap-2\">\n {!selected.rect ? (\n <Button\n type=\"button\"\n size=\"sm\"\n variant=\"outline\"\n onClick={() => onChange(selected.id, { rect: defaultPlacedRect() })}\n >\n <Crosshair className=\"h-4 w-4\" />\n Place on map\n </Button>\n ) : null}\n <Button type=\"button\" size=\"sm\" variant=\"destructive\" onClick={() => onRemove(selected.id)}>\n <Trash2 className=\"h-4 w-4\" />\n Delete zone\n </Button>\n </div>\n </fieldset>\n ) : (\n <p className=\"text-sm text-text-secondary\">\n {hasZones\n ? 'Select a zone on the map or in the list to edit its label, type and capacity.'\n : 'Choose \"Draw zone\" and drag across the map, or use \"Add zone\", to add your first booth, stage or entrance.'}\n </p>\n )}\n {errors.length > 0 ? (\n <ul role=\"alert\" className=\"space-y-1 text-xs text-status-error-text\">\n {errors.map((message) => (\n <li key={message}>{message}</li>\n ))}\n </ul>\n ) : null}\n </section>\n );\n}\n\nexport function ZoneListPanel({\n zones,\n selectedId,\n summary,\n unplacedCount,\n disabled,\n onSelect,\n onAddZone,\n}: {\n zones: Zone[];\n selectedId: string | null;\n summary: ZoneSummary;\n unplacedCount: number;\n disabled: boolean;\n onSelect: (zoneId: string) => void;\n onAddZone: () => void;\n}) {\n return (\n <section aria-label=\"All zones\" className=\"space-y-3\">\n <div className=\"flex items-center justify-between gap-2\">\n <h3 className=\"text-sm font-semibold text-text-primary\">Zones</h3>\n <span className=\"text-xs text-text-muted\">\n {summary.zones} {summary.zones === 1 ? 'zone' : 'zones'}\n {summary.capacity > 0 ? ` · ${summary.capacity.toLocaleString()} capacity` : ''}\n </span>\n </div>\n {zones.length === 0 ? (\n <Button type=\"button\" size=\"sm\" variant=\"outline\" disabled={disabled} onClick={onAddZone}>\n <Plus className=\"h-4 w-4\" />\n Add your first zone\n </Button>\n ) : (\n <ul className=\"max-h-60 space-y-1 overflow-y-auto\" role=\"list\">\n {zones.map((zone) => (\n <li key={zone.id}>\n <ZoneListItem zone={zone} active={zone.id === selectedId} disabled={disabled} onSelect={onSelect} />\n </li>\n ))}\n </ul>\n )}\n {unplacedCount > 0 ? (\n <p className=\"text-xs text-text-muted\">\n {unplacedCount} {unplacedCount === 1 ? 'zone has' : 'zones have'} no position yet — select one and use “Place\n on map”.\n </p>\n ) : null}\n </section>\n );\n}\n\nfunction ZoneListItem({\n zone,\n active,\n disabled,\n onSelect,\n}: {\n zone: Zone;\n active: boolean;\n disabled: boolean;\n onSelect: (zoneId: string) => void;\n}) {\n const typeLabel = zoneTypeLabel(zone.type);\n return (\n <button\n type=\"button\"\n onClick={() => onSelect(zone.id)}\n aria-pressed={active}\n disabled={disabled}\n className={`flex w-full items-center justify-between gap-2 rounded-md border px-3 py-1.5 text-left text-sm transition-colors ${\n active ? 'border-accent-primary bg-action-primary-bg/10' : 'border-border-seam hover:border-border-strong'\n }`}\n >\n <span className=\"min-w-0 truncate text-text-primary\">{zone.label || 'Untitled zone'}</span>\n <span className=\"flex shrink-0 items-center gap-1.5\">\n {typeLabel ? <Badge variant=\"outline\">{typeLabel}</Badge> : null}\n {zone.capacity !== undefined ? (\n <span className=\"text-xs tabular-nums text-text-muted\">{zone.capacity}</span>\n ) : null}\n {!zone.rect ? <Badge variant=\"secondary\">Unplaced</Badge> : null}\n </span>\n </button>\n );\n}\n"],"mappings":";;;;;AAgBA,SAAgB,EAAkB,EAChC,SACA,UACA,WACA,iBACA,cACA,aACA,aASC;AACD,QACE,kBAAC,OAAD;EAAK,WAAU;YAAf;GACE,kBAAC,OAAD;IAAK,MAAK;IAAQ,cAAW;IAAc,WAAU;cAArD;KACE,kBAAC,GAAD;MACE,MAAK;MACL,MAAK;MACL,SAAS,MAAS,WAAW,cAAc;MAC3C,gBAAc,MAAS;MACvB,UAAU;MACV,eAAe,EAAa,SAAS;gBANvC,CAQE,kBAAC,GAAD,EAAe,WAAU,WAAY,CAAA,EAAA,SAE9B;;KACT,kBAAC,GAAD;MACE,MAAK;MACL,MAAK;MACL,SAAS,MAAS,SAAS,cAAc;MACzC,gBAAc,MAAS;MACvB,UAAU;MACV,eAAe,EAAa,OAAO;gBANrC,CAQE,kBAAC,GAAD,EAAc,WAAU,WAAY,CAAA,EAAA,YAE7B;;KACT,kBAAC,GAAD;MAAQ,MAAK;MAAS,MAAK;MAAK,SAAQ;MAAQ,UAAU;MAAQ,SAAS;gBAA3E,CACE,kBAAC,GAAD,EAAY,WAAU,WAAY,CAAA,EAAA,WAE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,kBAAC,QAAD;KAAM,WAAU;eAAwC,EAAK;KAAgB,CAAA;IAE7E,EAAK,OAAqD,OAA9C,kBAAC,GAAD;KAAO,SAAQ;eAAY;KAAgB,CAAA;IACpD;KACA"}
|
|
1
|
+
{"version":3,"file":"ZonePanels.js","names":["Badge","Badge$1","ZoneEditorToolbar","Button","mode","saving","onModeChange","MousePointer2","SquareDashed","onAddZone","SquarePlus","onCancel","X","dirty","onSave","Save","ZoneDetailsPanel","customType","selected","ZONE_TYPES","entry","Input","onChange","event","Select","value","SelectTrigger","SelectValue","SelectContent","SelectItem","capacityText","onCapacityChange","capacityInvalid","defaultPlacedRect","Crosshair","onRemove","Trash2","hasZones","errors","message","ZoneListPanel","summary","zones","Plus","ZoneListItem","zone","selectedId","unplacedCount","typeLabel","zoneTypeLabel","onSelect","active"],"sources":["../../../../src/eventfullymanaged/components/floorPlanEditor/ZonePanels.tsx"],"sourcesContent":["import { Crosshair, MousePointer2, Plus, Save, SquareDashed, SquarePlus, Trash2, X } from 'lucide-react';\nimport {\n Badge,\n Button,\n Input,\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from '@burdenoff/fe-libs/ui';\n\nimport { MAX_LABEL_LENGTH, ZONE_TYPES, defaultPlacedRect, zoneTypeLabel } from '../../lib/floorPlanZones';\nimport type { Zone, ZoneSummary } from '../../lib/floorPlanZones';\nimport type { EditorMode } from './useZoneEditorState';\n\nexport function ZoneEditorToolbar({\n mode,\n dirty,\n saving,\n onModeChange,\n onAddZone,\n onCancel,\n onSave,\n}: {\n mode: EditorMode;\n dirty: boolean;\n saving: boolean;\n onModeChange: (mode: EditorMode) => void;\n onAddZone: () => void;\n onCancel: () => void;\n onSave: () => void;\n}) {\n return (\n <div className=\"flex flex-wrap items-center gap-2 border-b border-border-seam px-5 py-3\">\n <div role=\"group\" aria-label=\"Editor tool\" className=\"flex items-center gap-1\">\n <Button\n type=\"button\"\n size=\"sm\"\n variant={mode === 'select' ? 'secondary' : 'ghost'}\n aria-pressed={mode === 'select'}\n disabled={saving}\n onClick={() => onModeChange('select')}\n >\n <MousePointer2 className=\"h-4 w-4\" />\n Select\n </Button>\n <Button\n type=\"button\"\n size=\"sm\"\n variant={mode === 'draw' ? 'secondary' : 'ghost'}\n aria-pressed={mode === 'draw'}\n disabled={saving}\n onClick={() => onModeChange('draw')}\n >\n <SquareDashed className=\"h-4 w-4\" />\n Draw zone\n </Button>\n <Button type=\"button\" size=\"sm\" variant=\"ghost\" disabled={saving} onClick={onAddZone}>\n <SquarePlus className=\"h-4 w-4\" />\n Add zone\n </Button>\n </div>\n <span className=\"text-xs text-text-muted\">\n {mode === 'draw'\n ? 'Drag on the map to draw a zone.'\n : 'Drag a zone to move it, or its corner to resize. Arrow keys nudge the focused zone; Alt+arrows resize it.'}\n </span>\n <div className=\"ml-auto flex items-center gap-2\">\n <Button type=\"button\" size=\"sm\" variant=\"ghost\" onClick={onCancel} disabled={saving}>\n <X className=\"h-4 w-4\" />\n {dirty ? 'Discard changes' : 'Close editor'}\n </Button>\n <Button type=\"button\" size=\"sm\" onClick={onSave} disabled={saving || !dirty}>\n <Save className=\"h-4 w-4\" />\n {saving ? 'Saving…' : 'Save zones'}\n </Button>\n </div>\n </div>\n );\n}\n\nexport function ZoneDetailsPanel({\n selected,\n hasZones,\n capacityText,\n capacityInvalid,\n errors,\n disabled,\n onChange,\n onCapacityChange,\n onRemove,\n}: {\n selected: Zone | null;\n hasZones: boolean;\n capacityText: string;\n capacityInvalid: boolean;\n errors: string[];\n disabled: boolean;\n onChange: (zoneId: string, patch: Partial<Zone>) => void;\n onCapacityChange: (zoneId: string, text: string) => void;\n onRemove: (zoneId: string) => void;\n}) {\n const customType =\n selected?.type && !ZONE_TYPES.some((entry) => entry.value === selected.type) ? selected.type : null;\n return (\n <section aria-label=\"Selected zone\" className=\"space-y-3\">\n <h3 className=\"text-sm font-semibold text-text-primary\">Zone details</h3>\n {selected ? (\n <fieldset disabled={disabled} className=\"space-y-3\">\n <label className=\"block space-y-1 text-sm\">\n <span className=\"font-medium text-text-primary\">Label</span>\n <Input\n value={selected.label}\n maxLength={MAX_LABEL_LENGTH}\n onChange={(event) => onChange(selected.id, { label: event.target.value })}\n aria-label=\"Zone label\"\n />\n </label>\n <div className=\"grid grid-cols-2 gap-3\">\n <label className=\"block space-y-1 text-sm\">\n <span className=\"font-medium text-text-primary\">Type</span>\n <Select\n value={selected.type ?? 'other'}\n disabled={disabled}\n onValueChange={(value) => onChange(selected.id, { type: value })}\n >\n <SelectTrigger aria-label=\"Zone type\">\n <SelectValue />\n </SelectTrigger>\n <SelectContent>\n {ZONE_TYPES.map((entry) => (\n <SelectItem key={entry.value} value={entry.value}>\n {entry.label}\n </SelectItem>\n ))}\n {customType ? <SelectItem value={customType}>{customType}</SelectItem> : null}\n </SelectContent>\n </Select>\n </label>\n <label className=\"block space-y-1 text-sm\">\n <span className=\"font-medium text-text-primary\">Capacity</span>\n <Input\n inputMode=\"numeric\"\n value={capacityText}\n onChange={(event) => onCapacityChange(selected.id, event.target.value)}\n placeholder=\"e.g. 40\"\n aria-label=\"Zone capacity\"\n aria-invalid={capacityInvalid}\n />\n {capacityInvalid ? (\n <span className=\"text-xs text-status-error-text\">Use a whole number, or leave it empty.</span>\n ) : null}\n </label>\n </div>\n <div className=\"flex flex-wrap gap-2\">\n {!selected.rect ? (\n <Button\n type=\"button\"\n size=\"sm\"\n variant=\"outline\"\n onClick={() => onChange(selected.id, { rect: defaultPlacedRect() })}\n >\n <Crosshair className=\"h-4 w-4\" />\n Place on map\n </Button>\n ) : null}\n <Button type=\"button\" size=\"sm\" variant=\"destructive\" onClick={() => onRemove(selected.id)}>\n <Trash2 className=\"h-4 w-4\" />\n Delete zone\n </Button>\n </div>\n </fieldset>\n ) : (\n <p className=\"text-sm text-text-secondary\">\n {hasZones\n ? 'Select a zone on the map or in the list to edit its label, type and capacity.'\n : 'Choose \"Draw zone\" and drag across the map, or use \"Add zone\", to add your first booth, stage or entrance.'}\n </p>\n )}\n {errors.length > 0 ? (\n <ul role=\"alert\" className=\"space-y-1 text-xs text-status-error-text\">\n {errors.map((message) => (\n <li key={message}>{message}</li>\n ))}\n </ul>\n ) : null}\n </section>\n );\n}\n\nexport function ZoneListPanel({\n zones,\n selectedId,\n summary,\n unplacedCount,\n disabled,\n onSelect,\n onAddZone,\n}: {\n zones: Zone[];\n selectedId: string | null;\n summary: ZoneSummary;\n unplacedCount: number;\n disabled: boolean;\n onSelect: (zoneId: string) => void;\n onAddZone: () => void;\n}) {\n return (\n <section aria-label=\"All zones\" className=\"space-y-3\">\n <div className=\"flex items-center justify-between gap-2\">\n <h3 className=\"text-sm font-semibold text-text-primary\">Zones</h3>\n <span className=\"text-xs text-text-muted\">\n {summary.zones} {summary.zones === 1 ? 'zone' : 'zones'}\n {summary.capacity > 0 ? ` · ${summary.capacity.toLocaleString()} capacity` : ''}\n </span>\n </div>\n {zones.length === 0 ? (\n <Button type=\"button\" size=\"sm\" variant=\"outline\" disabled={disabled} onClick={onAddZone}>\n <Plus className=\"h-4 w-4\" />\n Add your first zone\n </Button>\n ) : (\n <ul className=\"max-h-60 space-y-1 overflow-y-auto\" role=\"list\">\n {zones.map((zone) => (\n <li key={zone.id}>\n <ZoneListItem zone={zone} active={zone.id === selectedId} disabled={disabled} onSelect={onSelect} />\n </li>\n ))}\n </ul>\n )}\n {unplacedCount > 0 ? (\n <p className=\"text-xs text-text-muted\">\n {unplacedCount} {unplacedCount === 1 ? 'zone has' : 'zones have'} no position yet — select one and use “Place\n on map”.\n </p>\n ) : null}\n </section>\n );\n}\n\nfunction ZoneListItem({\n zone,\n active,\n disabled,\n onSelect,\n}: {\n zone: Zone;\n active: boolean;\n disabled: boolean;\n onSelect: (zoneId: string) => void;\n}) {\n const typeLabel = zoneTypeLabel(zone.type);\n return (\n <button\n type=\"button\"\n onClick={() => onSelect(zone.id)}\n aria-pressed={active}\n disabled={disabled}\n className={`flex w-full items-center justify-between gap-2 rounded-md border px-3 py-1.5 text-left text-sm transition-colors ${\n active ? 'border-accent-primary bg-action-primary-bg/10' : 'border-border-seam hover:border-border-strong'\n }`}\n >\n <span className=\"min-w-0 truncate text-text-primary\">{zone.label || 'Untitled zone'}</span>\n <span className=\"flex shrink-0 items-center gap-1.5\">\n {typeLabel ? <Badge variant=\"outline\">{typeLabel}</Badge> : null}\n {zone.capacity !== undefined ? (\n <span className=\"text-xs tabular-nums text-text-muted\">{zone.capacity}</span>\n ) : null}\n {!zone.rect ? <Badge variant=\"secondary\">Unplaced</Badge> : null}\n </span>\n </button>\n );\n}\n"],"mappings":";;;;;AAgBA,SAAgBE,EAAkB,EAChC,SACA,UACA,WACA,iBACA,cACA,aACA,aASC;CACD,OACE,kBAAC,OAAD;EAAK,WAAU;EAAf,UAAA;GACE,kBAAC,OAAD;IAAK,MAAK;IAAQ,cAAW;IAAc,WAAU;IAArD,UAAA;KACE,kBAACC,GAAD;MACE,MAAK;MACL,MAAK;MACL,SAASC,MAAS,WAAW,cAAc;MAC3C,gBAAcA,MAAS;MACvB,UAAUC;MACV,eAAeC,EAAa,QAAQ;MANtC,UAAA,CAQE,kBAACC,GAAD,EAAe,WAAU,UAAW,CAAA,GAAC,QAE/B;;KACR,kBAACJ,GAAD;MACE,MAAK;MACL,MAAK;MACL,SAASC,MAAS,SAAS,cAAc;MACzC,gBAAcA,MAAS;MACvB,UAAUC;MACV,eAAeC,EAAa,MAAM;MANpC,UAAA,CAQE,kBAACE,GAAD,EAAc,WAAU,UAAW,CAAA,GAAC,WAE9B;;KACR,kBAACL,GAAD;MAAQ,MAAK;MAAS,MAAK;MAAK,SAAQ;MAAQ,UAAUE;MAAQ,SAASI;MAA3E,UAAA,CACE,kBAACC,GAAD,EAAY,WAAU,UAAW,CAAA,GAAC,UAE5B;;IACL;;GACL,kBAAC,QAAD;IAAM,WAAU;IACb,UAAAN,MAAS,SACN,oCACA;GACA,CAAA;GACN,kBAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CACE,kBAACD,GAAD;KAAQ,MA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EACJ;EACV,WAAW,oHACTA,IAAS,kDAAkD;EAN/D,UAAA,CASE,kBAAC,QAAD;GAAM,WAAU;GAAsC,UAAAN,EAAK,SAAS;EAAsB,CAAA,GAC1F,kBAAC,QAAD;GAAM,WAAU;GAAhB,UAAA;IACGG,IAAY,kBAAChD,GAAD;KAAO,SAAQ;KAAW,UAAAgD;IAAiB,CAAA,IAAI;IAC3DH,EAAK,aAAa,KAAA,IAEf,OADF,kBAAC,QAAD;KAAM,WAAU;KAAwC,UAAAA,EAAK;IAAe,CAAA;IAE5EA,EAAK,OAAqD,OAA9C,kBAAC7C,GAAD;KAAO,SAAQ;KAAY,UAAA;IAAe,CAAA;GACpD;EACA,CAAA,CAAA;;AAEZ"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DEFAULT_ZONE_TYPE as e, defaultPlacedRect as t, moveRect as n, newZoneId as r, nextZoneLabel as i, parseCapacity as a, summarizeZones as o, validateZones as s, zonesEqual as c } from "../../lib/floorPlanZones.js";
|
|
2
2
|
import { useCallback as l, useMemo as u, useState as d } from "react";
|
|
3
|
-
|
|
3
|
+
// src/eventfullymanaged/components/floorPlanEditor/useZoneEditorState.ts
|
|
4
4
|
var f = 3;
|
|
5
5
|
function p(p = []) {
|
|
6
6
|
let [m, h] = d(p), [g, _] = d(p), [v, y] = d(null), [b, x] = d(p.length === 0 ? "draw" : "select"), [S, C] = d({}), [w, T] = d([]), E = u(() => new Map(g.map((e) => [e.id, e])), [g]), D = v ? E.get(v) ?? null : null, O = u(() => o(g), [g]), k = u(() => g.filter((e) => !e.rect).length, [g]), A = u(() => new Set(Object.entries(S).filter(([e, t]) => E.has(e) && !a(t).ok).map(([e]) => e)), [S, E]), j = u(() => A.size > 0 || !c(g, m), [
|
|
@@ -72,7 +72,6 @@ function p(p = []) {
|
|
|
72
72
|
}, [])
|
|
73
73
|
};
|
|
74
74
|
}
|
|
75
|
-
//#endregion
|
|
76
75
|
export { p as useZoneEditorState };
|
|
77
76
|
|
|
78
77
|
//# sourceMappingURL=useZoneEditorState.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useZoneEditorState.js","names":[],"sources":["../../../../src/eventfullymanaged/components/floorPlanEditor/useZoneEditorState.ts"],"sourcesContent":["import { useCallback, useMemo, useState } from 'react';\n\nimport {\n DEFAULT_ZONE_TYPE,\n defaultPlacedRect,\n moveRect,\n newZoneId,\n nextZoneLabel,\n parseCapacity,\n summarizeZones,\n validateZones,\n zonesEqual,\n} from '../../lib/floorPlanZones';\nimport type { Zone, ZoneRect, ZoneSummary } from '../../lib/floorPlanZones';\n\nexport type EditorMode = 'select' | 'draw';\n\n/** Offset (percent) between successive keyboard-added zones so they don't stack exactly. */\nconst ADD_ZONE_CASCADE = 3;\n\nexport type ZoneEditorState = {\n zones: Zone[];\n selected: Zone | null;\n selectedId: string | null;\n mode: EditorMode;\n summary: ZoneSummary;\n unplacedCount: number;\n errors: string[];\n dirty: boolean;\n invalidCapacityIds: ReadonlySet<string>;\n setMode: (mode: EditorMode) => void;\n select: (zoneId: string | null) => void;\n updateZone: (zoneId: string, patch: Partial<Zone>) => void;\n removeZone: (zoneId: string) => void;\n /** Add a zone at `rect` (or a default centred rectangle) and select it. */\n addZone: (rect?: ZoneRect) => void;\n capacityValue: (zone: Zone) => string;\n setCapacityText: (zoneId: string, text: string) => void;\n /** Validate for saving: returns the messages to show, or an empty list when the zones can be saved. */\n validateForSave: () => string[];\n /** Start a fresh editing session from `zones` (the saved state that `dirty` compares against). */\n reset: (zones: Zone[]) => void;\n};\n\n/**\n * All editor state and its mutations, kept apart from the pointer/canvas wiring.\n * The page owns this hook (so it can read `dirty` to guard navigation without\n * an effect) and starts each editing session with `reset(zonesOfThePlan)`.\n */\nexport function useZoneEditorState(seedZones: Zone[] = []): ZoneEditorState {\n const [initialZones, setInitialZones] = useState<Zone[]>(seedZones);\n const [zones, setZones] = useState<Zone[]>(seedZones);\n const [selectedId, setSelectedId] = useState<string | null>(null);\n const [mode, setModeState] = useState<EditorMode>(seedZones.length === 0 ? 'draw' : 'select');\n const [capacityText, setCapacityTextState] = useState<Record<string, string>>({});\n const [errors, setErrors] = useState<string[]>([]);\n\n const zonesById = useMemo(() => new Map(zones.map((zone) => [zone.id, zone])), [zones]);\n const selected = selectedId ? (zonesById.get(selectedId) ?? null) : null;\n const summary = useMemo(() => summarizeZones(zones), [zones]);\n const unplacedCount = useMemo(() => zones.filter((zone) => !zone.rect).length, [zones]);\n const invalidCapacityIds = useMemo(\n () =>\n new Set(\n Object.entries(capacityText)\n .filter(([zoneId, text]) => zonesById.has(zoneId) && !parseCapacity(text).ok)\n .map(([zoneId]) => zoneId)\n ),\n [capacityText, zonesById]\n );\n const dirty = useMemo(\n () => invalidCapacityIds.size > 0 || !zonesEqual(zones, initialZones),\n [zones, initialZones, invalidCapacityIds]\n );\n\n const updateZone = useCallback((zoneId: string, patch: Partial<Zone>) => {\n setZones((current) => current.map((zone) => (zone.id === zoneId ? { ...zone, ...patch } : zone)));\n setErrors([]);\n }, []);\n\n const removeZone = useCallback((zoneId: string) => {\n setZones((current) => current.filter((zone) => zone.id !== zoneId));\n setCapacityTextState((current) => {\n const next = { ...current };\n delete next[zoneId];\n return next;\n });\n setSelectedId((current) => (current === zoneId ? null : current));\n setErrors([]);\n }, []);\n\n const addZone = useCallback((rect?: ZoneRect) => {\n const id = newZoneId();\n // Label and cascade offset derive from the latest list, not a render-time snapshot.\n setZones((current) => {\n const cascade = (current.length % 5) * ADD_ZONE_CASCADE;\n return [\n ...current,\n {\n id,\n label: nextZoneLabel(current, DEFAULT_ZONE_TYPE),\n type: DEFAULT_ZONE_TYPE,\n rect: rect ?? moveRect(defaultPlacedRect(), cascade, cascade),\n },\n ];\n });\n setSelectedId(id);\n setModeState('select');\n setErrors([]);\n }, []);\n\n const setMode = useCallback((next: EditorMode) => {\n setModeState(next);\n if (next === 'draw') {\n setSelectedId(null);\n }\n }, []);\n\n const capacityValue = useCallback(\n (zone: Zone) => capacityText[zone.id] ?? (zone.capacity !== undefined ? String(zone.capacity) : ''),\n [capacityText]\n );\n\n const setCapacityText = useCallback(\n (zoneId: string, text: string) => {\n setCapacityTextState((current) => ({ ...current, [zoneId]: text }));\n const parsed = parseCapacity(text);\n if (parsed.ok) {\n updateZone(zoneId, { capacity: parsed.value });\n }\n },\n [updateZone]\n );\n\n const validateForSave = useCallback((): string[] => {\n const messages = validateZones(zones).map((error) => error.message);\n for (const zoneId of invalidCapacityIds) {\n const label = zonesById.get(zoneId)?.label ?? 'A zone';\n messages.push(`\"${label}\" needs a whole-number capacity (or leave it empty).`);\n }\n setErrors(messages);\n return messages;\n }, [zones, zonesById, invalidCapacityIds]);\n\n const reset = useCallback((next: Zone[]) => {\n setInitialZones(next);\n setZones(next);\n setSelectedId(null);\n setModeState(next.length === 0 ? 'draw' : 'select');\n setCapacityTextState({});\n setErrors([]);\n }, []);\n\n return {\n zones,\n selected,\n selectedId,\n mode,\n summary,\n unplacedCount,\n errors,\n dirty,\n invalidCapacityIds,\n setMode,\n select: setSelectedId,\n updateZone,\n removeZone,\n addZone,\n capacityValue,\n setCapacityText,\n validateForSave,\n reset,\n };\n}\n"],"mappings":";;;AAkBA,
|
|
1
|
+
{"version":3,"file":"useZoneEditorState.js","names":["ADD_ZONE_CASCADE","useZoneEditorState","initialZones","setInitialZones","useState","seedZones","zones","setZones","selectedId","setSelectedId","mode","setModeState","capacityText","setCapacityTextState","errors","setErrors","zonesById","useMemo","zone","selected","summary","summarizeZones","unplacedCount","invalidCapacityIds","zoneId","text","parseCapacity","dirty","zonesEqual","updateZone","useCallback","current","patch","removeZone","next","addZone","id","newZoneId","cascade","nextZoneLabel","DEFAULT_ZONE_TYPE","rect","moveRect","defaultPlacedRect","parsed","messages","validateZones","error","label"],"sources":["../../../../src/eventfullymanaged/components/floorPlanEditor/useZoneEditorState.ts"],"sourcesContent":["import { useCallback, useMemo, useState } from 'react';\n\nimport {\n DEFAULT_ZONE_TYPE,\n defaultPlacedRect,\n moveRect,\n newZoneId,\n nextZoneLabel,\n parseCapacity,\n summarizeZones,\n validateZones,\n zonesEqual,\n} from '../../lib/floorPlanZones';\nimport type { Zone, ZoneRect, ZoneSummary } from '../../lib/floorPlanZones';\n\nexport type EditorMode = 'select' | 'draw';\n\n/** Offset (percent) between successive keyboard-added zones so they don't stack exactly. */\nconst ADD_ZONE_CASCADE = 3;\n\nexport type ZoneEditorState = {\n zones: Zone[];\n selected: Zone | null;\n selectedId: string | null;\n mode: EditorMode;\n summary: ZoneSummary;\n unplacedCount: number;\n errors: string[];\n dirty: boolean;\n invalidCapacityIds: ReadonlySet<string>;\n setMode: (mode: EditorMode) => void;\n select: (zoneId: string | null) => void;\n updateZone: (zoneId: string, patch: Partial<Zone>) => void;\n removeZone: (zoneId: string) => void;\n /** Add a zone at `rect` (or a default centred rectangle) and select it. */\n addZone: (rect?: ZoneRect) => void;\n capacityValue: (zone: Zone) => string;\n setCapacityText: (zoneId: string, text: string) => void;\n /** Validate for saving: returns the messages to show, or an empty list when the zones can be saved. */\n validateForSave: () => string[];\n /** Start a fresh editing session from `zones` (the saved state that `dirty` compares against). */\n reset: (zones: Zone[]) => void;\n};\n\n/**\n * All editor state and its mutations, kept apart from the pointer/canvas wiring.\n * The page owns this hook (so it can read `dirty` to guard navigation without\n * an effect) and starts each editing session with `reset(zonesOfThePlan)`.\n */\nexport function useZoneEditorState(seedZones: Zone[] = []): ZoneEditorState {\n const [initialZones, setInitialZones] = useState<Zone[]>(seedZones);\n const [zones, setZones] = useState<Zone[]>(seedZones);\n const [selectedId, setSelectedId] = useState<string | null>(null);\n const [mode, setModeState] = useState<EditorMode>(seedZones.length === 0 ? 'draw' : 'select');\n const [capacityText, setCapacityTextState] = useState<Record<string, string>>({});\n const [errors, setErrors] = useState<string[]>([]);\n\n const zonesById = useMemo(() => new Map(zones.map((zone) => [zone.id, zone])), [zones]);\n const selected = selectedId ? (zonesById.get(selectedId) ?? null) : null;\n const summary = useMemo(() => summarizeZones(zones), [zones]);\n const unplacedCount = useMemo(() => zones.filter((zone) => !zone.rect).length, [zones]);\n const invalidCapacityIds = useMemo(\n () =>\n new Set(\n Object.entries(capacityText)\n .filter(([zoneId, text]) => zonesById.has(zoneId) && !parseCapacity(text).ok)\n .map(([zoneId]) => zoneId)\n ),\n [capacityText, zonesById]\n );\n const dirty = useMemo(\n () => invalidCapacityIds.size > 0 || !zonesEqual(zones, initialZones),\n [zones, initialZones, invalidCapacityIds]\n );\n\n const updateZone = useCallback((zoneId: string, patch: Partial<Zone>) => {\n setZones((current) => current.map((zone) => (zone.id === zoneId ? { ...zone, ...patch } : zone)));\n setErrors([]);\n }, []);\n\n const removeZone = useCallback((zoneId: string) => {\n setZones((current) => current.filter((zone) => zone.id !== zoneId));\n setCapacityTextState((current) => {\n const next = { ...current };\n delete next[zoneId];\n return next;\n });\n setSelectedId((current) => (current === zoneId ? null : current));\n setErrors([]);\n }, []);\n\n const addZone = useCallback((rect?: ZoneRect) => {\n const id = newZoneId();\n // Label and cascade offset derive from the latest list, not a render-time snapshot.\n setZones((current) => {\n const cascade = (current.length % 5) * ADD_ZONE_CASCADE;\n return [\n ...current,\n {\n id,\n label: nextZoneLabel(current, DEFAULT_ZONE_TYPE),\n type: DEFAULT_ZONE_TYPE,\n rect: rect ?? moveRect(defaultPlacedRect(), cascade, cascade),\n },\n ];\n });\n setSelectedId(id);\n setModeState('select');\n setErrors([]);\n }, []);\n\n const setMode = useCallback((next: EditorMode) => {\n setModeState(next);\n if (next === 'draw') {\n setSelectedId(null);\n }\n }, []);\n\n const capacityValue = useCallback(\n (zone: Zone) => capacityText[zone.id] ?? (zone.capacity !== undefined ? String(zone.capacity) : ''),\n [capacityText]\n );\n\n const setCapacityText = useCallback(\n (zoneId: string, text: string) => {\n setCapacityTextState((current) => ({ ...current, [zoneId]: text }));\n const parsed = parseCapacity(text);\n if (parsed.ok) {\n updateZone(zoneId, { capacity: parsed.value });\n }\n },\n [updateZone]\n );\n\n const validateForSave = useCallback((): string[] => {\n const messages = validateZones(zones).map((error) => error.message);\n for (const zoneId of invalidCapacityIds) {\n const label = zonesById.get(zoneId)?.label ?? 'A zone';\n messages.push(`\"${label}\" needs a whole-number capacity (or leave it empty).`);\n }\n setErrors(messages);\n return messages;\n }, [zones, zonesById, invalidCapacityIds]);\n\n const reset = useCallback((next: Zone[]) => {\n setInitialZones(next);\n setZones(next);\n setSelectedId(null);\n setModeState(next.length === 0 ? 'draw' : 'select');\n setCapacityTextState({});\n setErrors([]);\n }, []);\n\n return {\n zones,\n selected,\n selectedId,\n mode,\n summary,\n unplacedCount,\n errors,\n dirty,\n invalidCapacityIds,\n setMode,\n select: setSelectedId,\n updateZone,\n removeZone,\n addZone,\n capacityValue,\n setCapacityText,\n validateForSave,\n reset,\n };\n}\n"],"mappings":";;;AAkBA,IAAMA,IAAmB;AA+BzB,SAAgBC,EAAmB,IAAoB,CAAC,GAAoB;CAC1E,IAAM,CAACC,GAAcC,KAAmBC,EAAiBC,CAAS,GAC5D,CAACC,GAAOC,KAAYH,EAAiBC,CAAS,GAC9C,CAACG,GAAYC,KAAiBL,EAAwB,IAAI,GAC1D,CAACM,GAAMC,KAAgBP,EAAqBC,EAAU,WAAW,IAAI,SAAS,QAAQ,GACtF,CAACO,GAAcC,KAAwBT,EAAiC,CAAC,CAAC,GAC1E,CAACU,GAAQC,KAAaX,EAAmB,CAAC,CAAC,GAE3CY,IAAYC,QAAc,IAAI,IAAIX,EAAM,KAAK,MAAS,CAACY,EAAK,IAAIA,CAAI,CAAC,CAAC,GAAG,CAACZ,CAAK,CAAC,GAChFa,IAAWX,IAAcQ,EAAU,IAAIR,CAAU,KAAK,OAAQ,MAC9DY,IAAUH,QAAcI,EAAef,CAAK,GAAG,CAACA,CAAK,CAAC,GACtDgB,IAAgBL,QAAcX,EAAM,QAAQ,MAAS,CAACY,EAAK,IAAI,CAAC,CAAC,QAAQ,CAACZ,CAAK,CAAC,GAChFiB,IAAqBN,QAEvB,IAAI,IACF,OAAO,QAAQL,CAAY,CAA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A,SApDce,GAAa,MAAqB;GAEhD,AADAnB,EAAauB,CAAI,GACbA,MAAS,UACXzB,EAAc,IAAI;EAEtB,GAAG,CAAC,CA+CF;EACA,QAAQA;EACR;EACA;EACA;EACA,eAlDoBqB,GACnB,MAAelB,EAAaM,EAAK,QAAQA,EAAK,aAAa,KAAA,IAAoC,KAAxB,OAAOA,EAAK,QAAQ,IAC5F,CAACN,CAAY,CAgDb;EACA,iBA9CsBkB,GACrB,GAAgB,MAAiB;GAChC,GAAsB,OAAa;IAAE,GAAGC;KAAUP,IAASC;GAAK,EAAE;GAClE,IAAMmB,IAASlB,EAAcD,CAAI;GACjC,AAAImB,EAAO,MACTf,EAAWL,GAAQ,EAAE,UAAUoB,EAAO,MAAM,CAAC;EAEjD,GACA,CAACf,CAAU,CAsCX;EACA,iBApCsBC,QAA4B;GAClD,IAAMe,IAAWC,EAAcxC,CAAK,CAAC,CAAC,KAAK,MAAUyC,EAAM,OAAO;GAClE,KAAK,IAAMvB,KAAUD,GAAoB;IACvC,IAAMyB,IAAQhC,EAAU,IAAIQ,CAAM,CAAC,EAAE,SAAS;IAC9C,EAAS,KAAK,IAAIwB,EAAM,qDAAqD;GAC/E;GAEA,OADAjC,EAAU8B,CAAQ,GACXA;EACT,GAAG;GAACvC;GAAOU;GAAWO;EAAkB,CA4BtC;EACA,OA3BYO,GAAa,MAAiB;GAM1C,AALA3B,EAAgB+B,CAAI,GACpB3B,EAAS2B,CAAI,GACbzB,EAAc,IAAI,GAClBE,EAAauB,EAAK,WAAW,IAAI,SAAS,QAAQ,GAClDrB,EAAqB,CAAC,CAAC,GACvBE,EAAU,CAAC,CAAC;EACd,GAAG,CAAC,CAoBF;CACF;AACF"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { ActionMenu as e } from "./ActionMenu.js";
|
|
1
2
|
import "./EventCharts.js";
|
|
2
|
-
import "./PageLayout.js";
|
|
3
|
-
import "./ActionMenu.js";
|
|
4
|
-
import "./Pagination.js";
|
|
5
3
|
import "./EntityFormShell.js";
|
|
6
4
|
import "./EntityTagsField.js";
|
|
7
|
-
import "./SafeLink.js";
|
|
8
5
|
import "./ImageUploadField.js";
|
|
6
|
+
import "./PageLayout.js";
|
|
7
|
+
import { Pagination as t, usePagination as n } from "./Pagination.js";
|
|
8
|
+
import "./SafeLink.js";
|
|
9
|
+
export { e as ActionMenu, t as Pagination, n as usePagination };
|
|
@@ -14,7 +14,7 @@ interface EventfullyManagedProviderProps {
|
|
|
14
14
|
children: ReactNode;
|
|
15
15
|
props: EventfullyManagedRootProps;
|
|
16
16
|
}
|
|
17
|
-
export declare function EventfullyManagedProvider({ children, props }: EventfullyManagedProviderProps): import("react
|
|
17
|
+
export declare function EventfullyManagedProvider({ children, props }: EventfullyManagedProviderProps): import("react").JSX.Element;
|
|
18
18
|
export declare function useEventfullyManaged(): EventfullyManagedContextValue;
|
|
19
19
|
/**
|
|
20
20
|
* Hook for basePath-aware navigation.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EventfullyManagedContext.d.ts","sourceRoot":"","sources":["../../../src/eventfullymanaged/context/EventfullyManagedContext.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAmD,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACxF,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,UAAU,CAAC;AAE3D,UAAU,6BAA6B;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,WAAW,EAAE,0BAA0B,CAAC,aAAa,CAAC,CAAC;IACvD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;CACnB;AAID,UAAU,8BAA8B;IACtC,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,EAAE,0BAA0B,CAAC;CACnC;AAED,wBAAgB,yBAAyB,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,8BAA8B
|
|
1
|
+
{"version":3,"file":"EventfullyManagedContext.d.ts","sourceRoot":"","sources":["../../../src/eventfullymanaged/context/EventfullyManagedContext.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAmD,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACxF,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,UAAU,CAAC;AAE3D,UAAU,6BAA6B;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,WAAW,EAAE,0BAA0B,CAAC,aAAa,CAAC,CAAC;IACvD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;CACnB;AAID,UAAU,8BAA8B;IACtC,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,EAAE,0BAA0B,CAAC;CACnC;AAED,wBAAgB,yBAAyB,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,8BAA8B,+BAwC5F;AAED,wBAAgB,oBAAoB,kCAMnC;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,WArEzB,MAAM,KAAK,IAAI,CAyFjC"}
|
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
import { createContext as e, useCallback as t, useContext as n, useMemo as r } from "react";
|
|
2
2
|
import { jsx as i } from "react/jsx-runtime";
|
|
3
|
-
|
|
3
|
+
// src/eventfullymanaged/context/EventfullyManagedContext.tsx
|
|
4
4
|
var a = e(null);
|
|
5
5
|
function o({ children: e, props: n }) {
|
|
6
6
|
let { basePath: o = "", navigate: s, currentUser: c, workspaceId: l, tenantId: u, apiGatewayUrl: d, authToken: f } = n, p = o.endsWith("/") ? o.slice(0, -1) : o, m = t((e) => {
|
|
7
|
-
if (!p || p === "/") {
|
|
7
|
+
if (!p || p === "/" || e.startsWith(p)) {
|
|
8
8
|
s(e);
|
|
9
9
|
return;
|
|
10
10
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
return;
|
|
14
|
-
}
|
|
15
|
-
s(e.startsWith("/") ? `${p}${e}` : `${p}/${e}`);
|
|
11
|
+
let t = e.startsWith("/") ? `${p}${e}` : `${p}/${e}`;
|
|
12
|
+
s(t);
|
|
16
13
|
}, [p, s]), h = r(() => ({
|
|
17
14
|
basePath: p,
|
|
18
15
|
navigate: m,
|
|
@@ -40,7 +37,6 @@ function s() {
|
|
|
40
37
|
if (!e) throw Error("useEventfullyManaged must be used within an EventfullyManagedProvider");
|
|
41
38
|
return e;
|
|
42
39
|
}
|
|
43
|
-
//#endregion
|
|
44
40
|
export { o as EventfullyManagedProvider, s as useEventfullyManaged };
|
|
45
41
|
|
|
46
42
|
//# sourceMappingURL=EventfullyManagedContext.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EventfullyManagedContext.js","names":[],"sources":["../../../src/eventfullymanaged/context/EventfullyManagedContext.tsx"],"sourcesContent":["/**\n * EventfullyManagedContext\n *\n * Provides basePath-aware navigation and shared props throughout EventfullyManaged.\n * Uses the navigate function from host app props - no react-router hooks needed.\n */\n\nimport { createContext, useContext, useCallback, useMemo, type ReactNode } from 'react';\nimport type { EventfullyManagedRootProps } from '../types';\n\ninterface EventfullyManagedContextValue {\n basePath: string;\n navigate: (path: string) => void;\n currentUser: EventfullyManagedRootProps['currentUser'];\n workspaceId?: string;\n tenantId?: string;\n apiGatewayUrl: string;\n authToken: string;\n}\n\nconst EventfullyManagedContext = createContext<EventfullyManagedContextValue | null>(null);\n\ninterface EventfullyManagedProviderProps {\n children: ReactNode;\n props: EventfullyManagedRootProps;\n}\n\nexport function EventfullyManagedProvider({ children, props }: EventfullyManagedProviderProps) {\n const { basePath = '', navigate: hostNavigate, currentUser, workspaceId, tenantId, apiGatewayUrl, authToken } = props;\n\n // Normalize basePath (remove trailing slash)\n const normalizedBasePath = basePath.endsWith('/') ? basePath.slice(0, -1) : basePath;\n\n // Create basePath-aware navigation using host's navigate function\n const navigate = useCallback(\n (path: string) => {\n // If basePath is empty or \"/\", just use the path as-is\n if (!normalizedBasePath || normalizedBasePath === '/') {\n hostNavigate(path);\n return;\n }\n // If path already starts with basePath, use as-is\n if (path.startsWith(normalizedBasePath)) {\n hostNavigate(path);\n return;\n }\n // Otherwise, prepend basePath\n const fullPath = path.startsWith('/') ? `${normalizedBasePath}${path}` : `${normalizedBasePath}/${path}`;\n hostNavigate(fullPath);\n },\n [normalizedBasePath, hostNavigate]\n );\n\n const value = useMemo(\n () => ({\n basePath: normalizedBasePath,\n navigate,\n currentUser,\n workspaceId,\n tenantId,\n apiGatewayUrl: apiGatewayUrl || '',\n authToken: authToken || '',\n }),\n [normalizedBasePath, navigate, currentUser, workspaceId, tenantId, apiGatewayUrl, authToken]\n );\n\n return <EventfullyManagedContext.Provider value={value}>{children}</EventfullyManagedContext.Provider>;\n}\n\nexport function useEventfullyManaged() {\n const context = useContext(EventfullyManagedContext);\n if (!context) {\n throw new Error('useEventfullyManaged must be used within an EventfullyManagedProvider');\n }\n return context;\n}\n\n/**\n * Hook for basePath-aware navigation.\n * Returns a navigate function that automatically prepends basePath.\n */\nexport function useEventfullyManagedNavigate() {\n const context = useContext(EventfullyManagedContext);\n\n // Create a stable fallback function\n const fallbackNavigate = useCallback((path: string) => {\n const currentPath = window.location.pathname;\n const mfeMatch = currentPath.match(/^(\\/eventfullymanaged)/);\n const basePath = mfeMatch ? mfeMatch[1] : '';\n\n let fullPath = path;\n if (basePath && !path.startsWith(basePath)) {\n fullPath = path.startsWith('/') ? `${basePath}${path}` : `${basePath}/${path}`;\n }\n\n // Use window.location as last resort\n window.location.href = fullPath;\n }, []);\n\n // Return context navigate if available, otherwise fallback\n return context?.navigate ?? fallbackNavigate;\n}\n"],"mappings":";;;AAoBA,
|
|
1
|
+
{"version":3,"file":"EventfullyManagedContext.js","names":["EventfullyManagedContext","createContext","EventfullyManagedProvider","hostNavigate","props","normalizedBasePath","basePath","navigate","useCallback","path","fullPath","value","useMemo","apiGatewayUrl","authToken","currentUser","workspaceId","tenantId","useEventfullyManaged","context","useContext"],"sources":["../../../src/eventfullymanaged/context/EventfullyManagedContext.tsx"],"sourcesContent":["/**\n * EventfullyManagedContext\n *\n * Provides basePath-aware navigation and shared props throughout EventfullyManaged.\n * Uses the navigate function from host app props - no react-router hooks needed.\n */\n\nimport { createContext, useContext, useCallback, useMemo, type ReactNode } from 'react';\nimport type { EventfullyManagedRootProps } from '../types';\n\ninterface EventfullyManagedContextValue {\n basePath: string;\n navigate: (path: string) => void;\n currentUser: EventfullyManagedRootProps['currentUser'];\n workspaceId?: string;\n tenantId?: string;\n apiGatewayUrl: string;\n authToken: string;\n}\n\nconst EventfullyManagedContext = createContext<EventfullyManagedContextValue | null>(null);\n\ninterface EventfullyManagedProviderProps {\n children: ReactNode;\n props: EventfullyManagedRootProps;\n}\n\nexport function EventfullyManagedProvider({ children, props }: EventfullyManagedProviderProps) {\n const { basePath = '', navigate: hostNavigate, currentUser, workspaceId, tenantId, apiGatewayUrl, authToken } = props;\n\n // Normalize basePath (remove trailing slash)\n const normalizedBasePath = basePath.endsWith('/') ? basePath.slice(0, -1) : basePath;\n\n // Create basePath-aware navigation using host's navigate function\n const navigate = useCallback(\n (path: string) => {\n // If basePath is empty or \"/\", just use the path as-is\n if (!normalizedBasePath || normalizedBasePath === '/') {\n hostNavigate(path);\n return;\n }\n // If path already starts with basePath, use as-is\n if (path.startsWith(normalizedBasePath)) {\n hostNavigate(path);\n return;\n }\n // Otherwise, prepend basePath\n const fullPath = path.startsWith('/') ? `${normalizedBasePath}${path}` : `${normalizedBasePath}/${path}`;\n hostNavigate(fullPath);\n },\n [normalizedBasePath, hostNavigate]\n );\n\n const value = useMemo(\n () => ({\n basePath: normalizedBasePath,\n navigate,\n currentUser,\n workspaceId,\n tenantId,\n apiGatewayUrl: apiGatewayUrl || '',\n authToken: authToken || '',\n }),\n [normalizedBasePath, navigate, currentUser, workspaceId, tenantId, apiGatewayUrl, authToken]\n );\n\n return <EventfullyManagedContext.Provider value={value}>{children}</EventfullyManagedContext.Provider>;\n}\n\nexport function useEventfullyManaged() {\n const context = useContext(EventfullyManagedContext);\n if (!context) {\n throw new Error('useEventfullyManaged must be used within an EventfullyManagedProvider');\n }\n return context;\n}\n\n/**\n * Hook for basePath-aware navigation.\n * Returns a navigate function that automatically prepends basePath.\n */\nexport function useEventfullyManagedNavigate() {\n const context = useContext(EventfullyManagedContext);\n\n // Create a stable fallback function\n const fallbackNavigate = useCallback((path: string) => {\n const currentPath = window.location.pathname;\n const mfeMatch = currentPath.match(/^(\\/eventfullymanaged)/);\n const basePath = mfeMatch ? mfeMatch[1] : '';\n\n let fullPath = path;\n if (basePath && !path.startsWith(basePath)) {\n fullPath = path.startsWith('/') ? `${basePath}${path}` : `${basePath}/${path}`;\n }\n\n // Use window.location as last resort\n window.location.href = fullPath;\n }, []);\n\n // Return context navigate if available, otherwise fallback\n return context?.navigate ?? fallbackNavigate;\n}\n"],"mappings":";;;AAoBA,IAAMA,IAA2BC,EAAoD,IAAI;AAOzF,SAAgBC,EAA0B,EAAE,aAAU,YAAyC;CAC7F,IAAM,EAAE,cAAW,IAAI,UAAUC,GAAc,gBAAa,gBAAa,aAAU,kBAAe,iBAAcC,GAG1GC,IAAqBC,EAAS,SAAS,GAAG,IAAIA,EAAS,MAAM,GAAG,EAAE,IAAIA,GAGtEC,IAAWC,GACd,MAAiB;EAOhB,IALI,CAACH,KAAsBA,MAAuB,OAK9CI,EAAK,WAAWJ,CAAkB,GAAG;GACvC,EAAaI,CAAI;GACjB;EACF;EAEA,IAAMC,IAAWD,EAAK,WAAW,GAAG,IAAI,GAAGJ,IAAqBI,MAAS,GAAGJ,EAAmB,GAAGI;EAClG,EAAaC,CAAQ;CACvB,GACA,CAACL,GAAoBF,CAAY,CACnC,GAEMQ,IAAQC,SACL;EACL,UAAUP;EACV;EACA;EACA;EACA;EACA,eAAeQ,KAAiB;EAChC,WAAWC,KAAa;CAC1B,IACA;EAACT;EAAoBE;EAAUQ;EAAaC;EAAaC;EAAUJ;EAAeC;CAAS,CAC7F;CAEA,OAAO,kBAACd,EAAyB,UAA1B;EAA0C;EAAQ;CAA4C,CAAA;AACvG;AAEA,SAAgBkB,IAAuB;CACrC,IAAMC,IAAUC,EAAWpB,CAAwB;CACnD,IAAI,CAACmB,GACH,MAAU,MAAM,uEAAuE;CAEzF,OAAOA;AACT"}
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { useDeleteEventMutation as e } from "../api/eventApi.js";
|
|
2
|
+
import { notify as t } from "../lib/toast.js";
|
|
3
3
|
import { useCallback as n } from "react";
|
|
4
|
-
|
|
4
|
+
// src/eventfullymanaged/hooks/useEventDelete.ts
|
|
5
5
|
function r() {
|
|
6
|
-
let [r] =
|
|
7
|
-
return { onDeleteEvent: n(async (
|
|
8
|
-
let i = await r({ variables: { id:
|
|
9
|
-
if (i.error || !i.data?.deleteEvent) throw
|
|
10
|
-
|
|
6
|
+
let [r] = e();
|
|
7
|
+
return { onDeleteEvent: n(async (e, n) => {
|
|
8
|
+
let i = await r({ variables: { id: e } });
|
|
9
|
+
if (i.error || !i.data?.deleteEvent) throw t.error("Could not delete event", i.error?.message ?? "The server did not confirm the change."), i.error ?? /* @__PURE__ */ Error("delete-unconfirmed");
|
|
10
|
+
t.success("Event deleted", n?.name), await n?.onSuccess?.();
|
|
11
11
|
}, [r]) };
|
|
12
12
|
}
|
|
13
|
-
//#endregion
|
|
14
13
|
export { r as useEventDelete };
|
|
15
14
|
|
|
16
15
|
//# sourceMappingURL=useEventDelete.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEventDelete.js","names":[],"sources":["../../../src/eventfullymanaged/hooks/useEventDelete.ts"],"sourcesContent":["import { useCallback } from 'react';\n\nimport { useDeleteEventMutation } from '../api/eventApi';\nimport { notify } from '../lib/toast';\n\nexport interface UseEventDeleteOptions {\n /** Name shown in the success toast (e.g. \"Event deleted Annual Meetup\"). */\n name?: string;\n /** Called after the server confirms deletion and the success toast fires. */\n onSuccess?: () => void | Promise<void>;\n}\n\nexport interface UseEventDeleteResult {\n /** Delete the event by id, surfacing errors and calling onSuccess when confirmed. */\n onDeleteEvent: (id: string, options?: UseEventDeleteOptions) => Promise<void>;\n}\n\n/**\n * Shared event-deletion handler for EventfullyManaged list and detail surfaces.\n *\n * Encapsulates the mutation call, server-error handling, success notification\n * and post-delete callback (list refetch or detail navigation) so the behaviour\n * is testable in isolation and identical across EventsPage and EventDetailPage.\n */\nexport function useEventDelete(): UseEventDeleteResult {\n const [deleteEvent] = useDeleteEventMutation();\n\n const onDeleteEvent = useCallback(\n async (id: string, options?: UseEventDeleteOptions) => {\n const response = await deleteEvent({ variables: { id } });\n if (response.error || !response.data?.deleteEvent) {\n notify.error('Could not delete event', response.error?.message ?? 'The server did not confirm the change.');\n throw response.error ?? new Error('delete-unconfirmed');\n }\n notify.success('Event deleted', options?.name);\n await options?.onSuccess?.();\n },\n [deleteEvent]\n );\n\n return { onDeleteEvent };\n}\n"],"mappings":";;;;AAwBA,
|
|
1
|
+
{"version":3,"file":"useEventDelete.js","names":["useEventDelete","deleteEvent","useDeleteEventMutation","useCallback","response","notify","options"],"sources":["../../../src/eventfullymanaged/hooks/useEventDelete.ts"],"sourcesContent":["import { useCallback } from 'react';\n\nimport { useDeleteEventMutation } from '../api/eventApi';\nimport { notify } from '../lib/toast';\n\nexport interface UseEventDeleteOptions {\n /** Name shown in the success toast (e.g. \"Event deleted Annual Meetup\"). */\n name?: string;\n /** Called after the server confirms deletion and the success toast fires. */\n onSuccess?: () => void | Promise<void>;\n}\n\nexport interface UseEventDeleteResult {\n /** Delete the event by id, surfacing errors and calling onSuccess when confirmed. */\n onDeleteEvent: (id: string, options?: UseEventDeleteOptions) => Promise<void>;\n}\n\n/**\n * Shared event-deletion handler for EventfullyManaged list and detail surfaces.\n *\n * Encapsulates the mutation call, server-error handling, success notification\n * and post-delete callback (list refetch or detail navigation) so the behaviour\n * is testable in isolation and identical across EventsPage and EventDetailPage.\n */\nexport function useEventDelete(): UseEventDeleteResult {\n const [deleteEvent] = useDeleteEventMutation();\n\n const onDeleteEvent = useCallback(\n async (id: string, options?: UseEventDeleteOptions) => {\n const response = await deleteEvent({ variables: { id } });\n if (response.error || !response.data?.deleteEvent) {\n notify.error('Could not delete event', response.error?.message ?? 'The server did not confirm the change.');\n throw response.error ?? new Error('delete-unconfirmed');\n }\n notify.success('Event deleted', options?.name);\n await options?.onSuccess?.();\n },\n [deleteEvent]\n );\n\n return { onDeleteEvent };\n}\n"],"mappings":";;;;AAwBA,SAAgBA,IAAuC;CACrD,IAAM,CAACC,KAAeC,EAAuB;CAe7C,OAAO,EAAE,eAbaC,EACpB,OAAO,GAAY,MAAoC;EACrD,IAAMC,IAAW,MAAMH,EAAY,EAAE,WAAW,EAAE,MAAG,EAAE,CAAC;EACxD,IAAIG,EAAS,SAAS,CAACA,EAAS,MAAM,aAEpC,MADAC,EAAO,MAAM,0BAA0BD,EAAS,OAAO,WAAW,wCAAwC,GACpGA,EAAS,SAAS,gBAAI,MAAM,oBAAoB;EAGxD,AADAC,EAAO,QAAQ,iBAAiBC,GAAS,IAAI,GAC7C,MAAMA,GAAS,YAAY;CAC7B,GACA,CAACL,CAAW,CAGL,EAAc;AACzB"}
|