convex-cms 0.0.5-alpha.5 → 0.0.7-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +59 -97
- package/admin/src/components/ContentEntryEditor.tsx +2 -2
- package/admin/src/components/ContentTypeFormModal.tsx +121 -81
- package/admin/src/components/fields/ReferenceField.tsx +9 -9
- package/admin/src/pages/ContentPage.tsx +11 -19
- package/admin/src/pages/ContentTypesPage.tsx +62 -16
- package/admin/src/routes/entries/$entryId.tsx +1 -1
- package/admin/src/routes/entries/type/$contentTypeId.tsx +1 -1
- package/admin-dist/nitro.json +1 -1
- package/admin-dist/public/assets/CmsEmptyState-CXVkI3FZ.js +1 -0
- package/admin-dist/public/assets/CmsPageHeader-DU9fD34s.js +1 -0
- package/admin-dist/public/assets/{CmsStatusBadge-Dd9uToHE.js → CmsStatusBadge-nZ9TeLBL.js} +1 -1
- package/admin-dist/public/assets/{CmsSurface-DBy5Lumx.js → CmsSurface-DF7OcKg_.js} +1 -1
- package/admin-dist/public/assets/CmsToolbar-5S8FQrSx.js +1 -0
- package/admin-dist/public/assets/ContentEntryEditor-BDb44eTo.js +4 -0
- package/admin-dist/public/assets/TaxonomyFilter-DEN2Q9Lo.js +1 -0
- package/admin-dist/public/assets/_contentTypeId-Ba5iowxH.js +1 -0
- package/admin-dist/public/assets/_entryId-OY3sLz6O.js +1 -0
- package/admin-dist/public/assets/alert-BbW1Q9CR.js +1 -0
- package/admin-dist/public/assets/badge-DdM8Eua8.js +1 -0
- package/admin-dist/public/assets/{circle-check-big-CpLxAvEj.js → circle-check-big-B7eCOM8r.js} +1 -1
- package/admin-dist/public/assets/command-BIjzeKOv.js +1 -0
- package/admin-dist/public/assets/content-BV3YeSSW.js +1 -0
- package/admin-dist/public/assets/content-types-Bm4b2tf8.js +1 -0
- package/admin-dist/public/assets/globals-D41WzvyZ.css +1 -0
- package/admin-dist/public/assets/index-DnJ5Twlv.js +1 -0
- package/admin-dist/public/assets/main-BZB1uYTH.js +102 -0
- package/admin-dist/public/assets/media-BIMN5jXt.js +1 -0
- package/admin-dist/public/assets/new._contentTypeId-DTWb8ZDl.js +1 -0
- package/admin-dist/public/assets/pencil-BDQ1ZWRw.js +1 -0
- package/admin-dist/public/assets/{rotate-ccw-BZpZtw0N.js → rotate-ccw-BWblSIsl.js} +1 -1
- package/admin-dist/public/assets/scroll-area-BoaB6x8v.js +1 -0
- package/admin-dist/public/assets/{search-BvgYr-c9.js → search-CYMIpd39.js} +1 -1
- package/admin-dist/public/assets/settings-DaNDUtr5.js +1 -0
- package/admin-dist/public/assets/switch-DN7TOCa5.js +1 -0
- package/admin-dist/public/assets/tabs-RN__emeJ.js +1 -0
- package/admin-dist/public/assets/tanstack-adapter-DQcKErwf.js +1 -0
- package/admin-dist/public/assets/taxonomies-DylY9HE1.js +1 -0
- package/admin-dist/public/assets/trash-Dp_a2mpb.js +1 -0
- package/admin-dist/public/assets/{useBreadcrumbLabel-D00rvqjw.js → useBreadcrumbLabel-BQ9dJI6T.js} +1 -1
- package/admin-dist/public/assets/usePermissions-WUBNg_Id.js +1 -0
- package/admin-dist/server/_chunks/_libs/@date-fns/tz.mjs +2 -2
- package/admin-dist/server/_chunks/_libs/@radix-ui/react-avatar.mjs +1 -1
- package/admin-dist/server/_chunks/_libs/@radix-ui/react-collection.mjs +1 -1
- package/admin-dist/server/_chunks/_libs/@radix-ui/react-context.mjs +2 -2
- package/admin-dist/server/_chunks/_libs/@radix-ui/react-dialog.mjs +2 -2
- package/admin-dist/server/_chunks/_libs/@radix-ui/react-label.mjs +1 -1
- package/admin-dist/server/_chunks/_libs/@radix-ui/react-menu.mjs +1 -1
- package/admin-dist/server/_chunks/_libs/@radix-ui/react-popover.mjs +1 -1
- package/admin-dist/server/_chunks/_libs/@radix-ui/react-primitive.mjs +6 -72
- package/admin-dist/server/_chunks/_libs/@radix-ui/react-select.mjs +1 -1
- package/admin-dist/server/_chunks/_libs/@radix-ui/react-separator.mjs +1 -1
- package/admin-dist/server/_chunks/_libs/@radix-ui/react-slot.mjs +20 -435
- package/admin-dist/server/_chunks/_libs/@radix-ui/react-visually-hidden.mjs +30 -3
- package/admin-dist/server/_chunks/_libs/@tanstack/history.mjs +0 -376
- package/admin-dist/server/_chunks/_libs/@tanstack/react-router.mjs +168 -383
- package/admin-dist/server/_chunks/_libs/@tanstack/router-core.mjs +451 -1195
- package/admin-dist/server/_chunks/_libs/react-dom.mjs +5 -5
- package/admin-dist/server/_chunks/_libs/react.mjs +2 -2
- package/admin-dist/server/_libs/cmdk.mjs +1 -1
- package/admin-dist/server/_libs/convex.mjs +3 -3
- package/admin-dist/server/_libs/cookie-es.mjs +1 -58
- package/admin-dist/server/_libs/date-fns.mjs +1 -1
- package/admin-dist/server/_libs/lucide-react.mjs +110 -103
- package/admin-dist/server/_libs/seroval-plugins.mjs +1 -58
- package/admin-dist/server/_libs/seroval.mjs +1 -1765
- package/admin-dist/server/_libs/zod.mjs +1 -1
- package/admin-dist/server/_ssr/CmsEmptyState-DYh_PPQE.mjs +38 -0
- package/admin-dist/server/_ssr/{CmsPageHeader-ClNPU7Up.mjs → CmsPageHeader-BcniLh49.mjs} +1 -1
- package/admin-dist/server/_ssr/{CmsStatusBadge-CojMbrY7.mjs → CmsStatusBadge-BShWDxwE.mjs} +2 -2
- package/admin-dist/server/_ssr/{CmsSurface-Dcv440rp.mjs → CmsSurface-CHEv-Kba.mjs} +1 -1
- package/admin-dist/server/_ssr/{CmsToolbar-BKv1nL6u.mjs → CmsToolbar-Dqqb216_.mjs} +2 -3
- package/admin-dist/server/_ssr/{ContentEntryEditor-weiXSBdZ.mjs → ContentEntryEditor-DOIAyWME.mjs} +18 -21
- package/admin-dist/server/_ssr/{TaxonomyFilter-BPQ57Mwk.mjs → TaxonomyFilter-BfsPAZ-Y.mjs} +4 -5
- package/admin-dist/server/_ssr/{_contentTypeId-DyyauLOs.mjs → _contentTypeId-CPjmri90.mjs} +34 -43
- package/admin-dist/server/_ssr/{_entryId-9Cafwxmw.mjs → _entryId-D0yu8HuP.mjs} +35 -47
- package/admin-dist/server/_ssr/_tanstack-start-manifest_v-DgCpSt_y.mjs +4 -0
- package/admin-dist/server/_ssr/badge-Cp61aQNc.mjs +39 -0
- package/admin-dist/server/_ssr/{command-CEf8YBxY.mjs → command-BfjE1WJf.mjs} +2 -2
- package/admin-dist/server/_ssr/{config.server-D7JHDcDv.mjs → config.server-BOr7Jxr4.mjs} +5 -14
- package/admin-dist/server/_ssr/{content-ZFWVzO25.mjs → content-DrODe6sA.mjs} +40 -49
- package/admin-dist/server/_ssr/content-types-BPgMwxiT.mjs +459 -0
- package/admin-dist/server/_ssr/{index-BlSIlH4Z.mjs → index-BTHmIC9W.mjs} +26 -28
- package/admin-dist/server/_ssr/index.mjs +3459 -62
- package/admin-dist/server/_ssr/{media-CD2_NUMw.mjs → media-DkvBfmD9.mjs} +31 -43
- package/admin-dist/server/_ssr/{new._contentTypeId-dmZy6PBX.mjs → new._contentTypeId-Co_73sDJ.mjs} +33 -45
- package/admin-dist/server/_ssr/router-CaDgRHfQ.mjs +3031 -0
- package/admin-dist/server/_ssr/{scroll-area-BH_1K-WT.mjs → scroll-area-D3v-O_jk.mjs} +1 -1
- package/admin-dist/server/_ssr/{settings-DVdsoWoh.mjs → settings-MaEXh2Hz.mjs} +30 -39
- package/admin-dist/server/_ssr/{switch-DX_X8vZl.mjs → switch-DmbR03dm.mjs} +1 -1
- package/admin-dist/server/_ssr/{tabs-4FWM0sn8.mjs → tabs-5oFlAGLz.mjs} +2 -3
- package/admin-dist/server/_ssr/{tanstack-adapter-D3ZcKtbY.mjs → tanstack-adapter-DNaUioIZ.mjs} +1 -1
- package/admin-dist/server/_ssr/{taxonomies-BHFfO9Yr.mjs → taxonomies-D3xMK23a.mjs} +30 -39
- package/admin-dist/server/_ssr/{trash-9tUB2KwI.mjs → trash-CNw1mtF1.mjs} +30 -39
- package/admin-dist/server/_ssr/{useBreadcrumbLabel-DVme3DSb.mjs → useBreadcrumbLabel-BQGjOTcy.mjs} +1 -1
- package/admin-dist/server/_ssr/{usePermissions-zAQj-ruE.mjs → usePermissions-D0qtvmNi.mjs} +1 -1
- package/admin-dist/server/index.mjs +162 -204
- package/dist/cli/templates/cmsClient.d.ts +1 -1
- package/dist/cli/templates/cmsClient.d.ts.map +1 -1
- package/dist/cli/templates/cmsClient.js +30 -11
- package/dist/cli/templates/cmsClient.js.map +1 -1
- package/dist/cli/templates/cmsConfig.d.ts +1 -1
- package/dist/cli/templates/cmsConfig.d.ts.map +1 -1
- package/dist/cli/templates/cmsConfig.js +3 -3
- package/dist/client/admin/contentLock.d.ts +4 -4
- package/dist/client/admin/contentLock.d.ts.map +1 -1
- package/dist/client/admin/contentLock.js +1 -1
- package/dist/client/admin/contentLock.js.map +1 -1
- package/dist/client/admin/contentTypes.d.ts +303 -290
- package/dist/client/admin/contentTypes.d.ts.map +1 -1
- package/dist/client/admin/contentTypes.js +101 -9
- package/dist/client/admin/contentTypes.js.map +1 -1
- package/dist/client/admin/entries.d.ts +18 -19
- package/dist/client/admin/entries.d.ts.map +1 -1
- package/dist/client/admin/entries.js +6 -8
- package/dist/client/admin/entries.js.map +1 -1
- package/dist/client/admin/index.d.ts +690 -642
- package/dist/client/admin/index.d.ts.map +1 -1
- package/dist/client/admin/index.js +29 -5
- package/dist/client/admin/index.js.map +1 -1
- package/dist/client/admin/media.d.ts.map +1 -1
- package/dist/client/admin/taxonomies.d.ts.map +1 -1
- package/dist/client/admin/trash.d.ts +3 -4
- package/dist/client/admin/trash.d.ts.map +1 -1
- package/dist/client/admin/types.d.ts +181 -4
- package/dist/client/admin/types.d.ts.map +1 -1
- package/dist/client/admin/validators.d.ts +2009 -25
- package/dist/client/admin/validators.d.ts.map +1 -1
- package/dist/client/admin/validators.js +15 -4
- package/dist/client/admin/validators.js.map +1 -1
- package/dist/client/admin/versions.d.ts +1 -1
- package/dist/client/admin/versions.d.ts.map +1 -1
- package/dist/client/agentTools.d.ts +1 -4
- package/dist/client/agentTools.d.ts.map +1 -1
- package/dist/client/agentTools.js +9 -21
- package/dist/client/agentTools.js.map +1 -1
- package/dist/client/config.d.ts +10 -0
- package/dist/client/config.d.ts.map +1 -1
- package/dist/client/config.js +1 -0
- package/dist/client/config.js.map +1 -1
- package/dist/client/defineContent.d.ts +338 -0
- package/dist/client/defineContent.d.ts.map +1 -0
- package/dist/client/defineContent.js +368 -0
- package/dist/client/defineContent.js.map +1 -0
- package/dist/client/index.d.ts +2 -0
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +2 -0
- package/dist/client/index.js.map +1 -1
- package/dist/client/queryBuilder.d.ts +0 -15
- package/dist/client/queryBuilder.d.ts.map +1 -1
- package/dist/client/queryBuilder.js +0 -23
- package/dist/client/queryBuilder.js.map +1 -1
- package/dist/client/registry.d.ts +77 -0
- package/dist/client/registry.d.ts.map +1 -0
- package/dist/client/registry.js +95 -0
- package/dist/client/registry.js.map +1 -0
- package/dist/client/schema/defineContentType.d.ts +36 -24
- package/dist/client/schema/defineContentType.d.ts.map +1 -1
- package/dist/client/schema/defineContentType.js +77 -48
- package/dist/client/schema/defineContentType.js.map +1 -1
- package/dist/client/schema/typedClient.d.ts.map +1 -1
- package/dist/client/schema/typedClient.js +2 -10
- package/dist/client/schema/typedClient.js.map +1 -1
- package/dist/client/schema/types.d.ts +16 -9
- package/dist/client/schema/types.d.ts.map +1 -1
- package/dist/client/schema/types.js.map +1 -1
- package/dist/client/utils/toSlug.d.ts +60 -0
- package/dist/client/utils/toSlug.d.ts.map +1 -0
- package/dist/client/utils/toSlug.js +31 -0
- package/dist/client/utils/toSlug.js.map +1 -0
- package/dist/client/wrapper.d.ts +2 -2
- package/dist/client/wrapper.d.ts.map +1 -1
- package/dist/client/wrapper.js +22 -30
- package/dist/client/wrapper.js.map +1 -1
- package/dist/component/_generated/component.d.ts +24 -28
- package/dist/component/_generated/component.d.ts.map +1 -1
- package/dist/component/authorizationHooks.d.ts +1 -1
- package/dist/component/authorizationHooks.d.ts.map +1 -1
- package/dist/component/authorizationHooks.js +2 -2
- package/dist/component/authorizationHooks.js.map +1 -1
- package/dist/component/bulkOperations.d.ts.map +1 -1
- package/dist/component/bulkOperations.js +7 -4
- package/dist/component/bulkOperations.js.map +1 -1
- package/dist/component/contentEntries.d.ts +18 -56
- package/dist/component/contentEntries.d.ts.map +1 -1
- package/dist/component/contentEntries.js +45 -137
- package/dist/component/contentEntries.js.map +1 -1
- package/dist/component/contentEntryMutations.d.ts +14 -14
- package/dist/component/contentEntryMutations.d.ts.map +1 -1
- package/dist/component/contentEntryMutations.js +40 -43
- package/dist/component/contentEntryMutations.js.map +1 -1
- package/dist/component/contentEntryValidation.d.ts +3 -3
- package/dist/component/contentEntryValidation.js +6 -9
- package/dist/component/contentEntryValidation.js.map +1 -1
- package/dist/component/contentLock.d.ts +7 -7
- package/dist/component/contentLock.js +3 -3
- package/dist/component/contentLock.js.map +1 -1
- package/dist/component/contentTypeMigration.d.ts +1 -1
- package/dist/component/contentTypeMigration.js +2 -2
- package/dist/component/contentTypeMigration.js.map +1 -1
- package/dist/component/contentTypeMutations.js +2 -2
- package/dist/component/contentTypeMutations.js.map +1 -1
- package/dist/component/convex.config.d.ts.map +1 -1
- package/dist/component/convex.config.js +1 -1
- package/dist/component/convex.config.js.map +1 -1
- package/dist/component/eventEmitter.d.ts +0 -1
- package/dist/component/eventEmitter.d.ts.map +1 -1
- package/dist/component/eventEmitter.js.map +1 -1
- package/dist/component/exportImport.d.ts +37 -37
- package/dist/component/exportImport.d.ts.map +1 -1
- package/dist/component/exportImport.js +34 -34
- package/dist/component/exportImport.js.map +1 -1
- package/dist/component/lib/deepReferenceResolver.d.ts +2 -2
- package/dist/component/lib/deepReferenceResolver.d.ts.map +1 -1
- package/dist/component/lib/deepReferenceResolver.js +13 -8
- package/dist/component/lib/deepReferenceResolver.js.map +1 -1
- package/dist/component/lib/ragContentChunker.d.ts +3 -3
- package/dist/component/lib/ragContentChunker.d.ts.map +1 -1
- package/dist/component/lib/ragContentChunker.js +4 -4
- package/dist/component/lib/ragContentChunker.js.map +1 -1
- package/dist/component/lib/referenceResolver.d.ts.map +1 -1
- package/dist/component/lib/referenceResolver.js +10 -17
- package/dist/component/lib/referenceResolver.js.map +1 -1
- package/dist/component/mediaAssetMutations.js +4 -4
- package/dist/component/mediaAssetMutations.js.map +1 -1
- package/dist/component/ragContentIndexer.d.ts +2 -2
- package/dist/component/ragContentIndexer.d.ts.map +1 -1
- package/dist/component/ragContentIndexer.js +44 -48
- package/dist/component/ragContentIndexer.js.map +1 -1
- package/dist/component/roles.d.ts +3 -3
- package/dist/component/scheduledPublish.d.ts +4 -4
- package/dist/component/scheduledPublish.js +3 -3
- package/dist/component/scheduledPublish.js.map +1 -1
- package/dist/component/schema.d.ts +18 -18
- package/dist/component/schema.js +5 -5
- package/dist/component/schema.js.map +1 -1
- package/dist/component/trash.d.ts +6 -9
- package/dist/component/trash.d.ts.map +1 -1
- package/dist/component/trash.js +12 -36
- package/dist/component/trash.js.map +1 -1
- package/dist/component/userContext.d.ts +1 -2
- package/dist/component/userContext.d.ts.map +1 -1
- package/dist/component/userContext.js +1 -2
- package/dist/component/userContext.js.map +1 -1
- package/dist/component/validators.d.ts +27 -33
- package/dist/component/validators.d.ts.map +1 -1
- package/dist/component/validators.js +3 -5
- package/dist/component/validators.js.map +1 -1
- package/dist/component/versionMutations.d.ts +1 -1
- package/dist/component/webhookTrigger.d.ts +14 -14
- package/dist/test.d.ts +30 -30
- package/dist/test.d.ts.map +1 -1
- package/dist/test.js +24 -24
- package/dist/test.js.map +1 -1
- package/package.json +1 -1
- package/admin-dist/public/assets/CmsEmptyState-Do_erIgn.js +0 -5
- package/admin-dist/public/assets/CmsPageHeader-qDwPGi48.js +0 -1
- package/admin-dist/public/assets/CmsToolbar-D1-Y-7SK.js +0 -1
- package/admin-dist/public/assets/ContentEntryEditor-CWBiIx52.js +0 -4
- package/admin-dist/public/assets/TaxonomyFilter-CdYQawxb.js +0 -1
- package/admin-dist/public/assets/_contentTypeId-D9VMP6Gs.js +0 -1
- package/admin-dist/public/assets/_entryId-2FlCfqE7.js +0 -1
- package/admin-dist/public/assets/alert-GxZx0y5c.js +0 -1
- package/admin-dist/public/assets/badge-BAlGIjop.js +0 -1
- package/admin-dist/public/assets/command-di7XCqcv.js +0 -1
- package/admin-dist/public/assets/content-D8zELsDG.js +0 -1
- package/admin-dist/public/assets/content-types-BmzD0krT.js +0 -2
- package/admin-dist/public/assets/globals-BvFfH-v9.css +0 -1
- package/admin-dist/public/assets/index-zqfj4T_v.js +0 -1
- package/admin-dist/public/assets/label-B6PPtKR5.js +0 -1
- package/admin-dist/public/assets/link-2-W2fVnVOf.js +0 -1
- package/admin-dist/public/assets/list-F8O0lZXC.js +0 -1
- package/admin-dist/public/assets/main-dZT72bAG.js +0 -97
- package/admin-dist/public/assets/media-CETueFbV.js +0 -1
- package/admin-dist/public/assets/new._contentTypeId-BV2-TyyR.js +0 -1
- package/admin-dist/public/assets/plus-AABQIF0N.js +0 -1
- package/admin-dist/public/assets/scroll-area-CDfk-zrz.js +0 -1
- package/admin-dist/public/assets/select-BuiHcMzS.js +0 -1
- package/admin-dist/public/assets/settings-DBxbYDvn.js +0 -1
- package/admin-dist/public/assets/switch-DiJvolcs.js +0 -1
- package/admin-dist/public/assets/tabs-Cgz6G_Xy.js +0 -1
- package/admin-dist/public/assets/tanstack-adapter-BknsSgra.js +0 -1
- package/admin-dist/public/assets/taxonomies-DOErsLl5.js +0 -1
- package/admin-dist/public/assets/textarea-CgggMxUX.js +0 -1
- package/admin-dist/public/assets/trash-BU4ANuaW.js +0 -1
- package/admin-dist/public/assets/triangle-alert-lvCbwp0s.js +0 -1
- package/admin-dist/public/assets/usePermissions-D7tQowaF.js +0 -1
- package/admin-dist/server/_libs/h3-v2.mjs +0 -277
- package/admin-dist/server/_ssr/CmsButton-DbzfJru_.mjs +0 -125
- package/admin-dist/server/_ssr/CmsEmptyState-CuvcXr3Z.mjs +0 -290
- package/admin-dist/server/_ssr/_tanstack-start-manifest_v-Dk-FIYPN.mjs +0 -4
- package/admin-dist/server/_ssr/content-types-D25lUE-j.mjs +0 -1312
- package/admin-dist/server/_ssr/label-PblVvdRv.mjs +0 -22
- package/admin-dist/server/_ssr/router-x6Ab8T4s.mjs +0 -1622
- package/admin-dist/server/_ssr/select-CrfEkFJw.mjs +0 -142
- package/admin-dist/server/_ssr/textarea-CZVaroMc.mjs +0 -18
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/trash-BU4ANuaW.js","assets/CmsPageHeader-qDwPGi48.js","assets/CmsToolbar-D1-Y-7SK.js","assets/CmsEmptyState-Do_erIgn.js","assets/badge-BAlGIjop.js","assets/search-BvgYr-c9.js","assets/CmsSurface-DBy5Lumx.js","assets/select-BuiHcMzS.js","assets/alert-GxZx0y5c.js","assets/triangle-alert-lvCbwp0s.js","assets/rotate-ccw-BZpZtw0N.js","assets/tanstack-adapter-BknsSgra.js","assets/taxonomies-DOErsLl5.js","assets/label-B6PPtKR5.js","assets/textarea-CgggMxUX.js","assets/plus-AABQIF0N.js","assets/scroll-area-CDfk-zrz.js","assets/settings-DBxbYDvn.js","assets/usePermissions-D7tQowaF.js","assets/switch-DiJvolcs.js","assets/media-CETueFbV.js","assets/tabs-Cgz6G_Xy.js","assets/TaxonomyFilter-CdYQawxb.js","assets/command-di7XCqcv.js","assets/link-2-W2fVnVOf.js","assets/content-types-BmzD0krT.js","assets/list-F8O0lZXC.js","assets/content-D8zELsDG.js","assets/circle-check-big-CpLxAvEj.js","assets/CmsStatusBadge-Dd9uToHE.js","assets/index-zqfj4T_v.js","assets/_entryId-2FlCfqE7.js","assets/ContentEntryEditor-CWBiIx52.js","assets/useBreadcrumbLabel-D00rvqjw.js","assets/_contentTypeId-D9VMP6Gs.js","assets/new._contentTypeId-BV2-TyyR.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
function WC(e,t){for(var r=0;r<t.length;r++){const s=t[r];if(typeof s!="string"&&!Array.isArray(s)){for(const a in s)if(a!=="default"&&!(a in e)){const l=Object.getOwnPropertyDescriptor(s,a);l&&Object.defineProperty(e,a,l.get?l:{enumerable:!0,get:()=>s[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function rw(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var uh={exports:{}},Sa={};var zb;function e2(){if(zb)return Sa;zb=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(s,a,l){var u=null;if(l!==void 0&&(u=""+l),a.key!==void 0&&(u=""+a.key),"key"in a){l={};for(var f in a)f!=="key"&&(l[f]=a[f])}else l=a;return a=l.ref,{$$typeof:e,type:s,key:u,ref:a!==void 0?a:null,props:l}}return Sa.Fragment=t,Sa.jsx=r,Sa.jsxs=r,Sa}var jb;function t2(){return jb||(jb=1,uh.exports=e2()),uh.exports}var _=t2(),fh={exports:{}},Se={};var Lb;function n2(){if(Lb)return Se;Lb=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),b=Symbol.iterator;function S(N){return N===null||typeof N!="object"?null:(N=b&&N[b]||N["@@iterator"],typeof N=="function"?N:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,C={};function O(N,G,ee){this.props=N,this.context=G,this.refs=C,this.updater=ee||E}O.prototype.isReactComponent={},O.prototype.setState=function(N,G){if(typeof N!="object"&&typeof N!="function"&&N!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,N,G,"setState")},O.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function L(){}L.prototype=O.prototype;function k(N,G,ee){this.props=N,this.context=G,this.refs=C,this.updater=ee||E}var j=k.prototype=new L;j.constructor=k,x(j,O.prototype),j.isPureReactComponent=!0;var I=Array.isArray;function H(){}var $={H:null,A:null,T:null,S:null},D=Object.prototype.hasOwnProperty;function W(N,G,ee){var re=ee.ref;return{$$typeof:e,type:N,key:G,ref:re!==void 0?re:null,props:ee}}function ne(N,G){return W(N.type,G,N.props)}function oe(N){return typeof N=="object"&&N!==null&&N.$$typeof===e}function ie(N){var G={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(ee){return G[ee]})}var de=/\/+/g;function ue(N,G){return typeof N=="object"&&N!==null&&N.key!=null?ie(""+N.key):G.toString(36)}function ve(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(H,H):(N.status="pending",N.then(function(G){N.status==="pending"&&(N.status="fulfilled",N.value=G)},function(G){N.status==="pending"&&(N.status="rejected",N.reason=G)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function P(N,G,ee,re,he){var ge=typeof N;(ge==="undefined"||ge==="boolean")&&(N=null);var se=!1;if(N===null)se=!0;else switch(ge){case"bigint":case"string":case"number":se=!0;break;case"object":switch(N.$$typeof){case e:case t:se=!0;break;case y:return se=N._init,P(se(N._payload),G,ee,re,he)}}if(se)return he=he(N),se=re===""?"."+ue(N,0):re,I(he)?(ee="",se!=null&&(ee=se.replace(de,"$&/")+"/"),P(he,G,ee,"",function(pt){return pt})):he!=null&&(oe(he)&&(he=ne(he,ee+(he.key==null||N&&N.key===he.key?"":(""+he.key).replace(de,"$&/")+"/")+se)),G.push(he)),1;se=0;var Pe=re===""?".":re+":";if(I(N))for(var Ne=0;Ne<N.length;Ne++)re=N[Ne],ge=Pe+ue(re,Ne),se+=P(re,G,ee,ge,he);else if(Ne=S(N),typeof Ne=="function")for(N=Ne.call(N),Ne=0;!(re=N.next()).done;)re=re.value,ge=Pe+ue(re,Ne++),se+=P(re,G,ee,ge,he);else if(ge==="object"){if(typeof N.then=="function")return P(ve(N),G,ee,re,he);throw G=String(N),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return se}function Y(N,G,ee){if(N==null)return N;var re=[],he=0;return P(N,re,"","",function(ge){return G.call(ee,ge,he++)}),re}function V(N){if(N._status===-1){var G=N._result;G=G(),G.then(function(ee){(N._status===0||N._status===-1)&&(N._status=1,N._result=ee)},function(ee){(N._status===0||N._status===-1)&&(N._status=2,N._result=ee)}),N._status===-1&&(N._status=0,N._result=G)}if(N._status===1)return N._result.default;throw N._result}var te=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N),error:N});if(!window.dispatchEvent(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)},be={map:Y,forEach:function(N,G,ee){Y(N,function(){G.apply(this,arguments)},ee)},count:function(N){var G=0;return Y(N,function(){G++}),G},toArray:function(N){return Y(N,function(G){return G})||[]},only:function(N){if(!oe(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};return Se.Activity=g,Se.Children=be,Se.Component=O,Se.Fragment=r,Se.Profiler=a,Se.PureComponent=k,Se.StrictMode=s,Se.Suspense=h,Se.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=$,Se.__COMPILER_RUNTIME={__proto__:null,c:function(N){return $.H.useMemoCache(N)}},Se.cache=function(N){return function(){return N.apply(null,arguments)}},Se.cacheSignal=function(){return null},Se.cloneElement=function(N,G,ee){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var re=x({},N.props),he=N.key;if(G!=null)for(ge in G.key!==void 0&&(he=""+G.key),G)!D.call(G,ge)||ge==="key"||ge==="__self"||ge==="__source"||ge==="ref"&&G.ref===void 0||(re[ge]=G[ge]);var ge=arguments.length-2;if(ge===1)re.children=ee;else if(1<ge){for(var se=Array(ge),Pe=0;Pe<ge;Pe++)se[Pe]=arguments[Pe+2];re.children=se}return W(N.type,he,re)},Se.createContext=function(N){return N={$$typeof:u,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:l,_context:N},N},Se.createElement=function(N,G,ee){var re,he={},ge=null;if(G!=null)for(re in G.key!==void 0&&(ge=""+G.key),G)D.call(G,re)&&re!=="key"&&re!=="__self"&&re!=="__source"&&(he[re]=G[re]);var se=arguments.length-2;if(se===1)he.children=ee;else if(1<se){for(var Pe=Array(se),Ne=0;Ne<se;Ne++)Pe[Ne]=arguments[Ne+2];he.children=Pe}if(N&&N.defaultProps)for(re in se=N.defaultProps,se)he[re]===void 0&&(he[re]=se[re]);return W(N,ge,he)},Se.createRef=function(){return{current:null}},Se.forwardRef=function(N){return{$$typeof:f,render:N}},Se.isValidElement=oe,Se.lazy=function(N){return{$$typeof:y,_payload:{_status:-1,_result:N},_init:V}},Se.memo=function(N,G){return{$$typeof:m,type:N,compare:G===void 0?null:G}},Se.startTransition=function(N){var G=$.T,ee={};$.T=ee;try{var re=N(),he=$.S;he!==null&&he(ee,re),typeof re=="object"&&re!==null&&typeof re.then=="function"&&re.then(H,te)}catch(ge){te(ge)}finally{G!==null&&ee.types!==null&&(G.types=ee.types),$.T=G}},Se.unstable_useCacheRefresh=function(){return $.H.useCacheRefresh()},Se.use=function(N){return $.H.use(N)},Se.useActionState=function(N,G,ee){return $.H.useActionState(N,G,ee)},Se.useCallback=function(N,G){return $.H.useCallback(N,G)},Se.useContext=function(N){return $.H.useContext(N)},Se.useDebugValue=function(){},Se.useDeferredValue=function(N,G){return $.H.useDeferredValue(N,G)},Se.useEffect=function(N,G){return $.H.useEffect(N,G)},Se.useEffectEvent=function(N){return $.H.useEffectEvent(N)},Se.useId=function(){return $.H.useId()},Se.useImperativeHandle=function(N,G,ee){return $.H.useImperativeHandle(N,G,ee)},Se.useInsertionEffect=function(N,G){return $.H.useInsertionEffect(N,G)},Se.useLayoutEffect=function(N,G){return $.H.useLayoutEffect(N,G)},Se.useMemo=function(N,G){return $.H.useMemo(N,G)},Se.useOptimistic=function(N,G){return $.H.useOptimistic(N,G)},Se.useReducer=function(N,G,ee){return $.H.useReducer(N,G,ee)},Se.useRef=function(N){return $.H.useRef(N)},Se.useState=function(N){return $.H.useState(N)},Se.useSyncExternalStore=function(N,G,ee){return $.H.useSyncExternalStore(N,G,ee)},Se.useTransition=function(){return $.H.useTransition()},Se.version="19.2.3",Se}var Db;function Ya(){return Db||(Db=1,fh.exports=n2()),fh.exports}var w=Ya();const kt=rw(w),_u=WC({__proto__:null,default:kt},[w]);var dh={exports:{}},wa={},hh={exports:{}},ph={};var Pb;function r2(){return Pb||(Pb=1,(function(e){function t(P,Y){var V=P.length;P.push(Y);e:for(;0<V;){var te=V-1>>>1,be=P[te];if(0<a(be,Y))P[te]=Y,P[V]=be,V=te;else break e}}function r(P){return P.length===0?null:P[0]}function s(P){if(P.length===0)return null;var Y=P[0],V=P.pop();if(V!==Y){P[0]=V;e:for(var te=0,be=P.length,N=be>>>1;te<N;){var G=2*(te+1)-1,ee=P[G],re=G+1,he=P[re];if(0>a(ee,V))re<be&&0>a(he,ee)?(P[te]=he,P[re]=V,te=re):(P[te]=ee,P[G]=V,te=G);else if(re<be&&0>a(he,V))P[te]=he,P[re]=V,te=re;else break e}}return Y}function a(P,Y){var V=P.sortIndex-Y.sortIndex;return V!==0?V:P.id-Y.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var u=Date,f=u.now();e.unstable_now=function(){return u.now()-f}}var h=[],m=[],y=1,g=null,b=3,S=!1,E=!1,x=!1,C=!1,O=typeof setTimeout=="function"?setTimeout:null,L=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;function j(P){for(var Y=r(m);Y!==null;){if(Y.callback===null)s(m);else if(Y.startTime<=P)s(m),Y.sortIndex=Y.expirationTime,t(h,Y);else break;Y=r(m)}}function I(P){if(x=!1,j(P),!E)if(r(h)!==null)E=!0,H||(H=!0,ie());else{var Y=r(m);Y!==null&&ve(I,Y.startTime-P)}}var H=!1,$=-1,D=5,W=-1;function ne(){return C?!0:!(e.unstable_now()-W<D)}function oe(){if(C=!1,H){var P=e.unstable_now();W=P;var Y=!0;try{e:{E=!1,x&&(x=!1,L($),$=-1),S=!0;var V=b;try{t:{for(j(P),g=r(h);g!==null&&!(g.expirationTime>P&&ne());){var te=g.callback;if(typeof te=="function"){g.callback=null,b=g.priorityLevel;var be=te(g.expirationTime<=P);if(P=e.unstable_now(),typeof be=="function"){g.callback=be,j(P),Y=!0;break t}g===r(h)&&s(h),j(P)}else s(h);g=r(h)}if(g!==null)Y=!0;else{var N=r(m);N!==null&&ve(I,N.startTime-P),Y=!1}}break e}finally{g=null,b=V,S=!1}Y=void 0}}finally{Y?ie():H=!1}}}var ie;if(typeof k=="function")ie=function(){k(oe)};else if(typeof MessageChannel<"u"){var de=new MessageChannel,ue=de.port2;de.port1.onmessage=oe,ie=function(){ue.postMessage(null)}}else ie=function(){O(oe,0)};function ve(P,Y){$=O(function(){P(e.unstable_now())},Y)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(P){P.callback=null},e.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<P?Math.floor(1e3/P):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_next=function(P){switch(b){case 1:case 2:case 3:var Y=3;break;default:Y=b}var V=b;b=Y;try{return P()}finally{b=V}},e.unstable_requestPaint=function(){C=!0},e.unstable_runWithPriority=function(P,Y){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var V=b;b=P;try{return Y()}finally{b=V}},e.unstable_scheduleCallback=function(P,Y,V){var te=e.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0<V?te+V:te):V=te,P){case 1:var be=-1;break;case 2:be=250;break;case 5:be=1073741823;break;case 4:be=1e4;break;default:be=5e3}return be=V+be,P={id:y++,callback:Y,priorityLevel:P,startTime:V,expirationTime:be,sortIndex:-1},V>te?(P.sortIndex=V,t(m,P),r(h)===null&&P===r(m)&&(x?(L($),$=-1):x=!0,ve(I,V-te))):(P.sortIndex=be,t(h,P),E||S||(E=!0,H||(H=!0,ie()))),P},e.unstable_shouldYield=ne,e.unstable_wrapCallback=function(P){var Y=b;return function(){var V=b;b=Y;try{return P.apply(this,arguments)}finally{b=V}}}})(ph)),ph}var Ub;function o2(){return Ub||(Ub=1,hh.exports=r2()),hh.exports}var mh={exports:{}},Mt={};var $b;function s2(){if($b)return Mt;$b=1;var e=Ya();function t(h){var m="https://react.dev/errors/"+h;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)m+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+h+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var s={d:{f:r,r:function(){throw Error(t(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for("react.portal");function l(h,m,y){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:g==null?null:""+g,children:h,containerInfo:m,implementation:y}}var u=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(h,m){if(h==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return Mt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,Mt.createPortal=function(h,m){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(t(299));return l(h,m,null,y)},Mt.flushSync=function(h){var m=u.T,y=s.p;try{if(u.T=null,s.p=2,h)return h()}finally{u.T=m,s.p=y,s.d.f()}},Mt.preconnect=function(h,m){typeof h=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,s.d.C(h,m))},Mt.prefetchDNS=function(h){typeof h=="string"&&s.d.D(h)},Mt.preinit=function(h,m){if(typeof h=="string"&&m&&typeof m.as=="string"){var y=m.as,g=f(y,m.crossOrigin),b=typeof m.integrity=="string"?m.integrity:void 0,S=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;y==="style"?s.d.S(h,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:g,integrity:b,fetchPriority:S}):y==="script"&&s.d.X(h,{crossOrigin:g,integrity:b,fetchPriority:S,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},Mt.preinitModule=function(h,m){if(typeof h=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var y=f(m.as,m.crossOrigin);s.d.M(h,{crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&s.d.M(h)},Mt.preload=function(h,m){if(typeof h=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var y=m.as,g=f(y,m.crossOrigin);s.d.L(h,y,{crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},Mt.preloadModule=function(h,m){if(typeof h=="string")if(m){var y=f(m.as,m.crossOrigin);s.d.m(h,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else s.d.m(h)},Mt.requestFormReset=function(h){s.d.r(h)},Mt.unstable_batchedUpdates=function(h,m){return h(m)},Mt.useFormState=function(h,m,y){return u.H.useFormState(h,m,y)},Mt.useFormStatus=function(){return u.H.useHostTransitionStatus()},Mt.version="19.2.3",Mt}var Ib;function ow(){if(Ib)return mh.exports;Ib=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),mh.exports=s2(),mh.exports}var Bb;function i2(){if(Bb)return wa;Bb=1;var e=o2(),t=Ya(),r=ow();function s(n){var o="https://react.dev/errors/"+n;if(1<arguments.length){o+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)o+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+n+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function l(n){var o=n,i=n;if(n.alternate)for(;o.return;)o=o.return;else{n=o;do o=n,(o.flags&4098)!==0&&(i=o.return),n=o.return;while(n)}return o.tag===3?i:null}function u(n){if(n.tag===13){var o=n.memoizedState;if(o===null&&(n=n.alternate,n!==null&&(o=n.memoizedState)),o!==null)return o.dehydrated}return null}function f(n){if(n.tag===31){var o=n.memoizedState;if(o===null&&(n=n.alternate,n!==null&&(o=n.memoizedState)),o!==null)return o.dehydrated}return null}function h(n){if(l(n)!==n)throw Error(s(188))}function m(n){var o=n.alternate;if(!o){if(o=l(n),o===null)throw Error(s(188));return o!==n?null:n}for(var i=n,c=o;;){var d=i.return;if(d===null)break;var p=d.alternate;if(p===null){if(c=d.return,c!==null){i=c;continue}break}if(d.child===p.child){for(p=d.child;p;){if(p===i)return h(d),n;if(p===c)return h(d),o;p=p.sibling}throw Error(s(188))}if(i.return!==c.return)i=d,c=p;else{for(var v=!1,R=d.child;R;){if(R===i){v=!0,i=d,c=p;break}if(R===c){v=!0,c=d,i=p;break}R=R.sibling}if(!v){for(R=p.child;R;){if(R===i){v=!0,i=p,c=d;break}if(R===c){v=!0,c=p,i=d;break}R=R.sibling}if(!v)throw Error(s(189))}}if(i.alternate!==c)throw Error(s(190))}if(i.tag!==3)throw Error(s(188));return i.stateNode.current===i?n:o}function y(n){var o=n.tag;if(o===5||o===26||o===27||o===6)return n;for(n=n.child;n!==null;){if(o=y(n),o!==null)return o;n=n.sibling}return null}var g=Object.assign,b=Symbol.for("react.element"),S=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),O=Symbol.for("react.profiler"),L=Symbol.for("react.consumer"),k=Symbol.for("react.context"),j=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),H=Symbol.for("react.suspense_list"),$=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),W=Symbol.for("react.activity"),ne=Symbol.for("react.memo_cache_sentinel"),oe=Symbol.iterator;function ie(n){return n===null||typeof n!="object"?null:(n=oe&&n[oe]||n["@@iterator"],typeof n=="function"?n:null)}var de=Symbol.for("react.client.reference");function ue(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===de?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case x:return"Fragment";case O:return"Profiler";case C:return"StrictMode";case I:return"Suspense";case H:return"SuspenseList";case W:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case E:return"Portal";case k:return n.displayName||"Context";case L:return(n._context.displayName||"Context")+".Consumer";case j:var o=n.render;return n=n.displayName,n||(n=o.displayName||o.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case $:return o=n.displayName||null,o!==null?o:ue(n.type)||"Memo";case D:o=n._payload,n=n._init;try{return ue(n(o))}catch{}}return null}var ve=Array.isArray,P=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V={pending:!1,data:null,method:null,action:null},te=[],be=-1;function N(n){return{current:n}}function G(n){0>be||(n.current=te[be],te[be]=null,be--)}function ee(n,o){be++,te[be]=n.current,n.current=o}var re=N(null),he=N(null),ge=N(null),se=N(null);function Pe(n,o){switch(ee(ge,o),ee(he,n),ee(re,null),o.nodeType){case 9:case 11:n=(n=o.documentElement)&&(n=n.namespaceURI)?nb(n):0;break;default:if(n=o.tagName,o=o.namespaceURI)o=nb(o),n=rb(o,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}G(re),ee(re,n)}function Ne(){G(re),G(he),G(ge)}function pt(n){n.memoizedState!==null&&ee(se,n);var o=re.current,i=rb(o,n.type);o!==i&&(ee(he,n),ee(re,i))}function Pt(n){he.current===n&&(G(re),G(he)),se.current===n&&(G(se),ga._currentValue=V)}var Ut,Nt;function tr(n){if(Ut===void 0)try{throw Error()}catch(i){var o=i.stack.trim().match(/\n( *(at )?)/);Ut=o&&o[1]||"",Nt=-1<i.stack.indexOf(`
|
|
3
|
-
at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
4
|
-
`+Ut+n+Nt}var Ri=!1;function as(n,o){if(!n||Ri)return"";Ri=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(o){var J=function(){throw Error()};if(Object.defineProperty(J.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(J,[])}catch(Z){var F=Z}Reflect.construct(n,[],J)}else{try{J.call()}catch(Z){F=Z}n.call(J.prototype)}}else{try{throw Error()}catch(Z){F=Z}(J=n())&&typeof J.catch=="function"&&J.catch(function(){})}}catch(Z){if(Z&&F&&typeof Z.stack=="string")return[Z.stack,F.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var d=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");d&&d.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var p=c.DetermineComponentFrameRoot(),v=p[0],R=p[1];if(v&&R){var M=v.split(`
|
|
5
|
-
`),q=R.split(`
|
|
6
|
-
`);for(d=c=0;c<M.length&&!M[c].includes("DetermineComponentFrameRoot");)c++;for(;d<q.length&&!q[d].includes("DetermineComponentFrameRoot");)d++;if(c===M.length||d===q.length)for(c=M.length-1,d=q.length-1;1<=c&&0<=d&&M[c]!==q[d];)d--;for(;1<=c&&0<=d;c--,d--)if(M[c]!==q[d]){if(c!==1||d!==1)do if(c--,d--,0>d||M[c]!==q[d]){var Q=`
|
|
7
|
-
`+M[c].replace(" at new "," at ");return n.displayName&&Q.includes("<anonymous>")&&(Q=Q.replace("<anonymous>",n.displayName)),Q}while(1<=c&&0<=d);break}}}finally{Ri=!1,Error.prepareStackTrace=i}return(i=n?n.displayName||n.name:"")?tr(i):""}function Ku(n,o){switch(n.tag){case 26:case 27:case 5:return tr(n.type);case 16:return tr("Lazy");case 13:return n.child!==o&&o!==null?tr("Suspense Fallback"):tr("Suspense");case 19:return tr("SuspenseList");case 0:case 15:return as(n.type,!1);case 11:return as(n.type.render,!1);case 1:return as(n.type,!0);case 31:return tr("Activity");default:return""}}function nc(n){try{var o="",i=null;do o+=Ku(n,i),i=n,n=n.return;while(n);return o}catch(c){return`
|
|
8
|
-
Error generating stack: `+c.message+`
|
|
9
|
-
`+c.stack}}var Ci=Object.prototype.hasOwnProperty,Or=e.unstable_scheduleCallback,Mr=e.unstable_cancelCallback,rc=e.unstable_shouldYield,oc=e.unstable_requestPaint,xe=e.unstable_now,mt=e.unstable_getCurrentPriorityLevel,$t=e.unstable_ImmediatePriority,Ti=e.unstable_UserBlockingPriority,sc=e.unstable_NormalPriority,jE=e.unstable_LowPriority,Dm=e.unstable_IdlePriority,LE=e.log,DE=e.unstable_setDisableYieldValue,Ai=null,Jt=null;function kr(n){if(typeof LE=="function"&&DE(n),Jt&&typeof Jt.setStrictMode=="function")try{Jt.setStrictMode(Ai,n)}catch{}}var Wt=Math.clz32?Math.clz32:$E,PE=Math.log,UE=Math.LN2;function $E(n){return n>>>=0,n===0?32:31-(PE(n)/UE|0)|0}var ic=256,ac=262144,cc=4194304;function Eo(n){var o=n&42;if(o!==0)return o;switch(n&-n){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function lc(n,o,i){var c=n.pendingLanes;if(c===0)return 0;var d=0,p=n.suspendedLanes,v=n.pingedLanes;n=n.warmLanes;var R=c&134217727;return R!==0?(c=R&~p,c!==0?d=Eo(c):(v&=R,v!==0?d=Eo(v):i||(i=R&~n,i!==0&&(d=Eo(i))))):(R=c&~p,R!==0?d=Eo(R):v!==0?d=Eo(v):i||(i=c&~n,i!==0&&(d=Eo(i)))),d===0?0:o!==0&&o!==d&&(o&p)===0&&(p=d&-d,i=o&-o,p>=i||p===32&&(i&4194048)!==0)?o:d}function Oi(n,o){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&o)===0}function IE(n,o){switch(n){case 1:case 2:case 4:case 8:case 64:return o+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return o+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Pm(){var n=cc;return cc<<=1,(cc&62914560)===0&&(cc=4194304),n}function Xu(n){for(var o=[],i=0;31>i;i++)o.push(n);return o}function Mi(n,o){n.pendingLanes|=o,o!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function BE(n,o,i,c,d,p){var v=n.pendingLanes;n.pendingLanes=i,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=i,n.entangledLanes&=i,n.errorRecoveryDisabledLanes&=i,n.shellSuspendCounter=0;var R=n.entanglements,M=n.expirationTimes,q=n.hiddenUpdates;for(i=v&~i;0<i;){var Q=31-Wt(i),J=1<<Q;R[Q]=0,M[Q]=-1;var F=q[Q];if(F!==null)for(q[Q]=null,Q=0;Q<F.length;Q++){var Z=F[Q];Z!==null&&(Z.lane&=-536870913)}i&=~J}c!==0&&Um(n,c,0),p!==0&&d===0&&n.tag!==0&&(n.suspendedLanes|=p&~(v&~o))}function Um(n,o,i){n.pendingLanes|=o,n.suspendedLanes&=~o;var c=31-Wt(o);n.entangledLanes|=o,n.entanglements[c]=n.entanglements[c]|1073741824|i&261930}function $m(n,o){var i=n.entangledLanes|=o;for(n=n.entanglements;i;){var c=31-Wt(i),d=1<<c;d&o|n[c]&o&&(n[c]|=o),i&=~d}}function Im(n,o){var i=o&-o;return i=(i&42)!==0?1:Ju(i),(i&(n.suspendedLanes|o))!==0?0:i}function Ju(n){switch(n){case 2:n=1;break;case 8:n=4;break;case 32:n=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:n=128;break;case 268435456:n=134217728;break;default:n=0}return n}function Wu(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function Bm(){var n=Y.p;return n!==0?n:(n=window.event,n===void 0?32:Cb(n.type))}function qm(n,o){var i=Y.p;try{return Y.p=n,o()}finally{Y.p=i}}var Nr=Math.random().toString(36).slice(2),xt="__reactFiber$"+Nr,It="__reactProps$"+Nr,cs="__reactContainer$"+Nr,ef="__reactEvents$"+Nr,qE="__reactListeners$"+Nr,VE="__reactHandles$"+Nr,Vm="__reactResources$"+Nr,ki="__reactMarker$"+Nr;function tf(n){delete n[xt],delete n[It],delete n[ef],delete n[qE],delete n[VE]}function ls(n){var o=n[xt];if(o)return o;for(var i=n.parentNode;i;){if(o=i[cs]||i[xt]){if(i=o.alternate,o.child!==null||i!==null&&i.child!==null)for(n=ub(n);n!==null;){if(i=n[xt])return i;n=ub(n)}return o}n=i,i=n.parentNode}return null}function us(n){if(n=n[xt]||n[cs]){var o=n.tag;if(o===5||o===6||o===13||o===31||o===26||o===27||o===3)return n}return null}function Ni(n){var o=n.tag;if(o===5||o===26||o===27||o===6)return n.stateNode;throw Error(s(33))}function fs(n){var o=n[Vm];return o||(o=n[Vm]={hoistableStyles:new Map,hoistableScripts:new Map}),o}function St(n){n[ki]=!0}var Fm=new Set,Hm={};function Ro(n,o){ds(n,o),ds(n+"Capture",o)}function ds(n,o){for(Hm[n]=o,n=0;n<o.length;n++)Fm.add(o[n])}var FE=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Zm={},Qm={};function HE(n){return Ci.call(Qm,n)?!0:Ci.call(Zm,n)?!1:FE.test(n)?Qm[n]=!0:(Zm[n]=!0,!1)}function uc(n,o,i){if(HE(o))if(i===null)n.removeAttribute(o);else{switch(typeof i){case"undefined":case"function":case"symbol":n.removeAttribute(o);return;case"boolean":var c=o.toLowerCase().slice(0,5);if(c!=="data-"&&c!=="aria-"){n.removeAttribute(o);return}}n.setAttribute(o,""+i)}}function fc(n,o,i){if(i===null)n.removeAttribute(o);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(o);return}n.setAttribute(o,""+i)}}function nr(n,o,i,c){if(c===null)n.removeAttribute(i);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(i);return}n.setAttributeNS(o,i,""+c)}}function dn(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function Gm(n){var o=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function ZE(n,o,i){var c=Object.getOwnPropertyDescriptor(n.constructor.prototype,o);if(!n.hasOwnProperty(o)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var d=c.get,p=c.set;return Object.defineProperty(n,o,{configurable:!0,get:function(){return d.call(this)},set:function(v){i=""+v,p.call(this,v)}}),Object.defineProperty(n,o,{enumerable:c.enumerable}),{getValue:function(){return i},setValue:function(v){i=""+v},stopTracking:function(){n._valueTracker=null,delete n[o]}}}}function nf(n){if(!n._valueTracker){var o=Gm(n)?"checked":"value";n._valueTracker=ZE(n,o,""+n[o])}}function Ym(n){if(!n)return!1;var o=n._valueTracker;if(!o)return!0;var i=o.getValue(),c="";return n&&(c=Gm(n)?n.checked?"true":"false":n.value),n=c,n!==i?(o.setValue(n),!0):!1}function dc(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}var QE=/[\n"\\]/g;function hn(n){return n.replace(QE,function(o){return"\\"+o.charCodeAt(0).toString(16)+" "})}function rf(n,o,i,c,d,p,v,R){n.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?n.type=v:n.removeAttribute("type"),o!=null?v==="number"?(o===0&&n.value===""||n.value!=o)&&(n.value=""+dn(o)):n.value!==""+dn(o)&&(n.value=""+dn(o)):v!=="submit"&&v!=="reset"||n.removeAttribute("value"),o!=null?of(n,v,dn(o)):i!=null?of(n,v,dn(i)):c!=null&&n.removeAttribute("value"),d==null&&p!=null&&(n.defaultChecked=!!p),d!=null&&(n.checked=d&&typeof d!="function"&&typeof d!="symbol"),R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"?n.name=""+dn(R):n.removeAttribute("name")}function Km(n,o,i,c,d,p,v,R){if(p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(n.type=p),o!=null||i!=null){if(!(p!=="submit"&&p!=="reset"||o!=null)){nf(n);return}i=i!=null?""+dn(i):"",o=o!=null?""+dn(o):i,R||o===n.value||(n.value=o),n.defaultValue=o}c=c??d,c=typeof c!="function"&&typeof c!="symbol"&&!!c,n.checked=R?n.checked:!!c,n.defaultChecked=!!c,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(n.name=v),nf(n)}function of(n,o,i){o==="number"&&dc(n.ownerDocument)===n||n.defaultValue===""+i||(n.defaultValue=""+i)}function hs(n,o,i,c){if(n=n.options,o){o={};for(var d=0;d<i.length;d++)o["$"+i[d]]=!0;for(i=0;i<n.length;i++)d=o.hasOwnProperty("$"+n[i].value),n[i].selected!==d&&(n[i].selected=d),d&&c&&(n[i].defaultSelected=!0)}else{for(i=""+dn(i),o=null,d=0;d<n.length;d++){if(n[d].value===i){n[d].selected=!0,c&&(n[d].defaultSelected=!0);return}o!==null||n[d].disabled||(o=n[d])}o!==null&&(o.selected=!0)}}function Xm(n,o,i){if(o!=null&&(o=""+dn(o),o!==n.value&&(n.value=o),i==null)){n.defaultValue!==o&&(n.defaultValue=o);return}n.defaultValue=i!=null?""+dn(i):""}function Jm(n,o,i,c){if(o==null){if(c!=null){if(i!=null)throw Error(s(92));if(ve(c)){if(1<c.length)throw Error(s(93));c=c[0]}i=c}i==null&&(i=""),o=i}i=dn(o),n.defaultValue=i,c=n.textContent,c===i&&c!==""&&c!==null&&(n.value=c),nf(n)}function ps(n,o){if(o){var i=n.firstChild;if(i&&i===n.lastChild&&i.nodeType===3){i.nodeValue=o;return}}n.textContent=o}var GE=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Wm(n,o,i){var c=o.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?c?n.setProperty(o,""):o==="float"?n.cssFloat="":n[o]="":c?n.setProperty(o,i):typeof i!="number"||i===0||GE.has(o)?o==="float"?n.cssFloat=i:n[o]=(""+i).trim():n[o]=i+"px"}function eg(n,o,i){if(o!=null&&typeof o!="object")throw Error(s(62));if(n=n.style,i!=null){for(var c in i)!i.hasOwnProperty(c)||o!=null&&o.hasOwnProperty(c)||(c.indexOf("--")===0?n.setProperty(c,""):c==="float"?n.cssFloat="":n[c]="");for(var d in o)c=o[d],o.hasOwnProperty(d)&&i[d]!==c&&Wm(n,d,c)}else for(var p in o)o.hasOwnProperty(p)&&Wm(n,p,o[p])}function sf(n){if(n.indexOf("-")===-1)return!1;switch(n){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var YE=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),KE=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function hc(n){return KE.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function rr(){}var af=null;function cf(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var ms=null,gs=null;function tg(n){var o=us(n);if(o&&(n=o.stateNode)){var i=n[It]||null;e:switch(n=o.stateNode,o.type){case"input":if(rf(n,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),o=i.name,i.type==="radio"&&o!=null){for(i=n;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+hn(""+o)+'"][type="radio"]'),o=0;o<i.length;o++){var c=i[o];if(c!==n&&c.form===n.form){var d=c[It]||null;if(!d)throw Error(s(90));rf(c,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name)}}for(o=0;o<i.length;o++)c=i[o],c.form===n.form&&Ym(c)}break e;case"textarea":Xm(n,i.value,i.defaultValue);break e;case"select":o=i.value,o!=null&&hs(n,!!i.multiple,o,!1)}}}var lf=!1;function ng(n,o,i){if(lf)return n(o,i);lf=!0;try{var c=n(o);return c}finally{if(lf=!1,(ms!==null||gs!==null)&&(el(),ms&&(o=ms,n=gs,gs=ms=null,tg(o),n)))for(o=0;o<n.length;o++)tg(n[o])}}function zi(n,o){var i=n.stateNode;if(i===null)return null;var c=i[It]||null;if(c===null)return null;i=c[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(n=n.type,c=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!c;break e;default:n=!1}if(n)return null;if(i&&typeof i!="function")throw Error(s(231,o,typeof i));return i}var or=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),uf=!1;if(or)try{var ji={};Object.defineProperty(ji,"passive",{get:function(){uf=!0}}),window.addEventListener("test",ji,ji),window.removeEventListener("test",ji,ji)}catch{uf=!1}var zr=null,ff=null,pc=null;function rg(){if(pc)return pc;var n,o=ff,i=o.length,c,d="value"in zr?zr.value:zr.textContent,p=d.length;for(n=0;n<i&&o[n]===d[n];n++);var v=i-n;for(c=1;c<=v&&o[i-c]===d[p-c];c++);return pc=d.slice(n,1<c?1-c:void 0)}function mc(n){var o=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&o===13&&(n=13)):n=o,n===10&&(n=13),32<=n||n===13?n:0}function gc(){return!0}function og(){return!1}function Bt(n){function o(i,c,d,p,v){this._reactName=i,this._targetInst=d,this.type=c,this.nativeEvent=p,this.target=v,this.currentTarget=null;for(var R in n)n.hasOwnProperty(R)&&(i=n[R],this[R]=i?i(p):p[R]);return this.isDefaultPrevented=(p.defaultPrevented!=null?p.defaultPrevented:p.returnValue===!1)?gc:og,this.isPropagationStopped=og,this}return g(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=gc)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=gc)},persist:function(){},isPersistent:gc}),o}var Co={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},yc=Bt(Co),Li=g({},Co,{view:0,detail:0}),XE=Bt(Li),df,hf,Di,vc=g({},Li,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:mf,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==Di&&(Di&&n.type==="mousemove"?(df=n.screenX-Di.screenX,hf=n.screenY-Di.screenY):hf=df=0,Di=n),df)},movementY:function(n){return"movementY"in n?n.movementY:hf}}),sg=Bt(vc),JE=g({},vc,{dataTransfer:0}),WE=Bt(JE),eR=g({},Li,{relatedTarget:0}),pf=Bt(eR),tR=g({},Co,{animationName:0,elapsedTime:0,pseudoElement:0}),nR=Bt(tR),rR=g({},Co,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),oR=Bt(rR),sR=g({},Co,{data:0}),ig=Bt(sR),iR={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},aR={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},cR={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function lR(n){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(n):(n=cR[n])?!!o[n]:!1}function mf(){return lR}var uR=g({},Li,{key:function(n){if(n.key){var o=iR[n.key]||n.key;if(o!=="Unidentified")return o}return n.type==="keypress"?(n=mc(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?aR[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:mf,charCode:function(n){return n.type==="keypress"?mc(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?mc(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),fR=Bt(uR),dR=g({},vc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ag=Bt(dR),hR=g({},Li,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:mf}),pR=Bt(hR),mR=g({},Co,{propertyName:0,elapsedTime:0,pseudoElement:0}),gR=Bt(mR),yR=g({},vc,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),vR=Bt(yR),bR=g({},Co,{newState:0,oldState:0}),SR=Bt(bR),wR=[9,13,27,32],gf=or&&"CompositionEvent"in window,Pi=null;or&&"documentMode"in document&&(Pi=document.documentMode);var _R=or&&"TextEvent"in window&&!Pi,cg=or&&(!gf||Pi&&8<Pi&&11>=Pi),lg=" ",ug=!1;function fg(n,o){switch(n){case"keyup":return wR.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function dg(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var ys=!1;function xR(n,o){switch(n){case"compositionend":return dg(o);case"keypress":return o.which!==32?null:(ug=!0,lg);case"textInput":return n=o.data,n===lg&&ug?null:n;default:return null}}function ER(n,o){if(ys)return n==="compositionend"||!gf&&fg(n,o)?(n=rg(),pc=ff=zr=null,ys=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return cg&&o.locale!=="ko"?null:o.data;default:return null}}var RR={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function hg(n){var o=n&&n.nodeName&&n.nodeName.toLowerCase();return o==="input"?!!RR[n.type]:o==="textarea"}function pg(n,o,i,c){ms?gs?gs.push(c):gs=[c]:ms=c,o=al(o,"onChange"),0<o.length&&(i=new yc("onChange","change",null,i,c),n.push({event:i,listeners:o}))}var Ui=null,$i=null;function CR(n){Kv(n,0)}function bc(n){var o=Ni(n);if(Ym(o))return n}function mg(n,o){if(n==="change")return o}var gg=!1;if(or){var yf;if(or){var vf="oninput"in document;if(!vf){var yg=document.createElement("div");yg.setAttribute("oninput","return;"),vf=typeof yg.oninput=="function"}yf=vf}else yf=!1;gg=yf&&(!document.documentMode||9<document.documentMode)}function vg(){Ui&&(Ui.detachEvent("onpropertychange",bg),$i=Ui=null)}function bg(n){if(n.propertyName==="value"&&bc($i)){var o=[];pg(o,$i,n,cf(n)),ng(CR,o)}}function TR(n,o,i){n==="focusin"?(vg(),Ui=o,$i=i,Ui.attachEvent("onpropertychange",bg)):n==="focusout"&&vg()}function AR(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return bc($i)}function OR(n,o){if(n==="click")return bc(o)}function MR(n,o){if(n==="input"||n==="change")return bc(o)}function kR(n,o){return n===o&&(n!==0||1/n===1/o)||n!==n&&o!==o}var en=typeof Object.is=="function"?Object.is:kR;function Ii(n,o){if(en(n,o))return!0;if(typeof n!="object"||n===null||typeof o!="object"||o===null)return!1;var i=Object.keys(n),c=Object.keys(o);if(i.length!==c.length)return!1;for(c=0;c<i.length;c++){var d=i[c];if(!Ci.call(o,d)||!en(n[d],o[d]))return!1}return!0}function Sg(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function wg(n,o){var i=Sg(n);n=0;for(var c;i;){if(i.nodeType===3){if(c=n+i.textContent.length,n<=o&&c>=o)return{node:i,offset:o-n};n=c}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=Sg(i)}}function _g(n,o){return n&&o?n===o?!0:n&&n.nodeType===3?!1:o&&o.nodeType===3?_g(n,o.parentNode):"contains"in n?n.contains(o):n.compareDocumentPosition?!!(n.compareDocumentPosition(o)&16):!1:!1}function xg(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var o=dc(n.document);o instanceof n.HTMLIFrameElement;){try{var i=typeof o.contentWindow.location.href=="string"}catch{i=!1}if(i)n=o.contentWindow;else break;o=dc(n.document)}return o}function bf(n){var o=n&&n.nodeName&&n.nodeName.toLowerCase();return o&&(o==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||o==="textarea"||n.contentEditable==="true")}var NR=or&&"documentMode"in document&&11>=document.documentMode,vs=null,Sf=null,Bi=null,wf=!1;function Eg(n,o,i){var c=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;wf||vs==null||vs!==dc(c)||(c=vs,"selectionStart"in c&&bf(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),Bi&&Ii(Bi,c)||(Bi=c,c=al(Sf,"onSelect"),0<c.length&&(o=new yc("onSelect","select",null,o,i),n.push({event:o,listeners:c}),o.target=vs)))}function To(n,o){var i={};return i[n.toLowerCase()]=o.toLowerCase(),i["Webkit"+n]="webkit"+o,i["Moz"+n]="moz"+o,i}var bs={animationend:To("Animation","AnimationEnd"),animationiteration:To("Animation","AnimationIteration"),animationstart:To("Animation","AnimationStart"),transitionrun:To("Transition","TransitionRun"),transitionstart:To("Transition","TransitionStart"),transitioncancel:To("Transition","TransitionCancel"),transitionend:To("Transition","TransitionEnd")},_f={},Rg={};or&&(Rg=document.createElement("div").style,"AnimationEvent"in window||(delete bs.animationend.animation,delete bs.animationiteration.animation,delete bs.animationstart.animation),"TransitionEvent"in window||delete bs.transitionend.transition);function Ao(n){if(_f[n])return _f[n];if(!bs[n])return n;var o=bs[n],i;for(i in o)if(o.hasOwnProperty(i)&&i in Rg)return _f[n]=o[i];return n}var Cg=Ao("animationend"),Tg=Ao("animationiteration"),Ag=Ao("animationstart"),zR=Ao("transitionrun"),jR=Ao("transitionstart"),LR=Ao("transitioncancel"),Og=Ao("transitionend"),Mg=new Map,xf="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");xf.push("scrollEnd");function Mn(n,o){Mg.set(n,o),Ro(o,[n])}var Sc=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var o=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n=="object"&&n!==null&&typeof n.message=="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(o))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},pn=[],Ss=0,Ef=0;function wc(){for(var n=Ss,o=Ef=Ss=0;o<n;){var i=pn[o];pn[o++]=null;var c=pn[o];pn[o++]=null;var d=pn[o];pn[o++]=null;var p=pn[o];if(pn[o++]=null,c!==null&&d!==null){var v=c.pending;v===null?d.next=d:(d.next=v.next,v.next=d),c.pending=d}p!==0&&kg(i,d,p)}}function _c(n,o,i,c){pn[Ss++]=n,pn[Ss++]=o,pn[Ss++]=i,pn[Ss++]=c,Ef|=c,n.lanes|=c,n=n.alternate,n!==null&&(n.lanes|=c)}function Rf(n,o,i,c){return _c(n,o,i,c),xc(n)}function Oo(n,o){return _c(n,null,null,o),xc(n)}function kg(n,o,i){n.lanes|=i;var c=n.alternate;c!==null&&(c.lanes|=i);for(var d=!1,p=n.return;p!==null;)p.childLanes|=i,c=p.alternate,c!==null&&(c.childLanes|=i),p.tag===22&&(n=p.stateNode,n===null||n._visibility&1||(d=!0)),n=p,p=p.return;return n.tag===3?(p=n.stateNode,d&&o!==null&&(d=31-Wt(i),n=p.hiddenUpdates,c=n[d],c===null?n[d]=[o]:c.push(o),o.lane=i|536870912),p):null}function xc(n){if(50<la)throw la=0,jd=null,Error(s(185));for(var o=n.return;o!==null;)n=o,o=n.return;return n.tag===3?n.stateNode:null}var ws={};function DR(n,o,i,c){this.tag=n,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function tn(n,o,i,c){return new DR(n,o,i,c)}function Cf(n){return n=n.prototype,!(!n||!n.isReactComponent)}function sr(n,o){var i=n.alternate;return i===null?(i=tn(n.tag,o,n.key,n.mode),i.elementType=n.elementType,i.type=n.type,i.stateNode=n.stateNode,i.alternate=n,n.alternate=i):(i.pendingProps=o,i.type=n.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=n.flags&65011712,i.childLanes=n.childLanes,i.lanes=n.lanes,i.child=n.child,i.memoizedProps=n.memoizedProps,i.memoizedState=n.memoizedState,i.updateQueue=n.updateQueue,o=n.dependencies,i.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},i.sibling=n.sibling,i.index=n.index,i.ref=n.ref,i.refCleanup=n.refCleanup,i}function Ng(n,o){n.flags&=65011714;var i=n.alternate;return i===null?(n.childLanes=0,n.lanes=o,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=i.childLanes,n.lanes=i.lanes,n.child=i.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=i.memoizedProps,n.memoizedState=i.memoizedState,n.updateQueue=i.updateQueue,n.type=i.type,o=i.dependencies,n.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext}),n}function Ec(n,o,i,c,d,p){var v=0;if(c=n,typeof n=="function")Cf(n)&&(v=1);else if(typeof n=="string")v=BC(n,i,re.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case W:return n=tn(31,i,o,d),n.elementType=W,n.lanes=p,n;case x:return Mo(i.children,d,p,o);case C:v=8,d|=24;break;case O:return n=tn(12,i,o,d|2),n.elementType=O,n.lanes=p,n;case I:return n=tn(13,i,o,d),n.elementType=I,n.lanes=p,n;case H:return n=tn(19,i,o,d),n.elementType=H,n.lanes=p,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case k:v=10;break e;case L:v=9;break e;case j:v=11;break e;case $:v=14;break e;case D:v=16,c=null;break e}v=29,i=Error(s(130,n===null?"null":typeof n,"")),c=null}return o=tn(v,i,o,d),o.elementType=n,o.type=c,o.lanes=p,o}function Mo(n,o,i,c){return n=tn(7,n,c,o),n.lanes=i,n}function Tf(n,o,i){return n=tn(6,n,null,o),n.lanes=i,n}function zg(n){var o=tn(18,null,null,0);return o.stateNode=n,o}function Af(n,o,i){return o=tn(4,n.children!==null?n.children:[],n.key,o),o.lanes=i,o.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},o}var jg=new WeakMap;function mn(n,o){if(typeof n=="object"&&n!==null){var i=jg.get(n);return i!==void 0?i:(o={value:n,source:o,stack:nc(o)},jg.set(n,o),o)}return{value:n,source:o,stack:nc(o)}}var _s=[],xs=0,Rc=null,qi=0,gn=[],yn=0,jr=null,Pn=1,Un="";function ir(n,o){_s[xs++]=qi,_s[xs++]=Rc,Rc=n,qi=o}function Lg(n,o,i){gn[yn++]=Pn,gn[yn++]=Un,gn[yn++]=jr,jr=n;var c=Pn;n=Un;var d=32-Wt(c)-1;c&=~(1<<d),i+=1;var p=32-Wt(o)+d;if(30<p){var v=d-d%5;p=(c&(1<<v)-1).toString(32),c>>=v,d-=v,Pn=1<<32-Wt(o)+d|i<<d|c,Un=p+n}else Pn=1<<p|i<<d|c,Un=n}function Of(n){n.return!==null&&(ir(n,1),Lg(n,1,0))}function Mf(n){for(;n===Rc;)Rc=_s[--xs],_s[xs]=null,qi=_s[--xs],_s[xs]=null;for(;n===jr;)jr=gn[--yn],gn[yn]=null,Un=gn[--yn],gn[yn]=null,Pn=gn[--yn],gn[yn]=null}function Dg(n,o){gn[yn++]=Pn,gn[yn++]=Un,gn[yn++]=jr,Pn=o.id,Un=o.overflow,jr=n}var Et=null,Qe=null,ke=!1,Lr=null,vn=!1,kf=Error(s(519));function Dr(n){var o=Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Vi(mn(o,n)),kf}function Pg(n){var o=n.stateNode,i=n.type,c=n.memoizedProps;switch(o[xt]=n,o[It]=c,i){case"dialog":Ae("cancel",o),Ae("close",o);break;case"iframe":case"object":case"embed":Ae("load",o);break;case"video":case"audio":for(i=0;i<fa.length;i++)Ae(fa[i],o);break;case"source":Ae("error",o);break;case"img":case"image":case"link":Ae("error",o),Ae("load",o);break;case"details":Ae("toggle",o);break;case"input":Ae("invalid",o),Km(o,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0);break;case"select":Ae("invalid",o);break;case"textarea":Ae("invalid",o),Jm(o,c.value,c.defaultValue,c.children)}i=c.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||o.textContent===""+i||c.suppressHydrationWarning===!0||eb(o.textContent,i)?(c.popover!=null&&(Ae("beforetoggle",o),Ae("toggle",o)),c.onScroll!=null&&Ae("scroll",o),c.onScrollEnd!=null&&Ae("scrollend",o),c.onClick!=null&&(o.onclick=rr),o=!0):o=!1,o||Dr(n,!0)}function Ug(n){for(Et=n.return;Et;)switch(Et.tag){case 5:case 31:case 13:vn=!1;return;case 27:case 3:vn=!0;return;default:Et=Et.return}}function Es(n){if(n!==Et)return!1;if(!ke)return Ug(n),ke=!0,!1;var o=n.tag,i;if((i=o!==3&&o!==27)&&((i=o===5)&&(i=n.type,i=!(i!=="form"&&i!=="button")||Yd(n.type,n.memoizedProps)),i=!i),i&&Qe&&Dr(n),Ug(n),o===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(s(317));Qe=lb(n)}else if(o===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(s(317));Qe=lb(n)}else o===27?(o=Qe,Kr(n.type)?(n=eh,eh=null,Qe=n):Qe=o):Qe=Et?Sn(n.stateNode.nextSibling):null;return!0}function ko(){Qe=Et=null,ke=!1}function Nf(){var n=Lr;return n!==null&&(Ht===null?Ht=n:Ht.push.apply(Ht,n),Lr=null),n}function Vi(n){Lr===null?Lr=[n]:Lr.push(n)}var zf=N(null),No=null,ar=null;function Pr(n,o,i){ee(zf,o._currentValue),o._currentValue=i}function cr(n){n._currentValue=zf.current,G(zf)}function jf(n,o,i){for(;n!==null;){var c=n.alternate;if((n.childLanes&o)!==o?(n.childLanes|=o,c!==null&&(c.childLanes|=o)):c!==null&&(c.childLanes&o)!==o&&(c.childLanes|=o),n===i)break;n=n.return}}function Lf(n,o,i,c){var d=n.child;for(d!==null&&(d.return=n);d!==null;){var p=d.dependencies;if(p!==null){var v=d.child;p=p.firstContext;e:for(;p!==null;){var R=p;p=d;for(var M=0;M<o.length;M++)if(R.context===o[M]){p.lanes|=i,R=p.alternate,R!==null&&(R.lanes|=i),jf(p.return,i,n),c||(v=null);break e}p=R.next}}else if(d.tag===18){if(v=d.return,v===null)throw Error(s(341));v.lanes|=i,p=v.alternate,p!==null&&(p.lanes|=i),jf(v,i,n),v=null}else v=d.child;if(v!==null)v.return=d;else for(v=d;v!==null;){if(v===n){v=null;break}if(d=v.sibling,d!==null){d.return=v.return,v=d;break}v=v.return}d=v}}function Rs(n,o,i,c){n=null;for(var d=o,p=!1;d!==null;){if(!p){if((d.flags&524288)!==0)p=!0;else if((d.flags&262144)!==0)break}if(d.tag===10){var v=d.alternate;if(v===null)throw Error(s(387));if(v=v.memoizedProps,v!==null){var R=d.type;en(d.pendingProps.value,v.value)||(n!==null?n.push(R):n=[R])}}else if(d===se.current){if(v=d.alternate,v===null)throw Error(s(387));v.memoizedState.memoizedState!==d.memoizedState.memoizedState&&(n!==null?n.push(ga):n=[ga])}d=d.return}n!==null&&Lf(o,n,i,c),o.flags|=262144}function Cc(n){for(n=n.firstContext;n!==null;){if(!en(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function zo(n){No=n,ar=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function Rt(n){return $g(No,n)}function Tc(n,o){return No===null&&zo(n),$g(n,o)}function $g(n,o){var i=o._currentValue;if(o={context:o,memoizedValue:i,next:null},ar===null){if(n===null)throw Error(s(308));ar=o,n.dependencies={lanes:0,firstContext:o},n.flags|=524288}else ar=ar.next=o;return i}var PR=typeof AbortController<"u"?AbortController:function(){var n=[],o=this.signal={aborted:!1,addEventListener:function(i,c){n.push(c)}};this.abort=function(){o.aborted=!0,n.forEach(function(i){return i()})}},UR=e.unstable_scheduleCallback,$R=e.unstable_NormalPriority,it={$$typeof:k,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Df(){return{controller:new PR,data:new Map,refCount:0}}function Fi(n){n.refCount--,n.refCount===0&&UR($R,function(){n.controller.abort()})}var Hi=null,Pf=0,Cs=0,Ts=null;function IR(n,o){if(Hi===null){var i=Hi=[];Pf=0,Cs=Id(),Ts={status:"pending",value:void 0,then:function(c){i.push(c)}}}return Pf++,o.then(Ig,Ig),o}function Ig(){if(--Pf===0&&Hi!==null){Ts!==null&&(Ts.status="fulfilled");var n=Hi;Hi=null,Cs=0,Ts=null;for(var o=0;o<n.length;o++)(0,n[o])()}}function BR(n,o){var i=[],c={status:"pending",value:null,reason:null,then:function(d){i.push(d)}};return n.then(function(){c.status="fulfilled",c.value=o;for(var d=0;d<i.length;d++)(0,i[d])(o)},function(d){for(c.status="rejected",c.reason=d,d=0;d<i.length;d++)(0,i[d])(void 0)}),c}var Bg=P.S;P.S=function(n,o){Ev=xe(),typeof o=="object"&&o!==null&&typeof o.then=="function"&&IR(n,o),Bg!==null&&Bg(n,o)};var jo=N(null);function Uf(){var n=jo.current;return n!==null?n:Fe.pooledCache}function Ac(n,o){o===null?ee(jo,jo.current):ee(jo,o.pool)}function qg(){var n=Uf();return n===null?null:{parent:it._currentValue,pool:n}}var As=Error(s(460)),$f=Error(s(474)),Oc=Error(s(542)),Mc={then:function(){}};function Vg(n){return n=n.status,n==="fulfilled"||n==="rejected"}function Fg(n,o,i){switch(i=n[i],i===void 0?n.push(o):i!==o&&(o.then(rr,rr),o=i),o.status){case"fulfilled":return o.value;case"rejected":throw n=o.reason,Zg(n),n;default:if(typeof o.status=="string")o.then(rr,rr);else{if(n=Fe,n!==null&&100<n.shellSuspendCounter)throw Error(s(482));n=o,n.status="pending",n.then(function(c){if(o.status==="pending"){var d=o;d.status="fulfilled",d.value=c}},function(c){if(o.status==="pending"){var d=o;d.status="rejected",d.reason=c}})}switch(o.status){case"fulfilled":return o.value;case"rejected":throw n=o.reason,Zg(n),n}throw Do=o,As}}function Lo(n){try{var o=n._init;return o(n._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(Do=i,As):i}}var Do=null;function Hg(){if(Do===null)throw Error(s(459));var n=Do;return Do=null,n}function Zg(n){if(n===As||n===Oc)throw Error(s(483))}var Os=null,Zi=0;function kc(n){var o=Zi;return Zi+=1,Os===null&&(Os=[]),Fg(Os,n,o)}function Qi(n,o){o=o.props.ref,n.ref=o!==void 0?o:null}function Nc(n,o){throw o.$$typeof===b?Error(s(525)):(n=Object.prototype.toString.call(o),Error(s(31,n==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":n)))}function Qg(n){function o(U,z){if(n){var B=U.deletions;B===null?(U.deletions=[z],U.flags|=16):B.push(z)}}function i(U,z){if(!n)return null;for(;z!==null;)o(U,z),z=z.sibling;return null}function c(U){for(var z=new Map;U!==null;)U.key!==null?z.set(U.key,U):z.set(U.index,U),U=U.sibling;return z}function d(U,z){return U=sr(U,z),U.index=0,U.sibling=null,U}function p(U,z,B){return U.index=B,n?(B=U.alternate,B!==null?(B=B.index,B<z?(U.flags|=67108866,z):B):(U.flags|=67108866,z)):(U.flags|=1048576,z)}function v(U){return n&&U.alternate===null&&(U.flags|=67108866),U}function R(U,z,B,K){return z===null||z.tag!==6?(z=Tf(B,U.mode,K),z.return=U,z):(z=d(z,B),z.return=U,z)}function M(U,z,B,K){var pe=B.type;return pe===x?Q(U,z,B.props.children,K,B.key):z!==null&&(z.elementType===pe||typeof pe=="object"&&pe!==null&&pe.$$typeof===D&&Lo(pe)===z.type)?(z=d(z,B.props),Qi(z,B),z.return=U,z):(z=Ec(B.type,B.key,B.props,null,U.mode,K),Qi(z,B),z.return=U,z)}function q(U,z,B,K){return z===null||z.tag!==4||z.stateNode.containerInfo!==B.containerInfo||z.stateNode.implementation!==B.implementation?(z=Af(B,U.mode,K),z.return=U,z):(z=d(z,B.children||[]),z.return=U,z)}function Q(U,z,B,K,pe){return z===null||z.tag!==7?(z=Mo(B,U.mode,K,pe),z.return=U,z):(z=d(z,B),z.return=U,z)}function J(U,z,B){if(typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint")return z=Tf(""+z,U.mode,B),z.return=U,z;if(typeof z=="object"&&z!==null){switch(z.$$typeof){case S:return B=Ec(z.type,z.key,z.props,null,U.mode,B),Qi(B,z),B.return=U,B;case E:return z=Af(z,U.mode,B),z.return=U,z;case D:return z=Lo(z),J(U,z,B)}if(ve(z)||ie(z))return z=Mo(z,U.mode,B,null),z.return=U,z;if(typeof z.then=="function")return J(U,kc(z),B);if(z.$$typeof===k)return J(U,Tc(U,z),B);Nc(U,z)}return null}function F(U,z,B,K){var pe=z!==null?z.key:null;if(typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint")return pe!==null?null:R(U,z,""+B,K);if(typeof B=="object"&&B!==null){switch(B.$$typeof){case S:return B.key===pe?M(U,z,B,K):null;case E:return B.key===pe?q(U,z,B,K):null;case D:return B=Lo(B),F(U,z,B,K)}if(ve(B)||ie(B))return pe!==null?null:Q(U,z,B,K,null);if(typeof B.then=="function")return F(U,z,kc(B),K);if(B.$$typeof===k)return F(U,z,Tc(U,B),K);Nc(U,B)}return null}function Z(U,z,B,K,pe){if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return U=U.get(B)||null,R(z,U,""+K,pe);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case S:return U=U.get(K.key===null?B:K.key)||null,M(z,U,K,pe);case E:return U=U.get(K.key===null?B:K.key)||null,q(z,U,K,pe);case D:return K=Lo(K),Z(U,z,B,K,pe)}if(ve(K)||ie(K))return U=U.get(B)||null,Q(z,U,K,pe,null);if(typeof K.then=="function")return Z(U,z,B,kc(K),pe);if(K.$$typeof===k)return Z(U,z,B,Tc(z,K),pe);Nc(z,K)}return null}function ae(U,z,B,K){for(var pe=null,ze=null,fe=z,Ee=z=0,Me=null;fe!==null&&Ee<B.length;Ee++){fe.index>Ee?(Me=fe,fe=null):Me=fe.sibling;var je=F(U,fe,B[Ee],K);if(je===null){fe===null&&(fe=Me);break}n&&fe&&je.alternate===null&&o(U,fe),z=p(je,z,Ee),ze===null?pe=je:ze.sibling=je,ze=je,fe=Me}if(Ee===B.length)return i(U,fe),ke&&ir(U,Ee),pe;if(fe===null){for(;Ee<B.length;Ee++)fe=J(U,B[Ee],K),fe!==null&&(z=p(fe,z,Ee),ze===null?pe=fe:ze.sibling=fe,ze=fe);return ke&&ir(U,Ee),pe}for(fe=c(fe);Ee<B.length;Ee++)Me=Z(fe,U,Ee,B[Ee],K),Me!==null&&(n&&Me.alternate!==null&&fe.delete(Me.key===null?Ee:Me.key),z=p(Me,z,Ee),ze===null?pe=Me:ze.sibling=Me,ze=Me);return n&&fe.forEach(function(to){return o(U,to)}),ke&&ir(U,Ee),pe}function ye(U,z,B,K){if(B==null)throw Error(s(151));for(var pe=null,ze=null,fe=z,Ee=z=0,Me=null,je=B.next();fe!==null&&!je.done;Ee++,je=B.next()){fe.index>Ee?(Me=fe,fe=null):Me=fe.sibling;var to=F(U,fe,je.value,K);if(to===null){fe===null&&(fe=Me);break}n&&fe&&to.alternate===null&&o(U,fe),z=p(to,z,Ee),ze===null?pe=to:ze.sibling=to,ze=to,fe=Me}if(je.done)return i(U,fe),ke&&ir(U,Ee),pe;if(fe===null){for(;!je.done;Ee++,je=B.next())je=J(U,je.value,K),je!==null&&(z=p(je,z,Ee),ze===null?pe=je:ze.sibling=je,ze=je);return ke&&ir(U,Ee),pe}for(fe=c(fe);!je.done;Ee++,je=B.next())je=Z(fe,U,Ee,je.value,K),je!==null&&(n&&je.alternate!==null&&fe.delete(je.key===null?Ee:je.key),z=p(je,z,Ee),ze===null?pe=je:ze.sibling=je,ze=je);return n&&fe.forEach(function(JC){return o(U,JC)}),ke&&ir(U,Ee),pe}function Ve(U,z,B,K){if(typeof B=="object"&&B!==null&&B.type===x&&B.key===null&&(B=B.props.children),typeof B=="object"&&B!==null){switch(B.$$typeof){case S:e:{for(var pe=B.key;z!==null;){if(z.key===pe){if(pe=B.type,pe===x){if(z.tag===7){i(U,z.sibling),K=d(z,B.props.children),K.return=U,U=K;break e}}else if(z.elementType===pe||typeof pe=="object"&&pe!==null&&pe.$$typeof===D&&Lo(pe)===z.type){i(U,z.sibling),K=d(z,B.props),Qi(K,B),K.return=U,U=K;break e}i(U,z);break}else o(U,z);z=z.sibling}B.type===x?(K=Mo(B.props.children,U.mode,K,B.key),K.return=U,U=K):(K=Ec(B.type,B.key,B.props,null,U.mode,K),Qi(K,B),K.return=U,U=K)}return v(U);case E:e:{for(pe=B.key;z!==null;){if(z.key===pe)if(z.tag===4&&z.stateNode.containerInfo===B.containerInfo&&z.stateNode.implementation===B.implementation){i(U,z.sibling),K=d(z,B.children||[]),K.return=U,U=K;break e}else{i(U,z);break}else o(U,z);z=z.sibling}K=Af(B,U.mode,K),K.return=U,U=K}return v(U);case D:return B=Lo(B),Ve(U,z,B,K)}if(ve(B))return ae(U,z,B,K);if(ie(B)){if(pe=ie(B),typeof pe!="function")throw Error(s(150));return B=pe.call(B),ye(U,z,B,K)}if(typeof B.then=="function")return Ve(U,z,kc(B),K);if(B.$$typeof===k)return Ve(U,z,Tc(U,B),K);Nc(U,B)}return typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint"?(B=""+B,z!==null&&z.tag===6?(i(U,z.sibling),K=d(z,B),K.return=U,U=K):(i(U,z),K=Tf(B,U.mode,K),K.return=U,U=K),v(U)):i(U,z)}return function(U,z,B,K){try{Zi=0;var pe=Ve(U,z,B,K);return Os=null,pe}catch(fe){if(fe===As||fe===Oc)throw fe;var ze=tn(29,fe,null,U.mode);return ze.lanes=K,ze.return=U,ze}finally{}}}var Po=Qg(!0),Gg=Qg(!1),Ur=!1;function If(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Bf(n,o){n=n.updateQueue,o.updateQueue===n&&(o.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function $r(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function Ir(n,o,i){var c=n.updateQueue;if(c===null)return null;if(c=c.shared,(De&2)!==0){var d=c.pending;return d===null?o.next=o:(o.next=d.next,d.next=o),c.pending=o,o=xc(n),kg(n,null,i),o}return _c(n,c,o,i),xc(n)}function Gi(n,o,i){if(o=o.updateQueue,o!==null&&(o=o.shared,(i&4194048)!==0)){var c=o.lanes;c&=n.pendingLanes,i|=c,o.lanes=i,$m(n,i)}}function qf(n,o){var i=n.updateQueue,c=n.alternate;if(c!==null&&(c=c.updateQueue,i===c)){var d=null,p=null;if(i=i.firstBaseUpdate,i!==null){do{var v={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};p===null?d=p=v:p=p.next=v,i=i.next}while(i!==null);p===null?d=p=o:p=p.next=o}else d=p=o;i={baseState:c.baseState,firstBaseUpdate:d,lastBaseUpdate:p,shared:c.shared,callbacks:c.callbacks},n.updateQueue=i;return}n=i.lastBaseUpdate,n===null?i.firstBaseUpdate=o:n.next=o,i.lastBaseUpdate=o}var Vf=!1;function Yi(){if(Vf){var n=Ts;if(n!==null)throw n}}function Ki(n,o,i,c){Vf=!1;var d=n.updateQueue;Ur=!1;var p=d.firstBaseUpdate,v=d.lastBaseUpdate,R=d.shared.pending;if(R!==null){d.shared.pending=null;var M=R,q=M.next;M.next=null,v===null?p=q:v.next=q,v=M;var Q=n.alternate;Q!==null&&(Q=Q.updateQueue,R=Q.lastBaseUpdate,R!==v&&(R===null?Q.firstBaseUpdate=q:R.next=q,Q.lastBaseUpdate=M))}if(p!==null){var J=d.baseState;v=0,Q=q=M=null,R=p;do{var F=R.lane&-536870913,Z=F!==R.lane;if(Z?(Oe&F)===F:(c&F)===F){F!==0&&F===Cs&&(Vf=!0),Q!==null&&(Q=Q.next={lane:0,tag:R.tag,payload:R.payload,callback:null,next:null});e:{var ae=n,ye=R;F=o;var Ve=i;switch(ye.tag){case 1:if(ae=ye.payload,typeof ae=="function"){J=ae.call(Ve,J,F);break e}J=ae;break e;case 3:ae.flags=ae.flags&-65537|128;case 0:if(ae=ye.payload,F=typeof ae=="function"?ae.call(Ve,J,F):ae,F==null)break e;J=g({},J,F);break e;case 2:Ur=!0}}F=R.callback,F!==null&&(n.flags|=64,Z&&(n.flags|=8192),Z=d.callbacks,Z===null?d.callbacks=[F]:Z.push(F))}else Z={lane:F,tag:R.tag,payload:R.payload,callback:R.callback,next:null},Q===null?(q=Q=Z,M=J):Q=Q.next=Z,v|=F;if(R=R.next,R===null){if(R=d.shared.pending,R===null)break;Z=R,R=Z.next,Z.next=null,d.lastBaseUpdate=Z,d.shared.pending=null}}while(!0);Q===null&&(M=J),d.baseState=M,d.firstBaseUpdate=q,d.lastBaseUpdate=Q,p===null&&(d.shared.lanes=0),Hr|=v,n.lanes=v,n.memoizedState=J}}function Yg(n,o){if(typeof n!="function")throw Error(s(191,n));n.call(o)}function Kg(n,o){var i=n.callbacks;if(i!==null)for(n.callbacks=null,n=0;n<i.length;n++)Yg(i[n],o)}var Ms=N(null),zc=N(0);function Xg(n,o){n=yr,ee(zc,n),ee(Ms,o),yr=n|o.baseLanes}function Ff(){ee(zc,yr),ee(Ms,Ms.current)}function Hf(){yr=zc.current,G(Ms),G(zc)}var nn=N(null),bn=null;function Br(n){var o=n.alternate;ee(ot,ot.current&1),ee(nn,n),bn===null&&(o===null||Ms.current!==null||o.memoizedState!==null)&&(bn=n)}function Zf(n){ee(ot,ot.current),ee(nn,n),bn===null&&(bn=n)}function Jg(n){n.tag===22?(ee(ot,ot.current),ee(nn,n),bn===null&&(bn=n)):qr()}function qr(){ee(ot,ot.current),ee(nn,nn.current)}function rn(n){G(nn),bn===n&&(bn=null),G(ot)}var ot=N(0);function jc(n){for(var o=n;o!==null;){if(o.tag===13){var i=o.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||Jd(i)||Wd(i)))return o}else if(o.tag===19&&(o.memoizedProps.revealOrder==="forwards"||o.memoizedProps.revealOrder==="backwards"||o.memoizedProps.revealOrder==="unstable_legacy-backwards"||o.memoizedProps.revealOrder==="together")){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===n)break;for(;o.sibling===null;){if(o.return===null||o.return===n)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var lr=0,_e=null,Be=null,at=null,Lc=!1,ks=!1,Uo=!1,Dc=0,Xi=0,Ns=null,qR=0;function et(){throw Error(s(321))}function Qf(n,o){if(o===null)return!1;for(var i=0;i<o.length&&i<n.length;i++)if(!en(n[i],o[i]))return!1;return!0}function Gf(n,o,i,c,d,p){return lr=p,_e=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,P.H=n===null||n.memoizedState===null?Ly:ld,Uo=!1,p=i(c,d),Uo=!1,ks&&(p=ey(o,i,c,d)),Wg(n),p}function Wg(n){P.H=ea;var o=Be!==null&&Be.next!==null;if(lr=0,at=Be=_e=null,Lc=!1,Xi=0,Ns=null,o)throw Error(s(300));n===null||ct||(n=n.dependencies,n!==null&&Cc(n)&&(ct=!0))}function ey(n,o,i,c){_e=n;var d=0;do{if(ks&&(Ns=null),Xi=0,ks=!1,25<=d)throw Error(s(301));if(d+=1,at=Be=null,n.updateQueue!=null){var p=n.updateQueue;p.lastEffect=null,p.events=null,p.stores=null,p.memoCache!=null&&(p.memoCache.index=0)}P.H=Dy,p=o(i,c)}while(ks);return p}function VR(){var n=P.H,o=n.useState()[0];return o=typeof o.then=="function"?Ji(o):o,n=n.useState()[0],(Be!==null?Be.memoizedState:null)!==n&&(_e.flags|=1024),o}function Yf(){var n=Dc!==0;return Dc=0,n}function Kf(n,o,i){o.updateQueue=n.updateQueue,o.flags&=-2053,n.lanes&=~i}function Xf(n){if(Lc){for(n=n.memoizedState;n!==null;){var o=n.queue;o!==null&&(o.pending=null),n=n.next}Lc=!1}lr=0,at=Be=_e=null,ks=!1,Xi=Dc=0,Ns=null}function zt(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return at===null?_e.memoizedState=at=n:at=at.next=n,at}function st(){if(Be===null){var n=_e.alternate;n=n!==null?n.memoizedState:null}else n=Be.next;var o=at===null?_e.memoizedState:at.next;if(o!==null)at=o,Be=n;else{if(n===null)throw _e.alternate===null?Error(s(467)):Error(s(310));Be=n,n={memoizedState:Be.memoizedState,baseState:Be.baseState,baseQueue:Be.baseQueue,queue:Be.queue,next:null},at===null?_e.memoizedState=at=n:at=at.next=n}return at}function Pc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ji(n){var o=Xi;return Xi+=1,Ns===null&&(Ns=[]),n=Fg(Ns,n,o),o=_e,(at===null?o.memoizedState:at.next)===null&&(o=o.alternate,P.H=o===null||o.memoizedState===null?Ly:ld),n}function Uc(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return Ji(n);if(n.$$typeof===k)return Rt(n)}throw Error(s(438,String(n)))}function Jf(n){var o=null,i=_e.updateQueue;if(i!==null&&(o=i.memoCache),o==null){var c=_e.alternate;c!==null&&(c=c.updateQueue,c!==null&&(c=c.memoCache,c!=null&&(o={data:c.data.map(function(d){return d.slice()}),index:0})))}if(o==null&&(o={data:[],index:0}),i===null&&(i=Pc(),_e.updateQueue=i),i.memoCache=o,i=o.data[o.index],i===void 0)for(i=o.data[o.index]=Array(n),c=0;c<n;c++)i[c]=ne;return o.index++,i}function ur(n,o){return typeof o=="function"?o(n):o}function $c(n){var o=st();return Wf(o,Be,n)}function Wf(n,o,i){var c=n.queue;if(c===null)throw Error(s(311));c.lastRenderedReducer=i;var d=n.baseQueue,p=c.pending;if(p!==null){if(d!==null){var v=d.next;d.next=p.next,p.next=v}o.baseQueue=d=p,c.pending=null}if(p=n.baseState,d===null)n.memoizedState=p;else{o=d.next;var R=v=null,M=null,q=o,Q=!1;do{var J=q.lane&-536870913;if(J!==q.lane?(Oe&J)===J:(lr&J)===J){var F=q.revertLane;if(F===0)M!==null&&(M=M.next={lane:0,revertLane:0,gesture:null,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null}),J===Cs&&(Q=!0);else if((lr&F)===F){q=q.next,F===Cs&&(Q=!0);continue}else J={lane:0,revertLane:q.revertLane,gesture:null,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null},M===null?(R=M=J,v=p):M=M.next=J,_e.lanes|=F,Hr|=F;J=q.action,Uo&&i(p,J),p=q.hasEagerState?q.eagerState:i(p,J)}else F={lane:J,revertLane:q.revertLane,gesture:q.gesture,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null},M===null?(R=M=F,v=p):M=M.next=F,_e.lanes|=J,Hr|=J;q=q.next}while(q!==null&&q!==o);if(M===null?v=p:M.next=R,!en(p,n.memoizedState)&&(ct=!0,Q&&(i=Ts,i!==null)))throw i;n.memoizedState=p,n.baseState=v,n.baseQueue=M,c.lastRenderedState=p}return d===null&&(c.lanes=0),[n.memoizedState,c.dispatch]}function ed(n){var o=st(),i=o.queue;if(i===null)throw Error(s(311));i.lastRenderedReducer=n;var c=i.dispatch,d=i.pending,p=o.memoizedState;if(d!==null){i.pending=null;var v=d=d.next;do p=n(p,v.action),v=v.next;while(v!==d);en(p,o.memoizedState)||(ct=!0),o.memoizedState=p,o.baseQueue===null&&(o.baseState=p),i.lastRenderedState=p}return[p,c]}function ty(n,o,i){var c=_e,d=st(),p=ke;if(p){if(i===void 0)throw Error(s(407));i=i()}else i=o();var v=!en((Be||d).memoizedState,i);if(v&&(d.memoizedState=i,ct=!0),d=d.queue,rd(oy.bind(null,c,d,n),[n]),d.getSnapshot!==o||v||at!==null&&at.memoizedState.tag&1){if(c.flags|=2048,zs(9,{destroy:void 0},ry.bind(null,c,d,i,o),null),Fe===null)throw Error(s(349));p||(lr&127)!==0||ny(c,o,i)}return i}function ny(n,o,i){n.flags|=16384,n={getSnapshot:o,value:i},o=_e.updateQueue,o===null?(o=Pc(),_e.updateQueue=o,o.stores=[n]):(i=o.stores,i===null?o.stores=[n]:i.push(n))}function ry(n,o,i,c){o.value=i,o.getSnapshot=c,sy(o)&&iy(n)}function oy(n,o,i){return i(function(){sy(o)&&iy(n)})}function sy(n){var o=n.getSnapshot;n=n.value;try{var i=o();return!en(n,i)}catch{return!0}}function iy(n){var o=Oo(n,2);o!==null&&Zt(o,n,2)}function td(n){var o=zt();if(typeof n=="function"){var i=n;if(n=i(),Uo){kr(!0);try{i()}finally{kr(!1)}}}return o.memoizedState=o.baseState=n,o.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ur,lastRenderedState:n},o}function ay(n,o,i,c){return n.baseState=i,Wf(n,Be,typeof c=="function"?c:ur)}function FR(n,o,i,c,d){if(qc(n))throw Error(s(485));if(n=o.action,n!==null){var p={payload:d,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(v){p.listeners.push(v)}};P.T!==null?i(!0):p.isTransition=!1,c(p),i=o.pending,i===null?(p.next=o.pending=p,cy(o,p)):(p.next=i.next,o.pending=i.next=p)}}function cy(n,o){var i=o.action,c=o.payload,d=n.state;if(o.isTransition){var p=P.T,v={};P.T=v;try{var R=i(d,c),M=P.S;M!==null&&M(v,R),ly(n,o,R)}catch(q){nd(n,o,q)}finally{p!==null&&v.types!==null&&(p.types=v.types),P.T=p}}else try{p=i(d,c),ly(n,o,p)}catch(q){nd(n,o,q)}}function ly(n,o,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(c){uy(n,o,c)},function(c){return nd(n,o,c)}):uy(n,o,i)}function uy(n,o,i){o.status="fulfilled",o.value=i,fy(o),n.state=i,o=n.pending,o!==null&&(i=o.next,i===o?n.pending=null:(i=i.next,o.next=i,cy(n,i)))}function nd(n,o,i){var c=n.pending;if(n.pending=null,c!==null){c=c.next;do o.status="rejected",o.reason=i,fy(o),o=o.next;while(o!==c)}n.action=null}function fy(n){n=n.listeners;for(var o=0;o<n.length;o++)(0,n[o])()}function dy(n,o){return o}function hy(n,o){if(ke){var i=Fe.formState;if(i!==null){e:{var c=_e;if(ke){if(Qe){t:{for(var d=Qe,p=vn;d.nodeType!==8;){if(!p){d=null;break t}if(d=Sn(d.nextSibling),d===null){d=null;break t}}p=d.data,d=p==="F!"||p==="F"?d:null}if(d){Qe=Sn(d.nextSibling),c=d.data==="F!";break e}}Dr(c)}c=!1}c&&(o=i[0])}}return i=zt(),i.memoizedState=i.baseState=o,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:dy,lastRenderedState:o},i.queue=c,i=Ny.bind(null,_e,c),c.dispatch=i,c=td(!1),p=cd.bind(null,_e,!1,c.queue),c=zt(),d={state:o,dispatch:null,action:n,pending:null},c.queue=d,i=FR.bind(null,_e,d,p,i),d.dispatch=i,c.memoizedState=n,[o,i,!1]}function py(n){var o=st();return my(o,Be,n)}function my(n,o,i){if(o=Wf(n,o,dy)[0],n=$c(ur)[0],typeof o=="object"&&o!==null&&typeof o.then=="function")try{var c=Ji(o)}catch(v){throw v===As?Oc:v}else c=o;o=st();var d=o.queue,p=d.dispatch;return i!==o.memoizedState&&(_e.flags|=2048,zs(9,{destroy:void 0},HR.bind(null,d,i),null)),[c,p,n]}function HR(n,o){n.action=o}function gy(n){var o=st(),i=Be;if(i!==null)return my(o,i,n);st(),o=o.memoizedState,i=st();var c=i.queue.dispatch;return i.memoizedState=n,[o,c,!1]}function zs(n,o,i,c){return n={tag:n,create:i,deps:c,inst:o,next:null},o=_e.updateQueue,o===null&&(o=Pc(),_e.updateQueue=o),i=o.lastEffect,i===null?o.lastEffect=n.next=n:(c=i.next,i.next=n,n.next=c,o.lastEffect=n),n}function yy(){return st().memoizedState}function Ic(n,o,i,c){var d=zt();_e.flags|=n,d.memoizedState=zs(1|o,{destroy:void 0},i,c===void 0?null:c)}function Bc(n,o,i,c){var d=st();c=c===void 0?null:c;var p=d.memoizedState.inst;Be!==null&&c!==null&&Qf(c,Be.memoizedState.deps)?d.memoizedState=zs(o,p,i,c):(_e.flags|=n,d.memoizedState=zs(1|o,p,i,c))}function vy(n,o){Ic(8390656,8,n,o)}function rd(n,o){Bc(2048,8,n,o)}function ZR(n){_e.flags|=4;var o=_e.updateQueue;if(o===null)o=Pc(),_e.updateQueue=o,o.events=[n];else{var i=o.events;i===null?o.events=[n]:i.push(n)}}function by(n){var o=st().memoizedState;return ZR({ref:o,nextImpl:n}),function(){if((De&2)!==0)throw Error(s(440));return o.impl.apply(void 0,arguments)}}function Sy(n,o){return Bc(4,2,n,o)}function wy(n,o){return Bc(4,4,n,o)}function _y(n,o){if(typeof o=="function"){n=n();var i=o(n);return function(){typeof i=="function"?i():o(null)}}if(o!=null)return n=n(),o.current=n,function(){o.current=null}}function xy(n,o,i){i=i!=null?i.concat([n]):null,Bc(4,4,_y.bind(null,o,n),i)}function od(){}function Ey(n,o){var i=st();o=o===void 0?null:o;var c=i.memoizedState;return o!==null&&Qf(o,c[1])?c[0]:(i.memoizedState=[n,o],n)}function Ry(n,o){var i=st();o=o===void 0?null:o;var c=i.memoizedState;if(o!==null&&Qf(o,c[1]))return c[0];if(c=n(),Uo){kr(!0);try{n()}finally{kr(!1)}}return i.memoizedState=[c,o],c}function sd(n,o,i){return i===void 0||(lr&1073741824)!==0&&(Oe&261930)===0?n.memoizedState=o:(n.memoizedState=i,n=Cv(),_e.lanes|=n,Hr|=n,i)}function Cy(n,o,i,c){return en(i,o)?i:Ms.current!==null?(n=sd(n,i,c),en(n,o)||(ct=!0),n):(lr&42)===0||(lr&1073741824)!==0&&(Oe&261930)===0?(ct=!0,n.memoizedState=i):(n=Cv(),_e.lanes|=n,Hr|=n,o)}function Ty(n,o,i,c,d){var p=Y.p;Y.p=p!==0&&8>p?p:8;var v=P.T,R={};P.T=R,cd(n,!1,o,i);try{var M=d(),q=P.S;if(q!==null&&q(R,M),M!==null&&typeof M=="object"&&typeof M.then=="function"){var Q=BR(M,c);Wi(n,o,Q,an(n))}else Wi(n,o,c,an(n))}catch(J){Wi(n,o,{then:function(){},status:"rejected",reason:J},an())}finally{Y.p=p,v!==null&&R.types!==null&&(v.types=R.types),P.T=v}}function QR(){}function id(n,o,i,c){if(n.tag!==5)throw Error(s(476));var d=Ay(n).queue;Ty(n,d,o,V,i===null?QR:function(){return Oy(n),i(c)})}function Ay(n){var o=n.memoizedState;if(o!==null)return o;o={memoizedState:V,baseState:V,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ur,lastRenderedState:V},next:null};var i={};return o.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ur,lastRenderedState:i},next:null},n.memoizedState=o,n=n.alternate,n!==null&&(n.memoizedState=o),o}function Oy(n){var o=Ay(n);o.next===null&&(o=n.alternate.memoizedState),Wi(n,o.next.queue,{},an())}function ad(){return Rt(ga)}function My(){return st().memoizedState}function ky(){return st().memoizedState}function GR(n){for(var o=n.return;o!==null;){switch(o.tag){case 24:case 3:var i=an();n=$r(i);var c=Ir(o,n,i);c!==null&&(Zt(c,o,i),Gi(c,o,i)),o={cache:Df()},n.payload=o;return}o=o.return}}function YR(n,o,i){var c=an();i={lane:c,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},qc(n)?zy(o,i):(i=Rf(n,o,i,c),i!==null&&(Zt(i,n,c),jy(i,o,c)))}function Ny(n,o,i){var c=an();Wi(n,o,i,c)}function Wi(n,o,i,c){var d={lane:c,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(qc(n))zy(o,d);else{var p=n.alternate;if(n.lanes===0&&(p===null||p.lanes===0)&&(p=o.lastRenderedReducer,p!==null))try{var v=o.lastRenderedState,R=p(v,i);if(d.hasEagerState=!0,d.eagerState=R,en(R,v))return _c(n,o,d,0),Fe===null&&wc(),!1}catch{}finally{}if(i=Rf(n,o,d,c),i!==null)return Zt(i,n,c),jy(i,o,c),!0}return!1}function cd(n,o,i,c){if(c={lane:2,revertLane:Id(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},qc(n)){if(o)throw Error(s(479))}else o=Rf(n,i,c,2),o!==null&&Zt(o,n,2)}function qc(n){var o=n.alternate;return n===_e||o!==null&&o===_e}function zy(n,o){ks=Lc=!0;var i=n.pending;i===null?o.next=o:(o.next=i.next,i.next=o),n.pending=o}function jy(n,o,i){if((i&4194048)!==0){var c=o.lanes;c&=n.pendingLanes,i|=c,o.lanes=i,$m(n,i)}}var ea={readContext:Rt,use:Uc,useCallback:et,useContext:et,useEffect:et,useImperativeHandle:et,useLayoutEffect:et,useInsertionEffect:et,useMemo:et,useReducer:et,useRef:et,useState:et,useDebugValue:et,useDeferredValue:et,useTransition:et,useSyncExternalStore:et,useId:et,useHostTransitionStatus:et,useFormState:et,useActionState:et,useOptimistic:et,useMemoCache:et,useCacheRefresh:et};ea.useEffectEvent=et;var Ly={readContext:Rt,use:Uc,useCallback:function(n,o){return zt().memoizedState=[n,o===void 0?null:o],n},useContext:Rt,useEffect:vy,useImperativeHandle:function(n,o,i){i=i!=null?i.concat([n]):null,Ic(4194308,4,_y.bind(null,o,n),i)},useLayoutEffect:function(n,o){return Ic(4194308,4,n,o)},useInsertionEffect:function(n,o){Ic(4,2,n,o)},useMemo:function(n,o){var i=zt();o=o===void 0?null:o;var c=n();if(Uo){kr(!0);try{n()}finally{kr(!1)}}return i.memoizedState=[c,o],c},useReducer:function(n,o,i){var c=zt();if(i!==void 0){var d=i(o);if(Uo){kr(!0);try{i(o)}finally{kr(!1)}}}else d=o;return c.memoizedState=c.baseState=d,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:d},c.queue=n,n=n.dispatch=YR.bind(null,_e,n),[c.memoizedState,n]},useRef:function(n){var o=zt();return n={current:n},o.memoizedState=n},useState:function(n){n=td(n);var o=n.queue,i=Ny.bind(null,_e,o);return o.dispatch=i,[n.memoizedState,i]},useDebugValue:od,useDeferredValue:function(n,o){var i=zt();return sd(i,n,o)},useTransition:function(){var n=td(!1);return n=Ty.bind(null,_e,n.queue,!0,!1),zt().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,o,i){var c=_e,d=zt();if(ke){if(i===void 0)throw Error(s(407));i=i()}else{if(i=o(),Fe===null)throw Error(s(349));(Oe&127)!==0||ny(c,o,i)}d.memoizedState=i;var p={value:i,getSnapshot:o};return d.queue=p,vy(oy.bind(null,c,p,n),[n]),c.flags|=2048,zs(9,{destroy:void 0},ry.bind(null,c,p,i,o),null),i},useId:function(){var n=zt(),o=Fe.identifierPrefix;if(ke){var i=Un,c=Pn;i=(c&~(1<<32-Wt(c)-1)).toString(32)+i,o="_"+o+"R_"+i,i=Dc++,0<i&&(o+="H"+i.toString(32)),o+="_"}else i=qR++,o="_"+o+"r_"+i.toString(32)+"_";return n.memoizedState=o},useHostTransitionStatus:ad,useFormState:hy,useActionState:hy,useOptimistic:function(n){var o=zt();o.memoizedState=o.baseState=n;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return o.queue=i,o=cd.bind(null,_e,!0,i),i.dispatch=o,[n,o]},useMemoCache:Jf,useCacheRefresh:function(){return zt().memoizedState=GR.bind(null,_e)},useEffectEvent:function(n){var o=zt(),i={impl:n};return o.memoizedState=i,function(){if((De&2)!==0)throw Error(s(440));return i.impl.apply(void 0,arguments)}}},ld={readContext:Rt,use:Uc,useCallback:Ey,useContext:Rt,useEffect:rd,useImperativeHandle:xy,useInsertionEffect:Sy,useLayoutEffect:wy,useMemo:Ry,useReducer:$c,useRef:yy,useState:function(){return $c(ur)},useDebugValue:od,useDeferredValue:function(n,o){var i=st();return Cy(i,Be.memoizedState,n,o)},useTransition:function(){var n=$c(ur)[0],o=st().memoizedState;return[typeof n=="boolean"?n:Ji(n),o]},useSyncExternalStore:ty,useId:My,useHostTransitionStatus:ad,useFormState:py,useActionState:py,useOptimistic:function(n,o){var i=st();return ay(i,Be,n,o)},useMemoCache:Jf,useCacheRefresh:ky};ld.useEffectEvent=by;var Dy={readContext:Rt,use:Uc,useCallback:Ey,useContext:Rt,useEffect:rd,useImperativeHandle:xy,useInsertionEffect:Sy,useLayoutEffect:wy,useMemo:Ry,useReducer:ed,useRef:yy,useState:function(){return ed(ur)},useDebugValue:od,useDeferredValue:function(n,o){var i=st();return Be===null?sd(i,n,o):Cy(i,Be.memoizedState,n,o)},useTransition:function(){var n=ed(ur)[0],o=st().memoizedState;return[typeof n=="boolean"?n:Ji(n),o]},useSyncExternalStore:ty,useId:My,useHostTransitionStatus:ad,useFormState:gy,useActionState:gy,useOptimistic:function(n,o){var i=st();return Be!==null?ay(i,Be,n,o):(i.baseState=n,[n,i.queue.dispatch])},useMemoCache:Jf,useCacheRefresh:ky};Dy.useEffectEvent=by;function ud(n,o,i,c){o=n.memoizedState,i=i(c,o),i=i==null?o:g({},o,i),n.memoizedState=i,n.lanes===0&&(n.updateQueue.baseState=i)}var fd={enqueueSetState:function(n,o,i){n=n._reactInternals;var c=an(),d=$r(c);d.payload=o,i!=null&&(d.callback=i),o=Ir(n,d,c),o!==null&&(Zt(o,n,c),Gi(o,n,c))},enqueueReplaceState:function(n,o,i){n=n._reactInternals;var c=an(),d=$r(c);d.tag=1,d.payload=o,i!=null&&(d.callback=i),o=Ir(n,d,c),o!==null&&(Zt(o,n,c),Gi(o,n,c))},enqueueForceUpdate:function(n,o){n=n._reactInternals;var i=an(),c=$r(i);c.tag=2,o!=null&&(c.callback=o),o=Ir(n,c,i),o!==null&&(Zt(o,n,i),Gi(o,n,i))}};function Py(n,o,i,c,d,p,v){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(c,p,v):o.prototype&&o.prototype.isPureReactComponent?!Ii(i,c)||!Ii(d,p):!0}function Uy(n,o,i,c){n=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(i,c),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(i,c),o.state!==n&&fd.enqueueReplaceState(o,o.state,null)}function $o(n,o){var i=o;if("ref"in o){i={};for(var c in o)c!=="ref"&&(i[c]=o[c])}if(n=n.defaultProps){i===o&&(i=g({},i));for(var d in n)i[d]===void 0&&(i[d]=n[d])}return i}function $y(n){Sc(n)}function Iy(n){console.error(n)}function By(n){Sc(n)}function Vc(n,o){try{var i=n.onUncaughtError;i(o.value,{componentStack:o.stack})}catch(c){setTimeout(function(){throw c})}}function qy(n,o,i){try{var c=n.onCaughtError;c(i.value,{componentStack:i.stack,errorBoundary:o.tag===1?o.stateNode:null})}catch(d){setTimeout(function(){throw d})}}function dd(n,o,i){return i=$r(i),i.tag=3,i.payload={element:null},i.callback=function(){Vc(n,o)},i}function Vy(n){return n=$r(n),n.tag=3,n}function Fy(n,o,i,c){var d=i.type.getDerivedStateFromError;if(typeof d=="function"){var p=c.value;n.payload=function(){return d(p)},n.callback=function(){qy(o,i,c)}}var v=i.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(n.callback=function(){qy(o,i,c),typeof d!="function"&&(Zr===null?Zr=new Set([this]):Zr.add(this));var R=c.stack;this.componentDidCatch(c.value,{componentStack:R!==null?R:""})})}function KR(n,o,i,c,d){if(i.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(o=i.alternate,o!==null&&Rs(o,i,d,!0),i=nn.current,i!==null){switch(i.tag){case 31:case 13:return bn===null?tl():i.alternate===null&&tt===0&&(tt=3),i.flags&=-257,i.flags|=65536,i.lanes=d,c===Mc?i.flags|=16384:(o=i.updateQueue,o===null?i.updateQueue=new Set([c]):o.add(c),Pd(n,c,d)),!1;case 22:return i.flags|=65536,c===Mc?i.flags|=16384:(o=i.updateQueue,o===null?(o={transitions:null,markerInstances:null,retryQueue:new Set([c])},i.updateQueue=o):(i=o.retryQueue,i===null?o.retryQueue=new Set([c]):i.add(c)),Pd(n,c,d)),!1}throw Error(s(435,i.tag))}return Pd(n,c,d),tl(),!1}if(ke)return o=nn.current,o!==null?((o.flags&65536)===0&&(o.flags|=256),o.flags|=65536,o.lanes=d,c!==kf&&(n=Error(s(422),{cause:c}),Vi(mn(n,i)))):(c!==kf&&(o=Error(s(423),{cause:c}),Vi(mn(o,i))),n=n.current.alternate,n.flags|=65536,d&=-d,n.lanes|=d,c=mn(c,i),d=dd(n.stateNode,c,d),qf(n,d),tt!==4&&(tt=2)),!1;var p=Error(s(520),{cause:c});if(p=mn(p,i),ca===null?ca=[p]:ca.push(p),tt!==4&&(tt=2),o===null)return!0;c=mn(c,i),i=o;do{switch(i.tag){case 3:return i.flags|=65536,n=d&-d,i.lanes|=n,n=dd(i.stateNode,c,n),qf(i,n),!1;case 1:if(o=i.type,p=i.stateNode,(i.flags&128)===0&&(typeof o.getDerivedStateFromError=="function"||p!==null&&typeof p.componentDidCatch=="function"&&(Zr===null||!Zr.has(p))))return i.flags|=65536,d&=-d,i.lanes|=d,d=Vy(d),Fy(d,n,i,c),qf(i,d),!1}i=i.return}while(i!==null);return!1}var hd=Error(s(461)),ct=!1;function Ct(n,o,i,c){o.child=n===null?Gg(o,null,i,c):Po(o,n.child,i,c)}function Hy(n,o,i,c,d){i=i.render;var p=o.ref;if("ref"in c){var v={};for(var R in c)R!=="ref"&&(v[R]=c[R])}else v=c;return zo(o),c=Gf(n,o,i,v,p,d),R=Yf(),n!==null&&!ct?(Kf(n,o,d),fr(n,o,d)):(ke&&R&&Of(o),o.flags|=1,Ct(n,o,c,d),o.child)}function Zy(n,o,i,c,d){if(n===null){var p=i.type;return typeof p=="function"&&!Cf(p)&&p.defaultProps===void 0&&i.compare===null?(o.tag=15,o.type=p,Qy(n,o,p,c,d)):(n=Ec(i.type,null,c,o,o.mode,d),n.ref=o.ref,n.return=o,o.child=n)}if(p=n.child,!wd(n,d)){var v=p.memoizedProps;if(i=i.compare,i=i!==null?i:Ii,i(v,c)&&n.ref===o.ref)return fr(n,o,d)}return o.flags|=1,n=sr(p,c),n.ref=o.ref,n.return=o,o.child=n}function Qy(n,o,i,c,d){if(n!==null){var p=n.memoizedProps;if(Ii(p,c)&&n.ref===o.ref)if(ct=!1,o.pendingProps=c=p,wd(n,d))(n.flags&131072)!==0&&(ct=!0);else return o.lanes=n.lanes,fr(n,o,d)}return pd(n,o,i,c,d)}function Gy(n,o,i,c){var d=c.children,p=n!==null?n.memoizedState:null;if(n===null&&o.stateNode===null&&(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),c.mode==="hidden"){if((o.flags&128)!==0){if(p=p!==null?p.baseLanes|i:i,n!==null){for(c=o.child=n.child,d=0;c!==null;)d=d|c.lanes|c.childLanes,c=c.sibling;c=d&~p}else c=0,o.child=null;return Yy(n,o,p,i,c)}if((i&536870912)!==0)o.memoizedState={baseLanes:0,cachePool:null},n!==null&&Ac(o,p!==null?p.cachePool:null),p!==null?Xg(o,p):Ff(),Jg(o);else return c=o.lanes=536870912,Yy(n,o,p!==null?p.baseLanes|i:i,i,c)}else p!==null?(Ac(o,p.cachePool),Xg(o,p),qr(),o.memoizedState=null):(n!==null&&Ac(o,null),Ff(),qr());return Ct(n,o,d,i),o.child}function ta(n,o){return n!==null&&n.tag===22||o.stateNode!==null||(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.sibling}function Yy(n,o,i,c,d){var p=Uf();return p=p===null?null:{parent:it._currentValue,pool:p},o.memoizedState={baseLanes:i,cachePool:p},n!==null&&Ac(o,null),Ff(),Jg(o),n!==null&&Rs(n,o,c,!0),o.childLanes=d,null}function Fc(n,o){return o=Zc({mode:o.mode,children:o.children},n.mode),o.ref=n.ref,n.child=o,o.return=n,o}function Ky(n,o,i){return Po(o,n.child,null,i),n=Fc(o,o.pendingProps),n.flags|=2,rn(o),o.memoizedState=null,n}function XR(n,o,i){var c=o.pendingProps,d=(o.flags&128)!==0;if(o.flags&=-129,n===null){if(ke){if(c.mode==="hidden")return n=Fc(o,c),o.lanes=536870912,ta(null,n);if(Zf(o),(n=Qe)?(n=cb(n,vn),n=n!==null&&n.data==="&"?n:null,n!==null&&(o.memoizedState={dehydrated:n,treeContext:jr!==null?{id:Pn,overflow:Un}:null,retryLane:536870912,hydrationErrors:null},i=zg(n),i.return=o,o.child=i,Et=o,Qe=null)):n=null,n===null)throw Dr(o);return o.lanes=536870912,null}return Fc(o,c)}var p=n.memoizedState;if(p!==null){var v=p.dehydrated;if(Zf(o),d)if(o.flags&256)o.flags&=-257,o=Ky(n,o,i);else if(o.memoizedState!==null)o.child=n.child,o.flags|=128,o=null;else throw Error(s(558));else if(ct||Rs(n,o,i,!1),d=(i&n.childLanes)!==0,ct||d){if(c=Fe,c!==null&&(v=Im(c,i),v!==0&&v!==p.retryLane))throw p.retryLane=v,Oo(n,v),Zt(c,n,v),hd;tl(),o=Ky(n,o,i)}else n=p.treeContext,Qe=Sn(v.nextSibling),Et=o,ke=!0,Lr=null,vn=!1,n!==null&&Dg(o,n),o=Fc(o,c),o.flags|=4096;return o}return n=sr(n.child,{mode:c.mode,children:c.children}),n.ref=o.ref,o.child=n,n.return=o,n}function Hc(n,o){var i=o.ref;if(i===null)n!==null&&n.ref!==null&&(o.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(s(284));(n===null||n.ref!==i)&&(o.flags|=4194816)}}function pd(n,o,i,c,d){return zo(o),i=Gf(n,o,i,c,void 0,d),c=Yf(),n!==null&&!ct?(Kf(n,o,d),fr(n,o,d)):(ke&&c&&Of(o),o.flags|=1,Ct(n,o,i,d),o.child)}function Xy(n,o,i,c,d,p){return zo(o),o.updateQueue=null,i=ey(o,c,i,d),Wg(n),c=Yf(),n!==null&&!ct?(Kf(n,o,p),fr(n,o,p)):(ke&&c&&Of(o),o.flags|=1,Ct(n,o,i,p),o.child)}function Jy(n,o,i,c,d){if(zo(o),o.stateNode===null){var p=ws,v=i.contextType;typeof v=="object"&&v!==null&&(p=Rt(v)),p=new i(c,p),o.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,p.updater=fd,o.stateNode=p,p._reactInternals=o,p=o.stateNode,p.props=c,p.state=o.memoizedState,p.refs={},If(o),v=i.contextType,p.context=typeof v=="object"&&v!==null?Rt(v):ws,p.state=o.memoizedState,v=i.getDerivedStateFromProps,typeof v=="function"&&(ud(o,i,v,c),p.state=o.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof p.getSnapshotBeforeUpdate=="function"||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(v=p.state,typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount(),v!==p.state&&fd.enqueueReplaceState(p,p.state,null),Ki(o,c,p,d),Yi(),p.state=o.memoizedState),typeof p.componentDidMount=="function"&&(o.flags|=4194308),c=!0}else if(n===null){p=o.stateNode;var R=o.memoizedProps,M=$o(i,R);p.props=M;var q=p.context,Q=i.contextType;v=ws,typeof Q=="object"&&Q!==null&&(v=Rt(Q));var J=i.getDerivedStateFromProps;Q=typeof J=="function"||typeof p.getSnapshotBeforeUpdate=="function",R=o.pendingProps!==R,Q||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(R||q!==v)&&Uy(o,p,c,v),Ur=!1;var F=o.memoizedState;p.state=F,Ki(o,c,p,d),Yi(),q=o.memoizedState,R||F!==q||Ur?(typeof J=="function"&&(ud(o,i,J,c),q=o.memoizedState),(M=Ur||Py(o,i,M,c,F,q,v))?(Q||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount()),typeof p.componentDidMount=="function"&&(o.flags|=4194308)):(typeof p.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=c,o.memoizedState=q),p.props=c,p.state=q,p.context=v,c=M):(typeof p.componentDidMount=="function"&&(o.flags|=4194308),c=!1)}else{p=o.stateNode,Bf(n,o),v=o.memoizedProps,Q=$o(i,v),p.props=Q,J=o.pendingProps,F=p.context,q=i.contextType,M=ws,typeof q=="object"&&q!==null&&(M=Rt(q)),R=i.getDerivedStateFromProps,(q=typeof R=="function"||typeof p.getSnapshotBeforeUpdate=="function")||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(v!==J||F!==M)&&Uy(o,p,c,M),Ur=!1,F=o.memoizedState,p.state=F,Ki(o,c,p,d),Yi();var Z=o.memoizedState;v!==J||F!==Z||Ur||n!==null&&n.dependencies!==null&&Cc(n.dependencies)?(typeof R=="function"&&(ud(o,i,R,c),Z=o.memoizedState),(Q=Ur||Py(o,i,Q,c,F,Z,M)||n!==null&&n.dependencies!==null&&Cc(n.dependencies))?(q||typeof p.UNSAFE_componentWillUpdate!="function"&&typeof p.componentWillUpdate!="function"||(typeof p.componentWillUpdate=="function"&&p.componentWillUpdate(c,Z,M),typeof p.UNSAFE_componentWillUpdate=="function"&&p.UNSAFE_componentWillUpdate(c,Z,M)),typeof p.componentDidUpdate=="function"&&(o.flags|=4),typeof p.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof p.componentDidUpdate!="function"||v===n.memoizedProps&&F===n.memoizedState||(o.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||v===n.memoizedProps&&F===n.memoizedState||(o.flags|=1024),o.memoizedProps=c,o.memoizedState=Z),p.props=c,p.state=Z,p.context=M,c=Q):(typeof p.componentDidUpdate!="function"||v===n.memoizedProps&&F===n.memoizedState||(o.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||v===n.memoizedProps&&F===n.memoizedState||(o.flags|=1024),c=!1)}return p=c,Hc(n,o),c=(o.flags&128)!==0,p||c?(p=o.stateNode,i=c&&typeof i.getDerivedStateFromError!="function"?null:p.render(),o.flags|=1,n!==null&&c?(o.child=Po(o,n.child,null,d),o.child=Po(o,null,i,d)):Ct(n,o,i,d),o.memoizedState=p.state,n=o.child):n=fr(n,o,d),n}function Wy(n,o,i,c){return ko(),o.flags|=256,Ct(n,o,i,c),o.child}var md={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function gd(n){return{baseLanes:n,cachePool:qg()}}function yd(n,o,i){return n=n!==null?n.childLanes&~i:0,o&&(n|=sn),n}function ev(n,o,i){var c=o.pendingProps,d=!1,p=(o.flags&128)!==0,v;if((v=p)||(v=n!==null&&n.memoizedState===null?!1:(ot.current&2)!==0),v&&(d=!0,o.flags&=-129),v=(o.flags&32)!==0,o.flags&=-33,n===null){if(ke){if(d?Br(o):qr(),(n=Qe)?(n=cb(n,vn),n=n!==null&&n.data!=="&"?n:null,n!==null&&(o.memoizedState={dehydrated:n,treeContext:jr!==null?{id:Pn,overflow:Un}:null,retryLane:536870912,hydrationErrors:null},i=zg(n),i.return=o,o.child=i,Et=o,Qe=null)):n=null,n===null)throw Dr(o);return Wd(n)?o.lanes=32:o.lanes=536870912,null}var R=c.children;return c=c.fallback,d?(qr(),d=o.mode,R=Zc({mode:"hidden",children:R},d),c=Mo(c,d,i,null),R.return=o,c.return=o,R.sibling=c,o.child=R,c=o.child,c.memoizedState=gd(i),c.childLanes=yd(n,v,i),o.memoizedState=md,ta(null,c)):(Br(o),vd(o,R))}var M=n.memoizedState;if(M!==null&&(R=M.dehydrated,R!==null)){if(p)o.flags&256?(Br(o),o.flags&=-257,o=bd(n,o,i)):o.memoizedState!==null?(qr(),o.child=n.child,o.flags|=128,o=null):(qr(),R=c.fallback,d=o.mode,c=Zc({mode:"visible",children:c.children},d),R=Mo(R,d,i,null),R.flags|=2,c.return=o,R.return=o,c.sibling=R,o.child=c,Po(o,n.child,null,i),c=o.child,c.memoizedState=gd(i),c.childLanes=yd(n,v,i),o.memoizedState=md,o=ta(null,c));else if(Br(o),Wd(R)){if(v=R.nextSibling&&R.nextSibling.dataset,v)var q=v.dgst;v=q,c=Error(s(419)),c.stack="",c.digest=v,Vi({value:c,source:null,stack:null}),o=bd(n,o,i)}else if(ct||Rs(n,o,i,!1),v=(i&n.childLanes)!==0,ct||v){if(v=Fe,v!==null&&(c=Im(v,i),c!==0&&c!==M.retryLane))throw M.retryLane=c,Oo(n,c),Zt(v,n,c),hd;Jd(R)||tl(),o=bd(n,o,i)}else Jd(R)?(o.flags|=192,o.child=n.child,o=null):(n=M.treeContext,Qe=Sn(R.nextSibling),Et=o,ke=!0,Lr=null,vn=!1,n!==null&&Dg(o,n),o=vd(o,c.children),o.flags|=4096);return o}return d?(qr(),R=c.fallback,d=o.mode,M=n.child,q=M.sibling,c=sr(M,{mode:"hidden",children:c.children}),c.subtreeFlags=M.subtreeFlags&65011712,q!==null?R=sr(q,R):(R=Mo(R,d,i,null),R.flags|=2),R.return=o,c.return=o,c.sibling=R,o.child=c,ta(null,c),c=o.child,R=n.child.memoizedState,R===null?R=gd(i):(d=R.cachePool,d!==null?(M=it._currentValue,d=d.parent!==M?{parent:M,pool:M}:d):d=qg(),R={baseLanes:R.baseLanes|i,cachePool:d}),c.memoizedState=R,c.childLanes=yd(n,v,i),o.memoizedState=md,ta(n.child,c)):(Br(o),i=n.child,n=i.sibling,i=sr(i,{mode:"visible",children:c.children}),i.return=o,i.sibling=null,n!==null&&(v=o.deletions,v===null?(o.deletions=[n],o.flags|=16):v.push(n)),o.child=i,o.memoizedState=null,i)}function vd(n,o){return o=Zc({mode:"visible",children:o},n.mode),o.return=n,n.child=o}function Zc(n,o){return n=tn(22,n,null,o),n.lanes=0,n}function bd(n,o,i){return Po(o,n.child,null,i),n=vd(o,o.pendingProps.children),n.flags|=2,o.memoizedState=null,n}function tv(n,o,i){n.lanes|=o;var c=n.alternate;c!==null&&(c.lanes|=o),jf(n.return,o,i)}function Sd(n,o,i,c,d,p){var v=n.memoizedState;v===null?n.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:c,tail:i,tailMode:d,treeForkCount:p}:(v.isBackwards=o,v.rendering=null,v.renderingStartTime=0,v.last=c,v.tail=i,v.tailMode=d,v.treeForkCount=p)}function nv(n,o,i){var c=o.pendingProps,d=c.revealOrder,p=c.tail;c=c.children;var v=ot.current,R=(v&2)!==0;if(R?(v=v&1|2,o.flags|=128):v&=1,ee(ot,v),Ct(n,o,c,i),c=ke?qi:0,!R&&n!==null&&(n.flags&128)!==0)e:for(n=o.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&tv(n,i,o);else if(n.tag===19)tv(n,i,o);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===o)break e;for(;n.sibling===null;){if(n.return===null||n.return===o)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(d){case"forwards":for(i=o.child,d=null;i!==null;)n=i.alternate,n!==null&&jc(n)===null&&(d=i),i=i.sibling;i=d,i===null?(d=o.child,o.child=null):(d=i.sibling,i.sibling=null),Sd(o,!1,d,i,p,c);break;case"backwards":case"unstable_legacy-backwards":for(i=null,d=o.child,o.child=null;d!==null;){if(n=d.alternate,n!==null&&jc(n)===null){o.child=d;break}n=d.sibling,d.sibling=i,i=d,d=n}Sd(o,!0,i,null,p,c);break;case"together":Sd(o,!1,null,null,void 0,c);break;default:o.memoizedState=null}return o.child}function fr(n,o,i){if(n!==null&&(o.dependencies=n.dependencies),Hr|=o.lanes,(i&o.childLanes)===0)if(n!==null){if(Rs(n,o,i,!1),(i&o.childLanes)===0)return null}else return null;if(n!==null&&o.child!==n.child)throw Error(s(153));if(o.child!==null){for(n=o.child,i=sr(n,n.pendingProps),o.child=i,i.return=o;n.sibling!==null;)n=n.sibling,i=i.sibling=sr(n,n.pendingProps),i.return=o;i.sibling=null}return o.child}function wd(n,o){return(n.lanes&o)!==0?!0:(n=n.dependencies,!!(n!==null&&Cc(n)))}function JR(n,o,i){switch(o.tag){case 3:Pe(o,o.stateNode.containerInfo),Pr(o,it,n.memoizedState.cache),ko();break;case 27:case 5:pt(o);break;case 4:Pe(o,o.stateNode.containerInfo);break;case 10:Pr(o,o.type,o.memoizedProps.value);break;case 31:if(o.memoizedState!==null)return o.flags|=128,Zf(o),null;break;case 13:var c=o.memoizedState;if(c!==null)return c.dehydrated!==null?(Br(o),o.flags|=128,null):(i&o.child.childLanes)!==0?ev(n,o,i):(Br(o),n=fr(n,o,i),n!==null?n.sibling:null);Br(o);break;case 19:var d=(n.flags&128)!==0;if(c=(i&o.childLanes)!==0,c||(Rs(n,o,i,!1),c=(i&o.childLanes)!==0),d){if(c)return nv(n,o,i);o.flags|=128}if(d=o.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),ee(ot,ot.current),c)break;return null;case 22:return o.lanes=0,Gy(n,o,i,o.pendingProps);case 24:Pr(o,it,n.memoizedState.cache)}return fr(n,o,i)}function rv(n,o,i){if(n!==null)if(n.memoizedProps!==o.pendingProps)ct=!0;else{if(!wd(n,i)&&(o.flags&128)===0)return ct=!1,JR(n,o,i);ct=(n.flags&131072)!==0}else ct=!1,ke&&(o.flags&1048576)!==0&&Lg(o,qi,o.index);switch(o.lanes=0,o.tag){case 16:e:{var c=o.pendingProps;if(n=Lo(o.elementType),o.type=n,typeof n=="function")Cf(n)?(c=$o(n,c),o.tag=1,o=Jy(null,o,n,c,i)):(o.tag=0,o=pd(null,o,n,c,i));else{if(n!=null){var d=n.$$typeof;if(d===j){o.tag=11,o=Hy(null,o,n,c,i);break e}else if(d===$){o.tag=14,o=Zy(null,o,n,c,i);break e}}throw o=ue(n)||n,Error(s(306,o,""))}}return o;case 0:return pd(n,o,o.type,o.pendingProps,i);case 1:return c=o.type,d=$o(c,o.pendingProps),Jy(n,o,c,d,i);case 3:e:{if(Pe(o,o.stateNode.containerInfo),n===null)throw Error(s(387));c=o.pendingProps;var p=o.memoizedState;d=p.element,Bf(n,o),Ki(o,c,null,i);var v=o.memoizedState;if(c=v.cache,Pr(o,it,c),c!==p.cache&&Lf(o,[it],i,!0),Yi(),c=v.element,p.isDehydrated)if(p={element:c,isDehydrated:!1,cache:v.cache},o.updateQueue.baseState=p,o.memoizedState=p,o.flags&256){o=Wy(n,o,c,i);break e}else if(c!==d){d=mn(Error(s(424)),o),Vi(d),o=Wy(n,o,c,i);break e}else{switch(n=o.stateNode.containerInfo,n.nodeType){case 9:n=n.body;break;default:n=n.nodeName==="HTML"?n.ownerDocument.body:n}for(Qe=Sn(n.firstChild),Et=o,ke=!0,Lr=null,vn=!0,i=Gg(o,null,c,i),o.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(ko(),c===d){o=fr(n,o,i);break e}Ct(n,o,c,i)}o=o.child}return o;case 26:return Hc(n,o),n===null?(i=pb(o.type,null,o.pendingProps,null))?o.memoizedState=i:ke||(i=o.type,n=o.pendingProps,c=cl(ge.current).createElement(i),c[xt]=o,c[It]=n,Tt(c,i,n),St(c),o.stateNode=c):o.memoizedState=pb(o.type,n.memoizedProps,o.pendingProps,n.memoizedState),null;case 27:return pt(o),n===null&&ke&&(c=o.stateNode=fb(o.type,o.pendingProps,ge.current),Et=o,vn=!0,d=Qe,Kr(o.type)?(eh=d,Qe=Sn(c.firstChild)):Qe=d),Ct(n,o,o.pendingProps.children,i),Hc(n,o),n===null&&(o.flags|=4194304),o.child;case 5:return n===null&&ke&&((d=c=Qe)&&(c=AC(c,o.type,o.pendingProps,vn),c!==null?(o.stateNode=c,Et=o,Qe=Sn(c.firstChild),vn=!1,d=!0):d=!1),d||Dr(o)),pt(o),d=o.type,p=o.pendingProps,v=n!==null?n.memoizedProps:null,c=p.children,Yd(d,p)?c=null:v!==null&&Yd(d,v)&&(o.flags|=32),o.memoizedState!==null&&(d=Gf(n,o,VR,null,null,i),ga._currentValue=d),Hc(n,o),Ct(n,o,c,i),o.child;case 6:return n===null&&ke&&((n=i=Qe)&&(i=OC(i,o.pendingProps,vn),i!==null?(o.stateNode=i,Et=o,Qe=null,n=!0):n=!1),n||Dr(o)),null;case 13:return ev(n,o,i);case 4:return Pe(o,o.stateNode.containerInfo),c=o.pendingProps,n===null?o.child=Po(o,null,c,i):Ct(n,o,c,i),o.child;case 11:return Hy(n,o,o.type,o.pendingProps,i);case 7:return Ct(n,o,o.pendingProps,i),o.child;case 8:return Ct(n,o,o.pendingProps.children,i),o.child;case 12:return Ct(n,o,o.pendingProps.children,i),o.child;case 10:return c=o.pendingProps,Pr(o,o.type,c.value),Ct(n,o,c.children,i),o.child;case 9:return d=o.type._context,c=o.pendingProps.children,zo(o),d=Rt(d),c=c(d),o.flags|=1,Ct(n,o,c,i),o.child;case 14:return Zy(n,o,o.type,o.pendingProps,i);case 15:return Qy(n,o,o.type,o.pendingProps,i);case 19:return nv(n,o,i);case 31:return XR(n,o,i);case 22:return Gy(n,o,i,o.pendingProps);case 24:return zo(o),c=Rt(it),n===null?(d=Uf(),d===null&&(d=Fe,p=Df(),d.pooledCache=p,p.refCount++,p!==null&&(d.pooledCacheLanes|=i),d=p),o.memoizedState={parent:c,cache:d},If(o),Pr(o,it,d)):((n.lanes&i)!==0&&(Bf(n,o),Ki(o,null,null,i),Yi()),d=n.memoizedState,p=o.memoizedState,d.parent!==c?(d={parent:c,cache:c},o.memoizedState=d,o.lanes===0&&(o.memoizedState=o.updateQueue.baseState=d),Pr(o,it,c)):(c=p.cache,Pr(o,it,c),c!==d.cache&&Lf(o,[it],i,!0))),Ct(n,o,o.pendingProps.children,i),o.child;case 29:throw o.pendingProps}throw Error(s(156,o.tag))}function dr(n){n.flags|=4}function _d(n,o,i,c,d){if((o=(n.mode&32)!==0)&&(o=!1),o){if(n.flags|=16777216,(d&335544128)===d)if(n.stateNode.complete)n.flags|=8192;else if(Mv())n.flags|=8192;else throw Do=Mc,$f}else n.flags&=-16777217}function ov(n,o){if(o.type!=="stylesheet"||(o.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!bb(o))if(Mv())n.flags|=8192;else throw Do=Mc,$f}function Qc(n,o){o!==null&&(n.flags|=4),n.flags&16384&&(o=n.tag!==22?Pm():536870912,n.lanes|=o,Ps|=o)}function na(n,o){if(!ke)switch(n.tailMode){case"hidden":o=n.tail;for(var i=null;o!==null;)o.alternate!==null&&(i=o),o=o.sibling;i===null?n.tail=null:i.sibling=null;break;case"collapsed":i=n.tail;for(var c=null;i!==null;)i.alternate!==null&&(c=i),i=i.sibling;c===null?o||n.tail===null?n.tail=null:n.tail.sibling=null:c.sibling=null}}function Ge(n){var o=n.alternate!==null&&n.alternate.child===n.child,i=0,c=0;if(o)for(var d=n.child;d!==null;)i|=d.lanes|d.childLanes,c|=d.subtreeFlags&65011712,c|=d.flags&65011712,d.return=n,d=d.sibling;else for(d=n.child;d!==null;)i|=d.lanes|d.childLanes,c|=d.subtreeFlags,c|=d.flags,d.return=n,d=d.sibling;return n.subtreeFlags|=c,n.childLanes=i,o}function WR(n,o,i){var c=o.pendingProps;switch(Mf(o),o.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ge(o),null;case 1:return Ge(o),null;case 3:return i=o.stateNode,c=null,n!==null&&(c=n.memoizedState.cache),o.memoizedState.cache!==c&&(o.flags|=2048),cr(it),Ne(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(n===null||n.child===null)&&(Es(o)?dr(o):n===null||n.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,Nf())),Ge(o),null;case 26:var d=o.type,p=o.memoizedState;return n===null?(dr(o),p!==null?(Ge(o),ov(o,p)):(Ge(o),_d(o,d,null,c,i))):p?p!==n.memoizedState?(dr(o),Ge(o),ov(o,p)):(Ge(o),o.flags&=-16777217):(n=n.memoizedProps,n!==c&&dr(o),Ge(o),_d(o,d,n,c,i)),null;case 27:if(Pt(o),i=ge.current,d=o.type,n!==null&&o.stateNode!=null)n.memoizedProps!==c&&dr(o);else{if(!c){if(o.stateNode===null)throw Error(s(166));return Ge(o),null}n=re.current,Es(o)?Pg(o):(n=fb(d,c,i),o.stateNode=n,dr(o))}return Ge(o),null;case 5:if(Pt(o),d=o.type,n!==null&&o.stateNode!=null)n.memoizedProps!==c&&dr(o);else{if(!c){if(o.stateNode===null)throw Error(s(166));return Ge(o),null}if(p=re.current,Es(o))Pg(o);else{var v=cl(ge.current);switch(p){case 1:p=v.createElementNS("http://www.w3.org/2000/svg",d);break;case 2:p=v.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;default:switch(d){case"svg":p=v.createElementNS("http://www.w3.org/2000/svg",d);break;case"math":p=v.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;case"script":p=v.createElement("div"),p.innerHTML="<script><\/script>",p=p.removeChild(p.firstChild);break;case"select":p=typeof c.is=="string"?v.createElement("select",{is:c.is}):v.createElement("select"),c.multiple?p.multiple=!0:c.size&&(p.size=c.size);break;default:p=typeof c.is=="string"?v.createElement(d,{is:c.is}):v.createElement(d)}}p[xt]=o,p[It]=c;e:for(v=o.child;v!==null;){if(v.tag===5||v.tag===6)p.appendChild(v.stateNode);else if(v.tag!==4&&v.tag!==27&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===o)break e;for(;v.sibling===null;){if(v.return===null||v.return===o)break e;v=v.return}v.sibling.return=v.return,v=v.sibling}o.stateNode=p;e:switch(Tt(p,d,c),d){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}c&&dr(o)}}return Ge(o),_d(o,o.type,n===null?null:n.memoizedProps,o.pendingProps,i),null;case 6:if(n&&o.stateNode!=null)n.memoizedProps!==c&&dr(o);else{if(typeof c!="string"&&o.stateNode===null)throw Error(s(166));if(n=ge.current,Es(o)){if(n=o.stateNode,i=o.memoizedProps,c=null,d=Et,d!==null)switch(d.tag){case 27:case 5:c=d.memoizedProps}n[xt]=o,n=!!(n.nodeValue===i||c!==null&&c.suppressHydrationWarning===!0||eb(n.nodeValue,i)),n||Dr(o,!0)}else n=cl(n).createTextNode(c),n[xt]=o,o.stateNode=n}return Ge(o),null;case 31:if(i=o.memoizedState,n===null||n.memoizedState!==null){if(c=Es(o),i!==null){if(n===null){if(!c)throw Error(s(318));if(n=o.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(s(557));n[xt]=o}else ko(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;Ge(o),n=!1}else i=Nf(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=i),n=!0;if(!n)return o.flags&256?(rn(o),o):(rn(o),null);if((o.flags&128)!==0)throw Error(s(558))}return Ge(o),null;case 13:if(c=o.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(d=Es(o),c!==null&&c.dehydrated!==null){if(n===null){if(!d)throw Error(s(318));if(d=o.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(s(317));d[xt]=o}else ko(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;Ge(o),d=!1}else d=Nf(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=d),d=!0;if(!d)return o.flags&256?(rn(o),o):(rn(o),null)}return rn(o),(o.flags&128)!==0?(o.lanes=i,o):(i=c!==null,n=n!==null&&n.memoizedState!==null,i&&(c=o.child,d=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(d=c.alternate.memoizedState.cachePool.pool),p=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(p=c.memoizedState.cachePool.pool),p!==d&&(c.flags|=2048)),i!==n&&i&&(o.child.flags|=8192),Qc(o,o.updateQueue),Ge(o),null);case 4:return Ne(),n===null&&Fd(o.stateNode.containerInfo),Ge(o),null;case 10:return cr(o.type),Ge(o),null;case 19:if(G(ot),c=o.memoizedState,c===null)return Ge(o),null;if(d=(o.flags&128)!==0,p=c.rendering,p===null)if(d)na(c,!1);else{if(tt!==0||n!==null&&(n.flags&128)!==0)for(n=o.child;n!==null;){if(p=jc(n),p!==null){for(o.flags|=128,na(c,!1),n=p.updateQueue,o.updateQueue=n,Qc(o,n),o.subtreeFlags=0,n=i,i=o.child;i!==null;)Ng(i,n),i=i.sibling;return ee(ot,ot.current&1|2),ke&&ir(o,c.treeForkCount),o.child}n=n.sibling}c.tail!==null&&xe()>Jc&&(o.flags|=128,d=!0,na(c,!1),o.lanes=4194304)}else{if(!d)if(n=jc(p),n!==null){if(o.flags|=128,d=!0,n=n.updateQueue,o.updateQueue=n,Qc(o,n),na(c,!0),c.tail===null&&c.tailMode==="hidden"&&!p.alternate&&!ke)return Ge(o),null}else 2*xe()-c.renderingStartTime>Jc&&i!==536870912&&(o.flags|=128,d=!0,na(c,!1),o.lanes=4194304);c.isBackwards?(p.sibling=o.child,o.child=p):(n=c.last,n!==null?n.sibling=p:o.child=p,c.last=p)}return c.tail!==null?(n=c.tail,c.rendering=n,c.tail=n.sibling,c.renderingStartTime=xe(),n.sibling=null,i=ot.current,ee(ot,d?i&1|2:i&1),ke&&ir(o,c.treeForkCount),n):(Ge(o),null);case 22:case 23:return rn(o),Hf(),c=o.memoizedState!==null,n!==null?n.memoizedState!==null!==c&&(o.flags|=8192):c&&(o.flags|=8192),c?(i&536870912)!==0&&(o.flags&128)===0&&(Ge(o),o.subtreeFlags&6&&(o.flags|=8192)):Ge(o),i=o.updateQueue,i!==null&&Qc(o,i.retryQueue),i=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(i=n.memoizedState.cachePool.pool),c=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(c=o.memoizedState.cachePool.pool),c!==i&&(o.flags|=2048),n!==null&&G(jo),null;case 24:return i=null,n!==null&&(i=n.memoizedState.cache),o.memoizedState.cache!==i&&(o.flags|=2048),cr(it),Ge(o),null;case 25:return null;case 30:return null}throw Error(s(156,o.tag))}function eC(n,o){switch(Mf(o),o.tag){case 1:return n=o.flags,n&65536?(o.flags=n&-65537|128,o):null;case 3:return cr(it),Ne(),n=o.flags,(n&65536)!==0&&(n&128)===0?(o.flags=n&-65537|128,o):null;case 26:case 27:case 5:return Pt(o),null;case 31:if(o.memoizedState!==null){if(rn(o),o.alternate===null)throw Error(s(340));ko()}return n=o.flags,n&65536?(o.flags=n&-65537|128,o):null;case 13:if(rn(o),n=o.memoizedState,n!==null&&n.dehydrated!==null){if(o.alternate===null)throw Error(s(340));ko()}return n=o.flags,n&65536?(o.flags=n&-65537|128,o):null;case 19:return G(ot),null;case 4:return Ne(),null;case 10:return cr(o.type),null;case 22:case 23:return rn(o),Hf(),n!==null&&G(jo),n=o.flags,n&65536?(o.flags=n&-65537|128,o):null;case 24:return cr(it),null;case 25:return null;default:return null}}function sv(n,o){switch(Mf(o),o.tag){case 3:cr(it),Ne();break;case 26:case 27:case 5:Pt(o);break;case 4:Ne();break;case 31:o.memoizedState!==null&&rn(o);break;case 13:rn(o);break;case 19:G(ot);break;case 10:cr(o.type);break;case 22:case 23:rn(o),Hf(),n!==null&&G(jo);break;case 24:cr(it)}}function ra(n,o){try{var i=o.updateQueue,c=i!==null?i.lastEffect:null;if(c!==null){var d=c.next;i=d;do{if((i.tag&n)===n){c=void 0;var p=i.create,v=i.inst;c=p(),v.destroy=c}i=i.next}while(i!==d)}}catch(R){$e(o,o.return,R)}}function Vr(n,o,i){try{var c=o.updateQueue,d=c!==null?c.lastEffect:null;if(d!==null){var p=d.next;c=p;do{if((c.tag&n)===n){var v=c.inst,R=v.destroy;if(R!==void 0){v.destroy=void 0,d=o;var M=i,q=R;try{q()}catch(Q){$e(d,M,Q)}}}c=c.next}while(c!==p)}}catch(Q){$e(o,o.return,Q)}}function iv(n){var o=n.updateQueue;if(o!==null){var i=n.stateNode;try{Kg(o,i)}catch(c){$e(n,n.return,c)}}}function av(n,o,i){i.props=$o(n.type,n.memoizedProps),i.state=n.memoizedState;try{i.componentWillUnmount()}catch(c){$e(n,o,c)}}function oa(n,o){try{var i=n.ref;if(i!==null){switch(n.tag){case 26:case 27:case 5:var c=n.stateNode;break;case 30:c=n.stateNode;break;default:c=n.stateNode}typeof i=="function"?n.refCleanup=i(c):i.current=c}}catch(d){$e(n,o,d)}}function $n(n,o){var i=n.ref,c=n.refCleanup;if(i!==null)if(typeof c=="function")try{c()}catch(d){$e(n,o,d)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(d){$e(n,o,d)}else i.current=null}function cv(n){var o=n.type,i=n.memoizedProps,c=n.stateNode;try{e:switch(o){case"button":case"input":case"select":case"textarea":i.autoFocus&&c.focus();break e;case"img":i.src?c.src=i.src:i.srcSet&&(c.srcset=i.srcSet)}}catch(d){$e(n,n.return,d)}}function xd(n,o,i){try{var c=n.stateNode;_C(c,n.type,i,o),c[It]=o}catch(d){$e(n,n.return,d)}}function lv(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&Kr(n.type)||n.tag===4}function Ed(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||lv(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.tag===27&&Kr(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function Rd(n,o,i){var c=n.tag;if(c===5||c===6)n=n.stateNode,o?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(n,o):(o=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,o.appendChild(n),i=i._reactRootContainer,i!=null||o.onclick!==null||(o.onclick=rr));else if(c!==4&&(c===27&&Kr(n.type)&&(i=n.stateNode,o=null),n=n.child,n!==null))for(Rd(n,o,i),n=n.sibling;n!==null;)Rd(n,o,i),n=n.sibling}function Gc(n,o,i){var c=n.tag;if(c===5||c===6)n=n.stateNode,o?i.insertBefore(n,o):i.appendChild(n);else if(c!==4&&(c===27&&Kr(n.type)&&(i=n.stateNode),n=n.child,n!==null))for(Gc(n,o,i),n=n.sibling;n!==null;)Gc(n,o,i),n=n.sibling}function uv(n){var o=n.stateNode,i=n.memoizedProps;try{for(var c=n.type,d=o.attributes;d.length;)o.removeAttributeNode(d[0]);Tt(o,c,i),o[xt]=n,o[It]=i}catch(p){$e(n,n.return,p)}}var hr=!1,lt=!1,Cd=!1,fv=typeof WeakSet=="function"?WeakSet:Set,wt=null;function tC(n,o){if(n=n.containerInfo,Qd=ml,n=xg(n),bf(n)){if("selectionStart"in n)var i={start:n.selectionStart,end:n.selectionEnd};else e:{i=(i=n.ownerDocument)&&i.defaultView||window;var c=i.getSelection&&i.getSelection();if(c&&c.rangeCount!==0){i=c.anchorNode;var d=c.anchorOffset,p=c.focusNode;c=c.focusOffset;try{i.nodeType,p.nodeType}catch{i=null;break e}var v=0,R=-1,M=-1,q=0,Q=0,J=n,F=null;t:for(;;){for(var Z;J!==i||d!==0&&J.nodeType!==3||(R=v+d),J!==p||c!==0&&J.nodeType!==3||(M=v+c),J.nodeType===3&&(v+=J.nodeValue.length),(Z=J.firstChild)!==null;)F=J,J=Z;for(;;){if(J===n)break t;if(F===i&&++q===d&&(R=v),F===p&&++Q===c&&(M=v),(Z=J.nextSibling)!==null)break;J=F,F=J.parentNode}J=Z}i=R===-1||M===-1?null:{start:R,end:M}}else i=null}i=i||{start:0,end:0}}else i=null;for(Gd={focusedElem:n,selectionRange:i},ml=!1,wt=o;wt!==null;)if(o=wt,n=o.child,(o.subtreeFlags&1028)!==0&&n!==null)n.return=o,wt=n;else for(;wt!==null;){switch(o=wt,p=o.alternate,n=o.flags,o.tag){case 0:if((n&4)!==0&&(n=o.updateQueue,n=n!==null?n.events:null,n!==null))for(i=0;i<n.length;i++)d=n[i],d.ref.impl=d.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&p!==null){n=void 0,i=o,d=p.memoizedProps,p=p.memoizedState,c=i.stateNode;try{var ae=$o(i.type,d);n=c.getSnapshotBeforeUpdate(ae,p),c.__reactInternalSnapshotBeforeUpdate=n}catch(ye){$e(i,i.return,ye)}}break;case 3:if((n&1024)!==0){if(n=o.stateNode.containerInfo,i=n.nodeType,i===9)Xd(n);else if(i===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":Xd(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((n&1024)!==0)throw Error(s(163))}if(n=o.sibling,n!==null){n.return=o.return,wt=n;break}wt=o.return}}function dv(n,o,i){var c=i.flags;switch(i.tag){case 0:case 11:case 15:mr(n,i),c&4&&ra(5,i);break;case 1:if(mr(n,i),c&4)if(n=i.stateNode,o===null)try{n.componentDidMount()}catch(v){$e(i,i.return,v)}else{var d=$o(i.type,o.memoizedProps);o=o.memoizedState;try{n.componentDidUpdate(d,o,n.__reactInternalSnapshotBeforeUpdate)}catch(v){$e(i,i.return,v)}}c&64&&iv(i),c&512&&oa(i,i.return);break;case 3:if(mr(n,i),c&64&&(n=i.updateQueue,n!==null)){if(o=null,i.child!==null)switch(i.child.tag){case 27:case 5:o=i.child.stateNode;break;case 1:o=i.child.stateNode}try{Kg(n,o)}catch(v){$e(i,i.return,v)}}break;case 27:o===null&&c&4&&uv(i);case 26:case 5:mr(n,i),o===null&&c&4&&cv(i),c&512&&oa(i,i.return);break;case 12:mr(n,i);break;case 31:mr(n,i),c&4&&mv(n,i);break;case 13:mr(n,i),c&4&&gv(n,i),c&64&&(n=i.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(i=uC.bind(null,i),MC(n,i))));break;case 22:if(c=i.memoizedState!==null||hr,!c){o=o!==null&&o.memoizedState!==null||lt,d=hr;var p=lt;hr=c,(lt=o)&&!p?gr(n,i,(i.subtreeFlags&8772)!==0):mr(n,i),hr=d,lt=p}break;case 30:break;default:mr(n,i)}}function hv(n){var o=n.alternate;o!==null&&(n.alternate=null,hv(o)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(o=n.stateNode,o!==null&&tf(o)),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}var Ye=null,qt=!1;function pr(n,o,i){for(i=i.child;i!==null;)pv(n,o,i),i=i.sibling}function pv(n,o,i){if(Jt&&typeof Jt.onCommitFiberUnmount=="function")try{Jt.onCommitFiberUnmount(Ai,i)}catch{}switch(i.tag){case 26:lt||$n(i,o),pr(n,o,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:lt||$n(i,o);var c=Ye,d=qt;Kr(i.type)&&(Ye=i.stateNode,qt=!1),pr(n,o,i),ha(i.stateNode),Ye=c,qt=d;break;case 5:lt||$n(i,o);case 6:if(c=Ye,d=qt,Ye=null,pr(n,o,i),Ye=c,qt=d,Ye!==null)if(qt)try{(Ye.nodeType===9?Ye.body:Ye.nodeName==="HTML"?Ye.ownerDocument.body:Ye).removeChild(i.stateNode)}catch(p){$e(i,o,p)}else try{Ye.removeChild(i.stateNode)}catch(p){$e(i,o,p)}break;case 18:Ye!==null&&(qt?(n=Ye,ib(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,i.stateNode),Hs(n)):ib(Ye,i.stateNode));break;case 4:c=Ye,d=qt,Ye=i.stateNode.containerInfo,qt=!0,pr(n,o,i),Ye=c,qt=d;break;case 0:case 11:case 14:case 15:Vr(2,i,o),lt||Vr(4,i,o),pr(n,o,i);break;case 1:lt||($n(i,o),c=i.stateNode,typeof c.componentWillUnmount=="function"&&av(i,o,c)),pr(n,o,i);break;case 21:pr(n,o,i);break;case 22:lt=(c=lt)||i.memoizedState!==null,pr(n,o,i),lt=c;break;default:pr(n,o,i)}}function mv(n,o){if(o.memoizedState===null&&(n=o.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{Hs(n)}catch(i){$e(o,o.return,i)}}}function gv(n,o){if(o.memoizedState===null&&(n=o.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{Hs(n)}catch(i){$e(o,o.return,i)}}function nC(n){switch(n.tag){case 31:case 13:case 19:var o=n.stateNode;return o===null&&(o=n.stateNode=new fv),o;case 22:return n=n.stateNode,o=n._retryCache,o===null&&(o=n._retryCache=new fv),o;default:throw Error(s(435,n.tag))}}function Yc(n,o){var i=nC(n);o.forEach(function(c){if(!i.has(c)){i.add(c);var d=fC.bind(null,n,c);c.then(d,d)}})}function Vt(n,o){var i=o.deletions;if(i!==null)for(var c=0;c<i.length;c++){var d=i[c],p=n,v=o,R=v;e:for(;R!==null;){switch(R.tag){case 27:if(Kr(R.type)){Ye=R.stateNode,qt=!1;break e}break;case 5:Ye=R.stateNode,qt=!1;break e;case 3:case 4:Ye=R.stateNode.containerInfo,qt=!0;break e}R=R.return}if(Ye===null)throw Error(s(160));pv(p,v,d),Ye=null,qt=!1,p=d.alternate,p!==null&&(p.return=null),d.return=null}if(o.subtreeFlags&13886)for(o=o.child;o!==null;)yv(o,n),o=o.sibling}var kn=null;function yv(n,o){var i=n.alternate,c=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:Vt(o,n),Ft(n),c&4&&(Vr(3,n,n.return),ra(3,n),Vr(5,n,n.return));break;case 1:Vt(o,n),Ft(n),c&512&&(lt||i===null||$n(i,i.return)),c&64&&hr&&(n=n.updateQueue,n!==null&&(c=n.callbacks,c!==null&&(i=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=i===null?c:i.concat(c))));break;case 26:var d=kn;if(Vt(o,n),Ft(n),c&512&&(lt||i===null||$n(i,i.return)),c&4){var p=i!==null?i.memoizedState:null;if(c=n.memoizedState,i===null)if(c===null)if(n.stateNode===null){e:{c=n.type,i=n.memoizedProps,d=d.ownerDocument||d;t:switch(c){case"title":p=d.getElementsByTagName("title")[0],(!p||p[ki]||p[xt]||p.namespaceURI==="http://www.w3.org/2000/svg"||p.hasAttribute("itemprop"))&&(p=d.createElement(c),d.head.insertBefore(p,d.querySelector("head > title"))),Tt(p,c,i),p[xt]=n,St(p),c=p;break e;case"link":var v=yb("link","href",d).get(c+(i.href||""));if(v){for(var R=0;R<v.length;R++)if(p=v[R],p.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&p.getAttribute("rel")===(i.rel==null?null:i.rel)&&p.getAttribute("title")===(i.title==null?null:i.title)&&p.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){v.splice(R,1);break t}}p=d.createElement(c),Tt(p,c,i),d.head.appendChild(p);break;case"meta":if(v=yb("meta","content",d).get(c+(i.content||""))){for(R=0;R<v.length;R++)if(p=v[R],p.getAttribute("content")===(i.content==null?null:""+i.content)&&p.getAttribute("name")===(i.name==null?null:i.name)&&p.getAttribute("property")===(i.property==null?null:i.property)&&p.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&p.getAttribute("charset")===(i.charSet==null?null:i.charSet)){v.splice(R,1);break t}}p=d.createElement(c),Tt(p,c,i),d.head.appendChild(p);break;default:throw Error(s(468,c))}p[xt]=n,St(p),c=p}n.stateNode=c}else vb(d,n.type,n.stateNode);else n.stateNode=gb(d,c,n.memoizedProps);else p!==c?(p===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):p.count--,c===null?vb(d,n.type,n.stateNode):gb(d,c,n.memoizedProps)):c===null&&n.stateNode!==null&&xd(n,n.memoizedProps,i.memoizedProps)}break;case 27:Vt(o,n),Ft(n),c&512&&(lt||i===null||$n(i,i.return)),i!==null&&c&4&&xd(n,n.memoizedProps,i.memoizedProps);break;case 5:if(Vt(o,n),Ft(n),c&512&&(lt||i===null||$n(i,i.return)),n.flags&32){d=n.stateNode;try{ps(d,"")}catch(ae){$e(n,n.return,ae)}}c&4&&n.stateNode!=null&&(d=n.memoizedProps,xd(n,d,i!==null?i.memoizedProps:d)),c&1024&&(Cd=!0);break;case 6:if(Vt(o,n),Ft(n),c&4){if(n.stateNode===null)throw Error(s(162));c=n.memoizedProps,i=n.stateNode;try{i.nodeValue=c}catch(ae){$e(n,n.return,ae)}}break;case 3:if(fl=null,d=kn,kn=ll(o.containerInfo),Vt(o,n),kn=d,Ft(n),c&4&&i!==null&&i.memoizedState.isDehydrated)try{Hs(o.containerInfo)}catch(ae){$e(n,n.return,ae)}Cd&&(Cd=!1,vv(n));break;case 4:c=kn,kn=ll(n.stateNode.containerInfo),Vt(o,n),Ft(n),kn=c;break;case 12:Vt(o,n),Ft(n);break;case 31:Vt(o,n),Ft(n),c&4&&(c=n.updateQueue,c!==null&&(n.updateQueue=null,Yc(n,c)));break;case 13:Vt(o,n),Ft(n),n.child.flags&8192&&n.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(Xc=xe()),c&4&&(c=n.updateQueue,c!==null&&(n.updateQueue=null,Yc(n,c)));break;case 22:d=n.memoizedState!==null;var M=i!==null&&i.memoizedState!==null,q=hr,Q=lt;if(hr=q||d,lt=Q||M,Vt(o,n),lt=Q,hr=q,Ft(n),c&8192)e:for(o=n.stateNode,o._visibility=d?o._visibility&-2:o._visibility|1,d&&(i===null||M||hr||lt||Io(n)),i=null,o=n;;){if(o.tag===5||o.tag===26){if(i===null){M=i=o;try{if(p=M.stateNode,d)v=p.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none";else{R=M.stateNode;var J=M.memoizedProps.style,F=J!=null&&J.hasOwnProperty("display")?J.display:null;R.style.display=F==null||typeof F=="boolean"?"":(""+F).trim()}}catch(ae){$e(M,M.return,ae)}}}else if(o.tag===6){if(i===null){M=o;try{M.stateNode.nodeValue=d?"":M.memoizedProps}catch(ae){$e(M,M.return,ae)}}}else if(o.tag===18){if(i===null){M=o;try{var Z=M.stateNode;d?ab(Z,!0):ab(M.stateNode,!1)}catch(ae){$e(M,M.return,ae)}}}else if((o.tag!==22&&o.tag!==23||o.memoizedState===null||o===n)&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===n)break e;for(;o.sibling===null;){if(o.return===null||o.return===n)break e;i===o&&(i=null),o=o.return}i===o&&(i=null),o.sibling.return=o.return,o=o.sibling}c&4&&(c=n.updateQueue,c!==null&&(i=c.retryQueue,i!==null&&(c.retryQueue=null,Yc(n,i))));break;case 19:Vt(o,n),Ft(n),c&4&&(c=n.updateQueue,c!==null&&(n.updateQueue=null,Yc(n,c)));break;case 30:break;case 21:break;default:Vt(o,n),Ft(n)}}function Ft(n){var o=n.flags;if(o&2){try{for(var i,c=n.return;c!==null;){if(lv(c)){i=c;break}c=c.return}if(i==null)throw Error(s(160));switch(i.tag){case 27:var d=i.stateNode,p=Ed(n);Gc(n,p,d);break;case 5:var v=i.stateNode;i.flags&32&&(ps(v,""),i.flags&=-33);var R=Ed(n);Gc(n,R,v);break;case 3:case 4:var M=i.stateNode.containerInfo,q=Ed(n);Rd(n,q,M);break;default:throw Error(s(161))}}catch(Q){$e(n,n.return,Q)}n.flags&=-3}o&4096&&(n.flags&=-4097)}function vv(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var o=n;vv(o),o.tag===5&&o.flags&1024&&o.stateNode.reset(),n=n.sibling}}function mr(n,o){if(o.subtreeFlags&8772)for(o=o.child;o!==null;)dv(n,o.alternate,o),o=o.sibling}function Io(n){for(n=n.child;n!==null;){var o=n;switch(o.tag){case 0:case 11:case 14:case 15:Vr(4,o,o.return),Io(o);break;case 1:$n(o,o.return);var i=o.stateNode;typeof i.componentWillUnmount=="function"&&av(o,o.return,i),Io(o);break;case 27:ha(o.stateNode);case 26:case 5:$n(o,o.return),Io(o);break;case 22:o.memoizedState===null&&Io(o);break;case 30:Io(o);break;default:Io(o)}n=n.sibling}}function gr(n,o,i){for(i=i&&(o.subtreeFlags&8772)!==0,o=o.child;o!==null;){var c=o.alternate,d=n,p=o,v=p.flags;switch(p.tag){case 0:case 11:case 15:gr(d,p,i),ra(4,p);break;case 1:if(gr(d,p,i),c=p,d=c.stateNode,typeof d.componentDidMount=="function")try{d.componentDidMount()}catch(q){$e(c,c.return,q)}if(c=p,d=c.updateQueue,d!==null){var R=c.stateNode;try{var M=d.shared.hiddenCallbacks;if(M!==null)for(d.shared.hiddenCallbacks=null,d=0;d<M.length;d++)Yg(M[d],R)}catch(q){$e(c,c.return,q)}}i&&v&64&&iv(p),oa(p,p.return);break;case 27:uv(p);case 26:case 5:gr(d,p,i),i&&c===null&&v&4&&cv(p),oa(p,p.return);break;case 12:gr(d,p,i);break;case 31:gr(d,p,i),i&&v&4&&mv(d,p);break;case 13:gr(d,p,i),i&&v&4&&gv(d,p);break;case 22:p.memoizedState===null&&gr(d,p,i),oa(p,p.return);break;case 30:break;default:gr(d,p,i)}o=o.sibling}}function Td(n,o){var i=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(i=n.memoizedState.cachePool.pool),n=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(n=o.memoizedState.cachePool.pool),n!==i&&(n!=null&&n.refCount++,i!=null&&Fi(i))}function Ad(n,o){n=null,o.alternate!==null&&(n=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==n&&(o.refCount++,n!=null&&Fi(n))}function Nn(n,o,i,c){if(o.subtreeFlags&10256)for(o=o.child;o!==null;)bv(n,o,i,c),o=o.sibling}function bv(n,o,i,c){var d=o.flags;switch(o.tag){case 0:case 11:case 15:Nn(n,o,i,c),d&2048&&ra(9,o);break;case 1:Nn(n,o,i,c);break;case 3:Nn(n,o,i,c),d&2048&&(n=null,o.alternate!==null&&(n=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==n&&(o.refCount++,n!=null&&Fi(n)));break;case 12:if(d&2048){Nn(n,o,i,c),n=o.stateNode;try{var p=o.memoizedProps,v=p.id,R=p.onPostCommit;typeof R=="function"&&R(v,o.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(M){$e(o,o.return,M)}}else Nn(n,o,i,c);break;case 31:Nn(n,o,i,c);break;case 13:Nn(n,o,i,c);break;case 23:break;case 22:p=o.stateNode,v=o.alternate,o.memoizedState!==null?p._visibility&2?Nn(n,o,i,c):sa(n,o):p._visibility&2?Nn(n,o,i,c):(p._visibility|=2,js(n,o,i,c,(o.subtreeFlags&10256)!==0||!1)),d&2048&&Td(v,o);break;case 24:Nn(n,o,i,c),d&2048&&Ad(o.alternate,o);break;default:Nn(n,o,i,c)}}function js(n,o,i,c,d){for(d=d&&((o.subtreeFlags&10256)!==0||!1),o=o.child;o!==null;){var p=n,v=o,R=i,M=c,q=v.flags;switch(v.tag){case 0:case 11:case 15:js(p,v,R,M,d),ra(8,v);break;case 23:break;case 22:var Q=v.stateNode;v.memoizedState!==null?Q._visibility&2?js(p,v,R,M,d):sa(p,v):(Q._visibility|=2,js(p,v,R,M,d)),d&&q&2048&&Td(v.alternate,v);break;case 24:js(p,v,R,M,d),d&&q&2048&&Ad(v.alternate,v);break;default:js(p,v,R,M,d)}o=o.sibling}}function sa(n,o){if(o.subtreeFlags&10256)for(o=o.child;o!==null;){var i=n,c=o,d=c.flags;switch(c.tag){case 22:sa(i,c),d&2048&&Td(c.alternate,c);break;case 24:sa(i,c),d&2048&&Ad(c.alternate,c);break;default:sa(i,c)}o=o.sibling}}var ia=8192;function Ls(n,o,i){if(n.subtreeFlags&ia)for(n=n.child;n!==null;)Sv(n,o,i),n=n.sibling}function Sv(n,o,i){switch(n.tag){case 26:Ls(n,o,i),n.flags&ia&&n.memoizedState!==null&&qC(i,kn,n.memoizedState,n.memoizedProps);break;case 5:Ls(n,o,i);break;case 3:case 4:var c=kn;kn=ll(n.stateNode.containerInfo),Ls(n,o,i),kn=c;break;case 22:n.memoizedState===null&&(c=n.alternate,c!==null&&c.memoizedState!==null?(c=ia,ia=16777216,Ls(n,o,i),ia=c):Ls(n,o,i));break;default:Ls(n,o,i)}}function wv(n){var o=n.alternate;if(o!==null&&(n=o.child,n!==null)){o.child=null;do o=n.sibling,n.sibling=null,n=o;while(n!==null)}}function aa(n){var o=n.deletions;if((n.flags&16)!==0){if(o!==null)for(var i=0;i<o.length;i++){var c=o[i];wt=c,xv(c,n)}wv(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)_v(n),n=n.sibling}function _v(n){switch(n.tag){case 0:case 11:case 15:aa(n),n.flags&2048&&Vr(9,n,n.return);break;case 3:aa(n);break;case 12:aa(n);break;case 22:var o=n.stateNode;n.memoizedState!==null&&o._visibility&2&&(n.return===null||n.return.tag!==13)?(o._visibility&=-3,Kc(n)):aa(n);break;default:aa(n)}}function Kc(n){var o=n.deletions;if((n.flags&16)!==0){if(o!==null)for(var i=0;i<o.length;i++){var c=o[i];wt=c,xv(c,n)}wv(n)}for(n=n.child;n!==null;){switch(o=n,o.tag){case 0:case 11:case 15:Vr(8,o,o.return),Kc(o);break;case 22:i=o.stateNode,i._visibility&2&&(i._visibility&=-3,Kc(o));break;default:Kc(o)}n=n.sibling}}function xv(n,o){for(;wt!==null;){var i=wt;switch(i.tag){case 0:case 11:case 15:Vr(8,i,o);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var c=i.memoizedState.cachePool.pool;c!=null&&c.refCount++}break;case 24:Fi(i.memoizedState.cache)}if(c=i.child,c!==null)c.return=i,wt=c;else e:for(i=n;wt!==null;){c=wt;var d=c.sibling,p=c.return;if(hv(c),c===i){wt=null;break e}if(d!==null){d.return=p,wt=d;break e}wt=p}}}var rC={getCacheForType:function(n){var o=Rt(it),i=o.data.get(n);return i===void 0&&(i=n(),o.data.set(n,i)),i},cacheSignal:function(){return Rt(it).controller.signal}},oC=typeof WeakMap=="function"?WeakMap:Map,De=0,Fe=null,Te=null,Oe=0,Ue=0,on=null,Fr=!1,Ds=!1,Od=!1,yr=0,tt=0,Hr=0,Bo=0,Md=0,sn=0,Ps=0,ca=null,Ht=null,kd=!1,Xc=0,Ev=0,Jc=1/0,Wc=null,Zr=null,gt=0,Qr=null,Us=null,vr=0,Nd=0,zd=null,Rv=null,la=0,jd=null;function an(){return(De&2)!==0&&Oe!==0?Oe&-Oe:P.T!==null?Id():Bm()}function Cv(){if(sn===0)if((Oe&536870912)===0||ke){var n=ac;ac<<=1,(ac&3932160)===0&&(ac=262144),sn=n}else sn=536870912;return n=nn.current,n!==null&&(n.flags|=32),sn}function Zt(n,o,i){(n===Fe&&(Ue===2||Ue===9)||n.cancelPendingCommit!==null)&&($s(n,0),Gr(n,Oe,sn,!1)),Mi(n,i),((De&2)===0||n!==Fe)&&(n===Fe&&((De&2)===0&&(Bo|=i),tt===4&&Gr(n,Oe,sn,!1)),In(n))}function Tv(n,o,i){if((De&6)!==0)throw Error(s(327));var c=!i&&(o&127)===0&&(o&n.expiredLanes)===0||Oi(n,o),d=c?aC(n,o):Dd(n,o,!0),p=c;do{if(d===0){Ds&&!c&&Gr(n,o,0,!1);break}else{if(i=n.current.alternate,p&&!sC(i)){d=Dd(n,o,!1),p=!1;continue}if(d===2){if(p=o,n.errorRecoveryDisabledLanes&p)var v=0;else v=n.pendingLanes&-536870913,v=v!==0?v:v&536870912?536870912:0;if(v!==0){o=v;e:{var R=n;d=ca;var M=R.current.memoizedState.isDehydrated;if(M&&($s(R,v).flags|=256),v=Dd(R,v,!1),v!==2){if(Od&&!M){R.errorRecoveryDisabledLanes|=p,Bo|=p,d=4;break e}p=Ht,Ht=d,p!==null&&(Ht===null?Ht=p:Ht.push.apply(Ht,p))}d=v}if(p=!1,d!==2)continue}}if(d===1){$s(n,0),Gr(n,o,0,!0);break}e:{switch(c=n,p=d,p){case 0:case 1:throw Error(s(345));case 4:if((o&4194048)!==o)break;case 6:Gr(c,o,sn,!Fr);break e;case 2:Ht=null;break;case 3:case 5:break;default:throw Error(s(329))}if((o&62914560)===o&&(d=Xc+300-xe(),10<d)){if(Gr(c,o,sn,!Fr),lc(c,0,!0)!==0)break e;vr=o,c.timeoutHandle=ob(Av.bind(null,c,i,Ht,Wc,kd,o,sn,Bo,Ps,Fr,p,"Throttled",-0,0),d);break e}Av(c,i,Ht,Wc,kd,o,sn,Bo,Ps,Fr,p,null,-0,0)}}break}while(!0);In(n)}function Av(n,o,i,c,d,p,v,R,M,q,Q,J,F,Z){if(n.timeoutHandle=-1,J=o.subtreeFlags,J&8192||(J&16785408)===16785408){J={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:rr},Sv(o,p,J);var ae=(p&62914560)===p?Xc-xe():(p&4194048)===p?Ev-xe():0;if(ae=VC(J,ae),ae!==null){vr=p,n.cancelPendingCommit=ae(Dv.bind(null,n,o,p,i,c,d,v,R,M,Q,J,null,F,Z)),Gr(n,p,v,!q);return}}Dv(n,o,p,i,c,d,v,R,M)}function sC(n){for(var o=n;;){var i=o.tag;if((i===0||i===11||i===15)&&o.flags&16384&&(i=o.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var c=0;c<i.length;c++){var d=i[c],p=d.getSnapshot;d=d.value;try{if(!en(p(),d))return!1}catch{return!1}}if(i=o.child,o.subtreeFlags&16384&&i!==null)i.return=o,o=i;else{if(o===n)break;for(;o.sibling===null;){if(o.return===null||o.return===n)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function Gr(n,o,i,c){o&=~Md,o&=~Bo,n.suspendedLanes|=o,n.pingedLanes&=~o,c&&(n.warmLanes|=o),c=n.expirationTimes;for(var d=o;0<d;){var p=31-Wt(d),v=1<<p;c[p]=-1,d&=~v}i!==0&&Um(n,i,o)}function el(){return(De&6)===0?(ua(0),!1):!0}function Ld(){if(Te!==null){if(Ue===0)var n=Te.return;else n=Te,ar=No=null,Xf(n),Os=null,Zi=0,n=Te;for(;n!==null;)sv(n.alternate,n),n=n.return;Te=null}}function $s(n,o){var i=n.timeoutHandle;i!==-1&&(n.timeoutHandle=-1,RC(i)),i=n.cancelPendingCommit,i!==null&&(n.cancelPendingCommit=null,i()),vr=0,Ld(),Fe=n,Te=i=sr(n.current,null),Oe=o,Ue=0,on=null,Fr=!1,Ds=Oi(n,o),Od=!1,Ps=sn=Md=Bo=Hr=tt=0,Ht=ca=null,kd=!1,(o&8)!==0&&(o|=o&32);var c=n.entangledLanes;if(c!==0)for(n=n.entanglements,c&=o;0<c;){var d=31-Wt(c),p=1<<d;o|=n[d],c&=~p}return yr=o,wc(),i}function Ov(n,o){_e=null,P.H=ea,o===As||o===Oc?(o=Hg(),Ue=3):o===$f?(o=Hg(),Ue=4):Ue=o===hd?8:o!==null&&typeof o=="object"&&typeof o.then=="function"?6:1,on=o,Te===null&&(tt=1,Vc(n,mn(o,n.current)))}function Mv(){var n=nn.current;return n===null?!0:(Oe&4194048)===Oe?bn===null:(Oe&62914560)===Oe||(Oe&536870912)!==0?n===bn:!1}function kv(){var n=P.H;return P.H=ea,n===null?ea:n}function Nv(){var n=P.A;return P.A=rC,n}function tl(){tt=4,Fr||(Oe&4194048)!==Oe&&nn.current!==null||(Ds=!0),(Hr&134217727)===0&&(Bo&134217727)===0||Fe===null||Gr(Fe,Oe,sn,!1)}function Dd(n,o,i){var c=De;De|=2;var d=kv(),p=Nv();(Fe!==n||Oe!==o)&&(Wc=null,$s(n,o)),o=!1;var v=tt;e:do try{if(Ue!==0&&Te!==null){var R=Te,M=on;switch(Ue){case 8:Ld(),v=6;break e;case 3:case 2:case 9:case 6:nn.current===null&&(o=!0);var q=Ue;if(Ue=0,on=null,Is(n,R,M,q),i&&Ds){v=0;break e}break;default:q=Ue,Ue=0,on=null,Is(n,R,M,q)}}iC(),v=tt;break}catch(Q){Ov(n,Q)}while(!0);return o&&n.shellSuspendCounter++,ar=No=null,De=c,P.H=d,P.A=p,Te===null&&(Fe=null,Oe=0,wc()),v}function iC(){for(;Te!==null;)zv(Te)}function aC(n,o){var i=De;De|=2;var c=kv(),d=Nv();Fe!==n||Oe!==o?(Wc=null,Jc=xe()+500,$s(n,o)):Ds=Oi(n,o);e:do try{if(Ue!==0&&Te!==null){o=Te;var p=on;t:switch(Ue){case 1:Ue=0,on=null,Is(n,o,p,1);break;case 2:case 9:if(Vg(p)){Ue=0,on=null,jv(o);break}o=function(){Ue!==2&&Ue!==9||Fe!==n||(Ue=7),In(n)},p.then(o,o);break e;case 3:Ue=7;break e;case 4:Ue=5;break e;case 7:Vg(p)?(Ue=0,on=null,jv(o)):(Ue=0,on=null,Is(n,o,p,7));break;case 5:var v=null;switch(Te.tag){case 26:v=Te.memoizedState;case 5:case 27:var R=Te;if(v?bb(v):R.stateNode.complete){Ue=0,on=null;var M=R.sibling;if(M!==null)Te=M;else{var q=R.return;q!==null?(Te=q,nl(q)):Te=null}break t}}Ue=0,on=null,Is(n,o,p,5);break;case 6:Ue=0,on=null,Is(n,o,p,6);break;case 8:Ld(),tt=6;break e;default:throw Error(s(462))}}cC();break}catch(Q){Ov(n,Q)}while(!0);return ar=No=null,P.H=c,P.A=d,De=i,Te!==null?0:(Fe=null,Oe=0,wc(),tt)}function cC(){for(;Te!==null&&!rc();)zv(Te)}function zv(n){var o=rv(n.alternate,n,yr);n.memoizedProps=n.pendingProps,o===null?nl(n):Te=o}function jv(n){var o=n,i=o.alternate;switch(o.tag){case 15:case 0:o=Xy(i,o,o.pendingProps,o.type,void 0,Oe);break;case 11:o=Xy(i,o,o.pendingProps,o.type.render,o.ref,Oe);break;case 5:Xf(o);default:sv(i,o),o=Te=Ng(o,yr),o=rv(i,o,yr)}n.memoizedProps=n.pendingProps,o===null?nl(n):Te=o}function Is(n,o,i,c){ar=No=null,Xf(o),Os=null,Zi=0;var d=o.return;try{if(KR(n,d,o,i,Oe)){tt=1,Vc(n,mn(i,n.current)),Te=null;return}}catch(p){if(d!==null)throw Te=d,p;tt=1,Vc(n,mn(i,n.current)),Te=null;return}o.flags&32768?(ke||c===1?n=!0:Ds||(Oe&536870912)!==0?n=!1:(Fr=n=!0,(c===2||c===9||c===3||c===6)&&(c=nn.current,c!==null&&c.tag===13&&(c.flags|=16384))),Lv(o,n)):nl(o)}function nl(n){var o=n;do{if((o.flags&32768)!==0){Lv(o,Fr);return}n=o.return;var i=WR(o.alternate,o,yr);if(i!==null){Te=i;return}if(o=o.sibling,o!==null){Te=o;return}Te=o=n}while(o!==null);tt===0&&(tt=5)}function Lv(n,o){do{var i=eC(n.alternate,n);if(i!==null){i.flags&=32767,Te=i;return}if(i=n.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!o&&(n=n.sibling,n!==null)){Te=n;return}Te=n=i}while(n!==null);tt=6,Te=null}function Dv(n,o,i,c,d,p,v,R,M){n.cancelPendingCommit=null;do rl();while(gt!==0);if((De&6)!==0)throw Error(s(327));if(o!==null){if(o===n.current)throw Error(s(177));if(p=o.lanes|o.childLanes,p|=Ef,BE(n,i,p,v,R,M),n===Fe&&(Te=Fe=null,Oe=0),Us=o,Qr=n,vr=i,Nd=p,zd=d,Rv=c,(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,dC(sc,function(){return Bv(),null})):(n.callbackNode=null,n.callbackPriority=0),c=(o.flags&13878)!==0,(o.subtreeFlags&13878)!==0||c){c=P.T,P.T=null,d=Y.p,Y.p=2,v=De,De|=4;try{tC(n,o,i)}finally{De=v,Y.p=d,P.T=c}}gt=1,Pv(),Uv(),$v()}}function Pv(){if(gt===1){gt=0;var n=Qr,o=Us,i=(o.flags&13878)!==0;if((o.subtreeFlags&13878)!==0||i){i=P.T,P.T=null;var c=Y.p;Y.p=2;var d=De;De|=4;try{yv(o,n);var p=Gd,v=xg(n.containerInfo),R=p.focusedElem,M=p.selectionRange;if(v!==R&&R&&R.ownerDocument&&_g(R.ownerDocument.documentElement,R)){if(M!==null&&bf(R)){var q=M.start,Q=M.end;if(Q===void 0&&(Q=q),"selectionStart"in R)R.selectionStart=q,R.selectionEnd=Math.min(Q,R.value.length);else{var J=R.ownerDocument||document,F=J&&J.defaultView||window;if(F.getSelection){var Z=F.getSelection(),ae=R.textContent.length,ye=Math.min(M.start,ae),Ve=M.end===void 0?ye:Math.min(M.end,ae);!Z.extend&&ye>Ve&&(v=Ve,Ve=ye,ye=v);var U=wg(R,ye),z=wg(R,Ve);if(U&&z&&(Z.rangeCount!==1||Z.anchorNode!==U.node||Z.anchorOffset!==U.offset||Z.focusNode!==z.node||Z.focusOffset!==z.offset)){var B=J.createRange();B.setStart(U.node,U.offset),Z.removeAllRanges(),ye>Ve?(Z.addRange(B),Z.extend(z.node,z.offset)):(B.setEnd(z.node,z.offset),Z.addRange(B))}}}}for(J=[],Z=R;Z=Z.parentNode;)Z.nodeType===1&&J.push({element:Z,left:Z.scrollLeft,top:Z.scrollTop});for(typeof R.focus=="function"&&R.focus(),R=0;R<J.length;R++){var K=J[R];K.element.scrollLeft=K.left,K.element.scrollTop=K.top}}ml=!!Qd,Gd=Qd=null}finally{De=d,Y.p=c,P.T=i}}n.current=o,gt=2}}function Uv(){if(gt===2){gt=0;var n=Qr,o=Us,i=(o.flags&8772)!==0;if((o.subtreeFlags&8772)!==0||i){i=P.T,P.T=null;var c=Y.p;Y.p=2;var d=De;De|=4;try{dv(n,o.alternate,o)}finally{De=d,Y.p=c,P.T=i}}gt=3}}function $v(){if(gt===4||gt===3){gt=0,oc();var n=Qr,o=Us,i=vr,c=Rv;(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?gt=5:(gt=0,Us=Qr=null,Iv(n,n.pendingLanes));var d=n.pendingLanes;if(d===0&&(Zr=null),Wu(i),o=o.stateNode,Jt&&typeof Jt.onCommitFiberRoot=="function")try{Jt.onCommitFiberRoot(Ai,o,void 0,(o.current.flags&128)===128)}catch{}if(c!==null){o=P.T,d=Y.p,Y.p=2,P.T=null;try{for(var p=n.onRecoverableError,v=0;v<c.length;v++){var R=c[v];p(R.value,{componentStack:R.stack})}}finally{P.T=o,Y.p=d}}(vr&3)!==0&&rl(),In(n),d=n.pendingLanes,(i&261930)!==0&&(d&42)!==0?n===jd?la++:(la=0,jd=n):la=0,ua(0)}}function Iv(n,o){(n.pooledCacheLanes&=o)===0&&(o=n.pooledCache,o!=null&&(n.pooledCache=null,Fi(o)))}function rl(){return Pv(),Uv(),$v(),Bv()}function Bv(){if(gt!==5)return!1;var n=Qr,o=Nd;Nd=0;var i=Wu(vr),c=P.T,d=Y.p;try{Y.p=32>i?32:i,P.T=null,i=zd,zd=null;var p=Qr,v=vr;if(gt=0,Us=Qr=null,vr=0,(De&6)!==0)throw Error(s(331));var R=De;if(De|=4,_v(p.current),bv(p,p.current,v,i),De=R,ua(0,!1),Jt&&typeof Jt.onPostCommitFiberRoot=="function")try{Jt.onPostCommitFiberRoot(Ai,p)}catch{}return!0}finally{Y.p=d,P.T=c,Iv(n,o)}}function qv(n,o,i){o=mn(i,o),o=dd(n.stateNode,o,2),n=Ir(n,o,2),n!==null&&(Mi(n,2),In(n))}function $e(n,o,i){if(n.tag===3)qv(n,n,i);else for(;o!==null;){if(o.tag===3){qv(o,n,i);break}else if(o.tag===1){var c=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(Zr===null||!Zr.has(c))){n=mn(i,n),i=Vy(2),c=Ir(o,i,2),c!==null&&(Fy(i,c,o,n),Mi(c,2),In(c));break}}o=o.return}}function Pd(n,o,i){var c=n.pingCache;if(c===null){c=n.pingCache=new oC;var d=new Set;c.set(o,d)}else d=c.get(o),d===void 0&&(d=new Set,c.set(o,d));d.has(i)||(Od=!0,d.add(i),n=lC.bind(null,n,o,i),o.then(n,n))}function lC(n,o,i){var c=n.pingCache;c!==null&&c.delete(o),n.pingedLanes|=n.suspendedLanes&i,n.warmLanes&=~i,Fe===n&&(Oe&i)===i&&(tt===4||tt===3&&(Oe&62914560)===Oe&&300>xe()-Xc?(De&2)===0&&$s(n,0):Md|=i,Ps===Oe&&(Ps=0)),In(n)}function Vv(n,o){o===0&&(o=Pm()),n=Oo(n,o),n!==null&&(Mi(n,o),In(n))}function uC(n){var o=n.memoizedState,i=0;o!==null&&(i=o.retryLane),Vv(n,i)}function fC(n,o){var i=0;switch(n.tag){case 31:case 13:var c=n.stateNode,d=n.memoizedState;d!==null&&(i=d.retryLane);break;case 19:c=n.stateNode;break;case 22:c=n.stateNode._retryCache;break;default:throw Error(s(314))}c!==null&&c.delete(o),Vv(n,i)}function dC(n,o){return Or(n,o)}var ol=null,Bs=null,Ud=!1,sl=!1,$d=!1,Yr=0;function In(n){n!==Bs&&n.next===null&&(Bs===null?ol=Bs=n:Bs=Bs.next=n),sl=!0,Ud||(Ud=!0,pC())}function ua(n,o){if(!$d&&sl){$d=!0;do for(var i=!1,c=ol;c!==null;){if(n!==0){var d=c.pendingLanes;if(d===0)var p=0;else{var v=c.suspendedLanes,R=c.pingedLanes;p=(1<<31-Wt(42|n)+1)-1,p&=d&~(v&~R),p=p&201326741?p&201326741|1:p?p|2:0}p!==0&&(i=!0,Qv(c,p))}else p=Oe,p=lc(c,c===Fe?p:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(p&3)===0||Oi(c,p)||(i=!0,Qv(c,p));c=c.next}while(i);$d=!1}}function hC(){Fv()}function Fv(){sl=Ud=!1;var n=0;Yr!==0&&EC()&&(n=Yr);for(var o=xe(),i=null,c=ol;c!==null;){var d=c.next,p=Hv(c,o);p===0?(c.next=null,i===null?ol=d:i.next=d,d===null&&(Bs=i)):(i=c,(n!==0||(p&3)!==0)&&(sl=!0)),c=d}gt!==0&>!==5||ua(n),Yr!==0&&(Yr=0)}function Hv(n,o){for(var i=n.suspendedLanes,c=n.pingedLanes,d=n.expirationTimes,p=n.pendingLanes&-62914561;0<p;){var v=31-Wt(p),R=1<<v,M=d[v];M===-1?((R&i)===0||(R&c)!==0)&&(d[v]=IE(R,o)):M<=o&&(n.expiredLanes|=R),p&=~R}if(o=Fe,i=Oe,i=lc(n,n===o?i:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),c=n.callbackNode,i===0||n===o&&(Ue===2||Ue===9)||n.cancelPendingCommit!==null)return c!==null&&c!==null&&Mr(c),n.callbackNode=null,n.callbackPriority=0;if((i&3)===0||Oi(n,i)){if(o=i&-i,o===n.callbackPriority)return o;switch(c!==null&&Mr(c),Wu(i)){case 2:case 8:i=Ti;break;case 32:i=sc;break;case 268435456:i=Dm;break;default:i=sc}return c=Zv.bind(null,n),i=Or(i,c),n.callbackPriority=o,n.callbackNode=i,o}return c!==null&&c!==null&&Mr(c),n.callbackPriority=2,n.callbackNode=null,2}function Zv(n,o){if(gt!==0&>!==5)return n.callbackNode=null,n.callbackPriority=0,null;var i=n.callbackNode;if(rl()&&n.callbackNode!==i)return null;var c=Oe;return c=lc(n,n===Fe?c:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),c===0?null:(Tv(n,c,o),Hv(n,xe()),n.callbackNode!=null&&n.callbackNode===i?Zv.bind(null,n):null)}function Qv(n,o){if(rl())return null;Tv(n,o,!0)}function pC(){CC(function(){(De&6)!==0?Or($t,hC):Fv()})}function Id(){if(Yr===0){var n=Cs;n===0&&(n=ic,ic<<=1,(ic&261888)===0&&(ic=256)),Yr=n}return Yr}function Gv(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:hc(""+n)}function Yv(n,o){var i=o.ownerDocument.createElement("input");return i.name=o.name,i.value=o.value,n.id&&i.setAttribute("form",n.id),o.parentNode.insertBefore(i,o),n=new FormData(n),i.parentNode.removeChild(i),n}function mC(n,o,i,c,d){if(o==="submit"&&i&&i.stateNode===d){var p=Gv((d[It]||null).action),v=c.submitter;v&&(o=(o=v[It]||null)?Gv(o.formAction):v.getAttribute("formAction"),o!==null&&(p=o,v=null));var R=new yc("action","action",null,c,d);n.push({event:R,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(Yr!==0){var M=v?Yv(d,v):new FormData(d);id(i,{pending:!0,data:M,method:d.method,action:p},null,M)}}else typeof p=="function"&&(R.preventDefault(),M=v?Yv(d,v):new FormData(d),id(i,{pending:!0,data:M,method:d.method,action:p},p,M))},currentTarget:d}]})}}for(var Bd=0;Bd<xf.length;Bd++){var qd=xf[Bd],gC=qd.toLowerCase(),yC=qd[0].toUpperCase()+qd.slice(1);Mn(gC,"on"+yC)}Mn(Cg,"onAnimationEnd"),Mn(Tg,"onAnimationIteration"),Mn(Ag,"onAnimationStart"),Mn("dblclick","onDoubleClick"),Mn("focusin","onFocus"),Mn("focusout","onBlur"),Mn(zR,"onTransitionRun"),Mn(jR,"onTransitionStart"),Mn(LR,"onTransitionCancel"),Mn(Og,"onTransitionEnd"),ds("onMouseEnter",["mouseout","mouseover"]),ds("onMouseLeave",["mouseout","mouseover"]),ds("onPointerEnter",["pointerout","pointerover"]),ds("onPointerLeave",["pointerout","pointerover"]),Ro("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ro("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ro("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ro("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ro("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ro("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var fa="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),vC=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(fa));function Kv(n,o){o=(o&4)!==0;for(var i=0;i<n.length;i++){var c=n[i],d=c.event;c=c.listeners;e:{var p=void 0;if(o)for(var v=c.length-1;0<=v;v--){var R=c[v],M=R.instance,q=R.currentTarget;if(R=R.listener,M!==p&&d.isPropagationStopped())break e;p=R,d.currentTarget=q;try{p(d)}catch(Q){Sc(Q)}d.currentTarget=null,p=M}else for(v=0;v<c.length;v++){if(R=c[v],M=R.instance,q=R.currentTarget,R=R.listener,M!==p&&d.isPropagationStopped())break e;p=R,d.currentTarget=q;try{p(d)}catch(Q){Sc(Q)}d.currentTarget=null,p=M}}}}function Ae(n,o){var i=o[ef];i===void 0&&(i=o[ef]=new Set);var c=n+"__bubble";i.has(c)||(Xv(o,n,2,!1),i.add(c))}function Vd(n,o,i){var c=0;o&&(c|=4),Xv(i,n,c,o)}var il="_reactListening"+Math.random().toString(36).slice(2);function Fd(n){if(!n[il]){n[il]=!0,Fm.forEach(function(i){i!=="selectionchange"&&(vC.has(i)||Vd(i,!1,n),Vd(i,!0,n))});var o=n.nodeType===9?n:n.ownerDocument;o===null||o[il]||(o[il]=!0,Vd("selectionchange",!1,o))}}function Xv(n,o,i,c){switch(Cb(o)){case 2:var d=ZC;break;case 8:d=QC;break;default:d=sh}i=d.bind(null,o,i,n),d=void 0,!uf||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(d=!0),c?d!==void 0?n.addEventListener(o,i,{capture:!0,passive:d}):n.addEventListener(o,i,!0):d!==void 0?n.addEventListener(o,i,{passive:d}):n.addEventListener(o,i,!1)}function Hd(n,o,i,c,d){var p=c;if((o&1)===0&&(o&2)===0&&c!==null)e:for(;;){if(c===null)return;var v=c.tag;if(v===3||v===4){var R=c.stateNode.containerInfo;if(R===d)break;if(v===4)for(v=c.return;v!==null;){var M=v.tag;if((M===3||M===4)&&v.stateNode.containerInfo===d)return;v=v.return}for(;R!==null;){if(v=ls(R),v===null)return;if(M=v.tag,M===5||M===6||M===26||M===27){c=p=v;continue e}R=R.parentNode}}c=c.return}ng(function(){var q=p,Q=cf(i),J=[];e:{var F=Mg.get(n);if(F!==void 0){var Z=yc,ae=n;switch(n){case"keypress":if(mc(i)===0)break e;case"keydown":case"keyup":Z=fR;break;case"focusin":ae="focus",Z=pf;break;case"focusout":ae="blur",Z=pf;break;case"beforeblur":case"afterblur":Z=pf;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Z=sg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Z=WE;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Z=pR;break;case Cg:case Tg:case Ag:Z=nR;break;case Og:Z=gR;break;case"scroll":case"scrollend":Z=XE;break;case"wheel":Z=vR;break;case"copy":case"cut":case"paste":Z=oR;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Z=ag;break;case"toggle":case"beforetoggle":Z=SR}var ye=(o&4)!==0,Ve=!ye&&(n==="scroll"||n==="scrollend"),U=ye?F!==null?F+"Capture":null:F;ye=[];for(var z=q,B;z!==null;){var K=z;if(B=K.stateNode,K=K.tag,K!==5&&K!==26&&K!==27||B===null||U===null||(K=zi(z,U),K!=null&&ye.push(da(z,K,B))),Ve)break;z=z.return}0<ye.length&&(F=new Z(F,ae,null,i,Q),J.push({event:F,listeners:ye}))}}if((o&7)===0){e:{if(F=n==="mouseover"||n==="pointerover",Z=n==="mouseout"||n==="pointerout",F&&i!==af&&(ae=i.relatedTarget||i.fromElement)&&(ls(ae)||ae[cs]))break e;if((Z||F)&&(F=Q.window===Q?Q:(F=Q.ownerDocument)?F.defaultView||F.parentWindow:window,Z?(ae=i.relatedTarget||i.toElement,Z=q,ae=ae?ls(ae):null,ae!==null&&(Ve=l(ae),ye=ae.tag,ae!==Ve||ye!==5&&ye!==27&&ye!==6)&&(ae=null)):(Z=null,ae=q),Z!==ae)){if(ye=sg,K="onMouseLeave",U="onMouseEnter",z="mouse",(n==="pointerout"||n==="pointerover")&&(ye=ag,K="onPointerLeave",U="onPointerEnter",z="pointer"),Ve=Z==null?F:Ni(Z),B=ae==null?F:Ni(ae),F=new ye(K,z+"leave",Z,i,Q),F.target=Ve,F.relatedTarget=B,K=null,ls(Q)===q&&(ye=new ye(U,z+"enter",ae,i,Q),ye.target=B,ye.relatedTarget=Ve,K=ye),Ve=K,Z&&ae)t:{for(ye=bC,U=Z,z=ae,B=0,K=U;K;K=ye(K))B++;K=0;for(var pe=z;pe;pe=ye(pe))K++;for(;0<B-K;)U=ye(U),B--;for(;0<K-B;)z=ye(z),K--;for(;B--;){if(U===z||z!==null&&U===z.alternate){ye=U;break t}U=ye(U),z=ye(z)}ye=null}else ye=null;Z!==null&&Jv(J,F,Z,ye,!1),ae!==null&&Ve!==null&&Jv(J,Ve,ae,ye,!0)}}e:{if(F=q?Ni(q):window,Z=F.nodeName&&F.nodeName.toLowerCase(),Z==="select"||Z==="input"&&F.type==="file")var ze=mg;else if(hg(F))if(gg)ze=MR;else{ze=AR;var fe=TR}else Z=F.nodeName,!Z||Z.toLowerCase()!=="input"||F.type!=="checkbox"&&F.type!=="radio"?q&&sf(q.elementType)&&(ze=mg):ze=OR;if(ze&&(ze=ze(n,q))){pg(J,ze,i,Q);break e}fe&&fe(n,F,q),n==="focusout"&&q&&F.type==="number"&&q.memoizedProps.value!=null&&of(F,"number",F.value)}switch(fe=q?Ni(q):window,n){case"focusin":(hg(fe)||fe.contentEditable==="true")&&(vs=fe,Sf=q,Bi=null);break;case"focusout":Bi=Sf=vs=null;break;case"mousedown":wf=!0;break;case"contextmenu":case"mouseup":case"dragend":wf=!1,Eg(J,i,Q);break;case"selectionchange":if(NR)break;case"keydown":case"keyup":Eg(J,i,Q)}var Ee;if(gf)e:{switch(n){case"compositionstart":var Me="onCompositionStart";break e;case"compositionend":Me="onCompositionEnd";break e;case"compositionupdate":Me="onCompositionUpdate";break e}Me=void 0}else ys?fg(n,i)&&(Me="onCompositionEnd"):n==="keydown"&&i.keyCode===229&&(Me="onCompositionStart");Me&&(cg&&i.locale!=="ko"&&(ys||Me!=="onCompositionStart"?Me==="onCompositionEnd"&&ys&&(Ee=rg()):(zr=Q,ff="value"in zr?zr.value:zr.textContent,ys=!0)),fe=al(q,Me),0<fe.length&&(Me=new ig(Me,n,null,i,Q),J.push({event:Me,listeners:fe}),Ee?Me.data=Ee:(Ee=dg(i),Ee!==null&&(Me.data=Ee)))),(Ee=_R?xR(n,i):ER(n,i))&&(Me=al(q,"onBeforeInput"),0<Me.length&&(fe=new ig("onBeforeInput","beforeinput",null,i,Q),J.push({event:fe,listeners:Me}),fe.data=Ee)),mC(J,n,q,i,Q)}Kv(J,o)})}function da(n,o,i){return{instance:n,listener:o,currentTarget:i}}function al(n,o){for(var i=o+"Capture",c=[];n!==null;){var d=n,p=d.stateNode;if(d=d.tag,d!==5&&d!==26&&d!==27||p===null||(d=zi(n,i),d!=null&&c.unshift(da(n,d,p)),d=zi(n,o),d!=null&&c.push(da(n,d,p))),n.tag===3)return c;n=n.return}return[]}function bC(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function Jv(n,o,i,c,d){for(var p=o._reactName,v=[];i!==null&&i!==c;){var R=i,M=R.alternate,q=R.stateNode;if(R=R.tag,M!==null&&M===c)break;R!==5&&R!==26&&R!==27||q===null||(M=q,d?(q=zi(i,p),q!=null&&v.unshift(da(i,q,M))):d||(q=zi(i,p),q!=null&&v.push(da(i,q,M)))),i=i.return}v.length!==0&&n.push({event:o,listeners:v})}var SC=/\r\n?/g,wC=/\u0000|\uFFFD/g;function Wv(n){return(typeof n=="string"?n:""+n).replace(SC,`
|
|
10
|
-
`).replace(wC,"")}function eb(n,o){return o=Wv(o),Wv(n)===o}function qe(n,o,i,c,d,p){switch(i){case"children":typeof c=="string"?o==="body"||o==="textarea"&&c===""||ps(n,c):(typeof c=="number"||typeof c=="bigint")&&o!=="body"&&ps(n,""+c);break;case"className":fc(n,"class",c);break;case"tabIndex":fc(n,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":fc(n,i,c);break;case"style":eg(n,c,p);break;case"data":if(o!=="object"){fc(n,"data",c);break}case"src":case"href":if(c===""&&(o!=="a"||i!=="href")){n.removeAttribute(i);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){n.removeAttribute(i);break}c=hc(""+c),n.setAttribute(i,c);break;case"action":case"formAction":if(typeof c=="function"){n.setAttribute(i,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof p=="function"&&(i==="formAction"?(o!=="input"&&qe(n,o,"name",d.name,d,null),qe(n,o,"formEncType",d.formEncType,d,null),qe(n,o,"formMethod",d.formMethod,d,null),qe(n,o,"formTarget",d.formTarget,d,null)):(qe(n,o,"encType",d.encType,d,null),qe(n,o,"method",d.method,d,null),qe(n,o,"target",d.target,d,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){n.removeAttribute(i);break}c=hc(""+c),n.setAttribute(i,c);break;case"onClick":c!=null&&(n.onclick=rr);break;case"onScroll":c!=null&&Ae("scroll",n);break;case"onScrollEnd":c!=null&&Ae("scrollend",n);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(s(61));if(i=c.__html,i!=null){if(d.children!=null)throw Error(s(60));n.innerHTML=i}}break;case"multiple":n.multiple=c&&typeof c!="function"&&typeof c!="symbol";break;case"muted":n.muted=c&&typeof c!="function"&&typeof c!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(c==null||typeof c=="function"||typeof c=="boolean"||typeof c=="symbol"){n.removeAttribute("xlink:href");break}i=hc(""+c),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":c!=null&&typeof c!="function"&&typeof c!="symbol"?n.setAttribute(i,""+c):n.removeAttribute(i);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":c&&typeof c!="function"&&typeof c!="symbol"?n.setAttribute(i,""):n.removeAttribute(i);break;case"capture":case"download":c===!0?n.setAttribute(i,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?n.setAttribute(i,c):n.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?n.setAttribute(i,c):n.removeAttribute(i);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?n.removeAttribute(i):n.setAttribute(i,c);break;case"popover":Ae("beforetoggle",n),Ae("toggle",n),uc(n,"popover",c);break;case"xlinkActuate":nr(n,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":nr(n,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":nr(n,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":nr(n,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":nr(n,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":nr(n,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":nr(n,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":nr(n,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":nr(n,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":uc(n,"is",c);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=YE.get(i)||i,uc(n,i,c))}}function Zd(n,o,i,c,d,p){switch(i){case"style":eg(n,c,p);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(s(61));if(i=c.__html,i!=null){if(d.children!=null)throw Error(s(60));n.innerHTML=i}}break;case"children":typeof c=="string"?ps(n,c):(typeof c=="number"||typeof c=="bigint")&&ps(n,""+c);break;case"onScroll":c!=null&&Ae("scroll",n);break;case"onScrollEnd":c!=null&&Ae("scrollend",n);break;case"onClick":c!=null&&(n.onclick=rr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Hm.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(d=i.endsWith("Capture"),o=i.slice(2,d?i.length-7:void 0),p=n[It]||null,p=p!=null?p[i]:null,typeof p=="function"&&n.removeEventListener(o,p,d),typeof c=="function")){typeof p!="function"&&p!==null&&(i in n?n[i]=null:n.hasAttribute(i)&&n.removeAttribute(i)),n.addEventListener(o,c,d);break e}i in n?n[i]=c:c===!0?n.setAttribute(i,""):uc(n,i,c)}}}function Tt(n,o,i){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ae("error",n),Ae("load",n);var c=!1,d=!1,p;for(p in i)if(i.hasOwnProperty(p)){var v=i[p];if(v!=null)switch(p){case"src":c=!0;break;case"srcSet":d=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,o));default:qe(n,o,p,v,i,null)}}d&&qe(n,o,"srcSet",i.srcSet,i,null),c&&qe(n,o,"src",i.src,i,null);return;case"input":Ae("invalid",n);var R=p=v=d=null,M=null,q=null;for(c in i)if(i.hasOwnProperty(c)){var Q=i[c];if(Q!=null)switch(c){case"name":d=Q;break;case"type":v=Q;break;case"checked":M=Q;break;case"defaultChecked":q=Q;break;case"value":p=Q;break;case"defaultValue":R=Q;break;case"children":case"dangerouslySetInnerHTML":if(Q!=null)throw Error(s(137,o));break;default:qe(n,o,c,Q,i,null)}}Km(n,p,R,M,q,v,d,!1);return;case"select":Ae("invalid",n),c=v=p=null;for(d in i)if(i.hasOwnProperty(d)&&(R=i[d],R!=null))switch(d){case"value":p=R;break;case"defaultValue":v=R;break;case"multiple":c=R;default:qe(n,o,d,R,i,null)}o=p,i=v,n.multiple=!!c,o!=null?hs(n,!!c,o,!1):i!=null&&hs(n,!!c,i,!0);return;case"textarea":Ae("invalid",n),p=d=c=null;for(v in i)if(i.hasOwnProperty(v)&&(R=i[v],R!=null))switch(v){case"value":c=R;break;case"defaultValue":d=R;break;case"children":p=R;break;case"dangerouslySetInnerHTML":if(R!=null)throw Error(s(91));break;default:qe(n,o,v,R,i,null)}Jm(n,c,d,p);return;case"option":for(M in i)if(i.hasOwnProperty(M)&&(c=i[M],c!=null))switch(M){case"selected":n.selected=c&&typeof c!="function"&&typeof c!="symbol";break;default:qe(n,o,M,c,i,null)}return;case"dialog":Ae("beforetoggle",n),Ae("toggle",n),Ae("cancel",n),Ae("close",n);break;case"iframe":case"object":Ae("load",n);break;case"video":case"audio":for(c=0;c<fa.length;c++)Ae(fa[c],n);break;case"image":Ae("error",n),Ae("load",n);break;case"details":Ae("toggle",n);break;case"embed":case"source":case"link":Ae("error",n),Ae("load",n);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(q in i)if(i.hasOwnProperty(q)&&(c=i[q],c!=null))switch(q){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,o));default:qe(n,o,q,c,i,null)}return;default:if(sf(o)){for(Q in i)i.hasOwnProperty(Q)&&(c=i[Q],c!==void 0&&Zd(n,o,Q,c,i,void 0));return}}for(R in i)i.hasOwnProperty(R)&&(c=i[R],c!=null&&qe(n,o,R,c,i,null))}function _C(n,o,i,c){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var d=null,p=null,v=null,R=null,M=null,q=null,Q=null;for(Z in i){var J=i[Z];if(i.hasOwnProperty(Z)&&J!=null)switch(Z){case"checked":break;case"value":break;case"defaultValue":M=J;default:c.hasOwnProperty(Z)||qe(n,o,Z,null,c,J)}}for(var F in c){var Z=c[F];if(J=i[F],c.hasOwnProperty(F)&&(Z!=null||J!=null))switch(F){case"type":p=Z;break;case"name":d=Z;break;case"checked":q=Z;break;case"defaultChecked":Q=Z;break;case"value":v=Z;break;case"defaultValue":R=Z;break;case"children":case"dangerouslySetInnerHTML":if(Z!=null)throw Error(s(137,o));break;default:Z!==J&&qe(n,o,F,Z,c,J)}}rf(n,v,R,M,q,Q,p,d);return;case"select":Z=v=R=F=null;for(p in i)if(M=i[p],i.hasOwnProperty(p)&&M!=null)switch(p){case"value":break;case"multiple":Z=M;default:c.hasOwnProperty(p)||qe(n,o,p,null,c,M)}for(d in c)if(p=c[d],M=i[d],c.hasOwnProperty(d)&&(p!=null||M!=null))switch(d){case"value":F=p;break;case"defaultValue":R=p;break;case"multiple":v=p;default:p!==M&&qe(n,o,d,p,c,M)}o=R,i=v,c=Z,F!=null?hs(n,!!i,F,!1):!!c!=!!i&&(o!=null?hs(n,!!i,o,!0):hs(n,!!i,i?[]:"",!1));return;case"textarea":Z=F=null;for(R in i)if(d=i[R],i.hasOwnProperty(R)&&d!=null&&!c.hasOwnProperty(R))switch(R){case"value":break;case"children":break;default:qe(n,o,R,null,c,d)}for(v in c)if(d=c[v],p=i[v],c.hasOwnProperty(v)&&(d!=null||p!=null))switch(v){case"value":F=d;break;case"defaultValue":Z=d;break;case"children":break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(s(91));break;default:d!==p&&qe(n,o,v,d,c,p)}Xm(n,F,Z);return;case"option":for(var ae in i)if(F=i[ae],i.hasOwnProperty(ae)&&F!=null&&!c.hasOwnProperty(ae))switch(ae){case"selected":n.selected=!1;break;default:qe(n,o,ae,null,c,F)}for(M in c)if(F=c[M],Z=i[M],c.hasOwnProperty(M)&&F!==Z&&(F!=null||Z!=null))switch(M){case"selected":n.selected=F&&typeof F!="function"&&typeof F!="symbol";break;default:qe(n,o,M,F,c,Z)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var ye in i)F=i[ye],i.hasOwnProperty(ye)&&F!=null&&!c.hasOwnProperty(ye)&&qe(n,o,ye,null,c,F);for(q in c)if(F=c[q],Z=i[q],c.hasOwnProperty(q)&&F!==Z&&(F!=null||Z!=null))switch(q){case"children":case"dangerouslySetInnerHTML":if(F!=null)throw Error(s(137,o));break;default:qe(n,o,q,F,c,Z)}return;default:if(sf(o)){for(var Ve in i)F=i[Ve],i.hasOwnProperty(Ve)&&F!==void 0&&!c.hasOwnProperty(Ve)&&Zd(n,o,Ve,void 0,c,F);for(Q in c)F=c[Q],Z=i[Q],!c.hasOwnProperty(Q)||F===Z||F===void 0&&Z===void 0||Zd(n,o,Q,F,c,Z);return}}for(var U in i)F=i[U],i.hasOwnProperty(U)&&F!=null&&!c.hasOwnProperty(U)&&qe(n,o,U,null,c,F);for(J in c)F=c[J],Z=i[J],!c.hasOwnProperty(J)||F===Z||F==null&&Z==null||qe(n,o,J,F,c,Z)}function tb(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function xC(){if(typeof performance.getEntriesByType=="function"){for(var n=0,o=0,i=performance.getEntriesByType("resource"),c=0;c<i.length;c++){var d=i[c],p=d.transferSize,v=d.initiatorType,R=d.duration;if(p&&R&&tb(v)){for(v=0,R=d.responseEnd,c+=1;c<i.length;c++){var M=i[c],q=M.startTime;if(q>R)break;var Q=M.transferSize,J=M.initiatorType;Q&&tb(J)&&(M=M.responseEnd,v+=Q*(M<R?1:(R-q)/(M-q)))}if(--c,o+=8*(p+v)/(d.duration/1e3),n++,10<n)break}}if(0<n)return o/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?n:5}var Qd=null,Gd=null;function cl(n){return n.nodeType===9?n:n.ownerDocument}function nb(n){switch(n){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function rb(n,o){if(n===0)switch(o){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&o==="foreignObject"?0:n}function Yd(n,o){return n==="textarea"||n==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.children=="bigint"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var Kd=null;function EC(){var n=window.event;return n&&n.type==="popstate"?n===Kd?!1:(Kd=n,!0):(Kd=null,!1)}var ob=typeof setTimeout=="function"?setTimeout:void 0,RC=typeof clearTimeout=="function"?clearTimeout:void 0,sb=typeof Promise=="function"?Promise:void 0,CC=typeof queueMicrotask=="function"?queueMicrotask:typeof sb<"u"?function(n){return sb.resolve(null).then(n).catch(TC)}:ob;function TC(n){setTimeout(function(){throw n})}function Kr(n){return n==="head"}function ib(n,o){var i=o,c=0;do{var d=i.nextSibling;if(n.removeChild(i),d&&d.nodeType===8)if(i=d.data,i==="/$"||i==="/&"){if(c===0){n.removeChild(d),Hs(o);return}c--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")c++;else if(i==="html")ha(n.ownerDocument.documentElement);else if(i==="head"){i=n.ownerDocument.head,ha(i);for(var p=i.firstChild;p;){var v=p.nextSibling,R=p.nodeName;p[ki]||R==="SCRIPT"||R==="STYLE"||R==="LINK"&&p.rel.toLowerCase()==="stylesheet"||i.removeChild(p),p=v}}else i==="body"&&ha(n.ownerDocument.body);i=d}while(i);Hs(o)}function ab(n,o){var i=n;n=0;do{var c=i.nextSibling;if(i.nodeType===1?o?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(o?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),c&&c.nodeType===8)if(i=c.data,i==="/$"){if(n===0)break;n--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||n++;i=c}while(i)}function Xd(n){var o=n.firstChild;for(o&&o.nodeType===10&&(o=o.nextSibling);o;){var i=o;switch(o=o.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":Xd(i),tf(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}n.removeChild(i)}}function AC(n,o,i,c){for(;n.nodeType===1;){var d=i;if(n.nodeName.toLowerCase()!==o.toLowerCase()){if(!c&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(c){if(!n[ki])switch(o){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(p=n.getAttribute("rel"),p==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(p!==d.rel||n.getAttribute("href")!==(d.href==null||d.href===""?null:d.href)||n.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin)||n.getAttribute("title")!==(d.title==null?null:d.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(p=n.getAttribute("src"),(p!==(d.src==null?null:d.src)||n.getAttribute("type")!==(d.type==null?null:d.type)||n.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin))&&p&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(o==="input"&&n.type==="hidden"){var p=d.name==null?null:""+d.name;if(d.type==="hidden"&&n.getAttribute("name")===p)return n}else return n;if(n=Sn(n.nextSibling),n===null)break}return null}function OC(n,o,i){if(o==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!i||(n=Sn(n.nextSibling),n===null))return null;return n}function cb(n,o){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!o||(n=Sn(n.nextSibling),n===null))return null;return n}function Jd(n){return n.data==="$?"||n.data==="$~"}function Wd(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function MC(n,o){var i=n.ownerDocument;if(n.data==="$~")n._reactRetry=o;else if(n.data!=="$?"||i.readyState!=="loading")o();else{var c=function(){o(),i.removeEventListener("DOMContentLoaded",c)};i.addEventListener("DOMContentLoaded",c),n._reactRetry=c}}function Sn(n){for(;n!=null;n=n.nextSibling){var o=n.nodeType;if(o===1||o===3)break;if(o===8){if(o=n.data,o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"||o==="F!"||o==="F")break;if(o==="/$"||o==="/&")return null}}return n}var eh=null;function lb(n){n=n.nextSibling;for(var o=0;n;){if(n.nodeType===8){var i=n.data;if(i==="/$"||i==="/&"){if(o===0)return Sn(n.nextSibling);o--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||o++}n=n.nextSibling}return null}function ub(n){n=n.previousSibling;for(var o=0;n;){if(n.nodeType===8){var i=n.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(o===0)return n;o--}else i!=="/$"&&i!=="/&"||o++}n=n.previousSibling}return null}function fb(n,o,i){switch(o=cl(i),n){case"html":if(n=o.documentElement,!n)throw Error(s(452));return n;case"head":if(n=o.head,!n)throw Error(s(453));return n;case"body":if(n=o.body,!n)throw Error(s(454));return n;default:throw Error(s(451))}}function ha(n){for(var o=n.attributes;o.length;)n.removeAttributeNode(o[0]);tf(n)}var wn=new Map,db=new Set;function ll(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var br=Y.d;Y.d={f:kC,r:NC,D:zC,C:jC,L:LC,m:DC,X:UC,S:PC,M:$C};function kC(){var n=br.f(),o=el();return n||o}function NC(n){var o=us(n);o!==null&&o.tag===5&&o.type==="form"?Oy(o):br.r(n)}var qs=typeof document>"u"?null:document;function hb(n,o,i){var c=qs;if(c&&typeof o=="string"&&o){var d=hn(o);d='link[rel="'+n+'"][href="'+d+'"]',typeof i=="string"&&(d+='[crossorigin="'+i+'"]'),db.has(d)||(db.add(d),n={rel:n,crossOrigin:i,href:o},c.querySelector(d)===null&&(o=c.createElement("link"),Tt(o,"link",n),St(o),c.head.appendChild(o)))}}function zC(n){br.D(n),hb("dns-prefetch",n,null)}function jC(n,o){br.C(n,o),hb("preconnect",n,o)}function LC(n,o,i){br.L(n,o,i);var c=qs;if(c&&n&&o){var d='link[rel="preload"][as="'+hn(o)+'"]';o==="image"&&i&&i.imageSrcSet?(d+='[imagesrcset="'+hn(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(d+='[imagesizes="'+hn(i.imageSizes)+'"]')):d+='[href="'+hn(n)+'"]';var p=d;switch(o){case"style":p=Vs(n);break;case"script":p=Fs(n)}wn.has(p)||(n=g({rel:"preload",href:o==="image"&&i&&i.imageSrcSet?void 0:n,as:o},i),wn.set(p,n),c.querySelector(d)!==null||o==="style"&&c.querySelector(pa(p))||o==="script"&&c.querySelector(ma(p))||(o=c.createElement("link"),Tt(o,"link",n),St(o),c.head.appendChild(o)))}}function DC(n,o){br.m(n,o);var i=qs;if(i&&n){var c=o&&typeof o.as=="string"?o.as:"script",d='link[rel="modulepreload"][as="'+hn(c)+'"][href="'+hn(n)+'"]',p=d;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":p=Fs(n)}if(!wn.has(p)&&(n=g({rel:"modulepreload",href:n},o),wn.set(p,n),i.querySelector(d)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(ma(p)))return}c=i.createElement("link"),Tt(c,"link",n),St(c),i.head.appendChild(c)}}}function PC(n,o,i){br.S(n,o,i);var c=qs;if(c&&n){var d=fs(c).hoistableStyles,p=Vs(n);o=o||"default";var v=d.get(p);if(!v){var R={loading:0,preload:null};if(v=c.querySelector(pa(p)))R.loading=5;else{n=g({rel:"stylesheet",href:n,"data-precedence":o},i),(i=wn.get(p))&&th(n,i);var M=v=c.createElement("link");St(M),Tt(M,"link",n),M._p=new Promise(function(q,Q){M.onload=q,M.onerror=Q}),M.addEventListener("load",function(){R.loading|=1}),M.addEventListener("error",function(){R.loading|=2}),R.loading|=4,ul(v,o,c)}v={type:"stylesheet",instance:v,count:1,state:R},d.set(p,v)}}}function UC(n,o){br.X(n,o);var i=qs;if(i&&n){var c=fs(i).hoistableScripts,d=Fs(n),p=c.get(d);p||(p=i.querySelector(ma(d)),p||(n=g({src:n,async:!0},o),(o=wn.get(d))&&nh(n,o),p=i.createElement("script"),St(p),Tt(p,"link",n),i.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},c.set(d,p))}}function $C(n,o){br.M(n,o);var i=qs;if(i&&n){var c=fs(i).hoistableScripts,d=Fs(n),p=c.get(d);p||(p=i.querySelector(ma(d)),p||(n=g({src:n,async:!0,type:"module"},o),(o=wn.get(d))&&nh(n,o),p=i.createElement("script"),St(p),Tt(p,"link",n),i.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},c.set(d,p))}}function pb(n,o,i,c){var d=(d=ge.current)?ll(d):null;if(!d)throw Error(s(446));switch(n){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(o=Vs(i.href),i=fs(d).hoistableStyles,c=i.get(o),c||(c={type:"style",instance:null,count:0,state:null},i.set(o,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){n=Vs(i.href);var p=fs(d).hoistableStyles,v=p.get(n);if(v||(d=d.ownerDocument||d,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},p.set(n,v),(p=d.querySelector(pa(n)))&&!p._p&&(v.instance=p,v.state.loading=5),wn.has(n)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},wn.set(n,i),p||IC(d,n,i,v.state))),o&&c===null)throw Error(s(528,""));return v}if(o&&c!==null)throw Error(s(529,""));return null;case"script":return o=i.async,i=i.src,typeof i=="string"&&o&&typeof o!="function"&&typeof o!="symbol"?(o=Fs(i),i=fs(d).hoistableScripts,c=i.get(o),c||(c={type:"script",instance:null,count:0,state:null},i.set(o,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,n))}}function Vs(n){return'href="'+hn(n)+'"'}function pa(n){return'link[rel="stylesheet"]['+n+"]"}function mb(n){return g({},n,{"data-precedence":n.precedence,precedence:null})}function IC(n,o,i,c){n.querySelector('link[rel="preload"][as="style"]['+o+"]")?c.loading=1:(o=n.createElement("link"),c.preload=o,o.addEventListener("load",function(){return c.loading|=1}),o.addEventListener("error",function(){return c.loading|=2}),Tt(o,"link",i),St(o),n.head.appendChild(o))}function Fs(n){return'[src="'+hn(n)+'"]'}function ma(n){return"script[async]"+n}function gb(n,o,i){if(o.count++,o.instance===null)switch(o.type){case"style":var c=n.querySelector('style[data-href~="'+hn(i.href)+'"]');if(c)return o.instance=c,St(c),c;var d=g({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return c=(n.ownerDocument||n).createElement("style"),St(c),Tt(c,"style",d),ul(c,i.precedence,n),o.instance=c;case"stylesheet":d=Vs(i.href);var p=n.querySelector(pa(d));if(p)return o.state.loading|=4,o.instance=p,St(p),p;c=mb(i),(d=wn.get(d))&&th(c,d),p=(n.ownerDocument||n).createElement("link"),St(p);var v=p;return v._p=new Promise(function(R,M){v.onload=R,v.onerror=M}),Tt(p,"link",c),o.state.loading|=4,ul(p,i.precedence,n),o.instance=p;case"script":return p=Fs(i.src),(d=n.querySelector(ma(p)))?(o.instance=d,St(d),d):(c=i,(d=wn.get(p))&&(c=g({},i),nh(c,d)),n=n.ownerDocument||n,d=n.createElement("script"),St(d),Tt(d,"link",c),n.head.appendChild(d),o.instance=d);case"void":return null;default:throw Error(s(443,o.type))}else o.type==="stylesheet"&&(o.state.loading&4)===0&&(c=o.instance,o.state.loading|=4,ul(c,i.precedence,n));return o.instance}function ul(n,o,i){for(var c=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),d=c.length?c[c.length-1]:null,p=d,v=0;v<c.length;v++){var R=c[v];if(R.dataset.precedence===o)p=R;else if(p!==d)break}p?p.parentNode.insertBefore(n,p.nextSibling):(o=i.nodeType===9?i.head:i,o.insertBefore(n,o.firstChild))}function th(n,o){n.crossOrigin==null&&(n.crossOrigin=o.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=o.referrerPolicy),n.title==null&&(n.title=o.title)}function nh(n,o){n.crossOrigin==null&&(n.crossOrigin=o.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=o.referrerPolicy),n.integrity==null&&(n.integrity=o.integrity)}var fl=null;function yb(n,o,i){if(fl===null){var c=new Map,d=fl=new Map;d.set(i,c)}else d=fl,c=d.get(i),c||(c=new Map,d.set(i,c));if(c.has(n))return c;for(c.set(n,null),i=i.getElementsByTagName(n),d=0;d<i.length;d++){var p=i[d];if(!(p[ki]||p[xt]||n==="link"&&p.getAttribute("rel")==="stylesheet")&&p.namespaceURI!=="http://www.w3.org/2000/svg"){var v=p.getAttribute(o)||"";v=n+v;var R=c.get(v);R?R.push(p):c.set(v,[p])}}return c}function vb(n,o,i){n=n.ownerDocument||n,n.head.insertBefore(i,o==="title"?n.querySelector("head > title"):null)}function BC(n,o,i){if(i===1||o.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof o.precedence!="string"||typeof o.href!="string"||o.href==="")break;return!0;case"link":if(typeof o.rel!="string"||typeof o.href!="string"||o.href===""||o.onLoad||o.onError)break;switch(o.rel){case"stylesheet":return n=o.disabled,typeof o.precedence=="string"&&n==null;default:return!0}case"script":if(o.async&&typeof o.async!="function"&&typeof o.async!="symbol"&&!o.onLoad&&!o.onError&&o.src&&typeof o.src=="string")return!0}return!1}function bb(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function qC(n,o,i,c){if(i.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var d=Vs(c.href),p=o.querySelector(pa(d));if(p){o=p._p,o!==null&&typeof o=="object"&&typeof o.then=="function"&&(n.count++,n=dl.bind(n),o.then(n,n)),i.state.loading|=4,i.instance=p,St(p);return}p=o.ownerDocument||o,c=mb(c),(d=wn.get(d))&&th(c,d),p=p.createElement("link"),St(p);var v=p;v._p=new Promise(function(R,M){v.onload=R,v.onerror=M}),Tt(p,"link",c),i.instance=p}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(i,o),(o=i.state.preload)&&(i.state.loading&3)===0&&(n.count++,i=dl.bind(n),o.addEventListener("load",i),o.addEventListener("error",i))}}var rh=0;function VC(n,o){return n.stylesheets&&n.count===0&&pl(n,n.stylesheets),0<n.count||0<n.imgCount?function(i){var c=setTimeout(function(){if(n.stylesheets&&pl(n,n.stylesheets),n.unsuspend){var p=n.unsuspend;n.unsuspend=null,p()}},6e4+o);0<n.imgBytes&&rh===0&&(rh=62500*xC());var d=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&pl(n,n.stylesheets),n.unsuspend)){var p=n.unsuspend;n.unsuspend=null,p()}},(n.imgBytes>rh?50:800)+o);return n.unsuspend=i,function(){n.unsuspend=null,clearTimeout(c),clearTimeout(d)}}:null}function dl(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)pl(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var hl=null;function pl(n,o){n.stylesheets=null,n.unsuspend!==null&&(n.count++,hl=new Map,o.forEach(FC,n),hl=null,dl.call(n))}function FC(n,o){if(!(o.state.loading&4)){var i=hl.get(n);if(i)var c=i.get(null);else{i=new Map,hl.set(n,i);for(var d=n.querySelectorAll("link[data-precedence],style[data-precedence]"),p=0;p<d.length;p++){var v=d[p];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(i.set(v.dataset.precedence,v),c=v)}c&&i.set(null,c)}d=o.instance,v=d.getAttribute("data-precedence"),p=i.get(v)||c,p===c&&i.set(null,d),i.set(v,d),this.count++,c=dl.bind(this),d.addEventListener("load",c),d.addEventListener("error",c),p?p.parentNode.insertBefore(d,p.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(d,n.firstChild)),o.state.loading|=4}}var ga={$$typeof:k,Provider:null,Consumer:null,_currentValue:V,_currentValue2:V,_threadCount:0};function HC(n,o,i,c,d,p,v,R,M){this.tag=1,this.containerInfo=n,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Xu(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Xu(0),this.hiddenUpdates=Xu(null),this.identifierPrefix=c,this.onUncaughtError=d,this.onCaughtError=p,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=M,this.incompleteTransitions=new Map}function Sb(n,o,i,c,d,p,v,R,M,q,Q,J){return n=new HC(n,o,i,v,M,q,Q,J,R),o=1,p===!0&&(o|=24),p=tn(3,null,null,o),n.current=p,p.stateNode=n,o=Df(),o.refCount++,n.pooledCache=o,o.refCount++,p.memoizedState={element:c,isDehydrated:i,cache:o},If(p),n}function wb(n){return n?(n=ws,n):ws}function _b(n,o,i,c,d,p){d=wb(d),c.context===null?c.context=d:c.pendingContext=d,c=$r(o),c.payload={element:i},p=p===void 0?null:p,p!==null&&(c.callback=p),i=Ir(n,c,o),i!==null&&(Zt(i,n,o),Gi(i,n,o))}function xb(n,o){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var i=n.retryLane;n.retryLane=i!==0&&i<o?i:o}}function oh(n,o){xb(n,o),(n=n.alternate)&&xb(n,o)}function Eb(n){if(n.tag===13||n.tag===31){var o=Oo(n,67108864);o!==null&&Zt(o,n,67108864),oh(n,67108864)}}function Rb(n){if(n.tag===13||n.tag===31){var o=an();o=Ju(o);var i=Oo(n,o);i!==null&&Zt(i,n,o),oh(n,o)}}var ml=!0;function ZC(n,o,i,c){var d=P.T;P.T=null;var p=Y.p;try{Y.p=2,sh(n,o,i,c)}finally{Y.p=p,P.T=d}}function QC(n,o,i,c){var d=P.T;P.T=null;var p=Y.p;try{Y.p=8,sh(n,o,i,c)}finally{Y.p=p,P.T=d}}function sh(n,o,i,c){if(ml){var d=ih(c);if(d===null)Hd(n,o,c,gl,i),Tb(n,c);else if(YC(d,n,o,i,c))c.stopPropagation();else if(Tb(n,c),o&4&&-1<GC.indexOf(n)){for(;d!==null;){var p=us(d);if(p!==null)switch(p.tag){case 3:if(p=p.stateNode,p.current.memoizedState.isDehydrated){var v=Eo(p.pendingLanes);if(v!==0){var R=p;for(R.pendingLanes|=2,R.entangledLanes|=2;v;){var M=1<<31-Wt(v);R.entanglements[1]|=M,v&=~M}In(p),(De&6)===0&&(Jc=xe()+500,ua(0))}}break;case 31:case 13:R=Oo(p,2),R!==null&&Zt(R,p,2),el(),oh(p,2)}if(p=ih(c),p===null&&Hd(n,o,c,gl,i),p===d)break;d=p}d!==null&&c.stopPropagation()}else Hd(n,o,c,null,i)}}function ih(n){return n=cf(n),ah(n)}var gl=null;function ah(n){if(gl=null,n=ls(n),n!==null){var o=l(n);if(o===null)n=null;else{var i=o.tag;if(i===13){if(n=u(o),n!==null)return n;n=null}else if(i===31){if(n=f(o),n!==null)return n;n=null}else if(i===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;n=null}else o!==n&&(n=null)}}return gl=n,null}function Cb(n){switch(n){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(mt()){case $t:return 2;case Ti:return 8;case sc:case jE:return 32;case Dm:return 268435456;default:return 32}default:return 32}}var ch=!1,Xr=null,Jr=null,Wr=null,ya=new Map,va=new Map,eo=[],GC="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Tb(n,o){switch(n){case"focusin":case"focusout":Xr=null;break;case"dragenter":case"dragleave":Jr=null;break;case"mouseover":case"mouseout":Wr=null;break;case"pointerover":case"pointerout":ya.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":va.delete(o.pointerId)}}function ba(n,o,i,c,d,p){return n===null||n.nativeEvent!==p?(n={blockedOn:o,domEventName:i,eventSystemFlags:c,nativeEvent:p,targetContainers:[d]},o!==null&&(o=us(o),o!==null&&Eb(o)),n):(n.eventSystemFlags|=c,o=n.targetContainers,d!==null&&o.indexOf(d)===-1&&o.push(d),n)}function YC(n,o,i,c,d){switch(o){case"focusin":return Xr=ba(Xr,n,o,i,c,d),!0;case"dragenter":return Jr=ba(Jr,n,o,i,c,d),!0;case"mouseover":return Wr=ba(Wr,n,o,i,c,d),!0;case"pointerover":var p=d.pointerId;return ya.set(p,ba(ya.get(p)||null,n,o,i,c,d)),!0;case"gotpointercapture":return p=d.pointerId,va.set(p,ba(va.get(p)||null,n,o,i,c,d)),!0}return!1}function Ab(n){var o=ls(n.target);if(o!==null){var i=l(o);if(i!==null){if(o=i.tag,o===13){if(o=u(i),o!==null){n.blockedOn=o,qm(n.priority,function(){Rb(i)});return}}else if(o===31){if(o=f(i),o!==null){n.blockedOn=o,qm(n.priority,function(){Rb(i)});return}}else if(o===3&&i.stateNode.current.memoizedState.isDehydrated){n.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}n.blockedOn=null}function yl(n){if(n.blockedOn!==null)return!1;for(var o=n.targetContainers;0<o.length;){var i=ih(n.nativeEvent);if(i===null){i=n.nativeEvent;var c=new i.constructor(i.type,i);af=c,i.target.dispatchEvent(c),af=null}else return o=us(i),o!==null&&Eb(o),n.blockedOn=i,!1;o.shift()}return!0}function Ob(n,o,i){yl(n)&&i.delete(o)}function KC(){ch=!1,Xr!==null&&yl(Xr)&&(Xr=null),Jr!==null&&yl(Jr)&&(Jr=null),Wr!==null&&yl(Wr)&&(Wr=null),ya.forEach(Ob),va.forEach(Ob)}function vl(n,o){n.blockedOn===o&&(n.blockedOn=null,ch||(ch=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,KC)))}var bl=null;function Mb(n){bl!==n&&(bl=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){bl===n&&(bl=null);for(var o=0;o<n.length;o+=3){var i=n[o],c=n[o+1],d=n[o+2];if(typeof c!="function"){if(ah(c||i)===null)continue;break}var p=us(i);p!==null&&(n.splice(o,3),o-=3,id(p,{pending:!0,data:d,method:i.method,action:c},c,d))}}))}function Hs(n){function o(M){return vl(M,n)}Xr!==null&&vl(Xr,n),Jr!==null&&vl(Jr,n),Wr!==null&&vl(Wr,n),ya.forEach(o),va.forEach(o);for(var i=0;i<eo.length;i++){var c=eo[i];c.blockedOn===n&&(c.blockedOn=null)}for(;0<eo.length&&(i=eo[0],i.blockedOn===null);)Ab(i),i.blockedOn===null&&eo.shift();if(i=(n.ownerDocument||n).$$reactFormReplay,i!=null)for(c=0;c<i.length;c+=3){var d=i[c],p=i[c+1],v=d[It]||null;if(typeof p=="function")v||Mb(i);else if(v){var R=null;if(p&&p.hasAttribute("formAction")){if(d=p,v=p[It]||null)R=v.formAction;else if(ah(d)!==null)continue}else R=v.action;typeof R=="function"?i[c+1]=R:(i.splice(c,3),c-=3),Mb(i)}}}function kb(){function n(p){p.canIntercept&&p.info==="react-transition"&&p.intercept({handler:function(){return new Promise(function(v){return d=v})},focusReset:"manual",scroll:"manual"})}function o(){d!==null&&(d(),d=null),c||setTimeout(i,20)}function i(){if(!c&&!navigation.transition){var p=navigation.currentEntry;p&&p.url!=null&&navigation.navigate(p.url,{state:p.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var c=!1,d=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",o),navigation.addEventListener("navigateerror",o),setTimeout(i,100),function(){c=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",o),navigation.removeEventListener("navigateerror",o),d!==null&&(d(),d=null)}}}function lh(n){this._internalRoot=n}Sl.prototype.render=lh.prototype.render=function(n){var o=this._internalRoot;if(o===null)throw Error(s(409));var i=o.current,c=an();_b(i,c,n,o,null,null)},Sl.prototype.unmount=lh.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var o=n.containerInfo;_b(n.current,2,null,n,null,null),el(),o[cs]=null}};function Sl(n){this._internalRoot=n}Sl.prototype.unstable_scheduleHydration=function(n){if(n){var o=Bm();n={blockedOn:null,target:n,priority:o};for(var i=0;i<eo.length&&o!==0&&o<eo[i].priority;i++);eo.splice(i,0,n),i===0&&Ab(n)}};var Nb=t.version;if(Nb!=="19.2.3")throw Error(s(527,Nb,"19.2.3"));Y.findDOMNode=function(n){var o=n._reactInternals;if(o===void 0)throw typeof n.render=="function"?Error(s(188)):(n=Object.keys(n).join(","),Error(s(268,n)));return n=m(o),n=n!==null?y(n):null,n=n===null?null:n.stateNode,n};var XC={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:P,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var wl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!wl.isDisabled&&wl.supportsFiber)try{Ai=wl.inject(XC),Jt=wl}catch{}}return wa.createRoot=function(n,o){if(!a(n))throw Error(s(299));var i=!1,c="",d=$y,p=Iy,v=By;return o!=null&&(o.unstable_strictMode===!0&&(i=!0),o.identifierPrefix!==void 0&&(c=o.identifierPrefix),o.onUncaughtError!==void 0&&(d=o.onUncaughtError),o.onCaughtError!==void 0&&(p=o.onCaughtError),o.onRecoverableError!==void 0&&(v=o.onRecoverableError)),o=Sb(n,1,!1,null,null,i,c,null,d,p,v,kb),n[cs]=o.current,Fd(n),new lh(o)},wa.hydrateRoot=function(n,o,i){if(!a(n))throw Error(s(299));var c=!1,d="",p=$y,v=Iy,R=By,M=null;return i!=null&&(i.unstable_strictMode===!0&&(c=!0),i.identifierPrefix!==void 0&&(d=i.identifierPrefix),i.onUncaughtError!==void 0&&(p=i.onUncaughtError),i.onCaughtError!==void 0&&(v=i.onCaughtError),i.onRecoverableError!==void 0&&(R=i.onRecoverableError),i.formState!==void 0&&(M=i.formState)),o=Sb(n,1,!0,o,i??null,c,d,M,p,v,R,kb),o.context=wb(null),i=o.current,c=an(),c=Ju(c),d=$r(c),d.callback=null,Ir(i,d,c),i=c,o.current.lanes=i,Mi(o,i),In(o),n[cs]=o.current,Fd(n),new Sl(o)},wa.version="19.2.3",wa}var qb;function a2(){if(qb)return dh.exports;qb=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),dh.exports=i2(),dh.exports}var c2=a2();const rp=new WeakMap,l2=new WeakMap,Gl={current:[]};let gh=!1,ka=0;const Ta=new Set,_l=new Map;function sw(e){for(const t of e){if(Gl.current.includes(t))continue;Gl.current.push(t),t.recompute();const r=l2.get(t);if(r)for(const s of r){const a=rp.get(s);a?.length&&sw(a)}}}function u2(e){const t={prevVal:e.prevState,currentVal:e.state};for(const r of e.listeners)r(t)}function f2(e){const t={prevVal:e.prevState,currentVal:e.state};for(const r of e.listeners)r(t)}function iw(e){if(ka>0&&!_l.has(e)&&_l.set(e,e.prevState),Ta.add(e),!(ka>0)&&!gh)try{for(gh=!0;Ta.size>0;){const t=Array.from(Ta);Ta.clear();for(const r of t){const s=_l.get(r)??r.prevState;r.prevState=s,u2(r)}for(const r of t){const s=rp.get(r);s&&(Gl.current.push(r),sw(s))}for(const r of t){const s=rp.get(r);if(s)for(const a of s)f2(a)}}}finally{gh=!1,Gl.current=[],_l.clear()}}function oi(e){ka++;try{e()}finally{if(ka--,ka===0){const t=Ta.values().next().value;t&&iw(t)}}}function d2(e){return typeof e=="function"}class h2{constructor(t,r){this.listeners=new Set,this.subscribe=s=>{var a,l;this.listeners.add(s);const u=(l=(a=this.options)==null?void 0:a.onSubscribe)==null?void 0:l.call(a,s,this);return()=>{this.listeners.delete(s),u?.()}},this.prevState=t,this.state=t,this.options=r}setState(t){var r,s,a;this.prevState=this.state,(r=this.options)!=null&&r.updateFn?this.state=this.options.updateFn(this.prevState)(t):d2(t)?this.state=t(this.prevState):this.state=t,(a=(s=this.options)==null?void 0:s.onUpdate)==null||a.call(s),iw(this)}}const lo="__TSR_index",Vb="popstate",Fb="beforeunload";function p2(e){let t=e.getLocation();const r=new Set,s=(u,f)=>{t=e.getLocation(),r.forEach(h=>h({location:t,action:u,navigateOpts:f}))},a=u=>{e.notifyOnIndexChange??!0?s(u):t=e.getLocation()},l=async({task:u,navigateOpts:f,...h})=>{if(f?.ignoreBlocker??!1)return u(),{type:"SUCCESS"};const y=e.getBlockers?.()??[],g=h.type==="PUSH"||h.type==="REPLACE";if(typeof document<"u"&&y.length&&g)for(const b of y){const S=Yl(h.path,h.state);if(await b.blockerFn({currentLocation:t,nextLocation:S,action:h.type}))return e.onBlocked?.(),{type:"BLOCKED"}}return u(),{type:"SUCCESS"}};return{get location(){return t},get length(){return e.getLength()},subscribers:r,subscribe:u=>(r.add(u),()=>{r.delete(u)}),push:(u,f,h)=>{const m=t.state[lo];return f=Hb(m+1,f),l({task:()=>{e.pushState(u,f),s({type:"PUSH"},h)},navigateOpts:h,type:"PUSH",path:u,state:f})},replace:(u,f,h)=>{const m=t.state[lo];return f=Hb(m,f),l({task:()=>{e.replaceState(u,f),s({type:"REPLACE"},h)},navigateOpts:h,type:"REPLACE",path:u,state:f})},go:(u,f)=>{l({task:()=>{e.go(u),a({type:"GO",index:u})},navigateOpts:f,type:"GO"})},back:u=>{l({task:()=>{e.back(u?.ignoreBlocker??!1),a({type:"BACK"})},navigateOpts:u,type:"BACK"})},forward:u=>{l({task:()=>{e.forward(u?.ignoreBlocker??!1),a({type:"FORWARD"})},navigateOpts:u,type:"FORWARD"})},canGoBack:()=>t.state[lo]!==0,createHref:u=>e.createHref(u),block:u=>{if(!e.setBlockers)return()=>{};const f=e.getBlockers?.()??[];return e.setBlockers([...f,u]),()=>{const h=e.getBlockers?.()??[];e.setBlockers?.(h.filter(m=>m!==u))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:s}}function Hb(e,t){t||(t={});const r=Cp();return{...t,key:r,__TSR_key:r,[lo]:e}}function m2(e){const t=typeof document<"u"?window:void 0,r=t.history.pushState,s=t.history.replaceState;let a=[];const l=()=>a,u=D=>a=D,f=(D=>D),h=(()=>Yl(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const D=Cp();t.history.replaceState({[lo]:0,key:D,__TSR_key:D},"")}let m=h(),y,g=!1,b=!1,S=!1,E=!1;const x=()=>m;let C,O;const L=()=>{C&&($._ignoreSubscribers=!0,(C.isPush?t.history.pushState:t.history.replaceState)(C.state,"",C.href),$._ignoreSubscribers=!1,C=void 0,O=void 0,y=void 0)},k=(D,W,ne)=>{const oe=f(W);O||(y=m),m=Yl(W,ne),C={href:oe,state:ne,isPush:C?.isPush||D==="push"},O||(O=Promise.resolve().then(()=>L()))},j=D=>{m=h(),$.notify({type:D})},I=async()=>{if(b){b=!1;return}const D=h(),W=D.state[lo]-m.state[lo],ne=W===1,oe=W===-1,ie=!ne&&!oe||g;g=!1;const de=ie?"GO":oe?"BACK":"FORWARD",ue=ie?{type:"GO",index:W}:{type:oe?"BACK":"FORWARD"};if(S)S=!1;else{const ve=l();if(typeof document<"u"&&ve.length){for(const P of ve)if(await P.blockerFn({currentLocation:m,nextLocation:D,action:de})){b=!0,t.history.go(1),$.notify(ue);return}}}m=h(),$.notify(ue)},H=D=>{if(E){E=!1;return}let W=!1;const ne=l();if(typeof document<"u"&&ne.length)for(const oe of ne){const ie=oe.enableBeforeUnload??!0;if(ie===!0){W=!0;break}if(typeof ie=="function"&&ie()===!0){W=!0;break}}if(W)return D.preventDefault(),D.returnValue=""},$=p2({getLocation:x,getLength:()=>t.history.length,pushState:(D,W)=>k("push",D,W),replaceState:(D,W)=>k("replace",D,W),back:D=>(D&&(S=!0),E=!0,t.history.back()),forward:D=>{D&&(S=!0),E=!0,t.history.forward()},go:D=>{g=!0,t.history.go(D)},createHref:D=>f(D),flush:L,destroy:()=>{t.history.pushState=r,t.history.replaceState=s,t.removeEventListener(Fb,H,{capture:!0}),t.removeEventListener(Vb,I)},onBlocked:()=>{y&&m!==y&&(m=y)},getBlockers:l,setBlockers:u,notifyOnIndexChange:!1});return t.addEventListener(Fb,H,{capture:!0}),t.addEventListener(Vb,I),t.history.pushState=function(...D){const W=r.apply(t.history,D);return $._ignoreSubscribers||j("PUSH"),W},t.history.replaceState=function(...D){const W=s.apply(t.history,D);return $._ignoreSubscribers||j("REPLACE"),W},$}function g2(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function Yl(e,t){const r=g2(e),s=r.indexOf("#"),a=r.indexOf("?"),l=Cp();return{href:r,pathname:r.substring(0,s>0?a>0?Math.min(s,a):s:a>0?a:r.length),hash:s>-1?r.substring(s):"",search:a>-1?r.slice(a,s===-1?void 0:s):"",state:t||{[lo]:0,key:l,__TSR_key:l}}}function Cp(){return(Math.random()+1).toString(36).substring(7)}function Kl(e){return e[e.length-1]}function y2(e){return typeof e=="function"}function ao(e,t){return y2(e)?e(t):e}const v2=Object.prototype.hasOwnProperty,Zb=Object.prototype.propertyIsEnumerable;function xn(e,t,r=0){if(e===t)return e;if(r>500)return t;const s=t,a=Yb(e)&&Yb(s);if(!a&&!(Xl(e)&&Xl(s)))return s;const l=a?e:Qb(e);if(!l)return s;const u=a?s:Qb(s);if(!u)return s;const f=l.length,h=u.length,m=a?new Array(h):{};let y=0;for(let g=0;g<h;g++){const b=a?g:u[g],S=e[b],E=s[b];if(S===E){m[b]=S,(a?g<f:v2.call(e,b))&&y++;continue}if(S===null||E===null||typeof S!="object"||typeof E!="object"){m[b]=E;continue}const x=xn(S,E,r+1);m[b]=x,x===S&&y++}return f===h&&y===f?e:m}function Qb(e){const t=Object.getOwnPropertyNames(e);for(const a of t)if(!Zb.call(e,a))return!1;const r=Object.getOwnPropertySymbols(e);if(r.length===0)return t;const s=t;for(const a of r){if(!Zb.call(e,a))return!1;s.push(a)}return s}function Xl(e){if(!Gb(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const r=t.prototype;return!(!Gb(r)||!r.hasOwnProperty("isPrototypeOf"))}function Gb(e){return Object.prototype.toString.call(e)==="[object Object]"}function Yb(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Qo(e,t,r){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let s=0,a=e.length;s<a;s++)if(!Qo(e[s],t[s],r))return!1;return!0}if(Xl(e)&&Xl(t)){const s=r?.ignoreUndefined??!0;if(r?.partial){for(const u in t)if((!s||t[u]!==void 0)&&!Qo(e[u],t[u],r))return!1;return!0}let a=0;if(!s)a=Object.keys(e).length;else for(const u in e)e[u]!==void 0&&a++;let l=0;for(const u in t)if((!s||t[u]!==void 0)&&(l++,l>a||!Qo(e[u],t[u],r)))return!1;return a===l}return!1}function Ko(e){let t,r;const s=new Promise((a,l)=>{t=a,r=l});return s.status="pending",s.resolve=a=>{s.status="resolved",s.value=a,t(a),e?.(a)},s.reject=a=>{s.status="rejected",r(a)},s}function b2(e){return typeof e?.message!="string"?!1:e.message.startsWith("Failed to fetch dynamically imported module")||e.message.startsWith("error loading dynamically imported module")||e.message.startsWith("Importing a module script failed")}function uo(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function S2(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function Kb(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,r=>{try{return decodeURI(r)}catch{return r}})}return S2(t)}const aw=["http:","https:","mailto:","tel:"];function Jl(e){if(!e)return!1;try{const t=new URL(e);return!aw.includes(t.protocol)}catch{return!1}}const w2={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},_2=/[&><\u2028\u2029]/g;function cw(e){return e.replace(_2,t=>w2[t])}function yh(e,t){if(!e)return e;const r=/%25|%5C/gi;let s=0,a="",l;for(;(l=r.exec(e))!==null;)a+=Kb(e.slice(s,l.index))+l[0],s=r.lastIndex;return a=a+Kb(s?e.slice(s):e),a.startsWith("//")&&(a="/"+a.replace(/^\/+/,"")),a}var x2="Invariant failed";function Kt(e,t){if(!e)throw new Error(x2)}function Wl(e){const t=new Map;let r,s;const a=l=>{l.next&&(l.prev?(l.prev.next=l.next,l.next.prev=l.prev,l.next=void 0,s&&(s.next=l,l.prev=s)):(l.next.prev=void 0,r=l.next,l.next=void 0,s&&(l.prev=s,s.next=l)),s=l)};return{get(l){const u=t.get(l);if(u)return a(u),u.value},set(l,u){if(t.size>=e&&r){const h=r;t.delete(h.key),h.next&&(r=h.next,h.next.prev=void 0),h===s&&(s=void 0)}const f=t.get(l);if(f)f.value=u,a(f);else{const h={key:l,value:u,prev:s};s&&(s.next=h),s=h,r||(r=h),t.set(l,h)}},clear(){t.clear(),r=void 0,s=void 0}}}const hi=0,Xo=1,Jo=2,Pa=3,Fo=4,lw=5,E2=/^([^{]*)\{\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,R2=/^([^{]*)\{-\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,C2=/^([^{]*)\{\$\}([^}]*)$/;function Tp(e,t,r=new Uint16Array(6)){const s=e.indexOf("/",t),a=s===-1?e.length:s,l=e.substring(t,a);if(!l||!l.includes("$"))return r[0]=hi,r[1]=t,r[2]=t,r[3]=a,r[4]=a,r[5]=a,r;if(l==="$"){const m=e.length;return r[0]=Jo,r[1]=t,r[2]=t,r[3]=m,r[4]=m,r[5]=m,r}if(l.charCodeAt(0)===36)return r[0]=Xo,r[1]=t,r[2]=t+1,r[3]=a,r[4]=a,r[5]=a,r;const u=l.match(C2);if(u){const y=u[1].length;return r[0]=Jo,r[1]=t+y,r[2]=t+y+1,r[3]=t+y+2,r[4]=t+y+3,r[5]=e.length,r}const f=l.match(R2);if(f){const m=f[1],y=f[2],g=f[3],b=m.length;return r[0]=Pa,r[1]=t+b,r[2]=t+b+3,r[3]=t+b+3+y.length,r[4]=a-g.length,r[5]=a,r}const h=l.match(E2);if(h){const m=h[1],y=h[2],g=h[3],b=m.length;return r[0]=Xo,r[1]=t+b,r[2]=t+b+2,r[3]=t+b+2+y.length,r[4]=a-g.length,r[5]=a,r}return r[0]=hi,r[1]=t,r[2]=t,r[3]=a,r[4]=a,r[5]=a,r}function xu(e,t,r,s,a,l,u){u?.(r);let f=s;{const h=r.fullPath??r.from,m=h.length,y=r.options?.caseSensitive??e,g=!!(r.options?.params?.parse&&r.options?.skipRouteOnParseError?.params);for(;f<m;){const S=Tp(h,f,t);let E;const x=f,C=S[5];switch(f=C+1,l++,S[0]){case hi:{const L=h.substring(S[2],S[3]);if(y){const k=a.static?.get(L);if(k)E=k;else{a.static??=new Map;const j=Ho(r.fullPath??r.from);j.parent=a,j.depth=l,E=j,a.static.set(L,j)}}else{const k=L.toLowerCase(),j=a.staticInsensitive?.get(k);if(j)E=j;else{a.staticInsensitive??=new Map;const I=Ho(r.fullPath??r.from);I.parent=a,I.depth=l,E=I,a.staticInsensitive.set(k,I)}}break}case Xo:{const L=h.substring(x,S[1]),k=h.substring(S[4],C),j=y&&!!(L||k),I=L?j?L:L.toLowerCase():void 0,H=k?j?k:k.toLowerCase():void 0,$=!g&&a.dynamic?.find(D=>!D.skipOnParamError&&D.caseSensitive===j&&D.prefix===I&&D.suffix===H);if($)E=$;else{const D=bh(Xo,r.fullPath??r.from,j,I,H);E=D,D.depth=l,D.parent=a,a.dynamic??=[],a.dynamic.push(D)}break}case Pa:{const L=h.substring(x,S[1]),k=h.substring(S[4],C),j=y&&!!(L||k),I=L?j?L:L.toLowerCase():void 0,H=k?j?k:k.toLowerCase():void 0,$=!g&&a.optional?.find(D=>!D.skipOnParamError&&D.caseSensitive===j&&D.prefix===I&&D.suffix===H);if($)E=$;else{const D=bh(Pa,r.fullPath??r.from,j,I,H);E=D,D.parent=a,D.depth=l,a.optional??=[],a.optional.push(D)}break}case Jo:{const L=h.substring(x,S[1]),k=h.substring(S[4],C),j=y&&!!(L||k),I=L?j?L:L.toLowerCase():void 0,H=k?j?k:k.toLowerCase():void 0,$=bh(Jo,r.fullPath??r.from,j,I,H);E=$,$.parent=a,$.depth=l,a.wildcard??=[],a.wildcard.push($)}}a=E}if(g&&r.children&&!r.isRoot&&r.id&&r.id.charCodeAt(r.id.lastIndexOf("/")+1)===95){const S=Ho(r.fullPath??r.from);S.kind=lw,S.parent=a,l++,S.depth=l,a.pathless??=[],a.pathless.push(S),a=S}const b=(r.path||!r.children)&&!r.isRoot;if(b&&h.endsWith("/")){const S=Ho(r.fullPath??r.from);S.kind=Fo,S.parent=a,l++,S.depth=l,a.index=S,a=S}a.parse=r.options?.params?.parse??null,a.skipOnParamError=g,a.parsingPriority=r.options?.skipRouteOnParseError?.priority??0,b&&!a.route&&(a.route=r,a.fullPath=r.fullPath??r.from)}if(r.children)for(const h of r.children)xu(e,t,h,f,a,l,u)}function vh(e,t){if(e.skipOnParamError&&!t.skipOnParamError)return-1;if(!e.skipOnParamError&&t.skipOnParamError)return 1;if(e.skipOnParamError&&t.skipOnParamError&&(e.parsingPriority||t.parsingPriority))return t.parsingPriority-e.parsingPriority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function oo(e){if(e.pathless)for(const t of e.pathless)oo(t);if(e.static)for(const t of e.static.values())oo(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())oo(t);if(e.dynamic?.length){e.dynamic.sort(vh);for(const t of e.dynamic)oo(t)}if(e.optional?.length){e.optional.sort(vh);for(const t of e.optional)oo(t)}if(e.wildcard?.length){e.wildcard.sort(vh);for(const t of e.wildcard)oo(t)}}function Ho(e){return{kind:hi,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0}}function bh(e,t,r,s,a){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0,caseSensitive:r,prefix:s,suffix:a}}function T2(e,t){const r=Ho("/"),s=new Uint16Array(6);for(const a of e)xu(!1,s,a,1,r,0);oo(r),t.masksTree=r,t.flatCache=Wl(1e3)}function A2(e,t){e||="/";const r=t.flatCache.get(e);if(r)return r;const s=Ap(e,t.masksTree);return t.flatCache.set(e,s),s}function O2(e,t,r,s,a){e||="/",s||="/";const l=t?`case\0${e}`:e;let u=a.singleCache.get(l);if(!u){u=Ho("/");const f=new Uint16Array(6);xu(t,f,{from:e},1,u,0),a.singleCache.set(l,u)}return Ap(s,u,r)}function M2(e,t,r=!1){const s=r?e:`nofuzz\0${e}`,a=t.matchCache.get(s);if(a!==void 0)return a;e||="/";let l;try{l=Ap(e,t.segmentTree,r)}catch(u){if(u instanceof URIError)l=null;else throw u}return l&&(l.branch=z2(l.route)),t.matchCache.set(s,l),l}function k2(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function N2(e,t=!1,r){const s=Ho(e.fullPath),a=new Uint16Array(6),l={},u={};let f=0;return xu(t,a,e,1,s,0,m=>{if(r?.(m,f),Kt(!(m.id in l),`Duplicate routes found with id: ${String(m.id)}`),l[m.id]=m,f!==0&&m.path){const y=k2(m.fullPath);(!u[y]||m.fullPath.endsWith("/"))&&(u[y]=m)}f++}),oo(s),{processedTree:{segmentTree:s,singleCache:Wl(1e3),matchCache:Wl(1e3),flatCache:null,masksTree:null},routesById:l,routesByPath:u}}function Ap(e,t,r=!1){const s=e.split("/"),a=L2(e,s,t,r);if(!a)return null;const[l]=uw(e,s,a);return{route:a.node.route,rawParams:l,parsedParams:a.parsedParams}}function uw(e,t,r){const s=j2(r.node);let a=null;const l={};let u=r.extract?.part??0,f=r.extract?.node??0,h=r.extract?.path??0,m=r.extract?.segment??0;for(;f<s.length;u++,f++,h++,m++){const y=s[f];if(y.kind===Fo)break;if(y.kind===lw){m--,u--,h--;continue}const g=t[u],b=h;if(g&&(h+=g.length),y.kind===Xo){a??=r.node.fullPath.split("/");const S=a[m],E=y.prefix?.length??0;if(S.charCodeAt(E)===123){const C=y.suffix?.length??0,O=S.substring(E+2,S.length-C-1),L=g.substring(E,g.length-C);l[O]=decodeURIComponent(L)}else{const C=S.substring(1);l[C]=decodeURIComponent(g)}}else if(y.kind===Pa){if(r.skipped&1<<f){u--,h=b-1;continue}a??=r.node.fullPath.split("/");const S=a[m],E=y.prefix?.length??0,x=y.suffix?.length??0,C=S.substring(E+3,S.length-x-1),O=y.suffix||y.prefix?g.substring(E,g.length-x):g;O&&(l[C]=decodeURIComponent(O))}else if(y.kind===Jo){const S=y,E=e.substring(b+(S.prefix?.length??0),e.length-(S.suffix?.length??0)),x=decodeURIComponent(E);l["*"]=x,l._splat=x;break}}return r.rawParams&&Object.assign(l,r.rawParams),[l,{part:u,node:f,path:h,segment:m}]}function z2(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function j2(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function L2(e,t,r,s){if(e==="/"&&r.index)return{node:r.index,skipped:0};const a=!Kl(t),l=a&&e!=="/",u=t.length-(a?1:0),f=[{node:r,index:1,skipped:0,depth:1,statics:1,dynamics:0,optionals:0}];let h=null,m=null,y=null;for(;f.length;){const g=f.pop(),{node:b,index:S,skipped:E,depth:x,statics:C,dynamics:O,optionals:L}=g;let{extract:k,rawParams:j,parsedParams:I}=g;if(b.skipOnParamError){if(!Sh(e,t,g))continue;j=g.rawParams,k=g.extract,I=g.parsedParams}s&&b.route&&b.kind!==Fo&&_a(m,g)&&(m=g);const H=S===u;if(H&&(b.route&&!l&&_a(y,g)&&(y=g),!b.optional&&!b.wildcard&&!b.index&&!b.pathless))continue;const $=H?void 0:t[S];let D;if(H&&b.index){const W={node:b.index,index:S,skipped:E,depth:x+1,statics:C,dynamics:O,optionals:L,extract:k,rawParams:j,parsedParams:I};let ne=!0;if(b.index.skipOnParamError&&(Sh(e,t,W)||(ne=!1)),ne){if(C===u&&!O&&!L&&!E)return W;_a(y,W)&&(y=W)}}if(b.wildcard&&_a(h,g))for(const W of b.wildcard){const{prefix:ne,suffix:oe}=W;if(ne&&(H||!(W.caseSensitive?$:D??=$.toLowerCase()).startsWith(ne)))continue;if(oe){if(H)continue;const de=t.slice(S).join("/").slice(-oe.length);if((W.caseSensitive?de:de.toLowerCase())!==oe)continue}const ie={node:W,index:u,skipped:E,depth:x,statics:C,dynamics:O,optionals:L,extract:k,rawParams:j,parsedParams:I};if(!(W.skipOnParamError&&!Sh(e,t,ie))){h=ie;break}}if(b.optional){const W=E|1<<x,ne=x+1;for(let oe=b.optional.length-1;oe>=0;oe--){const ie=b.optional[oe];f.push({node:ie,index:S,skipped:W,depth:ne,statics:C,dynamics:O,optionals:L,extract:k,rawParams:j,parsedParams:I})}if(!H)for(let oe=b.optional.length-1;oe>=0;oe--){const ie=b.optional[oe],{prefix:de,suffix:ue}=ie;if(de||ue){const ve=ie.caseSensitive?$:D??=$.toLowerCase();if(de&&!ve.startsWith(de)||ue&&!ve.endsWith(ue))continue}f.push({node:ie,index:S+1,skipped:E,depth:ne,statics:C,dynamics:O,optionals:L+1,extract:k,rawParams:j,parsedParams:I})}}if(!H&&b.dynamic&&$)for(let W=b.dynamic.length-1;W>=0;W--){const ne=b.dynamic[W],{prefix:oe,suffix:ie}=ne;if(oe||ie){const de=ne.caseSensitive?$:D??=$.toLowerCase();if(oe&&!de.startsWith(oe)||ie&&!de.endsWith(ie))continue}f.push({node:ne,index:S+1,skipped:E,depth:x+1,statics:C,dynamics:O+1,optionals:L,extract:k,rawParams:j,parsedParams:I})}if(!H&&b.staticInsensitive){const W=b.staticInsensitive.get(D??=$.toLowerCase());W&&f.push({node:W,index:S+1,skipped:E,depth:x+1,statics:C+1,dynamics:O,optionals:L,extract:k,rawParams:j,parsedParams:I})}if(!H&&b.static){const W=b.static.get($);W&&f.push({node:W,index:S+1,skipped:E,depth:x+1,statics:C+1,dynamics:O,optionals:L,extract:k,rawParams:j,parsedParams:I})}if(b.pathless){const W=x+1;for(let ne=b.pathless.length-1;ne>=0;ne--){const oe=b.pathless[ne];f.push({node:oe,index:S,skipped:E,depth:W,statics:C,dynamics:O,optionals:L,extract:k,rawParams:j,parsedParams:I})}}}if(y&&h)return _a(h,y)?y:h;if(y)return y;if(h)return h;if(s&&m){let g=m.index;for(let S=0;S<m.index;S++)g+=t[S].length;const b=g===e.length?"/":e.slice(g);return m.rawParams??={},m.rawParams["**"]=decodeURIComponent(b),m}return null}function Sh(e,t,r){try{const[s,a]=uw(e,t,r);r.rawParams=s,r.extract=a;const l=r.node.parse(s);return r.parsedParams=Object.assign({},r.parsedParams,l),!0}catch{return null}}function _a(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===Fo)>(e.node.kind===Fo)||t.node.kind===Fo==(e.node.kind===Fo)&&t.depth>e.depth))):!0}function Il(e){return Op(e.filter(t=>t!==void 0).join("/"))}function Op(e){return e.replace(/\/{2,}/g,"/")}function fw(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function Zn(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function dw(e){return Zn(fw(e))}function eu(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function D2(e,t,r){return eu(e,r)===eu(t,r)}function P2({base:e,to:t,trailingSlash:r="never",cache:s}){const a=t.startsWith("/"),l=!a&&t===".";let u;if(s){u=a?t:l?e:e+"\0"+t;const g=s.get(u);if(g)return g}let f;if(l)f=e.split("/");else if(a)f=t.split("/");else{for(f=e.split("/");f.length>1&&Kl(f)==="";)f.pop();const g=t.split("/");for(let b=0,S=g.length;b<S;b++){const E=g[b];E===""?b?b===S-1&&f.push(E):f=[E]:E===".."?f.pop():E==="."||f.push(E)}}f.length>1&&(Kl(f)===""?r==="never"&&f.pop():r==="always"&&f.push(""));let h,m="";for(let g=0;g<f.length;g++){g>0&&(m+="/");const b=f[g];if(!b)continue;h=Tp(b,0,h);const S=h[0];if(S===hi){m+=b;continue}const E=h[5],x=b.substring(0,h[1]),C=b.substring(h[4],E),O=b.substring(h[2],h[3]);S===Xo?m+=x||C?`${x}{$${O}}${C}`:`$${O}`:S===Jo?m+=x||C?`${x}{$}${C}`:"$":m+=`${x}{-$${O}}${C}`}m=Op(m);const y=m||"/";return u&&s&&s.set(u,y),y}function wh(e,t,r){const s=t[e];return typeof s!="string"?s:e==="_splat"?encodeURI(s):U2(s,r)}function _h({path:e,params:t,decodeCharMap:r}){let s=!1;const a={};if(!e||e==="/")return{interpolatedPath:"/",usedParams:a,isMissingParams:s};if(!e.includes("$"))return{interpolatedPath:e,usedParams:a,isMissingParams:s};const l=e.length;let u=0,f,h="";for(;u<l;){const y=u;f=Tp(e,y,f);const g=f[5];if(u=g+1,y===g)continue;const b=f[0];if(b===hi){h+="/"+e.substring(y,g);continue}if(b===Jo){const S=t._splat;a._splat=S,a["*"]=S;const E=e.substring(y,f[1]),x=e.substring(f[4],g);if(!S){s=!0,(E||x)&&(h+="/"+E+x);continue}const C=wh("_splat",t,r);h+="/"+E+C+x;continue}if(b===Xo){const S=e.substring(f[2],f[3]);!s&&!(S in t)&&(s=!0),a[S]=t[S];const E=e.substring(y,f[1]),x=e.substring(f[4],g),C=wh(S,t,r)??"undefined";h+="/"+E+C+x;continue}if(b===Pa){const S=e.substring(f[2],f[3]),E=t[S];if(E==null)continue;a[S]=E;const x=e.substring(y,f[1]),C=e.substring(f[4],g),O=wh(S,t,r)??"";h+="/"+x+O+C;continue}}return e.endsWith("/")&&(h+="/"),{usedParams:a,interpolatedPath:h||"/",isMissingParams:s}}function U2(e,t){let r=encodeURIComponent(e);if(t)for(const[s,a]of t)r=r.replaceAll(s,a);return r}function Lt(e){return!!e?.isNotFound}function $2(){try{if(typeof window<"u"&&typeof window.sessionStorage=="object")return window.sessionStorage}catch{}}const tu="tsr-scroll-restoration-v1_3",I2=(e,t)=>{let r;return(...s)=>{r||(r=setTimeout(()=>{e(...s),r=null},t))}};function B2(){const e=$2();if(!e)return null;const t=e.getItem(tu);let r=t?JSON.parse(t):{};return{state:r,set:s=>{r=ao(s,r)||r;try{e.setItem(tu,JSON.stringify(r))}catch{console.warn("[ts-router] Could not persist scroll restoration state to sessionStorage.")}}}}const xl=B2(),op=e=>e.state.__TSR_key||e.href;function q2(e){const t=[];let r;for(;r=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(r.children,e)+1})`),e=r;return`${t.reverse().join(" > ")}`.toLowerCase()}let nu=!1;function hw({storageKey:e,key:t,behavior:r,shouldScrollRestoration:s,scrollToTopSelectors:a,location:l}){let u;try{u=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(m){console.error(m);return}const f=t||window.history.state?.__TSR_key,h=u[f];nu=!0;e:{if(s&&h&&Object.keys(h).length>0){for(const g in h){const b=h[g];if(g==="window")window.scrollTo({top:b.scrollY,left:b.scrollX,behavior:r});else if(g){const S=document.querySelector(g);S&&(S.scrollLeft=b.scrollX,S.scrollTop=b.scrollY)}}break e}const m=(l??window.location).hash.split("#",2)[1];if(m){const g=window.history.state?.__hashScrollIntoViewOptions??!0;if(g){const b=document.getElementById(m);b&&b.scrollIntoView(g)}break e}const y={top:0,left:0,behavior:r};if(window.scrollTo(y),a)for(const g of a){if(g==="window")continue;const b=typeof g=="function"?g():document.querySelector(g);b&&b.scrollTo(y)}}nu=!1}function V2(e,t){if(!xl&&!e.isServer||((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isServer||e.isScrollRestorationSetup||!xl))return;e.isScrollRestorationSetup=!0,nu=!1;const s=e.options.getScrollRestorationKey||op;window.history.scrollRestoration="manual";const a=l=>{if(nu||!e.isScrollRestoring)return;let u="";if(l.target===document||l.target===window)u="window";else{const h=l.target.getAttribute("data-scroll-restoration-id");h?u=`[data-scroll-restoration-id="${h}"]`:u=q2(l.target)}const f=s(e.state.location);xl.set(h=>{const m=h[f]||={},y=m[u]||={};if(u==="window")y.scrollX=window.scrollX||0,y.scrollY=window.scrollY||0;else if(u){const g=document.querySelector(u);g&&(y.scrollX=g.scrollLeft||0,y.scrollY=g.scrollTop||0)}return h})};typeof document<"u"&&document.addEventListener("scroll",I2(a,100),!0),e.subscribe("onRendered",l=>{const u=s(l.toLocation);(l.toLocation.state.__TSR_resetScroll??!0)&&(typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation})||(hw({storageKey:tu,key:u,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&xl.set(h=>(h[u]||={},h))))})}function F2(e){if(typeof document<"u"&&document.querySelector){const t=e.state.location.state.__hashScrollIntoViewOptions??!0;if(t&&e.state.location.hash!==""){const r=document.getElementById(e.state.location.hash);r&&r.scrollIntoView(t)}}}function pw(e,t=String){const r=new URLSearchParams;for(const s in e){const a=e[s];a!==void 0&&r.set(s,t(a))}return r.toString()}function xh(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function H2(e){const t=new URLSearchParams(e),r={};for(const[s,a]of t.entries()){const l=r[s];l==null?r[s]=xh(a):Array.isArray(l)?l.push(xh(a)):r[s]=[l,xh(a)]}return r}const Z2=G2(JSON.parse),Q2=Y2(JSON.stringify,JSON.parse);function G2(e){return t=>{t[0]==="?"&&(t=t.substring(1));const r=H2(t);for(const s in r){const a=r[s];if(typeof a=="string")try{r[s]=e(a)}catch{}}return r}}function Y2(e,t){const r=typeof t=="function";function s(a){if(typeof a=="object"&&a!==null)try{return e(a)}catch{}else if(r&&typeof a=="string")try{return t(a),e(a)}catch{}return a}return a=>{const l=pw(a,s);return l?`?${l}`:""}}const Gt="__root__";function Mp(e){if(e.statusCode=e.statusCode||e.code||307,typeof e.href=="string"&&Jl(e.href))throw new Error(`Redirect blocked: unsafe protocol in href "${e.href}". Only ${aw.join(", ")} protocols are allowed.`);if(!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const r=new Response(null,{status:e.statusCode,headers:t});if(r.options=e,e.throw)throw r;return r}function ln(e){return e instanceof Response&&!!e.options}function mw(e){if(e!==null&&typeof e=="object"&&e.isSerializedRedirect)return Mp(e)}const Bl=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},Eu=(e,t)=>!!(e.preload&&!e.router.state.matches.some(r=>r.id===t)),si=(e,t,r=!0)=>{const s={...e.router.options.context??{}},a=r?t:t-1;for(let l=0;l<=a;l++){const u=e.matches[l];if(!u)continue;const f=e.router.getMatch(u.id);f&&Object.assign(s,f.__routeContext,f.__beforeLoadContext)}return s},gw=(e,t)=>{const r=e.router.routesById[t.routeId??""]??e.router.routeTree;!r.options.notFoundComponent&&e.router.options?.defaultNotFoundComponent&&(r.options.notFoundComponent=e.router.options.defaultNotFoundComponent),Kt(r.options.notFoundComponent);const s=e.matches.find(a=>a.routeId===r.id);Kt(s,"Could not find match for route: "+r.id),e.updateMatch(s.id,a=>({...a,status:"notFound",error:t,isFetching:!1})),t.routerCode==="BEFORE_LOAD"&&r.parentRoute&&(t.routeId=r.parentRoute.id,gw(e,t))},co=(e,t,r)=>{if(!(!ln(r)&&!Lt(r))){if(ln(r)&&r.redirectHandled&&!r.options.reloadDocument)throw r;if(t){t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0;const s=ln(r)?"redirected":"notFound";t._nonReactive.error=r,e.updateMatch(t.id,a=>({...a,status:s,context:si(e,t.index),isFetching:!1,error:r})),Lt(r)&&!r.routeId&&(r.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()}throw ln(r)?(e.rendered=!0,r.options._fromLocation=e.location,r.redirectHandled=!0,r=e.router.resolveRedirect(r),r):(gw(e,r),r)}},yw=(e,t)=>{const r=e.router.getMatch(t);return!!(!e.router.isServer&&r._nonReactive.dehydrated||e.router.isServer&&r.ssr===!1)},xa=(e,t,r,s)=>{const{id:a,routeId:l}=e.matches[t],u=e.router.looseRoutesById[l];if(r instanceof Promise)throw r;r.routerCode=s,e.firstBadMatchIndex??=t,co(e,e.router.getMatch(a),r);try{u.options.onError?.(r)}catch(f){r=f,co(e,e.router.getMatch(a),r)}e.updateMatch(a,f=>(f._nonReactive.beforeLoadPromise?.resolve(),f._nonReactive.beforeLoadPromise=void 0,f._nonReactive.loadPromise?.resolve(),{...f,error:r,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}))},K2=(e,t,r,s)=>{const a=e.router.getMatch(t),l=e.matches[r-1]?.id,u=l?e.router.getMatch(l):void 0;if(e.router.isShell()){a.ssr=s.id===Gt;return}if(u?.ssr===!1){a.ssr=!1;return}const f=S=>S===!0&&u?.ssr==="data-only"?"data-only":S,h=e.router.options.defaultSsr??!0;if(s.options.ssr===void 0){a.ssr=f(h);return}if(typeof s.options.ssr!="function"){a.ssr=f(s.options.ssr);return}const{search:m,params:y}=a,g={search:El(m,a.searchError),params:El(y,a.paramsError),location:e.location,matches:e.matches.map(S=>({index:S.index,pathname:S.pathname,fullPath:S.fullPath,staticData:S.staticData,id:S.id,routeId:S.routeId,search:El(S.search,S.searchError),params:El(S.params,S.paramsError),ssr:S.ssr}))},b=s.options.ssr(g);if(uo(b))return b.then(S=>{a.ssr=f(S??h)});a.ssr=f(b??h)},vw=(e,t,r,s)=>{if(s._nonReactive.pendingTimeout!==void 0)return;const a=r.options.pendingMs??e.router.options.defaultPendingMs;if(!!(e.onReady&&!e.router.isServer&&!Eu(e,t)&&(r.options.loader||r.options.beforeLoad||ww(r))&&typeof a=="number"&&a!==1/0&&(r.options.pendingComponent??e.router.options?.defaultPendingComponent))){const u=setTimeout(()=>{Bl(e)},a);s._nonReactive.pendingTimeout=u}},X2=(e,t,r)=>{const s=e.router.getMatch(t);if(!s._nonReactive.beforeLoadPromise&&!s._nonReactive.loaderPromise)return;vw(e,t,r,s);const a=()=>{const l=e.router.getMatch(t);l.preload&&(l.status==="redirected"||l.status==="notFound")&&co(e,l,l.error)};return s._nonReactive.beforeLoadPromise?s._nonReactive.beforeLoadPromise.then(a):a()},J2=(e,t,r,s)=>{const a=e.router.getMatch(t),l=a._nonReactive.loadPromise;a._nonReactive.loadPromise=Ko(()=>{l?.resolve()});const{paramsError:u,searchError:f}=a;u&&xa(e,r,u,"PARSE_PARAMS"),f&&xa(e,r,f,"VALIDATE_SEARCH"),vw(e,t,s,a);const h=new AbortController,m=e.matches[r-1]?.id;(m?e.router.getMatch(m):void 0)?.context??e.router.options.context;let g=!1;const b=()=>{g||(g=!0,e.updateMatch(t,H=>({...H,isFetching:"beforeLoad",fetchCount:H.fetchCount+1,abortController:h})))},S=()=>{a._nonReactive.beforeLoadPromise?.resolve(),a._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,H=>({...H,isFetching:!1}))};if(!s.options.beforeLoad){oi(()=>{b(),S()});return}a._nonReactive.beforeLoadPromise=Ko();const E={...si(e,r,!1),...a.__routeContext},{search:x,params:C,cause:O}=a,L=Eu(e,t),k={search:x,abortController:h,params:C,preload:L,context:E,location:e.location,navigate:H=>e.router.navigate({...H,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:L?"preload":O,matches:e.matches,...e.router.options.additionalContext},j=H=>{if(H===void 0){oi(()=>{b(),S()});return}(ln(H)||Lt(H))&&(b(),xa(e,r,H,"BEFORE_LOAD")),oi(()=>{b(),e.updateMatch(t,$=>({...$,__beforeLoadContext:H})),S()})};let I;try{if(I=s.options.beforeLoad(k),uo(I))return b(),I.catch(H=>{xa(e,r,H,"BEFORE_LOAD")}).then(j)}catch(H){b(),xa(e,r,H,"BEFORE_LOAD")}j(I)},W2=(e,t)=>{const{id:r,routeId:s}=e.matches[t],a=e.router.looseRoutesById[s],l=()=>{if(e.router.isServer){const h=K2(e,r,t,a);if(uo(h))return h.then(f)}return f()},u=()=>J2(e,r,t,a),f=()=>{if(yw(e,r))return;const h=X2(e,r,a);return uo(h)?h.then(u):u()};return l()},eT=(e,t,r)=>{const s=e.router.getMatch(t);if(!s||!r.options.head&&!r.options.scripts&&!r.options.headers)return;const a={ssr:e.router.options.ssr,matches:e.matches,match:s,params:s.params,loaderData:s.loaderData};return Promise.all([r.options.head?.(a),r.options.scripts?.(a),r.options.headers?.(a)]).then(([l,u,f])=>{const h=l?.meta,m=l?.links,y=l?.scripts,g=l?.styles;return{meta:h,links:m,headScripts:y,headers:f,scripts:u,styles:g}})},bw=(e,t,r,s)=>{const a=e.matchPromises[r-1],{params:l,loaderDeps:u,abortController:f,cause:h}=e.router.getMatch(t),m=si(e,r),y=Eu(e,t);return{params:l,deps:u,preload:!!y,parentMatchPromise:a,abortController:f,context:m,location:e.location,navigate:g=>e.router.navigate({...g,_fromLocation:e.location}),cause:y?"preload":h,route:s,...e.router.options.additionalContext}},Xb=async(e,t,r,s)=>{try{const a=e.router.getMatch(t);try{(!e.router.isServer||a.ssr===!0)&&Sw(s);const l=s.options.loader?.(bw(e,t,r,s)),u=s.options.loader&&uo(l);if(!!(u||s._lazyPromise||s._componentsPromise||s.options.head||s.options.scripts||s.options.headers||a._nonReactive.minPendingPromise)&&e.updateMatch(t,m=>({...m,isFetching:"loader"})),s.options.loader){const m=u?await l:l;co(e,e.router.getMatch(t),m),m!==void 0&&e.updateMatch(t,y=>({...y,loaderData:m}))}s._lazyPromise&&await s._lazyPromise;const h=a._nonReactive.minPendingPromise;h&&await h,s._componentsPromise&&await s._componentsPromise,e.updateMatch(t,m=>({...m,error:void 0,context:si(e,r),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(l){let u=l;if(u?.name==="AbortError"){e.updateMatch(t,h=>({...h,status:h.status==="pending"?"success":h.status,isFetching:!1,context:si(e,r)}));return}const f=a._nonReactive.minPendingPromise;f&&await f,Lt(l)&&await s.options.notFoundComponent?.preload?.(),co(e,e.router.getMatch(t),l);try{s.options.onError?.(l)}catch(h){u=h,co(e,e.router.getMatch(t),h)}e.updateMatch(t,h=>({...h,error:u,context:si(e,r),status:"error",isFetching:!1}))}}catch(a){const l=e.router.getMatch(t);l&&(l._nonReactive.loaderPromise=void 0),co(e,l,a)}},tT=async(e,t)=>{const{id:r,routeId:s}=e.matches[t];let a=!1,l=!1;const u=e.router.looseRoutesById[s];if(yw(e,r)){if(e.router.isServer)return e.router.getMatch(r)}else{const m=e.router.getMatch(r);if(m._nonReactive.loaderPromise){if(m.status==="success"&&!e.sync&&!m.preload)return m;await m._nonReactive.loaderPromise;const y=e.router.getMatch(r),g=y._nonReactive.error||y.error;g&&co(e,y,g)}else{const y=Date.now()-m.updatedAt,g=Eu(e,r),b=g?u.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:u.options.staleTime??e.router.options.defaultStaleTime??0,S=u.options.shouldReload,E=typeof S=="function"?S(bw(e,r,t,u)):S,x=!!g&&!e.router.state.matches.some(k=>k.id===r),C=e.router.getMatch(r);C._nonReactive.loaderPromise=Ko(),x!==C.preload&&e.updateMatch(r,k=>({...k,preload:x}));const{status:O,invalid:L}=C;a=O==="success"&&(L||(E??y>b)),g&&u.options.preload===!1||(a&&!e.sync?(l=!0,(async()=>{try{await Xb(e,r,t,u);const k=e.router.getMatch(r);k._nonReactive.loaderPromise?.resolve(),k._nonReactive.loadPromise?.resolve(),k._nonReactive.loaderPromise=void 0}catch(k){ln(k)&&await e.router.navigate(k.options)}})()):(O!=="success"||a&&e.sync)&&await Xb(e,r,t,u))}}const f=e.router.getMatch(r);l||(f._nonReactive.loaderPromise?.resolve(),f._nonReactive.loadPromise?.resolve()),clearTimeout(f._nonReactive.pendingTimeout),f._nonReactive.pendingTimeout=void 0,l||(f._nonReactive.loaderPromise=void 0),f._nonReactive.dehydrated=void 0;const h=l?f.isFetching:!1;return h!==f.isFetching||f.invalid!==!1?(e.updateMatch(r,m=>({...m,isFetching:h,invalid:!1})),e.router.getMatch(r)):f};async function Jb(e){const t=Object.assign(e,{matchPromises:[]});!t.router.isServer&&t.router.state.matches.some(r=>r._forcePending)&&Bl(t);try{for(let f=0;f<t.matches.length;f++){const h=W2(t,f);uo(h)&&await h}const r=t.firstBadMatchIndex??t.matches.length;for(let f=0;f<r;f++)t.matchPromises.push(tT(t,f));const a=(await Promise.allSettled(t.matchPromises)).filter(f=>f.status==="rejected").map(f=>f.reason);let l;for(const f of a){if(ln(f))throw f;!l&&Lt(f)&&(l=f)}for(const f of t.matches){const{id:h,routeId:m}=f,y=t.router.looseRoutesById[m];try{const g=eT(t,h,y);if(g){const b=await g;t.updateMatch(h,S=>({...S,...b}))}}catch(g){console.error(`Error executing head for route ${m}:`,g)}}if(l)throw l;const u=Bl(t);uo(u)&&await u}catch(r){if(Lt(r)&&!t.preload){const s=Bl(t);throw uo(s)&&await s,r}if(ln(r))throw r}return t.matches}async function Sw(e){if(!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{const{id:r,...s}=t.options;Object.assign(e.options,s),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0),!e._componentsLoaded&&e._componentsPromise===void 0){const t=()=>{const r=[];for(const s of _w){const a=e.options[s]?.preload;a&&r.push(a())}if(r.length)return Promise.all(r).then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0});e._componentsLoaded=!0,e._componentsPromise=void 0};e._componentsPromise=e._lazyPromise?e._lazyPromise.then(t):t()}return e._componentsPromise}function El(e,t){return t?{status:"error",error:t}:{status:"success",value:e}}function ww(e){for(const t of _w)if(e.options[t]?.preload)return!0;return!1}const _w=["component","errorComponent","pendingComponent","notFoundComponent"];function nT(e){return{input:({url:t})=>{for(const r of e)t=sp(r,t);return t},output:({url:t})=>{for(let r=e.length-1;r>=0;r--)t=xw(e[r],t);return t}}}function rT(e){const t=dw(e.basepath),r=`/${t}`,s=`${r}/`,a=e.caseSensitive?r:r.toLowerCase(),l=e.caseSensitive?s:s.toLowerCase();return{input:({url:u})=>{const f=e.caseSensitive?u.pathname:u.pathname.toLowerCase();return f===a?u.pathname="/":f.startsWith(l)&&(u.pathname=u.pathname.slice(r.length)),u},output:({url:u})=>(u.pathname=Il(["/",t,u.pathname]),u)}}function sp(e,t){const r=e?.input?.({url:t});if(r){if(typeof r=="string")return new URL(r);if(r instanceof URL)return r}return t}function xw(e,t){const r=e?.output?.({url:t});if(r){if(typeof r=="string")return new URL(r);if(r instanceof URL)return r}return t}function oT(e){return e instanceof Error?{name:e.name,message:e.message}:{data:e}}function Go(e){const t=e.resolvedLocation,r=e.location,s=t?.pathname!==r.pathname,a=t?.href!==r.href,l=t?.hash!==r.hash;return{fromLocation:t,toLocation:r,pathChanged:s,hrefChanged:a,hashChanged:l}}class sT{constructor(t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=r=>r(),this.update=r=>{r.notFoundRoute&&console.warn("The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/framework/react/guide/not-found-errors#migrating-from-notfoundroute for more info.");const s=this.options,a=this.basepath??s?.basepath??"/",l=this.basepath===void 0,u=s?.rewrite;this.options={...s,...r},this.isServer=this.options.isServer??typeof document>"u",this.pathParamsDecodeCharMap=this.options.pathParamsAllowedCharacters?new Map(this.options.pathParamsAllowedCharacters.map(b=>[encodeURIComponent(b),b])):void 0,(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.isServer||(this.history=m2())),this.origin=this.options.origin,this.origin||(!this.isServer&&window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree&&(this.routeTree=this.options.routeTree,this.buildRouteTree()),!this.__store&&this.latestLocation&&(this.__store=new h2(aT(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(b=>!["redirected"].includes(b.status))}}}),V2(this));let f=!1;const h=this.options.basepath??"/",m=this.options.rewrite;if(l||a!==h||u!==m){this.basepath=h;const b=[];dw(h)!==""&&b.push(rT({basepath:h})),m&&b.push(m),this.rewrite=b.length===0?void 0:b.length===1?b[0]:nT(b),this.history&&this.updateLatestLocation(),f=!0}f&&this.__store&&(this.__store.state={...this.state,location:this.latestLocation}),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const{routesById:r,routesByPath:s,processedTree:a}=N2(this.routeTree,this.options.caseSensitive,(u,f)=>{u.init({originalIndex:f})});this.options.routeMasks&&T2(this.options.routeMasks,a),this.routesById=r,this.routesByPath=s,this.processedTree=a;const l=this.options.notFoundRoute;l&&(l.init({originalIndex:99999999999}),this.routesById[l.id]=l)},this.subscribe=(r,s)=>{const a={eventType:r,fn:s};return this.subscribers.add(a),()=>{this.subscribers.delete(a)}},this.emit=r=>{this.subscribers.forEach(s=>{s.eventType===r.type&&s.fn(r)})},this.parseLocation=(r,s)=>{const a=({href:h,state:m})=>{const y=new URL(h,this.origin),g=sp(this.rewrite,y),b=this.options.parseSearch(g.search),S=this.options.stringifySearch(b);return g.search=S,{href:g.href.replace(g.origin,""),publicHref:h,url:g,pathname:yh(g.pathname),searchStr:S,search:xn(s?.search,b),hash:yh(g.hash.split("#").reverse()[0]??""),state:xn(s?.state,m)}},l=a(r),{__tempLocation:u,__tempKey:f}=l.state;if(u&&(!f||f===this.tempLocationKey)){const h=a(u);return h.state.key=l.state.key,h.state.__TSR_key=l.state.__TSR_key,delete h.state.__tempLocation,{...h,maskedLocation:l}}return l},this.resolvePathCache=Wl(1e3),this.resolvePathWithBase=(r,s)=>P2({base:r,to:Op(s),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(r,s,a)=>typeof r=="string"?this.matchRoutesInternal({pathname:r,search:s},a).matches:this.matchRoutesInternal(r,s).matches,this.getMatchedRoutes=r=>cT({pathname:r,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=r=>{const s=this.getMatch(r);s&&(s.abortController.abort(),clearTimeout(s._nonReactive.pendingTimeout),s._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{const r=this.state.matches.filter(l=>l.status==="pending"),s=this.state.matches.filter(l=>l.isFetching==="loader");new Set([...this.state.pendingMatches??[],...r,...s]).forEach(l=>{this.cancelMatch(l.id)})},this.buildLocation=r=>{const s=(l={})=>{const u=l._fromLocation||this.pendingBuiltLocation||this.latestLocation,f=this.matchRoutes(u,{_buildLocation:!0}),h=Kl(f);l.from;const m=l.unsafeRelative==="path"?u.pathname:l.from??h.fullPath,y=this.resolvePathWithBase(m,"."),g=h.search,b={...h.params},S=l.to?this.resolvePathWithBase(y,`${l.to}`):this.resolvePathWithBase(y,"."),E=l.params===!1||l.params===null?{}:(l.params??!0)===!0?b:Object.assign(b,ao(l.params,b)),x=_h({path:S,params:E}).interpolatedPath,C=this.getMatchedRoutes(x);let O=C.matchedRoutes;const L=C.routeParams,k=C.foundRoute?C.foundRoute.path!=="/"&&C.routeParams["**"]:Zn(x);let j;if(k&&(this.options.notFoundRoute?O=[...O,this.options.notFoundRoute]:j=Wb(this.options.notFoundMode,O)),Object.keys(E).length>0)for(const Y of O){const V=Y.options.params?.stringify??Y.options.stringifyParams;V&&Object.assign(E,V(E))}const I=r.leaveParams?S:yh(_h({path:S,params:E,decodeCharMap:this.pathParamsDecodeCharMap}).interpolatedPath);let H=g;if(r._includeValidateSearch&&this.options.search?.strict){const Y={};O.forEach(V=>{if(V.options.validateSearch)try{Object.assign(Y,ip(V.options.validateSearch,{...Y,...H}))}catch{}}),H=Y}H=fT({search:H,dest:l,destRoutes:O,_includeValidateSearch:r._includeValidateSearch}),H=xn(g,H);const $=this.options.stringifySearch(H),D=l.hash===!0?u.hash:l.hash?ao(l.hash,u.hash):void 0,W=D?`#${D}`:"";let ne=l.state===!0?u.state:l.state?ao(l.state,u.state):{};ne=xn(u.state,ne);const oe={...L,...E},ie=uT({routes:O,params:oe,searchStr:$,globalNotFoundRouteId:j}),de=`${I}${$}${W}`,ue=new URL(de,this.origin),ve=xw(this.rewrite,ue),P=ue.href.replace(ue.origin,"");return{publicHref:ve.pathname+ve.search+ve.hash,href:P,url:ve,pathname:I,search:H,searchStr:$,state:ne,hash:D??"",unmaskOnReload:l.unmaskOnReload,_matchSnapshot:ie}},a=(l={},u)=>{const f=s(l);let h=u?s(u):void 0;if(!h){const m={};if(this.options.routeMasks){const y=A2(f.pathname,this.processedTree);if(y){Object.assign(m,y.rawParams);const{from:g,params:b,...S}=y.route,E=b===!1||b===null?{}:(b??!0)===!0?m:Object.assign(m,ao(b,m));u={from:r.from,...S,params:E},h=s(u)}}}return h&&(f.maskedLocation=h),f};return r.mask?a(r,{from:r.from,...r.mask}):a(r)},this.commitLocation=async({viewTransition:r,ignoreBlocker:s,...a})=>{const l=()=>{const E=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];E.forEach(C=>{a.state[C]=this.latestLocation.state[C]});const x=Qo(a.state,this.latestLocation.state);return E.forEach(C=>{delete a.state[C]}),x},u=Zn(this.latestLocation.href)===Zn(a.href),f=this.commitLocationPromise;if(this.commitLocationPromise=Ko(()=>{f?.resolve()}),u&&l())return this.load(),this.commitLocationPromise;let{maskedLocation:h,hashScrollIntoView:m,url:y,...g}=a;h&&(g={...h,state:{...h.state,__tempKey:void 0,__tempLocation:{...g,search:g.searchStr,state:{...g.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(g.unmaskOnReload??this.options.unmaskOnReload??!1)&&(g.state.__tempKey=this.tempLocationKey)),g.state.__hashScrollIntoViewOptions=m??this.options.defaultHashScrollIntoView??!0,g.state.__TSR_resetScroll=a.resetScroll??!0,this.shouldViewTransition=r,g.state.__TSR_sessionId=this.sessionId,g.state.__TSR_matches=a._matchSnapshot??lT({matchResult:this.getMatchedRoutes(a.pathname),pathname:a.pathname,searchStr:a.searchStr,notFoundRoute:this.options.notFoundRoute,notFoundMode:this.options.notFoundMode});const b={...a,publicHref:g.publicHref,state:g.state,maskedLocation:h};return(await this.history[a.replace?"replace":"push"](g.publicHref,g.state,{ignoreBlocker:s,skipTransitionerLoad:!0})).type==="BLOCKED"?(this.commitLocationPromise?.resolve(),this.commitLocationPromise):this.history.location.href!==g.publicHref?this.commitLocationPromise:(this.latestLocation=b,this.load({_skipUpdateLatestLocation:!0}),this.commitLocationPromise)},this.buildAndCommitLocation=({replace:r,resetScroll:s,hashScrollIntoView:a,viewTransition:l,ignoreBlocker:u,href:f,...h}={})=>{if(f){const g=this.history.location.state.__TSR_index,b=Yl(f,{__TSR_index:r?g:g+1}),S=new URL(b.pathname,this.origin),E=sp(this.rewrite,S);h.to=E.pathname,h.search=this.options.parseSearch(b.search),h.hash=b.hash.slice(1)}const m=this.buildLocation({...h,_includeValidateSearch:!0});this.pendingBuiltLocation=m;const y=this.commitLocation({...m,viewTransition:l,replace:r,resetScroll:s,hashScrollIntoView:a,ignoreBlocker:u});return Promise.resolve().then(()=>{this.pendingBuiltLocation===m&&(this.pendingBuiltLocation=void 0)}),y},this.navigate=async({to:r,reloadDocument:s,href:a,publicHref:l,...u})=>{let f=!1;if(a)try{new URL(`${a}`),f=!0}catch{}if(f&&!s&&(s=!0),s){if(r!==void 0||!a){const m=this.buildLocation({to:r,...u});a=a??m.url.href,l=l??m.url.href}const h=!f&&l?l:a;if(Jl(h))return Promise.resolve();if(!u.ignoreBlocker){const y=this.history.getBlockers?.()??[];for(const g of y)if(g?.blockerFn&&await g.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return u.replace?window.location.replace(h):window.location.href=h,Promise.resolve()}return this.buildAndCommitLocation({...u,href:a,to:r,_isNavigate:!0})},this.beforeLoad=r=>{if(this.cancelMatches(),r?._skipUpdateLatestLocation||this.updateLatestLocation(),this.isServer){const l=this.buildLocation({to:this.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(this.latestLocation.publicHref!==l.publicHref||l.url.origin!==this.origin){const u=this.getParsedLocationHref(l);throw Mp({href:u})}}const s=this.latestLocation.state.__TSR_sessionId===this.sessionId?this.latestLocation.state.__TSR_matches:void 0,a=this.matchRoutes(this.latestLocation,{snapshot:s});this.__store.setState(l=>({...l,status:"pending",statusCode:200,isLoading:!0,location:this.latestLocation,pendingMatches:a,cachedMatches:l.cachedMatches.filter(u=>!a.some(f=>f.id===u.id))}))},this.load=async r=>{let s,a,l;for(l=new Promise(f=>{this.startTransition(async()=>{try{this.beforeLoad({_skipUpdateLatestLocation:r?._skipUpdateLatestLocation});const h=this.latestLocation,m=this.state.resolvedLocation;this.state.redirect||this.emit({type:"onBeforeNavigate",...Go({resolvedLocation:m,location:h})}),this.emit({type:"onBeforeLoad",...Go({resolvedLocation:m,location:h})}),await Jb({router:this,sync:r?.sync,matches:this.state.pendingMatches,location:h,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let y=[],g=[],b=[];oi(()=>{this.__store.setState(S=>{const E=S.matches,x=S.pendingMatches||S.matches;return y=E.filter(C=>!x.some(O=>O.id===C.id)),g=x.filter(C=>!E.some(O=>O.id===C.id)),b=x.filter(C=>E.some(O=>O.id===C.id)),{...S,isLoading:!1,loadedAt:Date.now(),matches:x,pendingMatches:void 0,cachedMatches:[...S.cachedMatches,...y.filter(C=>C.status!=="error"&&C.status!=="notFound")]}}),this.clearExpiredCache()}),[[y,"onLeave"],[g,"onEnter"],[b,"onStay"]].forEach(([S,E])=>{S.forEach(x=>{this.looseRoutesById[x.routeId].options[E]?.(x)})})})})}})}catch(h){ln(h)?(s=h,this.isServer||this.navigate({...s.options,replace:!0,ignoreBlocker:!0})):Lt(h)&&(a=h),this.__store.setState(m=>({...m,statusCode:s?s.status:a?404:m.matches.some(y=>y.status==="error")?500:200,redirect:s}))}this.latestLoadPromise===l&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),f()})}),this.latestLoadPromise=l,await l;this.latestLoadPromise&&l!==this.latestLoadPromise;)await this.latestLoadPromise;let u;this.hasNotFoundMatch()?u=404:this.__store.state.matches.some(f=>f.status==="error")&&(u=500),u!==void 0&&this.__store.setState(f=>({...f,statusCode:u}))},this.startViewTransition=r=>{const s=this.shouldViewTransition??this.options.defaultViewTransition;if(delete this.shouldViewTransition,s&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let a;if(typeof s=="object"&&this.isViewTransitionTypesSupported){const l=this.latestLocation,u=this.state.resolvedLocation,f=typeof s.types=="function"?s.types(Go({resolvedLocation:u,location:l})):s.types;if(f===!1){r();return}a={update:r,types:f}}else a=r;document.startViewTransition(a)}else r()},this.updateMatch=(r,s)=>{this.startTransition(()=>{const a=this.state.pendingMatches?.some(l=>l.id===r)?"pendingMatches":this.state.matches.some(l=>l.id===r)?"matches":this.state.cachedMatches.some(l=>l.id===r)?"cachedMatches":"";a&&this.__store.setState(l=>({...l,[a]:l[a]?.map(u=>u.id===r?s(u):u)}))})},this.getMatch=r=>{const s=a=>a.id===r;return this.state.cachedMatches.find(s)??this.state.pendingMatches?.find(s)??this.state.matches.find(s)},this.invalidate=r=>{const s=a=>r?.filter?.(a)??!0?{...a,invalid:!0,...r?.forcePending||a.status==="error"||a.status==="notFound"?{status:"pending",error:void 0}:void 0}:a;return this.__store.setState(a=>({...a,matches:a.matches.map(s),cachedMatches:a.cachedMatches.map(s),pendingMatches:a.pendingMatches?.map(s)})),this.shouldViewTransition=!1,this.load({sync:r?.sync})},this.getParsedLocationHref=r=>{let s=r.url.href;return this.origin&&r.url.origin===this.origin&&(s=s.replace(this.origin,"")||"/"),s},this.resolveRedirect=r=>{const s=r.headers.get("Location");if(r.options.href){if(s)try{const a=new URL(s);if(this.origin&&a.origin===this.origin){const l=a.pathname+a.search+a.hash;r.options.href=l,r.headers.set("Location",l)}}catch{}}else{const a=this.buildLocation(r.options),l=this.getParsedLocationHref(a);r.options.href=l,r.headers.set("Location",l)}return r.headers.get("Location")||r.headers.set("Location",r.options.href),r},this.clearCache=r=>{const s=r?.filter;s!==void 0?this.__store.setState(a=>({...a,cachedMatches:a.cachedMatches.filter(l=>!s(l))})):this.__store.setState(a=>({...a,cachedMatches:[]}))},this.clearExpiredCache=()=>{const r=s=>{const a=this.looseRoutesById[s.routeId];if(!a.options.loader)return!0;const l=(s.preload?a.options.preloadGcTime??this.options.defaultPreloadGcTime:a.options.gcTime??this.options.defaultGcTime)??300*1e3;return s.status==="error"?!0:Date.now()-s.updatedAt>=l};this.clearCache({filter:r})},this.loadRouteChunk=Sw,this.preloadRoute=async r=>{const s=this.buildLocation(r);let a=this.matchRoutes(s,{throwOnError:!0,preload:!0,dest:r});const l=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(f=>f.id)),u=new Set([...l,...this.state.cachedMatches.map(f=>f.id)]);oi(()=>{a.forEach(f=>{u.has(f.id)||this.__store.setState(h=>({...h,cachedMatches:[...h.cachedMatches,f]}))})});try{return a=await Jb({router:this,matches:a,location:s,preload:!0,updateMatch:(f,h)=>{l.has(f)?a=a.map(m=>m.id===f?h(m):m):this.updateMatch(f,h)}}),a}catch(f){if(ln(f))return f.options.reloadDocument?void 0:await this.preloadRoute({...f.options,_fromLocation:s});Lt(f)||console.error(f);return}},this.matchRoute=(r,s)=>{const a={...r,to:r.to?this.resolvePathWithBase(r.from||"",r.to):void 0,params:r.params||{},leaveParams:!0},l=this.buildLocation(a);if(s?.pending&&this.state.status!=="pending")return!1;const f=(s?.pending===void 0?!this.state.isLoading:s.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,h=O2(l.pathname,s?.caseSensitive??!1,s?.fuzzy??!1,f.pathname,this.processedTree);return!h||r.params&&!Qo(h.rawParams,r.params,{partial:!0})?!1:s?.includeSearch??!0?Qo(f.search,l.search,{partial:!0})?h.rawParams:!1:h.rawParams},this.hasNotFoundMatch=()=>this.__store.state.matches.some(r=>r.status==="notFound"||r.globalNotFound),this.sessionId=typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():`${Date.now()}-${Math.random().toString(36).slice(2)}`,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??Q2,parseSearch:t.parseSearch??Z2}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.__store.state}get looseRoutesById(){return this.routesById}matchRoutesInternal(t,r){const s=r?.snapshot,a=s&&s.routeIds.length>0&&s.routeIds.every(E=>this.routesById[E]);let l,u,f,h,m;if(a)l=s.routeIds.map(E=>this.routesById[E]),u={...s.params},f={...s.params},h=s.globalNotFoundRouteId,m=s.parsedParams;else{const E=this.getMatchedRoutes(t.pathname),{foundRoute:x,routeParams:C}=E;u=C,f={...C},l=E.matchedRoutes,m=E.parsedParams;let O=!1;(x?x.path!=="/"&&u["**"]:Zn(t.pathname))&&(this.options.notFoundRoute?l=[...l,this.options.notFoundRoute]:O=!0),h=O?Wb(this.options.notFoundMode,l):void 0}const y=[],g=E=>E?.id?E.context??this.options.context??void 0:this.options.context??void 0,b=a&&s.searchStr===t.searchStr&&s.validatedSearches?.length===l.length,S=[];if(l.forEach((E,x)=>{const C=y[x-1],[O,L,k]=(()=>{if(b){const V=s.validatedSearches[x];return[V.search,V.strictSearch,void 0]}const P=C?.search??t.search,Y=C?._strictSearch??void 0;try{const V=ip(E.options.validateSearch,{...P})??void 0;return[{...P,...V},{...Y,...V},void 0]}catch(V){let te=V;if(V instanceof ru||(te=new ru(V.message,{cause:V})),r?.throwOnError)throw te;return[P,{},te]}})();b||S.push({search:O,strictSearch:L});const j=E.options.loaderDeps?.({search:O})??"",I=j?JSON.stringify(j):"",{interpolatedPath:H,usedParams:$}=_h({path:E.fullPath,params:u,decodeCharMap:this.pathParamsDecodeCharMap}),D=E.id+H+I,W=this.getMatch(D),ne=this.state.matches.find(P=>P.routeId===E.id),oe=W?._strictParams??$;let ie;if(!W)if(E.options.skipRouteOnParseError)for(const P in $)P in m&&(oe[P]=m[P]);else{const P=E.options.params?.parse??E.options.parseParams;if(P)try{Object.assign(oe,P(oe))}catch(Y){if(Lt(Y)||ln(Y)?ie=Y:ie=new iT(Y.message,{cause:Y}),r?.throwOnError)throw ie}}Object.assign(u,oe);const de=ne?"stay":"enter";let ue;if(W)ue={...W,cause:de,params:ne?xn(ne.params,u):u,_strictParams:oe,search:xn(ne?ne.search:W.search,O),_strictSearch:L};else{const P=E.options.loader||E.options.beforeLoad||E.lazyFn||ww(E)?"pending":"success";ue={id:D,ssr:this.isServer?void 0:E.options.ssr,index:x,routeId:E.id,params:ne?xn(ne.params,u):u,_strictParams:oe,pathname:H,updatedAt:Date.now(),search:ne?xn(ne.search,O):O,_strictSearch:L,searchError:void 0,status:P,isFetching:!1,error:void 0,paramsError:ie,__routeContext:void 0,_nonReactive:{loadPromise:Ko()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:de,loaderDeps:ne?xn(ne.loaderDeps,j):j,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:E.options.staticData||{},fullPath:E.fullPath}}r?.preload||(ue.globalNotFound=h===E.id),ue.searchError=k;const ve=g(C);ue.context={...ve,...ue.__routeContext,...ue.__beforeLoadContext},y.push(ue)}),!b&&S.length>0){const E=t.state?.__TSR_matches;E&&(E.searchStr=t.searchStr,E.validatedSearches=S)}return y.forEach((E,x)=>{const C=this.looseRoutesById[E.routeId];if(!this.getMatch(E.id)&&r?._buildLocation!==!0){const L=y[x-1],k=g(L);if(C.options.context){const j={deps:E.loaderDeps,params:E.params,context:k??{},location:t,navigate:I=>this.navigate({...I,_fromLocation:t}),buildLocation:this.buildLocation,cause:E.cause,abortController:E.abortController,preload:!!E.preload,matches:y};E.__routeContext=C.options.context(j)??void 0}E.context={...k,...E.__routeContext,...E.__beforeLoadContext}}}),{matches:y,rawParams:f}}}class ru extends Error{}class iT extends Error{}function aT(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function ip(e,t){if(e==null)return{};if("~standard"in e){const r=e["~standard"].validate(t);if(r instanceof Promise)throw new ru("Async validation not supported");if(r.issues)throw new ru(JSON.stringify(r.issues,void 0,2),{cause:r});return r.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function cT({pathname:e,routesById:t,processedTree:r}){const s={},a=Zn(e);let l,u={};const f=M2(a,r,!0);return f&&(l=f.route,Object.assign(s,f.rawParams),u=Object.assign({},f.parsedParams)),{matchedRoutes:f?.branch||[t[Gt]],routeParams:s,foundRoute:l,parsedParams:u}}function lT({matchResult:e,pathname:t,searchStr:r,notFoundRoute:s,notFoundMode:a}){const l={routeIds:e.matchedRoutes.map(f=>f.id),params:e.routeParams,parsedParams:e.parsedParams,searchStr:r};if(e.foundRoute?e.foundRoute.path!=="/"&&e.routeParams["**"]:Zn(t))if(s)l.globalNotFoundRouteId=s.id;else{if(a!=="root")for(let f=e.matchedRoutes.length-1;f>=0;f--){const h=e.matchedRoutes[f];if(h.children){l.globalNotFoundRouteId=h.id;break}}l.globalNotFoundRouteId||(l.globalNotFoundRouteId=Gt)}return l}function uT({routes:e,params:t,searchStr:r,globalNotFoundRouteId:s}){const a={};for(const u in t){const f=t[u];f!=null&&(a[u]=String(f))}const l={routeIds:e.map(u=>u.id),params:a,parsedParams:t,searchStr:r};return s&&(l.globalNotFoundRouteId=s),l}function fT({search:e,dest:t,destRoutes:r,_includeValidateSearch:s}){return dT(r)(e,t,s??!1)}function dT(e){const t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const a of e){if("search"in a.options)a.options.search?.middlewares&&t.middlewares.push(...a.options.search.middlewares);else if(a.options.preSearchFilters||a.options.postSearchFilters){const l=({search:u,next:f})=>{let h=u;"preSearchFilters"in a.options&&a.options.preSearchFilters&&(h=a.options.preSearchFilters.reduce((y,g)=>g(y),u));const m=f(h);return"postSearchFilters"in a.options&&a.options.postSearchFilters?a.options.postSearchFilters.reduce((y,g)=>g(y),m):m};t.middlewares.push(l)}if(a.options.validateSearch){const l=({search:u,next:f})=>{const h=f(u);if(!t._includeValidateSearch)return h;try{return{...h,...ip(a.options.validateSearch,h)??void 0}}catch{return h}};t.middlewares.push(l)}}const r=({search:a})=>{const l=t.dest;return l.search?l.search===!0?a:ao(l.search,a):{}};t.middlewares.push(r);const s=(a,l,u)=>{if(a>=u.length)return l;const f=u[a];return f({search:l,next:m=>s(a+1,m,u)})};return function(l,u,f){return t.dest=u,t._includeValidateSearch=f,s(0,l,t.middlewares)}}function Wb(e,t){if(e!=="root")for(let r=t.length-1;r>=0;r--){const s=t[r];if(s.children)return s.id}return Gt}const qn=Symbol.for("TSR_DEFERRED_PROMISE");function hT(e,t){const r=e;return r[qn]||(r[qn]={status:"pending"},r.then(s=>{r[qn].status="success",r[qn].data=s}).catch(s=>{r[qn].status="error",r[qn].error={data:oT(s),__isServerError:!0}})),r}const pT="Error preloading route! ☝️";class Ew{constructor(t){if(this.init=r=>{this.originalIndex=r.originalIndex;const s=this.options,a=!s?.path&&!s?.id;this.parentRoute=this.options.getParentRoute?.(),a?this._path=Gt:this.parentRoute||Kt(!1);let l=a?Gt:s?.path;l&&l!=="/"&&(l=fw(l));const u=s?.id||l;let f=a?Gt:Il([this.parentRoute.id===Gt?"":this.parentRoute.id,u]);l===Gt&&(l="/"),f!==Gt&&(f=Il(["/",f]));const h=f===Gt?"/":Il([this.parentRoute.fullPath,l]);this._path=l,this._id=f,this._fullPath=h,this._to=Zn(h)},this.addChildren=r=>this._addFileChildren(r),this._addFileChildren=r=>(Array.isArray(r)&&(this.children=r),typeof r=="object"&&r!==null&&(this.children=Object.values(r)),this),this._addFileTypes=()=>this,this.updateLoader=r=>(Object.assign(this.options,r),this),this.update=r=>(Object.assign(this.options,r),this),this.lazy=r=>(this.lazyFn=r,this),this.redirect=r=>Mp({from:this.fullPath,...r}),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}}class mT extends Ew{constructor(t){super(t)}}var gT=(e=>(e[e.AggregateError=1]="AggregateError",e[e.ArrowFunction=2]="ArrowFunction",e[e.ErrorPrototypeStack=4]="ErrorPrototypeStack",e[e.ObjectAssign=8]="ObjectAssign",e[e.BigIntTypedArray=16]="BigIntTypedArray",e[e.RegExp=32]="RegExp",e))(gT||{}),Er=Symbol.asyncIterator,Rw=Symbol.hasInstance,ii=Symbol.isConcatSpreadable,Rr=Symbol.iterator,Cw=Symbol.match,Tw=Symbol.matchAll,Aw=Symbol.replace,Ow=Symbol.search,Mw=Symbol.species,kw=Symbol.split,Nw=Symbol.toPrimitive,ai=Symbol.toStringTag,zw=Symbol.unscopables,jw={[Er]:0,[Rw]:1,[ii]:2,[Rr]:3,[Cw]:4,[Tw]:5,[Aw]:6,[Ow]:7,[Mw]:8,[kw]:9,[Nw]:10,[ai]:11,[zw]:12},yT={0:Er,1:Rw,2:ii,3:Rr,4:Cw,5:Tw,6:Aw,7:Ow,8:Mw,9:kw,10:Nw,11:ai,12:zw},A=void 0,vT={2:!0,3:!1,1:A,0:null,4:-0,5:Number.POSITIVE_INFINITY,6:Number.NEGATIVE_INFINITY,7:Number.NaN},bT={0:"Error",1:"EvalError",2:"RangeError",3:"ReferenceError",4:"SyntaxError",5:"TypeError",6:"URIError"},ST={0:Error,1:EvalError,2:RangeError,3:ReferenceError,4:SyntaxError,5:TypeError,6:URIError};function Le(e,t,r,s,a,l,u,f,h,m,y,g){return{t:e,i:t,s:r,c:s,m:a,p:l,e:u,a:f,f:h,b:m,o:y,l:g}}function go(e){return Le(2,A,e,A,A,A,A,A,A,A,A,A)}var Lw=go(2),Dw=go(3),wT=go(1),_T=go(0),xT=go(4),ET=go(5),RT=go(6),CT=go(7);function TT(e){switch(e){case'"':return'\\"';case"\\":return"\\\\";case`
|
|
11
|
-
`:return"\\n";case"\r":return"\\r";case"\b":return"\\b";case" ":return"\\t";case"\f":return"\\f";case"<":return"\\x3C";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:return A}}function yo(e){let t="",r=0,s;for(let a=0,l=e.length;a<l;a++)s=TT(e[a]),s&&(t+=e.slice(r,a)+s,r=a+1);return r===0?t=e:t+=e.slice(r),t}function AT(e){switch(e){case"\\\\":return"\\";case'\\"':return'"';case"\\n":return`
|
|
12
|
-
`;case"\\r":return"\r";case"\\b":return"\b";case"\\t":return" ";case"\\f":return"\f";case"\\x3C":return"<";case"\\u2028":return"\u2028";case"\\u2029":return"\u2029";default:return e}}function ts(e){return e.replace(/(\\\\|\\"|\\n|\\r|\\b|\\t|\\f|\\u2028|\\u2029|\\x3C)/g,AT)}var Rl="__SEROVAL_REFS__",Pw=new Map,ei=new Map;function Uw(e){return Pw.has(e)}function OT(e){return ei.has(e)}function MT(e){if(Uw(e))return Pw.get(e);throw new aA(e)}function kT(e){if(OT(e))return ei.get(e);throw new cA(e)}typeof globalThis<"u"?Object.defineProperty(globalThis,Rl,{value:ei,configurable:!0,writable:!1,enumerable:!1}):typeof window<"u"?Object.defineProperty(window,Rl,{value:ei,configurable:!0,writable:!1,enumerable:!1}):typeof self<"u"?Object.defineProperty(self,Rl,{value:ei,configurable:!0,writable:!1,enumerable:!1}):typeof global<"u"&&Object.defineProperty(global,Rl,{value:ei,configurable:!0,writable:!1,enumerable:!1});function kp(e){return e instanceof EvalError?1:e instanceof RangeError?2:e instanceof ReferenceError?3:e instanceof SyntaxError?4:e instanceof TypeError?5:e instanceof URIError?6:0}function NT(e){let t=bT[kp(e)];return e.name!==t?{name:e.name}:e.constructor.name!==t?{name:e.constructor.name}:{}}function $w(e,t){let r=NT(e),s=Object.getOwnPropertyNames(e);for(let a=0,l=s.length,u;a<l;a++)u=s[a],u!=="name"&&u!=="message"&&(u==="stack"?t&4&&(r=r||{},r[u]=e[u]):(r=r||{},r[u]=e[u]));return r}function Iw(e){return Object.isFrozen(e)?3:Object.isSealed(e)?2:Object.isExtensible(e)?0:1}function zT(e){switch(e){case Number.POSITIVE_INFINITY:return ET;case Number.NEGATIVE_INFINITY:return RT}return e!==e?CT:Object.is(e,-0)?xT:Le(0,A,e,A,A,A,A,A,A,A,A,A)}function Bw(e){return Le(1,A,yo(e),A,A,A,A,A,A,A,A,A)}function jT(e){return Le(3,A,""+e,A,A,A,A,A,A,A,A,A)}function LT(e){return Le(4,e,A,A,A,A,A,A,A,A,A,A)}function DT(e,t){let r=t.valueOf();return Le(5,e,r!==r?"":t.toISOString(),A,A,A,A,A,A,A,A,A)}function PT(e,t){return Le(6,e,A,yo(t.source),t.flags,A,A,A,A,A,A,A)}function UT(e,t){return Le(17,e,jw[t],A,A,A,A,A,A,A,A,A)}function $T(e,t){return Le(18,e,yo(MT(t)),A,A,A,A,A,A,A,A,A)}function IT(e,t,r){return Le(25,e,r,yo(t),A,A,A,A,A,A,A,A)}function BT(e,t,r){return Le(9,e,A,A,A,A,A,r,A,A,Iw(t),A)}function qT(e,t){return Le(21,e,A,A,A,A,A,A,t,A,A,A)}function VT(e,t,r){return Le(15,e,A,t.constructor.name,A,A,A,A,r,t.byteOffset,A,t.length)}function FT(e,t,r){return Le(16,e,A,t.constructor.name,A,A,A,A,r,t.byteOffset,A,t.byteLength)}function HT(e,t,r){return Le(20,e,A,A,A,A,A,A,r,t.byteOffset,A,t.byteLength)}function ZT(e,t,r){return Le(13,e,kp(t),A,yo(t.message),r,A,A,A,A,A,A)}function QT(e,t,r){return Le(14,e,kp(t),A,yo(t.message),r,A,A,A,A,A,A)}function GT(e,t){return Le(7,e,A,A,A,A,A,t,A,A,A,A)}function YT(e,t){return Le(28,A,A,A,A,A,A,[e,t],A,A,A,A)}function KT(e,t){return Le(30,A,A,A,A,A,A,[e,t],A,A,A,A)}function XT(e,t,r){return Le(31,e,A,A,A,A,A,r,t,A,A,A)}function JT(e,t){return Le(32,e,A,A,A,A,A,A,t,A,A,A)}function WT(e,t){return Le(33,e,A,A,A,A,A,A,t,A,A,A)}function eA(e,t){return Le(34,e,A,A,A,A,A,A,t,A,A,A)}function tA(e,t,r,s){return Le(35,e,r,A,A,A,A,t,A,A,A,s)}var nA={parsing:1,serialization:2,deserialization:3};function rA(e){return`Seroval Error (step: ${nA[e]})`}var oA=(e,t)=>rA(e),qw=class extends Error{constructor(e,t){super(oA(e)),this.cause=t}},e0=class extends qw{constructor(e){super("parsing",e)}},sA=class extends qw{constructor(e){super("deserialization",e)}};function Ar(e){return`Seroval Error (specific: ${e})`}var Ru=class extends Error{constructor(t){super(Ar(1)),this.value=t}},Vw=class extends Error{constructor(t){super(Ar(2))}},iA=class extends Error{constructor(e){super(Ar(3))}},Ka=class extends Error{constructor(e){super(Ar(4))}},aA=class extends Error{constructor(e){super(Ar(5)),this.value=e}},cA=class extends Error{constructor(e){super(Ar(6))}},lA=class extends Error{constructor(e){super(Ar(7))}},vo=class extends Error{constructor(e){super(Ar(8))}},uA=class extends Error{constructor(t){super(Ar(9))}},fA=class{constructor(e,t){this.value=e,this.replacement=t}},Cu=()=>{let e={p:0,s:0,f:0};return e.p=new Promise((t,r)=>{e.s=t,e.f=r}),e},dA=(e,t)=>{e.s(t),e.p.s=1,e.p.v=t},hA=(e,t)=>{e.f(t),e.p.s=2,e.p.v=t};Cu.toString();dA.toString();hA.toString();var pA=()=>{let e=[],t=[],r=!0,s=!1,a=0,l=(h,m,y)=>{for(y=0;y<a;y++)t[y]&&t[y][m](h)},u=(h,m,y,g)=>{for(m=0,y=e.length;m<y;m++)g=e[m],!r&&m===y-1?h[s?"return":"throw"](g):h.next(g)},f=(h,m)=>(r&&(m=a++,t[m]=h),u(h),()=>{r&&(t[m]=t[a],t[a--]=void 0)});return{__SEROVAL_STREAM__:!0,on:h=>f(h),next:h=>{r&&(e.push(h),l(h,"next"))},throw:h=>{r&&(e.push(h),l(h,"throw"),r=!1,s=!1,t.length=0)},return:h=>{r&&(e.push(h),l(h,"return"),r=!1,s=!0,t.length=0)}}},mA=e=>t=>()=>{let r=0,s={[e]:()=>s,next:()=>{if(r>t.d)return{done:!0,value:void 0};let a=r++,l=t.v[a];if(a===t.t)throw l;return{done:a===t.d,value:l}}};return s},gA=(e,t)=>r=>()=>{let s=0,a=-1,l=!1,u=[],f=[],h=(y=0,g=f.length)=>{for(;y<g;y++)f[y].s({done:!0,value:void 0})};r.on({next:y=>{let g=f.shift();g&&g.s({done:!1,value:y}),u.push(y)},throw:y=>{let g=f.shift();g&&g.f(y),h(),a=u.length,l=!0,u.push(y)},return:y=>{let g=f.shift();g&&g.s({done:!0,value:y}),h(),a=u.length,u.push(y)}});let m={[e]:()=>m,next:()=>{if(a===-1){let b=s++;if(b>=u.length){let S=t();return f.push(S),S.p}return{done:!1,value:u[b]}}if(s>a)return{done:!0,value:void 0};let y=s++,g=u[y];if(y!==a)return{done:!1,value:g};if(l)throw g;return{done:!0,value:g}}};return m},Fw=e=>{let t=atob(e),r=t.length,s=new Uint8Array(r);for(let a=0;a<r;a++)s[a]=t.charCodeAt(a);return s.buffer};Fw.toString();function yA(e){return"__SEROVAL_SEQUENCE__"in e}function Hw(e,t,r){return{__SEROVAL_SEQUENCE__:!0,v:e,t,d:r}}function vA(e){let t=[],r=-1,s=-1,a=e[Rr]();for(;;)try{let l=a.next();if(t.push(l.value),l.done){s=t.length-1;break}}catch(l){r=t.length,t.push(l)}return Hw(t,r,s)}var bA=mA(Rr);function SA(e){return bA(e)}var wA={},_A={},xA={0:{},1:{},2:{},3:{},4:{},5:{}};function Tu(e){return"__SEROVAL_STREAM__"in e}function ns(){return pA()}function EA(e){let t=ns(),r=e[Er]();async function s(){try{let a=await r.next();a.done?t.return(a.value):(t.next(a.value),await s())}catch(a){t.throw(a)}}return s().catch(()=>{}),t}var RA=gA(Er,Cu);function CA(e){return RA(e)}async function TA(e){try{return[1,await e]}catch(t){return[0,t]}}function AA(e,t){return{plugins:t.plugins,mode:e,marked:new Set,features:63^(t.disabledFeatures||0),refs:t.refs||new Map,depthLimit:t.depthLimit||1e3}}function ql(e,t){e.marked.add(t)}function OA(e,t){let r=e.refs.size;return e.refs.set(t,r),r}function Au(e,t){let r=e.refs.get(t);return r!=null?(ql(e,r),{type:1,value:LT(r)}):{type:0,value:OA(e,t)}}function Np(e,t){let r=Au(e,t);return r.type===1?r:Uw(t)?{type:2,value:$T(r.value,t)}:r}function Zo(e,t){let r=Np(e,t);if(r.type!==0)return r.value;if(t in jw)return UT(r.value,t);throw new Ru(t)}function Ou(e,t){let r=Au(e,xA[t]);return r.type===1?r.value:Le(26,r.value,t,A,A,A,A,A,A,A,A,A)}function MA(e){let t=Au(e,wA);return t.type===1?t.value:Le(27,t.value,A,A,A,A,A,A,Zo(e,Rr),A,A,A)}function kA(e){let t=Au(e,_A);return t.type===1?t.value:Le(29,t.value,A,A,A,A,A,[Ou(e,1),Zo(e,Er)],A,A,A,A)}function NA(e,t,r,s){return Le(r?11:10,e,A,A,A,s,A,A,A,A,Iw(t),A)}function zA(e,t,r,s){return Le(8,t,A,A,A,A,{k:r,v:s},A,Ou(e,0),A,A,A)}function jA(e,t,r){let s=new Uint8Array(r),a="";for(let l=0,u=s.length;l<u;l++)a+=String.fromCharCode(s[l]);return Le(19,t,yo(btoa(a)),A,A,A,A,A,Ou(e,5),A,A,A)}function LA(e,t){return{base:AA(e,t),child:void 0}}var DA=class{constructor(e,t){this._p=e,this.depth=t}parse(e){return vt(this._p,this.depth,e)}};async function PA(e,t,r){let s=[];for(let a=0,l=r.length;a<l;a++)a in r?s[a]=await vt(e,t,r[a]):s[a]=0;return s}async function UA(e,t,r,s){return BT(r,s,await PA(e,t,s))}async function zp(e,t,r){let s=Object.entries(r),a=[],l=[];for(let u=0,f=s.length;u<f;u++)a.push(yo(s[u][0])),l.push(await vt(e,t,s[u][1]));return Rr in r&&(a.push(Zo(e.base,Rr)),l.push(YT(MA(e.base),await vt(e,t,vA(r))))),Er in r&&(a.push(Zo(e.base,Er)),l.push(KT(kA(e.base),await vt(e,t,EA(r))))),ai in r&&(a.push(Zo(e.base,ai)),l.push(Bw(r[ai]))),ii in r&&(a.push(Zo(e.base,ii)),l.push(r[ii]?Lw:Dw)),{k:a,v:l}}async function Eh(e,t,r,s,a){return NA(r,s,a,await zp(e,t,s))}async function $A(e,t,r,s){return qT(r,await vt(e,t,s.valueOf()))}async function IA(e,t,r,s){return VT(r,s,await vt(e,t,s.buffer))}async function BA(e,t,r,s){return FT(r,s,await vt(e,t,s.buffer))}async function qA(e,t,r,s){return HT(r,s,await vt(e,t,s.buffer))}async function t0(e,t,r,s){let a=$w(s,e.base.features);return ZT(r,s,a?await zp(e,t,a):A)}async function VA(e,t,r,s){let a=$w(s,e.base.features);return QT(r,s,a?await zp(e,t,a):A)}async function FA(e,t,r,s){let a=[],l=[];for(let[u,f]of s.entries())a.push(await vt(e,t,u)),l.push(await vt(e,t,f));return zA(e.base,r,a,l)}async function HA(e,t,r,s){let a=[];for(let l of s.keys())a.push(await vt(e,t,l));return GT(r,a)}async function Zw(e,t,r,s){let a=e.base.plugins;if(a)for(let l=0,u=a.length;l<u;l++){let f=a[l];if(f.parse.async&&f.test(s))return IT(r,f.tag,await f.parse.async(s,new DA(e,t),{id:r}))}return A}async function ZA(e,t,r,s){let[a,l]=await TA(s);return Le(12,r,a,A,A,A,A,A,await vt(e,t,l),A,A,A)}function QA(e,t,r,s,a){let l=[],u=r.on({next:f=>{ql(this.base,t),vt(this,e,f).then(h=>{l.push(JT(t,h))},h=>{a(h),u()})},throw:f=>{ql(this.base,t),vt(this,e,f).then(h=>{l.push(WT(t,h)),s(l),u()},h=>{a(h),u()})},return:f=>{ql(this.base,t),vt(this,e,f).then(h=>{l.push(eA(t,h)),s(l),u()},h=>{a(h),u()})}})}async function GA(e,t,r,s){return XT(r,Ou(e.base,4),await new Promise(QA.bind(e,t,r,s)))}async function YA(e,t,r,s){let a=[];for(let l=0,u=s.v.length;l<u;l++)a[l]=await vt(e,t,s.v[l]);return tA(r,a,s.t,s.d)}async function KA(e,t,r,s){if(Array.isArray(s))return UA(e,t,r,s);if(Tu(s))return GA(e,t,r,s);if(yA(s))return YA(e,t,r,s);let a=s.constructor;if(a===fA)return vt(e,t,s.replacement);let l=await Zw(e,t,r,s);if(l)return l;switch(a){case Object:return Eh(e,t,r,s,!1);case A:return Eh(e,t,r,s,!0);case Date:return DT(r,s);case Error:case EvalError:case RangeError:case ReferenceError:case SyntaxError:case TypeError:case URIError:return t0(e,t,r,s);case Number:case Boolean:case String:case BigInt:return $A(e,t,r,s);case ArrayBuffer:return jA(e.base,r,s);case Int8Array:case Int16Array:case Int32Array:case Uint8Array:case Uint16Array:case Uint32Array:case Uint8ClampedArray:case Float32Array:case Float64Array:return IA(e,t,r,s);case DataView:return qA(e,t,r,s);case Map:return FA(e,t,r,s);case Set:return HA(e,t,r,s)}if(a===Promise||s instanceof Promise)return ZA(e,t,r,s);let u=e.base.features;if(u&32&&a===RegExp)return PT(r,s);if(u&16)switch(a){case BigInt64Array:case BigUint64Array:return BA(e,t,r,s)}if(u&1&&typeof AggregateError<"u"&&(a===AggregateError||s instanceof AggregateError))return VA(e,t,r,s);if(s instanceof Error)return t0(e,t,r,s);if(Rr in s||Er in s)return Eh(e,t,r,s,!!a);throw new Ru(s)}async function XA(e,t,r){let s=Np(e.base,r);if(s.type!==0)return s.value;let a=await Zw(e,t,s.value,r);if(a)return a;throw new Ru(r)}async function vt(e,t,r){switch(typeof r){case"boolean":return r?Lw:Dw;case"undefined":return wT;case"string":return Bw(r);case"number":return zT(r);case"bigint":return jT(r);case"object":{if(r){let s=Np(e.base,r);return s.type===0?await KA(e,t+1,s.value,r):s.value}return _T}case"symbol":return Zo(e.base,r);case"function":return XA(e,t,r);default:throw new Ru(r)}}async function JA(e,t){try{return await vt(e,0,t)}catch(r){throw r instanceof e0?r:new e0(r)}}var WA=(e=>(e[e.Vanilla=1]="Vanilla",e[e.Cross=2]="Cross",e))(WA||{});function Qw(e,t){for(let r=0,s=t.length;r<s;r++){let a=t[r];e.has(a)||(e.add(a),a.extends&&Qw(e,a.extends))}}function Gw(e){if(e){let t=new Set;return Qw(t,e),[...t]}}function eO(e){switch(e){case"Int8Array":return Int8Array;case"Int16Array":return Int16Array;case"Int32Array":return Int32Array;case"Uint8Array":return Uint8Array;case"Uint16Array":return Uint16Array;case"Uint32Array":return Uint32Array;case"Uint8ClampedArray":return Uint8ClampedArray;case"Float32Array":return Float32Array;case"Float64Array":return Float64Array;case"BigInt64Array":return BigInt64Array;case"BigUint64Array":return BigUint64Array;default:throw new lA(e)}}var tO=1e6,nO=1e4,rO=2e4;function Yw(e,t){switch(t){case 3:return Object.freeze(e);case 1:return Object.preventExtensions(e);case 2:return Object.seal(e);default:return e}}var oO=1e3;function sO(e,t){var r;return{mode:e,plugins:t.plugins,refs:t.refs||new Map,features:(r=t.features)!=null?r:63^(t.disabledFeatures||0),depthLimit:t.depthLimit||oO}}function iO(e){return{mode:2,base:sO(2,e),child:A}}var aO=class{constructor(e,t){this._p=e,this.depth=t}deserialize(e){return Ze(this._p,this.depth,e)}};function Kw(e,t){if(t<0||!Number.isFinite(t)||!Number.isInteger(t))throw new vo({t:4,i:t});if(e.refs.has(t))throw new Error("Conflicted ref id: "+t)}function cO(e,t,r){return Kw(e.base,t),e.state.marked.has(t)&&e.base.refs.set(t,r),r}function lO(e,t,r){return Kw(e.base,t),e.base.refs.set(t,r),r}function bt(e,t,r){return e.mode===1?cO(e,t,r):lO(e,t,r)}function ap(e,t,r){if(Object.hasOwn(t,r))return t[r];throw new vo(e)}function uO(e,t){return bt(e,t.i,kT(ts(t.s)))}function fO(e,t,r){let s=r.a,a=s.length,l=bt(e,r.i,new Array(a));for(let u=0,f;u<a;u++)f=s[u],f&&(l[u]=Ze(e,t,f));return Yw(l,r.o),l}function dO(e){switch(e){case"constructor":case"__proto__":case"prototype":case"__defineGetter__":case"__defineSetter__":case"__lookupGetter__":case"__lookupSetter__":return!1;default:return!0}}function hO(e){switch(e){case Er:case ii:case ai:case Rr:return!0;default:return!1}}function n0(e,t,r){dO(t)?e[t]=r:Object.defineProperty(e,t,{value:r,configurable:!0,enumerable:!0,writable:!0})}function pO(e,t,r,s,a){if(typeof s=="string")n0(r,s,Ze(e,t,a));else{let l=Ze(e,t,s);switch(typeof l){case"string":n0(r,l,Ze(e,t,a));break;case"symbol":hO(l)&&(r[l]=Ze(e,t,a));break;default:throw new vo(s)}}}function Xw(e,t,r,s){let a=r.k;if(a.length>0)for(let l=0,u=r.v,f=a.length;l<f;l++)pO(e,t,s,a[l],u[l]);return s}function mO(e,t,r){let s=bt(e,r.i,r.t===10?{}:Object.create(null));return Xw(e,t,r.p,s),Yw(s,r.o),s}function gO(e,t){return bt(e,t.i,new Date(t.s))}function yO(e,t){if(e.base.features&32){let r=ts(t.c);if(r.length>rO)throw new vo(t);return bt(e,t.i,new RegExp(r,t.m))}throw new Vw(t)}function vO(e,t,r){let s=bt(e,r.i,new Set);for(let a=0,l=r.a,u=l.length;a<u;a++)s.add(Ze(e,t,l[a]));return s}function bO(e,t,r){let s=bt(e,r.i,new Map);for(let a=0,l=r.e.k,u=r.e.v,f=l.length;a<f;a++)s.set(Ze(e,t,l[a]),Ze(e,t,u[a]));return s}function SO(e,t){if(t.s.length>tO)throw new vo(t);return bt(e,t.i,Fw(ts(t.s)))}function wO(e,t,r){var s;let a=eO(r.c),l=Ze(e,t,r.f),u=(s=r.b)!=null?s:0;if(u<0||u>l.byteLength)throw new vo(r);return bt(e,r.i,new a(l,u,r.l))}function _O(e,t,r){var s;let a=Ze(e,t,r.f),l=(s=r.b)!=null?s:0;if(l<0||l>a.byteLength)throw new vo(r);return bt(e,r.i,new DataView(a,l,r.l))}function Jw(e,t,r,s){if(r.p){let a=Xw(e,t,r.p,{});Object.defineProperties(s,Object.getOwnPropertyDescriptors(a))}return s}function xO(e,t,r){let s=bt(e,r.i,new AggregateError([],ts(r.m)));return Jw(e,t,r,s)}function EO(e,t,r){let s=ap(r,ST,r.s),a=bt(e,r.i,new s(ts(r.m)));return Jw(e,t,r,a)}function RO(e,t,r){let s=Cu(),a=bt(e,r.i,s.p),l=Ze(e,t,r.f);return r.s?s.s(l):s.f(l),a}function CO(e,t,r){return bt(e,r.i,Object(Ze(e,t,r.f)))}function TO(e,t,r){let s=e.base.plugins;if(s){let a=ts(r.c);for(let l=0,u=s.length;l<u;l++){let f=s[l];if(f.tag===a)return bt(e,r.i,f.deserialize(r.s,new aO(e,t),{id:r.i}))}}throw new iA(r.c)}function AO(e,t){return bt(e,t.i,bt(e,t.s,Cu()).p)}function OO(e,t,r){let s=e.base.refs.get(r.i);if(s)return s.s(Ze(e,t,r.a[1])),A;throw new Ka("Promise")}function MO(e,t,r){let s=e.base.refs.get(r.i);if(s)return s.f(Ze(e,t,r.a[1])),A;throw new Ka("Promise")}function kO(e,t,r){Ze(e,t,r.a[0]);let s=Ze(e,t,r.a[1]);return SA(s)}function NO(e,t,r){Ze(e,t,r.a[0]);let s=Ze(e,t,r.a[1]);return CA(s)}function zO(e,t,r){let s=bt(e,r.i,ns()),a=r.a,l=a.length;if(l)for(let u=0;u<l;u++)Ze(e,t,a[u]);return s}function jO(e,t,r){let s=e.base.refs.get(r.i);if(s&&Tu(s))return s.next(Ze(e,t,r.f)),A;throw new Ka("Stream")}function LO(e,t,r){let s=e.base.refs.get(r.i);if(s&&Tu(s))return s.throw(Ze(e,t,r.f)),A;throw new Ka("Stream")}function DO(e,t,r){let s=e.base.refs.get(r.i);if(s&&Tu(s))return s.return(Ze(e,t,r.f)),A;throw new Ka("Stream")}function PO(e,t,r){return Ze(e,t,r.f),A}function UO(e,t,r){return Ze(e,t,r.a[1]),A}function $O(e,t,r){let s=bt(e,r.i,Hw([],r.s,r.l));for(let a=0,l=r.a.length;a<l;a++)s.v[a]=Ze(e,t,r.a[a]);return s}function Ze(e,t,r){if(t>e.base.depthLimit)throw new uA(e.base.depthLimit);switch(t+=1,r.t){case 2:return ap(r,vT,r.s);case 0:return Number(r.s);case 1:return ts(String(r.s));case 3:if(String(r.s).length>nO)throw new vo(r);return BigInt(r.s);case 4:return e.base.refs.get(r.i);case 18:return uO(e,r);case 9:return fO(e,t,r);case 10:case 11:return mO(e,t,r);case 5:return gO(e,r);case 6:return yO(e,r);case 7:return vO(e,t,r);case 8:return bO(e,t,r);case 19:return SO(e,r);case 16:case 15:return wO(e,t,r);case 20:return _O(e,t,r);case 14:return xO(e,t,r);case 13:return EO(e,t,r);case 12:return RO(e,t,r);case 17:return ap(r,yT,r.s);case 21:return CO(e,t,r);case 25:return TO(e,t,r);case 22:return AO(e,r);case 23:return OO(e,t,r);case 24:return MO(e,t,r);case 28:return kO(e,t,r);case 30:return NO(e,t,r);case 31:return zO(e,t,r);case 32:return jO(e,t,r);case 33:return LO(e,t,r);case 34:return DO(e,t,r);case 27:return PO(e,t,r);case 29:return UO(e,t,r);case 35:return $O(e,t,r);default:throw new Vw(r)}}function IO(e,t){try{return Ze(e,0,t)}catch(r){throw new sA(r)}}var BO=()=>T;BO.toString();function Rh(e,t){let r=Gw(t.plugins),s=iO({plugins:r,refs:t.refs,features:t.features,disabledFeatures:t.disabledFeatures});return IO(s,e)}async function qO(e,t={}){let r=Gw(t.plugins),s=LA(1,{plugins:r,disabledFeatures:t.disabledFeatures});return{t:await JA(s,e),f:s.base.features,m:Array.from(s.base.marked)}}function VO(e){return{tag:"$TSR/t/"+e.key,test:e.test,parse:{sync(t,r){return r.parse(e.toSerializable(t))},async async(t,r){return await r.parse(e.toSerializable(t))},stream(t,r){return r.parse(e.toSerializable(t))}},serialize:void 0,deserialize(t,r){return e.fromSerializable(r.deserialize(t))}}}var so={},Ww=e=>new ReadableStream({start:t=>{e.on({next:r=>{try{t.enqueue(r)}catch{}},throw:r=>{t.error(r)},return:()=>{try{t.close()}catch{}}})}}),FO={tag:"seroval-plugins/web/ReadableStreamFactory",test(e){return e===so},parse:{sync(){return so},async async(){return await Promise.resolve(so)},stream(){return so}},serialize(){return Ww.toString()},deserialize(){return so}};function r0(e){let t=ns(),r=e.getReader();async function s(){try{let a=await r.read();a.done?t.return(a.value):(t.next(a.value),await s())}catch(a){t.throw(a)}}return s().catch(()=>{}),t}var HO={tag:"seroval/plugins/web/ReadableStream",extends:[FO],test(e){return typeof ReadableStream>"u"?!1:e instanceof ReadableStream},parse:{sync(e,t){return{factory:t.parse(so),stream:t.parse(ns())}},async async(e,t){return{factory:await t.parse(so),stream:await t.parse(r0(e))}},stream(e,t){return{factory:t.parse(so),stream:t.parse(r0(e))}}},serialize(e,t){return"("+t.serialize(e.factory)+")("+t.serialize(e.stream)+")"},deserialize(e,t){let r=t.deserialize(e.stream);return Ww(r)}},ZO=HO;const QO={tag:"$TSR/Error",test(e){return e instanceof Error},parse:{sync(e,t){return{message:t.parse(e.message)}},async async(e,t){return{message:await t.parse(e.message)}},stream(e,t){return{message:t.parse(e.message)}}},serialize(e,t){return"new Error("+t.serialize(e.message)+")"},deserialize(e,t){return new Error(t.deserialize(e.message))}};class GO{constructor(t,r){this.stream=t,this.hint=r?.hint??"binary"}}const ou=globalThis.Buffer,e_=!!ou&&typeof ou.from=="function";function t_(e){if(e.length===0)return"";if(e_)return ou.from(e).toString("base64");const t=32768,r=[];for(let s=0;s<e.length;s+=t){const a=e.subarray(s,s+t);r.push(String.fromCharCode.apply(null,a))}return btoa(r.join(""))}function n_(e){if(e.length===0)return new Uint8Array(0);if(e_){const s=ou.from(e,"base64");return new Uint8Array(s.buffer,s.byteOffset,s.byteLength)}const t=atob(e),r=new Uint8Array(t.length);for(let s=0;s<t.length;s++)r[s]=t.charCodeAt(s);return r}const Na=Object.create(null),za=Object.create(null),YO=e=>new ReadableStream({start(t){e.on({next(r){try{t.enqueue(n_(r))}catch{}},throw(r){t.error(r)},return(){try{t.close()}catch{}}})}}),KO=new TextEncoder,XO=e=>new ReadableStream({start(t){e.on({next(r){try{typeof r=="string"?t.enqueue(KO.encode(r)):t.enqueue(n_(r.$b64))}catch{}},throw(r){t.error(r)},return(){try{t.close()}catch{}}})}}),JO="(s=>new ReadableStream({start(c){s.on({next(b){try{const d=atob(b),a=new Uint8Array(d.length);for(let i=0;i<d.length;i++)a[i]=d.charCodeAt(i);c.enqueue(a)}catch(_){}},throw(e){c.error(e)},return(){try{c.close()}catch(_){}}})}}))",WO="(s=>{const e=new TextEncoder();return new ReadableStream({start(c){s.on({next(v){try{if(typeof v==='string'){c.enqueue(e.encode(v))}else{const d=atob(v.$b64),a=new Uint8Array(d.length);for(let i=0;i<d.length;i++)a[i]=d.charCodeAt(i);c.enqueue(a)}}catch(_){}},throw(x){c.error(x)},return(){try{c.close()}catch(_){}}})}})})";function o0(e){const t=ns(),r=e.getReader();return(async()=>{try{for(;;){const{done:s,value:a}=await r.read();if(s){t.return(void 0);break}t.next(t_(a))}}catch(s){t.throw(s)}finally{r.releaseLock()}})(),t}function s0(e){const t=ns(),r=e.getReader(),s=new TextDecoder("utf-8",{fatal:!0});return(async()=>{try{for(;;){const{done:a,value:l}=await r.read();if(a){try{const u=s.decode();u.length>0&&t.next(u)}catch{}t.return(void 0);break}try{const u=s.decode(l,{stream:!0});u.length>0&&t.next(u)}catch{t.next({$b64:t_(l)})}}}catch(a){t.throw(a)}finally{r.releaseLock()}})(),t}const eM={tag:"tss/RawStreamFactory",test(e){return e===Na},parse:{sync(){},async(){return Promise.resolve(void 0)},stream(){}},serialize(){return JO},deserialize(){return Na}},tM={tag:"tss/RawStreamFactoryText",test(e){return e===za},parse:{sync(){},async(){return Promise.resolve(void 0)},stream(){}},serialize(){return WO},deserialize(){return za}},nM={tag:"tss/RawStream",extends:[eM,tM],test(e){return e instanceof GO},parse:{sync(e,t){const r=e.hint==="text"?za:Na;return{hint:e.hint,factory:t.parse(r),stream:t.parse(ns())}},async async(e,t){const r=e.hint==="text"?za:Na,s=e.hint==="text"?s0(e.stream):o0(e.stream);return{hint:e.hint,factory:await t.parse(r),stream:await t.parse(s)}},stream(e,t){const r=e.hint==="text"?za:Na,s=e.hint==="text"?s0(e.stream):o0(e.stream);return{hint:e.hint,factory:t.parse(r),stream:t.parse(s)}}},serialize(e,t){return"("+t.serialize(e.factory)+")("+t.serialize(e.stream)+")"},deserialize(e,t){const r=t.deserialize(e.stream);return e.hint==="text"?XO(r):YO(r)}};function rM(e){return{tag:"tss/RawStream",test:()=>!1,parse:{},serialize(){throw new Error("RawStreamDeserializePlugin.serialize should not be called. Client only deserializes.")},deserialize(t){return e(t.streamId)}}}const oM=[QO,nM,ZO],sM="use",su=_u[sM],Cl=typeof window<"u"?w.useLayoutEffect:w.useEffect;function Ch(e){const t=w.useRef({value:e,prev:null}),r=t.current.value;return e!==r&&(t.current={value:e,prev:r}),t.current.prev}function iM(e,t,r={},s={}){w.useEffect(()=>{if(!e.current||s.disabled||typeof IntersectionObserver!="function")return;const a=new IntersectionObserver(([l])=>{t(l)},r);return a.observe(e.current),()=>{a.disconnect()}},[t,r,s.disabled,e])}function aM(e){const t=w.useRef(null);return w.useImperativeHandle(e,()=>t.current,[]),t}function cM({promise:e}){if(su)return su(e);const t=hT(e);if(t[qn].status==="pending")throw t;if(t[qn].status==="error")throw t[qn].error;return t[qn].data}function lM(e){const t=_.jsx(uM,{...e});return e.fallback?_.jsx(w.Suspense,{fallback:e.fallback,children:t}):t}function uM(e){const t=cM(e);return e.children(t)}function jp(e){const t=e.errorComponent??Mu;return _.jsx(fM,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:r,reset:s})=>r?w.createElement(t,{error:r,reset:s}):e.children})}class fM extends w.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(t){return{resetKey:t.getResetKey()}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidUpdate(t,r){r.error&&r.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(t,r){this.props.onCatch&&this.props.onCatch(t,r)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function Mu({error:e}){const[t,r]=w.useState(!1);return _.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[_.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[_.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),_.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>r(s=>!s),children:t?"Hide Error":"Show Error"})]}),_.jsx("div",{style:{height:".25rem"}}),t?_.jsx("div",{children:_.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?_.jsx("code",{children:e.message}):null})}):null]})}function dM({children:e,fallback:t=null}){return r_()?_.jsx(kt.Fragment,{children:e}):_.jsx(kt.Fragment,{children:t})}function r_(){return kt.useSyncExternalStore(hM,()=>!0,()=>!1)}function hM(){return()=>{}}var Th={exports:{}},Ah={},Oh={exports:{}},Mh={};var i0;function pM(){if(i0)return Mh;i0=1;var e=Ya();function t(g,b){return g===b&&(g!==0||1/g===1/b)||g!==g&&b!==b}var r=typeof Object.is=="function"?Object.is:t,s=e.useState,a=e.useEffect,l=e.useLayoutEffect,u=e.useDebugValue;function f(g,b){var S=b(),E=s({inst:{value:S,getSnapshot:b}}),x=E[0].inst,C=E[1];return l(function(){x.value=S,x.getSnapshot=b,h(x)&&C({inst:x})},[g,S,b]),a(function(){return h(x)&&C({inst:x}),g(function(){h(x)&&C({inst:x})})},[g]),u(S),S}function h(g){var b=g.getSnapshot;g=g.value;try{var S=b();return!r(g,S)}catch{return!0}}function m(g,b){return b()}var y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?m:f;return Mh.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:y,Mh}var a0;function o_(){return a0||(a0=1,Oh.exports=pM()),Oh.exports}var c0;function mM(){if(c0)return Ah;c0=1;var e=Ya(),t=o_();function r(m,y){return m===y&&(m!==0||1/m===1/y)||m!==m&&y!==y}var s=typeof Object.is=="function"?Object.is:r,a=t.useSyncExternalStore,l=e.useRef,u=e.useEffect,f=e.useMemo,h=e.useDebugValue;return Ah.useSyncExternalStoreWithSelector=function(m,y,g,b,S){var E=l(null);if(E.current===null){var x={hasValue:!1,value:null};E.current=x}else x=E.current;E=f(function(){function O(H){if(!L){if(L=!0,k=H,H=b(H),S!==void 0&&x.hasValue){var $=x.value;if(S($,H))return j=$}return j=H}if($=j,s(k,H))return $;var D=b(H);return S!==void 0&&S($,D)?(k=H,$):(k=H,j=D)}var L=!1,k,j,I=g===void 0?null:g;return[function(){return O(y())},I===null?void 0:function(){return O(I())}]},[y,g,b,S]);var C=a(m,E[0],E[1]);return u(function(){x.hasValue=!0,x.value=C},[C]),h(C),C},Ah}var l0;function gM(){return l0||(l0=1,Th.exports=mM()),Th.exports}var yM=gM();function vM(e,t=s=>s,r={}){const s=r.equal??bM;return yM.useSyncExternalStoreWithSelector(e.subscribe,()=>e.state,()=>e.state,t,s)}function bM(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[s,a]of e)if(!t.has(s)||!Object.is(a,t.get(s)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const s of e)if(!t.has(s))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();const r=u0(e);if(r.length!==u0(t).length)return!1;for(let s=0;s<r.length;s++)if(!Object.prototype.hasOwnProperty.call(t,r[s])||!Object.is(e[r[s]],t[r[s]]))return!1;return!0}function u0(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}const kh=w.createContext(null);function s_(){return typeof document>"u"?kh:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=kh,kh)}function Ot(e){const t=w.useContext(s_());return e?.warn,t}function Je(e){const t=Ot({warn:e?.router===void 0}),r=e?.router||t,s=w.useRef(void 0);return vM(r.__store,a=>{if(e?.select){if(e.structuralSharing??r.options.defaultStructuralSharing){const l=xn(s.current,e.select(a));return s.current=l,l}return e.select(a)}return a})}const ku=w.createContext(void 0),SM=w.createContext(void 0);function Yn(e){const t=w.useContext(e.from?SM:ku);return Je({select:s=>{const a=s.matches.find(l=>e.from?e.from===l.routeId:l.id===t);if(Kt(!((e.shouldThrow??!0)&&!a),`Could not find ${e.from?`an active match from "${e.from}"`:"a nearest match!"}`),a!==void 0)return e.select?e.select(a):a},structuralSharing:e.structuralSharing})}function Lp(e){return Yn({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function Dp(e){const{select:t,...r}=e;return Yn({...r,select:s=>t?t(s.loaderDeps):s.loaderDeps})}function Pp(e){return Yn({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const r=e.strict===!1?t.params:t._strictParams;return e.select?e.select(r):r}})}function Up(e){return Yn({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function Nu(e){const t=Ot();return w.useCallback(r=>t.navigate({...r,from:r.from??e?.from}),[e?.from,t])}var zu=ow();const wM=rw(zu);function _M(e,t){const r=Ot(),[s,a]=w.useState(!1),l=w.useRef(!1),u=aM(t),f=r_(),{activeProps:h,inactiveProps:m,activeOptions:y,to:g,preload:b,preloadDelay:S,hashScrollIntoView:E,replace:x,startTransition:C,resetScroll:O,viewTransition:L,children:k,target:j,disabled:I,style:H,className:$,onClick:D,onFocus:W,onMouseEnter:ne,onMouseLeave:oe,onTouchStart:ie,ignoreBlocker:de,params:ue,search:ve,hash:P,state:Y,mask:V,reloadDocument:te,unsafeRelative:be,from:N,_fromLocation:G,...ee}=e,re=Je({select:xe=>xe.location.search,structuralSharing:!0}),he=e.from,ge=w.useMemo(()=>({...e,from:he}),[r,re,he,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),se=w.useMemo(()=>r.buildLocation({...ge}),[r,ge]),Pe=w.useMemo(()=>{if(I)return;let xe=se.maskedLocation?se.maskedLocation.url.href:se.url.href,mt=!1;return r.origin&&(xe.startsWith(r.origin)?xe=r.history.createHref(xe.replace(r.origin,""))||"/":mt=!0),{href:xe,external:mt}},[I,se.maskedLocation,se.url,r.origin,r.history]),Ne=w.useMemo(()=>{if(Pe?.external)return Jl(Pe.href)?void 0:Pe.href;if(!(typeof g=="string"&&g.charCodeAt(0)===47&&g.charCodeAt(1)!==47))try{return new URL(g),Jl(g)?void 0:g}catch{}},[g,Pe]),pt=e.reloadDocument||Ne?!1:b??r.options.defaultPreload,Pt=S??r.options.defaultPreloadDelay??0,Ut=Je({select:xe=>{if(Ne)return!1;if(y?.exact){if(!D2(xe.location.pathname,se.pathname,r.basepath))return!1}else{const mt=eu(xe.location.pathname,r.basepath),$t=eu(se.pathname,r.basepath);if(!(mt.startsWith($t)&&(mt.length===$t.length||mt[$t.length]==="/")))return!1}return(y?.includeSearch??!0)&&!Qo(xe.location.search,se.search,{partial:!y?.exact,ignoreUndefined:!y?.explicitUndefined})?!1:y?.includeHash?f&&xe.location.hash===se.hash:!0}}),Nt=w.useCallback(()=>{r.preloadRoute({...ge}).catch(xe=>{console.warn(xe),console.warn(pT)})},[r,ge]),tr=w.useCallback(xe=>{xe?.isIntersecting&&Nt()},[Nt]);iM(u,tr,TM,{disabled:!!I||pt!=="viewport"}),w.useEffect(()=>{l.current||!I&&pt==="render"&&(Nt(),l.current=!0)},[I,Nt,pt]);const Ri=xe=>{const mt=xe.currentTarget.getAttribute("target"),$t=j!==void 0?j:mt;if(!I&&!AM(xe)&&!xe.defaultPrevented&&(!$t||$t==="_self")&&xe.button===0){xe.preventDefault(),zu.flushSync(()=>{a(!0)});const Ti=r.subscribe("onResolved",()=>{Ti(),a(!1)});r.navigate({...ge,replace:x,resetScroll:O,hashScrollIntoView:E,startTransition:C,viewTransition:L,ignoreBlocker:de})}};if(Ne)return{...ee,ref:u,href:Ne,...k&&{children:k},...j&&{target:j},...I&&{disabled:I},...H&&{style:H},...$&&{className:$},...D&&{onClick:D},...W&&{onFocus:W},...ne&&{onMouseEnter:ne},...oe&&{onMouseLeave:oe},...ie&&{onTouchStart:ie}};const as=xe=>{I||pt&&Nt()},Ku=as,nc=xe=>{if(!(I||!pt))if(!Pt)Nt();else{const mt=xe.target;if(Ea.has(mt))return;const $t=setTimeout(()=>{Ea.delete(mt),Nt()},Pt);Ea.set(mt,$t)}},Ci=xe=>{if(I||!pt||!Pt)return;const mt=xe.target,$t=Ea.get(mt);$t&&(clearTimeout($t),Ea.delete(mt))},Or=Ut?ao(h,{})??xM:Nh,Mr=Ut?Nh:ao(m,{})??Nh,rc=[$,Or.className,Mr.className].filter(Boolean).join(" "),oc=(H||Or.style||Mr.style)&&{...H,...Or.style,...Mr.style};return{...ee,...Or,...Mr,href:Pe?.href,ref:u,onClick:Ra([D,Ri]),onFocus:Ra([W,as]),onMouseEnter:Ra([ne,nc]),onMouseLeave:Ra([oe,Ci]),onTouchStart:Ra([ie,Ku]),disabled:!!I,target:j,...oc&&{style:oc},...rc&&{className:rc},...I&&EM,...Ut&&RM,...s&&CM}}const Nh={},xM={className:"active"},EM={role:"link","aria-disabled":!0},RM={"data-status":"active","aria-current":"page"},CM={"data-transitioning":"transitioning"},Ea=new WeakMap,TM={rootMargin:"100px"},Ra=e=>t=>{for(const r of e)if(r){if(t.defaultPrevented)return;r(t)}},io=w.forwardRef((e,t)=>{const{_asChild:r,...s}=e,{type:a,...l}=_M(s,t),u=typeof s.children=="function"?s.children({isActive:l["data-status"]==="active"}):s.children;if(!r){const{disabled:f,...h}=l;return w.createElement("a",h,u)}return w.createElement(r,l,u)});function AM(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}let OM=class extends Ew{constructor(t){super(t),this.useMatch=r=>Yn({select:r?.select,from:this.id,structuralSharing:r?.structuralSharing}),this.useRouteContext=r=>Yn({...r,from:this.id,select:s=>r?.select?r.select(s.context):s.context}),this.useSearch=r=>Up({select:r?.select,structuralSharing:r?.structuralSharing,from:this.id}),this.useParams=r=>Pp({select:r?.select,structuralSharing:r?.structuralSharing,from:this.id}),this.useLoaderDeps=r=>Dp({...r,from:this.id}),this.useLoaderData=r=>Lp({...r,from:this.id}),this.useNavigate=()=>Nu({from:this.fullPath}),this.Link=kt.forwardRef((r,s)=>_.jsx(io,{ref:s,from:this.fullPath,...r})),this.$$typeof=Symbol.for("react.memo")}};function MM(e){return new OM(e)}class kM extends mT{constructor(t){super(t),this.useMatch=r=>Yn({select:r?.select,from:this.id,structuralSharing:r?.structuralSharing}),this.useRouteContext=r=>Yn({...r,from:this.id,select:s=>r?.select?r.select(s.context):s.context}),this.useSearch=r=>Up({select:r?.select,structuralSharing:r?.structuralSharing,from:this.id}),this.useParams=r=>Pp({select:r?.select,structuralSharing:r?.structuralSharing,from:this.id}),this.useLoaderDeps=r=>Dp({...r,from:this.id}),this.useLoaderData=r=>Lp({...r,from:this.id}),this.useNavigate=()=>Nu({from:this.fullPath}),this.Link=kt.forwardRef((r,s)=>_.jsx(io,{ref:s,from:this.fullPath,...r})),this.$$typeof=Symbol.for("react.memo")}}function NM(e){return new kM(e)}function Cn(e){return typeof e=="object"?new f0(e,{silent:!0}).createRoute(e):new f0(e,{silent:!0}).createRoute}class f0{constructor(t,r){this.path=t,this.createRoute=s=>{this.silent;const a=MM(s);return a.isRoot=!1,a},this.silent=r?.silent}}class d0{constructor(t){this.useMatch=r=>Yn({select:r?.select,from:this.options.id,structuralSharing:r?.structuralSharing}),this.useRouteContext=r=>Yn({from:this.options.id,select:s=>r?.select?r.select(s.context):s.context}),this.useSearch=r=>Up({select:r?.select,structuralSharing:r?.structuralSharing,from:this.options.id}),this.useParams=r=>Pp({select:r?.select,structuralSharing:r?.structuralSharing,from:this.options.id}),this.useLoaderDeps=r=>Dp({...r,from:this.options.id}),this.useLoaderData=r=>Lp({...r,from:this.options.id}),this.useNavigate=()=>{const r=Ot();return Nu({from:r.routesById[this.options.id].fullPath})},this.options=t,this.$$typeof=Symbol.for("react.memo")}}function h0(e){return typeof e=="object"?new d0(e):t=>new d0({id:e,...t})}function Jn(e,t){let r,s,a,l;const u=()=>(r||(r=e().then(h=>{r=void 0,s=h[t]}).catch(h=>{if(a=h,b2(a)&&a instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const m=`tanstack_router_reload:${a.message}`;sessionStorage.getItem(m)||(sessionStorage.setItem(m,"1"),l=!0)}})),r),f=function(m){if(l)throw window.location.reload(),new Promise(()=>{});if(a)throw a;if(!s)if(su)su(u());else throw u();return w.createElement(s,m)};return f.preload=u,f}function zM(){const e=Ot(),t=w.useRef({router:e,mounted:!1}),[r,s]=w.useState(!1),{hasPendingMatches:a,isLoading:l}=Je({select:g=>({isLoading:g.isLoading,hasPendingMatches:g.matches.some(b=>b.status==="pending")}),structuralSharing:!0}),u=Ch(l),f=l||r||a,h=Ch(f),m=l||a,y=Ch(m);return e.startTransition=g=>{s(!0),w.startTransition(()=>{g(),s(!1)})},w.useEffect(()=>{const g=e.history.subscribe(({navigateOpts:S})=>{S?.skipTransitionerLoad||e.load()}),b=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return Zn(e.latestLocation.publicHref)!==Zn(b.publicHref)&&e.commitLocation({...b,replace:!0}),()=>{g()}},[e,e.history]),Cl(()=>{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(b){console.error(b)}})()},[e]),Cl(()=>{u&&!l&&e.emit({type:"onLoad",...Go(e.state)})},[u,e,l]),Cl(()=>{y&&!m&&e.emit({type:"onBeforeRouteMount",...Go(e.state)})},[m,y,e]),Cl(()=>{if(h&&!f){const g=Go(e.state);e.emit({type:"onResolved",...g}),e.__store.setState(b=>({...b,status:"idle",resolvedLocation:b.location})),g.hrefChanged&&F2(e)}},[f,h,e]),null}function jM(e){const t=Je({select:r=>`not-found-${r.location.pathname}-${r.status}`});return _.jsx(jp,{getResetKey:()=>t,onCatch:(r,s)=>{if(Lt(r))e.onCatch?.(r,s);else throw r},errorComponent:({error:r})=>{if(Lt(r))return e.fallback?.(r);throw r},children:e.children})}function LM(){return _.jsx("p",{children:"Not Found"})}function Js(e){return _.jsx(_.Fragment,{children:e.children})}function i_(e,t,r){return t.options.notFoundComponent?_.jsx(t.options.notFoundComponent,{...r}):e.options.defaultNotFoundComponent?_.jsx(e.options.defaultNotFoundComponent,{...r}):_.jsx(LM,{})}function DM({children:e}){const t=Ot();return t.isServer?_.jsx("script",{nonce:t.options.ssr?.nonce,dangerouslySetInnerHTML:{__html:e+";document.currentScript.remove()"}}):null}function PM(){const e=Ot();if(!e.isScrollRestoring||!e.isServer||typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))return null;const r=(e.options.getScrollRestorationKey||op)(e.latestLocation),s=r!==op(e.latestLocation)?r:void 0,a={storageKey:tu,shouldScrollRestoration:!0};return s&&(a.key=s),_.jsx(DM,{children:`(${hw.toString()})(${cw(JSON.stringify(a))})`})}const a_=w.memo(function({matchId:t}){const r=Ot(),s=Je({select:O=>{const L=O.matches.find(k=>k.id===t);return Kt(L),{routeId:L.routeId,ssr:L.ssr,_displayPending:L._displayPending}},structuralSharing:!0}),a=r.routesById[s.routeId],l=a.options.pendingComponent??r.options.defaultPendingComponent,u=l?_.jsx(l,{}):null,f=a.options.errorComponent??r.options.defaultErrorComponent,h=a.options.onCatch??r.options.defaultOnCatch,m=a.isRoot?a.options.notFoundComponent??r.options.notFoundRoute?.options.component:a.options.notFoundComponent,y=s.ssr===!1||s.ssr==="data-only",g=(!a.isRoot||a.options.wrapInSuspense||y)&&(a.options.wrapInSuspense??l??(a.options.errorComponent?.preload||y))?w.Suspense:Js,b=f?jp:Js,S=m?jM:Js,E=Je({select:O=>O.loadedAt}),x=Je({select:O=>{const L=O.matches.findIndex(k=>k.id===t);return O.matches[L-1]?.routeId}}),C=a.isRoot?a.options.shellComponent??Js:Js;return _.jsxs(C,{children:[_.jsx(ku.Provider,{value:t,children:_.jsx(g,{fallback:u,children:_.jsx(b,{getResetKey:()=>E,errorComponent:f||Mu,onCatch:(O,L)=>{if(Lt(O))throw O;h?.(O,L)},children:_.jsx(S,{fallback:O=>{if(!m||O.routeId&&O.routeId!==s.routeId||!O.routeId&&!a.isRoot)throw O;return w.createElement(m,O)},children:y||s._displayPending?_.jsx(dM,{fallback:u,children:_.jsx(p0,{matchId:t})}):_.jsx(p0,{matchId:t})})})})}),x===Gt&&r.options.scrollRestoration?_.jsxs(_.Fragment,{children:[_.jsx(UM,{}),_.jsx(PM,{})]}):null]})});function UM(){const e=Ot(),t=w.useRef(void 0);return _.jsx("script",{suppressHydrationWarning:!0,ref:r=>{r&&(t.current===void 0||t.current.href!==e.latestLocation.href)&&(e.emit({type:"onRendered",...Go(e.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}const p0=w.memo(function({matchId:t}){const r=Ot(),{match:s,key:a,routeId:l}=Je({select:h=>{const m=h.matches.find(E=>E.id===t),y=m.routeId,b=(r.routesById[y].options.remountDeps??r.options.defaultRemountDeps)?.({routeId:y,loaderDeps:m.loaderDeps,params:m._strictParams,search:m._strictSearch});return{key:b?JSON.stringify(b):void 0,routeId:y,match:{id:m.id,status:m.status,error:m.error,invalid:m.invalid,_forcePending:m._forcePending,_displayPending:m._displayPending}}},structuralSharing:!0}),u=r.routesById[l],f=w.useMemo(()=>{const h=u.options.component??r.options.defaultComponent;return h?_.jsx(h,{},a):_.jsx(c_,{})},[a,u.options.component,r.options.defaultComponent]);if(s._displayPending)throw r.getMatch(s.id)?._nonReactive.displayPendingPromise;if(s._forcePending)throw r.getMatch(s.id)?._nonReactive.minPendingPromise;if(s.status==="pending"){const h=u.options.pendingMinMs??r.options.defaultPendingMinMs;if(h){const m=r.getMatch(s.id);if(m&&!m._nonReactive.minPendingPromise&&!r.isServer){const y=Ko();m._nonReactive.minPendingPromise=y,setTimeout(()=>{y.resolve(),m._nonReactive.minPendingPromise=void 0},h)}}throw r.getMatch(s.id)?._nonReactive.loadPromise}if(s.status==="notFound")return Kt(Lt(s.error)),i_(r,u,s.error);if(s.status==="redirected")throw Kt(ln(s.error)),r.getMatch(s.id)?._nonReactive.loadPromise;if(s.status==="error"){if(r.isServer){const h=(u.options.errorComponent??r.options.defaultErrorComponent)||Mu;return _.jsx(h,{error:s.error,reset:void 0,info:{componentStack:""}})}throw s.error}return f}),c_=w.memo(function(){const t=Ot(),r=w.useContext(ku),s=Je({select:m=>m.matches.find(y=>y.id===r)?.routeId}),a=t.routesById[s],l=Je({select:m=>{const g=m.matches.find(b=>b.id===r);return Kt(g),g.globalNotFound}}),u=Je({select:m=>{const y=m.matches,g=y.findIndex(b=>b.id===r);return y[g+1]?.id}}),f=t.options.defaultPendingComponent?_.jsx(t.options.defaultPendingComponent,{}):null;if(l)return i_(t,a,void 0);if(!u)return null;const h=_.jsx(a_,{matchId:u});return s===Gt?_.jsx(w.Suspense,{fallback:f,children:h}):h});function $M(){const e=Ot(),r=e.routesById[Gt].options.pendingComponent??e.options.defaultPendingComponent,s=r?_.jsx(r,{}):null,a=e.isServer||typeof document<"u"&&e.ssr?Js:w.Suspense,l=_.jsxs(a,{fallback:s,children:[!e.isServer&&_.jsx(zM,{}),_.jsx(IM,{})]});return e.options.InnerWrap?_.jsx(e.options.InnerWrap,{children:l}):l}function IM(){const e=Ot(),t=Je({select:a=>a.matches[0]?.id}),r=Je({select:a=>a.loadedAt}),s=t?_.jsx(a_,{matchId:t}):null;return _.jsx(ku.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?s:_.jsx(jp,{getResetKey:()=>r,errorComponent:Mu,onCatch:a=>{a.message||a.toString()},children:s})})}const BM=e=>new qM(e);class qM extends sT{constructor(t){super(t)}}typeof globalThis<"u"?(globalThis.createFileRoute=Cn,globalThis.createLazyFileRoute=h0):typeof window<"u"&&(window.createFileRoute=Cn,window.createLazyFileRoute=h0);function VM({router:e,children:t,...r}){Object.keys(r).length>0&&e.update({...e.options,...r,context:{...e.options.context,...r.context}});const s=s_(),a=_.jsx(s.Provider,{value:e,children:t});return e.options.Wrap?_.jsx(e.options.Wrap,{children:a}):a}function FM({router:e,...t}){return _.jsx(VM,{router:e,...t,children:_.jsx($M,{})})}function l_({tag:e,attrs:t,children:r,nonce:s}){switch(e){case"title":return _.jsx("title",{...t,suppressHydrationWarning:!0,children:r});case"meta":return _.jsx("meta",{...t,suppressHydrationWarning:!0});case"link":return _.jsx("link",{...t,nonce:s,suppressHydrationWarning:!0});case"style":return _.jsx("style",{...t,dangerouslySetInnerHTML:{__html:r},nonce:s});case"script":return _.jsx(HM,{attrs:t,children:r});default:return null}}function HM({attrs:e,children:t}){const r=Ot();if(w.useEffect(()=>{if(e?.src){const s=(()=>{try{const u=document.baseURI||window.location.href;return new URL(e.src,u).href}catch{return e.src}})();if(Array.from(document.querySelectorAll("script[src]")).find(u=>u.src===s))return;const l=document.createElement("script");for(const[u,f]of Object.entries(e))u!=="suppressHydrationWarning"&&f!==void 0&&f!==!1&&l.setAttribute(u,typeof f=="boolean"?"":String(f));return document.head.appendChild(l),()=>{l.parentNode&&l.parentNode.removeChild(l)}}if(typeof t=="string"){const s=typeof e?.type=="string"?e.type:"text/javascript",a=typeof e?.nonce=="string"?e.nonce:void 0;if(Array.from(document.querySelectorAll("script:not([src])")).find(f=>{if(!(f instanceof HTMLScriptElement))return!1;const h=f.getAttribute("type")??"text/javascript",m=f.getAttribute("nonce")??void 0;return f.textContent===t&&h===s&&m===a}))return;const u=document.createElement("script");if(u.textContent=t,e)for(const[f,h]of Object.entries(e))f!=="suppressHydrationWarning"&&h!==void 0&&h!==!1&&u.setAttribute(f,typeof h=="boolean"?"":String(h));return document.head.appendChild(u),()=>{u.parentNode&&u.parentNode.removeChild(u)}}},[e,t]),!r.isServer){const{src:s,...a}=e||{};return _.jsx("script",{suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:""},...a})}return e?.src&&typeof e.src=="string"?_.jsx("script",{...e,suppressHydrationWarning:!0}):typeof t=="string"?_.jsx("script",{...e,dangerouslySetInnerHTML:{__html:t},suppressHydrationWarning:!0}):null}const ZM=()=>{const e=Ot(),t=e.options.ssr?.nonce,r=Je({select:h=>h.matches.map(m=>m.meta).filter(Boolean)}),s=w.useMemo(()=>{const h=[],m={};let y;for(let g=r.length-1;g>=0;g--){const b=r[g];for(let S=b.length-1;S>=0;S--){const E=b[S];if(E)if(E.title)y||(y={tag:"title",children:E.title});else if("script:ld+json"in E)try{const x=JSON.stringify(E["script:ld+json"]);h.push({tag:"script",attrs:{type:"application/ld+json"},children:cw(x)})}catch{}else{const x=E.name??E.property;if(x){if(m[x])continue;m[x]=!0}h.push({tag:"meta",attrs:{...E,nonce:t}})}}}return y&&h.push(y),t&&h.push({tag:"meta",attrs:{property:"csp-nonce",content:t}}),h.reverse(),h},[r,t]),a=Je({select:h=>{const m=h.matches.map(b=>b.links).filter(Boolean).flat(1).map(b=>({tag:"link",attrs:{...b,nonce:t}})),y=e.ssr?.manifest,g=h.matches.map(b=>y?.routes[b.routeId]?.assets??[]).filter(Boolean).flat(1).filter(b=>b.tag==="link").map(b=>({tag:"link",attrs:{...b.attrs,suppressHydrationWarning:!0,nonce:t}}));return[...m,...g]},structuralSharing:!0}),l=Je({select:h=>{const m=[];return h.matches.map(y=>e.looseRoutesById[y.routeId]).forEach(y=>e.ssr?.manifest?.routes[y.id]?.preloads?.filter(Boolean).forEach(g=>{m.push({tag:"link",attrs:{rel:"modulepreload",href:g,nonce:t}})})),m},structuralSharing:!0}),u=Je({select:h=>h.matches.map(m=>m.styles).flat(1).filter(Boolean).map(({children:m,...y})=>({tag:"style",attrs:{...y,nonce:t},children:m})),structuralSharing:!0}),f=Je({select:h=>h.matches.map(m=>m.headScripts).flat(1).filter(Boolean).map(({children:m,...y})=>({tag:"script",attrs:{...y,nonce:t},children:m})),structuralSharing:!0});return QM([...s,...l,...a,...u,...f],h=>JSON.stringify(h))};function QM(e,t){const r=new Set;return e.filter(s=>{const a=t(s);return r.has(a)?!1:(r.add(a),!0)})}function GM(){const e=ZM(),r=Ot().options.ssr?.nonce;return _.jsx(_.Fragment,{children:e.map(s=>w.createElement(l_,{...s,key:`tsr-meta-${JSON.stringify(s)}`,nonce:r}))})}const YM=()=>{const e=Ot(),t=e.options.ssr?.nonce,r=Je({select:u=>{const f=[],h=e.ssr?.manifest;return h?(u.matches.map(m=>e.looseRoutesById[m.routeId]).forEach(m=>h.routes[m.id]?.assets?.filter(y=>y.tag==="script").forEach(y=>{f.push({tag:"script",attrs:{...y.attrs,nonce:t},children:y.children})})),f):[]},structuralSharing:!0}),{scripts:s}=Je({select:u=>({scripts:u.matches.map(f=>f.scripts).flat(1).filter(Boolean).map(({children:f,...h})=>({tag:"script",attrs:{...h,suppressHydrationWarning:!0,nonce:t},children:f}))}),structuralSharing:!0});let a;e.serverSsr&&(a=e.serverSsr.takeBufferedScripts());const l=[...s,...r];return a&&l.unshift(a),_.jsx(_.Fragment,{children:l.map((u,f)=>w.createElement(l_,{...u,key:`tsr-scripts-${u.tag}-${f}`}))})};function u_(e){if(Array.isArray(e))return e.flatMap(y=>u_(y));if(typeof e!="string")return[];const t=[];let r=0,s,a,l,u,f;const h=()=>{for(;r<e.length&&/\s/.test(e.charAt(r));)r+=1;return r<e.length},m=()=>(a=e.charAt(r),a!=="="&&a!==";"&&a!==",");for(;r<e.length;){for(s=r,f=!1;h();)if(a=e.charAt(r),a===","){for(l=r,r+=1,h(),u=r;r<e.length&&m();)r+=1;r<e.length&&e.charAt(r)==="="?(f=!0,r=u,t.push(e.slice(s,l)),s=r):r=l+1}else r+=1;(!f||r>=e.length)&&t.push(e.slice(s))}return t}function KM(e){return e instanceof Headers?new Headers(e):Array.isArray(e)?new Headers(e):typeof e=="object"?new Headers(e):new Headers}function XM(...e){return e.reduce((t,r)=>{const s=KM(r);for(const[a,l]of s.entries())a==="set-cookie"?u_(l).forEach(f=>t.append("set-cookie",f)):t.set(a,l);return t},new Headers)}function JM(e,t){e.id=t.i,e.__beforeLoadContext=t.b,e.loaderData=t.l,e.status=t.s,e.ssr=t.ssr,e.updatedAt=t.u,e.error=t.e}async function WM(e){Kt(window.$_TSR);const t=e.options.serializationAdapters;if(t?.length){const x=new Map;t.forEach(C=>{x.set(C.key,C.fromSerializable)}),window.$_TSR.t=x,window.$_TSR.buffer.forEach(C=>C())}window.$_TSR.initialized=!0,Kt(window.$_TSR.router);const{manifest:r,dehydratedData:s,lastMatchId:a}=window.$_TSR.router;e.ssr={manifest:r};const u=document.querySelector('meta[property="csp-nonce"]')?.content;e.options.ssr={nonce:u};const f=e.matchRoutes(e.state.location),h=Promise.all(f.map(x=>{const C=e.looseRoutesById[x.routeId];return e.loadRouteChunk(C)}));function m(x){const O=e.looseRoutesById[x.routeId].options.pendingMinMs??e.options.defaultPendingMinMs;if(O){const L=Ko();x._nonReactive.minPendingPromise=L,x._forcePending=!0,setTimeout(()=>{L.resolve(),e.updateMatch(x.id,k=>(k._nonReactive.minPendingPromise=void 0,{...k,_forcePending:void 0}))},O)}}function y(x){const C=e.looseRoutesById[x.routeId];C&&(C.options.ssr=x.ssr)}let g;f.forEach(x=>{const C=window.$_TSR.router.matches.find(O=>O.i===x.id);if(!C){x._nonReactive.dehydrated=!1,x.ssr=!1,y(x);return}JM(x,C),y(x),x._nonReactive.dehydrated=x.ssr!==!1,(x.ssr==="data-only"||x.ssr===!1)&&g===void 0&&(g=x.index,m(x))}),e.__store.setState(x=>({...x,matches:f})),await e.options.hydrate?.(s),await Promise.all(e.state.matches.map(async x=>{try{const C=e.looseRoutesById[x.routeId],L=e.state.matches[x.index-1]?.context??e.options.context;if(C.options.context){const H={deps:x.loaderDeps,params:x.params,context:L??{},location:e.state.location,navigate:$=>e.navigate({...$,_fromLocation:e.state.location}),buildLocation:e.buildLocation,cause:x.cause,abortController:x.abortController,preload:!1,matches:f};x.__routeContext=C.options.context(H)??void 0}x.context={...L,...x.__routeContext,...x.__beforeLoadContext};const k={ssr:e.options.ssr,matches:e.state.matches,match:x,params:x.params,loaderData:x.loaderData},j=await C.options.head?.(k),I=await C.options.scripts?.(k);x.meta=j?.meta,x.links=j?.links,x.headScripts=j?.scripts,x.styles=j?.styles,x.scripts=I}catch(C){if(Lt(C))x.error={isNotFound:!0},console.error(`NotFound error during hydration for routeId: ${x.routeId}`,C);else throw x.error=C,console.error(`Error during hydration for route ${x.routeId}:`,C),C}}));const b=f[f.length-1].id!==a;if(!f.some(x=>x.ssr===!1)&&!b)return f.forEach(x=>{x._nonReactive.dehydrated=void 0}),h;const E=Promise.resolve().then(()=>e.load()).catch(x=>{console.error("Error during router hydration:",x)});if(b){const x=f[1];Kt(x),m(x),x._displayPending=!0,x._nonReactive.displayPendingPromise=E,E.then(()=>{oi(()=>{e.__store.state.status==="pending"&&e.__store.setState(C=>({...C,status:"idle",resolvedLocation:C.location})),e.updateMatch(x.id,C=>({...C,_displayPending:void 0,displayPendingPromise:void 0}))})})}return h}const ek="__TSS_CONTEXT",cp=Symbol.for("TSS_SERVER_FUNCTION"),m0=Symbol.for("TSS_SERVER_FUNCTION_FACTORY"),tk="x-tss-serialized",nk="x-tss-raw",f_="application/x-tss-framed",Sr={JSON:0,CHUNK:1,END:2,ERROR:3},Zs=9,g0=1,rk=/;\s*v=(\d+)/;function ok(e){const t=e.match(rk);return t?parseInt(t[1],10):void 0}function sk(e){const t=ok(e);if(t!==void 0&&t!==g0)throw new Error(`Incompatible framed protocol version: server=${t}, client=${g0}. Please ensure client and server are using compatible versions.`)}const $p=()=>window.__TSS_START_OPTIONS__;function ik(){return[...$p()?.serializationAdapters?.map(VO)??[],...oM]}const y0=new TextDecoder,ak=new Uint8Array(0),v0=16*1024*1024,b0=32*1024*1024,S0=1024,w0=1e5;function ck(e){const t=new Map,r=new Map,s=new Set;let a=!1,l=null,u=0,f;const h=new ReadableStream({start(g){f=g},cancel(){a=!0;try{l?.cancel()}catch{}t.forEach(g=>{try{g.error(new Error("Framed response cancelled"))}catch{}}),t.clear(),r.clear(),s.clear()}});function m(g){const b=r.get(g);if(b)return b;if(s.has(g))return new ReadableStream({start(E){E.close()}});if(r.size>=S0)throw new Error(`Too many raw streams in framed response (max ${S0})`);const S=new ReadableStream({start(E){t.set(g,E)},cancel(){s.add(g),t.delete(g),r.delete(g)}});return r.set(g,S),S}function y(g){return m(g),t.get(g)}return(async()=>{const g=e.getReader();l=g;const b=[];let S=0;function E(){if(S<Zs)return null;const C=b[0];if(C.length>=Zs){const $=C[0],D=(C[1]<<24|C[2]<<16|C[3]<<8|C[4])>>>0,W=(C[5]<<24|C[6]<<16|C[7]<<8|C[8])>>>0;return{type:$,streamId:D,length:W}}const O=new Uint8Array(Zs);let L=0,k=Zs;for(let $=0;$<b.length&&k>0;$++){const D=b[$],W=Math.min(D.length,k);O.set(D.subarray(0,W),L),L+=W,k-=W}const j=O[0],I=(O[1]<<24|O[2]<<16|O[3]<<8|O[4])>>>0,H=(O[5]<<24|O[6]<<16|O[7]<<8|O[8])>>>0;return{type:j,streamId:I,length:H}}function x(C){if(C===0)return ak;const O=new Uint8Array(C);let L=0,k=C;for(;k>0&&b.length>0;){const j=b[0];if(!j)break;const I=Math.min(j.length,k);O.set(j.subarray(0,I),L),L+=I,k-=I,I===j.length?b.shift():b[0]=j.subarray(I)}return S-=C,O}try{for(;;){const{done:C,value:O}=await g.read();if(a||C)break;if(O){if(S+O.length>b0)throw new Error(`Framed response buffer exceeded ${b0} bytes`);for(b.push(O),S+=O.length;;){const L=E();if(!L)break;const{type:k,streamId:j,length:I}=L;if(k!==Sr.JSON&&k!==Sr.CHUNK&&k!==Sr.END&&k!==Sr.ERROR)throw new Error(`Unknown frame type: ${k}`);if(k===Sr.JSON){if(j!==0)throw new Error("Invalid JSON frame streamId (expected 0)")}else if(j===0)throw new Error("Invalid raw frame streamId (expected non-zero)");if(I>v0)throw new Error(`Frame payload too large: ${I} bytes (max ${v0})`);const H=Zs+I;if(S<H)break;if(++u>w0)throw new Error(`Too many frames in framed response (max ${w0})`);x(Zs);const $=x(I);switch(k){case Sr.JSON:{try{f.enqueue(y0.decode($))}catch{}break}case Sr.CHUNK:{const D=y(j);D&&D.enqueue($);break}case Sr.END:{const D=y(j);if(s.add(j),D){try{D.close()}catch{}t.delete(j)}break}case Sr.ERROR:{const D=y(j);if(s.add(j),D){const W=y0.decode($);D.error(new Error(W)),t.delete(j)}break}}}}}if(S!==0)throw new Error("Incomplete frame at end of framed response");try{f.close()}catch{}t.forEach(C=>{try{C.close()}catch{}}),t.clear()}catch(C){try{f.error(C)}catch{}t.forEach(O=>{try{O.error(C)}catch{}}),t.clear()}finally{try{g.releaseLock()}catch{}l=null}})(),{getOrCreateStream:m,jsonChunks:h}}let ci=null;const lk=Object.prototype.hasOwnProperty;function d_(e){for(const t in e)if(lk.call(e,t))return!0;return!1}async function uk(e,t,r){ci||(ci=ik());const a=t[0],l=a.fetch??r,u=a.data instanceof FormData?"formData":"payload",f=a.headers?new Headers(a.headers):new Headers;if(f.set("x-tsr-serverFn","true"),u==="payload"&&f.set("accept",`${f_}, application/x-ndjson, application/json`),a.method==="GET"){if(u==="formData")throw new Error("FormData is not supported with GET requests");const m=await h_(a);if(m!==void 0){const y=pw({payload:m});e.includes("?")?e+=`&${y}`:e+=`?${y}`}}let h;if(a.method==="POST"){const m=await fk(a);m?.contentType&&f.set("content-type",m.contentType),h=m?.body}return await dk(async()=>l(e,{method:a.method,headers:f,signal:a.signal,body:h}))}async function h_(e){let t=!1;const r={};if(e.data!==void 0&&(t=!0,r.data=e.data),e.context&&d_(e.context)&&(t=!0,r.context=e.context),t)return p_(r)}async function p_(e){return JSON.stringify(await Promise.resolve(qO(e,{plugins:ci})))}async function fk(e){if(e.data instanceof FormData){let r;return e.context&&d_(e.context)&&(r=await p_(e.context)),r!==void 0&&e.data.set(ek,r),{body:e.data}}const t=await h_(e);if(t)return{body:t,contentType:"application/json"}}async function dk(e){let t;try{t=await e()}catch(a){if(a instanceof Response)t=a;else throw console.log(a),a}if(t.headers.get(nk)==="true")return t;const r=t.headers.get("content-type");if(Kt(r),!!t.headers.get(tk)){let a;if(r.includes(f_)){if(sk(r),!t.body)throw new Error("No response body for framed response");const{getOrCreateStream:l,jsonChunks:u}=ck(t.body),h=[rM(l),...ci||[]],m=new Map;a=await pk({jsonStream:u,onMessage:y=>Rh(y,{refs:m,plugins:h}),onError(y,g){console.error(y,g)}})}else if(r.includes("application/x-ndjson")){const l=new Map;a=await hk({response:t,onMessage:u=>Rh(u,{refs:l,plugins:ci}),onError(u,f){console.error(u,f)}})}else if(r.includes("application/json")){const l=await t.json();a=Rh(l,{plugins:ci})}if(Kt(a),a instanceof Error)throw a;return a}if(r.includes("application/json")){const a=await t.json(),l=mw(a);if(l)throw l;if(Lt(a))throw a;return a}if(!t.ok)throw new Error(await t.text());return t}async function hk({response:e,onMessage:t,onError:r}){if(!e.body)throw new Error("No response body");const s=e.body.pipeThrough(new TextDecoderStream).getReader();let a="",l=!1,u;for(;!l;){const{value:f,done:h}=await s.read();if(f&&(a+=f),a.length===0&&h)throw new Error("Stream ended before first object");if(a.endsWith(`
|
|
13
|
-
`)){const m=a.split(`
|
|
14
|
-
`).filter(Boolean),y=m[0];if(!y)throw new Error("No JSON line in the first chunk");u=JSON.parse(y),l=!0,a=m.slice(1).join(`
|
|
15
|
-
`)}else{const m=a.indexOf(`
|
|
16
|
-
`);if(m>=0){const y=a.slice(0,m).trim();a=a.slice(m+1),y.length>0&&(u=JSON.parse(y),l=!0)}}}return(async()=>{try{for(;;){const{value:f,done:h}=await s.read();f&&(a+=f);const m=a.lastIndexOf(`
|
|
17
|
-
`);if(m>=0){const y=a.slice(0,m);a=a.slice(m+1);const g=y.split(`
|
|
18
|
-
`).filter(Boolean);for(const b of g)try{t(JSON.parse(b))}catch(S){r?.(`Invalid JSON line: ${b}`,S)}}if(h)break}}catch(f){r?.("Stream processing error:",f)}})(),t(u)}async function pk({jsonStream:e,onMessage:t,onError:r}){const s=e.getReader(),{value:a,done:l}=await s.read();if(l||!a)throw new Error("Stream ended before first object");const u=JSON.parse(a);return(async()=>{try{for(;;){const{value:f,done:h}=await s.read();if(h)break;if(f)try{t(JSON.parse(f))}catch(m){r?.(`Invalid JSON: ${f}`,m)}}}catch(f){r?.("Stream processing error:",f)}})(),t(u)}function m_(e){const t="/_serverFn/"+e;return Object.assign((...a)=>{const l=$p()?.serverFns?.fetch;return uk(t,a,l??fetch)},{url:t,serverFnMeta:{id:e},[cp]:!0})}const mk={key:"$TSS/serverfn",test:e=>typeof e!="function"||!(cp in e)?!1:!!e[cp],toSerializable:({serverFnMeta:e})=>({functionId:e.id}),fromSerializable:({functionId:e})=>m_(e)};var Vn=[],En=[],gk=Uint8Array,zh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var Qs=0,yk=zh.length;Qs<yk;++Qs)Vn[Qs]=zh[Qs],En[zh.charCodeAt(Qs)]=Qs;En[45]=62;En[95]=63;function vk(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var s=r===t?0:4-r%4;return[r,s]}function bk(e,t,r){return(t+r)*3/4-r}function Ua(e){var t,r=vk(e),s=r[0],a=r[1],l=new gk(bk(e,s,a)),u=0,f=a>0?s-4:s,h;for(h=0;h<f;h+=4)t=En[e.charCodeAt(h)]<<18|En[e.charCodeAt(h+1)]<<12|En[e.charCodeAt(h+2)]<<6|En[e.charCodeAt(h+3)],l[u++]=t>>16&255,l[u++]=t>>8&255,l[u++]=t&255;return a===2&&(t=En[e.charCodeAt(h)]<<2|En[e.charCodeAt(h+1)]>>4,l[u++]=t&255),a===1&&(t=En[e.charCodeAt(h)]<<10|En[e.charCodeAt(h+1)]<<4|En[e.charCodeAt(h+2)]>>2,l[u++]=t>>8&255,l[u++]=t&255),l}function Sk(e){return Vn[e>>18&63]+Vn[e>>12&63]+Vn[e>>6&63]+Vn[e&63]}function wk(e,t,r){for(var s,a=[],l=t;l<r;l+=3)s=(e[l]<<16&16711680)+(e[l+1]<<8&65280)+(e[l+2]&255),a.push(Sk(s));return a.join("")}function $a(e){for(var t,r=e.length,s=r%3,a=[],l=16383,u=0,f=r-s;u<f;u+=l)a.push(wk(e,u,u+l>f?f:u+l));return s===1?(t=e[r-1],a.push(Vn[t>>2]+Vn[t<<4&63]+"==")):s===2&&(t=(e[r-2]<<8)+e[r-1],a.push(Vn[t>>10]+Vn[t>>4&63]+Vn[t<<2&63]+"=")),a.join("")}function xr(e){if(e===void 0)return{};if(!g_(e))throw new Error(`The arguments to a Convex function must be an object. Received: ${e}`);return e}function _k(e){if(typeof e>"u")throw new Error("Client created with undefined deployment address. If you used an environment variable, check that it's set.");if(typeof e!="string")throw new Error(`Invalid deployment address: found ${e}".`);if(!(e.startsWith("http:")||e.startsWith("https:")))throw new Error(`Invalid deployment address: Must start with "https://" or "http://". Found "${e}".`);try{new URL(e)}catch{throw new Error(`Invalid deployment address: "${e}" is not a valid URL. If you believe this URL is correct, use the \`skipConvexDeploymentUrlCheck\` option to bypass this.`)}if(e.endsWith(".convex.site"))throw new Error(`Invalid deployment address: "${e}" ends with .convex.site, which is used for HTTP Actions. Convex deployment URLs typically end with .convex.cloud? If you believe this URL is correct, use the \`skipConvexDeploymentUrlCheck\` option to bypass this.`)}function g_(e){const t=typeof e=="object",r=Object.getPrototypeOf(e),s=r===null||r===Object.prototype||r?.constructor?.name==="Object";return t&&s}const y_=!0,pi=BigInt("-9223372036854775808"),Ip=BigInt("9223372036854775807"),lp=BigInt("0"),xk=BigInt("8"),Ek=BigInt("256");function v_(e){return Number.isNaN(e)||!Number.isFinite(e)||Object.is(e,-0)}function Rk(e){e<lp&&(e-=pi+pi);let t=e.toString(16);t.length%2===1&&(t="0"+t);const r=new Uint8Array(new ArrayBuffer(8));let s=0;for(const a of t.match(/.{2}/g).reverse())r.set([parseInt(a,16)],s++),e>>=xk;return $a(r)}function Ck(e){const t=Ua(e);if(t.byteLength!==8)throw new Error(`Received ${t.byteLength} bytes, expected 8 for $integer`);let r=lp,s=lp;for(const a of t)r+=BigInt(a)*Ek**s,s++;return r>Ip&&(r+=pi+pi),r}function Tk(e){if(e<pi||Ip<e)throw new Error(`BigInt ${e} does not fit into a 64-bit signed integer.`);const t=new ArrayBuffer(8);return new DataView(t).setBigInt64(0,e,!0),$a(new Uint8Array(t))}function Ak(e){const t=Ua(e);if(t.byteLength!==8)throw new Error(`Received ${t.byteLength} bytes, expected 8 for $integer`);return new DataView(t.buffer).getBigInt64(0,!0)}const Ok=DataView.prototype.setBigInt64?Tk:Rk,Mk=DataView.prototype.getBigInt64?Ak:Ck,_0=1024;function b_(e){if(e.length>_0)throw new Error(`Field name ${e} exceeds maximum field name length ${_0}.`);if(e.startsWith("$"))throw new Error(`Field name ${e} starts with a '$', which is reserved.`);for(let t=0;t<e.length;t+=1){const r=e.charCodeAt(t);if(r<32||r>=127)throw new Error(`Field name ${e} has invalid character '${e[t]}': Field names can only contain non-control ASCII characters`)}}function mi(e){if(e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string")return e;if(Array.isArray(e))return e.map(s=>mi(s));if(typeof e!="object")throw new Error(`Unexpected type of ${e}`);const t=Object.entries(e);if(t.length===1){const s=t[0][0];if(s==="$bytes"){if(typeof e.$bytes!="string")throw new Error(`Malformed $bytes field on ${e}`);return Ua(e.$bytes).buffer}if(s==="$integer"){if(typeof e.$integer!="string")throw new Error(`Malformed $integer field on ${e}`);return Mk(e.$integer)}if(s==="$float"){if(typeof e.$float!="string")throw new Error(`Malformed $float field on ${e}`);const a=Ua(e.$float);if(a.byteLength!==8)throw new Error(`Received ${a.byteLength} bytes, expected 8 for $float`);const u=new DataView(a.buffer).getFloat64(0,y_);if(!v_(u))throw new Error(`Float ${u} should be encoded as a number`);return u}if(s==="$set")throw new Error("Received a Set which is no longer supported as a Convex type.");if(s==="$map")throw new Error("Received a Map which is no longer supported as a Convex type.")}const r={};for(const[s,a]of Object.entries(e))b_(s),r[s]=mi(a);return r}const x0=16384;function ja(e){const t=JSON.stringify(e,(r,s)=>s===void 0?"undefined":typeof s=="bigint"?`${s.toString()}n`:s);if(t.length>x0){const r="[...truncated]";let s=x0-r.length;const a=t.codePointAt(s-1);return a!==void 0&&a>65535&&(s-=1),t.substring(0,s)+r}return t}function up(e,t,r,s){if(e===void 0){const u=r&&` (present at path ${r} in original object ${ja(t)})`;throw new Error(`undefined is not a valid Convex value${u}. To learn about Convex's supported types, see https://docs.convex.dev/using/types.`)}if(e===null)return e;if(typeof e=="bigint"){if(e<pi||Ip<e)throw new Error(`BigInt ${e} does not fit into a 64-bit signed integer.`);return{$integer:Ok(e)}}if(typeof e=="number")if(v_(e)){const u=new ArrayBuffer(8);return new DataView(u).setFloat64(0,e,y_),{$float:$a(new Uint8Array(u))}}else return e;if(typeof e=="boolean"||typeof e=="string")return e;if(e instanceof ArrayBuffer)return{$bytes:$a(new Uint8Array(e))};if(Array.isArray(e))return e.map((u,f)=>up(u,t,r+`[${f}]`));if(e instanceof Set)throw new Error(jh(r,"Set",[...e],t));if(e instanceof Map)throw new Error(jh(r,"Map",[...e],t));if(!g_(e)){const u=e?.constructor?.name,f=u?`${u} `:"";throw new Error(jh(r,f,e,t))}const a={},l=Object.entries(e);l.sort(([u,f],[h,m])=>u===h?0:u<h?-1:1);for(const[u,f]of l)f!==void 0&&(b_(u),a[u]=up(f,t,r+`.${u}`));return a}function jh(e,t,r,s){return e?`${t}${ja(r)} is not a supported Convex type (present at path ${e} in original object ${ja(s)}). To learn about Convex's supported types, see https://docs.convex.dev/using/types.`:`${t}${ja(r)} is not a supported Convex type.`}function jn(e){return up(e,e,"")}var kk=Object.defineProperty,Nk=(e,t,r)=>t in e?kk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ke=(e,t,r)=>Nk(e,typeof t!="symbol"?t+"":t,r);const zk="https://docs.convex.dev/error#undefined-validator";function Ia(e,t){const r=t!==void 0?` for field "${t}"`:"";throw new Error(`A validator is undefined${r} in ${e}. This is often caused by circular imports. See ${zk} for details.`)}class fn{constructor({isOptional:t}){Ke(this,"type"),Ke(this,"fieldPaths"),Ke(this,"isOptional"),Ke(this,"isConvexValidator"),this.isOptional=t,this.isConvexValidator=!0}}class Bp extends fn{constructor({isOptional:t,tableName:r}){if(super({isOptional:t}),Ke(this,"tableName"),Ke(this,"kind","id"),typeof r!="string")throw new Error("v.id(tableName) requires a string");this.tableName=r}get json(){return{type:"id",tableName:this.tableName}}asOptional(){return new Bp({isOptional:"optional",tableName:this.tableName})}}class iu extends fn{constructor(){super(...arguments),Ke(this,"kind","float64")}get json(){return{type:"number"}}asOptional(){return new iu({isOptional:"optional"})}}class au extends fn{constructor(){super(...arguments),Ke(this,"kind","int64")}get json(){return{type:"bigint"}}asOptional(){return new au({isOptional:"optional"})}}class qp extends fn{constructor(){super(...arguments),Ke(this,"kind","boolean")}get json(){return{type:this.kind}}asOptional(){return new qp({isOptional:"optional"})}}class Vp extends fn{constructor(){super(...arguments),Ke(this,"kind","bytes")}get json(){return{type:this.kind}}asOptional(){return new Vp({isOptional:"optional"})}}class Fp extends fn{constructor(){super(...arguments),Ke(this,"kind","string")}get json(){return{type:this.kind}}asOptional(){return new Fp({isOptional:"optional"})}}class Hp extends fn{constructor(){super(...arguments),Ke(this,"kind","null")}get json(){return{type:this.kind}}asOptional(){return new Hp({isOptional:"optional"})}}class Zp extends fn{constructor(){super(...arguments),Ke(this,"kind","any")}get json(){return{type:this.kind}}asOptional(){return new Zp({isOptional:"optional"})}}class Vo extends fn{constructor({isOptional:t,fields:r}){super({isOptional:t}),Ke(this,"fields"),Ke(this,"kind","object"),globalThis.Object.entries(r).forEach(([s,a])=>{if(a===void 0&&Ia("v.object()",s),!a.isConvexValidator)throw new Error("v.object() entries must be validators")}),this.fields=r}get json(){return{type:this.kind,value:globalThis.Object.fromEntries(globalThis.Object.entries(this.fields).map(([t,r])=>[t,{fieldType:r.json,optional:r.isOptional==="optional"}]))}}asOptional(){return new Vo({isOptional:"optional",fields:this.fields})}omit(...t){const r={...this.fields};for(const s of t)delete r[s];return new Vo({isOptional:this.isOptional,fields:r})}pick(...t){const r={};for(const s of t)r[s]=this.fields[s];return new Vo({isOptional:this.isOptional,fields:r})}partial(){const t={};for(const[r,s]of globalThis.Object.entries(this.fields))t[r]=s.asOptional();return new Vo({isOptional:this.isOptional,fields:t})}extend(t){return new Vo({isOptional:this.isOptional,fields:{...this.fields,...t}})}}class Qp extends fn{constructor({isOptional:t,value:r}){if(super({isOptional:t}),Ke(this,"value"),Ke(this,"kind","literal"),typeof r!="string"&&typeof r!="boolean"&&typeof r!="number"&&typeof r!="bigint")throw new Error("v.literal(value) must be a string, number, or boolean");this.value=r}get json(){return{type:this.kind,value:jn(this.value)}}asOptional(){return new Qp({isOptional:"optional",value:this.value})}}class Gp extends fn{constructor({isOptional:t,element:r}){super({isOptional:t}),Ke(this,"element"),Ke(this,"kind","array"),r===void 0&&Ia("v.array()"),this.element=r}get json(){return{type:this.kind,value:this.element.json}}asOptional(){return new Gp({isOptional:"optional",element:this.element})}}class Yp extends fn{constructor({isOptional:t,key:r,value:s}){if(super({isOptional:t}),Ke(this,"key"),Ke(this,"value"),Ke(this,"kind","record"),r===void 0&&Ia("v.record()","key"),s===void 0&&Ia("v.record()","value"),r.isOptional==="optional")throw new Error("Record validator cannot have optional keys");if(s.isOptional==="optional")throw new Error("Record validator cannot have optional values");if(!r.isConvexValidator||!s.isConvexValidator)throw new Error("Key and value of v.record() but be validators");this.key=r,this.value=s}get json(){return{type:this.kind,keys:this.key.json,values:{fieldType:this.value.json,optional:!1}}}asOptional(){return new Yp({isOptional:"optional",key:this.key,value:this.value})}}class Kp extends fn{constructor({isOptional:t,members:r}){super({isOptional:t}),Ke(this,"members"),Ke(this,"kind","union"),r.forEach((s,a)=>{if(s===void 0&&Ia("v.union()",`member at index ${a}`),!s.isConvexValidator)throw new Error("All members of v.union() must be validators")}),this.members=r}get json(){return{type:this.kind,value:this.members.map(t=>t.json)}}asOptional(){return new Kp({isOptional:"optional",members:this.members})}}const He={id:e=>new Bp({isOptional:"required",tableName:e}),null:()=>new Hp({isOptional:"required"}),number:()=>new iu({isOptional:"required"}),float64:()=>new iu({isOptional:"required"}),bigint:()=>new au({isOptional:"required"}),int64:()=>new au({isOptional:"required"}),boolean:()=>new qp({isOptional:"required"}),string:()=>new Fp({isOptional:"required"}),bytes:()=>new Vp({isOptional:"required"}),literal:e=>new Qp({isOptional:"required",value:e}),array:e=>new Gp({isOptional:"required",element:e}),object:e=>new Vo({isOptional:"required",fields:e}),record:(e,t)=>new Yp({isOptional:"required",key:e,value:t}),union:(...e)=>new Kp({isOptional:"required",members:e}),any:()=>new Zp({isOptional:"required"}),optional:e=>e.asOptional(),nullable:e=>He.union(e,He.null())};var jk=Object.defineProperty,Lk=(e,t,r)=>t in e?jk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Lh=(e,t,r)=>Lk(e,typeof t!="symbol"?t+"":t,r),E0,R0;const Dk=Symbol.for("ConvexError");class fp extends(R0=Error,E0=Dk,R0){constructor(t){super(typeof t=="string"?t:ja(t)),Lh(this,"name","ConvexError"),Lh(this,"data"),Lh(this,E0,!0),this.data=t}}const S_=()=>Array.from({length:4},()=>0);S_();S_();const C0="1.31.6";var Pk=Object.defineProperty,Uk=(e,t,r)=>t in e?Pk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,T0=(e,t,r)=>Uk(e,typeof t!="symbol"?t+"":t,r);const $k="color:rgb(0, 145, 255)";function w_(e){switch(e){case"query":return"Q";case"mutation":return"M";case"action":return"A";case"any":return"?"}}class __{constructor(t){T0(this,"_onLogLineFuncs"),T0(this,"_verbose"),this._onLogLineFuncs={},this._verbose=t.verbose}addLogLineListener(t){let r=Math.random().toString(36).substring(2,15);for(let s=0;s<10&&this._onLogLineFuncs[r]!==void 0;s++)r=Math.random().toString(36).substring(2,15);return this._onLogLineFuncs[r]=t,()=>{delete this._onLogLineFuncs[r]}}logVerbose(...t){if(this._verbose)for(const r of Object.values(this._onLogLineFuncs))r("debug",`${new Date().toISOString()}`,...t)}log(...t){for(const r of Object.values(this._onLogLineFuncs))r("info",...t)}warn(...t){for(const r of Object.values(this._onLogLineFuncs))r("warn",...t)}error(...t){for(const r of Object.values(this._onLogLineFuncs))r("error",...t)}}function x_(e){const t=new __(e);return t.addLogLineListener((r,...s)=>{switch(r){case"debug":console.debug(...s);break;case"info":console.log(...s);break;case"warn":console.warn(...s);break;case"error":console.error(...s);break;default:console.log(...s)}}),t}function E_(e){return new __(e)}function cu(e,t,r,s,a){const l=w_(r);if(typeof a=="object"&&(a=`ConvexError ${JSON.stringify(a.errorData,null,2)}`),t==="info"){const u=a.match(/^\[.*?\] /);if(u===null){e.error(`[CONVEX ${l}(${s})] Could not parse console.log`);return}const f=a.slice(1,u[0].length-2),h=a.slice(u[0].length);e.log(`%c[CONVEX ${l}(${s})] [${f}]`,$k,h)}else e.error(`[CONVEX ${l}(${s})] ${a}`)}function Ik(e,t){const r=`[CONVEX FATAL ERROR] ${t}`;return e.error(r),new Error(r)}function ti(e,t,r){return`[CONVEX ${w_(e)}(${t})] ${r.errorMessage}
|
|
19
|
-
Called by client`}function dp(e,t){return t.data=e.errorData,t}function Wo(e){const t=e.split(":");let r,s;return t.length===1?(r=t[0],s="default"):(r=t.slice(0,t.length-1).join(":"),s=t[t.length-1]),r.endsWith(".js")&&(r=r.slice(0,-3)),`${r}:${s}`}function Yo(e,t){return JSON.stringify({udfPath:Wo(e),args:jn(t)})}function A0(e,t,r){const{initialNumItems:s,id:a}=r;return JSON.stringify({type:"paginated",udfPath:Wo(e),args:jn(t),options:jn({initialNumItems:s,id:a})})}var Bk=Object.defineProperty,qk=(e,t,r)=>t in e?Bk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Bn=(e,t,r)=>qk(e,typeof t!="symbol"?t+"":t,r);class Vk{constructor(){Bn(this,"nextQueryId"),Bn(this,"querySetVersion"),Bn(this,"querySet"),Bn(this,"queryIdToToken"),Bn(this,"identityVersion"),Bn(this,"auth"),Bn(this,"outstandingQueriesOlderThanRestart"),Bn(this,"outstandingAuthOlderThanRestart"),Bn(this,"paused"),Bn(this,"pendingQuerySetModifications"),this.nextQueryId=0,this.querySetVersion=0,this.identityVersion=0,this.querySet=new Map,this.queryIdToToken=new Map,this.outstandingQueriesOlderThanRestart=new Set,this.outstandingAuthOlderThanRestart=!1,this.paused=!1,this.pendingQuerySetModifications=new Map}hasSyncedPastLastReconnect(){return this.outstandingQueriesOlderThanRestart.size===0&&!this.outstandingAuthOlderThanRestart}markAuthCompletion(){this.outstandingAuthOlderThanRestart=!1}subscribe(t,r,s,a){const l=Wo(t),u=Yo(l,r),f=this.querySet.get(u);if(f!==void 0)return f.numSubscribers+=1,{queryToken:u,modification:null,unsubscribe:()=>this.removeSubscriber(u)};{const h=this.nextQueryId++,m={id:h,canonicalizedUdfPath:l,args:r,numSubscribers:1,journal:s,componentPath:a};this.querySet.set(u,m),this.queryIdToToken.set(h,u);const y=this.querySetVersion,g=this.querySetVersion+1,b={type:"Add",queryId:h,udfPath:l,args:[jn(r)],journal:s,componentPath:a};return this.paused?this.pendingQuerySetModifications.set(h,b):this.querySetVersion=g,{queryToken:u,modification:{type:"ModifyQuerySet",baseVersion:y,newVersion:g,modifications:[b]},unsubscribe:()=>this.removeSubscriber(u)}}}transition(t){for(const r of t.modifications)switch(r.type){case"QueryUpdated":case"QueryFailed":{this.outstandingQueriesOlderThanRestart.delete(r.queryId);const s=r.journal;if(s!==void 0){const a=this.queryIdToToken.get(r.queryId);a!==void 0&&(this.querySet.get(a).journal=s)}break}case"QueryRemoved":{this.outstandingQueriesOlderThanRestart.delete(r.queryId);break}default:throw new Error(`Invalid modification ${r.type}`)}}queryId(t,r){const s=Wo(t),a=Yo(s,r),l=this.querySet.get(a);return l!==void 0?l.id:null}isCurrentOrNewerAuthVersion(t){return t>=this.identityVersion}getAuth(){return this.auth}setAuth(t){this.auth={tokenType:"User",value:t};const r=this.identityVersion;return this.paused||(this.identityVersion=r+1),{type:"Authenticate",baseVersion:r,...this.auth}}setAdminAuth(t,r){const s={tokenType:"Admin",value:t,impersonating:r};this.auth=s;const a=this.identityVersion;return this.paused||(this.identityVersion=a+1),{type:"Authenticate",baseVersion:a,...s}}clearAuth(){this.auth=void 0,this.markAuthCompletion();const t=this.identityVersion;return this.paused||(this.identityVersion=t+1),{type:"Authenticate",tokenType:"None",baseVersion:t}}hasAuth(){return!!this.auth}isNewAuth(t){return this.auth?.value!==t}queryPath(t){const r=this.queryIdToToken.get(t);return r?this.querySet.get(r).canonicalizedUdfPath:null}queryArgs(t){const r=this.queryIdToToken.get(t);return r?this.querySet.get(r).args:null}queryToken(t){return this.queryIdToToken.get(t)??null}queryJournal(t){return this.querySet.get(t)?.journal}restart(t){this.unpause(),this.outstandingQueriesOlderThanRestart.clear();const r=[];for(const l of this.querySet.values()){const u={type:"Add",queryId:l.id,udfPath:l.canonicalizedUdfPath,args:[jn(l.args)],journal:l.journal,componentPath:l.componentPath};r.push(u),t.has(l.id)||this.outstandingQueriesOlderThanRestart.add(l.id)}this.querySetVersion=1;const s={type:"ModifyQuerySet",baseVersion:0,newVersion:1,modifications:r};if(!this.auth)return this.identityVersion=0,[s,void 0];this.outstandingAuthOlderThanRestart=!0;const a={type:"Authenticate",baseVersion:0,...this.auth};return this.identityVersion=1,[s,a]}pause(){this.paused=!0}resume(){const t=this.pendingQuerySetModifications.size>0?{type:"ModifyQuerySet",baseVersion:this.querySetVersion,newVersion:++this.querySetVersion,modifications:Array.from(this.pendingQuerySetModifications.values())}:void 0,r=this.auth!==void 0?{type:"Authenticate",baseVersion:this.identityVersion++,...this.auth}:void 0;return this.unpause(),[t,r]}unpause(){this.paused=!1,this.pendingQuerySetModifications.clear()}removeSubscriber(t){const r=this.querySet.get(t);if(r.numSubscribers>1)return r.numSubscribers-=1,null;{this.querySet.delete(t),this.queryIdToToken.delete(r.id),this.outstandingQueriesOlderThanRestart.delete(r.id);const s=this.querySetVersion,a=this.querySetVersion+1,l={type:"Remove",queryId:r.id};return this.paused?this.pendingQuerySetModifications.has(r.id)?this.pendingQuerySetModifications.delete(r.id):this.pendingQuerySetModifications.set(r.id,l):this.querySetVersion=a,{type:"ModifyQuerySet",baseVersion:s,newVersion:a,modifications:[l]}}}}var Fk=Object.defineProperty,Hk=(e,t,r)=>t in e?Fk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Tl=(e,t,r)=>Hk(e,typeof t!="symbol"?t+"":t,r);class Zk{constructor(t,r){this.logger=t,this.markConnectionStateDirty=r,Tl(this,"inflightRequests"),Tl(this,"requestsOlderThanRestart"),Tl(this,"inflightMutationsCount",0),Tl(this,"inflightActionsCount",0),this.inflightRequests=new Map,this.requestsOlderThanRestart=new Set}request(t,r){const s=new Promise(a=>{const l=r?"Requested":"NotSent";this.inflightRequests.set(t.requestId,{message:t,status:{status:l,requestedAt:new Date,onResult:a}}),t.type==="Mutation"?this.inflightMutationsCount++:t.type==="Action"&&this.inflightActionsCount++});return this.markConnectionStateDirty(),s}onResponse(t){const r=this.inflightRequests.get(t.requestId);if(r===void 0||r.status.status==="Completed")return null;const s=r.message.type==="Mutation"?"mutation":"action",a=r.message.udfPath;for(const h of t.logLines)cu(this.logger,"info",s,a,h);const l=r.status;let u,f;if(t.success)u={success:!0,logLines:t.logLines,value:mi(t.result)},f=()=>l.onResult(u);else{const h=t.result,{errorData:m}=t;cu(this.logger,"error",s,a,h),u={success:!1,errorMessage:h,errorData:m!==void 0?mi(m):void 0,logLines:t.logLines},f=()=>l.onResult(u)}return t.type==="ActionResponse"||!t.success?(f(),this.inflightRequests.delete(t.requestId),this.requestsOlderThanRestart.delete(t.requestId),r.message.type==="Action"?this.inflightActionsCount--:r.message.type==="Mutation"&&this.inflightMutationsCount--,this.markConnectionStateDirty(),{requestId:t.requestId,result:u}):(r.status={status:"Completed",result:u,ts:t.ts,onResolve:f},null)}removeCompleted(t){const r=new Map;for(const[s,a]of this.inflightRequests.entries()){const l=a.status;l.status==="Completed"&&l.ts.lessThanOrEqual(t)&&(l.onResolve(),r.set(s,l.result),a.message.type==="Mutation"?this.inflightMutationsCount--:a.message.type==="Action"&&this.inflightActionsCount--,this.inflightRequests.delete(s),this.requestsOlderThanRestart.delete(s))}return r.size>0&&this.markConnectionStateDirty(),r}restart(){this.requestsOlderThanRestart=new Set(this.inflightRequests.keys());const t=[];for(const[r,s]of this.inflightRequests){if(s.status.status==="NotSent"){s.status.status="Requested",t.push(s.message);continue}if(s.message.type==="Mutation")t.push(s.message);else if(s.message.type==="Action"){if(this.inflightRequests.delete(r),this.requestsOlderThanRestart.delete(r),this.inflightActionsCount--,s.status.status==="Completed")throw new Error("Action should never be in 'Completed' state");s.status.onResult({success:!1,errorMessage:"Connection lost while action was in flight",logLines:[]})}}return this.markConnectionStateDirty(),t}resume(){const t=[];for(const[,r]of this.inflightRequests)if(r.status.status==="NotSent"){r.status.status="Requested",t.push(r.message);continue}return t}hasIncompleteRequests(){for(const t of this.inflightRequests.values())if(t.status.status==="Requested")return!0;return!1}hasInflightRequests(){return this.inflightRequests.size>0}hasSyncedPastLastReconnect(){return this.requestsOlderThanRestart.size===0}timeOfOldestInflightRequest(){if(this.inflightRequests.size===0)return null;let t=Date.now();for(const r of this.inflightRequests.values())r.status.status!=="Completed"&&r.status.requestedAt.getTime()<t&&(t=r.status.requestedAt.getTime());return new Date(t)}inflightMutations(){return this.inflightMutationsCount}inflightActions(){return this.inflightActionsCount}}const Ba=Symbol.for("functionName"),R_=Symbol.for("toReferencePath");function Qk(e){return e[R_]??null}function Gk(e){return e.startsWith("function://")}function Yk(e){let t;if(typeof e=="string")Gk(e)?t={functionHandle:e}:t={name:e};else if(e[Ba])t={name:e[Ba]};else{const r=Qk(e);if(!r)throw new Error(`${e} is not a functionReference`);t={reference:r}}return t}function Yt(e){const t=Yk(e);if(t.name===void 0)throw t.functionHandle!==void 0?new Error(`Expected function reference like "api.file.func" or "internal.file.func", but received function handle ${t.functionHandle}`):t.reference!==void 0?new Error(`Expected function reference in the current component like "api.file.func" or "internal.file.func", but received reference ${t.reference}`):new Error(`Expected function reference like "api.file.func" or "internal.file.func", but received ${JSON.stringify(t)}`);if(typeof e=="string")return e;const r=e[Ba];if(!r)throw new Error(`${e} is not a functionReference`);return r}function C_(e){return{[Ba]:e}}function T_(e=[]){const t={get(r,s){if(typeof s=="string"){const a=[...e,s];return T_(a)}else if(s===Ba){if(e.length<2){const u=["api",...e].join(".");throw new Error(`API path is expected to be of the form \`api.moduleName.functionName\`. Found: \`${u}\``)}const a=e.slice(0,-1).join("/"),l=e[e.length-1];return l==="default"?a:a+":"+l}else return s===Symbol.toStringTag?"FunctionReference":void 0}};return new Proxy({},t)}const Kk=T_();var Xk=Object.defineProperty,Jk=(e,t,r)=>t in e?Xk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,lu=(e,t,r)=>Jk(e,typeof t!="symbol"?t+"":t,r);class qa{constructor(t){lu(this,"queryResults"),lu(this,"modifiedQueries"),this.queryResults=t,this.modifiedQueries=[]}getQuery(t,...r){const s=xr(r[0]),a=Yt(t),l=this.queryResults.get(Yo(a,s));if(l!==void 0)return qa.queryValue(l.result)}getAllQueries(t){const r=[],s=Yt(t);for(const a of this.queryResults.values())a.udfPath===Wo(s)&&r.push({args:a.args,value:qa.queryValue(a.result)});return r}setQuery(t,r,s){const a=xr(r),l=Yt(t),u=Yo(l,a);let f;s===void 0?f=void 0:f={success:!0,value:s,logLines:[]};const h={udfPath:l,args:a,result:f};this.queryResults.set(u,h),this.modifiedQueries.push(u)}static queryValue(t){if(t!==void 0)return t.success?t.value:void 0}}class Wk{constructor(){lu(this,"queryResults"),lu(this,"optimisticUpdates"),this.queryResults=new Map,this.optimisticUpdates=[]}ingestQueryResultsFromServer(t,r){this.optimisticUpdates=this.optimisticUpdates.filter(u=>!r.has(u.mutationId));const s=this.queryResults;this.queryResults=new Map(t);const a=new qa(this.queryResults);for(const u of this.optimisticUpdates)u.update(a);const l=[];for(const[u,f]of this.queryResults){const h=s.get(u);(h===void 0||h.result!==f.result)&&l.push(u)}return l}applyOptimisticUpdate(t,r){this.optimisticUpdates.push({update:t,mutationId:r});const s=new qa(this.queryResults);return t(s),s.modifiedQueries}rawQueryResult(t){const r=this.queryResults.get(t);if(r!==void 0)return r.result}queryResult(t){const r=this.queryResults.get(t);if(r===void 0)return;const s=r.result;if(s!==void 0){if(s.success)return s.value;throw s.errorData!==void 0?dp(s,new fp(ti("query",r.udfPath,s))):new Error(ti("query",r.udfPath,s))}}hasQueryResult(t){return this.queryResults.get(t)!==void 0}queryLogs(t){return this.queryResults.get(t)?.result?.logLines}}var eN=Object.defineProperty,tN=(e,t,r)=>t in e?eN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Dh=(e,t,r)=>tN(e,typeof t!="symbol"?t+"":t,r);class Qt{constructor(t,r){Dh(this,"low"),Dh(this,"high"),Dh(this,"__isUnsignedLong__"),this.low=t|0,this.high=r|0,this.__isUnsignedLong__=!0}static isLong(t){return(t&&t.__isUnsignedLong__)===!0}static fromBytesLE(t){return new Qt(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24)}toBytesLE(){const t=this.high,r=this.low;return[r&255,r>>>8&255,r>>>16&255,r>>>24,t&255,t>>>8&255,t>>>16&255,t>>>24]}static fromNumber(t){return isNaN(t)||t<0?O0:t>=nN?rN:new Qt(t%La|0,t/La|0)}toString(){return(BigInt(this.high)*BigInt(La)+BigInt(this.low)).toString()}equals(t){return Qt.isLong(t)||(t=Qt.fromValue(t)),this.high>>>31===1&&t.high>>>31===1?!1:this.high===t.high&&this.low===t.low}notEquals(t){return!this.equals(t)}comp(t){return Qt.isLong(t)||(t=Qt.fromValue(t)),this.equals(t)?0:t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1}lessThanOrEqual(t){return this.comp(t)<=0}static fromValue(t){return typeof t=="number"?Qt.fromNumber(t):new Qt(t.low,t.high)}}const O0=new Qt(0,0),M0=65536,La=M0*M0,nN=La*La,rN=new Qt(-1,-1);var oN=Object.defineProperty,sN=(e,t,r)=>t in e?oN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Al=(e,t,r)=>sN(e,typeof t!="symbol"?t+"":t,r);class k0{constructor(t,r){Al(this,"version"),Al(this,"remoteQuerySet"),Al(this,"queryPath"),Al(this,"logger"),this.version={querySet:0,ts:Qt.fromNumber(0),identity:0},this.remoteQuerySet=new Map,this.queryPath=t,this.logger=r}transition(t){const r=t.startVersion;if(this.version.querySet!==r.querySet||this.version.ts.notEquals(r.ts)||this.version.identity!==r.identity)throw new Error(`Invalid start version: ${r.ts.toString()}:${r.querySet}:${r.identity}, transitioning from ${this.version.ts.toString()}:${this.version.querySet}:${this.version.identity}`);for(const s of t.modifications)switch(s.type){case"QueryUpdated":{const a=this.queryPath(s.queryId);if(a)for(const u of s.logLines)cu(this.logger,"info","query",a,u);const l=mi(s.value??null);this.remoteQuerySet.set(s.queryId,{success:!0,value:l,logLines:s.logLines});break}case"QueryFailed":{const a=this.queryPath(s.queryId);if(a)for(const u of s.logLines)cu(this.logger,"info","query",a,u);const{errorData:l}=s;this.remoteQuerySet.set(s.queryId,{success:!1,errorMessage:s.errorMessage,errorData:l!==void 0?mi(l):void 0,logLines:s.logLines});break}case"QueryRemoved":{this.remoteQuerySet.delete(s.queryId);break}default:throw new Error(`Invalid modification ${s.type}`)}this.version=t.endVersion}remoteQueryResults(){return this.remoteQuerySet}timestamp(){return this.version.ts}}function Ph(e){const t=Ua(e);return Qt.fromBytesLE(Array.from(t))}function iN(e){const t=new Uint8Array(e.toBytesLE());return $a(t)}function N0(e){switch(e.type){case"FatalError":case"AuthError":case"ActionResponse":case"TransitionChunk":case"Ping":return{...e};case"MutationResponse":return e.success?{...e,ts:Ph(e.ts)}:{...e};case"Transition":return{...e,startVersion:{...e.startVersion,ts:Ph(e.startVersion.ts)},endVersion:{...e.endVersion,ts:Ph(e.endVersion.ts)}}}}function aN(e){switch(e.type){case"Authenticate":case"ModifyQuerySet":case"Mutation":case"Action":case"Event":return{...e};case"Connect":return e.maxObservedTimestamp!==void 0?{...e,maxObservedTimestamp:iN(e.maxObservedTimestamp)}:{...e,maxObservedTimestamp:void 0}}}var cN=Object.defineProperty,lN=(e,t,r)=>t in e?cN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ut=(e,t,r)=>lN(e,typeof t!="symbol"?t+"":t,r);const uN=1e3,fN=1001,dN=1005,hN=4040;let Vl;function Ws(){return Vl===void 0&&(Vl=Date.now()),typeof performance>"u"||!performance.now?Date.now():Math.round(Vl+performance.now())}function z0(){return`t=${Math.round((Ws()-Vl)/100)/10}s`}const A_={InternalServerError:{timeout:1e3},SubscriptionsWorkerFullError:{timeout:3e3},TooManyConcurrentRequests:{timeout:3e3},CommitterFullError:{timeout:3e3},AwsTooManyRequestsException:{timeout:3e3},ExecuteFullError:{timeout:3e3},SystemTimeoutError:{timeout:3e3},ExpiredInQueue:{timeout:3e3},VectorIndexesUnavailable:{timeout:1e3},SearchIndexesUnavailable:{timeout:1e3},TableSummariesUnavailable:{timeout:1e3},VectorIndexTooLarge:{timeout:3e3},SearchIndexTooLarge:{timeout:3e3},TooManyWritesInTimePeriod:{timeout:3e3}};function pN(e){if(e===void 0)return"Unknown";for(const t of Object.keys(A_))if(e.startsWith(t))return t;return"Unknown"}class mN{constructor(t,r,s,a,l,u){this.markConnectionStateDirty=l,this.debug=u,ut(this,"socket"),ut(this,"connectionCount"),ut(this,"_hasEverConnected",!1),ut(this,"lastCloseReason"),ut(this,"transitionChunkBuffer",null),ut(this,"defaultInitialBackoff"),ut(this,"maxBackoff"),ut(this,"retries"),ut(this,"serverInactivityThreshold"),ut(this,"reconnectDueToServerInactivityTimeout"),ut(this,"scheduledReconnect",null),ut(this,"networkOnlineHandler",null),ut(this,"pendingNetworkRecoveryInfo",null),ut(this,"uri"),ut(this,"onOpen"),ut(this,"onResume"),ut(this,"onMessage"),ut(this,"webSocketConstructor"),ut(this,"logger"),ut(this,"onServerDisconnectError"),this.webSocketConstructor=s,this.socket={state:"disconnected"},this.connectionCount=0,this.lastCloseReason="InitialConnect",this.defaultInitialBackoff=1e3,this.maxBackoff=16e3,this.retries=0,this.serverInactivityThreshold=6e4,this.reconnectDueToServerInactivityTimeout=null,this.uri=t,this.onOpen=r.onOpen,this.onResume=r.onResume,this.onMessage=r.onMessage,this.onServerDisconnectError=r.onServerDisconnectError,this.logger=a,this.setupNetworkListener(),this.connect()}setSocketState(t){this.socket=t,this._logVerbose(`socket state changed: ${this.socket.state}, paused: ${"paused"in this.socket?this.socket.paused:void 0}`),this.markConnectionStateDirty()}setupNetworkListener(){typeof window>"u"||typeof window.addEventListener!="function"||this.networkOnlineHandler===null&&(this.networkOnlineHandler=()=>{this._logVerbose("network online event detected"),this.tryReconnectImmediately()},window.addEventListener("online",this.networkOnlineHandler),this._logVerbose("network online event listener registered"))}cleanupNetworkListener(){this.networkOnlineHandler&&typeof window<"u"&&typeof window.removeEventListener=="function"&&(window.removeEventListener("online",this.networkOnlineHandler),this.networkOnlineHandler=null,this._logVerbose("network online event listener removed"))}assembleTransition(t){if(t.partNumber<0||t.partNumber>=t.totalParts||t.totalParts===0||this.transitionChunkBuffer&&(this.transitionChunkBuffer.totalParts!==t.totalParts||this.transitionChunkBuffer.transitionId!==t.transitionId))throw this.transitionChunkBuffer=null,new Error("Invalid TransitionChunk");if(this.transitionChunkBuffer===null&&(this.transitionChunkBuffer={chunks:[],totalParts:t.totalParts,transitionId:t.transitionId}),t.partNumber!==this.transitionChunkBuffer.chunks.length){const r=this.transitionChunkBuffer.chunks.length;throw this.transitionChunkBuffer=null,new Error(`TransitionChunk received out of order: expected part ${r}, got ${t.partNumber}`)}if(this.transitionChunkBuffer.chunks.push(t.chunk),this.transitionChunkBuffer.chunks.length===t.totalParts){const r=this.transitionChunkBuffer.chunks.join("");this.transitionChunkBuffer=null;const s=N0(JSON.parse(r));if(s.type!=="Transition")throw new Error(`Expected Transition, got ${s.type} after assembling chunks`);return s}return null}connect(){if(this.socket.state==="terminated")return;if(this.socket.state!=="disconnected"&&this.socket.state!=="stopped")throw new Error("Didn't start connection from disconnected state: "+this.socket.state);const t=new this.webSocketConstructor(this.uri);this._logVerbose("constructed WebSocket"),this.setSocketState({state:"connecting",ws:t,paused:"no"}),this.resetServerInactivityTimeout(),t.onopen=()=>{if(this.logger.logVerbose("begin ws.onopen"),this.socket.state!=="connecting")throw new Error("onopen called with socket not in connecting state");if(this.setSocketState({state:"ready",ws:t,paused:this.socket.paused==="yes"?"uninitialized":"no"}),this.resetServerInactivityTimeout(),this.socket.paused==="no"&&(this._hasEverConnected=!0,this.onOpen({connectionCount:this.connectionCount,lastCloseReason:this.lastCloseReason,clientTs:Ws()})),this.lastCloseReason!=="InitialConnect"&&(this.lastCloseReason?this.logger.log("WebSocket reconnected at",z0(),"after disconnect due to",this.lastCloseReason):this.logger.log("WebSocket reconnected at",z0())),this.connectionCount+=1,this.lastCloseReason=null,this.pendingNetworkRecoveryInfo!==null){const{timeSavedMs:r}=this.pendingNetworkRecoveryInfo;this.pendingNetworkRecoveryInfo=null,this.sendMessage({type:"Event",eventType:"NetworkRecoveryReconnect",event:{timeSavedMs:r}}),this.logger.log(`Network recovery reconnect saved ~${Math.round(r/1e3)}s of waiting`)}},t.onerror=r=>{this.transitionChunkBuffer=null;const s=r.message;s&&this.logger.log(`WebSocket error message: ${s}`)},t.onmessage=r=>{this.resetServerInactivityTimeout();const s=r.data.length;let a=N0(JSON.parse(r.data));if(this._logVerbose(`received ws message with type ${a.type}`),a.type==="Ping")return;if(a.type==="TransitionChunk"){const u=this.assembleTransition(a);if(!u)return;a=u,this._logVerbose(`assembled full ws message of type ${a.type}`)}this.transitionChunkBuffer!==null&&(this.transitionChunkBuffer=null,this.logger.log(`Received unexpected ${a.type} while buffering TransitionChunks`)),a.type==="Transition"&&this.reportLargeTransition({messageLength:s,transition:a}),this.onMessage(a).hasSyncedPastLastReconnect&&(this.retries=0,this.markConnectionStateDirty())},t.onclose=r=>{if(this._logVerbose("begin ws.onclose"),this.transitionChunkBuffer=null,this.lastCloseReason===null&&(this.lastCloseReason=r.reason||`closed with code ${r.code}`),r.code!==uN&&r.code!==fN&&r.code!==dN&&r.code!==hN){let a=`WebSocket closed with code ${r.code}`;r.reason&&(a+=`: ${r.reason}`),this.logger.log(a),this.onServerDisconnectError&&r.reason&&this.onServerDisconnectError(a)}const s=pN(r.reason);this.scheduleReconnect(s)}}socketState(){return this.socket.state}sendMessage(t){const r={type:t.type,...t.type==="Authenticate"&&t.tokenType==="User"?{value:`...${t.value.slice(-7)}`}:{}};if(this.socket.state==="ready"&&this.socket.paused==="no"){const s=aN(t),a=JSON.stringify(s);let l=!1;try{this.socket.ws.send(a),l=!0}catch(u){this.logger.log(`Failed to send message on WebSocket, reconnecting: ${u}`),this.closeAndReconnect("FailedToSendMessage")}return this._logVerbose(`${l?"sent":"failed to send"} message with type ${t.type}: ${JSON.stringify(r)}`),!0}return this._logVerbose(`message not sent (socket state: ${this.socket.state}, paused: ${"paused"in this.socket?this.socket.paused:void 0}): ${JSON.stringify(r)}`),!1}resetServerInactivityTimeout(){this.socket.state!=="terminated"&&(this.reconnectDueToServerInactivityTimeout!==null&&(clearTimeout(this.reconnectDueToServerInactivityTimeout),this.reconnectDueToServerInactivityTimeout=null),this.reconnectDueToServerInactivityTimeout=setTimeout(()=>{this.closeAndReconnect("InactiveServer")},this.serverInactivityThreshold))}scheduleReconnect(t){this.scheduledReconnect&&(clearTimeout(this.scheduledReconnect.timeout),this.scheduledReconnect=null),this.socket={state:"disconnected"};const r=this.nextBackoff(t);this.markConnectionStateDirty(),this.logger.log(`Attempting reconnect in ${Math.round(r)}ms`);const s=Ws(),a=setTimeout(()=>{this.scheduledReconnect?.timeout===a&&(this.scheduledReconnect=null,this.connect())},r);this.scheduledReconnect={timeout:a,scheduledAt:s,backoffMs:r}}closeAndReconnect(t){switch(this._logVerbose(`begin closeAndReconnect with reason ${t}`),this.socket.state){case"disconnected":case"terminated":case"stopped":return;case"connecting":case"ready":{this.lastCloseReason=t,this.close(),this.scheduleReconnect("client");return}default:this.socket}}close(){switch(this.transitionChunkBuffer=null,this.socket.state){case"disconnected":case"terminated":case"stopped":return Promise.resolve();case"connecting":{const t=this.socket.ws;return t.onmessage=r=>{this._logVerbose("Ignoring message received after close")},new Promise(r=>{t.onclose=()=>{this._logVerbose("Closed after connecting"),r()},t.onopen=()=>{this._logVerbose("Opened after connecting"),t.close()}})}case"ready":{this._logVerbose("ws.close called");const t=this.socket.ws;t.onmessage=s=>{this._logVerbose("Ignoring message received after close")};const r=new Promise(s=>{t.onclose=()=>{s()}});return t.close(),r}default:return this.socket,Promise.resolve()}}terminate(){switch(this.reconnectDueToServerInactivityTimeout&&clearTimeout(this.reconnectDueToServerInactivityTimeout),this.scheduledReconnect&&(clearTimeout(this.scheduledReconnect.timeout),this.scheduledReconnect=null),this.cleanupNetworkListener(),this.socket.state){case"terminated":case"stopped":case"disconnected":case"connecting":case"ready":{const t=this.close();return this.setSocketState({state:"terminated"}),t}default:throw this.socket,new Error(`Invalid websocket state: ${this.socket.state}`)}}stop(){switch(this.socket.state){case"terminated":return Promise.resolve();case"connecting":case"stopped":case"disconnected":case"ready":{this.cleanupNetworkListener();const t=this.close();return this.socket={state:"stopped"},t}default:return this.socket,Promise.resolve()}}tryRestart(){switch(this.socket.state){case"stopped":break;case"terminated":case"connecting":case"ready":case"disconnected":this.logger.logVerbose("Restart called without stopping first");return;default:this.socket}this.setupNetworkListener(),this.connect()}pause(){switch(this.socket.state){case"disconnected":case"stopped":case"terminated":return;case"connecting":case"ready":{this.socket={...this.socket,paused:"yes"};return}default:{this.socket;return}}}tryReconnectImmediately(){if(this._logVerbose("tryReconnectImmediately called"),this.socket.state!=="disconnected"){this._logVerbose(`tryReconnectImmediately called but socket state is ${this.socket.state}, no action taken`);return}let t=null;if(this.scheduledReconnect){const r=Ws()-this.scheduledReconnect.scheduledAt;t=Math.max(0,this.scheduledReconnect.backoffMs-r),this._logVerbose(`would have waited ${Math.round(t)}ms more (backoff was ${Math.round(this.scheduledReconnect.backoffMs)}ms, elapsed ${Math.round(r)}ms)`),clearTimeout(this.scheduledReconnect.timeout),this.scheduledReconnect=null,this._logVerbose("canceled scheduled reconnect")}this.logger.log("Network recovery detected, reconnecting immediately"),this.pendingNetworkRecoveryInfo=t!==null?{timeSavedMs:t}:null,this.connect()}resume(){switch(this.socket.state){case"connecting":this.socket={...this.socket,paused:"no"};return;case"ready":this.socket.paused==="uninitialized"?(this.socket={...this.socket,paused:"no"},this.onOpen({connectionCount:this.connectionCount,lastCloseReason:this.lastCloseReason,clientTs:Ws()})):this.socket.paused==="yes"&&(this.socket={...this.socket,paused:"no"},this.onResume());return;case"terminated":case"stopped":case"disconnected":return;default:this.socket}this.connect()}connectionState(){return{isConnected:this.socket.state==="ready",hasEverConnected:this._hasEverConnected,connectionCount:this.connectionCount,connectionRetries:this.retries}}_logVerbose(t){this.logger.logVerbose(t)}nextBackoff(t){const s=(t==="client"?100:t==="Unknown"?this.defaultInitialBackoff:A_[t].timeout)*Math.pow(2,this.retries);this.retries+=1;const a=Math.min(s,this.maxBackoff),l=a*(Math.random()-.5);return a+l}reportLargeTransition({transition:t,messageLength:r}){if(t.clientClockSkew===void 0||t.serverTs===void 0)return;const s=Ws()-t.clientClockSkew-t.serverTs/1e6,a=`${Math.round(s)}ms`,l=`${Math.round(r/1e4)/100}MB`,u=r/(s/1e3),f=`${Math.round(u/1e4)/100}MB per second`;this._logVerbose(`received ${l} transition in ${a} at ${f}`),r>2e7?this.logger.log(`received query results totaling more that 20MB (${l}) which will take a long time to download on slower connections`):s>2e4&&this.logger.log(`received query results totaling ${l} which took more than 20s to arrive (${a})`),this.debug&&this.sendMessage({type:"Event",eventType:"ClientReceivedTransition",event:{transitionTransitTime:s,messageLength:r}})}}function gN(){return yN()}function yN(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}class Aa extends Error{}Aa.prototype.name="InvalidTokenError";function vN(e){return decodeURIComponent(atob(e).replace(/(.)/g,(t,r)=>{let s=r.charCodeAt(0).toString(16).toUpperCase();return s.length<2&&(s="0"+s),"%"+s}))}function bN(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return vN(t)}catch{return atob(t)}}function O_(e,t){if(typeof e!="string")throw new Aa("Invalid token specified: must be a string");t||(t={});const r=t.header===!0?0:1,s=e.split(".")[r];if(typeof s!="string")throw new Aa(`Invalid token specified: missing part #${r+1}`);let a;try{a=bN(s)}catch(l){throw new Aa(`Invalid token specified: invalid base64 for part #${r+1} (${l.message})`)}try{return JSON.parse(a)}catch(l){throw new Aa(`Invalid token specified: invalid json for part #${r+1} (${l.message})`)}}var SN=Object.defineProperty,wN=(e,t,r)=>t in e?SN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,_n=(e,t,r)=>wN(e,typeof t!="symbol"?t+"":t,r);const _N=480*60*60*1e3,j0=2;class xN{constructor(t,r,s){_n(this,"authState",{state:"noAuth"}),_n(this,"configVersion",0),_n(this,"syncState"),_n(this,"authenticate"),_n(this,"stopSocket"),_n(this,"tryRestartSocket"),_n(this,"pauseSocket"),_n(this,"resumeSocket"),_n(this,"clearAuth"),_n(this,"logger"),_n(this,"refreshTokenLeewaySeconds"),_n(this,"tokenConfirmationAttempts",0),this.syncState=t,this.authenticate=r.authenticate,this.stopSocket=r.stopSocket,this.tryRestartSocket=r.tryRestartSocket,this.pauseSocket=r.pauseSocket,this.resumeSocket=r.resumeSocket,this.clearAuth=r.clearAuth,this.logger=s.logger,this.refreshTokenLeewaySeconds=s.refreshTokenLeewaySeconds}async setConfig(t,r){this.resetAuthState(),this._logVerbose("pausing WS for auth token fetch"),this.pauseSocket();const s=await this.fetchTokenAndGuardAgainstRace(t,{forceRefreshToken:!1});s.isFromOutdatedConfig||(s.value?(this.setAuthState({state:"waitingForServerConfirmationOfCachedToken",config:{fetchToken:t,onAuthChange:r},hasRetried:!1}),this.authenticate(s.value)):(this.setAuthState({state:"initialRefetch",config:{fetchToken:t,onAuthChange:r}}),await this.refetchToken()),this._logVerbose("resuming WS after auth token fetch"),this.resumeSocket())}onTransition(t){if(this.syncState.isCurrentOrNewerAuthVersion(t.endVersion.identity)&&!(t.endVersion.identity<=t.startVersion.identity)){if(this.authState.state==="waitingForServerConfirmationOfCachedToken"){this._logVerbose("server confirmed auth token is valid"),this.refetchToken(),this.authState.config.onAuthChange(!0);return}this.authState.state==="waitingForServerConfirmationOfFreshToken"&&(this._logVerbose("server confirmed new auth token is valid"),this.scheduleTokenRefetch(this.authState.token),this.tokenConfirmationAttempts=0,this.authState.hadAuth||this.authState.config.onAuthChange(!0))}}onAuthError(t){if(t.authUpdateAttempted===!1&&(this.authState.state==="waitingForServerConfirmationOfFreshToken"||this.authState.state==="waitingForServerConfirmationOfCachedToken")){this._logVerbose("ignoring non-auth token expired error");return}const{baseVersion:r}=t;if(!this.syncState.isCurrentOrNewerAuthVersion(r+1)){this._logVerbose("ignoring auth error for previous auth attempt");return}this.tryToReauthenticate(t)}async tryToReauthenticate(t){if(this._logVerbose(`attempting to reauthenticate: ${t.error}`),this.authState.state==="noAuth"||this.authState.state==="waitingForServerConfirmationOfFreshToken"&&this.tokenConfirmationAttempts>=j0){this.logger.error(`Failed to authenticate: "${t.error}", check your server auth config`),this.syncState.hasAuth()&&this.syncState.clearAuth(),this.authState.state!=="noAuth"&&this.setAndReportAuthFailed(this.authState.config.onAuthChange);return}this.authState.state==="waitingForServerConfirmationOfFreshToken"&&(this.tokenConfirmationAttempts++,this._logVerbose(`retrying reauthentication, ${j0-this.tokenConfirmationAttempts} attempts remaining`)),await this.stopSocket();const r=await this.fetchTokenAndGuardAgainstRace(this.authState.config.fetchToken,{forceRefreshToken:!0});r.isFromOutdatedConfig||(r.value&&this.syncState.isNewAuth(r.value)?(this.authenticate(r.value),this.setAuthState({state:"waitingForServerConfirmationOfFreshToken",config:this.authState.config,token:r.value,hadAuth:this.authState.state==="notRefetching"||this.authState.state==="waitingForScheduledRefetch"})):(this._logVerbose("reauthentication failed, could not fetch a new token"),this.syncState.hasAuth()&&this.syncState.clearAuth(),this.setAndReportAuthFailed(this.authState.config.onAuthChange)),this.tryRestartSocket())}async refetchToken(){if(this.authState.state==="noAuth")return;this._logVerbose("refetching auth token");const t=await this.fetchTokenAndGuardAgainstRace(this.authState.config.fetchToken,{forceRefreshToken:!0});t.isFromOutdatedConfig||(t.value?this.syncState.isNewAuth(t.value)?(this.setAuthState({state:"waitingForServerConfirmationOfFreshToken",hadAuth:this.syncState.hasAuth(),token:t.value,config:this.authState.config}),this.authenticate(t.value)):this.setAuthState({state:"notRefetching",config:this.authState.config}):(this._logVerbose("refetching token failed"),this.syncState.hasAuth()&&this.clearAuth(),this.setAndReportAuthFailed(this.authState.config.onAuthChange)),this._logVerbose("restarting WS after auth token fetch (if currently stopped)"),this.tryRestartSocket())}scheduleTokenRefetch(t){if(this.authState.state==="noAuth")return;const r=this.decodeToken(t);if(!r){this.logger.error("Auth token is not a valid JWT, cannot refetch the token");return}const{iat:s,exp:a}=r;if(!s||!a){this.logger.error("Auth token does not have required fields, cannot refetch the token");return}const l=a-s;if(l<=2){this.logger.error("Auth token does not live long enough, cannot refetch the token");return}let u=Math.min(_N,(l-this.refreshTokenLeewaySeconds)*1e3);u<=0&&(this.logger.warn(`Refetching auth token immediately, configured leeway ${this.refreshTokenLeewaySeconds}s is larger than the token's lifetime ${l}s`),u=0);const f=setTimeout(()=>{this._logVerbose("running scheduled token refetch"),this.refetchToken()},u);this.setAuthState({state:"waitingForScheduledRefetch",refetchTokenTimeoutId:f,config:this.authState.config}),this._logVerbose(`scheduled preemptive auth token refetching in ${u}ms`)}async fetchTokenAndGuardAgainstRace(t,r){const s=++this.configVersion;this._logVerbose(`fetching token with config version ${s}`);const a=await t(r);return this.configVersion!==s?(this._logVerbose(`stale config version, expected ${s}, got ${this.configVersion}`),{isFromOutdatedConfig:!0}):{isFromOutdatedConfig:!1,value:a}}stop(){this.resetAuthState(),this.configVersion++,this._logVerbose(`config version bumped to ${this.configVersion}`)}setAndReportAuthFailed(t){t(!1),this.resetAuthState()}resetAuthState(){this.setAuthState({state:"noAuth"})}setAuthState(t){const r=t.state==="waitingForServerConfirmationOfFreshToken"?{hadAuth:t.hadAuth,state:t.state,token:`...${t.token.slice(-7)}`}:{state:t.state};switch(this._logVerbose(`setting auth state to ${JSON.stringify(r)}`),t.state){case"waitingForScheduledRefetch":case"notRefetching":case"noAuth":this.tokenConfirmationAttempts=0;break}this.authState.state==="waitingForScheduledRefetch"&&(clearTimeout(this.authState.refetchTokenTimeoutId),this.syncState.markAuthCompletion()),this.authState=t}decodeToken(t){try{return O_(t)}catch(r){return this._logVerbose(`Error decoding token: ${r instanceof Error?r.message:"Unknown error"}`),null}}_logVerbose(t){this.logger.logVerbose(`${t} [v${this.configVersion}]`)}}const EN=["convexClientConstructed","convexWebSocketOpen","convexFirstMessageReceived"];function RN(e,t){const r={sessionId:t};typeof performance>"u"||!performance.mark||performance.mark(e,{detail:r})}function CN(e){let t=e.name.slice(6);return t=t.charAt(0).toLowerCase()+t.slice(1),{name:t,startTime:e.startTime}}function TN(e){if(typeof performance>"u"||!performance.getEntriesByName)return[];const t=[];for(const r of EN){const s=performance.getEntriesByName(r).filter(a=>a.entryType==="mark").filter(a=>a.detail.sessionId===e);t.push(...s)}return t.map(CN)}var AN=Object.defineProperty,ON=(e,t,r)=>t in e?AN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ft=(e,t,r)=>ON(e,typeof t!="symbol"?t+"":t,r);class MN{constructor(t,r,s){if(ft(this,"address"),ft(this,"state"),ft(this,"requestManager"),ft(this,"webSocketManager"),ft(this,"authenticationManager"),ft(this,"remoteQuerySet"),ft(this,"optimisticQueryResults"),ft(this,"_transitionHandlerCounter",0),ft(this,"_nextRequestId"),ft(this,"_onTransitionFns",new Map),ft(this,"_sessionId"),ft(this,"firstMessageReceived",!1),ft(this,"debug"),ft(this,"logger"),ft(this,"maxObservedTimestamp"),ft(this,"connectionStateSubscribers",new Map),ft(this,"nextConnectionStateSubscriberId",0),ft(this,"_lastPublishedConnectionState"),ft(this,"markConnectionStateDirty",()=>{Promise.resolve().then(()=>{const S=this.connectionState();if(JSON.stringify(S)!==JSON.stringify(this._lastPublishedConnectionState)){this._lastPublishedConnectionState=S;for(const E of this.connectionStateSubscribers.values())E(S)}})}),ft(this,"mark",S=>{this.debug&&RN(S,this.sessionId)}),typeof t=="object")throw new Error("Passing a ClientConfig object is no longer supported. Pass the URL of the Convex deployment as a string directly.");s?.skipConvexDeploymentUrlCheck!==!0&&_k(t),s={...s};const a=s.authRefreshTokenLeewaySeconds??2;let l=s.webSocketConstructor;if(!l&&typeof WebSocket>"u")throw new Error("No WebSocket global variable defined! To use Convex in an environment without WebSocket try the HTTP client: https://docs.convex.dev/api/classes/browser.ConvexHttpClient");l=l||WebSocket,this.debug=s.reportDebugInfoToConvex??!1,this.address=t,this.logger=s.logger===!1?E_({verbose:s.verbose??!1}):s.logger!==!0&&s.logger?s.logger:x_({verbose:s.verbose??!1});const u=t.search("://");if(u===-1)throw new Error("Provided address was not an absolute URL.");const f=t.substring(u+3),h=t.substring(0,u);let m;if(h==="http")m="ws";else if(h==="https")m="wss";else throw new Error(`Unknown parent protocol ${h}`);const y=`${m}://${f}/api/${C0}/sync`;this.state=new Vk,this.remoteQuerySet=new k0(S=>this.state.queryPath(S),this.logger),this.requestManager=new Zk(this.logger,this.markConnectionStateDirty);const g=()=>{this.webSocketManager.pause(),this.state.pause()};this.authenticationManager=new xN(this.state,{authenticate:S=>{const E=this.state.setAuth(S);return this.webSocketManager.sendMessage(E),E.baseVersion},stopSocket:()=>this.webSocketManager.stop(),tryRestartSocket:()=>this.webSocketManager.tryRestart(),pauseSocket:g,resumeSocket:()=>this.webSocketManager.resume(),clearAuth:()=>{this.clearAuth()}},{logger:this.logger,refreshTokenLeewaySeconds:a}),this.optimisticQueryResults=new Wk,this.addOnTransitionHandler(S=>{r(S.queries.map(E=>E.token))}),this._nextRequestId=0,this._sessionId=gN();const{unsavedChangesWarning:b}=s;if(typeof window>"u"||typeof window.addEventListener>"u"){if(b===!0)throw new Error("unsavedChangesWarning requested, but window.addEventListener not found! Remove {unsavedChangesWarning: true} from Convex client options.")}else b!==!1&&window.addEventListener("beforeunload",S=>{if(this.requestManager.hasIncompleteRequests()){S.preventDefault();const E="Are you sure you want to leave? Your changes may not be saved.";return(S||window.event).returnValue=E,E}});this.webSocketManager=new mN(y,{onOpen:S=>{this.mark("convexWebSocketOpen"),this.webSocketManager.sendMessage({...S,type:"Connect",sessionId:this._sessionId,maxObservedTimestamp:this.maxObservedTimestamp});const E=new Set(this.remoteQuerySet.remoteQueryResults().keys());this.remoteQuerySet=new k0(O=>this.state.queryPath(O),this.logger);const[x,C]=this.state.restart(E);C&&this.webSocketManager.sendMessage(C),this.webSocketManager.sendMessage(x);for(const O of this.requestManager.restart())this.webSocketManager.sendMessage(O)},onResume:()=>{const[S,E]=this.state.resume();E&&this.webSocketManager.sendMessage(E),S&&this.webSocketManager.sendMessage(S);for(const x of this.requestManager.resume())this.webSocketManager.sendMessage(x)},onMessage:S=>{switch(this.firstMessageReceived||(this.firstMessageReceived=!0,this.mark("convexFirstMessageReceived"),this.reportMarks()),S.type){case"Transition":{this.observedTimestamp(S.endVersion.ts),this.authenticationManager.onTransition(S),this.remoteQuerySet.transition(S),this.state.transition(S);const E=this.requestManager.removeCompleted(this.remoteQuerySet.timestamp());this.notifyOnQueryResultChanges(E);break}case"MutationResponse":{S.success&&this.observedTimestamp(S.ts);const E=this.requestManager.onResponse(S);E!==null&&this.notifyOnQueryResultChanges(new Map([[E.requestId,E.result]]));break}case"ActionResponse":{this.requestManager.onResponse(S);break}case"AuthError":{this.authenticationManager.onAuthError(S);break}case"FatalError":{const E=Ik(this.logger,S.error);throw this.webSocketManager.terminate(),E}}return{hasSyncedPastLastReconnect:this.hasSyncedPastLastReconnect()}},onServerDisconnectError:s.onServerDisconnectError},l,this.logger,this.markConnectionStateDirty,this.debug),this.mark("convexClientConstructed"),s.expectAuth&&g()}hasSyncedPastLastReconnect(){return this.requestManager.hasSyncedPastLastReconnect()||this.state.hasSyncedPastLastReconnect()}observedTimestamp(t){(this.maxObservedTimestamp===void 0||this.maxObservedTimestamp.lessThanOrEqual(t))&&(this.maxObservedTimestamp=t)}getMaxObservedTimestamp(){return this.maxObservedTimestamp}notifyOnQueryResultChanges(t){const r=this.remoteQuerySet.remoteQueryResults(),s=new Map;for(const[l,u]of r){const f=this.state.queryToken(l);if(f!==null){const h={result:u,udfPath:this.state.queryPath(l),args:this.state.queryArgs(l)};s.set(f,h)}}const a=this.optimisticQueryResults.ingestQueryResultsFromServer(s,new Set(t.keys()));this.handleTransition({queries:a.map(l=>{const u=this.optimisticQueryResults.rawQueryResult(l);return{token:l,modification:{kind:"Updated",result:u}}}),reflectedMutations:Array.from(t).map(([l,u])=>({requestId:l,result:u})),timestamp:this.remoteQuerySet.timestamp()})}handleTransition(t){for(const r of this._onTransitionFns.values())r(t)}addOnTransitionHandler(t){const r=this._transitionHandlerCounter++;return this._onTransitionFns.set(r,t),()=>this._onTransitionFns.delete(r)}getCurrentAuthClaims(){const t=this.state.getAuth();let r={};if(t&&t.tokenType==="User")try{r=t?O_(t.value):{}}catch{r={}}else return;return{token:t.value,decoded:r}}setAuth(t,r){this.authenticationManager.setConfig(t,r)}hasAuth(){return this.state.hasAuth()}setAdminAuth(t,r){const s=this.state.setAdminAuth(t,r);this.webSocketManager.sendMessage(s)}clearAuth(){const t=this.state.clearAuth();this.webSocketManager.sendMessage(t)}subscribe(t,r,s){const a=xr(r),{modification:l,queryToken:u,unsubscribe:f}=this.state.subscribe(t,a,s?.journal,s?.componentPath);return l!==null&&this.webSocketManager.sendMessage(l),{queryToken:u,unsubscribe:()=>{const h=f();h&&this.webSocketManager.sendMessage(h)}}}localQueryResult(t,r){const s=xr(r),a=Yo(t,s);return this.optimisticQueryResults.queryResult(a)}localQueryResultByToken(t){return this.optimisticQueryResults.queryResult(t)}hasLocalQueryResultByToken(t){return this.optimisticQueryResults.hasQueryResult(t)}localQueryLogs(t,r){const s=xr(r),a=Yo(t,s);return this.optimisticQueryResults.queryLogs(a)}queryJournal(t,r){const s=xr(r),a=Yo(t,s);return this.state.queryJournal(a)}connectionState(){const t=this.webSocketManager.connectionState();return{hasInflightRequests:this.requestManager.hasInflightRequests(),isWebSocketConnected:t.isConnected,hasEverConnected:t.hasEverConnected,connectionCount:t.connectionCount,connectionRetries:t.connectionRetries,timeOfOldestInflightRequest:this.requestManager.timeOfOldestInflightRequest(),inflightMutations:this.requestManager.inflightMutations(),inflightActions:this.requestManager.inflightActions()}}subscribeToConnectionState(t){const r=this.nextConnectionStateSubscriberId++;return this.connectionStateSubscribers.set(r,t),()=>{this.connectionStateSubscribers.delete(r)}}async mutation(t,r,s){const a=await this.mutationInternal(t,r,s);if(!a.success)throw a.errorData!==void 0?dp(a,new fp(ti("mutation",t,a))):new Error(ti("mutation",t,a));return a.value}async mutationInternal(t,r,s,a){const{mutationPromise:l}=this.enqueueMutation(t,r,s,a);return l}enqueueMutation(t,r,s,a){const l=xr(r);this.tryReportLongDisconnect();const u=this.nextRequestId;if(this._nextRequestId++,s!==void 0){const y=s.optimisticUpdate;if(y!==void 0){const g=E=>{y(E,l)instanceof Promise&&this.logger.warn("Optimistic update handler returned a Promise. Optimistic updates should be synchronous.")},S=this.optimisticQueryResults.applyOptimisticUpdate(g,u).map(E=>{const x=this.localQueryResultByToken(E);return{token:E,modification:{kind:"Updated",result:x===void 0?void 0:{success:!0,value:x,logLines:[]}}}});this.handleTransition({queries:S,reflectedMutations:[],timestamp:this.remoteQuerySet.timestamp()})}}const f={type:"Mutation",requestId:u,udfPath:t,componentPath:a,args:[jn(l)]},h=this.webSocketManager.sendMessage(f),m=this.requestManager.request(f,h);return{requestId:u,mutationPromise:m}}async action(t,r){const s=await this.actionInternal(t,r);if(!s.success)throw s.errorData!==void 0?dp(s,new fp(ti("action",t,s))):new Error(ti("action",t,s));return s.value}async actionInternal(t,r,s){const a=xr(r),l=this.nextRequestId;this._nextRequestId++,this.tryReportLongDisconnect();const u={type:"Action",requestId:l,udfPath:t,componentPath:s,args:[jn(a)]},f=this.webSocketManager.sendMessage(u);return this.requestManager.request(u,f)}async close(){return this.authenticationManager.stop(),this.webSocketManager.terminate()}get url(){return this.address}get nextRequestId(){return this._nextRequestId}get sessionId(){return this._sessionId}reportMarks(){if(this.debug){const t=TN(this.sessionId);this.webSocketManager.sendMessage({type:"Event",eventType:"ClientConnect",event:t})}}tryReportLongDisconnect(){if(!this.debug)return;const t=this.connectionState().timeOfOldestInflightRequest;if(t===null||Date.now()-t.getTime()<=60*1e3)return;const r=`${this.address}/api/debug_event`;fetch(r,{method:"POST",headers:{"Content-Type":"application/json","Convex-Client":`npm-${C0}`},body:JSON.stringify({event:"LongWebsocketDisconnect"})}).then(s=>{s.ok||this.logger.warn("Analytics request failed with response:",s.body)}).catch(s=>{this.logger.warn("Analytics response failed with error:",s)})}}function Uh(e){if(typeof e!="object"||e===null||!Array.isArray(e.page)||typeof e.isDone!="boolean"||typeof e.continueCursor!="string")throw new Error(`Not a valid paginated query result: ${e?.toString()}`);return e}var kN=Object.defineProperty,NN=(e,t,r)=>t in e?kN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,L0=(e,t,r)=>NN(e,typeof t!="symbol"?t+"":t,r);class zN{constructor(t,r){this.client=t,this.onTransition=r,L0(this,"paginatedQuerySet",new Map),L0(this,"lastTransitionTs"),this.lastTransitionTs=Qt.fromNumber(0),this.client.addOnTransitionHandler(s=>this.onBaseTransition(s))}subscribe(t,r,s){const a=Wo(t),l=A0(a,r,s),u=()=>this.removePaginatedQuerySubscriber(l),f=this.paginatedQuerySet.get(l);return f?(f.numSubscribers+=1,{paginatedQueryToken:l,unsubscribe:u}):(this.paginatedQuerySet.set(l,{token:l,canonicalizedUdfPath:a,args:r,numSubscribers:1,options:{initialNumItems:s.initialNumItems},nextPageKey:0,pageKeys:[],pageKeyToQuery:new Map,ongoingSplits:new Map,skip:!1,id:s.id}),this.addPageToPaginatedQuery(l,null,s.initialNumItems),{paginatedQueryToken:l,unsubscribe:u})}localQueryResult(t,r,s){const a=Wo(t),l=A0(a,r,s);return this.localQueryResultByToken(l)}localQueryResultByToken(t){const r=this.paginatedQuerySet.get(t);if(!r)return;const s=this.activePageQueryTokens(r);if(s.length===0)return{results:[],status:"LoadingFirstPage",loadMore:h=>this.loadMoreOfPaginatedQuery(t,h)};let a=[],l=!1,u=!1;for(const h of s){const m=this.client.localQueryResultByToken(h);if(m===void 0){l=!0,u=!1;continue}const y=Uh(m);a=a.concat(y.page),u=!!y.isDone}let f;return l?f=a.length===0?"LoadingFirstPage":"LoadingMore":u?f="Exhausted":f="CanLoadMore",{results:a,status:f,loadMore:h=>this.loadMoreOfPaginatedQuery(t,h)}}onBaseTransition(t){const r=t.queries.map(u=>u.token),s=this.queriesContainingTokens(r);let a=[];s.length>0&&(this.processPaginatedQuerySplits(s,u=>this.client.localQueryResultByToken(u)),a=s.map(u=>({token:u,modification:{kind:"Updated",result:this.localQueryResultByToken(u)}})));const l={...t,paginatedQueries:a};this.onTransition(l)}loadMoreOfPaginatedQuery(t,r){this.mustGetPaginatedQuery(t);const s=this.queryTokenForLastPageOfPaginatedQuery(t),a=this.client.localQueryResultByToken(s);if(!a)return!1;const l=Uh(a);if(l.isDone)return!1;this.addPageToPaginatedQuery(t,l.continueCursor,r);const u={timestamp:this.lastTransitionTs,reflectedMutations:[],queries:[],paginatedQueries:[{token:t,modification:{kind:"Updated",result:this.localQueryResultByToken(t)}}]};return this.onTransition(u),!0}queriesContainingTokens(t){if(t.length===0)return[];const r=[],s=new Set(t);for(const[a,l]of this.paginatedQuerySet)for(const u of this.allQueryTokens(l))if(s.has(u)){r.push(a);break}return r}processPaginatedQuerySplits(t,r){for(const s of t){const a=this.mustGetPaginatedQuery(s),{ongoingSplits:l,pageKeyToQuery:u,pageKeys:f}=a;for(const[h,[m,y]]of l)r(u.get(m).queryToken)!==void 0&&r(u.get(y).queryToken)!==void 0&&this.completePaginatedQuerySplit(a,h,m,y);for(const h of f){if(l.has(h))continue;const m=u.get(h).queryToken,y=r(m);if(!y)continue;const g=Uh(y);g.splitCursor&&(g.pageStatus==="SplitRecommended"||g.pageStatus==="SplitRequired"||g.page.length>a.options.initialNumItems*2)&&this.splitPaginatedQueryPage(a,h,g.splitCursor,g.continueCursor)}}}splitPaginatedQueryPage(t,r,s,a){const l=t.nextPageKey++,u=t.nextPageKey++,f={cursor:a,numItems:t.options.initialNumItems,id:t.id},h=this.client.subscribe(t.canonicalizedUdfPath,{...t.args,paginationOpts:{...f,cursor:null,endCursor:s}});t.pageKeyToQuery.set(l,h);const m=this.client.subscribe(t.canonicalizedUdfPath,{...t.args,paginationOpts:{...f,cursor:s,endCursor:a}});t.pageKeyToQuery.set(u,m),t.ongoingSplits.set(r,[l,u])}addPageToPaginatedQuery(t,r,s){const a=this.mustGetPaginatedQuery(t),l=a.nextPageKey++,u={cursor:r,numItems:s,id:a.id},f={...a.args,paginationOpts:u},h=this.client.subscribe(a.canonicalizedUdfPath,f);return a.pageKeys.push(l),a.pageKeyToQuery.set(l,h),h}removePaginatedQuerySubscriber(t){const r=this.paginatedQuerySet.get(t);if(r&&(r.numSubscribers-=1,!(r.numSubscribers>0))){for(const s of r.pageKeyToQuery.values())s.unsubscribe();this.paginatedQuerySet.delete(t)}}completePaginatedQuerySplit(t,r,s,a){const l=t.pageKeyToQuery.get(r);t.pageKeyToQuery.delete(r);const u=t.pageKeys.indexOf(r);t.pageKeys.splice(u,1,s,a),t.ongoingSplits.delete(r),l.unsubscribe()}activePageQueryTokens(t){return t.pageKeys.map(r=>t.pageKeyToQuery.get(r).queryToken)}allQueryTokens(t){return Array.from(t.pageKeyToQuery.values()).map(r=>r.queryToken)}queryTokenForLastPageOfPaginatedQuery(t){const r=this.mustGetPaginatedQuery(t),s=r.pageKeys[r.pageKeys.length-1];if(s===void 0)throw new Error(`No pages for paginated query ${t}`);return r.pageKeyToQuery.get(s).queryToken}mustGetPaginatedQuery(t){const r=this.paginatedQuerySet.get(t);if(!r)throw new Error("paginated query no longer exists for token "+t);return r}}function jN({getCurrentValue:e,subscribe:t}){const[r,s]=w.useState(()=>({getCurrentValue:e,subscribe:t,value:e()}));let a=r.value;return(r.getCurrentValue!==e||r.subscribe!==t)&&(a=e(),s({getCurrentValue:e,subscribe:t,value:a})),w.useEffect(()=>{let l=!1;const u=()=>{l||s(h=>{if(h.getCurrentValue!==e||h.subscribe!==t)return h;const m=e();return h.value===m?h:{...h,value:m}})},f=t(u);return u(),()=>{l=!0,f()}},[e,t]),a}var LN=Object.defineProperty,DN=(e,t,r)=>t in e?LN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,wr=(e,t,r)=>DN(e,typeof t!="symbol"?t+"":t,r);const PN=5e3;if(typeof kt>"u")throw new Error("Required dependency 'react' not found");function M_(e,t,r){function s(a){return BN(a),t.mutation(e,a,{optimisticUpdate:r})}return s.withOptimisticUpdate=function(l){if(r!==void 0)throw new Error(`Already specified optimistic update for mutation ${Yt(e)}`);return M_(e,t,l)},s}class UN{constructor(t,r){if(wr(this,"address"),wr(this,"cachedSync"),wr(this,"cachedPaginatedQueryClient"),wr(this,"listeners"),wr(this,"options"),wr(this,"closed",!1),wr(this,"_logger"),wr(this,"adminAuth"),wr(this,"fakeUserIdentity"),t===void 0)throw new Error("No address provided to ConvexReactClient.\nIf trying to deploy to production, make sure to follow all the instructions found at https://docs.convex.dev/production/hosting/\nIf running locally, make sure to run `convex dev` and ensure the .env.local file is populated.");if(typeof t!="string")throw new Error(`ConvexReactClient requires a URL like 'https://happy-otter-123.convex.cloud', received something of type ${typeof t} instead.`);if(!t.includes("://"))throw new Error("Provided address was not an absolute URL.");this.address=t,this.listeners=new Map,this._logger=r?.logger===!1?E_({verbose:r?.verbose??!1}):r?.logger!==!0&&r?.logger?r.logger:x_({verbose:r?.verbose??!1}),this.options={...r,logger:this._logger}}get url(){return this.address}get sync(){if(this.closed)throw new Error("ConvexReactClient has already been closed.");return this.cachedSync?this.cachedSync:(this.cachedSync=new MN(this.address,()=>{},this.options),this.adminAuth&&this.cachedSync.setAdminAuth(this.adminAuth,this.fakeUserIdentity),this.cachedPaginatedQueryClient=new zN(this.cachedSync,t=>this.handleTransition(t)),this.cachedSync)}get paginatedQueryClient(){if(this.sync,this.cachedPaginatedQueryClient)return this.cachedPaginatedQueryClient;throw new Error("Should already be instantiated")}setAuth(t,r){if(typeof t=="string")throw new Error("Passing a string to ConvexReactClient.setAuth is no longer supported, please upgrade to passing in an async function to handle reauthentication.");this.sync.setAuth(t,r??(()=>{}))}clearAuth(){this.sync.clearAuth()}setAdminAuth(t,r){if(this.adminAuth=t,this.fakeUserIdentity=r,this.closed)throw new Error("ConvexReactClient has already been closed.");this.cachedSync&&this.sync.setAdminAuth(t,r)}watchQuery(t,...r){const[s,a]=r,l=Yt(t);return{onUpdate:u=>{const{queryToken:f,unsubscribe:h}=this.sync.subscribe(l,s,a),m=this.listeners.get(f);return m!==void 0?m.add(u):this.listeners.set(f,new Set([u])),()=>{if(this.closed)return;const y=this.listeners.get(f);y.delete(u),y.size===0&&this.listeners.delete(f),h()}},localQueryResult:()=>{if(this.cachedSync)return this.cachedSync.localQueryResult(l,s)},localQueryLogs:()=>{if(this.cachedSync)return this.cachedSync.localQueryLogs(l,s)},journal:()=>{if(this.cachedSync)return this.cachedSync.queryJournal(l,s)}}}prewarmQuery(t){const r=t.extendSubscriptionFor??PN,a=this.watchQuery(t.query,t.args||{}).onUpdate(()=>{});setTimeout(a,r)}watchPaginatedQuery(t,r,s){const a=Yt(t);return{onUpdate:l=>{const{paginatedQueryToken:u,unsubscribe:f}=this.paginatedQueryClient.subscribe(a,r||{},s),h=this.listeners.get(u);return h!==void 0?h.add(l):this.listeners.set(u,new Set([l])),()=>{if(this.closed)return;const m=this.listeners.get(u);m.delete(l),m.size===0&&this.listeners.delete(u),f()}},localQueryResult:()=>this.paginatedQueryClient.localQueryResult(a,r,s)}}mutation(t,...r){const[s,a]=r,l=Yt(t);return this.sync.mutation(l,s,a)}action(t,...r){const s=Yt(t);return this.sync.action(s,...r)}query(t,...r){const s=this.watchQuery(t,...r),a=s.localQueryResult();return a!==void 0?Promise.resolve(a):new Promise((l,u)=>{const f=s.onUpdate(()=>{f();try{l(s.localQueryResult())}catch(h){u(h)}})})}connectionState(){return this.sync.connectionState()}subscribeToConnectionState(t){return this.sync.subscribeToConnectionState(t)}get logger(){return this._logger}async close(){if(this.closed=!0,this.listeners=new Map,this.cachedPaginatedQueryClient&&(this.cachedPaginatedQueryClient=void 0),this.cachedSync){const t=this.cachedSync;this.cachedSync=void 0,await t.close()}}handleTransition(t){const r=t.queries.map(a=>a.token),s=t.paginatedQueries.map(a=>a.token);this.transition([...r,...s])}transition(t){for(const r of t){const s=this.listeners.get(r);if(s)for(const a of s)a()}}}const Xp=kt.createContext(void 0);function $N(){return w.useContext(Xp)}const IN=({client:e,children:t})=>kt.createElement(Xp.Provider,{value:e},t);function k_(e,...t){const r=t[0]==="skip",s=t[0]==="skip"?{}:xr(t[0]),a=typeof e=="string"?C_(e):e,l=Yt(a),u=w.useMemo(()=>r?{}:{query:{query:a,args:s}},[JSON.stringify(jn(s)),l,r]),h=HN(u).query;if(h instanceof Error)throw h;return h}function s9(e){const t=typeof e=="string"?C_(e):e,r=w.useContext(Xp);if(r===void 0)throw new Error("Could not find Convex client! `useMutation` must be used in the React component tree under `ConvexProvider`. Did you forget it? See https://docs.convex.dev/quick-start#set-up-convex-in-your-react-app");return w.useMemo(()=>M_(t,r),[r,Yt(t)])}function BN(e){if(typeof e=="object"&&e!==null&&"bubbles"in e&&"persist"in e&&"isDefaultPrevented"in e)throw new Error("Convex function called with SyntheticEvent object. Did you use a Convex function as an event handler directly? Event handlers like onClick receive an event object as their first argument. These SyntheticEvent objects are not valid Convex values. Try wrapping the function like `const handler = () => myMutation();` and using `handler` in the event handler.")}var qN=Object.defineProperty,VN=(e,t,r)=>t in e?qN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,$h=(e,t,r)=>VN(e,typeof t!="symbol"?t+"":t,r);class FN{constructor(t){$h(this,"createWatch"),$h(this,"queries"),$h(this,"listeners"),this.createWatch=t,this.queries={},this.listeners=new Set}setQueries(t){for(const r of Object.keys(t)){const{query:s,args:a,paginationOptions:l}=t[r];if(Yt(s),this.queries[r]===void 0)this.addQuery(r,s,a,l?{paginationOptions:l}:{});else{const u=this.queries[r];(Yt(s)!==Yt(u.query)||JSON.stringify(jn(a))!==JSON.stringify(jn(u.args))||JSON.stringify(l)!==JSON.stringify(u.paginationOptions))&&(this.removeQuery(r),this.addQuery(r,s,a,l?{paginationOptions:l}:{}))}}for(const r of Object.keys(this.queries))t[r]===void 0&&this.removeQuery(r)}subscribe(t){return this.listeners.add(t),()=>{this.listeners.delete(t)}}getLocalResults(t){const r={};for(const s of Object.keys(t)){const{query:a,args:l}=t[s],u=t[s].paginationOptions;Yt(a);const f=this.createWatch(a,l,u?{paginationOptions:u}:{});let h;try{h=f.localQueryResult()}catch(m){if(m instanceof Error)h=m;else throw m}r[s]=h}return r}setCreateWatch(t){this.createWatch=t;for(const r of Object.keys(this.queries)){const{query:s,args:a,watch:l,paginationOptions:u}=this.queries[r],f="journal"in l?l.journal():void 0;this.removeQuery(r),this.addQuery(r,s,a,{...f?{journal:f}:[],...u?{paginationOptions:u}:{}})}}destroy(){for(const t of Object.keys(this.queries))this.removeQuery(t);this.listeners=new Set}addQuery(t,r,s,{paginationOptions:a,journal:l}){if(this.queries[t]!==void 0)throw new Error(`Tried to add a new query with identifier ${t} when it already exists.`);const u=this.createWatch(r,s,{...l?{journal:l}:[],...a?{paginationOptions:a}:{}}),f=u.onUpdate(()=>this.notifyListeners());this.queries[t]={query:r,args:s,watch:u,unsubscribe:f,...a?{paginationOptions:a}:{}}}removeQuery(t){const r=this.queries[t];if(r===void 0)throw new Error(`No query found with identifier ${t}.`);r.unsubscribe(),delete this.queries[t]}notifyListeners(){for(const t of this.listeners)t()}}function HN(e){const t=$N();if(t===void 0)throw new Error("Could not find Convex client! `useQuery` must be used in the React component tree under `ConvexProvider`. Did you forget it? See https://docs.convex.dev/quick-start#set-up-convex-in-your-react-app");const r=w.useMemo(()=>(s,a,{journal:l,paginationOptions:u})=>u?t.watchPaginatedQuery(s,a,u):t.watchQuery(s,a,l?{journal:l}:{}),[t]);return ZN(e,r)}function ZN(e,t){const[r]=w.useState(()=>new FN(t));r.createWatch!==t&&r.setCreateWatch(t),w.useEffect(()=>()=>r.destroy(),[r]);const s=w.useMemo(()=>({getCurrentValue:()=>r.getLocalResults(e),subscribe:a=>(r.setQueries(e),r.subscribe(a))}),[r,e]);return jN(s)}const QN="/assets/globals-BvFfH-v9.css";const N_=(...e)=>e.filter((t,r,s)=>!!t&&t.trim()!==""&&s.indexOf(t)===r).join(" ").trim();const GN=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const YN=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,s)=>s?s.toUpperCase():r.toLowerCase());const D0=e=>{const t=YN(e);return t.charAt(0).toUpperCase()+t.slice(1)};var KN={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const XN=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const JN=w.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:s,className:a="",children:l,iconNode:u,...f},h)=>w.createElement("svg",{ref:h,...KN,width:t,height:t,stroke:e,strokeWidth:s?Number(r)*24/Number(t):r,className:N_("lucide",a),...!l&&!XN(f)&&{"aria-hidden":"true"},...f},[...u.map(([m,y])=>w.createElement(m,y)),...Array.isArray(l)?l:[l]]));const we=(e,t)=>{const r=w.forwardRef(({className:s,...a},l)=>w.createElement(JN,{ref:l,iconNode:t,className:N_(`lucide-${GN(D0(e))}`,`lucide-${e}`,s),...a}));return r.displayName=D0(e),r};const WN=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],ez=we("archive",WN);const tz=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],hp=we("bell",tz);const nz=[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}]],rz=we("book",nz);const oz=[["path",{d:"M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z",key:"oz39mx"}]],sz=we("bookmark",oz);const iz=[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]],az=we("braces",iz);const cz=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],lz=we("calendar",cz);const uz=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Jp=we("chevron-down",uz);const fz=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],dz=we("chevron-right",fz);const hz=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],pz=we("circle-alert",hz);const mz=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],z_=we("circle-question-mark",mz);const gz=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],yz=we("clock",gz);const vz=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],bz=we("code",vz);const Sz=[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]],wz=we("dollar-sign",Sz);const _z=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],xz=we("external-link",_z);const Ez=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Rz=we("eye",Ez);const Cz=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]],Tz=we("file-code",Cz);const Az=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Oz=we("file-text",Az);const Mz=[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",key:"1jaruq"}]],kz=we("flag",Mz);const Nz=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],zz=we("folder",Nz);const jz=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],Lz=we("globe",jz);const Dz=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]],Pz=we("hash",Dz);const Uz=[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}]],$z=we("heart",Uz);const Iz=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],j_=we("house",Iz);const Bz=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],qz=we("image",Bz);const Vz=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],L_=we("layers",Vz);const Fz=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],Hz=we("layout-dashboard",Fz);const Zz=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],Qz=we("link",Zz);const Gz=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Yz=we("loader-circle",Gz);const Kz=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],Xz=we("lock",Kz);const Jz=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],Wz=we("log-out",Jz);const e3=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],t3=we("mail",e3);const n3=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],r3=we("map-pin",n3);const o3=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],s3=we("message-square",o3);const i3=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],a3=we("package",i3);const c3=[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]],l3=we("phone",c3);const u3=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],f3=we("settings",u3);const d3=[["path",{d:"M21 10.656V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.344",key:"2acyp4"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],h3=we("square-check-big",d3);const p3=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],m3=we("square-pen",p3);const g3=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],y3=we("star",g3);const v3=[["path",{d:"M13.172 2a2 2 0 0 1 1.414.586l6.71 6.71a2.4 2.4 0 0 1 0 3.408l-4.592 4.592a2.4 2.4 0 0 1-3.408 0l-6.71-6.71A2 2 0 0 1 6 9.172V3a1 1 0 0 1 1-1z",key:"16rjxf"}],["path",{d:"M2 7v6.172a2 2 0 0 0 .586 1.414l6.71 6.71a2.4 2.4 0 0 0 3.191.193",key:"178nd4"}],["circle",{cx:"10.5",cy:"6.5",r:".5",fill:"currentColor",key:"12ikhr"}]],b3=we("tags",v3);const S3=[["circle",{cx:"9",cy:"12",r:"3",key:"u3jwor"}],["rect",{width:"20",height:"14",x:"2",y:"5",rx:"7",key:"g7kal2"}]],w3=we("toggle-left",S3);const _3=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],x3=we("trash-2",_3);const E3=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],D_=we("user",E3);function P_(e){var t,r,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=P_(e[t]))&&(s&&(s+=" "),s+=r)}else for(r in e)e[r]&&(s&&(s+=" "),s+=r);return s}function U_(){for(var e,t,r=0,s="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=P_(e))&&(s&&(s+=" "),s+=t);return s}const R3=(e,t)=>{const r=new Array(e.length+t.length);for(let s=0;s<e.length;s++)r[s]=e[s];for(let s=0;s<t.length;s++)r[e.length+s]=t[s];return r},C3=(e,t)=>({classGroupId:e,validator:t}),$_=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),uu="-",P0=[],T3="arbitrary..",A3=e=>{const t=M3(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return O3(u);const f=u.split(uu),h=f[0]===""&&f.length>1?1:0;return I_(f,h,t)},getConflictingClassGroupIds:(u,f)=>{if(f){const h=s[u],m=r[u];return h?m?R3(m,h):h:m||P0}return r[u]||P0}}},I_=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const a=e[t],l=r.nextPart.get(a);if(l){const m=I_(e,t+1,l);if(m)return m}const u=r.validators;if(u===null)return;const f=t===0?e.join(uu):e.slice(t).join(uu),h=u.length;for(let m=0;m<h;m++){const y=u[m];if(y.validator(f))return y.classGroupId}},O3=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),s=t.slice(0,r);return s?T3+s:void 0})(),M3=e=>{const{theme:t,classGroups:r}=e;return k3(r,t)},k3=(e,t)=>{const r=$_();for(const s in e){const a=e[s];Wp(a,r,s,t)}return r},Wp=(e,t,r,s)=>{const a=e.length;for(let l=0;l<a;l++){const u=e[l];N3(u,t,r,s)}},N3=(e,t,r,s)=>{if(typeof e=="string"){z3(e,t,r);return}if(typeof e=="function"){j3(e,t,r,s);return}L3(e,t,r,s)},z3=(e,t,r)=>{const s=e===""?t:B_(t,e);s.classGroupId=r},j3=(e,t,r,s)=>{if(D3(e)){Wp(e(s),t,r,s);return}t.validators===null&&(t.validators=[]),t.validators.push(C3(r,e))},L3=(e,t,r,s)=>{const a=Object.entries(e),l=a.length;for(let u=0;u<l;u++){const[f,h]=a[u];Wp(h,B_(t,f),r,s)}},B_=(e,t)=>{let r=e;const s=t.split(uu),a=s.length;for(let l=0;l<a;l++){const u=s[l];let f=r.nextPart.get(u);f||(f=$_(),r.nextPart.set(u,f)),r=f}return r},D3=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,P3=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),s=Object.create(null);const a=(l,u)=>{r[l]=u,t++,t>e&&(t=0,s=r,r=Object.create(null))};return{get(l){let u=r[l];if(u!==void 0)return u;if((u=s[l])!==void 0)return a(l,u),u},set(l,u){l in r?r[l]=u:a(l,u)}}},pp="!",U0=":",U3=[],$0=(e,t,r,s,a)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:s,isExternal:a}),$3=e=>{const{prefix:t,experimentalParseClassName:r}=e;let s=a=>{const l=[];let u=0,f=0,h=0,m;const y=a.length;for(let x=0;x<y;x++){const C=a[x];if(u===0&&f===0){if(C===U0){l.push(a.slice(h,x)),h=x+1;continue}if(C==="/"){m=x;continue}}C==="["?u++:C==="]"?u--:C==="("?f++:C===")"&&f--}const g=l.length===0?a:a.slice(h);let b=g,S=!1;g.endsWith(pp)?(b=g.slice(0,-1),S=!0):g.startsWith(pp)&&(b=g.slice(1),S=!0);const E=m&&m>h?m-h:void 0;return $0(l,S,b,E)};if(t){const a=t+U0,l=s;s=u=>u.startsWith(a)?l(u.slice(a.length)):$0(U3,!1,u,void 0,!0)}if(r){const a=s;s=l=>r({className:l,parseClassName:a})}return s},I3=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,s)=>{t.set(r,1e6+s)}),r=>{const s=[];let a=[];for(let l=0;l<r.length;l++){const u=r[l],f=u[0]==="[",h=t.has(u);f||h?(a.length>0&&(a.sort(),s.push(...a),a=[]),s.push(u)):a.push(u)}return a.length>0&&(a.sort(),s.push(...a)),s}},B3=e=>({cache:P3(e.cacheSize),parseClassName:$3(e),sortModifiers:I3(e),...A3(e)}),q3=/\s+/,V3=(e,t)=>{const{parseClassName:r,getClassGroupId:s,getConflictingClassGroupIds:a,sortModifiers:l}=t,u=[],f=e.trim().split(q3);let h="";for(let m=f.length-1;m>=0;m-=1){const y=f[m],{isExternal:g,modifiers:b,hasImportantModifier:S,baseClassName:E,maybePostfixModifierPosition:x}=r(y);if(g){h=y+(h.length>0?" "+h:h);continue}let C=!!x,O=s(C?E.substring(0,x):E);if(!O){if(!C){h=y+(h.length>0?" "+h:h);continue}if(O=s(E),!O){h=y+(h.length>0?" "+h:h);continue}C=!1}const L=b.length===0?"":b.length===1?b[0]:l(b).join(":"),k=S?L+pp:L,j=k+O;if(u.indexOf(j)>-1)continue;u.push(j);const I=a(O,C);for(let H=0;H<I.length;++H){const $=I[H];u.push(k+$)}h=y+(h.length>0?" "+h:h)}return h},F3=(...e)=>{let t=0,r,s,a="";for(;t<e.length;)(r=e[t++])&&(s=q_(r))&&(a&&(a+=" "),a+=s);return a},q_=e=>{if(typeof e=="string")return e;let t,r="";for(let s=0;s<e.length;s++)e[s]&&(t=q_(e[s]))&&(r&&(r+=" "),r+=t);return r},H3=(e,...t)=>{let r,s,a,l;const u=h=>{const m=t.reduce((y,g)=>g(y),e());return r=B3(m),s=r.cache.get,a=r.cache.set,l=f,f(h)},f=h=>{const m=s(h);if(m)return m;const y=V3(h,r);return a(h,y),y};return l=u,(...h)=>l(F3(...h))},Z3=[],yt=e=>{const t=r=>r[e]||Z3;return t.isThemeGetter=!0,t},V_=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,F_=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Q3=/^\d+\/\d+$/,G3=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Y3=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,K3=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,X3=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,J3=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Gs=e=>Q3.test(e),Ce=e=>!!e&&!Number.isNaN(Number(e)),no=e=>!!e&&Number.isInteger(Number(e)),Ih=e=>e.endsWith("%")&&Ce(e.slice(0,-1)),_r=e=>G3.test(e),W3=()=>!0,ej=e=>Y3.test(e)&&!K3.test(e),H_=()=>!1,tj=e=>X3.test(e),nj=e=>J3.test(e),rj=e=>!ce(e)&&!le(e),oj=e=>bi(e,G_,H_),ce=e=>V_.test(e),qo=e=>bi(e,Y_,ej),Bh=e=>bi(e,lj,Ce),I0=e=>bi(e,Z_,H_),sj=e=>bi(e,Q_,nj),Ol=e=>bi(e,K_,tj),le=e=>F_.test(e),Ca=e=>Si(e,Y_),ij=e=>Si(e,uj),B0=e=>Si(e,Z_),aj=e=>Si(e,G_),cj=e=>Si(e,Q_),Ml=e=>Si(e,K_,!0),bi=(e,t,r)=>{const s=V_.exec(e);return s?s[1]?t(s[1]):r(s[2]):!1},Si=(e,t,r=!1)=>{const s=F_.exec(e);return s?s[1]?t(s[1]):r:!1},Z_=e=>e==="position"||e==="percentage",Q_=e=>e==="image"||e==="url",G_=e=>e==="length"||e==="size"||e==="bg-size",Y_=e=>e==="length",lj=e=>e==="number",uj=e=>e==="family-name",K_=e=>e==="shadow",fj=()=>{const e=yt("color"),t=yt("font"),r=yt("text"),s=yt("font-weight"),a=yt("tracking"),l=yt("leading"),u=yt("breakpoint"),f=yt("container"),h=yt("spacing"),m=yt("radius"),y=yt("shadow"),g=yt("inset-shadow"),b=yt("text-shadow"),S=yt("drop-shadow"),E=yt("blur"),x=yt("perspective"),C=yt("aspect"),O=yt("ease"),L=yt("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],j=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],I=()=>[...j(),le,ce],H=()=>["auto","hidden","clip","visible","scroll"],$=()=>["auto","contain","none"],D=()=>[le,ce,h],W=()=>[Gs,"full","auto",...D()],ne=()=>[no,"none","subgrid",le,ce],oe=()=>["auto",{span:["full",no,le,ce]},no,le,ce],ie=()=>[no,"auto",le,ce],de=()=>["auto","min","max","fr",le,ce],ue=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ve=()=>["start","end","center","stretch","center-safe","end-safe"],P=()=>["auto",...D()],Y=()=>[Gs,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...D()],V=()=>[e,le,ce],te=()=>[...j(),B0,I0,{position:[le,ce]}],be=()=>["no-repeat",{repeat:["","x","y","space","round"]}],N=()=>["auto","cover","contain",aj,oj,{size:[le,ce]}],G=()=>[Ih,Ca,qo],ee=()=>["","none","full",m,le,ce],re=()=>["",Ce,Ca,qo],he=()=>["solid","dashed","dotted","double"],ge=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],se=()=>[Ce,Ih,B0,I0],Pe=()=>["","none",E,le,ce],Ne=()=>["none",Ce,le,ce],pt=()=>["none",Ce,le,ce],Pt=()=>[Ce,le,ce],Ut=()=>[Gs,"full",...D()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[_r],breakpoint:[_r],color:[W3],container:[_r],"drop-shadow":[_r],ease:["in","out","in-out"],font:[rj],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[_r],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[_r],shadow:[_r],spacing:["px",Ce],text:[_r],"text-shadow":[_r],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Gs,ce,le,C]}],container:["container"],columns:[{columns:[Ce,ce,le,f]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:I()}],overflow:[{overflow:H()}],"overflow-x":[{"overflow-x":H()}],"overflow-y":[{"overflow-y":H()}],overscroll:[{overscroll:$()}],"overscroll-x":[{"overscroll-x":$()}],"overscroll-y":[{"overscroll-y":$()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:W()}],"inset-x":[{"inset-x":W()}],"inset-y":[{"inset-y":W()}],start:[{start:W()}],end:[{end:W()}],top:[{top:W()}],right:[{right:W()}],bottom:[{bottom:W()}],left:[{left:W()}],visibility:["visible","invisible","collapse"],z:[{z:[no,"auto",le,ce]}],basis:[{basis:[Gs,"full","auto",f,...D()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ce,Gs,"auto","initial","none",ce]}],grow:[{grow:["",Ce,le,ce]}],shrink:[{shrink:["",Ce,le,ce]}],order:[{order:[no,"first","last","none",le,ce]}],"grid-cols":[{"grid-cols":ne()}],"col-start-end":[{col:oe()}],"col-start":[{"col-start":ie()}],"col-end":[{"col-end":ie()}],"grid-rows":[{"grid-rows":ne()}],"row-start-end":[{row:oe()}],"row-start":[{"row-start":ie()}],"row-end":[{"row-end":ie()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":de()}],"auto-rows":[{"auto-rows":de()}],gap:[{gap:D()}],"gap-x":[{"gap-x":D()}],"gap-y":[{"gap-y":D()}],"justify-content":[{justify:[...ue(),"normal"]}],"justify-items":[{"justify-items":[...ve(),"normal"]}],"justify-self":[{"justify-self":["auto",...ve()]}],"align-content":[{content:["normal",...ue()]}],"align-items":[{items:[...ve(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ve(),{baseline:["","last"]}]}],"place-content":[{"place-content":ue()}],"place-items":[{"place-items":[...ve(),"baseline"]}],"place-self":[{"place-self":["auto",...ve()]}],p:[{p:D()}],px:[{px:D()}],py:[{py:D()}],ps:[{ps:D()}],pe:[{pe:D()}],pt:[{pt:D()}],pr:[{pr:D()}],pb:[{pb:D()}],pl:[{pl:D()}],m:[{m:P()}],mx:[{mx:P()}],my:[{my:P()}],ms:[{ms:P()}],me:[{me:P()}],mt:[{mt:P()}],mr:[{mr:P()}],mb:[{mb:P()}],ml:[{ml:P()}],"space-x":[{"space-x":D()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":D()}],"space-y-reverse":["space-y-reverse"],size:[{size:Y()}],w:[{w:[f,"screen",...Y()]}],"min-w":[{"min-w":[f,"screen","none",...Y()]}],"max-w":[{"max-w":[f,"screen","none","prose",{screen:[u]},...Y()]}],h:[{h:["screen","lh",...Y()]}],"min-h":[{"min-h":["screen","lh","none",...Y()]}],"max-h":[{"max-h":["screen","lh",...Y()]}],"font-size":[{text:["base",r,Ca,qo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,le,Bh]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ih,ce]}],"font-family":[{font:[ij,ce,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,le,ce]}],"line-clamp":[{"line-clamp":[Ce,"none",le,Bh]}],leading:[{leading:[l,...D()]}],"list-image":[{"list-image":["none",le,ce]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",le,ce]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:V()}],"text-color":[{text:V()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...he(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ce,"from-font","auto",le,qo]}],"text-decoration-color":[{decoration:V()}],"underline-offset":[{"underline-offset":[Ce,"auto",le,ce]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",le,ce]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",le,ce]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:te()}],"bg-repeat":[{bg:be()}],"bg-size":[{bg:N()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},no,le,ce],radial:["",le,ce],conic:[no,le,ce]},cj,sj]}],"bg-color":[{bg:V()}],"gradient-from-pos":[{from:G()}],"gradient-via-pos":[{via:G()}],"gradient-to-pos":[{to:G()}],"gradient-from":[{from:V()}],"gradient-via":[{via:V()}],"gradient-to":[{to:V()}],rounded:[{rounded:ee()}],"rounded-s":[{"rounded-s":ee()}],"rounded-e":[{"rounded-e":ee()}],"rounded-t":[{"rounded-t":ee()}],"rounded-r":[{"rounded-r":ee()}],"rounded-b":[{"rounded-b":ee()}],"rounded-l":[{"rounded-l":ee()}],"rounded-ss":[{"rounded-ss":ee()}],"rounded-se":[{"rounded-se":ee()}],"rounded-ee":[{"rounded-ee":ee()}],"rounded-es":[{"rounded-es":ee()}],"rounded-tl":[{"rounded-tl":ee()}],"rounded-tr":[{"rounded-tr":ee()}],"rounded-br":[{"rounded-br":ee()}],"rounded-bl":[{"rounded-bl":ee()}],"border-w":[{border:re()}],"border-w-x":[{"border-x":re()}],"border-w-y":[{"border-y":re()}],"border-w-s":[{"border-s":re()}],"border-w-e":[{"border-e":re()}],"border-w-t":[{"border-t":re()}],"border-w-r":[{"border-r":re()}],"border-w-b":[{"border-b":re()}],"border-w-l":[{"border-l":re()}],"divide-x":[{"divide-x":re()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":re()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...he(),"hidden","none"]}],"divide-style":[{divide:[...he(),"hidden","none"]}],"border-color":[{border:V()}],"border-color-x":[{"border-x":V()}],"border-color-y":[{"border-y":V()}],"border-color-s":[{"border-s":V()}],"border-color-e":[{"border-e":V()}],"border-color-t":[{"border-t":V()}],"border-color-r":[{"border-r":V()}],"border-color-b":[{"border-b":V()}],"border-color-l":[{"border-l":V()}],"divide-color":[{divide:V()}],"outline-style":[{outline:[...he(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ce,le,ce]}],"outline-w":[{outline:["",Ce,Ca,qo]}],"outline-color":[{outline:V()}],shadow:[{shadow:["","none",y,Ml,Ol]}],"shadow-color":[{shadow:V()}],"inset-shadow":[{"inset-shadow":["none",g,Ml,Ol]}],"inset-shadow-color":[{"inset-shadow":V()}],"ring-w":[{ring:re()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:V()}],"ring-offset-w":[{"ring-offset":[Ce,qo]}],"ring-offset-color":[{"ring-offset":V()}],"inset-ring-w":[{"inset-ring":re()}],"inset-ring-color":[{"inset-ring":V()}],"text-shadow":[{"text-shadow":["none",b,Ml,Ol]}],"text-shadow-color":[{"text-shadow":V()}],opacity:[{opacity:[Ce,le,ce]}],"mix-blend":[{"mix-blend":[...ge(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ge()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ce]}],"mask-image-linear-from-pos":[{"mask-linear-from":se()}],"mask-image-linear-to-pos":[{"mask-linear-to":se()}],"mask-image-linear-from-color":[{"mask-linear-from":V()}],"mask-image-linear-to-color":[{"mask-linear-to":V()}],"mask-image-t-from-pos":[{"mask-t-from":se()}],"mask-image-t-to-pos":[{"mask-t-to":se()}],"mask-image-t-from-color":[{"mask-t-from":V()}],"mask-image-t-to-color":[{"mask-t-to":V()}],"mask-image-r-from-pos":[{"mask-r-from":se()}],"mask-image-r-to-pos":[{"mask-r-to":se()}],"mask-image-r-from-color":[{"mask-r-from":V()}],"mask-image-r-to-color":[{"mask-r-to":V()}],"mask-image-b-from-pos":[{"mask-b-from":se()}],"mask-image-b-to-pos":[{"mask-b-to":se()}],"mask-image-b-from-color":[{"mask-b-from":V()}],"mask-image-b-to-color":[{"mask-b-to":V()}],"mask-image-l-from-pos":[{"mask-l-from":se()}],"mask-image-l-to-pos":[{"mask-l-to":se()}],"mask-image-l-from-color":[{"mask-l-from":V()}],"mask-image-l-to-color":[{"mask-l-to":V()}],"mask-image-x-from-pos":[{"mask-x-from":se()}],"mask-image-x-to-pos":[{"mask-x-to":se()}],"mask-image-x-from-color":[{"mask-x-from":V()}],"mask-image-x-to-color":[{"mask-x-to":V()}],"mask-image-y-from-pos":[{"mask-y-from":se()}],"mask-image-y-to-pos":[{"mask-y-to":se()}],"mask-image-y-from-color":[{"mask-y-from":V()}],"mask-image-y-to-color":[{"mask-y-to":V()}],"mask-image-radial":[{"mask-radial":[le,ce]}],"mask-image-radial-from-pos":[{"mask-radial-from":se()}],"mask-image-radial-to-pos":[{"mask-radial-to":se()}],"mask-image-radial-from-color":[{"mask-radial-from":V()}],"mask-image-radial-to-color":[{"mask-radial-to":V()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":j()}],"mask-image-conic-pos":[{"mask-conic":[Ce]}],"mask-image-conic-from-pos":[{"mask-conic-from":se()}],"mask-image-conic-to-pos":[{"mask-conic-to":se()}],"mask-image-conic-from-color":[{"mask-conic-from":V()}],"mask-image-conic-to-color":[{"mask-conic-to":V()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:te()}],"mask-repeat":[{mask:be()}],"mask-size":[{mask:N()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",le,ce]}],filter:[{filter:["","none",le,ce]}],blur:[{blur:Pe()}],brightness:[{brightness:[Ce,le,ce]}],contrast:[{contrast:[Ce,le,ce]}],"drop-shadow":[{"drop-shadow":["","none",S,Ml,Ol]}],"drop-shadow-color":[{"drop-shadow":V()}],grayscale:[{grayscale:["",Ce,le,ce]}],"hue-rotate":[{"hue-rotate":[Ce,le,ce]}],invert:[{invert:["",Ce,le,ce]}],saturate:[{saturate:[Ce,le,ce]}],sepia:[{sepia:["",Ce,le,ce]}],"backdrop-filter":[{"backdrop-filter":["","none",le,ce]}],"backdrop-blur":[{"backdrop-blur":Pe()}],"backdrop-brightness":[{"backdrop-brightness":[Ce,le,ce]}],"backdrop-contrast":[{"backdrop-contrast":[Ce,le,ce]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ce,le,ce]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ce,le,ce]}],"backdrop-invert":[{"backdrop-invert":["",Ce,le,ce]}],"backdrop-opacity":[{"backdrop-opacity":[Ce,le,ce]}],"backdrop-saturate":[{"backdrop-saturate":[Ce,le,ce]}],"backdrop-sepia":[{"backdrop-sepia":["",Ce,le,ce]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":D()}],"border-spacing-x":[{"border-spacing-x":D()}],"border-spacing-y":[{"border-spacing-y":D()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",le,ce]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ce,"initial",le,ce]}],ease:[{ease:["linear","initial",O,le,ce]}],delay:[{delay:[Ce,le,ce]}],animate:[{animate:["none",L,le,ce]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[x,le,ce]}],"perspective-origin":[{"perspective-origin":I()}],rotate:[{rotate:Ne()}],"rotate-x":[{"rotate-x":Ne()}],"rotate-y":[{"rotate-y":Ne()}],"rotate-z":[{"rotate-z":Ne()}],scale:[{scale:pt()}],"scale-x":[{"scale-x":pt()}],"scale-y":[{"scale-y":pt()}],"scale-z":[{"scale-z":pt()}],"scale-3d":["scale-3d"],skew:[{skew:Pt()}],"skew-x":[{"skew-x":Pt()}],"skew-y":[{"skew-y":Pt()}],transform:[{transform:[le,ce,"","none","gpu","cpu"]}],"transform-origin":[{origin:I()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ut()}],"translate-x":[{"translate-x":Ut()}],"translate-y":[{"translate-y":Ut()}],"translate-z":[{"translate-z":Ut()}],"translate-none":["translate-none"],accent:[{accent:V()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:V()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",le,ce]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",le,ce]}],fill:[{fill:["none",...V()]}],"stroke-w":[{stroke:[Ce,Ca,qo,Bh]}],stroke:[{stroke:["none",...V()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},dj=H3(fj);function _t(...e){return dj(U_(e))}He.union(He.literal("admin"),He.literal("editor"),He.literal("author"),He.literal("viewer"));const hj=He.union(He.literal("contentTypes"),He.literal("contentEntries"),He.literal("mediaItems"),He.literal("settings")),pj=He.union(He.literal("create"),He.literal("read"),He.literal("update"),He.literal("delete"),He.literal("publish"),He.literal("unpublish"),He.literal("restore"),He.literal("manage"),He.literal("move"));He.object({resource:hj,action:pj,scope:He.optional(He.union(He.literal("all"),He.literal("own")))});function Da(e,t="all"){return[{resource:e,action:"create",scope:t},{resource:e,action:"read",scope:t},{resource:e,action:"update",scope:t},{resource:e,action:"delete",scope:t}]}function li(e,t="all"){return[{resource:e,action:"read",scope:t}]}function X_(e="all"){return[{resource:"contentEntries",action:"publish",scope:e},{resource:"contentEntries",action:"unpublish",scope:e}]}const mj={name:"admin",displayName:"Administrator",description:"Full access to all CMS features including settings and content type management",isSystem:!0,permissions:[...Da("contentTypes"),...Da("contentEntries"),...X_(),{resource:"contentEntries",action:"restore"},...Da("mediaItems"),{resource:"settings",action:"manage"},...li("settings")]},gj={name:"editor",displayName:"Editor",description:"Can manage all content and media, but cannot modify settings or content types",isSystem:!0,permissions:[...li("contentTypes"),...Da("contentEntries"),...X_(),{resource:"contentEntries",action:"restore"},...Da("mediaItems")]},yj={name:"author",displayName:"Author",description:"Can create and manage own content and media",isSystem:!0,permissions:[...li("contentTypes"),{resource:"contentEntries",action:"create"},{resource:"contentEntries",action:"read",scope:"own"},{resource:"contentEntries",action:"update",scope:"own"},{resource:"contentEntries",action:"delete",scope:"own"},{resource:"contentEntries",action:"publish",scope:"own"},{resource:"contentEntries",action:"unpublish",scope:"own"},{resource:"mediaItems",action:"create"},{resource:"mediaItems",action:"read",scope:"all"},{resource:"mediaItems",action:"update",scope:"own"},{resource:"mediaItems",action:"delete",scope:"own"}]},vj={name:"viewer",displayName:"Viewer",description:"Read-only access to published content and media",isSystem:!0,permissions:[...li("contentTypes"),...li("contentEntries"),...li("mediaItems")]},em={admin:mj,editor:gj,author:yj,viewer:vj};function bj(e,t){if(e.resource!==t.resource||e.action!==t.action)return!1;const r=e.scope??"all",s=t.scope??"all";return r==="all"?!0:s==="own"}function Sj(e,t,r){const s=em[e]??r?.[e];return s?s.permissions.some(a=>bj(a,t)):!1}function wj(e,t){return(em[e]??t?.[e])?.permissions??[]}function _j(e,t){return em[e]??t?.[e]}function xj(e,t,r){return wj(e,r).filter(s=>s.resource===t)}function i9(e,t,r){return xj(e,t,r).length>0}const J_=w.createContext(null);function Ej({children:e,getUser:t,getUserRole:r,onLogout:s,autoRedirectToLogin:a=!1,loginUrl:l="/login"}){const[u,f]=w.useState(null),[h,m]=w.useState(null),[y,g]=w.useState("loading"),[b,S]=w.useState(null),E=w.useCallback(async()=>{g("loading"),S(null);try{const k=await t();if(!k){f(null),m(null),g("unauthenticated"),a&&typeof window<"u"&&(window.location.href=l);return}const j=await r({userId:k.id});f(k),m(j),g("authenticated")}catch(k){console.error("Authentication error:",k),f(null),m(null),S(k instanceof Error?k.message:"Authentication failed"),g("error")}},[t,r,a,l]);w.useEffect(()=>{E()},[E]);const x=w.useCallback(k=>h?Sj(h,k):!1,[h]),C=w.useCallback(async()=>{try{s&&await s(),f(null),m(null),g("unauthenticated"),a&&typeof window<"u"&&(window.location.href=l)}catch(k){console.error("Logout error:",k),S(k instanceof Error?k.message:"Logout failed")}},[s,a,l]),O=w.useCallback(async()=>{await E()},[E]),L={user:u,role:h,authState:y,isLoading:y==="loading",isAuthenticated:y==="authenticated",error:b,checkPermission:x,logout:C,refresh:O};return _.jsx(J_.Provider,{value:L,children:e})}function W_(){const e=w.useContext(J_);if(!e)throw new Error("useAuth must be used within an AuthProvider");return e}const e1=w.createContext(null),t1="convex-cms-theme";function q0(){return typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function V0(){if(typeof window>"u")return"system";const e=localStorage.getItem(t1);return e==="light"||e==="dark"||e==="system"?e:"system"}function Rj({children:e}){const[t,r]=w.useState(()=>V0()),[s,a]=w.useState(()=>{const f=V0();return f==="system"?q0():f}),l=w.useCallback(f=>{const h=f==="system"?q0():f;a(h);const m=document.documentElement;m.classList.remove("light","dark"),m.classList.add(h)},[]),u=w.useCallback(f=>{r(f),localStorage.setItem(t1,f),l(f)},[l]);return w.useEffect(()=>{l(t)},[t,l]),w.useEffect(()=>{const f=window.matchMedia("(prefers-color-scheme: dark)"),h=()=>{t==="system"&&l("system")};return f.addEventListener("change",h),()=>f.removeEventListener("change",h)},[t,l]),_.jsx(e1.Provider,{value:{theme:t,resolvedTheme:s,setTheme:u},children:e})}function a9(){const e=w.useContext(e1);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e}function X(e,t,r){function s(f,h){if(f._zod||Object.defineProperty(f,"_zod",{value:{def:h,constr:u,traits:new Set},enumerable:!1}),f._zod.traits.has(e))return;f._zod.traits.add(e),t(f,h);const m=u.prototype,y=Object.keys(m);for(let g=0;g<y.length;g++){const b=y[g];b in f||(f[b]=m[b].bind(f))}}const a=r?.Parent??Object;class l extends a{}Object.defineProperty(l,"name",{value:e});function u(f){var h;const m=r?.Parent?new l:this;s(m,f),(h=m._zod).deferred??(h.deferred=[]);for(const y of m._zod.deferred)y();return m}return Object.defineProperty(u,"init",{value:s}),Object.defineProperty(u,Symbol.hasInstance,{value:f=>r?.Parent&&f instanceof r.Parent?!0:f?._zod?.traits?.has(e)}),Object.defineProperty(u,"name",{value:e}),u}class ui extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class n1 extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const r1={};function fo(e){return r1}function o1(e){const t=Object.values(e).filter(s=>typeof s=="number");return Object.entries(e).filter(([s,a])=>t.indexOf(+s)===-1).map(([s,a])=>a)}function mp(e,t){return typeof t=="bigint"?t.toString():t}function tm(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function nm(e){return e==null}function rm(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function Cj(e,t){const r=(e.toString().split(".")[1]||"").length,s=t.toString();let a=(s.split(".")[1]||"").length;if(a===0&&/\d?e-\d?/.test(s)){const h=s.match(/\d?e-(\d?)/);h?.[1]&&(a=Number.parseInt(h[1]))}const l=r>a?r:a,u=Number.parseInt(e.toFixed(l).replace(".","")),f=Number.parseInt(t.toFixed(l).replace(".",""));return u%f/10**l}const F0=Symbol("evaluating");function Ie(e,t,r){let s;Object.defineProperty(e,t,{get(){if(s!==F0)return s===void 0&&(s=F0,s=r()),s},set(a){Object.defineProperty(e,t,{value:a})},configurable:!0})}function rs(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function bo(...e){const t={};for(const r of e){const s=Object.getOwnPropertyDescriptors(r);Object.assign(t,s)}return Object.defineProperties({},t)}function H0(e){return JSON.stringify(e)}function Tj(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const s1="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function fu(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Aj=tm(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function gi(e){if(fu(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const r=t.prototype;return!(fu(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function i1(e){return gi(e)?{...e}:Array.isArray(e)?[...e]:e}const Oj=new Set(["string","number","symbol"]);function ju(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function So(e,t,r){const s=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(s._zod.parent=e),s}function me(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function Mj(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const kj={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Nj(e,t){const r=e._zod.def,s=r.checks;if(s&&s.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const l=bo(e._zod.def,{get shape(){const u={};for(const f in t){if(!(f in r.shape))throw new Error(`Unrecognized key: "${f}"`);t[f]&&(u[f]=r.shape[f])}return rs(this,"shape",u),u},checks:[]});return So(e,l)}function zj(e,t){const r=e._zod.def,s=r.checks;if(s&&s.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const l=bo(e._zod.def,{get shape(){const u={...e._zod.def.shape};for(const f in t){if(!(f in r.shape))throw new Error(`Unrecognized key: "${f}"`);t[f]&&delete u[f]}return rs(this,"shape",u),u},checks:[]});return So(e,l)}function jj(e,t){if(!gi(t))throw new Error("Invalid input to extend: expected a plain object");const r=e._zod.def.checks;if(r&&r.length>0){const l=e._zod.def.shape;for(const u in t)if(Object.getOwnPropertyDescriptor(l,u)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const a=bo(e._zod.def,{get shape(){const l={...e._zod.def.shape,...t};return rs(this,"shape",l),l}});return So(e,a)}function Lj(e,t){if(!gi(t))throw new Error("Invalid input to safeExtend: expected a plain object");const r=bo(e._zod.def,{get shape(){const s={...e._zod.def.shape,...t};return rs(this,"shape",s),s}});return So(e,r)}function Dj(e,t){const r=bo(e._zod.def,{get shape(){const s={...e._zod.def.shape,...t._zod.def.shape};return rs(this,"shape",s),s},get catchall(){return t._zod.def.catchall},checks:[]});return So(e,r)}function Pj(e,t,r){const a=t._zod.def.checks;if(a&&a.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const u=bo(t._zod.def,{get shape(){const f=t._zod.def.shape,h={...f};if(r)for(const m in r){if(!(m in f))throw new Error(`Unrecognized key: "${m}"`);r[m]&&(h[m]=e?new e({type:"optional",innerType:f[m]}):f[m])}else for(const m in f)h[m]=e?new e({type:"optional",innerType:f[m]}):f[m];return rs(this,"shape",h),h},checks:[]});return So(t,u)}function Uj(e,t,r){const s=bo(t._zod.def,{get shape(){const a=t._zod.def.shape,l={...a};if(r)for(const u in r){if(!(u in l))throw new Error(`Unrecognized key: "${u}"`);r[u]&&(l[u]=new e({type:"nonoptional",innerType:a[u]}))}else for(const u in a)l[u]=new e({type:"nonoptional",innerType:a[u]});return rs(this,"shape",l),l}});return So(t,s)}function ni(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function ri(e,t){return t.map(r=>{var s;return(s=r).path??(s.path=[]),r.path.unshift(e),r})}function kl(e){return typeof e=="string"?e:e?.message}function ho(e,t,r){const s={...e,path:e.path??[]};if(!e.message){const a=kl(e.inst?._zod.def?.error?.(e))??kl(t?.error?.(e))??kl(r.customError?.(e))??kl(r.localeError?.(e))??"Invalid input";s.message=a}return delete s.inst,delete s.continue,t?.reportInput||delete s.input,s}function om(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Va(...e){const[t,r,s]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:s}:{...t}}const a1=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,mp,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},c1=X("$ZodError",a1),l1=X("$ZodError",a1,{Parent:Error});function $j(e,t=r=>r.message){const r={},s=[];for(const a of e.issues)a.path.length>0?(r[a.path[0]]=r[a.path[0]]||[],r[a.path[0]].push(t(a))):s.push(t(a));return{formErrors:s,fieldErrors:r}}function Ij(e,t=r=>r.message){const r={_errors:[]},s=a=>{for(const l of a.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map(u=>s({issues:u}));else if(l.code==="invalid_key")s({issues:l.issues});else if(l.code==="invalid_element")s({issues:l.issues});else if(l.path.length===0)r._errors.push(t(l));else{let u=r,f=0;for(;f<l.path.length;){const h=l.path[f];f===l.path.length-1?(u[h]=u[h]||{_errors:[]},u[h]._errors.push(t(l))):u[h]=u[h]||{_errors:[]},u=u[h],f++}}};return s(e),r}const sm=e=>(t,r,s,a)=>{const l=s?Object.assign(s,{async:!1}):{async:!1},u=t._zod.run({value:r,issues:[]},l);if(u instanceof Promise)throw new ui;if(u.issues.length){const f=new(a?.Err??e)(u.issues.map(h=>ho(h,l,fo())));throw s1(f,a?.callee),f}return u.value},im=e=>async(t,r,s,a)=>{const l=s?Object.assign(s,{async:!0}):{async:!0};let u=t._zod.run({value:r,issues:[]},l);if(u instanceof Promise&&(u=await u),u.issues.length){const f=new(a?.Err??e)(u.issues.map(h=>ho(h,l,fo())));throw s1(f,a?.callee),f}return u.value},Lu=e=>(t,r,s)=>{const a=s?{...s,async:!1}:{async:!1},l=t._zod.run({value:r,issues:[]},a);if(l instanceof Promise)throw new ui;return l.issues.length?{success:!1,error:new(e??c1)(l.issues.map(u=>ho(u,a,fo())))}:{success:!0,data:l.value}},Bj=Lu(l1),Du=e=>async(t,r,s)=>{const a=s?Object.assign(s,{async:!0}):{async:!0};let l=t._zod.run({value:r,issues:[]},a);return l instanceof Promise&&(l=await l),l.issues.length?{success:!1,error:new e(l.issues.map(u=>ho(u,a,fo())))}:{success:!0,data:l.value}},qj=Du(l1),Vj=e=>(t,r,s)=>{const a=s?Object.assign(s,{direction:"backward"}):{direction:"backward"};return sm(e)(t,r,a)},Fj=e=>(t,r,s)=>sm(e)(t,r,s),Hj=e=>async(t,r,s)=>{const a=s?Object.assign(s,{direction:"backward"}):{direction:"backward"};return im(e)(t,r,a)},Zj=e=>async(t,r,s)=>im(e)(t,r,s),Qj=e=>(t,r,s)=>{const a=s?Object.assign(s,{direction:"backward"}):{direction:"backward"};return Lu(e)(t,r,a)},Gj=e=>(t,r,s)=>Lu(e)(t,r,s),Yj=e=>async(t,r,s)=>{const a=s?Object.assign(s,{direction:"backward"}):{direction:"backward"};return Du(e)(t,r,a)},Kj=e=>async(t,r,s)=>Du(e)(t,r,s),Xj=/^[cC][^\s-]{8,}$/,Jj=/^[0-9a-z]+$/,Wj=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,eL=/^[0-9a-vA-V]{20}$/,tL=/^[A-Za-z0-9]{27}$/,nL=/^[a-zA-Z0-9_-]{21}$/,rL=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,oL=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Z0=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,sL=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,iL="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function aL(){return new RegExp(iL,"u")}const cL=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,lL=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,uL=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,fL=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,dL=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,u1=/^[A-Za-z0-9_-]*$/,hL=/^\+[1-9]\d{6,14}$/,f1="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",pL=new RegExp(`^${f1}$`);function d1(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function mL(e){return new RegExp(`^${d1(e)}$`)}function gL(e){const t=d1({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const s=`${t}(?:${r.join("|")})`;return new RegExp(`^${f1}T(?:${s})$`)}const yL=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},vL=/^-?\d+$/,h1=/^-?\d+(?:\.\d+)?$/,bL=/^(?:true|false)$/i,SL=/^[^A-Z]*$/,wL=/^[^a-z]*$/,Xt=X("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),p1={number:"number",bigint:"bigint",object:"date"},m1=X("$ZodCheckLessThan",(e,t)=>{Xt.init(e,t);const r=p1[typeof t.value];e._zod.onattach.push(s=>{const a=s._zod.bag,l=(t.inclusive?a.maximum:a.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<l&&(t.inclusive?a.maximum=t.value:a.exclusiveMaximum=t.value)}),e._zod.check=s=>{(t.inclusive?s.value<=t.value:s.value<t.value)||s.issues.push({origin:r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:s.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),g1=X("$ZodCheckGreaterThan",(e,t)=>{Xt.init(e,t);const r=p1[typeof t.value];e._zod.onattach.push(s=>{const a=s._zod.bag,l=(t.inclusive?a.minimum:a.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>l&&(t.inclusive?a.minimum=t.value:a.exclusiveMinimum=t.value)}),e._zod.check=s=>{(t.inclusive?s.value>=t.value:s.value>t.value)||s.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:s.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),_L=X("$ZodCheckMultipleOf",(e,t)=>{Xt.init(e,t),e._zod.onattach.push(r=>{var s;(s=r._zod.bag).multipleOf??(s.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):Cj(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),xL=X("$ZodCheckNumberFormat",(e,t)=>{Xt.init(e,t),t.format=t.format||"float64";const r=t.format?.includes("int"),s=r?"int":"number",[a,l]=kj[t.format];e._zod.onattach.push(u=>{const f=u._zod.bag;f.format=t.format,f.minimum=a,f.maximum=l,r&&(f.pattern=vL)}),e._zod.check=u=>{const f=u.value;if(r){if(!Number.isInteger(f)){u.issues.push({expected:s,format:t.format,code:"invalid_type",continue:!1,input:f,inst:e});return}if(!Number.isSafeInteger(f)){f>0?u.issues.push({input:f,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:s,inclusive:!0,continue:!t.abort}):u.issues.push({input:f,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:s,inclusive:!0,continue:!t.abort});return}}f<a&&u.issues.push({origin:"number",input:f,code:"too_small",minimum:a,inclusive:!0,inst:e,continue:!t.abort}),f>l&&u.issues.push({origin:"number",input:f,code:"too_big",maximum:l,inclusive:!0,inst:e,continue:!t.abort})}}),EL=X("$ZodCheckMaxLength",(e,t)=>{var r;Xt.init(e,t),(r=e._zod.def).when??(r.when=s=>{const a=s.value;return!nm(a)&&a.length!==void 0}),e._zod.onattach.push(s=>{const a=s._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<a&&(s._zod.bag.maximum=t.maximum)}),e._zod.check=s=>{const a=s.value;if(a.length<=t.maximum)return;const u=om(a);s.issues.push({origin:u,code:"too_big",maximum:t.maximum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),RL=X("$ZodCheckMinLength",(e,t)=>{var r;Xt.init(e,t),(r=e._zod.def).when??(r.when=s=>{const a=s.value;return!nm(a)&&a.length!==void 0}),e._zod.onattach.push(s=>{const a=s._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>a&&(s._zod.bag.minimum=t.minimum)}),e._zod.check=s=>{const a=s.value;if(a.length>=t.minimum)return;const u=om(a);s.issues.push({origin:u,code:"too_small",minimum:t.minimum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),CL=X("$ZodCheckLengthEquals",(e,t)=>{var r;Xt.init(e,t),(r=e._zod.def).when??(r.when=s=>{const a=s.value;return!nm(a)&&a.length!==void 0}),e._zod.onattach.push(s=>{const a=s._zod.bag;a.minimum=t.length,a.maximum=t.length,a.length=t.length}),e._zod.check=s=>{const a=s.value,l=a.length;if(l===t.length)return;const u=om(a),f=l>t.length;s.issues.push({origin:u,...f?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:s.value,inst:e,continue:!t.abort})}}),Pu=X("$ZodCheckStringFormat",(e,t)=>{var r,s;Xt.init(e,t),e._zod.onattach.push(a=>{const l=a._zod.bag;l.format=t.format,t.pattern&&(l.patterns??(l.patterns=new Set),l.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=a=>{t.pattern.lastIndex=0,!t.pattern.test(a.value)&&a.issues.push({origin:"string",code:"invalid_format",format:t.format,input:a.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(s=e._zod).check??(s.check=()=>{})}),TL=X("$ZodCheckRegex",(e,t)=>{Pu.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),AL=X("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=SL),Pu.init(e,t)}),OL=X("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=wL),Pu.init(e,t)}),ML=X("$ZodCheckIncludes",(e,t)=>{Xt.init(e,t);const r=ju(t.includes),s=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=s,e._zod.onattach.push(a=>{const l=a._zod.bag;l.patterns??(l.patterns=new Set),l.patterns.add(s)}),e._zod.check=a=>{a.value.includes(t.includes,t.position)||a.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:a.value,inst:e,continue:!t.abort})}}),kL=X("$ZodCheckStartsWith",(e,t)=>{Xt.init(e,t);const r=new RegExp(`^${ju(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(s=>{const a=s._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(r)}),e._zod.check=s=>{s.value.startsWith(t.prefix)||s.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:s.value,inst:e,continue:!t.abort})}}),NL=X("$ZodCheckEndsWith",(e,t)=>{Xt.init(e,t);const r=new RegExp(`.*${ju(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(s=>{const a=s._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(r)}),e._zod.check=s=>{s.value.endsWith(t.suffix)||s.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:s.value,inst:e,continue:!t.abort})}}),zL=X("$ZodCheckOverwrite",(e,t)=>{Xt.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});class jL{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const s=t.split(`
|
|
20
|
-
`).filter(u=>u),a=Math.min(...s.map(u=>u.length-u.trimStart().length)),l=s.map(u=>u.slice(a)).map(u=>" ".repeat(this.indent*2)+u);for(const u of l)this.content.push(u)}compile(){const t=Function,r=this?.args,a=[...(this?.content??[""]).map(l=>` ${l}`)];return new t(...r,a.join(`
|
|
21
|
-
`))}}const LL={major:4,minor:3,patch:6},nt=X("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=LL;const s=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&s.unshift(e);for(const a of s)for(const l of a._zod.onattach)l(e);if(s.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const a=(u,f,h)=>{let m=ni(u),y;for(const g of f){if(g._zod.def.when){if(!g._zod.def.when(u))continue}else if(m)continue;const b=u.issues.length,S=g._zod.check(u);if(S instanceof Promise&&h?.async===!1)throw new ui;if(y||S instanceof Promise)y=(y??Promise.resolve()).then(async()=>{await S,u.issues.length!==b&&(m||(m=ni(u,b)))});else{if(u.issues.length===b)continue;m||(m=ni(u,b))}}return y?y.then(()=>u):u},l=(u,f,h)=>{if(ni(u))return u.aborted=!0,u;const m=a(f,s,h);if(m instanceof Promise){if(h.async===!1)throw new ui;return m.then(y=>e._zod.parse(y,h))}return e._zod.parse(m,h)};e._zod.run=(u,f)=>{if(f.skipChecks)return e._zod.parse(u,f);if(f.direction==="backward"){const m=e._zod.parse({value:u.value,issues:[]},{...f,skipChecks:!0});return m instanceof Promise?m.then(y=>l(y,u,f)):l(m,u,f)}const h=e._zod.parse(u,f);if(h instanceof Promise){if(f.async===!1)throw new ui;return h.then(m=>a(m,s,f))}return a(h,s,f)}}Ie(e,"~standard",()=>({validate:a=>{try{const l=Bj(e,a);return l.success?{value:l.data}:{issues:l.error?.issues}}catch{return qj(e,a).then(u=>u.success?{value:u.data}:{issues:u.error?.issues})}},vendor:"zod",version:1}))}),am=X("$ZodString",(e,t)=>{nt.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??yL(e._zod.bag),e._zod.parse=(r,s)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),Xe=X("$ZodStringFormat",(e,t)=>{Pu.init(e,t),am.init(e,t)}),DL=X("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=oL),Xe.init(e,t)}),PL=X("$ZodUUID",(e,t)=>{if(t.version){const s={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(s===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Z0(s))}else t.pattern??(t.pattern=Z0());Xe.init(e,t)}),UL=X("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=sL),Xe.init(e,t)}),$L=X("$ZodURL",(e,t)=>{Xe.init(e,t),e._zod.check=r=>{try{const s=r.value.trim(),a=new URL(s);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(a.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(a.protocol.endsWith(":")?a.protocol.slice(0,-1):a.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=a.href:r.value=s;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),IL=X("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=aL()),Xe.init(e,t)}),BL=X("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=nL),Xe.init(e,t)}),qL=X("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Xj),Xe.init(e,t)}),VL=X("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Jj),Xe.init(e,t)}),FL=X("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Wj),Xe.init(e,t)}),HL=X("$ZodXID",(e,t)=>{t.pattern??(t.pattern=eL),Xe.init(e,t)}),ZL=X("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=tL),Xe.init(e,t)}),QL=X("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=gL(t)),Xe.init(e,t)}),GL=X("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=pL),Xe.init(e,t)}),YL=X("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=mL(t)),Xe.init(e,t)}),KL=X("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=rL),Xe.init(e,t)}),XL=X("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=cL),Xe.init(e,t),e._zod.bag.format="ipv4"}),JL=X("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=lL),Xe.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),WL=X("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=uL),Xe.init(e,t)}),eD=X("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=fL),Xe.init(e,t),e._zod.check=r=>{const s=r.value.split("/");try{if(s.length!==2)throw new Error;const[a,l]=s;if(!l)throw new Error;const u=Number(l);if(`${u}`!==l)throw new Error;if(u<0||u>128)throw new Error;new URL(`http://[${a}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function y1(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const tD=X("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=dL),Xe.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{y1(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function nD(e){if(!u1.test(e))return!1;const t=e.replace(/[-_]/g,s=>s==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return y1(r)}const rD=X("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=u1),Xe.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{nD(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),oD=X("$ZodE164",(e,t)=>{t.pattern??(t.pattern=hL),Xe.init(e,t)});function sD(e,t=null){try{const r=e.split(".");if(r.length!==3)return!1;const[s]=r;if(!s)return!1;const a=JSON.parse(atob(s));return!("typ"in a&&a?.typ!=="JWT"||!a.alg||t&&(!("alg"in a)||a.alg!==t))}catch{return!1}}const iD=X("$ZodJWT",(e,t)=>{Xe.init(e,t),e._zod.check=r=>{sD(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),v1=X("$ZodNumber",(e,t)=>{nt.init(e,t),e._zod.pattern=e._zod.bag.pattern??h1,e._zod.parse=(r,s)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}const a=r.value;if(typeof a=="number"&&!Number.isNaN(a)&&Number.isFinite(a))return r;const l=typeof a=="number"?Number.isNaN(a)?"NaN":Number.isFinite(a)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:a,inst:e,...l?{received:l}:{}}),r}}),aD=X("$ZodNumberFormat",(e,t)=>{xL.init(e,t),v1.init(e,t)}),cD=X("$ZodBoolean",(e,t)=>{nt.init(e,t),e._zod.pattern=bL,e._zod.parse=(r,s)=>{if(t.coerce)try{r.value=!!r.value}catch{}const a=r.value;return typeof a=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:a,inst:e}),r}}),lD=X("$ZodUnknown",(e,t)=>{nt.init(e,t),e._zod.parse=r=>r}),uD=X("$ZodNever",(e,t)=>{nt.init(e,t),e._zod.parse=(r,s)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)});function Q0(e,t,r){e.issues.length&&t.issues.push(...ri(r,e.issues)),t.value[r]=e.value}const fD=X("$ZodArray",(e,t)=>{nt.init(e,t),e._zod.parse=(r,s)=>{const a=r.value;if(!Array.isArray(a))return r.issues.push({expected:"array",code:"invalid_type",input:a,inst:e}),r;r.value=Array(a.length);const l=[];for(let u=0;u<a.length;u++){const f=a[u],h=t.element._zod.run({value:f,issues:[]},s);h instanceof Promise?l.push(h.then(m=>Q0(m,r,u))):Q0(h,r,u)}return l.length?Promise.all(l).then(()=>r):r}});function du(e,t,r,s,a){if(e.issues.length){if(a&&!(r in s))return;t.issues.push(...ri(r,e.issues))}e.value===void 0?r in s&&(t.value[r]=void 0):t.value[r]=e.value}function b1(e){const t=Object.keys(e.shape);for(const s of t)if(!e.shape?.[s]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${s}": expected a Zod schema`);const r=Mj(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function S1(e,t,r,s,a,l){const u=[],f=a.keySet,h=a.catchall._zod,m=h.def.type,y=h.optout==="optional";for(const g in t){if(f.has(g))continue;if(m==="never"){u.push(g);continue}const b=h.run({value:t[g],issues:[]},s);b instanceof Promise?e.push(b.then(S=>du(S,r,g,t,y))):du(b,r,g,t,y)}return u.length&&r.issues.push({code:"unrecognized_keys",keys:u,input:t,inst:l}),e.length?Promise.all(e).then(()=>r):r}const dD=X("$ZodObject",(e,t)=>{if(nt.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const f=t.shape;Object.defineProperty(t,"shape",{get:()=>{const h={...f};return Object.defineProperty(t,"shape",{value:h}),h}})}const s=tm(()=>b1(t));Ie(e._zod,"propValues",()=>{const f=t.shape,h={};for(const m in f){const y=f[m]._zod;if(y.values){h[m]??(h[m]=new Set);for(const g of y.values)h[m].add(g)}}return h});const a=fu,l=t.catchall;let u;e._zod.parse=(f,h)=>{u??(u=s.value);const m=f.value;if(!a(m))return f.issues.push({expected:"object",code:"invalid_type",input:m,inst:e}),f;f.value={};const y=[],g=u.shape;for(const b of u.keys){const S=g[b],E=S._zod.optout==="optional",x=S._zod.run({value:m[b],issues:[]},h);x instanceof Promise?y.push(x.then(C=>du(C,f,b,m,E))):du(x,f,b,m,E)}return l?S1(y,m,f,h,s.value,e):y.length?Promise.all(y).then(()=>f):f}}),hD=X("$ZodObjectJIT",(e,t)=>{dD.init(e,t);const r=e._zod.parse,s=tm(()=>b1(t)),a=b=>{const S=new jL(["shape","payload","ctx"]),E=s.value,x=k=>{const j=H0(k);return`shape[${j}]._zod.run({ value: input[${j}], issues: [] }, ctx)`};S.write("const input = payload.value;");const C=Object.create(null);let O=0;for(const k of E.keys)C[k]=`key_${O++}`;S.write("const newResult = {};");for(const k of E.keys){const j=C[k],I=H0(k),$=b[k]?._zod?.optout==="optional";S.write(`const ${j} = ${x(k)};`),$?S.write(`
|
|
22
|
-
if (${j}.issues.length) {
|
|
23
|
-
if (${I} in input) {
|
|
24
|
-
payload.issues = payload.issues.concat(${j}.issues.map(iss => ({
|
|
25
|
-
...iss,
|
|
26
|
-
path: iss.path ? [${I}, ...iss.path] : [${I}]
|
|
27
|
-
})));
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
if (${j}.value === undefined) {
|
|
32
|
-
if (${I} in input) {
|
|
33
|
-
newResult[${I}] = undefined;
|
|
34
|
-
}
|
|
35
|
-
} else {
|
|
36
|
-
newResult[${I}] = ${j}.value;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
`):S.write(`
|
|
40
|
-
if (${j}.issues.length) {
|
|
41
|
-
payload.issues = payload.issues.concat(${j}.issues.map(iss => ({
|
|
42
|
-
...iss,
|
|
43
|
-
path: iss.path ? [${I}, ...iss.path] : [${I}]
|
|
44
|
-
})));
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
if (${j}.value === undefined) {
|
|
48
|
-
if (${I} in input) {
|
|
49
|
-
newResult[${I}] = undefined;
|
|
50
|
-
}
|
|
51
|
-
} else {
|
|
52
|
-
newResult[${I}] = ${j}.value;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
`)}S.write("payload.value = newResult;"),S.write("return payload;");const L=S.compile();return(k,j)=>L(b,k,j)};let l;const u=fu,f=!r1.jitless,m=f&&Aj.value,y=t.catchall;let g;e._zod.parse=(b,S)=>{g??(g=s.value);const E=b.value;return u(E)?f&&m&&S?.async===!1&&S.jitless!==!0?(l||(l=a(t.shape)),b=l(b,S),y?S1([],E,b,S,g,e):b):r(b,S):(b.issues.push({expected:"object",code:"invalid_type",input:E,inst:e}),b)}});function G0(e,t,r,s){for(const l of e)if(l.issues.length===0)return t.value=l.value,t;const a=e.filter(l=>!ni(l));return a.length===1?(t.value=a[0].value,a[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(l=>l.issues.map(u=>ho(u,s,fo())))}),t)}const pD=X("$ZodUnion",(e,t)=>{nt.init(e,t),Ie(e._zod,"optin",()=>t.options.some(a=>a._zod.optin==="optional")?"optional":void 0),Ie(e._zod,"optout",()=>t.options.some(a=>a._zod.optout==="optional")?"optional":void 0),Ie(e._zod,"values",()=>{if(t.options.every(a=>a._zod.values))return new Set(t.options.flatMap(a=>Array.from(a._zod.values)))}),Ie(e._zod,"pattern",()=>{if(t.options.every(a=>a._zod.pattern)){const a=t.options.map(l=>l._zod.pattern);return new RegExp(`^(${a.map(l=>rm(l.source)).join("|")})$`)}});const r=t.options.length===1,s=t.options[0]._zod.run;e._zod.parse=(a,l)=>{if(r)return s(a,l);let u=!1;const f=[];for(const h of t.options){const m=h._zod.run({value:a.value,issues:[]},l);if(m instanceof Promise)f.push(m),u=!0;else{if(m.issues.length===0)return m;f.push(m)}}return u?Promise.all(f).then(h=>G0(h,a,e,l)):G0(f,a,e,l)}}),mD=X("$ZodIntersection",(e,t)=>{nt.init(e,t),e._zod.parse=(r,s)=>{const a=r.value,l=t.left._zod.run({value:a,issues:[]},s),u=t.right._zod.run({value:a,issues:[]},s);return l instanceof Promise||u instanceof Promise?Promise.all([l,u]).then(([h,m])=>Y0(r,h,m)):Y0(r,l,u)}});function gp(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(gi(e)&&gi(t)){const r=Object.keys(t),s=Object.keys(e).filter(l=>r.indexOf(l)!==-1),a={...e,...t};for(const l of s){const u=gp(e[l],t[l]);if(!u.valid)return{valid:!1,mergeErrorPath:[l,...u.mergeErrorPath]};a[l]=u.data}return{valid:!0,data:a}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let s=0;s<e.length;s++){const a=e[s],l=t[s],u=gp(a,l);if(!u.valid)return{valid:!1,mergeErrorPath:[s,...u.mergeErrorPath]};r.push(u.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function Y0(e,t,r){const s=new Map;let a;for(const f of t.issues)if(f.code==="unrecognized_keys"){a??(a=f);for(const h of f.keys)s.has(h)||s.set(h,{}),s.get(h).l=!0}else e.issues.push(f);for(const f of r.issues)if(f.code==="unrecognized_keys")for(const h of f.keys)s.has(h)||s.set(h,{}),s.get(h).r=!0;else e.issues.push(f);const l=[...s].filter(([,f])=>f.l&&f.r).map(([f])=>f);if(l.length&&a&&e.issues.push({...a,keys:l}),ni(e))return e;const u=gp(t.value,r.value);if(!u.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(u.mergeErrorPath)}`);return e.value=u.data,e}const gD=X("$ZodRecord",(e,t)=>{nt.init(e,t),e._zod.parse=(r,s)=>{const a=r.value;if(!gi(a))return r.issues.push({expected:"record",code:"invalid_type",input:a,inst:e}),r;const l=[],u=t.keyType._zod.values;if(u){r.value={};const f=new Set;for(const m of u)if(typeof m=="string"||typeof m=="number"||typeof m=="symbol"){f.add(typeof m=="number"?m.toString():m);const y=t.valueType._zod.run({value:a[m],issues:[]},s);y instanceof Promise?l.push(y.then(g=>{g.issues.length&&r.issues.push(...ri(m,g.issues)),r.value[m]=g.value})):(y.issues.length&&r.issues.push(...ri(m,y.issues)),r.value[m]=y.value)}let h;for(const m in a)f.has(m)||(h=h??[],h.push(m));h&&h.length>0&&r.issues.push({code:"unrecognized_keys",input:a,inst:e,keys:h})}else{r.value={};for(const f of Reflect.ownKeys(a)){if(f==="__proto__")continue;let h=t.keyType._zod.run({value:f,issues:[]},s);if(h instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof f=="string"&&h1.test(f)&&h.issues.length){const g=t.keyType._zod.run({value:Number(f),issues:[]},s);if(g instanceof Promise)throw new Error("Async schemas not supported in object keys currently");g.issues.length===0&&(h=g)}if(h.issues.length){t.mode==="loose"?r.value[f]=a[f]:r.issues.push({code:"invalid_key",origin:"record",issues:h.issues.map(g=>ho(g,s,fo())),input:f,path:[f],inst:e});continue}const y=t.valueType._zod.run({value:a[f],issues:[]},s);y instanceof Promise?l.push(y.then(g=>{g.issues.length&&r.issues.push(...ri(f,g.issues)),r.value[h.value]=g.value})):(y.issues.length&&r.issues.push(...ri(f,y.issues)),r.value[h.value]=y.value)}}return l.length?Promise.all(l).then(()=>r):r}}),yD=X("$ZodEnum",(e,t)=>{nt.init(e,t);const r=o1(t.entries),s=new Set(r);e._zod.values=s,e._zod.pattern=new RegExp(`^(${r.filter(a=>Oj.has(typeof a)).map(a=>typeof a=="string"?ju(a):a.toString()).join("|")})$`),e._zod.parse=(a,l)=>{const u=a.value;return s.has(u)||a.issues.push({code:"invalid_value",values:r,input:u,inst:e}),a}}),vD=X("$ZodTransform",(e,t)=>{nt.init(e,t),e._zod.parse=(r,s)=>{if(s.direction==="backward")throw new n1(e.constructor.name);const a=t.transform(r.value,r);if(s.async)return(a instanceof Promise?a:Promise.resolve(a)).then(u=>(r.value=u,r));if(a instanceof Promise)throw new ui;return r.value=a,r}});function K0(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const w1=X("$ZodOptional",(e,t)=>{nt.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Ie(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Ie(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${rm(r.source)})?$`):void 0}),e._zod.parse=(r,s)=>{if(t.innerType._zod.optin==="optional"){const a=t.innerType._zod.run(r,s);return a instanceof Promise?a.then(l=>K0(l,r.value)):K0(a,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,s)}}),bD=X("$ZodExactOptional",(e,t)=>{w1.init(e,t),Ie(e._zod,"values",()=>t.innerType._zod.values),Ie(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,s)=>t.innerType._zod.run(r,s)}),SD=X("$ZodNullable",(e,t)=>{nt.init(e,t),Ie(e._zod,"optin",()=>t.innerType._zod.optin),Ie(e._zod,"optout",()=>t.innerType._zod.optout),Ie(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${rm(r.source)}|null)$`):void 0}),Ie(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,s)=>r.value===null?r:t.innerType._zod.run(r,s)}),wD=X("$ZodDefault",(e,t)=>{nt.init(e,t),e._zod.optin="optional",Ie(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,s)=>{if(s.direction==="backward")return t.innerType._zod.run(r,s);if(r.value===void 0)return r.value=t.defaultValue,r;const a=t.innerType._zod.run(r,s);return a instanceof Promise?a.then(l=>X0(l,t)):X0(a,t)}});function X0(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const _D=X("$ZodPrefault",(e,t)=>{nt.init(e,t),e._zod.optin="optional",Ie(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,s)=>(s.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,s))}),xD=X("$ZodNonOptional",(e,t)=>{nt.init(e,t),Ie(e._zod,"values",()=>{const r=t.innerType._zod.values;return r?new Set([...r].filter(s=>s!==void 0)):void 0}),e._zod.parse=(r,s)=>{const a=t.innerType._zod.run(r,s);return a instanceof Promise?a.then(l=>J0(l,e)):J0(a,e)}});function J0(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const ED=X("$ZodCatch",(e,t)=>{nt.init(e,t),Ie(e._zod,"optin",()=>t.innerType._zod.optin),Ie(e._zod,"optout",()=>t.innerType._zod.optout),Ie(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,s)=>{if(s.direction==="backward")return t.innerType._zod.run(r,s);const a=t.innerType._zod.run(r,s);return a instanceof Promise?a.then(l=>(r.value=l.value,l.issues.length&&(r.value=t.catchValue({...r,error:{issues:l.issues.map(u=>ho(u,s,fo()))},input:r.value}),r.issues=[]),r)):(r.value=a.value,a.issues.length&&(r.value=t.catchValue({...r,error:{issues:a.issues.map(l=>ho(l,s,fo()))},input:r.value}),r.issues=[]),r)}}),RD=X("$ZodPipe",(e,t)=>{nt.init(e,t),Ie(e._zod,"values",()=>t.in._zod.values),Ie(e._zod,"optin",()=>t.in._zod.optin),Ie(e._zod,"optout",()=>t.out._zod.optout),Ie(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,s)=>{if(s.direction==="backward"){const l=t.out._zod.run(r,s);return l instanceof Promise?l.then(u=>Nl(u,t.in,s)):Nl(l,t.in,s)}const a=t.in._zod.run(r,s);return a instanceof Promise?a.then(l=>Nl(l,t.out,s)):Nl(a,t.out,s)}});function Nl(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}const CD=X("$ZodReadonly",(e,t)=>{nt.init(e,t),Ie(e._zod,"propValues",()=>t.innerType._zod.propValues),Ie(e._zod,"values",()=>t.innerType._zod.values),Ie(e._zod,"optin",()=>t.innerType?._zod?.optin),Ie(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,s)=>{if(s.direction==="backward")return t.innerType._zod.run(r,s);const a=t.innerType._zod.run(r,s);return a instanceof Promise?a.then(W0):W0(a)}});function W0(e){return e.value=Object.freeze(e.value),e}const TD=X("$ZodCustom",(e,t)=>{Xt.init(e,t),nt.init(e,t),e._zod.parse=(r,s)=>r,e._zod.check=r=>{const s=r.value,a=t.fn(s);if(a instanceof Promise)return a.then(l=>eS(l,r,s,e));eS(a,r,s,e)}});function eS(e,t,r,s){if(!e){const a={code:"custom",input:r,inst:s,path:[...s._zod.def.path??[]],continue:!s._zod.def.abort};s._zod.def.params&&(a.params=s._zod.def.params),t.issues.push(Va(a))}}var tS;class AD{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){const s=r[0];return this._map.set(t,s),s&&typeof s=="object"&&"id"in s&&this._idmap.set(s.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){const r=t._zod.parent;if(r){const s={...this.get(r)??{}};delete s.id;const a={...s,...this._map.get(t)};return Object.keys(a).length?a:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function OD(){return new AD}(tS=globalThis).__zod_globalRegistry??(tS.__zod_globalRegistry=OD());const Oa=globalThis.__zod_globalRegistry;function MD(e,t){return new e({type:"string",...me(t)})}function kD(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...me(t)})}function nS(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...me(t)})}function ND(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...me(t)})}function zD(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...me(t)})}function jD(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...me(t)})}function LD(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...me(t)})}function DD(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...me(t)})}function PD(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...me(t)})}function UD(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...me(t)})}function $D(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...me(t)})}function ID(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...me(t)})}function BD(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...me(t)})}function qD(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...me(t)})}function VD(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...me(t)})}function FD(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...me(t)})}function HD(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...me(t)})}function ZD(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...me(t)})}function QD(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...me(t)})}function GD(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...me(t)})}function YD(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...me(t)})}function KD(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...me(t)})}function XD(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...me(t)})}function JD(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...me(t)})}function WD(e,t){return new e({type:"string",format:"date",check:"string_format",...me(t)})}function e4(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...me(t)})}function t4(e,t){return new e({type:"string",format:"duration",check:"string_format",...me(t)})}function n4(e,t){return new e({type:"number",checks:[],...me(t)})}function r4(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...me(t)})}function o4(e,t){return new e({type:"boolean",...me(t)})}function s4(e){return new e({type:"unknown"})}function i4(e,t){return new e({type:"never",...me(t)})}function rS(e,t){return new m1({check:"less_than",...me(t),value:e,inclusive:!1})}function qh(e,t){return new m1({check:"less_than",...me(t),value:e,inclusive:!0})}function oS(e,t){return new g1({check:"greater_than",...me(t),value:e,inclusive:!1})}function Vh(e,t){return new g1({check:"greater_than",...me(t),value:e,inclusive:!0})}function sS(e,t){return new _L({check:"multiple_of",...me(t),value:e})}function _1(e,t){return new EL({check:"max_length",...me(t),maximum:e})}function hu(e,t){return new RL({check:"min_length",...me(t),minimum:e})}function x1(e,t){return new CL({check:"length_equals",...me(t),length:e})}function a4(e,t){return new TL({check:"string_format",format:"regex",...me(t),pattern:e})}function c4(e){return new AL({check:"string_format",format:"lowercase",...me(e)})}function l4(e){return new OL({check:"string_format",format:"uppercase",...me(e)})}function u4(e,t){return new ML({check:"string_format",format:"includes",...me(t),includes:e})}function f4(e,t){return new kL({check:"string_format",format:"starts_with",...me(t),prefix:e})}function d4(e,t){return new NL({check:"string_format",format:"ends_with",...me(t),suffix:e})}function wi(e){return new zL({check:"overwrite",tx:e})}function h4(e){return wi(t=>t.normalize(e))}function p4(){return wi(e=>e.trim())}function m4(){return wi(e=>e.toLowerCase())}function g4(){return wi(e=>e.toUpperCase())}function y4(){return wi(e=>Tj(e))}function v4(e,t,r){return new e({type:"array",element:t,...me(r)})}function b4(e,t,r){return new e({type:"custom",check:"custom",fn:t,...me(r)})}function S4(e){const t=w4(r=>(r.addIssue=s=>{if(typeof s=="string")r.issues.push(Va(s,r.value,t._zod.def));else{const a=s;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=r.value),a.inst??(a.inst=t),a.continue??(a.continue=!t._zod.def.abort),r.issues.push(Va(a))}},e(r.value,r)));return t}function w4(e,t){const r=new Xt({check:"custom",...me(t)});return r._zod.check=e,r}function E1(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??Oa,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function dt(e,t,r={path:[],schemaPath:[]}){var s;const a=e._zod.def,l=t.seen.get(e);if(l)return l.count++,r.schemaPath.includes(e)&&(l.cycle=r.path),l.schema;const u={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,u);const f=e._zod.toJSONSchema?.();if(f)u.schema=f;else{const y={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,u.schema,y);else{const b=u.schema,S=t.processors[a.type];if(!S)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${a.type}`);S(e,t,b,y)}const g=e._zod.parent;g&&(u.ref||(u.ref=g),dt(g,t,y),t.seen.get(g).isParent=!0)}const h=t.metadataRegistry.get(e);return h&&Object.assign(u.schema,h),t.io==="input"&&jt(e)&&(delete u.schema.examples,delete u.schema.default),t.io==="input"&&u.schema._prefault&&((s=u.schema).default??(s.default=u.schema._prefault)),delete u.schema._prefault,t.seen.get(e).schema}function R1(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const s=new Map;for(const u of e.seen.entries()){const f=e.metadataRegistry.get(u[0])?.id;if(f){const h=s.get(f);if(h&&h!==u[0])throw new Error(`Duplicate schema id "${f}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);s.set(f,u[0])}}const a=u=>{const f=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const g=e.external.registry.get(u[0])?.id,b=e.external.uri??(E=>E);if(g)return{ref:b(g)};const S=u[1].defId??u[1].schema.id??`schema${e.counter++}`;return u[1].defId=S,{defId:S,ref:`${b("__shared")}#/${f}/${S}`}}if(u[1]===r)return{ref:"#"};const m=`#/${f}/`,y=u[1].schema.id??`__schema${e.counter++}`;return{defId:y,ref:m+y}},l=u=>{if(u[1].schema.$ref)return;const f=u[1],{ref:h,defId:m}=a(u);f.def={...f.schema},m&&(f.defId=m);const y=f.schema;for(const g in y)delete y[g];y.$ref=h};if(e.cycles==="throw")for(const u of e.seen.entries()){const f=u[1];if(f.cycle)throw new Error(`Cycle detected: #/${f.cycle?.join("/")}/<root>
|
|
56
|
-
|
|
57
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const u of e.seen.entries()){const f=u[1];if(t===u[0]){l(u);continue}if(e.external){const m=e.external.registry.get(u[0])?.id;if(t!==u[0]&&m){l(u);continue}}if(e.metadataRegistry.get(u[0])?.id){l(u);continue}if(f.cycle){l(u);continue}if(f.count>1&&e.reused==="ref"){l(u);continue}}}function C1(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const s=u=>{const f=e.seen.get(u);if(f.ref===null)return;const h=f.def??f.schema,m={...h},y=f.ref;if(f.ref=null,y){s(y);const b=e.seen.get(y),S=b.schema;if(S.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(h.allOf=h.allOf??[],h.allOf.push(S)):Object.assign(h,S),Object.assign(h,m),u._zod.parent===y)for(const x in h)x==="$ref"||x==="allOf"||x in m||delete h[x];if(S.$ref&&b.def)for(const x in h)x==="$ref"||x==="allOf"||x in b.def&&JSON.stringify(h[x])===JSON.stringify(b.def[x])&&delete h[x]}const g=u._zod.parent;if(g&&g!==y){s(g);const b=e.seen.get(g);if(b?.schema.$ref&&(h.$ref=b.schema.$ref,b.def))for(const S in h)S==="$ref"||S==="allOf"||S in b.def&&JSON.stringify(h[S])===JSON.stringify(b.def[S])&&delete h[S]}e.override({zodSchema:u,jsonSchema:h,path:f.path??[]})};for(const u of[...e.seen.entries()].reverse())s(u[0]);const a={};if(e.target==="draft-2020-12"?a.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?a.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?a.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const u=e.external.registry.get(t)?.id;if(!u)throw new Error("Schema is missing an `id` property");a.$id=e.external.uri(u)}Object.assign(a,r.def??r.schema);const l=e.external?.defs??{};for(const u of e.seen.entries()){const f=u[1];f.def&&f.defId&&(l[f.defId]=f.def)}e.external||Object.keys(l).length>0&&(e.target==="draft-2020-12"?a.$defs=l:a.definitions=l);try{const u=JSON.parse(JSON.stringify(a));return Object.defineProperty(u,"~standard",{value:{...t["~standard"],jsonSchema:{input:pu(t,"input",e.processors),output:pu(t,"output",e.processors)}},enumerable:!1,writable:!1}),u}catch{throw new Error("Error converting schema to JSON.")}}function jt(e,t){const r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);const s=e._zod.def;if(s.type==="transform")return!0;if(s.type==="array")return jt(s.element,r);if(s.type==="set")return jt(s.valueType,r);if(s.type==="lazy")return jt(s.getter(),r);if(s.type==="promise"||s.type==="optional"||s.type==="nonoptional"||s.type==="nullable"||s.type==="readonly"||s.type==="default"||s.type==="prefault")return jt(s.innerType,r);if(s.type==="intersection")return jt(s.left,r)||jt(s.right,r);if(s.type==="record"||s.type==="map")return jt(s.keyType,r)||jt(s.valueType,r);if(s.type==="pipe")return jt(s.in,r)||jt(s.out,r);if(s.type==="object"){for(const a in s.shape)if(jt(s.shape[a],r))return!0;return!1}if(s.type==="union"){for(const a of s.options)if(jt(a,r))return!0;return!1}if(s.type==="tuple"){for(const a of s.items)if(jt(a,r))return!0;return!!(s.rest&&jt(s.rest,r))}return!1}const _4=(e,t={})=>r=>{const s=E1({...r,processors:t});return dt(e,s),R1(s,e),C1(s,e)},pu=(e,t,r={})=>s=>{const{libraryOptions:a,target:l}=s??{},u=E1({...a??{},target:l,io:t,processors:r});return dt(e,u),R1(u,e),C1(u,e)},x4={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},E4=(e,t,r,s)=>{const a=r;a.type="string";const{minimum:l,maximum:u,format:f,patterns:h,contentEncoding:m}=e._zod.bag;if(typeof l=="number"&&(a.minLength=l),typeof u=="number"&&(a.maxLength=u),f&&(a.format=x4[f]??f,a.format===""&&delete a.format,f==="time"&&delete a.format),m&&(a.contentEncoding=m),h&&h.size>0){const y=[...h];y.length===1?a.pattern=y[0].source:y.length>1&&(a.allOf=[...y.map(g=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:g.source}))])}},R4=(e,t,r,s)=>{const a=r,{minimum:l,maximum:u,format:f,multipleOf:h,exclusiveMaximum:m,exclusiveMinimum:y}=e._zod.bag;typeof f=="string"&&f.includes("int")?a.type="integer":a.type="number",typeof y=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(a.minimum=y,a.exclusiveMinimum=!0):a.exclusiveMinimum=y),typeof l=="number"&&(a.minimum=l,typeof y=="number"&&t.target!=="draft-04"&&(y>=l?delete a.minimum:delete a.exclusiveMinimum)),typeof m=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(a.maximum=m,a.exclusiveMaximum=!0):a.exclusiveMaximum=m),typeof u=="number"&&(a.maximum=u,typeof m=="number"&&t.target!=="draft-04"&&(m<=u?delete a.maximum:delete a.exclusiveMaximum)),typeof h=="number"&&(a.multipleOf=h)},C4=(e,t,r,s)=>{r.type="boolean"},T4=(e,t,r,s)=>{r.not={}},A4=(e,t,r,s)=>{},O4=(e,t,r,s)=>{const a=e._zod.def,l=o1(a.entries);l.every(u=>typeof u=="number")&&(r.type="number"),l.every(u=>typeof u=="string")&&(r.type="string"),r.enum=l},M4=(e,t,r,s)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},k4=(e,t,r,s)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},N4=(e,t,r,s)=>{const a=r,l=e._zod.def,{minimum:u,maximum:f}=e._zod.bag;typeof u=="number"&&(a.minItems=u),typeof f=="number"&&(a.maxItems=f),a.type="array",a.items=dt(l.element,t,{...s,path:[...s.path,"items"]})},z4=(e,t,r,s)=>{const a=r,l=e._zod.def;a.type="object",a.properties={};const u=l.shape;for(const m in u)a.properties[m]=dt(u[m],t,{...s,path:[...s.path,"properties",m]});const f=new Set(Object.keys(u)),h=new Set([...f].filter(m=>{const y=l.shape[m]._zod;return t.io==="input"?y.optin===void 0:y.optout===void 0}));h.size>0&&(a.required=Array.from(h)),l.catchall?._zod.def.type==="never"?a.additionalProperties=!1:l.catchall?l.catchall&&(a.additionalProperties=dt(l.catchall,t,{...s,path:[...s.path,"additionalProperties"]})):t.io==="output"&&(a.additionalProperties=!1)},j4=(e,t,r,s)=>{const a=e._zod.def,l=a.inclusive===!1,u=a.options.map((f,h)=>dt(f,t,{...s,path:[...s.path,l?"oneOf":"anyOf",h]}));l?r.oneOf=u:r.anyOf=u},L4=(e,t,r,s)=>{const a=e._zod.def,l=dt(a.left,t,{...s,path:[...s.path,"allOf",0]}),u=dt(a.right,t,{...s,path:[...s.path,"allOf",1]}),f=m=>"allOf"in m&&Object.keys(m).length===1,h=[...f(l)?l.allOf:[l],...f(u)?u.allOf:[u]];r.allOf=h},D4=(e,t,r,s)=>{const a=r,l=e._zod.def;a.type="object";const u=l.keyType,h=u._zod.bag?.patterns;if(l.mode==="loose"&&h&&h.size>0){const y=dt(l.valueType,t,{...s,path:[...s.path,"patternProperties","*"]});a.patternProperties={};for(const g of h)a.patternProperties[g.source]=y}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(a.propertyNames=dt(l.keyType,t,{...s,path:[...s.path,"propertyNames"]})),a.additionalProperties=dt(l.valueType,t,{...s,path:[...s.path,"additionalProperties"]});const m=u._zod.values;if(m){const y=[...m].filter(g=>typeof g=="string"||typeof g=="number");y.length>0&&(a.required=y)}},P4=(e,t,r,s)=>{const a=e._zod.def,l=dt(a.innerType,t,s),u=t.seen.get(e);t.target==="openapi-3.0"?(u.ref=a.innerType,r.nullable=!0):r.anyOf=[l,{type:"null"}]},U4=(e,t,r,s)=>{const a=e._zod.def;dt(a.innerType,t,s);const l=t.seen.get(e);l.ref=a.innerType},$4=(e,t,r,s)=>{const a=e._zod.def;dt(a.innerType,t,s);const l=t.seen.get(e);l.ref=a.innerType,r.default=JSON.parse(JSON.stringify(a.defaultValue))},I4=(e,t,r,s)=>{const a=e._zod.def;dt(a.innerType,t,s);const l=t.seen.get(e);l.ref=a.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(a.defaultValue)))},B4=(e,t,r,s)=>{const a=e._zod.def;dt(a.innerType,t,s);const l=t.seen.get(e);l.ref=a.innerType;let u;try{u=a.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=u},q4=(e,t,r,s)=>{const a=e._zod.def,l=t.io==="input"?a.in._zod.def.type==="transform"?a.out:a.in:a.out;dt(l,t,s);const u=t.seen.get(e);u.ref=l},V4=(e,t,r,s)=>{const a=e._zod.def;dt(a.innerType,t,s);const l=t.seen.get(e);l.ref=a.innerType,r.readOnly=!0},T1=(e,t,r,s)=>{const a=e._zod.def;dt(a.innerType,t,s);const l=t.seen.get(e);l.ref=a.innerType},F4=X("ZodISODateTime",(e,t)=>{QL.init(e,t),We.init(e,t)});function H4(e){return JD(F4,e)}const Z4=X("ZodISODate",(e,t)=>{GL.init(e,t),We.init(e,t)});function Q4(e){return WD(Z4,e)}const G4=X("ZodISOTime",(e,t)=>{YL.init(e,t),We.init(e,t)});function Y4(e){return e4(G4,e)}const K4=X("ZodISODuration",(e,t)=>{KL.init(e,t),We.init(e,t)});function X4(e){return t4(K4,e)}const J4=(e,t)=>{c1.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>Ij(e,r)},flatten:{value:r=>$j(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,mp,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,mp,2)}},isEmpty:{get(){return e.issues.length===0}}})},An=X("ZodError",J4,{Parent:Error}),W4=sm(An),eP=im(An),tP=Lu(An),nP=Du(An),rP=Vj(An),oP=Fj(An),sP=Hj(An),iP=Zj(An),aP=Qj(An),cP=Gj(An),lP=Yj(An),uP=Kj(An),rt=X("ZodType",(e,t)=>(nt.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:pu(e,"input"),output:pu(e,"output")}}),e.toJSONSchema=_4(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone(bo(t,{checks:[...t.checks??[],...r.map(s=>typeof s=="function"?{_zod:{check:s,def:{check:"custom"},onattach:[]}}:s)]}),{parent:!0}),e.with=e.check,e.clone=(r,s)=>So(e,r,s),e.brand=()=>e,e.register=((r,s)=>(r.add(e,s),e)),e.parse=(r,s)=>W4(e,r,s,{callee:e.parse}),e.safeParse=(r,s)=>tP(e,r,s),e.parseAsync=async(r,s)=>eP(e,r,s,{callee:e.parseAsync}),e.safeParseAsync=async(r,s)=>nP(e,r,s),e.spa=e.safeParseAsync,e.encode=(r,s)=>rP(e,r,s),e.decode=(r,s)=>oP(e,r,s),e.encodeAsync=async(r,s)=>sP(e,r,s),e.decodeAsync=async(r,s)=>iP(e,r,s),e.safeEncode=(r,s)=>aP(e,r,s),e.safeDecode=(r,s)=>cP(e,r,s),e.safeEncodeAsync=async(r,s)=>lP(e,r,s),e.safeDecodeAsync=async(r,s)=>uP(e,r,s),e.refine=(r,s)=>e.check(s6(r,s)),e.superRefine=r=>e.check(i6(r)),e.overwrite=r=>e.check(wi(r)),e.optional=()=>lS(e),e.exactOptional=()=>ZP(e),e.nullable=()=>uS(e),e.nullish=()=>lS(uS(e)),e.nonoptional=r=>JP(e,r),e.array=()=>M1(e),e.or=r=>UP([e,r]),e.and=r=>IP(e,r),e.transform=r=>fS(e,FP(r)),e.default=r=>YP(e,r),e.prefault=r=>XP(e,r),e.catch=r=>e6(e,r),e.pipe=r=>fS(e,r),e.readonly=()=>r6(e),e.describe=r=>{const s=e.clone();return Oa.add(s,{description:r}),s},Object.defineProperty(e,"description",{get(){return Oa.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return Oa.get(e);const s=e.clone();return Oa.add(s,r[0]),s},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=r=>r(e),e)),A1=X("_ZodString",(e,t)=>{am.init(e,t),rt.init(e,t),e._zod.processJSONSchema=(s,a,l)=>E4(e,s,a);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...s)=>e.check(a4(...s)),e.includes=(...s)=>e.check(u4(...s)),e.startsWith=(...s)=>e.check(f4(...s)),e.endsWith=(...s)=>e.check(d4(...s)),e.min=(...s)=>e.check(hu(...s)),e.max=(...s)=>e.check(_1(...s)),e.length=(...s)=>e.check(x1(...s)),e.nonempty=(...s)=>e.check(hu(1,...s)),e.lowercase=s=>e.check(c4(s)),e.uppercase=s=>e.check(l4(s)),e.trim=()=>e.check(p4()),e.normalize=(...s)=>e.check(h4(...s)),e.toLowerCase=()=>e.check(m4()),e.toUpperCase=()=>e.check(g4()),e.slugify=()=>e.check(y4())}),fP=X("ZodString",(e,t)=>{am.init(e,t),A1.init(e,t),e.email=r=>e.check(kD(dP,r)),e.url=r=>e.check(DD(hP,r)),e.jwt=r=>e.check(XD(AP,r)),e.emoji=r=>e.check(PD(pP,r)),e.guid=r=>e.check(nS(iS,r)),e.uuid=r=>e.check(ND(zl,r)),e.uuidv4=r=>e.check(zD(zl,r)),e.uuidv6=r=>e.check(jD(zl,r)),e.uuidv7=r=>e.check(LD(zl,r)),e.nanoid=r=>e.check(UD(mP,r)),e.guid=r=>e.check(nS(iS,r)),e.cuid=r=>e.check($D(gP,r)),e.cuid2=r=>e.check(ID(yP,r)),e.ulid=r=>e.check(BD(vP,r)),e.base64=r=>e.check(GD(RP,r)),e.base64url=r=>e.check(YD(CP,r)),e.xid=r=>e.check(qD(bP,r)),e.ksuid=r=>e.check(VD(SP,r)),e.ipv4=r=>e.check(FD(wP,r)),e.ipv6=r=>e.check(HD(_P,r)),e.cidrv4=r=>e.check(ZD(xP,r)),e.cidrv6=r=>e.check(QD(EP,r)),e.e164=r=>e.check(KD(TP,r)),e.datetime=r=>e.check(H4(r)),e.date=r=>e.check(Q4(r)),e.time=r=>e.check(Y4(r)),e.duration=r=>e.check(X4(r))});function Fn(e){return MD(fP,e)}const We=X("ZodStringFormat",(e,t)=>{Xe.init(e,t),A1.init(e,t)}),dP=X("ZodEmail",(e,t)=>{UL.init(e,t),We.init(e,t)}),iS=X("ZodGUID",(e,t)=>{DL.init(e,t),We.init(e,t)}),zl=X("ZodUUID",(e,t)=>{PL.init(e,t),We.init(e,t)}),hP=X("ZodURL",(e,t)=>{$L.init(e,t),We.init(e,t)}),pP=X("ZodEmoji",(e,t)=>{IL.init(e,t),We.init(e,t)}),mP=X("ZodNanoID",(e,t)=>{BL.init(e,t),We.init(e,t)}),gP=X("ZodCUID",(e,t)=>{qL.init(e,t),We.init(e,t)}),yP=X("ZodCUID2",(e,t)=>{VL.init(e,t),We.init(e,t)}),vP=X("ZodULID",(e,t)=>{FL.init(e,t),We.init(e,t)}),bP=X("ZodXID",(e,t)=>{HL.init(e,t),We.init(e,t)}),SP=X("ZodKSUID",(e,t)=>{ZL.init(e,t),We.init(e,t)}),wP=X("ZodIPv4",(e,t)=>{XL.init(e,t),We.init(e,t)}),_P=X("ZodIPv6",(e,t)=>{JL.init(e,t),We.init(e,t)}),xP=X("ZodCIDRv4",(e,t)=>{WL.init(e,t),We.init(e,t)}),EP=X("ZodCIDRv6",(e,t)=>{eD.init(e,t),We.init(e,t)}),RP=X("ZodBase64",(e,t)=>{tD.init(e,t),We.init(e,t)}),CP=X("ZodBase64URL",(e,t)=>{rD.init(e,t),We.init(e,t)}),TP=X("ZodE164",(e,t)=>{oD.init(e,t),We.init(e,t)}),AP=X("ZodJWT",(e,t)=>{iD.init(e,t),We.init(e,t)}),O1=X("ZodNumber",(e,t)=>{v1.init(e,t),rt.init(e,t),e._zod.processJSONSchema=(s,a,l)=>R4(e,s,a),e.gt=(s,a)=>e.check(oS(s,a)),e.gte=(s,a)=>e.check(Vh(s,a)),e.min=(s,a)=>e.check(Vh(s,a)),e.lt=(s,a)=>e.check(rS(s,a)),e.lte=(s,a)=>e.check(qh(s,a)),e.max=(s,a)=>e.check(qh(s,a)),e.int=s=>e.check(aS(s)),e.safe=s=>e.check(aS(s)),e.positive=s=>e.check(oS(0,s)),e.nonnegative=s=>e.check(Vh(0,s)),e.negative=s=>e.check(rS(0,s)),e.nonpositive=s=>e.check(qh(0,s)),e.multipleOf=(s,a)=>e.check(sS(s,a)),e.step=(s,a)=>e.check(sS(s,a)),e.finite=()=>e;const r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function OP(e){return n4(O1,e)}const MP=X("ZodNumberFormat",(e,t)=>{aD.init(e,t),O1.init(e,t)});function aS(e){return r4(MP,e)}const kP=X("ZodBoolean",(e,t)=>{cD.init(e,t),rt.init(e,t),e._zod.processJSONSchema=(r,s,a)=>C4(e,r,s)});function zn(e){return o4(kP,e)}const NP=X("ZodUnknown",(e,t)=>{lD.init(e,t),rt.init(e,t),e._zod.processJSONSchema=(r,s,a)=>A4()});function cS(){return s4(NP)}const zP=X("ZodNever",(e,t)=>{uD.init(e,t),rt.init(e,t),e._zod.processJSONSchema=(r,s,a)=>T4(e,r,s)});function jP(e){return i4(zP,e)}const LP=X("ZodArray",(e,t)=>{fD.init(e,t),rt.init(e,t),e._zod.processJSONSchema=(r,s,a)=>N4(e,r,s,a),e.element=t.element,e.min=(r,s)=>e.check(hu(r,s)),e.nonempty=r=>e.check(hu(1,r)),e.max=(r,s)=>e.check(_1(r,s)),e.length=(r,s)=>e.check(x1(r,s)),e.unwrap=()=>e.element});function M1(e,t){return v4(LP,e,t)}const DP=X("ZodObject",(e,t)=>{hD.init(e,t),rt.init(e,t),e._zod.processJSONSchema=(r,s,a)=>z4(e,r,s,a),Ie(e,"shape",()=>t.shape),e.keyof=()=>cm(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:cS()}),e.loose=()=>e.clone({...e._zod.def,catchall:cS()}),e.strict=()=>e.clone({...e._zod.def,catchall:jP()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>jj(e,r),e.safeExtend=r=>Lj(e,r),e.merge=r=>Dj(e,r),e.pick=r=>Nj(e,r),e.omit=r=>zj(e,r),e.partial=(...r)=>Pj(k1,e,r[0]),e.required=(...r)=>Uj(N1,e,r[0])});function _i(e,t){const r={type:"object",shape:e??{},...me(t)};return new DP(r)}const PP=X("ZodUnion",(e,t)=>{pD.init(e,t),rt.init(e,t),e._zod.processJSONSchema=(r,s,a)=>j4(e,r,s,a),e.options=t.options});function UP(e,t){return new PP({type:"union",options:e,...me(t)})}const $P=X("ZodIntersection",(e,t)=>{mD.init(e,t),rt.init(e,t),e._zod.processJSONSchema=(r,s,a)=>L4(e,r,s,a)});function IP(e,t){return new $P({type:"intersection",left:e,right:t})}const BP=X("ZodRecord",(e,t)=>{gD.init(e,t),rt.init(e,t),e._zod.processJSONSchema=(r,s,a)=>D4(e,r,s,a),e.keyType=t.keyType,e.valueType=t.valueType});function qP(e,t,r){return new BP({type:"record",keyType:e,valueType:t,...me(r)})}const yp=X("ZodEnum",(e,t)=>{yD.init(e,t),rt.init(e,t),e._zod.processJSONSchema=(s,a,l)=>O4(e,s,a),e.enum=t.entries,e.options=Object.values(t.entries);const r=new Set(Object.keys(t.entries));e.extract=(s,a)=>{const l={};for(const u of s)if(r.has(u))l[u]=t.entries[u];else throw new Error(`Key ${u} not found in enum`);return new yp({...t,checks:[],...me(a),entries:l})},e.exclude=(s,a)=>{const l={...t.entries};for(const u of s)if(r.has(u))delete l[u];else throw new Error(`Key ${u} not found in enum`);return new yp({...t,checks:[],...me(a),entries:l})}});function cm(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(s=>[s,s])):e;return new yp({type:"enum",entries:r,...me(t)})}const VP=X("ZodTransform",(e,t)=>{vD.init(e,t),rt.init(e,t),e._zod.processJSONSchema=(r,s,a)=>k4(e,r),e._zod.parse=(r,s)=>{if(s.direction==="backward")throw new n1(e.constructor.name);r.addIssue=l=>{if(typeof l=="string")r.issues.push(Va(l,r.value,t));else{const u=l;u.fatal&&(u.continue=!1),u.code??(u.code="custom"),u.input??(u.input=r.value),u.inst??(u.inst=e),r.issues.push(Va(u))}};const a=t.transform(r.value,r);return a instanceof Promise?a.then(l=>(r.value=l,r)):(r.value=a,r)}});function FP(e){return new VP({type:"transform",transform:e})}const k1=X("ZodOptional",(e,t)=>{w1.init(e,t),rt.init(e,t),e._zod.processJSONSchema=(r,s,a)=>T1(e,r,s,a),e.unwrap=()=>e._zod.def.innerType});function lS(e){return new k1({type:"optional",innerType:e})}const HP=X("ZodExactOptional",(e,t)=>{bD.init(e,t),rt.init(e,t),e._zod.processJSONSchema=(r,s,a)=>T1(e,r,s,a),e.unwrap=()=>e._zod.def.innerType});function ZP(e){return new HP({type:"optional",innerType:e})}const QP=X("ZodNullable",(e,t)=>{SD.init(e,t),rt.init(e,t),e._zod.processJSONSchema=(r,s,a)=>P4(e,r,s,a),e.unwrap=()=>e._zod.def.innerType});function uS(e){return new QP({type:"nullable",innerType:e})}const GP=X("ZodDefault",(e,t)=>{wD.init(e,t),rt.init(e,t),e._zod.processJSONSchema=(r,s,a)=>$4(e,r,s,a),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function YP(e,t){return new GP({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():i1(t)}})}const KP=X("ZodPrefault",(e,t)=>{_D.init(e,t),rt.init(e,t),e._zod.processJSONSchema=(r,s,a)=>I4(e,r,s,a),e.unwrap=()=>e._zod.def.innerType});function XP(e,t){return new KP({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():i1(t)}})}const N1=X("ZodNonOptional",(e,t)=>{xD.init(e,t),rt.init(e,t),e._zod.processJSONSchema=(r,s,a)=>U4(e,r,s,a),e.unwrap=()=>e._zod.def.innerType});function JP(e,t){return new N1({type:"nonoptional",innerType:e,...me(t)})}const WP=X("ZodCatch",(e,t)=>{ED.init(e,t),rt.init(e,t),e._zod.processJSONSchema=(r,s,a)=>B4(e,r,s,a),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function e6(e,t){return new WP({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const t6=X("ZodPipe",(e,t)=>{RD.init(e,t),rt.init(e,t),e._zod.processJSONSchema=(r,s,a)=>q4(e,r,s,a),e.in=t.in,e.out=t.out});function fS(e,t){return new t6({type:"pipe",in:e,out:t})}const n6=X("ZodReadonly",(e,t)=>{CD.init(e,t),rt.init(e,t),e._zod.processJSONSchema=(r,s,a)=>V4(e,r,s,a),e.unwrap=()=>e._zod.def.innerType});function r6(e){return new n6({type:"readonly",innerType:e})}const o6=X("ZodCustom",(e,t)=>{TD.init(e,t),rt.init(e,t),e._zod.processJSONSchema=(r,s,a)=>M4(e,r)});function s6(e,t={}){return b4(o6,e,t)}function i6(e){return S4(e)}const a6=_i({id:Fn(),path:Fn(),label:Fn(),icon:Fn(),visible:zn().default(!0),section:cm(["main","config"]).default("main"),badge:Fn().optional(),exact:zn().optional()}),dS=_i({appName:Fn().default("Convex CMS"),logo:Fn().optional(),favicon:Fn().optional()}),hS=_i({sidebarWidth:OP().min(200).max(400).default(256),sidebarCollapsible:zn().default(!1)}),pS=_i({showDashboard:zn().default(!0),showContent:zn().default(!0),showMedia:zn().default(!0),showTaxonomies:zn().default(!0),showContentTypes:zn().default(!0),showTrash:zn().default(!0),showSettings:zn().default(!0),customItems:M1(a6).default([])}),mS=_i({mode:cm(["light","dark","system"]).default("system"),allowModeSwitch:zn().default(!0),tokens:qP(Fn(),Fn()).optional()}),c6=_i({branding:dS.default(()=>dS.parse({})),layout:hS.default(()=>hS.parse({})),navigation:pS.default(()=>pS.parse({})),theme:mS.default(()=>mS.parse({}))}),l6=[{id:"dashboard",path:"/",label:"Dashboard",icon:"LayoutDashboard",section:"main",exact:!0},{id:"content",path:"/content",label:"Content",icon:"FileText",section:"main"},{id:"media",path:"/media",label:"Media",icon:"Image",section:"main"},{id:"taxonomies",path:"/taxonomies",label:"Taxonomies",icon:"Tags",section:"main"},{id:"content-types",path:"/content-types",label:"Content Types",icon:"Layers",section:"config"},{id:"trash",path:"/trash",label:"Trash",icon:"Trash2",section:"config"},{id:"settings",path:"/settings",label:"Settings",icon:"Settings",section:"config"}];function u6(e){return c6.parse(e??{})}function f6(e){const t={dashboard:e.navigation.showDashboard,content:e.navigation.showContent,media:e.navigation.showMedia,taxonomies:e.navigation.showTaxonomies,"content-types":e.navigation.showContentTypes,trash:e.navigation.showTrash,settings:e.navigation.showSettings},s=[...l6.filter(a=>t[a.id]!==!1),...e.navigation.customItems.filter(a=>a.visible!==!1)];return{main:s.filter(a=>a.section==="main"),config:s.filter(a=>a.section==="config")}}const z1=w.createContext(null);function d6({config:e,children:t}){const r=f6(e),s={...e,navItems:r};return _.jsx(z1.Provider,{value:s,children:t})}function lm(){const e=w.useContext(z1);if(!e)throw new Error("useAdminConfig must be used within AdminConfigProvider");return e}function j1(e,t){const r={get(s,a){if(typeof a=="string"){const l=[...t,a];return j1(e,l)}else if(a===R_){if(t.length<1){const l=[e,...t].join(".");throw new Error(`API path is expected to be of the form \`${e}.childComponent.functionName\`. Found: \`${l}\``)}return"_reference/childComponent/"+t.join("/")}else return}};return new Proxy({},r)}const h6=()=>j1("components",[]),L1=Kk;h6();const D1=w.createContext(null);function p6({baseConfig:e,children:t}){const r=k_(L1.admin.getSettings),s=w.useMemo(()=>r?{...e,navigation:{...e.navigation,showMedia:e.navigation.showMedia&&r.features.mediaManagement}}:e,[e,r]),a=w.useMemo(()=>({baseConfig:e,settings:r}),[e,r]);return _.jsx(D1.Provider,{value:a,children:_.jsx(d6,{config:s,children:t})})}function c9(){const e=w.useContext(D1);if(!e)throw new Error("useSettingsConfig must be used within SettingsConfigProvider");return e}const P1=w.createContext(null);function m6({children:e}){const[t,r]=w.useState(new Map),s=w.useCallback((u,f)=>{r(h=>{const m=new Map(h);return m.set(u,f),m})},[]),a=w.useCallback(u=>{r(f=>{const h=new Map(f);return h.delete(u),h})},[]),l=w.useMemo(()=>({overrides:t,setOverride:s,clearOverride:a}),[t,s,a]);return _.jsx(P1.Provider,{value:l,children:e})}function g6(){const e=w.useContext(P1);if(!e)throw new Error("useBreadcrumbContext must be used within a BreadcrumbProvider");return e}const y6={LayoutDashboard:Hz,FileText:Oz,Image:qz,Layers:L_,Tags:b3,FileCode:Tz,Settings:f3,Trash2:x3,HelpCircle:z_,Home:j_,User:D_,Bell:hp,Lock:Xz,Globe:Lz,Calendar:lz,Clock:yz,Link:Qz,Hash:Pz,ToggleLeft:w3,ChevronDown:Jp,CheckSquare:h3,Braces:az,Folder:zz,MapPin:r3,DollarSign:wz,Mail:t3,Phone:l3,Package:a3,Star:y3,Heart:$z,Flag:kz,Bookmark:sz,Archive:ez,Edit:m3,Eye:Rz,AlertCircle:pz};function gS({name:e,className:t="size-5"}){const r=y6[e];return r?_.jsx(r,{className:t}):null}function Re(e,t,{checkForDefaultPrevented:r=!0}={}){return function(a){if(e?.(a),r===!1||!a.defaultPrevented)return t?.(a)}}function l9(e,t){const r=w.createContext(t),s=l=>{const{children:u,...f}=l,h=w.useMemo(()=>f,Object.values(f));return _.jsx(r.Provider,{value:h,children:u})};s.displayName=e+"Provider";function a(l){const u=w.useContext(r);if(u)return u;if(t!==void 0)return t;throw new Error(`\`${l}\` must be used within \`${e}\``)}return[s,a]}function os(e,t=[]){let r=[];function s(l,u){const f=w.createContext(u),h=r.length;r=[...r,u];const m=g=>{const{scope:b,children:S,...E}=g,x=b?.[e]?.[h]||f,C=w.useMemo(()=>E,Object.values(E));return _.jsx(x.Provider,{value:C,children:S})};m.displayName=l+"Provider";function y(g,b){const S=b?.[e]?.[h]||f,E=w.useContext(S);if(E)return E;if(u!==void 0)return u;throw new Error(`\`${g}\` must be used within \`${l}\``)}return[m,y]}const a=()=>{const l=r.map(u=>w.createContext(u));return function(f){const h=f?.[e]||l;return w.useMemo(()=>({[`__scope${e}`]:{...f,[e]:h}}),[f,h])}};return a.scopeName=e,[s,v6(a,...t)]}function v6(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const s=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(l){const u=s.reduce((f,{useScope:h,scopeName:m})=>{const g=h(l)[`__scope${m}`];return{...f,...g}},{});return w.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])}};return r.scopeName=t.scopeName,r}var Tn=globalThis?.document?w.useLayoutEffect:()=>{},b6=_u[" useInsertionEffect ".trim().toString()]||Tn;function Uu({prop:e,defaultProp:t,onChange:r=()=>{},caller:s}){const[a,l,u]=S6({defaultProp:t,onChange:r}),f=e!==void 0,h=f?e:a;{const y=w.useRef(e!==void 0);w.useEffect(()=>{const g=y.current;g!==f&&console.warn(`${s} is changing from ${g?"controlled":"uncontrolled"} to ${f?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),y.current=f},[f,s])}const m=w.useCallback(y=>{if(f){const g=w6(y)?y(e):y;g!==e&&u.current?.(g)}else l(y)},[f,e,l,u]);return[h,m]}function S6({defaultProp:e,onChange:t}){const[r,s]=w.useState(e),a=w.useRef(r),l=w.useRef(t);return b6(()=>{l.current=t},[t]),w.useEffect(()=>{a.current!==r&&(l.current?.(r),a.current=r)},[r,a]),[r,s,l]}function w6(e){return typeof e=="function"}function yS(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function wo(...e){return t=>{let r=!1;const s=e.map(a=>{const l=yS(a,t);return!r&&typeof l=="function"&&(r=!0),l});if(r)return()=>{for(let a=0;a<s.length;a++){const l=s[a];typeof l=="function"?l():yS(e[a],null)}}}}function At(...e){return w.useCallback(wo(...e),e)}function _6(e){const t=x6(e),r=w.forwardRef((s,a)=>{const{children:l,...u}=s,f=w.Children.toArray(l),h=f.find(R6);if(h){const m=h.props.children,y=f.map(g=>g===h?w.Children.count(m)>1?w.Children.only(null):w.isValidElement(m)?m.props.children:null:g);return _.jsx(t,{...u,ref:a,children:w.isValidElement(m)?w.cloneElement(m,void 0,y):null})}return _.jsx(t,{...u,ref:a,children:l})});return r.displayName=`${e}.Slot`,r}function x6(e){const t=w.forwardRef((r,s)=>{const{children:a,...l}=r;if(w.isValidElement(a)){const u=T6(a),f=C6(l,a.props);return a.type!==w.Fragment&&(f.ref=s?wo(s,u):u),w.cloneElement(a,f)}return w.Children.count(a)>1?w.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var E6=Symbol("radix.slottable");function R6(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===E6}function C6(e,t){const r={...t};for(const s in t){const a=e[s],l=t[s];/^on[A-Z]/.test(s)?a&&l?r[s]=(...f)=>{const h=l(...f);return a(...f),h}:a&&(r[s]=a):s==="style"?r[s]={...a,...l}:s==="className"&&(r[s]=[a,l].filter(Boolean).join(" "))}return{...e,...r}}function T6(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var A6=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ht=A6.reduce((e,t)=>{const r=_6(`Primitive.${t}`),s=w.forwardRef((a,l)=>{const{asChild:u,...f}=a,h=u?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),_.jsx(h,{...f,ref:l})});return s.displayName=`Primitive.${t}`,{...e,[t]:s}},{});function U1(e,t){e&&zu.flushSync(()=>e.dispatchEvent(t))}function O6(e,t){return w.useReducer((r,s)=>t[r][s]??r,e)}var _o=e=>{const{present:t,children:r}=e,s=M6(t),a=typeof r=="function"?r({present:s.isPresent}):w.Children.only(r),l=At(s.ref,k6(a));return typeof r=="function"||s.isPresent?w.cloneElement(a,{ref:l}):null};_o.displayName="Presence";function M6(e){const[t,r]=w.useState(),s=w.useRef(null),a=w.useRef(e),l=w.useRef("none"),u=e?"mounted":"unmounted",[f,h]=O6(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const m=jl(s.current);l.current=f==="mounted"?m:"none"},[f]),Tn(()=>{const m=s.current,y=a.current;if(y!==e){const b=l.current,S=jl(m);e?h("MOUNT"):S==="none"||m?.display==="none"?h("UNMOUNT"):h(y&&b!==S?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,h]),Tn(()=>{if(t){let m;const y=t.ownerDocument.defaultView??window,g=S=>{const x=jl(s.current).includes(CSS.escape(S.animationName));if(S.target===t&&x&&(h("ANIMATION_END"),!a.current)){const C=t.style.animationFillMode;t.style.animationFillMode="forwards",m=y.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=C)})}},b=S=>{S.target===t&&(l.current=jl(s.current))};return t.addEventListener("animationstart",b),t.addEventListener("animationcancel",g),t.addEventListener("animationend",g),()=>{y.clearTimeout(m),t.removeEventListener("animationstart",b),t.removeEventListener("animationcancel",g),t.removeEventListener("animationend",g)}}else h("ANIMATION_END")},[t,h]),{isPresent:["mounted","unmountSuspended"].includes(f),ref:w.useCallback(m=>{s.current=m?getComputedStyle(m):null,r(m)},[])}}function jl(e){return e?.animationName||"none"}function k6(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var N6=_u[" useId ".trim().toString()]||(()=>{}),z6=0;function Fa(e){const[t,r]=w.useState(N6());return Tn(()=>{r(s=>s??String(z6++))},[e]),e||(t?`radix-${t}`:"")}var $u="Collapsible",[j6]=os($u),[L6,um]=j6($u),$1=w.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:s,defaultOpen:a,disabled:l,onOpenChange:u,...f}=e,[h,m]=Uu({prop:s,defaultProp:a??!1,onChange:u,caller:$u});return _.jsx(L6,{scope:r,disabled:l,contentId:Fa(),open:h,onOpenToggle:w.useCallback(()=>m(y=>!y),[m]),children:_.jsx(ht.div,{"data-state":dm(h),"data-disabled":l?"":void 0,...f,ref:t})})});$1.displayName=$u;var I1="CollapsibleTrigger",B1=w.forwardRef((e,t)=>{const{__scopeCollapsible:r,...s}=e,a=um(I1,r);return _.jsx(ht.button,{type:"button","aria-controls":a.contentId,"aria-expanded":a.open||!1,"data-state":dm(a.open),"data-disabled":a.disabled?"":void 0,disabled:a.disabled,...s,ref:t,onClick:Re(e.onClick,a.onOpenToggle)})});B1.displayName=I1;var fm="CollapsibleContent",q1=w.forwardRef((e,t)=>{const{forceMount:r,...s}=e,a=um(fm,e.__scopeCollapsible);return _.jsx(_o,{present:r||a.open,children:({present:l})=>_.jsx(D6,{...s,ref:t,present:l})})});q1.displayName=fm;var D6=w.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:s,children:a,...l}=e,u=um(fm,r),[f,h]=w.useState(s),m=w.useRef(null),y=At(t,m),g=w.useRef(0),b=g.current,S=w.useRef(0),E=S.current,x=u.open||f,C=w.useRef(x),O=w.useRef(void 0);return w.useEffect(()=>{const L=requestAnimationFrame(()=>C.current=!1);return()=>cancelAnimationFrame(L)},[]),Tn(()=>{const L=m.current;if(L){O.current=O.current||{transitionDuration:L.style.transitionDuration,animationName:L.style.animationName},L.style.transitionDuration="0s",L.style.animationName="none";const k=L.getBoundingClientRect();g.current=k.height,S.current=k.width,C.current||(L.style.transitionDuration=O.current.transitionDuration,L.style.animationName=O.current.animationName),h(s)}},[u.open,s]),_.jsx(ht.div,{"data-state":dm(u.open),"data-disabled":u.disabled?"":void 0,id:u.contentId,hidden:!x,...l,ref:y,style:{"--radix-collapsible-content-height":b?`${b}px`:void 0,"--radix-collapsible-content-width":E?`${E}px`:void 0,...e.style},children:x&&a})});function dm(e){return e?"open":"closed"}var P6=$1;const U6=P6,$6=B1,I6=q1;function B6(){const t=Je().location.pathname,r=lm(),{navItems:s,branding:a,layout:l}=r,u=k_(L1.admin.listContentTypes,{isActive:!0}),f=u?.page??[],h=(S,E)=>E?t===S:t.startsWith(S),m=t==="/content"||t.startsWith("/entries/type/")||t.startsWith("/entries/new/")||t.startsWith("/entries/"),y=S=>S.id==="content"?g(S):_.jsxs(io,{to:S.path,className:_t("flex items-center gap-3 rounded-md px-2 py-2 text-sm font-medium transition-colors",h(S.path,S.exact)?"bg-sidebar-accent text-sidebar-accent-foreground":"text-sidebar-foreground hover:bg-sidebar-accent/50 hover:text-sidebar-accent-foreground"),children:[_.jsx(gS,{name:S.icon,className:"size-5"}),_.jsx("span",{className:"flex-1",children:S.label}),S.badge&&_.jsx("span",{className:"rounded-full bg-sidebar-primary px-2 py-0.5 text-xs text-sidebar-primary-foreground",children:S.badge})]},S.id),g=S=>_.jsxs(U6,{defaultOpen:m,children:[_.jsxs($6,{className:_t("flex w-full items-center gap-3 rounded-md px-2 py-2 text-sm font-medium transition-colors",m?"bg-sidebar-accent text-sidebar-accent-foreground":"text-sidebar-foreground hover:bg-sidebar-accent/50 hover:text-sidebar-accent-foreground","group"),children:[_.jsx(gS,{name:S.icon,className:"size-5"}),_.jsx("span",{className:"flex-1 text-left",children:S.label}),_.jsx(Jp,{className:"size-4 transition-transform duration-200 group-data-[state=open]:rotate-180"})]}),_.jsx(I6,{children:_.jsxs("div",{className:"ml-5 mt-1 space-y-1 border-l border-sidebar-border pl-3",children:[_.jsx(io,{to:"/content",className:_t("flex items-center gap-2 rounded-md px-2 py-1.5 text-sm transition-colors",t==="/content"?"bg-sidebar-accent/60 text-sidebar-accent-foreground":"text-sidebar-foreground/80 hover:bg-sidebar-accent/30 hover:text-sidebar-accent-foreground"),children:"All Entries"}),f.map(E=>_.jsx(io,{to:"/entries/type/$contentTypeId",params:{contentTypeId:E._id},className:_t("flex items-center gap-2 rounded-md px-2 py-1.5 text-sm transition-colors",t===`/entries/type/${E._id}`?"bg-sidebar-accent/60 text-sidebar-accent-foreground":"text-sidebar-foreground/80 hover:bg-sidebar-accent/30 hover:text-sidebar-accent-foreground"),children:E.displayName},E._id)),f.length===0&&u!==void 0&&_.jsx(io,{to:"/content-types",className:"flex items-center gap-2 rounded-md px-2 py-1.5 text-sm text-sidebar-foreground/60 hover:bg-sidebar-accent/30 hover:text-sidebar-accent-foreground",children:"+ Create content type"})]})})]},S.id),b=l.sidebarWidth;return _.jsxs("aside",{className:"fixed inset-y-0 left-0 z-50 flex flex-col border-r border-sidebar-border bg-sidebar",style:{width:b},children:[_.jsx("div",{className:"flex h-14 items-center gap-2 border-b border-sidebar-border px-4",children:_.jsxs(io,{to:"/",className:"flex items-center gap-2 font-semibold text-sidebar-foreground",children:[a.logo?_.jsx("img",{src:a.logo,alt:a.appName,className:"size-8"}):_.jsx("div",{className:"flex size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground",children:_.jsx(L_,{className:"size-4"})}),_.jsx("span",{className:"text-base",children:a.appName})]})}),_.jsxs("nav",{className:"flex-1 space-y-6 overflow-y-auto p-4",children:[s.main.length>0&&_.jsxs("div",{className:"space-y-1",children:[_.jsx("span",{className:"px-2 text-xs font-medium uppercase tracking-wider text-sidebar-foreground/60",children:"Main"}),_.jsx("div",{className:"space-y-1 pt-2",children:s.main.map(y)})]}),s.config.length>0&&_.jsxs("div",{className:"space-y-1",children:[_.jsx("span",{className:"px-2 text-xs font-medium uppercase tracking-wider text-sidebar-foreground/60",children:"Configuration"}),_.jsx("div",{className:"space-y-1 pt-2",children:s.config.map(y)})]})]}),_.jsx("div",{className:"border-t border-sidebar-border p-4",children:_.jsxs("div",{className:"flex items-center justify-between text-xs text-sidebar-foreground/60",children:[_.jsx("span",{children:"Version"}),_.jsx("span",{className:"font-mono",children:"0.1.0"})]})})]})}var q6=Symbol.for("react.lazy"),mu=_u[" use ".trim().toString()];function V6(e){return typeof e=="object"&&e!==null&&"then"in e}function V1(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===q6&&"_payload"in e&&V6(e._payload)}function F1(e){const t=F6(e),r=w.forwardRef((s,a)=>{let{children:l,...u}=s;V1(l)&&typeof mu=="function"&&(l=mu(l._payload));const f=w.Children.toArray(l),h=f.find(Z6);if(h){const m=h.props.children,y=f.map(g=>g===h?w.Children.count(m)>1?w.Children.only(null):w.isValidElement(m)?m.props.children:null:g);return _.jsx(t,{...u,ref:a,children:w.isValidElement(m)?w.cloneElement(m,void 0,y):null})}return _.jsx(t,{...u,ref:a,children:l})});return r.displayName=`${e}.Slot`,r}var H1=F1("Slot");function F6(e){const t=w.forwardRef((r,s)=>{let{children:a,...l}=r;if(V1(a)&&typeof mu=="function"&&(a=mu(a._payload)),w.isValidElement(a)){const u=G6(a),f=Q6(l,a.props);return a.type!==w.Fragment&&(f.ref=s?wo(s,u):u),w.cloneElement(a,f)}return w.Children.count(a)>1?w.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var H6=Symbol("radix.slottable");function Z6(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===H6}function Q6(e,t){const r={...t};for(const s in t){const a=e[s],l=t[s];/^on[A-Z]/.test(s)?a&&l?r[s]=(...f)=>{const h=l(...f);return a(...f),h}:a&&(r[s]=a):s==="style"?r[s]={...a,...l}:s==="className"&&(r[s]=[a,l].filter(Boolean).join(" "))}return{...e,...r}}function G6(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function Y6({...e}){return _.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",...e})}function K6({className:e,...t}){return _.jsx("ol",{"data-slot":"breadcrumb-list",className:_t("text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5",e),...t})}function X6({className:e,...t}){return _.jsx("li",{"data-slot":"breadcrumb-item",className:_t("inline-flex items-center gap-1.5",e),...t})}function J6({asChild:e,className:t,...r}){const s=e?H1:"a";return _.jsx(s,{"data-slot":"breadcrumb-link",className:_t("hover:text-foreground transition-colors",t),...r})}function W6({className:e,...t}){return _.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:_t("text-foreground font-normal",e),...t})}function e5({children:e,className:t,...r}){return _.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:_t("[&>svg]:size-3.5",t),...r,children:e??_.jsx(dz,{})})}function vS(e){const t=t5(e),r=w.forwardRef((s,a)=>{const{children:l,...u}=s,f=w.Children.toArray(l),h=f.find(r5);if(h){const m=h.props.children,y=f.map(g=>g===h?w.Children.count(m)>1?w.Children.only(null):w.isValidElement(m)?m.props.children:null:g);return _.jsx(t,{...u,ref:a,children:w.isValidElement(m)?w.cloneElement(m,void 0,y):null})}return _.jsx(t,{...u,ref:a,children:l})});return r.displayName=`${e}.Slot`,r}function t5(e){const t=w.forwardRef((r,s)=>{const{children:a,...l}=r;if(w.isValidElement(a)){const u=s5(a),f=o5(l,a.props);return a.type!==w.Fragment&&(f.ref=s?wo(s,u):u),w.cloneElement(a,f)}return w.Children.count(a)>1?w.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var n5=Symbol("radix.slottable");function r5(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===n5}function o5(e,t){const r={...t};for(const s in t){const a=e[s],l=t[s];/^on[A-Z]/.test(s)?a&&l?r[s]=(...f)=>{const h=l(...f);return a(...f),h}:a&&(r[s]=a):s==="style"?r[s]={...a,...l}:s==="className"&&(r[s]=[a,l].filter(Boolean).join(" "))}return{...e,...r}}function s5(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function Z1(e){const t=e+"CollectionProvider",[r,s]=os(t),[a,l]=r(t,{collectionRef:{current:null},itemMap:new Map}),u=x=>{const{scope:C,children:O}=x,L=kt.useRef(null),k=kt.useRef(new Map).current;return _.jsx(a,{scope:C,itemMap:k,collectionRef:L,children:O})};u.displayName=t;const f=e+"CollectionSlot",h=vS(f),m=kt.forwardRef((x,C)=>{const{scope:O,children:L}=x,k=l(f,O),j=At(C,k.collectionRef);return _.jsx(h,{ref:j,children:L})});m.displayName=f;const y=e+"CollectionItemSlot",g="data-radix-collection-item",b=vS(y),S=kt.forwardRef((x,C)=>{const{scope:O,children:L,...k}=x,j=kt.useRef(null),I=At(C,j),H=l(y,O);return kt.useEffect(()=>(H.itemMap.set(j,{ref:j,...k}),()=>void H.itemMap.delete(j))),_.jsx(b,{[g]:"",ref:I,children:L})});S.displayName=y;function E(x){const C=l(e+"CollectionConsumer",x);return kt.useCallback(()=>{const L=C.collectionRef.current;if(!L)return[];const k=Array.from(L.querySelectorAll(`[${g}]`));return Array.from(C.itemMap.values()).sort((H,$)=>k.indexOf(H.ref.current)-k.indexOf($.ref.current))},[C.collectionRef,C.itemMap])}return[{Provider:u,Slot:m,ItemSlot:S},E,s]}var i5=w.createContext(void 0);function Q1(e){const t=w.useContext(i5);return e||t||"ltr"}function Kn(e){const t=w.useRef(e);return w.useEffect(()=>{t.current=e}),w.useMemo(()=>(...r)=>t.current?.(...r),[])}function a5(e,t=globalThis?.document){const r=Kn(e);w.useEffect(()=>{const s=a=>{a.key==="Escape"&&r(a)};return t.addEventListener("keydown",s,{capture:!0}),()=>t.removeEventListener("keydown",s,{capture:!0})},[r,t])}var c5="DismissableLayer",vp="dismissableLayer.update",l5="dismissableLayer.pointerDownOutside",u5="dismissableLayer.focusOutside",bS,G1=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),hm=w.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:l,onInteractOutside:u,onDismiss:f,...h}=e,m=w.useContext(G1),[y,g]=w.useState(null),b=y?.ownerDocument??globalThis?.document,[,S]=w.useState({}),E=At(t,$=>g($)),x=Array.from(m.layers),[C]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),O=x.indexOf(C),L=y?x.indexOf(y):-1,k=m.layersWithOutsidePointerEventsDisabled.size>0,j=L>=O,I=h5($=>{const D=$.target,W=[...m.branches].some(ne=>ne.contains(D));!j||W||(a?.($),u?.($),$.defaultPrevented||f?.())},b),H=p5($=>{const D=$.target;[...m.branches].some(ne=>ne.contains(D))||(l?.($),u?.($),$.defaultPrevented||f?.())},b);return a5($=>{L===m.layers.size-1&&(s?.($),!$.defaultPrevented&&f&&($.preventDefault(),f()))},b),w.useEffect(()=>{if(y)return r&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(bS=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(y)),m.layers.add(y),SS(),()=>{r&&m.layersWithOutsidePointerEventsDisabled.size===1&&(b.body.style.pointerEvents=bS)}},[y,b,r,m]),w.useEffect(()=>()=>{y&&(m.layers.delete(y),m.layersWithOutsidePointerEventsDisabled.delete(y),SS())},[y,m]),w.useEffect(()=>{const $=()=>S({});return document.addEventListener(vp,$),()=>document.removeEventListener(vp,$)},[]),_.jsx(ht.div,{...h,ref:E,style:{pointerEvents:k?j?"auto":"none":void 0,...e.style},onFocusCapture:Re(e.onFocusCapture,H.onFocusCapture),onBlurCapture:Re(e.onBlurCapture,H.onBlurCapture),onPointerDownCapture:Re(e.onPointerDownCapture,I.onPointerDownCapture)})});hm.displayName=c5;var f5="DismissableLayerBranch",d5=w.forwardRef((e,t)=>{const r=w.useContext(G1),s=w.useRef(null),a=At(t,s);return w.useEffect(()=>{const l=s.current;if(l)return r.branches.add(l),()=>{r.branches.delete(l)}},[r.branches]),_.jsx(ht.div,{...e,ref:a})});d5.displayName=f5;function h5(e,t=globalThis?.document){const r=Kn(e),s=w.useRef(!1),a=w.useRef(()=>{});return w.useEffect(()=>{const l=f=>{if(f.target&&!s.current){let h=function(){Y1(l5,r,m,{discrete:!0})};const m={originalEvent:f};f.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=h,t.addEventListener("click",a.current,{once:!0})):h()}else t.removeEventListener("click",a.current);s.current=!1},u=window.setTimeout(()=>{t.addEventListener("pointerdown",l)},0);return()=>{window.clearTimeout(u),t.removeEventListener("pointerdown",l),t.removeEventListener("click",a.current)}},[t,r]),{onPointerDownCapture:()=>s.current=!0}}function p5(e,t=globalThis?.document){const r=Kn(e),s=w.useRef(!1);return w.useEffect(()=>{const a=l=>{l.target&&!s.current&&Y1(u5,r,{originalEvent:l},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,r]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}function SS(){const e=new CustomEvent(vp);document.dispatchEvent(e)}function Y1(e,t,r,{discrete:s}){const a=r.originalEvent.target,l=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&a.addEventListener(e,t,{once:!0}),s?U1(a,l):a.dispatchEvent(l)}var Fh=0;function K1(){w.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??wS()),document.body.insertAdjacentElement("beforeend",e[1]??wS()),Fh++,()=>{Fh===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Fh--}},[])}function wS(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Hh="focusScope.autoFocusOnMount",Zh="focusScope.autoFocusOnUnmount",_S={bubbles:!1,cancelable:!0},m5="FocusScope",pm=w.forwardRef((e,t)=>{const{loop:r=!1,trapped:s=!1,onMountAutoFocus:a,onUnmountAutoFocus:l,...u}=e,[f,h]=w.useState(null),m=Kn(a),y=Kn(l),g=w.useRef(null),b=At(t,x=>h(x)),S=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(s){let x=function(k){if(S.paused||!f)return;const j=k.target;f.contains(j)?g.current=j:ro(g.current,{select:!0})},C=function(k){if(S.paused||!f)return;const j=k.relatedTarget;j!==null&&(f.contains(j)||ro(g.current,{select:!0}))},O=function(k){if(document.activeElement===document.body)for(const I of k)I.removedNodes.length>0&&ro(f)};document.addEventListener("focusin",x),document.addEventListener("focusout",C);const L=new MutationObserver(O);return f&&L.observe(f,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",x),document.removeEventListener("focusout",C),L.disconnect()}}},[s,f,S.paused]),w.useEffect(()=>{if(f){ES.add(S);const x=document.activeElement;if(!f.contains(x)){const O=new CustomEvent(Hh,_S);f.addEventListener(Hh,m),f.dispatchEvent(O),O.defaultPrevented||(g5(w5(X1(f)),{select:!0}),document.activeElement===x&&ro(f))}return()=>{f.removeEventListener(Hh,m),setTimeout(()=>{const O=new CustomEvent(Zh,_S);f.addEventListener(Zh,y),f.dispatchEvent(O),O.defaultPrevented||ro(x??document.body,{select:!0}),f.removeEventListener(Zh,y),ES.remove(S)},0)}}},[f,m,y,S]);const E=w.useCallback(x=>{if(!r&&!s||S.paused)return;const C=x.key==="Tab"&&!x.altKey&&!x.ctrlKey&&!x.metaKey,O=document.activeElement;if(C&&O){const L=x.currentTarget,[k,j]=y5(L);k&&j?!x.shiftKey&&O===j?(x.preventDefault(),r&&ro(k,{select:!0})):x.shiftKey&&O===k&&(x.preventDefault(),r&&ro(j,{select:!0})):O===L&&x.preventDefault()}},[r,s,S.paused]);return _.jsx(ht.div,{tabIndex:-1,...u,ref:b,onKeyDown:E})});pm.displayName=m5;function g5(e,{select:t=!1}={}){const r=document.activeElement;for(const s of e)if(ro(s,{select:t}),document.activeElement!==r)return}function y5(e){const t=X1(e),r=xS(t,e),s=xS(t.reverse(),e);return[r,s]}function X1(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const a=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||a?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function xS(e,t){for(const r of e)if(!v5(r,{upTo:t}))return r}function v5(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function b5(e){return e instanceof HTMLInputElement&&"select"in e}function ro(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&b5(e)&&t&&e.select()}}var ES=S5();function S5(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=RS(e,t),e.unshift(t)},remove(t){e=RS(e,t),e[0]?.resume()}}}function RS(e,t){const r=[...e],s=r.indexOf(t);return s!==-1&&r.splice(s,1),r}function w5(e){return e.filter(t=>t.tagName!=="A")}const _5=["top","right","bottom","left"],po=Math.min,cn=Math.max,gu=Math.round,Ll=Math.floor,Gn=e=>({x:e,y:e}),x5={left:"right",right:"left",bottom:"top",top:"bottom"},E5={start:"end",end:"start"};function bp(e,t,r){return cn(e,po(t,r))}function Cr(e,t){return typeof e=="function"?e(t):e}function Tr(e){return e.split("-")[0]}function xi(e){return e.split("-")[1]}function mm(e){return e==="x"?"y":"x"}function gm(e){return e==="y"?"height":"width"}const R5=new Set(["top","bottom"]);function Qn(e){return R5.has(Tr(e))?"y":"x"}function ym(e){return mm(Qn(e))}function C5(e,t,r){r===void 0&&(r=!1);const s=xi(e),a=ym(e),l=gm(a);let u=a==="x"?s===(r?"end":"start")?"right":"left":s==="start"?"bottom":"top";return t.reference[l]>t.floating[l]&&(u=yu(u)),[u,yu(u)]}function T5(e){const t=yu(e);return[Sp(e),t,Sp(t)]}function Sp(e){return e.replace(/start|end/g,t=>E5[t])}const CS=["left","right"],TS=["right","left"],A5=["top","bottom"],O5=["bottom","top"];function M5(e,t,r){switch(e){case"top":case"bottom":return r?t?TS:CS:t?CS:TS;case"left":case"right":return t?A5:O5;default:return[]}}function k5(e,t,r,s){const a=xi(e);let l=M5(Tr(e),r==="start",s);return a&&(l=l.map(u=>u+"-"+a),t&&(l=l.concat(l.map(Sp)))),l}function yu(e){return e.replace(/left|right|bottom|top/g,t=>x5[t])}function N5(e){return{top:0,right:0,bottom:0,left:0,...e}}function J1(e){return typeof e!="number"?N5(e):{top:e,right:e,bottom:e,left:e}}function vu(e){const{x:t,y:r,width:s,height:a}=e;return{width:s,height:a,top:r,left:t,right:t+s,bottom:r+a,x:t,y:r}}function AS(e,t,r){let{reference:s,floating:a}=e;const l=Qn(t),u=ym(t),f=gm(u),h=Tr(t),m=l==="y",y=s.x+s.width/2-a.width/2,g=s.y+s.height/2-a.height/2,b=s[f]/2-a[f]/2;let S;switch(h){case"top":S={x:y,y:s.y-a.height};break;case"bottom":S={x:y,y:s.y+s.height};break;case"right":S={x:s.x+s.width,y:g};break;case"left":S={x:s.x-a.width,y:g};break;default:S={x:s.x,y:s.y}}switch(xi(t)){case"start":S[u]-=b*(r&&m?-1:1);break;case"end":S[u]+=b*(r&&m?-1:1);break}return S}const z5=async(e,t,r)=>{const{placement:s="bottom",strategy:a="absolute",middleware:l=[],platform:u}=r,f=l.filter(Boolean),h=await(u.isRTL==null?void 0:u.isRTL(t));let m=await u.getElementRects({reference:e,floating:t,strategy:a}),{x:y,y:g}=AS(m,s,h),b=s,S={},E=0;for(let x=0;x<f.length;x++){const{name:C,fn:O}=f[x],{x:L,y:k,data:j,reset:I}=await O({x:y,y:g,initialPlacement:s,placement:b,strategy:a,middlewareData:S,rects:m,platform:u,elements:{reference:e,floating:t}});y=L??y,g=k??g,S={...S,[C]:{...S[C],...j}},I&&E<=50&&(E++,typeof I=="object"&&(I.placement&&(b=I.placement),I.rects&&(m=I.rects===!0?await u.getElementRects({reference:e,floating:t,strategy:a}):I.rects),{x:y,y:g}=AS(m,b,h)),x=-1)}return{x:y,y:g,placement:b,strategy:a,middlewareData:S}};async function Ha(e,t){var r;t===void 0&&(t={});const{x:s,y:a,platform:l,rects:u,elements:f,strategy:h}=e,{boundary:m="clippingAncestors",rootBoundary:y="viewport",elementContext:g="floating",altBoundary:b=!1,padding:S=0}=Cr(t,e),E=J1(S),C=f[b?g==="floating"?"reference":"floating":g],O=vu(await l.getClippingRect({element:(r=await(l.isElement==null?void 0:l.isElement(C)))==null||r?C:C.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(f.floating)),boundary:m,rootBoundary:y,strategy:h})),L=g==="floating"?{x:s,y:a,width:u.floating.width,height:u.floating.height}:u.reference,k=await(l.getOffsetParent==null?void 0:l.getOffsetParent(f.floating)),j=await(l.isElement==null?void 0:l.isElement(k))?await(l.getScale==null?void 0:l.getScale(k))||{x:1,y:1}:{x:1,y:1},I=vu(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:L,offsetParent:k,strategy:h}):L);return{top:(O.top-I.top+E.top)/j.y,bottom:(I.bottom-O.bottom+E.bottom)/j.y,left:(O.left-I.left+E.left)/j.x,right:(I.right-O.right+E.right)/j.x}}const j5=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:s,placement:a,rects:l,platform:u,elements:f,middlewareData:h}=t,{element:m,padding:y=0}=Cr(e,t)||{};if(m==null)return{};const g=J1(y),b={x:r,y:s},S=ym(a),E=gm(S),x=await u.getDimensions(m),C=S==="y",O=C?"top":"left",L=C?"bottom":"right",k=C?"clientHeight":"clientWidth",j=l.reference[E]+l.reference[S]-b[S]-l.floating[E],I=b[S]-l.reference[S],H=await(u.getOffsetParent==null?void 0:u.getOffsetParent(m));let $=H?H[k]:0;(!$||!await(u.isElement==null?void 0:u.isElement(H)))&&($=f.floating[k]||l.floating[E]);const D=j/2-I/2,W=$/2-x[E]/2-1,ne=po(g[O],W),oe=po(g[L],W),ie=ne,de=$-x[E]-oe,ue=$/2-x[E]/2+D,ve=bp(ie,ue,de),P=!h.arrow&&xi(a)!=null&&ue!==ve&&l.reference[E]/2-(ue<ie?ne:oe)-x[E]/2<0,Y=P?ue<ie?ue-ie:ue-de:0;return{[S]:b[S]+Y,data:{[S]:ve,centerOffset:ue-ve-Y,...P&&{alignmentOffset:Y}},reset:P}}}),L5=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,s;const{placement:a,middlewareData:l,rects:u,initialPlacement:f,platform:h,elements:m}=t,{mainAxis:y=!0,crossAxis:g=!0,fallbackPlacements:b,fallbackStrategy:S="bestFit",fallbackAxisSideDirection:E="none",flipAlignment:x=!0,...C}=Cr(e,t);if((r=l.arrow)!=null&&r.alignmentOffset)return{};const O=Tr(a),L=Qn(f),k=Tr(f)===f,j=await(h.isRTL==null?void 0:h.isRTL(m.floating)),I=b||(k||!x?[yu(f)]:T5(f)),H=E!=="none";!b&&H&&I.push(...k5(f,x,E,j));const $=[f,...I],D=await Ha(t,C),W=[];let ne=((s=l.flip)==null?void 0:s.overflows)||[];if(y&&W.push(D[O]),g){const ue=C5(a,u,j);W.push(D[ue[0]],D[ue[1]])}if(ne=[...ne,{placement:a,overflows:W}],!W.every(ue=>ue<=0)){var oe,ie;const ue=(((oe=l.flip)==null?void 0:oe.index)||0)+1,ve=$[ue];if(ve&&(!(g==="alignment"?L!==Qn(ve):!1)||ne.every(V=>Qn(V.placement)===L?V.overflows[0]>0:!0)))return{data:{index:ue,overflows:ne},reset:{placement:ve}};let P=(ie=ne.filter(Y=>Y.overflows[0]<=0).sort((Y,V)=>Y.overflows[1]-V.overflows[1])[0])==null?void 0:ie.placement;if(!P)switch(S){case"bestFit":{var de;const Y=(de=ne.filter(V=>{if(H){const te=Qn(V.placement);return te===L||te==="y"}return!0}).map(V=>[V.placement,V.overflows.filter(te=>te>0).reduce((te,be)=>te+be,0)]).sort((V,te)=>V[1]-te[1])[0])==null?void 0:de[0];Y&&(P=Y);break}case"initialPlacement":P=f;break}if(a!==P)return{reset:{placement:P}}}return{}}}};function OS(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function MS(e){return _5.some(t=>e[t]>=0)}const D5=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:s="referenceHidden",...a}=Cr(e,t);switch(s){case"referenceHidden":{const l=await Ha(t,{...a,elementContext:"reference"}),u=OS(l,r.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:MS(u)}}}case"escaped":{const l=await Ha(t,{...a,altBoundary:!0}),u=OS(l,r.floating);return{data:{escapedOffsets:u,escaped:MS(u)}}}default:return{}}}}},W1=new Set(["left","top"]);async function P5(e,t){const{placement:r,platform:s,elements:a}=e,l=await(s.isRTL==null?void 0:s.isRTL(a.floating)),u=Tr(r),f=xi(r),h=Qn(r)==="y",m=W1.has(u)?-1:1,y=l&&h?-1:1,g=Cr(t,e);let{mainAxis:b,crossAxis:S,alignmentAxis:E}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return f&&typeof E=="number"&&(S=f==="end"?E*-1:E),h?{x:S*y,y:b*m}:{x:b*m,y:S*y}}const U5=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,s;const{x:a,y:l,placement:u,middlewareData:f}=t,h=await P5(t,e);return u===((r=f.offset)==null?void 0:r.placement)&&(s=f.arrow)!=null&&s.alignmentOffset?{}:{x:a+h.x,y:l+h.y,data:{...h,placement:u}}}}},$5=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:s,placement:a}=t,{mainAxis:l=!0,crossAxis:u=!1,limiter:f={fn:C=>{let{x:O,y:L}=C;return{x:O,y:L}}},...h}=Cr(e,t),m={x:r,y:s},y=await Ha(t,h),g=Qn(Tr(a)),b=mm(g);let S=m[b],E=m[g];if(l){const C=b==="y"?"top":"left",O=b==="y"?"bottom":"right",L=S+y[C],k=S-y[O];S=bp(L,S,k)}if(u){const C=g==="y"?"top":"left",O=g==="y"?"bottom":"right",L=E+y[C],k=E-y[O];E=bp(L,E,k)}const x=f.fn({...t,[b]:S,[g]:E});return{...x,data:{x:x.x-r,y:x.y-s,enabled:{[b]:l,[g]:u}}}}}},I5=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:s,placement:a,rects:l,middlewareData:u}=t,{offset:f=0,mainAxis:h=!0,crossAxis:m=!0}=Cr(e,t),y={x:r,y:s},g=Qn(a),b=mm(g);let S=y[b],E=y[g];const x=Cr(f,t),C=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:0,crossAxis:0,...x};if(h){const k=b==="y"?"height":"width",j=l.reference[b]-l.floating[k]+C.mainAxis,I=l.reference[b]+l.reference[k]-C.mainAxis;S<j?S=j:S>I&&(S=I)}if(m){var O,L;const k=b==="y"?"width":"height",j=W1.has(Tr(a)),I=l.reference[g]-l.floating[k]+(j&&((O=u.offset)==null?void 0:O[g])||0)+(j?0:C.crossAxis),H=l.reference[g]+l.reference[k]+(j?0:((L=u.offset)==null?void 0:L[g])||0)-(j?C.crossAxis:0);E<I?E=I:E>H&&(E=H)}return{[b]:S,[g]:E}}}},B5=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,s;const{placement:a,rects:l,platform:u,elements:f}=t,{apply:h=()=>{},...m}=Cr(e,t),y=await Ha(t,m),g=Tr(a),b=xi(a),S=Qn(a)==="y",{width:E,height:x}=l.floating;let C,O;g==="top"||g==="bottom"?(C=g,O=b===(await(u.isRTL==null?void 0:u.isRTL(f.floating))?"start":"end")?"left":"right"):(O=g,C=b==="end"?"top":"bottom");const L=x-y.top-y.bottom,k=E-y.left-y.right,j=po(x-y[C],L),I=po(E-y[O],k),H=!t.middlewareData.shift;let $=j,D=I;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(D=k),(s=t.middlewareData.shift)!=null&&s.enabled.y&&($=L),H&&!b){const ne=cn(y.left,0),oe=cn(y.right,0),ie=cn(y.top,0),de=cn(y.bottom,0);S?D=E-2*(ne!==0||oe!==0?ne+oe:cn(y.left,y.right)):$=x-2*(ie!==0||de!==0?ie+de:cn(y.top,y.bottom))}await h({...t,availableWidth:D,availableHeight:$});const W=await u.getDimensions(f.floating);return E!==W.width||x!==W.height?{reset:{rects:!0}}:{}}}};function Iu(){return typeof window<"u"}function Ei(e){return ex(e)?(e.nodeName||"").toLowerCase():"#document"}function un(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Wn(e){var t;return(t=(ex(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ex(e){return Iu()?e instanceof Node||e instanceof un(e).Node:!1}function Ln(e){return Iu()?e instanceof Element||e instanceof un(e).Element:!1}function Xn(e){return Iu()?e instanceof HTMLElement||e instanceof un(e).HTMLElement:!1}function kS(e){return!Iu()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof un(e).ShadowRoot}const q5=new Set(["inline","contents"]);function Xa(e){const{overflow:t,overflowX:r,overflowY:s,display:a}=Dn(e);return/auto|scroll|overlay|hidden|clip/.test(t+s+r)&&!q5.has(a)}const V5=new Set(["table","td","th"]);function F5(e){return V5.has(Ei(e))}const H5=[":popover-open",":modal"];function Bu(e){return H5.some(t=>{try{return e.matches(t)}catch{return!1}})}const Z5=["transform","translate","scale","rotate","perspective"],Q5=["transform","translate","scale","rotate","perspective","filter"],G5=["paint","layout","strict","content"];function vm(e){const t=bm(),r=Ln(e)?Dn(e):e;return Z5.some(s=>r[s]?r[s]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||Q5.some(s=>(r.willChange||"").includes(s))||G5.some(s=>(r.contain||"").includes(s))}function Y5(e){let t=mo(e);for(;Xn(t)&&!yi(t);){if(vm(t))return t;if(Bu(t))return null;t=mo(t)}return null}function bm(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const K5=new Set(["html","body","#document"]);function yi(e){return K5.has(Ei(e))}function Dn(e){return un(e).getComputedStyle(e)}function qu(e){return Ln(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function mo(e){if(Ei(e)==="html")return e;const t=e.assignedSlot||e.parentNode||kS(e)&&e.host||Wn(e);return kS(t)?t.host:t}function tx(e){const t=mo(e);return yi(t)?e.ownerDocument?e.ownerDocument.body:e.body:Xn(t)&&Xa(t)?t:tx(t)}function Za(e,t,r){var s;t===void 0&&(t=[]),r===void 0&&(r=!0);const a=tx(e),l=a===((s=e.ownerDocument)==null?void 0:s.body),u=un(a);if(l){const f=wp(u);return t.concat(u,u.visualViewport||[],Xa(a)?a:[],f&&r?Za(f):[])}return t.concat(a,Za(a,[],r))}function wp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function nx(e){const t=Dn(e);let r=parseFloat(t.width)||0,s=parseFloat(t.height)||0;const a=Xn(e),l=a?e.offsetWidth:r,u=a?e.offsetHeight:s,f=gu(r)!==l||gu(s)!==u;return f&&(r=l,s=u),{width:r,height:s,$:f}}function Sm(e){return Ln(e)?e:e.contextElement}function fi(e){const t=Sm(e);if(!Xn(t))return Gn(1);const r=t.getBoundingClientRect(),{width:s,height:a,$:l}=nx(t);let u=(l?gu(r.width):r.width)/s,f=(l?gu(r.height):r.height)/a;return(!u||!Number.isFinite(u))&&(u=1),(!f||!Number.isFinite(f))&&(f=1),{x:u,y:f}}const X5=Gn(0);function rx(e){const t=un(e);return!bm()||!t.visualViewport?X5:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function J5(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==un(e)?!1:t}function es(e,t,r,s){t===void 0&&(t=!1),r===void 0&&(r=!1);const a=e.getBoundingClientRect(),l=Sm(e);let u=Gn(1);t&&(s?Ln(s)&&(u=fi(s)):u=fi(e));const f=J5(l,r,s)?rx(l):Gn(0);let h=(a.left+f.x)/u.x,m=(a.top+f.y)/u.y,y=a.width/u.x,g=a.height/u.y;if(l){const b=un(l),S=s&&Ln(s)?un(s):s;let E=b,x=wp(E);for(;x&&s&&S!==E;){const C=fi(x),O=x.getBoundingClientRect(),L=Dn(x),k=O.left+(x.clientLeft+parseFloat(L.paddingLeft))*C.x,j=O.top+(x.clientTop+parseFloat(L.paddingTop))*C.y;h*=C.x,m*=C.y,y*=C.x,g*=C.y,h+=k,m+=j,E=un(x),x=wp(E)}}return vu({width:y,height:g,x:h,y:m})}function Vu(e,t){const r=qu(e).scrollLeft;return t?t.left+r:es(Wn(e)).left+r}function ox(e,t){const r=e.getBoundingClientRect(),s=r.left+t.scrollLeft-Vu(e,r),a=r.top+t.scrollTop;return{x:s,y:a}}function W5(e){let{elements:t,rect:r,offsetParent:s,strategy:a}=e;const l=a==="fixed",u=Wn(s),f=t?Bu(t.floating):!1;if(s===u||f&&l)return r;let h={scrollLeft:0,scrollTop:0},m=Gn(1);const y=Gn(0),g=Xn(s);if((g||!g&&!l)&&((Ei(s)!=="body"||Xa(u))&&(h=qu(s)),Xn(s))){const S=es(s);m=fi(s),y.x=S.x+s.clientLeft,y.y=S.y+s.clientTop}const b=u&&!g&&!l?ox(u,h):Gn(0);return{width:r.width*m.x,height:r.height*m.y,x:r.x*m.x-h.scrollLeft*m.x+y.x+b.x,y:r.y*m.y-h.scrollTop*m.y+y.y+b.y}}function eU(e){return Array.from(e.getClientRects())}function tU(e){const t=Wn(e),r=qu(e),s=e.ownerDocument.body,a=cn(t.scrollWidth,t.clientWidth,s.scrollWidth,s.clientWidth),l=cn(t.scrollHeight,t.clientHeight,s.scrollHeight,s.clientHeight);let u=-r.scrollLeft+Vu(e);const f=-r.scrollTop;return Dn(s).direction==="rtl"&&(u+=cn(t.clientWidth,s.clientWidth)-a),{width:a,height:l,x:u,y:f}}const NS=25;function nU(e,t){const r=un(e),s=Wn(e),a=r.visualViewport;let l=s.clientWidth,u=s.clientHeight,f=0,h=0;if(a){l=a.width,u=a.height;const y=bm();(!y||y&&t==="fixed")&&(f=a.offsetLeft,h=a.offsetTop)}const m=Vu(s);if(m<=0){const y=s.ownerDocument,g=y.body,b=getComputedStyle(g),S=y.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,E=Math.abs(s.clientWidth-g.clientWidth-S);E<=NS&&(l-=E)}else m<=NS&&(l+=m);return{width:l,height:u,x:f,y:h}}const rU=new Set(["absolute","fixed"]);function oU(e,t){const r=es(e,!0,t==="fixed"),s=r.top+e.clientTop,a=r.left+e.clientLeft,l=Xn(e)?fi(e):Gn(1),u=e.clientWidth*l.x,f=e.clientHeight*l.y,h=a*l.x,m=s*l.y;return{width:u,height:f,x:h,y:m}}function zS(e,t,r){let s;if(t==="viewport")s=nU(e,r);else if(t==="document")s=tU(Wn(e));else if(Ln(t))s=oU(t,r);else{const a=rx(e);s={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return vu(s)}function sx(e,t){const r=mo(e);return r===t||!Ln(r)||yi(r)?!1:Dn(r).position==="fixed"||sx(r,t)}function sU(e,t){const r=t.get(e);if(r)return r;let s=Za(e,[],!1).filter(f=>Ln(f)&&Ei(f)!=="body"),a=null;const l=Dn(e).position==="fixed";let u=l?mo(e):e;for(;Ln(u)&&!yi(u);){const f=Dn(u),h=vm(u);!h&&f.position==="fixed"&&(a=null),(l?!h&&!a:!h&&f.position==="static"&&!!a&&rU.has(a.position)||Xa(u)&&!h&&sx(e,u))?s=s.filter(y=>y!==u):a=f,u=mo(u)}return t.set(e,s),s}function iU(e){let{element:t,boundary:r,rootBoundary:s,strategy:a}=e;const u=[...r==="clippingAncestors"?Bu(t)?[]:sU(t,this._c):[].concat(r),s],f=u[0],h=u.reduce((m,y)=>{const g=zS(t,y,a);return m.top=cn(g.top,m.top),m.right=po(g.right,m.right),m.bottom=po(g.bottom,m.bottom),m.left=cn(g.left,m.left),m},zS(t,f,a));return{width:h.right-h.left,height:h.bottom-h.top,x:h.left,y:h.top}}function aU(e){const{width:t,height:r}=nx(e);return{width:t,height:r}}function cU(e,t,r){const s=Xn(t),a=Wn(t),l=r==="fixed",u=es(e,!0,l,t);let f={scrollLeft:0,scrollTop:0};const h=Gn(0);function m(){h.x=Vu(a)}if(s||!s&&!l)if((Ei(t)!=="body"||Xa(a))&&(f=qu(t)),s){const S=es(t,!0,l,t);h.x=S.x+t.clientLeft,h.y=S.y+t.clientTop}else a&&m();l&&!s&&a&&m();const y=a&&!s&&!l?ox(a,f):Gn(0),g=u.left+f.scrollLeft-h.x-y.x,b=u.top+f.scrollTop-h.y-y.y;return{x:g,y:b,width:u.width,height:u.height}}function Qh(e){return Dn(e).position==="static"}function jS(e,t){if(!Xn(e)||Dn(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Wn(e)===r&&(r=r.ownerDocument.body),r}function ix(e,t){const r=un(e);if(Bu(e))return r;if(!Xn(e)){let a=mo(e);for(;a&&!yi(a);){if(Ln(a)&&!Qh(a))return a;a=mo(a)}return r}let s=jS(e,t);for(;s&&F5(s)&&Qh(s);)s=jS(s,t);return s&&yi(s)&&Qh(s)&&!vm(s)?r:s||Y5(e)||r}const lU=async function(e){const t=this.getOffsetParent||ix,r=this.getDimensions,s=await r(e.floating);return{reference:cU(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function uU(e){return Dn(e).direction==="rtl"}const fU={convertOffsetParentRelativeRectToViewportRelativeRect:W5,getDocumentElement:Wn,getClippingRect:iU,getOffsetParent:ix,getElementRects:lU,getClientRects:eU,getDimensions:aU,getScale:fi,isElement:Ln,isRTL:uU};function ax(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function dU(e,t){let r=null,s;const a=Wn(e);function l(){var f;clearTimeout(s),(f=r)==null||f.disconnect(),r=null}function u(f,h){f===void 0&&(f=!1),h===void 0&&(h=1),l();const m=e.getBoundingClientRect(),{left:y,top:g,width:b,height:S}=m;if(f||t(),!b||!S)return;const E=Ll(g),x=Ll(a.clientWidth-(y+b)),C=Ll(a.clientHeight-(g+S)),O=Ll(y),k={rootMargin:-E+"px "+-x+"px "+-C+"px "+-O+"px",threshold:cn(0,po(1,h))||1};let j=!0;function I(H){const $=H[0].intersectionRatio;if($!==h){if(!j)return u();$?u(!1,$):s=setTimeout(()=>{u(!1,1e-7)},1e3)}$===1&&!ax(m,e.getBoundingClientRect())&&u(),j=!1}try{r=new IntersectionObserver(I,{...k,root:a.ownerDocument})}catch{r=new IntersectionObserver(I,k)}r.observe(e)}return u(!0),l}function hU(e,t,r,s){s===void 0&&(s={});const{ancestorScroll:a=!0,ancestorResize:l=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:h=!1}=s,m=Sm(e),y=a||l?[...m?Za(m):[],...Za(t)]:[];y.forEach(O=>{a&&O.addEventListener("scroll",r,{passive:!0}),l&&O.addEventListener("resize",r)});const g=m&&f?dU(m,r):null;let b=-1,S=null;u&&(S=new ResizeObserver(O=>{let[L]=O;L&&L.target===m&&S&&(S.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var k;(k=S)==null||k.observe(t)})),r()}),m&&!h&&S.observe(m),S.observe(t));let E,x=h?es(e):null;h&&C();function C(){const O=es(e);x&&!ax(x,O)&&r(),x=O,E=requestAnimationFrame(C)}return r(),()=>{var O;y.forEach(L=>{a&&L.removeEventListener("scroll",r),l&&L.removeEventListener("resize",r)}),g?.(),(O=S)==null||O.disconnect(),S=null,h&&cancelAnimationFrame(E)}}const pU=U5,mU=$5,gU=L5,yU=B5,vU=D5,LS=j5,bU=I5,SU=(e,t,r)=>{const s=new Map,a={platform:fU,...r},l={...a.platform,_c:s};return z5(e,t,{...a,platform:l})};var wU=typeof document<"u",_U=function(){},Fl=wU?w.useLayoutEffect:_U;function bu(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,s,a;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(s=r;s--!==0;)if(!bu(e[s],t[s]))return!1;return!0}if(a=Object.keys(e),r=a.length,r!==Object.keys(t).length)return!1;for(s=r;s--!==0;)if(!{}.hasOwnProperty.call(t,a[s]))return!1;for(s=r;s--!==0;){const l=a[s];if(!(l==="_owner"&&e.$$typeof)&&!bu(e[l],t[l]))return!1}return!0}return e!==e&&t!==t}function cx(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function DS(e,t){const r=cx(e);return Math.round(t*r)/r}function Gh(e){const t=w.useRef(e);return Fl(()=>{t.current=e}),t}function xU(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:s=[],platform:a,elements:{reference:l,floating:u}={},transform:f=!0,whileElementsMounted:h,open:m}=e,[y,g]=w.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[b,S]=w.useState(s);bu(b,s)||S(s);const[E,x]=w.useState(null),[C,O]=w.useState(null),L=w.useCallback(V=>{V!==H.current&&(H.current=V,x(V))},[]),k=w.useCallback(V=>{V!==$.current&&($.current=V,O(V))},[]),j=l||E,I=u||C,H=w.useRef(null),$=w.useRef(null),D=w.useRef(y),W=h!=null,ne=Gh(h),oe=Gh(a),ie=Gh(m),de=w.useCallback(()=>{if(!H.current||!$.current)return;const V={placement:t,strategy:r,middleware:b};oe.current&&(V.platform=oe.current),SU(H.current,$.current,V).then(te=>{const be={...te,isPositioned:ie.current!==!1};ue.current&&!bu(D.current,be)&&(D.current=be,zu.flushSync(()=>{g(be)}))})},[b,t,r,oe,ie]);Fl(()=>{m===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,g(V=>({...V,isPositioned:!1})))},[m]);const ue=w.useRef(!1);Fl(()=>(ue.current=!0,()=>{ue.current=!1}),[]),Fl(()=>{if(j&&(H.current=j),I&&($.current=I),j&&I){if(ne.current)return ne.current(j,I,de);de()}},[j,I,de,ne,W]);const ve=w.useMemo(()=>({reference:H,floating:$,setReference:L,setFloating:k}),[L,k]),P=w.useMemo(()=>({reference:j,floating:I}),[j,I]),Y=w.useMemo(()=>{const V={position:r,left:0,top:0};if(!P.floating)return V;const te=DS(P.floating,y.x),be=DS(P.floating,y.y);return f?{...V,transform:"translate("+te+"px, "+be+"px)",...cx(P.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:te,top:be}},[r,f,P.floating,y.x,y.y]);return w.useMemo(()=>({...y,update:de,refs:ve,elements:P,floatingStyles:Y}),[y,de,ve,P,Y])}const EU=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:s,padding:a}=typeof e=="function"?e(r):e;return s&&t(s)?s.current!=null?LS({element:s.current,padding:a}).fn(r):{}:s?LS({element:s,padding:a}).fn(r):{}}}},RU=(e,t)=>({...pU(e),options:[e,t]}),CU=(e,t)=>({...mU(e),options:[e,t]}),TU=(e,t)=>({...bU(e),options:[e,t]}),AU=(e,t)=>({...gU(e),options:[e,t]}),OU=(e,t)=>({...yU(e),options:[e,t]}),MU=(e,t)=>({...vU(e),options:[e,t]}),kU=(e,t)=>({...EU(e),options:[e,t]});var NU="Arrow",lx=w.forwardRef((e,t)=>{const{children:r,width:s=10,height:a=5,...l}=e;return _.jsx(ht.svg,{...l,ref:t,width:s,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:_.jsx("polygon",{points:"0,0 30,0 15,10"})})});lx.displayName=NU;var zU=lx;function jU(e){const[t,r]=w.useState(void 0);return Tn(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const s=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const l=a[0];let u,f;if("borderBoxSize"in l){const h=l.borderBoxSize,m=Array.isArray(h)?h[0]:h;u=m.inlineSize,f=m.blockSize}else u=e.offsetWidth,f=e.offsetHeight;r({width:u,height:f})});return s.observe(e,{box:"border-box"}),()=>s.unobserve(e)}else r(void 0)},[e]),t}var wm="Popper",[ux,Fu]=os(wm),[LU,fx]=ux(wm),dx=e=>{const{__scopePopper:t,children:r}=e,[s,a]=w.useState(null);return _.jsx(LU,{scope:t,anchor:s,onAnchorChange:a,children:r})};dx.displayName=wm;var hx="PopperAnchor",px=w.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:s,...a}=e,l=fx(hx,r),u=w.useRef(null),f=At(t,u),h=w.useRef(null);return w.useEffect(()=>{const m=h.current;h.current=s?.current||u.current,m!==h.current&&l.onAnchorChange(h.current)}),s?null:_.jsx(ht.div,{...a,ref:f})});px.displayName=hx;var _m="PopperContent",[DU,PU]=ux(_m),mx=w.forwardRef((e,t)=>{const{__scopePopper:r,side:s="bottom",sideOffset:a=0,align:l="center",alignOffset:u=0,arrowPadding:f=0,avoidCollisions:h=!0,collisionBoundary:m=[],collisionPadding:y=0,sticky:g="partial",hideWhenDetached:b=!1,updatePositionStrategy:S="optimized",onPlaced:E,...x}=e,C=fx(_m,r),[O,L]=w.useState(null),k=At(t,se=>L(se)),[j,I]=w.useState(null),H=jU(j),$=H?.width??0,D=H?.height??0,W=s+(l!=="center"?"-"+l:""),ne=typeof y=="number"?y:{top:0,right:0,bottom:0,left:0,...y},oe=Array.isArray(m)?m:[m],ie=oe.length>0,de={padding:ne,boundary:oe.filter($U),altBoundary:ie},{refs:ue,floatingStyles:ve,placement:P,isPositioned:Y,middlewareData:V}=xU({strategy:"fixed",placement:W,whileElementsMounted:(...se)=>hU(...se,{animationFrame:S==="always"}),elements:{reference:C.anchor},middleware:[RU({mainAxis:a+D,alignmentAxis:u}),h&&CU({mainAxis:!0,crossAxis:!1,limiter:g==="partial"?TU():void 0,...de}),h&&AU({...de}),OU({...de,apply:({elements:se,rects:Pe,availableWidth:Ne,availableHeight:pt})=>{const{width:Pt,height:Ut}=Pe.reference,Nt=se.floating.style;Nt.setProperty("--radix-popper-available-width",`${Ne}px`),Nt.setProperty("--radix-popper-available-height",`${pt}px`),Nt.setProperty("--radix-popper-anchor-width",`${Pt}px`),Nt.setProperty("--radix-popper-anchor-height",`${Ut}px`)}}),j&&kU({element:j,padding:f}),IU({arrowWidth:$,arrowHeight:D}),b&&MU({strategy:"referenceHidden",...de})]}),[te,be]=vx(P),N=Kn(E);Tn(()=>{Y&&N?.()},[Y,N]);const G=V.arrow?.x,ee=V.arrow?.y,re=V.arrow?.centerOffset!==0,[he,ge]=w.useState();return Tn(()=>{O&&ge(window.getComputedStyle(O).zIndex)},[O]),_.jsx("div",{ref:ue.setFloating,"data-radix-popper-content-wrapper":"",style:{...ve,transform:Y?ve.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:he,"--radix-popper-transform-origin":[V.transformOrigin?.x,V.transformOrigin?.y].join(" "),...V.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:_.jsx(DU,{scope:r,placedSide:te,onArrowChange:I,arrowX:G,arrowY:ee,shouldHideArrow:re,children:_.jsx(ht.div,{"data-side":te,"data-align":be,...x,ref:k,style:{...x.style,animation:Y?void 0:"none"}})})})});mx.displayName=_m;var gx="PopperArrow",UU={top:"bottom",right:"left",bottom:"top",left:"right"},yx=w.forwardRef(function(t,r){const{__scopePopper:s,...a}=t,l=PU(gx,s),u=UU[l.placedSide];return _.jsx("span",{ref:l.onArrowChange,style:{position:"absolute",left:l.arrowX,top:l.arrowY,[u]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[l.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[l.placedSide],visibility:l.shouldHideArrow?"hidden":void 0},children:_.jsx(zU,{...a,ref:r,style:{...a.style,display:"block"}})})});yx.displayName=gx;function $U(e){return e!==null}var IU=e=>({name:"transformOrigin",options:e,fn(t){const{placement:r,rects:s,middlewareData:a}=t,u=a.arrow?.centerOffset!==0,f=u?0:e.arrowWidth,h=u?0:e.arrowHeight,[m,y]=vx(r),g={start:"0%",center:"50%",end:"100%"}[y],b=(a.arrow?.x??0)+f/2,S=(a.arrow?.y??0)+h/2;let E="",x="";return m==="bottom"?(E=u?g:`${b}px`,x=`${-h}px`):m==="top"?(E=u?g:`${b}px`,x=`${s.floating.height+h}px`):m==="right"?(E=`${-h}px`,x=u?g:`${S}px`):m==="left"&&(E=`${s.floating.width+h}px`,x=u?g:`${S}px`),{data:{x:E,y:x}}}});function vx(e){const[t,r="center"]=e.split("-");return[t,r]}var bx=dx,xm=px,Sx=mx,wx=yx,BU="Portal",Em=w.forwardRef((e,t)=>{const{container:r,...s}=e,[a,l]=w.useState(!1);Tn(()=>l(!0),[]);const u=r||a&&globalThis?.document?.body;return u?wM.createPortal(_.jsx(ht.div,{...s,ref:t}),u):null});Em.displayName=BU;var Yh="rovingFocusGroup.onEntryFocus",qU={bubbles:!1,cancelable:!0},Ja="RovingFocusGroup",[_p,_x,VU]=Z1(Ja),[FU,xx]=os(Ja,[VU]),[HU,ZU]=FU(Ja),Ex=w.forwardRef((e,t)=>_.jsx(_p.Provider,{scope:e.__scopeRovingFocusGroup,children:_.jsx(_p.Slot,{scope:e.__scopeRovingFocusGroup,children:_.jsx(QU,{...e,ref:t})})}));Ex.displayName=Ja;var QU=w.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:s,loop:a=!1,dir:l,currentTabStopId:u,defaultCurrentTabStopId:f,onCurrentTabStopIdChange:h,onEntryFocus:m,preventScrollOnEntryFocus:y=!1,...g}=e,b=w.useRef(null),S=At(t,b),E=Q1(l),[x,C]=Uu({prop:u,defaultProp:f??null,onChange:h,caller:Ja}),[O,L]=w.useState(!1),k=Kn(m),j=_x(r),I=w.useRef(!1),[H,$]=w.useState(0);return w.useEffect(()=>{const D=b.current;if(D)return D.addEventListener(Yh,k),()=>D.removeEventListener(Yh,k)},[k]),_.jsx(HU,{scope:r,orientation:s,dir:E,loop:a,currentTabStopId:x,onItemFocus:w.useCallback(D=>C(D),[C]),onItemShiftTab:w.useCallback(()=>L(!0),[]),onFocusableItemAdd:w.useCallback(()=>$(D=>D+1),[]),onFocusableItemRemove:w.useCallback(()=>$(D=>D-1),[]),children:_.jsx(ht.div,{tabIndex:O||H===0?-1:0,"data-orientation":s,...g,ref:S,style:{outline:"none",...e.style},onMouseDown:Re(e.onMouseDown,()=>{I.current=!0}),onFocus:Re(e.onFocus,D=>{const W=!I.current;if(D.target===D.currentTarget&&W&&!O){const ne=new CustomEvent(Yh,qU);if(D.currentTarget.dispatchEvent(ne),!ne.defaultPrevented){const oe=j().filter(P=>P.focusable),ie=oe.find(P=>P.active),de=oe.find(P=>P.id===x),ve=[ie,de,...oe].filter(Boolean).map(P=>P.ref.current);Tx(ve,y)}}I.current=!1}),onBlur:Re(e.onBlur,()=>L(!1))})})}),Rx="RovingFocusGroupItem",Cx=w.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:s=!0,active:a=!1,tabStopId:l,children:u,...f}=e,h=Fa(),m=l||h,y=ZU(Rx,r),g=y.currentTabStopId===m,b=_x(r),{onFocusableItemAdd:S,onFocusableItemRemove:E,currentTabStopId:x}=y;return w.useEffect(()=>{if(s)return S(),()=>E()},[s,S,E]),_.jsx(_p.ItemSlot,{scope:r,id:m,focusable:s,active:a,children:_.jsx(ht.span,{tabIndex:g?0:-1,"data-orientation":y.orientation,...f,ref:t,onMouseDown:Re(e.onMouseDown,C=>{s?y.onItemFocus(m):C.preventDefault()}),onFocus:Re(e.onFocus,()=>y.onItemFocus(m)),onKeyDown:Re(e.onKeyDown,C=>{if(C.key==="Tab"&&C.shiftKey){y.onItemShiftTab();return}if(C.target!==C.currentTarget)return;const O=KU(C,y.orientation,y.dir);if(O!==void 0){if(C.metaKey||C.ctrlKey||C.altKey||C.shiftKey)return;C.preventDefault();let k=b().filter(j=>j.focusable).map(j=>j.ref.current);if(O==="last")k.reverse();else if(O==="prev"||O==="next"){O==="prev"&&k.reverse();const j=k.indexOf(C.currentTarget);k=y.loop?XU(k,j+1):k.slice(j+1)}setTimeout(()=>Tx(k))}}),children:typeof u=="function"?u({isCurrentTabStop:g,hasTabStop:x!=null}):u})})});Cx.displayName=Rx;var GU={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function YU(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function KU(e,t,r){const s=YU(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(s))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(s)))return GU[s]}function Tx(e,t=!1){const r=document.activeElement;for(const s of e)if(s===r||(s.focus({preventScroll:t}),document.activeElement!==r))return}function XU(e,t){return e.map((r,s)=>e[(t+s)%e.length])}var JU=Ex,WU=Cx;function e8(e){const t=t8(e),r=w.forwardRef((s,a)=>{const{children:l,...u}=s,f=w.Children.toArray(l),h=f.find(r8);if(h){const m=h.props.children,y=f.map(g=>g===h?w.Children.count(m)>1?w.Children.only(null):w.isValidElement(m)?m.props.children:null:g);return _.jsx(t,{...u,ref:a,children:w.isValidElement(m)?w.cloneElement(m,void 0,y):null})}return _.jsx(t,{...u,ref:a,children:l})});return r.displayName=`${e}.Slot`,r}function t8(e){const t=w.forwardRef((r,s)=>{const{children:a,...l}=r;if(w.isValidElement(a)){const u=s8(a),f=o8(l,a.props);return a.type!==w.Fragment&&(f.ref=s?wo(s,u):u),w.cloneElement(a,f)}return w.Children.count(a)>1?w.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var n8=Symbol("radix.slottable");function r8(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===n8}function o8(e,t){const r={...t};for(const s in t){const a=e[s],l=t[s];/^on[A-Z]/.test(s)?a&&l?r[s]=(...f)=>{const h=l(...f);return a(...f),h}:a&&(r[s]=a):s==="style"?r[s]={...a,...l}:s==="className"&&(r[s]=[a,l].filter(Boolean).join(" "))}return{...e,...r}}function s8(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var i8=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ys=new WeakMap,Dl=new WeakMap,Pl={},Kh=0,Ax=function(e){return e&&(e.host||Ax(e.parentNode))},a8=function(e,t){return t.map(function(r){if(e.contains(r))return r;var s=Ax(r);return s&&e.contains(s)?s:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},c8=function(e,t,r,s){var a=a8(t,Array.isArray(e)?e:[e]);Pl[r]||(Pl[r]=new WeakMap);var l=Pl[r],u=[],f=new Set,h=new Set(a),m=function(g){!g||f.has(g)||(f.add(g),m(g.parentNode))};a.forEach(m);var y=function(g){!g||h.has(g)||Array.prototype.forEach.call(g.children,function(b){if(f.has(b))y(b);else try{var S=b.getAttribute(s),E=S!==null&&S!=="false",x=(Ys.get(b)||0)+1,C=(l.get(b)||0)+1;Ys.set(b,x),l.set(b,C),u.push(b),x===1&&E&&Dl.set(b,!0),C===1&&b.setAttribute(r,"true"),E||b.setAttribute(s,"true")}catch(O){console.error("aria-hidden: cannot operate on ",b,O)}})};return y(t),f.clear(),Kh++,function(){u.forEach(function(g){var b=Ys.get(g)-1,S=l.get(g)-1;Ys.set(g,b),l.set(g,S),b||(Dl.has(g)||g.removeAttribute(s),Dl.delete(g)),S||g.removeAttribute(r)}),Kh--,Kh||(Ys=new WeakMap,Ys=new WeakMap,Dl=new WeakMap,Pl={})}},Ox=function(e,t,r){r===void 0&&(r="data-aria-hidden");var s=Array.from(Array.isArray(e)?e:[e]),a=i8(e);return a?(s.push.apply(s,Array.from(a.querySelectorAll("[aria-live], script"))),c8(s,a,r,"aria-hidden")):function(){return null}},Hn=function(){return Hn=Object.assign||function(t){for(var r,s=1,a=arguments.length;s<a;s++){r=arguments[s];for(var l in r)Object.prototype.hasOwnProperty.call(r,l)&&(t[l]=r[l])}return t},Hn.apply(this,arguments)};function Mx(e,t){var r={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(r[s]=e[s]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,s=Object.getOwnPropertySymbols(e);a<s.length;a++)t.indexOf(s[a])<0&&Object.prototype.propertyIsEnumerable.call(e,s[a])&&(r[s[a]]=e[s[a]]);return r}function l8(e,t,r){if(r||arguments.length===2)for(var s=0,a=t.length,l;s<a;s++)(l||!(s in t))&&(l||(l=Array.prototype.slice.call(t,0,s)),l[s]=t[s]);return e.concat(l||Array.prototype.slice.call(t))}var Hl="right-scroll-bar-position",Zl="width-before-scroll-bar",u8="with-scroll-bars-hidden",f8="--removed-body-scroll-bar-size";function Xh(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function d8(e,t){var r=w.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(s){var a=r.value;a!==s&&(r.value=s,r.callback(s,a))}}}})[0];return r.callback=t,r.facade}var h8=typeof window<"u"?w.useLayoutEffect:w.useEffect,PS=new WeakMap;function p8(e,t){var r=d8(null,function(s){return e.forEach(function(a){return Xh(a,s)})});return h8(function(){var s=PS.get(r);if(s){var a=new Set(s),l=new Set(e),u=r.current;a.forEach(function(f){l.has(f)||Xh(f,null)}),l.forEach(function(f){a.has(f)||Xh(f,u)})}PS.set(r,e)},[e]),r}function m8(e){return e}function g8(e,t){t===void 0&&(t=m8);var r=[],s=!1,a={read:function(){if(s)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(l){var u=t(l,s);return r.push(u),function(){r=r.filter(function(f){return f!==u})}},assignSyncMedium:function(l){for(s=!0;r.length;){var u=r;r=[],u.forEach(l)}r={push:function(f){return l(f)},filter:function(){return r}}},assignMedium:function(l){s=!0;var u=[];if(r.length){var f=r;r=[],f.forEach(l),u=r}var h=function(){var y=u;u=[],y.forEach(l)},m=function(){return Promise.resolve().then(h)};m(),r={push:function(y){u.push(y),m()},filter:function(y){return u=u.filter(y),r}}}};return a}function y8(e){e===void 0&&(e={});var t=g8(null);return t.options=Hn({async:!0,ssr:!1},e),t}var kx=function(e){var t=e.sideCar,r=Mx(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var s=t.read();if(!s)throw new Error("Sidecar medium not found");return w.createElement(s,Hn({},r))};kx.isSideCarExport=!0;function v8(e,t){return e.useMedium(t),kx}var Nx=y8(),Jh=function(){},Hu=w.forwardRef(function(e,t){var r=w.useRef(null),s=w.useState({onScrollCapture:Jh,onWheelCapture:Jh,onTouchMoveCapture:Jh}),a=s[0],l=s[1],u=e.forwardProps,f=e.children,h=e.className,m=e.removeScrollBar,y=e.enabled,g=e.shards,b=e.sideCar,S=e.noRelative,E=e.noIsolation,x=e.inert,C=e.allowPinchZoom,O=e.as,L=O===void 0?"div":O,k=e.gapMode,j=Mx(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),I=b,H=p8([r,t]),$=Hn(Hn({},j),a);return w.createElement(w.Fragment,null,y&&w.createElement(I,{sideCar:Nx,removeScrollBar:m,shards:g,noRelative:S,noIsolation:E,inert:x,setCallbacks:l,allowPinchZoom:!!C,lockRef:r,gapMode:k}),u?w.cloneElement(w.Children.only(f),Hn(Hn({},$),{ref:H})):w.createElement(L,Hn({},$,{className:h,ref:H}),f))});Hu.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Hu.classNames={fullWidth:Zl,zeroRight:Hl};var b8=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function S8(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=b8();return t&&e.setAttribute("nonce",t),e}function w8(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function _8(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var x8=function(){var e=0,t=null;return{add:function(r){e==0&&(t=S8())&&(w8(t,r),_8(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},E8=function(){var e=x8();return function(t,r){w.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},zx=function(){var e=E8(),t=function(r){var s=r.styles,a=r.dynamic;return e(s,a),null};return t},R8={left:0,top:0,right:0,gap:0},Wh=function(e){return parseInt(e||"",10)||0},C8=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],s=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[Wh(r),Wh(s),Wh(a)]},T8=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return R8;var t=C8(e),r=document.documentElement.clientWidth,s=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,s-r+t[2]-t[0])}},A8=zx(),di="data-scroll-locked",O8=function(e,t,r,s){var a=e.left,l=e.top,u=e.right,f=e.gap;return r===void 0&&(r="margin"),`
|
|
58
|
-
.`.concat(u8,` {
|
|
59
|
-
overflow: hidden `).concat(s,`;
|
|
60
|
-
padding-right: `).concat(f,"px ").concat(s,`;
|
|
61
|
-
}
|
|
62
|
-
body[`).concat(di,`] {
|
|
63
|
-
overflow: hidden `).concat(s,`;
|
|
64
|
-
overscroll-behavior: contain;
|
|
65
|
-
`).concat([t&&"position: relative ".concat(s,";"),r==="margin"&&`
|
|
66
|
-
padding-left: `.concat(a,`px;
|
|
67
|
-
padding-top: `).concat(l,`px;
|
|
68
|
-
padding-right: `).concat(u,`px;
|
|
69
|
-
margin-left:0;
|
|
70
|
-
margin-top:0;
|
|
71
|
-
margin-right: `).concat(f,"px ").concat(s,`;
|
|
72
|
-
`),r==="padding"&&"padding-right: ".concat(f,"px ").concat(s,";")].filter(Boolean).join(""),`
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.`).concat(Hl,` {
|
|
76
|
-
right: `).concat(f,"px ").concat(s,`;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.`).concat(Zl,` {
|
|
80
|
-
margin-right: `).concat(f,"px ").concat(s,`;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.`).concat(Hl," .").concat(Hl,` {
|
|
84
|
-
right: 0 `).concat(s,`;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.`).concat(Zl," .").concat(Zl,` {
|
|
88
|
-
margin-right: 0 `).concat(s,`;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
body[`).concat(di,`] {
|
|
92
|
-
`).concat(f8,": ").concat(f,`px;
|
|
93
|
-
}
|
|
94
|
-
`)},US=function(){var e=parseInt(document.body.getAttribute(di)||"0",10);return isFinite(e)?e:0},M8=function(){w.useEffect(function(){return document.body.setAttribute(di,(US()+1).toString()),function(){var e=US()-1;e<=0?document.body.removeAttribute(di):document.body.setAttribute(di,e.toString())}},[])},k8=function(e){var t=e.noRelative,r=e.noImportant,s=e.gapMode,a=s===void 0?"margin":s;M8();var l=w.useMemo(function(){return T8(a)},[a]);return w.createElement(A8,{styles:O8(l,!t,a,r?"":"!important")})},xp=!1;if(typeof window<"u")try{var Ul=Object.defineProperty({},"passive",{get:function(){return xp=!0,!0}});window.addEventListener("test",Ul,Ul),window.removeEventListener("test",Ul,Ul)}catch{xp=!1}var Ks=xp?{passive:!1}:!1,N8=function(e){return e.tagName==="TEXTAREA"},jx=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!N8(e)&&r[t]==="visible")},z8=function(e){return jx(e,"overflowY")},j8=function(e){return jx(e,"overflowX")},$S=function(e,t){var r=t.ownerDocument,s=t;do{typeof ShadowRoot<"u"&&s instanceof ShadowRoot&&(s=s.host);var a=Lx(e,s);if(a){var l=Dx(e,s),u=l[1],f=l[2];if(u>f)return!0}s=s.parentNode}while(s&&s!==r.body);return!1},L8=function(e){var t=e.scrollTop,r=e.scrollHeight,s=e.clientHeight;return[t,r,s]},D8=function(e){var t=e.scrollLeft,r=e.scrollWidth,s=e.clientWidth;return[t,r,s]},Lx=function(e,t){return e==="v"?z8(t):j8(t)},Dx=function(e,t){return e==="v"?L8(t):D8(t)},P8=function(e,t){return e==="h"&&t==="rtl"?-1:1},U8=function(e,t,r,s,a){var l=P8(e,window.getComputedStyle(t).direction),u=l*s,f=r.target,h=t.contains(f),m=!1,y=u>0,g=0,b=0;do{if(!f)break;var S=Dx(e,f),E=S[0],x=S[1],C=S[2],O=x-C-l*E;(E||O)&&Lx(e,f)&&(g+=O,b+=E);var L=f.parentNode;f=L&&L.nodeType===Node.DOCUMENT_FRAGMENT_NODE?L.host:L}while(!h&&f!==document.body||h&&(t.contains(f)||t===f));return(y&&Math.abs(g)<1||!y&&Math.abs(b)<1)&&(m=!0),m},$l=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},IS=function(e){return[e.deltaX,e.deltaY]},BS=function(e){return e&&"current"in e?e.current:e},$8=function(e,t){return e[0]===t[0]&&e[1]===t[1]},I8=function(e){return`
|
|
95
|
-
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
96
|
-
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
97
|
-
`)},B8=0,Xs=[];function q8(e){var t=w.useRef([]),r=w.useRef([0,0]),s=w.useRef(),a=w.useState(B8++)[0],l=w.useState(zx)[0],u=w.useRef(e);w.useEffect(function(){u.current=e},[e]),w.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var x=l8([e.lockRef.current],(e.shards||[]).map(BS),!0).filter(Boolean);return x.forEach(function(C){return C.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),x.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var f=w.useCallback(function(x,C){if("touches"in x&&x.touches.length===2||x.type==="wheel"&&x.ctrlKey)return!u.current.allowPinchZoom;var O=$l(x),L=r.current,k="deltaX"in x?x.deltaX:L[0]-O[0],j="deltaY"in x?x.deltaY:L[1]-O[1],I,H=x.target,$=Math.abs(k)>Math.abs(j)?"h":"v";if("touches"in x&&$==="h"&&H.type==="range")return!1;var D=window.getSelection(),W=D&&D.anchorNode,ne=W?W===H||W.contains(H):!1;if(ne)return!1;var oe=$S($,H);if(!oe)return!0;if(oe?I=$:(I=$==="v"?"h":"v",oe=$S($,H)),!oe)return!1;if(!s.current&&"changedTouches"in x&&(k||j)&&(s.current=I),!I)return!0;var ie=s.current||I;return U8(ie,C,x,ie==="h"?k:j)},[]),h=w.useCallback(function(x){var C=x;if(!(!Xs.length||Xs[Xs.length-1]!==l)){var O="deltaY"in C?IS(C):$l(C),L=t.current.filter(function(I){return I.name===C.type&&(I.target===C.target||C.target===I.shadowParent)&&$8(I.delta,O)})[0];if(L&&L.should){C.cancelable&&C.preventDefault();return}if(!L){var k=(u.current.shards||[]).map(BS).filter(Boolean).filter(function(I){return I.contains(C.target)}),j=k.length>0?f(C,k[0]):!u.current.noIsolation;j&&C.cancelable&&C.preventDefault()}}},[]),m=w.useCallback(function(x,C,O,L){var k={name:x,delta:C,target:O,should:L,shadowParent:V8(O)};t.current.push(k),setTimeout(function(){t.current=t.current.filter(function(j){return j!==k})},1)},[]),y=w.useCallback(function(x){r.current=$l(x),s.current=void 0},[]),g=w.useCallback(function(x){m(x.type,IS(x),x.target,f(x,e.lockRef.current))},[]),b=w.useCallback(function(x){m(x.type,$l(x),x.target,f(x,e.lockRef.current))},[]);w.useEffect(function(){return Xs.push(l),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:b}),document.addEventListener("wheel",h,Ks),document.addEventListener("touchmove",h,Ks),document.addEventListener("touchstart",y,Ks),function(){Xs=Xs.filter(function(x){return x!==l}),document.removeEventListener("wheel",h,Ks),document.removeEventListener("touchmove",h,Ks),document.removeEventListener("touchstart",y,Ks)}},[]);var S=e.removeScrollBar,E=e.inert;return w.createElement(w.Fragment,null,E?w.createElement(l,{styles:I8(a)}):null,S?w.createElement(k8,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function V8(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const F8=v8(Nx,q8);var Rm=w.forwardRef(function(e,t){return w.createElement(Hu,Hn({},e,{ref:t,sideCar:F8}))});Rm.classNames=Hu.classNames;var Ep=["Enter"," "],H8=["ArrowDown","PageUp","Home"],Px=["ArrowUp","PageDown","End"],Z8=[...H8,...Px],Q8={ltr:[...Ep,"ArrowRight"],rtl:[...Ep,"ArrowLeft"]},G8={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Wa="Menu",[Qa,Y8,K8]=Z1(Wa),[ss,Ux]=os(Wa,[K8,Fu,xx]),Zu=Fu(),$x=xx(),[X8,is]=ss(Wa),[J8,ec]=ss(Wa),Ix=e=>{const{__scopeMenu:t,open:r=!1,children:s,dir:a,onOpenChange:l,modal:u=!0}=e,f=Zu(t),[h,m]=w.useState(null),y=w.useRef(!1),g=Kn(l),b=Q1(a);return w.useEffect(()=>{const S=()=>{y.current=!0,document.addEventListener("pointerdown",E,{capture:!0,once:!0}),document.addEventListener("pointermove",E,{capture:!0,once:!0})},E=()=>y.current=!1;return document.addEventListener("keydown",S,{capture:!0}),()=>{document.removeEventListener("keydown",S,{capture:!0}),document.removeEventListener("pointerdown",E,{capture:!0}),document.removeEventListener("pointermove",E,{capture:!0})}},[]),_.jsx(bx,{...f,children:_.jsx(X8,{scope:t,open:r,onOpenChange:g,content:h,onContentChange:m,children:_.jsx(J8,{scope:t,onClose:w.useCallback(()=>g(!1),[g]),isUsingKeyboardRef:y,dir:b,modal:u,children:s})})})};Ix.displayName=Wa;var W8="MenuAnchor",Cm=w.forwardRef((e,t)=>{const{__scopeMenu:r,...s}=e,a=Zu(r);return _.jsx(xm,{...a,...s,ref:t})});Cm.displayName=W8;var Tm="MenuPortal",[e$,Bx]=ss(Tm,{forceMount:void 0}),qx=e=>{const{__scopeMenu:t,forceMount:r,children:s,container:a}=e,l=is(Tm,t);return _.jsx(e$,{scope:t,forceMount:r,children:_.jsx(_o,{present:r||l.open,children:_.jsx(Em,{asChild:!0,container:a,children:s})})})};qx.displayName=Tm;var Rn="MenuContent",[t$,Am]=ss(Rn),Vx=w.forwardRef((e,t)=>{const r=Bx(Rn,e.__scopeMenu),{forceMount:s=r.forceMount,...a}=e,l=is(Rn,e.__scopeMenu),u=ec(Rn,e.__scopeMenu);return _.jsx(Qa.Provider,{scope:e.__scopeMenu,children:_.jsx(_o,{present:s||l.open,children:_.jsx(Qa.Slot,{scope:e.__scopeMenu,children:u.modal?_.jsx(n$,{...a,ref:t}):_.jsx(r$,{...a,ref:t})})})})}),n$=w.forwardRef((e,t)=>{const r=is(Rn,e.__scopeMenu),s=w.useRef(null),a=At(t,s);return w.useEffect(()=>{const l=s.current;if(l)return Ox(l)},[]),_.jsx(Om,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:Re(e.onFocusOutside,l=>l.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),r$=w.forwardRef((e,t)=>{const r=is(Rn,e.__scopeMenu);return _.jsx(Om,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),o$=e8("MenuContent.ScrollLock"),Om=w.forwardRef((e,t)=>{const{__scopeMenu:r,loop:s=!1,trapFocus:a,onOpenAutoFocus:l,onCloseAutoFocus:u,disableOutsidePointerEvents:f,onEntryFocus:h,onEscapeKeyDown:m,onPointerDownOutside:y,onFocusOutside:g,onInteractOutside:b,onDismiss:S,disableOutsideScroll:E,...x}=e,C=is(Rn,r),O=ec(Rn,r),L=Zu(r),k=$x(r),j=Y8(r),[I,H]=w.useState(null),$=w.useRef(null),D=At(t,$,C.onContentChange),W=w.useRef(0),ne=w.useRef(""),oe=w.useRef(0),ie=w.useRef(null),de=w.useRef("right"),ue=w.useRef(0),ve=E?Rm:w.Fragment,P=E?{as:o$,allowPinchZoom:!0}:void 0,Y=te=>{const be=ne.current+te,N=j().filter(se=>!se.disabled),G=document.activeElement,ee=N.find(se=>se.ref.current===G)?.textValue,re=N.map(se=>se.textValue),he=g$(re,be,ee),ge=N.find(se=>se.textValue===he)?.ref.current;(function se(Pe){ne.current=Pe,window.clearTimeout(W.current),Pe!==""&&(W.current=window.setTimeout(()=>se(""),1e3))})(be),ge&&setTimeout(()=>ge.focus())};w.useEffect(()=>()=>window.clearTimeout(W.current),[]),K1();const V=w.useCallback(te=>de.current===ie.current?.side&&v$(te,ie.current?.area),[]);return _.jsx(t$,{scope:r,searchRef:ne,onItemEnter:w.useCallback(te=>{V(te)&&te.preventDefault()},[V]),onItemLeave:w.useCallback(te=>{V(te)||($.current?.focus(),H(null))},[V]),onTriggerLeave:w.useCallback(te=>{V(te)&&te.preventDefault()},[V]),pointerGraceTimerRef:oe,onPointerGraceIntentChange:w.useCallback(te=>{ie.current=te},[]),children:_.jsx(ve,{...P,children:_.jsx(pm,{asChild:!0,trapped:a,onMountAutoFocus:Re(l,te=>{te.preventDefault(),$.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:u,children:_.jsx(hm,{asChild:!0,disableOutsidePointerEvents:f,onEscapeKeyDown:m,onPointerDownOutside:y,onFocusOutside:g,onInteractOutside:b,onDismiss:S,children:_.jsx(JU,{asChild:!0,...k,dir:O.dir,orientation:"vertical",loop:s,currentTabStopId:I,onCurrentTabStopIdChange:H,onEntryFocus:Re(h,te=>{O.isUsingKeyboardRef.current||te.preventDefault()}),preventScrollOnEntryFocus:!0,children:_.jsx(Sx,{role:"menu","aria-orientation":"vertical","data-state":sE(C.open),"data-radix-menu-content":"",dir:O.dir,...L,...x,ref:D,style:{outline:"none",...x.style},onKeyDown:Re(x.onKeyDown,te=>{const N=te.target.closest("[data-radix-menu-content]")===te.currentTarget,G=te.ctrlKey||te.altKey||te.metaKey,ee=te.key.length===1;N&&(te.key==="Tab"&&te.preventDefault(),!G&&ee&&Y(te.key));const re=$.current;if(te.target!==re||!Z8.includes(te.key))return;te.preventDefault();const ge=j().filter(se=>!se.disabled).map(se=>se.ref.current);Px.includes(te.key)&&ge.reverse(),p$(ge)}),onBlur:Re(e.onBlur,te=>{te.currentTarget.contains(te.target)||(window.clearTimeout(W.current),ne.current="")}),onPointerMove:Re(e.onPointerMove,Ga(te=>{const be=te.target,N=ue.current!==te.clientX;if(te.currentTarget.contains(be)&&N){const G=te.clientX>ue.current?"right":"left";de.current=G,ue.current=te.clientX}}))})})})})})})});Vx.displayName=Rn;var s$="MenuGroup",Mm=w.forwardRef((e,t)=>{const{__scopeMenu:r,...s}=e;return _.jsx(ht.div,{role:"group",...s,ref:t})});Mm.displayName=s$;var i$="MenuLabel",Fx=w.forwardRef((e,t)=>{const{__scopeMenu:r,...s}=e;return _.jsx(ht.div,{...s,ref:t})});Fx.displayName=i$;var Su="MenuItem",qS="menu.itemSelect",Qu=w.forwardRef((e,t)=>{const{disabled:r=!1,onSelect:s,...a}=e,l=w.useRef(null),u=ec(Su,e.__scopeMenu),f=Am(Su,e.__scopeMenu),h=At(t,l),m=w.useRef(!1),y=()=>{const g=l.current;if(!r&&g){const b=new CustomEvent(qS,{bubbles:!0,cancelable:!0});g.addEventListener(qS,S=>s?.(S),{once:!0}),U1(g,b),b.defaultPrevented?m.current=!1:u.onClose()}};return _.jsx(Hx,{...a,ref:h,disabled:r,onClick:Re(e.onClick,y),onPointerDown:g=>{e.onPointerDown?.(g),m.current=!0},onPointerUp:Re(e.onPointerUp,g=>{m.current||g.currentTarget?.click()}),onKeyDown:Re(e.onKeyDown,g=>{const b=f.searchRef.current!=="";r||b&&g.key===" "||Ep.includes(g.key)&&(g.currentTarget.click(),g.preventDefault())})})});Qu.displayName=Su;var Hx=w.forwardRef((e,t)=>{const{__scopeMenu:r,disabled:s=!1,textValue:a,...l}=e,u=Am(Su,r),f=$x(r),h=w.useRef(null),m=At(t,h),[y,g]=w.useState(!1),[b,S]=w.useState("");return w.useEffect(()=>{const E=h.current;E&&S((E.textContent??"").trim())},[l.children]),_.jsx(Qa.ItemSlot,{scope:r,disabled:s,textValue:a??b,children:_.jsx(WU,{asChild:!0,...f,focusable:!s,children:_.jsx(ht.div,{role:"menuitem","data-highlighted":y?"":void 0,"aria-disabled":s||void 0,"data-disabled":s?"":void 0,...l,ref:m,onPointerMove:Re(e.onPointerMove,Ga(E=>{s?u.onItemLeave(E):(u.onItemEnter(E),E.defaultPrevented||E.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Re(e.onPointerLeave,Ga(E=>u.onItemLeave(E))),onFocus:Re(e.onFocus,()=>g(!0)),onBlur:Re(e.onBlur,()=>g(!1))})})})}),a$="MenuCheckboxItem",Zx=w.forwardRef((e,t)=>{const{checked:r=!1,onCheckedChange:s,...a}=e;return _.jsx(Xx,{scope:e.__scopeMenu,checked:r,children:_.jsx(Qu,{role:"menuitemcheckbox","aria-checked":wu(r)?"mixed":r,...a,ref:t,"data-state":Nm(r),onSelect:Re(a.onSelect,()=>s?.(wu(r)?!0:!r),{checkForDefaultPrevented:!1})})})});Zx.displayName=a$;var Qx="MenuRadioGroup",[c$,l$]=ss(Qx,{value:void 0,onValueChange:()=>{}}),Gx=w.forwardRef((e,t)=>{const{value:r,onValueChange:s,...a}=e,l=Kn(s);return _.jsx(c$,{scope:e.__scopeMenu,value:r,onValueChange:l,children:_.jsx(Mm,{...a,ref:t})})});Gx.displayName=Qx;var Yx="MenuRadioItem",Kx=w.forwardRef((e,t)=>{const{value:r,...s}=e,a=l$(Yx,e.__scopeMenu),l=r===a.value;return _.jsx(Xx,{scope:e.__scopeMenu,checked:l,children:_.jsx(Qu,{role:"menuitemradio","aria-checked":l,...s,ref:t,"data-state":Nm(l),onSelect:Re(s.onSelect,()=>a.onValueChange?.(r),{checkForDefaultPrevented:!1})})})});Kx.displayName=Yx;var km="MenuItemIndicator",[Xx,u$]=ss(km,{checked:!1}),Jx=w.forwardRef((e,t)=>{const{__scopeMenu:r,forceMount:s,...a}=e,l=u$(km,r);return _.jsx(_o,{present:s||wu(l.checked)||l.checked===!0,children:_.jsx(ht.span,{...a,ref:t,"data-state":Nm(l.checked)})})});Jx.displayName=km;var f$="MenuSeparator",Wx=w.forwardRef((e,t)=>{const{__scopeMenu:r,...s}=e;return _.jsx(ht.div,{role:"separator","aria-orientation":"horizontal",...s,ref:t})});Wx.displayName=f$;var d$="MenuArrow",eE=w.forwardRef((e,t)=>{const{__scopeMenu:r,...s}=e,a=Zu(r);return _.jsx(wx,{...a,...s,ref:t})});eE.displayName=d$;var h$="MenuSub",[u9,tE]=ss(h$),Ma="MenuSubTrigger",nE=w.forwardRef((e,t)=>{const r=is(Ma,e.__scopeMenu),s=ec(Ma,e.__scopeMenu),a=tE(Ma,e.__scopeMenu),l=Am(Ma,e.__scopeMenu),u=w.useRef(null),{pointerGraceTimerRef:f,onPointerGraceIntentChange:h}=l,m={__scopeMenu:e.__scopeMenu},y=w.useCallback(()=>{u.current&&window.clearTimeout(u.current),u.current=null},[]);return w.useEffect(()=>y,[y]),w.useEffect(()=>{const g=f.current;return()=>{window.clearTimeout(g),h(null)}},[f,h]),_.jsx(Cm,{asChild:!0,...m,children:_.jsx(Hx,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":a.contentId,"data-state":sE(r.open),...e,ref:wo(t,a.onTriggerChange),onClick:g=>{e.onClick?.(g),!(e.disabled||g.defaultPrevented)&&(g.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:Re(e.onPointerMove,Ga(g=>{l.onItemEnter(g),!g.defaultPrevented&&!e.disabled&&!r.open&&!u.current&&(l.onPointerGraceIntentChange(null),u.current=window.setTimeout(()=>{r.onOpenChange(!0),y()},100))})),onPointerLeave:Re(e.onPointerLeave,Ga(g=>{y();const b=r.content?.getBoundingClientRect();if(b){const S=r.content?.dataset.side,E=S==="right",x=E?-5:5,C=b[E?"left":"right"],O=b[E?"right":"left"];l.onPointerGraceIntentChange({area:[{x:g.clientX+x,y:g.clientY},{x:C,y:b.top},{x:O,y:b.top},{x:O,y:b.bottom},{x:C,y:b.bottom}],side:S}),window.clearTimeout(f.current),f.current=window.setTimeout(()=>l.onPointerGraceIntentChange(null),300)}else{if(l.onTriggerLeave(g),g.defaultPrevented)return;l.onPointerGraceIntentChange(null)}})),onKeyDown:Re(e.onKeyDown,g=>{const b=l.searchRef.current!=="";e.disabled||b&&g.key===" "||Q8[s.dir].includes(g.key)&&(r.onOpenChange(!0),r.content?.focus(),g.preventDefault())})})})});nE.displayName=Ma;var rE="MenuSubContent",oE=w.forwardRef((e,t)=>{const r=Bx(Rn,e.__scopeMenu),{forceMount:s=r.forceMount,...a}=e,l=is(Rn,e.__scopeMenu),u=ec(Rn,e.__scopeMenu),f=tE(rE,e.__scopeMenu),h=w.useRef(null),m=At(t,h);return _.jsx(Qa.Provider,{scope:e.__scopeMenu,children:_.jsx(_o,{present:s||l.open,children:_.jsx(Qa.Slot,{scope:e.__scopeMenu,children:_.jsx(Om,{id:f.contentId,"aria-labelledby":f.triggerId,...a,ref:m,align:"start",side:u.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:y=>{u.isUsingKeyboardRef.current&&h.current?.focus(),y.preventDefault()},onCloseAutoFocus:y=>y.preventDefault(),onFocusOutside:Re(e.onFocusOutside,y=>{y.target!==f.trigger&&l.onOpenChange(!1)}),onEscapeKeyDown:Re(e.onEscapeKeyDown,y=>{u.onClose(),y.preventDefault()}),onKeyDown:Re(e.onKeyDown,y=>{const g=y.currentTarget.contains(y.target),b=G8[u.dir].includes(y.key);g&&b&&(l.onOpenChange(!1),f.trigger?.focus(),y.preventDefault())})})})})})});oE.displayName=rE;function sE(e){return e?"open":"closed"}function wu(e){return e==="indeterminate"}function Nm(e){return wu(e)?"indeterminate":e?"checked":"unchecked"}function p$(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function m$(e,t){return e.map((r,s)=>e[(t+s)%e.length])}function g$(e,t,r){const a=t.length>1&&Array.from(t).every(m=>m===t[0])?t[0]:t,l=r?e.indexOf(r):-1;let u=m$(e,Math.max(l,0));a.length===1&&(u=u.filter(m=>m!==r));const h=u.find(m=>m.toLowerCase().startsWith(a.toLowerCase()));return h!==r?h:void 0}function y$(e,t){const{x:r,y:s}=e;let a=!1;for(let l=0,u=t.length-1;l<t.length;u=l++){const f=t[l],h=t[u],m=f.x,y=f.y,g=h.x,b=h.y;y>s!=b>s&&r<(g-m)*(s-y)/(b-y)+m&&(a=!a)}return a}function v$(e,t){if(!t)return!1;const r={x:e.clientX,y:e.clientY};return y$(r,t)}function Ga(e){return t=>t.pointerType==="mouse"?e(t):void 0}var b$=Ix,S$=Cm,w$=qx,_$=Vx,x$=Mm,E$=Fx,R$=Qu,C$=Zx,T$=Gx,A$=Kx,O$=Jx,M$=Wx,k$=eE,N$=nE,z$=oE,Gu="DropdownMenu",[j$]=os(Gu,[Ux]),Dt=Ux(),[L$,iE]=j$(Gu),aE=e=>{const{__scopeDropdownMenu:t,children:r,dir:s,open:a,defaultOpen:l,onOpenChange:u,modal:f=!0}=e,h=Dt(t),m=w.useRef(null),[y,g]=Uu({prop:a,defaultProp:l??!1,onChange:u,caller:Gu});return _.jsx(L$,{scope:t,triggerId:Fa(),triggerRef:m,contentId:Fa(),open:y,onOpenChange:g,onOpenToggle:w.useCallback(()=>g(b=>!b),[g]),modal:f,children:_.jsx(b$,{...h,open:y,onOpenChange:g,dir:s,modal:f,children:r})})};aE.displayName=Gu;var cE="DropdownMenuTrigger",lE=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,disabled:s=!1,...a}=e,l=iE(cE,r),u=Dt(r);return _.jsx(S$,{asChild:!0,...u,children:_.jsx(ht.button,{type:"button",id:l.triggerId,"aria-haspopup":"menu","aria-expanded":l.open,"aria-controls":l.open?l.contentId:void 0,"data-state":l.open?"open":"closed","data-disabled":s?"":void 0,disabled:s,...a,ref:wo(t,l.triggerRef),onPointerDown:Re(e.onPointerDown,f=>{!s&&f.button===0&&f.ctrlKey===!1&&(l.onOpenToggle(),l.open||f.preventDefault())}),onKeyDown:Re(e.onKeyDown,f=>{s||(["Enter"," "].includes(f.key)&&l.onOpenToggle(),f.key==="ArrowDown"&&l.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(f.key)&&f.preventDefault())})})})});lE.displayName=cE;var D$="DropdownMenuPortal",uE=e=>{const{__scopeDropdownMenu:t,...r}=e,s=Dt(t);return _.jsx(w$,{...s,...r})};uE.displayName=D$;var fE="DropdownMenuContent",dE=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...s}=e,a=iE(fE,r),l=Dt(r),u=w.useRef(!1);return _.jsx(_$,{id:a.contentId,"aria-labelledby":a.triggerId,...l,...s,ref:t,onCloseAutoFocus:Re(e.onCloseAutoFocus,f=>{u.current||a.triggerRef.current?.focus(),u.current=!1,f.preventDefault()}),onInteractOutside:Re(e.onInteractOutside,f=>{const h=f.detail.originalEvent,m=h.button===0&&h.ctrlKey===!0,y=h.button===2||m;(!a.modal||y)&&(u.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});dE.displayName=fE;var P$="DropdownMenuGroup",U$=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...s}=e,a=Dt(r);return _.jsx(x$,{...a,...s,ref:t})});U$.displayName=P$;var $$="DropdownMenuLabel",hE=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...s}=e,a=Dt(r);return _.jsx(E$,{...a,...s,ref:t})});hE.displayName=$$;var I$="DropdownMenuItem",pE=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...s}=e,a=Dt(r);return _.jsx(R$,{...a,...s,ref:t})});pE.displayName=I$;var B$="DropdownMenuCheckboxItem",q$=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...s}=e,a=Dt(r);return _.jsx(C$,{...a,...s,ref:t})});q$.displayName=B$;var V$="DropdownMenuRadioGroup",F$=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...s}=e,a=Dt(r);return _.jsx(T$,{...a,...s,ref:t})});F$.displayName=V$;var H$="DropdownMenuRadioItem",Z$=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...s}=e,a=Dt(r);return _.jsx(A$,{...a,...s,ref:t})});Z$.displayName=H$;var Q$="DropdownMenuItemIndicator",G$=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...s}=e,a=Dt(r);return _.jsx(O$,{...a,...s,ref:t})});G$.displayName=Q$;var Y$="DropdownMenuSeparator",mE=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...s}=e,a=Dt(r);return _.jsx(M$,{...a,...s,ref:t})});mE.displayName=Y$;var K$="DropdownMenuArrow",X$=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...s}=e,a=Dt(r);return _.jsx(k$,{...a,...s,ref:t})});X$.displayName=K$;var J$="DropdownMenuSubTrigger",W$=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...s}=e,a=Dt(r);return _.jsx(N$,{...a,...s,ref:t})});W$.displayName=J$;var eI="DropdownMenuSubContent",tI=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...s}=e,a=Dt(r);return _.jsx(z$,{...a,...s,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});tI.displayName=eI;var nI=aE,rI=lE,oI=uE,sI=dE,iI=hE,aI=pE,cI=mE;function lI({...e}){return _.jsx(nI,{"data-slot":"dropdown-menu",...e})}function uI({...e}){return _.jsx(rI,{"data-slot":"dropdown-menu-trigger",...e})}function fI({className:e,sideOffset:t=4,...r}){return _.jsx(oI,{children:_.jsx(sI,{"data-slot":"dropdown-menu-content",sideOffset:t,className:_t("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...r})})}function VS({className:e,inset:t,variant:r="default",...s}){return _.jsx(aI,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":r,className:_t("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...s})}function dI({className:e,inset:t,...r}){return _.jsx(iI,{"data-slot":"dropdown-menu-label","data-inset":t,className:_t("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...r})}function FS({className:e,...t}){return _.jsx(cI,{"data-slot":"dropdown-menu-separator",className:_t("bg-border -mx-1 my-1 h-px",e),...t})}function hI(e,t=[]){let r=[];function s(l,u){const f=w.createContext(u);f.displayName=l+"Context";const h=r.length;r=[...r,u];const m=g=>{const{scope:b,children:S,...E}=g,x=b?.[e]?.[h]||f,C=w.useMemo(()=>E,Object.values(E));return _.jsx(x.Provider,{value:C,children:S})};m.displayName=l+"Provider";function y(g,b){const S=b?.[e]?.[h]||f,E=w.useContext(S);if(E)return E;if(u!==void 0)return u;throw new Error(`\`${g}\` must be used within \`${l}\``)}return[m,y]}const a=()=>{const l=r.map(u=>w.createContext(u));return function(f){const h=f?.[e]||l;return w.useMemo(()=>({[`__scope${e}`]:{...f,[e]:h}}),[f,h])}};return a.scopeName=e,[s,pI(a,...t)]}function pI(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const s=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(l){const u=s.reduce((f,{useScope:h,scopeName:m})=>{const g=h(l)[`__scope${m}`];return{...f,...g}},{});return w.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])}};return r.scopeName=t.scopeName,r}var mI=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],zm=mI.reduce((e,t)=>{const r=F1(`Primitive.${t}`),s=w.forwardRef((a,l)=>{const{asChild:u,...f}=a,h=u?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),_.jsx(h,{...f,ref:l})});return s.displayName=`Primitive.${t}`,{...e,[t]:s}},{}),gI=o_();function yI(){return gI.useSyncExternalStore(vI,()=>!0,()=>!1)}function vI(){return()=>{}}var jm="Avatar",[bI]=hI(jm),[SI,gE]=bI(jm),yE=w.forwardRef((e,t)=>{const{__scopeAvatar:r,...s}=e,[a,l]=w.useState("idle");return _.jsx(SI,{scope:r,imageLoadingStatus:a,onImageLoadingStatusChange:l,children:_.jsx(zm.span,{...s,ref:t})})});yE.displayName=jm;var vE="AvatarImage",bE=w.forwardRef((e,t)=>{const{__scopeAvatar:r,src:s,onLoadingStatusChange:a=()=>{},...l}=e,u=gE(vE,r),f=wI(s,l),h=Kn(m=>{a(m),u.onImageLoadingStatusChange(m)});return Tn(()=>{f!=="idle"&&h(f)},[f,h]),f==="loaded"?_.jsx(zm.img,{...l,ref:t,src:s}):null});bE.displayName=vE;var SE="AvatarFallback",wE=w.forwardRef((e,t)=>{const{__scopeAvatar:r,delayMs:s,...a}=e,l=gE(SE,r),[u,f]=w.useState(s===void 0);return w.useEffect(()=>{if(s!==void 0){const h=window.setTimeout(()=>f(!0),s);return()=>window.clearTimeout(h)}},[s]),u&&l.imageLoadingStatus!=="loaded"?_.jsx(zm.span,{...a,ref:t}):null});wE.displayName=SE;function HS(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function wI(e,{referrerPolicy:t,crossOrigin:r}){const s=yI(),a=w.useRef(null),l=s?(a.current||(a.current=new window.Image),a.current):null,[u,f]=w.useState(()=>HS(l,e));return Tn(()=>{f(HS(l,e))},[l,e]),Tn(()=>{const h=g=>()=>{f(g)};if(!l)return;const m=h("loaded"),y=h("error");return l.addEventListener("load",m),l.addEventListener("error",y),t&&(l.referrerPolicy=t),typeof r=="string"&&(l.crossOrigin=r),()=>{l.removeEventListener("load",m),l.removeEventListener("error",y)}},[l,r,t]),u}var _I=yE,xI=bE,EI=wE;function RI({className:e,...t}){return _.jsx(_I,{"data-slot":"avatar",className:_t("relative flex size-8 shrink-0 overflow-hidden rounded-full",e),...t})}function CI({className:e,...t}){return _.jsx(xI,{"data-slot":"avatar-image",className:_t("aspect-square size-full",e),...t})}function TI({className:e,...t}){return _.jsx(EI,{"data-slot":"avatar-fallback",className:_t("bg-muted flex size-full items-center justify-center rounded-full",e),...t})}const ZS=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,QS=U_,AI=(e,t)=>r=>{var s;if(t?.variants==null)return QS(e,r?.class,r?.className);const{variants:a,defaultVariants:l}=t,u=Object.keys(a).map(m=>{const y=r?.[m],g=l?.[m];if(y===null)return null;const b=ZS(y)||ZS(g);return a[m][b]}),f=r&&Object.entries(r).reduce((m,y)=>{let[g,b]=y;return b===void 0||(m[g]=b),m},{}),h=t==null||(s=t.compoundVariants)===null||s===void 0?void 0:s.reduce((m,y)=>{let{class:g,className:b,...S}=y;return Object.entries(S).every(E=>{let[x,C]=E;return Array.isArray(C)?C.includes({...l,...f}[x]):{...l,...f}[x]===C})?[...m,g,b]:m},[]);return QS(e,u,h,r?.class,r?.className)},OI=AI("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function ep({className:e,variant:t="default",size:r="default",asChild:s=!1,...a}){const l=s?H1:"button";return _.jsx(l,{"data-slot":"button","data-variant":t,"data-size":r,className:_t(OI({variant:t,size:r,className:e})),...a})}function MI(e){const t=kI(e),r=w.forwardRef((s,a)=>{const{children:l,...u}=s,f=w.Children.toArray(l),h=f.find(zI);if(h){const m=h.props.children,y=f.map(g=>g===h?w.Children.count(m)>1?w.Children.only(null):w.isValidElement(m)?m.props.children:null:g);return _.jsx(t,{...u,ref:a,children:w.isValidElement(m)?w.cloneElement(m,void 0,y):null})}return _.jsx(t,{...u,ref:a,children:l})});return r.displayName=`${e}.Slot`,r}function kI(e){const t=w.forwardRef((r,s)=>{const{children:a,...l}=r;if(w.isValidElement(a)){const u=LI(a),f=jI(l,a.props);return a.type!==w.Fragment&&(f.ref=s?wo(s,u):u),w.cloneElement(a,f)}return w.Children.count(a)>1?w.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var NI=Symbol("radix.slottable");function zI(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===NI}function jI(e,t){const r={...t};for(const s in t){const a=e[s],l=t[s];/^on[A-Z]/.test(s)?a&&l?r[s]=(...f)=>{const h=l(...f);return a(...f),h}:a&&(r[s]=a):s==="style"?r[s]={...a,...l}:s==="className"&&(r[s]=[a,l].filter(Boolean).join(" "))}return{...e,...r}}function LI(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Yu="Popover",[_E]=os(Yu,[Fu]),tc=Fu(),[DI,xo]=_E(Yu),xE=e=>{const{__scopePopover:t,children:r,open:s,defaultOpen:a,onOpenChange:l,modal:u=!1}=e,f=tc(t),h=w.useRef(null),[m,y]=w.useState(!1),[g,b]=Uu({prop:s,defaultProp:a??!1,onChange:l,caller:Yu});return _.jsx(bx,{...f,children:_.jsx(DI,{scope:t,contentId:Fa(),triggerRef:h,open:g,onOpenChange:b,onOpenToggle:w.useCallback(()=>b(S=>!S),[b]),hasCustomAnchor:m,onCustomAnchorAdd:w.useCallback(()=>y(!0),[]),onCustomAnchorRemove:w.useCallback(()=>y(!1),[]),modal:u,children:r})})};xE.displayName=Yu;var EE="PopoverAnchor",PI=w.forwardRef((e,t)=>{const{__scopePopover:r,...s}=e,a=xo(EE,r),l=tc(r),{onCustomAnchorAdd:u,onCustomAnchorRemove:f}=a;return w.useEffect(()=>(u(),()=>f()),[u,f]),_.jsx(xm,{...l,...s,ref:t})});PI.displayName=EE;var RE="PopoverTrigger",CE=w.forwardRef((e,t)=>{const{__scopePopover:r,...s}=e,a=xo(RE,r),l=tc(r),u=At(t,a.triggerRef),f=_.jsx(ht.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":kE(a.open),...s,ref:u,onClick:Re(e.onClick,a.onOpenToggle)});return a.hasCustomAnchor?f:_.jsx(xm,{asChild:!0,...l,children:f})});CE.displayName=RE;var Lm="PopoverPortal",[UI,$I]=_E(Lm,{forceMount:void 0}),TE=e=>{const{__scopePopover:t,forceMount:r,children:s,container:a}=e,l=xo(Lm,t);return _.jsx(UI,{scope:t,forceMount:r,children:_.jsx(_o,{present:r||l.open,children:_.jsx(Em,{asChild:!0,container:a,children:s})})})};TE.displayName=Lm;var vi="PopoverContent",AE=w.forwardRef((e,t)=>{const r=$I(vi,e.__scopePopover),{forceMount:s=r.forceMount,...a}=e,l=xo(vi,e.__scopePopover);return _.jsx(_o,{present:s||l.open,children:l.modal?_.jsx(BI,{...a,ref:t}):_.jsx(qI,{...a,ref:t})})});AE.displayName=vi;var II=MI("PopoverContent.RemoveScroll"),BI=w.forwardRef((e,t)=>{const r=xo(vi,e.__scopePopover),s=w.useRef(null),a=At(t,s),l=w.useRef(!1);return w.useEffect(()=>{const u=s.current;if(u)return Ox(u)},[]),_.jsx(Rm,{as:II,allowPinchZoom:!0,children:_.jsx(OE,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Re(e.onCloseAutoFocus,u=>{u.preventDefault(),l.current||r.triggerRef.current?.focus()}),onPointerDownOutside:Re(e.onPointerDownOutside,u=>{const f=u.detail.originalEvent,h=f.button===0&&f.ctrlKey===!0,m=f.button===2||h;l.current=m},{checkForDefaultPrevented:!1}),onFocusOutside:Re(e.onFocusOutside,u=>u.preventDefault(),{checkForDefaultPrevented:!1})})})}),qI=w.forwardRef((e,t)=>{const r=xo(vi,e.__scopePopover),s=w.useRef(!1),a=w.useRef(!1);return _.jsx(OE,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:l=>{e.onCloseAutoFocus?.(l),l.defaultPrevented||(s.current||r.triggerRef.current?.focus(),l.preventDefault()),s.current=!1,a.current=!1},onInteractOutside:l=>{e.onInteractOutside?.(l),l.defaultPrevented||(s.current=!0,l.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const u=l.target;r.triggerRef.current?.contains(u)&&l.preventDefault(),l.detail.originalEvent.type==="focusin"&&a.current&&l.preventDefault()}})}),OE=w.forwardRef((e,t)=>{const{__scopePopover:r,trapFocus:s,onOpenAutoFocus:a,onCloseAutoFocus:l,disableOutsidePointerEvents:u,onEscapeKeyDown:f,onPointerDownOutside:h,onFocusOutside:m,onInteractOutside:y,...g}=e,b=xo(vi,r),S=tc(r);return K1(),_.jsx(pm,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:a,onUnmountAutoFocus:l,children:_.jsx(hm,{asChild:!0,disableOutsidePointerEvents:u,onInteractOutside:y,onEscapeKeyDown:f,onPointerDownOutside:h,onFocusOutside:m,onDismiss:()=>b.onOpenChange(!1),children:_.jsx(Sx,{"data-state":kE(b.open),role:"dialog",id:b.contentId,...S,...g,ref:t,style:{...g.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),ME="PopoverClose",VI=w.forwardRef((e,t)=>{const{__scopePopover:r,...s}=e,a=xo(ME,r);return _.jsx(ht.button,{type:"button",...s,ref:t,onClick:Re(e.onClick,()=>a.onOpenChange(!1))})});VI.displayName=ME;var FI="PopoverArrow",HI=w.forwardRef((e,t)=>{const{__scopePopover:r,...s}=e,a=tc(r);return _.jsx(wx,{...a,...s,ref:t})});HI.displayName=FI;function kE(e){return e?"open":"closed"}var ZI=xE,QI=CE,GI=TE,YI=AE;function GS({...e}){return _.jsx(ZI,{"data-slot":"popover",...e})}function YS({...e}){return _.jsx(QI,{"data-slot":"popover-trigger",...e})}function KS({className:e,align:t="center",sideOffset:r=4,...s}){return _.jsx(GI,{children:_.jsx(YI,{"data-slot":"popover-content",align:t,sideOffset:r,className:_t("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",e),...s})})}const KI=[{keys:["⌘","S"],description:"Save entry"},{keys:["⌘","⇧","P"],description:"Publish entry"},{keys:["⌘","K"],description:"Quick search"},{keys:["Esc"],description:"Close modal/panel"}],XI=[{label:"Documentation",url:"https://docs.convex.dev",icon:rz},{label:"API Reference",url:"https://docs.convex.dev/api",icon:bz},{label:"Community Discord",url:"https://discord.gg/convex",icon:s3}],JI={"/":"Dashboard","/content":"Content","/media":"Media Library","/content-types":"Content Types","/settings":"Settings","/taxonomies":"Taxonomies","/trash":"Trash","/entries":"Entries","/entries/type":"Content Types","/entries/new":"New Entry"};function WI(e,t,r){const s=[{label:t,to:"/"}];if(e==="/")return s;const a=e.split("/").filter(Boolean);let l="";return a.forEach((u,f)=>{l+=`/${u}`;const h=f===a.length-1;let m=r.get(l)??JI[l];m||(m=u.charAt(0).toUpperCase()+u.slice(1).replace(/-/g," ")),h?s.push({label:m}):s.push({label:m,to:l})}),s}function eB(){const e=Je(),t=Nu(),{branding:r}=lm();let s=new Map;try{s=g6().overrides}catch{}const a=WI(e.location.pathname,r.appName,s);let l=null,u=null,f=async()=>{},h=!1;try{const x=W_();l=x.user,u=x.role,f=x.logout,h=x.isAuthenticated}catch{}const y=(u?_j(u):null)?.displayName??u??"No Role",g=l?.name??l?.email??"User",b=x=>{const C=x.split(" ");return C.length>=2?`${C[0][0]}${C[1][0]}`.toUpperCase():x.slice(0,2).toUpperCase()},S=l?.name?b(l.name):"U",E=async()=>{await f()};return _.jsxs("header",{className:"sticky top-0 z-40 flex h-14 items-center justify-between border-b border-border bg-background/95 px-6 backdrop-blur supports-[backdrop-filter]:bg-background/60",children:[_.jsx(Y6,{children:_.jsx(K6,{children:a.map((x,C)=>_.jsxs(w.Fragment,{children:[C>0&&_.jsx(e5,{}),_.jsx(X6,{children:x.to?_.jsx(J6,{asChild:!0,children:_.jsxs(io,{to:x.to,className:"flex items-center gap-1.5",children:[C===0&&_.jsx(j_,{className:"size-3.5"}),_.jsx("span",{children:x.label})]})}):_.jsx(W6,{children:x.label})})]},C))})}),_.jsxs("div",{className:"flex items-center gap-1",children:[_.jsxs(GS,{children:[_.jsx(YS,{asChild:!0,children:_.jsxs(ep,{variant:"ghost",size:"icon",className:"size-9",children:[_.jsx(hp,{className:"size-4"}),_.jsx("span",{className:"sr-only",children:"Notifications"})]})}),_.jsxs(KS,{align:"end",className:"w-80",children:[_.jsx("div",{className:"flex items-center justify-between pb-2",children:_.jsx("h4",{className:"font-medium",children:"Notifications"})}),_.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[_.jsx(hp,{className:"size-8 text-muted-foreground/50"}),_.jsx("p",{className:"mt-2 text-sm font-medium",children:"No notifications yet"}),_.jsx("p",{className:"text-xs text-muted-foreground",children:"You're all caught up!"})]})]})]}),_.jsxs(GS,{children:[_.jsx(YS,{asChild:!0,children:_.jsxs(ep,{variant:"ghost",size:"icon",className:"size-9",children:[_.jsx(z_,{className:"size-4"}),_.jsx("span",{className:"sr-only",children:"Help"})]})}),_.jsxs(KS,{align:"end",className:"w-72",children:[_.jsx("div",{className:"pb-2",children:_.jsx("h4",{className:"font-medium",children:"Help & Resources"})}),_.jsxs("div",{className:"space-y-4",children:[_.jsxs("div",{children:[_.jsx("h5",{className:"mb-2 text-xs font-medium text-muted-foreground",children:"Keyboard Shortcuts"}),_.jsx("div",{className:"space-y-1",children:KI.map((x,C)=>_.jsxs("div",{className:"flex items-center justify-between text-sm",children:[_.jsx("span",{className:"text-muted-foreground",children:x.description}),_.jsx("div",{className:"flex gap-0.5",children:x.keys.map((O,L)=>_.jsx("kbd",{className:"rounded border border-border bg-muted px-1.5 py-0.5 font-mono text-xs",children:O},L))})]},C))})]}),_.jsxs("div",{children:[_.jsx("h5",{className:"mb-2 text-xs font-medium text-muted-foreground",children:"Resources"}),_.jsx("div",{className:"space-y-1",children:XI.map(x=>_.jsxs("a",{href:x.url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 rounded-md px-2 py-1.5 text-sm hover:bg-accent",children:[_.jsx(x.icon,{className:"size-4 text-muted-foreground"}),_.jsx("span",{className:"flex-1",children:x.label}),_.jsx(xz,{className:"size-3 text-muted-foreground"})]},x.label))})]})]})]})]}),_.jsxs(lI,{children:[_.jsx(uI,{asChild:!0,children:_.jsxs(ep,{variant:"ghost",className:"h-9 gap-2 pl-2 pr-3",children:[_.jsxs(RI,{className:"size-6",children:[_.jsx(CI,{src:l?.avatarUrl,alt:g}),_.jsx(TI,{className:"text-xs",children:S})]}),_.jsx("span",{className:"text-sm font-medium",children:g}),_.jsx(Jp,{className:"size-3.5 text-muted-foreground"})]})}),_.jsxs(fI,{align:"end",className:"w-56",children:[_.jsx(dI,{className:"font-normal",children:_.jsxs("div",{className:"flex flex-col space-y-1",children:[_.jsx("p",{className:"text-sm font-medium",children:g}),l?.email&&_.jsx("p",{className:"text-xs text-muted-foreground",children:l.email}),_.jsx("p",{className:"text-xs text-muted-foreground",children:y})]})}),_.jsx(FS,{}),_.jsxs(VS,{onClick:()=>t({to:"/settings"}),children:[_.jsx(D_,{className:"mr-2 size-4"}),_.jsx("span",{children:"Profile & Settings"})]}),h&&_.jsxs(_.Fragment,{children:[_.jsx(FS,{}),_.jsxs(VS,{onClick:E,className:"text-destructive focus:text-destructive",children:[_.jsx(Wz,{className:"mr-2 size-4"}),_.jsx("span",{children:"Logout"})]})]})]})]})]})]})}function tB({children:e}){const{layout:t}=lm();return _.jsxs("div",{className:"flex min-h-screen bg-background",children:[_.jsx(B6,{}),_.jsxs("div",{className:"flex flex-1 flex-col",style:{marginLeft:t.sidebarWidth},children:[_.jsx(eB,{}),_.jsx("main",{className:"flex-1 overflow-auto p-6",children:e})]})]})}function nB(){return _.jsx("div",{className:"route-guard route-guard--loading bg-background flex items-center justify-center min-h-screen",children:_.jsx(Yz,{className:"h-8 w-8 animate-spin text-muted-foreground"})})}function rB(){return _.jsxs("div",{className:"route-guard route-guard--unauthenticated",children:[_.jsx("div",{className:"route-guard-icon",children:_.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[_.jsx("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2",ry:"2"}),_.jsx("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"})]})}),_.jsx("h2",{children:"Authentication Required"}),_.jsx("p",{children:"Please log in to access the admin panel."})]})}function tp({requiredRole:e,requiredPermission:t}){return _.jsxs("div",{className:"route-guard route-guard--unauthorized",children:[_.jsx("div",{className:"route-guard-icon",children:_.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[_.jsx("circle",{cx:"12",cy:"12",r:"10"}),_.jsx("line",{x1:"4.93",y1:"4.93",x2:"19.07",y2:"19.07"})]})}),_.jsx("h2",{children:"Access Denied"}),_.jsx("p",{children:"You don't have permission to access this page."}),e&&_.jsxs("p",{className:"route-guard-detail",children:["Required role: ",_.jsx("strong",{children:e})]}),t&&_.jsxs("p",{className:"route-guard-detail",children:["Required permission:"," ",_.jsxs("strong",{children:[t.action," on ",t.resource]})]})]})}function oB({error:e}){return _.jsxs("div",{className:"route-guard route-guard--error",children:[_.jsx("div",{className:"route-guard-icon",children:_.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[_.jsx("circle",{cx:"12",cy:"12",r:"10"}),_.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),_.jsx("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]})}),_.jsx("h2",{children:"Authentication Error"}),_.jsx("p",{children:e})]})}function sB({children:e,requiredPermission:t,requiredRole:r,loadingComponent:s,unauthenticatedComponent:a,unauthorizedComponent:l,onUnauthenticated:u,onUnauthorized:f}){const{authState:h,role:m,checkPermission:y,error:g}=W_();return h==="loading"?_.jsx(_.Fragment,{children:s??_.jsx(nB,{})}):h==="error"?_.jsx(oB,{error:g??"An error occurred"}):h==="unauthenticated"?(u?.(),_.jsx(_.Fragment,{children:a??_.jsx(rB,{})})):m?r&&m!==r?(f?.(),_.jsx(_.Fragment,{children:l??_.jsx(tp,{requiredRole:r,requiredPermission:t})})):t&&!y(t)?(f?.(),_.jsx(_.Fragment,{children:l??_.jsx(tp,{requiredRole:r,requiredPermission:t})})):_.jsx(_.Fragment,{children:e}):(f?.(),_.jsx(_.Fragment,{children:l??_.jsx(tp,{requiredRole:r,requiredPermission:t})}))}const NE=()=>{throw new Error("createServerOnlyFn() functions can only be called on the server!")};function XS(e){return e!=="__proto__"&&e!=="constructor"&&e!=="prototype"}function Rp(e,t){const r=Object.create(null);if(e)for(const s of Object.keys(e))XS(s)&&(r[s]=e[s]);if(t&&typeof t=="object")for(const s of Object.keys(t))XS(s)&&(r[s]=t[s]);return r}function zE(e){return Object.create(null)}const Ql=(e,t)=>{const r=t||e||{};return typeof r.method>"u"&&(r.method="GET"),Object.assign(l=>{const u={...r,...l};return Ql(void 0,u)},{options:r,middleware:l=>{const u=[...r.middleware||[]];l.map(m=>{m0 in m?m.options.middleware&&u.push(...m.options.middleware):u.push(m)});const f={...r,middleware:u},h=Ql(void 0,f);return h[m0]=!0,h},inputValidator:l=>{const u={...r,inputValidator:l};return Ql(void 0,u)},handler:(...l)=>{const[u,f]=l,h={...r,extractedFn:u,serverFn:f},m=[...h.middleware||[],cB(h)];return Object.assign(async y=>{const g=await JS(m,"client",{...u,...h,data:y?.data,headers:y?.headers,signal:y?.signal,fetch:y?.fetch,context:zE()}),b=mw(g.error);if(b)throw b;if(g.error)throw g.error;return g.result},{...u,__executeServer:async(y,g)=>{const b=NE(),S=b.contextAfterGlobalMiddlewares,E={...u,...y,serverFnMeta:u.serverFnMeta,context:Rp(S,y.context),signal:g,request:b.request};return await JS(m,"server",E).then(C=>({result:C.result,error:C.error,context:C.sendContext}))}})}})};async function JS(e,t,r){const s=$p()?.functionMiddleware||[];let a=iB([...s,...e]);if(t==="server"){const u=NE();u?.executedRequestMiddlewares&&(a=a.filter(f=>!u.executedRequestMiddlewares.has(f)))}const l=async u=>{const f=a.shift();if(!f)return u;try{"inputValidator"in f.options&&f.options.inputValidator&&t==="server"&&(u.data=await aB(f.options.inputValidator,u.data));let h;if(t==="client"?"client"in f.options&&(h=f.options.client):"server"in f.options&&(h=f.options.server),h){const y=await h({...u,next:async(g={})=>{const b={...u,...g,context:Rp(u.context,g.context),sendContext:Rp(u.sendContext,g.sendContext),headers:XM(u.headers,g.headers),_callSiteFetch:u._callSiteFetch,fetch:u._callSiteFetch??g.fetch??u.fetch,result:g.result!==void 0?g.result:g instanceof Response?g:u.result,error:g.error??u.error},S=await l(b);if(S.error)throw S.error;return S}});if(ln(y))return{...u,error:y};if(y instanceof Response)return{...u,result:y};if(!y)throw new Error("User middleware returned undefined. You must call next() or return a result in your middlewares.");return y}return l(u)}catch(h){return{...u,error:h}}};return l({...r,headers:r.headers||{},sendContext:r.sendContext||{},context:r.context||zE(),_callSiteFetch:r.fetch})}function iB(e,t=100){const r=new Set,s=[],a=(l,u)=>{if(u>t)throw new Error(`Middleware nesting depth exceeded maximum of ${t}. Check for circular references.`);l.forEach(f=>{f.options.middleware&&a(f.options.middleware,u+1),r.has(f)||(r.add(f),s.push(f))})};return a(e,0),s}async function aB(e,t){if(e==null)return{};if("~standard"in e){const r=await e["~standard"].validate(t);if(r.issues)throw new Error(JSON.stringify(r.issues,void 0,2));return r.value}if("parse"in e)return e.parse(t);if(typeof e=="function")return e(t);throw new Error("Invalid validator type!")}function cB(e){return{"~types":void 0,options:{inputValidator:e.inputValidator,client:async({next:t,sendContext:r,fetch:s,...a})=>{const l={...a,context:r,fetch:s},u=await e.extractedFn?.(l);return t(u)},server:async({next:t,...r})=>{const s=await e.serverFn?.(r);return t({...r,result:s})}}}}const lB=Ql({method:"GET"}).handler(m_("dff4e5b7f7b29b6a323200a2df0a5335d739cf583e83c9e514598af6b5ade819")),WS=()=>({id:"mock_user_123",name:"Demo Admin",email:"admin@example.com"}),ew=()=>"admin",tw=()=>{console.log("Logout called (mock mode)")},uB=()=>null,fB=()=>null,dB=()=>{};function hB(e){switch(e){case"mock":case"demo":return{getUser:WS,getUserRole:ew,onLogout:tw};case"none":case"disabled":return{getUser:uB,getUserRole:fB,onLogout:dB};default:return{getUser:WS,getUserRole:ew,onLogout:tw}}}const On=NM({head:()=>({meta:[{charSet:"utf-8"},{name:"viewport",content:"width=device-width, initial-scale=1"},{title:"Convex CMS Admin"},{name:"description",content:"Admin interface for Convex CMS - manage content, media, and publishing workflows"}],links:[{rel:"stylesheet",href:QN},{rel:"icon",href:"/favicon.ico"}]}),loader:async()=>({config:await lB()}),component:pB});function pB(){const{config:e}=On.useLoaderData(),t=w.useMemo(()=>hB(e.authMode),[e.authMode]),r=w.useMemo(()=>u6(e.adminConfig),[e.adminConfig]);return _.jsx(gB,{children:_.jsx(Rj,{children:_.jsx(m6,{children:_.jsx(mB,{config:e,adminConfig:r,children:_.jsx(Ej,{getUser:t.getUser,getUserRole:t.getUserRole,onLogout:t.onLogout,children:_.jsx(sB,{children:_.jsx(tB,{children:_.jsx(c_,{})})})})})})})})}function mB({children:e,config:t,adminConfig:r}){const s=w.useMemo(()=>t.convexUrl?new UN(t.convexUrl):null,[t.convexUrl]);return s?_.jsx(IN,{client:s,children:_.jsx(p6,{baseConfig:r,children:e})}):_.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background p-6",children:_.jsxs("div",{className:"max-w-lg space-y-4 rounded-lg border border-amber-200 bg-amber-50 p-6 text-center",children:[_.jsx("h2",{className:"text-xl font-semibold text-amber-900",children:"Convex Configuration Required"}),_.jsx("p",{className:"text-sm text-amber-800",children:"Please provide a Convex deployment URL to connect to your backend."}),_.jsxs("div",{className:"space-y-2 text-left text-sm text-amber-700",children:[_.jsx("p",{className:"font-medium",children:"Options:"}),_.jsxs("ul",{className:"list-inside list-disc space-y-1",children:[_.jsxs("li",{children:["Run with URL:"," ",_.jsx("code",{className:"rounded bg-amber-100 px-1",children:"npx convex-cms admin --url YOUR_URL"})]}),_.jsxs("li",{children:["Set environment variable:"," ",_.jsx("code",{className:"rounded bg-amber-100 px-1",children:"CONVEX_URL=YOUR_URL"})]}),_.jsxs("li",{children:["Add to"," ",_.jsx("code",{className:"rounded bg-amber-100 px-1",children:".env.local"}),":"," ",_.jsx("code",{className:"rounded bg-amber-100 px-1",children:"CONVEX_URL=YOUR_URL"})]})]})]}),_.jsxs("p",{className:"text-sm text-amber-700",children:["Run"," ",_.jsx("code",{className:"rounded bg-amber-100 px-1",children:"npx convex dev"})," to start Convex and get your URL."]})]})})}function gB({children:e}){return _.jsxs("html",{lang:"en",children:[_.jsx("head",{children:_.jsx(GM,{})}),_.jsxs("body",{children:[e,_.jsx(YM,{})]})]})}const yB="modulepreload",vB=function(e){return"/"+e},nw={},er=function(t,r,s){let a=Promise.resolve();if(r&&r.length>0){let h=function(m){return Promise.all(m.map(y=>Promise.resolve(y).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),f=u?.nonce||u?.getAttribute("nonce");a=h(r.map(m=>{if(m=vB(m),m in nw)return;nw[m]=!0;const y=m.endsWith(".css"),g=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${m}"]${g}`))return;const b=document.createElement("link");if(b.rel=y?"stylesheet":yB,y||(b.as="script"),b.crossOrigin="",b.href=m,f&&b.setAttribute("nonce",f),document.head.appendChild(b),y)return new Promise((S,E)=>{b.addEventListener("load",S),b.addEventListener("error",()=>E(new Error(`Unable to preload CSS for ${m}`)))})}))}function l(u){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=u,window.dispatchEvent(f),!f.defaultPrevented)throw u}return a.then(u=>{for(const f of u||[])f.status==="rejected"&&l(f.reason);return t().catch(l)})},bB=()=>er(()=>import("./trash-BU4ANuaW.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11])),SB=Cn("/trash")({component:Jn(bB,"component")}),wB=()=>er(()=>import("./taxonomies-DOErsLl5.js"),__vite__mapDeps([12,3,4,13,14,15,1,6,16,11])),_B=Cn("/taxonomies")({component:Jn(wB,"component")}),xB=()=>er(()=>import("./settings-DBxbYDvn.js"),__vite__mapDeps([17,4,13,7,18,1,6,19,8,11])),EB=Cn("/settings")({component:Jn(xB,"component")}),RB=()=>er(()=>import("./media-CETueFbV.js"),__vite__mapDeps([20,21,4,1,2,3,5,22,23,13,7,14,15,24,10,11])),CB=Cn("/media")({component:Jn(RB,"component")}),TB=()=>er(()=>import("./content-types-BmzD0krT.js"),__vite__mapDeps([25,3,4,13,14,7,9,15,26,24,1,2,5,11])),AB=Cn("/content-types")({component:Jn(TB,"component")}),OB=()=>er(()=>import("./content-D8zELsDG.js"),__vite__mapDeps([27,18,3,4,28,9,1,2,5,29,7,15,11])),MB=Cn("/content")({component:Jn(OB,"component")}),kB=()=>er(()=>import("./index-zqfj4T_v.js"),__vite__mapDeps([30,1,11])),NB=Cn("/")({component:Jn(kB,"component")}),zB=()=>er(()=>import("./_entryId-2FlCfqE7.js"),__vite__mapDeps([31,32,13,3,4,19,21,14,26,7,5,23,29,15,24,16,9,28,18,33])),jB=Cn("/entries/$entryId")({component:Jn(zB,"component")}),LB=()=>er(()=>import("./_contentTypeId-D9VMP6Gs.js"),__vite__mapDeps([34,18,33,1,2,3,4,5,29,22,23,7,15])),DB=Cn("/entries/type/$contentTypeId")({component:Jn(LB,"component")}),PB=()=>er(()=>import("./new._contentTypeId-BV2-TyyR.js"),__vite__mapDeps([35,32,13,3,4,19,21,14,26,7,5,23,29,15,24,16,9,28,33])),UB=Cn("/entries/new/$contentTypeId")({component:Jn(PB,"component")}),$B=SB.update({id:"/trash",path:"/trash",getParentRoute:()=>On}),IB=_B.update({id:"/taxonomies",path:"/taxonomies",getParentRoute:()=>On}),BB=EB.update({id:"/settings",path:"/settings",getParentRoute:()=>On}),qB=CB.update({id:"/media",path:"/media",getParentRoute:()=>On}),VB=AB.update({id:"/content-types",path:"/content-types",getParentRoute:()=>On}),FB=MB.update({id:"/content",path:"/content",getParentRoute:()=>On}),HB=NB.update({id:"/",path:"/",getParentRoute:()=>On}),ZB=jB.update({id:"/entries/$entryId",path:"/entries/$entryId",getParentRoute:()=>On}),QB=DB.update({id:"/entries/type/$contentTypeId",path:"/entries/type/$contentTypeId",getParentRoute:()=>On}),GB=UB.update({id:"/entries/new/$contentTypeId",path:"/entries/new/$contentTypeId",getParentRoute:()=>On}),YB={IndexRoute:HB,ContentRoute:FB,ContentTypesRoute:VB,MediaRoute:qB,SettingsRoute:BB,TaxonomiesRoute:IB,TrashRoute:$B,EntriesEntryIdRoute:ZB,EntriesNewContentTypeIdRoute:GB,EntriesTypeContentTypeIdRoute:QB},KB=On._addFileChildren(YB);function XB(){return BM({routeTree:KB,scrollRestoration:!0,defaultPreload:"intent"})}async function JB(){const e=await XB();let t;return t=[],window.__TSS_START_OPTIONS__={serializationAdapters:t},t.push(mk),e.options.serializationAdapters&&t.push(...e.options.serializationAdapters),e.update({basepath:"",serializationAdapters:t}),e.state.matches.length||await WM(e),e}async function WB(){const e=await JB();return window.$_TSR?.h(),e}let np;function e9(){return np||(np=WB()),_.jsx(lM,{promise:np,children:e=>_.jsx(FM,{router:e})})}w.startTransition(()=>{c2.hydrateRoot(document,_.jsx(w.StrictMode,{children:_.jsx(e9,{})}))});export{bz as $,Pp as A,ep as B,Jp as C,lI as D,Rz as E,Oz as F,jB as G,j_ as H,qz as I,DB as J,io as K,Xz as L,YS as M,KS as N,W_ as O,GS as P,xj as Q,sB as R,f3 as S,x3 as T,i9 as U,Sj as V,UB as W,kt as X,OI as Y,F1 as Z,Qz as _,s9 as a,pz as a0,yz as a1,At as a2,Q1 as a3,ht as a4,_o as a5,os as a6,Re as a7,Kn as a8,Tn as a9,Uu as aa,jU as ab,Fa as ac,JU as ad,WU as ae,xx as af,g6 as ag,wo as ah,Em as ai,Ox as aj,Rm as ak,K1 as al,pm as am,hm as an,l9 as ao,bx as ap,xm as aq,zu as ar,Fu as as,Z1 as at,Sx as au,wx as av,H1 as aw,L1 as b,_t as c,we as d,b3 as e,dz as f,lm as g,a9 as h,AI as i,_ as j,Yz as k,uI as l,fI as m,VS as n,FS as o,zz as p,c9 as q,w as r,az as s,lz as t,k_ as u,w3 as v,Pz as w,L_ as x,Je as y,Nu as z};
|