@clerk/ui 1.0.0-snapshot.v20251215210631 → 1.0.0-snapshot.v20251216175437
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{207_ui_01c6bf_1.0.0-snapshot.v20251215210631.js → 207_ui_338113_1.0.0-snapshot.v20251216175437.js} +1 -1
- package/dist/{217_ui_01c6bf_1.0.0-snapshot.v20251215210631.js → 217_ui_338113_1.0.0-snapshot.v20251216175437.js} +1 -1
- package/dist/{360_ui_01c6bf_1.0.0-snapshot.v20251215210631.js → 360_ui_338113_1.0.0-snapshot.v20251216175437.js} +1 -1
- package/dist/{444_ui_01c6bf_1.0.0-snapshot.v20251215210631.js → 444_ui_338113_1.0.0-snapshot.v20251216175437.js} +1 -1
- package/dist/{573_ui_01c6bf_1.0.0-snapshot.v20251215210631.js → 573_ui_338113_1.0.0-snapshot.v20251216175437.js} +1 -1
- package/dist/{970_ui_01c6bf_1.0.0-snapshot.v20251215210631.js → 970_ui_338113_1.0.0-snapshot.v20251216175437.js} +1 -1
- package/dist/ClerkUi.js +2 -2
- package/dist/Components.js +0 -7
- package/dist/Components.js.map +1 -1
- package/dist/{apiKeys_ui_01c6bf_1.0.0-snapshot.v20251215210631.js → apiKeys_ui_338113_1.0.0-snapshot.v20251216175437.js} +1 -1
- package/dist/{checkout_ui_01c6bf_1.0.0-snapshot.v20251215210631.js → checkout_ui_338113_1.0.0-snapshot.v20251216175437.js} +2 -2
- package/dist/common/EmailLinkVerify.js +1 -1
- package/dist/common/Gate.js +1 -1
- package/dist/common/RemoveResourceForm.js +1 -1
- package/dist/common/SSOCallback.js +1 -1
- package/dist/common/withRedirect.js +1 -1
- package/dist/components/APIKeys/APIKeys.js +1 -1
- package/dist/components/APIKeys/RevokeAPIKeyConfirmationModal.js +1 -1
- package/dist/components/Checkout/CheckoutComplete.js +1 -1
- package/dist/components/Checkout/CheckoutForm.js +1 -1
- package/dist/components/Checkout/CheckoutPage.js +1 -1
- package/dist/components/Checkout/parts.js +1 -1
- package/dist/components/CreateOrganization/CreateOrganizationForm.js +1 -1
- package/dist/components/CreateOrganization/CreateOrganizationPage.js +1 -1
- package/dist/components/ImpersonationFab/index.js +1 -1
- package/dist/components/OAuthConsent/OAuthConsent.js +1 -1
- package/dist/components/OrganizationList/UserInvitationList.js +1 -1
- package/dist/components/OrganizationList/UserMembershipList.js +1 -1
- package/dist/components/OrganizationList/UserSuggestionList.js +1 -1
- package/dist/components/OrganizationProfile/ActionConfirmationPage.js +1 -1
- package/dist/components/OrganizationProfile/ActiveMembersList.js +1 -1
- package/dist/components/OrganizationProfile/AddDomainForm.js +1 -1
- package/dist/components/OrganizationProfile/DomainList.js +1 -1
- package/dist/components/OrganizationProfile/InviteMembersForm.js +1 -1
- package/dist/components/OrganizationProfile/InviteMembersScreen.js +1 -1
- package/dist/components/OrganizationProfile/InvitedMembersList.js +1 -1
- package/dist/components/OrganizationProfile/OrganizationAPIKeysPage.js +1 -1
- package/dist/components/OrganizationProfile/OrganizationGeneralPage.js +1 -1
- package/dist/components/OrganizationProfile/OrganizationMembers.js +1 -1
- package/dist/components/OrganizationProfile/OrganizationProfileNavbar.js +1 -1
- package/dist/components/OrganizationProfile/ProfileForm.js +1 -1
- package/dist/components/OrganizationProfile/RemoveDomainForm.js +1 -1
- package/dist/components/OrganizationProfile/RequestToJoinList.js +1 -1
- package/dist/components/OrganizationProfile/VerifiedDomainForm.js +1 -1
- package/dist/components/OrganizationProfile/VerifyDomainForm.js +1 -1
- package/dist/components/OrganizationProfile/index.js +1 -1
- package/dist/components/OrganizationSwitcher/OrganizationSwitcherPopover.js +3 -6
- package/dist/components/OrganizationSwitcher/OrganizationSwitcherPopover.js.map +1 -1
- package/dist/components/OrganizationSwitcher/OrganizationSwitcherTrigger.js +1 -1
- package/dist/components/OrganizationSwitcher/UserInvitationSuggestionList.js +1 -1
- package/dist/components/OrganizationSwitcher/UserMembershipList.js +1 -1
- package/dist/components/PaymentMethods/AddPaymentMethod.js +1 -1
- package/dist/components/PaymentMethods/PaymentMethods.js +1 -1
- package/dist/components/PricingTable/PricingTable.js +2 -3
- package/dist/components/PricingTable/PricingTable.js.map +1 -1
- package/dist/components/PricingTable/PricingTableDefault.js +1 -1
- package/dist/components/SessionTasks/index.js +1 -1
- package/dist/components/SessionTasks/tasks/TaskChooseOrganization/ChooseOrganizationScreen.js +1 -1
- package/dist/components/SessionTasks/tasks/TaskChooseOrganization/CreateOrganizationScreen.js +1 -1
- package/dist/components/SessionTasks/tasks/TaskChooseOrganization/index.js +1 -1
- package/dist/components/SessionTasks/tasks/TaskResetPassword/index.js +1 -1
- package/dist/components/SignIn/SignInFactorOne.js +1 -1
- package/dist/components/SignIn/SignInFactorOneAlternativeChannelCodeForm.js +1 -1
- package/dist/components/SignIn/SignInFactorOneCodeForm.js +1 -1
- package/dist/components/SignIn/SignInFactorOneEmailLinkCard.js +1 -1
- package/dist/components/SignIn/SignInFactorOnePasswordCard.js +1 -1
- package/dist/components/SignIn/SignInFactorTwoBackupCodeCard.js +1 -1
- package/dist/components/SignIn/SignInFactorTwoCodeForm.js +1 -1
- package/dist/components/SignIn/SignInFactorTwoEmailLinkCard.js +1 -1
- package/dist/components/SignIn/SignInSocialButtons.js +1 -1
- package/dist/components/SignIn/SignInStart.js +1 -1
- package/dist/components/SignIn/index.js +1 -1
- package/dist/components/SignIn/shared.js +1 -1
- package/dist/components/SignUp/SignUpContinue.js +1 -1
- package/dist/components/SignUp/SignUpEmailLinkCard.js +1 -1
- package/dist/components/SignUp/SignUpRestrictedAccess.js +1 -1
- package/dist/components/SignUp/SignUpSocialButtons.js +1 -1
- package/dist/components/SignUp/SignUpStart.js +1 -1
- package/dist/components/SignUp/SignUpVerificationCodeForm.js +1 -1
- package/dist/components/SignUp/index.js +1 -1
- package/dist/components/SubscriptionDetails/index.js +1 -1
- package/dist/components/UserButton/UserButtonPopover.js +1 -1
- package/dist/components/UserButton/UserButtonTopLevelIdentifier.js +1 -1
- package/dist/components/UserButton/UserButtonTrigger.js +1 -1
- package/dist/components/UserButton/useMultisessionActions.js +2 -7
- package/dist/components/UserButton/useMultisessionActions.js.map +1 -1
- package/dist/components/UserProfile/APIKeysPage.js +1 -1
- package/dist/components/UserProfile/AccountPage.js +1 -1
- package/dist/components/UserProfile/ActiveDevicesSection.js +1 -1
- package/dist/components/UserProfile/AddAuthenticatorApp.js +1 -1
- package/dist/components/UserProfile/ConnectedAccountsMenu.js +1 -1
- package/dist/components/UserProfile/ConnectedAccountsSection.js +1 -1
- package/dist/components/UserProfile/DeleteUserForm.js +1 -1
- package/dist/components/UserProfile/EmailForm.js +1 -1
- package/dist/components/UserProfile/EmailsSection.js +1 -1
- package/dist/components/UserProfile/EnterpriseAccountsSection.js +1 -1
- package/dist/components/UserProfile/MfaBackupCodeCreateForm.js +1 -1
- package/dist/components/UserProfile/MfaBackupCodeList.js +1 -1
- package/dist/components/UserProfile/MfaForm.js +1 -1
- package/dist/components/UserProfile/MfaPhoneCodeScreen.js +1 -1
- package/dist/components/UserProfile/MfaSection.js +1 -1
- package/dist/components/UserProfile/PasskeySection.js +1 -1
- package/dist/components/UserProfile/PasswordForm.js +1 -1
- package/dist/components/UserProfile/PasswordSection.js +1 -1
- package/dist/components/UserProfile/PhoneForm.js +1 -1
- package/dist/components/UserProfile/PhoneSection.js +1 -1
- package/dist/components/UserProfile/ProfileForm.js +1 -1
- package/dist/components/UserProfile/RemoveResourceForm.js +1 -1
- package/dist/components/UserProfile/SecurityPage.js +1 -1
- package/dist/components/UserProfile/UserProfileSection.js +1 -1
- package/dist/components/UserProfile/UsernameForm.js +1 -1
- package/dist/components/UserProfile/UsernameSection.js +1 -1
- package/dist/components/UserProfile/VerifyTOTP.js +1 -1
- package/dist/components/UserProfile/Web3Form.js +1 -1
- package/dist/components/UserProfile/Web3Section.js +1 -1
- package/dist/components/UserVerification/UVFactorOneCodeForm.js +1 -1
- package/dist/components/UserVerification/UVFactorOnePasskeysCard.js +1 -1
- package/dist/components/UserVerification/UVFactorTwoBackupCodeCard.js +1 -1
- package/dist/components/UserVerification/UVFactorTwoCodeForm.js +1 -1
- package/dist/components/UserVerification/UVFactorTwoPhoneCodeCard.js +1 -1
- package/dist/components/UserVerification/UserVerificationFactorOnePassword.js +1 -1
- package/dist/components/UserVerification/useUserVerificationSession.js +1 -1
- package/dist/components/Waitlist/WaitlistForm.js +1 -1
- package/dist/components/Waitlist/index.js +1 -1
- package/dist/components/devPrompts/EnableOrganizationsPrompt/index.js +1 -1
- package/dist/components/devPrompts/KeylessPrompt/index.js +1 -1
- package/dist/contexts/CoreClerkContextWrapper.js +1 -1
- package/dist/contexts/CoreSessionContext.js +1 -1
- package/dist/contexts/CoreUserContext.js +1 -1
- package/dist/{createorganization_ui_01c6bf_1.0.0-snapshot.v20251215210631.js → createorganization_ui_338113_1.0.0-snapshot.v20251216175437.js} +1 -1
- package/dist/customizables/AppearanceContext.js +1 -1
- package/dist/elements/Action/ActionRoot.js +1 -1
- package/dist/elements/CodeControl.js +1 -1
- package/dist/elements/Drawer.js +2 -8
- package/dist/elements/Drawer.js.map +1 -1
- package/dist/elements/Form.js +1 -1
- package/dist/elements/Menu.js +2 -3
- package/dist/elements/Menu.js.map +1 -1
- package/dist/elements/Modal.js +2 -3
- package/dist/elements/Modal.js.map +1 -1
- package/dist/elements/Navbar.js +1 -1
- package/dist/elements/PhoneInput/index.js +1 -1
- package/dist/elements/Popover.js +1 -4
- package/dist/elements/Popover.js.map +1 -1
- package/dist/elements/Select.js +1 -1
- package/dist/elements/SocialButtons.js +1 -1
- package/dist/elements/Tabs.js +1 -1
- package/dist/elements/TimerButton.js +1 -1
- package/dist/elements/Tooltip.js +24 -29
- package/dist/elements/Tooltip.js.map +1 -1
- package/dist/elements/contexts/index.js +1 -1
- package/dist/{enableOrganizationsPrompt_ui_01c6bf_1.0.0-snapshot.v20251215210631.js → enableOrganizationsPrompt_ui_338113_1.0.0-snapshot.v20251216175437.js} +1 -1
- package/dist/foundations/defaultFoundations.d.ts +153 -153
- package/dist/{impersonationfab_ui_01c6bf_1.0.0-snapshot.v20251215210631.js → impersonationfab_ui_338113_1.0.0-snapshot.v20251216175437.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/internal/index.js +1 -1
- package/dist/{keylessPrompt_ui_01c6bf_1.0.0-snapshot.v20251215210631.js → keylessPrompt_ui_338113_1.0.0-snapshot.v20251216175437.js} +1 -1
- package/dist/lazyModules/MountedCheckoutDrawer.js +1 -1
- package/dist/lazyModules/MountedPlanDetailDrawer.js +1 -1
- package/dist/lazyModules/MountedSubscriptionDetailDrawer.js +1 -1
- package/dist/lazyModules/providers.js +17 -24
- package/dist/lazyModules/providers.js.map +1 -1
- package/dist/{oauthConsent_ui_01c6bf_1.0.0-snapshot.v20251215210631.js → oauthConsent_ui_338113_1.0.0-snapshot.v20251216175437.js} +1 -1
- package/dist/{onetap_ui_01c6bf_1.0.0-snapshot.v20251215210631.js → onetap_ui_338113_1.0.0-snapshot.v20251216175437.js} +1 -1
- package/dist/{op-api-keys-page_ui_01c6bf_1.0.0-snapshot.v20251215210631.js → op-api-keys-page_ui_338113_1.0.0-snapshot.v20251216175437.js} +1 -1
- package/dist/{organizationlist_ui_01c6bf_1.0.0-snapshot.v20251215210631.js → organizationlist_ui_338113_1.0.0-snapshot.v20251216175437.js} +1 -1
- package/dist/{organizationprofile_ui_01c6bf_1.0.0-snapshot.v20251215210631.js → organizationprofile_ui_338113_1.0.0-snapshot.v20251216175437.js} +1 -1
- package/dist/organizationswitcher_ui_338113_1.0.0-snapshot.v20251216175437.js +1 -0
- package/dist/{payment-attempt-page_ui_01c6bf_1.0.0-snapshot.v20251215210631.js → payment-attempt-page_ui_338113_1.0.0-snapshot.v20251216175437.js} +1 -1
- package/dist/{planDetails_ui_01c6bf_1.0.0-snapshot.v20251215210631.js → planDetails_ui_338113_1.0.0-snapshot.v20251216175437.js} +1 -1
- package/dist/{prefetchorganizationlist_ui_01c6bf_1.0.0-snapshot.v20251215210631.js → prefetchorganizationlist_ui_338113_1.0.0-snapshot.v20251216175437.js} +1 -1
- package/dist/{pricingTable_ui_01c6bf_1.0.0-snapshot.v20251215210631.js → pricingTable_ui_338113_1.0.0-snapshot.v20251216175437.js} +1 -1
- package/dist/primitives/hooks/useFormField.js +1 -1
- package/dist/{revoke-api-key-modal_ui_01c6bf_1.0.0-snapshot.v20251215210631.js → revoke-api-key-modal_ui_338113_1.0.0-snapshot.v20251216175437.js} +1 -1
- package/dist/router/BaseRouter.js +1 -1
- package/dist/router/PathRouter.js +1 -1
- package/dist/router/Route.js +1 -1
- package/dist/router/VirtualRouter.js +1 -1
- package/dist/{sessionTasks_ui_01c6bf_1.0.0-snapshot.v20251215210631.js → sessionTasks_ui_338113_1.0.0-snapshot.v20251216175437.js} +1 -1
- package/dist/{signin_ui_01c6bf_1.0.0-snapshot.v20251215210631.js → signin_ui_338113_1.0.0-snapshot.v20251216175437.js} +1 -1
- package/dist/{signup_ui_01c6bf_1.0.0-snapshot.v20251215210631.js → signup_ui_338113_1.0.0-snapshot.v20251216175437.js} +1 -1
- package/dist/{statement-page_ui_01c6bf_1.0.0-snapshot.v20251215210631.js → statement-page_ui_338113_1.0.0-snapshot.v20251216175437.js} +1 -1
- package/dist/{subscriptionDetails_ui_01c6bf_1.0.0-snapshot.v20251215210631.js → subscriptionDetails_ui_338113_1.0.0-snapshot.v20251216175437.js} +1 -1
- package/dist/{taskChooseOrganization_ui_01c6bf_1.0.0-snapshot.v20251215210631.js → taskChooseOrganization_ui_338113_1.0.0-snapshot.v20251216175437.js} +1 -1
- package/dist/{taskResetPassword_ui_01c6bf_1.0.0-snapshot.v20251215210631.js → taskResetPassword_ui_338113_1.0.0-snapshot.v20251216175437.js} +1 -1
- package/dist/ui-common_ui_338113_1.0.0-snapshot.v20251216175437.js +139 -0
- package/dist/ui.browser.js +3 -20
- package/dist/{up-api-keys-page_ui_01c6bf_1.0.0-snapshot.v20251215210631.js → up-api-keys-page_ui_338113_1.0.0-snapshot.v20251216175437.js} +1 -1
- package/dist/{useravatar_ui_01c6bf_1.0.0-snapshot.v20251215210631.js → useravatar_ui_338113_1.0.0-snapshot.v20251216175437.js} +1 -1
- package/dist/{userbutton_ui_01c6bf_1.0.0-snapshot.v20251215210631.js → userbutton_ui_338113_1.0.0-snapshot.v20251216175437.js} +1 -1
- package/dist/{userprofile_ui_01c6bf_1.0.0-snapshot.v20251215210631.js → userprofile_ui_338113_1.0.0-snapshot.v20251216175437.js} +2 -2
- package/dist/{userverification_ui_01c6bf_1.0.0-snapshot.v20251215210631.js → userverification_ui_338113_1.0.0-snapshot.v20251216175437.js} +1 -1
- package/dist/vendors_ui_338113_1.0.0-snapshot.v20251216175437.js +20 -0
- package/dist/{waitlist_ui_01c6bf_1.0.0-snapshot.v20251215210631.js → waitlist_ui_338113_1.0.0-snapshot.v20251216175437.js} +1 -1
- package/package.json +3 -3
- package/dist/organizationswitcher_ui_01c6bf_1.0.0-snapshot.v20251215210631.js +0 -1
- package/dist/ui-common_ui_01c6bf_1.0.0-snapshot.v20251215210631.js +0 -122
- package/dist/vendors_ui_01c6bf_1.0.0-snapshot.v20251215210631.js +0 -20
- /package/dist/{blankcaptcha_ui_01c6bf_1.0.0-snapshot.v20251215210631.js → blankcaptcha_ui_338113_1.0.0-snapshot.v20251216175437.js} +0 -0
- /package/dist/{copy-api-key-modal_ui_01c6bf_1.0.0-snapshot.v20251215210631.js → copy-api-key-modal_ui_338113_1.0.0-snapshot.v20251216175437.js} +0 -0
- /package/dist/{framework_ui_01c6bf_1.0.0-snapshot.v20251215210631.js → framework_ui_338113_1.0.0-snapshot.v20251216175437.js} +0 -0
- /package/dist/{op-billing-page_ui_01c6bf_1.0.0-snapshot.v20251215210631.js → op-billing-page_ui_338113_1.0.0-snapshot.v20251216175437.js} +0 -0
- /package/dist/{op-plans-page_ui_01c6bf_1.0.0-snapshot.v20251215210631.js → op-plans-page_ui_338113_1.0.0-snapshot.v20251216175437.js} +0 -0
- /package/dist/{up-billing-page_ui_01c6bf_1.0.0-snapshot.v20251215210631.js → up-billing-page_ui_338113_1.0.0-snapshot.v20251216175437.js} +0 -0
- /package/dist/{up-plans-page_ui_01c6bf_1.0.0-snapshot.v20251215210631.js → up-plans-page_ui_338113_1.0.0-snapshot.v20251216175437.js} +0 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
(globalThis.webpackChunk_clerk_ui=globalThis.webpackChunk_clerk_ui||[]).push([["545"],{8802:function(e,t,n){"use strict";n.d(t,{AH:()=>o,i7:()=>i}),n(5074),n(7063);var r=n(399);function o(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,r.J)(t)}n(1785),n(8863);var i=function(){var e=o.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}},5606:function(e,t,n){"use strict";var r=n(8396),o={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,t){var n,i,l,u,a,s,c,f,d=!1;t||(t={}),l=t.debug||!1;try{if(a=r(),s=document.createRange(),c=document.getSelection(),(f=document.createElement("span")).textContent=e,f.ariaHidden="true",f.style.all="unset",f.style.position="fixed",f.style.top=0,f.style.clip="rect(0, 0, 0, 0)",f.style.whiteSpace="pre",f.style.webkitUserSelect="text",f.style.MozUserSelect="text",f.style.msUserSelect="text",f.style.userSelect="text",f.addEventListener("copy",function(n){if(n.stopPropagation(),t.format)if(n.preventDefault(),void 0===n.clipboardData){l&&console.warn("unable to use e.clipboardData"),l&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var r=o[t.format]||o.default;window.clipboardData.setData(r,e)}else n.clipboardData.clearData(),n.clipboardData.setData(t.format,e);t.onCopy&&(n.preventDefault(),t.onCopy(n.clipboardData))}),document.body.appendChild(f),s.selectNodeContents(f),c.addRange(s),!document.execCommand("copy"))throw Error("copy command was unsuccessful");d=!0}catch(r){l&&console.error("unable to copy using execCommand: ",r),l&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),d=!0}catch(r){l&&console.error("unable to copy using clipboardData: ",r),l&&console.error("falling back to prompt"),n="message"in t?t.message:"Copy to clipboard: #{key}, Enter",i=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C",u=n.replace(/#{\s*key\s*}/g,i),window.prompt(u,e)}}finally{c&&("function"==typeof c.removeRange?c.removeRange(s):c.removeAllRanges()),f&&document.body.removeChild(f),a()}return d}},1006:function(e){e.exports=function(e,t){if("string"!=typeof e)throw TypeError("Expected a string");for(var n,r=String(e),o="",i=!!t&&!!t.extended,l=!!t&&!!t.globstar,u=!1,a=t&&"string"==typeof t.flags?t.flags:"",s=0,c=r.length;s<c;s++)switch(n=r[s]){case"/":case"$":case"^":case"+":case".":case"(":case")":case"=":case"!":case"|":o+="\\"+n;break;case"?":if(i){o+=".";break}case"[":case"]":if(i){o+=n;break}case"{":if(i){u=!0,o+="(";break}case"}":if(i){u=!1,o+=")";break}case",":if(u){o+="|";break}o+="\\"+n;break;case"*":for(var f=r[s-1],d=1;"*"===r[s+1];)d++,s++;var p=r[s+1];l?d>1&&("/"===f||void 0===f)&&("/"===p||void 0===p)?(o+="((?:[^/]*(?:/|$))*)",s++):o+="([^/]*)":o+=".*";break;default:o+=n}return a&&~a.indexOf("g")||(o="^"+o+"$"),new RegExp(o,a)}},8396:function(e){e.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||n.forEach(function(t){e.addRange(t)}),t&&t.focus()}}},4962:function(e,t,n){"use strict";var r=n(5074),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=r.useState,l=r.useEffect,u=r.useLayoutEffect,a=r.useDebugValue;function s(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!o(e,n)}catch(e){return!0}}var c="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),o=r[0].inst,c=r[1];return u(function(){o.value=n,o.getSnapshot=t,s(o)&&c({inst:o})},[e,n,t]),l(function(){return s(o)&&c({inst:o}),e(function(){s(o)&&c({inst:o})})},[e]),a(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:c},3437:function(e,t,n){"use strict";e.exports=n(4962)},6836:function(e,t,n){"use strict";n.d(t,{BN:()=>A,UU:()=>T,cY:()=>k,rD:()=>O,ll:()=>M,Ej:()=>L});var r=n(4377);function o(e,t,n){let o,{reference:i,floating:l}=e,u=(0,r.TV)(t),a=(0,r.Dz)(t),s=(0,r.sq)(a),c=(0,r.C0)(t),f="y"===u,d=i.x+i.width/2-l.width/2,p=i.y+i.height/2-l.height/2,h=i[s]/2-l[s]/2;switch(c){case"top":o={x:d,y:i.y-l.height};break;case"bottom":o={x:d,y:i.y+i.height};break;case"right":o={x:i.x+i.width,y:p};break;case"left":o={x:i.x-l.width,y:p};break;default:o={x:i.x,y:i.y}}switch((0,r.Sg)(t)){case"start":o[a]-=h*(n&&f?-1:1);break;case"end":o[a]+=h*(n&&f?-1:1)}return o}let i=async(e,t,n)=>{let{placement:r="bottom",strategy:i="absolute",middleware:l=[],platform:u}=n,a=l.filter(Boolean),s=await (null==u.isRTL?void 0:u.isRTL(t)),c=await u.getElementRects({reference:e,floating:t,strategy:i}),{x:f,y:d}=o(c,r,s),p=r,h={},m=0;for(let n=0;n<a.length;n++){let{name:l,fn:g}=a[n],{x:v,y:y,data:w,reset:b}=await g({x:f,y:d,initialPlacement:r,placement:p,strategy:i,middlewareData:h,rects:c,platform:u,elements:{reference:e,floating:t}});f=null!=v?v:f,d=null!=y?y:d,h={...h,[l]:{...h[l],...w}},b&&m<=50&&(m++,"object"==typeof b&&(b.placement&&(p=b.placement),b.rects&&(c=!0===b.rects?await u.getElementRects({reference:e,floating:t,strategy:i}):b.rects),{x:f,y:d}=o(c,p,s)),n=-1)}return{x:f,y:d,placement:p,strategy:i,middlewareData:h}};async function l(e,t){var n;void 0===t&&(t={});let{x:o,y:i,platform:l,rects:u,elements:a,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=(0,r._3)(t,e),m=(0,r.nI)(h),g=a[p?"floating"===d?"reference":"floating":d],v=(0,r.B1)(await l.getClippingRect({element:null==(n=await (null==l.isElement?void 0:l.isElement(g)))||n?g:g.contextElement||await (null==l.getDocumentElement?void 0:l.getDocumentElement(a.floating)),boundary:c,rootBoundary:f,strategy:s})),y="floating"===d?{x:o,y:i,width:u.floating.width,height:u.floating.height}:u.reference,w=await (null==l.getOffsetParent?void 0:l.getOffsetParent(a.floating)),b=await (null==l.isElement?void 0:l.isElement(w))&&await (null==l.getScale?void 0:l.getScale(w))||{x:1,y:1},E=(0,r.B1)(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:w,strategy:s}):y);return{top:(v.top-E.top+m.top)/b.y,bottom:(E.bottom-v.bottom+m.bottom)/b.y,left:(v.left-E.left+m.left)/b.x,right:(E.right-v.right+m.right)/b.x}}let u=new Set(["left","top"]);async function a(e,t){let{placement:n,platform:o,elements:i}=e,l=await (null==o.isRTL?void 0:o.isRTL(i.floating)),a=(0,r.C0)(n),s=(0,r.Sg)(n),c="y"===(0,r.TV)(n),f=u.has(a)?-1:1,d=l&&c?-1:1,p=(0,r._3)(t,e),{mainAxis:h,crossAxis:m,alignmentAxis:g}="number"==typeof p?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return s&&"number"==typeof g&&(m="end"===s?-1*g:g),c?{x:m*d,y:h*f}:{x:h*f,y:m*d}}var s=n(2315);function c(e){let t=(0,s.L9)(e),n=parseFloat(t.width)||0,o=parseFloat(t.height)||0,i=(0,s.sb)(e),l=i?e.offsetWidth:n,u=i?e.offsetHeight:o,a=(0,r.LI)(n)!==l||(0,r.LI)(o)!==u;return a&&(n=l,o=u),{width:n,height:o,$:a}}function f(e){return(0,s.vq)(e)?e:e.contextElement}function d(e){let t=f(e);if(!(0,s.sb)(t))return(0,r.Jx)(1);let n=t.getBoundingClientRect(),{width:o,height:i,$:l}=c(t),u=(l?(0,r.LI)(n.width):n.width)/o,a=(l?(0,r.LI)(n.height):n.height)/i;return u&&Number.isFinite(u)||(u=1),a&&Number.isFinite(a)||(a=1),{x:u,y:a}}let p=(0,r.Jx)(0);function h(e){let t=(0,s.zk)(e);return(0,s.Tc)()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:p}function m(e,t,n,o){var i;void 0===t&&(t=!1),void 0===n&&(n=!1);let l=e.getBoundingClientRect(),u=f(e),a=(0,r.Jx)(1);t&&(o?(0,s.vq)(o)&&(a=d(o)):a=d(e));let c=(void 0===(i=n)&&(i=!1),o&&(!i||o===(0,s.zk)(u))&&i)?h(u):(0,r.Jx)(0),p=(l.left+c.x)/a.x,m=(l.top+c.y)/a.y,g=l.width/a.x,v=l.height/a.y;if(u){let e=(0,s.zk)(u),t=o&&(0,s.vq)(o)?(0,s.zk)(o):o,n=e,r=(0,s._m)(n);for(;r&&o&&t!==n;){let e=d(r),t=r.getBoundingClientRect(),o=(0,s.L9)(r),i=t.left+(r.clientLeft+parseFloat(o.paddingLeft))*e.x,l=t.top+(r.clientTop+parseFloat(o.paddingTop))*e.y;p*=e.x,m*=e.y,g*=e.x,v*=e.y,p+=i,m+=l,n=(0,s.zk)(r),r=(0,s._m)(n)}}return(0,r.B1)({width:g,height:v,x:p,y:m})}function g(e,t){let n=(0,s.CP)(e).scrollLeft;return t?t.left+n:m((0,s.ep)(e)).left+n}function v(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-g(e,n),y:n.top+t.scrollTop}}let y=new Set(["absolute","fixed"]);function w(e,t,n){var o;let i;if("viewport"===t)i=function(e,t){let n=(0,s.zk)(e),r=(0,s.ep)(e),o=n.visualViewport,i=r.clientWidth,l=r.clientHeight,u=0,a=0;if(o){i=o.width,l=o.height;let e=(0,s.Tc)();(!e||e&&"fixed"===t)&&(u=o.offsetLeft,a=o.offsetTop)}let c=g(r);if(c<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,l=Math.abs(r.clientWidth-t.clientWidth-o);l<=25&&(i-=l)}else c<=25&&(i+=c);return{width:i,height:l,x:u,y:a}}(e,n);else if("document"===t){let t,n,l,u,a,c,f;o=(0,s.ep)(e),t=(0,s.ep)(o),n=(0,s.CP)(o),l=o.ownerDocument.body,u=(0,r.T9)(t.scrollWidth,t.clientWidth,l.scrollWidth,l.clientWidth),a=(0,r.T9)(t.scrollHeight,t.clientHeight,l.scrollHeight,l.clientHeight),c=-n.scrollLeft+g(o),f=-n.scrollTop,"rtl"===(0,s.L9)(l).direction&&(c+=(0,r.T9)(t.clientWidth,l.clientWidth)-u),i={width:u,height:a,x:c,y:f}}else if((0,s.vq)(t)){let e,o,l,u,a,c;o=(e=m(t,!0,"fixed"===n)).top+t.clientTop,l=e.left+t.clientLeft,u=(0,s.sb)(t)?d(t):(0,r.Jx)(1),a=t.clientWidth*u.x,c=t.clientHeight*u.y,i={width:a,height:c,x:l*u.x,y:o*u.y}}else{let n=h(e);i={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return(0,r.B1)(i)}function b(e){return"static"===(0,s.L9)(e).position}function E(e,t){if(!(0,s.sb)(e)||"fixed"===(0,s.L9)(e).position)return null;if(t)return t(e);let n=e.offsetParent;return(0,s.ep)(e)===n&&(n=n.ownerDocument.body),n}function R(e,t){let n=(0,s.zk)(e);if((0,s.Tf)(e))return n;if(!(0,s.sb)(e)){let t=(0,s.$4)(e);for(;t&&!(0,s.eu)(t);){if((0,s.vq)(t)&&!b(t))return t;t=(0,s.$4)(t)}return n}let r=E(e,t);for(;r&&(0,s.Lv)(r)&&b(r);)r=E(r,t);return r&&(0,s.eu)(r)&&b(r)&&!(0,s.sQ)(r)?n:r||(0,s.gJ)(e)||n}let x=async function(e){let t=this.getOffsetParent||R,n=this.getDimensions,o=await n(e.floating);return{reference:function(e,t,n){let o=(0,s.sb)(t),i=(0,s.ep)(t),l="fixed"===n,u=m(e,!0,l,t),a={scrollLeft:0,scrollTop:0},c=(0,r.Jx)(0);if(o||!o&&!l)if(("body"!==(0,s.mq)(t)||(0,s.ZU)(i))&&(a=(0,s.CP)(t)),o){let e=m(t,!0,l,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&(c.x=g(i));l&&!o&&i&&(c.x=g(i));let f=!i||o||l?(0,r.Jx)(0):v(i,a);return{x:u.left+a.scrollLeft-c.x-f.x,y:u.top+a.scrollTop-c.y-f.y,width:u.width,height:u.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},C={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:o,strategy:i}=e,l="fixed"===i,u=(0,s.ep)(o),a=!!t&&(0,s.Tf)(t.floating);if(o===u||a&&l)return n;let c={scrollLeft:0,scrollTop:0},f=(0,r.Jx)(1),p=(0,r.Jx)(0),h=(0,s.sb)(o);if((h||!h&&!l)&&(("body"!==(0,s.mq)(o)||(0,s.ZU)(u))&&(c=(0,s.CP)(o)),(0,s.sb)(o))){let e=m(o);f=d(o),p.x=e.x+o.clientLeft,p.y=e.y+o.clientTop}let g=!u||h||l?(0,r.Jx)(0):v(u,c);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-c.scrollLeft*f.x+p.x+g.x,y:n.y*f.y-c.scrollTop*f.y+p.y+g.y}},getDocumentElement:s.ep,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:i}=e,l=[..."clippingAncestors"===n?(0,s.Tf)(t)?[]:function(e,t){let n=t.get(e);if(n)return n;let r=(0,s.v9)(e,[],!1).filter(e=>(0,s.vq)(e)&&"body"!==(0,s.mq)(e)),o=null,i="fixed"===(0,s.L9)(e).position,l=i?(0,s.$4)(e):e;for(;(0,s.vq)(l)&&!(0,s.eu)(l);){let t=(0,s.L9)(l),n=(0,s.sQ)(l);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&!!o&&y.has(o.position)||(0,s.ZU)(l)&&!n&&function e(t,n){let r=(0,s.$4)(t);return!(r===n||!(0,s.vq)(r)||(0,s.eu)(r))&&("fixed"===(0,s.L9)(r).position||e(r,n))}(e,l))?r=r.filter(e=>e!==l):o=t,l=(0,s.$4)(l)}return t.set(e,r),r}(t,this._c):[].concat(n),o],u=l[0],a=l.reduce((e,n)=>{let o=w(t,n,i);return e.top=(0,r.T9)(o.top,e.top),e.right=(0,r.jk)(o.right,e.right),e.bottom=(0,r.jk)(o.bottom,e.bottom),e.left=(0,r.T9)(o.left,e.left),e},w(t,u,i));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:R,getElementRects:x,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:n}=c(e);return{width:t,height:n}},getScale:d,isElement:s.vq,isRTL:function(e){return"rtl"===(0,s.L9)(e).direction}};function S(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function M(e,t,n,o){let i;void 0===o&&(o={});let{ancestorScroll:l=!0,ancestorResize:u=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:c="function"==typeof IntersectionObserver,animationFrame:d=!1}=o,p=f(e),h=l||u?[...p?(0,s.v9)(p):[],...(0,s.v9)(t)]:[];h.forEach(e=>{l&&e.addEventListener("scroll",n,{passive:!0}),u&&e.addEventListener("resize",n)});let g=p&&c?function(e,t){let n,o=null,i=(0,s.ep)(e);function l(){var e;clearTimeout(n),null==(e=o)||e.disconnect(),o=null}return!function u(a,s){void 0===a&&(a=!1),void 0===s&&(s=1),l();let c=e.getBoundingClientRect(),{left:f,top:d,width:p,height:h}=c;if(a||t(),!p||!h)return;let m={rootMargin:-(0,r.RI)(d)+"px "+-(0,r.RI)(i.clientWidth-(f+p))+"px "+-(0,r.RI)(i.clientHeight-(d+h))+"px "+-(0,r.RI)(f)+"px",threshold:(0,r.T9)(0,(0,r.jk)(1,s))||1},g=!0;function v(t){let r=t[0].intersectionRatio;if(r!==s){if(!g)return u();r?u(!1,r):n=setTimeout(()=>{u(!1,1e-7)},1e3)}1!==r||S(c,e.getBoundingClientRect())||u(),g=!1}try{o=new IntersectionObserver(v,{...m,root:i.ownerDocument})}catch(e){o=new IntersectionObserver(v,m)}o.observe(e)}(!0),l}(p,n):null,v=-1,y=null;a&&(y=new ResizeObserver(e=>{let[r]=e;r&&r.target===p&&y&&(y.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var e;null==(e=y)||e.observe(t)})),n()}),p&&!d&&y.observe(p),y.observe(t));let w=d?m(e):null;return d&&function t(){let r=m(e);w&&!S(w,r)&&n(),w=r,i=requestAnimationFrame(t)}(),n(),()=>{var e;h.forEach(e=>{l&&e.removeEventListener("scroll",n),u&&e.removeEventListener("resize",n)}),null==g||g(),null==(e=y)||e.disconnect(),y=null,d&&cancelAnimationFrame(i)}}let k=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;let{x:o,y:i,placement:l,middlewareData:u}=t,s=await a(t,e);return l===(null==(n=u.offset)?void 0:n.placement)&&null!=(r=u.arrow)&&r.alignmentOffset?{}:{x:o+s.x,y:i+s.y,data:{...s,placement:l}}}}},A=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){let{x:n,y:o,placement:i}=t,{mainAxis:u=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=(0,r._3)(e,t),f={x:n,y:o},d=await l(t,c),p=(0,r.TV)((0,r.C0)(i)),h=(0,r.PG)(p),m=f[h],g=f[p];if(u){let e="y"===h?"top":"left",t="y"===h?"bottom":"right",n=m+d[e],o=m-d[t];m=(0,r.qE)(n,m,o)}if(a){let e="y"===p?"top":"left",t="y"===p?"bottom":"right",n=g+d[e],o=g-d[t];g=(0,r.qE)(n,g,o)}let v=s.fn({...t,[h]:m,[p]:g});return{...v,data:{x:v.x-n,y:v.y-o,enabled:{[h]:u,[p]:a}}}}}},T=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,o,i,u,a;let{placement:s,middlewareData:c,rects:f,initialPlacement:d,platform:p,elements:h}=t,{mainAxis:m=!0,crossAxis:g=!0,fallbackPlacements:v,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:b=!0,...E}=(0,r._3)(e,t);if(null!=(n=c.arrow)&&n.alignmentOffset)return{};let R=(0,r.C0)(s),x=(0,r.TV)(d),C=(0,r.C0)(d)===d,S=await (null==p.isRTL?void 0:p.isRTL(h.floating)),M=v||(C||!b?[(0,r.bV)(d)]:(0,r.WJ)(d)),k="none"!==w;!v&&k&&M.push(...(0,r.lP)(d,b,w,S));let A=[d,...M],T=await l(t,E),L=[],O=(null==(o=c.flip)?void 0:o.overflows)||[];if(m&&L.push(T[R]),g){let e=(0,r.w7)(s,f,S);L.push(T[e[0]],T[e[1]])}if(O=[...O,{placement:s,overflows:L}],!L.every(e=>e<=0)){let e=((null==(i=c.flip)?void 0:i.index)||0)+1,t=A[e];if(t&&("alignment"!==g||x===(0,r.TV)(t)||O.every(e=>(0,r.TV)(e.placement)!==x||e.overflows[0]>0)))return{data:{index:e,overflows:O},reset:{placement:t}};let n=null==(u=O.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:u.placement;if(!n)switch(y){case"bestFit":{let e=null==(a=O.filter(e=>{if(k){let t=(0,r.TV)(e.placement);return t===x||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:a[0];e&&(n=e);break}case"initialPlacement":n=d}if(s!==n)return{reset:{placement:n}}}return{}}}},L=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,o;let i,u,{placement:a,rects:s,platform:c,elements:f}=t,{apply:d=()=>{},...p}=(0,r._3)(e,t),h=await l(t,p),m=(0,r.C0)(a),g=(0,r.Sg)(a),v="y"===(0,r.TV)(a),{width:y,height:w}=s.floating;"top"===m||"bottom"===m?(i=m,u=g===(await (null==c.isRTL?void 0:c.isRTL(f.floating))?"start":"end")?"left":"right"):(u=m,i="end"===g?"top":"bottom");let b=w-h.top-h.bottom,E=y-h.left-h.right,R=(0,r.jk)(w-h[i],b),x=(0,r.jk)(y-h[u],E),C=!t.middlewareData.shift,S=R,M=x;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(M=E),null!=(o=t.middlewareData.shift)&&o.enabled.y&&(S=b),C&&!g){let e=(0,r.T9)(h.left,0),t=(0,r.T9)(h.right,0),n=(0,r.T9)(h.top,0),o=(0,r.T9)(h.bottom,0);v?M=y-2*(0!==e||0!==t?e+t:(0,r.T9)(h.left,h.right)):S=w-2*(0!==n||0!==o?n+o:(0,r.T9)(h.top,h.bottom))}await d({...t,availableWidth:M,availableHeight:S});let k=await c.getDimensions(f.floating);return y!==k.width||w!==k.height?{reset:{rects:!0}}:{}}}},O=(e,t,n)=>{let r=new Map,o={platform:C,...n},l={...o.platform,_c:r};return i(e,t,{...o,platform:l})}},4166:function(e,t,n){"use strict";n.d(t,{BN:()=>p,Ej:()=>m,UU:()=>h,cY:()=>d,we:()=>f});var r=n(6836),o=n(5074),i=n(5323),l="undefined"!=typeof document?o.useLayoutEffect:function(){};function u(e,t){let n,r,o;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((n=e.length)!==t.length)return!1;for(r=n;0!=r--;)if(!u(e[r],t[r]))return!1;return!0}if((n=(o=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!({}).hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){let n=o[r];if(("_owner"!==n||!e.$$typeof)&&!u(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function a(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function s(e,t){let n=a(e);return Math.round(t*n)/n}function c(e){let t=o.useRef(e);return l(()=>{t.current=e}),t}function f(e){void 0===e&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:f=[],platform:d,elements:{reference:p,floating:h}={},transform:m=!0,whileElementsMounted:g,open:v}=e,[y,w]=o.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[b,E]=o.useState(f);u(b,f)||E(f);let[R,x]=o.useState(null),[C,S]=o.useState(null),M=o.useCallback(e=>{e!==L.current&&(L.current=e,x(e))},[]),k=o.useCallback(e=>{e!==O.current&&(O.current=e,S(e))},[]),A=p||R,T=h||C,L=o.useRef(null),O=o.useRef(null),P=o.useRef(y),I=null!=g,N=c(g),D=c(d),_=c(v),F=o.useCallback(()=>{if(!L.current||!O.current)return;let e={placement:t,strategy:n,middleware:b};D.current&&(e.platform=D.current),(0,r.rD)(L.current,O.current,e).then(e=>{let t={...e,isPositioned:!1!==_.current};j.current&&!u(P.current,t)&&(P.current=t,i.flushSync(()=>{w(t)}))})},[b,t,n,D,_]);l(()=>{!1===v&&P.current.isPositioned&&(P.current.isPositioned=!1,w(e=>({...e,isPositioned:!1})))},[v]);let j=o.useRef(!1);l(()=>(j.current=!0,()=>{j.current=!1}),[]),l(()=>{if(A&&(L.current=A),T&&(O.current=T),A&&T){if(N.current)return N.current(A,T,F);F()}},[A,T,F,N,I]);let B=o.useMemo(()=>({reference:L,floating:O,setReference:M,setFloating:k}),[M,k]),z=o.useMemo(()=>({reference:A,floating:T}),[A,T]),W=o.useMemo(()=>{let e={position:n,left:0,top:0};if(!z.floating)return e;let t=s(z.floating,y.x),r=s(z.floating,y.y);return m?{...e,transform:"translate("+t+"px, "+r+"px)",...a(z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,m,z.floating,y.x,y.y]);return o.useMemo(()=>({...y,update:F,refs:B,elements:z,floatingStyles:W}),[y,F,B,z,W])}let d=(e,t)=>({...(0,r.cY)(e),options:[e,t]}),p=(e,t)=>({...(0,r.BN)(e),options:[e,t]}),h=(e,t)=>({...(0,r.UU)(e),options:[e,t]}),m=(e,t)=>({...(0,r.Ej)(e),options:[e,t]})},2119:function(e,t,n){"use strict";n.d(t,{eC:()=>eP,s3:()=>ta,we:()=>tm,fI:()=>eV,DL:()=>tC,iQ:()=>tv,SV:()=>ev,Mk:()=>eJ,R1:()=>eU,It:()=>tE,kp:()=>tc,lb:()=>eI,$c:()=>eq,XF:()=>tt,bv:()=>tw,P6:()=>eH,s9:()=>th});var r=n(5074),o=n.t(r,2),i=n(2315),l=n(4377),u='input:not([inert]),select:not([inert]),textarea:not([inert]),a[href]:not([inert]),button:not([inert]),[tabindex]:not(slot):not([inert]),audio[controls]:not([inert]),video[controls]:not([inert]),[contenteditable]:not([contenteditable="false"]):not([inert]),details>summary:first-of-type:not([inert]),details:not([inert])',a="undefined"==typeof Element,s=a?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,c=!a&&Element.prototype.getRootNode?function(e){var t;return null==e||null==(t=e.getRootNode)?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},f=function(e,t){void 0===t&&(t=!0);var n,r=null==e||null==(n=e.getAttribute)?void 0:n.call(e,"inert");return""===r||"true"===r||t&&e&&f(e.parentNode)},d=function(e){var t,n=null==e||null==(t=e.getAttribute)?void 0:t.call(e,"contenteditable");return""===n||"true"===n},p=function(e,t,n){if(f(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(u));return t&&s.call(e,u)&&r.unshift(e),r=r.filter(n)},h=function(e,t,n){for(var r=[],o=Array.from(e);o.length;){var i=o.shift();if(!f(i,!1))if("SLOT"===i.tagName){var l=i.assignedElements(),a=h(l.length?l:i.children,!0,n);n.flatten?r.push.apply(r,a):r.push({scopeParent:i,candidates:a})}else{s.call(i,u)&&n.filter(i)&&(t||!e.includes(i))&&r.push(i);var c=i.shadowRoot||"function"==typeof n.getShadowRoot&&n.getShadowRoot(i),d=!f(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(i));if(c&&d){var p=h(!0===c?i.children:c.children,!0,n);n.flatten?r.push.apply(r,p):r.push({scopeParent:i,candidates:p})}else o.unshift.apply(o,i.children)}}return r},m=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},g=function(e){if(!e)throw Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||d(e))&&!m(e)?0:e.tabIndex},v=function(e,t){var n=g(e);return n<0&&t&&!m(e)?0:n},y=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},w=function(e){return"INPUT"===e.tagName},b=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},E=function(e){if(!e.name)return!0;var t,n=e.form||c(e),r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var o=b(t,e.form);return!o||o===e},R=function(e){return w(e)&&"radio"===e.type&&!E(e)},x=function(e){var t,n,r,o,i,l,u,a=e&&c(e),s=null==(t=a)?void 0:t.host,f=!1;if(a&&a!==e)for(f=!!(null!=(n=s)&&null!=(r=n.ownerDocument)&&r.contains(s)||null!=e&&null!=(o=e.ownerDocument)&&o.contains(e));!f&&s;)f=!!(null!=(l=s=null==(i=a=c(s))?void 0:i.host)&&null!=(u=l.ownerDocument)&&u.contains(s));return f},C=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},S=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("full-native"===n&&"checkVisibility"in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if("hidden"===getComputedStyle(e).visibility)return!0;var o=s.call(e,"details>summary:first-of-type")?e.parentElement:e;if(s.call(o,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"full-native"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return C(e)}else{if("function"==typeof r){for(var i=e;e;){var l=e.parentElement,u=c(e);if(l&&!l.shadowRoot&&!0===r(l))return C(e);e=e.assignedSlot?e.assignedSlot:l||u===e.ownerDocument?l:u.host}e=i}if(x(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1},M=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if("LEGEND"===r.tagName)return!!s.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1},k=function(e,t){return!(t.disabled||f(t)||w(t)&&"hidden"===t.type||S(t,e)||"DETAILS"===t.tagName&&Array.prototype.slice.apply(t.children).some(function(e){return"SUMMARY"===e.tagName})||M(t))},A=function(e,t){return!(R(t)||0>g(t))&&!!k(e,t)},T=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!isNaN(t)||!!(t>=0)},L=function(e){var t=[],n=[];return e.forEach(function(e,r){var o=!!e.scopeParent,i=o?e.scopeParent:e,l=v(i,o),u=o?L(e.candidates):i;0===l?o?t.push.apply(t,u):t.push(i):n.push({documentOrder:r,tabIndex:l,item:e,isScope:o,content:u})}),n.sort(y).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},O=function(e,t){return L((t=t||{}).getShadowRoot?h([e],t.includeContainer,{filter:A.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:T}):p(e,t.includeContainer,A.bind(null,t)))},P=function(e,t){return(t=t||{}).getShadowRoot?h([e],t.includeContainer,{filter:k.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):p(e,t.includeContainer,k.bind(null,t))},I=function(e,t){if(t=t||{},!e)throw Error("No node provided");return!1!==s.call(e,u)&&A(t,e)};function N(){let e=navigator.userAgentData;return null!=e&&e.platform?e.platform:navigator.platform}function D(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(e=>{let{brand:t,version:n}=e;return t+"/"+n}).join(" "):navigator.userAgent}function _(){return/apple/i.test(navigator.vendor)}function F(){let e=/android/i;return e.test(N())||e.test(D())}function j(){return D().includes("jsdom/")}let B="data-floating-ui-focusable",z="ArrowLeft",W="ArrowRight";function U(e){let t=e.activeElement;for(;(null==(n=t)||null==(n=n.shadowRoot)?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function V(e,t){if(!e||!t)return!1;let n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&(0,i.Ng)(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function q(e){return"composedPath"in e?e.composedPath()[0]:e.target}function H(e,t){return null!=t&&("composedPath"in e?e.composedPath().includes(t):null!=e.target&&t.contains(e.target))}function $(e){return(null==e?void 0:e.ownerDocument)||document}function Y(e){return(0,i.sb)(e)&&e.matches("input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])")}function Q(e){return!!e&&"combobox"===e.getAttribute("role")&&Y(e)}function K(e){return e?e.hasAttribute(B)?e:e.querySelector("["+B+"]")||e:null}function X(e,t){let n=e.filter(e=>{var n;return e.parentId===t&&(null==(n=e.context)?void 0:n.open)}),r=n;for(;r.length;)r=e.filter(e=>{var t;return null==(t=r)?void 0:t.some(t=>{var n;return e.parentId===t.id&&(null==(n=e.context)?void 0:n.open)})}),n=n.concat(r);return n}function J(e,t){var n;let r=[],o=null==(n=e.find(e=>e.id===t))?void 0:n.parentId;for(;o;){let t=e.find(e=>e.id===o);o=null==t?void 0:t.parentId,t&&(r=r.concat(t))}return r}function G(e){e.preventDefault(),e.stopPropagation()}function Z(e,t){let n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var ee="undefined"!=typeof document?r.useLayoutEffect:function(){};function et(e){let t=r.useRef(e);return ee(()=>{t.current=e}),t}let en={...o}.useInsertionEffect||(e=>e());function er(e){let t=r.useRef(()=>{});return en(()=>{t.current=e}),r.useCallback(function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)},[])}function eo(e,t,n){return Math.floor(e/t)!==n}function ei(e,t){return t<0||t>=e.current.length}function el(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=void 0===t?{}:t,l=n;do l+=r?-i:i;while(l>=0&&l<=e.current.length-1&&eu(e,l,o));return l}function eu(e,t,n){if("function"==typeof n)return n(t);if(n)return n.includes(t);let r=e.current[t];return null==r||r.hasAttribute("disabled")||"true"===r.getAttribute("aria-disabled")}let ea=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function es(e,t){let n=O(e,ea()),r=n.length;if(0===r)return;let o=U($(e)),i=n.indexOf(o);return n[-1===i?1===t?0:r-1:i+t]}function ec(e){return es($(e).body,1)||e}function ef(e){return es($(e).body,-1)||e}function ed(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!V(n,r)}function ep(e){e.querySelectorAll("[data-tabindex]").forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")})}var eh=n(6842),em=n(5323),eg=n(4166);function ev(e){let t=r.useRef(void 0),n=r.useCallback(t=>{let n=e.map(e=>{if(null!=e){if("function"==typeof e){let n=e(t);return"function"==typeof n?n:()=>{e(null)}}return e.current=t,()=>{e.current=null}}});return()=>{n.forEach(e=>null==e?void 0:e())}},e);return r.useMemo(()=>e.every(e=>null==e)?null:e=>{t.current&&(t.current(),t.current=void 0),null!=e&&(t.current=n(e))},e)}function ey(e,t){let n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}let ew=r.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function eb(e){let{children:t,elementsRef:n,labelsRef:o}=e,[i,l]=r.useState(()=>new Set),u=r.useCallback(e=>{l(t=>new Set(t).add(e))},[]),a=r.useCallback(e=>{l(t=>{let n=new Set(t);return n.delete(e),n})},[]),s=r.useMemo(()=>{let e=new Map;return Array.from(i.keys()).sort(ey).forEach((t,n)=>{e.set(t,n)}),e},[i]);return(0,eh.jsx)(ew.Provider,{value:r.useMemo(()=>({register:u,unregister:a,map:s,elementsRef:n,labelsRef:o}),[u,a,s,n,o]),children:t})}let eE="active",eR="selected",ex="ArrowLeft",eC="ArrowRight",eS="ArrowUp",eM="ArrowDown";function ek(e,t){return"function"==typeof e?e(t):e?r.cloneElement(e,t):(0,eh.jsx)("div",{...t})}let eA=r.createContext({activeIndex:0,onNavigate:()=>{}}),eT=[ex,eC],eL=[eS,eM],eO=[...eT,...eL],eP=r.forwardRef(function(e,t){let{render:n,orientation:o="both",loop:i=!0,rtl:u=!1,cols:a=1,disabledIndices:s,activeIndex:c,onNavigate:f,itemSizes:d,dense:p=!1,...h}=e,[m,g]=r.useState(0),v=null!=c?c:m,y=er(null!=f?f:g),w=r.useRef([]),b=n&&"function"!=typeof n?n.props:{},E=r.useMemo(()=>({activeIndex:v,onNavigate:y}),[v,y]),R=a>1,x={...h,...b,ref:t,"aria-orientation":"both"===o?void 0:o,onKeyDown(e){null==h.onKeyDown||h.onKeyDown(e),null==b.onKeyDown||b.onKeyDown(e),function(e){var t,n;if(!eO.includes(e.key))return;let r=v,c=el(w,{disabledIndices:s}),f=el(w,{decrement:!0,startingIndex:w.current.length,disabledIndices:s}),h=u?ex:eC,m=u?eC:ex;if(R){let n,m,g=d||Array.from({length:w.current.length},()=>({width:1,height:1})),y=(n=[],m=0,g.forEach((e,t)=>{let{width:r,height:o}=e,i=!1;for(p&&(m=0);!i;){let e=[];for(let t=0;t<r;t++)for(let n=0;n<o;n++)e.push(m+t+n*a);m%a+r<=a&&e.every(e=>null==n[e])?(e.forEach(e=>{n[e]=t}),i=!0):m++}}),[...n]),b=y.findIndex(e=>null!=e&&!eu(w,e,s)),E=y.reduce((e,t,n)=>null==t||eu(w,t,s)?e:n,-1),R=y[function(e,t){let{event:n,orientation:r,loop:o,rtl:i,cols:u,disabledIndices:a,minIndex:s,maxIndex:c,prevIndex:f,stopEvent:d=!1}=t,p=f;if("ArrowUp"===n.key){if(d&&G(n),-1===f)p=c;else if(p=el(e,{startingIndex:p,amount:u,decrement:!0,disabledIndices:a}),o&&(f-u<s||p<0)){let e=f%u,t=c%u,n=c-(t-e);p=t===e?c:t>e?n:n-u}ei(e,p)&&(p=f)}if("ArrowDown"===n.key&&(d&&G(n),-1===f?p=s:(p=el(e,{startingIndex:f,amount:u,disabledIndices:a}),o&&f+u>c&&(p=el(e,{startingIndex:f%u-u,amount:u,disabledIndices:a}))),ei(e,p)&&(p=f)),"both"===r){let t=(0,l.RI)(f/u);n.key===(i?z:W)&&(d&&G(n),f%u!=u-1?(p=el(e,{startingIndex:f,disabledIndices:a}),o&&eo(p,u,t)&&(p=el(e,{startingIndex:f-f%u-1,disabledIndices:a}))):o&&(p=el(e,{startingIndex:f-f%u-1,disabledIndices:a})),eo(p,u,t)&&(p=f)),n.key===(i?W:z)&&(d&&G(n),f%u!=0?(p=el(e,{startingIndex:f,decrement:!0,disabledIndices:a}),o&&eo(p,u,t)&&(p=el(e,{startingIndex:f+(u-f%u),decrement:!0,disabledIndices:a}))):o&&(p=el(e,{startingIndex:f+(u-f%u),decrement:!0,disabledIndices:a})),eo(p,u,t)&&(p=f));let r=(0,l.RI)(c/u)===t;ei(e,p)&&(p=o&&r?n.key===(i?W:z)?c:el(e,{startingIndex:f-f%u-1,disabledIndices:a}):f)}return p}({current:y.map(e=>e?w.current[e]:null)},{event:e,orientation:o,loop:i,rtl:u,cols:a,disabledIndices:(t=[...("function"!=typeof s?s:null)||w.current.map((e,t)=>eu(w,t,s)?t:void 0),void 0],y.flatMap((e,n)=>t.includes(e)?[n]:[])),minIndex:b,maxIndex:E,prevIndex:function(e,t,n,r,o){if(-1===e)return -1;let i=n.indexOf(e),l=t[e];switch(o){case"tl":return i;case"tr":if(!l)return i;return i+l.width-1;case"bl":if(!l)return i;return i+(l.height-1)*r;case"br":return n.lastIndexOf(e)}}(v>f?c:v,g,y,a,e.key===eM?"bl":e.key===h?"tr":"tl")})];null!=R&&(r=R)}let g={horizontal:[h],vertical:[eM],both:[h,eM]}[o],b={horizontal:[m],vertical:[eS],both:[m,eS]}[o],E=R?eO:({horizontal:eT,vertical:eL,both:eO})[o];r===v&&[...g,...b].includes(e.key)&&(r=i&&r===f&&g.includes(e.key)?c:i&&r===c&&b.includes(e.key)?f:el(w,{startingIndex:r,decrement:b.includes(e.key),disabledIndices:s})),r===v||ei(w,r)||(e.stopPropagation(),E.includes(e.key)&&e.preventDefault(),y(r),null==(n=w.current[r])||n.focus())}(e)}};return(0,eh.jsx)(eA.Provider,{value:E,children:(0,eh.jsx)(eb,{elementsRef:w,children:ek(n,x)})})}),eI=r.forwardRef(function(e,t){let{render:n,...o}=e,i=n&&"function"!=typeof n?n.props:{},{activeIndex:l,onNavigate:u}=r.useContext(eA),{ref:a,index:s}=function(e){void 0===e&&(e={});let{label:t}=e,{register:n,unregister:o,map:i,elementsRef:l,labelsRef:u}=r.useContext(ew),[a,s]=r.useState(null),c=r.useRef(null),f=r.useCallback(e=>{if(c.current=e,null!==a&&(l.current[a]=e,u)){var n;let r=void 0!==t;u.current[a]=r?t:null!=(n=null==e?void 0:e.textContent)?n:null}},[a,l,u,t]);return ee(()=>{let e=c.current;if(e)return n(e),()=>{o(e)}},[n,o]),ee(()=>{let e=c.current?i.get(c.current):null;null!=e&&s(e)},[i]),r.useMemo(()=>({ref:f,index:null==a?-1:a}),[a,f])}(),c=ev([a,t,i.ref]),f=l===s;return ek(n,{...o,...i,ref:c,tabIndex:f?0:-1,"data-active":f?"":void 0,onFocus(e){null==o.onFocus||o.onFocus(e),null==i.onFocus||i.onFocus(e),u(s)}})}),eN={...o},eD=!1,e_=0,eF=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+e_++,ej=eN.useId||function(){let[e,t]=r.useState(()=>eD?eF():void 0);return ee(()=>{null==e&&t(eF())},[]),r.useEffect(()=>{eD=!0},[]),e};function eB(){let e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;null==(r=e.get(t))||r.delete(n)}}}let ez=r.createContext(null),eW=r.createContext(null),eU=()=>{var e;return(null==(e=r.useContext(ez))?void 0:e.id)||null};function eV(e){let t=ej(),n=r.useContext(eW),o=eU(),i=e||o;return ee(()=>{if(!t)return;let e={id:t,parentId:i};return null==n||n.addNode(e),()=>{null==n||n.removeNode(e)}},[n,t,i]),t}function eq(e){let{children:t,id:n}=e,o=eU();return(0,eh.jsx)(ez.Provider,{value:r.useMemo(()=>({id:n,parentId:o}),[n,o]),children:t})}function eH(e){let{children:t}=e,n=r.useRef([]),o=r.useCallback(e=>{n.current=[...n.current,e]},[]),i=r.useCallback(e=>{n.current=n.current.filter(t=>t!==e)},[]),[l]=r.useState(()=>eB());return(0,eh.jsx)(eW.Provider,{value:r.useMemo(()=>({nodesRef:n,addNode:o,removeNode:i,events:l}),[o,i,l]),children:t})}function e$(e){return"data-floating-ui-"+e}function eY(e){-1!==e.current&&(clearTimeout(e.current),e.current=-1)}let eQ=e$("safe-polygon");function eK(e,t,n){if(n&&!Z(n))return 0;if("number"==typeof e)return e;if("function"==typeof e){let n=e();return"number"==typeof n?n:null==n?void 0:n[t]}return null==e?void 0:e[t]}function eX(e){return"function"==typeof e?e():e}function eJ(e,t){void 0===t&&(t={});let{open:n,onOpenChange:o,dataRef:l,events:u,elements:a}=e,{enabled:s=!0,delay:c=0,handleClose:f=null,mouseOnly:d=!1,restMs:p=0,move:h=!0}=t,m=r.useContext(eW),g=eU(),v=et(f),y=et(c),w=et(n),b=et(p),E=r.useRef(),R=r.useRef(-1),x=r.useRef(),C=r.useRef(-1),S=r.useRef(!0),M=r.useRef(!1),k=r.useRef(()=>{}),A=r.useRef(!1),T=er(()=>{var e;let t=null==(e=l.current.openEvent)?void 0:e.type;return(null==t?void 0:t.includes("mouse"))&&"mousedown"!==t});r.useEffect(()=>{if(s)return u.on("openchange",e),()=>{u.off("openchange",e)};function e(e){let{open:t}=e;t||(eY(R),eY(C),S.current=!0,A.current=!1)}},[s,u]),r.useEffect(()=>{if(!s||!v.current||!n)return;function e(e){T()&&o(!1,e,"hover")}let t=$(a.floating).documentElement;return t.addEventListener("mouseleave",e),()=>{t.removeEventListener("mouseleave",e)}},[a.floating,n,o,s,v,T]);let L=r.useCallback(function(e,t,n){void 0===t&&(t=!0),void 0===n&&(n="hover");let r=eK(y.current,"close",E.current);r&&!x.current?(eY(R),R.current=window.setTimeout(()=>o(!1,e,n),r)):t&&(eY(R),o(!1,e,n))},[y,o]),O=er(()=>{k.current(),x.current=void 0}),P=er(()=>{if(M.current){let e=$(a.floating).body;e.style.pointerEvents="",e.removeAttribute(eQ),M.current=!1}}),I=er(()=>!!l.current.openEvent&&["click","mousedown"].includes(l.current.openEvent.type));r.useEffect(()=>{if(s&&(0,i.vq)(a.domReference)){let o=a.domReference,i=a.floating;return n&&o.addEventListener("mouseleave",r),h&&o.addEventListener("mousemove",e,{once:!0}),o.addEventListener("mouseenter",e),o.addEventListener("mouseleave",t),i&&(i.addEventListener("mouseleave",r),i.addEventListener("mouseenter",u),i.addEventListener("mouseleave",c)),()=>{n&&o.removeEventListener("mouseleave",r),h&&o.removeEventListener("mousemove",e),o.removeEventListener("mouseenter",e),o.removeEventListener("mouseleave",t),i&&(i.removeEventListener("mouseleave",r),i.removeEventListener("mouseenter",u),i.removeEventListener("mouseleave",c))}}function e(e){if(eY(R),S.current=!1,d&&!Z(E.current)||eX(b.current)>0&&!eK(y.current,"open"))return;let t=eK(y.current,"open",E.current);t?R.current=window.setTimeout(()=>{w.current||o(!0,e,"hover")},t):n||o(!0,e,"hover")}function t(e){if(I())return void P();k.current();let t=$(a.floating);if(eY(C),A.current=!1,v.current&&l.current.floatingContext){n||eY(R),x.current=v.current({...l.current.floatingContext,tree:m,x:e.clientX,y:e.clientY,onClose(){P(),O(),I()||L(e,!0,"safe-polygon")}});let r=x.current;t.addEventListener("mousemove",r),k.current=()=>{t.removeEventListener("mousemove",r)};return}"touch"===E.current&&V(a.floating,e.relatedTarget)||L(e)}function r(e){I()||l.current.floatingContext&&(null==v.current||v.current({...l.current.floatingContext,tree:m,x:e.clientX,y:e.clientY,onClose(){P(),O(),I()||L(e)}})(e))}function u(){eY(R)}function c(e){I()||L(e,!1)}},[a,s,e,d,h,L,O,P,o,n,w,m,y,v,l,I,b]),ee(()=>{var e,t;if(s&&n&&null!=(e=v.current)&&null!=(e=e.__options)&&e.blockPointerEvents&&T()){M.current=!0;let e=a.floating;if((0,i.vq)(a.domReference)&&e){let n=$(a.floating).body;n.setAttribute(eQ,"");let r=a.domReference,o=null==m||null==(t=m.nodesRef.current.find(e=>e.id===g))||null==(t=t.context)?void 0:t.elements.floating;return o&&(o.style.pointerEvents=""),n.style.pointerEvents="none",r.style.pointerEvents="auto",e.style.pointerEvents="auto",()=>{n.style.pointerEvents="",r.style.pointerEvents="",e.style.pointerEvents=""}}}},[s,n,g,a,m,v,T]),ee(()=>{n||(E.current=void 0,A.current=!1,O(),P())},[n,O,P]),r.useEffect(()=>()=>{O(),eY(R),eY(C),P()},[s,a.domReference,O,P]);let N=r.useMemo(()=>{function e(e){E.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e;function r(){S.current||w.current||o(!0,t,"hover")}d&&!Z(E.current)||n||0===eX(b.current)||A.current&&e.movementX**2+e.movementY**2<2||(eY(C),"touch"===E.current?r():(A.current=!0,C.current=window.setTimeout(r,eX(b.current))))}}},[d,o,n,w,b]);return r.useMemo(()=>s?{reference:N}:{},[s,N])}let eG=0;function eZ(e,t){void 0===t&&(t={});let{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(eG);let i=()=>null==e?void 0:e.focus({preventScroll:n});o?i():eG=requestAnimationFrame(i)}let e0={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function e1(e){return"inert"===e?e0.inert:"aria-hidden"===e?e0["aria-hidden"]:e0.none}let e2=new WeakSet,e3={},e8=0,e4=e=>e&&(e.host||e4(e.parentNode));function e5(e,t,n){var r,o,l;let u,a,s,c,f,d,p;void 0===t&&(t=!1),void 0===n&&(n=!1);let h=((null==(r=e[0])?void 0:r.ownerDocument)||document).body;return o=e.concat(Array.from(h.querySelectorAll("[aria-live]"))),l=t,u="data-floating-ui-inert",a=n?"inert":l?"aria-hidden":null,s=o.map(e=>{if(h.contains(e))return e;let t=e4(e);return h.contains(t)?t:null}).filter(e=>null!=e),c=new Set,f=new Set(s),d=[],e3[u]||(e3[u]=new WeakMap),p=e3[u],s.forEach(function e(t){!(!t||c.has(t))&&(c.add(t),t.parentNode&&e(t.parentNode))}),function e(t){!t||f.has(t)||[].forEach.call(t.children,t=>{if("script"!==(0,i.mq)(t))if(c.has(t))e(t);else{let e=a?t.getAttribute(a):null,n=null!==e&&"false"!==e,r=e1(a),o=(r.get(t)||0)+1,i=(p.get(t)||0)+1;r.set(t,o),p.set(t,i),d.push(t),1===o&&n&&e2.add(t),1===i&&t.setAttribute(u,""),!n&&a&&t.setAttribute(a,"inert"===a?"":"true")}})}(h),c.clear(),e8++,()=>{d.forEach(e=>{let t=e1(a),n=(t.get(e)||0)-1,r=(p.get(e)||0)-1;t.set(e,n),p.set(e,r),n||(!e2.has(e)&&a&&e.removeAttribute(a),e2.delete(e)),r||e.removeAttribute(u)}),--e8||(e0.inert=new WeakMap,e0["aria-hidden"]=new WeakMap,e0.none=new WeakMap,e2=new WeakSet,e3={})}}let e6={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},e7=r.forwardRef(function(e,t){let[n,o]=r.useState();ee(()=>{_()&&o("button")},[]);let i={ref:t,tabIndex:0,role:n,"aria-hidden":!n||void 0,[e$("focus-guard")]:"",style:e6};return(0,eh.jsx)("span",{...e,...i})}),e9=r.createContext(null),te=e$("portal");function tt(e){let{children:t,id:n,root:o,preserveTabOrder:l=!0}=e,u=function(e){void 0===e&&(e={});let{id:t,root:n}=e,o=ej(),l=tn(),[u,a]=r.useState(null),s=r.useRef(null);return ee(()=>()=>{null==u||u.remove(),queueMicrotask(()=>{s.current=null})},[u]),ee(()=>{if(!o||s.current)return;let e=t?document.getElementById(t):null;if(!e)return;let n=document.createElement("div");n.id=o,n.setAttribute(te,""),e.appendChild(n),s.current=n,a(n)},[t,o]),ee(()=>{if(null===n||!o||s.current)return;let e=n||(null==l?void 0:l.portalNode);e&&!(0,i.vq)(e)&&(e=e.current),e=e||document.body;let r=null;t&&((r=document.createElement("div")).id=t,e.appendChild(r));let u=document.createElement("div");u.id=o,u.setAttribute(te,""),(e=r||e).appendChild(u),s.current=u,a(u)},[t,n,o,l]),u}({id:n,root:o}),[a,s]=r.useState(null),c=r.useRef(null),f=r.useRef(null),d=r.useRef(null),p=r.useRef(null),h=null==a?void 0:a.modal,m=null==a?void 0:a.open,g=!!a&&!a.modal&&a.open&&l&&!!(o||u);return r.useEffect(()=>{if(u&&l&&!h)return u.addEventListener("focusin",e,!0),u.addEventListener("focusout",e,!0),()=>{u.removeEventListener("focusin",e,!0),u.removeEventListener("focusout",e,!0)};function e(e){u&&ed(e)&&("focusin"===e.type?ep:function(e){O(e,ea()).forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")})})(u)}},[u,l,h]),r.useEffect(()=>{!u||m||ep(u)},[m,u]),(0,eh.jsxs)(e9.Provider,{value:r.useMemo(()=>({preserveTabOrder:l,beforeOutsideRef:c,afterOutsideRef:f,beforeInsideRef:d,afterInsideRef:p,portalNode:u,setFocusManagerState:s}),[l,u]),children:[g&&u&&(0,eh.jsx)(e7,{"data-type":"outside",ref:c,onFocus:e=>{if(ed(e,u)){var t;null==(t=d.current)||t.focus()}else{let e=ef(a?a.domReference:null);null==e||e.focus()}}}),g&&u&&(0,eh.jsx)("span",{"aria-owns":u.id,style:e6}),u&&em.createPortal(t,u),g&&u&&(0,eh.jsx)(e7,{"data-type":"outside",ref:f,onFocus:e=>{if(ed(e,u)){var t;null==(t=p.current)||t.focus()}else{let t=ec(a?a.domReference:null);null==t||t.focus(),(null==a?void 0:a.closeOnFocusOut)&&(null==a||a.onOpenChange(!1,e.nativeEvent,"focus-out"))}}})]})}let tn=()=>r.useContext(e9);function tr(e){return r.useMemo(()=>t=>{e.forEach(e=>{e&&(e.current=t)})},e)}let to=[];function ti(){return to.slice().reverse().find(e=>e.isConnected)}function tl(e,t){var n;if(!t.current.includes("floating")&&!(null!=(n=e.getAttribute("role"))&&n.includes("dialog")))return;let r=ea(),o=P(e,r).filter(e=>{let t=e.getAttribute("data-tabindex")||"";return I(e,r)||e.hasAttribute("data-tabindex")&&!t.startsWith("-")}),i=e.getAttribute("tabindex");t.current.includes("floating")||0===o.length?"0"!==i&&e.setAttribute("tabindex","0"):("-1"!==i||e.hasAttribute("data-tabindex")&&"-1"!==e.getAttribute("data-tabindex"))&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}let tu=r.forwardRef(function(e,t){return(0,eh.jsx)("button",{...e,type:"button",ref:t,tabIndex:-1,style:e6})});function ta(e){let{context:t,children:n,disabled:o=!1,order:l=["content"],guards:u=!0,initialFocus:a=0,returnFocus:s=!0,restoreFocus:c=!1,modal:f=!0,visuallyHiddenDismiss:d=!1,closeOnFocusOut:p=!0,outsideElementsInert:h=!1,getInsideElements:m=()=>[]}=e,{open:g,onOpenChange:v,events:y,dataRef:w,elements:{domReference:b,floating:E}}=t,R=er(()=>{var e;return null==(e=w.current.floatingContext)?void 0:e.nodeId}),x=er(m),C="number"==typeof a&&a<0,S=Q(b)&&C,M="undefined"!=typeof HTMLElement&&"inert"in HTMLElement.prototype,k=!M||u,A=!k||M&&h,T=et(l),L=et(a),P=et(s),N=r.useContext(eW),D=tn(),_=r.useRef(null),B=r.useRef(null),z=r.useRef(!1),W=r.useRef(!1),H=r.useRef(-1),Y=null!=D,Z=K(E),en=er(function(e){return void 0===e&&(e=Z),e?O(e,ea()):[]}),eo=er(e=>{let t=en(e);return T.current.map(e=>b&&"reference"===e?b:Z&&"floating"===e?Z:t).filter(Boolean).flat()});r.useEffect(()=>{if(o||!f)return;function e(e){if("Tab"===e.key){V(Z,U($(Z)))&&0===en().length&&!S&&G(e);let t=eo(),n=q(e);"reference"===T.current[0]&&n===b&&(G(e),e.shiftKey?eZ(t[t.length-1]):eZ(t[1])),"floating"===T.current[1]&&n===Z&&e.shiftKey&&(G(e),eZ(t[0]))}}let t=$(Z);return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}},[o,b,Z,f,T,S,en,eo]),r.useEffect(()=>{if(!o&&E)return E.addEventListener("focusin",e),()=>{E.removeEventListener("focusin",e)};function e(e){let t=q(e),n=en().indexOf(t);-1!==n&&(H.current=n)}},[o,E,en]),r.useEffect(()=>{if(!o&&p&&E&&(0,i.sb)(b))return b.addEventListener("focusout",t),b.addEventListener("pointerdown",e),E.addEventListener("focusout",t),()=>{b.removeEventListener("focusout",t),b.removeEventListener("pointerdown",e),E.removeEventListener("focusout",t)};function e(){W.current=!0,setTimeout(()=>{W.current=!1})}function t(e){let t=e.relatedTarget,n=e.currentTarget,r=q(e);queueMicrotask(()=>{let o=R(),l=!(V(b,t)||V(E,t)||V(t,E)||V(null==D?void 0:D.portalNode,t)||null!=t&&t.hasAttribute(e$("focus-guard"))||N&&(X(N.nodesRef.current,o).find(e=>{var n,r;return V(null==(n=e.context)?void 0:n.elements.floating,t)||V(null==(r=e.context)?void 0:r.elements.domReference,t)})||J(N.nodesRef.current,o).find(e=>{var n,r,o;return[null==(n=e.context)?void 0:n.elements.floating,K(null==(r=e.context)?void 0:r.elements.floating)].includes(t)||(null==(o=e.context)?void 0:o.elements.domReference)===t})));if(n===b&&Z&&tl(Z,T),c&&n!==b&&!(null!=r&&r.isConnected)&&U($(Z))===$(Z).body){(0,i.sb)(Z)&&Z.focus();let e=H.current,t=en(),n=t[e]||t[t.length-1]||Z;(0,i.sb)(n)&&n.focus()}if(w.current.insideReactTree){w.current.insideReactTree=!1;return}(S||!f)&&t&&l&&!W.current&&t!==ti()&&(z.current=!0,v(!1,e,"focus-out"))})}},[o,b,E,Z,f,N,D,v,p,c,en,S,R,T,w]);let ei=r.useRef(null),el=r.useRef(null),eu=tr([ei,null==D?void 0:D.beforeInsideRef]),es=tr([el,null==D?void 0:D.afterInsideRef]);function ep(e){return!o&&d&&f?(0,eh.jsx)(tu,{ref:"start"===e?_:B,onClick:e=>v(!1,e.nativeEvent),children:"string"==typeof d?d:"Dismiss"}):null}r.useEffect(()=>{var e,t;if(o||!E)return;let n=Array.from((null==D||null==(e=D.portalNode)?void 0:e.querySelectorAll("["+e$("portal")+"]"))||[]),r=N?J(N.nodesRef.current,R()):[],i=N&&!f?r.map(e=>{var t;return null==(t=e.context)?void 0:t.elements.floating}):[],l=[E,null==(t=r.find(e=>{var t;return Q((null==(t=e.context)?void 0:t.elements.domReference)||null)}))||null==(t=t.context)?void 0:t.elements.domReference,...n,...i,...x(),_.current,B.current,ei.current,el.current,null==D?void 0:D.beforeOutsideRef.current,null==D?void 0:D.afterOutsideRef.current,T.current.includes("reference")||S?b:null].filter(e=>null!=e),u=f||S?e5(l,!A,A):e5(l);return()=>{u()}},[o,b,E,f,T,D,S,k,A,N,R,x]),ee(()=>{if(o||!(0,i.sb)(Z))return;let e=U($(Z));queueMicrotask(()=>{let t=eo(Z),n=L.current,r=("number"==typeof n?t[n]:n.current)||Z,o=V(Z,e);C||o||!g||eZ(r,{preventScroll:r===Z})})},[o,g,Z,C,eo,L]),ee(()=>{var e;if(o||!Z)return;let t=$(Z);function n(e){let{reason:t,event:n,nested:r}=e;if(["hover","safe-polygon"].includes(t)&&"mouseleave"===n.type&&(z.current=!0),"outside-press"===t)if(r)z.current=!1;else if(0===n.mozInputSource&&n.isTrusted||(F()&&n.pointerType?"click"===n.type&&1===n.buttons:0===n.detail&&!n.pointerType)||!j()&&(!F()&&0===n.width&&0===n.height||F()&&1===n.width&&1===n.height&&0===n.pressure&&0===n.detail&&"mouse"===n.pointerType||n.width<1&&n.height<1&&0===n.pressure&&0===n.detail&&"touch"===n.pointerType))z.current=!1;else{let e=!1;document.createElement("div").focus({get preventScroll(){return e=!0,!1}}),e?z.current=!1:z.current=!0}}e=U(t),to=to.filter(e=>e.isConnected),e&&"body"!==(0,i.mq)(e)&&(to.push(e),to.length>20&&(to=to.slice(-20))),y.on("openchange",n);let r=t.createElement("span");return r.setAttribute("tabindex","-1"),r.setAttribute("aria-hidden","true"),Object.assign(r.style,e6),Y&&b&&b.insertAdjacentElement("afterend",r),()=>{y.off("openchange",n);let e=U(t),o=V(E,e)||N&&X(N.nodesRef.current,R()).some(t=>{var n;return V(null==(n=t.context)?void 0:n.elements.floating,e)}),l=function(){if("boolean"==typeof P.current){let e=b||ti();return e&&e.isConnected?e:r}return P.current.current||r}();queueMicrotask(()=>{let n,u=I(l,n=ea())?l:O(l,n)[0]||l;P.current&&!z.current&&(0,i.sb)(u)&&(u===e||e===t.body||o)&&u.focus({preventScroll:!0}),r.remove()})}},[o,E,Z,P,w,y,N,Y,b,R]),r.useEffect(()=>{queueMicrotask(()=>{z.current=!1})},[o]),ee(()=>{if(!o&&D)return D.setFocusManagerState({modal:f,closeOnFocusOut:p,open:g,onOpenChange:v,domReference:b}),()=>{D.setFocusManagerState(null)}},[o,D,f,g,v,p,b]),ee(()=>{o||Z&&tl(Z,T)},[o,Z,T]);let em=!o&&k&&(!f||!S)&&(Y||f);return(0,eh.jsxs)(eh.Fragment,{children:[em&&(0,eh.jsx)(e7,{"data-type":"inside",ref:eu,onFocus:e=>{if(f){let e=eo();eZ("reference"===l[0]?e[0]:e[e.length-1])}else if(null!=D&&D.preserveTabOrder&&D.portalNode)if(z.current=!1,ed(e,D.portalNode)){let e=ec(b);null==e||e.focus()}else{var t;null==(t=D.beforeOutsideRef.current)||t.focus()}}}),!S&&ep("start"),n,ep("end"),em&&(0,eh.jsx)(e7,{"data-type":"inside",ref:es,onFocus:e=>{if(f)eZ(eo()[0]);else if(null!=D&&D.preserveTabOrder&&D.portalNode)if(p&&(z.current=!0),ed(e,D.portalNode)){let e=ef(b);null==e||e.focus()}else{var t;null==(t=D.afterOutsideRef.current)||t.focus()}}})]})}function ts(e){return(0,i.sb)(e.target)&&"BUTTON"===e.target.tagName}function tc(e,t){void 0===t&&(t={});let{open:n,onOpenChange:o,dataRef:l,elements:{domReference:u}}=e,{enabled:a=!0,event:s="click",toggle:c=!0,ignoreMouse:f=!1,keyboardHandlers:d=!0,stickIfOpen:p=!0}=t,h=r.useRef(),m=r.useRef(!1),g=r.useMemo(()=>({onPointerDown(e){h.current=e.pointerType},onMouseDown(e){let t=h.current;0!==e.button||"click"===s||Z(t,!0)&&f||(n&&c&&(!l.current.openEvent||!p||"mousedown"===l.current.openEvent.type)?o(!1,e.nativeEvent,"click"):(e.preventDefault(),o(!0,e.nativeEvent,"click")))},onClick(e){let t=h.current;if("mousedown"===s&&h.current){h.current=void 0;return}Z(t,!0)&&f||(n&&c&&(!l.current.openEvent||!p||"click"===l.current.openEvent.type)?o(!1,e.nativeEvent,"click"):o(!0,e.nativeEvent,"click"))},onKeyDown(e){h.current=void 0,!(e.defaultPrevented||!d||ts(e))&&(" "!==e.key||Y(u)||(e.preventDefault(),m.current=!0),(0,i.sb)(e.target)&&"A"===e.target.tagName||"Enter"!==e.key||(n&&c?o(!1,e.nativeEvent,"click"):o(!0,e.nativeEvent,"click")))},onKeyUp(e){!(e.defaultPrevented||!d||ts(e)||Y(u))&&" "===e.key&&m.current&&(m.current=!1,n&&c?o(!1,e.nativeEvent,"click"):o(!0,e.nativeEvent,"click"))}}),[l,u,s,f,d,o,n,p,c]);return r.useMemo(()=>a?{reference:g}:{},[a,g])}let tf={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},td={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},tp=e=>{var t,n;return{escapeKey:"boolean"==typeof e?e:null!=(t=null==e?void 0:e.escapeKey)&&t,outsidePress:"boolean"==typeof e?e:null==(n=null==e?void 0:e.outsidePress)||n}};function th(e,t){void 0===t&&(t={});let{open:n,onOpenChange:o,elements:l,dataRef:u}=e,{enabled:a=!0,escapeKey:s=!0,outsidePress:c=!0,outsidePressEvent:f="pointerdown",referencePress:d=!1,referencePressEvent:p="pointerdown",ancestorScroll:h=!1,bubbles:m,capture:g}=t,v=r.useContext(eW),y=er("function"==typeof c?c:()=>!1),w="function"==typeof c?y:c,b=r.useRef(!1),{escapeKey:E,outsidePress:R}=tp(m),{escapeKey:x,outsidePress:C}=tp(g),S=r.useRef(!1),M=r.useRef(-1),k=er(e=>{var t;if(!n||!a||!s||"Escape"!==e.key||S.current)return;let r=null==(t=u.current.floatingContext)?void 0:t.nodeId,i=v?X(v.nodesRef.current,r):[];if(!E&&(e.stopPropagation(),i.length>0)){let e=!0;if(i.forEach(t=>{var n;if(null!=(n=t.context)&&n.open&&!t.context.dataRef.current.__escapeKeyBubbles){e=!1;return}}),!e)return}o(!1,"nativeEvent"in e?e.nativeEvent:e,"escape-key")}),A=er(e=>{var t;let n=()=>{var t;k(e),null==(t=q(e))||t.removeEventListener("keydown",n)};null==(t=q(e))||t.addEventListener("keydown",n)}),T=er(e=>{var t;let n=u.current.insideReactTree;u.current.insideReactTree=!1;let r=b.current;if(b.current=!1,"click"===f&&r||n||"function"==typeof w&&!w(e))return;let a=q(e),s="["+e$("inert")+"]",c=$(l.floating).querySelectorAll(s),d=(0,i.vq)(a)?a:null;for(;d&&!(0,i.eu)(d);){let e=(0,i.$4)(d);if((0,i.eu)(e)||!(0,i.vq)(e))break;d=e}if(c.length&&(0,i.vq)(a)&&!a.matches("html,body")&&!V(a,l.floating)&&Array.from(c).every(e=>!V(d,e)))return;if((0,i.sb)(a)&&P){let t=(0,i.eu)(a),n=(0,i.L9)(a),r=/auto|scroll/,o=t||r.test(n.overflowX),l=t||r.test(n.overflowY),u=o&&a.clientWidth>0&&a.scrollWidth>a.clientWidth,s=l&&a.clientHeight>0&&a.scrollHeight>a.clientHeight,c="rtl"===n.direction,f=s&&(c?e.offsetX<=a.offsetWidth-a.clientWidth:e.offsetX>a.clientWidth),d=u&&e.offsetY>a.clientHeight;if(f||d)return}let p=null==(t=u.current.floatingContext)?void 0:t.nodeId,h=v&&X(v.nodesRef.current,p).some(t=>{var n;return H(e,null==(n=t.context)?void 0:n.elements.floating)});if(H(e,l.floating)||H(e,l.domReference)||h)return;let m=v?X(v.nodesRef.current,p):[];if(m.length>0){let e=!0;if(m.forEach(t=>{var n;if(null!=(n=t.context)&&n.open&&!t.context.dataRef.current.__outsidePressBubbles){e=!1;return}}),!e)return}o(!1,e,"outside-press")}),L=er(e=>{var t;let n=()=>{var t;T(e),null==(t=q(e))||t.removeEventListener(f,n)};null==(t=q(e))||t.addEventListener(f,n)});r.useEffect(()=>{if(!n||!a)return;u.current.__escapeKeyBubbles=E,u.current.__outsidePressBubbles=R;let e=-1;function t(e){o(!1,e,"ancestor-scroll")}function r(){window.clearTimeout(e),S.current=!0}function c(){e=window.setTimeout(()=>{S.current=!1},5*!!(0,i.Tc)())}let d=$(l.floating);s&&(d.addEventListener("keydown",x?A:k,x),d.addEventListener("compositionstart",r),d.addEventListener("compositionend",c)),w&&d.addEventListener(f,C?L:T,C);let p=[];return h&&((0,i.vq)(l.domReference)&&(p=(0,i.v9)(l.domReference)),(0,i.vq)(l.floating)&&(p=p.concat((0,i.v9)(l.floating))),!(0,i.vq)(l.reference)&&l.reference&&l.reference.contextElement&&(p=p.concat((0,i.v9)(l.reference.contextElement)))),(p=p.filter(e=>{var t;return e!==(null==(t=d.defaultView)?void 0:t.visualViewport)})).forEach(e=>{e.addEventListener("scroll",t,{passive:!0})}),()=>{s&&(d.removeEventListener("keydown",x?A:k,x),d.removeEventListener("compositionstart",r),d.removeEventListener("compositionend",c)),w&&d.removeEventListener(f,C?L:T,C),p.forEach(e=>{e.removeEventListener("scroll",t)}),window.clearTimeout(e)}},[u,l,s,w,f,n,o,h,a,E,R,k,x,A,T,C,L]),r.useEffect(()=>{u.current.insideReactTree=!1},[u,w,f]);let O=r.useMemo(()=>({onKeyDown:k,...d&&{[tf[p]]:e=>{o(!1,e.nativeEvent,"reference-press")},..."click"!==p&&{onClick(e){o(!1,e.nativeEvent,"reference-press")}}}}),[k,o,d,p]),P=r.useMemo(()=>({onKeyDown:k,onMouseDown(){b.current=!0},onMouseUp(){b.current=!0},[td[f]]:()=>{u.current.insideReactTree=!0},onBlurCapture(){v||(eY(M),u.current.insideReactTree=!0,M.current=window.setTimeout(()=>{u.current.insideReactTree=!1}))}}),[k,f,u,v]);return r.useMemo(()=>a?{reference:O,floating:P}:{},[a,O,P])}function tm(e){void 0===e&&(e={});let{nodeId:t}=e,n=function(e){let{open:t=!1,onOpenChange:n,elements:o}=e,i=ej(),l=r.useRef({}),[u]=r.useState(()=>eB()),a=null!=eU(),[s,c]=r.useState(o.reference),f=er((e,t,r)=>{l.current.openEvent=e?t:void 0,u.emit("openchange",{open:e,event:t,reason:r,nested:a}),null==n||n(e,t,r)}),d=r.useMemo(()=>({setPositionReference:c}),[]),p=r.useMemo(()=>({reference:s||o.reference||null,floating:o.floating||null,domReference:o.reference}),[s,o.reference,o.floating]);return r.useMemo(()=>({dataRef:l,open:t,onOpenChange:f,elements:p,events:u,floatingId:i,refs:d}),[t,f,p,u,i,d])}({...e,elements:{reference:null,floating:null,...e.elements}}),o=e.rootContext||n,l=o.elements,[u,a]=r.useState(null),[s,c]=r.useState(null),f=(null==l?void 0:l.domReference)||u,d=r.useRef(null),p=r.useContext(eW);ee(()=>{f&&(d.current=f)},[f]);let h=(0,eg.we)({...e,elements:{...l,...s&&{reference:s}}}),m=r.useCallback(e=>{let t=(0,i.vq)(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;c(t),h.refs.setReference(t)},[h.refs]),g=r.useCallback(e=>{((0,i.vq)(e)||null===e)&&(d.current=e,a(e)),((0,i.vq)(h.refs.reference.current)||null===h.refs.reference.current||null!==e&&!(0,i.vq)(e))&&h.refs.setReference(e)},[h.refs]),v=r.useMemo(()=>({...h.refs,setReference:g,setPositionReference:m,domReference:d}),[h.refs,g,m]),y=r.useMemo(()=>({...h.elements,domReference:f}),[h.elements,f]),w=r.useMemo(()=>({...h,...o,refs:v,elements:y,nodeId:t}),[h,v,y,t,o]);return ee(()=>{o.dataRef.current.floatingContext=w;let e=null==p?void 0:p.nodesRef.current.find(e=>e.id===t);e&&(e.context=w)}),r.useMemo(()=>({...h,context:w,refs:v,elements:y}),[h,v,y,w])}function tg(){return N().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints&&_()}function tv(e,t){void 0===t&&(t={});let{open:n,onOpenChange:o,events:l,dataRef:u,elements:a}=e,{enabled:s=!0,visibleOnly:c=!0}=t,f=r.useRef(!1),d=r.useRef(-1),p=r.useRef(!0);r.useEffect(()=>{if(!s)return;let e=(0,i.zk)(a.domReference);function t(){!n&&(0,i.sb)(a.domReference)&&a.domReference===U($(a.domReference))&&(f.current=!0)}function r(){p.current=!0}function o(){p.current=!1}return e.addEventListener("blur",t),tg()&&(e.addEventListener("keydown",r,!0),e.addEventListener("pointerdown",o,!0)),()=>{e.removeEventListener("blur",t),tg()&&(e.removeEventListener("keydown",r,!0),e.removeEventListener("pointerdown",o,!0))}},[a.domReference,n,s]),r.useEffect(()=>{if(s)return l.on("openchange",e),()=>{l.off("openchange",e)};function e(e){let{reason:t}=e;("reference-press"===t||"escape-key"===t)&&(f.current=!0)}},[l,s]),r.useEffect(()=>()=>{eY(d)},[]);let h=r.useMemo(()=>({onMouseLeave(){f.current=!1},onFocus(e){if(f.current)return;let t=q(e.nativeEvent);if(c&&(0,i.vq)(t)){if(tg()&&!e.relatedTarget){if(!p.current&&!Y(t))return}else if(!function(e){if(!e||j())return!0;try{return e.matches(":focus-visible")}catch(e){return!0}}(t))return}o(!0,e.nativeEvent,"focus")},onBlur(e){f.current=!1;let t=e.relatedTarget,n=e.nativeEvent,r=(0,i.vq)(t)&&t.hasAttribute(e$("focus-guard"))&&"outside"===t.getAttribute("data-type");d.current=window.setTimeout(()=>{var e;let i=U(a.domReference?a.domReference.ownerDocument:document);!t&&i===a.domReference||V(null==(e=u.current.floatingContext)?void 0:e.refs.floating.current,i)||V(a.domReference,i)||r||o(!1,n,"focus")})}}),[u,a.domReference,o,c]);return r.useMemo(()=>s?{reference:h}:{},[s,h])}function ty(e,t,n){let r=new Map,o="item"===n,i=e;if(o&&e){let{[eE]:t,[eR]:n,...r}=e;i=r}return{..."floating"===n&&{tabIndex:-1,"data-floating-ui-focusable":""},...i,...t.map(t=>{let r=t?t[n]:null;return"function"==typeof r?e?r(e):null:r}).concat(e).reduce((e,t)=>(t&&Object.entries(t).forEach(t=>{let[n,i]=t;if(!(o&&[eE,eR].includes(n)))if(0===n.indexOf("on")){if(r.has(n)||r.set(n,[]),"function"==typeof i){var l;null==(l=r.get(n))||l.push(i),e[n]=function(){for(var e,t=arguments.length,o=Array(t),i=0;i<t;i++)o[i]=arguments[i];return null==(e=r.get(n))?void 0:e.map(e=>e(...o)).find(e=>void 0!==e)}}}else e[n]=i}),e),{})}}function tw(e){void 0===e&&(e=[]);let t=e.map(e=>null==e?void 0:e.reference),n=e.map(e=>null==e?void 0:e.floating),o=e.map(e=>null==e?void 0:e.item),i=r.useCallback(t=>ty(t,e,"reference"),t),l=r.useCallback(t=>ty(t,e,"floating"),n),u=r.useCallback(t=>ty(t,e,"item"),o);return r.useMemo(()=>({getReferenceProps:i,getFloatingProps:l,getItemProps:u}),[i,l,u])}let tb=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function tE(e,t){var n,o;void 0===t&&(t={});let{open:i,elements:l,floatingId:u}=e,{enabled:a=!0,role:s="dialog"}=t,c=ej(),f=(null==(n=l.domReference)?void 0:n.id)||c,d=r.useMemo(()=>{var e;return(null==(e=K(l.floating))?void 0:e.id)||u},[l.floating,u]),p=null!=(o=tb.get(s))?o:s,h=null!=eU(),m=r.useMemo(()=>"tooltip"===p||"label"===s?{["aria-"+("label"===s?"labelledby":"describedby")]:i?d:void 0}:{"aria-expanded":i?"true":"false","aria-haspopup":"alertdialog"===p?"dialog":p,"aria-controls":i?d:void 0,..."listbox"===p&&{role:"combobox"},..."menu"===p&&{id:f},..."menu"===p&&h&&{role:"menuitem"},..."select"===s&&{"aria-autocomplete":"none"},..."combobox"===s&&{"aria-autocomplete":"list"}},[p,d,h,i,f,s]),g=r.useMemo(()=>{let e={id:d,...p&&{role:p}};return"tooltip"===p||"label"===s?e:{...e,..."menu"===p&&{"aria-labelledby":f}}},[p,d,f,s]),v=r.useCallback(e=>{let{active:t,selected:n}=e,r={role:"option",...t&&{id:d+"-fui-option"}};switch(s){case"select":return{...r,"aria-selected":t&&n};case"combobox":return{...r,"aria-selected":n}}return{}},[d,s]);return r.useMemo(()=>a?{reference:m,floating:g,item:v}:{},[a,m,g,v])}let tR=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(e,t)=>(t?"-":"")+e.toLowerCase());function tx(e,t){return"function"==typeof e?e(t):e}function tC(e,t){void 0===t&&(t={});let{initial:n={opacity:0},open:o,close:i,common:l,duration:u=250}=t,a=e.placement,s=a.split("-")[0],c=r.useMemo(()=>({side:s,placement:a}),[s,a]),f="number"==typeof u,d=(f?u:u.open)||0,p=(f?u:u.close)||0,[h,m]=r.useState(()=>({...tx(l,c),...tx(n,c)})),{isMounted:g,status:v}=function(e,t){void 0===t&&(t={});let{open:n,elements:{floating:o}}=e,{duration:i=250}=t,l=("number"==typeof i?i:i.close)||0,[u,a]=r.useState("unmounted"),s=function(e,t){let[n,o]=r.useState(e);return e&&!n&&o(!0),r.useEffect(()=>{if(!e&&n){let e=setTimeout(()=>o(!1),t);return()=>clearTimeout(e)}},[e,n,t]),n}(n,l);return s||"close"!==u||a("unmounted"),ee(()=>{if(o){if(n){a("initial");let e=requestAnimationFrame(()=>{em.flushSync(()=>{a("open")})});return()=>{cancelAnimationFrame(e)}}a("close")}},[n,o]),{isMounted:s,status:u}}(e,{duration:u}),y=et(n),w=et(o),b=et(i),E=et(l);return ee(()=>{let e=tx(y.current,c),t=tx(b.current,c),n=tx(E.current,c),r=tx(w.current,c)||Object.keys(e).reduce((e,t)=>(e[t]="",e),{});if("initial"===v&&m(t=>({transitionProperty:t.transitionProperty,...n,...e})),"open"===v&&m({transitionProperty:Object.keys(r).map(tR).join(","),transitionDuration:d+"ms",...n,...r}),"close"===v){let r=t||e;m({transitionProperty:Object.keys(r).map(tR).join(","),transitionDuration:p+"ms",...n,...r})}},[p,b,y,w,E,d,v,c]),{isMounted:g,styles:h}}},2315:function(e,t,n){"use strict";function r(){return"undefined"!=typeof window}function o(e){return u(e)?(e.nodeName||"").toLowerCase():"#document"}function i(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function l(e){var t;return null==(t=(u(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function u(e){return!!r()&&(e instanceof Node||e instanceof i(e).Node)}function a(e){return!!r()&&(e instanceof Element||e instanceof i(e).Element)}function s(e){return!!r()&&(e instanceof HTMLElement||e instanceof i(e).HTMLElement)}function c(e){return!!r()&&"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof i(e).ShadowRoot)}n.d(t,{$4:()=>k,CP:()=>M,L9:()=>S,Lv:()=>h,Ng:()=>c,Tc:()=>R,Tf:()=>g,ZU:()=>d,_m:()=>A,ep:()=>l,eu:()=>C,gJ:()=>E,mq:()=>o,sQ:()=>b,sb:()=>s,v9:()=>function e(t,n,r){var o;void 0===n&&(n=[]),void 0===r&&(r=!0);let l=function e(t){let n=k(t);return C(n)?t.ownerDocument?t.ownerDocument.body:t.body:s(n)&&d(n)?n:e(n)}(t),u=l===(null==(o=t.ownerDocument)?void 0:o.body),a=i(l);if(u){let t=A(a);return n.concat(a,a.visualViewport||[],d(l)?l:[],t&&r?e(t):[])}return n.concat(l,e(l,[],r))},vq:()=>a,zk:()=>i});let f=new Set(["inline","contents"]);function d(e){let{overflow:t,overflowX:n,overflowY:r,display:o}=S(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!f.has(o)}let p=new Set(["table","td","th"]);function h(e){return p.has(o(e))}let m=[":popover-open",":modal"];function g(e){return m.some(t=>{try{return e.matches(t)}catch(e){return!1}})}let v=["transform","translate","scale","rotate","perspective"],y=["transform","translate","scale","rotate","perspective","filter"],w=["paint","layout","strict","content"];function b(e){let t=R(),n=a(e)?S(e):e;return v.some(e=>!!n[e]&&"none"!==n[e])||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||y.some(e=>(n.willChange||"").includes(e))||w.some(e=>(n.contain||"").includes(e))}function E(e){let t=k(e);for(;s(t)&&!C(t);){if(b(t))return t;if(g(t))break;t=k(t)}return null}function R(){return"undefined"!=typeof CSS&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}let x=new Set(["html","body","#document"]);function C(e){return x.has(o(e))}function S(e){return i(e).getComputedStyle(e)}function M(e){return a(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function k(e){if("html"===o(e))return e;let t=e.assignedSlot||e.parentNode||c(e)&&e.host||l(e);return c(t)?t.host:t}function A(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}},4377:function(e,t,n){"use strict";n.d(t,{B1:()=>T,C0:()=>d,Dz:()=>y,Jx:()=>u,LI:()=>i,PG:()=>h,RI:()=>l,Sg:()=>p,T9:()=>o,TV:()=>v,WJ:()=>b,_3:()=>f,bV:()=>k,jk:()=>r,lP:()=>M,nI:()=>A,qE:()=>c,sq:()=>m,w7:()=>w});let r=Math.min,o=Math.max,i=Math.round,l=Math.floor,u=e=>({x:e,y:e}),a={left:"right",right:"left",bottom:"top",top:"bottom"},s={start:"end",end:"start"};function c(e,t,n){return o(e,r(t,n))}function f(e,t){return"function"==typeof e?e(t):e}function d(e){return e.split("-")[0]}function p(e){return e.split("-")[1]}function h(e){return"x"===e?"y":"x"}function m(e){return"y"===e?"height":"width"}let g=new Set(["top","bottom"]);function v(e){return g.has(d(e))?"y":"x"}function y(e){return h(v(e))}function w(e,t,n){void 0===n&&(n=!1);let r=p(e),o=y(e),i=m(o),l="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=k(l)),[l,k(l)]}function b(e){let t=k(e);return[E(e),t,E(t)]}function E(e){return e.replace(/start|end/g,e=>s[e])}let R=["left","right"],x=["right","left"],C=["top","bottom"],S=["bottom","top"];function M(e,t,n,r){let o=p(e),i=function(e,t,n){switch(e){case"top":case"bottom":if(n)return t?x:R;return t?R:x;case"left":case"right":return t?C:S;default:return[]}}(d(e),"start"===n,r);return o&&(i=i.map(e=>e+"-"+o),t&&(i=i.concat(i.map(E)))),i}function k(e){return e.replace(/left|right|bottom|top/g,e=>a[e])}function A(e){return"number"!=typeof e?{top:0,right:0,bottom:0,left:0,...e}:{top:e,right:e,bottom:e,left:e}}function T(e){let{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}},1035:function(e,t,n){"use strict";let r,o;n.d(t,{Q:()=>j});var i=n(5074);let l=new Set,u=new WeakMap,a=new WeakMap,s=new WeakMap,c=new WeakMap,f=new WeakMap,d=new WeakMap,p=new WeakMap,h=new WeakMap,m=new WeakSet,g=0,v=0,y="__aa_tgt",w="__aa_del",b="__aa_new",E=e=>{var t;let n=!(t=e).reduce((e,t)=>[...e,...Array.from(t.addedNodes),...Array.from(t.removedNodes)],[]).every(e=>"#comment"===e.nodeName)&&t.reduce((e,t)=>{if(!1===e)return!1;if(t.target instanceof Element){if(M(t.target),!e.has(t.target)){e.add(t.target);for(let n=0;n<t.target.children.length;n++){let r=t.target.children.item(n);if(r){if(w in r)return!1;M(t.target,r),e.add(r)}}}if(t.removedNodes.length)for(let n=0;n<t.removedNodes.length;n++){let r=t.removedNodes[n];if(w in r)return!1;r instanceof Element&&(e.add(r),M(t.target,r),a.set(r,[t.previousSibling,t.nextSibling]))}}return e},new Set);n&&n.forEach(e=>{var t,n;let o,i;return o=(t=e).isConnected,i=u.has(t),void(o&&a.has(t)&&a.delete(t),s.has(t)&&(null==(n=s.get(t))||n.cancel()),b in t?_(t):i&&o?function(e){let t,n=u.get(e),r=A(e);if(!P(e))return u.set(e,r);if(!n)return;let o=L(e);if("function"!=typeof o){let i=n.left-r.left,l=n.top-r.top,[u,a,s,c]=T(e,n,r),f={transform:`translate(${i}px, ${l}px)`},d={transform:"translate(0, 0)"};u!==a&&(f.width=`${u}px`,d.width=`${a}px`),s!==c&&(f.height=`${s}px`,d.height=`${c}px`),t=e.animate([f,d],{duration:o.duration,easing:o.easing})}else{let[i]=N(o(e,"remain",n,r));(t=new Animation(i)).play()}s.set(e,t),u.set(e,r),t.addEventListener("finish",()=>R(e),{once:!0})}(t):i&&!o?function(e){var t;let n;if(!a.has(e)||!u.has(e))return;let[o,i]=a.get(e);Object.defineProperty(e,w,{value:!0,configurable:!0});let l=window.scrollX,c=window.scrollY;if(i&&i.parentNode&&i.parentNode instanceof Element?i.parentNode.insertBefore(e,i):o&&o.parentNode?o.parentNode.appendChild(e):null==(t=O(e))||t.appendChild(e),!P(e))return F(e);let[f,d,p,h]=function(e){let t=u.get(e),[n,,r]=T(e,t,A(e)),o=e.parentElement;for(;o&&("static"===getComputedStyle(o).position||o instanceof HTMLBodyElement);)o=o.parentElement;o||(o=document.body);let i=getComputedStyle(o),l=u.get(o)||A(o);return[Math.round(t.top-l.top)-k(i.borderTopWidth),Math.round(t.left-l.left)-k(i.borderLeftWidth),n,r]}(e),m=L(e),y=u.get(e);(l!==g||c!==v)&&function(e,t,n,o){let i=g-t,l=v-n,u=document.documentElement.style.scrollBehavior;if("smooth"===getComputedStyle(r).scrollBehavior&&(document.documentElement.style.scrollBehavior="auto"),window.scrollTo(window.scrollX+i,window.scrollY+l),!e.parentElement)return;let a=e.parentElement,s=a.clientHeight,c=a.clientWidth,f=performance.now();!function e(){requestAnimationFrame(()=>{if(!D(o)){let t=s-a.clientHeight,n=c-a.clientWidth;f+o.duration>performance.now()?(window.scrollTo({left:window.scrollX-n,top:window.scrollY-t}),s=a.clientHeight,c=a.clientWidth,e()):document.documentElement.style.scrollBehavior=u}})}()}(e,l,c,m);let b={position:"absolute",top:`${f}px`,left:`${d}px`,width:`${p}px`,height:`${h}px`,margin:"0",pointerEvents:"none",transformOrigin:"center",zIndex:"100"};if(D(m)){let[t,r]=N(m(e,"remove",y));(null==r?void 0:r.styleReset)!==!1&&(b=(null==r?void 0:r.styleReset)||b,Object.assign(e.style,b)),(n=new Animation(t)).play()}else Object.assign(e.style,b),n=e.animate([{transform:"scale(1)",opacity:1},{transform:"scale(.98)",opacity:0}],{duration:m.duration,easing:"ease-out"});s.set(e,n),n.addEventListener("finish",()=>F(e,b),{once:!0})}(t):_(t))})};function R(e){clearTimeout(h.get(e));let t=L(e),n=D(t)?500:t.duration;h.set(e,setTimeout(async()=>{let t=s.get(e);try{await (null==t?void 0:t.finished),u.set(e,A(e)),function(e){let t=c.get(e);null==t||t.disconnect();let n=u.get(e),o=0;n||(n=A(e),u.set(e,n));let{offsetWidth:i,offsetHeight:l}=r,a=[n.top-5,i-(n.left+5+n.width),l-(n.top+5+n.height),n.left-5].map(e=>`${-1*Math.floor(e)}px`).join(" "),s=new IntersectionObserver(()=>{++o>1&&R(e)},{root:r,threshold:1,rootMargin:a});s.observe(e),c.set(e,s)}(e)}catch{}},n))}function x(e){setTimeout(()=>{d.set(e,setInterval(()=>C(R.bind(null,e)),2e3))},Math.round(2e3*Math.random()))}function C(e){"function"==typeof requestIdleCallback?requestIdleCallback(()=>e()):requestAnimationFrame(()=>e())}let S="undefined"!=typeof window&&"ResizeObserver"in window;function M(e,t){t||y in e?!t||y in t||Object.defineProperty(t,y,{value:e}):Object.defineProperty(e,y,{value:e})}function k(e){return Number(e.replace(/[^0-9.\-]/g,""))}function A(e){let t=e.getBoundingClientRect(),{x:n,y:r}=function(e){let t=e.parentElement;for(;t;){if(t.scrollLeft||t.scrollTop)return{x:t.scrollLeft,y:t.scrollTop};t=t.parentElement}return{x:0,y:0}}(e);return{top:t.top+r,left:t.left+n,width:t.width,height:t.height}}function T(e,t,n){let r=t.width,o=t.height,i=n.width,l=n.height,u=getComputedStyle(e);if("content-box"===u.getPropertyValue("box-sizing")){let e=k(u.paddingTop)+k(u.paddingBottom)+k(u.borderTopWidth)+k(u.borderBottomWidth),t=k(u.paddingLeft)+k(u.paddingRight)+k(u.borderRightWidth)+k(u.borderLeftWidth);r-=t,i-=t,o-=e,l-=e}return[r,i,o,l].map(Math.round)}function L(e){return y in e&&p.has(e[y])?p.get(e[y]):{duration:250,easing:"ease-in-out"}}function O(e){if(y in e)return e[y]}function P(e){let t=O(e);return!!t&&m.has(t)}function I(e,...t){t.forEach(t=>t(e,p.has(e)));for(let n=0;n<e.children.length;n++){let r=e.children.item(n);r&&t.forEach(e=>e(r,p.has(r)))}}function N(e){return Array.isArray(e)?e:[e]}function D(e){return"function"==typeof e}function _(e){let t;b in e&&delete e[b];let n=A(e);u.set(e,n);let r=L(e);if(P(e)){if("function"!=typeof r)t=e.animate([{transform:"scale(.98)",opacity:0},{transform:"scale(0.98)",opacity:0,offset:.5},{transform:"scale(1)",opacity:1}],{duration:1.5*r.duration,easing:"ease-in"});else{let[o]=N(r(e,"add",n));(t=new Animation(o)).play()}s.set(e,t),t.addEventListener("finish",()=>R(e),{once:!0})}}function F(e,t){var n;e.remove(),u.delete(e),a.delete(e),s.delete(e),null==(n=c.get(e))||n.disconnect(),setTimeout(()=>{if(w in e&&delete e[w],Object.defineProperty(e,b,{value:!0,configurable:!0}),t&&e instanceof HTMLElement)for(let n in t)e.style[n]=""},0)}function j(e){let[t,n]=(0,i.useState)(),r=(0,i.useMemo)(()=>e,[]),g=(0,i.useCallback)(e=>{e instanceof HTMLElement?n(function(e,t={}){if(S&&o&&!(window.matchMedia("(prefers-reduced-motion: reduce)").matches&&!D(t)&&!t.disrespectUserMotionPreference)){m.add(e),"static"===getComputedStyle(e).position&&Object.assign(e.style,{position:"relative"}),I(e,R,x,e=>null==o?void 0:o.observe(e)),D(t)?p.set(e,t):p.set(e,{duration:250,easing:"ease-in-out",...t});let n=new MutationObserver(E);n.observe(e,{childList:!0}),f.set(e,n),l.add(e)}return Object.freeze({parent:e,enable:()=>{m.add(e)},disable:()=>{m.delete(e)},isEnabled:()=>m.has(e),destroy:()=>{m.delete(e),l.delete(e),p.delete(e);let t=f.get(e);null==t||t.disconnect(),f.delete(e),I(e,e=>{null==o||o.unobserve(e);let t=s.get(e);try{null==t||t.cancel()}catch{}s.delete(e);let n=c.get(e);null==n||n.disconnect(),c.delete(e);let r=d.get(e);r&&clearInterval(r),d.delete(e);let i=h.get(e);i&&clearTimeout(i),h.delete(e),u.delete(e),a.delete(e)})}})}(e,r)):n(void 0)},[r]),v=(0,i.useCallback)(e=>{t&&(e?t.enable():t.disable())},[t]);return(0,i.useEffect)(()=>()=>{var e;null==(e=null==t?void 0:t.destroy)||e.call(t)},[t]),[g,v]}S&&(r=document.documentElement,new MutationObserver(E),o=new ResizeObserver(e=>{e.forEach(e=>{e.target===r&&(clearTimeout(h.get(r)),h.set(r,setTimeout(()=>{l.forEach(e=>I(e,e=>C(()=>R(e))))},100))),u.has(e.target)&&R(e.target)})}),window.addEventListener("scroll",()=>{v=window.scrollY,g=window.scrollX}),o.observe(r))},7447:function(e,t,n){"use strict";n.d(t,{j:()=>i});var r=Object.prototype.hasOwnProperty;function o(e,t,n){for(n of e.keys())if(i(n,t))return n}function i(e,t){var n,l,u;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((l=e.length)===t.length)for(;l--&&i(e[l],t[l]););return -1===l}if(n===Set){if(e.size!==t.size)return!1;for(l of e)if((u=l)&&"object"==typeof u&&!(u=o(t,u))||!t.has(u))return!1;return!0}if(n===Map){if(e.size!==t.size)return!1;for(l of e)if((u=l[0])&&"object"==typeof u&&!(u=o(t,u))||!i(l[1],t.get(u)))return!1;return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((l=e.byteLength)===t.byteLength)for(;l--&&e.getInt8(l)===t.getInt8(l););return -1===l}if(ArrayBuffer.isView(e)){if((l=e.byteLength)===t.byteLength)for(;l--&&e[l]===t[l];);return -1===l}if(!n||"object"==typeof e){for(n in l=0,e)if(r.call(e,n)&&++l&&!r.call(t,n)||!(n in t)||!i(e[n],t[n]))return!1;return Object.keys(t).length===l}}return e!=e&&t!=t}},8878:function(e,t,n){"use strict";n.d(t,{UO:()=>m,wE:()=>d});var r=n(5074),o=Object.defineProperty,i=Object.defineProperties,l=Object.getOwnPropertyDescriptors,u=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable,c=(e,t,n)=>t in e?o(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,f=r.createContext({}),d=r.forwardRef((e,t)=>{let n;var o,d,m,g,v,{value:y,onChange:w,maxLength:b,textAlign:E="left",pattern:R,placeholder:x,inputMode:C="numeric",onComplete:S,pushPasswordManagerStrategy:M="increase-width",pasteTransformer:k,containerClassName:A,noScriptCSSFallback:T=h,render:L,children:O}=e,P=((e,t)=>{var n={};for(var r in e)a.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&u)for(var r of u(e))0>t.indexOf(r)&&s.call(e,r)&&(n[r]=e[r]);return n})(e,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]);let[I,N]=r.useState("string"==typeof P.defaultValue?P.defaultValue:""),D=null!=y?y:I,_=(n=r.useRef(),r.useEffect(()=>{n.current=D}),n.current),F=r.useCallback(e=>{null==w||w(e),N(e)},[w]),j=r.useMemo(()=>R?"string"==typeof R?new RegExp(R):R:null,[R]),B=r.useRef(null),z=r.useRef(null),W=r.useRef({value:D,onChange:F,isIOS:"undefined"!=typeof window&&(null==(d=null==(o=null==window?void 0:window.CSS)?void 0:o.supports)?void 0:d.call(o,"-webkit-touch-callout","none"))}),U=r.useRef({prev:[null==(m=B.current)?void 0:m.selectionStart,null==(g=B.current)?void 0:g.selectionEnd,null==(v=B.current)?void 0:v.selectionDirection]});r.useImperativeHandle(t,()=>B.current,[]),r.useEffect(()=>{let e=B.current,t=z.current;if(!e||!t)return;function n(){if(document.activeElement!==e){Q(null),X(null);return}let t=e.selectionStart,n=e.selectionEnd,r=e.selectionDirection,o=e.maxLength,i=e.value,l=U.current.prev,u=-1,a=-1,s;if(0!==i.length&&null!==t&&null!==n){let e=t===n,r=t===i.length&&i.length<o;if(e&&!r){if(0===t)u=0,a=1,s="forward";else if(t===o)u=t-1,a=t,s="backward";else if(o>1&&i.length>1){let e=0;if(null!==l[0]&&null!==l[1]){s=t<l[1]?"backward":"forward";let n=l[0]===l[1]&&l[0]<o;"backward"!==s||n||(e=-1)}u=e+t,a=e+t+1}}-1!==u&&-1!==a&&u!==a&&B.current.setSelectionRange(u,a,s)}let c=-1!==u?u:t,f=-1!==a?a:n,d=null!=s?s:r;Q(c),X(f),U.current.prev=[c,f,d]}if(W.current.value!==e.value&&W.current.onChange(e.value),U.current.prev=[e.selectionStart,e.selectionEnd,e.selectionDirection],document.addEventListener("selectionchange",n,{capture:!0}),n(),document.activeElement===e&&$(!0),!document.getElementById("input-otp-style")){let e=document.createElement("style");if(e.id="input-otp-style",document.head.appendChild(e),e.sheet){let t="background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";p(e.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),p(e.sheet,`[data-input-otp]:autofill { ${t} }`),p(e.sheet,`[data-input-otp]:-webkit-autofill { ${t} }`),p(e.sheet,"@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"),p(e.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let r=()=>{t&&t.style.setProperty("--root-height",`${e.clientHeight}px`)};r();let o=new ResizeObserver(r);return o.observe(e),()=>{document.removeEventListener("selectionchange",n,{capture:!0}),o.disconnect()}},[]);let[V,q]=r.useState(!1),[H,$]=r.useState(!1),[Y,Q]=r.useState(null),[K,X]=r.useState(null);r.useEffect(()=>{var e;setTimeout(e=()=>{var e,t,n,r;null==(e=B.current)||e.dispatchEvent(new Event("input"));let o=null==(t=B.current)?void 0:t.selectionStart,i=null==(n=B.current)?void 0:n.selectionEnd,l=null==(r=B.current)?void 0:r.selectionDirection;null!==o&&null!==i&&(Q(o),X(i),U.current.prev=[o,i,l])},0),setTimeout(e,10),setTimeout(e,50)},[D,H]),r.useEffect(()=>{void 0!==_&&D!==_&&_.length<b&&D.length===b&&(null==S||S(D))},[b,S,_,D]);let J=function({containerRef:e,inputRef:t,pushPasswordManagerStrategy:n,isFocused:o}){let[i,l]=r.useState(!1),[u,a]=r.useState(!1),[s,c]=r.useState(!1),f=r.useMemo(()=>"none"!==n&&("increase-width"===n||"experimental-no-flickering"===n)&&i&&u,[i,u,n]),d=r.useCallback(()=>{let r=e.current,o=t.current;if(!r||!o||s||"none"===n)return;let i=r.getBoundingClientRect().left+r.offsetWidth,u=r.getBoundingClientRect().top+r.offsetHeight/2;0===document.querySelectorAll('[data-lastpass-icon-root],com-1password-button,[data-dashlanecreated],[style$="2147483647 !important;"]').length&&document.elementFromPoint(i-18,u)===r||(l(!0),c(!0))},[e,t,s,n]);return r.useEffect(()=>{let t=e.current;if(!t||"none"===n)return;function r(){a(window.innerWidth-t.getBoundingClientRect().right>=40)}r();let o=setInterval(r,1e3);return()=>{clearInterval(o)}},[e,n]),r.useEffect(()=>{let e=o||document.activeElement===t.current;if("none"===n||!e)return;let r=setTimeout(d,0),i=setTimeout(d,2e3),l=setTimeout(d,5e3),u=setTimeout(()=>{c(!0)},6e3);return()=>{clearTimeout(r),clearTimeout(i),clearTimeout(l),clearTimeout(u)}},[t,o,n,d]),{hasPWMBadge:i,willPushPWMBadge:f,PWM_BADGE_SPACE_WIDTH:"40px"}}({containerRef:z,inputRef:B,pushPasswordManagerStrategy:M,isFocused:H}),G=r.useCallback(e=>{let t=e.currentTarget.value.slice(0,b);t.length>0&&j&&!j.test(t)?e.preventDefault():("string"==typeof _&&t.length<_.length&&document.dispatchEvent(new Event("selectionchange")),F(t))},[b,F,_,j]),Z=r.useCallback(()=>{var e;if(B.current){let t=Math.min(B.current.value.length,b-1),n=B.current.value.length;null==(e=B.current)||e.setSelectionRange(t,n),Q(t),X(n)}$(!0)},[b]),ee=r.useCallback(e=>{var t,n;let r=B.current;if(!k&&(!W.current.isIOS||!e.clipboardData||!r))return;let o=e.clipboardData.getData("text/plain"),i=k?k(o):o;e.preventDefault();let l=null==(t=B.current)?void 0:t.selectionStart,u=null==(n=B.current)?void 0:n.selectionEnd,a=(l!==u?D.slice(0,l)+i+D.slice(u):D.slice(0,l)+i+D.slice(l)).slice(0,b);if(a.length>0&&j&&!j.test(a))return;r.value=a,F(a);let s=Math.min(a.length,b-1),c=a.length;r.setSelectionRange(s,c),Q(s),X(c)},[b,F,j,D]),et=r.useMemo(()=>({position:"relative",cursor:P.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[P.disabled]),en=r.useMemo(()=>({position:"absolute",inset:0,width:J.willPushPWMBadge?`calc(100% + ${J.PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:J.willPushPWMBadge?`inset(0 ${J.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:E,opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",lineHeight:"1",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"}),[J.PWM_BADGE_SPACE_WIDTH,J.willPushPWMBadge,E]),er=r.useMemo(()=>r.createElement("input",i(((e,t)=>{for(var n in t||(t={}))a.call(t,n)&&c(e,n,t[n]);if(u)for(var n of u(t))s.call(t,n)&&c(e,n,t[n]);return e})({autoComplete:P.autoComplete||"one-time-code"},P),l({"data-input-otp":!0,"data-input-otp-placeholder-shown":0===D.length||void 0,"data-input-otp-mss":Y,"data-input-otp-mse":K,inputMode:C,pattern:null==j?void 0:j.source,"aria-placeholder":x,style:en,maxLength:b,value:D,ref:B,onPaste:e=>{var t;ee(e),null==(t=P.onPaste)||t.call(P,e)},onChange:G,onMouseOver:e=>{var t;q(!0),null==(t=P.onMouseOver)||t.call(P,e)},onMouseLeave:e=>{var t;q(!1),null==(t=P.onMouseLeave)||t.call(P,e)},onFocus:e=>{var t;Z(),null==(t=P.onFocus)||t.call(P,e)},onBlur:e=>{var t;$(!1),null==(t=P.onBlur)||t.call(P,e)}}))),[G,Z,ee,C,en,b,K,Y,P,null==j?void 0:j.source,D]),eo=r.useMemo(()=>({slots:Array.from({length:b}).map((e,t)=>{var n;let r=H&&null!==Y&&null!==K&&(Y===K&&t===Y||t>=Y&&t<K),o=void 0!==D[t]?D[t]:null;return{char:o,placeholderChar:void 0!==D[0]?null:null!=(n=null==x?void 0:x[t])?n:null,isActive:r,hasFakeCaret:r&&null===o}}),isFocused:H,isHovering:!P.disabled&&V}),[H,V,b,K,Y,P.disabled,D]),ei=r.useMemo(()=>L?L(eo):r.createElement(f.Provider,{value:eo},O),[O,eo,L]);return r.createElement(r.Fragment,null,null!==T&&r.createElement("noscript",null,r.createElement("style",null,T)),r.createElement("div",{ref:z,"data-input-otp-container":!0,style:et,className:A},ei,r.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},er)))});function p(e,t){try{e.insertRule(t)}catch(e){console.error("input-otp could not insert CSS rule:",t)}}d.displayName="Input";var h=`
|
|
2
|
+
[data-input-otp] {
|
|
3
|
+
--nojs-bg: white !important;
|
|
4
|
+
--nojs-fg: black !important;
|
|
5
|
+
|
|
6
|
+
background-color: var(--nojs-bg) !important;
|
|
7
|
+
color: var(--nojs-fg) !important;
|
|
8
|
+
caret-color: var(--nojs-fg) !important;
|
|
9
|
+
letter-spacing: .25em !important;
|
|
10
|
+
text-align: center !important;
|
|
11
|
+
border: 1px solid var(--nojs-fg) !important;
|
|
12
|
+
border-radius: 4px !important;
|
|
13
|
+
width: 100% !important;
|
|
14
|
+
}
|
|
15
|
+
@media (prefers-color-scheme: dark) {
|
|
16
|
+
[data-input-otp] {
|
|
17
|
+
--nojs-bg: black !important;
|
|
18
|
+
--nojs-fg: white !important;
|
|
19
|
+
}
|
|
20
|
+
}`,m="^\\d+$"},5059:function(e,t,n){"use strict";let r,o;n.d(t,{h:()=>M});var i,l,u,a,s,c=n(5074),f=Object.defineProperty,d=Object.getOwnPropertySymbols,p=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable,m=(e,t,n)=>t in e?f(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,g=(e,t)=>{for(var n in t||(t={}))p.call(t,n)&&m(e,n,t[n]);if(d)for(var n of d(t))h.call(t,n)&&m(e,n,t[n]);return e},v=(e,t)=>{var n={};for(var r in e)p.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&d)for(var r of d(e))0>t.indexOf(r)&&h.call(e,r)&&(n[r]=e[r]);return n};(e=>{let t=class t{constructor(e,n,r,i){if(this.version=e,this.errorCorrectionLevel=n,this.modules=[],this.isFunction=[],e<t.MIN_VERSION||e>t.MAX_VERSION)throw RangeError("Version value out of range");if(i<-1||i>7)throw RangeError("Mask value out of range");this.size=4*e+17;let l=[];for(let e=0;e<this.size;e++)l.push(!1);for(let e=0;e<this.size;e++)this.modules.push(l.slice()),this.isFunction.push(l.slice());this.drawFunctionPatterns();const u=this.addEccAndInterleave(r);if(this.drawCodewords(u),-1==i){let e=1e9;for(let t=0;t<8;t++){this.applyMask(t),this.drawFormatBits(t);const n=this.getPenaltyScore();n<e&&(i=t,e=n),this.applyMask(t)}}o(0<=i&&i<=7),this.mask=i,this.applyMask(i),this.drawFormatBits(i),this.isFunction=[]}static encodeText(n,r){let o=e.QrSegment.makeSegments(n);return t.encodeSegments(o,r)}static encodeBinary(n,r){let o=e.QrSegment.makeBytes(n);return t.encodeSegments([o],r)}static encodeSegments(e,r,i=1,u=40,a=-1,s=!0){let c,f;if(!(t.MIN_VERSION<=i&&i<=u&&u<=t.MAX_VERSION)||a<-1||a>7)throw RangeError("Invalid value");for(c=i;;c++){let n=8*t.getNumDataCodewords(c,r),o=l.getTotalBits(e,c);if(o<=n){f=o;break}if(c>=u)throw RangeError("Data too long")}for(let e of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])s&&f<=8*t.getNumDataCodewords(c,e)&&(r=e);let d=[];for(let t of e)for(let e of(n(t.mode.modeBits,4,d),n(t.numChars,t.mode.numCharCountBits(c),d),t.getData()))d.push(e);o(d.length==f);let p=8*t.getNumDataCodewords(c,r);o(d.length<=p),n(0,Math.min(4,p-d.length),d),n(0,(8-d.length%8)%8,d),o(d.length%8==0);for(let e=236;d.length<p;e^=253)n(e,8,d);let h=[];for(;8*h.length<d.length;)h.push(0);return d.forEach((e,t)=>h[t>>>3]|=e<<7-(7&t)),new t(c,r,h,a)}getModule(e,t){return 0<=e&&e<this.size&&0<=t&&t<this.size&&this.modules[t][e]}getModules(){return this.modules}drawFunctionPatterns(){for(let e=0;e<this.size;e++)this.setFunctionModule(6,e,e%2==0),this.setFunctionModule(e,6,e%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);let e=this.getAlignmentPatternPositions(),t=e.length;for(let n=0;n<t;n++)for(let r=0;r<t;r++)(0!=n||0!=r)&&(0!=n||r!=t-1)&&(n!=t-1||0!=r)&&this.drawAlignmentPattern(e[n],e[r]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){let t=this.errorCorrectionLevel.formatBits<<3|e,n=t;for(let e=0;e<10;e++)n=n<<1^(n>>>9)*1335;let i=(t<<10|n)^21522;o(i>>>15==0);for(let e=0;e<=5;e++)this.setFunctionModule(8,e,r(i,e));this.setFunctionModule(8,7,r(i,6)),this.setFunctionModule(8,8,r(i,7)),this.setFunctionModule(7,8,r(i,8));for(let e=9;e<15;e++)this.setFunctionModule(14-e,8,r(i,e));for(let e=0;e<8;e++)this.setFunctionModule(this.size-1-e,8,r(i,e));for(let e=8;e<15;e++)this.setFunctionModule(8,this.size-15+e,r(i,e));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let t=0;t<12;t++)e=e<<1^(e>>>11)*7973;let t=this.version<<12|e;o(t>>>18==0);for(let e=0;e<18;e++){let n=r(t,e),o=this.size-11+e%3,i=Math.floor(e/3);this.setFunctionModule(o,i,n),this.setFunctionModule(i,o,n)}}drawFinderPattern(e,t){for(let n=-4;n<=4;n++)for(let r=-4;r<=4;r++){let o=Math.max(Math.abs(r),Math.abs(n)),i=e+r,l=t+n;0<=i&&i<this.size&&0<=l&&l<this.size&&this.setFunctionModule(i,l,2!=o&&4!=o)}}drawAlignmentPattern(e,t){for(let n=-2;n<=2;n++)for(let r=-2;r<=2;r++)this.setFunctionModule(e+r,t+n,1!=Math.max(Math.abs(r),Math.abs(n)))}setFunctionModule(e,t,n){this.modules[t][e]=n,this.isFunction[t][e]=!0}addEccAndInterleave(e){let n=this.version,r=this.errorCorrectionLevel;if(e.length!=t.getNumDataCodewords(n,r))throw RangeError("Invalid argument");let i=t.NUM_ERROR_CORRECTION_BLOCKS[r.ordinal][n],l=t.ECC_CODEWORDS_PER_BLOCK[r.ordinal][n],u=Math.floor(t.getNumRawDataModules(n)/8),a=i-u%i,s=Math.floor(u/i),c=[],f=t.reedSolomonComputeDivisor(l);for(let n=0,r=0;n<i;n++){let o=e.slice(r,r+s-l+(n<a?0:1));r+=o.length;let i=t.reedSolomonComputeRemainder(o,f);n<a&&o.push(0),c.push(o.concat(i))}let d=[];for(let e=0;e<c[0].length;e++)c.forEach((t,n)=>{(e!=s-l||n>=a)&&d.push(t[e])});return o(d.length==u),d}drawCodewords(e){if(e.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw RangeError("Invalid argument");let n=0;for(let t=this.size-1;t>=1;t-=2){6==t&&(t=5);for(let o=0;o<this.size;o++)for(let i=0;i<2;i++){let l=t-i,u=(t+1&2)==0?this.size-1-o:o;!this.isFunction[u][l]&&n<8*e.length&&(this.modules[u][l]=r(e[n>>>3],7-(7&n)),n++)}}o(n==8*e.length)}applyMask(e){if(e<0||e>7)throw RangeError("Mask value out of range");for(let t=0;t<this.size;t++)for(let n=0;n<this.size;n++){let r;switch(e){case 0:r=(n+t)%2==0;break;case 1:r=t%2==0;break;case 2:r=n%3==0;break;case 3:r=(n+t)%3==0;break;case 4:r=(Math.floor(n/3)+Math.floor(t/2))%2==0;break;case 5:r=n*t%2+n*t%3==0;break;case 6:r=(n*t%2+n*t%3)%2==0;break;case 7:r=((n+t)%2+n*t%3)%2==0;break;default:throw Error("Unreachable")}!this.isFunction[t][n]&&r&&(this.modules[t][n]=!this.modules[t][n])}}getPenaltyScore(){let e=0;for(let n=0;n<this.size;n++){let r=!1,o=0,i=[0,0,0,0,0,0,0];for(let l=0;l<this.size;l++)this.modules[n][l]==r?5==++o?e+=t.PENALTY_N1:o>5&&e++:(this.finderPenaltyAddHistory(o,i),r||(e+=this.finderPenaltyCountPatterns(i)*t.PENALTY_N3),r=this.modules[n][l],o=1);e+=this.finderPenaltyTerminateAndCount(r,o,i)*t.PENALTY_N3}for(let n=0;n<this.size;n++){let r=!1,o=0,i=[0,0,0,0,0,0,0];for(let l=0;l<this.size;l++)this.modules[l][n]==r?5==++o?e+=t.PENALTY_N1:o>5&&e++:(this.finderPenaltyAddHistory(o,i),r||(e+=this.finderPenaltyCountPatterns(i)*t.PENALTY_N3),r=this.modules[l][n],o=1);e+=this.finderPenaltyTerminateAndCount(r,o,i)*t.PENALTY_N3}for(let n=0;n<this.size-1;n++)for(let r=0;r<this.size-1;r++){let o=this.modules[n][r];o==this.modules[n][r+1]&&o==this.modules[n+1][r]&&o==this.modules[n+1][r+1]&&(e+=t.PENALTY_N2)}let n=0;for(let e of this.modules)n=e.reduce((e,t)=>e+ +!!t,n);let r=this.size*this.size,i=Math.ceil(Math.abs(20*n-10*r)/r)-1;return o(0<=i&&i<=9),o(0<=(e+=i*t.PENALTY_N4)&&e<=2568888),e}getAlignmentPatternPositions(){if(1==this.version)return[];{let e=Math.floor(this.version/7)+2,t=32==this.version?26:2*Math.ceil((4*this.version+4)/(2*e-2)),n=[6];for(let r=this.size-7;n.length<e;r-=t)n.splice(1,0,r);return n}}static getNumRawDataModules(e){if(e<t.MIN_VERSION||e>t.MAX_VERSION)throw RangeError("Version number out of range");let n=(16*e+128)*e+64;if(e>=2){let t=Math.floor(e/7)+2;n-=(25*t-10)*t-55,e>=7&&(n-=36)}return o(208<=n&&n<=29648),n}static getNumDataCodewords(e,n){return Math.floor(t.getNumRawDataModules(e)/8)-t.ECC_CODEWORDS_PER_BLOCK[n.ordinal][e]*t.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][e]}static reedSolomonComputeDivisor(e){if(e<1||e>255)throw RangeError("Degree out of range");let n=[];for(let t=0;t<e-1;t++)n.push(0);n.push(1);let r=1;for(let o=0;o<e;o++){for(let e=0;e<n.length;e++)n[e]=t.reedSolomonMultiply(n[e],r),e+1<n.length&&(n[e]^=n[e+1]);r=t.reedSolomonMultiply(r,2)}return n}static reedSolomonComputeRemainder(e,n){let r=n.map(e=>0);for(let o of e){let e=o^r.shift();r.push(0),n.forEach((n,o)=>r[o]^=t.reedSolomonMultiply(n,e))}return r}static reedSolomonMultiply(e,t){if(e>>>8!=0||t>>>8!=0)throw RangeError("Byte out of range");let n=0;for(let r=7;r>=0;r--)n=n<<1^(n>>>7)*285^(t>>>r&1)*e;return o(n>>>8==0),n}finderPenaltyCountPatterns(e){let t=e[1];o(t<=3*this.size);let n=t>0&&e[2]==t&&e[3]==3*t&&e[4]==t&&e[5]==t;return(n&&e[0]>=4*t&&e[6]>=t?1:0)+(n&&e[6]>=4*t&&e[0]>=t?1:0)}finderPenaltyTerminateAndCount(e,t,n){return e&&(this.finderPenaltyAddHistory(t,n),t=0),t+=this.size,this.finderPenaltyAddHistory(t,n),this.finderPenaltyCountPatterns(n)}finderPenaltyAddHistory(e,t){0==t[0]&&(e+=this.size),t.pop(),t.unshift(e)}};function n(e,t,n){if(t<0||t>31||e>>>t!=0)throw RangeError("Value out of range");for(let r=t-1;r>=0;r--)n.push(e>>>r&1)}function r(e,t){return(e>>>t&1)!=0}function o(e){if(!e)throw Error("Assertion error")}t.MIN_VERSION=1,t.MAX_VERSION=40,t.PENALTY_N1=3,t.PENALTY_N2=3,t.PENALTY_N3=40,t.PENALTY_N4=10,t.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],t.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=t;let i=class e{constructor(e,t,n){if(this.mode=e,this.numChars=t,this.bitData=n,t<0)throw RangeError("Invalid argument");this.bitData=n.slice()}static makeBytes(t){let r=[];for(let e of t)n(e,8,r);return new e(e.Mode.BYTE,t.length,r)}static makeNumeric(t){if(!e.isNumeric(t))throw RangeError("String contains non-numeric characters");let r=[];for(let e=0;e<t.length;){let o=Math.min(t.length-e,3);n(parseInt(t.substring(e,e+o),10),3*o+1,r),e+=o}return new e(e.Mode.NUMERIC,t.length,r)}static makeAlphanumeric(t){let r;if(!e.isAlphanumeric(t))throw RangeError("String contains unencodable characters in alphanumeric mode");let o=[];for(r=0;r+2<=t.length;r+=2){let i=45*e.ALPHANUMERIC_CHARSET.indexOf(t.charAt(r));n(i+=e.ALPHANUMERIC_CHARSET.indexOf(t.charAt(r+1)),11,o)}return r<t.length&&n(e.ALPHANUMERIC_CHARSET.indexOf(t.charAt(r)),6,o),new e(e.Mode.ALPHANUMERIC,t.length,o)}static makeSegments(t){return""==t?[]:e.isNumeric(t)?[e.makeNumeric(t)]:e.isAlphanumeric(t)?[e.makeAlphanumeric(t)]:[e.makeBytes(e.toUtf8ByteArray(t))]}static makeEci(t){let r=[];if(t<0)throw RangeError("ECI assignment value out of range");if(t<128)n(t,8,r);else if(t<16384)n(2,2,r),n(t,14,r);else if(t<1e6)n(6,3,r),n(t,21,r);else throw RangeError("ECI assignment value out of range");return new e(e.Mode.ECI,0,r)}static isNumeric(t){return e.NUMERIC_REGEX.test(t)}static isAlphanumeric(t){return e.ALPHANUMERIC_REGEX.test(t)}getData(){return this.bitData.slice()}static getTotalBits(e,t){let n=0;for(let r of e){let e=r.mode.numCharCountBits(t);if(r.numChars>=1<<e)return 1/0;n+=4+e+r.bitData.length}return n}static toUtf8ByteArray(e){e=encodeURI(e);let t=[];for(let n=0;n<e.length;n++)"%"!=e.charAt(n)?t.push(e.charCodeAt(n)):(t.push(parseInt(e.substring(n+1,n+3),16)),n+=2);return t}};i.NUMERIC_REGEX=/^[0-9]*$/,i.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,i.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:";let l=i;e.QrSegment=i})(s||(s={})),l=(i=s||(s={})).QrCode||(i.QrCode={}),(r=class{constructor(e,t){this.ordinal=e,this.formatBits=t}}).LOW=new r(0,1),r.MEDIUM=new r(1,0),r.QUARTILE=new r(2,3),r.HIGH=new r(3,2),l.Ecc=r,a=(u=s||(s={})).QrSegment||(u.QrSegment={}),(o=class{constructor(e,t){this.modeBits=e,this.numBitsCharCount=t}numCharCountBits(e){return this.numBitsCharCount[Math.floor((e+7)/17)]}}).NUMERIC=new o(1,[10,12,14]),o.ALPHANUMERIC=new o(2,[9,11,13]),o.BYTE=new o(4,[8,16,16]),o.KANJI=new o(8,[8,10,12]),o.ECI=new o(7,[0,0,0]),a.Mode=o;var y=s,w={L:y.QrCode.Ecc.LOW,M:y.QrCode.Ecc.MEDIUM,Q:y.QrCode.Ecc.QUARTILE,H:y.QrCode.Ecc.HIGH},b="#FFFFFF",E="#000000";function R(e,t=0){let n=[];return e.forEach(function(e,r){let o=null;e.forEach(function(i,l){if(!i&&null!==o){n.push(`M${o+t} ${r+t}h${l-o}v1H${o+t}z`),o=null;return}if(l===e.length-1){if(!i)return;null===o?n.push(`M${l+t},${r+t} h1v1H${l+t}z`):n.push(`M${o+t},${r+t} h${l+1-o}v1H${o+t}z`);return}i&&null===o&&(o=l)})}),n.join("")}function x(e,t){return e.slice().map((e,n)=>n<t.y||n>=t.y+t.h?e:e.map((e,n)=>(n<t.x||n>=t.x+t.w)&&e))}function C({value:e,level:t,minVersion:n,includeMargin:r,marginSize:o,imageSettings:i,size:l,boostLevel:u}){let a=c.useMemo(()=>{let r=(Array.isArray(e)?e:[e]).reduce((e,t)=>(e.push(...y.QrSegment.makeSegments(t)),e),[]);return y.QrCode.encodeSegments(r,w[t],n,void 0,void 0,u)},[e,t,n,u]),{cells:s,margin:f,numCells:d,calculatedImageSettings:p}=c.useMemo(()=>{let e=a.getModules(),t=null!=o?Math.max(Math.floor(o),0):4*!!r,n=e.length+2*t,u=function(e,t,n,r){if(null==r)return null;let o=e.length+2*n,i=Math.floor(.1*t),l=o/t,u=(r.width||i)*l,a=(r.height||i)*l,s=null==r.x?e.length/2-u/2:r.x*l,c=null==r.y?e.length/2-a/2:r.y*l,f=null==r.opacity?1:r.opacity,d=null;if(r.excavate){let e=Math.floor(s),t=Math.floor(c),n=Math.ceil(u+s-e),r=Math.ceil(a+c-t);d={x:e,y:t,w:n,h:r}}return{x:s,y:c,h:a,w:u,excavation:d,opacity:f,crossOrigin:r.crossOrigin}}(e,l,t,i);return{cells:e,margin:t,numCells:n,calculatedImageSettings:u}},[a,l,i,r,o]);return{qrcode:a,margin:f,cells:s,numCells:d,calculatedImageSettings:p}}var S=function(){try{new Path2D().addPath(new Path2D)}catch(e){return!1}return!0}();c.forwardRef(function(e,t){let{value:n,size:r=128,level:o="L",bgColor:i=b,fgColor:l=E,includeMargin:u=!1,minVersion:a=1,boostLevel:s,marginSize:f,imageSettings:d}=e,p=v(e,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","marginSize","imageSettings"]),{style:h}=p,m=v(p,["style"]),y=null==d?void 0:d.src,w=c.useRef(null),M=c.useRef(null),k=c.useCallback(e=>{w.current=e,"function"==typeof t?t(e):t&&(t.current=e)},[t]),[A,T]=c.useState(!1),{margin:L,cells:O,numCells:P,calculatedImageSettings:I}=C({value:n,level:o,minVersion:a,boostLevel:s,includeMargin:u,marginSize:f,imageSettings:d,size:r});c.useEffect(()=>{if(null!=w.current){let e=w.current,t=e.getContext("2d");if(!t)return;let n=O,o=M.current,u=null!=I&&null!==o&&o.complete&&0!==o.naturalHeight&&0!==o.naturalWidth;u&&null!=I.excavation&&(n=x(O,I.excavation));let a=window.devicePixelRatio||1;e.height=e.width=r*a;let s=r/P*a;t.scale(s,s),t.fillStyle=i,t.fillRect(0,0,P,P),t.fillStyle=l,S?t.fill(new Path2D(R(n,L))):O.forEach(function(e,n){e.forEach(function(e,r){e&&t.fillRect(r+L,n+L,1,1)})}),I&&(t.globalAlpha=I.opacity),u&&t.drawImage(o,I.x+L,I.y+L,I.w,I.h)}}),c.useEffect(()=>{T(!1)},[y]);let N=g({height:r,width:r},h),D=null;return null!=y&&(D=c.createElement("img",{src:y,key:y,style:{display:"none"},onLoad:()=>{T(!0)},ref:M,crossOrigin:null==I?void 0:I.crossOrigin})),c.createElement(c.Fragment,null,c.createElement("canvas",g({style:N,height:r,width:r,ref:k,role:"img"},m)),D)}).displayName="QRCodeCanvas";var M=c.forwardRef(function(e,t){let{value:n,size:r=128,level:o="L",bgColor:i=b,fgColor:l=E,includeMargin:u=!1,minVersion:a=1,boostLevel:s,title:f,marginSize:d,imageSettings:p}=e,h=v(e,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","title","marginSize","imageSettings"]),{margin:m,cells:y,numCells:w,calculatedImageSettings:S}=C({value:n,level:o,minVersion:a,boostLevel:s,includeMargin:u,marginSize:d,imageSettings:p,size:r}),M=y,k=null;null!=p&&null!=S&&(null!=S.excavation&&(M=x(y,S.excavation)),k=c.createElement("image",{href:p.src,height:S.h,width:S.w,x:S.x+m,y:S.y+m,preserveAspectRatio:"none",opacity:S.opacity,crossOrigin:S.crossOrigin}));let A=R(M,m);return c.createElement("svg",g({height:r,width:r,viewBox:`0 0 ${w} ${w}`,ref:t,role:"img"},h),!!f&&c.createElement("title",null,f),c.createElement("path",{fill:i,d:`M0,0 h${w}v${w}H0z`,shapeRendering:"crispEdges"}),c.createElement("path",{fill:l,d:A,shapeRendering:"crispEdges"}),k)});M.displayName="QRCodeSVG"},362:function(e,t,n){"use strict";n.d(t,{f:()=>q,I:()=>S,u:()=>A,c:()=>W,B:()=>p,n:()=>j,g:()=>$,r:()=>M,U:()=>a,d:()=>V,o:()=>F,z:()=>b,s:()=>D,a:()=>f,O:()=>s,e:()=>c,S:()=>H,i:()=>v,t:()=>k,b:()=>l,m:()=>d});var r=n(5074),o=n(170),i=Object.prototype.hasOwnProperty;let l=new WeakMap,u=()=>{},a=u(),s=Object,c=e=>e===a,f=e=>"function"==typeof e,d=(e,t)=>({...e,...t}),p=e=>f(e.then),h={},m={},g="undefined",v=typeof window!=g,y=typeof document!=g,w=v&&"Deno"in window,b=(e,t)=>{let n=l.get(e);return[()=>!c(t)&&e.get(t)||h,r=>{if(!c(t)){let o=e.get(t);t in m||(m[t]=o),n[5](t,d(o,r),o||h)}},n[6],()=>!c(t)&&t in m?m[t]:!c(t)&&e.get(t)||h]},E=!0,[R,x]=v&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[u,u],C={initFocus:e=>(y&&document.addEventListener("visibilitychange",e),R("focus",e),()=>{y&&document.removeEventListener("visibilitychange",e),x("focus",e)}),initReconnect:e=>{let t=()=>{E=!0,e()},n=()=>{E=!1};return R("online",t),R("offline",n),()=>{x("online",t),x("offline",n)}}},S=!r.useId,M=!v||w,k=e=>v&&typeof window.requestAnimationFrame!=g?window.requestAnimationFrame(e):setTimeout(e,1),A=M?r.useEffect:r.useLayoutEffect,T="undefined"!=typeof navigator&&navigator.connection,L=!M&&T&&(["slow-2g","2g"].includes(T.effectiveType)||T.saveData),O=new WeakMap,P=(e,t)=>e===`[object ${t}]`,I=0,N=e=>{let t,n,r=typeof e,o=s.prototype.toString.call(e),i=P(o,"Date"),l=P(o,"RegExp"),u=P(o,"Object");if(s(e)!==e||i||l)t=i?e.toJSON():"symbol"==r?e.toString():"string"==r?JSON.stringify(e):""+e;else{if(t=O.get(e))return t;if(t=++I+"~",O.set(e,t),Array.isArray(e)){for(n=0,t="@";n<e.length;n++)t+=N(e[n])+",";O.set(e,t)}if(u){t="#";let r=s.keys(e).sort();for(;!c(n=r.pop());)c(e[n])||(t+=n+":"+N(e[n])+",");O.set(e,t)}}return t},D=e=>{if(f(e))try{e=e()}catch(t){e=""}let t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?N(e):"",t]},_=0,F=()=>++_;async function j(...e){let[t,n,r,i]=e,u=d({populateCache:!0,throwOnError:!0},"boolean"==typeof i?{revalidate:i}:i||{}),s=u.populateCache,h=u.rollbackOnError,m=u.optimisticData,g=u.throwOnError;if(f(n)){let e=[];for(let r of t.keys())!/^\$(inf|sub)\$/.test(r)&&n(t.get(r)._k)&&e.push(r);return Promise.all(e.map(v))}return v(n);async function v(n){let i,[d]=D(n);if(!d)return;let[v,y]=b(t,d),[w,E,R,x]=l.get(t),C=()=>{let e=w[d];return(f(u.revalidate)?u.revalidate(v().data,n):!1!==u.revalidate)&&(delete R[d],delete x[d],e&&e[0])?e[0](o.q2).then(()=>v().data):v().data};if(e.length<3)return C();let S=r,M=!1,k=F();E[d]=[k,0];let A=!c(m),T=v(),L=T.data,O=T._c,P=c(O)?L:O;if(A&&y({data:m=f(m)?m(P,L):m,_c:P}),f(S))try{S=S(P)}catch(e){i=e,M=!0}if(S&&p(S)){let e;if(S=await S.catch(e=>{i=e,M=!0}),k!==E[d][0]){if(M)throw i;return S}M&&A&&(e=i,"function"==typeof h?h(e):!1!==h)&&(s=!0,y({data:P,_c:a}))}if(s&&!M&&(f(s)?y({data:s(S,P),error:a,_c:a}):y({data:S,error:a,_c:a})),E[d][1]=F(),Promise.resolve(C()).then(()=>{y({_c:a})}),M){if(g)throw i;return}return S}}let B=(e,t)=>{for(let n in e)e[n][0]&&e[n][0](t)},z=(e,t)=>{if(!l.has(e)){let n=d(C,t),r=Object.create(null),i=j.bind(a,e),s=u,c=Object.create(null),f=(e,t)=>{let n=c[e]||[];return c[e]=n,n.push(t),()=>n.splice(n.indexOf(t),1)},p=(t,n,r)=>{e.set(t,n);let o=c[t];if(o)for(let e of o)e(n,r)},h=()=>{if(!l.has(e)&&(l.set(e,[r,Object.create(null),Object.create(null),Object.create(null),i,p,f]),!M)){let t=n.initFocus(setTimeout.bind(a,B.bind(a,r,o.CC))),i=n.initReconnect(setTimeout.bind(a,B.bind(a,r,o.jB)));s=()=>{t&&t(),i&&i(),l.delete(e)}}};return h(),[e,i,h,s]}return[e,l.get(e)[4]]},[W,U]=z(new Map),V=d({onLoadingSlow:u,onSuccess:u,onError:u,onErrorRetry:(e,t,n,r,o)=>{let i=n.errorRetryCount,l=o.retryCount,u=~~((Math.random()+.5)*(1<<(l<8?l:8)))*n.errorRetryInterval;(c(i)||!(l>i))&&setTimeout(r,u,o)},onDiscarded:u,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:L?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:L?5e3:3e3,compare:function e(t,n){var r,o;if(t===n)return!0;if(t&&n&&(r=t.constructor)===n.constructor){if(r===Date)return t.getTime()===n.getTime();if(r===RegExp)return t.toString()===n.toString();if(r===Array){if((o=t.length)===n.length)for(;o--&&e(t[o],n[o]););return -1===o}if(!r||"object"==typeof t){for(r in o=0,t)if(i.call(t,r)&&++o&&!i.call(n,r)||!(r in n)||!e(t[r],n[r]))return!1;return Object.keys(n).length===o}}return t!=t&&n!=n},isPaused:()=>!1,cache:W,mutate:U,fallback:{}},{isOnline:()=>E,isVisible:()=>{let e=y&&document.visibilityState;return c(e)||"hidden"!==e}}),q=(e,t)=>{let n=d(e,t);if(t){let{use:r,fallback:o}=e,{use:i,fallback:l}=t;r&&i&&(n.use=r.concat(i)),o&&l&&(n.fallback=d(o,l))}return n},H=(0,r.createContext)({}),$=e=>{let{value:t}=e,n=(0,r.useContext)(H),o=f(t),i=(0,r.useMemo)(()=>o?t(n):t,[o,n,t]),l=(0,r.useMemo)(()=>o?i:q(n,i),[o,n,i]),u=i&&i.provider,s=(0,r.useRef)(a);u&&!s.current&&(s.current=z(u(l.cache||W),i));let c=s.current;return c&&(l.cache=c[0],l.mutate=c[1]),A(()=>{if(c)return c[2]&&c[2](),c[3]},[]),(0,r.createElement)(H.Provider,d(e,{value:l}))}},1216:function(e,t,n){"use strict";n.d(t,{q:()=>r});let r="$inf$"},170:function(e,t,n){"use strict";n.d(t,{CC:()=>r,I0:()=>l,jB:()=>o,q2:()=>i});let r=0,o=1,i=2,l=3},1839:function(e,t,n){"use strict";n.d(t,{Ht:()=>p,aw:()=>d,iX:()=>s,qm:()=>f});var r=n(362),o=n(1216),i=n(5074);let l=r.i&&window.__SWR_DEVTOOLS_USE__,u=l?window.__SWR_DEVTOOLS_USE__:[],a=e=>(0,r.a)(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}],s=()=>(0,r.m)(r.d,(0,i.useContext)(r.S)),c=u.concat(e=>(t,n,i)=>{let l=n&&((...e)=>{let[i]=(0,r.s)(t),[,,,l]=r.b.get(r.c);if(i.startsWith(o.q))return n(...e);let u=l[i];return(0,r.e)(u)?n(...e):(delete l[i],u)});return e(t,l,i)}),f=e=>function(...t){let n=s(),[o,i,l]=a(t),u=(0,r.f)(n,l),f=e,{use:d}=u,p=(d||[]).concat(c);for(let e=p.length;e--;)f=p[e](f);return f(o,i||u.fetcher||null,u)},d=(e,t,n)=>{let r=t[e]||(t[e]=[]);return r.push(n),()=>{let e=r.indexOf(n);e>=0&&(r[e]=r[r.length-1],r.pop())}},p=(e,t)=>(...n)=>{let[r,o,i]=a(n),l=(i.use||[]).concat(t);return e(r,o,{...i,use:l})};l&&(window.__SWR_DEVTOOLS_REACT__=i)},6651:function(e,t,n){"use strict";n.d(t,{Ay:()=>p,BE:()=>d});var r=n(5074),o=n(3437),i=n(362),l=n(170),u=n(1839);let a=()=>{},s=a(),c=(new WeakMap,r.use||(e=>{switch(e.status){case"pending":throw e;case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}})),f={dedupe:!0},d=i.O.defineProperty(i.g,"defaultValue",{value:i.d}),p=(0,u.qm)((e,t,n)=>{let{cache:a,compare:s,suspense:d,fallbackData:p,revalidateOnMount:h,revalidateIfStale:m,refreshInterval:g,refreshWhenHidden:v,refreshWhenOffline:y,keepPreviousData:w}=n,[b,E,R,x]=i.b.get(a),[C,S]=(0,i.s)(e),M=(0,r.useRef)(!1),k=(0,r.useRef)(!1),A=(0,r.useRef)(C),T=(0,r.useRef)(t),L=(0,r.useRef)(n),O=()=>L.current.isVisible()&&L.current.isOnline(),[P,I,N,D]=(0,i.z)(a,C),_=(0,r.useRef)({}).current,F=(0,i.e)(p)?(0,i.e)(n.fallback)?i.U:n.fallback[C]:p,j=(e,t)=>{for(let n in _)if("data"===n){if(!s(e[n],t[n])&&(!(0,i.e)(e[n])||!s(Y,t[n])))return!1}else if(t[n]!==e[n])return!1;return!0},B=(0,r.useMemo)(()=>{let e=!!C&&!!t&&((0,i.e)(h)?!L.current.isPaused()&&!d&&!1!==m:h),n=t=>{let n=(0,i.m)(t);return(delete n._k,e)?{isValidating:!0,isLoading:!0,...n}:n},r=P(),o=D(),l=n(r),u=r===o?l:n(o),a=l;return[()=>{let e=n(P());return j(e,a)?(a.data=e.data,a.isLoading=e.isLoading,a.isValidating=e.isValidating,a.error=e.error,a):(a=e,e)},()=>u]},[a,C]),z=(0,o.useSyncExternalStore)((0,r.useCallback)(e=>N(C,(t,n)=>{j(n,t)||e()}),[a,C]),B[0],B[1]),W=!M.current,U=b[C]&&b[C].length>0,V=z.data,q=(0,i.e)(V)?F&&(0,i.B)(F)?c(F):F:V,H=z.error,$=(0,r.useRef)(q),Y=w?(0,i.e)(V)?(0,i.e)($.current)?q:$.current:V:q,Q=(!U||!!(0,i.e)(H))&&(W&&!(0,i.e)(h)?h:!L.current.isPaused()&&(d?!(0,i.e)(q)&&m:(0,i.e)(q)||m)),K=!!(C&&t&&W&&Q),X=(0,i.e)(z.isValidating)?K:z.isValidating,J=(0,i.e)(z.isLoading)?K:z.isLoading,G=(0,r.useCallback)(async e=>{let t,r,o=T.current;if(!C||!o||k.current||L.current.isPaused())return!1;let u=!0,a=e||{},c=!R[C]||!a.dedupe,f=()=>i.I?!k.current&&C===A.current&&M.current:C===A.current,d={isValidating:!1,isLoading:!1},p=()=>{I(d)},h=()=>{let e=R[C];e&&e[1]===r&&delete R[C]},m={isValidating:!0};(0,i.e)(P().data)&&(m.isLoading=!0);try{if(c&&(I(m),n.loadingTimeout&&(0,i.e)(P().data)&&setTimeout(()=>{u&&f()&&L.current.onLoadingSlow(C,n)},n.loadingTimeout),R[C]=[o(S),(0,i.o)()]),[t,r]=R[C],t=await t,c&&setTimeout(h,n.dedupingInterval),!R[C]||R[C][1]!==r)return c&&f()&&L.current.onDiscarded(C),!1;d.error=i.U;let e=E[C];if(!(0,i.e)(e)&&(r<=e[0]||r<=e[1]||0===e[1]))return p(),c&&f()&&L.current.onDiscarded(C),!1;let l=P().data;d.data=s(l,t)?l:t,c&&f()&&L.current.onSuccess(t,C,n)}catch(n){h();let e=L.current,{shouldRetryOnError:t}=e;!e.isPaused()&&(d.error=n,c&&f()&&(e.onError(n,C,e),(!0===t||(0,i.a)(t)&&t(n))&&(!L.current.revalidateOnFocus||!L.current.revalidateOnReconnect||O())&&e.onErrorRetry(n,C,e,e=>{let t=b[C];t&&t[0]&&t[0](l.I0,e)},{retryCount:(a.retryCount||0)+1,dedupe:!0})))}return u=!1,p(),!0},[C,a]),Z=(0,r.useCallback)((...e)=>(0,i.n)(a,A.current,...e),[]);if((0,i.u)(()=>{T.current=t,L.current=n,(0,i.e)(V)||($.current=V)}),(0,i.u)(()=>{if(!C)return;let e=G.bind(i.U,f),t=0;L.current.revalidateOnFocus&&(t=Date.now()+L.current.focusThrottleInterval);let n=(0,u.aw)(C,b,(n,r={})=>{if(n==l.CC){let n=Date.now();L.current.revalidateOnFocus&&n>t&&O()&&(t=n+L.current.focusThrottleInterval,e())}else if(n==l.jB)L.current.revalidateOnReconnect&&O()&&e();else if(n==l.q2)return G();else if(n==l.I0)return G(r)});return k.current=!1,A.current=C,M.current=!0,I({_k:S}),Q&&!R[C]&&((0,i.e)(q)||i.r?e():(0,i.t)(e)),()=>{k.current=!0,n()}},[C]),(0,i.u)(()=>{let e;function t(){let t=(0,i.a)(g)?g(P().data):g;t&&-1!==e&&(e=setTimeout(n,t))}function n(){!P().error&&(v||L.current.isVisible())&&(y||L.current.isOnline())?G(f).then(t):t()}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[g,v,y,C]),(0,r.useDebugValue)(Y),d&&(0,i.e)(q)&&C){if(!i.I&&i.r)throw Error("Fallback data is required when using Suspense in SSR.");T.current=t,L.current=n,k.current=!1;let e=x[C];if((0,i.e)(e)||c(Z(e)),(0,i.e)(H)){let e=G(f);(0,i.e)(Y)||(e.status="fulfilled",e.value=!0),c(e)}else throw H}return{mutate:Z,get data(){return _.data=!0,Y},get error(){return _.error=!0,H},get isValidating(){return _.isValidating=!0,X},get isLoading(){return _.isLoading=!0,J}}})},2951:function(e,t,n){"use strict";n.d(t,{Ay:()=>y});var r=n(5074),o=n(6651),i=n(362),l=n(1216),u=n(1839),a=n(3437);let s=()=>{},c=s(),f=Object,d=e=>e===c,p=new WeakMap,h=(e,t)=>e===`[object ${t}]`,m=0,g=e=>{let t,n,r=typeof e,o=f.prototype.toString.call(e),i=h(o,"Date"),l=h(o,"RegExp"),u=h(o,"Object");if(f(e)!==e||i||l)t=i?e.toJSON():"symbol"==r?e.toString():"string"==r?JSON.stringify(e):""+e;else{if(t=p.get(e))return t;if(t=++m+"~",p.set(e,t),Array.isArray(e)){for(n=0,t="@";n<e.length;n++)t+=g(e[n])+",";p.set(e,t)}if(u){t="#";let r=f.keys(e).sort();for(;!d(n=r.pop());)d(e[n])||(t+=n+":"+g(e[n])+",");p.set(e,t)}}return t},v=Promise.resolve(),y=(0,u.Ht)(o.Ay,e=>(t,n,o)=>{let u,s=(0,r.useRef)(!1),{cache:c,initialSize:f=1,revalidateAll:d=!1,persistSize:p=!1,revalidateFirstPage:h=!0,revalidateOnMount:m=!1,parallel:y=!1}=o,[,,,w]=i.b.get(i.c);try{(u=(e=>{if("function"==typeof e)try{e=e()}catch(t){e=""}let t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?g(e):"",t]})(t?t(0,null):null)[0])&&(u=l.q+u)}catch(e){}let[b,E,R]=(0,i.z)(c,u),x=(0,r.useCallback)(()=>(0,i.e)(b()._l)?f:b()._l,[c,u,f]);(0,a.useSyncExternalStore)((0,r.useCallback)(e=>u?R(u,()=>{e()}):()=>{},[c,u]),x,x);let C=(0,r.useCallback)(()=>{let e=b()._l;return(0,i.e)(e)?f:e},[u,f]),S=(0,r.useRef)(C());(0,i.u)(()=>{if(!s.current){s.current=!0;return}u&&E({_l:p?S.current:C()})},[u,c]);let M=m&&!s.current,k=e(u,async e=>{let r=b()._i,l=b()._r;E({_r:i.U});let u=[],a=C(),[s]=(0,i.z)(c,e),f=s().data,p=[],m=null;for(let e=0;e<a;++e){let[a,s]=(0,i.s)(t(e,y?null:m));if(!a)break;let[g,v]=(0,i.z)(c,a),b=g().data,E=d||r||(0,i.e)(b)||h&&!e&&!(0,i.e)(f)||M||f&&!(0,i.e)(f[e])&&!o.compare(f[e],b);if(n&&("function"==typeof l?l(b,s):E)){let t=async()=>{if(a in w){let e=w[a];delete w[a],b=await e}else b=await n(s);v({data:b,_k:s}),u[e]=b};y?p.push(t):await t()}else u[e]=b;y||(m=b)}return y&&await Promise.all(p.map(e=>e())),E({_i:i.U}),u},o),A=(0,r.useCallback)(function(e,t){let n="boolean"==typeof t?{revalidate:t}:t||{},r=!1!==n.revalidate;return u?(r&&((0,i.e)(e)?E({_i:!0,_r:n.revalidate}):E({_i:!1,_r:n.revalidate})),arguments.length?k.mutate(e,{...n,revalidate:r}):k.mutate()):v},[u,c]),T=(0,r.useCallback)(e=>{let n;if(!u)return v;let[,r]=(0,i.z)(c,u);if((0,i.a)(e)?n=e(C()):"number"==typeof e&&(n=e),"number"!=typeof n)return v;r({_l:n}),S.current=n;let o=[],[l]=(0,i.z)(c,u),a=null;for(let e=0;e<n;++e){let[n]=(0,i.s)(t(e,a)),[r]=(0,i.z)(c,n),u=n?r().data:i.U;if((0,i.e)(u))return A(l().data);o.push(u),a=u}return A(o)},[u,c,A,C]);return{size:C(),setSize:T,mutate:A,get data(){return k.data},get error(){return k.error},get isValidating(){return k.isValidating},get isLoading(){return k.isLoading}}})},5530:function(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(5074),o=n(1839),i=n(6651),l=n(362);let u=l.I?e=>{e()}:r.startTransition,a=(0,o.Ht)(i.Ay,()=>(e,t,n={})=>{let{mutate:i}=(0,o.iX)(),a=(0,r.useRef)(e),s=(0,r.useRef)(t),c=(0,r.useRef)(n),f=(0,r.useRef)(0),[d,p,h]=(e=>{let[,t]=(0,r.useState)({}),n=(0,r.useRef)(!1),o=(0,r.useRef)(e),i=(0,r.useRef)({data:!1,error:!1,isValidating:!1}),u=(0,r.useCallback)(e=>{let r=!1,l=o.current;for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&l[t]!==e[t]&&(l[t]=e[t],i.current[t]&&(r=!0));r&&!n.current&&t({})},[]);return(0,l.u)(()=>(n.current=!1,()=>{n.current=!0})),[o,i.current,u]})({data:l.U,error:l.U,isMutating:!1}),m=d.current,g=(0,r.useCallback)(async(e,t)=>{let[n,r]=(0,l.s)(a.current);if(!s.current)throw Error("Can’t trigger the mutation: missing fetcher.");if(!n)throw Error("Can’t trigger the mutation: missing key.");let o=(0,l.m)((0,l.m)({populateCache:!1,throwOnError:!0},c.current),t),d=(0,l.o)();f.current=d,h({isMutating:!0});try{let t=await i(n,s.current(r,{arg:e}),(0,l.m)(o,{throwOnError:!0}));return f.current<=d&&(u(()=>h({data:t,isMutating:!1,error:void 0})),null==o.onSuccess||o.onSuccess.call(o,t,n,o)),t}catch(e){if(f.current<=d&&(u(()=>h({error:e,isMutating:!1})),null==o.onError||o.onError.call(o,e,n,o),o.throwOnError))throw e}},[]),v=(0,r.useCallback)(()=>{f.current=(0,l.o)(),h({data:l.U,error:l.U,isMutating:!1})},[]);return(0,l.u)(()=>{a.current=e,s.current=t,c.current=n}),{trigger:g,reset:v,get data(){return p.data=!0,m.data},get error(){return p.error=!0,m.error},get isMutating(){return p.isMutating=!0,m.isMutating}}})}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_clerk_ui=globalThis.webpackChunk_clerk_ui||[]).push([["265"],{1170:function(e,i,t){t.r(i),t.d(i,{WaitlistModal:()=>D,Waitlist:()=>z});var l=t(4518),r=t(
|
|
1
|
+
"use strict";(globalThis.webpackChunk_clerk_ui=globalThis.webpackChunk_clerk_ui||[]).push([["265"],{1170:function(e,i,t){t.r(i),t.d(i,{WaitlistModal:()=>D,Waitlist:()=>z});var l=t(4518),r=t(5543),n=t(6088),a=t(3269),o=t(8640),s=t(451),d=t(2861),c=t(4607),h=t(4132),u=t(2265),m=t(2454),Y=t(6153),p=t(4468),g=t(6245),f=t(8272),w=t(8920),A=t(4901),v=t(8388),b=t(4964),I=t(4374);let y=e=>{let i=(0,r.ho)(),t=(0,a.f0)(),o=(0,A.m)(),{navigate:c}=(0,b.r)(),h=(0,s.Y)(),{formState:u}=e,y=(0,g.X)({onNextStep:()=>t.setError(void 0)}),z=async e=>{e.preventDefault(),o.setLoading(),t.setLoading(),t.setError(void 0);let l={emailAddress:u.emailAddress.value};await i.joinWaitlist(l).then(()=>{y.nextStep(),setTimeout(()=>{h.afterJoinWaitlistUrl&&c(h.afterJoinWaitlistUrl)},2e3)}).catch(e=>{(0,p.H4)(e,[u.emailAddress],t.setError)}).finally(()=>{o.setIdle(),t.setIdle()})};return(0,l.FD)(g.s,{...y.props,children:[(0,l.FD)(f.fv,{gap:6,children:[(0,l.FD)(Y.Y.Root,{showLogo:!0,children:[(0,l.Y)(Y.Y.Title,{localizationKey:(0,d.G)("waitlist.start.title")}),(0,l.Y)(Y.Y.Subtitle,{localizationKey:(0,d.G)("waitlist.start.subtitle")})]}),(0,l.Y)(n.Z.Alert,{children:t.error}),(0,l.Y)(f.so,{direction:"col",elementDescriptor:w.$z.main,gap:6,children:(0,l.FD)(m.l.Root,{onSubmit:z,gap:8,children:[(0,l.Y)(f.fv,{gap:6,children:(0,l.Y)(m.l.ControlRow,{elementId:"emailAddress",children:(0,l.Y)(m.l.PlainInput,{...u.emailAddress.props,isRequired:!0})})}),(0,l.Y)(f.fv,{center:!0,children:(0,l.Y)(m.l.SubmitButton,{localizationKey:(0,d.G)("waitlist.start.formButton")})})]})})]}),(0,l.FD)(f.fv,{gap:6,children:[(0,l.FD)(Y.Y.Root,{showLogo:!0,children:[(0,l.Y)(Y.Y.Title,{localizationKey:(0,d.G)("waitlist.success.title")}),(0,l.Y)(Y.Y.Subtitle,{localizationKey:(0,d.G)("waitlist.success.subtitle")})]}),h.afterJoinWaitlistUrl&&(0,l.Y)(f.so,{direction:"col",elementDescriptor:w.$z.main,gap:6,children:(0,l.Y)(f.fv,{center:!0,children:(0,l.FD)(f.so,{gap:2,align:"center",children:[(0,l.Y)(f.In,{icon:v.A,sx:e=>({margin:"auto",width:e.sizes.$6,height:e.sizes.$6,animation:`${I.W.spinning} 1s linear infinite`})}),(0,l.Y)(f.EY,{colorScheme:"secondary",localizationKey:(0,d.G)("waitlist.success.message")})]})})})]})]})},z=(0,a.dm)(()=>{let e=(0,r.ho)(),i=(0,s.Y)(),{signInUrl:t}=i,a=i.initialValues||{},h={emailAddress:(0,o.tJ)("emailAddress",a.emailAddress||"",{type:"email",label:(0,d.G)("formFieldLabel__emailAddress"),placeholder:(0,d.G)("formFieldInputPlaceholder__emailAddress")})};return(0,l.Y)(c.n.Root,{flow:"waitlist",children:(0,l.FD)(n.Z.Root,{children:[(0,l.Y)(n.Z.Content,{children:(0,l.Y)(y,{formState:h})}),(0,l.Y)(n.Z.Footer,{children:(0,l.FD)(n.Z.Action,{elementId:"waitlist",children:[(0,l.Y)(n.Z.ActionText,{localizationKey:(0,d.G)("waitlist.start.actionText")}),(0,l.Y)(n.Z.ActionLink,{localizationKey:(0,d.G)("waitlist.start.actionLink"),to:e.buildUrlWithAuth(t)})]})})]})})}),D=e=>{let i={signInUrl:`/${h.I}/sign-in`,...e,routing:"virtual"};return(0,l.Y)(u.q,{path:"waitlist",children:(0,l.Y)(s.r.Provider,{value:{...i,componentName:"Waitlist",mode:"modal"},children:(0,l.Y)("div",{children:(0,l.Y)(z,{})})})})}},451:function(e,i,t){t.d(i,{Y:()=>h,r:()=>c});var l=t(4173),r=t(5074),n=t(7697),a=t(2366),o=t(4964),s=t(2117);let d=["email_address"],c=(0,r.createContext)(null),h=()=>{let e=(0,r.useContext)(c),{displayConfig:i}=(0,n.O)(),t=(0,a.II)(),{queryString:h}=(0,o.r)(),u=(0,r.useMemo)(()=>(0,s.tf)(h,d),[]);if(!e||"Waitlist"!==e.componentName)throw Error("Clerk: useWaitlistContext called outside Waitlist.");let{componentName:m,...Y}=e,p=Y.signInUrl||t.signInUrl||i.signInUrl;return p=(0,l.kZ)({base:p},{stringify:!0}),{...Y,componentName:m,signInUrl:p,initialValues:{...u}}}}}]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clerk/ui",
|
|
3
|
-
"version": "1.0.0-snapshot.
|
|
3
|
+
"version": "1.0.0-snapshot.v20251216175437",
|
|
4
4
|
"description": "Internal package that contains the UI components for the Clerk frontend SDKs",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -57,8 +57,8 @@
|
|
|
57
57
|
"react": "^18.0.0 || ^19.0.0 || ^19.0.0-0",
|
|
58
58
|
"react-dom": "^18.0.0 || ^19.0.0 || ^19.0.0-0",
|
|
59
59
|
"swr": "2.3.4",
|
|
60
|
-
"@clerk/localizations": "4.0.0-snapshot.
|
|
61
|
-
"@clerk/shared": "4.0.0-snapshot.
|
|
60
|
+
"@clerk/localizations": "4.0.0-snapshot.v20251216175437",
|
|
61
|
+
"@clerk/shared": "4.0.0-snapshot.v20251216175437"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
64
|
"@floating-ui/react-dom": "^2.1.6",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_clerk_ui=globalThis.webpackChunk_clerk_ui||[]).push([["364"],{7498:function(e,t,i){i.r(t),i.d(t,{OrganizationSwitcher:()=>J});var n=i(4518),o=i(5074),r=i(3269),a=i(4373),c=i(2826),l=i(2467),s=i(3264),g=i(4607),d=i(1577),u=i(9361),z=i(2531),h=i(9001),p=i(781),m=i(9972),S=i(7477),f=i(1703),$=i(7697),v=i(8920),w=i(2861),x=i(8272),O=i(1005),P=i(8813),Y=i(750),I=i(4468),b=i(2157),D=i(2364),A=i(9366),B=i(1464),_=i(3689);let C=e=>{let t=(0,r.f0)(),{userSuggestions:i}=(0,u.D_)({userSuggestions:_.mu.userSuggestions});return"accepted"===e.status?(0,n.Y)(x.EY,{colorScheme:"secondary",localizationKey:(0,w.G)("organizationSwitcher.suggestionsAcceptedLabel")}):(0,n.Y)(x.$n,{elementDescriptor:v.$z.organizationSwitcherInvitationAcceptButton,textVariant:"buttonSmall",variant:"outline",colorScheme:"neutral",size:"sm",isLoading:t.isLoading,onClick:()=>t.runAsync(e.accept).then(e=>i?.setData?.(t=>(0,_.l_)(e,t))).catch(e=>(0,I.H4)(e,[],t.setError)),localizationKey:(0,w.G)("organizationSwitcher.action__suggestionsAccept")})},k=e=>{let t=(0,r.f0)();return(0,n.Y)(x.$n,{elementDescriptor:v.$z.organizationSwitcherInvitationAcceptButton,textVariant:"buttonSmall",variant:"outline",colorScheme:"neutral",size:"xs",isLoading:t.isLoading,onClick:e.onAccept,localizationKey:(0,w.G)("organizationSwitcher.action__invitationAccept")})},U=e=>{let{children:t,publicOrganizationData:i}=e;return(0,n.FD)(x.so,{align:"center",gap:2,sx:e=>({justifyContent:"space-between",padding:`${e.space.$4} ${e.space.$5}`}),elementDescriptor:v.$z.organizationSwitcherPopoverInvitationActionsBox,children:[(0,n.Y)(h.Q,{elementId:"organizationSwitcherListedOrganization",organization:i,sx:e=>({color:e.colors.$colorMutedForeground,":hover":{color:e.colors.$colorMutedForeground}})}),t]})},y=(0,r.dm)(e=>{let{invitation:t,onOrganizationClick:i}=e,{accept:o,publicOrganizationData:a,status:c}=t,s=(0,r.f0)(),{getOrganization:g}=(0,u.ho)(),{organization:d}=(0,u.Z5)(),{userInvitations:z}=(0,u.D_)({userInvitations:_.mu.userInvitations,userMemberships:_.mu.userMemberships}),{acceptedInvitations:p,setAcceptedInvitations:m}=(0,l.b)(),S=p.find(e=>e.invitation.id===t.id)?.organization;return"accepted"===c?t.publicOrganizationData.id===d?.id||S?.id&&d?.id===S.id?null:(0,n.Y)(Y.P,{elementDescriptor:v.$z.organizationSwitcherPreviewButton,icon:A.A,onClick:S?()=>i(S):void 0,role:"menuitem",children:(0,n.Y)(h.Q,{elementId:"organizationSwitcherListedOrganization",organization:a,sx:e=>({color:e.colors.$colorMutedForeground,":hover":{color:e.colors.$colorMutedForeground}})})}):(0,n.Y)(U,{publicOrganizationData:a,children:(0,n.Y)(k,{onAccept:()=>s.runAsync(async()=>[await o(),await g(a.id)]).then(([e,t])=>{z?.setData?.(t=>(0,_.l_)(e,t,"negative")),m(i=>[...i,{organization:t,invitation:e}])}).catch(e=>(0,I.H4)(e,[],s.setError))})})}),F=e=>{let{showBorder:t,...i}=e;return(0,n.Y)(z.En,{role:"menu",...i})},M=(0,r.dm)(e=>(0,n.Y)(U,{publicOrganizationData:e.publicOrganizationData,children:(0,n.Y)(C,{...e})})),E=e=>{let{onOrganizationClick:t}=e,{ref:i,userSuggestions:o,userInvitations:r}=(()=>{let{userInvitations:e,userSuggestions:t}=(0,u.D_)(_.mu),{ref:i}=(0,D.W)({threshold:0,onChange:i=>{i&&(e.hasNextPage?e.fetchNext?.():t.fetchNext?.())}});return{userInvitations:e,userSuggestions:t,ref:i}})(),a=r.isLoading||o.isLoading,c=r.hasNextPage||o.hasNextPage,l=r.data?.filter(e=>!!e)||[],s=o.data?.filter(e=>!!e)||[],g=l.length>0||s.length>0;return g||a?(0,n.Y)(F,{showBorder:g||a,elementDescriptor:v.$z.organizationSwitcherPopoverInvitationActions,children:(0,n.FD)(x.az,{sx:e=>({maxHeight:`calc(4 * ${e.sizes.$17} + 4px)`,overflowY:"auto",...B.s.unstyledScrollbar(e)}),children:[l?.map(e=>(0,n.Y)(y,{invitation:e,onOrganizationClick:t},e.id)),!r.hasNextPage&&s?.map(e=>(0,n.Y)(M,{...e},e.id)),(c||a)&&(0,n.Y)(b.U,{ref:i})]})}):null},L=e=>{let{onPersonalWorkspaceClick:t,onOrganizationClick:i}=e,{hidePersonal:o}=(0,c.l)(),{organization:r}=(0,u.Z5)(),{ref:a,userMemberships:l}=(()=>{let{userMemberships:e}=(0,u.D_)({userMemberships:_.mu.userMemberships}),{ref:t}=(0,D.W)({threshold:0,onChange:t=>{t&&e.hasNextPage&&e.fetchNext?.()}});return{userMemberships:e,ref:t}})(),{user:s}=(0,u.Jd)(),g=((l.count||0)>0&&l.data||[]).map(e=>e.organization).filter(e=>e.id!==r?.id);if(!s)return null;let{username:d,primaryEmailAddress:z,primaryPhoneNumber:m,...S}=s,{isLoading:f,hasNextPage:$}=l;return(0,n.FD)(x.az,{sx:e=>({maxHeight:`calc((4 * ${e.sizes.$17}) + 4px)`,overflowY:"auto","> button,div":{border:`0 solid ${e.colors.$borderAlpha100}`},">:not([hidden])~:not([hidden])":{borderTopWidth:"1px",borderBottomWidth:"0"},...B.s.unstyledScrollbar(e)}),role:"group","aria-label":o?"List of all organization memberships":"List of all accounts",children:[r&&!o&&(0,n.Y)(Y.P,{elementDescriptor:v.$z.organizationSwitcherPreviewButton,elementId:v.$z.organizationSwitcherPreviewButton.setId("personal"),icon:A.A,onClick:t,role:"menuitem",children:(0,n.Y)(p.i,{user:S,mainIdentifierVariant:"buttonLarge",title:(0,w.G)("organizationSwitcher.personalWorkspace")})}),g.map(e=>(0,n.Y)(Y.P,{elementDescriptor:v.$z.organizationSwitcherPreviewButton,elementId:v.$z.organizationSwitcherPreviewButton.setId("organization"),icon:A.A,onClick:()=>i(e),role:"menuitem",sx:e=>({border:`0 solid ${e.colors.$borderAlpha100}`}),children:(0,n.Y)(h.Q,{elementId:"organizationSwitcherListedOrganization",organization:e})},e.id)),($||f)&&(0,n.Y)(b.U,{ref:a})]})};var G=i(2223);let R=({onCreateOrganizationClick:e})=>(0,n.Y)(G._,{elementDescriptor:v.$z.organizationSwitcherPopoverActionButton,elementId:v.$z.organizationSwitcherPopoverActionButton.setId("createOrganization"),iconBoxElementDescriptor:v.$z.organizationSwitcherPopoverActionButtonIconBox,iconBoxElementId:v.$z.organizationSwitcherPopoverActionButtonIconBox.setId("createOrganization"),iconElementDescriptor:v.$z.organizationSwitcherPopoverActionButtonIcon,iconElementId:v.$z.organizationSwitcherPopoverActionButtonIcon.setId("createOrganization"),label:(0,w.G)("organizationSwitcher.action__createOrganization"),onClick:e,sx:e=>({padding:`${e.space.$5} ${e.space.$5}`}),iconSx:e=>({width:e.sizes.$9,height:e.sizes.$6}),iconBoxSx:e=>({width:e.sizes.$9,height:e.sizes.$6}),spinnerSize:"sm"}),W=e=>{let{onCreateOrganizationClick:t,onPersonalWorkspaceClick:i,onOrganizationClick:o}=e;return(0,n.FD)(n.FK,{children:[(0,n.Y)(E,{onOrganizationClick:o}),(0,n.Y)(L,{onPersonalWorkspaceClick:i,onOrganizationClick:o}),(0,n.Y)(R,{onCreateOrganizationClick:t})]})},N=o.forwardRef((e,t)=>{let{close:i,...o}=e,a=()=>i?.(!1),l=(0,r.f0)(),{__experimental_asStandalone:s}=(0,c.l)(),{openOrganizationProfile:g,openCreateOrganization:d}=(0,u.ho)(),S=(0,u.Sj)(),{organization:f}=(0,u.Z5)(),{isLoaded:$,setActive:Y}=(0,u.D_)(),{hidePersonal:I,createOrganizationMode:b,organizationProfileMode:D,afterLeaveOrganizationUrl:A,afterCreateOrganizationUrl:B,navigateCreateOrganization:_,navigateOrganizationProfile:C,afterSelectOrganizationUrl:k,afterSelectPersonalUrl:U,organizationProfileProps:y,skipInvitationScreen:F}=(0,c.l)(),{user:M}=(0,u.Jd)();if(!M)return null;let{username:E,primaryEmailAddress:L,primaryPhoneNumber:G,...R}=M;if(!$)return null;let N=(0,n.Y)(z.K5,{elementDescriptor:v.$z.organizationSwitcherPopoverActionButton,elementId:v.$z.organizationSwitcherPopoverActionButton.setId("manageOrganization"),iconBoxElementDescriptor:v.$z.organizationSwitcherPopoverActionButtonIconBox,iconBoxElementId:v.$z.organizationSwitcherPopoverActionButtonIconBox.setId("manageOrganization"),iconElementDescriptor:v.$z.organizationSwitcherPopoverActionButtonIcon,iconElementId:v.$z.organizationSwitcherPopoverActionButtonIcon.setId("manageOrganization"),icon:P.A,label:(0,w.G)("organizationSwitcher.action__manageOrganization"),onClick:()=>(a(),"navigation"===D)?C():g({...y,afterLeaveOrganizationUrl:A,getContainer:S}),trailing:(0,n.Y)(T,{}),focusRing:!0});return(0,n.Y)(O.M,{elementDescriptor:v.$z.organizationSwitcherPopoverRootBox,children:(0,n.FD)(m.Y.Root,{elementDescriptor:v.$z.organizationSwitcherPopoverCard,ref:t,role:"dialog","aria-label":`${f?.name} is active`,shouldEntryAnimate:!s,...o,children:[(0,n.Y)(m.Y.Content,{elementDescriptor:v.$z.organizationSwitcherPopoverMain,children:(0,n.FD)(z.En,{elementDescriptor:v.$z.organizationSwitcherPopoverActions,role:"menu",children:[f?(0,n.FD)(x.so,{justify:"between",align:"center",sx:e=>({width:"100%",paddingRight:e.space.$5}),children:[(0,n.Y)(h.Q,{elementId:"organizationSwitcherActiveOrganization",organization:f,user:M,mainIdentifierVariant:"buttonLarge",sx:e=>({padding:`${e.space.$4} ${e.space.$5}`})}),(0,n.Y)(z.En,{role:"menu",children:N})]}):!I&&(0,n.Y)(p.i,{user:R,sx:e=>({padding:`${e.space.$4} ${e.space.$5}`,width:"100%"}),title:(0,w.G)("organizationSwitcher.personalWorkspace")}),(0,n.Y)(W,{onCreateOrganizationClick:()=>(a(),"navigation"===b)?_():d({afterCreateOrganizationUrl:B,skipInvitationScreen:F,getContainer:S}),onPersonalWorkspaceClick:()=>l.runAsync(()=>Y({organization:null,redirectUrl:U(M)})).then(a),onOrganizationClick:e=>l.runAsync(()=>Y({organization:e,redirectUrl:k(e)})).then(a)})]})}),(0,n.Y)(m.Y.Footer,{elementDescriptor:v.$z.organizationSwitcherPopoverFooter})]})})}),T=(0,S.cb)(({sx:e})=>{let{organizationSettings:t}=(0,$.O)(),i=t?.domains?.enabled,{membershipRequests:o}=(0,u.Z5)({membershipRequests:i||void 0});return o?.count?(0,n.Y)(f.a,{notificationCount:o.count,containerSx:e}):null},{permission:"org:sys_memberships:manage"});var K=i(1778),Z=i(78),H=i(7649);let Q=(0,K.H)((0,o.forwardRef)((e,t)=>{let{sx:i,...o}=e,{user:r}=(0,u.Jd)(),{organization:a}=(0,u.Z5)(),{hidePersonal:l}=(0,c.l)(),{t:s}=(0,Z._)();if(!r)return null;let{username:g,primaryEmailAddress:d,primaryPhoneNumber:z,...m}=r;return(0,n.FD)(x.$n,{elementDescriptor:v.$z.organizationSwitcherTrigger,elementId:v.$z.organizationSwitcherTrigger.setId(a?"organization":"personal"),variant:"ghost",colorScheme:"neutral",hoverAsFocus:!0,focusRing:!1,sx:[e=>({padding:`${e.space.$1} ${e.space.$2}`,position:"relative"}),i],ref:t,"aria-label":`${s(e.isOpen?(0,w.G)("organizationSwitcher.action__closeOrganizationSwitcher"):(0,w.G)("organizationSwitcher.action__openOrganizationSwitcher"))}`,"aria-expanded":e.isOpen,"aria-haspopup":"dialog",...o,children:[a&&(0,n.Y)(h.Q,{elementId:"organizationSwitcherTrigger",gap:3,size:"xs",organization:a,sx:{maxWidth:"30ch"}}),!a&&(0,n.Y)(p.i,{size:"xs",gap:3,user:m,showAvatar:!l,sx:e=>({color:e.colors.$colorMutedForeground}),title:l?(0,w.G)("organizationSwitcher.notSelected"):(0,w.G)("organizationSwitcher.personalWorkspace")}),(0,n.Y)(V,{}),(0,n.Y)(x.In,{elementDescriptor:v.$z.organizationSwitcherTriggerIcon,icon:H.A,sx:e=>({marginLeft:`${e.space.$2}`})})]})})),V=()=>{let{userInvitations:e,userSuggestions:t}=(0,u.D_)(_.mu),{organizationSettings:i}=(0,$.O)(),o=(0,S.Fd)({permission:"org:sys_memberships:manage"}),r=i?.domains?.enabled,{membershipRequests:a}=(0,u.Z5)({membershipRequests:r&&o||void 0}),c=(e.count||0)+(t.count||0)+(a?.count||0);return c?(0,n.Y)(f.a,{containerSx:e=>({position:"absolute",top:`calc(${e.space.$2} * -1)`,right:`calc(${e.space.$2} * -1)`}),notificationCount:c}):null},j=(0,r.P4)(({children:e})=>{let{defaultOpen:t}=(0,c.l)(),{floating:i,reference:r,styles:l,toggle:s,isOpen:g,nodeId:u,context:z}=(0,d.f)({defaultOpen:t,placement:"bottom-start",offset:8}),h=(0,o.useId)();return(0,n.FD)(n.FK,{children:[(0,n.Y)(Q,{ref:r,onClick:s,isOpen:g,"aria-controls":g?h:void 0,"aria-expanded":g}),(0,n.Y)(a.A,{nodeId:u,context:z,isOpen:g,children:(0,o.cloneElement)(e,{id:h,close:s,ref:i,style:l})})]})}),J=(0,s.G)((0,r.dm)(()=>{let{__experimental_asStandalone:e}=(0,c.l)();return(0,n.Y)(g.n.Root,{flow:"organizationSwitcher",sx:{display:"inline-flex"},children:(0,n.Y)(l.h,{children:e?(0,n.Y)(N,{close:"function"==typeof e?e:void 0}):(0,n.Y)(j,{children:(0,n.Y)(N,{})})})})}))},3689:function(e,t,i){i.d(t,{l_:()=>o,mu:()=>n});let n={userMemberships:{infinite:!0},userInvitations:{infinite:!0},userSuggestions:{infinite:!0,status:["pending","accepted"]}},o=(e,t,i)=>{if(void 0===t)return[{data:[e],total_count:1}];let n=t?.[t.length-1]?.total_count||1;return t.map(t=>{if(void 0===t)return t;let o=t.data.map(t=>t.id===e.id?{...e}:t);return{...t,data:o,total_count:"negative"===i?n-1:n}})}},2826:function(e,t,i){i.d(t,{U:()=>c,l:()=>l});var n=i(5074),o=i(7697),r=i(4964),a=i(2117);let c=(0,n.createContext)(null),l=()=>{let e=(0,n.useContext)(c),{navigate:t}=(0,r.r)(),{displayConfig:i,organizationSettings:l}=(0,o.O)();if(!e||"OrganizationSwitcher"!==e.componentName)throw Error("Clerk: useOrganizationSwitcherContext called outside OrganizationSwitcher.");let{componentName:s,...g}=e,d=g.afterCreateOrganizationUrl||i.afterCreateOrganizationUrl,u=g.afterLeaveOrganizationUrl||i.afterLeaveOrganizationUrl,z=({organization:e,user:i})=>{let n=h({organization:e,user:i});return n?t(n):Promise.resolve()},h=({organization:e,user:t})=>"function"==typeof g.afterSelectPersonalUrl&&t?g.afterSelectPersonalUrl(t):"function"==typeof g.afterSelectOrganizationUrl&&e?g.afterSelectOrganizationUrl(e):g.afterSelectPersonalUrl&&t?(0,a.tR)({urlWithParam:g.afterSelectPersonalUrl,entity:t}):g.afterSelectOrganizationUrl&&e?(0,a.tR)({urlWithParam:g.afterSelectOrganizationUrl,entity:e}):void 0,p=g.organizationProfileUrl&&!g.organizationProfileMode?"navigation":g.organizationProfileMode,m=g.createOrganizationUrl&&!g.createOrganizationMode?"navigation":g.createOrganizationMode;return{...g,hidePersonal:l.forceOrganizationSelection||g.hidePersonal||!1,organizationProfileMode:p||"modal",createOrganizationMode:m||"modal",skipInvitationScreen:g.skipInvitationScreen||!1,afterCreateOrganizationUrl:d,afterLeaveOrganizationUrl:u,navigateOrganizationProfile:()=>t(g.organizationProfileUrl||i.organizationProfileUrl),navigateCreateOrganization:()=>t(g.createOrganizationUrl||i.createOrganizationUrl),navigateAfterSelectOrganization:e=>z({organization:e}),navigateAfterSelectPersonal:e=>z({user:e}),afterSelectOrganizationUrl:e=>h({organization:e}),afterSelectPersonalUrl:e=>h({user:e}),componentName:s}}}}]);
|