1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Landing-BvAKBtfO.js","assets/SEOHead-NeiGi4NT.js","assets/usePricingFeatures-CY2IJkVB.js","assets/dialog-CGGObdLS.js","assets/index-D2fHITvc.js","assets/index-D0bqXNQt.js","assets/index-DVKKzjYV.js","assets/sheet-BTbwVc9W.js","assets/ExpertMedia_Logo-B3sj5hKk.js","assets/menu-Dt6DLCqh.js","assets/proxy-B7Tut8h8.js","assets/star-D-78o-y1.js","assets/arrow-right-2B3mm3C5.js","assets/chevron-right-CQ0bADqS.js","assets/zap-CVvKcN4D.js","assets/check-CHksFl-A.js","assets/book-open-D85vtXKA.js","assets/layers-uzeP31S2.js","assets/image-DeG-niuc.js","assets/megaphone-BZZlwMkY.js","assets/package-D7Iky9zm.js","assets/sparkles-BUY2uXQC.js","assets/palette-rrW_X71v.js","assets/message-square-D29lkOHF.js","assets/brain-BguCDOhs.js","assets/users-VFKwMrTd.js","assets/pen-tool-DH61uSYw.js","assets/shopping-bag-Dkmw1uYW.js","assets/wand-sparkles-QplHiUqc.js","assets/CanvasLanding-BobdShv-.js","assets/useCurrentUser-BVREdUPj.js","assets/dropdown-menu-Bm1Ei0gl.js","assets/index-D3g_AT4g.js","assets/index-0knE1gyv.js","assets/circle-9EsCvU7Y.js","assets/log-out-DQdIc48s.js","assets/CanvasAuth-BVLDsP-K.js","assets/mail-DPDjZcGu.js","assets/CanvasEditor-Bes8-Vi3.js","assets/useAsset-DcN4TJDi.js","assets/useMutation-cryXJyhW.js","assets/assets-Bi4CrUvQ.js","assets/s3Storage-D07R-_T2.js","assets/AudioGenNode-CS95_Ol-.js","assets/chatModels-D-TOhVdb.js","assets/messages-square-BPDCp4xp.js","assets/copy-CMLcIOiO.js","assets/image-plus-cq9AYtn4.js","assets/banana-B3gVBwQ5.js","assets/film-BsoNDI6H.js","assets/clapperboard-SNtLXwpK.js","assets/select-7or67l2U.js","assets/chevron-down-CrMyl6pQ.js","assets/chevron-up-DNCJMtvH.js","assets/switch-Cbfu56pw.js","assets/input-c-eczgZh.js","assets/textarea-Bem7iRjE.js","assets/info-CkFlUsh7.js","assets/react-P7a2VDLY.js","assets/music-2-B3Jx39hU.js","assets/wavesurfer.esm-CanEQ_jZ.js","assets/mic-vocal-DdIM4XaV.js","assets/audio-lines-BsWzCOqB.js","assets/FlowCanvas-DoLnRkXp.js","assets/index-DEwBEKvK.js","assets/zoom-DfA31NQy.js","assets/index-CRRS1r1d.js","assets/string-3NetaFjT.js","assets/type-DLdmhiYz.js","assets/image-down-DHi2oy0_.js","assets/sortable.esm-BZBhKqq-.js","assets/assetLibraryBus-B94HwRvW.js","assets/plus-COpIj9j5.js","assets/video-CEvrLkrF.js","assets/mic-aBwc0YD6.js","assets/square-ClAbTNZH.js","assets/library-78W2-_0m.js","assets/search-BRMjt2-d.js","assets/earth-BUfMEwIC.js","assets/camera-BNzquKWS.js","assets/share-2-DIMlKOhb.js","assets/download-DAbopT4M.js","assets/monitor-DPi_H2PQ.js","assets/file-text-DcpK7RKg.js","assets/checkbox-DT8w3e7r.js","assets/bookmark-plus-BZVXiPjz.js","assets/save-DROPt-pR.js","assets/jszip.min-BINLJrAL.js","assets/_commonjs-dynamic-modules-TDtrdbi3.js","assets/MarbleSplatViewer-BUiJ9S4w.js","assets/zoom-in-36HKZDjZ.js","assets/zoom-out-CjegBIBk.js","assets/rotate-ccw-BOdh3PXg.js","assets/minimize-2-8oJ9y1JD.js","assets/keyboard-BGfiAxdU.js","assets/context-menu-uVEY_GPl.js","assets/mouse-pointer-vzEEYRqs.js","assets/pencil-Bd-2VDOI.js","assets/trash-2-DfAlOGrJ.js","assets/rotate-cw-BpF7-oeA.js","assets/ellipsis-vertical-CpVwStGs.js","assets/clock-B1FssvoW.js","assets/alert-dialog-BXgkG-vs.js","assets/coins-CzcCEE1P.js","assets/mouse-pointer-2-t4OFWgrD.js","assets/history-DAkjuwxU.js","assets/popover-BwGPb1nx.js","assets/useUserCredits-BECH27ke.js","assets/TemplateGraphPreview-BVNs3Jxh.js","assets/git-branch-C3wzgP-k.js","assets/bookmark-Bilp3vRN.js","assets/formatDistanceToNow-DkRvXD2C.js","assets/en-US-DR5fYmkI.js","assets/differenceInCalendarMonths--w_9Xpu5.js","assets/endOfMonth-BGxfr2nu.js","assets/eye-64GuGPNH.js","assets/globe-DoRqLehU.js","assets/AssetLibraryHost-CsGPyU0H.js","assets/layout-dashboard-CySg8UUn.js","assets/sliders-horizontal-Cg1FJjbI.js","assets/receipt-CSYvE_1A.js","assets/undo-2-aDFaVmr7.js","assets/redo-2-D2BmHySe.js","assets/index-BOSmJXY2.js","assets/paperclip-BU2sq6eu.js","assets/external-link-Be_6rbg_.js","assets/send-Dh4uXRYV.js","assets/landmark-_zSR9nsM.js","assets/heart-handshake-CL7G63Ry.js","assets/smartphone-CHxa4-y3.js","assets/rocket-DlfaXryW.js","assets/circle-check-big-CQTMeWpq.js","assets/circle-x-DFfi7KTl.js","assets/circle-dot-Ce9ebI8q.js","assets/bottom-sheet-Cye6q380.js","assets/Workflows-IssqwT6M.js","assets/file-up-D0KlubNg.js","assets/upload-D3VmnkMa.js","assets/file-plus-taIbtVJo.js","assets/CanvasTemplates-BGwl0gP3.js","assets/badge-Bp380uep.js","assets/PublicWorkflow-C2CMIymt.js","assets/LoginDraft-BE8f17uB.js","assets/label-DLjXeE6d.js","assets/TurnstileWidget-yoBarVXz.js","assets/circle-alert-BAA-BmZz.js","assets/user-plus-Ckl8YsEM.js","assets/credit-card-B4edfU6V.js","assets/SignupDraft-AvsUM3Wr.js","assets/user-BcYSK-nC.js","assets/PricingDraft-dAfWdao6.js","assets/shield-CEtyotiY.js","assets/PricingResubscribe-C__X3RG5.js","assets/Dashboard-_9Vmx_Am.js","assets/lightbulb-C7LeZESf.js","assets/index-CfaNNprU.js","assets/index-CzzTUPTj.js","assets/folder-open-CJwDEwOO.js","assets/LockableCardLink-5zpJpeNQ.js","assets/heart-CBlQsDKR.js","assets/useDisplayPrefs-BuHgVZZ4.js","assets/FreeCardLockOverlay-BQElrE_X.js","assets/useGam
1ification-DXi0CoeZ.js","assets/flame-B8238v4D.js","assets/trophy-B5yARjN1.js","assets/useConciergeInterview-B3oEvvxf.js","assets/concierge-flow-HHweXZvz.js","assets/profileEvents-D3h5H-jR.js","assets/useReturningUser-DTlDjbbI.js","assets/maintenance-knNNynwV.js","assets/handoff-CmSMOX74.js","assets/roleLabels-Br6A6Bnw.js","assets/settings-UN4FCq0N.js","assets/ellipsis-BBBi5Ewl.js","assets/moon-BiCgw0vU.js","assets/lucide-react-BBj8FG2k.js","assets/unfold-vertical-DWZO5PkK.js","assets/activity-BaOO199i.js","assets/align-right-DKhN21rO.js","assets/align-justify-2HGFxN4a.js","assets/archive-restore-Dmpcjag_.js","assets/archive-D6ifjmLl.js","assets/arrow-down-right-DupSrb2g.js","assets/arrow-up-narrow-wide-C3rYjqmW.js","assets/arrow-up-BZL0qSiq.js","assets/server-mSbdj4nq.js","assets/arrow-right-left-aJwxTk_T.js","assets/arrow-up-down-rE-1DSnA.js","assets/arrow-up-right-CIZA-XIC.js","assets/audio-waveform-B7pHNB7l.js","assets/award-CUNm_ixn.js","assets/squirrel-BAdmtYuL.js","assets/badge-check-CiejF-tf.js","assets/ban-CQQhdzM_.js","assets/banknote-BoSXmlJ5.js","assets/bell-DROeoOeS.js","assets/underline-DO8YkwRC.js","assets/book-audio-BLmLSgui.js","assets/book-marked-BOS60fta.js","assets/book-open-check-jkyetTVg.js","assets/book-CDSY4imf.js","assets/terminal-ChbmnELC.js","assets/bot-D7rxGCO_.js","assets/boxes-Bzlp2Dwv.js","assets/wand-B1qhu03o.js","assets/radio-qsjLpJe1.js","assets/wheat-oSPJ4cXA.js","assets/toggle-left-DABohPy-.js","assets/calendar-days-wgsZ9NWy.js","assets/calendar-plus-B97fNRNa.js","assets/calendar-CdmVmfQd.js","assets/captions-TdniYGfl.js","assets/undo-DbMTpxXF.js","assets/chart-column-B9ULushw.js","assets/chart-pie-DTnDziY4.js","assets/chevron-left-Cmom4hmc.js","assets/chevrons-up-CN3n2VNB.js","assets/chevrons-right-DnJSntBW.js","assets/chevrons-up-down-DII7NNvM.js","assets/circle-dashed-Cg0nZt03.js","assets/circle-help-ClkaNo56.js","assets/circle-pause-BzGzaeER.js","assets/circle-play-xGEZwZug.js","assets/circle-plus-IzFSqU3w.js","assets/circle-stop-CQRa9BDv.js","assets/clipboard-list-D6NSTYzo.js","assets/power-D_T4oUyx.js","assets/cloud-off-CJaD_kz-.js","assets/cloud-upload-BNFJ6Wwf.js","assets/cloud-CIrN2z0-.js","assets/code-xml-OT0z8L8q.js","assets/code-BRRje114.js","assets/columns-2-BNk0mRWD.js","assets/combine-DxeUOuNF.js","assets/compass-Bd1Jslqo.js","assets/cpu-Bp5tBJla.js","assets/crop-TAx_cONN.js","assets/crown-_D-6ZgCl.js","assets/database-ev2hpYlt.js","assets/dices-CuZZO0-Y.js","assets/diff-DSfiwFmL.js","assets/piano-DcjdZ5zS.js","assets/dollar-sign-CvXVEfil.js","assets/door-open-Ho7nuAEO.js","assets/eye-off-DIwM9hMt.js","assets/twitter-ClWrSEKi.js","assets/file-archive-BI1NFg1o.js","assets/file-audio-CpsSNy_e.js","assets/file-down-ThKZsh0b.js","assets/reply-DogQfLvQ.js","assets/file-json-DbpjeAxi.js","assets/file-output-CO9SPYBB.js","assets/file-pen-GjeMw71y.js","assets/file-search-BBiX4oxz.js","assets/file-type-BgfKFMDi.js","assets/file-video-CukETO-E.js","assets/file-DN1vh1mf.js","assets/flag-BI2PXTua.js","assets/square-pen-BlRfiXLu.js","assets/folder-input-dWz47TRU.js","assets/folder-kanban-Bmlxw2CF.js","assets/folder-plus-Nc8DVlkv.js","assets/folder-TGw4esmT.js","assets/gauge-By3G4P7o.js","assets/gem-DS7p6IZU.js","assets/gift-DGyBA6Vw.js","assets/git-compare-BL8yiW9Q.js","assets/graduation-cap-CsveBcOy.js","assets/grid-3x3-YW0QNwEc.js","assets/grip-vertical-CruB4FP1.js","assets/hammer-CJc4mdBk.js","assets/hard-drive-c_IDeqCz.js","assets/hash-CkPRUnUr.js","assets/heading-3-ztoY176w.js","assets/headphones-DLFQUGPg.js","assets/highlighter-CXxFGtCA.js","assets/house-CuDX15dD.js","assets/id-card-BS4kW52O.js","assets/image-off-CQpKnsSb.js","assets/inbox-DT4_wkMI.js","assets/user-x-CnFv5I1J.js","assets/user-cog-DfvmaPJo.js","assets/languages-DPjsq9HS.js","assets/leaf-DEjd7OIs.js","assets/layout-grid-DHwSsmek.js","assets/layout-list-DYXlh1kB.js","assets/layout-template-DZmd9x2d.js","assets/link-2-Bz418kJF.js","assets/link-NAvi-XIJ.js","assets/list-checks-BcX9Hy82.js","assets/list-music-9d_ECL_m.js","assets/list-J0sNOC6N.js","assets/lock-open-9V4NiTqh.js","assets/log-in-DptXYr9G.js","assets/magnet-D4UA4pls.js","assets/mail-c
1heck-Bj2EMEy5.js","assets/map-pin-CfrexBNV.js","assets/medal-CR9SpB4N.js","assets/merge-FkZuiLkF.js","assets/message-circle-dPf9DEwk.js","assets/message-square-plus-BTXixBEO.js","assets/message-square-quote-CgWzoB27.js","assets/notebook-pen-DInkreK-.js","assets/paintbrush-DuK33PEg.js","assets/panel-left-close-vlZntaX2.js","assets/panel-right-close-Y3fV0qZz.js","assets/presentation-CbLxf6sE.js","assets/panels-top-left-C7W2tXdZ.js","assets/pen-line-C7t4ZMTM.js","assets/pencil-line-xdQcAvI8.js","assets/pin-off-CXNLzp6F.js","assets/pin-CrlKFiwO.js","assets/pipette-C_HtpDZE.js","assets/printer-BIncYf8w.js","assets/scan-search-DhjACJCc.js","assets/quote-CxU2wX0M.js","assets/rectangle-vertical-BJkiMmvg.js","assets/scan-face-C-nQLjlh.js","assets/triangle-Duu1vgy-.js","assets/scissors-BfXG8Nj6.js","assets/scroll-text-CL6km1oO.js","assets/send-horizontal-B1x4NjWJ.js","assets/settings-2-B-3m7E-n.js","assets/shield-alert-DjqgEBIg.js","assets/shield-check-B2OdBTAi.js","assets/shirt-KyCoYvBg.js","assets/shopping-cart-BAgkk1WQ.js","assets/sliders-vertical-DYTeZfje.js","assets/smile-D4BP7ItF.js","assets/square-arrow-up-right-C52M3o60.js","assets/square-check-big-lLl6wxNj.js","assets/store-3h5dG3Qn.js","assets/sun-D-u1OyUA.js","assets/swords-DgBc0X5u.js","assets/tag-ymZY7ZpA.js","assets/target-D7k4FZNF.js","assets/thumbs-up-tAYvf20X.js","assets/timer-BcwF8jSV.js","assets/trending-down-D_2EkGob.js","assets/trending-up-DQZAmTIZ.js","assets/user-round-CWJmICV3.js","assets/variable-BEhyeYQc.js","assets/volume-x-sJBZNSb_.js","assets/wallet-Cb42PZzH.js","assets/waves-3e4XJ5kt.js","assets/webhook-enSNtrb-.js","assets/wifi-off-o8FOuPO3.js","assets/workflow-BI1jpWQ6.js","assets/wrench-BAs41aWY.js","assets/index-C1aNq2DX.js","assets/Dashboard-r-Ozaozv.css","assets/BrowseApps-DZEBhVaR.js","assets/wysiwygHtml-BeL4u4ti.js","assets/PremiumBadge-CVJEOjnd.js","assets/BrowseSuites-BM7jWCrO.js","assets/Projects-C6-Pa-Ww.js","assets/collapsible-CnFAKkV4.js","assets/index-t4r_rQn3.js","assets/AppDetail-Csk3-KaY.js","assets/ProjectWizard-CiDRpwJy.js","assets/calendar-BEegEPSG.js","assets/isSameMonth-wK3x45em.js","assets/format-D6j7Ttkl.js","assets/modelConfig-DMdHUdbX.js","assets/useMemoryVaults-DmzE4ON1.js","assets/GeneratingProgress-BPc6M3iA.js","assets/invokeGenerateContent-DIcF1WT2.js","assets/scroll-area-B_jR4zex.js","assets/index-DfMqpJII.js","assets/ProjectEditor-DaLsVgYP.js","assets/marked.esm-CukEvTvm.js","assets/WordCountTargetModal-DJ4PXN_H.js","assets/documentExport--mrT3Lvi.js","assets/index-BA8s6W1s.js","assets/FileSaver.min-BZKrLgOC.js","assets/tabs-F1NwRQLc.js","assets/RichTextEditor-DviHppVo.js","assets/index-gQIC8-lk.js","assets/index-Cftu4mV4.js","assets/FontControls-De8hSdWz.js","assets/googleFonts-ukCTObCr.js","assets/index-DVzbKmWj.js","assets/separator-CbkP8tOb.js","assets/ProjectStats-DukwEsIO.js","assets/card-DqITKmdj.js","assets/skeleton-DNZ8bSPs.js","assets/table-BDWcOxV_.js","assets/chart-DEYQYX51.js","assets/generateCategoricalChart-CZ23dkFV.js","assets/value-AyFvG__f.js","assets/BarChart-Bz_7aQla.js","assets/CartesianGrid-fgFcE0nC.js","assets/DashboardLayout-Bdb7b6lZ.js","assets/useFreeCreditSplit-CwxRND5k.js","assets/useLoungeBadge-CDbvexfa.js","assets/proHandoff-DwIbah3C.js","assets/usePresenceTracking-D-7SSaZ1.js","assets/FreeOutOfCreditsDialog-BeV0weq-.js","assets/AppBuilder-DcvcMKS5.js","assets/BuilderModeSwitcher-CmkJx1JN.js","assets/SkillAssignmentPanel-Ck7xWnmk.js","assets/radio-group-DqvjCTcq.js","assets/AppBuilderSelect-CgtoA6b4.js","assets/SimplifiedAppBuilder-CvmNiOg0.js","assets/use-mobile-BW6Hg1yb.js","assets/AdminUsers-DDSE8otE.js","assets/AdminCostAnalytics-D9qTktkd.js","assets/AdminErrorLogs-CvpthhOn.js","assets/AdminStorageCleanup-CUCzGXo_.js","assets/AdminS3Migration-DO2ucsK8.js","assets/AdminRestorePreview-C7q6EGE8.js","assets/AdminRestoreReconcile-BLakCYjX.js","assets/AdminBadges-TMcrViB-.js","assets/AdminSubSuites-COGuSPkw.js","assets/AdminPremiumApps-C0nig1fz.js","assets/AdminCanvasModels-l63iXj7j.js","assets/AdminAutoRouting-DtQIIChA.js","assets/useChatModelsCatalog-CBcccYnm.js","assets/AdminCinematography-CY_A-W2W.js","assets/accordion-1MsOfs3N.js","assets/command-BSWf4uZM.js","assets/useKineticCaptionsGate-M-RO5QYc.js","assets/useStoryReelTier-CewP7wto.js","assets/LooksTab-DsnDsg9l.js","assets/AdminAttachmentIndexing-Bn5zokYc.js","assets/AdminWorldBuilder-D7uoJ9jC.js","assets/AdminTalentStudio-CrxxDAlq.js","assets/AdminGuild-CSugRGdV.js","assets/onboarding-B9fc8sXP.js","assets/engineSettings-Bte-YPK7.js","assets/showcase-wBAHUebX.js","assets/AdminModelManager-BBcmgyOR.js","assets/AdminAppModels-DquG1Yt3.js","assets/AdminSkills-BBZsVcVM.js","assets/AdminSkillEditor-CY0HpnpF.js","assets/AdminSkillDetail-Daq-Lsx4.js","assets/PieChart-CPajXZr1.js","assets/SkillTriggerOptimizer-asmolPY4.js","assets/skillRouter-D_kSOtjs.js","assets/AdminSkillsAnalytics-B_B2vJrN.js","assets/AdminSkillTemplates-C_1sDIWq.js","assets/AdminSkillChains-kRwAl7GE.js","assets/AdminSkillRevenue-BmZR-BI7.js","assets/AdminRevenueForecast-Dscmkxx2.js","assets/AdminCharacterTemplates-UbXPVIxM.js","assets/characterTemplates-CDJN1ZWg.js","assets/AdminAppTags-B32UacUR.js","assets/AdminAppRegistry-XenZj0Lh.js","assets/ConciergeDev-D7rI_aVD.js","assets/Concierge-D2o6_ABn.js","assets/WorkflowEditor-
1BO2Rty3F.js","assets/WorkflowEditor-BZV40eAE.css","assets/BuyCredits-DlXa-lRk.js","assets/CreditHistory-D8KzSiki.js","assets/CreditUsageLog-BOFqwpvX.js","assets/Settings-CedViTgO.js","assets/avatar-DhTp8kj1.js","assets/Notifications-B9KpZ1nZ.js","assets/purify.es-t2lEkcJL.js","assets/PersonaEditor-BKfgt5UG.js","assets/MemoryVault-6yjrFvQr.js","assets/fileParser-jeEUbpuY.js","assets/index-CE3eoyAD.js","assets/index-D0UyVEDn.js","assets/pdf-BuK0oG9z.js","assets/RagLibrary-Bgq2xiUo.js","assets/MemoryDocEditor-CdZGIAXA.js","assets/MemoryInterview-DFzWu1dq.js","assets/ChatPlayground-C91IADwa.js","assets/CodeBlock-CVy_3IzU.js","assets/downloadViaBlob-BRfw0djm.js","assets/MarbleStudio-CF8z8_eb.js","assets/AppRatingWidget-DB-bK0rz.js","assets/ChatPresets-DXjVdZnc.js","assets/ChatSaved-CfztpCqL.js","assets/ThemeCustomizer-mFsp4UJ0.js","assets/ColorPickerPopover-BOjKdvNr.js","assets/WritingStyles-DRVVXmE9.js","assets/useCreatorLimits-StkXbE9i.js","assets/WritingStyleEditor-NwNyVSIT.js","assets/BrandVault-B3ZJk-Ft.js","assets/BrandProfileEditor-xL-olOF2.js","assets/UsageAnalytics-CV4laIGU.js","assets/AppBuilderSOP-_ZdixhBS.js","assets/SOPVideoSection-CTQ5Bw31.js","assets/AIChatSOP-13zJX9jL.js","assets/SOPIndex-DcWq1oWP.js","assets/CustomSOP-fe4lJ1gy.js","assets/MyProgress-D9WUGAxy.js","assets/StylesAndPersonas-Du0zOz3H.js","assets/Personas-Dc2wqLID.js","assets/ImageUpscaler-DjYgwFDH.js","assets/ImageEditProProjects-DpfeGldQ.js","assets/ConciergeHandoffBanner-D7W2OmjK.js","assets/ConciergeHints-fZWGgNH7.js","assets/freeTempSession-DTDP5hqp.js","assets/FormerProEditorProjects-BNmj_4R4.js","assets/audioEdit-B9V8ke8B.css","assets/editorLightTheme-DtZr5g3L.css","assets/WorldBuilderPro-BlkDsnFX.js","assets/wizard-CpLH5DIO.js","assets/FontStudioPage-c4vGGnYo.js","assets/MobileDesktopOnlyBanner-DKwQpkHy.js","assets/FontStudioPage-DCPWAAvT.css","assets/TalentStudioLayout-BnlSUkKe.js","assets/useTalentStudioOnboarding-LjIvCUWk.js","assets/TalentStudioLayout-Cl0egW20.css","assets/MyTalent-T5KH_GAk.js","assets/signedUrls-gWycYoy7.js","assets/TalentImage-CqNt0e-p.js","assets/TalentDetail-DGjpbBMn.js","assets/identity-CiqdxzYN.js","assets/edgeError-B07rqhCM.js","assets/CastingRoom-BkmtMblB.js","assets/casting-CG6sQ01C.js","assets/CastingBrief-D7uOzUo0.js","assets/IdentityEditor-B5lYdRsn.js","assets/renderModels-DIlynTl3.js","assets/RenderModelSelector-Dsu8xvfj.js","assets/pricing-DJvQmhvE.js","assets/ReferenceCeremony-Dr-vWdji.js","assets/UpdateIdentity-BkpVteOM.js","assets/ContactSheet-BEgKwGug.js","assets/shotPack-AH8TmdPJ.js","assets/FinishForPrintDialog-2mC6WuyX.js","assets/NewShoot-C2kl6jaS.js","assets/Campaigns-B3vs25zP.js","assets/CampaignDetail-C4GueknW.js","assets/GuildLayout-X3DiyWtW.js","assets/GuildLayout-C4pWaP9m.css","assets/GuildHall--ZmEdCYH.js","assets/hosts-BCHgcPTu.js","assets/masters-D5w-fc81.js","assets/episodes-l44tPt3K.js","assets/vo-5-FaN7i0.js","assets/deliverables-BcqxG9p6.js","assets/GuildWizard-tbjvckng.js","assets/MasterVoicePicker-FXu0We1q.js","assets/VoicePreviewButton-DJ9xtAor.js","assets/CoachMark-DqsHWBDw.js","assets/useAutoCaptions-CrASxu0r.js","assets/stitchClips-BkHsZI8n.js","assets/jspdf.es.min-4V0daQKN.js","assets/pako.esm-DbhVuoN6.js","assets/openHandoffTab-H6Ws3CLx.js","assets/GuildRoster-DkdT3NaX.js","assets/GuildHostDetail-DSbuPLcy.js","assets/GuildMasterDetail-Dv4a2Arx.js","assets/GuildShowcase-DtwvqrqC.js","assets/AnimationStudioLayout-Z8slYtNg.js","assets/SeriesPage-BNTjl4h5.js","assets/client-iT9cYIM-.js","assets/WritersRoom-CgtG-lv2.js","assets/requestKey-DJhikFYF.js","assets/production-core-BnNjpAjc.js","assets/bible-Dhvximgk.js","assets/assets-_fETww8R.js","assets/CastPage-bKb7BCIN.js","assets/starterRig-j85YZ4qr.js","assets/StyleWorldPage-BMgEQIeN.js","assets/editor-transforms-AwYXtz53.js","assets/ArtGenerationPanel-_Zmt1JxQ.js","assets/art-DCa95ccd.js","assets/CharacterShop-dcUzTHiR.js","assets/rig-transforms-bW-QYnuC.js","assets/SoundStage-Bpu096DV.js","assets/finalMix-CNQqoA5j.js","assets/StagePage-BgMyaIgW.js","assets/stageRenderer-CaBvKtB7.js","assets/mp4-muxer-E99e59Tm.js","assets/ScreeningRoom-Cj3Lluwb.js","assets/WatchSh
1are-DSA3_srL.js","assets/DailiesPage-DMRakRm0.js","assets/StudioAdminPage-BEeJqFPn.js","assets/BiblePage-IfY--vzL.js","assets/deconstruct-BSg1QBmR.js","assets/DeconstructPage-Db9TE6Sh.js","assets/WorldBuilderProWizard-f-1_LtW4.js","assets/ImageEditProShell-B4lEAIML.js","assets/FreeLeaveGuard-CMvVXFoh.js","assets/AudioTranscriber-CL1WTSxb.js","assets/VideoGeneratorClassicRoute-DZtXBx4i.js","assets/msOptics-Bck13Ckp.js","assets/LayoutSwitchLink-BETRaFYj.js","assets/useBeforeUnload-ObaCiBWu.js","assets/TimelineEditor-DAQWPQzx.js","assets/BakeoffPanel-vRjVGUfR.js","assets/MotionStudioDefaultRoute-Ct60ep5g.js","assets/MotionStudioDefaultRoute-CJIJ9BxN.css","assets/StoryReel-CKqvZXA5.js","assets/StoryReelTierGate-B0TCs3AI.js","assets/useStoryReelOnboarding-BZ9eEkhi.js","assets/StoryReelProject-CK_V68Lh.js","assets/audioFetch-3Tn3f5fn.js","assets/confetti.module-ONDKWxYZ.js","assets/TwinStudio-Drc9Hl60.js","assets/twinProfile-ZUtZIIU5.js","assets/inspirationImages-CoXHugGI.js","assets/ReviewFields-DuBMvbv3.js","assets/draftEdits-BEqbeOkG.js","assets/TwinStudioCreate-cHybyE0_.js","assets/assemble-DreTDm0o.js","assets/TwinStudioAnalysis-Bpp_howl.js","assets/TwinStudioReview-C6LaHrfH.js","assets/useAutosave-DuKxnDsG.js","assets/TwinStudioDetails-BhM4tsVg.js","assets/Chips-Bbt8IuXi.js","assets/TwinStudioDetails2-DQyhp0T9.js","assets/TwinStudioFinalize-BMgeMHaL.js","assets/TwinStudioInterview-D1FOr8Fh.js","assets/VideoEditor-DlDzjuNs.js","assets/MusicStudio-DBe4spcD.js","assets/lamejs-hoAV102G.js","assets/SoundForge-D-Pib7-f.js","assets/CharacterCreator-Dz_XY-OY.js","assets/SandboxManager-uk-9JAXZ.js","assets/LandingSectionsAdmin-C3xhu6dw.js","assets/stripe-builder-monthly-BjRFZpPm.js","assets/SandboxPreviewPage-C8S8eKWu.js","assets/SandboxPageContext-R7w2YJUt.js","assets/PublicPageWrapper-CesRABGE.js","assets/AdminPageBar-kQSLTcj1.js","assets/DynamicSandboxPage-B9FYtL2b.js","assets/PublicLearningLayout-Cl9h5qyS.js","assets/TermsAndPrivacyDraft-BpC4eo-b.js","assets/AppSuiteThankYou-RT4FTzr0.js","assets/emaiTestimonials-bQLqVMdo.js","assets/CreateAccount-CypWEM46.js","assets/JoinFree-NK5yWjZK.js","assets/ForgotPassword-BAhyfc06.js","assets/ResetPassword-CqmvF0VY.js","assets/EmbedApp-CFfsiOYo.js","assets/EmbedChat-BK7-VRU9.js","assets/AccountCanceled-CBB4GBvL.js","assets/PaymentFailed-CgjHGjhG.js","assets/OracleCards-DUOaPJkp.js","assets/StoryForgeDashboard-9nhKcNPj.js","assets/storyforgeArtStyles-BuToHZNx.js","assets/Breadcrumbs-B-SrEYk8.js","assets/storyforge-onboarding-ooP_VoIY.js","assets/StoryForgeNewProject-CHtkcYC-.js","assets/StoryForgePreview-B47qUC2c.js","assets/FlipbookViewer-BN22WRuw.js","assets/ScaledHtmlPreview-BMQ_hSCj.js","assets/browserPdfExport-DPw16s-B.js","assets/StoryForgeNewBookWizard-mMXV7khj.js","assets/StoryForgeWizardCharacters-C02M2s_l.js","assets/Tip-Y6KaU2J_.js","assets/SaveBar-Dz_6hNOY.js","assets/useStoryForgeAutosave-DaFW0lzo.js","assets/StoryForgeWizardSetting-BMustft-.js","assets/StoryForgeWizardOptions-XoB09JUC.js","assets/HelpPopover-DcjBtAND.js","assets/StoryForgeWizardEngines-DNMKtVAZ.js","assets/StoryForgeOutline-CiPuyUsA.js","assets/StoryForgeWorkspace-CwxfBRKT.js","assets/StoryForgeBookWorkspace-DJp9dTP_.js","assets/CharacterReferencePanel-BrEaebHK.js","assets/StoryForgeIllustrations-BHTyUt25.js","assets/imagePromptBuilder-pVZNBLZG.js","assets/StoryForgeIllustrationGenerate-GfloXuDH.js","assets/UploadImageButton-BPHJO184.js","assets/StoryForgeCompose-B8ewx18s.js","assets/index.min-BJyLBXKj.js","assets/IllustrationLibraryPicker-exkBHZmP.js","assets/StoryForgeCover-T082-izM.js","assets/StoryForgeBackCover-6-2khP87.js","assets/StoryForgeFullCover-Crk2Ruyk.js","assets/StoryForgeFrontMatter-DrCn0d-H.js","assets/StoryForgeSharedPreview-BpCeo2Ag.js","assets/StoryForgePageLayout-fVO27vdQ.js","assets/html2canvas.esm-CBrSDip1.js","assets/StoryForgeExport-Cx7Zot_V.js","assets/storyforge-analytics-BdktgsN6.js","assets/StoryForgeReader-B4oLdadd.js","assets/StoryForgeAdminAnalytics-KA688IKr.js","assets/StoryForgeQA-DQdJU3E3.js","assets/AudiobookStudio-DmXDhK-8.js","assets/AudiobookProject-DzUeG8og.js","assets/VoiceoverStudio-DCr8KFNs.js","assets/VoiceoverProject-Bnmthg9U.js","assets/UnderscoreStudio-D4AmCtBX.js","assets/StoryboardStudio-BVa6nZMF.js","assets/StoryboardEditor-DSu7fIty.js","assets/ControlRoom-DRLgKktE.js","assets/UnderscoreProject-imf1XUjk.js","assets/AudioEditLayout-B8JLVEeN.js","assets/AudioEditProjects-nOJNOEBr.js","assets/OnboardingTour-BkLczv57.js","assets/editorStore-BlFML-N_.js","assets/timeStretch-C_IVxA8q.js","assets/AudioEditEditor-BrTnIfi-.js","assets/AudioEditSettings-C_zlvtP8.js","assets/GraphicNovelDashboard-CuXOcvDG.js","assets/GraphicNovelNewProject-C9tJsnUZ.js","assets/layouts-D5Vs-Drc.js","assets/GraphicNovelWorksp
vendor: 7,780 bytes, lines 1-10
1ace-B3rGJbki.js","assets/GraphicNovelReader-Cbnr04mh.js","assets/MarketplaceLayout-uYIJd3U5.js","assets/MarketplaceBrowse-Cdh24nBo.js","assets/MarketplaceMyApps-DVwWzZvw.js","assets/MarketplaceMessages-DTDwhiVN.js","assets/MarketplaceSell-D6Hi0tGS.js","assets/MarketplaceMyProducts-CDJyVJ5w.js","assets/MarketplaceNewListing-DQ9-7kUy.js","assets/MarketplaceAppLaunch-Dx-7N5D4.js","assets/MarketplaceDetail-DSRWozyT.js","assets/MarketplaceDigitalLibrary-CZSAtE6b.js","assets/MarketplacePayoutSetup-DeVWZqKR.js","assets/MarketplaceSellerPayments-CE4lD37J.js","assets/MarketplaceSellerEarnings-kzETlIGn.js","assets/LoungeLayout-VBAfeokQ.js","assets/touchLastActive-p4HYuulT.js","assets/LoungeFeed-0E__iCjV.js","assets/PostCard-wcnE-dMH.js","assets/mediaOptimize-DRQGBfU-.js","assets/LoungeUpdates-Bp1pTkRc.js","assets/LoungeIntroductions-Cd_XyQ70.js","assets/PostFeed-DZkC3ZY4.js","assets/LoungeShowcase-nZw8NtVe.js","assets/LoungeAsk-DKOOJwoy.js","assets/LoungeStudioHours-BbP0Nin5.js","assets/LoungeDirectory-OT4oSJJ1.js","assets/LoungeLeaderboard-BWtakLdu.js","assets/Summit-DRBlG-JG.js","assets/AdminSummit-DkDcMshH.js","assets/Dashboard-NcRYjKKp.js","assets/Templates-dIQD3wD9.js","assets/Onboarding-CbScjEZj.js","assets/Editor-DMH0R2Pd.js","assets/Editor-7eL-fQI9.css","assets/CoverDesigner-DLYsEU22.js","assets/AuthHandoff-D0JvVPUv.js"])))=>i.map(i=>d[i]); 2var mx=Object.defineProperty;var Uf=e=>{throw TypeError(e)};var gx=(e,t,r)=>t in e?mx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Ff=(e,t,r)=>gx(e,typeof t!="symbol"?t+"":t,r),xu=(e,t,r)=>t.has(e)||Uf("Cannot "+r);var j=(e,t,r)=>(xu(e,t,"read from private field"),r?r.call(e):t.get(e)),X=(e,t,r)=>t.has(e)?Uf("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),q=(e,t,r,n)=>(xu(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),oe=(e,t,r)=>(xu(e,t,"access private method"),r);var na=(e,t,r,n)=>({set _(s){q(e,t,s,r)},get _(){return j(e,t,n)}});function vx(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const s in n)if(s!=="default"&&!(s in e)){const o=Object.getOwnPropertyDescriptor(n,s);o&&Object.defineProperty(e,s,o.get?o:{enumerable:!0,get:()=>n[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&n(i)}).observe(document,{childList:!0,subtree:!0});function r(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(s){if(s.ep)return;s.ep=!0;const o=r(s);fetch(s.href,o)}})();var a2=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function zg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function l2(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,s.get?s:{enumerable:!0,get:function(){return e[n]}})}),r}var Wg={exports:{}},Dl={},Hg={exports:{}},se={};/** 3 * @license React 4 * react.production.min.js 5 * 6 * Copyright (c) Facebook, Inc. and its affiliates. 7 * 8 * This source code is licensed under the MIT license found in the 9 * LICENSE file in the root directory of this source tree. 10 */var zi=Symbol.for("react.element"),yx=Symbol.for("react.portal"),wx=Symbol.for("react.fragment"),_x=Symbol.for("react.strict_mode"),xx=Symbol.for("react.profiler"),bx=Symbol.for("react.provider"),Ex=Symbol.for("react.context"),Sx=Symbol.for("react.forward_ref"),kx=Symbol.for("react.suspense"),Px=Symbol.for("react.memo"),Tx=Symbol.for("react.lazy"),Vf=Symbol.iterator;function jx(e){return e===null||typeof e!="object"?null:(e=Vf&&e[Vf]||e["@@iterator"],typeof e=="function"?e:null)}var qg={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Kg=Object.assign,Gg={};function wo(e,t,r){this.props=e,this.context=t,this.refs=Gg,this.updater=r||qg}wo.prototype.isReactComponent={};wo.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};wo.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Qg(){}Qg.prototype=wo.prototype;function rh(e,t,r){this.props=e,this.context=t,this.refs=Gg,this.updater=r||qg}var nh=rh.prototype=new Qg;nh.constructor=rh;Kg(nh,wo.prototype);nh.isPureReactComponent=!0;var Bf=Array.isArray,Jg=Object.prototype.hasOwnProperty,sh={current:null},Yg={key:!0,ref:!0,__self:!0,__source:!0};function Xg(e,t,r){var n,s={},o=null,i=null;if(t!=null)for(n in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)Jg.call(t,n)&&!Yg.hasOwnProperty(n)&&(s[n]=t[n]);var a=arguments.length-2;if(a===1)s.children=r;else if(1<a){for(var l=Array(a),c=0;c<a;c++)l[c]=arguments[c+2];s.children=l}if(e&&e.defaultProps)for(n in a=e.defaultProps,a)s[n]===void 0&&(s[n]=a[n]);return{$$typeof:zi,type:e,key:o,ref:i,props:s,_owner:sh.current}}function Rx(e,t){return{$$typeof:zi,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function oh(e){return typeof e=="object"&&e!==null&&e.$$typeof===zi}function Cx(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var zf=/\/+/g;function bu(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Cx(""+e.key):t.toString(36)}function Aa(e,t,r,n,s){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(o){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case zi:case yx:i=!0}}if(i)return i=e,s=s(i),e=n===""?"."+bu(i,0):n,Bf(s)?(r="",e!=null&&(r=e.replace(zf,"$&/")+"/"),Aa(s,t,r,"",function(c){return c})):s!=null&&(oh(s)&&(s=Rx(s,r+(!s.key||i&&i.key===s.key?"":(""+s.key).replace(zf,"$&/")+"/")+e)),t.push(s)),1;if(i=0,n=n===""?".":n+":",Bf(e))for(var a=0;a<e.length;a++){o=e[a];var l=n+bu(o,a);i+=Aa(o,t,r,l,s)}else if(l=jx(e),typeof l=="function")for(e=l.call(e),a=0;!(o=e.next()).done;)o=o.value,l=n+bu(o,a++),i+=Aa(o,t,r,l,s);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function sa(e,t,r){if(e==null)return e;var n=[],s=0;return Aa(e,n,"","",function(o){return t.call(r,o,s++)}),n}function Ax(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var st={current:null},Oa={transition:null},Ox={ReactCurrentDispatcher:st,ReactCurrentBatchConfig:Oa,ReactCurrentOwner:sh};function Zg(){throw Error("act(...) is not supported in production builds of React.")}
vendor: 5,709 bytes, lines 10-26
10se.Children={map:sa,forEach:function(e,t,r){sa(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return sa(e,function(){t++}),t},toArray:function(e){return sa(e,function(t){return t})||[]},only:function(e){if(!oh(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};se.Component=wo;se.Fragment=wx;se.Profiler=xx;se.PureComponent=rh;se.StrictMode=_x;se.Suspense=kx;se.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Ox;se.act=Zg;se.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=Kg({},e.props),s=e.key,o=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,i=sh.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Jg.call(t,l)&&!Yg.hasOwnProperty(l)&&(n[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)n.children=r;else if(1<l){a=Array(l);for(var c=0;c<l;c++)a[c]=arguments[c+2];n.children=a}return{$$typeof:zi,type:e.type,key:s,ref:o,props:n,_owner:i}};se.createContext=function(e){return e={$$typeof:Ex,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:bx,_context:e},e.Consumer=e};se.createElement=Xg;se.createFactory=function(e){var t=Xg.bind(null,e);return t.type=e,t};se.createRef=function(){return{current:null}};se.forwardRef=function(e){return{$$typeof:Sx,render:e}};se.isValidElement=oh;se.lazy=function(e){return{$$typeof:Tx,_payload:{_status:-1,_result:e},_init:Ax}};se.memo=function(e,t){return{$$typeof:Px,type:e,compare:t===void 0?null:t}};se.startTransition=function(e){var t=Oa.transition;Oa.transition={};try{e()}finally{Oa.transition=t}};se.unstable_act=Zg;se.useCallback=function(e,t){return st.current.useCallback(e,t)};se.useContext=function(e){return st.current.useContext(e)};se.useDebugValue=function(){};se.useDeferredValue=function(e){return st.current.useDeferredValue(e)};se.useEffect=function(e,t){return st.current.useEffect(e,t)};se.useId=function(){return st.current.useId()};se.useImperativeHandle=function(e,t,r){return st.current.useImperativeHandle(e,t,r)};se.useInsertionEffect=function(e,t){return st.current.useInsertionEffect(e,t)};se.useLayoutEffect=function(e,t){return st.current.useLayoutEffect(e,t)};se.useMemo=function(e,t){return st.current.useMemo(e,t)};se.useReducer=function(e,t,r){return st.current.useReducer(e,t,r)};se.useRef=function(e){return st.current.useRef(e)};se.useState=function(e){return st.current.useState(e)};se.useSyncExternalStore=function(e,t,r){return st.current.useSyncExternalStore(e,t,r)};se.useTransition=function(){return st.current.useTransition()};se.version="18.3.1";Hg.exports=se;var v=Hg.exports;const V=zg(v),ih=vx({__proto__:null,default:V},[v]);/** 11 * @license React 12 * react-jsx-runtime.production.min.js 13 * 14 * Copyright (c) Facebook, Inc. and its affiliates. 15 * 16 * This source code is licensed under the MIT license found in the 17 * LICENSE file in the root directory of this source tree. 18 */var Ix=v,Lx=Symbol.for("react.element"),Nx=Symbol.for("react.fragment"),Dx=Object.prototype.hasOwnProperty,$x=Ix.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Mx={key:!0,ref:!0,__self:!0,__source:!0};function ev(e,t,r){var n,s={},o=null,i=null;r!==void 0&&(o=""+r),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(i=t.ref);for(n in t)Dx.call(t,n)&&!Mx.hasOwnProperty(n)&&(s[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)s[n]===void 0&&(s[n]=t[n]);return{$$typeof:Lx,type:e,key:o,ref:i,props:s,_owner:$x.current}}Dl.Fragment=Nx;Dl.jsx=ev;Dl.jsxs=ev;Wg.exports=Dl;var u=Wg.exports,tv={exports:{}},Et={},rv={exports:{}},nv={};/** 19 * @license React 20 * scheduler.production.min.js 21 * 22 * Copyright (c) Facebook, Inc. and its affiliates. 23 * 24 * This source code is licensed under the MIT license found in the 25 * LICENSE file in the root directory of this source tree. 26 */(function(e){function t(A,I){var W=A.length;A.push(I);e:for(;0<W;){var Z=W-1>>>1,G=A[Z];if(0<s(G,I))A[Z]=I,A[W]=G,W=Z;else break e}}function r(A){return A.length===0?null:A[0]}function n(A){if(A.length===0)return null;var I=A[0],W=A.pop();if(W!==I){A[0]=W;e:for(var Z=0,G=A.length,ne=G>>>1;Z<ne;){var ee=2*(Z+1)-1,be=A[ee],Le=ee+1,ue=A[Le];if(0>s(be,W))Le<G&&0>s(ue,be)?(A[Z]=ue,A[Le]=W,Z=Le):(A[Z]=be,A[ee]=W,Z=ee);else if(Le<G&&0>s(ue,W))A[Z]=ue,A[Le]=W,Z=Le;else break e}}return I}function s(A,I){var W=A.sortIndex-I.sortIndex;return W!==0?W:A.id-I.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,a=i.now();e.unstable_now=function(){return i.now()-a}}var l=[],c=[],d=1,f=null,p=3,h=!1,_=!1,y=!1,x=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(A){for(var I=r(c);I!==null;){if(I.callback===null)n(c);else if(I.startTime<=A)n(c),I.sortIndex=I.expirationTime,t(l,I);else break;I=r(c)}}function b(A){if(y=!1,w(A),!_)if(r(l)!==null)_=!0,L(P);else{var I=r(c);I!==null&&z(b,I.startTime-A)}}function P(A,I){_=!1,y&&(y=!1,g(O),O=-1),h=!0;var W=p;try{for(w(I),f=r(l);f!==null&&(!(f.expirationTime>I)||A&&!D());){var Z=f.callback;if(typeof Z=="function"){f.callback=null,p=f.priorityLevel;var G=Z(f.expirationTime<=I);I=e.unstable_now(),typeof G=="function"?f.callback=G:f===r(l)&&n(l),w(I)}else n(l);f=r(l)}if(f!==null)var ne=!0;else{var ee=r(c);
vendor: 8,941 bytes, lines 26-35
26ee!==null&&z(b,ee.startTime-I),ne=!1}return ne}finally{f=null,p=W,h=!1}}var T=!1,R=null,O=-1,$=5,C=-1;function D(){return!(e.unstable_now()-C<$)}function N(){if(R!==null){var A=e.unstable_now();C=A;var I=!0;try{I=R(!0,A)}finally{I?B():(T=!1,R=null)}}else T=!1}var B;if(typeof m=="function")B=function(){m(N)};else if(typeof MessageChannel<"u"){var M=new MessageChannel,Q=M.port2;M.port1.onmessage=N,B=function(){Q.postMessage(null)}}else B=function(){x(N,0)};function L(A){R=A,T||(T=!0,B())}function z(A,I){O=x(function(){A(e.unstable_now())},I)}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(A){A.callback=null},e.unstable_continueExecution=function(){_||h||(_=!0,L(P))},e.unstable_forceFrameRate=function(A){0>A||125<A?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$=0<A?Math.floor(1e3/A):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return r(l)},e.unstable_next=function(A){switch(p){case 1:case 2:case 3:var I=3;break;default:I=p}var W=p;p=I;try{return A()}finally{p=W}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(A,I){switch(A){case 1:case 2:case 3:case 4:case 5:break;default:A=3}var W=p;p=A;try{return I()}finally{p=W}},e.unstable_scheduleCallback=function(A,I,W){var Z=e.unstable_now();switch(typeof W=="object"&&W!==null?(W=W.delay,W=typeof W=="number"&&0<W?Z+W:Z):W=Z,A){case 1:var G=-1;break;case 2:G=250;break;case 5:G=1073741823;break;case 4:G=1e4;break;default:G=5e3}return G=W+G,A={id:d++,callback:I,priorityLevel:A,startTime:W,expirationTime:G,sortIndex:-1},W>Z?(A.sortIndex=W,t(c,A),r(l)===null&&A===r(c)&&(y?(g(O),O=-1):y=!0,z(b,W-Z))):(A.sortIndex=G,t(l,A),_||h||(_=!0,L(P))),A},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(A){var I=p;return function(){var W=p;p=I;try{return A.apply(this,arguments)}finally{p=W}}}})(nv);rv.exports=nv;var Ux=rv.exports;/** 27 * @license React 28 * react-dom.production.min.js 29 * 30 * Copyright (c) Facebook, Inc. and its affiliates. 31 * 32 * This source code is licensed under the MIT license found in the 33 * LICENSE file in the root directory of this source tree. 34 */var Fx=v,bt=Ux;function F(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var sv=new Set,ui={};function as(e,t){io(e,t),io(e+"Capture",t)}function io(e,t){for(ui[e]=t,e=0;e<t.length;e++)sv.add(t[e])}var Er=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),mc=Object.prototype.hasOwnProperty,Vx=/^[: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]*$/,Wf={},Hf={};function Bx(e){return mc.call(Hf,e)?!0:mc.call(Wf,e)?!1:Vx.test(e)?Hf[e]=!0:(Wf[e]=!0,!1)}function zx(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Wx(e,t,r,n){if(t===null||typeof t>"u"||zx(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ot(e,t,r,n,s,o,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=s,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var Ke={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ke[e]=new ot(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ke[t]=new ot(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ke[e]=new ot(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ke[e]=new ot(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ke[e]=new ot(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ke[e]=new ot(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ke[e]=new ot(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ke[e]=new ot(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ke[e]=new ot(e,5,!1,e.toLowerCase(),null,!1,!1)});var ah=/[\-:]([a-z])/g;function lh(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(ah,lh);Ke[t]=new ot(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(ah,lh);Ke[t]=new ot(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(ah,lh);Ke[t]=new ot(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ke[e]=new ot(e,1,!1,e.toLowerCase(),null,!1,!1)});Ke.xlinkHref=new ot("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ke[e]=new ot(e,1,!1,e.toLowerCase(),null,!0,!0)});function uh(e,t,r,n){var s=Ke.hasOwnProperty(t)?Ke[t]:null;(s!==null?s.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Wx(t,r,s,n)&&(r=null),n||s===null?Bx(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):s.mustUseProperty?e[s.propertyName]=r===null?s.type===3?!1:"":r:(t=s.attributeName,n=s.attributeNamespace,r===null?e.removeAttribute(t):(s=s.type,r=s===3||s===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var Ar=Fx.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,oa=Symbol.for("react.element"),Ss=Symbol.for("react.portal"),ks=Symbol.for("react.fragment"),ch=Symbol.for("react.strict_mode"),gc=Symbol.for("react.profiler"),ov=Symbol.for("react.provider"),iv=Symbol.for("react.context"),dh=Symbol.for("react.forward_ref"),vc=Symbol.for("react.suspense"),yc=Symbol.for("react.suspense_list"),hh=Symbol.for("react.memo"),zr=Symbol.for("react.lazy"),av=Symbol.for("react.offscreen"),qf=Symbol.iterator;function Oo(e){return e===null||typeof e!="object"?null:(e=qf&&e[qf]||e["@@iterator"],typeof e=="function"?e:null)}var Pe=Object.assign,Eu;function Ho(e){if(Eu===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);Eu=t&&t[1]||""}return` 35`+Eu+e}var Su=!1;function ku(e,t){if(!e||Su)return"";Su=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var n=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){n=c}e.call(t.prototype)}else{try{throw Error()}catch(c){n=c}e()}}
vendor: 14,090 bytes, lines 35-38
35catch(c){if(c&&n&&typeof c.stack=="string"){for(var s=c.stack.split(` 36`),o=n.stack.split(` 37`),i=s.length-1,a=o.length-1;1<=i&&0<=a&&s[i]!==o[a];)a--;for(;1<=i&&0<=a;i--,a--)if(s[i]!==o[a]){if(i!==1||a!==1)do if(i--,a--,0>a||s[i]!==o[a]){var l=` 38`+s[i].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=i&&0<=a);break}}}finally{Su=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Ho(e):""}function Hx(e){switch(e.tag){case 5:return Ho(e.type);case 16:return Ho("Lazy");case 13:return Ho("Suspense");case 19:return Ho("SuspenseList");case 0:case 2:case 15:return e=ku(e.type,!1),e;case 11:return e=ku(e.type.render,!1),e;case 1:return e=ku(e.type,!0),e;default:return""}}function wc(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ks:return"Fragment";case Ss:return"Portal";case gc:return"Profiler";case ch:return"StrictMode";case vc:return"Suspense";case yc:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case iv:return(e.displayName||"Context")+".Consumer";case ov:return(e._context.displayName||"Context")+".Provider";case dh:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case hh:return t=e.displayName||null,t!==null?t:wc(e.type)||"Memo";case zr:t=e._payload,e=e._init;try{return wc(e(t))}catch{}}return null}function qx(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return wc(t);case 8:return t===ch?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function yn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function lv(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Kx(e){var t=lv(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var s=r.get,o=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(i){n=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(i){n=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ia(e){e._valueTracker||(e._valueTracker=Kx(e))}function uv(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=lv(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function Qa(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function _c(e,t){var r=t.checked;return Pe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function Kf(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=yn(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function cv(e,t){t=t.checked,t!=null&&uh(e,"checked",t,!1)}function xc(e,t){cv(e,t);var r=yn(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?bc(e,t.type,r):t.hasOwnProperty("defaultValue")&&bc(e,t.type,yn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Gf(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function bc(e,t,r){(t!=="number"||Qa(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var qo=Array.isArray;function $s(e,t,r,n){if(e=e.options,t){t={};for(var s=0;s<r.length;s++)t["$"+r[s]]=!0;for(r=0;r<e.length;r++)s=t.hasOwnProperty("$"+e[r].value),e[r].selected!==s&&(e[r].selected=s),s&&n&&(e[r].defaultSelected=!0)}else{for(r=""+yn(r),t=null,s=0;s<e.length;s++){if(e[s].value===r){e[s].selected=!0,n&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function Ec(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(F(91));return Pe({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Qf(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(F(92));if(qo(r)){if(1<r.length)throw Error(F(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:yn(r)}}function dv(e,t){var r=yn(t.value),n=yn(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),n!=null&&(e.defaultValue=""+n)}function Jf(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function hv(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Sc(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?hv(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var aa,fv=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,n,s){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(aa=aa||document.createElement("div"),aa.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=aa.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ci(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Zo={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Gx=["Webkit","ms","Moz","O"];Object.keys(Zo).forEach(function(e){Gx.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Zo[t]=Zo[e]})});function pv(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Zo.hasOwnProperty(e)&&Zo[e]?(""+t).trim():t+"px"}function mv(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,s=pv(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,s):e[r]=s}}var Qx=Pe({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function kc(e,t){if(t){if(Qx[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(F(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(F(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(F(61))}if(t.style!=null&&typeof t.style!="object")throw Error(F(62))}}function Pc(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){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 Tc=null;function fh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var jc=null,Ms=null,Us=null;function Yf(e){if(e=qi(e)){if(typeof jc!="function")throw Error(F(280));var t=e.stateNode;t&&(t=Vl(t),jc(e.stateNode,e.type,t))}}function gv(e){Ms?Us?Us.push(e):Us=[e]:Ms=e}function vv(){if(Ms){var e=Ms,t=Us;if(Us=Ms=null,Yf(e),t)for(e=0;e<t.length;e++)Yf(t[e])}}function yv(e,t){return e(t)}function wv(){}var Pu=!1;function _v(e,t,r){if(Pu)return e(t,r);Pu=!0;try{return yv(e,t,r)}finally{Pu=!1,(Ms!==null||Us!==null)&&(wv(),vv())}}function di(e,t){var r=e.stateNode;if(r===null)return null;var n=Vl(r);if(n===null)return null;r=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(F(231,t,typeof r));return r}var Rc=!1;if(Er)try{var Io={};Object.defineProperty(Io,"passive",{get:function(){Rc=!0}}),window.addEventListener("test",Io,Io),window.removeEventListener("test",Io,Io)}catch{Rc=!1}function Jx(e,t,r,n,s,o,i,a,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(r,c)}catch(d){this.onError(d)}}var ei=!1,Ja=null,Ya=!1,Cc=null,Yx={onError:function(e){ei=!0,Ja=e}};function Xx(e,t,r,n,s,o,i,a,l){ei=!1,Ja=null,Jx.apply(Yx,arguments)}function Zx(e,t,r,n,s,o,i,a,l){if(Xx.apply(this,arguments),ei){if(ei){var c=Ja;ei=!1,Ja=null}else throw Error(F(198));Ya||(Ya=!0,Cc=c)}}function ls(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function xv(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Xf(e){if(ls(e)!==e)throw Error(F(188))}function eb(e){var t=e.alternate;if(!t){if(t=ls(e),t===null)throw Error(F(188));return t!==e?null:e}for(var r=e,n=t;;){var s=r.return;if(s===null)break;var o=s.alternate;if(o===null){if(n=s.return,n!==null){r=n;continue}break}if(s.child===o.child){for(o=s.child;o;){if(o===r)return Xf(s),e;if(o===n)return Xf(s),t;o=o.sibling}throw Error(F(188))}if(r.return!==n.return)r=s,n=o;else{for(var i=!1,a=s.child;a;){if(a===r){i=!0,r=s,n=o;break}if(a===n){i=!0,n=s,r=o;break}a=a.sibling}if(!i){for(a=o.child;a;){if(a===r){i=!0,r=o,n=s;break}if(a===n){i=!0,n=o,r=s;break}a=a.sibling}if(!i)throw Error(F(189))}}if(r.alternate!==n)throw Error(F(190))}if(r.tag!==3)throw Error(F(188));return r.stateNode.current===r?e:t}function bv(e){return e=eb(e),e!==null?Ev(e):null}function Ev(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Ev(e);if(t!==null)return t;e=e.sibling}return null}var Sv=bt.unstable_scheduleCallback,Zf=bt.unstable_cancelCallback,tb=bt.unstable_shouldYield,rb=bt.unstable_requestPaint,Ce=bt.unstable_now,nb=bt.unstable_getCurrentPriorityLevel,ph=bt.unstable_ImmediatePriority,kv=bt.unstable_UserBlockingPriority,Xa=bt.unstable_NormalPriority,sb=bt.unstable_LowPriority,Pv=bt.unstable_IdlePriority,$l=null,lr=null;function ob(e){if(lr&&typeof lr.onCommitFiberRoot=="function")try{lr.onCommitFiberRoot($l,e,void 0,(e.current.flags&128)===128)}catch{}}var Qt=Math.clz32?Math.clz32:lb,ib=Math.log,ab=Math.LN2;function lb(e){return e>>>=0,e===0?32:31-(ib(e)/ab|0)|0}var la=64,ua=4194304;function Ko(e){switch(e&-e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Za(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,s=e.suspendedLanes,o=e.pingedLanes,i=r&268435455;if(i!==0){var a=i&~s;a!==0?n=Ko(a):(o&=i,o!==0&&(n=Ko(o)))}else i=r&~s,i!==0?n=Ko(i):o!==0&&(n=Ko(o));if(n===0)return 0;if(t!==0&&t!==n&&!(t&s)&&(s=n&-n,o=t&-t,s>=o||s===16&&(o&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)r=31-Qt(t),s=1<<r,n|=e[r],t&=~s;return n}function ub(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64: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 t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function cb(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,s=e.expirationTimes,o=e.pendingLanes;0<o;){var i=31-Qt(o),a=1<<i,l=s[i];l===-1?(!(a&r)||a&n)&&(s[i]=ub(a,t)):l<=t&&(e.expiredLanes|=a),o&=~a}}function Ac(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Tv(){var e=la;return la<<=1,!(la&4194240)&&(la=64),e}function Tu(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}
vendor: 4,087 bytes, line 38
38function Wi(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Qt(t),e[t]=r}function db(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0<r;){var s=31-Qt(r),o=1<<s;t[s]=0,n[s]=-1,e[s]=-1,r&=~o}}function mh(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-Qt(r),s=1<<n;s&t|e[n]&t&&(e[n]|=t),r&=~s}}var he=0;function jv(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Rv,gh,Cv,Av,Ov,Oc=!1,ca=[],ln=null,un=null,cn=null,hi=new Map,fi=new Map,qr=[],hb="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 submit".split(" ");function ep(e,t){switch(e){case"focusin":case"focusout":ln=null;break;case"dragenter":case"dragleave":un=null;break;case"mouseover":case"mouseout":cn=null;break;case"pointerover":case"pointerout":hi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":fi.delete(t.pointerId)}}function Lo(e,t,r,n,s,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:o,targetContainers:[s]},t!==null&&(t=qi(t),t!==null&&gh(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function fb(e,t,r,n,s){switch(t){case"focusin":return ln=Lo(ln,e,t,r,n,s),!0;case"dragenter":return un=Lo(un,e,t,r,n,s),!0;case"mouseover":return cn=Lo(cn,e,t,r,n,s),!0;case"pointerover":var o=s.pointerId;return hi.set(o,Lo(hi.get(o)||null,e,t,r,n,s)),!0;case"gotpointercapture":return o=s.pointerId,fi.set(o,Lo(fi.get(o)||null,e,t,r,n,s)),!0}return!1}function Iv(e){var t=Mn(e.target);if(t!==null){var r=ls(t);if(r!==null){if(t=r.tag,t===13){if(t=xv(r),t!==null){e.blockedOn=t,Ov(e.priority,function(){Cv(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ia(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=Ic(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);Tc=n,r.target.dispatchEvent(n),Tc=null}else return t=qi(r),t!==null&&gh(t),e.blockedOn=r,!1;t.shift()}return!0}function tp(e,t,r){Ia(e)&&r.delete(t)}function pb(){Oc=!1,ln!==null&&Ia(ln)&&(ln=null),un!==null&&Ia(un)&&(un=null),cn!==null&&Ia(cn)&&(cn=null),hi.forEach(tp),fi.forEach(tp)}function No(e,t){e.blockedOn===t&&(e.blockedOn=null,Oc||(Oc=!0,bt.unstable_scheduleCallback(bt.unstable_NormalPriority,pb)))}function pi(e){function t(s){return No(s,e)}if(0<ca.length){No(ca[0],e);for(var r=1;r<ca.length;r++){var n=ca[r];n.blockedOn===e&&(n.blockedOn=null)}}for(ln!==null&&No(ln,e),un!==null&&No(un,e),cn!==null&&No(cn,e),hi.forEach(t),fi.forEach(t),r=0;r<qr.length;r++)n=qr[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<qr.length&&(r=qr[0],r.blockedOn===null);)Iv(r),r.blockedOn===null&&qr.shift()}var Fs=Ar.ReactCurrentBatchConfig,el=!0;function mb(e,t,r,n){var s=he,o=Fs.transition;Fs.transition=null;try{he=1,vh(e,t,r,n)}finally{he=s,Fs.transition=o}}function gb(e,t,r,n){var s=he,o=Fs.transition;Fs.transition=null;try{he=4,vh(e,t,r,n)}finally{he=s,Fs.transition=o}}function vh(e,t,r,n){if(el){var s=Ic(e,t,r,n);if(s===null)$u(e,t,n,tl,r),ep(e,n);else if(fb(s,e,t,r,n))n.stopPropagation();else if(ep(e,n),t&4&&-1<hb.indexOf(e)){for(;s!==null;){var o=qi(s);if(o!==null&&Rv(o),o=Ic(e,t,r,n),o===null&&$u(e,t,n,tl,r),o===s)break;s=o}s!==null&&n.stopPropagation()}else $u(e,t,n,null,r)}}var tl=null;function Ic(e,t,r,n){if(tl=null,e=fh(n),e=Mn(e),e!==null)if(t=ls(e),t===null)e=null;else if(r=t.tag,r===13){if(e=xv(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return tl=e,null}
vendor: 10,401 bytes, line 38
38function Lv(e){switch(e){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(nb()){case ph:return 1;case kv:return 4;case Xa:case sb:return 16;case Pv:return 536870912;default:return 16}default:return 16}}var sn=null,yh=null,La=null;function Nv(){if(La)return La;var e,t=yh,r=t.length,n,s="value"in sn?sn.value:sn.textContent,o=s.length;for(e=0;e<r&&t[e]===s[e];e++);var i=r-e;for(n=1;n<=i&&t[r-n]===s[o-n];n++);return La=s.slice(e,1<n?1-n:void 0)}function Na(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function da(){return!0}function rp(){return!1}function St(e){function t(r,n,s,o,i){this._reactName=r,this._targetInst=s,this.type=n,this.nativeEvent=o,this.target=i,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(r=e[a],this[a]=r?r(o):o[a]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?da:rp,this.isPropagationStopped=rp,this}return Pe(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=da)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=da)},persist:function(){},isPersistent:da}),t}var _o={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},wh=St(_o),Hi=Pe({},_o,{view:0,detail:0}),vb=St(Hi),ju,Ru,Do,Ml=Pe({},Hi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:_h,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Do&&(Do&&e.type==="mousemove"?(ju=e.screenX-Do.screenX,Ru=e.screenY-Do.screenY):Ru=ju=0,Do=e),ju)},movementY:function(e){return"movementY"in e?e.movementY:Ru}}),np=St(Ml),yb=Pe({},Ml,{dataTransfer:0}),wb=St(yb),_b=Pe({},Hi,{relatedTarget:0}),Cu=St(_b),xb=Pe({},_o,{animationName:0,elapsedTime:0,pseudoElement:0}),bb=St(xb),Eb=Pe({},_o,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Sb=St(Eb),kb=Pe({},_o,{data:0}),sp=St(kb),Pb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Tb={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"},jb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Rb(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=jb[e])?!!t[e]:!1}function _h(){return Rb}var Cb=Pe({},Hi,{key:function(e){if(e.key){var t=Pb[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Na(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Tb[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:_h,charCode:function(e){return e.type==="keypress"?Na(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Na(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Ab=St(Cb),Ob=Pe({},Ml,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),op=St(Ob),Ib=Pe({},Hi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:_h}),Lb=St(Ib),Nb=Pe({},_o,{propertyName:0,elapsedTime:0,pseudoElement:0}),Db=St(Nb),$b=Pe({},Ml,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Mb=St($b),Ub=[9,13,27,32],xh=Er&&"CompositionEvent"in window,ti=null;Er&&"documentMode"in document&&(ti=document.documentMode);var Fb=Er&&"TextEvent"in window&&!ti,Dv=Er&&(!xh||ti&&8<ti&&11>=ti),ip=" ",ap=!1;function $v(e,t){switch(e){case"keyup":return Ub.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Mv(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ps=!1;function Vb(e,t){switch(e){case"compositionend":return Mv(t);case"keypress":return t.which!==32?null:(ap=!0,ip);case"textInput":return e=t.data,e===ip&&ap?null:e;default:return null}}function Bb(e,t){if(Ps)return e==="compositionend"||!xh&&$v(e,t)?(e=Nv(),La=yh=sn=null,Ps=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Dv&&t.locale!=="ko"?null:t.data;default:return null}}var zb={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 lp(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!zb[e.type]:t==="textarea"}function Uv(e,t,r,n){gv(n),t=rl(t,"onChange"),0<t.length&&(r=new wh("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var ri=null,mi=null;function Wb(e){Jv(e,0)}function Ul(e){var t=Rs(e);if(uv(t))return e}function Hb(e,t){if(e==="change")return t}var Fv=!1;if(Er){var Au;if(Er){var Ou="oninput"in document;if(!Ou){var up=document.createElement("div");up.setAttribute("oninput","return;"),Ou=typeof up.oninput=="function"}Au=Ou}else Au=!1;Fv=Au&&(!document.documentMode||9<document.documentMode)}function cp(){ri&&(ri.detachEvent("onpropertychange",Vv),mi=ri=null)}function Vv(e){if(e.propertyName==="value"&&Ul(mi)){var t=[];Uv(t,mi,e,fh(e)),_v(Wb,t)}}function qb(e,t,r){e==="focusin"?(cp(),ri=t,mi=r,ri.attachEvent("onpropertychange",Vv)):e==="focusout"&&cp()}function Kb(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ul(mi)}function Gb(e,t){if(e==="click")return Ul(t)}function Qb(e,t){if(e==="input"||e==="change")return Ul(t)}function Jb(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Yt=typeof Object.is=="function"?Object.is:Jb;function gi(e,t){if(Yt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var s=r[n];if(!mc.call(t,s)||!Yt(e[s],t[s]))return!1}return!0}function dp(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function hp(e,t){var r=dp(e);e=0;for(var n;r;){if(r.nodeType===3){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=dp(r)}}function Bv(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Bv(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function zv(){for(var e=window,t=Qa();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Qa(e.document)}return t}function bh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Yb(e){var t=zv(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&Bv(r.ownerDocument.documentElement,r)){if(n!==null&&bh(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=r.textContent.length,o=Math.min(n.start,s);n=n.end===void 0?o:Math.min(n.end,s),!e.extend&&o>n&&(s=n,n=o,o=s),s=hp(r,o);var i=hp(r,n);s&&i&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),o>n?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Xb=Er&&"documentMode"in document&&11>=document.documentMode,Ts=null,Lc=null,ni=null,Nc=!1;function fp(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Nc||Ts==null||Ts!==Qa(n)||(n=Ts,"selectionStart"in n&&bh(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focu
vendor: 4,501 bytes, line 38
38sNode:n.focusNode,focusOffset:n.focusOffset}),ni&&gi(ni,n)||(ni=n,n=rl(Lc,"onSelect"),0<n.length&&(t=new wh("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=Ts)))}function ha(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var js={animationend:ha("Animation","AnimationEnd"),animationiteration:ha("Animation","AnimationIteration"),animationstart:ha("Animation","AnimationStart"),transitionend:ha("Transition","TransitionEnd")},Iu={},Wv={};Er&&(Wv=document.createElement("div").style,"AnimationEvent"in window||(delete js.animationend.animation,delete js.animationiteration.animation,delete js.animationstart.animation),"TransitionEvent"in window||delete js.transitionend.transition);function Fl(e){if(Iu[e])return Iu[e];if(!js[e])return e;var t=js[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in Wv)return Iu[e]=t[r];return e}var Hv=Fl("animationend"),qv=Fl("animationiteration"),Kv=Fl("animationstart"),Gv=Fl("transitionend"),Qv=new Map,pp="abort auxClick 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(" ");function En(e,t){Qv.set(e,t),as(t,[e])}for(var Lu=0;Lu<pp.length;Lu++){var Nu=pp[Lu],Zb=Nu.toLowerCase(),eE=Nu[0].toUpperCase()+Nu.slice(1);En(Zb,"on"+eE)}En(Hv,"onAnimationEnd");En(qv,"onAnimationIteration");En(Kv,"onAnimationStart");En("dblclick","onDoubleClick");En("focusin","onFocus");En("focusout","onBlur");En(Gv,"onTransitionEnd");io("onMouseEnter",["mouseout","mouseover"]);io("onMouseLeave",["mouseout","mouseover"]);io("onPointerEnter",["pointerout","pointerover"]);io("onPointerLeave",["pointerout","pointerover"]);as("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));as("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));as("onBeforeInput",["compositionend","keypress","textInput","paste"]);as("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));as("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));as("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Go="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(" "),tE=new Set("cancel close invalid load scroll toggle".split(" ").concat(Go));function mp(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,Zx(n,t,void 0,e),e.currentTarget=null}function Jv(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],s=n.event;n=n.listeners;e:{var o=void 0;if(t)for(var i=n.length-1;0<=i;i--){var a=n[i],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==o&&s.isPropagationStopped())break e;mp(s,a,c),o=l}else for(i=0;i<n.length;i++){if(a=n[i],l=a.instance,c=a.currentTarget,a=a.listener,l!==o&&s.isPropagationStopped())break e;mp(s,a,c),o=l}}}if(Ya)throw e=Cc,Ya=!1,Cc=null,e}function ve(e,t){var r=t[Fc];r===void 0&&(r=t[Fc]=new Set);var n=e+"__bubble";r.has(n)||(Yv(t,e,2,!1),r.add(n))}function Du(e,t,r){var n=0;t&&(n|=4),Yv(r,e,n,t)}var fa="_reactListening"+Math.random().toString(36).slice(2);function vi(e){if(!e[fa]){e[fa]=!0,sv.forEach(function(r){r!=="selectionchange"&&(tE.has(r)||Du(r,!1,e),Du(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[fa]||(t[fa]=!0,Du("selectionchange",!1,t))}}function Yv(e,t,r,n){switch(Lv(t)){case 1:var s=mb;break;case 4:s=gb;break;default:s=vh}r=s.bind(null,t,r,e),s=void 0,!Rc||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),n?s!==void 0?e.addEventListener(t,r,{capture:!0,passive:s}):e.addEventListener(t,r,!0):s!==void 0?e.addEventListener(t,r,{passive:s}):e.addEventListener(t,r,!1)}function $u(e,t,r,n,s){var o=n;if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var i=n.tag;if(i===3||i===4){var a=n.stateNode.containerInfo;
vendor: 21,713 bytes, lines 38-39
38if(a===s||a.nodeType===8&&a.parentNode===s)break;if(i===4)for(i=n.return;i!==null;){var l=i.tag;if((l===3||l===4)&&(l=i.stateNode.containerInfo,l===s||l.nodeType===8&&l.parentNode===s))return;i=i.return}for(;a!==null;){if(i=Mn(a),i===null)return;if(l=i.tag,l===5||l===6){n=o=i;continue e}a=a.parentNode}}n=n.return}_v(function(){var c=o,d=fh(r),f=[];e:{var p=Qv.get(e);if(p!==void 0){var h=wh,_=e;switch(e){case"keypress":if(Na(r)===0)break e;case"keydown":case"keyup":h=Ab;break;case"focusin":_="focus",h=Cu;break;case"focusout":_="blur",h=Cu;break;case"beforeblur":case"afterblur":h=Cu;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=np;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=wb;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=Lb;break;case Hv:case qv:case Kv:h=bb;break;case Gv:h=Db;break;case"scroll":h=vb;break;case"wheel":h=Mb;break;case"copy":case"cut":case"paste":h=Sb;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=op}var y=(t&4)!==0,x=!y&&e==="scroll",g=y?p!==null?p+"Capture":null:p;y=[];for(var m=c,w;m!==null;){w=m;var b=w.stateNode;if(w.tag===5&&b!==null&&(w=b,g!==null&&(b=di(m,g),b!=null&&y.push(yi(m,b,w)))),x)break;m=m.return}0<y.length&&(p=new h(p,_,null,r,d),f.push({event:p,listeners:y}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",p&&r!==Tc&&(_=r.relatedTarget||r.fromElement)&&(Mn(_)||_[Sr]))break e;if((h||p)&&(p=d.window===d?d:(p=d.ownerDocument)?p.defaultView||p.parentWindow:window,h?(_=r.relatedTarget||r.toElement,h=c,_=_?Mn(_):null,_!==null&&(x=ls(_),_!==x||_.tag!==5&&_.tag!==6)&&(_=null)):(h=null,_=c),h!==_)){if(y=np,b="onMouseLeave",g="onMouseEnter",m="mouse",(e==="pointerout"||e==="pointerover")&&(y=op,b="onPointerLeave",g="onPointerEnter",m="pointer"),x=h==null?p:Rs(h),w=_==null?p:Rs(_),p=new y(b,m+"leave",h,r,d),p.target=x,p.relatedTarget=w,b=null,Mn(d)===c&&(y=new y(g,m+"enter",_,r,d),y.target=w,y.relatedTarget=x,b=y),x=b,h&&_)t:{for(y=h,g=_,m=0,w=y;w;w=ms(w))m++;for(w=0,b=g;b;b=ms(b))w++;for(;0<m-w;)y=ms(y),m--;for(;0<w-m;)g=ms(g),w--;for(;m--;){if(y===g||g!==null&&y===g.alternate)break t;y=ms(y),g=ms(g)}y=null}else y=null;h!==null&&gp(f,p,h,y,!1),_!==null&&x!==null&&gp(f,x,_,y,!0)}}e:{if(p=c?Rs(c):window,h=p.nodeName&&p.nodeName.toLowerCase(),h==="select"||h==="input"&&p.type==="file")var P=Hb;else if(lp(p))if(Fv)P=Qb;else{P=Kb;var T=qb}else(h=p.nodeName)&&h.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(P=Gb);if(P&&(P=P(e,c))){Uv(f,P,r,d);break e}T&&T(e,p,c),e==="focusout"&&(T=p._wrapperState)&&T.controlled&&p.type==="number"&&bc(p,"number",p.value)}switch(T=c?Rs(c):window,e){case"focusin":(lp(T)||T.contentEditable==="true")&&(Ts=T,Lc=c,ni=null);break;case"focusout":ni=Lc=Ts=null;break;case"mousedown":Nc=!0;break;case"contextmenu":case"mouseup":case"dragend":Nc=!1,fp(f,r,d);break;case"selectionchange":if(Xb)break;case"keydown":case"keyup":fp(f,r,d)}var R;if(xh)e:{switch(e){case"compositionstart":var O="onCompositionStart";break e;case"compositionend":O="onCompositionEnd";break e;case"compositionupdate":O="onCompositionUpdate";break e}O=void 0}else Ps?$v(e,r)&&(O="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(O="onCompositionStart");O&&(Dv&&r.locale!=="ko"&&(Ps||O!=="onCompositionStart"?O==="onCompositionEnd"&&Ps&&(R=Nv()):(sn=d,yh="value"in sn?sn.value:sn.textContent,Ps=!0)),T=rl(c,O),0<T.length&&(O=new sp(O,e,null,r,d),f.push({event:O,listeners:T}),R?O.data=R:(R=Mv(r),R!==null&&(O.data=R)))),(R=Fb?Vb(e,r):Bb(e,r))&&(c=rl(c,"onBeforeInput"),0<c.length&&(d=new sp("onBeforeInput","beforeinput",null,r,d),f.push({event:d,listeners:c}),d.data=R))}Jv(f,t)})}function yi(e,t,r){return{instance:e,listener:t,currentTarget:r}}function rl(e,t){for(var r=t+"Capture",n=[];e!==null;){var s=e,o=s.stateNode;s.tag===5&&o!==null&&(s=o,o=di(e,r),o!=null&&n.unshift(yi(e,o,s)),o=di(e,t),o!=null&&n.push(yi(e,o,s))),e=e.return}return n}function ms(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function gp(e,t,r,n,s){for(var o=t._reactName,i=[];r!==null&&r!==n;){var a=r,l=a.alternate,c=a.stateNode;if(l!==null&&l===n)break;a.tag===5&&c!==null&&(a=c,s?(l=di(r,o),l!=null&&i.unshift(yi(r,l,a))):s||(l=di(r,o),l!=null&&i.push(yi(r,l,a)))),r=r.return}i.length!==0&&e.push({event:t,listeners:i})}var rE=/\r\n?/g,nE=/\u0000|\uFFFD/g;function vp(e){return(typeof e=="string"?e:""+e).replace(rE,` 39`).replace(nE,"")}function pa(e,t,r){if(t=vp(t),vp(e)!==t&&r)throw Error(F(425))}function nl(){}var Dc=null,$c=null;function Mc(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Uc=typeof setTimeout=="function"?setTimeout:void 0,sE=typeof clearTimeout=="function"?clearTimeout:void 0,yp=typeof Promise=="function"?Promise:void 0,oE=typeof queueMicrotask=="function"?queueMicrotask:typeof yp<"u"?function(e){return yp.resolve(null).then(e).catch(iE)}:Uc;function iE(e){setTimeout(function(){throw e})}function Mu(e,t){var r=t,n=0;do{var s=r.nextSibling;if(e.removeChild(r),s&&s.nodeType===8)if(r=s.data,r==="/$"){if(n===0){e.removeChild(s),pi(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=s}while(r);pi(t)}function dn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function wp(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var xo=Math.random().toString(36).slice(2),ir="__reactFiber$"+xo,wi="__reactProps$"+xo,Sr="__reactContainer$"+xo,Fc="__reactEvents$"+xo,aE="__reactListeners$"+xo,lE="__reactHandles$"+xo;function Mn(e){var t=e[ir];if(t)return t;for(var r=e.parentNode;r;){if(t=r[Sr]||r[ir]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=wp(e);e!==null;){if(r=e[ir])return r;e=wp(e)}return t}e=r,r=e.parentNode}return null}function qi(e){return e=e[ir]||e[Sr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Rs(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(F(33))}function Vl(e){return e[wi]||null}var Vc=[],Cs=-1;function Sn(e){return{current:e}}function we(e){0>Cs||(e.current=Vc[Cs],Vc[Cs]=null,Cs--)}function me(e,t){Cs++,Vc[Cs]=e.current,e.current=t}var wn={},Ze=Sn(wn),ht=Sn(!1),es=wn;function ao(e,t){var r=e.type.contextTypes;if(!r)return wn;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var s={},o;for(o in r)s[o]=t[o];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function ft(e){return e=e.childContextTypes,e!=null}function sl(){we(ht),we(Ze)}function _p(e,t,r){if(Ze.current!==wn)throw Error(F(168));me(Ze,t),me(ht,r)}function Xv(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var s in n)if(!(s in t))throw Error(F(108,qx(e)||"Unknown",s));return Pe({},r,n)}function ol(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||wn,es=Ze.current,me(Ze,e),me(ht,ht.current),!0}function xp(e,t,r){var n=e.stateNode;if(!n)throw Error(F(169));r?(e=Xv(e,t,es),n.__reactInternalMemoizedMergedChildContext=e,we(ht),we(Ze),me(Ze,e)):we(ht),me(ht,r)}var yr=null,Bl=!1,Uu=!1;function Zv(e){yr===null?yr=[e]:yr.push(e)}function uE(e){Bl=!0,Zv(e)}function kn(){if(!Uu&&yr!==null){Uu=!0;var e=0,t=he;try{var r=yr;for(he=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}yr=null,Bl=!1}catch(s){throw yr!==null&&(yr=yr.slice(e+1)),Sv(ph,kn),s}finally{he=t,Uu=!1}}return null}var As=[],Os=0,il=null,al=0,Rt=[],Ct=0,ts=null,_r=1,xr="";function On(e,t){As[Os++]=al,As[Os++]=il,il=e,al=t}function ey(e,t,r){Rt[Ct++]=_r,Rt[Ct++]=xr,Rt[Ct++]=ts,ts=e;var n=_r;e=xr;var s=32-Qt(n)-1;n&=~(1<<s),r+=1;var o=32-Qt(t)+s;if(30<o){var i=s-s%5;o=(n&(1<<i)-1).toString(32),n>>=i,s-=i,_r=1<<32-Qt(t)+s|r<<s|n,xr=o+e}else _r=1<<o|r<<s|n,xr=e}function Eh(e){e.return!==null&&(On(e,1),ey(e,1,0))}function Sh(e){for(;e===il;)il=As[--Os],As[Os]=null,al=As[--Os],As[Os]=null;for(;e===ts;)ts=Rt[--Ct],Rt[Ct]=null,xr=Rt[--Ct],Rt[Ct]=null,_r=Rt[--Ct],Rt[Ct]=null}var _t=null,wt=null,xe=!1,Gt=null;function ty(e,t){var r=At(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function bp(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,_t=e,wt=dn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,_t=e,wt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=ts!==null?{id:_r,overflow:xr}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=At(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,_t=e,wt=null,!0):!1;default:return!1}}function Bc(e){return(e.mode&1)!==0&&(e.flags&128)===0}function zc(e){if(xe){var t=wt;if(t){var r=t;if(!bp(e,t)){if(Bc(e))throw Error(F(418));t=dn(r.nextSibling);var n=_t;t&&bp(e,t)?ty(n,r):(e.flags=e.flags&-4097|2,xe=!1,_t=e)}}else{if(Bc(e))throw Error(F(418));e.flags=e.flags&-4097|2,xe=!1,_t=e}}}function Ep(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;_t=e}function ma(e){if(e!==_t)return!1;if(!xe)return Ep(e),xe=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Mc(e.type,e.memoizedProps)),t&&(t=wt)){if(Bc(e))throw ry(),Error(F(418));for(;t;)ty(e,t),t=dn(t.nextSibling)}if(Ep(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(F(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){wt=dn(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}wt=null}}else wt=_t?dn(e.stateNode.nextSibling):null;return!0}function ry(){for(var e=wt;e;)e=dn(e.nextSibling)}function lo(){wt=_t=null,xe=!1}function kh(e){Gt===null?Gt=[e]:Gt.push(e)}var cE=Ar.ReactCurrentBatchConfig;function $o(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(F(309));var n=r.stateNode}if(!n)throw Error(F(147,e));var s=n,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(i){var a=s.refs;i===null?delete a[o]:a[o]=i},t._stringRef=o,t)}if(typeof e!="string")throw Error(F(284));if(!r._owner)throw Error(F(290,e))}return e}function ga(e,t){throw e=Object.prototype.toString.call(t),Error(F(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Sp(e){var t=e._init;return t(e._payload)}function ny(e){function t(g,m){if(e){var w=g.deletions;w===null?(g.deletions=[m],g.flags|=16):w.push(m)}}function r(g,m){if(!e)return null;for(;m!==null;)t(g,m),m=m.sibling;return null}function n(g,m){for(g=new Map;m!==null;)m.key!==null?g.set(m.key,m):g.set(m.index,m),m=m.sibling;return g}function s(g,m){return g=mn(g,m),g.index=0,g.sibling=null,g}function o(g,m,w){return g.index=w,e?(w=g.alternate,w!==null?(w=w.index,w<m?(g.flags|=2,m):w):(g.flags|=2,m)):(g.flags|=1048576,m)}function i(g){return e&&g.alternate===null&&(g.flags|=2),g}function a(g,m,w,b){return m===null||m.tag!==6?(m=qu(w,g.mode,b),m.return=g,m):(m=s(m,w),m.return=g,m)}function l(g,m,w,b){var P=w.type;return P===ks?d(g,m,w.props.children,b,w.key):m!==null&&(m.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===zr&&Sp(P)===m.type)?(b=s(m,w.props),b.ref=$o(g,m,w),b.return=g,b):(b=Ba(w.type,w.key,w.props,null,g.mode,b),b.ref=$o(g,m,w),b.return=g,b)}function c(g,m,w,b){return m===null||m.tag!==4||m.stateNode.containerInfo!==w.containerInfo||m.stateNode.implementation!==w.implementation?(m=Ku(w,g.mode,b),m.return=g,m):(m=s(m,w.children||[]),m.return=g,m)}function d(g,m,w,b,P){return m===null||m.tag!==7?(m=Zn(w,g.mode,b,P),m.return=g,m):(m=s(m,w),m.return=g,m)}function f(g,m,w){if(typeof m=="string"&&m!==""||typeof m=="number")return m=qu(""+m,g.mode,w),m.return=g,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case oa:return w=Ba(m.type,m.key,m.props,null,g.mode,w),w.ref=$o(g,null,m),w.return=g,w;case Ss:return m=Ku(m,g.mode,w),m.return=g,m;case zr:var b=m._init;return f(g,b(m._payload),w)}if(qo(m)||Oo(m))return m=Zn(m,g.mode,w,null),m.return=g,m;ga(g,m)}return null}function p(g,m,w,b){var P=m!==null?m.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return P!==null?null:a(g,m,""+w,b);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case oa:return w.key===P?l(g,m,w,b):null;case Ss:return w.key===P?c(g,m,w,b):null;case zr:return P=w._init,p(g,m,P(w._payload),b)}if(qo(w)||Oo(w))return P!==null?null:d(g,m,w,b,null);ga(g,w)}return null}function h(g,m,w,b,P){if(typeof b=="string"&&b!==""||typeof b=="number")return g=g.get(w)||null,a(m,g,""+b,P);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case oa:return g=g.get(b.key===null?w:b.key)||null,l(m,g,b,P);case Ss:return g=g.get(b.key===null?w:b.key)||null,c(m,g,b,P);case zr:var T=b._init;return h(g,m,w,T(b._payload),P)}if(qo(b)||Oo(b))return g=g.get(w)||null,d(m,g,b,P,null);ga(m,b)}return null}function _(g,m,w,b){for(var P=null,T=null,R=m,O=m=0,$=null;R!==null&&O<w.length;O++){R.index>O?($=R,R=null):$=R.sibling;var C=p(g,R,w[O],b);if(C===null){R===null&&(R=$);break}e&&R&&C.alternate===null&&t(g,R),m=o(C,m,O),T===null?P=C:T.sibling=C,T=C,R=$}if(O===w.length)return r(g,R),xe&&On(g,O),P;if(R===null){for(;O<w.length;O++)R=f(g,w[O],b),R!==null&&(m=o(R,m,O),T===null?P=R:T.sibling=R,T=R);return xe&&On(g,O),P}for(R=n(g,R);O<w.length;O++)$=h(R,g,O,w[O],b),$!==null&&(e&&$.alternate!==null&&R.delete($.key===null?O:$.key),m=o($,m,O),T===null?P=$:T.sibling=$,T=$);return e&&R.forEach(function(D){return t(g,D)}),xe&&On(g,O),P}function y(g,m,w,b){var P=Oo(w);if(typeof P!="function")throw Error(F(150));if(w=P.call(w),w==null)throw Error(F(151));for(var T=P=null,R=m,O=m=0,$=null,C=w.next();R!==null&&!C.done;O++,C=w.next()){R.index>O?($=R,R=null):$=R.sibling;var D=p(g,R,C.value,b);if(D===null){R===null&&(R=$);break}e&&R&&D.alternate===null&&t(g,R),m=o(D,m,O),T===null?P=D:T.sibling=D,T=D,R=$}if(C.done)return r(g,R),xe&&On(g,O),P;if(R===null){for(;!C.done;O++,C=w.next())C=f(g,C.value,b),C!==null&&(m=o(C,m,O),T===null?P=C:T.sibling=C,T=C);return xe&&On(g,O),P}for(R=n(g,R);!C.done;O++,C=w.next())C=h(R,g,O,C.value,b),C!==null&&(e&&C.alternate!==null&&R.delete(C.key===null?O:C.key),m=o(C,m,O),T===null?P=C:T.sibling=C,T=C);return e&&R.forEach(function(N){return t(g,N)}),xe&&On(g,O),P}function x(g,m,w,b){if(typeof w=="object"&&w!==null&&w.type===ks&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case oa:e:{for(var P=w.key,T=m;T!==null;){if(T.key===P){if(P=w.type,P===ks){if(T.tag===7){r(g,T.sibling),m=s(T,w.props.children),m.return=g,g=m;break e}}else if(T.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===zr&&Sp(P)===T.type){r(g,T.sibling),m=s(T,w.props),m.ref=$o(g,T,w),m.return=g,g=m;break e}r(g,T);break}else t(g,T);T=T.sibling}w.type===ks?(m=Zn(w.props.children,g.mode,b,w.key),m.return=g,g=m):(b=Ba(w.type,w.key,w.props,null,g.mode,b),b.ref=$o(g,m,w),b.return=g,g=b)}return i(g);case Ss:e:{for(T=w.key;m!==null;){if(m.key===T)if(m.tag===4&&m.stateNode.containerInfo===w.containerInfo&&m.stateNode.implementation===w.implementation){r(g,m.sibling),m=s(m,w.children||[]),m.return=g,g=m;break e}else{r(g,m);break}else t(g,m);m=m.sibling}m=Ku(w,g.mode,b),m.return=g,g=m}return i(g);case zr:return T=w._init,x(g,m,T(w._payload),b)}if(qo(w))return _(g,m,w,b);if(Oo(w))return y(g,m,w,b);ga(g,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,m!==null&&m.tag===6?(r(g,m.sibling),m=s(m,w),m.return=g,g=m):(r(g,m),m=qu(w,g.mode,b),m.return=g,g=m),i(g)):r(g,m)}return x}var uo=ny(!0),sy=ny(!1),ll=Sn(null),ul=null,Is=null,Ph=null;function Th(){Ph=Is=ul=null}function jh(e){var t=ll.current;we(ll),e._currentValue=t}function Wc(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function Vs(e,t){ul=e,Ph=Is=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(dt=!0),e.firstContext=null)}function It(e){var t=e._currentValue;if(Ph!==e)if(e={context:e,memoizedValue:t,next:null},Is===null){if(ul===null)throw Error(F(308));Is=e,ul.dependencies={lanes:0,firstContext:e}}else Is=Is.next=e;return t}var Un=null;function Rh(e){Un===null?Un=[e]:Un.push(e)}function oy(e,t,r,n){var s=t.interleaved;return s===null?(r.next=r,Rh(t)):(r.next=s.next,s.next=r),t.interleaved=r,kr(e,n)}function kr(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var Wr=!1;function Ch(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function iy(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function br(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function hn(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,ae&2){var s=n.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),n.pending=t,kr(e,r)}return s=n.interleaved,s===null?(t.next=t,Rh(n)):(t.next=s.next,s.next=t),n.interleaved=t,kr(e,r)}function Da(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,mh(e,r)}}function kp(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var s=null,o=null;if(r=r.firstBaseUpdate,r!==null){do{var i={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};o===null?s=o=i:o=o.next=i,r=r.next}while(r!==null);o===null?s=o=t:o=o.next=t}else s=o=t;r={baseState:n.baseState,firstBaseUpdate:s,lastBaseUpdate:o,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function cl(e,t,r,n){var s=e.updateQueue;Wr=!1;var o=s.firstBaseUpdate,i=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,c=l.next;l.next=null,i===null?o=c:i.next=c,i=l;var d=e.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==i&&(a===null?d.firstBaseUpdate=c:a.next=c,d.lastBaseUpdate=l))}if(o!==null){var f=s.baseState;i=0,d=c=l=null,a=o;do{var p=a.lane,h=a.eventTime;if((n&p)===p){d!==null&&(d=d.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var _=e,y=a;switch(p=t,h=r,y.tag){case 1:if(_=y.payload,typeof _=="function"){f=_.call(h,f,p);break e}f=_;break e;case 3:_.flags=_.flags&-65537|128;case 0:if(_=y.payload,p=typeof _=="function"?_.call(h,f,p):_,p==null)break e;f=Pe({},f,p);break e;case 2:Wr=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,p=s.effects,p===null?s.effects=[a]:p.push(a))}else h={eventTime:h,lane:p,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(c=d=h,l=f):d=d.next=h,i|=p;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;p=a,a=p.next,p.next=null,s.lastBaseUpdate=p,s.shared.pending=null}}while(!0);if(d===null&&(l=f),s.baseState=l,s.firstBaseUpdate=c,s.lastBaseUpdate=d,t=s.shared.interleaved,t!==null){s=t;do i|=s.lane,s=s.next;while(s!==t)}else o===null&&(s.shared.lanes=0);ns|=i,e.lanes=i,e.memoizedState=f}}function Pp(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],s=n.callback;if(s!==null){if(n.callback=null,n=r,typeof s!="function")throw Error(F(191,s));s.call(n)}}}var Ki={},ur=Sn(Ki),_i=Sn(Ki),xi=Sn(Ki);function Fn(e){if(e===Ki)throw Error(F(174));return e}function Ah(e,t){switch(me(xi,t),me(_i,e),me(ur,Ki),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Sc(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Sc(t,e)}we(ur),me(ur,t)}function co(){we(ur),we(_i),we(xi)}function ay(e){Fn(xi.current);var t=Fn(ur.current),r=Sc(t,e.type);t!==r&&(me(_i,e),me(ur,r))}function Oh(e){_i.current===e&&(we(ur),we(_i))}var Ee=Sn(0);function dl(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Fu=[];function Ih(){for(var e=0;e<Fu.length;e++)Fu[e]._workInProgressVersionPrimary=null;Fu.length=0}var $a=Ar.ReactCurrentDispatcher,Vu=Ar.ReactCurrentBatchConfig,rs=0,Se=null,De=null,Me=null,hl=!1,si=!1,bi=0,dE=0;function Qe(){throw Error(F(321))}function Lh(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Yt(e[r],t[r]))return!1;return!0}function Nh(e,t,r,n,s,o){if(rs=o,Se=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,$a.current=e===null||e.memoizedState===null?mE:gE,e=r(n,s),si){o=0;
vendor: 1,613 bytes, line 39
39do{if(si=!1,bi=0,25<=o)throw Error(F(301));o+=1,Me=De=null,t.updateQueue=null,$a.current=vE,e=r(n,s)}while(si)}if($a.current=fl,t=De!==null&&De.next!==null,rs=0,Me=De=Se=null,hl=!1,t)throw Error(F(300));return e}function Dh(){var e=bi!==0;return bi=0,e}function tr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Me===null?Se.memoizedState=Me=e:Me=Me.next=e,Me}function Lt(){if(De===null){var e=Se.alternate;e=e!==null?e.memoizedState:null}else e=De.next;var t=Me===null?Se.memoizedState:Me.next;if(t!==null)Me=t,De=e;else{if(e===null)throw Error(F(310));De=e,e={memoizedState:De.memoizedState,baseState:De.baseState,baseQueue:De.baseQueue,queue:De.queue,next:null},Me===null?Se.memoizedState=Me=e:Me=Me.next=e}return Me}function Ei(e,t){return typeof t=="function"?t(e):t}function Bu(e){var t=Lt(),r=t.queue;if(r===null)throw Error(F(311));r.lastRenderedReducer=e;var n=De,s=n.baseQueue,o=r.pending;if(o!==null){if(s!==null){var i=s.next;s.next=o.next,o.next=i}n.baseQueue=s=o,r.pending=null}if(s!==null){o=s.next,n=n.baseState;var a=i=null,l=null,c=o;do{var d=c.lane;if((rs&d)===d)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),n=c.hasEagerState?c.eagerState:e(n,c.action);else{var f={lane:d,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=f,i=n):l=l.next=f,Se.lanes|=d,ns|=d}c=c.next}while(c!==null&&c!==o);l===null?i=n:l.next=a,Yt(n,t.memoizedState)||(dt=!0),t.memoizedState=n,t.baseState=i,t.baseQueue=l,r.lastRenderedState=n}if(e=r.interleaved,e!==null){s=e;
vendor: 4,979 bytes, line 39
39do o=s.lane,Se.lanes|=o,ns|=o,s=s.next;while(s!==e)}else s===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function zu(e){var t=Lt(),r=t.queue;if(r===null)throw Error(F(311));r.lastRenderedReducer=e;var n=r.dispatch,s=r.pending,o=t.memoizedState;if(s!==null){r.pending=null;var i=s=s.next;do o=e(o,i.action),i=i.next;while(i!==s);Yt(o,t.memoizedState)||(dt=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),r.lastRenderedState=o}return[o,n]}function ly(){}function uy(e,t){var r=Se,n=Lt(),s=t(),o=!Yt(n.memoizedState,s);if(o&&(n.memoizedState=s,dt=!0),n=n.queue,$h(hy.bind(null,r,n,e),[e]),n.getSnapshot!==t||o||Me!==null&&Me.memoizedState.tag&1){if(r.flags|=2048,Si(9,dy.bind(null,r,n,s,t),void 0,null),Ue===null)throw Error(F(349));rs&30||cy(r,t,s)}return s}function cy(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=Se.updateQueue,t===null?(t={lastEffect:null,stores:null},Se.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function dy(e,t,r,n){t.value=r,t.getSnapshot=n,fy(t)&&py(e)}function hy(e,t,r){return r(function(){fy(t)&&py(e)})}function fy(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Yt(e,r)}catch{return!0}}function py(e){var t=kr(e,1);t!==null&&Jt(t,e,1,-1)}function Tp(e){var t=tr();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ei,lastRenderedState:e},t.queue=e,e=e.dispatch=pE.bind(null,Se,e),[t.memoizedState,e]}function Si(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=Se.updateQueue,t===null?(t={lastEffect:null,stores:null},Se.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e)),e}function my(){return Lt().memoizedState}function Ma(e,t,r,n){var s=tr();Se.flags|=e,s.memoizedState=Si(1|t,r,void 0,n===void 0?null:n)}function zl(e,t,r,n){var s=Lt();n=n===void 0?null:n;var o=void 0;if(De!==null){var i=De.memoizedState;if(o=i.destroy,n!==null&&Lh(n,i.deps)){s.memoizedState=Si(t,r,o,n);return}}Se.flags|=e,s.memoizedState=Si(1|t,r,o,n)}function jp(e,t){return Ma(8390656,8,e,t)}function $h(e,t){return zl(2048,8,e,t)}function gy(e,t){return zl(4,2,e,t)}function vy(e,t){return zl(4,4,e,t)}function yy(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function wy(e,t,r){return r=r!=null?r.concat([e]):null,zl(4,4,yy.bind(null,t,e),r)}function Mh(){}function _y(e,t){var r=Lt();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Lh(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function xy(e,t){var r=Lt();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Lh(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function by(e,t,r){return rs&21?(Yt(r,t)||(r=Tv(),Se.lanes|=r,ns|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,dt=!0),e.memoizedState=r)}function hE(e,t){var r=he;he=r!==0&&4>r?r:4,e(!0);var n=Vu.transition;Vu.transition={};try{e(!1),t()}finally{he=r,Vu.transition=n}}function Ey(){return Lt().memoizedState}function fE(e,t,r){var n=pn(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},Sy(e))ky(t,r);else if(r=oy(e,t,r,n),r!==null){var s=nt();Jt(r,e,n,s),Py(r,t,n)}}function pE(e,t,r){var n=pn(e),s={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(Sy(e))ky(t,s);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var i=t.lastRenderedState,a=o(i,r);if(s.hasEagerState=!0,s.eagerState=a,Yt(a,i)){var l=t.interleaved;l===null?(s.next=s,Rh(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}r=oy(e,t,s,n),r!==null&&(s=nt(),Jt(r,e,n,s),Py(r,t,n))}}function Sy(e){var t=e.alternate;return e===Se||t!==null&&t===Se}function ky(e,t){si=hl=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function Py(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,mh(e,r)}}var fl={readContext:It,useCallback:Qe,useContext:Qe,useEffect:Qe,useImperativeHandle:Qe,useInsertionEffect:Qe,useLayoutEffect:Qe,useMemo:Qe,useReducer:Qe,useRef:Qe,useState:Qe,useDebugValue:Qe,useDeferredValue:Qe,useTransition:Qe,useMutableSource:Qe,useSyncExternalStore:Qe,useId:Qe,unstable_isNewReconciler:!1},mE={readContext:It,useCallback:function(e,t){return tr().memoizedState=[e,t===void 0?null:t],e},useContext:It,useEffect:jp,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Ma(4194308,4,yy.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Ma(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ma(4,2,e,t)},useMemo:function(e,t){var r=tr();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=tr();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=fE.bind(null,Se,e),[n.memoizedState,e]}
vendor: 5,922 bytes, lines 39-41
39,useRef:function(e){var t=tr();return e={current:e},t.memoizedState=e},useState:Tp,useDebugValue:Mh,useDeferredValue:function(e){return tr().memoizedState=e},useTransition:function(){var e=Tp(!1),t=e[0];return e=hE.bind(null,e[1]),tr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=Se,s=tr();if(xe){if(r===void 0)throw Error(F(407));r=r()}else{if(r=t(),Ue===null)throw Error(F(349));rs&30||cy(n,t,r)}s.memoizedState=r;var o={value:r,getSnapshot:t};return s.queue=o,jp(hy.bind(null,n,o,e),[e]),n.flags|=2048,Si(9,dy.bind(null,n,o,r,t),void 0,null),r},useId:function(){var e=tr(),t=Ue.identifierPrefix;if(xe){var r=xr,n=_r;r=(n&~(1<<32-Qt(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=bi++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=dE++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},gE={readContext:It,useCallback:_y,useContext:It,useEffect:$h,useImperativeHandle:wy,useInsertionEffect:gy,useLayoutEffect:vy,useMemo:xy,useReducer:Bu,useRef:my,useState:function(){return Bu(Ei)},useDebugValue:Mh,useDeferredValue:function(e){var t=Lt();return by(t,De.memoizedState,e)},useTransition:function(){var e=Bu(Ei)[0],t=Lt().memoizedState;return[e,t]},useMutableSource:ly,useSyncExternalStore:uy,useId:Ey,unstable_isNewReconciler:!1},vE={readContext:It,useCallback:_y,useContext:It,useEffect:$h,useImperativeHandle:wy,useInsertionEffect:gy,useLayoutEffect:vy,useMemo:xy,useReducer:zu,useRef:my,useState:function(){return zu(Ei)},useDebugValue:Mh,useDeferredValue:function(e){var t=Lt();return De===null?t.memoizedState=e:by(t,De.memoizedState,e)},useTransition:function(){var e=zu(Ei)[0],t=Lt().memoizedState;return[e,t]},useMutableSource:ly,useSyncExternalStore:uy,useId:Ey,unstable_isNewReconciler:!1};function Bt(e,t){if(e&&e.defaultProps){t=Pe({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function Hc(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:Pe({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var Wl={isMounted:function(e){return(e=e._reactInternals)?ls(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=nt(),s=pn(e),o=br(n,s);o.payload=t,r!=null&&(o.callback=r),t=hn(e,o,s),t!==null&&(Jt(t,e,s,n),Da(t,e,s))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=nt(),s=pn(e),o=br(n,s);o.tag=1,o.payload=t,r!=null&&(o.callback=r),t=hn(e,o,s),t!==null&&(Jt(t,e,s,n),Da(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=nt(),n=pn(e),s=br(r,n);s.tag=2,t!=null&&(s.callback=t),t=hn(e,s,n),t!==null&&(Jt(t,e,n,r),Da(t,e,n))}};function Rp(e,t,r,n,s,o,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,o,i):t.prototype&&t.prototype.isPureReactComponent?!gi(r,n)||!gi(s,o):!0}function Ty(e,t,r){var n=!1,s=wn,o=t.contextType;return typeof o=="object"&&o!==null?o=It(o):(s=ft(t)?es:Ze.current,n=t.contextTypes,o=(n=n!=null)?ao(e,s):wn),t=new t(r,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Wl,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=o),t}function Cp(e,t,r,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&Wl.enqueueReplaceState(t,t.state,null)}function qc(e,t,r,n){var s=e.stateNode;s.props=r,s.state=e.memoizedState,s.refs={},Ch(e);var o=t.contextType;typeof o=="object"&&o!==null?s.context=It(o):(o=ft(t)?es:Ze.current,s.context=ao(e,o)),s.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(Hc(e,t,o,r),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&Wl.enqueueReplaceState(s,s.state,null),cl(e,r,s,n),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function ho(e,t){try{var r="",n=t;do r+=Hx(n),n=n.return;while(n);var s=r}catch(o){s=` 40Error generating stack: `+o.message+` 41`+o.stack}return{value:e,source:t,stack:s,digest:null}}function Wu(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function Kc(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var yE=typeof WeakMap=="function"?WeakMap:Map;function jy(e,t,r){r=br(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){ml||(ml=!0,nd=n),Kc(e,t)},r}function Ry(e,t,r){r=br(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var s=t.value;r.payload=function(){return n(s)},r.callback=function(){Kc(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(r.callback=function(){Kc(e,t),typeof n!="function"&&(fn===null?fn=new Set([this]):fn.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),r}function Ap(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new yE;var s=new Set;n.set(t,s)}else s=n.get(t),s===void 0&&(s=new Set,n.set(t,s));s.has(r)||(s.add(r),e=OE.bind(null,e,t,r),t.then(e,e))}function Op(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Ip(e,t,r,n,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=br(-1,1),t.tag=2,hn(r,t,1))),r.lanes|=1),e)}var wE=Ar.ReactCurrentOwner,dt=!1;function rt(e,t,r,n){t.child=e===null?sy(t,null,r,n):uo(t,e.child,r,n)}function Lp(e,t,r,n,s){r=r.render;var o=t.ref;
vendor: 6,220 bytes, line 41
41return Vs(t,s),n=Nh(e,t,r,n,o,s),r=Dh(),e!==null&&!dt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Pr(e,t,s)):(xe&&r&&Eh(t),t.flags|=1,rt(e,t,n,s),t.child)}function Np(e,t,r,n,s){if(e===null){var o=r.type;return typeof o=="function"&&!qh(o)&&o.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=o,Cy(e,t,o,n,s)):(e=Ba(r.type,null,n,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&s)){var i=o.memoizedProps;if(r=r.compare,r=r!==null?r:gi,r(i,n)&&e.ref===t.ref)return Pr(e,t,s)}return t.flags|=1,e=mn(o,n),e.ref=t.ref,e.return=t,t.child=e}function Cy(e,t,r,n,s){if(e!==null){var o=e.memoizedProps;if(gi(o,n)&&e.ref===t.ref)if(dt=!1,t.pendingProps=n=o,(e.lanes&s)!==0)e.flags&131072&&(dt=!0);else return t.lanes=e.lanes,Pr(e,t,s)}return Gc(e,t,r,n,s)}function Ay(e,t,r){var n=t.pendingProps,s=n.children,o=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},me(Ns,mt),mt|=r;else{if(!(r&1073741824))return e=o!==null?o.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,me(Ns,mt),mt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=o!==null?o.baseLanes:r,me(Ns,mt),mt|=n}else o!==null?(n=o.baseLanes|r,t.memoizedState=null):n=r,me(Ns,mt),mt|=n;return rt(e,t,s,r),t.child}function Oy(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function Gc(e,t,r,n,s){var o=ft(r)?es:Ze.current;return o=ao(t,o),Vs(t,s),r=Nh(e,t,r,n,o,s),n=Dh(),e!==null&&!dt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Pr(e,t,s)):(xe&&n&&Eh(t),t.flags|=1,rt(e,t,r,s),t.child)}function Dp(e,t,r,n,s){if(ft(r)){var o=!0;ol(t)}else o=!1;if(Vs(t,s),t.stateNode===null)Ua(e,t),Ty(t,r,n),qc(t,r,n,s),n=!0;else if(e===null){var i=t.stateNode,a=t.memoizedProps;i.props=a;var l=i.context,c=r.contextType;typeof c=="object"&&c!==null?c=It(c):(c=ft(r)?es:Ze.current,c=ao(t,c));var d=r.getDerivedStateFromProps,f=typeof d=="function"||typeof i.getSnapshotBeforeUpdate=="function";f||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==n||l!==c)&&Cp(t,i,n,c),Wr=!1;var p=t.memoizedState;i.state=p,cl(t,n,i,s),l=t.memoizedState,a!==n||p!==l||ht.current||Wr?(typeof d=="function"&&(Hc(t,r,d,n),l=t.memoizedState),(a=Wr||Rp(t,r,a,n,p,l,c))?(f||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=l),i.props=n,i.state=l,i.context=c,n=a):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{i=t.stateNode,iy(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:Bt(t.type,a),i.props=c,f=t.pendingProps,p=i.context,l=r.contextType,typeof l=="object"&&l!==null?l=It(l):(l=ft(r)?es:Ze.current,l=ao(t,l));var h=r.getDerivedStateFromProps;(d=typeof h=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==f||p!==l)&&Cp(t,i,n,l),Wr=!1,p=t.memoizedState,i.state=p,cl(t,n,i,s);var _=t.memoizedState;a!==f||p!==_||ht.current||Wr?(typeof h=="function"&&(Hc(t,r,h,n),_=t.memoizedState),(c=Wr||Rp(t,r,c,n,p,_,l)||!1)?(d||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(n,_,l),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(n,_,l)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=_),i.props=n,i.state=_,i.context=l,n=c):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),n=!1)}return Qc(e,t,r,n,o,s)}function Qc(e,t,r,n,s,o){Oy(e,t);var i=(t.flags&128)!==0;if(!n&&!i)return s&&xp(t,r,!1),Pr(e,t,o);n=t.stateNode,wE.current=t;var a=i&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&i?(t.child=uo(t,e.child,null,o),t.child=uo(t,null,a,o)):rt(e,t,a,o),t.memoizedState=n.state,s&&xp(t,r,!0),t.child}function Iy(e){var t=e.stateNode;t.pendingContext?_p(e,t.pendingContext,t.pendingContext!==t.context):t.context&&_p(e,t.context,!1),Ah(e,t.containerInfo)}function $p(e,t,r,n,s){return lo(),kh(s),t.flags|=256,rt(e,t,r,n),t.child}var Jc={dehydrated:null,treeContext:null,retryLane:0};function Yc(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ly(e,t,r){var n=t.pendingProps,s=Ee.current,o=!1,i=(t.flags&128)!==0,a;if((a=i)||(a=e!==null&&e.memoizedState===null?!1:(s&2)!==0),a?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),me(Ee,s&1),e===null)return zc(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(i=n.children,e=n.fallback,o?(n=t.mode,o=t.child,i={mode:"hidden",children:i},!(n&1)&&o!==null?(o.childLanes=0,o.pendingProps=i):o=Kl(i,n,0,null),e=Zn(e,n,r,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=Yc(r),t.memoizedState=Jc,e):Uh(t,i));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return _E(e,t,i,n,a,s,r);if(o){o=n.fallback,i=t.mode,s=e.child,a=s.sibling;var l={mode:"hidden",children:n.children};return!(i&1)&&t.child!==s?(n=t.child,n.childLanes=0,n.pendingProps=l,t.deletions=null):(n=mn(s,l),n.subtreeFlags=s.subtreeFlags&14680064),a!==null?o=mn(a,o):(o=Zn(o,i,r,null),o.flags|=2),o.return=t,n.return=t,n.sibling=o,t.child=n,n=o,o=t.child,i=e.child.memoizedState,i=i===null?Yc(r):{base
vendor: 8,213 bytes, line 41
41Lanes:i.baseLanes|r,cachePool:null,transitions:i.transitions},o.memoizedState=i,o.childLanes=e.childLanes&~r,t.memoizedState=Jc,n}return o=e.child,e=o.sibling,n=mn(o,{mode:"visible",children:n.children}),!(t.mode&1)&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function Uh(e,t){return t=Kl({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function va(e,t,r,n){return n!==null&&kh(n),uo(t,e.child,null,r),e=Uh(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function _E(e,t,r,n,s,o,i){if(r)return t.flags&256?(t.flags&=-257,n=Wu(Error(F(422))),va(e,t,i,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=n.fallback,s=t.mode,n=Kl({mode:"visible",children:n.children},s,0,null),o=Zn(o,s,i,null),o.flags|=2,n.return=t,o.return=t,n.sibling=o,t.child=n,t.mode&1&&uo(t,e.child,null,i),t.child.memoizedState=Yc(i),t.memoizedState=Jc,o);if(!(t.mode&1))return va(e,t,i,null);if(s.data==="$!"){if(n=s.nextSibling&&s.nextSibling.dataset,n)var a=n.dgst;return n=a,o=Error(F(419)),n=Wu(o,n,void 0),va(e,t,i,n)}if(a=(i&e.childLanes)!==0,dt||a){if(n=Ue,n!==null){switch(i&-i){case 4:s=2;break;case 16:s=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(n.suspendedLanes|i)?0:s,s!==0&&s!==o.retryLane&&(o.retryLane=s,kr(e,s),Jt(n,e,s,-1))}return Hh(),n=Wu(Error(F(421))),va(e,t,i,n)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=IE.bind(null,e),s._reactRetry=t,null):(e=o.treeContext,wt=dn(s.nextSibling),_t=t,xe=!0,Gt=null,e!==null&&(Rt[Ct++]=_r,Rt[Ct++]=xr,Rt[Ct++]=ts,_r=e.id,xr=e.overflow,ts=t),t=Uh(t,n.children),t.flags|=4096,t)}function Mp(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),Wc(e.return,t,r)}function Hu(e,t,r,n,s){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:s}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=n,o.tail=r,o.tailMode=s)}function Ny(e,t,r){var n=t.pendingProps,s=n.revealOrder,o=n.tail;if(rt(e,t,n.children,r),n=Ee.current,n&2)n=n&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Mp(e,r,t);else if(e.tag===19)Mp(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(me(Ee,n),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(r=t.child,s=null;r!==null;)e=r.alternate,e!==null&&dl(e)===null&&(s=r),r=r.sibling;r=s,r===null?(s=t.child,t.child=null):(s=r.sibling,r.sibling=null),Hu(t,!1,s,r,o);break;case"backwards":for(r=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&dl(e)===null){t.child=s;break}e=s.sibling,s.sibling=r,r=s,s=e}Hu(t,!0,r,null,o);break;case"together":Hu(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ua(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Pr(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),ns|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(F(153));if(t.child!==null){for(e=t.child,r=mn(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=mn(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function xE(e,t,r){switch(t.tag){case 3:Iy(t),lo();break;case 5:ay(t);break;case 1:ft(t.type)&&ol(t);break;case 4:Ah(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,s=t.memoizedProps.value;me(ll,n._currentValue),n._currentValue=s;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(me(Ee,Ee.current&1),t.flags|=128,null):r&t.child.childLanes?Ly(e,t,r):(me(Ee,Ee.current&1),e=Pr(e,t,r),e!==null?e.sibling:null);me(Ee,Ee.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return Ny(e,t,r);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),me(Ee,Ee.current),n)break;return null;case 22:case 23:return t.lanes=0,Ay(e,t,r)}return Pr(e,t,r)}var Dy,Xc,$y,My;Dy=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};Xc=function(){};$y=function(e,t,r,n){var s=e.memoizedProps;if(s!==n){e=t.stateNode,Fn(ur.current);var o=null;switch(r){case"input":s=_c(e,s),n=_c(e,n),o=[];break;case"select":s=Pe({},s,{value:void 0}),n=Pe({},n,{value:void 0}),o=[];break;case"textarea":s=Ec(e,s),n=Ec(e,n),o=[];break;default:typeof s.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=nl)}kc(r,n);var i;r=null;for(c in s)if(!n.hasOwnProperty(c)&&s.hasOwnProperty(c)&&s[c]!=null)if(c==="style"){var a=s[c];for(i in a)a.hasOwnProperty(i)&&(r||(r={}),r[i]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(ui.hasOwnProperty(c)?o||(o=[]):(o=o||[]).push(c,null));for(c in n){var l=n[c];if(a=s!=null?s[c]:void 0,n.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(i in a)!a.hasOwnProperty(i)||l&&l.hasOwnProperty(i)||(r||(r={}),r[i]="");for(i in l)l.hasOwnProperty(i)&&a[i]!==l[i]&&(r||(r={}),r[i]=l[i])}else r||(o||(o=[]),o.push(c,r)),r=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(o=o||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(o=o||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(ui.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&ve("scroll",e),o||a===l||(o=[])):(o=o||[]).push(c,l))}r&&(o=o||[]).push("style",r);var c=o;(t.updateQueue=c)&&(t.flags|=4)}};My=function(e,t,r,n){r!==n&&(t.flags|=4)};function Mo(e,t){if(!xe)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function Je(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var s=e.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags&14680064,n|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags,n|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function bE(e,t,r){var n=t.pendingProps;switch(Sh(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Je(t),null;case 1:return ft(t.type)&&sl(),Je(t),null;case 3:return n=t.stateNode,co(),we(ht),we(Ze),Ih(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ma(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Gt!==null&&(id(Gt),Gt=null))),Xc(e,t),Je(t),null;case 5:Oh(t);var s=Fn(xi.current);if(r=t.type,e!==null&&t.stateNode!=null)$y(e,t,r,n,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(F(166));return Je(t),null}if(e=Fn(ur.current),ma(t)){n=t.stateNode,r=t.type;var o=t.memoizedProps;switch(n[ir]=t,n[wi]=o,e=(t.mode&1)!==0,r){case"dialog":ve("cancel",n),ve("close",n);break;case"iframe":case"object":case"embed":ve("load",n);break;case"video":case"audio":for(s=0;s<Go.length;s++)ve(Go[s],n);break;case"source":ve("error",n);break;case"img":case"image":case"link":ve("error",n),ve("load",n);break;case"details":ve("toggle",n);break;case"input":Kf(n,o),ve("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!o.multiple},ve("invalid",n);break;case"textarea":Qf(n,o),ve("invalid",n)}kc(r,o),s=null;for(var i in o)if(o.hasOwnProperty(i)){var a=o[i];
vendor: 31,695 bytes, line 41
41i==="children"?typeof a=="string"?n.textContent!==a&&(o.suppressHydrationWarning!==!0&&pa(n.textContent,a,e),s=["children",a]):typeof a=="number"&&n.textContent!==""+a&&(o.suppressHydrationWarning!==!0&&pa(n.textContent,a,e),s=["children",""+a]):ui.hasOwnProperty(i)&&a!=null&&i==="onScroll"&&ve("scroll",n)}switch(r){case"input":ia(n),Gf(n,o,!0);break;case"textarea":ia(n),Jf(n);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(n.onclick=nl)}n=s,t.updateQueue=n,n!==null&&(t.flags|=4)}else{i=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=hv(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=i.createElement(r,{is:n.is}):(e=i.createElement(r),r==="select"&&(i=e,n.multiple?i.multiple=!0:n.size&&(i.size=n.size))):e=i.createElementNS(e,r),e[ir]=t,e[wi]=n,Dy(e,t,!1,!1),t.stateNode=e;e:{switch(i=Pc(r,n),r){case"dialog":ve("cancel",e),ve("close",e),s=n;break;case"iframe":case"object":case"embed":ve("load",e),s=n;break;case"video":case"audio":for(s=0;s<Go.length;s++)ve(Go[s],e);s=n;break;case"source":ve("error",e),s=n;break;case"img":case"image":case"link":ve("error",e),ve("load",e),s=n;break;case"details":ve("toggle",e),s=n;break;case"input":Kf(e,n),s=_c(e,n),ve("invalid",e);break;case"option":s=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},s=Pe({},n,{value:void 0}),ve("invalid",e);break;case"textarea":Qf(e,n),s=Ec(e,n),ve("invalid",e);break;default:s=n}kc(r,s),a=s;for(o in a)if(a.hasOwnProperty(o)){var l=a[o];o==="style"?mv(e,l):o==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&fv(e,l)):o==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&ci(e,l):typeof l=="number"&&ci(e,""+l):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(ui.hasOwnProperty(o)?l!=null&&o==="onScroll"&&ve("scroll",e):l!=null&&uh(e,o,l,i))}switch(r){case"input":ia(e),Gf(e,n,!1);break;case"textarea":ia(e),Jf(e);break;case"option":n.value!=null&&e.setAttribute("value",""+yn(n.value));break;case"select":e.multiple=!!n.multiple,o=n.value,o!=null?$s(e,!!n.multiple,o,!1):n.defaultValue!=null&&$s(e,!!n.multiple,n.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=nl)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Je(t),null;case 6:if(e&&t.stateNode!=null)My(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(F(166));if(r=Fn(xi.current),Fn(ur.current),ma(t)){if(n=t.stateNode,r=t.memoizedProps,n[ir]=t,(o=n.nodeValue!==r)&&(e=_t,e!==null))switch(e.tag){case 3:pa(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&pa(n.nodeValue,r,(e.mode&1)!==0)}o&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[ir]=t,t.stateNode=n}return Je(t),null;case 13:if(we(Ee),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(xe&&wt!==null&&t.mode&1&&!(t.flags&128))ry(),lo(),t.flags|=98560,o=!1;else if(o=ma(t),n!==null&&n.dehydrated!==null){if(e===null){if(!o)throw Error(F(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(F(317));o[ir]=t}else lo(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Je(t),o=!1}else Gt!==null&&(id(Gt),Gt=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=r,t):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(t.child.flags|=8192,t.mode&1&&(e===null||Ee.current&1?$e===0&&($e=3):Hh())),t.updateQueue!==null&&(t.flags|=4),Je(t),null);case 4:return co(),Xc(e,t),e===null&&vi(t.stateNode.containerInfo),Je(t),null;case 10:return jh(t.type._context),Je(t),null;case 17:return ft(t.type)&&sl(),Je(t),null;case 19:if(we(Ee),o=t.memoizedState,o===null)return Je(t),null;if(n=(t.flags&128)!==0,i=o.rendering,i===null)if(n)Mo(o,!1);else{if($e!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=dl(e),i!==null){for(t.flags|=128,Mo(o,!1),n=i.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)o=r,e=n,o.flags&=14680066,i=o.alternate,i===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=i.childLanes,o.lanes=i.lanes,o.child=i.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=i.memoizedProps,o.memoizedState=i.memoizedState,o.updateQueue=i.updateQueue,o.type=i.type,e=i.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return me(Ee,Ee.current&1|2),t.child}e=e.sibling}o.tail!==null&&Ce()>fo&&(t.flags|=128,n=!0,Mo(o,!1),t.lanes=4194304)}else{if(!n)if(e=dl(i),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Mo(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!xe)return Je(t),null}else 2*Ce()-o.renderingStartTime>fo&&r!==1073741824&&(t.flags|=128,n=!0,Mo(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(r=o.last,r!==null?r.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Ce(),t.sibling=null,r=Ee.current,me(Ee,n?r&1|2:r&1),t):(Je(t),null);case 22:case 23:return Wh(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?mt&1073741824&&(Je(t),t.subtreeFlags&6&&(t.flags|=8192)):Je(t),null;case 24:return null;case 25:return null}throw Error(F(156,t.tag))}function EE(e,t){switch(Sh(t),t.tag){case 1:return ft(t.type)&&sl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return co(),we(ht),we(Ze),Ih(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Oh(t),null;case 13:if(we(Ee),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(F(340));lo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return we(Ee),null;case 4:return co(),null;case 10:return jh(t.type._context),null;case 22:case 23:return Wh(),null;case 24:return null;default:return null}}var ya=!1,Xe=!1,SE=typeof WeakSet=="function"?WeakSet:Set,H=null;function Ls(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Re(e,t,n)}else r.current=null}function Zc(e,t,r){try{r()}catch(n){Re(e,t,n)}}var Up=!1;function kE(e,t){if(Dc=el,e=zv(),bh(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var s=n.anchorOffset,o=n.focusNode;n=n.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break e}var i=0,a=-1,l=-1,c=0,d=0,f=e,p=null;t:for(;;){for(var h;f!==r||s!==0&&f.nodeType!==3||(a=i+s),f!==o||n!==0&&f.nodeType!==3||(l=i+n),f.nodeType===3&&(i+=f.nodeValue.length),(h=f.firstChild)!==null;)p=f,f=h;for(;;){if(f===e)break t;if(p===r&&++c===s&&(a=i),p===o&&++d===n&&(l=i),(h=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=h}r=a===-1||l===-1?null:{start:a,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for($c={focusedElem:e,selectionRange:r},el=!1,H=t;H!==null;)if(t=H,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,H=e;else for(;H!==null;){t=H;try{var _=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(_!==null){var y=_.memoizedProps,x=_.memoizedState,g=t.stateNode,m=g.getSnapshotBeforeUpdate(t.elementType===t.type?y:Bt(t.type,y),x);g.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(F(163))}}catch(b){Re(t,t.return,b)}if(e=t.sibling,e!==null){e.return=t.return,H=e;break}H=t.return}return _=Up,Up=!1,_}function oi(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var s=n=n.next;do{if((s.tag&e)===e){var o=s.destroy;s.destroy=void 0,o!==void 0&&Zc(t,r,o)}s=s.next}while(s!==n)}}function Hl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function ed(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function Uy(e){var t=e.alternate;t!==null&&(e.alternate=null,Uy(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ir],delete t[wi],delete t[Fc],delete t[aE],delete t[lE])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Fy(e){return e.tag===5||e.tag===3||e.tag===4}function Fp(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Fy(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function td(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=nl));else if(n!==4&&(e=e.child,e!==null))for(td(e,t,r),e=e.sibling;e!==null;)td(e,t,r),e=e.sibling}function rd(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(rd(e,t,r),e=e.sibling;e!==null;)rd(e,t,r),e=e.sibling}var We=null,qt=!1;function Ur(e,t,r){for(r=r.child;r!==null;)Vy(e,t,r),r=r.sibling}function Vy(e,t,r){if(lr&&typeof lr.onCommitFiberUnmount=="function")try{lr.onCommitFiberUnmount($l,r)}catch{}switch(r.tag){case 5:Xe||Ls(r,t);case 6:var n=We,s=qt;We=null,Ur(e,t,r),We=n,qt=s,We!==null&&(qt?(e=We,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):We.removeChild(r.stateNode));break;case 18:We!==null&&(qt?(e=We,r=r.stateNode,e.nodeType===8?Mu(e.parentNode,r):e.nodeType===1&&Mu(e,r),pi(e)):Mu(We,r.stateNode));break;case 4:n=We,s=qt,We=r.stateNode.containerInfo,qt=!0,Ur(e,t,r),We=n,qt=s;break;case 0:case 11:case 14:case 15:if(!Xe&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){s=n=n.next;do{var o=s,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&Zc(r,t,i),s=s.next}while(s!==n)}Ur(e,t,r);break;case 1:if(!Xe&&(Ls(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){Re(r,t,a)}Ur(e,t,r);break;case 21:Ur(e,t,r);break;case 22:r.mode&1?(Xe=(n=Xe)||r.memoizedState!==null,Ur(e,t,r),Xe=n):Ur(e,t,r);break;default:Ur(e,t,r)}}function Vp(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new SE),t.forEach(function(n){var s=LE.bind(null,e,n);r.has(n)||(r.add(n),n.then(s,s))})}}function Ut(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var s=r[n];try{var o=e,i=t,a=i;e:for(;a!==null;){switch(a.tag){case 5:We=a.stateNode,qt=!1;break e;case 3:We=a.stateNode.containerInfo,qt=!0;break e;case 4:We=a.stateNode.containerInfo,qt=!0;break e}a=a.return}if(We===null)throw Error(F(160));Vy(o,i,s),We=null,qt=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(c){Re(s,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)By(t,e),t=t.sibling}function By(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ut(t,e),er(e),n&4){try{oi(3,e,e.return),Hl(3,e)}catch(y){Re(e,e.return,y)}try{oi(5,e,e.return)}catch(y){Re(e,e.return,y)}}break;case 1:Ut(t,e),er(e),n&512&&r!==null&&Ls(r,r.return);break;case 5:if(Ut(t,e),er(e),n&512&&r!==null&&Ls(r,r.return),e.flags&32){var s=e.stateNode;try{ci(s,"")}catch(y){Re(e,e.return,y)}}if(n&4&&(s=e.stateNode,s!=null)){var o=e.memoizedProps,i=r!==null?r.memoizedProps:o,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&o.type==="radio"&&o.name!=null&&cv(s,o),Pc(a,i);var c=Pc(a,o);for(i=0;i<l.length;i+=2){var d=l[i],f=l[i+1];d==="style"?mv(s,f):d==="dangerouslySetInnerHTML"?fv(s,f):d==="children"?ci(s,f):uh(s,d,f,c)}switch(a){case"input":xc(s,o);break;case"textarea":dv(s,o);break;case"select":var p=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!o.multiple;var h=o.value;h!=null?$s(s,!!o.multiple,h,!1):p!==!!o.multiple&&(o.defaultValue!=null?$s(s,!!o.multiple,o.defaultValue,!0):$s(s,!!o.multiple,o.multiple?[]:"",!1))}s[wi]=o}catch(y){Re(e,e.return,y)}}break;case 6:if(Ut(t,e),er(e),n&4){if(e.stateNode===null)throw Error(F(162));s=e.stateNode,o=e.memoizedProps;try{s.nodeValue=o}catch(y){Re(e,e.return,y)}}break;case 3:if(Ut(t,e),er(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{pi(t.containerInfo)}catch(y){Re(e,e.return,y)}break;case 4:Ut(t,e),er(e);break;case 13:Ut(t,e),er(e),s=e.child,s.flags&8192&&(o=s.memoizedState!==null,s.stateNode.isHidden=o,!o||s.alternate!==null&&s.alternate.memoizedState!==null||(Bh=Ce())),n&4&&Vp(e);break;case 22:if(d=r!==null&&r.memoizedState!==null,e.mode&1?(Xe=(c=Xe)||d,Ut(t,e),Xe=c):Ut(t,e),er(e),n&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!d&&e.mode&1)for(H=e,d=e.child;d!==null;){for(f=H=d;H!==null;){switch(p=H,h=p.child,p.tag){case 0:case 11:case 14:case 15:oi(4,p,p.return);break;case 1:Ls(p,p.return);var _=p.stateNode;if(typeof _.componentWillUnmount=="function"){n=p,r=p.return;try{t=n,_.props=t.memoizedProps,_.state=t.memoizedState,_.componentWillUnmount()}catch(y){Re(n,r,y)}}break;case 5:Ls(p,p.return);break;case 22:if(p.memoizedState!==null){zp(f);continue}}h!==null?(h.return=p,H=h):zp(f)}d=d.sibling}e:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{s=f.stateNode,c?(o=s.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(a=f.stateNode,l=f.memoizedProps.style,i=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=pv("display",i))}catch(y){Re(e,e.return,y)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=c?"":f.memoizedProps}catch(y){Re(e,e.return,y)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Ut(t,e),er(e),n&4&&Vp(e);break;case 21:break;default:Ut(t,e),er(e)}}function er(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(Fy(r)){var n=r;break e}r=r.return}throw Error(F(160))}switch(n.tag){case 5:var s=n.stateNode;n.flags&32&&(ci(s,""),n.flags&=-33);var o=Fp(e);rd(e,o,s);break;case 3:case 4:var i=n.stateNode.containerInfo,a=Fp(e);td(e,a,i);break;default:throw Error(F(161))}}catch(l){Re(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function PE(e,t,r){H=e,zy(e)}function zy(e,t,r){for(var n=(e.mode&1)!==0;H!==null;){var s=H,o=s.child;if(s.tag===22&&n){var i=s.memoizedState!==null||ya;if(!i){var a=s.alternate,l=a!==null&&a.memoizedState!==null||Xe;a=ya;var c=Xe;if(ya=i,(Xe=l)&&!c)for(H=s;H!==null;)i=H,l=i.child,i.tag===22&&i.memoizedState!==null?Wp(s):l!==null?(l.return=i,H=l):Wp(s);for(;o!==null;)H=o,zy(o),o=o.sibling;H=s,ya=a,Xe=c}Bp(e)}else s.subtreeFlags&8772&&o!==null?(o.return=s,H=o):Bp(e)}}function Bp(e){for(;H!==null;){var t=H;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Xe||Hl(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!Xe)if(r===null)n.componentDidMount();else{var s=t.elementType===t.type?r.memoizedProps:Bt(t.type,r.memoizedProps);n.componentDidUpdate(s,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&Pp(t,o,n);break;case 3:var i=t.updateQueue;if(i!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}Pp(t,i,r)}break;case 5:var a=t.stateNode;if(r===null&&t.flags&4){r=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break;case"img":l.src&&(r.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var d=c.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&pi(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(F(163))}Xe||t.flags&512&&ed(t)}catch(p){Re(t,t.return,p)}}if(t===e){H=null;break}if(r=t.sibling,r!==null){r.return=t.return,H=r;break}H=t.return}}function zp(e){for(;H!==null;){var t=H;if(t===e){H=null;break}var r=t.sibling;if(r!==null){r.return=t.return,H=r;break}H=t.return}}function Wp(e){for(;H!==null;){var t=H;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{Hl(4,t)}catch(l){Re(t,r,l)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var s=t.return;try{n.componentDidMount()}catch(l){Re(t,s,l)}}var o=t.return;try{ed(t)}catch(l){Re(t,o,l)}break;case 5:var i=t.return;try{ed(t)}catch(l){Re(t,i,l)}}}catch(l){Re(t,t.return,l)}if(t===e){H=null;break}var a=t.sibling;if(a!==null){a.return=t.return,H=a;break}H=t.return}}var TE=Math.ceil,pl=Ar.ReactCurrentDispatcher,Fh=Ar.ReactCurrentOwner,Ot=Ar.ReactCurrentBatchConfig,ae=0,Ue=null,Ie=null,qe=0,mt=0,Ns=Sn(0),$e=0,ki=null,ns=0,ql=0,Vh=0,ii=null,ct=null,Bh=0,fo=1/0,vr=null,ml=!1,nd=null,fn=null,wa=!1,on=null,gl=0,ai=0,sd=null,Fa=-1,Va=0;function nt(){return ae&6?Ce():Fa!==-1?Fa:Fa=Ce()}function pn(e){return e.mode&1?ae&2&&qe!==0?qe&-qe:cE.transition!==null?(Va===0&&(Va=Tv()),Va):(e=he,e!==0||(e=window.event,e=e===void 0?16:Lv(e.type)),e):1}function Jt(e,t,r,n){if(50<ai)throw ai=0,sd=null,Error(F(185));Wi(e,r,n),(!(ae&2)||e!==Ue)&&(e===Ue&&(!(ae&2)&&(ql|=r),$e===4&&Kr(e,qe)),pt(e,n),r===1&&ae===0&&!(t.mode&1)&&(fo=Ce()+500,Bl&&kn()))}function pt(e,t){var r=e.callbackNode;cb(e,t);var n=Za(e,e===Ue?qe:0);if(n===0)r!==null&&Zf(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&Zf(r),t===1)e.tag===0?uE(Hp.bind(null,e)):Zv(Hp.bind(null,e)),oE(function(){!(ae&6)&&kn()}),r=null;else{switch(jv(n)){case 1:r=ph;break;case 4:r=kv;break;case 16:r=Xa;break;case 536870912:r=Pv;break;default:r=Xa}r=Yy(r,Wy.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function Wy(e,t){if(Fa=-1,Va=0,ae&6)throw Error(F(327));var r=e.callbackNode;if(Bs()&&e.callbackNode!==r)return null;var n=Za(e,e===Ue?qe:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=vl(e,n);else{t=n;var s=ae;ae|=2;var o=qy();(Ue!==e||qe!==t)&&(vr=null,fo=Ce()+500,Xn(e,t));do try{CE();break}catch(a){Hy(e,a)}while(!0);Th(),pl.current=o,ae=s,Ie!==null?t=0:(Ue=null,qe=0,t=$e)}if(t!==0){if(t===2&&(s=Ac(e),s!==0&&(n=s,t=od(e,s))),t===1)throw r=ki,Xn(e,0),Kr(e,n),pt(e,Ce()),r;if(t===6)Kr(e,n);else{if(s=e.current.alternate,!(n&30)&&!jE(s)&&(t=vl(e,n),t===2&&(o=Ac(e),o!==0&&(n=o,t=od(e,o))),t===1))throw r=ki,Xn(e,0),Kr(e,n),pt(e,Ce()),r;switch(e.finishedWork=s,e.finishedLanes=n,t){case 0:case 1:throw Error(F(345));case 2:In(e,ct,vr);break;case 3:if(Kr(e,n),(n&130023424)===n&&(t=Bh+500-Ce(),10<t)){if(Za(e,0)!==0)break;if(s=e.suspendedLanes,(s&n)!==n){nt(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=Uc(In.bind(null,e,ct,vr),t);break}In(e,ct,vr);break;case 4:if(Kr(e,n),(n&4194240)===n)break;for(t=e.eventTimes,s=-1;0<n;){var i=31-Qt(n);o=1<<i,i=t[i],i>s&&(s=i),n&=~o}if(n=s,n=Ce()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*TE(n/1960))-n,10<n){e.timeoutHandle=Uc(In.bind(null,e,ct,vr),n);break}In(e,ct,vr);break;case 5:In(e,ct,vr);break;default:throw Error(F(329))}}}return pt(e,Ce()),e.callbackNode===r?Wy.bind(null,e):null}function od(e,t){var r=ii;return e.current.memoizedState.isDehydrated&&(Xn(e,t).flags|=256),e=vl(e,t),e!==2&&(t=ct,ct=r,t!==null&&id(t)),e}function id(e){ct===null?ct=e:ct.push.apply(ct,e)}function jE(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var s=r[n],o=s.getSnapshot;s=s.value;try{if(!Yt(o(),s))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Kr(e,t){for(t&=~Vh,t&=~ql,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-Qt(t),n=1<<r;e[r]=-1,t&=~n}}function Hp(e){if(ae&6)throw Error(F(327));Bs();var t=Za(e,0);if(!(t&1))return pt(e,Ce()),null;var r=vl(e,t);if(e.tag!==0&&r===2){var n=Ac(e);n!==0&&(t=n,r=od(e,n))}if(r===1)throw r=ki,Xn(e,0),Kr(e,t),pt(e,Ce()),r;if(r===6)throw Error(F(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,In(e,ct,vr),pt(e,Ce()),null}function zh(e,t){var r=ae;ae|=1;try{return e(t)}finally{ae=r,ae===0&&(fo=Ce()+500,Bl&&kn())}}function ss(e){on!==null&&on.tag===0&&!(ae&6)&&Bs();var t=ae;ae|=1;var r=Ot.transition,n=he;try{if(Ot.transition=null,he=1,e)return e()}finally{he=n,Ot.transition=r,ae=t,!(ae&6)&&kn()}}function Wh(){mt=Ns.current,we(Ns)}function Xn(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,sE(r)),Ie!==null)for(r=Ie.return;r!==null;){var n=r;switch(Sh(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&sl();break;case 3:co(),we(ht),we(Ze),Ih();break;case 5:Oh(n);break;case 4:co();break;case 13:we(Ee);break;case 19:we(Ee);break;case 10:jh(n.type._context);break;case 22:case 23:Wh()}r=r.return}if(Ue=e,Ie=e=mn(e.current,null),qe=mt=t,$e=0,ki=null,Vh=ql=ns=0,ct=ii=null,Un!==null){for(t=0;t<Un.length;t++)if(r=Un[t],n=r.interleaved,n!==null){r.interleaved=null;var s=n.next,o=r.pending;if(o!==null){var i=o.next;o.next=s,n.next=i}r.pending=n}Un=null}return e}function Hy(e,t){do{var r=Ie;try{if(Th(),$a.current=fl,hl){for(var n=Se.memoizedState;n!==null;){var s=n.queue;s!==null&&(s.pending=null),n=n.next}hl=!1}if(rs=0,Me=De=Se=null,si=!1,bi=0,Fh.current=null,r===null||r.return===null){$e=1,ki=t,Ie=null;break}e:{var o=e,i=r.return,a=r,l=t;if(t=qe,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,d=a,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var h=Op(i);if(h!==null){h.flags&=-257,Ip(h,i,a,o,t),h.mode&1&&Ap(o,c,t),t=h,l=c;var _=t.updateQueue;if(_===null){var y=new Set;y.add(l),t.updateQueue=y}else _.add(l);break e}else{if(!(t&1)){Ap(o,c,t),Hh();break e}l=Error(F(426))}}else if(xe&&a.mode&1){var x=Op(i);if(x!==null){!(x.flags&65536)&&(x.flags|=256),Ip(x,i,a,o,t),kh(ho(l,a));break e}}o=l=ho(l,a),$e!==4&&($e=2),ii===null?ii=[o]:ii.push(o),o=i;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var g=jy(o,l,t);kp(o,g);break e;case 1:a=l;var m=o.type,w=o.stateNode;if(!(o.flags&128)&&(typeof m.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(fn===null||!fn.has(w)))){o.flags|=65536,t&=-t,o.lanes|=t;var b=Ry(o,a,t);kp(o,b);break e}}o=o.return}while(o!==null)}Gy(r)}catch(P){t=P,Ie===r&&r!==null&&(Ie=r=r.return);continue}break}while(!0)}function qy(){var e=pl.current;return pl.current=fl,e===null?fl:e}function Hh(){($e===0||$e===3||$e===2)&&($e=4),Ue===null||!(ns&268435455)&&!(ql&268435455)||Kr(Ue,qe)}function vl(e,t){var r=ae;ae|=2;var n=qy();(Ue!==e||qe!==t)&&(vr=null,Xn(e,t));do try{RE();break}catch(s){Hy(e,s)}while(!0);if(Th(),ae=r,pl.current=n,Ie!==null)throw Error(F(261));return Ue=null,qe=0,$e}function RE(){for(;Ie!==null;)Ky(Ie)}function CE(){for(;Ie!==null&&!tb();)Ky(Ie)}function Ky(e){var t=Jy(e.alternate,e,mt);e.memoizedProps=e.pendingProps,t===null?Gy(e):Ie=t,Fh.current=null}function Gy(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=EE(r,t),r!==null){r.flags&=32767,Ie=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{$e=6,Ie=null;return}}else if(r=bE(r,t,mt),r!==null){Ie=r;return}if(t=t.sibling,t!==null){Ie=t;return}Ie=t=e}while(t!==null);$e===0&&($e=5)}function In(e,t,r){var n=he,s=Ot.transition;try{Ot.transition=null,he=1,AE(e,t,r,n)}finally{Ot.transition=s,he=n}return null}function AE(e,t,r,n){do Bs();while(on!==null);if(ae&6)throw Error(F(327));r=e.finishedWork;var s=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(F(177));e.callbackNode=null,e.callbackPriority=0;var o=r.lanes|r.childLanes;if(db(e,o),e===Ue&&(Ie=Ue=null,qe=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||wa||(wa=!0,Yy(Xa,function(){return Bs(),null})),o=(r.flags&15990)!==0,r.subtreeFlags&15990||o){o=Ot.transition,Ot.transition=null;var i=he;he=1;var a=ae;ae|=4,Fh.current=null,kE(e,r),By(r,e),Yb($c),el=!!Dc,$c=Dc=null,e.current=r,PE(r),rb(),ae=a,he=i,Ot.transition=o}else e.current=r;if(wa&&(wa=!1,on=e,gl=s),o=e.pendingLanes,o===0&&(fn=null),ob(r.stateNode),pt(e,Ce()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)s=t[r],n(s.value,{componentStack:s.stack,digest:s.digest});if(ml)throw ml=!1,e=nd,nd=null,e;return gl&1&&e.tag!==0&&Bs(),o=e.pendingLanes,o&1?e===sd?ai++:(ai=0,sd=e):ai=0,kn(),null}function Bs(){if(on!==null){var e=jv(gl),t=Ot.transition,r=he;try{if(Ot.transition=null,he=16>e?16:e,on===null)var n=!1;else{if(e=on,on=null,gl=0,ae&6)throw Error(F(331));var s=ae;for(ae|=4,H=e.current;H!==null;){var o=H,i=o.child;if(H.flags&16){var a=o.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(H=c;H!==null;){var d=H;switch(d.tag){case 0:case 11:case 15:oi(8,d,o)}var f=d.child;if(f!==null)f.return=d,H=f;else for(;H!==null;){d=H;var p=d.sibling,h=d.return;if(Uy(d),d===c){H=null;break}if(p!==null){p.return=h,H=p;break}H=h}}}var _=o.alternate;if(_!==null){var y=_.child;if(y!==null){_.child=null;do{var x=y.sibling;y.sibling=null,y=x}while(y!==null)}}H=o}}if(o.subtreeFlags&2064&&i!==null)i.return=o,H=i;else e:for(;H!==null;){if(o=H,o.flags&2048)switch(o.tag){case 0:case 11:case 15:oi(9,o,o.return)}var g=o.sibling;if(g!==null){g.return=o.return,H=g;break e}H=o.return}}var m=e.current;for(H=m;H!==null;){i=H;var w=i.child;if(i.subtreeFlags&2064&&w!==null)w.return=i,H=w;else e:for(i=m;H!==null;){if(a=H,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Hl(9,a)}}catch(P){Re(a,a.return,P)}if(a===i){H=null;break e}var b=a.sibling;if(b!==null){b.return=a.return,H=b;break e}H=a.return}}if(ae=s,kn(),lr&&typeof lr.onPostCommitFiberRoot=="function")try{lr.onPostCommitFiberRoot($l,e)}catch{}n=!0}return n}finally{he=r,Ot.transition=t}}return!1}function qp(e,t,r){t=ho(r,t),t=jy(e,t,1),e=hn(e,t,1),t=nt(),e!==null&&(Wi(e,1,t),pt(e,t))}function Re(e,t,r){if(e.tag===3)qp(e,e,r);else for(;t!==null;){if(t.tag===3){qp(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(fn===null||!fn.has(n))){e=ho(r,e),e=Ry(t,e,1),t=hn(t,e,1),e=nt(),t!==null&&(Wi(t,1,e),pt(t,e));break}}t=t.return}}function OE(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=nt(),e.pingedLanes|=e.suspendedLanes&r,Ue===e&&(qe&r)===r&&($e===4||$e===3&&(qe&130023424)===qe&&500>Ce()-Bh?Xn(e,0):Vh|=r),pt(e,t)}function Qy(e,t){t===0&&(e.mode&1?(t=ua,ua<<=1,!(ua&130023424)&&(ua=4194304)):t=1);var r=nt();e=kr(e,t),e!==null&&(Wi(e,t,r),pt(e,r))}function IE(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Qy(e,r)}function LE(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,s=e.memoizedState;s!==null&&(r=s.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(F(314))}n!==null&&n.delete(t),Qy(e,r)}var Jy;Jy=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||ht.current)dt=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return dt=!1,xE(e,t,r);dt=!!(e.flags&131072)}else dt=!1,xe&&t.flags&1048576&&ey(t,al,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Ua(e,t),e=t.pendingProps;var s=ao(t,Ze.current);Vs(t,r),s=Nh(null,t,n,e,s,r);var o=Dh();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ft(n)?(o=!0,ol(t)):o=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Ch(t),s.updater=Wl,t.stateNode=s,s._reactInternals=t,qc(t,n,e,r),t=Qc(null,t,n,!0,o,r)):(t.tag=0,xe&&o&&Eh(t),rt(null,t,s,r),t=t.child),t;case 16:n=t.elementType;e:{switch(Ua(e,t),e=t.pendingProps,s=n._init,n=s(n._payload),t.type=n,s=t.tag=DE(n),e=Bt(n,e),s){case 0:t=Gc(null,t,n,e,r);break e;case 1:t=Dp(null,t,n,e,r);break e;case 11:t=Lp(null,t,n,e,r);break e;case 14:t=Np(null,t,n,Bt(n.type,e),r);break e}throw Error(F(306,n,""))}return t;case 0:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:Bt(n,s),Gc(e,t,n,s,r);case 1:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:Bt(n,s),Dp(e,t,n,s,r);case 3:e:{if(Iy(t),e===null)throw Error(F(387));n=t.pendingProps,o=t.memoizedState,s=o.element,iy(e,t),cl(t,n,null,r);var i=t.memoizedState;if(n=i.element,o.isDehydrated)if(o={element:n,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){s=ho(Error(F(423)),t),t=$p(e,t,n,r,s);break e}else if(n!==s){s=ho(Error(F(424)),t),t=$p(e,t,n,r,s);break e}else for(wt=dn(t.stateNode.containerInfo.firstChild),_t=t,xe=!0,Gt=null,r=sy(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(lo(),n===s){t=Pr(e,t,r);break e}rt(e,t,n,r)}t=t.child}return t;case 5:return ay(t),e===null&&zc(t),n=t.type,s=t.pendingProps,o=e!==null?e.memoizedProps:null,i=s.children,Mc(n,s)?i=null:o!==null&&Mc(n,o)&&(t.flags|=32),Oy(e,t),rt(e,t,i,r),t.child;case 6:return e===null&&zc(t),null;case 13:return Ly(e,t,r);case 4:return Ah(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=uo(t,null,n,r):rt(e,t,n,r),t.child;case 11:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:Bt(n,s),Lp(e,t,n,s,r);case 7:return rt(e,t,t.pendingProps,r),t.child;case 8:return rt(e,t,t.pendingProps.children,r),t.child;case 12:return rt(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,s=t.pendingProps,o=t.memoizedProps,i=s.value,me(ll,n._currentValue),n._currentValue=i,o!==null)if(Yt(o.value,i)){if(o.children===s.children&&!ht.current){t=Pr(e,t,r);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){i=o.child;for(var l=a.firstContext;l!==null;){if(l.context===n){if(o.tag===1){l=br(-1,r&-r),l.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var d=c.pending;d===null?l.next=l:(l.next=d.next,d.next=l),c.pending=l}}o.lanes|=r,l=o.alternate,l!==null&&(l.lanes|=r),Wc(o.return,r,t),a.lanes|=r;break}l=l.next}}else if(o.tag===10)i=o.type===t.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(F(341));i.lanes|=r,a=i.alternate,a!==null&&(a.lanes|=r),Wc(i,r,t),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===t){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}rt(e,t,s.children,r),t=t.child}return t;case 9:return s=t.type,n=t.pendingProps.children,Vs(t,r),s=It(s),n=n(s),t.flags|=1,rt(e,t,n,r),t.child;case 14:return n=t.type,s=Bt(n,t.pendingProps),s=Bt(n.type,s),Np(e,t,n,s,r);case 15:return Cy(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:Bt(n,s),Ua(e,t),t.tag=1,ft(n)?(e=!0,ol(t)):e=!1,Vs(t,r),Ty(t,n,s),qc(t,n,s,r),Qc(null,t,n,!0,e,r);case 19:return Ny(e,t,r);case 22:return Ay(e,t,r)}throw Error(F(156,t.tag))};function Yy(e,t){return Sv(e,t)}function NE(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.t
vendor: 5,663 bytes, line 41
41ype=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function At(e,t,r,n){return new NE(e,t,r,n)}function qh(e){return e=e.prototype,!(!e||!e.isReactComponent)}function DE(e){if(typeof e=="function")return qh(e)?1:0;if(e!=null){if(e=e.$$typeof,e===dh)return 11;if(e===hh)return 14}return 2}function mn(e,t){var r=e.alternate;return r===null?(r=At(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Ba(e,t,r,n,s,o){var i=2;if(n=e,typeof e=="function")qh(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case ks:return Zn(r.children,s,o,t);case ch:i=8,s|=8;break;case gc:return e=At(12,r,t,s|2),e.elementType=gc,e.lanes=o,e;case vc:return e=At(13,r,t,s),e.elementType=vc,e.lanes=o,e;case yc:return e=At(19,r,t,s),e.elementType=yc,e.lanes=o,e;case av:return Kl(r,s,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ov:i=10;break e;case iv:i=9;break e;case dh:i=11;break e;case hh:i=14;break e;case zr:i=16,n=null;break e}throw Error(F(130,e==null?e:typeof e,""))}return t=At(i,r,t,s),t.elementType=e,t.type=n,t.lanes=o,t}function Zn(e,t,r,n){return e=At(7,e,n,t),e.lanes=r,e}function Kl(e,t,r,n){return e=At(22,e,n,t),e.elementType=av,e.lanes=r,e.stateNode={isHidden:!1},e}function qu(e,t,r){return e=At(6,e,null,t),e.lanes=r,e}function Ku(e,t,r){return t=At(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function $E(e,t,r,n,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Tu(0),this.expirationTimes=Tu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Tu(0),this.identifierPrefix=n,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Kh(e,t,r,n,s,o,i,a,l){return e=new $E(e,t,r,a,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=At(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ch(o),e}function ME(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Ss,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function Xy(e){if(!e)return wn;e=e._reactInternals;e:{if(ls(e)!==e||e.tag!==1)throw Error(F(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(ft(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(F(171))}if(e.tag===1){var r=e.type;if(ft(r))return Xv(e,r,t)}return t}function Zy(e,t,r,n,s,o,i,a,l){return e=Kh(r,n,!0,e,s,o,i,a,l),e.context=Xy(null),r=e.current,n=nt(),s=pn(r),o=br(n,s),o.callback=t??null,hn(r,o,s),e.current.lanes=s,Wi(e,s,n),pt(e,n),e}function Gl(e,t,r,n){var s=t.current,o=nt(),i=pn(s);return r=Xy(r),t.context===null?t.context=r:t.pendingContext=r,t=br(o,i),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=hn(s,t,i),e!==null&&(Jt(e,s,i,o),Da(e,s,i)),i}function yl(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Kp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function Gh(e,t){Kp(e,t),(e=e.alternate)&&Kp(e,t)}function UE(){return null}var e0=typeof reportError=="function"?reportError:function(e){console.error(e)};function Qh(e){this._internalRoot=e}Ql.prototype.render=Qh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(F(409));Gl(e,t,null,null)};Ql.prototype.unmount=Qh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ss(function(){Gl(null,e,null,null)}),t[Sr]=null}};function Ql(e){this._internalRoot=e}Ql.prototype.unstable_scheduleHydration=function(e){if(e){var t=Av();e={blockedOn:null,target:e,priority:t};for(var r=0;r<qr.length&&t!==0&&t<qr[r].priority;r++);qr.splice(r,0,e),r===0&&Iv(e)}};function Jh(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Jl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Gp(){}function FE(e,t,r,n,s){if(s){if(typeof n=="function"){var o=n;n=function(){var c=yl(i);o.call(c)}}var i=Zy(t,n,e,0,null,!1,!1,"",Gp);return e._reactRootContainer=i,e[Sr]=i.current,vi(e.nodeType===8?e.parentNode:e),ss(),i}for(;s=e.lastChild;)e.removeChild(s);if(typeof n=="function"){var a=n;n=function(){var c=yl(l);a.call(c)}}var l=Kh(e,0,!1,null,null,!1,!1,"",Gp);return e._reactRootContainer=l,e[Sr]=l.current,vi(e.nodeType===8?e.parentNode:e),ss(function(){Gl(t,l,r,n)}),l}function Yl(e,t,r,n,s){var o=r._reactRootContainer;if(o){var i=o;if(typeof s=="function"){var a=s;s=function(){var l=yl(i);
41a.call(l)}}Gl(t,i,e,s)}else i=FE(r,t,e,s,n);return yl(i)}Rv=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=Ko(t.pendingLanes);r!==0&&(mh(t,r|1),pt(t,Ce()),!(ae&6)&&(fo=Ce()+500,kn()))}break;case 13:ss(function(){var n=kr(e,1);if(n!==null){var s=nt();Jt(n,e,1,s)}}),Gh(e,1)}};gh=function(e){if(e.tag===13){var t=kr(e,134217728);if(t!==null){var r=nt();Jt(t,e,134217728,r)}Gh(e,134217728)}};Cv=function(e){if(e.tag===13){var t=pn(e),r=kr(e,t);if(r!==null){var n=nt();Jt(r,e,t,n)}Gh(e,t)}};Av=function(){return he};Ov=function(e,t){var r=he;try{return he=e,t()}finally{he=r}};jc=function(e,t,r){switch(t){case"input":if(xc(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var s=Vl(n);if(!s)throw Error(F(90));uv(n),xc(n,s)}}}break;case"textarea":dv(e,r);break;case"select":t=r.value,t!=null&&$s(e,!!r.multiple,t,!1)}};yv=zh;wv=ss;var VE={usingClientEntryPoint:!1,Events:[qi,Rs,Vl,gv,vv,zh]},Uo={findFiberByHostInstance:Mn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},BE={bundleType:Uo.bundleType,version:Uo.version,rendererPackageName:Uo.rendererPackageName,rendererConfig:Uo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Ar.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=bv(e),e===null?null:e.stateNode},findFiberByHostInstance:Uo.findFiberByHostInstance||UE,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var _a=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!_a.isDisabled&&_a.supportsFiber)try{$l=_a.inject(BE),lr=_a}catch{}}Et.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=VE;Et.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Jh(t))throw Error(F(200));return ME(e,t,null,r)};Et.createRoot=function(e,t){if(!Jh(e))throw Error(F(299));var r=!1,n="",s=e0;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=Kh(e,1,!1,null,null,r,!1,n,s),e[Sr]=t.current,vi(e.nodeType===8?e.parentNode:e),new Qh(t)};Et.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(F(188)):(e=Object.keys(e).join(","),Error(F(268,e)));return e=bv(t),e=e===null?null:e.stateNode,e};Et.flushSync=function(e){return ss(e)};Et.hydrate=function(e,t,r){if(!Jl(t))throw Error(F(200));return Yl(null,e,t,!0,r)};Et.hydrateRoot=function(e,t,r){if(!Jh(e))throw Error(F(405));var n=r!=null&&r.hydratedSources||null,s=!1,o="",i=e0;if(r!=null&&(r.unstable_strictMode===!0&&(s=!0),r.identifierPrefix!==void 0&&(o=r.identifierPrefix),r.onRecoverableError!==void 0&&(i=r.onRecoverableError)),t=Zy(t,null,e,1,r??null,s,!1,o,i),e[Sr]=t.current,vi(e),n)for(e=0;e<n.length;e++)r=n[e],s=r._getVersion,s=s(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,s]:t.mutableSourceEagerHydrationData.push(r,s);return new Ql(t)};Et.render=function(e,t,r){if(!Jl(t))throw Error(F(200));return Yl(null,e,t,!1,r)};Et.unmountComponentAtNode=function(e){if(!Jl(e))throw Error(F(40));return e._reactRootContainer?(ss(function(){Yl(null,null,e,!1,function(){e._reactRootContainer=null,e[Sr]=null})}),!0):!1};Et.unstable_batchedUpdates=zh;Et.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!Jl(r))throw Error(F(200));if(e==null||e._reactInternals===void 0)throw Error(F(38));return Yl(e,t,r,!1,n)};Et.version="18.3.1-next-f1338f8080-20240426";function t0(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t0)}catch(e){console.error(e)}}t0(),tv.exports=Et;var Gi=tv.exports;const r0=zg(Gi);var n0,Qp=Gi;n0=Qp.createRoot,Qp.hydrateRoot;const zE="modulepreload",WE=function(e){return"/"+e},Jp={},S=function(t,r,n){let s=Promise.resolve();if(r&&r.length>0){document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),a=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));s=Promise.allSettled(r.map(l=>{if(l=WE(l),l in Jp)return;Jp[l]=!0;const c=l.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${d}`))return;const f=document.createElement("link");if(f.rel=c?"stylesheet":zE,c||(f.as="script"),f.crossOrigin="",f.href=l,a&&f.setAttribute("nonce",a),document.head.appendChild(f),c)return new Promise((p,h)=>{f.addEventListener("load",p),f.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${l}`)))})}))}function o(i){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=i,window.dispatchEvent(a),!a.defaultPrevented)throw i}return s.then(i=>{for(const a of i||[])a.status==="rejected"&&o(a.reason);return t().catch(o)})},Yh="The History Guild",u2=`${Yh}'s`,c2=`Made with ${Yh} · Expert Media AI`,Yp="emai:chunk-reloaded-at",HE=3e4;function Ds(e){const t=e instanceof Error?e.message:String(e??"");return/Failed to fetch dynamically imported module/i.test(t)||/error loading dynamically imported module/i.test(t)||/Importing a module script failed/i.test(t)||/ChunkLoadError/i.test(t)||/Loading chunk \d+ failed/i.test(t)}function qE(){try{const e=Number(sessionStorage.getItem(Yp)||0);return Number.isFinite(e)&&Date.now()-e<HE?!1:(sessionStorage.setItem(Yp,String(Date.now())),!0)}catch{return!1}}const KE=["/video-generator","/canvas/","/audio-edit","/soundforge","/animation-studio","/guild","/talent-studio","/image-edit-pro"];function ad(e=window.location.pathname){const t=e.toLowerCase();return KE.some(r=>t.startsWith(r))}function ld(e={}){if(!e.userInitiated&&ad()||!e.userInitiated&&!qE())return!1;try{"caches"in window&&caches.keys().then(t=>t.forEach(r=>caches.delete(r))).catch(()=>{})}catch{}return window.location.reload(),!0}function k(e){return v.lazy(async()=>{try{return await e()}catch(t){if(!Ds(t))throw t;const r=ad()?3:1;let n=t;for(let s=0;s<r;s++){await new Promise(o=>setTimeout(o,600*(s+1)));try{return await e()}catch(o){if(n=o,!Ds(o))throw o}}try{throw n}catch(s){if(Ds(s)&&ld())return await new Promise(()=>{});if(Ds(s)&&ad())return{default:GE};throw s}}})}function GE(){return v.createElement("div",{className:"rounded-lg border border-border bg-muted p-4 text-sm text-muted-foreground"},"A newer version of this section is available. Save your work, then refresh the page when you're ready.")}const QE=1,JE=1e6;let Gu=0;function YE(){return Gu=(Gu+1)%Number.MAX_SAFE_INTEGER,Gu.toString()}const Qu=new Map,Xp=e=>{if(Qu.has(e))return;const t=setTimeout(()=>{Qu.delete(e),li({type:"REMOVE_TOAST",toastId:e})},JE);Qu.set(e,t)},XE=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,QE)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=t;
41return r?Xp(r):e.toasts.forEach(n=>{Xp(n.id)}),{...e,toasts:e.toasts.map(n=>n.id===r||r===void 0?{...n,open:!1}:n)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)}}},za=[];let Wa={toasts:[]};function li(e){Wa=XE(Wa,e),za.forEach(t=>{t(Wa)})}function ZE({...e}){const t=YE(),r=s=>li({type:"UPDATE_TOAST",toast:{...s,id:t}}),n=()=>li({type:"DISMISS_TOAST",toastId:t});return li({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||n()}}}),{id:t,dismiss:n,update:r}}function eS(){const[e,t]=v.useState(Wa);return v.useEffect(()=>(za.push(t),()=>{const r=za.indexOf(t);r>-1&&za.splice(r,1)}),[e]),{...e,toast:ZE,dismiss:r=>li({type:"DISMISS_TOAST",toastId:r})}}function ye(e,t,{checkForDefaultPrevented:r=!0}={}){return function(s){if(e==null||e(s),r===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function Zp(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function s0(...e){return t=>{let r=!1;const n=e.map(s=>{const o=Zp(s,t);return!r&&typeof o=="function"&&(r=!0),o});if(r)return()=>{for(let s=0;s<n.length;s++){const o=n[s];typeof o=="function"?o():Zp(e[s],null)}}}}function Ge(...e){return v.useCallback(s0(...e),e)}function d2(e,t){const r=v.createContext(t),n=o=>{const{children:i,...a}=o,l=v.useMemo(()=>a,Object.values(a));return u.jsx(r.Provider,{value:l,children:i})};n.displayName=e+"Provider";function s(o){const i=v.useContext(r);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[n,s]}function bo(e,t=[]){let r=[];function n(o,i){const a=v.createContext(i),l=r.length;r=[...r,i];const c=f=>{var g;const{scope:p,children:h,..._}=f,y=((g=p==null?void 0:p[e])==null?void 0:g[l])||a,x=v.useMemo(()=>_,Object.values(_));return u.jsx(y.Provider,{value:x,children:h})};c.displayName=o+"Provider";function d(f,p){var y;const h=((y=p==null?void 0:p[e])==null?void 0:y[l])||a,_=v.useContext(h);if(_)return _;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${o}\``)}return[c,d]}const s=()=>{const o=r.map(i=>v.createContext(i));return function(a){const l=(a==null?void 0:a[e])||o;return v.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return s.scopeName=e,[n,tS(s,...t)]}function tS(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(o){const i=n.reduce((a,{useScope:l,scopeName:c})=>{const f=l(o)[`__scope${c}`];return{...a,...f}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}function wl(e){const t=nS(e),r=v.forwardRef((n,s)=>{const{children:o,...i}=n,a=v.Children.toArray(o),l=a.find(oS);if(l){const c=l.props.children,d=a.map(f=>f===l?v.Children.count(c)>1?v.Children.only(null):v.isValidElement(c)?c.props.children:null:f);return u.jsx(t,{...i,ref:s,children:v.isValidElement(c)?v.cloneElement(c,void 0,d):null})}return u.jsx(t,{...i,ref:s,children:o})});return r.displayName=`${e}.Slot`,r}var rS=wl("Slot");function nS(e){const t=v.forwardRef((r,n)=>{const{children:s,...o}=r;if(v.isValidElement(s)){const i=aS(s),a=iS(o,s.props);return s.type!==v.Fragment&&(a.ref=n?s0(n,i):i),v.cloneElement(s,a)}return v.Children.count(s)>1?v.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var o0=Symbol("radix.slottable");function sS(e){const t=({children:r})=>u.jsx(u.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=o0,t}function oS(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===o0}function iS(e,t){const r={...t};for(const n in t){const s=e[n],o=t[n];/^on[A-Z]/.test(n)?s&&o?r[n]=(...a)=>{const l=o(...a);return s(...a),l}:s&&(r[n]=s):n==="style"?r[n]={...s,...o}:n==="className"&&(r[n]=[s,o].filter(Boolean).join(" "))}return{...e,...r}}function aS(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function i0(e){const t=e+"CollectionProvider",[r,n]=bo(t),[s,o]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=y=>{const{scope:x,children:g}=y,m=V.useRef(null),w=V.useRef(new Map).current;return u.jsx(s,{scope:x,itemMap:w,collectionRef:m,children:g})};i.displayName=t;const a=e+"CollectionSlot",l=wl(a),c=V.forwardRef((y,x)=>{const{scope:g,children:m}=y,w=o(a,g),b=Ge(x,w.collectionRef);return u.jsx(l,{ref:b,children:m})});c.displayName=a;const d=e+"CollectionItemSlot",f="data-radix-collection-item",p=wl(d),h=V.forwardRef((y,x)=>{const{scope:g,children:m,...w}=y,b=V.useRef(null),P=Ge(x,b),T=o(d,g);return V.useEffect(()=>(T.itemMap.set(b,{ref:b,...w}),()=>void T.itemMap.delete(b))),u.jsx(p,{[f]:"",ref:P,children:m})});h.displayName=d;function _(y){const x=o(e+"CollectionConsumer",y);return V.useCallback(()=>{const m=x.collectionRef.current;if(!m)return[];const w=Array.from(m.querySelectorAll(`[${f}]`));return Array.from(x.itemMap.values()).sort((T,R)=>w.indexOf(T.ref.current)-w.indexOf(R.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:i,Slot:c,ItemSlot:h},_,n]}var lS=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ae=lS.reduce((e,t)=>
vendor: 8,608 bytes, line 41
41{const r=wl(`Primitive.${t}`),n=v.forwardRef((s,o)=>{const{asChild:i,...a}=s,l=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(l,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function a0(e,t){e&&Gi.flushSync(()=>e.dispatchEvent(t))}function _n(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function uS(e,t=globalThis==null?void 0:globalThis.document){const r=_n(e);v.useEffect(()=>{const n=s=>{s.key==="Escape"&&r(s)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var cS="DismissableLayer",ud="dismissableLayer.update",dS="dismissableLayer.pointerDownOutside",hS="dismissableLayer.focusOutside",em,l0=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Xh=v.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:i,onDismiss:a,...l}=e,c=v.useContext(l0),[d,f]=v.useState(null),p=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=v.useState({}),_=Ge(t,R=>f(R)),y=Array.from(c.layers),[x]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),g=y.indexOf(x),m=d?y.indexOf(d):-1,w=c.layersWithOutsidePointerEventsDisabled.size>0,b=m>=g,P=pS(R=>{const O=R.target,$=[...c.branches].some(C=>C.contains(O));!b||$||(s==null||s(R),i==null||i(R),R.defaultPrevented||a==null||a())},p),T=mS(R=>{const O=R.target;[...c.branches].some(C=>C.contains(O))||(o==null||o(R),i==null||i(R),R.defaultPrevented||a==null||a())},p);return uS(R=>{m===c.layers.size-1&&(n==null||n(R),!R.defaultPrevented&&a&&(R.preventDefault(),a()))},p),v.useEffect(()=>{if(d)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(em=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),tm(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=em)}},[d,p,r,c]),v.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),tm())},[d,c]),v.useEffect(()=>{const R=()=>h({});return document.addEventListener(ud,R),()=>document.removeEventListener(ud,R)},[]),u.jsx(Ae.div,{...l,ref:_,style:{pointerEvents:w?b?"auto":"none":void 0,...e.style},onFocusCapture:ye(e.onFocusCapture,T.onFocusCapture),onBlurCapture:ye(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:ye(e.onPointerDownCapture,P.onPointerDownCapture)})});Xh.displayName=cS;var fS="DismissableLayerBranch",u0=v.forwardRef((e,t)=>{const r=v.useContext(l0),n=v.useRef(null),s=Ge(t,n);return v.useEffect(()=>{const o=n.current;if(o)return r.branches.add(o),()=>{r.branches.delete(o)}},[r.branches]),u.jsx(Ae.div,{...e,ref:s})});u0.displayName=fS;function pS(e,t=globalThis==null?void 0:globalThis.document){const r=_n(e),n=v.useRef(!1),s=v.useRef(()=>{});return v.useEffect(()=>{const o=a=>{if(a.target&&!n.current){let l=function(){c0(dS,r,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=l,t.addEventListener("click",s.current,{once:!0})):l()}else t.removeEventListener("click",s.current);n.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",o),t.removeEventListener("click",s.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function mS(e,t=globalThis==null?void 0:globalThis.document){const r=_n(e),n=v.useRef(!1);return v.useEffect(()=>{const s=o=>{o.target&&!n.current&&c0(hS,r,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function tm(){const e=new CustomEvent(ud);document.dispatchEvent(e)}function c0(e,t,r,{discrete:n}){const s=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),n?a0(s,o):s.dispatchEvent(o)}var gS=Xh,vS=u0,Tr=globalThis!=null&&globalThis.document?v.useLayoutEffect:()=>{},yS="Portal",d0=v.forwardRef((e,t)=>{var a;const{container:r,...n}=e,[s,o]=v.useState(!1);Tr(()=>o(!0),[]);const i=r||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?r0.createPortal(u.jsx(Ae.div,{...n,ref:t}),i):null});d0.displayName=yS;function wS(e,t){return v.useReducer((r,n)=>t[r][n]??r,e)}var Zh=e=>{const{present:t,children:r}=e,n=_S(t),s=typeof r=="function"?r({present:n.isPresent}):v.Children.only(r),o=Ge(n.ref,xS(s));return typeof r=="function"||n.isPresent?v.cloneElement(s,{ref:o}):null};Zh.displayName="Presence";function _S(e){const[t,r]=v.useState(),n=v.useRef(null),s=v.useRef(e),o=v.useRef("none"),i=e?"mounted":"unmounted",[a,l]=wS(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const c=xa(n.current);o.current=a==="mounted"?c:"none"},[a]),Tr(()=>{const c=n.current,d=s.current;if(d!==e){const p=o.current,h=xa(c);e?l("MOUNT"):h==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(d&&p!==h?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,l]),Tr(()=>{if(t){let c;const d=t.ownerDocument.defaultView??window,f=h=>{const y=xa(n.current).includes(h.animationName);if(h.target===t&&y&&(l("ANIMATION_END"),!s.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},p=h=>{h.target===t&&(o.current=xa(n.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:v.useCallback(c=>{n.current=c?getComputedStyle(c):null,r(c)},[])}}function xa(e){return(e==null?void 0:e.animationName)||"none"}function xS(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var bS=ih[" useInsertionEffect ".trim().toString()]||Tr;function ef({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[s,o,i]=ES({defaultProp:t,onChange:r}),a=e!==void 0,l=a?e:s;{const d=v.useRef(e!==void 0);v.useEffect(()=>{const f=d.current;f!==a&&console.warn(`${n} is changing from ${f?"controlled":"uncontrolled"} to ${a?"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.`),d.current=a},[a,n])}const c=v.useCallback(d=>{var f;if(a){const p=SS(d)?d(e):d;p!==e&&((f=i.current)==null||f.call(i,p))}else o(d)},[a,e,o,i]);return[l,c]}function ES({defaultProp:e,onChange:t}){const[r,n]=v.useState(e),s=v.useRef(r),o=v.useRef(t);return bS(()=>{o.current=t},[t]),v.useEffect(()=>{var i;s.current!==r&&((i=o.current)==null||i.call(o,r),s.current=r)},[r,s]),[r,n,o]}function SS(e){return typeof e=="function"}var kS=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),PS="VisuallyHidden",Xl=v.forwardRef((e,t)=>u.jsx(Ae.span,{...e,ref:t,style:{...kS,...e.style}}));Xl.displayName=PS;var TS=Xl,tf="ToastProvider",[rf,jS,RS]=i0("Toast"),[h0,h2]=bo("Toast",[RS]),[CS,Zl]=h0(tf),f0=e=>{const{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:s="right",swipeThreshold:o=50,children:i}=e,[a,l]=v.useState(null),[c,d]=v.useState(0),f=v.useRef(!1),p=v.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${tf}\`. Expected non-empty \`string\`.`),u.jsx(rf.Provider,{scope:t,children:u.jsx(CS,{scope:t,label:r,duration:n,swipeDirection:s,swipeThreshold:o,toastCount:c,viewport:a,onViewportChange:l,onToastAdd:v.useCallback(()=>d(h=>h+1),[]),onToastRemove:v.useCallback(()=>d(h=>h-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:p,children:i})})};f0.displayName=tf;var p0="ToastViewport",AS=["F8"],cd="toast.viewportPause",dd="toast.viewportResume",m0=v.forwardRef((e,t)=>
41{const{__scopeToast:r,hotkey:n=AS,label:s="Notifications ({hotkey})",...o}=e,i=Zl(p0,r),a=jS(r),l=v.useRef(null),c=v.useRef(null),d=v.useRef(null),f=v.useRef(null),p=Ge(t,f,i.onViewportChange),h=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),_=i.toastCount>0;v.useEffect(()=>{const x=g=>{var w;n.length!==0&&n.every(b=>g[b]||g.code===b)&&((w=f.current)==null||w.focus())};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[n]),v.useEffect(()=>{const x=l.current,g=f.current;if(_&&x&&g){const m=()=>{if(!i.isClosePausedRef.current){const T=new CustomEvent(cd);g.dispatchEvent(T),i.isClosePausedRef.current=!0}},w=()=>{if(i.isClosePausedRef.current){const T=new CustomEvent(dd);g.dispatchEvent(T),i.isClosePausedRef.current=!1}},b=T=>{!x.contains(T.relatedTarget)&&w()},P=()=>{x.contains(document.activeElement)||w()};return x.addEventListener("focusin",m),x.addEventListener("focusout",b),x.addEventListener("pointermove",m),x.addEventListener("pointerleave",P),window.addEventListener("blur",m),window.addEventListener("focus",w),()=>{x.removeEventListener("focusin",m),x.removeEventListener("focusout",b),x.removeEventListener("pointermove",m),x.removeEventListener("pointerleave",P),window.removeEventListener("blur",m),window.removeEventListener("focus",w)}}},[_,i.isClosePausedRef]);const y=v.useCallback(({tabbingDirection:x})=>{const m=a().map(w=>{const b=w.ref.current,P=[b,...WS(b)];return x==="forwards"?P:P.reverse()});return(x==="forwards"?m.reverse():m).flat()},[a]);return v.useEffect(()=>{const x=f.current;if(x){const g=m=>{var P,T,R;const w=m.altKey||m.ctrlKey||m.metaKey;if(m.key==="Tab"&&!w){const O=document.activeElement,$=m.shiftKey;if(m.target===x&&$){(P=c.current)==null||P.focus();return}const N=y({tabbingDirection:$?"backwards":"forwards"}),B=N.findIndex(M=>M===O);Ju(N.slice(B+1))?m.preventDefault():$?(T=c.current)==null||T.focus():(R=d.current)==null||R.focus()}};return x.addEventListener("keydown",g),()=>x.removeEventListener("keydown",g)}},[a,y]),u.jsxs(vS,{ref:l,role:"region","aria-label":s.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:_?void 0:"none"},children:[_&&u.jsx(hd,{ref:c,onFocusFromOutsideViewport:()=>{const x=y({tabbingDirection:"forwards"});Ju(x)}}),u.jsx(rf.Slot,{scope:r,children:u.jsx(Ae.ol,{tabIndex:-1,...o,ref:p})}),_&&u.jsx(hd,{ref:d,onFocusFromOutsideViewport:()=>{const x=y({tabbingDirection:"backwards"});Ju(x)}})]})});m0.displayName=p0;var g0="ToastFocusProxy",hd=v.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...s}=e,o=Zl(g0,r);return u.jsx(Xl,{"aria-hidden":!0,tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:i=>{var c;const a=i.relatedTarget;!((c=o.viewport)!=null&&c.contains(a))&&n()}})});hd.displayName=g0;var Qi="Toast",OS="toast.swipeStart",IS="toast.swipeMove",LS="toast.swipeCancel",NS="toast.swipeEnd",v0=v.forwardRef((e,t)=>{const{forceMount:r,open:n,defaultOpen:s,onOpenChange:o,...i}=e,[a,l]=ef({prop:n,defaultProp:s??!0,onChange:o,caller:Qi});return u.jsx(Zh,{present:r||a,children:u.jsx(MS,{open:a,...i,ref:t,onClose:()=>l(!1),onPause:_n(e.onPause),onResume:_n(e.onResume),onSwipeStart:ye(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ye(e.onSwipeMove,c=>{const{x:d,y:f}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:ye(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:ye(e.onSwipeEnd,c=>{const{x:d,y:f}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),l(!1)})})})});v0.displayName=Qi;var[DS,$S]=h0(Qi,{onClose(){}}),MS=v.forwardRef((e,t)=>
41{const{__scopeToast:r,type:n="foreground",duration:s,open:o,onClose:i,onEscapeKeyDown:a,onPause:l,onResume:c,onSwipeStart:d,onSwipeMove:f,onSwipeCancel:p,onSwipeEnd:h,..._}=e,y=Zl(Qi,r),[x,g]=v.useState(null),m=Ge(t,M=>g(M)),w=v.useRef(null),b=v.useRef(null),P=s||y.duration,T=v.useRef(0),R=v.useRef(P),O=v.useRef(0),{onToastAdd:$,onToastRemove:C}=y,D=_n(()=>{var Q;(x==null?void 0:x.contains(document.activeElement))&&((Q=y.viewport)==null||Q.focus()),i()}),N=v.useCallback(M=>{!M||M===1/0||(window.clearTimeout(O.current),T.current=new Date().getTime(),O.current=window.setTimeout(D,M))},[D]);v.useEffect(()=>{const M=y.viewport;if(M){const Q=()=>{N(R.current),c==null||c()},L=()=>{const z=new Date().getTime()-T.current;R.current=R.current-z,window.clearTimeout(O.current),l==null||l()};return M.addEventListener(cd,L),M.addEventListener(dd,Q),()=>{M.removeEventListener(cd,L),M.removeEventListener(dd,Q)}}},[y.viewport,P,l,c,N]),v.useEffect(()=>{o&&!y.isClosePausedRef.current&&N(P)},[o,P,y.isClosePausedRef,N]),v.useEffect(()=>($(),()=>C()),[$,C]);const B=v.useMemo(()=>x?S0(x):null,[x]);return y.viewport?u.jsxs(u.Fragment,{children:[B&&u.jsx(US,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:B}),u.jsx(DS,{scope:r,onClose:D,children:Gi.createPortal(u.jsx(rf.ItemSlot,{scope:r,children:u.jsx(gS,{asChild:!0,onEscapeKeyDown:ye(a,()=>{y.isFocusedToastEscapeKeyDownRef.current||D(),y.isFocusedToastEscapeKeyDownRef.current=!1}),children:u.jsx(Ae.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":o?"open":"closed","data-swipe-direction":y.swipeDirection,..._,ref:m,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:ye(e.onKeyDown,M=>{M.key==="Escape"&&(a==null||a(M.nativeEvent),M.nativeEvent.defaultPrevented||(y.isFocusedToastEscapeKeyDownRef.current=!0,D()))}),onPointerDown:ye(e.onPointerDown,M=>{M.button===0&&(w.current={x:M.clientX,y:M.clientY})}),onPointerMove:ye(e.onPointerMove,M=>{if(!w.current)return;const Q=M.clientX-w.current.x,L=M.clientY-w.current.y,z=!!b.current,A=["left","right"].includes(y.swipeDirection),I=["left","up"].includes(y.swipeDirection)?Math.min:Math.max,W=A?I(0,Q):0,Z=A?0:I(0,L),G=M.pointerType==="touch"?10:2,ne={x:W,y:Z},ee={originalEvent:M,delta:ne};z?(b.current=ne,ba(IS,f,ee,{discrete:!1})):rm(ne,y.swipeDirection,G)?(b.current=ne,ba(OS,d,ee,{discrete:!1}),M.target.setPointerCapture(M.pointerId)):(Math.abs(Q)>G||Math.abs(L)>G)&&(w.current=null)}),onPointerUp:ye(e.onPointerUp,M=>{const Q=b.current,L=M.target;if(L.hasPointerCapture(M.pointerId)&&L.releasePointerCapture(M.pointerId),b.current=null,w.current=null,Q){const z=M.currentTarget,A={originalEvent:M,delta:Q};rm(Q,y.swipeDirection,y.swipeThreshold)?ba(NS,h,A,{discrete:!0}):ba(LS,p,A,{discrete:!0}),z.addEventListener("click",I=>I.preventDefault(),{once:!0})}})})})}),y.viewport)})]}):null}),US=e=>{const{__scopeToast:t,children:r,...n}=e,s=Zl(Qi,t),[o,i]=v.useState(!1),[a,l]=v.useState(!1);return BS(()=>i(!0)),v.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:u.jsx(d0,{asChild:!0,children:u.jsx(Xl,{...n,children:o&&u.jsxs(u.Fragment,{children:[s.label," ",r]})})})},FS="ToastTitle",y0=v.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return u.jsx(Ae.div,{...n,ref:t})});y0.displayName=FS;var VS="ToastDescription",w0=v.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return u.jsx(Ae.div,{...n,ref:t})});w0.displayName=VS;var _0="ToastAction",x0=v.forwardRef((e,t)=>{const{altText:r,...n}=e;return r.trim()?u.jsx(E0,{altText:r,asChild:!0,children:u.jsx(nf,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${_0}\`. Expected non-empty \`string\`.`),null)});x0.displayName=_0;var b0="ToastClose",nf=v.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e,s=$S(b0,r);return u.jsx(E0,{asChild:!0,children:u.jsx(Ae.button,{type:"button",...n,ref:t,onClick:ye(e.onClick,s.onClose)})})});nf.displayName=b0;var E0=v.forwardRef((e,t)=>{const{__scopeToast:r,altText:n,...s}=e;return u.jsx(Ae.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...s,ref:t})});function S0(e){const t=[];
vendor: 4,977 bytes, lines 41-80
41return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),zS(n)){const s=n.ariaHidden||n.hidden||n.style.display==="none",o=n.dataset.radixToastAnnounceExclude==="";if(!s)if(o){const i=n.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...S0(n))}}),t}function ba(e,t,r,{discrete:n}){const s=r.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),n?a0(s,o):s.dispatchEvent(o)}var rm=(e,t,r=0)=>{const n=Math.abs(e.x),s=Math.abs(e.y),o=n>s;return t==="left"||t==="right"?o&&n>r:!o&&s>r};function BS(e=()=>{}){const t=_n(e);Tr(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function zS(e){return e.nodeType===e.ELEMENT_NODE}function WS(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Ju(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var HS=f0,k0=m0,P0=v0,T0=y0,j0=w0,R0=x0,C0=nf;function A0(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(r=A0(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function O0(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=A0(e))&&(n&&(n+=" "),n+=t);return n}const nm=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,sm=O0,I0=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return sm(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:s,defaultVariants:o}=t,i=Object.keys(s).map(c=>{const d=r==null?void 0:r[c],f=o==null?void 0:o[c];if(d===null)return null;const p=nm(d)||nm(f);return s[c][p]}),a=r&&Object.entries(r).reduce((c,d)=>{let[f,p]=d;return p===void 0||(c[f]=p),c},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((c,d)=>{let{class:f,className:p,...h}=d;return Object.entries(h).every(_=>{let[y,x]=_;return Array.isArray(x)?x.includes({...o,...a}[y]):{...o,...a}[y]===x})?[...c,f,p]:c},[]);return sm(e,i,l,r==null?void 0:r.class,r==null?void 0:r.className)};/** 42 * @license lucide-react v0.462.0 - ISC 43 * 44 * This source code is licensed under the ISC license. 45 * See the LICENSE file in the root directory of this source tree. 46 */const qS=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),L0=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/** 47 * @license lucide-react v0.462.0 - ISC 48 * 49 * This source code is licensed under the ISC license. 50 * See the LICENSE file in the root directory of this source tree. 51 */var KS={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"};/** 52 * @license lucide-react v0.462.0 - ISC 53 * 54 * This source code is licensed under the ISC license. 55 * See the LICENSE file in the root directory of this source tree. 56 */const GS=v.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:s="",children:o,iconNode:i,...a},l)=>v.createElement("svg",{ref:l,...KS,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:L0("lucide",s),...a},[...i.map(([c,d])=>v.createElement(c,d)),...Array.isArray(o)?o:[o]]));/** 57 * @license lucide-react v0.462.0 - ISC 58 * 59 * This source code is licensed under the ISC license. 60 * See the LICENSE file in the root directory of this source tree. 61 */const Fe=(e,t)=>{const r=v.forwardRef(({className:n,...s},o)=>v.createElement(GS,{ref:o,iconNode:t,className:L0(`lucide-${qS(e)}`,n),...s}));return r.displayName=`${e}`,r};/** 62 * @license lucide-react v0.462.0 - ISC 63 * 64 * This source code is licensed under the ISC license. 65 * See the LICENSE file in the root directory of this source tree. 66 */const N0=Fe("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/** 67 * @license lucide-react v0.462.0 - ISC 68 * 69 * This source code is licensed under the ISC license. 70 * See the LICENSE file in the root directory of this source tree. 71 */const QS=Fe("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** 72 * @license lucide-react v0.462.0 - ISC 73 * 74 * This source code is licensed under the ISC license. 75 * See the LICENSE file in the root directory of this source tree. 76 */const eu=Fe("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** 77 * @license lucide-react v0.462.0 - ISC 78 * 79 * This source code is licensed under the ISC license. 80 * See the LICENSE file in the root directory of this source tree.
81 */const tu=Fe("Lock",[["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"}]]);/** 82 * @license lucide-react v0.462.0 - ISC 83 * 84 * This source code is licensed under the ISC license. 85 * See the LICENSE file in the root directory of this source tree. 86 */const JS=Fe("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/** 87 * @license lucide-react v0.462.0 - ISC 88 * 89 * This source code is licensed under the ISC license. 90 * See the LICENSE file in the root directory of this source tree. 91 */const YS=Fe("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/** 92 * @license lucide-react v0.462.0 - ISC 93 * 94 * This source code is licensed under the ISC license. 95 * See the LICENSE file in the root directory of this source tree. 96 */const XS=Fe("Music",[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]]);/** 97 * @license lucide-react v0.462.0 - ISC 98 * 99 * This source code is licensed under the ISC license. 100 * See the LICENSE file in the root directory of this source tree. 101 */const ZS=Fe("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]);/** 102 * @license lucide-react v0.462.0 - ISC 103 * 104 * This source code is licensed under the ISC license. 105 * See the LICENSE file in the root directory of this source tree. 106 */const e1=Fe("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/** 107 * @license lucide-react v0.462.0 - ISC 108 * 109 * This source code is licensed under the ISC license. 110 * See the LICENSE file in the root directory of this source tree. 111 */const om=Fe("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** 112 * @license lucide-react v0.462.0 - ISC 113 * 114 * This source code is licensed under the ISC license. 115 * See the LICENSE file in the root directory of this source tree. 116 */const t1=Fe("Repeat1",[["path",{d:"m17 2 4 4-4 4",key:"nntrym"}],["path",{d:"M3 11v-1a4 4 0 0 1 4-4h14",key:"84bu3i"}],["path",{d:"m7 22-4-4 4-4",key:"1wqhfi"}],["path",{d:"M21 13v1a4 4 0 0 1-4 4H3",key:"1rx37r"}],["path",{d:"M11 10h1v4",key:"70cz1p"}]]);/** 117 * @license lucide-react v0.462.0 - ISC 118 * 119 * This source code is licensed under the ISC license. 120 * See the LICENSE file in the root directory of this source tree. 121 */const r1=Fe("Repeat",[["path",{d:"m17 2 4 4-4 4",key:"nntrym"}],["path",{d:"M3 11v-1a4 4 0 0 1 4-4h14",key:"84bu3i"}],["path",{d:"m7 22-4-4 4-4",key:"1wqhfi"}],["path",{d:"M21 13v1a4 4 0 0 1-4 4H3",key:"1rx37r"}]]);/** 122 * @license lucide-react v0.462.0 - ISC 123 * 124 * This source code is licensed under the ISC license. 125 * See the LICENSE file in the root directory of this source tree. 126 */const n1=Fe("Shuffle",[["path",{d:"m18 14 4 4-4 4",key:"10pe0f"}],["path",{d:"m18 2 4 4-4 4",key:"pucp1d"}],["path",{d:"M2 18h1.973a4 4 0 0 0 3.3-1.7l5.454-8.6a4 4 0 0 1 3.3-1.7H22",key:"1ailkh"}],["path",{d:"M2 6h1.972a4 4 0 0 1 3.6 2.2",key:"km57vx"}],["path",{d:"M22 18h-6.041a4 4 0 0 1-3.3-1.8l-.359-.45",key:"os18l9"}]]);/** 127 * @license lucide-react v0.462.0 - ISC 128 * 129 * This source code is licensed under the ISC license. 130 * See the LICENSE file in the root directory of this source tree. 131 */const s1=Fe("SkipBack",[["polygon",{points:"19 20 9 12 19 4 19 20",key:"o2sva"}],["line",{x1:"5",x2:"5",y1:"19",y2:"5",key:"1ocqjk"}]]);/** 132 * @license lucide-react v0.462.0 - ISC 133 * 134 * This source code is licensed under the ISC license. 135 * See the LICENSE file in the root directory of this source tree. 136 */const o1=Fe("SkipForward",[["polygon",{points:"5 4 15 12 5 20 5 4",key:"16p6eg"}],["line",{x1:"19",x2:"19",y1:"5",y2:"19",key:"futhcm"}]]);/** 137 * @license lucide-react v0.462.0 - ISC 138 * 139 * This source code is licensed under the ISC license. 140 * See the LICENSE file in the root directory of this source tree. 141 */const D0=Fe("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** 142 * @license lucide-react v0.462.0 - ISC 143 * 144 * This source code is licensed under the ISC license. 145 * See the LICENSE file in the root directory of this source tree. 146 */const i1=Fe("Volume2",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]]);/** 147 * @license lucide-react v0.462.0 - ISC 148 * 149 * This source code is licensed under the ISC license. 150 * See the LICENSE file in the root directory of this source tree. 151 */const sf=Fe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}
vendor: 12,256 bytes, line 151
151],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),of="-",a1=e=>{const t=u1(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:i=>{const a=i.split(of);return a[0]===""&&a.length!==1&&a.shift(),$0(a,t)||l1(i)},getConflictingClassGroupIds:(i,a)=>{const l=r[i]||[];return a&&n[i]?[...l,...n[i]]:l}}},$0=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),s=n?$0(e.slice(1),n):void 0;if(s)return s;if(t.validators.length===0)return;const o=e.join(of);return(i=t.validators.find(({validator:a})=>a(o)))==null?void 0:i.classGroupId},im=/^\[(.+)\]$/,l1=e=>{if(im.test(e)){const t=im.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},u1=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return d1(Object.entries(e.classGroups),r).forEach(([o,i])=>{fd(i,n,o,t)}),n},fd=(e,t,r,n)=>{e.forEach(s=>{if(typeof s=="string"){const o=s===""?t:am(t,s);o.classGroupId=r;return}if(typeof s=="function"){if(c1(s)){fd(s(n),t,r,n);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([o,i])=>{fd(i,am(t,o),r,n)})})},am=(e,t)=>{let r=e;return t.split(of).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},c1=e=>e.isThemeGetter,d1=(e,t)=>t?e.map(([r,n])=>{const s=n.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([i,a])=>[t+i,a])):o);return[r,s]}):e,h1=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const s=(o,i)=>{r.set(o,i),t++,t>e&&(t=0,n=r,r=new Map)};return{get(o){let i=r.get(o);if(i!==void 0)return i;if((i=n.get(o))!==void 0)return s(o,i),i},set(o,i){r.has(o)?r.set(o,i):s(o,i)}}},M0="!",f1=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,s=t[0],o=t.length,i=a=>{const l=[];let c=0,d=0,f;for(let x=0;x<a.length;x++){let g=a[x];if(c===0){if(g===s&&(n||a.slice(x,x+o)===t)){l.push(a.slice(d,x)),d=x+o;continue}if(g==="/"){f=x;continue}}g==="["?c++:g==="]"&&c--}const p=l.length===0?a:a.substring(d),h=p.startsWith(M0),_=h?p.substring(1):p,y=f&&f>d?f-d:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:_,maybePostfixModifierPosition:y}};return r?a=>r({className:a,parseClassName:i}):i},p1=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},m1=e=>({cache:h1(e.cacheSize),parseClassName:f1(e),...a1(e)}),g1=/\s+/,v1=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s}=t,o=[],i=e.trim().split(g1);let a="";for(let l=i.length-1;l>=0;l-=1){const c=i[l],{modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:h}=r(c);let _=!!h,y=n(_?p.substring(0,h):p);if(!y){if(!_){a=c+(a.length>0?" "+a:a);continue}if(y=n(p),!y){a=c+(a.length>0?" "+a:a);continue}_=!1}const x=p1(d).join(":"),g=f?x+M0:x,m=g+y;if(o.includes(m))continue;o.push(m);const w=s(y,_);for(let b=0;b<w.length;++b){const P=w[b];o.push(g+P)}a=c+(a.length>0?" "+a:a)}return a};function y1(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=U0(t))&&(n&&(n+=" "),n+=r);return n}const U0=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=U0(e[n]))&&(r&&(r+=" "),r+=t);return r};function w1(e,...t){let r,n,s,o=i;function i(l){const c=t.reduce((d,f)=>f(d),e());return r=m1(c),n=r.cache.get,s=r.cache.set,o=a,a(l)}function a(l){const c=n(l);if(c)return c;const d=v1(l,r);return s(l,d),d}return function(){return o(y1.apply(null,arguments))}}const ge=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},F0=/^\[(?:([a-z-]+):)?(.+)\]$/i,_1=/^\d+\/\d+$/,x1=new Set(["px","full","screen"]),b1=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,E1=/\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$/,S1=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,k1=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,P1=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,mr=e=>zs(e)||x1.has(e)||_1.test(e),Fr=e=>Eo(e,"length",L1),zs=e=>!!e&&!Number.isNaN(Number(e)),Yu=e=>Eo(e,"number",zs),Fo=e=>!!e&&Number.isInteger(Number(e)),T1=e=>e.endsWith("%")&&zs(e.slice(0,-1)),re=e=>F0.test(e),Vr=e=>b1.test(e),j1=new Set(["length","size","percentage"]),R1=e=>Eo(e,j1,V0),C1=e=>Eo(e,"position",V0),A1=new Set(["image","url"]),O1=e=>Eo(e,A1,D1),I1=e=>Eo(e,"",N1),Vo=()=>!0,Eo=(e,t,r)=>{const n=F0.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},L1=e=>E1.test(e)&&!S1.test(e),V0=()=>!1,N1=e=>k1.test(e),D1=e=>P1.test(e),$1=()=>{const e=ge("colors"),t=ge("spacing"),r=ge("blur"),n=ge("brightness"),s=ge("borderColor"),o=ge("borderRadius"),i=ge("borderSpacing"),a=ge("borderWidth"),l=ge("contrast"),c=ge("grayscale"),d=ge("hueRotate"),f=ge("invert"),p=ge("gap"),h=ge("gradientColorStops"),_=ge("gradientColorStopPositions"),y=ge("inset"),x=ge("margin"),g=ge("opacity"),m=ge("padding"),w=ge("saturate"),b=ge("scale"),P=ge("sepia"),T=ge("skew"),R=ge("space"),O=ge("translate"),$=()=>["auto","contain","none"],C=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto",re,t],N=()=>[re,t],B=()=>["",mr,Fr],M=()=>["auto",zs,re],Q=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],L=()=>["solid","dashed","dotted","double","none"],z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],A=()=>["start","end","center","between","around","evenly","stretch"],I=()=>["","0",re],W=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Z=()=>[zs,re];return{cacheSize:500,separator:":",theme:{colors:[Vo],spacing:[mr,Fr],blur:["none","",Vr,re],brightness:Z(),borderColor:[e],borderRadius:["none","","full",Vr,re],borderSpacing:N(),borderWidth:B(),contrast:Z(),grayscale:I(),hueRotate:Z(),invert:I(),gap:N(),gradientColorStops:[e],gradientColorStopPositions:[T1,Fr],inset:D(),margin:D(),opacity:Z(),padding:N(),saturate:Z(),scale:Z(),sepia:I(),skew:Z(),space:N(),translate:N()},classGroups:{aspect:[{aspect:["auto","square","video",re]}],container:["container"],columns:[{columns:[Vr]}],"break-after":[{"break-after":W()}],"break-before":[{"break-before":W()}],"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"],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:[...Q(),re]}],overflow:[{overflow:C()}],"overflow-x":[{"overflow-x":C()}],"overflow-y":[{"overflow-y":C()}],overscroll:[{overscroll:$()}],"overscroll-x":[{"overscroll-x":$()}],"overscroll-y":[{"overscroll-y":$()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[y]}],"inset-x":[{"inset-x":[y]}],"inset-y":[{"inset-y":[y]}],start:[{start:[y]}],end:[{end:[y]}],top:[{top:[y]}],right:[{right:[y]}],bottom:[{bottom:[y]}],left:[{left:[y]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Fo,re]}],basis:[{basis:D()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",re]}],grow:[{grow:I()}],shrink:[{shrink:I()}],order:[{order:["first","last","none",Fo,re]}],"grid-cols":[{"grid-cols":[Vo]}],"col-start-end":[{col:["auto",{span:["full",Fo,re]},re]}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":[Vo]}],"row-start-end":[{row:["auto",{span:[Fo,re]},re]}],"row-start":[{"row-start":M()}],"row-end":[{"row-end":M()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",re]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",re]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...A()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...A(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...A(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[m]}],px:[{px:[m]}],py:[{py:[m]}],ps:[{ps:[m]}],pe:[{pe:[m]}],pt:[{pt:[m]}],pr:[{pr:[m]}],pb:[{pb:[m]}],pl:[{pl:[m]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[R]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[R]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",re,t]}],"min-w":[{"min-w":[re,t,"min","max","fit"]}],"max-w":[{"max-w":[re,t,"none","full","min","max","fit","prose",{screen:[Vr]},Vr]}],h:[{h:[re,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[re,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[re,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[re,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Vr,Fr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Yu]}],"font-family":[{font:[Vo]}],"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:["tighter","tight","normal","wide","wider","widest",re]}],"line-clamp":[{"line-clamp":["none",zs,Yu]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",mr,re]}],"list-image":[{"list-image":["none",re]}],"list-style-type":[{list:["none","disc","decimal",re]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...L(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",mr,Fr]}],"underline-offset":[{"underline-offset":["auto",mr,re]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",re]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",re]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Q(),C1]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",R1]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},O1]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[_]}
vendor: 5,180 bytes, line 151
151],"gradient-via-pos":[{via:[_]}],"gradient-to-pos":[{to:[_]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[g]}],"border-style":[{border:[...L(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[g]}],"divide-style":[{divide:L()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...L()]}],"outline-offset":[{"outline-offset":[mr,re]}],"outline-w":[{outline:[mr,Fr]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:B()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[mr,Fr]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Vr,I1]}],"shadow-color":[{shadow:[Vo]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[...z(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":z()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Vr,re]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[f]}],saturate:[{saturate:[w]}],sepia:[{sepia:[P]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[P]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",re]}],duration:[{duration:Z()}],ease:[{ease:["linear","in","out","in-out",re]}],delay:[{delay:Z()}],animate:[{animate:["none","spin","ping","pulse","bounce",re]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[b]}],"scale-x":[{"scale-x":[b]}],"scale-y":[{"scale-y":[b]}],rotate:[{rotate:[Fo,re]}],"translate-x":[{"translate-x":[O]}],"translate-y":[{"translate-y":[O]}],"skew-x":[{"skew-x":[T]}],"skew-y":[{"skew-y":[T]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",re]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],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",re]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"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"]}
151],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",re]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[mr,Fr,Yu]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"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-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-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"],"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"]}}},M1=w1($1);function Nt(...e){return M1(O0(e))}function U1(e){return e&&e.replace(/\$\\rightarrow\$/g,"â").replace(/\$\\leftarrow\$/g,"â").replace(/\$\\Rightarrow\$/g,"â").replace(/\$\\Leftarrow\$/g,"â").replace(/\$\\leftrightarrow\$/g,"â").replace(/\$\\times\$/g,"Ã").replace(/\$\\div\$/g,"÷").replace(/\$\\pm\$/g,"±").replace(/\$\\leq\$/g,"â¤").replace(/\$\\geq\$/g,"â¥").replace(/\$\\neq\$/g,"â ").replace(/\$\\approx\$/g,"â").replace(/\$\\infty\$/g,"â").replace(/\$\\cdot\$/g,"·").replace(/\$\\ldots\$/g,"â¦").replace(/\\textbf\{([^}]+)\}/g,"**$1**").replace(/\\textit\{([^}]+)\}/g,"*$1*").replace(/\\emph\{([^}]+)\}/g,"*$1*")}function F1(e){if(!e)return e;const t=e.replace(/\r\n?/g,` 152`);return/\|\s*[-:]{3,}/.test(t)?t.split(` 153`).map(r=>!/\|\s*[-:]{3,}/.test(r)||/^\s*\|[\s|:_-]*\|\s*$/.test(r)?r:` 154`+r.replace(/\|\s+\|/g,`| 155|`)).join(` 156`):t}function f2(e){return F1(U1(e))}const V1=HS,B0=v.forwardRef(({className:e,...t},r)=>u.jsx(k0,{ref:r,className:Nt("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));B0.displayName=k0.displayName;const B1=I0("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),z0=v.forwardRef(({className:e,variant:t,...r},n)=>u.jsx(P0,{ref:n,className:Nt(B1({variant:t}),e),...r}));z0.displayName=P0.displayName;const z1=v.forwardRef(({className:e,...t},r)=>u.jsx(R0,{ref:r,className:Nt("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",e),...t}));z1.displayName=R0.displayName;const W0=v.forwardRef(({className:e,...t},r)=>u.jsx(C0,{ref:r,className:Nt("absolute right-2 top-2 rounded-md p-1 text-foreground
156/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:u.jsx(sf,{className:"h-4 w-4"})}));W0.displayName=C0.displayName;const H0=v.forwardRef(({className:e,...t},r)=>u.jsx(T0,{ref:r,className:Nt("text-sm font-semibold",e),...t}));H0.displayName=T0.displayName;const q0=v.forwardRef(({className:e,...t},r)=>u.jsx(j0,{ref:r,className:Nt("text-sm opacity-90",e),...t}));q0.displayName=j0.displayName;function W1(){const{toasts:e}=eS();return u.jsxs(V1,{children:[e.map(function({id:t,title:r,description:n,action:s,...o}){return u.jsxs(z0,{...o,children:[u.jsxs("div",{className:"grid gap-1",children:[r&&u.jsx(H0,{children:r}),n&&u.jsx(q0,{children:n})]}),s,u.jsx(W0,{})]},t)}),u.jsx(B0,{})]})}const H1=I0("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background text-foreground hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",hero:"bg-primary text-primary-foreground hover:bg-primary/90 shadow-lg hover:shadow-xl transition-all duration-300 font-semibold",heroOutline:"border-2 border-primary text-primary hover:bg-primary hover:text-primary-foreground transition-all duration-300 font-semibold"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),jr=v.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...s},o)=>{const i=n?rS:"button";return u.jsx(i,{className:Nt(H1({variant:t,size:r,className:e})),ref:o,...s})});jr.displayName="Button";class q1 extends V.Component{constructor(r){super(r);Ff(this,"handleReset",()=>{this.setState({hasError:!1,error:null})});this.state={hasError:!1,error:null}}static getDerivedStateFromError(r){return{hasError:!0,error:r}}componentDidCatch(r,n){console.error("[ErrorBoundary]",r,n),Ds(r)&&ld()}render(){if(this.state.hasError){const r=Ds(this.state.error);return u.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4",children:u.jsxs("div",{className:"w-full max-w-md text-center",children:[u.jsx(D0,{className:"mx-auto h-12 w-12 text-destructive"}),u.jsx("h1",{className:"mt-4 text-xl font-bold text-foreground",children:r?"A new version is available":"Something went wrong"}),u.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:r?"Your browser was still using an older version of the app. Refresh to load the latest one.":"An unexpected error occurred. Your page was not refreshed."}),this.state.error&&!r&&u.jsx("pre",{className:"mt-4 max-h-32 overflow-auto rounded-lg border border-border bg-muted p-3 text-left text-xs text-muted-foreground",children:this.state.error.message}),u.jsx("div",{className:"mt-6 flex justify-center gap-3",children:r?u.jsxs(jr,{onClick:()=>{try{sessionStorage.removeItem("emai:chunk-reloaded-at")}catch{}ld({userInitiated:!0})},className:"gap-2",children:[u.jsx(om,{className:"h-4 w-4"})," Refresh app"]}):u.jsxs(jr,{variant:"outline",onClick:this.handleReset,className:"gap-2",children:[u.jsx(om,{className:"h-4 w-4"})," Try Again"]})})]})})}return this.props.children}}var lm=["light","dark"],K1="(prefers-color-scheme: dark)",G1=v.createContext(void 0),Q1={setTheme:e=>{},themes:[]},J1=()=>{var e;return(e=v.useContext(G1))!=null?e:Q1};v.memo(({forcedTheme:e,storageKey:t,attribute:r,enableSystem:n,enableColorScheme:s,defaultTheme:o,value:i,attrs:a,nonce:l})=>{let c=o==="system",d=r==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${a.map(_=>`'${_}'`).join(",")})`};`:`var d=document.documentElement,n='${r}',s='setAttribute';`,f=s?lm.includes(o)&&o?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${o}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",p=(_,y=!1,x=!0)=>{let g=i?i[_]:_,m=y?_+"|| ''":`'${g}'`,w="";return s&&x&&!y&&lm.includes(_)&&(w+=`d.style.colorScheme = '${_}';`),r==="class"?y||g?w+=`c.add(${m})`:w+="null":g&&(w+=`d[s](n,${m})`),w},h=e?`!function(){${d}${p(e)}}()`:n?`!function(){try{${d}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${c})){var t='${K1}',m=window.matchMedia(t);if(m.media!==t||m.matches){${p("dark")}}else{${p("light")}}}else if(e){${i?`var x=${JSON.stringify(i)};`:""}${p(i?"x[e]":"e",!0)}}${c?"":"else{"+p(o,!1,!1)+"}"}${f}}catch(e){}}()`:`!function(){try{${d}var e=localStorage.getItem('${t}');if(e){${i?`var x=${JSON.stringify(i)};`:""}${p(i?"x[e]":"e",!0)}}else{${p(o,!1,!1)};}${f}}catch(t){}}();`;return v.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:h}})});var Y1=e=>{switch(e){case"success":return ek;case"info":return rk;case"warning":return tk;case"error":return nk;default:return null}},X1=Array(12).fill(0),Z1=({visible:e,className:t})=>V.createElement("div",{className:["sonner-loading-wrapper",t].filter(
156Boolean).join(" "),"data-visible":e},V.createElement("div",{className:"sonner-spinner"},X1.map((r,n)=>V.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),ek=V.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},V.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),tk=V.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},V.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),rk=V.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},V.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),nk=V.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},V.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),sk=V.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},V.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),V.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),ok=()=>{let[e,t]=V.useState(document.hidden);return V.useEffect(()=>{let r=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e},pd=1,ik=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:r,...n}=e,s=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:pd++,o=this.toasts.find(a=>a.id===s),i=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),o?this.toasts=this.toasts.map(a=>a.id===s?(this.publish({...a,...e,id:s,title:r}),{...a,...e,id:s,dismissible:i,title:r}):a):this.addToast({title:r,...n,dismissible:i,id:s}),s},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(r=>r({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>
156this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let r;t.loading!==void 0&&(r=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let n=e instanceof Promise?e:e(),s=r!==void 0,o,i=n.then(async l=>{if(o=["resolve",l],V.isValidElement(l))s=!1,this.create({id:r,type:"default",message:l});else if(lk(l)&&!l.ok){s=!1;let c=typeof t.error=="function"?await t.error(`HTTP error! status: ${l.status}`):t.error,d=typeof t.description=="function"?await t.description(`HTTP error! status: ${l.status}`):t.description;this.create({id:r,type:"error",message:c,description:d})}else if(t.success!==void 0){s=!1;let c=typeof t.success=="function"?await t.success(l):t.success,d=typeof t.description=="function"?await t.description(l):t.description;this.create({id:r,type:"success",message:c,description:d})}}).catch(async l=>{if(o=["reject",l],t.error!==void 0){s=!1;let c=typeof t.error=="function"?await t.error(l):t.error,d=typeof t.description=="function"?await t.description(l):t.description;this.create({id:r,type:"error",message:c,description:d})}}).finally(()=>{var l;s&&(this.dismiss(r),r=void 0),(l=t.finally)==null||l.call(t)}),a=()=>new Promise((l,c)=>i.then(()=>o[0]==="reject"?c(o[1]):l(o[1])).catch(c));return typeof r!="string"&&typeof r!="number"?{unwrap:a}:Object.assign(r,{unwrap:a})},this.custom=(e,t)=>{let r=(t==null?void 0:t.id)||pd++;return this.create({jsx:e(r),id:r,...t}),r},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},lt=new ik,ak=(e,t)=>{let r=(t==null?void 0:t.id)||pd++;return lt.addToast({title:e,...t,id:r}),r},lk=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",uk=ak,ck=()=>lt.toasts,dk=()=>lt.getActiveToasts(),hk=Object.assign(uk,{success:lt.success,info:lt.info,warning:lt.warning,error:lt.error,custom:lt.custom,message:lt.message,promise:lt.promise,dismiss:lt.dismiss,loading:lt.loading},{getHistory:ck,getToasts:dk});function fk(e,{insertAt:t}={}){if(typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t==="top"&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}fk(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;
156left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}
156:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);
156--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)} 157`);function Ea(e){return e.label!==void 0}var pk=3,mk="32px",gk="16px",um=4e3,vk=356,yk=14,wk=20,_k=200;function Ft(...e){return e.filter(Boolean).join(" ")}function xk(e){let[t,r]=e.split("-"),n=[];return t&&n.push(t),r&&n.push(r),n}var bk=e=>{var t,r,n,s,o,i,a,l,c,d,f;let{invert:p,toast:h,unstyled:_,interacting:y,setHeights:x,visibleToasts:g,heights:m,index:w,toasts:b,expanded:P,removeToast:T,defaultRichColors:R,closeButton:O,style:$,cancelButtonStyle:C,actionButtonStyle:D,className:N="",descriptionClassName:B="",duration:M,position:Q,gap:L,loadingIcon:z,expandByDefault:A,classNames:I,icons:W,closeButtonAriaLabel:Z="Close toast",pauseWhenPageIsHidden:G}=e,[ne,ee]=V.useState(null),[be,Le]=V.useState(null),[ue,us]=V.useState(!1),[Ir,Tn]=V.useState(!1),[Lr,cs]=V.useState(!1),[Nr,ea]=V.useState(!1),[vu,ta]=V.useState(!1),[yu,Co]=V.useState(0),[ds,If]=V.useState(0),Ao=V.useRef(h.duration||M||um),Lf=V.useRef(null),jn=V.useRef(null),ix=w===0,ax=w+1<=g,kt=h.type,hs=h.dism
157issible!==!1,lx=h.className||"",ux=h.descriptionClassName||"",ra=V.useMemo(()=>m.findIndex(te=>te.toastId===h.id)||0,[m,h.id]),cx=V.useMemo(()=>{var te;return(te=h.closeButton)!=null?te:O},[h.closeButton,O]),Nf=V.useMemo(()=>h.duration||M||um,[h.duration,M]),wu=V.useRef(0),fs=V.useRef(0),Df=V.useRef(0),ps=V.useRef(null),[dx,hx]=Q.split("-"),$f=V.useMemo(()=>m.reduce((te,fe,_e)=>_e>=ra?te:te+fe.height,0),[m,ra]),Mf=ok(),fx=h.invert||p,_u=kt==="loading";fs.current=V.useMemo(()=>ra*L+$f,[ra,$f]),V.useEffect(()=>{Ao.current=Nf},[Nf]),V.useEffect(()=>{us(!0)},[]),V.useEffect(()=>{let te=jn.current;if(te){let fe=te.getBoundingClientRect().height;return If(fe),x(_e=>[{toastId:h.id,height:fe,position:h.position},..._e]),()=>x(_e=>_e.filter(Dt=>Dt.toastId!==h.id))}},[x,h.id]),V.useLayoutEffect(()=>{if(!ue)return;let te=jn.current,fe=te.style.height;te.style.height="auto";let _e=te.getBoundingClientRect().height;te.style.height=fe,If(_e),x(Dt=>Dt.find($t=>$t.toastId===h.id)?Dt.map($t=>$t.toastId===h.id?{...$t,height:_e}:$t):[{toastId:h.id,height:_e,position:h.position},...Dt])},[ue,h.title,h.description,x,h.id]);let Dr=V.useCallback(()=>{Tn(!0),Co(fs.current),x(te=>te.filter(fe=>fe.toastId!==h.id)),setTimeout(()=>{T(h)},_k)},[h,T,x,fs]);V.useEffect(()=>{if(h.promise&&kt==="loading"||h.duration===1/0||h.type==="loading")return;let te;return P||y||G&&Mf?(()=>{if(Df.current<wu.current){let fe=new Date().getTime()-wu.current;Ao.current=Ao.current-fe}Df.current=new Date().getTime()})():Ao.current!==1/0&&(wu.current=new Date().getTime(),te=setTimeout(()=>{var fe;(fe=h.onAutoClose)==null||fe.call(h,h),Dr()},Ao.current)),()=>clearTimeout(te)},[P,y,h,kt,G,Mf,Dr]),V.useEffect(()=>{h.delete&&Dr()},[Dr,h.delete]);function px(){var te,fe,_e;return W!=null&&W.loading?V.createElement("div",{className:Ft(I==null?void 0:I.loader,(te=h==null?void 0:h.classNames)==null?void 0:te.loader,"sonner-loader"),"data-visible":kt==="loading"},W.loading):z?V.createElement("div",{className:Ft(I==null?void 0:I.loader,(fe=h==null?void 0:h.classNames)==null?void 0:fe.loader,"sonner-loader"),"data-visible":kt==="loading"},z):V.createElement(Z1,{className:Ft(I==null?void 0:I.loader,(_e=h==null?void 0:h.classNames)==null?void 0:_e.loader),visible:kt==="loading"})}return V.createElement("li",{tabIndex:0,ref:jn,className:Ft(N,lx,I==null?void 0:I.toast,(t=h==null?void 0:h.classNames)==null?void 0:t.toast,I==null?void 0:I.default,I==null?void 0:I[kt],(r=h==null?void 0:h.classNames)==null?void 0:r[kt]),"data-sonner-toast":"","data-rich-colors":(n=h.richColors)!=null?n:R,"data-styled":!(h.jsx||h.unstyled||_),"data-mounted":ue,"data-promise":!!h.promise,"data-swiped":vu,"data-removed":Ir,"data-visible":ax,"data-y-position":dx,"data-x-position":hx,"data-index":w,"data-front":ix,"data-swiping":Lr,"data-dismissible":hs,"data-type":kt,"data-invert":fx,"data-swipe-out":Nr,"data-swipe-direction":be,"data-expanded":!!(P||A&&ue),style:{"--index":w,"--toasts-before":w,"--z-index":b.length-w,"--offset":`${Ir?yu:fs.current}px`,"--initial-height":A?"auto":`${ds}px`,...$,...h.style},onDragEnd:()=>{cs(!1),ee(null),ps.current=null},onPointerDown:te=>{_u||!hs||(Lf.current=new Date,Co(fs.current),te.target.setPointerCapture(te.pointerId),te.target.tagName!=="BUTTON"&&(cs(!0),ps.current={x:te.clientX,y:te.clientY}))},onPointerUp:()=>{var te,fe,_e,Dt;if(Nr||!hs)return;ps.current=null;let $t=Number(((te=jn.current)==null?void 0:te.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),$r=Number(((fe=jn.current)==null?void 0:fe.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Rn=new Date().getTime()-((_e=Lf.current)==null?void 0:_e.getTime()),Mt=ne==="x"?$t:$r,Mr=Math.abs(Mt)/Rn;if(Math.abs(Mt)>=wk||Mr>.11){Co(fs.current),(Dt=h.onDismiss)==null||Dt.call(h,h),Le(ne==="x"?$t>0?"right":"left":$r>0?"down":"up"),Dr(),ea(!0),ta(!1);return}cs(!1),ee(null)},onPointerMove:te=>{var fe,_e,Dt,$t;if(!ps.current||!hs||((fe=window.getSelection())==null?void 0:fe.toString().length)>0)return;let $r=te.clientY-ps.current.y,Rn=te.clientX-ps.current.x,Mt=(_e=e.swipeDirections)!=null?_e:xk(Q);!ne&&(Math.abs(Rn)>1||Math.abs($r)>1)&&ee(Math.abs(Rn)>Math.abs($r)?"x":"y");let Mr={x:0,y:0};ne==="y"?(Mt.includes("top")||Mt.includes("bottom"))&&(Mt.includes("top")&&$r<0||Mt.includes("bottom")&&$r>
1570)&&(Mr.y=$r):ne==="x"&&(Mt.includes("left")||Mt.includes("right"))&&(Mt.includes("left")&&Rn<0||Mt.includes("right")&&Rn>0)&&(Mr.x=Rn),(Math.abs(Mr.x)>0||Math.abs(Mr.y)>0)&&ta(!0),(Dt=jn.current)==null||Dt.style.setProperty("--swipe-amount-x",`${Mr.x}px`),($t=jn.current)==null||$t.style.setProperty("--swipe-amount-y",`${Mr.y}px`)}},cx&&!h.jsx?V.createElement("button",{"aria-label":Z,"data-disabled":_u,"data-close-button":!0,onClick:_u||!hs?()=>{}:()=>{var te;Dr(),(te=h.onDismiss)==null||te.call(h,h)},className:Ft(I==null?void 0:I.closeButton,(s=h==null?void 0:h.classNames)==null?void 0:s.closeButton)},(o=W==null?void 0:W.close)!=null?o:sk):null,h.jsx||v.isValidElement(h.title)?h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title:V.createElement(V.Fragment,null,kt||h.icon||h.promise?V.createElement("div",{"data-icon":"",className:Ft(I==null?void 0:I.icon,(i=h==null?void 0:h.classNames)==null?void 0:i.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||px():null,h.type!=="loading"?h.icon||(W==null?void 0:W[kt])||Y1(kt):null):null,V.createElement("div",{"data-content":"",className:Ft(I==null?void 0:I.content,(a=h==null?void 0:h.classNames)==null?void 0:a.content)},V.createElement("div",{"data-title":"",className:Ft(I==null?void 0:I.title,(l=h==null?void 0:h.classNames)==null?void 0:l.title)},typeof h.title=="function"?h.title():h.title),h.description?V.createElement("div",{"data-description":"",className:Ft(B,ux,I==null?void 0:I.description,(c=h==null?void 0:h.classNames)==null?void 0:c.description)},typeof h.description=="function"?h.description():h.description):null),v.isValidElement(h.cancel)?h.cancel:h.cancel&&Ea(h.cancel)?V.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||C,onClick:te=>{var fe,_e;Ea(h.cancel)&&hs&&((_e=(fe=h.cancel).onClick)==null||_e.call(fe,te),Dr())},className:Ft(I==null?void 0:I.cancelButton,(d=h==null?void 0:h.classNames)==null?void 0:d.cancelButton)},h.cancel.label):null,v.isValidElement(h.action)?h.action:h.action&&Ea(h.action)?V.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||D,onClick:te=>{var fe,_e;Ea(h.action)&&((_e=(fe=h.action).onClick)==null||_e.call(fe,te),!te.defaultPrevented&&Dr())},className:Ft(I==null?void 0:I.actionButton,(f=h==null?void 0:h.classNames)==null?void 0:f.actionButton)},h.action.label):null))};function cm(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function Ek(e,t){let r={};return[e,t].forEach((n,s)=>{let o=s===1,i=o?"--mobile-offset":"--offset",a=o?gk:mk;function l(c){["top","right","bottom","left"].forEach(d=>{r[`${i}-${d}`]=typeof c=="number"?`${c}px`:c})}typeof n=="number"||typeof n=="string"?l(n):typeof n=="object"?["top","right","bottom","left"].forEach(c=>{n[c]===void 0?r[`${i}-${c}`]=a:r[`${i}-${c}`]=typeof n[c]=="number"?`${n[c]}px`:n[c]}):l(a)}),r}var K0=v.forwardRef(function(e,t){let{invert:r,position:n="bottom-right",hotkey:s=["altKey","KeyT"],expand:o,closeButton:i,className:a,offset:l,mobileOffset:c,theme:d="light",richColors:f,duration:p,style:h,visibleToasts:_=pk,toastOptions:y,dir:x=cm(),gap:g=yk,loadingIcon:m,icons:w,containerAriaLabel:b="Notifications",pauseWhenPageIsHidden:P}=e,[T,R]=V.useState([]),O=V.useMemo(()=>Array.from(new Set([n].concat(T.filter(G=>G.position).map(G=>G.position)))),[T,n]),[$,C]=V.useState([]),[D,N]=V.useState(!1),[B,M]=V.useState(!1),[Q,L]=V.useState(d!=="system"?d:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),z=V.useRef(null),A=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),I=V.useRef(null),W=V.useRef(!1),Z=V.useCallback(G=>{R(ne=>{var ee;return(ee=ne.find(be=>be.id===G.id))!=null&&ee.delete||lt.dismiss(G.id),ne.filter(({id:be})=>be!==G.id)})},[]);return V.useEffect(()=>lt.subscribe(G=>{if(G.dismiss){R(ne=>ne.map(ee=>ee.id===G.id?{...ee,delete:!0}:ee));return}setTimeout(()=>{r0.flushSync(()=>{R(ne=>{let ee=ne.findIndex(be=>be.id===G.id);return ee!==-1?[...ne.slice(0,ee),{...ne[ee],...G},...ne.slice(ee+1)]:[G,...ne]})})})}),[]),V.useEffect(()=>{if(d!=="system"){L(d);return}if(d==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?L("dark"):L("light")),typeof window>"u")return;let G=window.matchMedia("(prefers-color-scheme: dark)");try{G.addEventListener("change",({matches:ne})=>{L(ne?"dark":"light")})}catch{G.addListener(({matches:ee})=>
157{try{L(ee?"dark":"light")}catch(be){console.error(be)}})}},[d]),V.useEffect(()=>{T.length<=1&&N(!1)},[T]),V.useEffect(()=>{let G=ne=>{var ee,be;s.every(Le=>ne[Le]||ne.code===Le)&&(N(!0),(ee=z.current)==null||ee.focus()),ne.code==="Escape"&&(document.activeElement===z.current||(be=z.current)!=null&&be.contains(document.activeElement))&&N(!1)};return document.addEventListener("keydown",G),()=>document.removeEventListener("keydown",G)},[s]),V.useEffect(()=>{if(z.current)return()=>{I.current&&(I.current.focus({preventScroll:!0}),I.current=null,W.current=!1)}},[z.current]),V.createElement("section",{ref:t,"aria-label":`${b} ${A}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},O.map((G,ne)=>{var ee;let[be,Le]=G.split("-");return T.length?V.createElement("ol",{key:G,dir:x==="auto"?cm():x,tabIndex:-1,ref:z,className:a,"data-sonner-toaster":!0,"data-theme":Q,"data-y-position":be,"data-lifted":D&&T.length>1&&!o,"data-x-position":Le,style:{"--front-toast-height":`${((ee=$[0])==null?void 0:ee.height)||0}px`,"--width":`${vk}px`,"--gap":`${g}px`,...h,...Ek(l,c)},onBlur:ue=>{W.current&&!ue.currentTarget.contains(ue.relatedTarget)&&(W.current=!1,I.current&&(I.current.focus({preventScroll:!0}),I.current=null))},onFocus:ue=>{ue.target instanceof HTMLElement&&ue.target.dataset.dismissible==="false"||W.current||(W.current=!0,I.current=ue.relatedTarget)},onMouseEnter:()=>N(!0),onMouseMove:()=>N(!0),onMouseLeave:()=>{B||N(!1)},onDragEnd:()=>N(!1),onPointerDown:ue=>{ue.target instanceof HTMLElement&&ue.target.dataset.dismissible==="false"||M(!0)},onPointerUp:()=>M(!1)},T.filter(ue=>!ue.position&&ne===0||ue.position===G).map((ue,us)=>{var Ir,Tn;return V.createElement(bk,{key:ue.id,icons:w,index:us,toast:ue,defaultRichColors:f,duration:(Ir=y==null?void 0:y.duration)!=null?Ir:p,className:y==null?void 0:y.className,descriptionClassName:y==null?void 0:y.descriptionClassName,invert:r,visibleToasts:_,closeButton:(Tn=y==null?void 0:y.closeButton)!=null?Tn:i,interacting:B,position:G,style:y==null?void 0:y.style,unstyled:y==null?void 0:y.unstyled,classNames:y==null?void 0:y.classNames,cancelButtonStyle:y==null?void 0:y.cancelButtonStyle,actionButtonStyle:y==null?void 0:y.actionButtonStyle,removeToast:Z,toasts:T.filter(Lr=>Lr.position==ue.position),heights:$.filter(Lr=>Lr.position==ue.position),setHeights:C,expandByDefault:o,gap:g,loadingIcon:m,expanded:D,pauseWhenPageIsHidden:P,swipeDirections:e.swipeDirections})})):null}))});const p2=Object.freeze(Object.defineProperty({__proto__:null,Toaster:K0,toast:hk},Symbol.toStringTag,{value:"Module"})),Sk=({...e})=>{const{theme:t="system"}=J1();return u.jsx(K0,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})};var kk=ih[" useId ".trim().toString()]||(()=>{}),Pk=0;function Tk(e){const[t,r]=v.useState(kk());return Tr(()=>{r(n=>n??String(Pk++))},[e]),t?`radix-${t}`:""}const jk=["top","right","bottom","left"],xn=Math.min,gt=Math.max,_l=Math.round,Sa=Math.floor,cr=e=>({x:e,y:e}),Rk={left:"right",right:"left",bottom:"top",top:"bottom"},Ck={start:"end",end:"start"};function md(e,t,r){return gt(e,xn(t,r))}function Rr(e,t){return typeof e=="function"?e(t):e}function Cr(e){return e.split("-")[0]}function So(e){return e.split("-")[1]}function af(e){return e==="x"?"y":"x"}function lf(e){return e==="y"?"height":"width"}const Ak=new Set(["top","bottom"]);function ar(e){return Ak.has(Cr(e))?"y":"x"}function uf(e){return af(ar(e))}function Ok(e,t,r){r===void 0&&(r=!1);const n=So(e),s=uf(e),o=lf(s);let i=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(i=xl(i)),[i,xl(i)]}function Ik(e){const t=xl(e);return[gd(e),t,gd(t)]}function gd(e){return e.replace(/start|end/g,t=>Ck[t])}const dm=["left","right"],hm=["right","left"],Lk=["top","bottom"],Nk=["bottom","top"];function Dk(e,t,r){switch(e){case"top":case"bottom":return r?t?hm:dm:t?dm:hm;case"left":case"right":return t?Lk:Nk;default:return[]}}function $k(e,t,r,n){const s=So(e);let o=Dk(Cr(e),r==="start",n);return s&&(o=o.map(i=>i+"-"+s),t&&(o=o.concat(o.map(gd)))),o}function xl(e){return e.replace(/left|right|bottom|top/g,t=>Rk[t])}function Mk(e){return{top:0,right:0,bottom:0,left:0,...e}}function G0(e){return typeof e!="number"?Mk(e):{top:e,right:e,bottom:e,left:e}}function bl(e){const{x:t,y:r,width:n,height:s}=e;return{width:n,height:s,top:r,left:t,right:t+n,bottom:r+s,x:t,y:r}}function fm(e,t,r){let{reference:n,floating:s}=e;const o=ar(t),i=uf(t),a=lf(i),l=Cr(t),c=o==="y",d=n.x+n.width/2-s.width/2,f=n.y+n.height/2-s.height/2,p=n[a]/2-s[a]/2;let h;switch(l){case"top":h={x:d,y:n.y-s.height};break;case"bottom":h={x:d,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:f};break;case"left":h={x:n.x-s.width,y:f};break;default:h={x:n.x,y:n.y}}switch(So(t)){case"start":h[i]-=p*(r&&c?-1:1);break;case"end":h[i]+=p*(r&&c?-1:1);break}return h}const Uk=async(e,t,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:o=[],platform:i}
vendor: 9,931 bytes, line 157
157=r,a=o.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:s}),{x:d,y:f}=fm(c,n,l),p=n,h={},_=0;for(let y=0;y<a.length;y++){const{name:x,fn:g}=a[y],{x:m,y:w,data:b,reset:P}=await g({x:d,y:f,initialPlacement:n,placement:p,strategy:s,middlewareData:h,rects:c,platform:i,elements:{reference:e,floating:t}});d=m??d,f=w??f,h={...h,[x]:{...h[x],...b}},P&&_<=50&&(_++,typeof P=="object"&&(P.placement&&(p=P.placement),P.rects&&(c=P.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:s}):P.rects),{x:d,y:f}=fm(c,p,l)),y=-1)}return{x:d,y:f,placement:p,strategy:s,middlewareData:h}};async function Pi(e,t){var r;t===void 0&&(t={});const{x:n,y:s,platform:o,rects:i,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:p=!1,padding:h=0}=Rr(t,e),_=G0(h),x=a[p?f==="floating"?"reference":"floating":f],g=bl(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(x)))==null||r?x:x.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),m=f==="floating"?{x:n,y:s,width:i.floating.width,height:i.floating.height}:i.reference,w=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),b=await(o.isElement==null?void 0:o.isElement(w))?await(o.getScale==null?void 0:o.getScale(w))||{x:1,y:1}:{x:1,y:1},P=bl(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:m,offsetParent:w,strategy:l}):m);return{top:(g.top-P.top+_.top)/b.y,bottom:(P.bottom-g.bottom+_.bottom)/b.y,left:(g.left-P.left+_.left)/b.x,right:(P.right-g.right+_.right)/b.x}}const Fk=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:s,rects:o,platform:i,elements:a,middlewareData:l}=t,{element:c,padding:d=0}=Rr(e,t)||{};if(c==null)return{};const f=G0(d),p={x:r,y:n},h=uf(s),_=lf(h),y=await i.getDimensions(c),x=h==="y",g=x?"top":"left",m=x?"bottom":"right",w=x?"clientHeight":"clientWidth",b=o.reference[_]+o.reference[h]-p[h]-o.floating[_],P=p[h]-o.reference[h],T=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c));let R=T?T[w]:0;(!R||!await(i.isElement==null?void 0:i.isElement(T)))&&(R=a.floating[w]||o.floating[_]);const O=b/2-P/2,$=R/2-y[_]/2-1,C=xn(f[g],$),D=xn(f[m],$),N=C,B=R-y[_]-D,M=R/2-y[_]/2+O,Q=md(N,M,B),L=!l.arrow&&So(s)!=null&&M!==Q&&o.reference[_]/2-(M<N?C:D)-y[_]/2<0,z=L?M<N?M-N:M-B:0;return{[h]:p[h]+z,data:{[h]:Q,centerOffset:M-Q-z,...L&&{alignmentOffset:z}},reset:L}}}),Vk=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:s,middlewareData:o,rects:i,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:_="none",flipAlignment:y=!0,...x}=Rr(e,t);if((r=o.arrow)!=null&&r.alignmentOffset)return{};const g=Cr(s),m=ar(a),w=Cr(a)===a,b=await(l.isRTL==null?void 0:l.isRTL(c.floating)),P=p||(w||!y?[xl(a)]:Ik(a)),T=_!=="none";!p&&T&&P.push(...$k(a,y,_,b));const R=[a,...P],O=await Pi(t,x),$=[];let C=((n=o.flip)==null?void 0:n.overflows)||[];if(d&&$.push(O[g]),f){const M=Ok(s,i,b);$.push(O[M[0]],O[M[1]])}if(C=[...C,{placement:s,overflows:$}],!$.every(M=>M<=0)){var D,N;const M=(((D=o.flip)==null?void 0:D.index)||0)+1,Q=R[M];if(Q&&(!(f==="alignment"?m!==ar(Q):!1)||C.every(A=>A.overflows[0]>0&&ar(A.placement)===m)))return{data:{index:M,overflows:C},reset:{placement:Q}};let L=(N=C.filter(z=>z.overflows[0]<=0).sort((z,A)=>z.overflows[1]-A.overflows[1])[0])==null?void 0:N.placement;if(!L)switch(h){case"bestFit":{var B;const z=(B=C.filter(A=>{if(T){const I=ar(A.placement);return I===m||I==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(I=>I>0).reduce((I,W)=>I+W,0)]).sort((A,I)=>A[1]-I[1])[0])==null?void 0:B[0];z&&(L=z);break}case"initialPlacement":L=a;break}if(s!==L)return{reset:{placement:L}}}return{}}}};function pm(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function mm(e){return jk.some(t=>e[t]>=0)}const Bk=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...s}=Rr(e,t);switch(n){case"referenceHidden":{const o=await Pi(t,{...s,elementContext:"reference"}),i=pm(o,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:mm(i)}}}case"escaped":{const o=await Pi(t,{...s,altBoundary:!0}),i=pm(o,r.floating);return{data:{escapedOffsets:i,escaped:mm(i)}}}default:return{}}}}},Q0=new Set(["left","top"]);async function zk(e,t){const{placement:r,platform:n,elements:s}=e,o=await(n.isRTL==null?void 0:n.isRTL(s.floating)),i=Cr(r),a=So(r),l=ar(r)==="y",c=Q0.has(i)?-1:1,d=o&&l?-1:1,f=Rr(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:_}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof _=="number"&&(h=a==="end"?_*-1:_),l?{x:h*d,y:p*c}:{x:p*c,y:h*d}}const Wk=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:s,y:o,placement:i,middlewareData:a}=t,l=await zk(t,e);return i===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:s+l.x,y:o+l.y,data:{...l,placement:i}}}}},Hk=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:s}=t,{mainAxis:o=!0,crossAxis:i=!1,limiter:a={fn:x=>{let{x:g,y:m}=x;return{x:g,y:m}}},...l}=Rr(e,t),c={x:r,y:n},d=await Pi(t,l),f=ar(Cr(s)),p=af(f);let h=c[p],_=c[f];if(o){const x=p==="y"?"top":"left",g=p==="y"?"bottom":"right",m=h+d[x],w=h-d[g];h=md(m,h,w)}if(i){const x=f==="y"?"top":"left",g=f==="y"?"bottom":"right",m=_+d[x],w=_-d[g];_=md(m,_,w)}const y=a.fn({...t,[p]:h,[f]:_});return{...y,data:{x:y.x-r,y:y.y-n,enabled:{[p]:o,[f]:i}}}}}},qk=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:s,rects:o,middlewareData:i}=t,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=Rr(e,t),d={x:r,y:n},f=ar(s),p=af(f);let h=d[p],_=d[f];const y=Rr(a,t),x=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(l){const w=p==="y"?"height":"width",b=o.reference[p]-o.floating[w]+x.mainAxis,P=o.reference[p]+o.reference[w]-x.mainAxis;h<b?h=b:h>P&&(h=P)}if(c){var g,m;const w=p==="y"?"width":"height",b=Q0.has(Cr(s)),P=o.reference[f]-o.floating[w]+(b&&((g=i.offset)==null?void 0:g[f])||0)+(b?0:x.crossAxis),T=o.reference[f]+o.reference[w]+(b?0:((m=i.offset)==null?void 0:m[f])||0)-(b?x.crossAxis:0);_<P?_=P:_>T&&(_=T)}return{[p]:h,[f]:_}}}},Kk=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:s,rects:o,platform:i,elements:a}=t,{apply:l=()=>{},...c}=Rr(e,t),d=await Pi(t,c),f=Cr(s),p=So(s),h=ar(s)==="y",{width:_,height:y}=o.floating;let x,g;f==="top"||f==="bottom"?(x=f,g=p===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(g=f,x=p==="end"?"top":"bottom");const m=y-d.top-d.bottom,w=_-d.left-d.right,b=xn(y-d[x],m),P=xn(_-d[g],w),T=!t.middlewareData.shift;let R=b,O=P;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(O=w),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(R=m),T&&!p){const C=gt(d.left,0),D=gt(d.right,0),N=gt(d.top,0),B=gt(d.bottom,0);h?O=_-2*(C!==0||D!==0?C+D:gt(d.left,d.right)):R=y-2*(N!==0||B!==0?N+B:gt(d.top,d.bottom))}await l({...t,availableWidth:O,availableHeight:R});const $=await i.getDimensions(a.floating);return _!==$.width||y!==$.height?{reset:{rects:!0}}:{}}}};function ru(){return typeof window<"u"}function ko(e){return J0(e)?(e.nodeName||"").toLowerCase():"#document"}function xt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function hr(e){var t;return(t=(J0(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function J0(e){return ru()?e instanceof Node||e instanceof xt(e).Node:!1}function Xt(e){return ru()?e instanceof Element||e instanceof xt(e).Element:!1}function dr(e){return ru()?e instanceof HTMLElement||e instanceof xt(e).HTMLElement:!1}function gm(e){return!ru()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof xt(e).ShadowRoot}const Gk=new Set(["inline","contents"]);function Ji(e){const{overflow:t,overflowX:r,overflowY:n,display:s}=Zt(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!Gk.has(s)}const Qk=new Set(["table","td","th"]);function Jk(e){return Qk.has(ko(e))}const Yk=[":popover-open",":modal"];function nu(e){return Yk.some(t=>{try{return e.matches(t)}catch{return!1}})}const Xk=["transform","translate","scale","rotate","perspective"],Zk=["transform","translate","scale","rotate","perspective","filter"],eP=["paint","layout","strict","content"];function cf(e){const t=df(),r=Xt(e)?Zt(e):e;return Xk.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||Zk.some(n=>(r.willChange||"").includes(n))||eP.some(n=>(r.contain||"").includes(n))}function tP(e){let t=bn(e);for(;dr(t)&&!po(t);){if(cf(t))return t;if(nu(t))return null;t=bn(t)}return null}function df(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const rP=new Set(["html","body","#document"]);function po(e){return rP.has(ko(e))}function Zt(e){return xt(e).getComputedStyle(e)}function su(e){return Xt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function bn(e){if(ko(e)==="html")return e;const t=e.assignedSlot||e.parentNode||gm(e)&&e.host||hr(e);return gm(t)?t.host:t}function Y0(e){const t=bn(e);return po(t)?e.ownerDocument?e.ownerDocument.body:e.body:dr(t)&&Ji(t)?t:Y0(t)}function Ti(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const s=Y0(e),o=s===((n=e.ownerDocument)==null?void 0:n.body),i=xt(s);if(o){const a=vd(i);
vendor: 4,772 bytes, line 157
157return t.concat(i,i.visualViewport||[],Ji(s)?s:[],a&&r?Ti(a):[])}return t.concat(s,Ti(s,[],r))}function vd(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function X0(e){const t=Zt(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const s=dr(e),o=s?e.offsetWidth:r,i=s?e.offsetHeight:n,a=_l(r)!==o||_l(n)!==i;return a&&(r=o,n=i),{width:r,height:n,$:a}}function hf(e){return Xt(e)?e:e.contextElement}function Ws(e){const t=hf(e);if(!dr(t))return cr(1);const r=t.getBoundingClientRect(),{width:n,height:s,$:o}=X0(t);let i=(o?_l(r.width):r.width)/n,a=(o?_l(r.height):r.height)/s;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const nP=cr(0);function Z0(e){const t=xt(e);return!df()||!t.visualViewport?nP:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function sP(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==xt(e)?!1:t}function os(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect(),o=hf(e);let i=cr(1);t&&(n?Xt(n)&&(i=Ws(n)):i=Ws(e));const a=sP(o,r,n)?Z0(o):cr(0);let l=(s.left+a.x)/i.x,c=(s.top+a.y)/i.y,d=s.width/i.x,f=s.height/i.y;if(o){const p=xt(o),h=n&&Xt(n)?xt(n):n;let _=p,y=vd(_);for(;y&&n&&h!==_;){const x=Ws(y),g=y.getBoundingClientRect(),m=Zt(y),w=g.left+(y.clientLeft+parseFloat(m.paddingLeft))*x.x,b=g.top+(y.clientTop+parseFloat(m.paddingTop))*x.y;l*=x.x,c*=x.y,d*=x.x,f*=x.y,l+=w,c+=b,_=xt(y),y=vd(_)}}return bl({width:d,height:f,x:l,y:c})}function ff(e,t){const r=su(e).scrollLeft;return t?t.left+r:os(hr(e)).left+r}function ew(e,t,r){r===void 0&&(r=!1);const n=e.getBoundingClientRect(),s=n.left+t.scrollLeft-(r?0:ff(e,n)),o=n.top+t.scrollTop;return{x:s,y:o}}function oP(e){let{elements:t,rect:r,offsetParent:n,strategy:s}=e;const o=s==="fixed",i=hr(n),a=t?nu(t.floating):!1;if(n===i||a&&o)return r;let l={scrollLeft:0,scrollTop:0},c=cr(1);const d=cr(0),f=dr(n);if((f||!f&&!o)&&((ko(n)!=="body"||Ji(i))&&(l=su(n)),dr(n))){const h=os(n);c=Ws(n),d.x=h.x+n.clientLeft,d.y=h.y+n.clientTop}const p=i&&!f&&!o?ew(i,l,!0):cr(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+d.x+p.x,y:r.y*c.y-l.scrollTop*c.y+d.y+p.y}}function iP(e){return Array.from(e.getClientRects())}function aP(e){const t=hr(e),r=su(e),n=e.ownerDocument.body,s=gt(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=gt(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-r.scrollLeft+ff(e);const a=-r.scrollTop;return Zt(n).direction==="rtl"&&(i+=gt(t.clientWidth,n.clientWidth)-s),{width:s,height:o,x:i,y:a}}function lP(e,t){const r=xt(e),n=hr(e),s=r.visualViewport;let o=n.clientWidth,i=n.clientHeight,a=0,l=0;if(s){o=s.width,i=s.height;const c=df();(!c||c&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:o,height:i,x:a,y:l}}const uP=new Set(["absolute","fixed"]);function cP(e,t){const r=os(e,!0,t==="fixed"),n=r.top+e.clientTop,s=r.left+e.clientLeft,o=dr(e)?Ws(e):cr(1),i=e.clientWidth*o.x,a=e.clientHeight*o.y,l=s*o.x,c=n*o.y;return{width:i,height:a,x:l,y:c}}function vm(e,t,r){let n;if(t==="viewport")n=lP(e,r);else if(t==="document")n=aP(hr(e));else if(Xt(t))n=cP(t,r);else{const s=Z0(e);n={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return bl(n)}function tw(e,t){const r=bn(e);return r===t||!Xt(r)||po(r)?!1:Zt(r).position==="fixed"||tw(r,t)}function dP(e,t){const r=t.get(e);if(r)return r;let n=Ti(e,[],!1).filter(a=>Xt(a)&&ko(a)!=="body"),s=null;const o=Zt(e).position==="fixed";let i=o?bn(e):e;for(;Xt(i)&&!po(i);){const a=Zt(i),l=cf(i);!l&&a.position==="fixed"&&(s=null),(o?!l&&!s:!l&&a.position==="static"&&!!s&&uP.has(s.position)||Ji(i)&&!l&&tw(e,i))?n=n.filter(d=>d!==i):s=a,i=bn(i)}return t.set(e,n),n}function hP(e){let{element:t,boundary:r,rootBoundary:n,strategy:s}=e;const i=[...r==="clippingAncestors"?nu(t)?[]:dP(t,this._c):[].concat(r),n],a=i[0],l=i.reduce((c,d)=>{const f=vm(t,d,s);return c.top=gt(f.top,c.top),c.right=xn(f.right,c.right),c.bottom=xn(f.bottom,c.bottom),c.left=gt(f.left,c.left),c},vm(t,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function fP(e){const{width:t,height:r}=X0(e);return{width:t,height:r}}function pP(e,t,r){const n=dr(t),s=hr(t),o=r==="fixed",i=os(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const l=cr(0);function c(){l.x=ff(s)}if(n||!n&&!o)if((ko(t)!=="body"||Ji(s))&&(a=su(t)),n){const h=os(t,!0,o,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else s&&c();o&&!n&&s&&c();const d=s&&!n&&!o?ew(s,a):cr(0),f=i.left+a.scrollLeft-l.x-d.x,p=i.top+a.scrollTop-l.y-d.y;return{x:f,y:p,width:i.width,height:i.height}}function Xu(e){return Zt(e).position==="static"}function ym(e,t){if(!dr(e)||Zt(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return hr(e)===r&&(r=r.ownerDocument.body),r}function rw(e,t){const r=xt(e);
vendor: 9,145 bytes, line 157
157if(nu(e))return r;if(!dr(e)){let s=bn(e);for(;s&&!po(s);){if(Xt(s)&&!Xu(s))return s;s=bn(s)}return r}let n=ym(e,t);for(;n&&Jk(n)&&Xu(n);)n=ym(n,t);return n&&po(n)&&Xu(n)&&!cf(n)?r:n||tP(e)||r}const mP=async function(e){const t=this.getOffsetParent||rw,r=this.getDimensions,n=await r(e.floating);return{reference:pP(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function gP(e){return Zt(e).direction==="rtl"}const vP={convertOffsetParentRelativeRectToViewportRelativeRect:oP,getDocumentElement:hr,getClippingRect:hP,getOffsetParent:rw,getElementRects:mP,getClientRects:iP,getDimensions:fP,getScale:Ws,isElement:Xt,isRTL:gP};function nw(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function yP(e,t){let r=null,n;const s=hr(e);function o(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),o();const c=e.getBoundingClientRect(),{left:d,top:f,width:p,height:h}=c;if(a||t(),!p||!h)return;const _=Sa(f),y=Sa(s.clientWidth-(d+p)),x=Sa(s.clientHeight-(f+h)),g=Sa(d),w={rootMargin:-_+"px "+-y+"px "+-x+"px "+-g+"px",threshold:gt(0,xn(1,l))||1};let b=!0;function P(T){const R=T[0].intersectionRatio;if(R!==l){if(!b)return i();R?i(!1,R):n=setTimeout(()=>{i(!1,1e-7)},1e3)}R===1&&!nw(c,e.getBoundingClientRect())&&i(),b=!1}try{r=new IntersectionObserver(P,{...w,root:s.ownerDocument})}catch{r=new IntersectionObserver(P,w)}r.observe(e)}return i(!0),o}function wP(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=hf(e),d=s||o?[...c?Ti(c):[],...Ti(t)]:[];d.forEach(g=>{s&&g.addEventListener("scroll",r,{passive:!0}),o&&g.addEventListener("resize",r)});const f=c&&a?yP(c,r):null;let p=-1,h=null;i&&(h=new ResizeObserver(g=>{let[m]=g;m&&m.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var w;(w=h)==null||w.observe(t)})),r()}),c&&!l&&h.observe(c),h.observe(t));let _,y=l?os(e):null;l&&x();function x(){const g=os(e);y&&!nw(y,g)&&r(),y=g,_=requestAnimationFrame(x)}return r(),()=>{var g;d.forEach(m=>{s&&m.removeEventListener("scroll",r),o&&m.removeEventListener("resize",r)}),f==null||f(),(g=h)==null||g.disconnect(),h=null,l&&cancelAnimationFrame(_)}}const _P=Wk,xP=Hk,bP=Vk,EP=Kk,SP=Bk,wm=Fk,kP=qk,PP=(e,t,r)=>{const n=new Map,s={platform:vP,...r},o={...s.platform,_c:n};return Uk(e,t,{...s,platform:o})};var TP=typeof document<"u",jP=function(){},Ha=TP?v.useLayoutEffect:jP;function El(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,n,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!El(e[n],t[n]))return!1;return!0}if(s=Object.keys(e),r=s.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,s[n]))return!1;for(n=r;n--!==0;){const o=s[n];if(!(o==="_owner"&&e.$$typeof)&&!El(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function sw(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function _m(e,t){const r=sw(e);return Math.round(t*r)/r}function Zu(e){const t=v.useRef(e);return Ha(()=>{t.current=e}),t}function RP(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:o,floating:i}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[d,f]=v.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=v.useState(n);El(p,n)||h(n);const[_,y]=v.useState(null),[x,g]=v.useState(null),m=v.useCallback(A=>{A!==T.current&&(T.current=A,y(A))},[]),w=v.useCallback(A=>{A!==R.current&&(R.current=A,g(A))},[]),b=o||_,P=i||x,T=v.useRef(null),R=v.useRef(null),O=v.useRef(d),$=l!=null,C=Zu(l),D=Zu(s),N=Zu(c),B=v.useCallback(()=>{if(!T.current||!R.current)return;const A={placement:t,strategy:r,middleware:p};D.current&&(A.platform=D.current),PP(T.current,R.current,A).then(I=>{const W={...I,isPositioned:N.current!==!1};M.current&&!El(O.current,W)&&(O.current=W,Gi.flushSync(()=>{f(W)}))})},[p,t,r,D,N]);Ha(()=>{c===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,f(A=>({...A,isPositioned:!1})))},[c]);const M=v.useRef(!1);Ha(()=>(M.current=!0,()=>{M.current=!1}),[]),Ha(()=>{if(b&&(T.current=b),P&&(R.current=P),b&&P){if(C.current)return C.current(b,P,B);B()}},[b,P,B,C,$]);const Q=v.useMemo(()=>({reference:T,floating:R,setReference:m,setFloating:w}),[m,w]),L=v.useMemo(()=>({reference:b,floating:P}),[b,P]),z=v.useMemo(()=>{const A={position:r,left:0,top:0};if(!L.floating)return A;const I=_m(L.floating,d.x),W=_m(L.floating,d.y);return a?{...A,transform:"translate("+I+"px, "+W+"px)",...sw(L.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:I,top:W}},[r,a,L.floating,d.x,d.y]);return v.useMemo(()=>({...d,update:B,refs:Q,elements:L,floatingStyles:z}),[d,B,Q,L,z])}const CP=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:s}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?wm({element:n.current,padding:s}).fn(r):{}:n?wm({element:n,padding:s}).fn(r):{}}}},AP=(e,t)=>({..._P(e),options:[e,t]}),OP=(e,t)=>({...xP(e),options:[e,t]}),IP=(e,t)=>({...kP(e),options:[e,t]}),LP=(e,t)=>({...bP(e),options:[e,t]}),NP=(e,t)=>({...EP(e),options:[e,t]}),DP=(e,t)=>({...SP(e),options:[e,t]}),$P=(e,t)=>({...CP(e),options:[e,t]});var MP="Arrow",ow=v.forwardRef((e,t)=>{const{children:r,width:n=10,height:s=5,...o}=e;return u.jsx(Ae.svg,{...o,ref:t,width:n,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:u.jsx("polygon",{points:"0,0 30,0 15,10"})})});ow.displayName=MP;var UP=ow;function iw(e){const[t,r]=v.useState(void 0);return Tr(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const o=s[0];let i,a;if("borderBoxSize"in o){const l=o.borderBoxSize,c=Array.isArray(l)?l[0]:l;i=c.inlineSize,a=c.blockSize}else i=e.offsetWidth,a=e.offsetHeight;r({width:i,height:a})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var pf="Popper",[aw,lw]=bo(pf),[FP,uw]=aw(pf),cw=e=>{const{__scopePopper:t,children:r}=e,[n,s]=v.useState(null);return u.jsx(FP,{scope:t,anchor:n,onAnchorChange:s,children:r})};cw.displayName=pf;var dw="PopperAnchor",hw=v.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...s}=e,o=uw(dw,r),i=v.useRef(null),a=Ge(t,i);return v.useEffect(()=>{o.onAnchorChange((n==null?void 0:n.current)||i.current)}),n?null:u.jsx(Ae.div,{...s,ref:a})});hw.displayName=dw;var mf="PopperContent",[VP,BP]=aw(mf),fw=v.forwardRef((e,t)=>{var ue,us,Ir,Tn,Lr,cs;const{__scopePopper:r,side:n="bottom",sideOffset:s=0,align:o="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:p=!1,updatePositionStrategy:h="optimized",onPlaced:_,...y}=e,x=uw(mf,r),[g,m]=v.useState(null),w=Ge(t,Nr=>m(Nr)),[b,P]=v.useState(null),T=iw(b),R=(T==null?void 0:T.width)??0,O=(T==null?void 0:T.height)??0,$=n+(o!=="center"?"-"+o:""),C=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},D=Array.isArray(c)?c:[c],N=D.length>0,B={padding:C,boundary:D.filter(WP),altBoundary:N},{refs:M,floatingStyles:Q,placement:L,isPositioned:z,middlewareData:A}=RP({strategy:"fixed",placement:$,whileElementsMounted:(...Nr)=>wP(...Nr,{animationFrame:h==="always"}),elements:{reference:x.anchor},middleware:[AP({mainAxis:s+O,alignmentAxis:i}),l&&OP({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?IP():void 0,...B}),l&&LP({...B}),NP({...B,apply:({elements:Nr,rects:ea,availableWidth:vu,availableHeight:ta})=>{const{width:yu,height:Co}=ea.reference,ds=Nr.floating.style;ds.setProperty("--radix-popper-available-width",`${vu}px`),ds.setProperty("--radix-popper-available-height",`${ta}px`),ds.setProperty("--radix-popper-anchor-width",`${yu}px`),ds.setProperty("--radix-popper-anchor-height",`${Co}px`)}}),b&&$P({element:b,padding:a}),HP({arrowWidth:R,arrowHeight:O}),p&&DP({strategy:"referenceHidden",...B})]}),[I,W]=gw(L),Z=_n(_);Tr(()=>{z&&(Z==null||Z())},[z,Z]);const G=(ue=A.arrow)==null?void 0:ue.x,ne=(us=A.arrow)==null?void 0:us.y,ee=((Ir=A.arrow)==null?void 0:Ir.centerOffset)!==0,[be,Le]=v.useState();return Tr(()=>{g&&Le(window.getComputedStyle(g).zIndex)},[g]),u.jsx("div",{ref:M.setFloating,"data-radix-popper-content-wrapper":"",style:{...Q,transform:z?Q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:be,"--radix-popper-transform-origin":[(Tn=A.transformOrigin)==null?void 0:Tn.x,(Lr=A.transformOrigin)==null?void 0:Lr.y].join(" "),...((cs=A.hide)==null?void 0:cs.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:u.jsx(VP,{scope:r,placedSide:I,onArrowChange:P,arrowX:G,arrowY:ne,shouldHideArrow:ee,children:u.jsx(Ae.div,{"data-side":I,"data-align":W,...y,ref:w,style:{...y.style,animation:z?void 0:"none"}})})})});fw.displayName=mf;var pw="PopperArrow",zP={top:"bottom",right:"left",bottom:"top",left:"r
157ight"},mw=v.forwardRef(function(t,r){const{__scopePopper:n,...s}=t,o=BP(pw,n),i=zP[o.placedSide];return u.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:u.jsx(UP,{...s,ref:r,style:{...s.style,display:"block"}})})});mw.displayName=pw;function WP(e){return e!==null}var HP=e=>({name:"transformOrigin",options:e,fn(t){var x,g,m;const{placement:r,rects:n,middlewareData:s}=t,i=((x=s.arrow)==null?void 0:x.centerOffset)!==0,a=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[c,d]=gw(r),f={start:"0%",center:"50%",end:"100%"}[d],p=(((g=s.arrow)==null?void 0:g.x)??0)+a/2,h=(((m=s.arrow)==null?void 0:m.y)??0)+l/2;let _="",y="";return c==="bottom"?(_=i?f:`${p}px`,y=`${-l}px`):c==="top"?(_=i?f:`${p}px`,y=`${n.floating.height+l}px`):c==="right"?(_=`${-l}px`,y=i?f:`${h}px`):c==="left"&&(_=`${n.floating.width+l}px`,y=i?f:`${h}px`),{data:{x:_,y}}}});function gw(e){const[t,r="center"]=e.split("-");return[t,r]}var qP=cw,KP=hw,GP=fw,QP=mw,[ou,m2]=bo("Tooltip",[lw]),iu=lw(),vw="TooltipProvider",JP=700,yd="tooltip.open",[YP,gf]=ou(vw),yw=e=>{const{__scopeTooltip:t,delayDuration:r=JP,skipDelayDuration:n=300,disableHoverableContent:s=!1,children:o}=e,i=v.useRef(!0),a=v.useRef(!1),l=v.useRef(0);return v.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),u.jsx(YP,{scope:t,isOpenDelayedRef:i,delayDuration:r,onOpen:v.useCallback(()=>{window.clearTimeout(l.current),i.current=!1},[]),onClose:v.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.current=!0,n)},[n]),isPointerInTransitRef:a,onPointerInTransitChange:v.useCallback(c=>{a.current=c},[]),disableHoverableContent:s,children:o})};yw.displayName=vw;var ji="Tooltip",[XP,au]=ou(ji),ww=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:s,onOpenChange:o,disableHoverableContent:i,delayDuration:a}=e,l=gf(ji,e.__scopeTooltip),c=iu(t),[d,f]=v.useState(null),p=Tk(),h=v.useRef(0),_=i??l.disableHoverableContent,y=a??l.delayDuration,x=v.useRef(!1),[g,m]=ef({prop:n,defaultProp:s??!1,onChange:R=>{R?(l.onOpen(),document.dispatchEvent(new CustomEvent(yd))):l.onClose(),o==null||o(R)},caller:ji}),w=v.useMemo(()=>g?x.current?"delayed-open":"instant-open":"closed",[g]),b=v.useCallback(()=>{window.clearTimeout(h.current),h.current=0,x.current=!1,m(!0)},[m]),P=v.useCallback(()=>{window.clearTimeout(h.current),h.current=0,m(!1)},[m]),T=v.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{x.current=!0,m(!0),h.current=0},y)},[y,m]);return v.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),u.jsx(qP,{...c,children:u.jsx(XP,{scope:t,contentId:p,open:g,stateAttribute:w,trigger:d,onTriggerChange:f,onTriggerEnter:v.useCallback(()=>{l.isOpenDelayedRef.current?T():b()},[l.isOpenDelayedRef,T,b]),onTriggerLeave:v.useCallback(()=>{_?P():(window.clearTimeout(h.current),h.current=0)},[P,_]),onOpen:b,onClose:P,disableHoverableContent:_,children:r})})};ww.displayName=ji;var wd="TooltipTrigger",_w=v.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=au(wd,r),o=gf(wd,r),i=iu(r),a=v.useRef(null),l=Ge(t,a,s.onTriggerChange),c=v.useRef(!1),d=v.useRef(!1),f=v.useCallback(()=>c.current=!1,[]);return v.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),u.jsx(KP,{asChild:!0,...i,children:u.jsx(Ae.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...n,ref:l,onPointerMove:ye(e.onPointerMove,p=>{p.pointerType!=="touch"&&!d.current&&!o.isPointerInTransitRef.current&&(s.onTriggerEnter(),d.current=!0)}),onPointerLeave:ye(e.onPointerLeave,()=>{s.onTriggerLeave(),d.current=!1}),onPointerDown:ye(e.onPointerDown,()=>{s.open&&s.onClose(),c.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:ye(e.onFocus,()=>{c.current||s.onOpen()}),onBlur:ye(e.onBlur,s.onClose),onClick:ye(e.onClick,s.onClose)})})});_w.displayName=wd;var ZP="TooltipPortal",[g2,eT]=ou(ZP,{forceMount:void 0}),mo="TooltipContent",xw=v.forwardRef((e,t)=>
vendor: 4,656 bytes, line 157
157{const r=eT(mo,e.__scopeTooltip),{forceMount:n=r.forceMount,side:s="top",...o}=e,i=au(mo,e.__scopeTooltip);return u.jsx(Zh,{present:n||i.open,children:i.disableHoverableContent?u.jsx(bw,{side:s,...o,ref:t}):u.jsx(tT,{side:s,...o,ref:t})})}),tT=v.forwardRef((e,t)=>{const r=au(mo,e.__scopeTooltip),n=gf(mo,e.__scopeTooltip),s=v.useRef(null),o=Ge(t,s),[i,a]=v.useState(null),{trigger:l,onClose:c}=r,d=s.current,{onPointerInTransitChange:f}=n,p=v.useCallback(()=>{a(null),f(!1)},[f]),h=v.useCallback((_,y)=>{const x=_.currentTarget,g={x:_.clientX,y:_.clientY},m=iT(g,x.getBoundingClientRect()),w=aT(g,m),b=lT(y.getBoundingClientRect()),P=cT([...w,...b]);a(P),f(!0)},[f]);return v.useEffect(()=>()=>p(),[p]),v.useEffect(()=>{if(l&&d){const _=x=>h(x,d),y=x=>h(x,l);return l.addEventListener("pointerleave",_),d.addEventListener("pointerleave",y),()=>{l.removeEventListener("pointerleave",_),d.removeEventListener("pointerleave",y)}}},[l,d,h,p]),v.useEffect(()=>{if(i){const _=y=>{const x=y.target,g={x:y.clientX,y:y.clientY},m=(l==null?void 0:l.contains(x))||(d==null?void 0:d.contains(x)),w=!uT(g,i);m?p():w&&(p(),c())};return document.addEventListener("pointermove",_),()=>document.removeEventListener("pointermove",_)}},[l,d,i,c,p]),u.jsx(bw,{...e,ref:o})}),[rT,nT]=ou(ji,{isInside:!1}),sT=sS("TooltipContent"),bw=v.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":s,onEscapeKeyDown:o,onPointerDownOutside:i,...a}=e,l=au(mo,r),c=iu(r),{onClose:d}=l;return v.useEffect(()=>(document.addEventListener(yd,d),()=>document.removeEventListener(yd,d)),[d]),v.useEffect(()=>{if(l.trigger){const f=p=>{const h=p.target;h!=null&&h.contains(l.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,d]),u.jsx(Xh,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:u.jsxs(GP,{"data-state":l.stateAttribute,...c,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[u.jsx(sT,{children:n}),u.jsx(rT,{scope:r,isInside:!0,children:u.jsx(TS,{id:l.contentId,role:"tooltip",children:s||n})})]})})});xw.displayName=mo;var Ew="TooltipArrow",oT=v.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=iu(r);return nT(Ew,r).isInside?null:u.jsx(QP,{...s,...n,ref:t})});oT.displayName=Ew;function iT(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(r,n,s,o)){case o:return"left";case s:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function aT(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function lT(e){const{top:t,right:r,bottom:n,left:s}=e;return[{x:s,y:t},{x:r,y:t},{x:r,y:n},{x:s,y:n}]}function uT(e,t){const{x:r,y:n}=e;let s=!1;for(let o=0,i=t.length-1;o<t.length;i=o++){const a=t[o],l=t[i],c=a.x,d=a.y,f=l.x,p=l.y;d>n!=p>n&&r<(f-c)*(n-d)/(p-d)+c&&(s=!s)}return s}function cT(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),dT(t)}function dT(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const s=e[n];for(;t.length>=2;){const o=t[t.length-1],i=t[t.length-2];if((o.x-i.x)*(s.y-i.y)>=(o.y-i.y)*(s.x-i.x))t.pop();else break}t.push(s)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const s=e[n];for(;r.length>=2;){const o=r[r.length-1],i=r[r.length-2];if((o.x-i.x)*(s.y-i.y)>=(o.y-i.y)*(s.x-i.x))r.pop();else break}r.push(s)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var hT=yw,fT=ww,pT=_w,Sw=xw;const mT=hT,v2=fT,y2=pT,gT=v.forwardRef(({className:e,sideOffset:t=4,...r},n)=>u.jsx(Sw,{ref:n,sideOffset:t,className:Nt("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
157de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r}));gT.displayName=Sw.displayName;var Yi=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},is=typeof window>"u"||"Deno"in globalThis;function ut(){}function vT(e,t){return typeof e=="function"?e(t):e}function _d(e){return typeof e=="number"&&e>=0&&e!==1/0}function kw(e,t){return Math.max(e+(t||0)-Date.now(),0)}function gn(e,t){return typeof e=="function"?e(t):e}function jt(e,t){return typeof e=="function"?e(t):e}function xm(e,t){const{type:r="all",exact:n,fetchStatus:s,predicate:o,queryKey:i,stale:a}=e;if(i){if(n){if(t.queryHash!==vf(i,t.options))return!1}else if(!Ci(t.queryKey,i))return!1}if(r!=="all"){const l=t.isActive();if(r==="active"&&!l||r==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||s&&s!==t.state.fetchStatus||o&&!o(t))}function bm(e,t){const{exact:r,status:n,predicate:s,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(r){if(Ri(t.options.mutationKey)!==Ri(o))return!1}else if(!Ci(t.options.mutationKey,o))return!1}return!(n&&t.state.status!==n||s&&!s(t))}function vf(e,t){return((t==null?void 0:t.queryKeyHashFn)||Ri)(e)}function Ri(e){return JSON.stringify(e,(t,r)=>bd(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):r)}function Ci(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Ci(e[r],t[r])):!1}function Pw(e,t){if(e===t)return e;const r=Em(e)&&Em(t);if(r||bd(e)&&bd(t)){const n=r?e:Object.keys(e),s=n.length,o=r?t:Object.keys(t),i=o.length,a=r?[]:{},l=new Set(n);let c=0;for(let d=0;d<i;d++){const f=r?d:o[d];(!r&&l.has(f)||r)&&e[f]===void 0&&t[f]===void 0?(a[f]=void 0,c++):(a[f]=Pw(e[f],t[f]),a[f]===e[f]&&e[f]!==void 0&&c++)}return s===i&&c===s?e:a}return t}function xd(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function Em(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function bd(e){if(!Sm(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!Sm(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Sm(e){return Object.prototype.toString.call(e)==="[object Object]"}function yT(e){return new Promise(t=>{setTimeout(t,e)})}function Ed(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?Pw(e,t):t}function wT(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function _T(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var yf=Symbol();function Tw(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===yf?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function xT(e,t){return typeof e=="function"?e(...t):!!e}var zn,Jr,Gs,Lg,bT=(Lg=class extends Yi{constructor(){super();X(this,zn);X(this,Jr);X(this,Gs);q(this,Gs,t=>{if(!is&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){j(this,Jr)||this.setEventListener(j(this,Gs))}onUnsubscribe(){var t;this.hasListeners()||((t=j(this,Jr))==null||t.call(this),q(this,Jr,void 0))}setEventListener(t){var r;q(this,Gs,t),(r=j(this,Jr))==null||r.call(this),q(this,Jr,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){j(this,zn)!==t&&(q(this,zn,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof j(this,zn)=="boolean"?j(this,zn):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},zn=new WeakMap,Jr=new WeakMap,Gs=new WeakMap,Lg),wf=new bT,Qs,Yr,Js,Ng,ET=(Ng=class extends Yi{constructor(){super();X(this,Qs,!0);X(this,Yr);X(this,Js);q(this,Js,t=>{if(!is&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n
vendor: 4,333 bytes, line 157
157)}}})}onSubscribe(){j(this,Yr)||this.setEventListener(j(this,Js))}onUnsubscribe(){var t;this.hasListeners()||((t=j(this,Yr))==null||t.call(this),q(this,Yr,void 0))}setEventListener(t){var r;q(this,Js,t),(r=j(this,Yr))==null||r.call(this),q(this,Yr,t(this.setOnline.bind(this)))}setOnline(t){j(this,Qs)!==t&&(q(this,Qs,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return j(this,Qs)}},Qs=new WeakMap,Yr=new WeakMap,Js=new WeakMap,Ng),Sl=new ET;function Sd(){let e,t;const r=new Promise((s,o)=>{e=s,t=o});r.status="pending",r.catch(()=>{});function n(s){Object.assign(r,s),delete r.resolve,delete r.reject}return r.resolve=s=>{n({status:"fulfilled",value:s}),e(s)},r.reject=s=>{n({status:"rejected",reason:s}),t(s)},r}function ST(e){return Math.min(1e3*2**e,3e4)}function jw(e){return(e??"online")==="online"?Sl.isOnline():!0}var Rw=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function ec(e){return e instanceof Rw}function Cw(e){let t=!1,r=0,n=!1,s;const o=Sd(),i=y=>{var x;n||(p(new Rw(y)),(x=e.abort)==null||x.call(e))},a=()=>{t=!0},l=()=>{t=!1},c=()=>wf.isFocused()&&(e.networkMode==="always"||Sl.isOnline())&&e.canRun(),d=()=>jw(e.networkMode)&&e.canRun(),f=y=>{var x;n||(n=!0,(x=e.onSuccess)==null||x.call(e,y),s==null||s(),o.resolve(y))},p=y=>{var x;n||(n=!0,(x=e.onError)==null||x.call(e,y),s==null||s(),o.reject(y))},h=()=>new Promise(y=>{var x;s=g=>{(n||c())&&y(g)},(x=e.onPause)==null||x.call(e)}).then(()=>{var y;s=void 0,n||(y=e.onContinue)==null||y.call(e)}),_=()=>{if(n)return;let y;const x=r===0?e.initialPromise:void 0;try{y=x??e.fn()}catch(g){y=Promise.reject(g)}Promise.resolve(y).then(f).catch(g=>{var T;if(n)return;const m=e.retry??(is?0:3),w=e.retryDelay??ST,b=typeof w=="function"?w(r,g):w,P=m===!0||typeof m=="number"&&r<m||typeof m=="function"&&m(r,g);if(t||!P){p(g);return}r++,(T=e.onFail)==null||T.call(e,r,g),yT(b).then(()=>c()?void 0:h()).then(()=>{t?p(g):_()})})};return{promise:o,cancel:i,continue:()=>(s==null||s(),o),cancelRetry:a,continueRetry:l,canStart:d,start:()=>(d()?_():h().then(_),o)}}var kT=e=>setTimeout(e,0);function PT(){let e=[],t=0,r=a=>{a()},n=a=>{a()},s=kT;const o=a=>{t?e.push(a):s(()=>{r(a)})},i=()=>{const a=e;e=[],a.length&&s(()=>{n(()=>{a.forEach(l=>{r(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||i()}return l},batchCalls:a=>(...l)=>{o(()=>{a(...l)})},schedule:o,setNotifyFunction:a=>{r=a},setBatchNotifyFunction:a=>{n=a},setScheduler:a=>{s=a}}}var He=PT(),Wn,Dg,Aw=(Dg=class{constructor(){X(this,Wn)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),_d(this.gcTime)&&q(this,Wn,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(is?1/0:5*60*1e3))}clearGcTimeout(){j(this,Wn)&&(clearTimeout(j(this,Wn)),q(this,Wn,void 0))}},Wn=new WeakMap,Dg),Ys,Hn,Tt,qn,Ye,Ui,Kn,Wt,gr,$g,TT=($g=class extends Aw{constructor(t){super();X(this,Wt);X(this,Ys);X(this,Hn);X(this,Tt);X(this,qn);X(this,Ye);X(this,Ui);X(this,Kn);q(this,Kn,!1),q(this,Ui,t.defaultOptions),this.setOptions(t.options),this.observers=[],q(this,qn,t.client),q(this,Tt,j(this,qn).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,q(this,Ys,jT(this.options)),this.state=t.state??j(this,Ys),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=j(this,Ye))==null?void 0:t.promise}setOptions(t){this.options={...j(this,Ui),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&j(this,Tt).remove(this)}setData(t,r){const n=Ed(this.state.data,t,this.options);return oe(this,Wt,gr).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){oe(this,Wt,gr).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,s;const r=(n=j(this,Ye))==null?void 0:n.promise;return(s=j(this,Ye))==null||s.cancel(t),r?r.then(ut).catch(ut):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(j(this,Ys))}isActive(){return this.observers.some(t=>jt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===yf||this.state.dataUpdateCount+this.state.errorUpdate
157Count===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>gn(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!kw(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=j(this,Ye))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=j(this,Ye))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),j(this,Tt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(j(this,Ye)&&(j(this,Kn)?j(this,Ye).cancel({revert:!0}):j(this,Ye).cancelRetry()),this.scheduleGc()),j(this,Tt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||oe(this,Wt,gr).call(this,{type:"invalidate"})}fetch(t,r){var c,d,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(j(this,Ye))return j(this,Ye).continueRetry(),j(this,Ye).promise}if(t&&this.setOptions(t),!this.options.queryFn){const p=this.observers.find(h=>h.options.queryFn);p&&this.setOptions(p.options)}const n=new AbortController,s=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>(q(this,Kn,!0),n.signal)})},o=()=>{const p=Tw(this.options,r),_=(()=>{const y={client:j(this,qn),queryKey:this.queryKey,meta:this.meta};return s(y),y})();return q(this,Kn,!1),this.options.persister?this.options.persister(p,_,this):p(_)},a=(()=>{const p={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:j(this,qn),state:this.state,fetchFn:o};return s(p),p})();(c=this.options.behavior)==null||c.onFetch(a,this),q(this,Hn,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=a.fetchOptions)==null?void 0:d.meta))&&oe(this,Wt,gr).call(this,{type:"fetch",meta:(f=a.fetchOptions)==null?void 0:f.meta});const l=p=>{var h,_,y,x;ec(p)&&p.silent||oe(this,Wt,gr).call(this,{type:"error",error:p}),ec(p)||((_=(h=j(this,Tt).config).onError)==null||_.call(h,p,this),(x=(y=j(this,Tt).config).onSettled)==null||x.call(y,this.state.data,p,this)),this.scheduleGc()};return q(this,Ye,Cw({initialPromise:r==null?void 0:r.initialPromise,fn:a.fetchFn,abort:n.abort.bind(n),onSuccess:p=>{var h,_,y,x;if(p===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(p)}catch(g){l(g);return}(_=(h=j(this,Tt).config).onSuccess)==null||_.call(h,p,this),(x=(y=j(this,Tt).config).onSettled)==null||x.call(y,p,this.state.error,this),this.scheduleGc()},onError:l,onFail:(p,h)=>{oe(this,Wt,gr).call(this,{type:"failed",failureCount:p,error:h})},onPause:()=>{oe(this,Wt,gr).call(this,{type:"pause"})},onContinue:()=>{oe(this,Wt,gr).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),j(this,Ye).start()}},Ys=new WeakMap,Hn=new WeakMap,Tt=new WeakMap,qn=new WeakMap,Ye=new WeakMap,Ui=new WeakMap,Kn=new WeakMap,Wt=new WeakSet,gr=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...Ow(n.data,this.options),fetchMeta:t.meta??null};case"success":return q(this,Hn,void 0),{...n,data:t.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=t.error;return ec(s)&&s.revert&&j(this,Hn)?{...j(this,Hn),fetchStatus:"idle"}
vendor: 5,095 bytes, line 157
157:{...n,error:s,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),He.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),j(this,Tt).notify({query:this,type:"updated",action:t})})},$g);function Ow(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:jw(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function jT(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var nr,Mg,RT=(Mg=class extends Yi{constructor(t={}){super();X(this,nr);this.config=t,q(this,nr,new Map)}build(t,r,n){const s=r.queryKey,o=r.queryHash??vf(s,r);let i=this.get(o);return i||(i=new TT({client:t,queryKey:s,queryHash:o,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(s)}),this.add(i)),i}add(t){j(this,nr).has(t.queryHash)||(j(this,nr).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=j(this,nr).get(t.queryHash);r&&(t.destroy(),r===t&&j(this,nr).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){He.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return j(this,nr).get(t)}getAll(){return[...j(this,nr).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>xm(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>xm(t,n)):r}notify(t){He.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){He.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){He.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},nr=new WeakMap,Mg),sr,et,Gn,or,Br,Ug,CT=(Ug=class extends Aw{constructor(t){super();X(this,or);X(this,sr);X(this,et);X(this,Gn);this.mutationId=t.mutationId,q(this,et,t.mutationCache),q(this,sr,[]),this.state=t.state||AT(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){j(this,sr).includes(t)||(j(this,sr).push(t),this.clearGcTimeout(),j(this,et).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){q(this,sr,j(this,sr).filter(r=>r!==t)),this.scheduleGc(),j(this,et).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){j(this,sr).length||(this.state.status==="pending"?this.scheduleGc():j(this,et).remove(this))}continue(){var t;return((t=j(this,Gn))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,i,a,l,c,d,f,p,h,_,y,x,g,m,w,b,P,T,R,O;const r=()=>{oe(this,or,Br).call(this,{type:"continue"})};q(this,Gn,Cw({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:($,C)=>{oe(this,or,Br).call(this,{type:"failed",failureCount:$,error:C})},onPause:()=>{oe(this,or,Br).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>j(this,et).canRun(this)}));const n=this.state.status==="pending",s=!j(this,Gn).canStart();try{if(n)r();else{oe(this,or,Br).call(this,{type:"pending",variables:t,isPaused:s}),await((i=(o=j(this,et).config).onMutate)==null?void 0:i.call(o,t,this));const C=await((l=(a=this.options).onMutate)==null?void 0:l.call(a,t));C!==this.state.context&&oe(this,or,Br).call(this,{type:"pending",context:C,variables:t,isPaused:s})}const $=await j(this,Gn).start();return await((d=(c=j(this,et).config).onSuccess)==null?void 0:d.call(c,$,t,this.state.context,this)),await((p=(f=this.options).onSuccess)==null?void 0:p.call(f,$,t,this.state.context)),await((_=(h=j(this,et).config).onSettled)==null?void 0:_.call(h,$,null,this.state.variables,this.state.context,this)),await((x=(y=this.options).onSettled)==null?void 0:x.call(y,$,null,t,this.state.context)),oe(this,or,Br).call(this,{type:"success",data:$}),$}catch($){try{throw await((m=(g=j(this,et).config).onError)==null?void 0:m.call(g,$,t,this.state.context,this)),await((b=(w=this.options).onError)==null?void 0:b.call(w,$,t,this.state.context)),await((T=(P=j(this,et).config).onSettled)==null?void 0:T.call(P,void 0,$,this.state.variables,this.state.context,this)),await((O=(R=this.options).onSettled)==null?void 0:O.call(R,void 0,$,t,this.state.context)),$}finally{oe(this,or,Br).call(this,{type:"error",error:$})}}finally{j(this,et).runNext(this)}}},sr=new WeakMap,et=new WeakMap,Gn=new WeakMap,or=new WeakSet,Br=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};
157case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),He.batch(()=>{j(this,sr).forEach(n=>{n.onMutationUpdate(t)}),j(this,et).notify({mutation:this,type:"updated",action:t})})},Ug);function AT(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var wr,Ht,Fi,Fg,OT=(Fg=class extends Yi{constructor(t={}){super();X(this,wr);X(this,Ht);X(this,Fi);this.config=t,q(this,wr,new Set),q(this,Ht,new Map),q(this,Fi,0)}build(t,r,n){const s=new CT({mutationCache:this,mutationId:++na(this,Fi)._,options:t.defaultMutationOptions(r),state:n});return this.add(s),s}add(t){j(this,wr).add(t);const r=ka(t);if(typeof r=="string"){const n=j(this,Ht).get(r);n?n.push(t):j(this,Ht).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(j(this,wr).delete(t)){const r=ka(t);if(typeof r=="string"){const n=j(this,Ht).get(r);if(n)if(n.length>1){const s=n.indexOf(t);s!==-1&&n.splice(s,1)}else n[0]===t&&j(this,Ht).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=ka(t);if(typeof r=="string"){const n=j(this,Ht).get(r),s=n==null?void 0:n.find(o=>o.state.status==="pending");return!s||s===t}else return!0}runNext(t){var n;const r=ka(t);if(typeof r=="string"){const s=(n=j(this,Ht).get(r))==null?void 0:n.find(o=>o!==t&&o.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){He.batch(()=>{j(this,wr).forEach(t=>{this.notify({type:"removed",mutation:t})}),j(this,wr).clear(),j(this,Ht).clear()})}getAll(){return Array.from(j(this,wr))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>bm(r,n))}findAll(t={}){return this.getAll().filter(r=>bm(t,r))}notify(t){He.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>
157r.state.isPaused);return He.batch(()=>Promise.all(t.map(r=>r.continue().catch(ut))))}},wr=new WeakMap,Ht=new WeakMap,Fi=new WeakMap,Fg);function ka(e){var t;return(t=e.options.scope)==null?void 0:t.id}function km(e){return{onFetch:(t,r)=>{var d,f,p,h,_;const n=t.options,s=(p=(f=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:f.fetchMore)==null?void 0:p.direction,o=((h=t.state.data)==null?void 0:h.pages)||[],i=((_=t.state.data)==null?void 0:_.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let y=!1;const x=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(t.signal.aborted?y=!0:t.signal.addEventListener("abort",()=>{y=!0}),t.signal)})},g=Tw(t.options,t.fetchOptions),m=async(w,b,P)=>{if(y)return Promise.reject();if(b==null&&w.pages.length)return Promise.resolve(w);const R=(()=>{const D={client:t.client,queryKey:t.queryKey,pageParam:b,direction:P?"backward":"forward",meta:t.options.meta};return x(D),D})(),O=await g(R),{maxPages:$}=t.options,C=P?_T:wT;return{pages:C(w.pages,O,$),pageParams:C(w.pageParams,b,$)}};if(s&&o.length){const w=s==="backward",b=w?Iw:kd,P={pages:o,pageParams:i},T=b(n,P);a=await m(P,T,w)}else{const w=e??o.length;do{const b=l===0?i[0]??n.initialPageParam:kd(n,a);if(l>0&&b==null)break;a=await m(a,b),l++}while(l<w)}return a};t.options.persister?t.fetchFn=()=>{var y,x;return(x=(y=t.options).persister)==null?void 0:x.call(y,c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=c}}}function kd(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function Iw(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}function w2(e,t){return t?kd(e,t)!=null:!1}function _2(e,t){return!t||!e.getPreviousPageParam?!1:Iw(e,t)!=null}var Te,Xr,Zr,Xs,Zs,en,eo,to,Vg,IT=(Vg=class{constructor(e={}){X(this,Te);X(this,Xr);X(this,Zr);X(this,Xs);X(this,Zs);X(this,en);X(this,eo);X(this,to);q(this,Te,e.queryCache||new RT),q(this,Xr,e.mutationCache||new OT),q(this,Zr,e.defaultOptions||{}),q(this,Xs,new Map),q(this,Zs,new Map),q(this,en,0)}mount(){na(this,en)._++,j(this,en)===1&&(q(this,eo,wf.subscribe(async e=>{e&&(await this.resumePausedMutations(),j(this,Te).onFocus())})),q(this,to,Sl.subscribe(async e=>{e&&(await this.resumePausedMutations(),j(this,Te).onOnline())})))}unmount(){var e,t;na(this,en)._--,j(this,en)===0&&((e=j(this,eo))==null||e.call(this),q(this,eo,void 0),(t=j(this,to))==null||t.call(this),q(this,to,void 0))}isFetching(e){return j(this,Te).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return j(this,Xr).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=j(this,Te).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=j(this,Te).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(gn(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return j(this,Te).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),s=j(this,Te).get(n.queryHash),o=s==null?void 0:s.state.data,i=vT(t,o);if(i!==void 0)return j(this,Te).build(this,n).setData(i,{...r,manual:!0})}setQueriesData(e,t,r){return He.batch(()=>j(this,Te).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=j(this,Te).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=j(this,Te);He.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=j(this,Te);return He.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=He.batch(()=>j(this,Te).findAll(e).map(s=>s.cancel(r)));return Promise.all(n).then(ut).catch(ut)}invalidateQueries(e,t={}){return He.batch(()=>(j(this,Te).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=He.batch(()=>j(this,Te).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let o=s.fetch(void 0,r);return r.throwOnError||(o=o.catch(ut)),s.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(n).then(ut)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=j(this,Te).build(this,t);return r.isStaleByTime(gn(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ut).catch(ut)}
vendor: 4,668 bytes, line 157
157fetchInfiniteQuery(e){return e.behavior=km(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ut).catch(ut)}ensureInfiniteQueryData(e){return e.behavior=km(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Sl.isOnline()?j(this,Xr).resumePausedMutations():Promise.resolve()}getQueryCache(){return j(this,Te)}getMutationCache(){return j(this,Xr)}getDefaultOptions(){return j(this,Zr)}setDefaultOptions(e){q(this,Zr,e)}setQueryDefaults(e,t){j(this,Xs).set(Ri(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...j(this,Xs).values()],r={};return t.forEach(n=>{Ci(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){j(this,Zs).set(Ri(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...j(this,Zs).values()],r={};return t.forEach(n=>{Ci(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...j(this,Zr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=vf(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===yf&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...j(this,Zr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){j(this,Te).clear(),j(this,Xr).clear()}},Te=new WeakMap,Xr=new WeakMap,Zr=new WeakMap,Xs=new WeakMap,Zs=new WeakMap,en=new WeakMap,eo=new WeakMap,to=new WeakMap,Vg),at,ie,Vi,tt,Qn,ro,tn,rn,Bi,no,so,Jn,Yn,nn,oo,ce,Qo,Pd,Td,jd,Rd,Cd,Ad,Od,Lw,Bg,LT=(Bg=class extends Yi{constructor(t,r){super();X(this,ce);X(this,at);X(this,ie);X(this,Vi);X(this,tt);X(this,Qn);X(this,ro);X(this,tn);X(this,rn);X(this,Bi);X(this,no);X(this,so);X(this,Jn);X(this,Yn);X(this,nn);X(this,oo,new Set);this.options=r,q(this,at,t),q(this,rn,null),q(this,tn,Sd()),this.options.experimental_prefetchInRender||j(this,tn).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(j(this,ie).addObserver(this),Pm(j(this,ie),this.options)?oe(this,ce,Qo).call(this):this.updateResult(),oe(this,ce,Rd).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Id(j(this,ie),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Id(j(this,ie),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,oe(this,ce,Cd).call(this),oe(this,ce,Ad).call(this),j(this,ie).removeObserver(this)}setOptions(t){const r=this.options,n=j(this,ie);if(this.options=j(this,at).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof jt(this.options.enabled,j(this,ie))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");oe(this,ce,Od).call(this),j(this,ie).setOptions(this.options),r._defaulted&&!xd(this.options,r)&&j(this,at).getQueryCache().notify({type:"observerOptionsUpdated",query:j(this,ie),observer:this});const s=this.hasListeners();s&&Tm(j(this,ie),n,this.options,r)&&oe(this,ce,Qo).call(this),this.updateResult(),s&&(j(this,ie)!==n||jt(this.options.enabled,j(this,ie))!==jt(r.enabled,j(this,ie))||gn(this.options.staleTime,j(this,ie))!==gn(r.staleTime,j(this,ie)))&&oe(this,ce,Pd).call(this);const o=oe(this,ce,Td).call(this);s&&(j(this,ie)!==n||jt(this.options.enabled,j(this,ie))!==jt(r.enabled,j(this,ie))||o!==j(this,nn))&&oe(this,ce,jd).call(this,o)}getOptimisticResult(t){const r=j(this,at).getQueryCache().build(j(this,at),t),n=this.createResult(r,t);return DT(this,n)&&(q(this,tt,n),q(this,ro,this.options),q(this,Qn,j(this,ie).state)),n}getCurrentResult(){return j(this,tt)}trackResult(t,r){return new Proxy(t,{get:(n,s)=>(this.trackProp(s),r==null||r(s),Reflect.get(n,s))})}trackProp(t){j(this,oo).add(t)}getCurrentQuery(){return j(this,ie)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=j(this,at).defaultQueryOptions(t),n=j(this,at).getQueryCache().build(j(this,at),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return oe(this,ce,Qo).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),j(this,tt)))}createResult(t,r){var $;const n=j(this,ie),s=this.options,o=j(this,tt),i=j(this,Qn),a=j(this,ro),c=t!==n?t.state:j(this,Vi),{state:d}=t;let f={...d},p=!1,h;
157if(r._optimisticResults){const C=this.hasListeners(),D=!C&&Pm(t,r),N=C&&Tm(t,n,r,s);(D||N)&&(f={...f,...Ow(d.data,t.options)}),r._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:_,errorUpdatedAt:y,status:x}=f;h=f.data;let g=!1;if(r.placeholderData!==void 0&&h===void 0&&x==="pending"){let C;o!=null&&o.isPlaceholderData&&r.placeholderData===(a==null?void 0:a.placeholderData)?(C=o.data,g=!0):C=typeof r.placeholderData=="function"?r.placeholderData(($=j(this,so))==null?void 0:$.state.data,j(this,so)):r.placeholderData,C!==void 0&&(x="success",h=Ed(o==null?void 0:o.data,C,r),p=!0)}if(r.select&&h!==void 0&&!g)if(o&&h===(i==null?void 0:i.data)&&r.select===j(this,Bi))h=j(this,no);else try{q(this,Bi,r.select),h=r.select(h),h=Ed(o==null?void 0:o.data,h,r),q(this,no,h),q(this,rn,null)}catch(C){q(this,rn,C)}j(this,rn)&&(_=j(this,rn),h=j(this,no),y=Date.now(),x="error");const m=f.fetchStatus==="fetching",w=x==="pending",b=x==="error",P=w&&m,T=h!==void 0,O={status:x,fetchStatus:f.fetchStatus,isPending:w,isSuccess:x==="success",isError:b,isInitialLoading:P,isLoading:P,data:h,dataUpdatedAt:f.dataUpdatedAt,error:_,errorUpdatedAt:y,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>c.dataUpdateCount||f.errorUpdateCount>c.errorUpdateCount,isFetching:m,isRefetching:m&&!w,isLoadingError:b&&!T,isPaused:f.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:b&&T,isStale:_f(t,r),refetch:this.refetch,promise:j(this,tn),isEnabled:jt(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const C=B=>{O.status==="error"?B.reject(O.error):O.data!==void 0&&B.resolve(O.data)},D=()=>{const B=q(this,tn,O.promise=Sd());C(B)},N=j(this,tn);switch(N.status){case"pending":t.queryHash===n.queryHash&&C(N);break;case"fulfilled":(O.status==="error"||O.data!==N.value)&&D();break;case"rejected":(O.status!=="error"||O.error!==N.reason)&&D();break}}return O}updateResult(){const t=j(this,tt),r=this.createResult(j(this,ie),this.options);if(q(this,Qn,j(this,ie).state),q(this,ro,this.options),j(this,Qn).data!==void 0&&q(this,so,j(this,ie)),xd(r,t))return;q(this,tt,r);const n=()=>
157{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,o=typeof s=="function"?s():s;if(o==="all"||!o&&!j(this,oo).size)return!0;const i=new Set(o??j(this,oo));return this.options.throwOnError&&i.add("error"),Object.keys(j(this,tt)).some(a=>{const l=a;return j(this,tt)[l]!==t[l]&&i.has(l)})};oe(this,ce,Lw).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&oe(this,ce,Rd).call(this)}},at=new WeakMap,ie=new WeakMap,Vi=new WeakMap,tt=new WeakMap,Qn=new WeakMap,ro=new WeakMap,tn=new WeakMap,rn=new WeakMap,Bi=new WeakMap,no=new WeakMap,so=new WeakMap,Jn=new WeakMap,Yn=new WeakMap,nn=new WeakMap,oo=new WeakMap,ce=new WeakSet,Qo=function(t){oe(this,ce,Od).call(this);let r=j(this,ie).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(ut)),r},Pd=function(){oe(this,ce,Cd).call(this);const t=gn(this.options.staleTime,j(this,ie));if(is||j(this,tt).isStale||!_d(t))return;const n=kw(j(this,tt).dataUpdatedAt,t)+1;q(this,Jn,setTimeout(()=>{j(this,tt).isStale||this.updateResult()},n))},Td=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(j(this,ie)):this.options.refetchInterval)??!1},jd=function(t){oe(this,ce,Ad).call(this),q(this,nn,t),!(is||jt(this.options.enabled,j(this,ie))===!1||!_d(j(this,nn))||j(this,nn)===0)&&q(this,Yn,setInterval(()=>{(this.options.refetchIntervalInBackground||wf.isFocused())&&oe(this,ce,Qo).call(this)},j(this,nn)))},Rd=function(){oe(this,ce,Pd).call(this),oe(this,ce,jd).call(this,oe(this,ce,Td).call(this))},Cd=function(){j(this,Jn)&&(clearTimeout(j(this,Jn)),q(this,Jn,void 0))},Ad=function(){j(this,Yn)&&(clearInterval(j(this,Yn)),q(this,Yn,void 0))},Od=function(){const t=j(this,at).getQueryCache().build(j(this,at),this.options);if(t===j(this,ie))return;const r=j(this,ie);q(this,ie,t),q(this,Vi,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},Lw=function(t){He.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(j(this,tt))}),j(this,at).getQueryCache().notify({query:j(this,ie),type:"observerResultsUpdated"})})},Bg);function NT(e,t){return jt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Pm(e,t){return NT(e,t)||e.state.data!==void 0&&Id(e,t,t.refetchOnMount)}function Id(e,t,r){if(jt(t.enabled,e)!==!1&&gn(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&_f(e,t)}return!1}function Tm(e,t,r,n){return(e!==t||jt(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&_f(e,r)}function _f(e,t){return jt(t.enabled,e)!==!1&&e.isStaleByTime(gn(t.staleTime,e))}function DT(e,t){return!xd(e.getCurrentResult(),t)}var Nw=v.createContext(void 0),Dw=e=>{const t=v.useContext(Nw);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},$T=({client:e,children:t})=>(v.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),u.jsx(Nw.Provider,{value:e,children:t})),$w=v.createContext(!1),MT=()=>v.useContext($w);$w.Provider;function UT(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var FT=v.createContext(UT()),VT=()=>v.useContext(FT),BT=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},zT=e=>{v.useEffect(()=>{e.clearReset()},[e])},WT=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(s&&e.data===void 0||xT(r,[e.error,n])),HT=e=>{if(e.suspense){const t=n=>n==="static"?n:Math.max(n??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...n)=>t(r(...n)):t(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},qT=(e,t)=>e.isLoading&&e.isFetching&&!t,KT=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,jm=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function GT(e,t,r){var f,p,h,_,y;const n=MT(),s=VT(),o=Dw(),i=o.defaultQueryOptions(e);(p=(f=o.getDefaultOptions().queries)==null?void 0:f._experimental_beforeQuery)==null||p.call(f,i),i._optimisticResults=n?"isRestoring":"optimistic",HT(i),BT(i,s),zT(s);const a=!o.getQueryCache().get(i.queryHash),[l]=v.useState(()=>new t(o,i)),c=l.getOptimisticResult(i),d=!n&&e.subscribed!==!1;if(v.useSyncExternalStore(v.useCallback(x=>{const g=d?l.subscribe(He.batchCalls(x)):ut;return l.updateResult(),g},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),v.useEffect(()=>{l.setOptions(i)},[i,l]),KT(i,c))throw jm(i,l,s);if(WT({result:c,errorResetBoundary:s,throwOnError:i.throwOnError,query:o.getQueryCache().get(i.queryHash),suspense:i.suspense}))throw c.error;if((_=(h=o.getDefaultOptions().queries)==null?void 0:h._experimental_afterQuery)==null||_.call(h,i,c),i.experimental_prefetchInRender&&!is&&qT(c,n)){const x=a?jm(i,l,s):(y=o.getQueryCache().get(i.queryHash))==null?void 0:y.promise;x==null||x.catch(ut).finally(()=>{l.updateResult()})}return i.notifyOnChangeProps?c:l.trackResult(c)}function Mw(e,t){return GT(e,LT)}/** 158 * @remix-run/router v1.23.0 159 * 160 * Copyright (c) Remix Software Inc. 161 * 162 * This source code is licensed under the MIT license found in the 163 * LICENSE.md file in the root directory of this source tree. 164 * 165 * @license MIT 166 */function Ai(){return Ai=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
vendor: 5,028 bytes, line 166
166for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ai.apply(this,arguments)}var an;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(an||(an={}));const Rm="popstate";function QT(e){e===void 0&&(e={});function t(n,s){let{pathname:o,search:i,hash:a}=n.location;return Ld("",{pathname:o,search:i,hash:a},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function r(n,s){return typeof s=="string"?s:kl(s)}return YT(t,r,null,e)}function ke(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Uw(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function JT(){return Math.random().toString(36).substr(2,8)}function Cm(e,t){return{usr:e.state,key:e.key,idx:t}}function Ld(e,t,r,n){return r===void 0&&(r=null),Ai({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Po(t):t,{state:r,key:t&&t.key||n||JT()})}function kl(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function Po(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function YT(e,t,r,n){n===void 0&&(n={});let{window:s=document.defaultView,v5Compat:o=!1}=n,i=s.history,a=an.Pop,l=null,c=d();c==null&&(c=0,i.replaceState(Ai({},i.state,{idx:c}),""));function d(){return(i.state||{idx:null}).idx}function f(){a=an.Pop;let x=d(),g=x==null?null:x-c;c=x,l&&l({action:a,location:y.location,delta:g})}function p(x,g){a=an.Push;let m=Ld(y.location,x,g);c=d()+1;let w=Cm(m,c),b=y.createHref(m);try{i.pushState(w,"",b)}catch(P){if(P instanceof DOMException&&P.name==="DataCloneError")throw P;s.location.assign(b)}o&&l&&l({action:a,location:y.location,delta:1})}function h(x,g){a=an.Replace;let m=Ld(y.location,x,g);c=d();let w=Cm(m,c),b=y.createHref(m);i.replaceState(w,"",b),o&&l&&l({action:a,location:y.location,delta:0})}function _(x){let g=s.location.origin!=="null"?s.location.origin:s.location.href,m=typeof x=="string"?x:kl(x);return m=m.replace(/ $/,"%20"),ke(g,"No window.location.(origin|href) available to create URL for href: "+m),new URL(m,g)}let y={get action(){return a},get location(){return e(s,i)},listen(x){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(Rm,f),l=x,()=>{s.removeEventListener(Rm,f),l=null}},createHref(x){return t(s,x)},createURL:_,encodeLocation(x){let g=_(x);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:p,replace:h,go(x){return i.go(x)}};return y}var Am;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Am||(Am={}));function XT(e,t,r){return r===void 0&&(r="/"),ZT(e,t,r,!1)}function ZT(e,t,r,n){let s=typeof t=="string"?Po(t):t,o=go(s.pathname||"/",r);if(o==null)return null;let i=Fw(e);ej(i);let a=null;for(let l=0;a==null&&l<i.length;++l){let c=dj(o);a=uj(i[l],c,n)}return a}function Fw(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let s=(o,i,a)=>{let l={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:i,route:o};l.relativePath.startsWith("/")&&(ke(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let c=vn([n,l.relativePath]),d=r.concat(l);o.children&&o.children.length>0&&(ke(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),Fw(o.children,t,d,c)),!(o.path==null&&!o.index)&&t.push({path:c,score:aj(c,o.index),routesMeta:d})};return e.forEach((o,i)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))s(o,i);else for(let l of Vw(o.path))s(o,i,l)}),t}function Vw(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,s=r.endsWith("?"),o=r.replace(/\?$/,"");if(n.length===0)return s?[o,""]:[o];let i=Vw(n.join("/")),a=[];return a.push(...i.map(l=>l===""?o:[o,l].join("/"))),s&&a.push(...i),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function ej(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:lj(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const tj=/^:[\w-]+$/,rj=3,nj=2,sj=1,oj=10,ij=-2,Om=e=>e==="*";function aj(e,t){let r=e.split("/"),n=r.length;return r.some(Om)&&(n+=ij),t&&(n+=nj),r.filter(s=>!Om(s)).reduce((s,o)=>s+(tj.test(o)?rj:o===""?sj:oj),n)}function lj(e,t){return e.length===t.length&&e.slice(0,-1).every((n,s)=>n===t[s])?e[e.length-1]-t[t.length-1]:0}function uj(e,t,r){let{routesMeta:n}=e,s={},o="/",i=[];for(let a=0;a<n.length;++a){let l=n[a],c=a===n.length-1,d=o==="/"?t:t.slice(o.length)||"/",f=Pl({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},d),p=l.route;if(!f&&c&&r&&!n[n.length-1].route.index&&(f=Pl({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},d)),!f)return null;
vendor: 9,675 bytes, lines 166-175
166Object.assign(s,f.params),i.push({params:s,pathname:vn([o,f.pathname]),pathnameBase:mj(vn([o,f.pathnameBase])),route:p}),f.pathnameBase!=="/"&&(o=vn([o,f.pathnameBase]))}return i}function Pl(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=cj(e.path,e.caseSensitive,e.end),s=t.match(r);if(!s)return null;let o=s[0],i=o.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:n.reduce((c,d,f)=>{let{paramName:p,isOptional:h}=d;if(p==="*"){let y=a[f]||"";i=o.slice(0,o.length-y.length).replace(/(.)\/+$/,"$1")}const _=a[f];return h&&!_?c[p]=void 0:c[p]=(_||"").replace(/%2F/g,"/"),c},{}),pathname:o,pathnameBase:i,pattern:e}}function cj(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),Uw(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,a,l)=>(n.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),n]}function dj(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Uw(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function go(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function hj(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:s=""}=typeof e=="string"?Po(e):e;return{pathname:r?r.startsWith("/")?r:fj(r,t):t,search:gj(n),hash:vj(s)}}function fj(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?r.length>1&&r.pop():s!=="."&&r.push(s)}),r.length>1?r.join("/"):"/"}function tc(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function pj(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function xf(e,t){let r=pj(e);return t?r.map((n,s)=>s===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function bf(e,t,r,n){n===void 0&&(n=!1);let s;typeof e=="string"?s=Po(e):(s=Ai({},e),ke(!s.pathname||!s.pathname.includes("?"),tc("?","pathname","search",s)),ke(!s.pathname||!s.pathname.includes("#"),tc("#","pathname","hash",s)),ke(!s.search||!s.search.includes("#"),tc("#","search","hash",s)));let o=e===""||s.pathname==="",i=o?"/":s.pathname,a;if(i==null)a=r;else{let f=t.length-1;if(!n&&i.startsWith("..")){let p=i.split("/");for(;p[0]==="..";)p.shift(),f-=1;s.pathname=p.join("/")}a=f>=0?t[f]:"/"}let l=hj(s,a),c=i&&i!=="/"&&i.endsWith("/"),d=(o||i===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(c||d)&&(l.pathname+="/"),l}const vn=e=>e.join("/").replace(/\/\/+/g,"/"),mj=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),gj=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,vj=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function yj(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Bw=["post","put","patch","delete"];new Set(Bw);const wj=["get",...Bw];new Set(wj);/** 167 * React Router v6.30.1 168 * 169 * Copyright (c) Remix Software Inc. 170 * 171 * This source code is licensed under the MIT license found in the 172 * LICENSE.md file in the root directory of this source tree. 173 * 174 * @license MIT 175 */function Oi(){return Oi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Oi.apply(this,arguments)}const lu=v.createContext(null),zw=v.createContext(null),Or=v.createContext(null),Xi=v.createContext(null),fr=v.createContext({outlet:null,matches:[],isDataRoute:!1}),Ww=v.createContext(null);function _j(e,t){let{relative:r}=t===void 0?{}:t;To()||ke(!1);let{basename:n,navigator:s}=v.useContext(Or),{hash:o,pathname:i,search:a}=cu(e,{relative:r}),l=i;return n!=="/"&&(l=i==="/"?n:vn([n,i])),s.createHref({pathname:l,search:a,hash:o})}function To(){return v.useContext(Xi)!=null}function Ve(){return To()||ke(!1),v.useContext(Xi).location}function xj(){return v.useContext(Xi).navigationType}function Hw(e){v.useContext(Or).static||v.useLayoutEffect(e)}function uu(){let{isDataRoute:e}=v.useContext(fr);return e?Dj():bj()}function bj(){To()||ke(!1);let e=v.useContext(lu),{basename:t,future:r,navigator:n}=v.useContext(Or),{matches:s}=v.useContext(fr),{pathname:o}=Ve(),i=JSON.stringify(xf(s,r.v7_relativeSplatPath)),a=v.useRef(!1);return Hw(()=>{a.current=!0}),v.useCallback(function(c,d){if(d===void 0&&(d={}),!a.current)return;if(typeof c=="number"){n.go(c);return}let f=bf(c,JSON.parse(i),o,d.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:vn([t,f.pathname])),(d.replace?n.replace:n.push)(f,d.state,d)},[t,n,i,o,e])}const Ej=v.createContext(null);function Sj(e){let t=v.useContext(fr).outlet;return t&&v.createElement(Ej.Provider,{value:e},t)}function x2(){let{matches:e}=v.useContext(fr),t=e[e.length-1];return t?t.params:{}}function cu(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=v.useContext(Or),{matches:s}=v.useContext(fr),{pathname:o}=Ve(),i=JSON.stringify(xf(s,n.v7_relativeSplatPath));return v.useMemo(()=>bf(e,JSON.parse(i),o,r==="path"),[e,i,o,r])}function kj(e,t){return Pj(e,t)}function Pj(e,t,r,n){To()||ke(!1);let{navigator:s}=v.useContext(Or),{matches:o}=v.useContext(fr),i=o[o.length-1],a=i?i.params:{};i&&i.pathname;let l=i?i.pathnameBase:"/";i&&i.route;let c=Ve(),d;if(t){var f;let x=typeof t=="string"?Po(t):t;l==="/"||(f=x.pathname)!=null&&f.startsWith(l)||ke(!1),d=x}else d=c;let p=d.pathname||"/",h=p;if(l!=="/"){let x=l.replace(/^\//,"").split("/");h="/"+p.replace(/^\//,"").split("/").slice(x.length).join("/")}let _=XT(e,{pathname:h}),y=Aj(_&&_.map(x=>Object.assign({},x,{params:Object.assign({},a,x.params),pathname:vn([l,s.encodeLocation?s.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?l:vn([l,s.encodeLocation?s.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),o,r,n);return t&&y?v.createElement(Xi.Provider,{value:{location:Oi({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:an.Pop}},y):y}function Tj(){let e=Nj(),t=yj(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},t),r?v.createElement("pre",{style:s},r):null,null)}const jj=v.createElement(Tj,null);class Rj extends v.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?v.createElement(fr.Provider,{value:this.props.routeContext},v.createElement(Ww.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Cj(e){let{routeContext:t,match:r,children:n}=e,s=v.useContext(lu);return s&&s.static&&s.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=r.route.id),v.createElement(fr.Provider,{value:t},n)}function Aj(e,t,r,n){var s;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var o;if(!r)return null;if(r.errors)e=r.matches;else if((o=n)!=null&&o.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=(s=r)==null?void 0:s.errors;if(a!=null){let d=i.findIndex(f=>f.route.id&&(a==null?void 0:a[f.route.id])!==void 0);d>=0||ke(!1),i=i.slice(0,Math.min(i.length,d+1))}let l=!1,c=-1;if(r&&n&&n.v7_partialHydration)for(let d=0;d<i.length;d++){let f=i[d];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(c=d),f.route.id){let{loaderData:p,errors:h}=r,_=f.route.loader&&p[f.route.id]===void 0&&(!h||h[f.route.id]===void 0);if(f.route.lazy||_){l=!0,c>=0?i=i.slice(0,c+1):i=[i[0]];break}}}return i.reduceRight((d,f,p)=>{let h,_=!1,y=null,x=null;r&&(h=a&&f.route.id?a[f.route.id]:void 0,y=f.route.errorElement||jj,l&&(c<0&&p===0?(_=!0,x=null):c===p&&(_=!0,x=f.route.hydrateFallbackElement||null)));let g=t.concat(i.slice(0,p+1)),m=()=>{let w;return h?w=y:_?w=x:f.route.Component?w=v.createElement(f.route.Component,null):f.route.element?w=f.route.element:w=d,v.createElement(Cj,{match:f,routeContext:{outlet:d,matches:g,isDataRoute:r!=null},children:w})};return r&&(f.route.ErrorBoundary||f.route.errorElement||p===0)?v.createElement(Rj,{location:r.location,revalidation:r.revalidation,component:y,error:h,children:m(),routeC
175ontext:{outlet:null,matches:g,isDataRoute:!0}}):m()},null)}var qw=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(qw||{}),Tl=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Tl||{});function Oj(e){let t=v.useContext(lu);return t||ke(!1),t}function Ij(e){let t=v.useContext(zw);return t||ke(!1),t}function Lj(e){let t=v.useContext(fr);return t||ke(!1),t}function Kw(e){let t=Lj(),r=t.matches[t.matches.length-1];return r.route.id||ke(!1),r.route.id}function Nj(){var e;let t=v.useContext(Ww),r=Ij(Tl.UseRouteError),n=Kw(Tl.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function Dj(){let{router:e}=Oj(qw.UseNavigateStable),t=Kw(Tl.UseNavigateStable),r=v.useRef(!1);return Hw(()=>{r.current=!0}),v.useCallback(function(s,o){o===void 0&&(o={}),r.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,Oi({fromRouteId:t},o)))},[e,t])}function $j(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function vt(e){let{to:t,replace:r,state:n,relative:s}=e;To()||ke(!1);let{future:o,static:i}=v.useContext(Or),{matches:a}=v.useContext(fr),{pathname:l}=Ve(),c=uu(),d=bf(t,xf(a,o.v7_relativeSplatPath),l,s==="path"),f=JSON.stringify(d);return v.useEffect(()=>c(JSON.parse(f),{replace:r,state:n,relative:s}),[c,f,s,r,n]),null}function b2(e){return Sj(e.context)}function E(e){ke(!1)}function Mj(e){let{basename:t="/",children:r=null,location:n,navigationType:s=an.Pop,navigator:o,static:i=!1,future:a}=e;To()&&ke(!1);let l=t.replace(/^\/*/,"/"),c=v.useMemo(()=>({basename:l,navigator:o,static:i,future:Oi({v7_relativeSplatPath:!1},a)}),[l,a,o,i]);typeof n=="string"&&(n=Po(n));let{pathname:d="/",search:f="",hash:p="",state:h=null,key:_="default"}=n,y=v.useMemo(()=>{let x=go(d,l);return x==null?null:{location:{pathname:x,search:f,hash:p,state:h,key:_},navigationType:s}},[l,d,f,p,h,_,s]);return y==null?null:v.createElement(Or.Provider,{value:c},v.createElement(Xi.Provider,{children:r,value:y}))}function Uj(e){let{children:t,location:r}=e;return kj(Nd(t),r)}new Promise(()=>{});function Nd(e,t){t===void 0&&(t=[]);let r=[];return v.Children.forEach(e,(n,s)=>{if(!v.isValidElement(n))return;let o=[...t,s];if(n.type===v.Fragment){r.push.apply(r,Nd(n.props.children,o));return}n.type!==E&&ke(!1),!n.props.index||!n.props.children||ke(!1);let i={id:n.props.id||o.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(i.children=Nd(n.props.children,o)),r.push(i)}),r}/** 176 * React Router DOM v6.30.1 177 * 178 * Copyright (c) Remix Software Inc. 179 * 180 * This source code is licensed under the MIT license found in the 181 * LICENSE.md file in the root directory of this source tree. 182 * 183 * @license MIT 184 */function jl(){return jl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},jl.apply(this,arguments)}function Gw(e,t){if(e==null)return{};var r={},n=Object.keys(e),s,o;for(o=0;o<n.length;o++)s=n[o],!(t.indexOf(s)>=0)&&(r[s]=e[s]);return r}function Fj(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Vj(e,t){return e.button===0&&(!t||t==="_self")&&!Fj(e)}function Dd(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(s=>[r,s]):[[r,n]])},[]))}function Bj(e,t){let r=Dd(e);return t&&t.forEach((n,s)=>
184{r.has(s)||t.getAll(s).forEach(o=>{r.append(s,o)})}),r}const zj=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Wj=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],Hj="6";try{window.__reactRouterVersion=Hj}catch{}const qj=v.createContext({isTransitioning:!1}),Kj="startTransition",Im=ih[Kj];function Gj(e){let{basename:t,children:r,future:n,window:s}=e,o=v.useRef();o.current==null&&(o.current=QT({window:s,v5Compat:!0}));let i=o.current,[a,l]=v.useState({action:i.action,location:i.location}),{v7_startTransition:c}=n||{},d=v.useCallback(f=>{c&&Im?Im(()=>l(f)):l(f)},[l,c]);return v.useLayoutEffect(()=>i.listen(d),[i,d]),v.useEffect(()=>$j(n),[n]),v.createElement(Mj,{basename:t,children:r,location:a.location,navigationType:a.action,navigator:i,future:n})}const Qj=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Jj=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ii=v.forwardRef(function(t,r){let{onClick:n,relative:s,reloadDocument:o,replace:i,state:a,target:l,to:c,preventScrollReset:d,viewTransition:f}=t,p=Gw(t,zj),{basename:h}=v.useContext(Or),_,y=!1;if(typeof c=="string"&&Jj.test(c)&&(_=c,Qj))try{let w=new URL(window.location.href),b=c.startsWith("//")?new URL(w.protocol+c):new URL(c),P=go(b.pathname,h);b.origin===w.origin&&P!=null?c=P+b.search+b.hash:y=!0}catch{}let x=_j(c,{relative:s}),g=Xj(c,{replace:i,state:a,target:l,preventScrollReset:d,relative:s,viewTransition:f});function m(w){n&&n(w),w.defaultPrevented||g(w)}return v.createElement("a",jl({},p,{href:_||x,onClick:y||o?n:m,ref:r,target:l}))}),E2=v.forwardRef(function(t,r){let{"aria-current":n="page",caseSensitive:s=!1,className:o="",end:i=!1,style:a,to:l,viewTransition:c,children:d}=t,f=Gw(t,Wj),p=cu(l,{relative:f.relative}),h=Ve(),_=v.useContext(zw),{navigator:y,basename:x}=v.useContext(Or),g=_!=null&&Zj(p)&&c===!0,m=y.encodeLocation?y.encodeLocation(p).pathname:p.pathname,w=h.pathname,b=_&&_.navigation&&_.navigation.location?_.navigation.location.pathname:null;s||(w=w.toLowerCase(),b=b?b.toLowerCase():null,m=m.toLowerCase()),b&&x&&(b=go(b,x)||b);const P=m!=="/"&&m.endsWith("/")?m.length-1:m.length;let T=w===m||!i&&w.startsWith(m)&&w.charAt(P)==="/",R=b!=null&&(b===m||!i&&b.startsWith(m)&&b.charAt(m.length)==="/"),O={isActive:T,isPending:R,isTransitioning:g},$=T?n:void 0,C;typeof o=="function"?C=o(O):C=[o,T?"active":null,R?"pending":null,g?"transitioning":null].filter(Boolean).join(" ");let D=typeof a=="function"?a(O):a;return v.createElement(Ii,jl({},f,{"aria-current":$,className:C,ref:r,style:D,to:l,viewTransition:c}),typeof d=="function"?d(O):d)});var $d;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})($d||($d={}));var Lm;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Lm||(Lm={}));function Yj(e){let t=v.useContext(lu);return t||ke(!1),t}function Xj(e,t){let{target:r,replace:n,state:s,preventScrollReset:o,relative:i,viewTransition:a}=t===void 0?{}:t,l=uu(),c=Ve(),d=cu(e,{relative:i});return v.useCallback(f=>{if(Vj(f,r)){f.preventDefault();let p=n!==void 0?n:kl(c)===kl(d);l(e,{replace:p,state:s,preventScrollReset:o,relative:i,viewTransition:a})}},[c,l,d,n,s,r,e,o,i,a])}function S2(e){let t=v.useRef(Dd(e)),r=v.useRef(!1),n=Ve(),s=v.useMemo(()=>Bj(n.search,r.current?null:t.current),[n.search]),o=uu(),i=v.useCallback((a,l)=>{const c=Dd(typeof a=="function"?a(s):a);r.current=!0,o("?"+c,l)},[o,s]);return[s,i]}function Zj(e,t){t===void 0&&(t={});let r=v.useContext(qj);r==null&&ke(!1);let{basename:n}=Yj($d.useViewTransitionState),s=cu(e,{relative:t.relative});if(!r.isTransitioning)return!1;let o=go(r.currentLocation.pathname,n)||r.currentLocation.pathname,i=go(r.nextLocation.pathname,n)||r.nextLocation.pathname;return Pl(s.pathname,i)!=null||Pl(s.pathname,o)!=null}var Nm=function(){return Nm=Object.assign||function(t){for(var r,n=1,s=arguments.length;n<s;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},Nm.apply(this,arguments)};function du(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(e);s<n.length;s++)t.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(r[n[s]]=e[n[s]]);return r}function eR(e,t,r,n){function s(o){return o instanceof r?o:new r(function(i){i(o)})}return new(r||(r=Promise))(function(o,i){function a(d){try{c(n.next(d))}catch(f){i(f)}}function l(d){try{c(n.throw(d))}catch(f){i(f)}}function c(d){d.done?o(d.value):s(d.value).then(a,l)}c((n=n.apply(e,t||[])).next())})}function k2(e,t,r){if(r||arguments.length===2)for(var n=0,s=t.length,o;n<s;
184n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}const tR=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);class hu extends Error{constructor(t,r="FunctionsError",n){super(t),this.name=r,this.context=n}}class Qw extends hu{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class Md extends hu{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class Ud extends hu{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var Rl;(function(e){e.Any="any",e.ApNortheast1="ap-northeast-1",e.ApNortheast2="ap-northeast-2",e.ApSouth1="ap-south-1",e.ApSoutheast1="ap-southeast-1",e.ApSoutheast2="ap-southeast-2",e.CaCentral1="ca-central-1",e.EuCentral1="eu-central-1",e.EuWest1="eu-west-1",e.EuWest2="eu-west-2",e.EuWest3="eu-west-3",e.SaEast1="sa-east-1",e.UsEast1="us-east-1",e.UsWest1="us-west-1",e.UsWest2="us-west-2"})(Rl||(Rl={}));class rR{constructor(t,{headers:r={},customFetch:n,region:s=Rl.Any}={}){this.url=t,this.headers=r,this.region=s,this.fetch=tR(n)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return eR(this,arguments,void 0,function*(r,n={}){var s;let o,i;try{const{headers:a,method:l,body:c,signal:d,timeout:f}=n;let p={},{region:h}=n;h||(h=this.region);const _=new URL(`${this.url}/${r}`);h&&h!=="any"&&(p["x-region"]=h,_.searchParams.set("forceFunctionRegion",h));let y;c&&(a&&!Object.prototype.hasOwnProperty.call(a,"Content-Type")||!a)?typeof Blob<"u"&&c instanceof Blob||c instanceof ArrayBuffer?(p["Content-Type"]="application/octet-stream",y=c):typeof c=="string"?(p["Content-Type"]="text/plain",y=c):typeof FormData<"u"&&c instanceof FormData?y=c:(p["Content-Type"]="application/json",y=JSON.stringify(c)):c&&typeof c!="string"&&!(typeof Blob<"u"&&c instanceof Blob)&&!(c instanceof ArrayBuffer)&&!(typeof FormData<"u"&&c instanceof FormData)?y=JSON.stringify(c):y=c;let x=d;f&&(i=new AbortController,o=setTimeout(()=>i.abort(),f),d?(x=i.signal,d.addEventListener("abort",()=>i.abort())):x=i.signal);const g=yield this.fetch(_.toString(),{method:l||"POST",headers:Object.assign(Object.assign(Object.assign({},p),this.headers),a),body:y,signal:x}).catch(P=>{throw new Qw(P)}),m=g.headers.get("x-relay-error");if(m&&m==="true")throw new Md(g);if(!g.ok)throw new Ud(g);let w=((s=g.headers.get("Content-Type"))!==null&&s!==void 0?s:"text/plain").split(";")[0].trim(),b;return w==="application/json"?b=yield g.json():w==="application/octet-stream"||w==="application/pdf"?b=yield g.blob():w==="text/event-stream"?b=g:w==="multipart/form-data"?b=yield g.formData():b=yield g.text(),{data:b,error:null,response:g}}catch(a){return{data:null,error:a,response:a instanceof Ud||a instanceof Md?a.context:void 0}}finally{o&&clearTimeout(o)}})}}var Jw=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.co
184de=e.code}},nR=class{constructor(e){var t,r,n;this.shouldThrowOnError=!1,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=(t=e.shouldThrowOnError)!==null&&t!==void 0?t:!1,this.signal=e.signal,this.isMaybeSingle=(r=e.isMaybeSingle)!==null&&r!==void 0?r:!1,this.urlLengthLimit=(n=e.urlLengthLimit)!==null&&n!==void 0?n:8e3,e.fetch?this.fetch=e.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}then(e,t){var r=this;this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json");const n=this.fetch;let s=n(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async o=>{let i=null,a=null,l=null,c=o.status,d=o.statusText;if(o.ok){var f,p;if(r.method!=="HEAD"){var h;const g=await o.text();g===""||(r.headers.get("Accept")==="text/csv"||r.headers.get("Accept")&&(!((h=r.headers.get("Accept"))===null||h===void 0)&&h.includes("application/vnd.pgrst.plan+text"))?a=g:a=JSON.parse(g))}const y=(f=r.headers.get("Prefer"))===null||f===void 0?void 0:f.match(/count=(exact|planned|estimated)/),x=(p=o.headers.get("content-range"))===null||p===void 0?void 0:p.split("/");y&&x&&x.length>1&&(l=parseInt(x[1])),r.isMaybeSingle&&r.method==="GET"&&Array.isArray(a)&&(a.length>1?(i={code:"PGRST116",details:`Results contain ${a.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},a=null,l=null,c=406,d="Not Acceptable"):a.length===1?a=a[0]:a=null)}else{var _;const y=await o.text();try{i=JSON.parse(y),Array.isArray(i)&&o.status===404&&(a=[],i=null,c=200,d="OK")}catch{o.status===404&&y===""?(c=204,d="No Content"):i={message:y}}if(i&&r.isMaybeSingle&&(!(i==null||(_=i.details)===null||_===void 0)&&_.includes("0 rows"))&&(i=null,c=200,d="OK"),i&&r.shouldThrowOnError)throw new Jw(i)}return{error:i,data:a,count:l,status:c,statusText:d}});return this.shouldThrowOnError||(s=s.catch(o=>{var i;let a="",l="",c="";const d=o==null?void 0:o.cause;if(d){var f,p,h,_;const g=(f=d==null?void 0:d.message)!==null&&f!==void 0?f:"",m=(p=d==null?void 0:d.code)!==null&&p!==void 0?p:"";a=`${(h=o==null?void 0:o.name)!==null&&h!==void 0?h:"FetchError"}: ${o==null?void 0:o.message}`,a+=` 185 186Caused by: ${(_=d==null?void 0:d.name)!==null&&_!==void 0?_:"Error"}: ${g}`,m&&(a+=` (${m})`),d!=null&&d.stack&&(a+=` 187${d.stack}`)}else{var y;a=(y=o==null?void 0:o.stack)!==null&&y!==void 0?y:""}const x=this.url.toString().length;return(o==null?void 0:o.name)==="AbortError"||(o==null?void 0:o.code)==="ABORT_ERR"?(c="",l="Request was aborted (timeout or manual cancellation)",x>this.urlLengthLimit&&(l+=`. Note: Your request URL is ${x} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):((d==null?void 0:d.name)==="HeadersOverflowError"||(d==null?void 0:d.code)==="UND_ERR_HEADERS_OVERFLOW")&&(c="",l="HTTP headers exceeded server limits (typically 16KB)",x>this.urlLengthLimit&&(l+=`. Your request URL is ${x} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{error:{message:`${(i=o==null?void 0:o.name)!==null&&i!==void 0?i:"FetchError"}: ${o==null?void 0:o.message}`,details:a,hint:l,code:c},data:null,count:null,status:0,statusText:""}})),s.then(e,t)}returns(){return this}overrideTypes(){return this}},sR=class extends nR{select(e){let t=!1;const r=(e??"*").split("").map(n=>/\s/.test(n)&&!t?"":(n==='"'&&(t=!t),n)).join("");return this.url.searchParams.set("select",r),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:t=!0,nullsFirst:r,foreignTable:n,referencedTable:s=n}={}){const o=s?`${s}.order`:"order",i=this.url.searchParams.get(o);return this.url.searchParams.set(o,`${i?`${i},`:""}${e}.${t?"asc":"desc"}${r===void 0?"":r?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:r=t}={}){const n=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(n,`${e}`),this}range(e,t,{foreignTable:r,referencedTable:n=r}={}){const s=typeof n>"u"?"offset":`${n}.offset`,o=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(s,`${e}`),this.url.searchParams.set(o,`${t-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.method==="GET"?this.headers.set("Accept","application/json"):this.headers.set("Accept","application/vnd.pgrst.object+json"),this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}
187explain({analyze:e=!1,verbose:t=!1,settings:r=!1,buffers:n=!1,wal:s=!1,format:o="text"}={}){var i;const a=[e?"analyze":null,t?"verbose":null,r?"settings":null,n?"buffers":null,s?"wal":null].filter(Boolean).join("|"),l=(i=this.headers.get("Accept"))!==null&&i!==void 0?i:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${o}; for="${l}"; options=${a};`),o==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(e){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${e}`),this}};const Dm=new RegExp("[,()]");var xs=class extends sR{eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}regexMatch(e,t){return this.url.searchParams.append(e,`match.${t}`),this}regexIMatch(e,t){return this.url.searchParams.append(e,`imatch.${t}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}isDistinct(e,t){return this.url.searchParams.append(e,`isdistinct.${t}`),this}in(e,t){const r=Array.from(new Set(t)).map(n=>typeof n=="string"&&Dm.test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(e,`in.(${r})`),this}notIn(e,t){const r=Array.from(new Set(t)).map(n=>typeof n=="string"&&Dm.test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(e,`not.in.(${r})`),this}contains(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return typeof t=="string"?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:r,type:n}={}){let s="";n==="plain"?s="pl":n==="phrase"?s="ph":n==="websearch"&&(s="w");const o=r===void 0?"":`(${r})`;return this.url.searchParams.append(e,`${s}fts${o}.${t}`),this}match(e){return Object.entries(e).forEach(([t,r])=>{this.url.searchParams.append(t,`eq.${r}`)}),this}not(e,t,r){return this.url.searchParams.append(e,`not.${t}.${r}`),this}or(e,{foreignTable:t,referencedTable:r=t}={}){const n=r?`${r}.or`:"or";return this.url.searchParams.append(n,`(${e})`),this}filter(e,t,r){return this.url.searchParams.append(e,`${t}.${r}`),this}},oR=class{constructor(e,{headers:t={},schema:r,fetch:n,urlLengthLimit:s=8e3}){this.url=e,this.headers=new Headers(t),this.schema=r,this.fetch=n,this.urlLengthLimit=s}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,t){const{head:r=!1,count:n}=t??{},s=r?"HEAD":"GET";let o=!1;const i=(e??"*").split("").map(c=>/\s/.test(c)&&!o?"":(c==='"'&&(o=!o),c)).join(""),{url:a,headers:l}=this.cloneRequestState();return a.searchParams.set("select",i),n&&l.append("Prefer",`count=${n}`),new xs({method:s,url:a,headers:l,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit})}insert(e,{count:t,defaultToNull:r=!0}={}){var n;const s="POST",{url:o,headers:i}=this.cloneRequestState();if(t&&i.append("Prefer",`count=${t}`),r||i.append("Prefer","missing=default"),Array.isArray(e)){const a=e.reduce((l,c)=>l.concat(Object.keys(c)),[]);if(a.length>
1870){const l=[...new Set(a)].map(c=>`"${c}"`);o.searchParams.set("columns",l.join(","))}}return new xs({method:s,url:o,headers:i,schema:this.schema,body:e,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit})}upsert(e,{onConflict:t,ignoreDuplicates:r=!1,count:n,defaultToNull:s=!0}={}){var o;const i="POST",{url:a,headers:l}=this.cloneRequestState();if(l.append("Prefer",`resolution=${r?"ignore":"merge"}-duplicates`),t!==void 0&&a.searchParams.set("on_conflict",t),n&&l.append("Prefer",`count=${n}`),s||l.append("Prefer","missing=default"),Array.isArray(e)){const c=e.reduce((d,f)=>d.concat(Object.keys(f)),[]);if(c.length>0){const d=[...new Set(c)].map(f=>`"${f}"`);a.searchParams.set("columns",d.join(","))}}return new xs({method:i,url:a,headers:l,schema:this.schema,body:e,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch,urlLengthLimit:this.urlLengthLimit})}update(e,{count:t}={}){var r;const n="PATCH",{url:s,headers:o}=this.cloneRequestState();return t&&o.append("Prefer",`count=${t}`),new xs({method:n,url:s,headers:o,schema:this.schema,body:e,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit})}delete({count:e}={}){var t;const r="DELETE",{url:n,headers:s}=this.cloneRequestState();return e&&s.append("Prefer",`count=${e}`),new xs({method:r,url:n,headers:s,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch,urlLengthLimit:this.urlLengthLimit})}};function Li(e){"@babel/helpers - typeof";return Li=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Li(e)}function iR(e,t){if(Li(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Li(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function aR(e){var t=iR(e,"string");return Li(t)=="symbol"?t:t+""}function lR(e,t,r){return(t=aR(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $m(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Pa(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$m(Object(r),!0).forEach(function(n){lR(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$m(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var uR=class Yw{constructor(t,{headers:r={},schema:n,fetch:s,timeout:o,urlLengthLimit:i=8e3}={}){this.url=t,this.headers=new Headers(r),this.schemaName=n,this.urlLengthLimit=i;const a=s??globalThis.fetch;o!==void 0&&o>0?this.fetch=(l,c)=>{const d=new AbortController,f=setTimeout(()=>d.abort(),o),p=c==null?void 0:c.signal;if(p){if(p.aborted)return clearTimeout(f),a(l,c);const h=()=>{clearTimeout(f),d.abort()};return p.addEventListener("abort",h,{once:!0}),a(l,Pa(Pa({},c),{},{signal:d.signal})).finally(()=>{clearTimeout(f),p.removeEventListener("abort",h)})}return a(l,Pa(Pa({},c),{},{signal:d.signal})).finally(()=>clearTimeout(f))}:this.fetch=a}from(t){if(!t||typeof t!="string"||t.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new oR(new URL(`${this.url}/${t}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit})}schema(t){return new Yw(this.url,{headers:this.headers,schema:t,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit})}rpc(t,r={},{head:n=!1,get:s=!1,count:o}={}){var i;let a;const l=new URL(`${this.url}/rpc/${t}`);let c;const d=h=>h!==null&&typeof h=="object"&&(!Array.isArray(h)||h.some(d)),f=n&&Object.values(r).some(d);f?(a="POST",c=r):n||s?(a=n?"HEAD":"GET",Object.entries(r).filter(([h,_])=>_!==void 0).map(([h,_])=>[h,Array.isArray(_)?`{${_.join(",")}}`:`${_}
187`]).forEach(([h,_])=>{l.searchParams.append(h,_)})):(a="POST",c=r);const p=new Headers(this.headers);return f?p.set("Prefer",o?`count=${o},return=minimal`:"return=minimal"):o&&p.set("Prefer",`count=${o}`),new xs({method:a,url:l,headers:p,schema:this.schemaName,body:c,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch,urlLengthLimit:this.urlLengthLimit})}};class Xw{constructor(){}static detectEnvironment(){var t;if(typeof WebSocket<"u")return{type:"native",constructor:WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocket<"u")return{type:"native",constructor:globalThis.WebSocket};if(typeof global<"u"&&typeof global.WebSocket<"u")return{type:"native",constructor:global.WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&globalThis.EdgeRuntime||typeof navigator<"u"&&(!((t=navigator.userAgent)===null||t===void 0)&&t.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const r=globalThis.process;if(r){const n=r.versions;if(n&&n.node){const s=n.node,o=parseInt(s.replace(/^v/,"").split(".")[0]);return o>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${o} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${o} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option: 188import ws from "ws" 189new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const t=this.detectEnvironment();if(t.constructor)return t.constructor;let r=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(r+=` 190 191Suggested solution: ${t.workaround}`),new Error(r)}static createWebSocket(t,r){const n=this.getWebSocketConstructor();return new n(t,r)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}}const cR="2.95.3",dR=`realtime-js/${cR}`,hR="1.0.0",Zw="2.0.0",Mm=Zw,Fd=1e4,fR=1e3,pR=100;var Hr;(function(e){e[e.connecting=0]="connecting",e[e.open=1]="open",e[e.closing=2]="closing",e[e.closed=3]="closed"})(Hr||(Hr={}));var Ne;(function(e){e.closed="closed",e.errored="errored",e.joined="joined",e.joining="joining",e.leaving="leaving"})(Ne||(Ne={}));var Kt;(function(e){e.close="phx_close",e.error="phx_error",e.join="phx_join",e.reply="phx_reply",e.leave="phx_leave",e.access_token="access_token"})(Kt||(Kt={}));var Vd;(function(e){e.websocket="websocket"})(Vd||(Vd={}));var $n;(function(e){e.Connecting="connecting",e.Open="open",e.Closing="closing",e.Closed="closed"})($n||($n={}));class mR{constructor(t){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=t??[]}encode(t,r){if(t.event===this.BROADCAST_EVENT&&!(t.payload instanceof ArrayBuffer)&&typeof t.payload.event=="string")return r(this._binaryEncodeUserBroadcastPush(t));let n=[t.join_ref,t.ref,t.topic,t.event,t.payload];return r(JSON.stringify(n))}_binaryEncodeUserBroadcastPush(t){var r;return this._isArrayBuffer((r=t.payload)===null||r===void 0?void 0:r.payload)?this._encodeBinaryUserBroadcastPush(t):this._encodeJsonUserBroadcastPush(t)}_encodeBinaryUserBroadcastPush(t){var r,n;const s=(n=(r=t.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:new ArrayBuffer(0);return this._encodeUserBroadcastPush(t,this.BINARY_ENCODING,s)}_encodeJsonUserBroadcastPush(t){var r,n;const s=(n=(r=t.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:{},i=new TextEncoder().encode(JSON.stringify(s)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,i)}_encodeUserBroadcastPush(t,r,n){var s,o;const i=t.topic,a=(s=t.ref)!==null&&s!==void 0?s:"",l=(o=t.join_ref)!==null&&o!==void 0?o:"",c=t.payload.event,d=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},f=Object.keys(d).length===0?"":JSON.stringify(d);if(l.length>255)throw new Error(`joinRef length ${l.length} exceeds maximum of 255`);if(a.length>255)throw new Error(`ref length ${a.length} exceeds maximum of 255`);if(i.length>255)throw new Error(`topic length ${i.length} exceeds maximum of 255`);if(c.length>255)throw new Error(`userEvent length ${c.length} exceeds maximum of 255`);if(f.length>255)throw new Error(`metadata length ${f.length} exceeds maximum of 255`);const p=this.USER_BROADCAST_PUSH_META_LENGTH+l.length+a.length+i.length+c.length+f.length,h=new ArrayBuffer(this.HEADER_LENGTH+p);
191let _=new DataView(h),y=0;_.setUint8(y++,this.KINDS.userBroadcastPush),_.setUint8(y++,l.length),_.setUint8(y++,a.length),_.setUint8(y++,i.length),_.setUint8(y++,c.length),_.setUint8(y++,f.length),_.setUint8(y++,r),Array.from(l,g=>_.setUint8(y++,g.charCodeAt(0))),Array.from(a,g=>_.setUint8(y++,g.charCodeAt(0))),Array.from(i,g=>_.setUint8(y++,g.charCodeAt(0))),Array.from(c,g=>_.setUint8(y++,g.charCodeAt(0))),Array.from(f,g=>_.setUint8(y++,g.charCodeAt(0)));var x=new Uint8Array(h.byteLength+n.byteLength);return x.set(new Uint8Array(h),0),x.set(new Uint8Array(n),h.byteLength),x.buffer}decode(t,r){if(this._isArrayBuffer(t)){let n=this._binaryDecode(t);return r(n)}if(typeof t=="string"){const n=JSON.parse(t),[s,o,i,a,l]=n;return r({join_ref:s,ref:o,topic:i,event:a,payload:l})}return r({})}_binaryDecode(t){const r=new DataView(t),n=r.getUint8(0),s=new TextDecoder;switch(n){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(t,r,s)}}_decodeUserBroadcast(t,r,n){const s=r.getUint8(1),o=r.getUint8(2),i=r.getUint8(3),a=r.getUint8(4);let l=this.HEADER_LENGTH+4;const c=n.decode(t.slice(l,l+s));l=l+s;const d=n.decode(t.slice(l,l+o));l=l+o;const f=n.decode(t.slice(l,l+i));l=l+i;const p=t.slice(l,t.byteLength),h=a===this.JSON_ENCODING?JSON.parse(n.decode(p)):p,_={type:this.BROADCAST_EVENT,event:d,payload:h};return i>0&&(_.meta=JSON.parse(f)),{join_ref:null,ref:null,topic:c,event:this.BROADCAST_EVENT,payload:_}}_isArrayBuffer(t){var r;return t instanceof ArrayBuffer||((r=t==null?void 0:t.constructor)===null||r===void 0?void 0:r.name)==="ArrayBuffer"}_pick(t,r){return!t||typeof t!="object"?{}:Object.fromEntries(Object.entries(t).filter(([n])=>r.includes(n)))}}class e_{constructor(t,r){this.callback=t,this.timerCalc=r,this.timer=void 0,this.tries=0,this.callback=t,this.timerCalc=r}reset(){this.tries=0,clearTimeout(this.timer),this.timer=void 0}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}}var pe;(function(e){e.abstime="abstime",e.bool="bool",e.date="date",e.daterange="daterange",e.float4="float4",e.float8="float8",e.int2="int2",e.int4="int4",e.int4range="int4range",e.int8="int8",e.int8range="int8range",e.json="json",e.jsonb="jsonb",e.money="money",e.numeric="numeric",e.oid="oid",e.reltime="reltime",e.text="text",e.time="time",e.timestamp="timestamp",e.timestamptz="timestamptz",e.timetz="timetz",e.tsrange="tsrange",e.tstzrange="tstzrange"})(pe||(pe={}));const Um=(e,t,r={})=>{var n;const s=(n=r.skipTypes)!==null&&n!==void 0?n:[];return t?Object.keys(t).reduce((o,i)=>(o[i]=gR(i,e,t,s),o),{}):{}},gR=(e,t,r,n)=>{const s=t.find(a=>a.name===e),o=s==null?void 0:s.type,i=r[e];return o&&!n.includes(o)?t_(o,i):Bd(i)},t_=(e,t)=>{if(e.charAt(0)==="_"){const r=e.slice(1,e.length);return _R(t,r)}switch(e){case pe.bool:return vR(t);case pe.float4:case pe.float8:case pe.int2:case pe.int4:case pe.int8:case pe.numeric:case pe.oid:return yR(t);case pe.json:case pe.jsonb:return wR(t);case pe.timestamp:return xR(t);case pe.abstime:case pe.date:case pe.daterange:case pe.int4range:case pe.int8range:case pe.money:case pe.reltime:case pe.text:case pe.time:case pe.timestamptz:case pe.timetz:case pe.tsrange:case pe.tstzrange:return Bd(t);default:return Bd(t)}},Bd=e=>e,vR=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},yR=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},wR=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},_R=(e,t)=>{if(typeof e!="string")return e;const r=e.length-1,n=e[r];if(e[0]==="{"&&n==="}"){let o;const i=e.slice(1,r);try{o=JSON.parse("["+i+"]")}catch{o=i?i.split(","):[]}return o.map(a=>t_(t,a))}return e},xR=e=>typeof e=="string"?e.replace(" ","T"):e,r_=e=>{const t=new URL(e);return t.protocol=t.protocol.replace(/^ws/i,"http"),t.pathname=t.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),t.pathname===""||t.pathname==="/"?t.pathname="/api/broadcast":t.pathname=t.pathname+"/api/broadcast",t.href};class rc{constructor(t,r,n={},s=Fd){this.channel=t,this.event=r,this.payload=n,this.timeout=s,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHo
vendor: 4,168 bytes, line 191
191oks=[],this.refEvent=null}resend(t){this.timeout=t,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,join_ref:this.channel._joinRef()}))}updatePayload(t){this.payload=Object.assign(Object.assign({},this.payload),t)}receive(t,r){var n;return this._hasReceived(t)&&r((n=this.receivedResp)===null||n===void 0?void 0:n.response),this.recHooks.push({status:t,callback:r}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const t=r=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=r,this._matchReceive(r)};this.channel._on(this.refEvent,{},t),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(t,r){this.refEvent&&this.channel._trigger(this.refEvent,{status:t,response:r})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:t,response:r}){this.recHooks.filter(n=>n.status===t).forEach(n=>n.callback(r))}_hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}}var zd;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(zd||(zd={}));class Hs{constructor(t,r){this.channel=t,this.state={},this.pendingDiffs=[],this.joinRef=null,this.enabled=!1,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const n=(r==null?void 0:r.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(n.state,{},s=>{const{onJoin:o,onLeave:i,onSync:a}=this.caller;this.joinRef=this.channel._joinRef(),this.state=Hs.syncState(this.state,s,o,i),this.pendingDiffs.forEach(l=>{this.state=Hs.syncDiff(this.state,l,o,i)}),this.pendingDiffs=[],a()}),this.channel._on(n.diff,{},s=>{const{onJoin:o,onLeave:i,onSync:a}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(s):(this.state=Hs.syncDiff(this.state,s,o,i),a())}),this.onJoin((s,o,i)=>{this.channel._trigger("presence",{event:"join",key:s,currentPresences:o,newPresences:i})}),this.onLeave((s,o,i)=>{this.channel._trigger("presence",{event:"leave",key:s,currentPresences:o,leftPresences:i})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(t,r,n,s){const o=this.cloneDeep(t),i=this.transformState(r),a={},l={};return this.map(o,(c,d)=>{i[c]||(l[c]=d)}),this.map(i,(c,d)=>{const f=o[c];if(f){const p=d.map(x=>x.presence_ref),h=f.map(x=>x.presence_ref),_=d.filter(x=>h.indexOf(x.presence_ref)<0),y=f.filter(x=>p.indexOf(x.presence_ref)<0);_.length>0&&(a[c]=_),y.length>0&&(l[c]=y)}else a[c]=d}),this.syncDiff(o,{joins:a,leaves:l},n,s)}static syncDiff(t,r,n,s){const{joins:o,leaves:i}={joins:this.transformState(r.joins),leaves:this.transformState(r.leaves)};return n||(n=()=>{}),s||(s=()=>{}),this.map(o,(a,l)=>{var c;const d=(c=t[a])!==null&&c!==void 0?c:[];if(t[a]=this.cloneDeep(l),d.length>0){const f=t[a].map(h=>h.presence_ref),p=d.filter(h=>f.indexOf(h.presence_ref)<0);t[a].unshift(...p)}n(a,d,l)}),this.map(i,(a,l)=>{let c=t[a];if(!c)return;const d=l.map(f=>f.presence_ref);c=c.filter(f=>d.indexOf(f.presence_ref)<0),t[a]=c,s(a,c,l),c.length===0&&delete t[a]}),t}static map(t,r){return Object.getOwnPropertyNames(t).map(n=>r(n,t[n]))}static transformState(t){return t=this.cloneDeep(t),Object.getOwnPropertyNames(t).reduce((r,n)=>{const s=t[n];return"metas"in s?r[n]=s.metas.map(o=>(o.presence_ref=o.phx_ref,delete o.phx_ref,delete o.phx_ref_prev,o)):r[n]=s,r},{})}static cloneDeep(t){return JSON.parse(JSON.stringify(t))}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var Wd;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(Wd||(Wd={}));var qs;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"}
191)(qs||(qs={}));var rr;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(rr||(rr={}));class Vn{constructor(t,r={config:{}},n){var s,o;if(this.topic=t,this.params=r,this.socket=n,this.bindings={},this.state=Ne.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},r.config),this.timeout=this.socket.timeout,this.joinPush=new rc(this,Kt.join,this.params,this.timeout),this.rejoinTimer=new e_(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=Ne.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(i=>i.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=Ne.closed,this.socket._remove(this)}),this._onError(i=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,i),this.state=Ne.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=Ne.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("error",i=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,i),this.state=Ne.errored,this.rejoinTimer.scheduleTimeout())}),this._on(Kt.reply,{},(i,a)=>{this._trigger(this._replyEventName(a),i)}),this.presence=new Hs(this),this.broadcastEndpointURL=r_(this.socket.endPoint),this.private=this.params.config.private||!1,!this.private&&(!((o=(s=this.params.config)===null||s===void 0?void 0:s.broadcast)===null||o===void 0)&&o.replay))throw`tried to use replay on public channel '${this.topic}'. It must be a private channel.`}subscribe(t,r=this.timeout){var n,s,o;if(this.socket.isConnected()||this.socket.connect(),this.state==Ne.closed){const{config:{broadcast:i,presence:a,private:l}}=this.params,c=(s=(n=this.bindings.postgres_changes)===null||n===void 0?void 0:n.map(h=>h.filter))!==null&&s!==void 0?s:[],d=!!this.bindings[qs.PRESENCE]&&this.bindings[qs.PRESENCE].length>0||((o=this.params.config.presence)===null||o===void 0?void 0:o.enabled)===!0,f={},p={broadcast:i,presence:Object.assign(Object.assign({},a),{enabled:d}),postgres_changes:c,private:l};this.socket.accessTokenValue&&(f.access_token=this.socket.accessTokenValue),this._onError(h=>t==null?void 0:t(rr.CHANNEL_ERROR,h)),this._onClose(()=>t==null?void 0:t(rr.CLOSED)),this.updateJoinPayload(Object.assign({config:p},f)),this.joinedOnce=!0,this._rejoin(r),this.joinPush.receive("ok",async({postgres_changes:h})=>{var _;if(this.socket._isManualToken()||this.socket.setAuth(),h===void 0){t==null||t(rr.SUBSCRIBED);return}else{const y=this.bindings.postgres_changes,x=(_=y==null?void 0:y.length)!==null&&_!==void 0?_:0,g=[];for(let m=0;m<x;m++){const w=y[m],{filter:{event:b,schema:P,table:T,filter:R}}=w,O=h&&h[m];if(O&&O.event===b&&Vn.isFilterValueEqual(O.schema,P)&&Vn.isFilterValueEqual(O.table,T)&&Vn.isFilterValueEqual(O.filter,R))g.push(Object.assign(Object.assign({},w),{id:O.id}));else{this.unsubscribe(),this.state=Ne.errored,t==null||t(rr.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=g,t&&t(rr.SUBSCRIBED);return}}).receive("error",h=>{this.state=Ne.errored,t==null||t(rr.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(h).join(", ")||"error")))}).receive("timeout",()=>{t==null||t(rr.TIMED_OUT)})}return this}presenceState(){return this.presence.state}async track(t,r={}){return await this.send({type:"presence",event:"track",payload:t},r.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,r,n){return this.state===Ne.joined&&t===qs.PRESENCE&&(this.socket.log("channel",`resubscribe to ${this.topic} due to change in presence callbacks on joined channel`),this.unsubscribe().then(async()=>await this.subscribe())),this._on(t,r,n)}async httpSend(t,r,n={}){var s;if(r==null)return Promise.reject("Payload is required for httpSend()");const o={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(o.Authorization=`Bearer ${this.socket.accessTokenValue}`);const i={method:"POST",headers:o,body:JSON.stringify({messages:[{topic:this.subTopic,event:t,payload:r,private:this.private}]})},a=await this._fetchWithTimeout(this.broadcastEndpointURL,i,(s=n.timeout)!==null&&s!==void 0?s:this.timeout);if(a.status===202)return{success:!0};let l=a.statusText;
191try{const c=await a.json();l=c.error||c.message||l}catch{}return Promise.reject(new Error(l))}async send(t,r={}){var n,s;if(!this._canPush()&&t.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated in the future. Please use httpSend() explicitly for REST delivery.");const{event:o,payload:i}=t,a={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(a.Authorization=`Bearer ${this.socket.accessTokenValue}`);const l={method:"POST",headers:a,body:JSON.stringify({messages:[{topic:this.subTopic,event:o,payload:i,private:this.private}]})};try{const c=await this._fetchWithTimeout(this.broadcastEndpointURL,l,(n=r.timeout)!==null&&n!==void 0?n:this.timeout);return await((s=c.body)===null||s===void 0?void 0:s.cancel()),c.ok?"ok":"error"}catch(c){return c.name==="AbortError"?"timed out":"error"}}else return new Promise(o=>{var i,a,l;const c=this._push(t.type,t,r.timeout||this.timeout);t.type==="broadcast"&&!(!((l=(a=(i=this.params)===null||i===void 0?void 0:i.config)===null||a===void 0?void 0:a.broadcast)===null||l===void 0)&&l.ack)&&o("ok"),c.receive("ok",()=>o("ok")),c.receive("error",()=>o("error")),c.receive("timeout",()=>o("timed out"))})}updateJoinPayload(t){this.joinPush.updatePayload(t)}unsubscribe(t=this.timeout){this.state=Ne.leaving;const r=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(Kt.close,"leave",this._joinRef())};this.joinPush.destroy();let n=null;return new Promise(s=>{n=new rc(this,Kt.leave,{},t),n.receive("ok",()=>{r(),s("ok")}).receive("timeout",()=>{r(),s("timed out")}).receive("error",()=>{s("error")}),n.send(),this._canPush()||n.trigger("ok",{})}).finally(()=>{n==null||n.destroy()})}teardown(){this.pushBuffer.forEach(t=>t.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=Ne.closed,this.bindings={}}async _fetchWithTimeout(t,r,n){const s=new AbortController,o=setTimeout(()=>s.abort(),n),i=await this.socket.fetch(t,Object.assign(Object.assign({},r),{signal:s.signal}));return clearTimeout(o),i}_push(t,r,n=this.timeout){if(!this.joinedOnce)throw`tried to push '${t}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let s=new rc(this,t,r,n);return this._canPush()?s.send():this._addToPushBuffer(s),s}_addToPushBuffer(t){if(t.startTimeout(),this.pushBuffer.push(t),this.pushBuffer.length>pR){const r=this.pushBuffer.shift();r&&(r.destroy(),this.socket.log("channel",`discarded push due to buffer overflow: ${r.event}`,r.payload))}}_onMessage(t,r,n){return r}_isMember(t){return this.topic===t}_joinRef(){return this.joinPush.ref}_trigger(t,r,n){var s,o;const i=t.toLocaleLowerCase(),{close:a,error:l,leave:c,join:d}=Kt;if(n&&[a,l,c,d].indexOf(i)>=0&&n!==this._joinRef())return;let p=this._onMessage(i,r,n);if(r&&!p)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(i)?(s=this.bindings.postgres_changes)===null||s===void 0||s.filter(h=>{var _,y,x;return((_=h.filter)===null||_===void 0?void 0:_.event)==="*"||((x=(y=h.filter)===null||y===void 0?void 0:y.event)===null||x===void 0?void 0:x.toLocaleLowerCase())===i}).map(h=>h.callback(p,n)):(o=this.bindings[i])===null||o===void 0||o.filter(h=>{var _,y,x,g,m,w;if(["broadcast","presence","postgres_changes"].includes(i))if("id"in h){const b=h.id,P=(_=h.filter)===null||_===void 0?void 0:_.event;return b&&((y=r.ids)===null||y===void 0?void 0:y.includes(b))&&(P==="*"||(P==null?void 0:P.toLocaleLowerCase())===((x=r.data)===null||x===void 0?void 0:x.type.toLocaleLowerCase()))}else{const b=(m=(g=h==null?void 0:h.filter)===null||g===void 0?void 0:g.event)===null||m===void 0?void 0:m.toLocaleLowerCase();return b==="*"||b===((w=r==null?void 0:r.event)===null||w===void 0?void 0:w.toLocaleLowerCase())}else return h.type.toLocaleLowerCase()===i}).map(h=>{if(typeof p=="object"&&"ids"in p){const _=p.data,{schema:y,table:x,commit_timestamp:g,type:m,errors:w}=_;p=Object.assign(Object.assign({},{schema:y,table:x,commit_timestamp:g,eventType:m,new:{},old:{},errors:w}),this._getPayloadRecords(_))}h.callback(p,n)})}_isClosed(){return this.state===Ne.closed}_isJoined(){return this.state===Ne.joined}_isJoining(){return this.state===Ne.joining}_isLeaving(){return this.state===Ne.leaving}_replyEventName(t){return`chan_reply_${t}`}_on(t,r,n){const s=t.toLocaleLowerCase(),o={type:s,filter:r,callback:n};return this.bindings[s]?this.bindings[s].push(o):this.bindings[s]=[o],this}_off(t,r){const n=t.toLocaleLowerCase();return this.bindings[n]&&(this.bindings[n]=this.bindings[n].filter(s=>{var o;return!(((o=s.type)===null||o===void 0?void 0:o.toLocaleLowerCase())===n&&Vn.isEqual(s.filter,r))})),this}static isEqual(t,r){if(Object.keys(t).length!==Object.keys(r).length)return!1;for(const n in t)if(t[n]!==r[n])return!1;return!0}static isFilterValueEqual(t,r){return(t??void 0)===(r??void 0)}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(t){this._on(Kt.close,{},t)}_onError(t){this._on(Kt.error,{},r=>t(r))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(t=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=Ne.joining,this.joinPush.resend(t))}_getPayloadRecords(t){const r={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(r.new=Um(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(r.old=Um(t.columns,t.old_record)),r}}const nc=()=>{},Ta={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},bR=[1e3,2e3,5e3,1e4],ER=1e4,SR=` 192 addEventListener("message", (e) => { 193 if (e.data.event === "start") { 194 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 195 } 196 });`;class n_{constructor(t,r){var n;if(this.accessTokenValue=null,this.apiKey=null,this._manuallySetToken=!1,this.channels=new Array,this.endPoint="",this.httpEndpoint="",this.headers={},this.params={},this.timeout=Fd,this.transport=null,this.heartbeatIntervalMs=Ta.HEARTBEAT_INTERVAL,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.heartbeatCallback=nc,this.ref=0,this.reconnectTimer=null,this.vsn=Mm,this.logger=nc,this.conn=null,this.sendBuffer=[],this.serializer
196=new mR,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._connectionState="disconnected",this._wasManualDisconnect=!1,this._authPromise=null,this._heartbeatSentAt=null,this._resolveFetch=s=>s?(...o)=>s(...o):(...o)=>fetch(...o),!(!((n=r==null?void 0:r.params)===null||n===void 0)&&n.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=r.params.apikey,this.endPoint=`${t}/${Vd.websocket}`,this.httpEndpoint=r_(t),this._initializeOptions(r),this._setupReconnectionTimer(),this.fetch=this._resolveFetch(r==null?void 0:r.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.conn!==null&&this.isConnected())){if(this._setConnectionState("connecting"),this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this.transport)this.conn=new this.transport(this.endpointURL());else try{this.conn=Xw.createWebSocket(this.endpointURL())}catch(t){this._setConnectionState("disconnected");const r=t.message;throw r.includes("Node.js")?new Error(`${r} 197 198To use Realtime in Node.js, you need to provide a WebSocket implementation: 199 200Option 1: Use Node.js 22+ which has native WebSocket support 201Option 2: Install and provide the "ws" package: 202 203 npm install ws 204 205 import ws from "ws" 206 const client = new RealtimeClient(url, { 207 ...options, 208 transport: ws 209 })`):new Error(`WebSocket not available: ${r}`)}this._setupConnectionHandlers()}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:this.vsn}))}disconnect(t,r){if(!this.isDisconnecting())if(this._setConnectionState("disconnecting",!0),this.conn){const n=setTimeout(()=>{this._setConnectionState("disconnected")},100);this.conn.onclose=()=>{clearTimeout(n),this._setConnectionState("disconnected")},typeof this.conn.close=="function"&&(t?this.conn.close(t,r??""):this.conn.close()),this._teardownConnection()}else this._setConnectionState("disconnected")}getChannels(){return this.channels}async removeChannel(t){const r=await t.unsubscribe();return r==="ok"&&this._remove(t),this.channels.length===0&&this.disconnect(),r}async removeAllChannels(){const t=await Promise.all(this.channels.map(r=>r.unsubscribe()));return this.channels=[],this.disconnect(),t}log(t,r,n){this.logger(t,r,n)}connectionState(){switch(this.conn&&this.conn.readyState){case Hr.connecting:return $n.Connecting;case Hr.open:return $n.Open;case Hr.closing:return $n.Closing;default:return $n.Closed}}isConnected(){return this.connectionState()===$n.Open}isConnecting(){return this._connectionState==="connecting"}isDisconnecting(){return this._connectionState==="disconnecting"}channel(t,r={config:{}}){const n=`realtime:${t}`,s=this.getChannels().find(o=>o.topic===n);if(s)return s;{const o=new Vn(`realtime:${t}`,r,this);return this.channels.push(o),o}}push(t){const{topic:r,event:n,payload:s,ref:o}=t,i=()=>{this.encode(t,a=>{var l;(l=this.conn)===null||l===void 0||l.send(a)})};this.log("push",`${r} ${n} (${o})`,s),this.isConnected()?i():this.sendBuffer.push(i)}async setAuth(t=null){this._authPromise=this._performAuth(t);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){var t;if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(r){this.log("error","error in heartbeat callback",r)}return}if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this._heartbeatSentAt=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(r){this.log("error","error in heartbeat callback",r)}this._wasManualDisconnect=!1,(t=this.conn)===null||t===void 0||t.close(fR,"heartbeat timeout"),setTimeout(()=>{var r;this.isConnected()||(r=this.reconnectTimer)===null||r===void 0||r.sc
209heduleTimeout()},Ta.HEARTBEAT_TIMEOUT_FALLBACK);return}this._heartbeatSentAt=Date.now(),this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(r){this.log("error","error in heartbeat callback",r)}this._setAuthSafely("heartbeat")}onHeartbeat(t){this.heartbeatCallback=t}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}_makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}_leaveOpenTopic(t){let r=this.channels.find(n=>n.topic===t&&(n._isJoined()||n._isJoining()));r&&(this.log("transport",`leaving duplicate topic "${t}"`),r.unsubscribe())}_remove(t){this.channels=this.channels.filter(r=>r.topic!==t.topic)}_onConnMessage(t){this.decode(t.data,r=>{if(r.topic==="phoenix"&&r.event==="phx_reply"&&r.ref&&r.ref===this.pendingHeartbeatRef){const c=this._heartbeatSentAt?Date.now()-this._heartbeatSentAt:void 0;try{this.heartbeatCallback(r.payload.status==="ok"?"ok":"error",c)}catch(d){this.log("error","error in heartbeat callback",d)}this._heartbeatSentAt=null,this.pendingHeartbeatRef=null}const{topic:n,event:s,payload:o,ref:i}=r,a=i?`(${i})`:"",l=o.status||"";this.log("receive",`${l} ${n} ${s} ${a}`.trim(),o),this.channels.filter(c=>c._isMember(n)).forEach(c=>c._trigger(s,o,i)),this._triggerStateCallbacks("message",r)})}_clearTimer(t){var r;t==="heartbeat"&&this.heartbeatTimer?(clearInterval(this.heartbeatTimer),this.heartbeatTimer=void 0):t==="reconnect"&&((r=this.reconnectTimer)===null||r===void 0||r.reset())}_clearAllTimers(){this._clearTimer("heartbeat"),this._clearTimer("reconnect")}_setupConnectionHandlers(){this.conn&&("binaryType"in this.conn&&(this.conn.binaryType="arraybuffer"),this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=t=>this._onConnError(t),this.conn.onmessage=t=>this._onConnMessage(t),this.conn.onclose=t=>this._onConnClose(t),this.conn.readyState===Hr.open&&this._onConnOpen())}_teardownConnection(){if(this.conn){if(this.conn.readyState===Hr.open||this.conn.readyState===Hr.connecting)try{this.conn.close()}catch(t){this.log("error","Error closing connection",t)}this.conn.onopen=null,this.conn.onerror=null,this.conn.onmessage=null,this.conn.onclose=null,this.conn=null}this._clearAllTimers(),this._terminateWorker(),this.channels.forEach(t=>t.teardown())}_onConnOpen(){this._setConnectionState("connected"),this.log("transport",`connected to ${this.endpointURL()}`),(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).then(()=>{this.flushSendBuffer()}).catch(r=>{this.log("error","error waiting for auth on connect",r),this.flushSendBuffer()}),this._clearTimer("reconnect"),this.worker?this.workerRef||this._startWorkerHeartbeat():this._startHeartbeat(),this._triggerStateCallbacks("open")}_startHeartbeat(){this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),this.workerRef.onerror=r=>{this.log("worker","worker error",r.message),this._terminateWorker()},this.workerRef.onmessage=r=>{r.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_onConnClose(t){var r;this._setConnectionState("disconnected"),this.log("transport","close",t),this._triggerChanError(),this._clearTimer("heartbeat"),this._wasManualDisconnect||(r=this.reconnectTimer)===null||r===void 0||r.sc
209heduleTimeout(),this._triggerStateCallbacks("close",t)}_onConnError(t){this._setConnectionState("disconnected"),this.log("transport",`${t}`),this._triggerChanError(),this._triggerStateCallbacks("error",t);try{this.heartbeatCallback("error")}catch(r){this.log("error","error in heartbeat callback",r)}}_triggerChanError(){this.channels.forEach(t=>t._trigger(Kt.error))}_appendParams(t,r){if(Object.keys(r).length===0)return t;const n=t.match(/\?/)?"&":"?",s=new URLSearchParams(r);return`${t}${n}${s}`}_workerObjectUrl(t){let r;if(t)r=t;else{const n=new Blob([SR],{type:"application/javascript"});r=URL.createObjectURL(n)}return r}_setConnectionState(t,r=!1){this._connectionState=t,t==="connecting"?this._wasManualDisconnect=!1:t==="disconnecting"&&(this._wasManualDisconnect=r)}async _performAuth(t=null){let r,n=!1;if(t)r=t,n=!0;else if(this.accessToken)try{r=await this.accessToken()}catch(s){this.log("error","Error fetching access token from callback",s),r=this.accessTokenValue}else r=this.accessTokenValue;n?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=r&&(this.accessTokenValue=r,this.channels.forEach(s=>{const o={access_token:r,version:dR};r&&s.updateJoinPayload(o),s.joinedOnce&&s._isJoined()&&s._push(Kt.access_token,{access_token:r})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){this._isManualToken()||this.setAuth().catch(r=>{this.log("error",`Error setting auth in ${t}`,r)})}_triggerStateCallbacks(t,r){try{this.stateChangeCallbacks[t].forEach(n=>{try{n(r)}catch(s){this.log("error",`error in ${t} callback`,s)}})}catch(n){this.log("error",`error triggering ${t} callbacks`,n)}}_setupReconnectionTimer(){this.reconnectTimer=new e_(async()=>{setTimeout(async()=>{await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()},Ta.RECONNECT_DELAY)},this.reconnectAfterMs)}_initializeOptions(t){var r,n,s,o,i,a,l,c,d,f,p,h;switch(this.transport=(r=t==null?void 0:t.transport)!==null&&r!==void 0?r:null,this.timeout=(n=t==null?void 0:t.timeout)!==null&&n!==void 0?n:Fd,this.heartbeatIntervalMs=(s=t==null?void 0:t.heartbeatIntervalMs)!==null&&s!==void 0?s:Ta.HEARTBEAT_INTERVAL,this.worker=(o=t==null?void 0:t.worker)!==null&&o!==void 0?o:!1,this.accessToken=(i=t==null?void 0:t.accessToken)!==null&&i!==void 0?i:null,this.heartbeatCallback=(a=t==null?void 0:t.heartbeatCallback)!==null&&a!==void 0?a:nc,this.vsn=(l=t==null?void 0:t.vsn)!==null&&l!==void 0?l:Mm,t!=null&&t.params&&(this.params=t.params),t!=null&&t.logger&&(this.logger=t.logger),(t!=null&&t.logLevel||t!=null&&t.log_level)&&(this.logLevel=t.logLevel||t.log_level,this.params=Object.assign(Object.assign({},this.params),{log_level:this.logLevel})),this.reconnectAfterMs=(c=t==null?void 0:t.reconnectAfterMs)!==null&&c!==void 0?c:_=>bR[_-1]||ER,this.vsn){case hR:this.encode=(d=t==null?void 0:t.encode)!==null&&d!==void 0?d:(_,y)=>y(JSON.stringify(_)),this.decode=(f=t==null?void 0:t.decode)!==null&&f!==void 0?f:(_,y)=>y(JSON.parse(_));break;case Zw:this.encode=(p=t==null?void 0:t.encode)!==null&&p!==void 0?p:this.serializer.encode.bind(this.serializer),this.decode=(h=t==null?void 0:t.decode)!==null&&h!==void 0?h:this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${this.vsn}`)}if(this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t==null?void 0:t.workerUrl}}}var Ni=class extends Error{constructor(e,t){var r;super(e),this.name="IcebergError",this.status=t.status,this.icebergType=t.icebergType,this.icebergCode=t.icebergCode,this.details=t.details,this.isCommitStateUnknown=t.icebergType==="CommitStateUnknownException"||[500,502,504].includes(t.status)&&((r=t.icebergType)==null?void 0:r.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function kR(e,t,r){const n=new URL(t,e);if(r)for(const[s,o]of Object.entries(r))o!==void 0&&n.searchParams.set(s,o);return n.toString()}async function PR(e){return!e||e.type==="none"?{}:e.type==="bearer"?{Authorization:`Bearer ${e.token}`}:e.type==="header"?{[e.name]:e.value}:e.type==="custom"?await e.getHeaders():{}}function TR(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:r,path:n,query:s,body:o,headers:i}){const a=kR(e.baseUrl,n,s),l=await PR(e.auth),c=await t(a,{method:r,headers:{...o?{"Content-Type":"application/json"}:{},...l,...i},body:o?JSON.stringify(o):void 0}),d=await c.text(),f=(c.headers.get("content-type")||"").includes("application/json"),p=f&&d?JSON.parse(d):d;if(!c.ok){const h=f?p:void 0,_=h==null?void 0:h.error;throw new Ni((_==null?void 0:_.message)??`Request failed with status ${c.status}`,{status:c.status,icebergType:_==null?void 0:_.type,icebergCode:_==null?void 0:_.code,details:h})}return{status:c.status,headers:c.headers,data:p}}}}function ja(e){return e.join("�")}var jR=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:ja(e.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(n=>({namespace:n}))}async createNamespace(e,t){const r={namespace:e.namespace,properties:t==null?void 0:t.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:r})).data}async dropNamespace(e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${ja(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${ja(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${ja(e.namespace)}`}),!0}catch(t){if(t instanceof Ni&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(r){if(r instanceof Ni&&r.status===409)return;throw r}}};function gs(e){return e.join("�")}var RR=class{constructor(e,t="",r){this.client=e,this.prefix=t,this.accessDelegation=r}async listTables(e){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${gs(e.namespace)}/tables`})).data.identifiers}async createTable(e,t){const r={};return this.accessDelegation&&(r["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${gs(e.namespace)}/tables`,body:t,headers:r})).data.metadata}async updateTable(e,t){const r=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${gs(e.namespace)}/tables/${e.name}`,body:t});return{"metadata-location":r.data["metadata-location"],metadata:r.data.metadata}}async dropTable(e,t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${gs(e.namespace)}/tables/${e.name}`,query:{purgeRequested:String((t==null?void 0:t.purge)??!1)}})}async loadTable(e){const t={};return this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${gs(e.namespace)}/tables/${e.name}`,headers:t})).data.metadata}async tableExists(e){const t={};this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${gs(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(r){if(r instanceof Ni&&r.status===404)return!1;throw r}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(r){if(r instanceof Ni&&r.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw r}}},CR=class{constructor(e){var n;let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const r=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=TR({baseUrl:r,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=(n=e.accessDelegation)==null?void 0:n.join(","),this.namespaceOps=new jR(this.client,t),this.tableOps=new RR(this.client,t,this.accessDelegation)}async listNamespaces(e){return this.namespaceOps.listNamespaces(e)}async createNamespace(e,t){return this.namespaceOps.createNamespace(e,t)}async dropNamespace(e){await this.namespaceOps.dropNamespace(e)}async loadNamespaceMetadata(e){return this.namespaceOps.loadNamespaceMetadata(e)}async listTables(e){return this.tableOps.listTables(e)}
209async createTable(e,t){return this.tableOps.createTable(e,t)}async updateTable(e,t){return this.tableOps.updateTable(e,t)}async dropTable(e,t){await this.tableOps.dropTable(e,t)}async loadTable(e){return this.tableOps.loadTable(e)}async namespaceExists(e){return this.namespaceOps.namespaceExists(e)}async tableExists(e){return this.tableOps.tableExists(e)}async createNamespaceIfNotExists(e,t){return this.namespaceOps.createNamespaceIfNotExists(e,t)}async createTableIfNotExists(e,t){return this.tableOps.createTableIfNotExists(e,t)}},fu=class extends Error{constructor(e,t="storage",r,n){super(e),this.__isStorageError=!0,this.namespace=t,this.name=t==="vectors"?"StorageVectorsError":"StorageError",this.status=r,this.statusCode=n}};function pu(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var Ra=class extends fu{constructor(e,t,r,n="storage"){super(e,n,t,r),this.name=n==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=t,this.statusCode=r}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}},s_=class extends fu{constructor(e,t,r="storage"){super(e,r),this.name=r==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=t}};const AR=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),OR=e=>{if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Hd=e=>{if(Array.isArray(e))return e.map(r=>Hd(r));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([r,n])=>{const s=r.replace(/([-_][a-z])/gi,o=>o.toUpperCase().replace(/[-_]/g,""));t[s]=Hd(n)}),t},IR=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e);function Di(e){"@babel/helpers - typeof";return Di=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Di(e)}function LR(e,t){if(Di(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Di(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function NR(e){var t=LR(e,"string");return Di(t)=="symbol"?t:t+""}function DR(e,t,r){return(t=NR(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Fm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Y(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Fm(Object(r),!0).forEach(function(n){DR(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const Vm=e=>{var t;return e.msg||e.message||e.error_description||(typeof e.error=="string"?e.error:(t=e.error)===null||t===void 0?void 0:t.message)||JSON.stringify(e)},$R=async(e,t,r,n)=>{if(e&&typeof e=="object"&&"status"in e&&"ok"in e&&typeof e.status=="number"&&!(r!=null&&r.noResolveJson)){const s=e,o=s.status||500;if(typeof s.json=="function")s.json().then(i=>{const a=(i==null?void 0:i.statusCode)||(i==null?void 0:i.code)||o+"";t(new Ra(Vm(i),o,a,n))}).catch(()=>{if(n==="vectors"){const i=o+"";t(new Ra(s.statusText||`HTTP ${o} error`,o,i,n))}else{const i=o+"";t(new Ra(s.statusText||`HTTP ${o} error`,o,i,n))}});else{const i=o+"";t(new Ra(s.statusText||`HTTP ${o} error`,o,i,n))}}else t(new s_(Vm(e),e,n))},MR=(e,t,r,n)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"||e==="HEAD"||!n?Y(Y({},s),r):(OR(n)?(s.headers=Y({"Content-Type":"application/json"},t==null?void 0:t.headers),s.body=JSON.stringify(n)):s.body=n,t!=null&&t.duplex&&(s.duplex=t.duplex),Y(Y({},s),r))};async function Bo(e,t,r,n,s,o,i){return new Promise((a,l)=>
209{e(r,MR(t,n,s,o)).then(c=>{if(!c.ok)throw c;if(n!=null&&n.noResolveJson)return c;if(i==="vectors"){const d=c.headers.get("content-type");if(c.headers.get("content-length")==="0"||c.status===204)return{};if(!d||!d.includes("application/json"))return{}}return c.json()}).then(c=>a(c)).catch(c=>$R(c,l,n,i))})}function o_(e="storage"){return{get:async(t,r,n,s)=>Bo(t,"GET",r,n,s,void 0,e),post:async(t,r,n,s,o)=>Bo(t,"POST",r,s,o,n,e),put:async(t,r,n,s,o)=>Bo(t,"PUT",r,s,o,n,e),head:async(t,r,n,s)=>Bo(t,"HEAD",r,Y(Y({},n),{},{noResolveJson:!0}),s,void 0,e),remove:async(t,r,n,s,o)=>Bo(t,"DELETE",r,s,o,n,e)}}const UR=o_("storage"),{get:$i,post:zt,put:qd,head:FR,remove:Ef}=UR,yt=o_("vectors");var jo=class{constructor(e,t={},r,n="storage"){this.shouldThrowOnError=!1,this.url=e,this.headers=t,this.fetch=AR(r),this.namespace=n}throwOnError(){return this.shouldThrowOnError=!0,this}async handleOperation(e){var t=this;try{return{data:await e(),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(pu(r))return{data:null,error:r};throw r}}},VR=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t}then(e,t){return this.execute().then(e,t)}async execute(){var e=this;try{return{data:(await e.downloadFn()).body,error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(pu(t))return{data:null,error:t};throw t}}};let i_;i_=Symbol.toStringTag;var BR=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[i_]="BlobDownloadBuilder",this.promise=null}asStream(){return new VR(this.downloadFn,this.shouldThrowOnError)}then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var e=this;try{return{data:await(await e.downloadFn()).blob(),error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(pu(t))return{data:null,error:t};throw t}}};const zR={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},Bm={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var WR=class extends jo{constructor(e,t={},r,n){super(e,t,n,"storage"),this.bucketId=r}async uploadOrUpdate(e,t,r,n){var s=this;return s.handleOperation(async()=>{let o;const i=Y(Y({},Bm),n);let a=Y(Y({},s.headers),e==="POST"&&{"x-upsert":String(i.upsert)});const l=i.metadata;typeof Blob<"u"&&r instanceof Blob?(o=new FormData,o.append("cacheControl",i.cacheControl),l&&o.append("metadata",s.encodeMetadata(l)),o.append("",r)):typeof FormData<"u"&&r instanceof FormData?(o=r,o.has("cacheControl")||o.append("cacheControl",i.cacheControl),l&&!o.has("metadata")&&o.append("metadata",s.encodeMetadata(l))):(o=r,a["cache-control"]=`max-age=${i.cacheControl}`,a["content-type"]=i.contentType,l&&(a["x-metadata"]=s.toBase64(s.encodeMetadata(l))),(typeof ReadableStream<"u"&&o instanceof ReadableStream||o&&typeof o=="object"&&"pipe"in o&&typeof o.pipe=="function")&&!i.duplex&&(i.duplex="half")),n!=null&&n.headers&&(a=Y(Y({},a),n.headers));const c=s._removeEmptyFolders(t),d=s._getFinalPath(c),f=await(e=="PUT"?qd:zt)(s.fetch,`${s.url}/object/${d}`,o,Y({headers:a},i!=null&&i.duplex?{duplex:i.duplex}:{}));return{path:c,id:f.Id,fullPath:f.Key}})}async upload(e,t,r){return this.uploadOrUpdate("POST",e,t,r)}async uploadToSignedUrl(e,t,r,n){var s=this;const o=s._removeEmptyFolders(e),i=s._getFinalPath(o),a=new URL(s.url+`/object/upload/sign/${i}`);return a.searchParams.set("token",t),s.handleOperation(async()=>{let l;const c=Y({upsert:Bm.upsert},n),d=Y(Y({},s.headers),{"x-upsert":String(c.upsert)});return typeof Blob<"u"&&r instanceof Blob?(l=new FormData,l.append("cacheControl",c.cacheControl),l.append("",r)):typeof FormData<"u"&&r instanceof FormData?(l=r,l.append("cacheControl",c.cacheControl)):(l=r,d["cache-control"]=`max-age=${c.cacheControl}`,d["content-type"]=c.contentType),{path:o,fullPath:(await qd(s.fetch,a.toString(),l,{headers:d})).Key}})}async createSignedUploadUrl(e,t){var r=this;return r.handleOperation(async()=>{let n=r._getFinalPath(e);const s=Y({},r.headers);t!=null&&t.upsert&&(s["x-upsert"]="true");const o=await zt(r.fetch,`${r.url}/object/upload/sign/${n}`,{},{headers:s}),i=new URL(r.url+o.url),a=i.searchParams.get("token");if(!a)throw new fu("No token returned by API");return{signedUrl:i.toString(),path:e,token:a}})}async update(e,t,r){return this.uploadOrUpdate("PUT",e,t,r)}async move(e,t,r){var n=this;return n.handleOperation(async()=>await zt(n.fetch,`${n.url}/object/move`,{bucketId:n.bucketId,sourceKey:e,destinationKey:t,de
209stinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers}))}async copy(e,t,r){var n=this;return n.handleOperation(async()=>({path:(await zt(n.fetch,`${n.url}/object/copy`,{bucketId:n.bucketId,sourceKey:e,destinationKey:t,destinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers})).Key}))}async createSignedUrl(e,t,r){var n=this;return n.handleOperation(async()=>{let s=n._getFinalPath(e),o=await zt(n.fetch,`${n.url}/object/sign/${s}`,Y({expiresIn:t},r!=null&&r.transform?{transform:r.transform}:{}),{headers:n.headers});const i=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return{signedUrl:encodeURI(`${n.url}${o.signedURL}${i}`)}})}async createSignedUrls(e,t,r){var n=this;return n.handleOperation(async()=>{const s=await zt(n.fetch,`${n.url}/object/sign/${n.bucketId}`,{expiresIn:t,paths:e},{headers:n.headers}),o=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return s.map(i=>Y(Y({},i),{},{signedUrl:i.signedURL?encodeURI(`${n.url}${i.signedURL}${o}`):null}))})}download(e,t,r){const n=typeof(t==null?void 0:t.transform)<"u"?"render/image/authenticated":"object",s=this.transformOptsToQueryString((t==null?void 0:t.transform)||{}),o=s?`?${s}`:"",i=this._getFinalPath(e),a=()=>$i(this.fetch,`${this.url}/${n}/${i}${o}`,{headers:this.headers,noResolveJson:!0},r);return new BR(a,this.shouldThrowOnError)}async info(e){var t=this;const r=t._getFinalPath(e);return t.handleOperation(async()=>Hd(await $i(t.fetch,`${t.url}/object/info/${r}`,{headers:t.headers})))}async exists(e){var t=this;const r=t._getFinalPath(e);try{return await FR(t.fetch,`${t.url}/object/${r}`,{headers:t.headers}),{data:!0,error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(pu(n)&&n instanceof s_){const s=n.originalError;if([400,404].includes(s==null?void 0:s.status))return{data:!1,error:n}}throw n}}getPublicUrl(e,t){const r=this._getFinalPath(e),n=[],s=t!=null&&t.download?`download=${t.download===!0?"":t.download}`:"";s!==""&&n.push(s);const o=typeof(t==null?void 0:t.transform)<"u"?"render/image":"object",i=this.transformOptsToQueryString((t==null?void 0:t.transform)||{});i!==""&&n.push(i);let a=n.join("&");return a!==""&&(a=`?${a}`),{data:{publicUrl:encodeURI(`${this.url}/${o}/public/${r}${a}`)}}}async remove(e){var t=this;return t.handleOperation(async()=>await Ef(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}))}async list(e,t,r){var n=this;return n.handleOperation(async()=>{const s=Y(Y(Y({},zR),t),{},{prefix:e||""});return await zt(n.fetch,`${n.url}/object/list/${n.bucketId}`,s,{headers:n.headers},r)})}async listV2(e,t){var r=this;return r.handleOperation(async()=>{const n=Y({},e);return await zt(r.fetch,`${r.url}/object/list-v2/${r.bucketId}`,n,{headers:r.headers},t)})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,"")}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(e){const t=[];return e.width&&t.push(`width=${e.width}`),e.height&&t.push(`height=${e.height}`),e.resize&&t.push(`resize=${e.resize}`),e.format&&t.push(`format=${e.format}`),e.quality&&t.push(`quality=${e.quality}`),t.join("&")}};const HR="2.95.3",Zi={"X-Client-Info":`storage-js/${HR}`};var qR=class extends jo{constructor(e,t={},r,n){const s=new URL(e);n!=null&&n.useNewHostname&&/supabase\.(co|in|red)$/.test(s.hostname)&&!s.hostname.includes("storage.supabase.")&&(s.hostname=s.hostname.replace("supabase.","storage.supabase."));const o=s.href.replace(/\/$/,""),i=Y(Y({},Zi),t);super(o,i,r,"storage")}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const r=t.listBucketOptionsToQueryString(e);return await $i(t.fetch,`${t.url}/bucket${r}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await $i(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var r=this;return r.handleOperation(async()=>await zt(r.fetch,`${r.url}/bucket`,{id:e,name:e,type:t.type,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:r.headers}))}async updateBucket(e,t){var r=this;return r.handleOperation(async()=>await qd(r.fetch,`${r.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:r.headers}))}async emptyBucket(e){var t=this;return t.handleOperation(async()=>await zt(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Ef(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}listBucketOptionsToQueryString(e){const t={};return e&&("limit"in e&&(t.limit=String(e.limit)),"offset"in e&&(t.offset=String(e.offset)),e.search&&(t.search=e.search),e.sortColumn&&(t.sortColumn=e.sortColumn),e.sortOrder&&(t.sortOrder=e.sortOrder)),Object.keys(t).length>0?"?"+new URLSearchParams(t).toString():""}},KR=class extends jo{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=Y(Y({},Zi),t);super(n,s,r,"storage")}async createBucket(e){var t=this;return t.handleOperation(async()=>await zt(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}))}async listBuckets(e){var t=this;return t.handleOperation(async()=>
209{const r=new URLSearchParams;(e==null?void 0:e.limit)!==void 0&&r.set("limit",e.limit.toString()),(e==null?void 0:e.offset)!==void 0&&r.set("offset",e.offset.toString()),e!=null&&e.sortColumn&&r.set("sortColumn",e.sortColumn),e!=null&&e.sortOrder&&r.set("sortOrder",e.sortOrder),e!=null&&e.search&&r.set("search",e.search);const n=r.toString(),s=n?`${t.url}/bucket?${n}`:`${t.url}/bucket`;return await $i(t.fetch,s,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Ef(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!IR(e))throw new fu("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");const r=new CR({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>t.headers},fetch:this.fetch}),n=this.shouldThrowOnError;return new Proxy(r,{get(s,o){const i=s[o];return typeof i!="function"?i:async(...a)=>{try{return{data:await i.apply(s,a),error:null}}catch(l){if(n)throw l;return{data:null,error:l}}}}})}},GR=class extends jo{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=Y(Y({},Zi),{},{"Content-Type":"application/json"},t);super(n,s,r,"vectors")}async createIndex(e){var t=this;return t.handleOperation(async()=>await yt.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var r=this;return r.handleOperation(async()=>await yt.post(r.fetch,`${r.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await yt.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var r=this;return r.handleOperation(async()=>await yt.post(r.fetch,`${r.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers})||{})}},QR=class extends jo{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=Y(Y({},Zi),{},{"Content-Type":"application/json"},t);super(n,s,r,"vectors")}async putVectors(e){var t=this;if(e.vectors.length<1||e.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return t.handleOperation(async()=>await yt.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await yt.post(t.fetch,`${t.url}/GetVectors`,e,{headers:t.headers}))}async listVectors(e){var t=this;if(e.segmentCount!==void 0){if(e.segmentCount<1||e.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");if(e.segmentIndex!==void 0&&(e.segmentIndex<0||e.segmentIndex>=e.segmentCount))throw new Error(`segmentIndex must be between 0 and ${e.segmentCount-1}`)}return t.handleOperation(async()=>await yt.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await yt.post(t.fetch,`${t.url}/QueryVectors`,e,{headers:t.headers}))}async deleteVectors(e){var t=this;if(e.keys.length<1||e.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return t.handleOperation(async()=>await yt.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},JR=class extends jo{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=Y(Y({},Zi),{},{"Content-Type":"application/json"},t);super(n,s,r,"vectors")}async createBucket(e){var t=this;return t.handleOperation(async()=>await yt.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await yt.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await yt.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await yt.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},YR=class extends JR{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new XR(this.url,this.headers,e,this.fetch)}async createBucket(e){var t=()=>super.createBucket,r=this;return t().call(r,e)}async getBucket(e){var t=()=>super.getBucket,r=this;return t().call(r,e)}async listBuckets(e={}){var t=()=>super.listBuckets,r=this;return t().call(r,e)}async deleteBucket(e){var t=()=>super.deleteBucket,r=this;return t().call(r,e)}},XR=class extends GR{constructor(e,t,r,n){super(e,t,n),this.vectorBucketName=r}async createIndex(e){var t=()=>super.createIndex,r=this;return t().call(r,Y(Y({},e),{},{vectorBucketName:r.vectorBucketName}))}
209async listIndexes(e={}){var t=()=>super.listIndexes,r=this;return t().call(r,Y(Y({},e),{},{vectorBucketName:r.vectorBucketName}))}async getIndex(e){var t=()=>super.getIndex,r=this;return t().call(r,r.vectorBucketName,e)}async deleteIndex(e){var t=()=>super.deleteIndex,r=this;return t().call(r,r.vectorBucketName,e)}index(e){return new ZR(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},ZR=class extends QR{constructor(e,t,r,n,s){super(e,t,s),this.vectorBucketName=r,this.indexName=n}async putVectors(e){var t=()=>super.putVectors,r=this;return t().call(r,Y(Y({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async getVectors(e){var t=()=>super.getVectors,r=this;return t().call(r,Y(Y({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,r=this;return t().call(r,Y(Y({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,r=this;return t().call(r,Y(Y({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,r=this;return t().call(r,Y(Y({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}},eC=class extends qR{constructor(e,t={},r,n){super(e,t,r,n)}from(e){return new WR(this.url,this.headers,e,this.fetch)}get vectors(){return new YR(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new KR(this.url+"/iceberg",this.headers,this.fetch)}};const a_="2.95.3",bs=30*1e3,Kd=3,sc=Kd*bs,tC="http://localhost:9999",rC="supabase.auth.token",nC={"X-Client-Info":`gotrue-js/${a_}`},Gd="X-Supabase-Api-Version",l_={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},sC=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,oC=10*60*1e3;
209class vo extends Error{constructor(t,r,n){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=r,this.code=n}}function K(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class u_ extends vo{constructor(t,r,n){super(t,r,n),this.name="AuthApiError",this.status=r,this.code=n}}function c_(e){return K(e)&&e.name==="AuthApiError"}class Gr extends vo{constructor(t,r){super(t),this.name="AuthUnknownError",this.originalError=r}}class pr extends vo{constructor(t,r,n,s){super(t,n,s),this.name=r,this.status=n}}class it extends pr{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function qa(e){return K(e)&&e.name==="AuthSessionMissingError"}class Ln extends pr{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class Jo extends pr{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class Yo extends pr{constructor(t,r=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=r}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}function d_(e){return K(e)&&e.name==="AuthImplicitGrantRedirectError"}class Qd extends pr{constructor(t,r=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=r}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class h_ extends pr{constructor(){super("PKCE code verifier not found in storage. This can happen if the auth flow was initiated in a different browser or device, or if the storage was cleared. For SSR frameworks (Next.js, SvelteKit, etc.), use @supabase/ssr on both the server and client to store the code verifier in cookies.","AuthPKCECodeVerifierMissingError",400,"pkce_code_verifier_not_found")}}class Cl extends pr{constructor(t,r){super(t,"AuthRetryableFetchError",r,void 0)}}function Ka(e){return K(e)&&e.name==="AuthRetryableFetchError"}class Jd extends pr{constructor(t,r,n){super(t,"AuthWeakPasswordError",r,"weak_password"),this.reasons=n}}class Al extends pr{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const Ol="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),zm=` 210\r=`.split(""),iC=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<zm.length;t+=1)e[zm[t].charCodeAt(0)]=-2;for(let t=0;t<Ol.length;t+=1)e[Ol[t].charCodeAt(0)]=t;return e})();function Wm(e,t,r){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const n=t.queue>>t.queuedBits-6&63;r(Ol[n]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const n=t.queue>>t.queuedBits-6&63;r(Ol[n]),t.queuedBits-=6}}function f_(e,t,r){const n=iC[e];if(n>-1)for(t.queue=t.queue<<6|n,t.queuedBits+=6;t.queuedBits>=8;)r(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(n===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function Hm(e){const t=[],r=i=>{t.push(String.fromCodePoint(i))},n={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},o=i=>{uC(i,n,r)};for(let i=0;i<e.length;i+=1)f_(e.charCodeAt(i),s,o);return t.join("")}function aC(e,t){if(e<=127){t(e);return}else if(e<=2047){t(192|e>>6),t(128|e&63);return}else if(e<=65535){t(224|e>>12),t(128|e>>6&63),t(128|e&63);return}else if(e<=1114111){t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),t(128|e&63);return}throw new Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}function lC(e,t){for(let r=0;r<e.length;r+=1){let n=e.charCodeAt(r);if(n>55295&&n<=56319){const s=(n-55296)*1024&65535;n=(e.charCodeAt(r+1)-56320&65535|s)+65536,r+=1}aC(n,t)}}function uC(e,t,r){if(t.utf8seq===0){if(e<=127){r(e);return}for(let n=1;n<6;n+=1)if(!(e>>7-n&1)){t.utf8seq=n;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw new Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|e&63,t.utf8seq-=1,t.utf8seq===0&&r(t.codepoint)}}function Ks(e){const t=[],r={queue:0,queuedBits:0},n=s=>{t.push(s)};for(let s=0;s<e.length;
210s+=1)f_(e.charCodeAt(s),r,n);return new Uint8Array(t)}function cC(e){const t=[];return lC(e,r=>t.push(r)),new Uint8Array(t)}function Bn(e){const t=[],r={queue:0,queuedBits:0},n=s=>{t.push(s)};return e.forEach(s=>Wm(s,r,n)),Wm(null,r,n),t.join("")}function dC(e){return Math.round(Date.now()/1e3)+e}function hC(){return Symbol("auth-callback")}const ze=()=>typeof window<"u"&&typeof document<"u",Cn={tested:!1,writable:!1},p_=()=>{if(!ze())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(Cn.tested)return Cn.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),Cn.tested=!0,Cn.writable=!0}catch{Cn.tested=!0,Cn.writable=!1}return Cn.writable};function fC(e){const t={},r=new URL(e);if(r.hash&&r.hash[0]==="#")try{new URLSearchParams(r.hash.substring(1)).forEach((s,o)=>{t[o]=s})}catch{}return r.searchParams.forEach((n,s)=>{t[s]=n}),t}const m_=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),pC=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",Es=async(e,t,r)=>{await e.setItem(t,JSON.stringify(r))},An=async(e,t)=>{const r=await e.getItem(t);if(!r)return null;try{return JSON.parse(r)}catch{return r}},Be=async(e,t)=>{await e.removeItem(t)};class mu{constructor(){this.promise=new mu.promiseConstructor((t,r)=>{this.resolve=t,this.reject=r})}}mu.promiseConstructor=Promise;function Ca(e){const t=e.split(".");if(t.length!==3)throw new Al("Invalid JWT structure");for(let n=0;n<t.length;n++)if(!sC.test(t[n]))throw new Al("JWT not in base64url format");return{header:JSON.parse(Hm(t[0])),payload:JSON.parse(Hm(t[1])),signature:Ks(t[2]),raw:{header:t[0],payload:t[1]}}}async function mC(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function gC(e,t){return new Promise((n,s)=>{(async()=>{for(let o=0;o<1/0;o++)try{const i=await e(o);if(!t(o,null,i)){n(i);return}}catch(i){if(!t(o,i)){s(i);return}}})()})}function vC(e){return("0"+e.toString(16)).substr(-2)}function yC(){const t=new Uint32Array(56);if(typeof crypto>"u"){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",n=r.length;let s="";for(let o=0;o<56;o++)s+=r.charAt(Math.floor(Math.random()*n));return s}return crypto.getRandomValues(t),Array.from(t,vC).join("")}async function wC(e){const r=new TextEncoder().encode(e),n=await crypto.subtle.digest("SHA-256",r),s=new Uint8Array(n);return Array.from(s).map(o=>String.fromCharCode(o)).join("")}async function _C(e){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e;const r=await wC(e);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function vs(e,t,r=!1){const n=yC();let s=n;r&&(s+="/PASSWORD_RECOVERY"),await Es(e,`${t}-code-verifier`,s);const o=await _C(n);return[o,n===o?"plain":"s256"]}const xC=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function bC(e){const t=e.headers.get(Gd);if(!t||!t.match(xC))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function EC(e){if(!e)throw new Error("Missing exp claim");const t=Math.floor(Date.now()/1e3);if(e<=t)throw new Error("JWT has expired")}function SC(e){switch(e){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const kC=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function ys(e){if(!kC.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function oc(){const e={};return new Proxy(e,{get:(t,r)=>{if(r==="__isUserNotAvailableProxy")return!0;if(typeof r=="symbol"){const n=r.toString();if(n==="Symbol(Symbol.toPrimitive)"||n==="Symbol(Symbol.toStringTag)"||n==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${r}" property of the session object is not supported. Please use getUser() instead.`)},set:(t,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(t,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function PC(e,t){return new Proxy(e,{get:(r,n,s)=>{if(n==="__isInsecureUserWarningProxy")return!0;
210if(typeof n=="symbol"){const o=n.toString();if(o==="Symbol(Symbol.toPrimitive)"||o==="Symbol(Symbol.toStringTag)"||o==="Symbol(util.inspect.custom)"||o==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(r,n,s)}return!t.value&&typeof n=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),t.value=!0),Reflect.get(r,n,s)}})}function qm(e){return JSON.parse(JSON.stringify(e))}const Nn=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),TC=[502,503,504];async function Km(e){var t;if(!pC(e))throw new Cl(Nn(e),0);if(TC.includes(e.status))throw new Cl(Nn(e),e.status);let r;try{r=await e.json()}catch(o){throw new Gr(Nn(o),o)}let n;const s=bC(e);if(s&&s.getTime()>=l_["2024-01-01"].timestamp&&typeof r=="object"&&r&&typeof r.code=="string"?n=r.code:typeof r=="object"&&r&&typeof r.error_code=="string"&&(n=r.error_code),n){if(n==="weak_password")throw new Jd(Nn(r),e.status,((t=r.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(n==="session_not_found")throw new it}else if(typeof r=="object"&&r&&typeof r.weak_password=="object"&&r.weak_password&&Array.isArray(r.weak_password.reasons)&&r.weak_password.reasons.length&&r.weak_password.reasons.reduce((o,i)=>o&&typeof i=="string",!0))throw new Jd(Nn(r),e.status,r.weak_password.reasons);throw new u_(Nn(r),e.status||500,n)}const jC=(e,t,r,n)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?s:(s.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t==null?void 0:t.headers),s.body=JSON.stringify(n),Object.assign(Object.assign({},s),r))};async function J(e,t,r,n){var s;const o=Object.assign({},n==null?void 0:n.headers);o[Gd]||(o[Gd]=l_["2024-01-01"].name),n!=null&&n.jwt&&(o.Authorization=`Bearer ${n.jwt}`);const i=(s=n==null?void 0:n.query)!==null&&s!==void 0?s:{};n!=null&&n.redirectTo&&(i.redirect_to=n.redirectTo);const a=Object.keys(i).length?"?"+new URLSearchParams(i).toString():"",l=await RC(e,t,r+a,{headers:o,noResolveJson:n==null?void 0:n.noResolveJson},{},n==null?void 0:n.body);return n!=null&&n.xform?n==null?void 0:n.xform(l):{data:Object.assign({},l),error:null}}async function RC(e,t,r,n,s,o){const i=jC(t,n,s,o);let a;try{a=await e(r,Object.assign({},i))}catch(l){throw console.error(l),new Cl(Nn(l),0)}if(a.ok||await Km(a),n!=null&&n.noResolveJson)return a;try{return await a.json()}catch(l){await Km(l)}}function Vt(e){var t;let r=null;OC(e)&&(r=Object.assign({},e),e.expires_at||(r.expires_at=dC(e.expires_in)));const n=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:r,user:n},error:null}}function Gm(e){const t=Vt(e);return!t.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((r,n)=>r&&typeof n=="string",!0)&&(t.data.weak_password=e.weak_password),t}function Qr(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function CC(e){return{data:e,error:null}}function AC(e){const{action_link:t,email_otp:r,hashed_token:n,redirect_to:s,verification_type:o}=e,i=du(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),a={action_link:t,email_otp:r,hashed_token:n,redirect_to:s,verification_type:o},l=Object.assign({},i);return{data:{properties:a,user:l},error:null}}function Qm(e){return e}function OC(e){return e.access_token&&e.refresh_token&&e.expires_in}const Ga=["global","local","others"];class g_{constructor({url:t="",headers:r={},fetch:n}){this.url=t,this.headers=r,this.fetch=m_(n),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)}}async signOut(t,r=Ga[0]){if(Ga.indexOf(r)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${Ga.join(", ")}`);try{return await J(this.fetch,"POST",`${this.url}/logout?scope=${r}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(n){if(K(n))return{data:null,error:n};throw n}}async inviteUserByEmail(t,r={}){try{return await J(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:Qr})}catch(n){if(K(n))return{data:{user:null},error:n};throw n}}async generateLink(t){try{const{options:r}=t,n=du(t,["options"]),s=Object.assign(Object.assign({},n),r);return"newEmail"in n&&(s.new_email=n==null?void 0:n.newEmail,delete s.newEmail),await J(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:AC,redirectTo:r==null?void 0:r.redirectTo})}catch(r){if(K(r))return{data:{properties:null,user:null},error:r};throw r}}async createUser(t){try{return await J(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:Qr})}catch(r){if(K(r))return{data:{user:null},error:r};throw r}}async listUsers(t){var r,n,s,o,i,a,l;try{const c={nextPage:null,lastPage:0,total:0},d=await J(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=t==null?void 0:t.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(o=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&o!==void 0?o:""},xform:Qm});if(d.error)throw d.error;const f=await d.json(),p=(i=d.headers.get("x-total-count"))!==null&&i!==void 0?i:0,h=(l=(a=d.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return h.length>
2100&&(h.forEach(_=>{const y=parseInt(_.split(";")[0].split("=")[1].substring(0,1)),x=JSON.parse(_.split(";")[1].split("=")[1]);c[`${x}Page`]=y}),c.total=parseInt(p)),{data:Object.assign(Object.assign({},f),c),error:null}}catch(c){if(K(c))return{data:{users:[]},error:c};throw c}}async getUserById(t){ys(t);try{return await J(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:Qr})}catch(r){if(K(r))return{data:{user:null},error:r};throw r}}async updateUserById(t,r){ys(t);try{return await J(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:r,headers:this.headers,xform:Qr})}catch(n){if(K(n))return{data:{user:null},error:n};throw n}}async deleteUser(t,r=!1){ys(t);try{return await J(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:r},xform:Qr})}catch(n){if(K(n))return{data:{user:null},error:n};throw n}}async _listFactors(t){ys(t.userId);try{const{data:r,error:n}=await J(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:s=>({data:{factors:s},error:null})});return{data:r,error:n}}catch(r){if(K(r))return{data:null,error:r};throw r}}async _deleteFactor(t){ys(t.userId),ys(t.id);try{return{data:await J(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(r){if(K(r))return{data:null,error:r};throw r}}async _listOAuthClients(t){var r,n,s,o,i,a,l;try{const c={nextPage:null,lastPage:0,total:0},d=await J(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=t==null?void 0:t.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(o=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&o!==void 0?o:""},xform:Qm});if(d.error)throw d.error;const f=await d.json(),p=(i=d.headers.get("x-total-count"))!==null&&i!==void 0?i:0,h=(l=(a=d.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return h.length>0&&(h.forEach(_=>{const y=parseInt(_.split(";")[0].split("=")[1].substring(0,1)),x=JSON.parse(_.split(";")[1].split("=")[1]);c[`${x}Page`]=y}),c.total=parseInt(p)),{data:Object.assign(Object.assign({},f),c),error:null}}catch(c){if(K(c))return{data:{clients:[]},error:c};throw c}}async _createOAuthClient(t){try{return await J(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(K(r))return{data:null,error:r};throw r}}async _getOAuthClient(t){try{return await J(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(K(r))return{data:null,error:r};throw r}}async _updateOAuthClient(t,r){try{return await J(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(K(n))return{data:null,error:n};throw n}}async _deleteOAuthClient(t){try{return await J(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(K(r))return{data:null,error:r};throw r}}async _regenerateOAuthClientSecret(t){try{return await J(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(K(r))return{data:null,error:r};throw r}}}function Jm(e={}){return{getItem:t=>e[t]||null,setItem:(t,r)=>{e[t]=r},removeItem:t=>{delete e[t]}}}const Dn={debug:!!(globalThis&&p_()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class v_ extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class y_ extends v_{}async function w_(e,t,r){Dn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const n=new globalThis.AbortController;return t>0&&setTimeout(()=>{n.abort(),Dn.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t),await Promise.resolve().then(()=>globalThis.navigator.locks.request(e,t===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:n.signal},async s=>{if(s){Dn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,s.name);try{return await r()}finally{Dn.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,s.name)}}else{if(t===0)throw Dn.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new y_(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(Dn.debug)try{const o=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(o,null," "))}catch(o){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",o)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),await r()}}))}function IC(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}function __(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}
210" is invalid.`);return e.toLowerCase()}function LC(e){return parseInt(e,16)}function NC(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,n=>n.toString(16).padStart(2,"0")).join("")}function DC(e){var t;const{chainId:r,domain:n,expirationTime:s,issuedAt:o=new Date,nonce:i,notBefore:a,requestId:l,resources:c,scheme:d,uri:f,version:p}=e;{if(!Number.isInteger(r))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${r}`);if(!n)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(i&&i.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${i}`);if(!f)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(p!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${p}`);if(!((t=e.statement)===null||t===void 0)&&t.includes(` 211`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const h=__(e.address),_=d?`${d}://${n}`:n,y=e.statement?`${e.statement} 212`:"",x=`${_} wants you to sign in with your Ethereum account: 213${h} 214 215${y}`;let g=`URI: ${f} 216Version: ${p} 217Chain ID: ${r}${i?` 218Nonce: ${i}`:""} 219Issued At: ${o.toISOString()}`;if(s&&(g+=` 220Expiration Time: ${s.toISOString()}`),a&&(g+=` 221Not Before: ${a.toISOString()}`),l&&(g+=` 222Request ID: ${l}`),c){let m=` 223Resources:`;for(const w of c){if(!w||typeof w!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${w}`);m+=` 224- ${w}`}g+=m}return`${x} 225${g}`}class Oe extends Error{constructor({message:t,code:r,cause:n,name:s}){var o;super(t,{cause:n}),this.__isWebAuthnError=!0,this.name=(o=s??(n instanceof Error?n.name:void 0))!==null&&o!==void 0?o:"Unknown Error",this.code=r}}class Il extends Oe{constructor(t,r){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r,message:t}),this.name="WebAuthnUnknownError",this.originalError=r}}function $C({error:e,options:t}){var r,n,s;const{publicKey:o}=t;if(!o)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Oe({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((r=o.authenticatorSelection)===null||r===void 0?void 0:r.requireResidentKey)===!0)return new Oe({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&((n=o.authenticatorSelection)===null||n===void 0?void 0:n.userVerification)==="required")return new Oe({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(((s=o.authenticatorSelection)===null||s===void 0?void 0:s.userVerification)==="required")return new Oe({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:e})}else{if(e.name==="InvalidStateError")return new Oe({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new Oe({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return o.pubKeyCredParams.filter(a=>a.type==="public-key").length===0?new Oe({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new Oe({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});if(e.name==="SecurityError"){const i=window.location.hostname;if(x_(i)){if(o.rp.id!==i)return new Oe({message:`The RP ID "${o.rp.id}
225" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Oe({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(o.user.id.byteLength<1||o.user.id.byteLength>64)return new Oe({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:e})}else if(e.name==="UnknownError")return new Oe({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new Oe({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function MC({error:e,options:t}){const{publicKey:r}=t;if(!r)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Oe({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new Oe({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const n=window.location.hostname;if(x_(n)){if(r.rpId!==n)return new Oe({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Oe({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new Oe({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new Oe({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class UC{createNewAbortSignal(){if(this.controller){const r=new Error("Cancelling existing WebAuthn API call for new one");r.name="AbortError",this.controller.abort(r)}const t=new AbortController;return this.controller=t,t.signal}cancelCeremony(){if(this.controller){const t=new Error("Manually cancelling existing WebAuthn API call");t.name="AbortError",this.controller.abort(t),this.controller=void 0}}}const FC=new UC;function VC(e){if(!e)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(e);const{challenge:t,user:r,excludeCredentials:n}=e,s=du(e,["challenge","user","excludeCredentials"]),o=Ks(t).buffer,i=Object.assign(Object.assign({},r),{id:Ks(r.id).buffer}),a=Object.assign(Object.assign({},s),{challenge:o,user:i});if(n&&n.length>0){a.excludeCredentials=new Array(n.length);for(let l=0;l<n.length;l++){const c=n[l];a.excludeCredentials[l]=Object.assign(Object.assign({},c),{id:Ks(c.id).buffer,type:c.type||"public-key",transports:c.transports})}}return a}function BC(e){if(!e)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(e);const{challenge:t,allowCredentials:r}=e,n=du(e,["challenge","allowCredentials"]),s=Ks(t).buffer,o=Object.assign(Object.assign({},n),{challenge:s});if(r&&r.length>0){o.allowCredentials=new Array(r.length);for(let i=0;i<r.length;i++){const a=r[i];o.allowCredentials[i]=Object.assign(Object.assign({},a),{id:Ks(a.id).buffer,type:a.type||"public-key",transports:a.transports})}}return o}function zC(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const r=e;return{id:e.id,rawId:e.id,response:{attestationObject:Bn(new Uint8Array(e.response.attestationObject)),clientDataJSON:Bn(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function WC(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const r=e,n=e.getClientExtensionResults(),s=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:Bn(new Uint8Array(s.authenticatorData)),clientDataJSON:Bn(new Uint8Array(s.clientDataJSON)),signature:Bn(new Uint8Array(s.signature)),userHandle:s.userHandle?Bn(new Uint8Array(s.userHandle)):void 0},type:"public-key",clientExtensionResults:n,authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function x_(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function Ym(){var e,t;return!!(ze()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.create)=="function"&&typeof((t=navigator==null?void 0:navigator.credentials)===null||t===void 0?void 0:t.get)=="function")}async function HC(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Il("Browser returned unexpected credential type",t)}:{data:null,error:new Il("Empty credential response",t)}}
225catch(t){return{data:null,error:$C({error:t,options:e})}}}async function qC(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Il("Browser returned unexpected credential type",t)}:{data:null,error:new Il("Empty credential response",t)}}catch(t){return{data:null,error:MC({error:t,options:e})}}}const KC={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},GC={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function Ll(...e){const t=s=>s!==null&&typeof s=="object"&&!Array.isArray(s),r=s=>s instanceof ArrayBuffer||ArrayBuffer.isView(s),n={};for(const s of e)if(s)for(const o in s){const i=s[o];if(i!==void 0)if(Array.isArray(i))n[o]=i;else if(r(i))n[o]=i;else if(t(i)){const a=n[o];t(a)?n[o]=Ll(a,i):n[o]=Ll(i)}else n[o]=i}return n}function QC(e,t){return Ll(KC,e,t||{})}function JC(e,t){return Ll(GC,e,t||{})}class YC{constructor(t){this.client=t,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(t){return this.client.mfa.enroll(Object.assign(Object.assign({},t),{factorType:"webauthn"}))}async _challenge({factorId:t,webauthn:r,friendlyName:n,signal:s},o){var i;try{const{data:a,error:l}=await this.client.mfa.challenge({factorId:t,webauthn:r});if(!a)return{data:null,error:l};const c=s??FC.createNewAbortSignal();if(a.webauthn.type==="create"){const{user:d}=a.webauthn.credential_options.publicKey;if(!d.name){const f=n;if(f)d.name=`${d.id}:${f}`;else{const h=(await this.client.getUser()).data.user,_=((i=h==null?void 0:h.user_metadata)===null||i===void 0?void 0:i.name)||(h==null?void 0:h.email)||(h==null?void 0:h.id)||"User";d.name=`${d.id}:${_}`}}d.displayName||(d.displayName=d.name)}switch(a.webauthn.type){case"create":{const d=QC(a.webauthn.credential_options.publicKey,o==null?void 0:o.create),{data:f,error:p}=await HC({publicKey:d,signal:c});return f?{data:{factorId:t,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:f}},error:null}:{data:null,error:p}}case"request":{const d=JC(a.webauthn.credential_options.publicKey,o==null?void 0:o.request),{data:f,error:p}=await qC(Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:d,signal:c}));return f?{data:{factorId:t,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:f}},error:null}:{data:null,error:p}}}}catch(a){return K(a)?{data:null,error:a}:{data:null,error:new Gr("Unexpected error in challenge",a)}}}async _verify({challengeId:t,factorId:r,webauthn:n}){return this.client.mfa.verify({factorId:r,challengeId:t,webauthn:n})}async _authenticate({factorId:t,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},o){if(!r)return{data:null,error:new vo("rpId is required for WebAuthn authentication")};try{if(!Ym())return{data:null,error:new Gr("Browser does not support WebAuthn",null)};const{data:i,error:a}=await this.challenge({factorId:t,webauthn:{rpId:r,rpOrigins:n},signal:s},{request:o});if(!i)return{data:null,error:a};const{webauthn:l}=i;return this._verify({factorId:t,challengeId:i.challengeId,webauthn:{type:l.type,rpId:r,rpOrigins:n,credential_response:l.credential_response}})}catch(i){return K(i)?{data:null,error:i}:{data:null,error:new Gr("Unexpected error in authenticate",i)}}}async _register({friendlyName:t,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},o){if(!r)return{data:null,error:new vo("rpId is required for WebAuthn registration")};try{if(!Ym())return{data:null,error:new Gr("Browser does not support WebAuthn",null)};const{data:i,error:a}=await this._enroll({friendlyName:t});if(!i)return await this.client.mfa.listFactors().then(d=>{var f;return(f=d.data)===null||f===void 0?void 0:f.all.find(p=>p.factor_type==="webauthn"&&p.friendly_name===t&&p.status!=="unverified")}).then(d=>d?this.client.mfa.unenroll({factorId:d==null?void 0:d.id}):void 0),{data:null,error:a};const{data:l,error:c}=await this._challenge({factorId:i.id,friendlyName:i.friendly_name,webauthn:{rpId:r,rpOrigins:n},signal:s},{create:o});return l?this._verify({factorId:i.id,challengeId:l.challengeId,webauthn:{rpId:r,rpOrigins:n,type:l.webauthn.type,credential_response:l.webauthn.credential_response}}):{data:null,error:c}}catch(i){return K(i)?{data:null,error:i}:{data:null,error:new Gr("Unexpected error in register",i)}}}}IC();const XC={url:tC,storageKey:rC,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:nC,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:1e4};async function Xm(e,t,r){return await r()}const ws={};class yo{get jwks(){var t,r;return(r=(t=ws[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&r!==void 0?r:{keys:[]}}set jwks(t){ws[this.storageKey]=Object.assign(Object.assign({},ws[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,r;return(r=(t=ws[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&r!==void 0?r:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){ws[this.storageKey]=Object.assign(Object.assign({},ws[this.storageKey]),{cachedAt:t})}constructor(t){var r,n,s;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const o=Object.assign(Object.assign({}
225,XC),t);if(this.storageKey=o.storageKey,this.instanceID=(r=yo.nextInstanceID[this.storageKey])!==null&&r!==void 0?r:0,yo.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!o.debug,typeof o.debug=="function"&&(this.logger=o.debug),this.instanceID>0&&ze()){const i=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(i),this.logDebugMessages&&console.trace(i)}if(this.persistSession=o.persistSession,this.autoRefreshToken=o.autoRefreshToken,this.admin=new g_({url:o.url,headers:o.headers,fetch:o.fetch}),this.url=o.url,this.headers=o.headers,this.fetch=m_(o.fetch),this.lock=o.lock||Xm,this.detectSessionInUrl=o.detectSessionInUrl,this.flowType=o.flowType,this.hasCustomAuthorizationHeader=o.hasCustomAuthorizationHeader,this.throwOnError=o.throwOnError,this.lockAcquireTimeout=o.lockAcquireTimeout,o.lock?this.lock=o.lock:this.persistSession&&ze()&&(!((n=globalThis==null?void 0:globalThis.navigator)===null||n===void 0)&&n.locks)?this.lock=w_:this.lock=Xm,this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this),webauthn:new YC(this)},this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.persistSession?(o.storage?this.storage=o.storage:p_()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=Jm(this.memoryStorage)),o.userStorage&&(this.userStorage=o.userStorage)):(this.memoryStorage={},this.storage=Jm(this.memoryStorage)),ze()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(i){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",i)}(s=this.broadcastChannel)===null||s===void 0||s.addEventListener("message",async i=>{this._debug("received broadcast notification from other tab or client",i);try{await this._notifyAllSubscribers(i.data.event,i.data.session,!1)}catch(a){this._debug("#broadcastChannel","error",a)}})}this.initialize().catch(i=>{this._debug("#initialize()","error",i)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${a_}) ${new Date().toISOString()}`}_debug(...t){return this.logDebugMessages&&this.logger(this._logPrefix(),...t),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var t;try{let r={},n="none";if(ze()&&(r=fC(window.location.href),this._isImplicitGrantCallback(r)?n="implicit":await this._isPKCECallback(r)&&(n="pkce")),ze()&&this.detectSessionInUrl&&n!=="none"){const{data:s,error:o}=await this._getSessionFromURL(r,n);if(o){if(this._debug("#_initialize()","error detecting session from URL",o),d_(o)){const l=(t=o.details)===null||t===void 0?void 0:t.code;if(l==="identity_already_exists"||l==="identity_not_found"||l==="single_identity_not_deletable")return{error:o}}return{error:o}}const{session:i,redirectType:a}=s;return this._debug("#_initialize()","detected session in URL",i,"redirect type",a),await this._saveSession(i),setTimeout(async()=>{a==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",i):await this._notifyAllSubscribers("SIGNED_IN",i)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(r){return K(r)?this._returnResult({error:r}):this._returnResult({error:new Gr("Unexpected error during initialization",r)}
225)}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var r,n,s;try{const o=await J(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(n=(r=t==null?void 0:t.options)===null||r===void 0?void 0:r.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:(s=t==null?void 0:t.options)===null||s===void 0?void 0:s.captchaToken}},xform:Vt}),{data:i,error:a}=o;if(a||!i)return this._returnResult({data:{user:null,session:null},error:a});const l=i.session,c=i.user;return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(o){if(K(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async signUp(t){var r,n,s;try{let o;if("email"in t){const{email:d,password:f,options:p}=t;let h=null,_=null;this.flowType==="pkce"&&([h,_]=await vs(this.storage,this.storageKey)),o=await J(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:p==null?void 0:p.emailRedirectTo,body:{email:d,password:f,data:(r=p==null?void 0:p.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:p==null?void 0:p.captchaToken},code_challenge:h,code_challenge_method:_},xform:Vt})}else if("phone"in t){const{phone:d,password:f,options:p}=t;o=await J(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:d,password:f,data:(n=p==null?void 0:p.data)!==null&&n!==void 0?n:{},channel:(s=p==null?void 0:p.channel)!==null&&s!==void 0?s:"sms",gotrue_meta_security:{captcha_token:p==null?void 0:p.captchaToken}},xform:Vt})}else throw new Jo("You must provide either an email or phone number and a password");const{data:i,error:a}=o;if(a||!i)return await Be(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:a});const l=i.session,c=i.user;return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(o){if(await Be(this.storage,`${this.storageKey}-code-verifier`),K(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async signInWithPassword(t){try{let r;if("email"in t){const{email:o,password:i,options:a}=t;r=await J(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:o,password:i,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:Gm})}else if("phone"in t){const{phone:o,password:i,options:a}=t;r=await J(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:o,password:i,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:Gm})}else throw new Jo("You must provide either an email or phone number and a password");const{data:n,error:s}=r;if(s)return this._returnResult({data:{user:null,session:null},error:s});if(!n||!n.session||!n.user){const o=new Ln;return this._returnResult({data:{user:null,session:null},error:o})}return n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",n.session)),this._returnResult({data:Object.assign({user:n.user,session:n.session},n.weak_password?{weakPassword:n.weak_password}:null),error:s})}catch(r){if(K(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOAuth(t){var r,n,s,o;return await this._handleProviderSignIn(t.provider,{redirectTo:(r=t.options)===null||r===void 0?void 0:r.redirectTo,scopes:(n=t.options)===null||n===void 0?void 0:n.scopes,queryParams:(s=t.options)===null||s===void 0?void 0:s.queryParams,skipBrowserRedirect:(o=t.options)===null||o===void 0?void 0:o.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(t))}async signInWithWeb3(t){const{chain:r}=t;switch(r){case"ethereum":return await this.signInWithEthereum(t);case"solana":return await this.signInWithSolana(t);default:throw new Error(`@supabase/auth-js: Unsupported chain "${r}"`)}}async signInWithEthereum(t){var r,n,s,o,i,a,l,c,d,f,p;let h,_;if("message"in t)h=t.message,_=t.signature;else{const{chain:y,wallet:x,statement:g,options:m}=t;let w;if(ze())if(typeof x=="object")w=x;else{const $=window;if("ethereum"in $&&typeof $.ethereum=="object"&&"request"in $.ethereum&&typeof $.ethereum.request=="function")w=$.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof x!="object"||!(m!=null&&m.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");w=x}const b=new URL((r=m==null?void 0:m.url)!==null&&r!==void 0?r:window.location.href),P=await w.request({method:"eth_requestAccounts"}).then($=>$).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!P||P.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const T=__(P[0]);let R=(n=m==null?void 0:m.signInWithEthereum)===null||n===void 0?void 0:n.chainId;if(!R){const $=await w.request({method:"eth_chainId"});R=LC($)}const O={domain:b.host,address:T,statement:g,uri:b.href,version:"1",chainId:R,nonce:(s=m==null?void 0:m.signInWithEthereum)===null||s===void 0?void 0:s.nonce,issuedAt:(i=(o=m==null?void 0:m.signInWithEthereum)===null||o===void 0?void 0:o.issuedAt)!==null&&i!==void 0?i:new Date,expirationTime:(a=m==null?void 0:m.signInWithEthereum)===null||a===void 0?void 0:a.expirationTime,notBefore:(l=m==null?void 0:m.signInWithEthereum)===null||l===void 0?void 0:l.notBefore,requestId:(c=m==null?void 0:m.signInWithEthereum)===null||c===void 0?void 0:c.requestId,resources:(d=m==null?void 0:m.signInWithEthereum)===null||d===void 0?void 0:d.resources};h=DC(O),_=await w.request({method:"personal_sign",params:[NC(h),T]})}try{const{data:y,error:x}=await J(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:h,signature:_},!((f=t.options)===null||f===void 0)&&f.captchaToken?{gotrue_meta_security:{captcha_token:(p=t.options)===null||p===void 0?void 0:p.captchaToken}}:null),xform:Vt});if(x)throw x;if(!y||!y.session||!y.user){const g=new Ln;return this._returnResult({data:{user:null,session:null},error:g})}return y.session&&(await this._saveSession(y.session),await this._notifyAllSubscribers("SIGNED_IN",y.session)),this._returnResult({data:Object.assign({},y),error:x})}catch(y){if(K(y))return this._returnResult({data:{user:null,session:null},error:y});throw y}}async signInWithSolana(t){var r,n,s,o,i,a,l,c,d,f,p,h;let _,y;if("message"in t)_=t.message,y=t.signature;else{const{chain:x,wallet:g,statement:m,options:w}=t;let b;if(ze())if(typeof g=="object")b=g;else{const T=window;if("solana"in T&&typeof T.solana=="object"&&("signIn"in T.solana&&typeof T.solana.signIn=="function"||"signMessage"in T.solana&&typeof T.solana.signMessage=="function"))b=T.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof g!="object"||!(w!=null&&w.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");b=g}const P=new URL((r=w==null?void 0:w.url)!==null&&r!==void 0?r:window.location.href);if("signIn"in b&&b.signIn){const T=await b.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},w==null?void 0:w.signInWithSolana),{version:"1",domain:P.host,uri:P.href}),m?{statement:m}:null));let R;if(Array.isArray(T)&&T[0]&&typeof T[0]=="object")R=T[0];else if(T&&typeof T=="object"&&"signedMessage"in T&&"signature"in T)R=T;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in R&&"signature"in R&&(typeof R.signedMessage=="string"||R.signedMessage instanceof Uint8Array)&&R.signature instanceof Uint8Array)_=typeof R.signedMessage=="string"?R.signedMessage:new TextDecoder().decode(R.signedMessage),y=R.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}
225else{if(!("signMessage"in b)||typeof b.signMessage!="function"||!("publicKey"in b)||typeof b!="object"||!b.publicKey||!("toBase58"in b.publicKey)||typeof b.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");_=[`${P.host} wants you to sign in with your Solana account:`,b.publicKey.toBase58(),...m?["",m,""]:[""],"Version: 1",`URI: ${P.href}`,`Issued At: ${(s=(n=w==null?void 0:w.signInWithSolana)===null||n===void 0?void 0:n.issuedAt)!==null&&s!==void 0?s:new Date().toISOString()}`,...!((o=w==null?void 0:w.signInWithSolana)===null||o===void 0)&&o.notBefore?[`Not Before: ${w.signInWithSolana.notBefore}`]:[],...!((i=w==null?void 0:w.signInWithSolana)===null||i===void 0)&&i.expirationTime?[`Expiration Time: ${w.signInWithSolana.expirationTime}`]:[],...!((a=w==null?void 0:w.signInWithSolana)===null||a===void 0)&&a.chainId?[`Chain ID: ${w.signInWithSolana.chainId}`]:[],...!((l=w==null?void 0:w.signInWithSolana)===null||l===void 0)&&l.nonce?[`Nonce: ${w.signInWithSolana.nonce}`]:[],...!((c=w==null?void 0:w.signInWithSolana)===null||c===void 0)&&c.requestId?[`Request ID: ${w.signInWithSolana.requestId}`]:[],...!((f=(d=w==null?void 0:w.signInWithSolana)===null||d===void 0?void 0:d.resources)===null||f===void 0)&&f.length?["Resources",...w.signInWithSolana.resources.map(R=>`- ${R}`)]:[]].join(` 226`);const T=await b.signMessage(new TextEncoder().encode(_),"utf8");if(!T||!(T instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");y=T}}try{const{data:x,error:g}=await J(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:_,signature:Bn(y)},!((p=t.options)===null||p===void 0)&&p.captchaToken?{gotrue_meta_security:{captcha_token:(h=t.options)===null||h===void 0?void 0:h.captchaToken}}:null),xform:Vt});if(g)throw g;if(!x||!x.session||!x.user){const m=new Ln;return this._returnResult({data:{user:null,session:null},error:m})}return x.session&&(await this._saveSession(x.session),await this._notifyAllSubscribers("SIGNED_IN",x.session)),this._returnResult({data:Object.assign({},x),error:g})}catch(x){if(K(x))return this._returnResult({data:{user:null,session:null},error:x});throw x}}async _exchangeCodeForSession(t){const r=await An(this.storage,`${this.storageKey}-code-verifier`),[n,s]=(r??"").split("/");try{if(!n&&this.flowType==="pkce")throw new h_;const{data:o,error:i}=await J(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:n},xform:Vt});if(await Be(this.storage,`${this.storageKey}-code-verifier`),i)throw i;if(!o||!o.session||!o.user){const a=new Ln;return this._returnResult({data:{user:null,session:null,redirectType:null},error:a})}return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",o.session)),this._returnResult({data:Object.assign(Object.assign({},o),{redirectType:s??null}),error:i})}catch(o){if(await Be(this.storage,`${this.storageKey}-code-verifier`),K(o))return this._returnResult({data:{user:null,session:null,redirectType:null},error:o});throw o}}async signInWithIdToken(t){try{const{options:r,provider:n,token:s,access_token:o,nonce:i}=t,a=await J(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:n,id_token:s,access_token:o,nonce:i,gotrue_meta_security:{captcha_token:r==null?void 0:r.captchaToken}},xform:Vt}),{data:l,error:c}=a;if(c)return this._returnResult({data:{user:null,session:null},error:c});if(!l||!l.session||!l.user){const d=new Ln;return this._returnResult({data:{user:null,session:null},error:d})}return l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),this._returnResult({data:l,error:c})}catch(r){if(K(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOtp(t){var r,n,s,o,i;try{if("email"in t){const{email:a,options:l}=t;let c=null,d=null;this.flowType==="pkce"&&([c,d]=await vs(this.storage,this.storageKey));const{error:f}=await J(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:a,data:(r=l==null?void 0:l.data)!==null&&r!==void 0?r:{},create_user:(n=l==null?void 0:l.shouldCreateUser)!==null&&n!==void 0?n:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},code_challenge:c,code_challenge_method:d},redirectTo:l==null?void 0:l.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:f})}if("phone"in t){const{phone:a,options:l}=t,{data:c,error:d}=await J(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:a,data:(s=l==null?void 0:l.data)!==null&&s!==void 0?s:{},create_user:(o=l==null?void 0:l.shouldCreateUser)!==null&&o!==void 0?o:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},channel:(i=l==null?void 0:l.channel)!==null&&i!==void 0?i:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:c==null?void 0:c.message_id},error:d})}throw new Jo("You must provide either an email or phone number.")}catch(a){if(await Be(this.storage,`${this.storageKey}
226-code-verifier`),K(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async verifyOtp(t){var r,n;try{let s,o;"options"in t&&(s=(r=t.options)===null||r===void 0?void 0:r.redirectTo,o=(n=t.options)===null||n===void 0?void 0:n.captchaToken);const{data:i,error:a}=await J(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:o}}),redirectTo:s,xform:Vt});if(a)throw a;if(!i)throw new Error("An error occurred on token verification.");const l=i.session,c=i.user;return l!=null&&l.access_token&&(await this._saveSession(l),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(s){if(K(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithSSO(t){var r,n,s,o,i;try{let a=null,l=null;this.flowType==="pkce"&&([a,l]=await vs(this.storage,this.storageKey));const c=await J(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:(n=(r=t.options)===null||r===void 0?void 0:r.redirectTo)!==null&&n!==void 0?n:void 0}),!((s=t==null?void 0:t.options)===null||s===void 0)&&s.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:a,code_challenge_method:l}),headers:this.headers,xform:CC});return!((o=c.data)===null||o===void 0)&&o.url&&ze()&&!(!((i=t.options)===null||i===void 0)&&i.skipBrowserRedirect)&&window.location.assign(c.data.url),this._returnResult(c)}catch(a){if(await Be(this.storage,`${this.storageKey}-code-verifier`),K(a))return this._returnResult({data:null,error:a});throw a}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;if(n)throw n;if(!r)throw new it;const{error:s}=await J(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:r.access_token});return this._returnResult({data:{user:null,session:null},error:s})})}catch(t){if(K(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async resend(t){try{const r=`${this.url}/resend`;if("email"in t){const{email:n,type:s,options:o}=t,{error:i}=await J(this.fetch,"POST",r,{headers:this.headers,body:{email:n,type:s,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},redirectTo:o==null?void 0:o.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:i})}else if("phone"in t){const{phone:n,type:s,options:o}=t,{data:i,error:a}=await J(this.fetch,"POST",r,{headers:this.headers,body:{phone:n,type:s,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:i==null?void 0:i.message_id},error:a})}throw new Jo("You must provide either an email or phone number and a type")}catch(r){if(K(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async getSession(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async r=>r))}async _acquireLock(t,r){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const n=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),s=(async()=>(await n,await r()))();return this.pendingInLock.push((async()=>{try{await s}catch{}})()),s}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const n=r();for(this.pendingInLock.push((async()=>{try{await n}catch{}})()),await n;this.pendingInLock.length;){const s=[...this.pendingInLock];await Promise.all(s),this.pendingInLock.splice(0,s.length)}return await n}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const r=await this.__loadSession();return await t(r)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const r=await An(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",r),r!==null&&(this._isValidSession(r)?t=r:(this._debug("#getSession()","session from storage is not val
226id"),await this._removeSession())),!t)return{data:{session:null},error:null};const n=t.expires_at?t.expires_at*1e3-Date.now()<sc:!1;if(this._debug("#__loadSession()",`session has${n?"":" not"} expired`,"expires_at",t.expires_at),!n){if(this.userStorage){const i=await An(this.userStorage,this.storageKey+"-user");i!=null&&i.user?t.user=i.user:t.user=oc()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const i={value:this.suppressGetSessionWarning};t.user=PC(t.user,i),i.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:s,error:o}=await this._callRefreshToken(t.refresh_token);return o?this._returnResult({data:{session:null},error:o}):this._returnResult({data:{session:s},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(t){if(t)return await this._getUser(t);await this.initializePromise;const r=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return r.data.user&&(this.suppressGetSessionWarning=!0),r}async _getUser(t){try{return t?await J(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:Qr}):await this._useSession(async r=>{var n,s,o;const{data:i,error:a}=r;if(a)throw a;return!(!((n=i.session)===null||n===void 0)&&n.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new it}:await J(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(o=(s=i.session)===null||s===void 0?void 0:s.access_token)!==null&&o!==void 0?o:void 0,xform:Qr})})}catch(r){if(K(r))return qa(r)&&(await this._removeSession(),await Be(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:r});throw r}}async updateUser(t,r={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(t,r))}async _updateUser(t,r={}){try{return await this._useSession(async n=>{const{data:s,error:o}=n;if(o)throw o;if(!s.session)throw new it;const i=s.session;let a=null,l=null;this.flowType==="pkce"&&t.email!=null&&([a,l]=await vs(this.storage,this.storageKey));const{data:c,error:d}=await J(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:r==null?void 0:r.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:a,code_challenge_method:l}),jwt:i.access_token,xform:Qr});if(d)throw d;return i.user=c.user,await this._saveSession(i),await this._notifyAllSubscribers("USER_UPDATED",i),this._returnResult({data:{user:i.user},error:null})})}catch(n){if(await Be(this.storage,`${this.storageKey}-code-verifier`),K(n))return this._returnResult({data:{user:null},error:n});throw n}}async setSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(t))}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new it;const r=Date.now()/1e3;let n=r,s=!0,o=null;const{payload:i}=Ca(t.access_token);if(i.exp&&(n=i.exp,s=n<=r),s){const{data:a,error:l}=await this._callRefreshToken(t.refresh_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});if(!a)return{data:{user:null,session:null},error:null};o=a}else{const{data:a,error:l}=await this._getUser(t.access_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});o={access_token:t.access_token,refresh_token:t.refresh_token,user:a.user,token_type:"bearer",expires_in:n-r,expires_at:n},await this._saveSession(o),await this._notifyAllSubscribers("SIGNED_IN",o)}return this._returnResult({data:{user:o.user,session:o},error:null})}catch(r){if(K(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}}async refreshSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(t))}async _refreshSession(t){try{return await this._useSession(async r=>{var n;if(!t){const{data:i,error:a}=r;if(a)throw a;t=(n=i.session)!==null&&n!==void 0?n:void 0}if(!(t!=null&&t.refresh_token))throw new it;const{data:s,error:o}=await this._callRefreshToken(t.refresh_token);return o?this._returnResult({data:{user:null,session:null},error:o}):s?this._returnResult({data:{user:s.user,session:s},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(r){if(K(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async _getSessionFromURL(t,r){try{if(!ze())throw new Yo("No browser detected.");
226if(t.error||t.error_description||t.error_code)throw new Yo(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(r){case"implicit":if(this.flowType==="pkce")throw new Qd("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Yo("Not a valid implicit grant flow url.");break;default:}if(r==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new Qd("No code detected.");const{data:m,error:w}=await this._exchangeCodeForSession(t.code);if(w)throw w;const b=new URL(window.location.href);return b.searchParams.delete("code"),window.history.replaceState(window.history.state,"",b.toString()),{data:{session:m.session,redirectType:null},error:null}}const{provider_token:n,provider_refresh_token:s,access_token:o,refresh_token:i,expires_in:a,expires_at:l,token_type:c}=t;if(!o||!a||!i||!c)throw new Yo("No session defined in URL");const d=Math.round(Date.now()/1e3),f=parseInt(a);let p=d+f;l&&(p=parseInt(l));const h=p-d;h*1e3<=bs&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${h}s, should have been closer to ${f}s`);const _=p-f;d-_>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",_,p,d):d-_<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",_,p,d);const{data:y,error:x}=await this._getUser(o);if(x)throw x;const g={provider_token:n,provider_refresh_token:s,access_token:o,expires_in:f,expires_at:p,refresh_token:i,token_type:c,user:y.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:g,redirectType:t.type},error:null})}catch(n){if(K(n))return this._returnResult({data:{session:null,redirectType:null},error:n});throw n}}_isImplicitGrantCallback(t){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),t):!!(t.access_token||t.error_description)}async _isPKCECallback(t){const r=await An(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&r)}async signOut(t={scope:"global"}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(t))}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async r=>{var n;const{data:s,error:o}=r;if(o&&!qa(o))return this._returnResult({error:o});const i=(n=s.session)===null||n===void 0?void 0:n.access_token;if(i){const{error:a}=await this.admin.signOut(i,t);if(a&&!(c_(a)&&(a.status===404||a.status===401||a.status===403)||qa(a)))return this._returnResult({error:a})}return t!=="others"&&(await this._removeSession(),await Be(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const r=hC(),n={id:r,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",r),this.stateChangeEmitters.delete(r)}};return this._debug("#onAuthStateChange()","registered callback with id",r),this.stateChangeEmitters.set(r,n),(async()=>(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(r)})))(),{data:{subscription:n}}}async _emitInitialSession(t){return await this._useSession(async r=>{var n,s;try{const{data:{session:o},error:i}=r;if(i)throw i;await((n=this.stateChangeEmitters.get(t))===null||n===void 0?void 0:n.callback("INITIAL_SESSION",o)),this._debug("INITIAL_SESSION","callback id",t,"session",o)}catch(o){await((s=this.stateChangeEmitters.get(t))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",o),console.error(o)}})}async resetPasswordForEmail(t,r={}){let n=null,s=null;this.flowType==="pkce"&&([n,s]=await vs(this.storage,this.storageKey,!0));try{return await J(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:n,code_challenge_method:s,gotrue_meta_security:{captcha_token:r.captchaToken}},headers:this.headers,redirectTo:r.redirectTo})}catch(o){if(await Be(this.storage,`${this.storageKey}-code-verifier`),K(o))return this._returnResult({data:null,error:o});throw o}}async getUserIdentities(){var t;try{const{data:r,error:n}=await this.getUser();if(n)throw n;return this._returnResult({data:{identities:(t=r.user.identities)!==null&&t!==void 0?t:[]},error:null})}catch(r){if(K(r))return this._returnResult({data:null,error:r});throw r}}async linkIdentity(t){return"token"in t?this.linkIdentityIdToken(t):this.linkIdentityOAuth(t)}async linkIdentityOAuth(t){var r;try{const{data:n,error:s}=await this._useSession(async o=>{var i,a,l,c,d;const{data:f,error:p}=o;if(p)throw p;const h=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(i=t.options)===null||i===void 0?void 0:i.redirectTo,scopes:(a=t.options)===null||a===void 0?void 0:a.scopes,queryParams:(l=t.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:!0});return await J(this.fetch,"GET",h,{headers:this.headers,jwt:(d=(c=f.session)===null||c===void 0?void 0:c.access_token)!==null&&d!==void 0?d:void 0})});if(s)throw s;return ze()&&!(!((r=t.options)===null||r===void 0)&&r.skipBrowserRedirect)&&window.location.assign(n==null?void 0:n.url),this._returnResult({data:{provider:t.provider,url:n==null?void 0:n.url},error:null})}catch(n){if(K(n))return this._returnResult({data:{provider:t.provider,url:null},error:n});throw n}}async linkIdentityIdToken(t){return await this._useSession(async r=>{var n;try{const{error:s,data:{session:o}}=r;if(s)throw s;const{options:i,provider:a,token:l,access_token:c,nonce:d}=t,f=await J(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(n=o==null?void 0:o.access_token)!==null&&n!==void 0?n:void 0,body:{provider:a,id_token:l,access_token:c,nonce:d,link_identity:!0,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}},xform:Vt}),{data:p,error:h}=f;return h?this._returnResult({data:{user:null,session:null},error:h}):!p||!p.session||!p.user?this._returnResult({data:{user:null,session:null},error:new Ln}):(p.session&&(await this._saveSession(p.session),await this._notifyAllSubscribers("USER_UPDATED",p.session)),this._returnResult({data:p,error:h}))}catch(s){if(await Be(this.storage,`${this.storageKey}-code-verifier`),K(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}})}async unlinkIdentity(t){try{return await this._useSession(async r=>{var n,s;const{data:o,error:i}=r;if(i)throw i;
226return await J(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(s=(n=o.session)===null||n===void 0?void 0:n.access_token)!==null&&s!==void 0?s:void 0})})}catch(r){if(K(r))return this._returnResult({data:null,error:r});throw r}}async _refreshAccessToken(t){const r=`#_refreshAccessToken(${t.substring(0,5)}...)`;this._debug(r,"begin");try{const n=Date.now();return await gC(async s=>(s>0&&await mC(200*Math.pow(2,s-1)),this._debug(r,"refreshing attempt",s),await J(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:Vt})),(s,o)=>{const i=200*Math.pow(2,s);return o&&Ka(o)&&Date.now()+i-n<bs})}catch(n){if(this._debug(r,"error",n),K(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}finally{this._debug(r,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,r){const n=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:r.redirectTo,scopes:r.scopes,queryParams:r.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",r,"url",n),ze()&&!r.skipBrowserRedirect&&window.location.assign(n),{data:{provider:t,url:n},error:null}}async _recoverAndRefresh(){var t,r;const n="#_recoverAndRefresh()";this._debug(n,"begin");try{const s=await An(this.storage,this.storageKey);if(s&&this.userStorage){let i=await An(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!i&&(i={user:s.user},await Es(this.userStorage,this.storageKey+"-user",i)),s.user=(t=i==null?void 0:i.user)!==null&&t!==void 0?t:oc()}else if(s&&!s.user&&!s.user){const i=await An(this.storage,this.storageKey+"-user");i&&(i!=null&&i.user)?(s.user=i.user,await Be(this.storage,this.storageKey+"-user"),await Es(this.storage,this.storageKey,s)):s.user=oc()}if(this._debug(n,"session from storage",s),!this._isValidSession(s)){this._debug(n,"session is not valid"),s!==null&&await this._removeSession();return}const o=((r=s.expires_at)!==null&&r!==void 0?r:1/0)*1e3-Date.now()<sc;if(this._debug(n,`session has${o?"":" not"} expired with margin of ${sc}s`),o){if(this.autoRefreshToken&&s.refresh_token){const{error:i}=await this._callRefreshToken(s.refresh_token);i&&(console.error(i),Ka(i)||(this._debug(n,"refresh failed with a non-retryable error, removing the session",i),await this._removeSession()))}}else if(s.user&&s.user.__isUserNotAvailableProxy===!0)try{const{data:i,error:a}=await this._getUser(s.access_token);!a&&(i!=null&&i.user)?(s.user=i.user,await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)):this._debug(n,"could not get user data, skipping SIGNED_IN notification")}catch(i){console.error("Error getting user data:",i),this._debug(n,"error getting user data, skipping SIGNED_IN notification",i)}else await this._notifyAllSubscribers("SIGNED_IN",s)}catch(s){this._debug(n,"error",s),console.error(s);return}finally{this._debug(n,"end")}}async _callRefreshToken(t){var r,n;if(!t)throw new it;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const s=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(s,"begin");try{this.refreshingDeferred=new mu;const{data:o,error:i}=await this._refreshAccessToken(t);if(i)throw i;if(!o.session)throw new it;await this._saveSession(o.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",o.session);const a={data:o.session,error:null};return this.refreshingDeferred.resolve(a),a}catch(o){if(this._debug(s,"error",o),K(o)){const i={data:null,error:o};return Ka(o)||await this._removeSession(),(r=this.refreshingDeferred)===null||r===void 0||r.resolve(i),i}throw(n=this.refreshingDeferred)===null||n===void 0||n.reject(o),o}finally{this.refreshingDeferred=null,this._debug(s,"end")}}async _notifyAllSubscribers(t,r,n=!0){const s=`#_notifyAllSubscribers(${t})`;this._debug(s,"begin",r,`broadcast = ${n}`);try{this.broadcastChannel&&n&&this.broadcastChannel.postMessage({event:t,session:r});const o=[],i=Array.from(this.stateChangeEmitters.values()).map(async a=>{try{await a.callback(t,r)}catch(l){o.push(l)}});if(await Promise.all(i),o.length>0){for(let a=0;a<o.length;a+=1)console.error(o[a]);throw o[0]}}finally{this._debug(s,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0,await Be(this.storage,`${this.storageKey}-code-verifier`);const r=Object.assign({},t),n=r.user&&r.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!n&&r.user&&await Es(this.userStorage,this.storageKey+"-user",{user:r.user});const s=Object.assign({},r);delete s.user;const o=qm(s);await Es(this.storage,this.storageKey,o)}else{const s=qm(r);await Es(this.storage,this.storageKey,s)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await Be(this.storage,this.storageKey),await Be(this.storage,this.storageKey+"-code-verifier"),await Be(this.storage,this.storageKey+"-user"),this.userStorage&&await Be(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&ze()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}
226catch(r){console.error("removing visibilitychange callback failed",r)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),bs);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t);const r=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=r,r&&typeof r=="object"&&typeof r.unref=="function"?r.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(r)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t);const r=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,r&&clearTimeout(r)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const t=Date.now();try{return await this._useSession(async r=>{const{data:{session:n}}=r;if(!n||!n.refresh_token||!n.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const s=Math.floor((n.expires_at*1e3-t)/bs);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${bs}ms, refresh threshold is ${Kd} ticks`),s<=Kd&&await this._callRefreshToken(n.refresh_token)})}catch(r){console.error("Auto refresh tick failed with error. This is likely a transient error.",r)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t.isAcquireTimeout||t instanceof v_)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!ze()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(t){this._debug("#visibilityChangedCallback","error",t)}},window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const r=`#_onVisibilityChanged(${t})`;this._debug(r,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),t||(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!=="visible"){this._debug(r,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,r,n){const s=[`provider=${encodeURIComponent(r)}`];if(n!=null&&n.redirectTo&&s.push(`redirect_to=${encodeURIComponent(n.redirectTo)}`),n!=null&&n.scopes&&s.push(`scopes=${encodeURIComponent(n.scopes)}`),this.flowType==="pkce"){const[o,i]=await vs(this.storage,this.storageKey),a=new URLSearchParams({code_challenge:`${encodeURIComponent(o)}`,code_challenge_method:`${encodeURIComponent(i)}`});s.push(a.toString())}if(n!=null&&n.queryParams){const o=new URLSearchParams(n.queryParams);s.push(o.toString())}return n!=null&&n.skipBrowserRedirect&&s.push(`skip_http_redirect=${n.skipBrowserRedirect}`),`${t}?${s.join("&")}`}async _unenroll(t){try{return await this._useSession(async r=>{var n;const{data:s,error:o}=r;return o?this._returnResult({data:null,error:o}):await J(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token})})}catch(r){if(K(r))return this._returnResult({data:null,error:r});throw r}}async _enroll(t){try{return await this._useSession(async r=>{var n,s;const{data:o,error:i}=r;if(i)return this._returnResult({data:null,error:i});const a=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:t.factorType==="totp"?{issuer:t.issuer}:{}),{data:l,error:c}=await J(this.fetch,"POST",`${this.url}/factors`,{body:a,headers:this.headers,jwt:(n=o==null?void 0:o.session)===null||n===void 0?void 0:n.access_token});return c?this._returnResult({data:null,error:c}):(t.factorType==="totp"&&l.type==="totp"&&(!((s=l==null?void 0:l.totp)===null||s===void 0)&&s.qr_code)&&(l.totp.qr_code=`data:image/svg+xml;utf-8,${l.totp.qr_code}`),this._returnResult({data:l,error:null}))})}catch(r){if(K(r))return this._returnResult({data:null,error:r});throw r}}async _verify(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async r=>{var n;const{data:s,error:o}=r;if(o)return this._returnResult({data:null,error:o});const i=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?zC(t.webauthn.credential_response):WC(t.webauthn.credential_response)})}:{code:t.code}),{data:a,error:l}=await J(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:i,headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token});return l?this._returnResult({data:null,error:l}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+a.expires_in},a)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",a),this._returnResult({data:a,error:l}))})}catch(r){if(K(r))return this._returnResult({data:null,error:r});throw r}})}async _challenge(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async r=>{var n;const{data:s,error:o}=r;if(o)return this._returnResult({data:null,error:o});const i=await J(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token});if(i.error)return i;const{data:a}=i;if(a.type!=="webauthn")return{data:a,error:null};switch(a.webauthn.type){case"create":return{data:Object.assign(Object.assign({},a),{webauthn:Object.assign(Object.assign({},a.webauthn),{credential_options:Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:VC(a.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},a),{webauthn:Object.assign(Object.assign({},a.webauthn),{credential_options:Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:BC(a.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(r){if(K(r))return this._returnResult({data:null,error:r});throw r}})}async _challengeAndVerify(t){const{data:r,error:n}=await this._challenge({factorId:t.factorId});return n?this._returnResult({data:null,error:n}):await this._verify({factorId:t.factorId,challengeId:r.id,code:t.code})}async _listFactors(){var t;const{data:{user:r},error:n}=await this.getUser();if(n)return{data:null,error:n};const s={all:[],phone:[],totp:[],webauthn:[]};for(const o of(t=r==null?void 0:r.factors)!==null&&t!==void 0?t:[])s.all.push(o),o.status==="verified"&&s[o.factor_type].push(o);return{data:s,error:null}}async _getAuthenticatorAssuranceLevel(t){var r,n,s,o;if(t)try{const{payload:h}=Ca(t);let _=null;h.aal&&(_=h.aal);let y=_;const{data:{user:x},error:g}=await this.getUser(t);if(g)return this._returnResult({data:null,error:g});((n=(r=x==null?void 0:x.factors)===null||r===void 0?void 0:r.filter(b=>b.status==="verified"))!==null&&n!==void 0?n:[]).length>0&&(y="aal2");const w=h.amr||[];return{data:{currentLevel:_,nextLevel:y,currentAuthenticationMethods:w},error:null}}catch(h){if(K(h))return this._returnResult({data:null,error:h});throw h}const{data:{session:i},error:a}
226=await this.getSession();if(a)return this._returnResult({data:null,error:a});if(!i)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:l}=Ca(i.access_token);let c=null;l.aal&&(c=l.aal);let d=c;((o=(s=i.user.factors)===null||s===void 0?void 0:s.filter(h=>h.status==="verified"))!==null&&o!==void 0?o:[]).length>0&&(d="aal2");const p=l.amr||[];return{data:{currentLevel:c,nextLevel:d,currentAuthenticationMethods:p},error:null}}async _getAuthorizationDetails(t){try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;return s?this._returnResult({data:null,error:s}):n?await J(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:n.access_token,xform:o=>({data:o,error:null})}):this._returnResult({data:null,error:new it})})}catch(r){if(K(r))return this._returnResult({data:null,error:r});throw r}}async _approveAuthorization(t,r){try{return await this._useSession(async n=>{const{data:{session:s},error:o}=n;if(o)return this._returnResult({data:null,error:o});if(!s)return this._returnResult({data:null,error:new it});const i=await J(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"approve"},xform:a=>({data:a,error:null})});return i.data&&i.data.redirect_url&&ze()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(i.data.redirect_url),i})}catch(n){if(K(n))return this._returnResult({data:null,error:n});throw n}}async _denyAuthorization(t,r){try{return await this._useSession(async n=>{const{data:{session:s},error:o}=n;if(o)return this._returnResult({data:null,error:o});if(!s)return this._returnResult({data:null,error:new it});const i=await J(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"deny"},xform:a=>({data:a,error:null})});return i.data&&i.data.redirect_url&&ze()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(i.data.redirect_url),i})}catch(n){if(K(n))return this._returnResult({data:null,error:n});throw n}}async _listOAuthGrants(){try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;return n?this._returnResult({data:null,error:n}):r?await J(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,xform:s=>({data:s,error:null})}):this._returnResult({data:null,error:new it})})}catch(t){if(K(t))return this._returnResult({data:null,error:t});throw t}}async _revokeOAuthGrant(t){try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;return s?this._returnResult({data:null,error:s}):n?(await J(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,query:{client_id:t.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new it})})}catch(r){if(K(r))return this._returnResult({data:null,error:r});throw r}}async fetchJwk(t,r={keys:[]}){let n=r.keys.find(a=>a.kid===t);if(n)return n;const s=Date.now();if(n=this.jwks.keys.find(a=>a.kid===t),n&&this.jwks_cached_at+oC>s)return n;const{data:o,error:i}=await J(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(i)throw i;return!o.keys||o.keys.length===0||(this.jwks=o,this.jwks_cached_at=s,n=o.keys.find(a=>a.kid===t),!n)?null:n}async getClaims(t,r={}){try{let n=t;if(!n){const{data:h,error:_}
226=await this.getSession();if(_||!h.session)return this._returnResult({data:null,error:_});n=h.session.access_token}const{header:s,payload:o,signature:i,raw:{header:a,payload:l}}=Ca(n);r!=null&&r.allowExpired||EC(o.exp);const c=!s.alg||s.alg.startsWith("HS")||!s.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(s.kid,r!=null&&r.keys?{keys:r.keys}:r==null?void 0:r.jwks);if(!c){const{error:h}=await this.getUser(n);if(h)throw h;return{data:{claims:o,header:s,signature:i},error:null}}const d=SC(s.alg),f=await crypto.subtle.importKey("jwk",c,d,!0,["verify"]);if(!await crypto.subtle.verify(d,f,i,cC(`${a}.${l}`)))throw new Al("Invalid JWT signature");return{data:{claims:o,header:s,signature:i},error:null}}catch(n){if(K(n))return this._returnResult({data:null,error:n});throw n}}}yo.nextInstanceID={};const b_=yo,ZC="2.95.3";let Xo="";typeof Deno<"u"?Xo="deno":typeof document<"u"?Xo="web":typeof navigator<"u"&&navigator.product==="ReactNative"?Xo="react-native":Xo="node";const eA={"X-Client-Info":`supabase-js-${Xo}/${ZC}`},tA={headers:eA},rA={schema:"public"},nA={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},sA={};function Mi(e){"@babel/helpers - typeof";return Mi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mi(e)}function oA(e,t){if(Mi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Mi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function iA(e){var t=oA(e,"string");return Mi(t)=="symbol"?t:t+""}function aA(e,t,r){return(t=iA(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Zm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function je(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Zm(Object(r),!0).forEach(function(n){aA(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const lA=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),uA=()=>Headers,cA=(e,t,r)=>{const n=lA(r),s=uA();return async(o,i)=>{var a;const l=(a=await t())!==null&&a!==void 0?a:e;let c=new s(i==null?void 0:i.headers);return c.has("apikey")||c.set("apikey",e),c.has("Authorization")||c.set("Authorization",`Bearer ${l}`),n(o,je(je({},i),{},{headers:c}))}};function dA(e){return e.endsWith("/")?e:e+"/"}function hA(e,t){var r,n;const{db:s,auth:o,realtime:i,global:a}=e,{db:l,auth:c,realtime:d,global:f}=t,p={db:je(je({},l),s),auth:je(je({},c),o),realtime:je(je({},d),i),storage:{},global:je(je(je({},f),a),{},{headers:je(je({},(r=f==null?void 0:f.headers)!==null&&r!==void 0?r:{}),(n=a==null?void 0:a.headers)!==null&&n!==void 0?n:{})}),accessToken:async()=>""};return e.accessToken?p.accessToken=e.accessToken:delete p.accessToken,p}function fA(e){const t=e==null?void 0:e.trim();if(!t)throw new Error("supabaseUrl is required.");if(!t.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(dA(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var pA=class extends b_{constructor(e){super(e)}},E_=class{constructor(e,t,r){var n,s;this.supabaseUrl=e,this.supabaseKey=t;const o=fA(e);if(!t)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",o),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",o),this.storageUrl=new URL("storage/v1",o),this.functionsUrl=new URL("functions/v1",o);const i=`sb-${o.hostname.split(".")[0]}-auth-token`,a={db:rA,realtime:sA,auth:je(je({},nA),{},{storageKey:i}),global:tA},l=hA(r??{},a);if(this.storageKey=(n=l.auth.storageKey)!==null&&n!==void 0?n:"",this.headers=(s=l.global.headers)!==null&&s!==void 0?s:{},l.accessToken)this.accessToken=l.accessToken,this.auth=new Proxy({},{get:(d,f)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(f)} is not possible`)}});else{var c;this.auth=this._initSupabaseAuthClient((c=l.auth)!==null&&c!==void 0?c:{},this.headers,l.global.fetch)}this.fetch=cA(t,this._getAccessToken.bind(this),l.global.fetch),this.realtime=this._initRealtimeClient(je({headers:this.headers,accessToken:this._getAccessToken.bind(this)},l.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(d=>this.realtime.setAuth(d)).catch(d=>console.warn("Failed to set initial Realtime auth token:",d)),this.rest=new uR(new URL("rest/v1",o).href,{headers:this.headers,schema:l.db.schema,fetch:this.fetch,timeout:l.db.timeout,urlLengthLimit:l.db.urlLengthLimit}),this.storage=new eC(this.storageUrl.href,this.headers,this.fetch,r==null?void 0:r.storage),l.accessToken||this._listenForAuthEvents()}get functions(){return new rR(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},r={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,t,r)}
226channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var e=this,t,r;if(e.accessToken)return await e.accessToken();const{data:n}=await e.auth.getSession();return(t=(r=n.session)===null||r===void 0?void 0:r.access_token)!==null&&t!==void 0?t:e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,userStorage:s,storageKey:o,flowType:i,lock:a,debug:l,throwOnError:c},d,f){const p={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new pA({url:this.authUrl.href,headers:je(je({},p),d),storageKey:o,autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,userStorage:s,flowType:i,lock:a,debug:l,throwOnError:c,fetch:f,hasCustomAuthorizationHeader:Object.keys(this.headers).some(h=>h.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new n_(this.realtimeUrl.href,je(je({},e),{},{params:je(je({},{apikey:this.supabaseKey}),e==null?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,t)=>{this._handleTokenChanged(e,"CLIENT",t==null?void 0:t.access_token)})}_handleTokenChanged(e,t,r){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==r?(this.changedAccessToken=r,this.realtime.setAuth(r)):e==="SIGNED_OUT"&&(this.realtime.setAuth(),t=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const S_=(e,t,r)=>new E_(e,t,r);function mA(){if(typeof window<"u")return!1;const e=globalThis.process;if(!e)return!1;const t=e.version;if(t==null)return!1;const r=t.match(/^v(\d+)\./);return r?parseInt(r[1],10)<=18:!1}mA()&&console.warn("â ï¸ Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");const P2=Object.freeze(Object.defineProperty({__proto__:null,AuthApiError:u_,AuthClient:b_,AuthError:vo,AuthImplicitGrantRedirectError:Yo,AuthInvalidCredentialsError:Jo,AuthInvalidJwtError:Al,AuthInvalidToken
226ResponseError:Ln,AuthPKCECodeVerifierMissingError:h_,AuthPKCEGrantCodeExchangeError:Qd,AuthRetryableFetchError:Cl,AuthSessionMissingError:it,AuthUnknownError:Gr,AuthWeakPasswordError:Jd,CustomAuthError:pr,get FunctionRegion(){return Rl},FunctionsError:hu,FunctionsFetchError:Qw,FunctionsHttpError:Ud,FunctionsRelayError:Md,GoTrueAdminApi:g_,GoTrueClient:yo,NavigatorLockAcquireTimeoutError:y_,PostgrestError:Jw,get REALTIME_LISTEN_TYPES(){return qs},get REALTIME_POSTGRES_CHANGES_LISTEN_EVENT(){return Wd},get REALTIME_PRESENCE_LISTEN_EVENTS(){return zd},get REALTIME_SUBSCRIBE_STATES(){return rr},RealtimeChannel:Vn,RealtimeClient:n_,RealtimePresence:Hs,SIGN_OUT_SCOPES:Ga,SupabaseClient:E_,WebSocketFactory:Xw,createClient:S_,isAuthApiError:c_,isAuthError:K,isAuthImplicitGrantRedirectError:d_,isAuthRetryableFetchError:Ka,isAuthSessionMissingError:qa,lockInternals:Dn,navigatorLock:w_},Symbol.toStringTag,{value:"Module"}));function gA(){var x,g;if(typeof window>"u")return;const e=location.hostname,r=["lovableproject.com","lovableproject-dev.com","lovable.app","gpt-eng.com","gptengineer.run"].some(m=>e===m||e.endsWith("."+m)),n="[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}",s=r?((x=e.match(new RegExp("^(?:id-preview(?:-[a-z0-9]+)?|project)--("+n+")(?:-dev)?(?=\\.|$)","i")))==null?void 0:x[1])??((g=e.match(new RegExp("^("+n+")(?=[.-])","i")))==null?void 0:g[1]):void 0,o=window.parent&&window.parent!==window;if(!s||!o)return localStorage;const i=e.endsWith(".lovableproject-dev.com")||e.endsWith(".gpt-eng.com"),a=i?/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$|^http:\/\/localhost:3000$/:/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$/,l=location.ancestorOrigins&&location.ancestorOrigins[0]||(document.referrer?new URL(document.referrer).origin:""),c=l&&a.test(l)?[l]:i?["https://lovable.dev","http://localhost:3000"]:["https://lovable.dev"],d="lovable-preview-auth:result",f=2e3,p=()=>Math.random().toString(36).slice(2)+Date.now().toString(36),h=(m,w,b)=>new Promise(P=>{const T=p();let R=!1,O;const $=N=>{R||(R=!0,clearTimeout(O),window.removeEventListener("message",C),P(N))},C=N=>{if(c.indexOf(N.origin)<0)return;const B=N.data;B&&B.type===d&&B.requestId===T&&$(B)};window.addEventListener("message",C);const D={type:m,requestId:T,projectId:s,key:w};b!==void 0&&(D.value=b);for(const N of c)window.parent.postMessage(D,N);O=setTimeout(()=>$(null),f)});let _=!0;const y=250;return{getItem:async m=>{let w=await h("lovable-preview-auth:get",m);return!w&&_&&(await new Promise(b=>setTimeout(b,y)),w=await h("lovable-preview-auth:get",m)),_=!1,w&&w.ok&&typeof w.value=="string"?w.value===""?(localStorage.removeItem(m),null):w.value:localStorage.getItem(m)},setItem:(m,w)=>(localStorage.setItem(m,w),h("lovable-preview-auth:set",m,w).then(b=>{b&&b.ok&&typeof b.value=="string"&&localStorage.getItem(m)===w&&(b.value===""?localStorage.removeItem(m):localStorage.setItem(m,b.value))})),removeItem:m=>(localStorage.removeItem(m),h("lovable-preview-auth:remove",m).then(()=>{}))}}const vA="https://dwlxvjllunpogmsxwlrl.supabase.co",yA="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImR3bHh2amxsdW5wb2dtc3h3bHJsIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzA5MDY5MjQsImV4cCI6MjA4NjQ4MjkyNH0.yJNCmebmDmersijw7FH-0ybSfHHUeZGUwLN2z5F13oc",le=S_(vA,yA,{auth:{storage:gA(),persistSession:!0,autoRefreshToken:!0}}),T2=Object.freeze(Object.defineProperty({__proto__:null,supabase:le},Symbol.toStringTag,{value:"Module"}));var wA="authorization_response",_A="/~oauth/initiate",xA=["https://oauth.lovable.app","https://lovable.dev"],bA="lovable://oauth-callback",EA="http://127.0.0.1/iframe-oauth/callback",SA=500,kA=12e4;function PA(e){let t;const r=new Promise(o=>{t=o}),n=o=>{if(!e.some(l=>o.origin===l))return;const a=o.data;!a||typeof a!="object"||a.type===wA&&t(a.response)},s=()=>{window.removeEventListener("message",n)};return window.addEventListener("message",n),{cleanup:s,messagePromise:r}}function TA(e){const t=window.screenX!==0||window.screenY!==0||!e,r=t?window.outerWidth*.5:window.screen.width*.5,n=t?window.outerHeight*.5:window.screen.height*.5,s=t?window.screenX+(window.outerWidth-r)/2:(window.screen.width-r)/2,o=t?window.screenY+(window.outerHeight-n)/2:(window.screen.height-n)/2;return{width:r,height:n,left:s,top:o}}function eg(e,t){return e.state!==t?{error:new Error("State is invali
226d")}:e.error?e.error==="legacy_flow"?{error:new Error("This flow is not supported in Preview mode. Please open the app in a new tab to sign in.")}:{error:new Error(e.error_description??"Sign in failed")}:!e.access_token||!e.refresh_token?{error:new Error("No tokens received")}:{tokens:{access_token:e.access_token,refresh_token:e.refresh_token},error:null}}function jA(){const e=navigator.userAgent;return!!(/iPhone|iPad|iPod|Android/i.test(e)||/Macintosh/i.test(e)&&navigator.maxTouchPoints>1)}function RA(){return typeof crypto<"u"&&crypto.getRandomValues?[...crypto.getRandomValues(new Uint8Array(16))].map(e=>e.toString(16).padStart(2,"0")).join(""):Math.random().toString(36).substring(2)+Date.now().toString(36)}function CA(e={}){const t=e.oauthBrokerUrl??_A,r=e.supportedOAuthOrigins??xA;async function n(s,o={}){let i=!1;try{i=window.self!==window.top}catch{i=!0}const a=navigator.userAgent,l=/LovableApp\//.test(a),c=!l&&/lovable/i.test(a),d=RA();let f=o.redirect_uri??window.location.origin;l&&i?f=bA:c&&i&&(f=EA);const p=new URLSearchParams({...o.extraParams,provider:s,redirect_uri:f,state:d});if(!i)return window.location.href=`${t}?${p.toString()}`,{error:null,redirected:!0};!l&&!c&&p.set("response_mode","web_message");const h=`${t}?${p.toString()}`,_=c?[...r,window.location.origin]:r,{messagePromise:y,cleanup:x}=PA(_);let g;if(jA())g=window.open(h,"_blank");else{const{width:b,height:P,left:T,top:R}=TA(i);g=window.open(h,"oauth",`width=${b},height=${P},left=${T},top=${R}`)}if(!g&&(l||c)){let b;const P=new Promise((T,R)=>{b=setTimeout(()=>{R(new Error("OAuth timed out waiting for response"))},kA)});try{const T=await Promise.race([y,P]);return eg(T,d)}catch(T){return{error:T instanceof Error?T:new Error(String(T))}}finally{b&&clearTimeout(b),x()}}if(!g)return x(),{error:new Error("Popup was blocked")};let m;const w=new Promise((b,P)=>{m=setInterval(()=>{g.closed&&(clearInterval(m),P(new Error("Sign in was cancelled")))},SA)});try{const b=await Promise.race([y,w]);return eg(b,d)}catch(b){return{error:b instanceof Error?b:new Error(String(b))}}finally{clearInterval(m),x(),g==null||g.close()}}return{signInWithOAuth:n}}var AA={name:"@lovable.dev/cloud-auth-js",version:"1.1.1",description:"Lovable Cloud Auth JS",main:"./dist/index.cjs",module:"./dist/index.js",types:"./dist/index.d.ts",type:"module",files:["dist"],scripts:{build:"tsup src/index.ts --format cjs,esm --dts --outDir dist",dev:"tsup src/index.ts --format cjs,esm --dts --watch",test:"vitest run",typecheck:"tsgo --noEmit",prepublishOnly:"npm run clean && npm run build",clean:"rimraf dist"},keywords:["lovable","oauth","authentication"],license:"MIT",devDependencies:{"@types/node":"^22",jsdom:"^26",rimraf:"^5.0.0",tsup:"^7.2.0",typescript:"^5",vitest:"^4.1.0"}};typeof window<"u"&&(window.__lovable_cloud_auth_js_version=AA.version);function OA(e={}){return CA(e)}const IA=OA(),tg={auth:{signInWithOAuth:async(e,t)=>{const r=await IA.signInWithOAuth(e,{redirect_uri:t==null?void 0:t.redirect_uri,extraParams:{...t==null?void 0:t.extraParams}});if(r.redirected||r.error)return r;try{await le.auth.setSession(r.tokens)}catch(n){return{error:n instanceof Error?n:new Error(String(n))}}return r}}},rg=e=>e&&typeof e=="object"?e:{},Sf=v.createContext(void 0),LA=({children:e})=>{const t=Dw(),r=v.useRef(void 0),[n,s]=v.useState(null),[o,i]=v.useState(null),[a,l]=v.useState(!0),[c,d]=v.useState("member"),[f,p]=v.useState(!1),h=v.useRef("member"),_=v.useCallback(C=>{h.current=C,d(C)},[]),y=v.useCallback(()=>{try{return!!window.localStorage.getItem("emai:motion-studio-active-render")}catch{return!1}},[]),x=v.useRef(null),g=v.useCallback(async(C,D=0)=>{try{const{data:N,error:B}=await le.from("user_roles").select("role").eq("user_id",C).order("role",{ascending:!0});if(B){console.warn("Role refresh failed; preserving current role:",B.message),D<3&&setTimeout(()=>{var M;(M=x.current)==null||M.call(x,C,D+1)},600*(D+1));return}if(N&&N.length>0){const M=N.map(Q=>Q.role);M.includes("super_admin")?_("super_admin"):M.includes("admin")?_("admin"):M.includes("builder")?_("builder"):M.includes("gift")?_("gift"):M.includes("free")?_("free"):M.includes("past_due")?_("past_due"):M.includes("canceled")?_("canceled"):_("member")}else _("member");p(!0)}catch(N){console.warn("Role refresh failed; preserving current role:",N),D<3&&setTimeout(()=>{var B;(B=x.current)==null||B.call(x,C,D+1)},600*(D+1))}},[_]);x.current=g,v.useEffect(()=>{let C=!1;const D=(B,M)=>{var L;const Q=((L=B==null?void 0:B.user)==null?void 0:L.id)??null;if(r.current!==void 0&&r.current!==Q&&t.clear(),r.current=Q,i(B),s((B==null?void 0:B.user)??null),!(B!=null&&B.user)){_("member"),p(!0),l(!1);return}M&&l(!0),setTimeout(async()=>{await g(B.user.id),M&&l(!1)},0)},{data:{subscription:N}}=le.auth.onAuthStateChange((B,M)=>{D(M,!C),C=!0});return le.auth.getSession().then(({data:{session:B}})=>{C||(D(B,!0),C=!0)}),()=>N.unsubscribe()},[g,_,t]),v.useEffect(()=>{if(!(n!=null&&n.id))return;const C=()=>{g(n.id)},D=async()=>{var Q;try{const{data:L}=await le.auth.getSession();let z=L==null?void 0:L.session;const A=(z==null?void 0:z.expires_at)??0,I=Math.floor(Date.now()/1e3);if(!z||A-I<60){const{data:ee}=await le.auth.refreshSession();z=(ee==null?void 0:ee.session)??z}const W=z==null?void 0:z.access_token;if(!W)return;const{data:Z,error:G}=await le.functions.invoke("check-subscription-status",{headers:{Authorization:`Bearer ${W}`}}),ne=rg(Z);if(ne.fallback){console.warn("Subscription status temporarily unavailable; preserving current session.");return}if(G){console.warn("Subscription status check failed; preserving current session:",G.message);return}if(ne.error==="TOKEN_EXPIRED"){const{data:ee}=await le.auth.refreshSession(),be=(Q=ee==null?void 0:ee.session)==null?void 0:Q.access_token;if(be){const Le=await le.functions.invoke("check-subscription-status",{headers:{Authorization:`Bearer ${be}`}});if(rg(Le.data).fallback||Le.error)return}}await g(n.id)}catch(L){console.warn("Subscription status check failed:",L)}},N=()=>{y()||document.visibilityState==="visible"&&C()},B=()=>{y()||C()};window.addEventListener("focus",B),document.addEventListener("visibilitychange",N),D();const M=setInterval(D,5*60*1e3);return()=>{window.removeEventListener("focus",B),document.removeEventListener("visibilitychange",N),clearInterval(M)}},[n==null?void 0:n.id,g,y]),v.useEffect(()=>{n!=null&&n.id&&(async()=>{try{const C=Intl.DateTimeFormat().resolvedOptions().timeZone;if(!C)return;const{data:D}=await le.from("profiles").select("timezone").eq("user_id",n.id).maybeSingle();if((D==null?void 0:D.timezone)===C)return;await le.from("profiles").update({timezone:C}).eq("user_id",n.id)}catch{}})()},[n==null?void 0:n.id]);const m=async(C,D,N)=>{const{error:B}=await le.auth.signUp({email:C,password:D,options:{data:{full_name:N},emailRedirectTo:"https://expertmedia.app/login?verified=true"}});return{error:B}},w=async(C,D)=>{const{error:N}=await le.auth.signInWithPassword({email:C,password:D});return{error:N}},b=async C=>{const D=await tg.auth.signInWithOAuth("google",{redirect_uri:C||window.location.origin+"/dashboard"});return{error:D.error?D.error:null}},P=async C=>{const D=await tg.auth.signInWithOAuth("apple",{redirect_uri:C||window.location.origin+"/dashboard"});return{error:D.error?D.error:null}},T=async()=>{await le.auth.signOut()},R=c==="builder"||c==="gift"||c==="admin"||c==="super_admin",O=c==="admin"||c==="super_admin",$=c==="super_admin";return u.jsx(Sf.Provider,{value:{user:n,session:o,loading:a,userRole:c,roleResolved:f,isBuilder:R,isAdmin:O,isSuperAdmin:$,signUp:m,signIn:w,signInWithGoogle:b,signInWithApple:P,signOut:T},children:e})},Pn=()=>{const e=v.useContext(Sf);if(!e)throw new Error("useAuth must be used within an AuthProvider");return e},k_=v.createContext(null),NA=({children:e})=>{const t=v.useRef(null);
226!t.current&&typeof window<"u"&&(t.current=new Audio,t.current.preload="metadata");const[r,n]=v.useState([]),[s,o]=v.useState(0),[i,a]=v.useState(!1),[l,c]=v.useState(!1),[d,f]=v.useState("off"),[p,h]=v.useState(0),[_,y]=v.useState(0),[x,g]=v.useState(.9),m=r[s]??null;v.useEffect(()=>{const L=t.current,z=()=>h(L.currentTime),A=()=>y(L.duration||0),I=()=>{d==="one"?(L.currentTime=0,L.play().catch(()=>{})):O.current()},W=()=>a(!0),Z=()=>a(!1);return L.addEventListener("timeupdate",z),L.addEventListener("loadedmetadata",A),L.addEventListener("ended",I),L.addEventListener("play",W),L.addEventListener("pause",Z),()=>{L.removeEventListener("timeupdate",z),L.removeEventListener("loadedmetadata",A),L.removeEventListener("ended",I),L.removeEventListener("play",W),L.removeEventListener("pause",Z)}},[d]),v.useEffect(()=>{const L=t.current,z=(m==null?void 0:m.audio_url)||(m==null?void 0:m.stream_audio_url)||"";L.src!==z&&(L.src=z,z&&L.play().catch(()=>{}))},[m==null?void 0:m.id,m==null?void 0:m.audio_url,m==null?void 0:m.stream_audio_url]),v.useEffect(()=>{t.current&&(t.current.volume=x)},[x]);const w=v.useCallback((L,z)=>{const A=z&&z.length?z:[L],I=A.findIndex(W=>W.id===L.id);n(A),o(I>=0?I:0)},[]),b=v.useCallback((L,z=0)=>{n(L),o(Math.max(0,Math.min(z,L.length-1)))},[]),P=v.useCallback(()=>{const L=t.current;L.paused?L.play().catch(()=>{}):L.pause()},[]),T=v.useCallback(()=>{o(L=>{if(r.length===0)return 0;if(l)return Math.floor(Math.random()*r.length);const z=L+1;return z>=r.length?d==="all"?0:L:z})},[r.length,l,d]),R=v.useCallback(()=>{const L=t.current;if(L.currentTime>3){L.currentTime=0;return}o(z=>Math.max(0,z-1))},[]),O=v.useRef(T);v.useEffect(()=>{O.current=T},[T]);const $=v.useCallback(L=>{t.current&&(t.current.currentTime=L)},[]),C=v.useCallback(L=>g(Math.max(0,Math.min(1,L))),[]),D=v.useCallback(()=>c(L=>!L),[]),N=v.useCallback(()=>f(L=>L==="off"?"all":L==="all"?"one":"off"),[]),B=v.useCallback(L=>n(z=>[...z,L]),[]),M=v.useCallback(()=>{var L;n([]),o(0),(L=t.current)==null||L.pause()},[]),Q=v.useMemo(()=>({current:m,queue:r,index:s,isPlaying:i,shuffle:l,loop:d,position:p,duration:_,volume:x,playTrack:w,playQueue:b,toggle:P,next:T,prev:R,seek:$,setVolume:C,toggleShuffle:D,cycleLoop:N,enqueue:B,clear:M}),[m,r,s,i,l,d,p,_,x,w,b,P,T,R,$,C,D,N,B,M]);return u.jsx(k_.Provider,{value:Q,children:e})},DA=()=>{const e=v.useContext(k_);if(!e)throw new Error("useMusicPlayer must be used within MusicPlayerProvider");return e};function P_(e,[t,r]){return Math.min(r,Math.max(t,e))}var $A=v.createContext(void 0);function MA(e){const t=v.useContext($A);return e||t||"ltr"}function UA(e){const t=v.useRef({value:e,previous:e});return v.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var T_=["PageUp","PageDown"],j_=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],R_={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Ro="Slider",[Yd,FA,VA]=i0(Ro),[C_,j2]=bo(Ro,[VA]),[BA,gu]=C_(Ro),A_=v.forwardRef((e,t)=>{const{name:r,min:n=0,max:s=100,step:o=1,orientation:i="horizontal",disabled:a=!1,minStepsBetweenThumbs:l=0,defaultValue:c=[n],value:d,onValueChange:f=()=>{},onValueCommit:p=()=>{},inverted:h=!1,form:_,...y}=e,x=v.useRef(new Set),g=v.useRef(0),w=i==="horizontal"?zA:WA,[b=[],P]=ef({prop:d,defaultProp:c,onChange:D=>{var B;(B=[...x.current][g.current])==null||B.focus(),f(D)}}),T=v.useRef(b);function R(D){const N=QA(b,D);C(D,N)}function O(D){C(D,g.current)}function $(){const D=T.current[g.current];b[g.current]!==D&&p(b)}function C(D,N,{commit:B}={commit:!1}){const M=ZA(o),Q=eO(Math.round((D-n)/o)*o+n,M),L=P_(Q,[n,s]);P((z=[])=>{const A=KA(z,L,N);if(XA(A,l*o)){g.current=A.indexOf(L);const I=String(A)!==String(z);return I&&B&&p(A),I?A:z}else return z})}return u.jsx(BA,{scope:e.__scopeSlider,name:r,disabled:a,min:n,max:s,valueIndexToChangeRef:g,thumbs:x.current,values:b,orientation:i,form:_,children:u.jsx(Yd.Provider,{scope:e.__scopeSlider,children:u.jsx(Yd.Slot,{scope:e.__scopeSlider,children:u.jsx(w,{"aria-disabled":a,"data-disabled":a?"":void 0,...y,ref:t,onPointerDown:ye(y.onPointerDown,()=>{a||(T.current=b)}),min:n,max:s,inverted:h,onSlideStart:a?void 0:R,onSlideMove:a?void 0:O,onSlideEnd:a?void 0:$,onHomeKeyDown:()=>!a&&C(n,0,{commit:!0}),onEndKeyDown:()=>!a&&C(s,b.length-1,{commit:!0}),onStepKeyDown:({event:D,direction:N})=>{if(!a){const Q=T_.includes(D.key)||D.shiftKey&&j_.includes(D.key)?10:1,L=g.current,z=b[L],A=o*Q*N;
226C(z+A,L,{commit:!0})}}})})})})});A_.displayName=Ro;var[O_,I_]=C_(Ro,{startEdge:"left",endEdge:"right",size:"width",direction:1}),zA=v.forwardRef((e,t)=>{const{min:r,max:n,dir:s,inverted:o,onSlideStart:i,onSlideMove:a,onSlideEnd:l,onStepKeyDown:c,...d}=e,[f,p]=v.useState(null),h=Ge(t,w=>p(w)),_=v.useRef(void 0),y=MA(s),x=y==="ltr",g=x&&!o||!x&&o;function m(w){const b=_.current||f.getBoundingClientRect(),P=[0,b.width],R=kf(P,g?[r,n]:[n,r]);return _.current=b,R(w-b.left)}return u.jsx(O_,{scope:e.__scopeSlider,startEdge:g?"left":"right",endEdge:g?"right":"left",direction:g?1:-1,size:"width",children:u.jsx(L_,{dir:y,"data-orientation":"horizontal",...d,ref:h,style:{...d.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:w=>{const b=m(w.clientX);i==null||i(b)},onSlideMove:w=>{const b=m(w.clientX);a==null||a(b)},onSlideEnd:()=>{_.current=void 0,l==null||l()},onStepKeyDown:w=>{const P=R_[g?"from-left":"from-right"].includes(w.key);c==null||c({event:w,direction:P?-1:1})}})})}),WA=v.forwardRef((e,t)=>{const{min:r,max:n,inverted:s,onSlideStart:o,onSlideMove:i,onSlideEnd:a,onStepKeyDown:l,...c}=e,d=v.useRef(null),f=Ge(t,d),p=v.useRef(void 0),h=!s;function _(y){const x=p.current||d.current.getBoundingClientRect(),g=[0,x.height],w=kf(g,h?[n,r]:[r,n]);return p.current=x,w(y-x.top)}return u.jsx(O_,{scope:e.__scopeSlider,startEdge:h?"bottom":"top",endEdge:h?"top":"bottom",size:"height",direction:h?1:-1,children:u.jsx(L_,{"data-orientation":"vertical",...c,ref:f,style:{...c.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:y=>{const x=_(y.clientY);o==null||o(x)},onSlideMove:y=>{const x=_(y.clientY);i==null||i(x)},onSlideEnd:()=>{p.current=void 0,a==null||a()},onStepKeyDown:y=>{const g=R_[h?"from-bottom":"from-top"].includes(y.key);l==null||l({event:y,direction:g?-1:1})}})})}),L_=v.forwardRef((e,t)=>{const{__scopeSlider:r,onSlideStart:n,onSlideMove:s,onSlideEnd:o,onHomeKeyDown:i,onEndKeyDown:a,onStepKeyDown:l,...c}=e,d=gu(Ro,r);return u.jsx(Ae.span,{...c,ref:t,onKeyDown:ye(e.onKeyDown,f=>{f.key==="Home"?(i(f),f.preventDefault()):f.key==="End"?(a(f),f.preventDefault()):T_.concat(j_).includes(f.key)&&(l(f),f.preventDefault())}),onPointerDown:ye(e.onPointerDown,f=>{const p=f.target;p.setPointerCapture(f.pointerId),f.preventDefault(),d.thumbs.has(p)?p.focus():n(f)}),onPointerMove:ye(e.onPointerMove,f=>{f.target.hasPointerCapture(f.pointerId)&&s(f)}),onPointerUp:ye(e.onPointerUp,f=>{const p=f.target;p.hasPointerCapture(f.pointerId)&&(p.releasePointerCapture(f.pointerId),o(f))})})}),N_="SliderTrack",D_=v.forwardRef((e,t)=>{const{__scopeSlider:r,...n}=e,s=gu(N_,r);return u.jsx(Ae.span,{"data-disabled":s.disabled?"":void 0,"data-orientation":s.orientation,...n,ref:t})});D_.displayName=N_;var Xd="SliderRange",$_=v.forwardRef((e,t)=>{const{__scopeSlider:r,...n}=e,s=gu(Xd,r),o=I_(Xd,r),i=v.useRef(null),a=Ge(t,i),l=s.values.length,c=s.values.map(p=>F_(p,s.min,s.max)),d=l>1?Math.min(...c):0,f=100-Math.max(...c);return u.jsx(Ae.span,{"data-orientation":s.orientation,"data-disabled":s.disabled?"":void 0,...n,ref:a,style:{...e.style,[o.startEdge]:d+"%",[o.endEdge]:f+"%"}})});$_.displayName=Xd;var Zd="SliderThumb",M_=v.forwardRef((e,t)=>{const r=FA(e.__scopeSlider),[n,s]=v.useState(null),o=Ge(t,a=>s(a)),i=v.useMemo(()=>n?r().findIndex(a=>a.ref.current===n):-1,[r,n]);return u.jsx(HA,{...e,ref:o,index:i})}),HA=v.forwardRef((e,t)=>{const{__scopeSlider:r,index:n,name:s,...o}=e,i=gu(Zd,r),a=I_(Zd,r),[l,c]=v.useState(null),d=Ge(t,m=>c(m)),f=l?i.form||!!l.closest("form"):!0,p=iw(l),h=i.values[n],_=h===void 0?0:F_(h,i.min,i.max),y=GA(n,i.values.length),x=p==null?void 0:p[a.size],g=x?JA(x,_,a.direction):0;return v.useEffect(()=>{if(l)return i.thumbs.add(l),()=>{i.thumbs.delete(l)}},[l,i.thumbs]),u.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[a.startEdge]:`calc(${_}% + ${g}px)`},children:[u.jsx(Yd.ItemSlot,{scope:e.__scopeSlider,children:u.jsx(Ae.
226span,{role:"slider","aria-label":e["aria-label"]||y,"aria-valuemin":i.min,"aria-valuenow":h,"aria-valuemax":i.max,"aria-orientation":i.orientation,"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,tabIndex:i.disabled?void 0:0,...o,ref:d,style:h===void 0?{display:"none"}:e.style,onFocus:ye(e.onFocus,()=>{i.valueIndexToChangeRef.current=n})})}),f&&u.jsx(U_,{name:s??(i.name?i.name+(i.values.length>1?"[]":""):void 0),form:i.form,value:h},n)]})});M_.displayName=Zd;var qA="RadioBubbleInput",U_=v.forwardRef(({__scopeSlider:e,value:t,...r},n)=>{const s=v.useRef(null),o=Ge(s,n),i=UA(t);return v.useEffect(()=>{const a=s.current;if(!a)return;const l=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(l,"value").set;if(i!==t&&d){const f=new Event("input",{bubbles:!0});d.call(a,t),a.dispatchEvent(f)}},[i,t]),u.jsx(Ae.input,{style:{display:"none"},...r,ref:o,defaultValue:t})});U_.displayName=qA;function KA(e=[],t,r){const n=[...e];return n[r]=t,n.sort((s,o)=>s-o)}function F_(e,t,r){const o=100/(r-t)*(e-t);return P_(o,[0,100])}function GA(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function QA(e,t){if(e.length===1)return 0;const r=e.map(s=>Math.abs(s-t)),n=Math.min(...r);return r.indexOf(n)}function JA(e,t,r){const n=e/2,o=kf([0,50],[0,n]);return(n-o(t)*r)*r}function YA(e){return e.slice(0,-1).map((t,r)=>e[r+1]-t)}function XA(e,t){if(t>0){const r=YA(e);return Math.min(...r)>=t}return!0}function kf(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function ZA(e){return(String(e).split(".")[1]||"").length}function eO(e,t){const r=Math.pow(10,t);return Math.round(e*r)/r}var V_=A_,tO=D_,rO=$_,nO=M_;const eh=v.forwardRef(({className:e,...t},r)=>u.jsxs(V_,{ref:r,className:Nt("relative flex w-full touch-none select-none items-center",e),...t,children:[u.jsx(tO,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:u.jsx(rO,{className:"absolute h-full bg-primary"})}),u.jsx(nO,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})]}));eh.displayName=V_.displayName;const ng=e=>{if(!isFinite(e)||e<0)return"0:00";const t=Math.floor(e/60),r=Math.floor(e%60);return`${t}:${r.toString().padStart(2,"0")}`},sO=()=>{const e=DA();return!Ve().pathname.startsWith("/dashboard/music")||!e.current?null:u.jsx("div",{className:"fixed bottom-0 left-0 right-0 z-40 border-t border-border bg-card/95 backdrop-blur supports-[backdrop-filter]:bg-card/80 shadow-lg",children:u.jsxs("div",{className:"mx-auto flex max-w-7xl items-center gap-3 px-4 py-2",children:[u.jsxs("div",{className:"flex items-center gap-3 min-w-0 flex-1 sm:flex-initial sm:w-64",children:[u.jsx("div",{className:"h-10 w-10 shrink-0 overflow-hidden rounded-md bg-muted",children:e.current.image_url?u.jsx("img",{src:e.current.image_url,alt:"",className:"h-full w-full object-cover"}):u.jsx("div",{className:"flex h-full w-full items-center justify-center",children:u.jsx(XS,{className:"h-4 w-4 text-muted-foreground"})})}),u.jsxs("div",{className:"min-w-0",children:[u.jsx("p",{className:"truncate text-sm font-medium text-foreground",children:e.current.title||"Untitled"}),u.jsx("p",{className:"truncate text-[10px] text-muted-foreground",children:e.queue.length>1?`${e.index+1} / ${e.queue.length}`:"Now playing"})]})]}),u.jsxs("div",{className:"flex flex-1 flex-col items-center gap-1 max-w-2xl",children:[u.jsxs("div",{className:"flex items-center gap-1",children:[u.jsx("button",{onClick:e.toggleShuffle,className:`rounded p-1.5 hover:bg-muted ${e.shuffle?"text-primary":"text-muted-foreground"}`,"aria-label":"Shuffle",children:u.jsx(n1,{className:"h-3.5 w-3.5"})}),u.jsx("button",{onClick:e.prev,className:"rounded p-1.5 hover:bg-muted text-foreground","aria-label":"Previous",children:u.jsx(s1,{className:"h-4 w-4"})}),u.jsx("button",{onClick:e.toggle,className:"rounded-full bg-primary p-2 text-primary-foreground hover:opacity-90","aria-label":e.isPlaying?"Pause":"Play",children:e.isPlaying?u.jsx(ZS,{className:"h-4 w-4"}):u.jsx(e1,{className:"h-4 w-4"})}),u.jsx("button",{onClick:e.next,className:"rounded p-1.5 hover:bg-muted text-foreground","aria-label":"Next",children:u.jsx(o1,{className:"h-4 w-4"})}),u.jsx("button",{onClick:e.cycleLoop,className:`rounded p-1.5 hover:bg-muted ${e.loop!=="off"?"text-primary":"text-muted-foreground"}`,"aria-label":"Loop",children:e.loop==="one"?u.jsx(t1,{className:"h-3.5 w-3.5"}):u.jsx(r1,{className:"h-3.5 w-3.5"})})]}),u.jsxs("div",{className:"flex w-full items-center gap-2",children:[u.jsx("span",{className:"text-[10px] text-muted-foreground tabular-nums w-9 text-right",children:ng(e.position)}),u.jsx(eh,{value:[e.duration?e.position/e.duration*100:0],onValueChange:r=>e.duration&&e.seek(r[0]/100*e.duration),max:100,step:.1,className:"flex-1"}),u.jsx("span",{className:"text-[10px] text-muted-foreground tabular-nums w-9",children:ng(e.duration)})]})]}),u.jsxs("div",{className:"hidden md:flex items-center gap-2 w-32",children:[u.jsx(i1,{className:"h-3.5 w-3.5 text-muted-foreground"}),u.jsx(eh,{value:[e.volume*100],onValueChange:r=>e.setVolume(r[0]/100),max:100,step:1})]}),u.jsx("button",{onClick:e.clear,className:"rounded p-1.5 hover:bg-muted text-muted-foreground","aria-label":"Close player",children:u.jsx(sf,{className:"h-4 w-4"})})]})})},Pf=v.createContext({flags:{},loading:!0,refetch:()=>{},check:()=>!1,update:async()=>!1});function oO(e){switch(e){case"super_admin":return["super_admin","admin","builder","gift","member"];case"admin":return["admin","builder","gift","member"];case"builder":return["builder","gift","member"];case"gift":return["gift","member"];default:return["member"]}}const iO=({children:e})=>{const{user:t,userRole:r}=Pn(),[n,s]=v.useState({}),[o,i]=v.useState(!0),a=v.useCallback(async()=>
226{if(!t){s({}),i(!1);return}const{data:d,error:f}=await le.from("platform_settings").select("key, value").like("key","feature_%");if(!f&&d){const p={};for(const h of d){const _=h.value;p[h.key]={enabled:(_==null?void 0:_.enabled)??!1,roles:Array.isArray(_==null?void 0:_.roles)?_.roles:[]}}s(p)}i(!1)},[t]);v.useEffect(()=>{a()},[a]);const l=v.useCallback(d=>{const f=n[d];if(!f||!f.enabled||f.roles.length===0)return!1;const p=oO(r);return f.roles.some(h=>p.includes(h))},[n,r]),c=v.useCallback(async(d,f)=>{const{error:p}=await le.from("platform_settings").update({value:f,updated_by:t==null?void 0:t.id}).eq("key",d);return p?!1:(s(h=>({...h,[d]:f})),!0)},[t==null?void 0:t.id]);return u.jsx(Pf.Provider,{value:{flags:n,loading:o,refetch:a,check:l,update:c},children:e})},R2=e=>{const{check:t,loading:r}=v.useContext(Pf);return{enabled:t(e),loading:r}},C2=()=>v.useContext(Pf);function de(e){e=e.replace(/^#/,""),e.length===3&&(e=e.split("").map(c=>c+c).join(""));const t=parseInt(e.substring(0,2),16)/255,r=parseInt(e.substring(2,4),16)/255,n=parseInt(e.substring(4,6),16)/255,s=Math.max(t,r,n),o=Math.min(t,r,n);let i=0,a=0;const l=(s+o)/2;if(s!==o){const c=s-o;switch(a=l>.5?c/(2-s-o):c/(s+o),s){case t:i=((r-n)/c+(r<n?6:0))/6;break;case r:i=((n-t)/c+2)/6;break;case n:i=((t-r)/c+4)/6;break}}return`${Math.round(i*360)} ${Math.round(a*100)}% ${Math.round(l*100)}%`}const sg={none:{sm:"0px",md:"0px",lg:"0px",full:"0px"},subtle:{sm:"2px",md:"4px",lg:"6px",full:"4px"},medium:{sm:"4px",md:"8px",lg:"12px",full:"9999px"},rounded:{sm:"8px",md:"12px",lg:"16px",full:"9999px"},pill:{sm:"9999px",md:"9999px",lg:"9999px",full:"9999px"}},aO={tight:"-0.025em",normal:"0em",wide:"0.05em"};function og(e,t,r){const n=document.documentElement,s=t==="dark",o=(r==null?void 0:r.accent_color_override)||e.accent_primary;r!=null&&r.accent_color_override?uO(r.accent_color_override,-10):e.accent_primary_hover;const i=s?e.dark_bg_primary:e.light_bg_primary,a=s?e.dark_bg_secondary:e.light_bg_secondary,l=s?e.dark_bg_tertiary:e.light_bg_tertiary,c=s?e.dark_border:e.light_border,d=s?e.dark_text_primary:e.light_text_primary,f=s?e.dark_text_secondary:e.light_text_secondary,p=s?e.dark_text_tertiary:e.light_text_tertiary;n.style.setProperty("--background",de(i)),n.style.setProperty("--foreground",de(d)),n.style.setProperty("--card",de(a)),n.style.setProperty("--card-foreground",de(d)),n.style.setProperty("--popover",de(a)),n.style.setProperty("--popover-foreground",de(d)),n.style.setProperty("--primary",de(o)),n.style.setProperty("--primary-foreground",de(e.accent_primary_text)),n.style.setProperty("--secondary",de(l)),n.style.setProperty("--secondary-foreground",de(f)),n.style.setProperty("--muted",de(l)),n.style.setProperty("--muted-foreground",de(p)),n.style.setProperty("--accent",de(e.accent_secondary)),n.style.setProperty("--accent-foreground",de(e.accent_primary_text)),n.style.setProperty("--destructive",de(e.accent_error)),n.style.setProperty("--destructive-foreground","0 0% 100%"),n.style.setProperty("--border",de(c)),n.style.setProperty("--input",de(c)),n.style.setProperty("--ring",de(o)),n.style.setProperty("--success",de(e.accent_success)),n.style.setProperty("--warning",de(e.accent_warning)),n.style.setProperty("--gold-glow",de(o)),n.style.setProperty("--sidebar-background",de(a)),n.style.setProperty("--sidebar-foreground",de(f)),n.style.setProperty("--sidebar-primary",de(o)),n.style.setProperty("--sidebar-primary-foreground",de(e.accent_primary_text)),n.style.setProperty("--sidebar-accent",de(l)),n.style.setProperty("--sidebar-accent-foreground",de(d)),n.style.setProperty("--sidebar-border",de(c)),n.style.setProperty("--sidebar-ring",de(o));const h=sg[e.border_radius]||sg.medium;n.style.setProperty("--radius",h.md);const _=(r==null?void 0:r.font_size_override)||e.font_size_base;r!=null&&r.font_scale_override||e.font_size_scale,n.style.setProperty("--font-size-base",`${_}px`),n.style.fontSize=`${_*(18.67/14)}px`,n.style.setProperty("--font-heading",`'${e.font_heading}', system-ui, sans-serif`),n.style.setProperty("--font-body",`'${e.font_body}', system-ui, sans-serif`),n.style.setProperty("--font-mono",`'${e.font_mono}', monospace`),n.style.fontFamily=`'${e.font_body}', system-ui, sans-serif`;const y=aO[e.letter_spacing]||"0em";n.style.letterSpacing=y,n.style.lineHeight=e.line_height,r!=null&&r.reduced_motion?n.classList.add("reduce-motion"):n.classList.remove("reduce-motion"),r!=null&&r.high_contrast?n.classList.add("high-contrast"):n.classList.remove("high-contrast");let x=document.getElementById("platform-custom-css");e.custom_css?(x||(x=document.createElement("style"),x.id="platform-custom-css",document.head.appendChild(x)),x.textContent=e.custom_css):x&&x.remove(),n.style.colorScheme=s?"dark":"light",s?(n.classList.add("dark"),n.classList.remove("light")):(n.classList.remove("dark"),n.classList.add("light"))}function lO(e){const t=[...new Set(e.filter(Boolean))],r=document.getElementById("dynamic-google-fonts"),s=`https://fonts.googleapis.com/css2?${t.map(i=>`family=${i.replace(/ /g,"+")}:wght@300;400;500;600;700`).join("&")}&display=swap`;if(r){if(r.href===s)return;r.remove()}const o=document.createElement("link");o.id="dynamic-google-fonts",o.rel="stylesheet",o.href=s,document.head.appendChild(o)}function uO(e,t){e=e.replace(/^#/,"");const r=parseInt(e,16),n=Math.min(255,Math.max(0,(r>>16)+t)),s=Math.min(255,Math.max(0,(r>>8&255)+t)),o=Math.min(255,Math.max(0,(r&255)+t));return`#${(1<<24|n<<16|s<<8|o).toString(16).slice(1)}`}function B_(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dar
226k":"light"}function cO(e){return e==="system"?B_():e}function A2(e,t){const r=ig(e),n=ig(t),s=Math.max(r,n),o=Math.min(r,n);return(s+.05)/(o+.05)}function ig(e){e=e.replace(/^#/,""),e.length===3&&(e=e.split("").map(s=>s+s).join(""));const t=ic(parseInt(e.substring(0,2),16)/255),r=ic(parseInt(e.substring(2,4),16)/255),n=ic(parseInt(e.substring(4,6),16)/255);return .2126*t+.7152*r+.0722*n}function ic(e){return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)}const z_=v.createContext(void 0),ag="emai_platform_theme",dO="emai_theme_version",hO=new Set(["/","/login","/signup","/pricing","/create-account","/forgot-password","/reset-password","/app-suite-thank-you","/learning"]),fO=({children:e})=>{const{user:t}=Pn(),[r,n]=v.useState(()=>{try{const g=localStorage.getItem(ag);return g?JSON.parse(g):null}catch{return null}}),[s,o]=v.useState(null),[i,a]=v.useState("light"),[l,c]=v.useState(!0),d=typeof window<"u"?window.location.pathname:"/",p=hO.has(d)||d.startsWith("/learning/")?"light":cO(i),h=v.useCallback(async()=>{try{const{data:g}=await le.from("platform_theme").select("*").eq("is_active",!0).limit(1).maybeSingle();if(g){const m=g;n(m),localStorage.setItem(ag,JSON.stringify(m)),localStorage.setItem(dO,m.updated_at)}}catch(g){console.error("Failed to fetch theme:",g)}c(!1)},[]),_=v.useCallback(async()=>{if(!t){o(null);return}try{const{data:g}=await le.from("user_theme_preferences").select("*").eq("user_id",t.id).maybeSingle();if(g){const m=g;o(m),a(m.color_mode_preference)}}catch(g){console.error("Failed to fetch user theme preferences:",g)}},[t]),y=v.useCallback(async g=>{if(t)try{const{data:m}=await le.from("user_theme_preferences").select("id").eq("user_id",t.id).maybeSingle();m?await le.from("user_theme_preferences").update({...g,updated_at:new Date().toISOString()}).eq("user_id",t.id):await le.from("user_theme_preferences").insert({user_id:t.id,...g}),o(w=>w?{...w,...g}:null)}catch(m){console.error("Failed to update user preferences:",m)}},[t]);v.useEffect(()=>{h()},[h]),v.useEffect(()=>{_()},[_]),v.useEffect(()=>{r&&(og(r,p,s),lO([r.font_heading,r.font_body,r.font_mono]))},[r,p,s]),v.useEffect(()=>{if(i!=="system")return;const g=window.matchMedia("(prefers-color-scheme: dark)"),m=()=>{r&&og(r,B_(),s)};return g.addEventListener("change",m),()=>g.removeEventListener("change",m)},[i,r,s]);const x=v.useCallback(g=>{a(g),t&&y({color_mode_preference:g})},[t,y]);return u.jsx(z_.Provider,{value:{theme:r,userPrefs:s,colorMode:p,setColorMode:x,loading:l,refetchTheme:h,updateUserPrefs:y},children:e})},O2=()=>{const e=v.useContext(z_);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e},lg={name:"Pro Level",price:"$39",period:"/month",credits:250,checkoutUrl:"https://buy.stripe.com/9B6cN4bAy5pOg682ZZ1RC0C",features:["250 Rollover Credits Each Month","Over 100 Specialty Apps","Unlimited Memory Vaults","Unlimited Audience Personas","Unlimited Writing Styles","Unlimited Brand DNA Styles","Video Edit Pro","Audio Edit Pro","Image Edit Pro","Text Edit Pro (Coming Soon)","AI Chat + Custom Chat Projects (like Custom GPTs)"]};function pO(e){const t=e==null?void 0:e.trim().toLowerCase();return t?`${lg.checkoutUrl}?prefilled_email=${encodeURIComponent(t)}`:lg.checkoutUrl}const I2=["builder","gift","admin","super_admin"],mO="https://expertmedia.app/#pricing",gO=["/dashboard","/apps","/suites","/dashboard/audio-edit","/dashboard/learning","/chat","/chat/presets","/chat/saved","/video-editor","/image-edit-pro","/lounge","/settings","/buy-credits","/credit-usage","/credits/history","/notifications","/learning","/terms","/privacy"],vO=new Set(["/dashboard","/chat","/apps","/suites"]);function W_(e){let t=e.trim();try{if(/^https?:\/\//i.test(t)){const r=new URL(t);if(typeof window<"u"&&r.origin!==window.location.origin&&!/expertmedia\.app$/i.test(r.hostname))return"";t=r.pathname}}catch{return""}return t=t.split("?")[0].split("#")[0],t.length>1&&(t=t.replace(/\/+$/,"")),t}function th(e){if(!e)return!1;const t=W_(e);return t?gO.some(r=>t===r?!0:vO.has(r)?r==="/chat"&&t.startsWith("/chat/"):t.startsWith(r+"/")):!1}const yO=[["/projects","My Projects"],["/styles","Styles & Personas"],["/personas","Styles & Personas"],["/writing-styles","Styles & Personas"],["/brand-vault","Styles & Personas"],["/memory","Styles & Personas"],["/rag-library","RAG Documents"],["/concierge","Concierge"],["/marketplace","EMAI Market"],["/progress","My Progress"],["/analytics","Usage Analytics"],["/video-generator","Motion Studio"],["/avatar-studio","Avatar Studio"],["/upscaler","Image Upscaler"],["/transcriber","Audio Transcriber"],["/world-builder-pro","World Builder Pro"],["/font-studio","Font Studio"],["/talent-studio","Talent Studio"],["/animation-studio","Animation Studio"],["/guild","The History Guild"],["/twin-studio","Twin Studio"],["/childrens-book-studio","Children's Book Studio"],["/dashboard/graphic-novel","Graphic Novel Studio"],["/dashboard/music","Music Studio"],["/dashboard/soundforge","SoundForge"],["/dashboard/audiobook","Audiobook Studio"],["/dashboard/voiceover","Voiceover Studio"],["/dashboard/underscore","Underscore"],["/dashboard/storyboard","Storyboard Studio"],["/dashboard/oracle-cards","Oracle Cards"],["/dashboard/control-room","Control Room"],["/dashboard/workflows","Workflows"],["/app-builder","App Builder"],["/workflows","Canvas"],["/text-edit-pro","Text Edit Pro"],["/apps/storyreel","StoryReel"]];function wO(e){const t=W_(e)||e,r=yO.find(([n])=>t===n||t.startsWith(n+"/"));return r?r[1]:"This app"}function Tf(){const{user:e,userRole:t}=Pn(),r=t==="free",n=(e==null?void 0:e.email)??"",{data:s=!1}=Mw({queryKey:["my-plan-flags",e==null?void 0:e.id],enabled:r&&!!e,staleTime:10*60*1e3,queryFn:async()=>{const{data:i,error:a}=await le.rpc("get_my_plan_flags");return a?!1:!!(i!=null&&i.former_pro)}}),o=r&&s;return{isFree:r,isFormerPro:o,ctaPrefix:o?"Renew":"Upgrade",ctaHref:o?pO(n):mO,email:n,isAllowed:i=>
226r?th(i):!0}}const H_=({suffix:e="for Access",label:t,size:r="default",className:n,showNote:s=!0,variant:o="default"})=>{const{ctaPrefix:i,ctaHref:a,email:l}=Tf();return u.jsxs("div",{className:Nt("flex flex-col items-center gap-1.5",n),children:[u.jsx(jr,{asChild:!0,size:r,variant:o,className:"rounded-full",children:u.jsx("a",{href:a,onClick:c=>c.stopPropagation(),children:t??`${i} ${e}`})}),s&&l&&u.jsxs("p",{className:"text-[11px] text-muted-foreground text-center",children:["Use ",l," at checkout so it's applied to this account."]})]})},L2=({className:e})=>u.jsx(tu,{className:Nt("h-3.5 w-3.5 text-muted-foreground",e),"aria-label":"Locked"}),ug=({appName:e="This app"})=>u.jsxs("div",{className:"flex min-h-[70vh] flex-col items-center justify-center gap-5 px-6 text-center",children:[u.jsx("div",{className:"flex h-14 w-14 items-center justify-center rounded-2xl bg-secondary",children:u.jsx(tu,{className:"h-6 w-6 text-primary"})}),u.jsxs("div",{className:"space-y-2",children:[u.jsxs("h1",{className:"text-xl font-bold text-foreground",children:[e," is part of Pro Level"]}),u.jsx("p",{className:"mx-auto max-w-md text-sm text-muted-foreground",children:"Free accounts include AI Chat, Video Edit Pro, Audio Edit Pro, Image Edit Pro and The Lounge."})]}),u.jsxs("div",{className:"flex flex-wrap items-start justify-center gap-3",children:[u.jsx(H_,{suffix:"for Access"}),u.jsx(jr,{asChild:!0,variant:"outline",className:"rounded-full gap-2",children:u.jsxs(Ii,{to:"/dashboard",children:[u.jsx(N0,{className:"h-4 w-4"})," Back to Dashboard"]})})]})]}),_O=()=>{const{user:e}=Pn(),[t,r]=v.useState([]);return v.useEffect(()=>{e&&le.from("projects").select("id, name, updated_at, apps(name, header_image_url)").eq("user_id",e.id).order("updated_at",{ascending:!1}).limit(200).then(({data:n})=>r(n??[]))},[e]),u.jsxs("div",{className:"space-y-6",children:[u.jsx("h1",{className:"text-2xl font-bold text-foreground",children:"My Projects"}),u.jsxs("div",{className:"flex flex-col items-center gap-3 rounded-lg border border-border bg-card p-5 text-center sm:flex-row sm:justify-between sm:text-left",children:[u.jsx("p",{className:"text-sm text-muted-foreground",children:"Your previous projects are saved. Renew Pro Level to open them again."}),u.jsx(H_,{label:"Renew to Unlock Previous Projects",size:"sm"})]}),u.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:[t.map(n=>{var s,o;return u.jsxs("div",{"aria-disabled":!0,className:"relative cursor-not-allowed overflow-hidden rounded-lg border border-border bg-card opacity-50",children:[((s=n.apps)==null?void 0:s.header_image_url)&&u.jsx("img",{src:n.apps.header_image_url,alt:"",className:"h-28 w-full object-cover grayscale"}),u.jsxs("div",{className:"p-3",children:[u.jsxs("div",{className:"flex items-center gap-1.5",children:[u.jsx(tu,{className:"h-3.5 w-3.5 text-muted-foreground"}),u.jsx("h3",{className:"truncate text-sm font-semibold text-foreground",children:n.name})]}),((o=n.apps)==null?void 0:o.name)&&u.jsx("p",{className:"mt-0.5 text-xs text-muted-foreground",children:n.apps.name})]})]},n.id)}),t.length===0&&u.jsx("p",{className:"text-sm text-muted-foreground",children:"No previous projects."})]})]})},xO=/^\/apps\/([^/]+)\/?$/,bO=({children:e})=>{const{isFree:t,isFormerPro:r}=Tf(),{user:n,roleResolved:s}=Pn(),{pathname:o}=Ve(),i=t?o.match(xO):null,a=i&&i[1]!=="storyreel"?i[1]:null,[l,c]=v.useState(null);v.useEffect(()=>{if(!a)return;let f=!1;return(async()=>{const{data:p}=await le.from("apps").select("id, name, external_url").eq("id",a).maybeSingle();f||c({id:a,name:(p==null?void 0:p.name)??"This app",allowed:th((p==null?void 0:p.external_url)??null)})})(),()=>{f=!0}},[a]);const d=u.jsx("div",{className:"flex min-h-[50vh] items-center justify-center",children:u.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent"})});return n&&!s?d:t?a?!l||l.id!==a?u.jsx("div",{className:"flex min-h-[50vh] items-center justify-center",children:u.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent"})}):l.allowed?u.jsx(u.Fragment,{children:e}):u.jsx(ug,{appName:l.name}):th(o)?u.jsx(u.Fragment,{children:e}):r&&(o==="/projects"||o==="/projects/")?u.jsx(_O,{}):u.jsx(ug,{appName:wO(o)}):u.jsx(u.Fragment,{children:e})},Pt=({children:e,skipFreeGate:t=!1})=>{const{user:r,loading:n,userRole:s}=Pn(),o=Ve(),i=v.useRef(!1),a=v.useRef(!1);return r&&(i.current=!0),n&&!i.current?u.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background",children:u.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent"})}):!r&&!i.current?u.jsx(vt,{to:`/login?returnTo=${encodeURIComponent(o.pathname+o.search)}`,replace:!0}):s==="past_due"&&o.pathname!=="/payment-failed"&&!a.current?u.jsx(vt,{to:"/payment-failed",replace:!0}):s==="canceled"&&!a.current?u.jsx(vt,{to:"/account-canceled",replace:!0}):(a.current=!0,t||s!=="free"?u.jsx(u.Fragment,{children:e}):u.jsx(bO,{children:e}))},U=({children:e,adminOnly:t,superAdminOnly:r,marketplaceBeta:n,deniedFallback:s})=>{const{isBuilder:o,isAdmin:i,isSuperAdmin:a,loading:l,user:c,roleResolved:d}=Pn(),[f,p]=v.useState(!n),[h,_]=v.useState(!1),y=n?a||i||h:r?a:t?i:o,x=v.useRef(!1);return v.useEffect(()=>{!n||!c||le.from("marketplace_beta_access").select("id").eq("user_id",c.id).then(({data:g})=>{_(((g==null?void 0:g.length)??0)>0),p(!0)})},[n,c]),(l||!f||c&&!d)&&!x.current?u.jsx("div",{className:"flex h-64 items-center justify-center",children:u.jsx(eu,{className:"h-8 w-8 animate-spin text-primary"})}):x.current&&(l||!c||!y)?u.jsx(u.Fragment,{children:e}
226):y?(x.current=!0,u.jsx(u.Fragment,{children:e})):s?u.jsx(u.Fragment,{children:s}):u.jsx(vt,{to:"/dashboard",replace:!0})},ac=({appName:e="This app",requirement:t="Pro Level"})=>{const{ctaHref:r}=Tf();return u.jsxs("div",{className:"flex min-h-[70vh] flex-col items-center justify-center gap-5 px-6 text-center",children:[u.jsx("div",{className:"flex h-14 w-14 items-center justify-center rounded-2xl bg-secondary",children:u.jsx(tu,{className:"h-6 w-6 text-primary"})}),u.jsxs("div",{className:"space-y-2",children:[u.jsxs("h1",{className:"text-xl font-bold text-foreground",children:[e," isnât included in your plan"]}),u.jsxs("p",{className:"mx-auto max-w-md text-sm text-muted-foreground",children:["Access to ",e," requires a ",t,". Upgrade your membership to unlock it, or head back to your dashboard to keep working with your current apps."]})]}),u.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-3",children:[u.jsx(jr,{asChild:!0,className:"rounded-full",children:u.jsx("a",{href:r,children:"View plans"})}),u.jsx(jr,{asChild:!0,variant:"outline",className:"rounded-full gap-2",children:u.jsxs(Ii,{to:"/dashboard",children:[u.jsx(N0,{className:"h-4 w-4"})," Back to Dashboard"]})})]})]})},_s="emai:reload-route",cg=e=>(e.split(/[?#]/)[0]||"/").startsWith("/canvas/"),lc=e=>{const t=e.split(/[?#]/)[0]||"/";return!t.startsWith("/canvas/")&&!t.startsWith("/sandbox/")&&t!=="/admin/sandbox"&&t!=="/landing"},EO=()=>{const e=Ve(),t=uu(),{user:r,loading:n}=Pn(),s=v.useRef(!1),o=`${e.pathname}${e.search}${e.hash}`;return v.useEffect(()=>{if(cg(o))return;const i=()=>{if(lc(o)){sessionStorage.setItem(_s,o);return}sessionStorage.removeItem(_s)};return window.addEventListener("beforeunload",i),()=>window.removeEventListener("beforeunload",i)},[o]),v.useEffect(()=>{if(cg(o)){s.current=!0,sessionStorage.removeItem(_s);return}if(n||s.current)return;const i=sessionStorage.getItem(_s);if(e.pathname==="/"&&r&&i&&i!=="/"&&lc(i)){s.current=!0,sessionStorage.removeItem(_s),t(i,{replace:!0});return}s.current=!0,(e.pathname!=="/"||!lc(o))&&sessionStorage.removeItem(_s)},[o,n,e.pathname,t,r]),null},SO=1024,q_=`(max-width: ${SO-1}px)`,K_={isMobile:!1,isDesktop:!0,breakpoint:"desktop",width:0};function kO(){if(typeof window>"u")return K_;const e=window.innerWidth,t=window.matchMedia(q_).matches;return{isMobile:t,isDesktop:!t,breakpoint:t?"mobile":"desktop",width:e}}function G_(e=!0){const[t,r]=v.useState(K_);return v.useEffect(()=>{if(!e||typeof window>"u")return;const n=window.matchMedia(q_),s=()=>r(kO());return s(),n.addEventListener("change",s),window.addEventListener("resize",s),()=>{n.removeEventListener("change",s),window.removeEventListener("resize",s)}},[e]),t}const Q_=v.createContext(null);function PO({children:e}){const t=G_(),r=v.useMemo(()=>t,[t.isMobile,t.width]);return u.jsx(Q_.Provider,{value:r,children:e})}function J_(){const e=v.useContext(Q_),t=G_(e===null);return(e??t).isMobile}const Y_="emai:scroll-positions";function dg(){try{const e=sessionStorage.getItem(Y_);return e?JSON.parse(e):{}}catch{return{}}}function TO(e){try{sessionStorage.setItem(Y_,JSON.stringify(e))}catch{}}function jO(){const e=J_(),t=Ve(),r=xj(),n=v.useRef(null);return v.useEffect(()=>{if(!e||typeof window>"u"||!("scrollRestoration"in window.history))return;const s=window.history.scrollRestoration;return window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration=s}},[e]),v.useEffect(()=>{if(!e)return;const s=t.key,o=()=>{const i=n.current;if(!i)return;const a=dg();a[i]=window.scrollY,TO(a)};if(n.current&&n.current!==s&&o(),r==="POP"){const a=dg()[s];requestAnimationFrame(()=>{window.scrollTo({top:typeof a=="number"?a:0,left:0})})}else requestAnimationFrame(()=>{window.scrollTo({top:0,left:0})});return n.current=s,window.addEventListener("pagehide",o),()=>{window.removeEventListener("pagehide",o)}},[e,t.key,r]),null}function RO(){const e=J_();return v.useEffect(()=>{if(!e||typeof window>"u")return;const t=window.visualViewport;if(!t)return;const r=document.documentElement,n=()=>{const s=Math.max(0,window.innerHeight-t.height-t.offsetTop);r.style.setProperty("--kb-inset",`${Math.round(s)}px`),r.dataset.kbOpen=s>60?"true":"false"};return n(),t.addEventListener("resize",n),t.addEventListener("scroll",n),()=>{t.removeEventListener("resize",n),t.removeEventListener("scroll",n),r.style.removeProperty("--kb-inset"),delete r.dataset.kbOpen}},[e]),v.useEffect(()=>{if(!e||typeof window>"u")return;
226const t=window.visualViewport,r=i=>{if(!i||!(i instanceof HTMLElement))return!1;if(i.isContentEditable)return!0;const a=i.tagName;if(a==="TEXTAREA")return!0;if(a==="INPUT"){const l=i.type;return!["button","submit","reset","checkbox","radio","file","range","color","hidden"].includes(l)}return!1},n=i=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{const a=i.getBoundingClientRect(),l=(t==null?void 0:t.offsetTop)??0,c=(t==null?void 0:t.height)??window.innerHeight,d=l+c,f=16;if(a.bottom>d-f){const p=a.bottom-(d-f),h=hg(i);h&&h!==document.scrollingElement?h.scrollBy({top:p,behavior:"smooth"}):window.scrollBy({top:p,behavior:"smooth"})}else if(a.top<l+f){const p=l+f-a.top,h=hg(i);h&&h!==document.scrollingElement?h.scrollBy({top:-p,behavior:"smooth"}):window.scrollBy({top:-p,behavior:"smooth"})}})})},s=i=>{const a=i.target;r(a)&&n(a)};document.addEventListener("focusin",s);const o=()=>{const i=document.activeElement;r(i)&&n(i)};return t==null||t.addEventListener("resize",o),()=>{document.removeEventListener("focusin",s),t==null||t.removeEventListener("resize",o)}},[e]),null}function hg(e){let t=(e==null?void 0:e.parentElement)??null;for(;t;){const n=window.getComputedStyle(t).overflowY;if((n==="auto"||n==="scroll"||n==="overlay")&&t.scrollHeight>t.clientHeight)return t;t=t.parentElement}return null}const CO=/^\/childrens-book-studio\/([0-9a-f-]{36})(\/[A-Za-z0-9/_-]*)?$/i,AO=new Set(["/read"]);function OO(){const e=Ve(),t=v.useRef(null);return v.useEffect(()=>{const r=e.pathname,n=r.match(CO);if(!n)return;const s=n[1],o=n[2]||"";if(AO.has(o)||t.current===r)return;t.current=r;const i=setTimeout(async()=>{try{const{data:a}=await le.from("storyforge_projects").select("settings").eq("id",s).maybeSingle();if(!a)return;const l={...a.settings||{},last_route:r};await le.from("storyforge_projects").update({settings:l}).eq("id",s)}catch{}},600);return()=>clearTimeout(i)},[e.pathname]),null}const X_=v.createContext(null),uc="sf_batch_op_v1";function IO({children:e}){const[t,r]=v.useState(null),[n,s]=v.useState(!1),o=v.useRef(null);v.useEffect(()=>{try{const p=localStorage.getItem(uc);if(!p)return;const h=JSON.parse(p);h&&h.status==="running"&&(r({...h,status:"running",cancelRequested:!1}),o.current={...h,cancelRequested:!1})}catch{}},[]);const i=p=>{try{!p||p.status!=="running"?localStorage.removeItem(uc):localStorage.setItem(uc,JSON.stringify(p))}catch{}},a=v.useCallback(p=>{const h=`bop_${Date.now().toString(36)}_${Math.random().toString(36).slice(2,7)}`,_={...p,id:h,done:0,startedAt:Date.now(),status:"running",cancelRequested:!1};return o.current=_,r(_),s(!1),i(_),h},[]),l=v.useCallback((p,h=1,_)=>{const y=o.current;if(!y||y.id!==p)return;const x=Math.min(y.total,y.done+h),g=Date.now()-y.startedAt,m=x>0?Math.round(g/x):y.avgMsPerItem,w={...y,done:x,avgMsPerItem:m,message:_};o.current=w,r(w),i(w)},[]),c=v.useCallback((p,h="completed",_)=>{const y=o.current;if(!y||y.id!==p)return;const x={...y,status:h,message:_};o.current=x,r(x),i(null),window.setTimeout(()=>{var g;((g=o.current)==null?void 0:g.id)===p&&(o.current=null,r(null))},4500)},[]),d=v.useCallback(p=>{const h=o.current;if(!h||h.id!==p)return;const _={...h,cancelRequested:!0,status:"canceled"};o.current=_,r(_),i(null)},[]),f=v.useCallback(p=>!!(o.current&&o.current.id===p&&o.current.cancelRequested),[]);return u.jsx(X_.Provider,{value:{current:t,start:a,tick:l,finish:c,cancel:d,isCanceled:f,minimized:n,setMinimized:s},children:e})}function LO(){const e=v.useContext(X_);if(!e)throw new Error("useStoryForgeBatch must be used within StoryForgeBatchProvider");return e}function NO(e){if(!e||!e.avgMsPerItem)return"";const t=Math.max(0,e.total-e.done)*e.avgMsPerItem;if(t<1e3)return"<1s";const r=Math.round(t/1e3);if(r<60)return`${r}s`;const n=Math.floor(r/60),s=r%60;return`${n}m ${s}s`}const DO={back:"Back",next:"Next",save:"Save",cancel:"Cancel",close:"Close",loading:"Loading...",saving:"Saving...",generate:"Generate",regenerate:"Regenerate",delete:"Delete",edit:"Edit",preview:"Preview",continue:"Continue",language:"Language"},$O={options_title:"Book Options",page_count:"Page Count",book_size:"Book Size",art_style:"Art Style",text_placement:"Text Placement",font_style:"Font Style",story_language:"Story Language",story_language_help:"The language the AI will use to write your story."},MO={viewing_page:"Viewing page {n} of {total}",next_page:"Next page",prev_page:"Previous page"}
226,UO={title:"Reading Level",grade:"Grade Level",words:"Word Count",wps:"Avg Words / Sentence",complexity:"Vocabulary Complexity",simplify:"Simplify Language",simplifying:"Simplifying..."},FO={icon_close:"Close",icon_menu:"Open menu",page_illustration:"Page {n} illustration: {desc}",generation_progress:"Generation progress: {done} of {total}"},VO={common:DO,wizard:$O,preview:MO,reading_level:UO,a11y:FO},cc={en:VO},BO=new Set(["ar","he","fa","ur"]);function fg(e,t){return t.split(".").reduce((r,n)=>r==null?r:r[n],e)}function pg(e,t){return t?e.replace(/\{(\w+)\}/g,(r,n)=>t[n]!=null?String(t[n]):`{${n}}`):e}const zO=v.createContext(null);function WO({children:e}){const[t,r]=v.useState(()=>typeof window>"u"?"en":localStorage.getItem("app.locale")||"en"),n=v.useCallback(c=>{r(c);try{localStorage.setItem("app.locale",c)}catch{}},[]),s=BO.has(t.split("-")[0])?"rtl":"ltr";v.useEffect(()=>{typeof document>"u"||(document.documentElement.lang=t,document.documentElement.dir=s)},[t,s]);const o=v.useCallback((c,d)=>{const f=cc[t]||cc.en,p=fg(f,c);if(typeof p=="string")return pg(p,d);const h=fg(cc.en,c);return typeof h=="string"?pg(h,d):c},[t]),i=v.useCallback((c,d)=>{try{return new Intl.DateTimeFormat(t,d).format(new Date(c))}catch{return new Date(c).toLocaleDateString()}},[t]),a=v.useCallback((c,d)=>{try{return new Intl.NumberFormat(t,d).format(c)}catch{return String(c)}},[t]),l=v.useMemo(()=>({locale:t,setLocale:n,t:o,dir:s,formatDate:i,formatNumber:a}),[t,n,o,s,i,a]);return u.jsx(zO.Provider,{value:l,children:e})}const N2=[{code:"en",label:"English"},{code:"es",label:"Spanish (Español)"},{code:"fr",label:"French (Français)"},{code:"de",label:"German (Deutsch)"},{code:"it",label:"Italian (Italiano)"},{code:"pt",label:"Portuguese (Português)"},{code:"nl",label:"Dutch (Nederlands)"},{code:"ja",label:"Japanese (æ¥æ¬èª)"},{code:"zh",label:"Chinese (䏿)"},{code:"ar",label:"Arabic (Ø§ÙØ¹Ø±Ø¨ÙØ©)"},{code:"he",label:"Hebrew (×¢×ר×ת)"}],Z_=v.createContext({announce:()=>{}});function HO({children:e}){const t=v.useRef(null),r=v.useRef(null),n=v.useCallback((s,o="polite")=>{const i=o==="assertive"?r.current:t.current;i&&(i.textContent="",requestAnimationFrame(()=>{i&&(i.textContent=s)}))},[]);return u.jsxs(Z_.Provider,{value:{announce:n},children:[e,u.jsx("div",{ref:t,"aria-live":"polite","aria-atomic":"true",className:"sr-only"}),u.jsx("div",{ref:r,"aria-live":"assertive",role:"alert","aria-atomic":"true",className:"sr-only"})]})}function D2(){return v.useContext(Z_).announce}var jf="Progress",Rf=100,[qO,$2]=bo(jf),[KO,GO]=qO(jf),ex=v.forwardRef((e,t)=>{const{__scopeProgress:r,value:n=null,max:s,getValueLabel:o=QO,...i}=e;(s||s===0)&&!mg(s)&&console.error(JO(`${s}`,"Progress"));const a=mg(s)?s:Rf;n!==null&&!gg(n,a)&&console.error(YO(`${n}`,"Progress"));const l=gg(n,a)?n:null,c=Nl(l)?o(l,a):void 0;return u.jsx(KO,{scope:r,value:l,max:a,children:u.jsx(Ae.div,{"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":Nl(l)?l:void 0,"aria-valuetext":c,role:"progressbar","data-state":nx(l,a),"data-value":l??void 0,"data-max":a,...i,ref:t})})});ex.displayName=jf;var tx="ProgressIndicator",rx=v.forwardRef((e,t)=>{const{__scopeProgress:r,...n}=e,s=GO(tx,r);return u.jsx(Ae.div,{"data-state":nx(s.value,s.max),"data-value":s.value??void 0,"data-max":s.max,...n,ref:t})});rx.displayName=tx;function QO(e,t){return`${Math.round(e/t*100)}%`}function nx(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Nl(e){return typeof e=="number"}function mg(e){return Nl(e)&&!isNaN(e)&&e>0}function gg(e,t){return Nl(e)&&!isNaN(e)&&e<=t&&e>=0}function JO(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Rf}\`.`}function YO(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be: 227 - a positive number 228 - less than the value passed to \`max\` (or ${Rf} if no \`max\` prop is set) 229 - \`null\` or \`undefined\` if the progress is indeterminate. 230 231Defaulting to \`null\`.`}var sx=ex,XO=rx;const ox=v.forwardRef(({className:e,value:t,...r},n)=>u.jsx(sx,{ref:n,className:Nt("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...r,children:u.jsx(XO,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));ox.displayName=sx.displayName;
231function ZO(){const{current:e,cancel:t,minimized:r,setMinimized:n}=LO();if(!e)return null;const s=e.total>0?Math.round(e.done/e.total*100):0,o=NO(e),i=e.status==="completed",a=e.status==="error",l=e.status==="canceled",c=i?QS:a?D0:eu,d=i?"text-green-600":a?"text-destructive":l?"text-muted-foreground":"text-primary";return r?u.jsxs("button",{type:"button",onClick:()=>n(!1),className:"fixed bottom-4 right-4 z-50 flex items-center gap-2 rounded-full border bg-background/95 backdrop-blur px-3 py-2 shadow-lg hover:shadow-xl transition",title:e.label,children:[u.jsx(c,{className:`w-4 h-4 ${d} ${e.status==="running"?"animate-spin":""}`}),u.jsxs("span",{className:"text-xs font-medium",children:[e.done,"/",e.total]}),u.jsx(JS,{className:"w-3 h-3 text-muted-foreground"})]}):u.jsx("div",{className:"sticky top-0 z-40 border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/80",children:u.jsxs("div",{className:"px-4 py-2 flex items-center gap-3",children:[u.jsx(c,{className:`w-4 h-4 ${d} ${e.status==="running"?"animate-spin":""}`}),u.jsxs("div",{className:"flex-1 min-w-0",children:[u.jsxs("div",{className:"flex items-center justify-between text-xs",children:[u.jsxs("span",{className:"font-medium truncate",children:[e.label,e.message?u.jsxs("span",{className:"text-muted-foreground",children:[" â ",e.message]}):null]}),u.jsxs("span",{className:"text-muted-foreground shrink-0 ml-2",children:[e.done,"/",e.total," · ",s,"%",o&&e.status==="running"?` · ~${o} left`:""]})]}),u.jsx(ox,{value:s,className:"h-1.5 mt-1"})]}),u.jsxs("div",{className:"flex items-center gap-1",children:[e.status==="running"&&u.jsxs(jr,{variant:"ghost",size:"sm",onClick:()=>t(e.id),children:[u.jsx(sf,{className:"w-4 h-4 mr-1"})," Cancel"]}),u.jsx(jr,{variant:"ghost",size:"icon",onClick:()=>n(!0),title:"Minimize",children:u.jsx(YS,{className:"w-4 h-4"})})]})]})})}const eI="twin:pending-handoff",tI="twin:pending-voiceover-handoff",Cf={motion:{paths:["/video-generator","/video-generator-v2","/video-generator-classic"],param:"twin_handoff",storageKey:eI},voiceover:{paths:["/dashboard/voiceover"],param:"voiceover_handoff",storageKey:tI}},Af=()=>{try{return window.sessionStorage}catch{return null}};function rI(e=window.location){var r,n;const t=new URLSearchParams(e.search);for(const s of Object.values(Cf)){if(!s.paths.includes(e.pathname))continue;const o=(r=t.get(s.param))==null?void 0:r.trim();o&&((n=Af())==null||n.setItem(s.storageKey,o))}}function M2(e,t=window.location.search){var n,s;const r=Cf[e];return((n=new URLSearchParams(t).get(r.param))==null?void 0:n.trim())||((s=Af())==null?void 0:s.getItem(r.storageKey))||null}function U2(e){var t;(t=Af())==null||t.removeItem(Cf[e].storageKey)}function Of(){const e=v.useContext(Sf);if(!e)throw new Error("useUser must be used within <AuthProvider>");return{user:e.user,isLoading:e.loading}}function nI({children:e}){const{user:t,isLoading:r}=Of(),n=Ve();return r?u.jsx("div",{className:"min-h-screen w-full flex items-center justify-center bg-bg-base text-text-muted",children:u.jsx(eu,{className:"h-6 w-6 animate-spin text-accent-primary"})}):t?u.jsx(u.Fragment,{children:e}):u.jsx(vt,{to:"/canvas/auth",replace:!0,state:{from:n.pathname+n.search}})}function sI(){const{user:e,isLoading:t}=Of(),{data:r,isLoading:n}=Mw({queryKey:["canvas-access",e==null?void 0:e.id],queryFn:async()=>{if(!e)return!1;const{data:s,error:o}=await le.rpc("is_canvas_access_enabled",{uid:e.id});return o?!1:!!s},enabled:!!e,staleTime:5*60*1e3});return{hasAccess:!!r,isLoading:t||!!e&&n}}const oI="/dashboard";function iI(){const e=Ve();return v.useEffect(()=>{let t=!1;return(async()=>{var r;try{const{data:n}=await le.auth.getUser(),s=((r=n==null?void 0:n.user)==null?void 0:r.id)??null,{data:o}=await le.from("system_settings").select("value").eq("key","canvas_access_mode").maybeSingle();if(t)return;await le.from("canvas_access_audit").insert({user_id:s,attempted_resource:e.pathname+(e.search??""),mode_at_attempt:(o==null?void 0:o.value)??null,ip_address:null,user_agent:typeof navigator<"u"?navigator.userAgent:null})}catch{}})(),()=>{t=!0}},[e.pathname,e.search]),u.jsx("div",{className:"min-h-screen w-full bg-bg-base text-text-primary font-sans flex items-center justify-center px-6",children:u.jsxs("div",{className:"w-full max-w-md rounded-2xl border border-white/10 bg-bg-elevated/80 backdrop-blur p-8 text-center shadow-xl",children:[u.jsx("div",{className:"mx-auto mb-5 inline-flex h-12 w-12 items-center justify-center rounded-full bg-accent-primary/20 text-accent-glow text-xl font-semibold",children:"â¦"}),u.jsx("h1",{className:"text-2xl font-semibold tracking-tight mb-3",children:"Canvas isnât available yet"}),u.jsx("p",{className:"text-text-muted text-sm leading-relaxed mb-6",children:"Canvas is currently in development and only available to Super Admins. Weâll let members know when it launches."}),u.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 justify-center",children:[u.jsx(Ii,{to:oI,className:"inline-flex items-center justify-center rounded-lg bg-accent-primary px-4 py-2.5 text-sm font-semibold text-text-primary transition hover:bg-accent-glow",children:"Back to EMAI"}),u.jsx(Ii,{to:"/dashboard/notifications",className:"inline-flex items-center justify-center rounded-lg border border-white/15 px-4 py-2.5 text-sm font-medium text-text-primary transition hover:bg-white/5",children:"Get notified"})]})]})})}function aI(){return u.jsx("div",{className:"min-h-screen w-full bg-bg-base flex items-center justify-center",children:u.jsx("div",{className:"h-8 w-8 rounded-full border-2 border-accent-primary border-t-transparent animate-spin"})})}function lI({children:e}){const{user:t,isLoading:r}=Of(),{hasAccess:n,isLoading:s}=sI(),o=Ve();if(r||s)return u.jsx(aI,{});if(!t){const i=encodeURIComponent(o.pathname+o.search);return u.jsx(vt,{to:`/canvas/auth?returnTo=${i}`,replace:!0})}return n?u.jsx(u.Fragment,{children:e}):u.jsx(iI,{})}rI();function uI(){const e=Ve(),t=e.pathname.replace(/^\/storyforge/,"/childrens-book-studio")+e.search+e.hash;return u.jsx(vt,{to:t,replace:!0})}function cI(){const e=Ve();return u.jsx(vt,{to:`/video-generator${e.search}${e.hash}`,replace:!0})}const dI=k(()=>S(()=>import("./Landing-BvAKBtfO.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28]))),hI=k(()=>S(()=>import("./CanvasLanding-BobdShv-.js"),__vite__mapDeps([29,30,31,32,5,33,13,15,34,35]))),fI=k(()=>S(()=>import("./CanvasAuth-BVLDsP-K.js"),__vite__mapDeps([36,37]))),pI=k(()=>S(()=>
231import("./CanvasEditor-Bes8-Vi3.js"),__vite__mapDeps([38,39,40,41,42,30,43,44,45,15,46,3,4,5,6,14,18,47,48,21,28,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,13,95,32,33,34,31,96,97,98,99,100,101,102,103,104,105,106,107,7,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,25,123,124,125,126,16,127,128,129,130,19,131,132,133,134]))),mI=k(()=>S(()=>import("./Workflows-IssqwT6M.js"),__vite__mapDeps([135,30,40,31,32,5,33,13,15,34,3,4,6,55,39,41,42,71,117,51,52,53,77,136,137,76,18,49,72,138,21,118,35,100,97,46,98,111,112,113,114]))),gI=k(()=>S(()=>import("./CanvasTemplates-BGwl0gP3.js"),__vite__mapDeps([139,30,31,32,5,33,13,15,34,3,4,6,7,51,52,53,55,140,40,108,39,41,42,64,65,66,67,56,68,69,46,70,71,18,72,73,60,74,75,76,77,43,44,45,14,47,48,21,28,49,50,54,57,58,59,61,62,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,35]))),vI=k(()=>S(()=>import("./PublicWorkflow-C2CMIymt.js"),__vite__mapDeps([141,63,21,39,40,41,42,43,44,45,15,46,3,4,5,6,14,18,47,48,28,49,50,51,52,53,54,55,56,57,58,59,60,61,62,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,13,95,32,33,34,31,96,97,98,99,100,101,102,103]))),yI=k(()=>S(()=>import("./LoginDraft-BE8f17uB.js").then(e=>e.L),__vite__mapDeps([142,1,55,143,8,144,3,4,5,6,37,12,145,146,147]))),wI=k(()=>S(()=>import("./SignupDraft-AvsUM3Wr.js").then(e=>e.S),__vite__mapDeps([148,1,55,143,8,149,37,12]))),_I=k(()=>S(()=>import("./PricingDraft-dAfWdao6.js").then(e=>e.P),__vite__mapDeps([150,1,55,143,8,10,15,12,151]))),xI=k(()=>S(()=>import("./PricingResubscribe-C__X3RG5.js"),__vite__mapDeps([152,1,8,10,15]))),bI=k(()=>S(()=>import("./Dashboard-_9Vmx_Am.js"),__vite__mapDeps([153,55,54,143,56,51,5,52,53,15,84,10,154,21,155,156,25,26,24,157,23,130,34,158,159,12,11,160,161,162,163,164,140,102,4,165,166,167,168,169,170,171,92,172,173,126,174,175,176,177,178,179,48,69,180,181,182,183,184,185,186,187,188,62,189,190,191,192,193,194,195,196,197,198,199,16,200,201,85,110,202,203,204,205,206,207,208,209,210,79,211,212,213,214,215,13,216,217,218,145,131,219,133,220,221,222,223,224,132,50,96,225,226,101,227,228,229,230,231,103,232,233,234,46,235,147,236,237,238,239,240,241,242,243,81,78,100,125,244,115,245,246,247,248,249,250,251,252,138,253,83,254,136,255,256,49,257,258,259,260,261,262,263,264,265,109,266,116,267,268,269,270,271,272,273,274,128,275,105,276,277,278,47,18,279,57,280,281,94,127,282,283,17,118,284,285,286,76,287,288,289,290,291,292,293,35,294,295,37,296,297,19,9,298,299,300,301,45,61,74,93,82,104,59,302,20,303,22,304,305,306,307,124,308,309,97,310,311,312,72,313,314,315,120,316,122,99,86,317,318,319,320,77,321,322,80,323,324,151,325,27,326,119,327,129,328,329,330,75,331,332,333,334,335,336,337,98,338,339,68,121,137,146,340,149,341,73,342,343,28,344,345,346,347,348,14,90,91,349,350]))),EI=k(()=>S(()=>import("./BrowseApps-DZEBhVaR.js"),__vite__mapDeps([351,55,160,31,32,5,33,13,15,34,21,17,237,51,52,53,102,4,352,353,161,158,175,176,177,178,179,48,69,180,181,182,183,184,185,186,12,187,188,62,189,190,191,192,193,194,195,196,197,198,199,16,200,201,85,110,202,203,24,204,205,206,207,208,209,210,79,211,212,213,214,215,216,217,218,145,131,219,133,220,221,222,223,224,132,50,96,225,226,101,227,228,229,230,231,103,232,233,234,46,235,147,236,238,239,240,241,242,243,81,78,100,173,125,244,115,245,246,247,248,249,250,251,252,138,253,83,254,136,255,256,49,257,163,258,259,260,157,261,262,263,264,265,109,266,116,267,268,269,270,271,272,273,274,128,159,275,105,276,277,278,47,18,279,57,280,281,94,127,282,283,118,284,285,286,76,154,287,288,289,290,291,292,293,35,294,295,37,296,297,19,9,298,299,300,301,23,45,61,74,93,82,174,104,59,302,20,303,22,304,305,306,307,124,308,26,309,97,310,311,312,72,313,314,315,120,316,122,130,92,99,86,317,318,319,320,77,321,126,322,172,80,323,324,151,325,27,326,119,327,129,328,329,330,75,11,331,332,333,334,335,336,337,98,338,339,164,68,121,137,146,340,149,25,341,73,342,343,28,344,345,346,347,348,14,90,91,168,167,169,155,10]))),SI=k(()=>S(()=>import("./BrowseSuites-BM7jWCrO.js"),__vite__mapDeps([354,158,160,55,56,84,15,3,4,5,6,102,115,72,28,244,97,98,10,137,16,21,18,20]))),kI=k(()=>S(()=>import("./Projects-C6-Pa-Ww.js"),__vite__mapDeps([355,356,357,53,52,15,46,18,55,84,51,5,106,140,102,4,72,77,187,183,334,10,98,13,157,83,101,97,11,180,181,111,112,113,114]))),PI=k(()=>S(()=>import("./AppDetail-Csk3-KaY.js"),__vite__mapDeps([358,3,4,5,6,55,143,54,230,323,15,46,125,352,28,10,159,57,147,225,53,52,12,16,21,18]))),TI=k(()=>S(()=>import("./ProjectWizard-CiDRpwJy.js"),__vite__mapDeps([359,55,143,56,51,5,52,53,15,54,360,361,112,362,114,113,215,13,106,363,42,137,83,18,256,73,72,356,357,25,11,364,24,157,145,253,26,264,155,10,97,210,21,92,12]))
231),jI=k(()=>S(()=>import("./GeneratingProgress-BPc6M3iA.js"),__vite__mapDeps([365,56,366,3,4,5,6,356,357,53,52,103,151,92,324,323,367,10,13,244,115,156,368,12,193,101,132]))),RI=k(()=>S(()=>import("./ProjectEditor-DaLsVgYP.js"),__vite__mapDeps([369,56,55,54,3,4,5,6,356,357,370,363,366,53,52,103,151,92,324,323,106,115,132,371,372,373,374,11,84,15,367,375,33,80,37,73,19,46,98,156,51,126,322,125,83,116,145,376,377,378,379,312,380,68,77,212,381,382,42,288,196,273,291,315,231,203,18,178,179,22,275,328,215,86,105,232,305,306,47,368,303,28,81,72,121,213,335,25,24]))),CI=k(()=>S(()=>import("./ProjectStats-DukwEsIO.js"),__vite__mapDeps([383,384,385,386,371,3,4,5,6,55,387,388,349,67,389,335,83,101,16,267,57,17,74,390,391,53,52,187]))),AI=k(()=>S(()=>import("./DashboardLayout-Bdb7b6lZ.js"),__vite__mapDeps([392,393,394,175,176,177,178,179,48,69,180,181,182,183,184,185,186,12,187,188,62,189,190,191,192,193,194,195,196,197,198,199,16,200,201,85,110,202,203,24,204,205,206,207,208,209,210,79,211,212,213,214,15,52,215,13,53,216,217,218,145,131,219,133,220,221,222,223,224,132,34,50,96,225,226,101,227,228,229,230,231,103,232,233,234,46,235,147,236,237,238,239,240,241,242,243,81,78,100,173,125,244,115,245,246,247,248,249,250,251,252,138,253,83,254,136,255,256,49,257,163,258,259,260,157,261,262,263,264,265,109,266,116,267,268,269,270,271,272,273,274,128,159,275,105,276,277,278,47,18,279,57,280,281,94,127,282,283,17,118,284,285,286,76,154,287,288,289,290,291,292,293,35,294,295,37,296,297,19,9,298,299,300,301,23,45,61,74,93,82,174,104,59,302,20,303,22,304,305,306,307,124,308,26,309,97,310,311,312,72,313,314,315,120,316,122,130,92,99,86,317,318,319,320,77,321,126,322,172,80,323,324,151,325,27,326,119,327,129,328,21,329,330,75,11,331,332,333,334,335,336,337,98,338,339,164,68,121,137,146,340,149,25,341,73,342,343,28,344,345,346,347,348,14,90,91,395,8,106,5,168,167,169,170,396,397,3,4,6]))),dc=k(()=>S(()=>import("./AppBuilder-DcvcMKS5.js"),__vite__mapDeps([398,10,21,56,55,143,51,5,52,53,15,54,140,367,356,357,207,68,83,272,291,18,155,23,98,126,3,4,6,106,121,77,11,7,102,105,101,92,17,24,115,244,137,12,70,399,132,186,382,196,273,231,315,376,377,378,379,312,380,212,381,42,288,203,178,179,22,275,328,151,14,72,154,109,269,363,238,400,375,33,401,34,84,287,218,86,181]))),OI=k(()=>S(()=>import("./AppBuilderSelect-CgtoA6b4.js"),__vite__mapDeps([402,140,55,51,5,52,53,15,31,32,33,13,34,102,4,28,72,322,77,18,308,100,46,181,98]))),vg=k(()=>S(()=>import("./SimplifiedAppBuilder-CvmNiOg0.js"),__vite__mapDeps([403,375,33,140,363,384,143,55,56,54,51,5,52,53,15,106,399,132,102,4,186,137,98,18,25,24,308,22,83,218,70,72,17,269,341,356,357,145,13,86,130,7,404,115,82,129,244,12,21,28]))),II=k(()=>S(()=>import("./AdminUsers-DDSE8otE.js"),__vite__mapDeps([405,396,55,51,5,52,53,15,102,4,3,6,77,280,171,137,72,149,10,193,97,293,115,147,187,242,208,105,20,151,98,81,131,145,324,237,184,362,112]))),LI=k(()=>S(()=>import("./AdminCostAnalytics-D9qTktkd.js"),__vite__mapDeps([406,17,52,13,55,56,143,51,5,53,15,120,72,98,164,375,33,25,79,18,313,103,20,157,131,242,73,335,24,23,151,11]))),NI=k(()=>S(()=>import("./AdminErrorLogs-CvpthhOn.js"),__vite__mapDeps([407,55,51,5,52,53,15,386,3,4,6,140,98,77,57,132,362,112]))),DI=k(()=>S(()=>import("./AdminStorageCleanup-CUCzGXo_.js"),__vite__mapDeps([408,384,140,222,98]))),$I=k(()=>S(()=>import("./AdminS3Migration-DO2ucsK8.js"),__vite__mapDeps([409,384,140,75]))),MI=k(()=>S(()=>import("./AdminRestorePreview-C7q6EGE8.js"),__vite__mapDeps([410,55,143,384,323,81]))),UI=k(()=>S(()=>import("./AdminRestoreReconcile-BLakCYjX.js"),__vite__mapDeps([411,384,55,143,375,33,323,105,115,287,98]))),FI=k(()=>S(()=>import("./AdminBadges-TMcrViB-.js"),__vite__mapDeps([412,55,143,56,51,5,52,53,15,3,4,6,386,164,72,97,98,137]))),VI=k(()=>S(()=>import("./AdminSubSuites-COGuSPkw.js"),__vite__mapDeps([413,55,56,51,5,52,53,15,3,4,6,102,84,72,157,308,98,13]))),BI=k(()=>S(()=>import("./AdminPremiumApps-C0nig1fz.js"),__vite__mapDeps([414,55,140,21,322,77]))),zI=k(()=>S(()=>import("./AdminCanvasModels-l63iXj7j.js"),__vite__mapDeps([415,54,140,43,39,40,41,42,44,45,15,46,3,4,5,6,14,18,47,48,21,28,49,50,51,52,53,55,56,57,58,59,60,61,62,215,347]))),WI=k(()=>S(()=>import("./AdminAutoRouting-DtQIIChA.js"),__vite__mapDeps([416,54,140,55,56,
231143,51,5,52,53,15,3,4,6,102,84,106,367,44,417,215,28,72,21,322]))),HI=k(()=>S(()=>import("./AdminCinematography-CY_A-W2W.js"),__vite__mapDeps([418,55,56,140,54,143,419,357,52,51,5,53,15,106,420,4,3,6,77,102,375,33,421,422,423,57,68,92,86,269,244,115,46,98,384,137,215,79,72]))),qI=k(()=>S(()=>import("./AdminAttachmentIndexing-Bn5zokYc.js"),__vite__mapDeps([424,55,384,140,86,77,222]))),KI=k(()=>S(()=>import("./AdminWorldBuilder-D7uoJ9jC.js"),__vite__mapDeps([425,55,143,54,384,78,86]))),GI=k(()=>S(()=>import("./AdminTalentStudio-CrxxDAlq.js"),__vite__mapDeps([426,143,56,384,55,54,184,86,79]))),QI=k(()=>S(()=>import("./AdminGuild-CSugRGdV.js"),__vite__mapDeps([427,1,55,143,54,56,384,375,33,51,5,52,53,15,428,429,430,270,86]))),JI=k(()=>S(()=>import("./AdminModelManager-BBcmgyOR.js"),__vite__mapDeps([431,54,140,55,56,143,84,15,356,357,51,5,52,53,3,4,6,102,215,203,72,181,180,97,98,132]))),YI=k(()=>S(()=>import("./AdminAppModels-DquG1Yt3.js"),__vite__mapDeps([432,54,140,55,44,215,235]))),XI=k(()=>S(()=>import("./AdminSkills-BBZsVcVM.js"),__vite__mapDeps([433,55,140,384,84,15,51,5,52,53,31,32,33,13,34,3,4,6,21,213,72,77,14,97,173,181,46,98,124,17]))),yg=k(()=>S(()=>import("./AdminSkillEditor-CY0HpnpF.js"),__vite__mapDeps([434,55,56,143,140,384,54,401,33,34,106,5,51,52,53,15,42,3,4,6,102,83,72,269,97,98,137,225,125,14]))),ZI=k(()=>S(()=>import("./AdminSkillDetail-Daq-Lsx4.js"),__vite__mapDeps([435,140,384,55,56,143,54,3,4,5,6,356,357,400,375,33,7,77,386,387,388,349,67,389,339,81,213,214,436,23,31,32,13,15,34,224,52,132,92,84,324,21,105,53,240,72,51,391,184,11,225,97,46,98,83,322,115,17,25,101,244,126]))),eL=k(()=>S(()=>import("./SkillTriggerOptimizer-asmolPY4.js"),__vite__mapDeps([437,438,384,55,56,140,54,143,386,86,137,21,97,98,72,81,188,182,132,15]))),tL=k(()=>S(()=>import("./AdminSkillsAnalytics-B_B2vJrN.js"),__vite__mapDeps([439,384,140,387,388,349,67,389,339,213,21,390,214,145]))),rL=k(()=>S(()=>import("./AdminSkillTemplates-C_1sDIWq.js"),__vite__mapDeps([440,55,56,143,140,384,54,51,5,52,53,15,3,4,6,31,32,33,13,34,286,72,77,173,97,98,116,21]))),nL=k(()=>S(()=>import("./AdminSkillChains-kRwAl7GE.js"),__vite__mapDeps([441,384,287]))),sL=k(()=>S(()=>import("./AdminSkillRevenue-BmZR-BI7.js"),__vite__mapDeps([442,384,242]))),oL=k(()=>S(()=>import("./AdminRevenueForecast-Dscmkxx2.js"),__vite__mapDeps([443,384,55,140,386,339,208]))),iL=k(()=>S(()=>import("./AdminCharacterTemplates-UbXPVIxM.js"),__vite__mapDeps([444,384,140,55,445,42,18,137,98]))),aL=k(()=>S(()=>import("./AdminAppTags-B32UacUR.js"),__vite__mapDeps([446,55,272,77,72]))),lL=k(()=>S(()=>import("./AdminAppRegistry-XenZj0Lh.js"),__vite__mapDeps([447,55,143,54,56,3,4,5,6,102,51,52,53,15,386,140,14,72,97,98,238,77]))),uL=k(()=>S(()=>import("./ConciergeDev-D7rI_aVD.js"),__vite__mapDeps([448,165,166,167]))),cL=k(()=>S(()=>import("./Concierge-D2o6_ABn.js"),__vite__mapDeps([449,175,176,177,178,179,48,69,180,181,182,183,184,185,186,12,187,188,62,189,190,191,192,193,194,195,196,197,198,199,16,200,201,85,110,202,203,24,204,205,206,207,208,209,210,79,211,212,213,214,15,52,215,13,53,216,217,218,145,131,219,133,220,221,222,223,224,132,34,50,96,225,226,101,227,228,229,230,231,103,232,233,234,46,235,147,236,237,238,239,240,241,242,243,81,78,100,173,125,244,115,245,246,247,248,249,250,251,252,138,253,83,254,136,255,256,49,257,163,258,259,260,157,261,262,263,264,265,109,266,116,267,268,269,270,271,272,273,274,128,159,275,105,276,277,278,47,18,279,57,280,281,94,127,282,283,17,118,284,285,286,76,154,287,288,289,290,291,292,293,35,294,295,37,296,297,19,9,298,299,300,301,23,45,61,74,93,82,174,104,59,302,20,303,22,304,305,306,307,124,308,26,309,97,310,311,312,72,313,314,315,120,316,122,130,92,99,86,317,318,319,320,77,321,126,322,172,80,323,324,151,325,27,326,119,327,129,328,21,329,330,75,11,331,332,333,334,335,336,337,98,338,339,164,68,121,137,146,340,149,25,341,73,342,343,28,344,345,346,347,348,14,90,91,10,165,166,167,168,169,170,155]))),dL=k(()=>S(()=>import("./Workflows-IssqwT6M.js"),__vite__mapDeps([135,30,40,31,32,5,33,13,15,34,3,4,6,55,39,41,42,71,117,51,52,53,77,136,137,76,18,49,72,138,21,118,35,100,97,46,98,111,112,113,114]))),hL=k(()=>S(()=>
231import("./WorkflowEditor-BO2Rty3F.js"),__vite__mapDeps([450,65,66,67,389,55,140,345,101,203,21,109,337,298,68,319,233,86,37,116,251,77,7,4,5,143,56,51,52,53,15,98,34,111,112,113,114,451]))),fL=k(()=>S(()=>import("./BuyCredits-DlXa-lRk.js"),__vite__mapDeps([452,393,384,140,54,51,5,52,53,15,147,21,14,130]))),pL=k(()=>S(()=>import("./CreditHistory-D8KzSiki.js"),__vite__mapDeps([453,51,5,52,53,15,103]))),mL=k(()=>S(()=>import("./CreditUsageLog-BOFqwpvX.js"),__vite__mapDeps([454,384,140,14,103,338,188,362,112]))),gL=k(()=>S(()=>import("./Settings-CedViTgO.js"),__vite__mapDeps([455,55,143,56,54,382,375,33,51,5,52,53,15,456,66,10,281,145,46,72,98,345,131,132,3,4,6,102,126,21,14,130,147,393,171,125,198,271,177,384,84,77,157,119,79,203,272,238,78,234,164,17,287,242,213,253,323,92,22,347,160,244,115,237,140,166,167,169,339,377,378,106,68,97,196,273,291,178,288,137,184,19,362,112,219,111,113,114,149,195,37,82,174,332]))),vL=k(()=>S(()=>import("./Notifications-B9KpZ1nZ.js"),__vite__mapDeps([457,55,376,377,378,379,312,106,5,380,68,77,212,381,382,42,3,4,6,288,196,273,291,315,231,203,18,178,179,22,275,328,458,102,15,10,126,195,86,97,98,111,112,113,114]))),wg=k(()=>S(()=>import("./PersonaEditor-BKfgt5UG.js"),__vite__mapDeps([459,55,143,56,54,84,15,51,5,52,53,356,357,3,4,6,401,33,34,46,12,11,86,21])));k(()=>S(()=>import("./MemoryVault-6yjrFvQr.js"),__vite__mapDeps([460,55,54,364,102,4,5,51,52,53,15,106,3,6,461,462,463,87,88,464,21,137,72,157,11,97,98,131,34,244,24,77,259,46,83,311,310])));const yL=k(()=>S(()=>import("./RagLibrary-Bgq2xiUo.js"),__vite__mapDeps([465,55,56,140,3,4,5,6,461,462,463,87,88,464,137,253,72,77,155,10,83,97,98,132]))),_g=k(()=>S(()=>import("./MemoryDocEditor-CdZGIAXA.js"),__vite__mapDeps([466,55,143,56,54,51,5,52,53,15,356,357,461,462,463,87,88,464,86,137,311,21]))),wL=k(()=>S(()=>import("./MemoryInterview-DFzWu1dq.js"),__vite__mapDeps([467,55,364,24,126,83,15]))),_L=k(()=>S(()=>import("./ChatPlayground-C91IADwa.js"),__vite__mapDeps([468,397,3,4,5,6,103,44,55,140,51,52,53,15,77,201,23,124,210,31,32,33,13,34,375,304,72,305,110,157,261,322,81,173,97,311,181,98,469,46,134,417,21,56,109,18,248,83,306,215,143,42,73,85,156,368,461,462,463,87,88,464,374,370,254,367,24,7,470,238,287,106,119,101,45,232,172,47,74,75,126,54,102,137,116,303,26,264,25,231,86,420,218,94,438,220]))),xL=k(()=>S(()=>import("./MarbleStudio-CF8z8_eb.js"),__vite__mapDeps([471,384,140,3,4,5,6,102,472,56,11,55,143,51,52,53,15,28,21,284,89,81,90,91,92,93,79,50,94,353,237,78,72,115,98]))),bL=k(()=>S(()=>import("./ChatPresets-DXjVdZnc.js"),__vite__mapDeps([473,55,56,3,4,5,6,72,23,97,98]))),EL=k(()=>S(()=>import("./ChatSaved-CfztpCqL.js"),__vite__mapDeps([474,55,375,33,110,77,18]))),SL=k(()=>S(()=>import("./ThemeCustomizer-mFsp4UJ0.js"),__vite__mapDeps([475,56,356,357,3,4,5,6,476,106,55,312,380,52,77,81,137,21,92,86,22,53,174,332,68,307,231,115,11])));k(()=>S(()=>import("./WritingStyles-DRVVXmE9.js"),__vite__mapDeps([477,478,102,4,5,72,26,21,11,97,46,98])));const xg=k(()=>S(()=>import("./WritingStyleEditor-NwNyVSIT.js"),__vite__mapDeps([479,55,143,56,54,461,462,463,87,88,464,137,21,86])));k(()=>S(()=>import("./BrandVault-B3ZJk-Ft.js"),__vite__mapDeps([480,478,102,4,5,72,264,11,97,46,98])));const bg=k(()=>S(()=>import("./BrandProfileEditor-xL-olOF2.js"),__vite__mapDeps([481,55,143,56,54,18,72,98,86]))),kL=k(()=>S(()=>import("./UsageAnalytics-CV4laIGU.js"),__vite__mapDeps([482,51,5,52,53,15,387,388,349,67,389,386,213,339,131,11,101,10,390,391,291,13,98,184,187,140,20,223,111,112,113,114,362,229,68,18,73,238,151,147,126,28,375,33,157,21,436,82,210,25,23]))),Eg=k(()=>S(()=>import("./AppBuilderSOP-_ZdixhBS.js"),__vite__mapDeps([483,372,373,374,484,55,3,4,5,6,73,72,98,31,32,33,13,15,34,10,81,83,256,254,156]))),Sg=k(()=>S(()=>import("./AIChatSOP-13zJX9jL.js"),__vite__mapDeps([485,372,373,374,484,55,3,4,5,6,73,72,98,31,32,33,13,15,34,10,81,83,256,254,156]))),hc=k(()=>S(()=>import("./SOPIndex-DcWq1oWP.js"),__vite__mapDeps([486,55,84,15,106,5,3,4,6,70,10,16,261,72,77,98,125,52,269]))),kg=k(()=>S(()=>import("./CustomSOP-fe4lJ1gy.js"),__vite__mapDeps([487,55,84,15,370,484,3,4,5,6,73,72,98,376,377,378,379,312,106,380,68,77,212,381,382,42,288,196,273,291,315,231,203,18,178,179,22,275,328,102,10,97,86,156,252]))),PL=k(()=>S(()=>import("./MyProgress-D9WUGAxy.js"),__vite__mapDeps([488,162,10,163,11,164,335,14]))),zo=k(()=>S(()=>import("./StylesAndPersonas-Du0zOz3H.js"),__vite__mapDeps([489,375,33,460,55,54,364,102,4,5,51,52,53,15,106,3,6,461,462,463,87,88,464,21,137,72,157,11,97,98,131,34,244,24,77,259,46,83,311,310,490,478,335,477,26,480,264,25]))),TL=k(()=>S(()=>import("./ImageUpscaler-DjYgwFDH.js"),__vite__mapDeps([491,384,55,143,54,51,5,52,53,15,472,3,4,6,56,11,90,137,21,81,18]))),jL=k(()=>S(()=>import("./ImageEditProProjects-DpfeGldQ.js"),__vite__mapDeps([492,384,41,42,170,493,21,494,12,3,4,5,6,55,143,51,52,53,15,375,33,137,316,495,496,18,72,98,497,498]))),RL=k(()=>S(()=>import("./WorldBuilderPro-BlkDsnFX.js"),__vite__mapDeps([499,3,4,5,6,143,102,55,140,375,33,1,500,42,137,289,21,116,72,221,77,18,97,98]))),CL=k(()=>S(()=>import("./FontStudioPage-c4vGGnYo.js"),__vite__mapDeps([501,101,502,82,15,46,375,33,51,5,52,53,54,84,3,4,6,102,386,106,420,77,94,137,258,92,322,298,319,72,119,13,86,157,81,68,121,16,26,188,12,98,122,104,75,115,57,250,503]))),AL=k(()=>S(()=>import("./TalentStudioLayout-BnlSUkKe.js"),__vite__mapDeps([504,10,155,12,25,317,50,505,1,107,171,220,103,79,260,506]))),OL=k(()=>S(()=>import("./MyTalent-T5KH_GAk.js"),__vite__mapDeps([507,508,509,278,146,181,72,121,79,21]))),IL=k(()=>S(()=>import("./TalentDetail-DGjpbBMn.js"),__vite__mapDeps([510,508,105,511,319,21,509,278,512,72,15,11,97,98,79,208,13,121,181]))),LL=k(()=>S(()=>import("./CastingRoom-BkmtMblB.js"),__vite__mapDeps([513,514,12,21,119]))),NL=k(()=>S(()=>import("./CastingBrief-D7uOzUo0.js"),__vite__mapDeps([515,512,21,12]))),Pg=k(()=>S(()=>import("./IdentityEditor-B5lYdRsn.js"),__vite__mapDeps([516,517,505,155,10,21,518,519,512,292,79,12]))
231),DL=k(()=>S(()=>import("./ReferenceCeremony-Dr-vWdji.js"),__vite__mapDeps([520,517,505,155,10,21,514,512,511,519,15,277,209,103,119]))),$L=k(()=>S(()=>import("./UpdateIdentity-BkpVteOM.js"),__vite__mapDeps([521,516,517,505,155,10,21,518,519,512,292,79,12]))),ML=k(()=>S(()=>import("./ContactSheet-BEgKwGug.js"),__vite__mapDeps([522,517,505,155,10,21,508,512,523,519,524,509,278,313,15,98,81,261,102,4,5,103,79,325,296,20,119]))),UL=k(()=>S(()=>import("./NewShoot-C2kl6jaS.js"),__vite__mapDeps([525,517,505,155,10,21,508,519,518,20,184,79,523,509,278,134,6,4,5,51,52,53,15,77,512,137,98,47,325,308,292,92,146]))),FL=k(()=>S(()=>import("./Campaigns-B3vs25zP.js"),__vite__mapDeps([526,508,509,278,261,181,97,121,98]))),VL=k(()=>S(()=>import("./CampaignDetail-C4GueknW.js"),__vite__mapDeps([527,508,524,509,278,313,15,98,81,519,79]))),BL=k(()=>S(()=>import("./GuildLayout-X3DiyWtW.js"),__vite__mapDeps([528,1,107,171,276,72,25,181,11,529]))),zL=k(()=>S(()=>import("./GuildHall--ZmEdCYH.js"),__vite__mapDeps([530,55,143,102,4,5,31,32,33,13,15,34,531,42,508,532,430,533,534,535,428,10,340,16,243,49,72,21,320,50,188,129,97,173,98]))),fc=k(()=>S(()=>import("./GuildWizard-tbjvckng.js"),__vite__mapDeps([536,55,535,534,42,533,531,508,537,102,4,5,532,538,75,52,340,296,79,18,47,429,73,74,56,7,15,46,278,137,98,308,324,12,320,292,315,184,72,101,539,428,540,421,422,129,49,3,6,470,215,13,21,81,134,31,32,33,34,106,236,92,149,25,50,173,541,54,542,543,544,307,28,248,125,211,430,270,16,77]))),WL=k(()=>S(()=>import("./GuildRoster-DkdT3NaX.js"),__vite__mapDeps([545,55,3,4,5,6,544,532,72,270,539,428,531,42,508,25,125,21,340]))),HL=k(()=>S(()=>import("./GuildHostDetail-DSbuPLcy.js"),__vite__mapDeps([546,55,102,4,5,3,6,531,42,508,538,75,15,340,21,74]))),qL=k(()=>S(()=>import("./GuildMasterDetail-Dv4a2Arx.js"),__vite__mapDeps([547,537,102,4,5,532,534,42,538,75,55,56,99]))),KL=k(()=>S(()=>import("./placeholders-B1KgON4f.js"),[]).then(e=>({default:e.GuildArchive}))),GL=k(()=>S(()=>import("./GuildShowcase-DtwvqrqC.js"),__vite__mapDeps([548,533,430,11]))),QL=k(()=>S(()=>import("./AnimationStudioLayout-Z8slYtNg.js"),__vite__mapDeps([549,1,107,103,50,16,308,314,22,25,348,61,49,21,172]))),JL=k(()=>S(()=>import("./SeriesPage-BNTjl4h5.js"),__vite__mapDeps([550,384,55,143,56,140,51,5,52,53,15,551,549,1,107,103,50,16,308,314,22,25,348,61,49,21,172,72,181,98,180]))),YL=k(()=>S(()=>import("./WritersRoom-CgtG-lv2.js"),__vite__mapDeps([552,384,55,143,56,140,51,5,52,53,15,553,551,554,555,556,549,1,107,103,50,16,308,314,22,25,348,61,49,21,172,292,28,300]))),XL=k(()=>S(()=>import("./CastPage-bKb7BCIN.js"),__vite__mapDeps([557,384,55,143,140,551,558,554,549,1,107,103,50,16,308,314,22,25,348,61,49,21,172,72,137]))),ZL=k(()=>S(()=>import("./StyleWorldPage-BMgEQIeN.js"),__vite__mapDeps([559,560,384,55,143,56,140,375,33,51,5,52,53,15,556,554,549,1,107,103,50,16,308,314,22,25,348,61,49,21,172,551,561,562,72,137,98]))),eN=k(()=>S(()=>import("./CharacterShop-dcUzTHiR.js"),__vite__mapDeps([563,384,55,143,140,375,33,551,556,554,561,562,21,15,564,560,549,1,107,103,50,16,308,314,22,25,348,61,49,172,121,122,86,137,98]))),tN=k(()=>S(()=>import("./SoundStage-Bpu096DV.js"),__vite__mapDeps([565,384,140,143,51,5,52,53,15,55,553,551,554,56,556,21,72,84,61,92,566,549,1,107,103,50,16,308,314,22,25,348,49,172,292,59,98]))),rN=k(()=>S(()=>import("./StagePage-BgMyaIgW.js"),__vite__mapDeps([567,384,140,55,143,54,51,5,52,53,15,551,568,558,554,569,566,556,564,549,1,107,103,50,16,308,314,22,25,348,61,49,21,172,86,215,13]))),nN=k(()=>S(()=>import("./ScreeningRoom-Cj3Lluwb.js"),__vite__mapDeps([570,384,140,55,54,551,568,558,554,569,566,556,564,555,549,1,107,103,50,16,308,314,22,25,348,61,49,21,172,75,211,236,98,255,81,80,46]))),sN=k(()=>S(()=>import("./WatchShare-DSA3_srL.js"),__vite__mapDeps([571,1]))),oN=k(()=>S(()=>import("./DailiesPage-DMRakRm0.js"),__vite__mapDeps([572,384,140,55,143,56,84,15,51,5,52,53,102,4,551,556,554,549,1,107,103,50,16,308,314,22,25,348,61,49,21,172,137,28,98]))),iN=k(()=>S(()=>import("./StudioAdminPage-BEeJqFPn.js"),__vite__mapDeps([573,384,55,143,54,140,323]))),aN=k(()=>S(()=>import("./BiblePage-IfY--vzL.js"),__vite__mapDeps([574,384,55,143,56,140,375,33,549,1,107,103,50,16,308,314,22,25,348,61,49,21,172,561,562,15,555,551,556,554,575,86,137]))),lN=k(()=>S(()=>import("./DeconstructPage-Db9TE6Sh.js"),__vite__mapDeps([576,384,140,55,143,56,549,1,107,103,50,16,308,314,22,25,348,61,49,21,172,575,562,551,556,554,137,28,98]))),Tg=k(()=>S(()=>import("./WorldBuilderProWizard-f-1_LtW4.js"),__vite__mapDeps([577,1,55,143,56,500,42,98,47,57,323,54,103,21,102,4,5,470,140,367,356,357,7,17,15,52,72,116,81,329,309,221,12]))),uN=k(()=>S(()=>import("./ImageEditProShell-B4lEAIML.js"),__vite__mapDeps([578,397,3,4,5,6,103,495,579,102,55,56,375,33,51,52,53,15,382,41,42,106,32,13,34,31,9,213,28,92,327,175,176,177,178,179,48,69,180,181,182,183,184,185,186,12,187,188,62,189,190,191,192,193,194,195,196,197,198,199,16,200,201,85,110,202,203,24,204,205,206,207,208,209,210,79,211,212,214,215,216,217,218,145,131,219,133,220,221,222,223,224,132,50,96,225,226,101,227,228,229,230,231,232,233,234,46,235,147,236,237,238,239,240,241,242,243,81,78,100,173,125,244,115,245,246,247,248,249,250,251,252,138,253,83,254,136,255,256,49,257,163,258,259,260,157,261,262,263,264,265,109,266,116,267,268,269,270,271,272,273,274,128,159,275,105,276,277,278,47,18,279,57,280,281,94,127,282,283,17,118,284,285,286,76,154,287,288,289,290,291,292,293,35,294,295,37,296,297,19,298,299,300,301,23,45,61,74,93,82,174,104,59,302,20,303,22,304,305,306,307,124,308,26,309,97,310,311,312,72,313,314,315,120,316,122,130,99,86,317,318,319,320,77,321,126,322,172,80,323,324,151,325,27,326,119,129,328,21,329,330,75,11,331,332,333,334,335,336,337,98,338,339,164,68,121,137,146,340,149,25,341,73,342,343,344,345,346,347,348,14,90,91,143,54,543,463,497,498]))),cN=k(()=>S(()=>import("./ImageEditProShare-Bt9o6uXO.js"),[])),dN=k(()=>S(()=>import("./AudioTranscriber-CL1WTSxb.js"),__vite__mapDeps([580,384,51,5,52,53,15,56,74,137,46,81]))),hN=k(()=>S(()=>import("./VideoGeneratorClassicRoute-DZtXBx4i.js"),__vite__mapDeps([581,582,384,55,143,56,54,51,5,52,53,15,140,3,4,6,106,102,583,18,17,49,68,40,356,357,185,98,42,420,77,21,218,421,422,423,115,134,375,33,540,178,289,81,62,72,211,46,184,12,584,569,255,137,92,585,70,541,28,157,110,216,86,269,13,586,333,164,170,493,138,76,154,239,57,342,75,73,80,105]))),fN=k(()=>S(()=>import("./MotionStudioDefaultRoute-Ct60ep5g.js").then(e=>e.M),__vite__mapDeps([587,583,106,5,52,15,18,17,49,68,40,384,140,356,357,185,98,42,143,420,4,3,6,77,51,53,582,21,218,421,422,423,55,54,115,134,375,33,540,56,178,289,81,62,72,211,46,184,12,584,569,255,137,92,57,28,154,76,86,79,31,32,13,34,173,239,342,170,493,234,30,171,80,75,308,119,319,105,588]))),pN=k(()=>S(()=>import("./StoryReel-CKqvZXA5.js"),__vite__mapDeps([589,590,21,55,143,591,42,155,10,199,228,57,385,31,32,5,33,13,15,34,3,4,6,102,49,100,97,46,98,61,111,112,113,114,51,52,53,222,86,12,74,50,348,172,72]))),mN=k(()=>S(()=>import("./StoryReelProject-CK_V68Lh.js"),__vite__mapDeps([592,55,56,54,385,422,83,278,244,21,375,33,70,102,4,5,31,32,13,15,34,320,18,269,52,319,298,25,301,59,28,49,75,57,3,6,61,77,198,72,98,106,12,593,591,42,137,145,342,17,323,97,143,155,10,14,222,101,344,594,81,287,50]))),gN=k(()=>S(()=>import("./TwinStudio-Drc9Hl60.js"),__vite__mapDeps([595,102,4,5,590,21,596,106,597,42,52,15,97,72,598,599,544,582,3,6,46,81,49,62,239,79,98,296,340,28]))
231),vN=k(()=>S(()=>import("./TwinStudioCreate-cHybyE0_.js"),__vite__mapDeps([600,590,21,596,601,599,597,42,228,47,98,145,92]))),yN=k(()=>S(()=>import("./TwinStudioAnalysis-Bpp_howl.js"),__vite__mapDeps([602,590,21,596,145]))),wN=k(()=>S(()=>import("./TwinStudioReview-C6LaHrfH.js"),__vite__mapDeps([603,590,21,604,599,598,72,15,299]))),_N=k(()=>S(()=>import("./TwinStudioDetails-BhM4tsVg.js"),__vite__mapDeps([605,590,21,604,599,606,598,72,12]))),xN=k(()=>S(()=>import("./TwinStudioDetails2-DQyhp0T9.js"),__vite__mapDeps([607,54,590,21,604,599,606,598,72,12]))),bN=k(()=>S(()=>import("./TwinStudioFinalize-BMgeMHaL.js"),__vite__mapDeps([608,590,21,596,601,599,598,72,145,92]))),EN=k(()=>S(()=>import("./TwinStudioInterview-D1FOr8Fh.js"),__vite__mapDeps([609,590,21,598,599,72,321]))),SN=k(()=>S(()=>import("./VideoEditor-DlDzjuNs.js"),__vite__mapDeps([610,55,31,32,5,33,13,15,34,367,102,4,42,137,72,98,18,49,593,53,52,318,51,121,122,319,46,28,91,90,294,79,81,569,3,6,143,401,470,106,92,62,86,56,68,75,12,275,211,21,54,74,375,579,138,157,105,497,498]))),kN=k(()=>S(()=>import("./MusicStudio-DBe4spcD.js"),__vite__mapDeps([611,55,56,143,54,375,33,472,3,4,5,6,11,51,52,53,15,106,367,85,28,46,87,88,374,84,612,542,543,593,20,356,357,31,32,13,34,42,241,61,137,62,288,102,98,83,340,21,81,73,247,189,59,233,319,170,493,18,327,72,75,60,74,342,294,121,122,91,90,86,173,304,154,77,109,115,97,57]))),PN=k(()=>S(()=>import("./SoundForge-D-Pib7-f.js").then(e=>e.S),__vite__mapDeps([613,31,32,5,33,13,15,34,55,143,472,3,4,6,56,11,42,52,46,21,28,86,98,137,72,83,59,97,287,215,92,219,57,271,101,334,242,388,349,67,389,390,391,436,132,205,75,17,224,145,172,324,81,125,12,234,346,115,94,213,35,232,291]))),TN=k(()=>S(()=>import("./CharacterCreator-Dz_XY-OY.js"),__vite__mapDeps([614,42,55,56,143,384,140,3,4,5,6,367,445,149,74,18,83,28,21,77,76,10,72,49,98,97,211,81,46,145,137,62,337,22,328,73,282]))),jN=k(()=>S(()=>import("./SandboxManager-uk-9JAXZ.js"),__vite__mapDeps([615,140,384,3,4,5,6,55,56,143,51,52,53,15,72,83,192,101,115,322,137,98,46]))),RN=k(()=>S(()=>import("./LandingSectionsAdmin-C3xhu6dw.js"),__vite__mapDeps([616,55,143,384,54,70,617,51,5,52,53,15,72,269,98,352,56,137,360,361,112,362,114,113,215,13,106,210,3,4,6,356,357,22,92,42,303,376,377,378,379,312,380,68,77,212,381,382,288,196,273,291,315,231,203,18,178,179,275,328,21,86,97,46]))),CN=k(()=>S(()=>import("./SandboxPreviewPage-C8S8eKWu.js"),__vite__mapDeps([618,619]))),Wo=k(()=>S(()=>import("./PublicPageWrapper-CesRABGE.js"),__vite__mapDeps([620,621,115,307,619]))),AN=k(()=>S(()=>import("./DynamicSandboxPage-B9FYtL2b.js"),__vite__mapDeps([622,619,621,115,307]))),ON=k(()=>S(()=>import("./PublicLearningLayout-Cl9h5qyS.js"),__vite__mapDeps([623,16]))),jg=k(()=>S(()=>import("./TermsAndPrivacyDraft-BpC4eo-b.js").then(e=>e.T),__vite__mapDeps([624,375,33,56,86,97]))),IN=k(()=>S(()=>import("./TermsOfService-DFljRhAQ.js"),[])),LN=k(()=>S(()=>import("./PrivacyPolicy-LLPlFrUd.js"),[])),NN=k(()=>S(()=>import("./AppSuiteThankYou-RT4FTzr0.js"),__vite__mapDeps([625,384,8,626,10,37,125,131,21,265,16,220,11]))),DN=k(()=>S(()=>import("./CreateAccount-CypWEM46.js"),__vite__mapDeps([627,1,55,143,384,8,144,626,37,15,46,12,11]))),$N=k(()=>S(()=>import("./JoinFree-NK5yWjZK.js"),__vite__mapDeps([628,1,55,143,8,144,295,149,37,12]))),MN=k(()=>S(()=>import("./JoinFreeVerified-Bx5DzMBR.js"),[])),UN=k(()=>S(()=>import("./ForgotPassword-BAhyfc06.js"),__vite__mapDeps([629,55,143,8,131,37]))),FN=k(()=>S(()=>import("./ResetPassword-CqmvF0VY.js"),__vite__mapDeps([630,55,143,8,145,15])));k(()=>S(()=>
231import("./AnimationBridgeAuthorize-DS55q_1d.js"),[]));const Rg=k(()=>S(()=>import("./NotFound-B2X_pNlR.js"),[])),VN=k(()=>S(()=>import("./EmbedApp-CFfsiOYo.js"),__vite__mapDeps([631,370,55,143,56,51,5,52,53,15,54,155,10,12,21]))),BN=k(()=>S(()=>import("./EmbedChat-BK7-VRU9.js"),__vite__mapDeps([632,56,31,32,5,33,13,15,34,469,46,81,202,156,368,149,126]))),zN=k(()=>S(()=>import("./AccountCanceled-CBB4GBvL.js"),__vite__mapDeps([633,384,145,125,147]))),WN=k(()=>S(()=>import("./PaymentFailed-CgjHGjhG.js"),__vite__mapDeps([634,384,145,147,125])));k(()=>S(()=>import("./Personas-Dc2wqLID.js"),__vite__mapDeps([490,478,102,4,5,72,335,21,11,97,46,98])));const HN=k(()=>S(()=>import("./OracleCards-DUOaPJkp.js"),__vite__mapDeps([635,55,56,143,384,375,33,3,4,5,6,51,52,53,15,87,88,374,21,154,116,16,246,22,97,18,132,81,145,86,105,98,92]))),qN=k(()=>S(()=>import("./StoryForgeDashboard-9nhKcNPj.js"),__vite__mapDeps([636,140,55,384,51,5,52,53,15,102,4,637,472,3,6,56,11,638,276,13,385,177,16,18,21,145,163,271,98,72,262,97,192,639,12,28,83,123,170,494,137,17,77,284,198,200,115,81,46,111,112,113,114]))),KN=k(()=>S(()=>import("./StoryForgeNewProject-CHtkcYC-.js"),__vite__mapDeps([640,55,56,51,5,52,53,15,637,42,170,493,21,137,16,145,83,28,22,12]))),GN=k(()=>S(()=>import("./StoryForgePreview-B47qUC2c.js"),__vite__mapDeps([641,404,385,54,55,56,140,367,642,643,470,644,542,543,42,51,5,52,53,15,16,200,75,17,268,217,215,13,276,300,80,93,98,81,21]))),QN=k(()=>S(()=>import("./StoryForgeNewBookWizard-mMXV7khj.js"),__vite__mapDeps([645,55,56,140,3,4,5,6,21,10,16,115,28,286,15,12,234,154,174,283,77,128]))),JN=k(()=>S(()=>import("./StoryForgeWizardCharacters-C02M2s_l.js"),__vite__mapDeps([646,55,56,51,5,52,53,15,647,639,154,648,86,227,649,191,137,25,72,12,149,21,202,97,98]))),YN=k(()=>S(()=>import("./StoryForgeWizardSetting-BMustft-.js"),__vite__mapDeps([650,55,56,51,5,52,53,15,647,639,154,648,86,227,649,3,4,6,42,78,278,116,12,206,344,130,276,332,267,97]))),XN=k(()=>S(()=>import("./StoryForgeWizardOptions-XoB09JUC.js"),__vite__mapDeps([651,140,22,15,647,639,154,648,86,227,649,652,106,5,220,51,52,53,16,12]))),ZN=k(()=>S(()=>import("./StoryForgeWizardEngines-DNMKtVAZ.js"),__vite__mapDeps([653,140,647,639,154,648,86,227,15,649,652,106,5,220,130,16,18,28,25,116,21,97]))),eD=k(()=>S(()=>import("./StoryForgeOutline-CiPuyUsA.js"),__vite__mapDeps([654,56,140,143,51,5,52,53,15,648,86,227,649,21,28,10,269,98,72,12])));k(()=>S(()=>import("./StoryForgeWorkspace-CwxfBRKT.js"),__vite__mapDeps([655,140,56,55,385,584,21,638,276,13,145,16,15,17,25,284,28,81,98,53,52,149,18,83])));const tD=k(()=>S(()=>import("./StoryForgeBookWorkspace-DJp9dTP_.js"),__vite__mapDeps([656,140,56,385,102,4,5,3,6,55,143,648,86,227,15,70,199,21,657,149,137,647,639,154,145,16,28,269,72,292,215,13,97,53,52,98,25,324,68,327]))),rD=k(()=>S(()=>import("./StoryForgeIllustrations-BHTyUt25.js"),__vite__mapDeps([658,140,56,385,648,86,227,15,375,33,657,143,149,21,137,324,659,16,28,25,18]))),nD=k(()=>S(()=>import("./StoryForgeIllustrationGenerate-GfloXuDH.js"),__vite__mapDeps([660,384,56,140,51,5,52,53,15,647,639,154,652,106,220,648,86,227,661,137,659,21,224,330,22,90,324,75,266,98,25,204,18,28,13,72]))),sD=k(()=>S(()=>import("./StoryForgeCompose-B8ewx18s.js"),__vite__mapDeps([662,663,42,55,143,54,647,639,154,652,106,5,220,51,52,53,15,384,140,375,33,664,3,4,6,661,
231137,18,77,476,312,648,86,227,649,131,132,28,215,121,122,16,268,12,13,98,21,46]))),oD=k(()=>S(()=>import("./StoryForgeCover-T082-izM.js"),__vite__mapDeps([665,663,42,661,137,664,3,4,5,6,375,33,55,18,77,143,54,51,52,53,15,384,648,86,227,649,215,12,21,329,22,28]))),iD=k(()=>S(()=>import("./StoryForgeBackCover-6-2khP87.js"),__vite__mapDeps([666,663,42,661,137,664,3,4,5,6,375,33,55,18,77,143,56,54,51,52,53,15,384,648,86,227,649,215,12,21,22,28]))),aD=k(()=>S(()=>import("./StoryForgeFullCover-Crk2Ruyk.js"),__vite__mapDeps([667,542,543,55,143,384,54,51,5,52,53,15,401,33,34,215,81,12,83]))),lD=k(()=>S(()=>import("./StoryForgeFrontMatter-DrCn0d-H.js"),__vite__mapDeps([668,55,143,56,54,51,5,52,53,15,384,375,33,661,137,664,3,4,6,18,77,648,86,227,649,215,12]))),pc=k(()=>S(()=>import("./StoryForgeSharedPreview-BpCeo2Ag.js"),__vite__mapDeps([669,642,16,215,13]))),uD=k(()=>S(()=>import("./StoryForgePageLayout-fVO27vdQ.js"),__vite__mapDeps([670,70,671,42,54,143,384,140,648,86,227,15,649,643,215,16,83,12,72,269,98]))),cD=k(()=>S(()=>import("./StoryForgeExport-Cx7Zot_V.js"),__vite__mapDeps([672,385,54,140,384,356,357,51,5,52,53,15,386,470,55,80,287,313,116,244,115,230,98,46,245,18,37,111,112,113,114,673,494,12,21,644,542,543,42,16,83,81,20,276,157]))),dD=k(()=>S(()=>import("./StoryForgeReader-B4oLdadd.js"),__vite__mapDeps([674,642,51,5,52,53,15,59,80,93,215,13]))),hD=k(()=>S(()=>import("./StoryForgeAdminAnalytics-KA688IKr.js"),__vite__mapDeps([675,385,213,25,16,145]))),fD=k(()=>S(()=>import("./StoryForgeQA-DQdJU3E3.js"),__vite__mapDeps([676,385,84,15,384,140,225,263,130,324]))),pD=k(()=>S(()=>import("./AudiobookStudio-DmXDhK-8.js"),__vite__mapDeps([677,55,3,4,5,6,384,472,56,11,21,72,197,274,74,98]))),mD=k(()=>S(()=>import("./AudiobookProject-DzUeG8og.js"),__vite__mapDeps([678,55,56,384,375,33,51,5,52,53,15,274,137,21,28,72,98,247,74,81]))),gD=k(()=>S(()=>import("./VoiceoverStudio-DCr8KFNs.js"),__vite__mapDeps([679,55,384,3,4,5,6,472,56,11,21,72,62,74,98]))),vD=k(()=>S(()=>import("./VoiceoverProject-Bnmthg9U.js"),__vite__mapDeps([680,55,56,384,375,33,51,5,52,53,15,54,143,42,192,57,137,98,3,4,6,76,77,74,21,28,81,75,72]))),yD=k(()=>S(()=>import("./UnderscoreStudio-D4AmCtBX.js"),__vite__mapDeps([681,55,384,3,4,5,6,472,56,11,21,72,62,59,98]))),wD=k(()=>S(()=>import("./StoryboardStudio-BVa6nZMF.js"),__vite__mapDeps([682,55,56,143,3,4,5,6,51,52,53,15,384,50,72,49,98]))),_D=k(()=>S(()=>import("./StoryboardEditor-DSu7fIty.js"),__vite__mapDeps([683,55,56,143,384,382,50,86,21,72,98,18]))),Cg=k(()=>S(()=>import("./ControlRoom-DRLgKktE.js"),__vite__mapDeps([684,55,56,143,384,140,3,4,5,6,51,52,53,15,324,72,202,279,177,21,98]))),xD=k(()=>S(()=>import("./UnderscoreProject-imf1XUjk.js"),__vite__mapDeps([685,55,56,384,143,419,357,52,54,59,21,28,81,105,98]))),bD=k(()=>S(()=>import("./AudioEditLayout-B8JLVEeN.js"),__vite__mapDeps([686,118,260,119,172,497,498]))),ED=k(()=>S(()=>import("./AudioEditProjects-nOJNOEBr.js"),__vite__mapDeps([687,688,40,689,58,690,91,90,269,97,98,15,177,72,95,32,5,33,13,34,215,21,101,327,472,3,4,6,56,11,495,496,220,222]))),Ag=k(()=>S(()=>import("./AudioEditEditor-BrTnIfi-.js"),__vite__mapDeps([691,495,579,102,4,5,689,58]))),SD=k(()=>S(()=>import("./AudioEditSettings-C_zlvtP8.js"),__vite__mapDeps([692,119]))),kD=k(()=>S(()=>import("./GraphicNovelDashboard-CuXOcvDG.js"),__vite__mapDeps([693,384,472,3,4,5,6,56,11,170,494,12,21,72,16,98]))),PD=k(()=>S(()=>import("./GraphicNovelNewProject-C9tJsnUZ.js"),__vite__mapDeps([694,55,56,143,384,695,170,493,21,83,28,137,12]))),TD=k(()=>S(()=>import("./GraphicNovelWorkspace-B3rGJbki.js"),__vite__mapDeps([696,384,55,56,103,21,12,98,72,143,140,18,385,291,284,28,15,53,52,23,25,46,81,542,543,51,5,83,695,115,215,13,68,671]))),jD=k(()=>S(()=>import("./GraphicNovelReader-Cbnr04mh.js"),__vite__mapDeps([697,494,12,21,18,215,13]))),RD=k(()=>S(()=>import("./MarketplaceLayout-uYIJd3U5.js"),__vite__mapDeps([698,27,20,203,299,331]))),CD=k(()=>S(()=>import("./MarketplaceBrowse-Cdh24nBo.js"),__vite__mapDeps([699,385,140,51,5,52,53,15,31,32,33,13,34,10,21,77,100,97,98,339,11]))),AD=k(()=>S(()=>import("./MarketplaceMyApps-DVwWzZvw.js"),__vite__mapDeps([700,140,384,326,11,81,12]))),OD=k(()=>S(()=>import("./MarketplaceMessages-DTDwhiVN.js"),__vite__mapDeps([701,299,126]))),ID=k(()=>S(()=>import("./MarketplaceSell-D6Hi0tGS.js"),__vite__mapDeps([702,55,56,140,384,125,242,339,326,285,20,11,23]))),LD=k(()=>S(()=>import("./MarketplaceMyProducts-CDJyVJ5w.js"),__vite__mapDeps([703,385,140,31,32,5,33,13,15,34,72,100,115,97,98]))),Og=k(()=>S(()=>import("./MarketplaceNewListing-DQ9-7kUy.js"),__vite__mapDeps([704,5
2315,56,384,140,15,81,14,18,246,215,130,13,137]))),ND=k(()=>S(()=>import("./MarketplaceAppLaunch-Dx-7N5D4.js"),__vite__mapDeps([705,384,130]))),DD=k(()=>S(()=>import("./MarketplaceDetail-DSRWozyT.js"),__vite__mapDeps([706,55,385,56,3,4,5,6,51,52,53,15,11,336,349,299,326]))),$D=k(()=>S(()=>import("./MarketplaceDigitalLibrary-CZSAtE6b.js"),__vite__mapDeps([707,140,384,16,83,130,81,11]))),MD=k(()=>S(()=>import("./MarketplacePayoutSetup-DeVWZqKR.js"),__vite__mapDeps([708,384,151,127,21,154,12,53,52]))),UD=k(()=>S(()=>import("./MarketplaceSellerPayments-CE4lD37J.js"),__vite__mapDeps([709,384,140,147,12,151,145,125,194]))),FD=k(()=>S(()=>import("./MarketplaceSellerEarnings-kzETlIGn.js"),__vite__mapDeps([710,384,140,51,5,52,53,15,386,339,242,120,343,388,349,67,389,390,391,81,215,13,147,151,125]))),VD=k(()=>S(()=>import("./LoungeLayout-VBAfeokQ.js"),__vite__mapDeps([711,1,394,106,5,367,195,15,111,112,113,114,55,140,712,385,77,299,346,42,79,98,134,6,4,52]))),Ig=k(()=>S(()=>import("./LoungeFeed-0E__iCjV.js"),__vite__mapDeps([713,140,714,712,385,31,32,5,33,13,15,34,102,4,377,378,379,312,106,55,380,68,77,212,381,3,6,143,84,196,272,21,42,273,291,315,178,328,288,18,73,22,275,715,137,145,249,255,247,83,256,81,594,54,401,213,98,72,23,111,112,113,114,159,124,173,97,25,311,310,51,52,53,188]))),BD=k(()=>S(()=>import("./LoungeUpdates-Bp1pTkRc.js"),__vite__mapDeps([716,12,3,4,5,6,714,712,385,140,31,32,33,13,15,34,102,377,378,379,312,106,55,380,68,77,212,381,143,84,196,272,21,42,273,291,315,178,328,288,18,73,22,275,715,137,145,249,255,247,83,256,81,594,54,401,213,98,72,23,111,112,113,114,159,124,173,97,25,311,310,252,11,19]))),zD=k(()=>S(()=>import("./LoungeIntroductions-Cd_XyQ70.js"),__vite__mapDeps([717,718,714,712,385,140,31,32,5,33,13,15,34,102,4,377,378,379,312,106,55,380,68,77,212,381,3,6,143,84,196,272,21,42,273,291,315,178,328,288,18,73,22,275,715,137,145,249,255,247,83,256,81,594,54,401,213,98,72,23,111,112,113,114,159,124,173,97,25,311,310,16,300]))),WD=k(()=>S(()=>import("./LoungeShowcase-nZw8NtVe.js"),__vite__mapDeps([719,718,714,712,385,140,31,32,5,33,13,15,34,102,4,377,378,379,312,106,55,380,68,77,212,381,3,6,143,84,196,272,21,42,273,291,315,178,328,288,18,73,22,275,715,137,145,249,255,247,83,256,81,594,54,401,213,98,72,23,111,112,113,114,159,124,173,97,25,311,310,16,300]))),HD=k(()=>S(()=>import("./LoungeAsk-DKOOJwoy.js"),__vite__mapDeps([720,718,714,712,385,140,31,32,5,33,13,15,34,102,4,377,378,379,312,106,55,380,68,77,212,381,3,6,143,84,196,272,21,42,273,291,315,178,328,288,18,73,22,275,715,137,145,249,255,247,83,256,81,594,54,401,213,98,72,23,111,112,113,114,159,124,173,97,25,311,310,16,300]))),qD=k(()=>S(()=>import("./LoungeStudioHours-BbP0Nin5.js"),__vite__mapDeps([721,55,143,56,51,5,52,53,15,3,4,6,102,31,32,33,13,34,375,458,261,73,269,173,97,98,72,222,115,244,362,112,86,106,215,361,114,209,210,208]))),KD=k(()=>S(()=>import("./LoungeDirectory-OT4oSJJ1.js"),__vite__mapDeps([722,456,66,384,385,140,51,5,52,53,15,55,25,77,324,172,23,116,111,112,113,114]))),GD=k(()=>S(()=>import("./LoungeLeaderboard-BWtakLdu.js"),__vite__mapDeps([723,456,66,384,385,3,4,5,6,164,103,115,297,190,83,23,159]))),QD=k(()=>S(()=>import("./Summit-DRBlG-JG.js"),__vite__mapDeps([724,140,10,164,12,74,21,190,210]))),JD=k(()=>S(()=>import("./AdminSummit-DkDcMshH.js"),__vite__mapDeps([725,55,143,56,140,3,4,5,6,51,52,53,15,386,164,72,97,98]))),YD=k(()=>S(()=>import("./Dashboard-NcRYjKKp.js"),__vite__mapDeps([726,55,31,32,5,33,13,15,34,30,16,77,72,145,101,100,111,112,113,114]))),XD=k(()=>S(()=>import("./Templates-dIQD3wD9.js"),__vite__mapDeps([727,55,143,51,5,52,53,15,54,382,215,16,12]))),ZD=k(()=>S(()=>import("./Onboarding-CbScjEZj.js"),__vite__mapDeps([728,155,10,13,16,302,284]))),e2=k(()=>S(()=>import("./Editor-DMH0R2Pd.js"),__vite__mapDeps([729,377,381,58,3,4,5,6,375,33,56,462,463,87,88,464,137,136,82,55,143,54,382,51,52,53,15,106,77,68,72,98,367,46,145,81,176,31,32,13,34,118,86,196,178,179,121,122,292,47,291,22,16,18,287,220,95,330,304,269,97,272,223,216,184,84,305,7,92,730]))),t2=k(()=>S(()=>import("./CoverDesigner-DLYsEU22.js"),__vite__mapDeps([731,55,143,382,375,33,51,5,52,53,15,56,92,86]))),r2=k(()=>S(()=>import("./AuthHandoff-D0JvVPUv.js"),__vite__mapDeps([732,8,395]))),n2=ne
231w IT,s2=()=>u.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background",children:u.jsx(eu,{className:"h-8 w-8 animate-spin text-primary"})}),o2=()=>u.jsx(q1,{children:u.jsx($T,{client:n2,children:u.jsx(LA,{children:u.jsx(iO,{children:u.jsx(fO,{children:u.jsx(PO,{children:u.jsx(WO,{children:u.jsx(HO,{children:u.jsx(mT,{children:u.jsxs(NA,{children:[u.jsx(W1,{}),u.jsx(Sk,{position:typeof window<"u"&&window.innerWidth<768?"bottom-center":"bottom-right",duration:5e3,closeButton:!0,richColors:!0,toastOptions:{classNames:{toast:"toast-sf"}}}),u.jsxs(Gj,{children:[u.jsx(EO,{}),u.jsx(jO,{}),u.jsx(RO,{}),u.jsxs(IO,{children:[u.jsx(ZO,{}),u.jsx(OO,{}),u.jsx(v.Suspense,{fallback:u.jsx(s2,{}),children:u.jsxs(Uj,{children:[u.jsx(E,{path:"/",element:u.jsx(Wo,{slug:"landing",children:u.jsx(dI,{})})}),u.jsx(E,{path:"/canvas",element:u.jsx(hI,{})}),u.jsx(E,{path:"/canvas/auth",element:u.jsx(fI,{})}),u.jsx(E,{path:"/workflows",element:u.jsx(mI,{})}),u.jsx(E,{path:"/templates",element:u.jsx(gI,{})}),u.jsx(E,{path:"/w/:slug",element:u.jsx(vI,{})}),u.jsx(E,{path:"/canvas/:workflowId",element:u.jsx(nI,{children:u.jsx(lI,{children:u.jsx(pI,{})})})}),u.jsx(E,{path:"/login",element:u.jsx(Wo,{slug:"login",children:u.jsx(yI,{})})}),u.jsx(E,{path:"/signup",element:u.jsx(Wo,{slug:"signup",children:u.jsx(wI,{})})}),u.jsx(E,{path:"/pricing",element:u.jsx(Wo,{slug:"pricing",children:u.jsx(_I,{})})}),u.jsx(E,{path:"/pricing-resubscribe",element:u.jsx(xI,{})}),u.jsx(E,{path:"/sandbox/preview/:slug",element:u.jsx(CN,{})}),u.jsx(E,{path:"/app-suite-thank-you",element:u.jsx(Wo,{slug:"app-suite-thank-you",children:u.jsx(NN,{})})}),u.jsx(E,{path:"/forgot-password",element:u.jsx(UN,{})}),u.jsx(E,{path:"/reset-password",element:u.jsx(FN,{})}),u.jsx(E,{path:"/create-account",element:u.jsx(DN,{})}),u.jsx(E,{path:"/join-free",element:u.jsx($N,{})}),u.jsx(E,{path:"/join-free/verified",element:u.jsx(MN,{})}),u.jsx(E,{path:"/embed/:token",element:u.jsx(VN,{})}),u.jsx(E,{path:"/embed/chat/:token",element:u.jsx(BN,{})}),u.jsxs(E,{path:"/dashboard/audio-edit",element:u.jsx(Pt,{children:u.jsx(bD,{})}),children:[u.jsx(E,{index:!0,element:u.jsx(vt,{to:"projects",replace:!0})}),u.jsx(E,{path:"projects",element:u.jsx(ED,{})}),u.jsx(E,{path:"editor",element:u.jsx(Ag,{})}),u.jsx(E,{path:"editor/:projectId",element:u.jsx(Ag,{})}),u.jsx(E,{path:"settings",element:u.jsx(SD,{})})]}),u.jsx(E,{path:"/childrens-book-studio/shared/:token",element:u.jsx(pc,{})}),u.jsx(E,{path:"/childrens-book-studio/read/:token",element:u.jsx(pc,{})}),u.jsx(E,{path:"/childrens-book-studio/embed/:token",element:u.jsx(pc,{})}),u.jsx(E,{path:"/image-edit-pro/share/:token",element:u.jsx(cN,{})}),u.jsx(E,{path:"/animation-studio/watch/:token",element:u.jsx(sN,{})}),u.jsx(E,{path:"/storyforge/*",element:u.jsx(uI,{})}),u.jsx(E,{path:"/account-canceled",element:u.jsx(zN,{})}),u.jsx(E,{path:"/payment-failed",element:u.jsx(WN,{})}),u.jsx(E,{path:"/privacy",element:u.jsx(LN,{})}),u.jsx(E,{path:"/terms",element:u.jsx(IN,{})}),u.jsx(E,{path:"/summit",element:u.jsx(QD,{})}),u.jsxs(E,{element:u.jsx(ON,{}),children:[u.jsx(E,{path:"/learning",element:u.jsx(hc,{})}),u.jsx(E,{path:"/learning/app-builder",element:u.jsx(Eg,{})}),u.jsx(E,{path:"/learning/ai-chat",element:u.jsx(Sg,{})}),u.jsx(E,{path:"/learning/custom/:slug",element:u.jsx(kg,{})})]}),u.jsxs(E,{element:u.jsx(Pt,{skipFreeGate:!0,children:u.jsx(AI,{})}),children:[u.jsx(E,{path:"/dashboard",element:u.jsx(bI,{})}),u.jsx(E,{path:"/dashboard/learning",element:u.jsx(hc,{})}),u.jsx(E,{path:"/dashboard/learning/app-builder",element:u.jsx(Eg,{})}),u.jsx(E,{path:"/dashboard/learning/ai-chat",element:u.jsx(Sg,{})}),u.jsx(E,{path:"/dashboard/learning/custom/:slug",element:u.jsx(kg,{})}),u.jsx(E,{path:"/apps",element:u.jsx(EI,{})}),u.jsx(E,{path:"/suites",element:u.jsx(SI,{})}),u.jsx(E,{path:"/apps/storyreel",element:u.jsx(U,{superAdminOnly:!0,children:u.jsx(pN,{})})}),u.jsx(E,{path:"/apps/storyreel/project/:id",element:u.jsx(U,{superAdminOnly:!0,children:u.jsx(mN,{})})}),u.jsx(E,{path:"/twin-studio",element:u.jsx(gN,{})}),u.jsx(E,{path:"/twin-studio/create",element:u.jsx(vN,{})}),u.jsx(E,{path:"/twin-studio/analysis",element:u.jsx(yN,{})}),u.jsx(E,{path:"/twin-studio/review",element:u.jsx(wN,{})}),u.jsx(E,{path:"/twin-studio/details",element:u.jsx(_N,{})}),u.jsx(E,{path:"/twin-studio/details-2",element:u.jsx(xN,{})}),u.jsx(E,{path:"/twin-studio/finalize",element:u.jsx(bN,{})}),u.jsx(E,{path:"/twin-studio/interview",element:u.jsx(EN,{})}),u.jsx(E,{path:"/apps/:id",element:u.jsx(PI,{})}),u.jsx(E,{path:"/projects",element:u.jsx(kI,{})}),u.jsx(E,{path:"/styles",element:u.jsx(zo,{})}
231),u.jsx(E,{path:"/personas",element:u.jsx(zo,{})}),u.jsx(E,{path:"/personas/new",element:u.jsx(wg,{})}),u.jsx(E,{path:"/personas/:id/edit",element:u.jsx(wg,{})}),u.jsx(E,{path:"/writing-styles",element:u.jsx(zo,{})}),u.jsx(E,{path:"/writing-styles/new",element:u.jsx(xg,{})}),u.jsx(E,{path:"/writing-styles/:id/edit",element:u.jsx(xg,{})}),u.jsx(E,{path:"/brand-vault",element:u.jsx(zo,{})}),u.jsx(E,{path:"/brand-vault/new",element:u.jsx(bg,{})}),u.jsx(E,{path:"/brand-vault/:id/edit",element:u.jsx(bg,{})}),u.jsx(E,{path:"/memory",element:u.jsx(zo,{})}),u.jsx(E,{path:"/memory/new",element:u.jsx(_g,{})}),u.jsx(E,{path:"/rag-library",element:u.jsx(yL,{})}),u.jsx(E,{path:"/memory/:id/edit",element:u.jsx(_g,{})}),u.jsx(E,{path:"/memory/interview",element:u.jsx(wL,{})}),u.jsx(E,{path:"/chat",element:u.jsx(_L,{})}),u.jsx(E,{path:"/marble",element:u.jsx(U,{superAdminOnly:!0,children:u.jsx(xL,{})})}),u.jsx(E,{path:"/upscaler",element:u.jsx(TL,{})}),u.jsx(E,{path:"/image-edit-pro",element:u.jsx(jL,{})}),u.jsx(E,{path:"/image-edit-pro/:projectId",element:u.jsx(uN,{})}),u.jsx(E,{path:"/world-builder-pro",element:u.jsx(RL,{})}),u.jsx(E,{path:"/font-studio",element:u.jsx(U,{children:u.jsx(CL,{})})}),u.jsxs(E,{path:"/talent-studio",element:u.jsx(U,{deniedFallback:u.jsx(ac,{appName:"Talent Studio",requirement:"Pro Level"}),children:u.jsx(AL,{})}),children:[u.jsx(E,{index:!0,element:u.jsx(vt,{to:"/talent-studio/talent",replace:!0})}),u.jsx(E,{path:"talent",element:u.jsx(OL,{})}),u.jsx(E,{path:"talent/:talentId",element:u.jsx(IL,{})}),u.jsx(E,{path:"talent/:talentId/update-identity",element:u.jsx($L,{})}),u.jsx(E,{path:"casting-room",element:u.jsx(LL,{})}),u.jsx(E,{path:"casting-room/brief",element:u.jsx(NL,{})}),u.jsx(E,{path:"casting-room/identity",element:u.jsx(Pg,{mode:"draft"})}),u.jsx(E,{path:"casting-room/reference",element:u.jsx(DL,{})}),u.jsx(E,{path:"casting-room/manual",element:u.jsx(Pg,{mode:"manual"})}),u.jsx(E,{path:"new-shoot",element:u.jsx(UL,{})}),u.jsx(E,{path:"shoots/:shootId",element:u.jsx(ML,{})}),u.jsx(E,{path:"campaigns",element:u.jsx(FL,{})}),u.jsx(E,{path:"campaigns/:id",element:u.jsx(VL,{})})]}),u.jsxs(E,{path:"/guild",element:u.jsx(U,{deniedFallback:u.jsx(ac,{appName:Yh,requirement:"Pro Level"}),children:u.jsx(BL,{})}),children:[u.jsx(E,{index:!0,element:u.jsx(zL,{})}),u.jsx(E,{path:"new",element:u.jsx(fc,{})}),u.jsx(E,{path:"e/:id",element:u.jsx(fc,{})}),u.jsx(E,{path:"roster",element:u.jsx(WL,{})}),u.jsx(E,{path:"roster/h/:id",element:u.jsx(HL,{})}),u.jsx(E,{path:"roster/m/:id",element:u.jsx(qL,{})}),u.jsx(E,{path:"archive",element:u.jsx(KL,{})}),u.jsx(E,{path:"showcase",element:u.jsx(GL,{})}),u.jsx(E,{path:"showcase/:id",element:u.jsx(fc,{readOnly:!0})})]}),u.jsxs(E,{path:"/animation-studio",element:u.jsx(U,{deniedFallback:u.jsx(ac,{appName:"Animation Studio",requirement:"Pro Level"}),children:u.jsx(QL,{})}),children:[u.jsx(E,{index:!0,element:u.jsx(vt,{to:"/animation-studio/series",replace:!0})}),u.jsx(E,{path:"series",element:u.jsx(JL,{})}),u.jsx(E,{path:"writers-room",element:u.jsx(YL,{})}),u.jsx(E,{path:"bible",element:u.jsx(aN,{})}),u.jsx(E,{path:"deconstruct",element:u.jsx(lN,{})}),u.jsx(E,{path:"style-world",element:u.jsx(ZL,{})}),u.jsx(E,{path:"cast",element:u.jsx(XL,{})}),u.jsx(E,{path:"character-shop",element:u.jsx(eN,{})}),u.jsx(E,{path:"sound-stage",element:u.jsx(tN,{})}),u.jsx(E,{path:"stage",element:u.jsx(rN,{})}),u.jsx(E,{path:"dailies",element:u.jsx(oN,{})}),u.jsx(E,{path:"admin",element:u.jsx(iN,{})}),u.jsx(E,{path:"screening-room",element:u.jsx(nN,{})})]}),u.jsx(E,{path:"/world-builder-pro/new",element:u.jsx(Tg,{})}),u.jsx(E,{path:"/world-builder-pro/w/:worldId",element:u.jsx(Tg,{})}),u.jsx(E,{path:"/transcriber",element:u.jsx(dN,{})}),u.jsx(E,{path:"/video-generator",element:u.jsx(fN,{})}),u.jsx(E,{path:"/video-generator-classic",element:u.jsx(hN,{})}),u.jsx(E,{path:"/video-generator-v2",element:u.jsx(cI,{})}),u.jsx(E,{path:"/video-editor",element:u.jsx(SN,{})}),u.jsx(E,{path:"/dashboard/storyboard",element:u.jsx(U,{children:u.jsx(wD,{})})}),u.jsx(E,{path:"/dashboard/storyboard/:projectId",element:u.jsx(U,{children:u.jsx(_D,{})})}),u.jsx(E,{path:"/dashboard/control-room",element:u.jsx(U,{children:u.jsx(Cg,{})})}),u.jsx(E,{path:"/dashboard/control-room/agents/:agentId",element:u.jsx(U,{children:u.jsx(Cg,{})})}),u.jsx(E,{path:"/dashboard/music",element:u.jsx(Pt,{children:u.jsx(kN,{})})}),u.jsx(E,{path:"/dashboard/soundforge",element:u.jsx(Pt,{children:u.jsx(PN,{})})}),u.jsx(E,{path:"/avatar-studio",element:u.jsx(TN,{})}),u.jsx(E,{path:"/character-creator",element:u.jsx(vt,{to:"/avatar-studio",replace:!0})}),u.jsx(E,{path:"/dashboard/oracle-cards",element:u.jsx(U,{children:u.jsx(HN,{})})}),u.jsx(E,{path:"/dashboard/graphic-novel",element:u.jsx(U,{children:u.jsx(kD,{})})}),u.jsx(E,{path:"/dashboard/graphic-novel/new",element:u.jsx(U,{children:u.jsx(PD,{})})}),u.jsx(E,{path:"/dashboard/graphic-novel/:id",element:u.jsx(U,{children:u.jsx(TD,{})})}),u.jsx(E,{path:"/dashboard/graphic-novel/:id/read",element:u.jsx(U,{children:u.jsx(jD,{})})}),u.jsx(E,{path:"/dashboard/audiobook",element:u.jsx(U,{children:u.jsx(pD,{})})}),u.jsx(E,{path:"/dashboard/audiobook/:projectId",element:u.jsx(U,{children:u.jsx(mD,{})})}),u.jsx(E,{path:"/dashboard/voiceover",element:u.jsx(U,{children:u.jsx(gD,{})})}),u.jsx(E,{path:"/dashboard/voiceover/:projectId",element:u.jsx(U,{children:u.jsx(vD,{})})}),u.jsx(E,{path:"/dashboard/underscore",element:u.jsx(U,{children:u.jsx(yD,{})})}),u.jsx(E,{path:"/dashboard/underscore/:projectId",element:u.jsx(U,{children:u.jsx(xD,{})})}),u.jsx(E,{path:"/childrens-book-studio",element:u.jsx(U,{children:u.jsx(qN,{variant:"children"})})}),u.jsx(E,{path:"/childrens-book-studio/new",element:u.jsx(U,{children:u.jsx(KN,{})})}),u.jsx(E,{path:"/childrens-book-studio/wizard",element:u.jsx(U,{children:u.jsx(QN,{})})}),u.jsx(E,{path:"/childrens-book-studio/:id/wizard/characters",element:u.jsx(U,{children:u.jsx(JN,{})})}),u.jsx(E,{path:"/childrens-book-studio/:id/wizard/setting",element:u.jsx(U,{children:u.jsx(YN,{})})}),u.jsx(E,{path:"/childrens-book-studio/:id/wizard/options",element:u.jsx(U,{children:u.jsx(XN,{})})}),u.jsx(E,{path:"/childrens-book-studio/:id/wizard/engines",element:u.jsx(U,{children:u.jsx(ZN,{})})}),u.jsx(E,{path:"/childrens-book-studio/:id/outline",element:u.jsx(U,{children:u.jsx(eD,{})})}),u.jsx(E,{path:"/childrens-book-studio/:id",element:u.jsx(U,{children:u.jsx(tD,{})})}),u.jsx(E,{path:"/childrens-book-studio/:id/illustrations",element:u.jsx(U,{children:u.jsx(rD,{})})}),u.jsx(E,{path:"/childrens-book-studio/:id/illustrations/generate",element:u.jsx(U,{children:u.jsx(nD,{})})}),u.jsx(E,{path:"/childrens-book-studio/:id/compose",element:u.jsx(U,{children:u.jsx(sD,{})})}),u.jsx(E,{path:"/childrens-book-studio/:id/cover",element:u.jsx(U,{children:u.jsx(oD,{})})}),u.jsx(E,{path:"/childrens-book-studio/:id/back-cover",element:u.jsx(U,{children:u.jsx(iD,{})})}),u.jsx(E,{path:"/childrens-book-studio/:id/full-cover",element:u.jsx(U,{children:u.jsx(aD,{})})}),u.jsx(E,{path:"/childrens-book-studio/:id/front-matter",element:u.jsx(U,{children:u.jsx(lD,{})})}),u.jsx(E,{path:"/childrens-book-studio/:id/layout",element:u.jsx(U,{children:u.jsx(uD,{})})}),u.jsx(E,{path:"/childrens-book-studio/:id/preview",element:u.jsx(U,{children:u.jsx(GN,{})})}),u.jsx(E,{path:"/childrens-book-studio/:id/export",element:u.jsx(U,{children:u.jsx(cD,{})})}),u.jsx(E,{path:"/childrens-book-studio/:id/read",element:u.jsx(U,{children:u.jsx(dD,{})})}),u.jsx(E,{path:"/childrens-book-studio/qa",element:u.jsx(U,{children:u.jsx(fD,{})})}),u.jsx(E,{path:"/childrens-book-studio/admin/analytics",element:u.jsx(U,{superAdminOnly:!0,children:u.jsx(hD,{})})}),u.jsx(E,{path:"/chat/presets",element:u.jsx(bL,{})}),u.jsx(E,{path:"/chat/saved",element:u.jsx(EL,{})}),u.jsx(E,{path:"/projects/:id/wizard",element:u.jsx(TI,{})}),u.jsx(E,{path:"/projects/:id/generating",element:u.jsx(jI,{})}),u.jsx(E,{path:"/projects/:id/edit",element:u.jsx(RI,{})}),u.jsx(E,{path:"/projects/:id/stats",element:u.jsx(CI,{})}),u.jsx(E,{path:"/buy-credits",element:u.jsx(fL,{})}),u.jsx(E,{path:"/credit-usage",element:u.jsx(mL,{})}),u.jsx(E,{path:"/credits/history",element:u.jsx(pL,{})}),u.jsx(E,{path:"/analytics",element:u.jsx(kL,{})}),u.jsx(E,{path:"/progress",element:u.jsx(PL,{})}),u.jsx(E,{path:"/settings",element:u.jsx(gL,{})}),u.jsx(E,{path:"/notifications",element:u.jsx(vL,{})}),u.jsx(E,{path:"/terms",element:u.jsx(jg,{})}),u.jsx(E,{path:"/privacy",element:u.jsx(jg,{})}),u.jsx(E,{path:"/app-builder",element:u.jsx(U,{children:u.jsx(OI,{})})}),u.jsx(E,{path:"/app-builder/simplified/new",element:u.jsx(U,{children:u.jsx(vg,{})})}),u.jsx(E,{path:"/app-builder/simplified/:id",element:u.jsx(U,{children:u.jsx(vg,{})})}),u.jsx(E,{path:"/app-builder/advanced/new",element:u.jsx(U,{children:u.jsx(dc,{})})}),u.jsx(E,{path:"/app-builder/advanced/:id",element:u.jsx(U,{children:u.jsx(dc,{})})}),u.jsx(E,{path:"/app-builder/:id",element:u.jsx(U,{children:u.jsx(dc,{})})}),u.jsx(E,{path:"/app-builder/sop",element:u.jsx(U,{children:u.jsx(hc,{})})}),u.jsx(E,{path:"/dashboard/workflows",element:u.jsx(U,{children:u.jsx(dL,{})})}),u.jsx(E,{path:"/dashboard/workflows/:id",element:u.jsx(U,{children:u.jsx(hL,{})})}),u.jsx(E,{path:"/admin/theme",element:u.jsx(U,{adminOnly:!0,children:u.jsx(SL,{})})}),u.jsx(E,{path:"/admin/users",element:u.jsx(U,{adminOnly:!0,children:u.jsx(II,{})})}),u.jsx(E,{path:"/admin/costs",element:u.jsx(U,{superAdminOnly:!0,children:u.jsx(LI,{})})}),u.jsx(E,{path:"/admin/errors",element:u.jsx(U,{adminOnly:!0,children:u.jsx(NI,{})})}),u.jsx(E,{path:"/admin/storage",element:u.jsx(U,{adminOnly:!0,children:u.jsx(DI,{})})}),u.jsx(E,{path:"/admin/s3-migration",element:u.jsx(U,{adminOnly:!0,children:u.jsx($I,{})})}),u.jsx(E,{path:"/admin/restore-preview",element:u.jsx(U,{children:u.jsx(MI,{})})}),u.jsx(E,{path:"/admin/restore-reconcile",element:u.jsx(U,{children:u.jsx(UI,{})})}),u.jsx(E,{path:"/admin/badges",element:u.jsx(U,{children:u.jsx(FI,{})})}),u.jsx(E,{path:"/admin/sub-suites",element:u.jsx(U,{children:u.jsx(VI,{})})}),u.jsx(E,{path:"/admin/premium-apps",element:u.jsx(U,{children:u.jsx(BI,{})})}),u.jsx(E,{path:"/admin/canvas-models",element:u.jsx(U,{adminOnly:!0,children:u.jsx(zI,{})})}),u.jsx(E,{path:"/admin/auto-routing",element:u.jsx(U,{adminOnly:!0,children:u.jsx(WI,{})})}),u.jsx(E,{path:"/admin/cinematography",element:u.jsx(U,{adminOnly:!0,children:u.jsx(HI,{})})}),u.jsx(E,{path:"/admin/attachment-indexing",element:u.jsx(U,{adminOnly:!0,children:u.jsx(qI,{})})}),u.jsx(E,{path:"/admin/world-builder",element:u.jsx(U,{superAdminOnly:!0,children:u.jsx(KI,{})})}),u.jsx(E,{path:"/admin/talent-studio",element:u.jsx(U,{superAdminOnly:!0,children:u.jsx(GI,{})})}),u.jsx(E,{path:"/admin/guild",element:u.jsx(U,{superAdminOnly:!0,deniedFallback:u.jsx(Rg,{}),children:u.jsx(QI,{})})}),u.jsx(E,{path:"/admin/model-manager",element:u.jsx(U,{adminOnly:!0,children:u.jsx(JI,{})})}),u.jsx(E,{path:"/admin/app-models",element:u.jsx(U,{adminOnly:!0,children:u.jsx(YI,{})})}),u.jsx(E,{path:"/admin/sandbox",element:u.jsx(U,{children:u.jsx(jN,{})})}),u.jsx(E,{path:"/admin/sandbox/landing",element:u.jsx(U,{children:u.jsx(RN,{})})}),u.jsx(E,{path:"/admin/skills",element:u.jsx(U,{children:u.jsx(XI,{})})}),u.jsx(E,{path:"/admin/skills/analytics",element:u.jsx(U,{children:u.jsx(tL,{})})}),u.jsx(E,{path:"/admin/skills/templates",element:u.jsx(U,{children:u.jsx(rL,{})})}),u.jsx(E,{path:"/admin/skills/chains",element:u.jsx(U,{children:u.jsx(nL,{})})}),u.jsx(E,{path:"/admin/skills/revenue",element:u.jsx(U,{children:u.jsx(sL,{})})}),u.jsx(E,{path:"/admin/skills/new",element:u.jsx(U,{children:u.jsx(yg,{})})}),u.jsx(E,{path:"/admin/skills/:id",element:u.jsx(U,{children:u.jsx(ZI,{})})}),u.jsx(E,{path:"/admin/skills/:id/edit",element:u.jsx(U,{children:u.jsx(yg,{})})}),u.jsx(E,{path:"/admin/skills/:id/optimize-triggers",element:u.jsx(U,{children:u.jsx(eL,{})})}),u.jsx(E,{path:"/admin/character-templates",element:u.jsx(U,{adminOnly:!0,children:u.jsx(iL,{})})}),u.jsx(E,{path:"/admin/app-tags",element:u.jsx(U,{adminOnly:!0,children:u.jsx(aL,{})})}),u.jsx(E,{path:"/admin/app-registry",element:u.jsx(U,{adminOnly:!0,children:u.jsx(lL,{})})}),u.jsx(E,{path:"/admin/revenue-forecast",element:u.jsx(U,{adminOnly:!0,children:u.jsx(oL,{})})}),u.jsx(E,{path:"/concierge-dev",element:u.jsx(U,{adminOnly:!0,children:u.jsx(uL,{})})}),u.jsx(E,{path:"/concierge",element:u.jsx(Pt,{children:u.jsx(cL,{})})}),u.jsx(E,{path:"/admin/summit",element:u.jsx(U,{adminOnly:!0,children:u.jsx(JD,{})})}),u.jsx(E,{path:"/marketplace/digital-library",element:u.jsx(Pt,{children:u.jsx($D,{})})}),u.jsxs(E,{path:"/lounge",element:u.jsx(VD,{}),children:[u.jsx(E,{index:!0,element:u.jsx(Ig,{})}),u.jsx(E,{path:"feed",element:u.jsx(Ig,{})}),u.jsx(E,{path:"updates",element:u.jsx(BD,{})}),u.jsx(E,{path:"introductions",element:u.jsx(zD,{})}),u.jsx(E,{path:"showcase",element:u.jsx(WD,{})}),u.jsx(E,{path:"ask",element:u.jsx(HD,{})}),u.jsx(E,{path:"studio-hours",element:u.jsx(qD,{})}),u.jsx(E,{path:"directory",element:u.jsx(KD,{})}),u.jsx(E,{path:"leaderboard",element:u.jsx(GD,{})})]}),u.jsxs(E,{path:"/marketplace",element:u.jsx(Pt,{children:u.jsx(RD,{})}),children:[u.jsx(E,{index:!0,element:u.jsx(CD,{})}),u.jsx(E,{path:"my-apps",element:u.jsx(AD,{})}),u.jsx(E,{path:"my-apps/launch/:id",element:u.jsx(ND,{})}),u.jsx(E,{path:"my-products",element:u.jsx(LD,{})}),u.jsx(E,{path:"messages",element:u.jsx(OD,{})}
231),u.jsx(E,{path:"sell",element:u.jsx(ID,{})}),u.jsx(E,{path:"sell/new",element:u.jsx(Og,{})}),u.jsx(E,{path:"sell/edit/:listingId",element:u.jsx(Og,{})}),u.jsx(E,{path:"sell/payments/setup",element:u.jsx(MD,{})}),u.jsx(E,{path:"sell/payments",element:u.jsx(UD,{})}),u.jsx(E,{path:"sell/earnings",element:u.jsx(FD,{})}),u.jsx(E,{path:":slug",element:u.jsx(DD,{})})]})]}),u.jsx(E,{path:"/text-edit-pro",element:u.jsx(Pt,{children:u.jsx(U,{superAdminOnly:!0,children:u.jsx(YD,{})})})}),u.jsx(E,{path:"/text-edit-pro/onboarding",element:u.jsx(Pt,{children:u.jsx(U,{superAdminOnly:!0,children:u.jsx(ZD,{})})})}),u.jsx(E,{path:"/text-edit-pro/templates",element:u.jsx(Pt,{children:u.jsx(U,{superAdminOnly:!0,children:u.jsx(XD,{})})})}),u.jsx(E,{path:"/text-edit-pro/editor/:projectId",element:u.jsx(Pt,{children:u.jsx(U,{superAdminOnly:!0,children:u.jsx(e2,{})})})}),u.jsx(E,{path:"/text-edit-pro/cover/:projectId",element:u.jsx(Pt,{children:u.jsx(U,{superAdminOnly:!0,children:u.jsx(t2,{})})})}),u.jsx(E,{path:"/animation-studio/authorize",element:u.jsx(vt,{to:"/animation-studio",replace:!0})}),u.jsx(E,{path:"/auth/handoff",element:u.jsx(r2,{})}),u.jsx(E,{path:"/:sandboxSlug",element:u.jsx(AN,{})}),u.jsx(E,{path:"*",element:u.jsx(Rg,{})})]})})]}),u.jsx(sO,{})]})]})})})})})})})})})});window.addEventListener("error",e=>console.error("[RUNTIME ERROR]",e.error));window.addEventListener("unhandledrejection",e=>console.error("[UNHANDLED PROMISE]",e.reason));n0(document.getElementById("root")).render(u.jsx(o2,{}));export{s0 as $,Sf as A,jr as B,QS as C,Ae as D,ye as E,Zh as F,Xh as G,d2 as H,ef as I,Tk as J,d0 as K,Ii as L,wl as M,vt as N,V as O,lg as P,i0 as Q,om as R,lw as S,D0 as T,H_ as U,KP as V,GP as W,sf as X,_n as Y,QP as Z,S as _,Of as a,s1 as a$,a0,MA as a1,qP as a2,mT as a3,ZS as a4,JS as a5,v2 as a6,y2 as a7,gT as a8,Tr as a9,Yi as aA,xd as aB,Ri as aC,AT as aD,He as aE,ut as aF,xT as aG,iw as aH,a2 as aI,zg as aJ,ZE as aK,Or as aL,N2 as aM,O0 as aN,c2 as aO,O2 as aP,A2 as aQ,o1 as aR,D2 as aS,LT as aT,km as aU,w2 as aV,_2 as aW,GT as aX,C2 as aY,bO as aZ,n1 as a_,Mw as aa,Yh as ab,u2 as ac,eh as ad,YS as ae,tu as af,Gi as ag,E2 as ah,b2 as ai,z1 as aj,k as ak,mO as al,LO as am,XS as an,M2 as ao,U2 as ap,r1 as aq,i1 as ar,Dw as as,nI as at,lI as au,sS as av,H1 as aw,UA as ax,kS as ay,P_ as az,Ve as b,Nm as b0,du as b1,k2 as b2,DA as b3,R2 as b4,r0 as b5,l2 as b6,t1 as b7,GS as b8,I2 as b9,p2 as ba,P2 as bb,T2 as bc,N0 as c,eu as d,x2 as e,uu as f,hk as g,S2 as h,Pn as i,u as j,eS as k,Tf as l,Nt as m,L2 as n,ox as o,pO as p,f2 as q,v as r,le as s,e1 as t,sI as u,I0 as v,Fe as w,J_ as x,bo as y,Ge as z};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.