!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="100bbd89-7c69-411c-aacb-74f545c25a54",e._sentryDebugIdIdentifier="sentry-dbid-100bbd89-7c69-411c-aacb-74f545c25a54")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4514],{2421:function(e,t,n){var r=n(2265),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=r.useState,s=r.useEffect,l=r.useLayoutEffect,a=r.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(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=o({inst:{value:n,getSnapshot:t}}),i=r[0].inst,c=r[1];return l(function(){i.value=n,i.getSnapshot=t,u(i)&&c({inst:i})},[e,n,t]),s(function(){return u(i)&&c({inst:i}),e(function(){u(i)&&c({inst:i})})},[e]),a(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:c},42552:function(e,t,n){e.exports=n(2421)},27931:function(e,t,n){n.d(t,{Vo:function(){return P},vn:function(){return ea},a7:function(){return et},qI:function(){return en},iz:function(){return O},gM:function(){return el},yB:function(){return es},N1:function(){return er},C2:function(){return ei},sO:function(){return eo},Gl:function(){return A},tL:function(){return W},oG:function(){return T},E7:function(){return R},RM:function(){return w},RE:function(){return N},tF:function(){return U},KQ:function(){return j},Gv:function(){return x},Rl:function(){return I},ej:function(){return L},JM:function(){return S},qq:function(){return _},aC:function(){return Q},cL:function(){return b.cL},E2:function(){return H},o8:function(){return b.o8},eW:function(){return b.eW},kP:function(){return b.kP},xo:function(){return b.xo},zq:function(){return X},QS:function(){return Z},aF:function(){return b.aF},Kr:function(){return V},B$:function(){return F},HZ:function(){return $},Lu:function(){return J},X:function(){return D},qH:function(){return B},Mp:function(){return z},ge:function(){return M},r0:function(){return ee}});var r,i,o,s,l=n(9817),a=(n(98071),{veryStrict:{afterMinutes:10,level:"multiFactor"},strict:{afterMinutes:10,level:"secondFactor"},moderate:{afterMinutes:60,level:"secondFactor"},lax:{afterMinutes:1440,level:"secondFactor"}}),u=new Set(["firstFactor","secondFactor","multiFactor"]),c=new Set(["veryStrict","strict","moderate","lax"]),d=e=>"number"==typeof e&&e>0,h=e=>u.has(e),p=e=>c.has(e),f=(e,t)=>{let{orgId:n,orgRole:r,orgPermissions:i}=t;return(e.role||e.permission)&&n&&r&&i?e.permission?i.includes(e.permission):e.role?r===e.role:null:null},g=e=>!!("string"==typeof e&&p(e)||"object"==typeof e&&h(e.level)&&d(e.afterMinutes))&&(e=>"string"==typeof e?a[e]:e).bind(null,e),m=(e,{__experimental_factorVerificationAge:t})=>{if(!e.__experimental_reverification||!t)return null;let n=g(e.__experimental_reverification);if(!n)return null;let{level:r,afterMinutes:i}=n(),[o,s]=t,l=-1!==o?i>o:null,a=-1!==s?i>s:null;switch(r){case"firstFactor":return l;case"secondFactor":return -1!==s?a:l;case"multiFactor":return -1===s?l:l&&a}},v=e=>t=>{if(!e.userId)return!1;let n=f(t,e),r=m(t,e);return[n,r].some(e=>null===e)?[n,r].some(e=>!0===e):[n,r].every(e=>!0===e)},k=n(2265),b=n(69455),y=n(66511);n(9656),n(37658),new WeakMap,new WeakMap,new WeakSet,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakSet;var w=(0,l.t5)({packageName:"@clerk/clerk-react"});function S(e){w.setMessages(e).setPackageName(e)}var[P,C]=(0,b.uH)("AuthContext"),O=b.b5,E=b.rI,j="You've added multiple <ClerkProvider> components in your React component tree. Wrap your components in a single <ClerkProvider>.",U=e=>`You've passed multiple children components to <${e}/>. You can only pass a single child component or text.`,_="Unsupported usage of isSatellite, domain or proxyUrl. The usage of isSatellite, domain or proxyUrl as function is not supported in non-browser environments.",M="<UserProfile.Page /> component needs to be a direct child of `<UserProfile />` or `<UserButton />`.",z="<UserProfile.Link /> component needs to be a direct child of `<UserProfile />` or `<UserButton />`.",L="<OrganizationProfile.Page /> component needs to be a direct child of `<OrganizationProfile />` or `<OrganizationSwitcher />`.",I="<OrganizationProfile.Link /> component needs to be a direct child of `<OrganizationProfile />` or `<OrganizationSwitcher />`.",R=e=>`<${e} /> can only accept <${e}.Page /> and <${e}.Link /> as its children. Any other provided component will be ignored.`,T=e=>`Missing props. <${e}.Page /> component requires the following props: url, label, labelIcon, alongside with children to be rendered inside the page.`,A=e=>`Missing props. <${e}.Link /> component requires the following props: url, label and labelIcon.`,x=e=>`The <${e}/> component uses path-based routing by default unless a different routing strategy is provided using the \`routing\` prop. When path-based routing is used, you need to provide the path where the component is mounted on by using the \`path\` prop. Example: <${e} path={'/my-path'} />`,N=e=>`The \`path\` prop will only be respected when the Clerk component uses path-based routing. To resolve this error, pass \`routing='path'\` to the <${e}/> component, or drop the \`path\` prop to switch to hash-based routing. For more details please refer to our docs: https://clerk.com/docs`,V="<UserButton /> can only accept <UserButton.UserProfilePage />, <UserButton.UserProfileLink /> and <UserButton.MenuItems /> as its children. Any other provided component will be ignored.",W="<UserButton.MenuItems /> component can only accept <UserButton.Action /> and <UserButton.Link /> as its children. Any other provided component will be ignored.",D="<UserButton.MenuItems /> component needs to be a direct child of `<UserButton />`.",F="<UserButton.Action /> component needs to be a direct child of `<UserButton.MenuItems />`.",B="<UserButton.Link /> component needs to be a direct child of `<UserButton.MenuItems />`.",$="Missing props. <UserButton.Link /> component requires the following props: href, label and labelIcon.",J="Missing props. <UserButton.Action /> component requires the following props: label.",q=e=>{(0,b.Rm)(()=>{w.throwMissingClerkProviderError({source:e})})},G=e=>new Promise(t=>{e.loaded&&t(),e.addOnLoaded(t)}),K=e=>async t=>(await G(e),e.session)?e.session.getToken(t):null,Y=e=>async(...t)=>(await G(e),e.signOut(...t)),Q=()=>{q("useAuth");let{sessionId:e,userId:t,actor:n,orgId:r,orgRole:i,orgSlug:o,orgPermissions:s,__experimental_factorVerificationAge:l}=C(),a=E(),u=(0,k.useCallback)(K(a),[a]),c=(0,k.useCallback)(Y(a),[a]),d=(0,k.useCallback)(e=>v({userId:t,orgId:r,orgRole:i,orgPermissions:s,__experimental_factorVerificationAge:l})(e),[t,l,r,i,s]);return void 0===e&&void 0===t?{isLoaded:!1,isSignedIn:void 0,sessionId:e,userId:t,actor:void 0,orgId:void 0,orgRole:void 0,orgSlug:void 0,has:void 0,signOut:c,getToken:u}:null===e&&null===t?{isLoaded:!0,isSignedIn:!1,sessionId:e,userId:t,actor:null,orgId:null,orgRole:null,orgSlug:null,has:()=>!1,signOut:c,getToken:u}:e&&t&&r&&i?{isLoaded:!0,isSignedIn:!0,sessionId:e,userId:t,actor:n||null,orgId:r,orgRole:i,orgSlug:o||null,has:d,signOut:c,getToken:u}:e&&t&&!r?{isLoaded:!0,isSignedIn:!0,sessionId:e,userId:t,actor:n||null,orgId:null,orgRole:null,orgSlug:null,has:d,signOut:c,getToken:u}:w.throw("Invalid state. Feel free to submit a bug or reach out to support here: https://clerk.com/support")};function H(e){let{startEmailLinkFlow:t,cancelEmailLinkFlow:n}=k.useMemo(()=>e.createEmailLinkFlow(),[e]);return k.useEffect(()=>n,[]),{startEmailLinkFlow:t,cancelEmailLinkFlow:n}}var X=()=>{var e;q("useSignIn");let t=E(),n=(0,b.sX)();return(null==(e=t.telemetry)||e.record((0,y.J)("useSignIn")),n)?{isLoaded:!0,signIn:n.signIn,setActive:t.setActive}:{isLoaded:!1,signIn:void 0,setActive:void 0}},Z=()=>{var e;q("useSignUp");let t=E(),n=(0,b.sX)();return(null==(e=t.telemetry)||e.record((0,y.J)("useSignUp")),n)?{isLoaded:!0,signUp:n.signUp,setActive:t.setActive}:{isLoaded:!1,signUp:void 0,setActive:void 0}},ee=(e,t)=>{t=t||e.displayName||e.name||"Component",e.displayName=t;let n=n=>{q(t||"withClerk");let r=E();return r.loaded?k.createElement(e,{...n,clerk:r}):null};return n.displayName=`withClerk(${t})`,n},et=({children:e})=>(q("ClerkLoaded"),E().loaded)?k.createElement(k.Fragment,null,e):null,en=({children:e})=>(q("ClerkLoading"),E().loaded)?null:k.createElement(k.Fragment,null,e),er=ee(({clerk:e,...t})=>{let{client:n,session:r}=e,i=n.activeSessions&&n.activeSessions.length>0;return k.useEffect(()=>{null===r&&i?e.redirectToAfterSignOut():e.redirectToSignIn(t)},[]),null},"RedirectToSignIn"),ei=ee(({clerk:e,...t})=>(k.useEffect(()=>{e.redirectToSignUp(t)},[]),null),"RedirectToSignUp"),eo=ee(({clerk:e})=>(k.useEffect(()=>{e.redirectToUserProfile()},[]),null),"RedirectToUserProfile"),es=ee(({clerk:e})=>(k.useEffect(()=>{e.redirectToOrganizationProfile()},[]),null),"RedirectToOrganizationProfile"),el=ee(({clerk:e})=>(k.useEffect(()=>{e.redirectToCreateOrganization()},[]),null),"RedirectToCreateOrganization"),ea=ee(({clerk:e,...t})=>(k.useEffect(()=>{e.handleRedirectCallback(t)},[]),null),"AuthenticateWithRedirectCallback")},96392:function(e,t,n){n.d(t,{vn:function(){return c.vn},a7:function(){return c.a7},qI:function(){return c.qI},El:function(){return ek},Gp:function(){return er},Kb:function(){return es},Bg:function(){return eo},A:function(){return en},Li:function(){return ei},gM:function(){return c.gM},yB:function(){return c.yB},N1:function(){return c.N1},C2:function(){return c.C2},sO:function(){return c.sO},cL:function(){return J},$d:function(){return el},qu:function(){return ec},AM:function(){return eu},Mo:function(){return q},gX:function(){return ea},l8:function(){return Z},Iw:function(){return Y},aC:function(){return c.aC},ll:function(){return c.cL},E2:function(){return c.E2},o8:function(){return c.o8},eW:function(){return c.eW},kP:function(){return c.kP},xo:function(){return c.xo},zq:function(){return c.zq},QS:function(){return c.QS},aF:function(){return c.aF}});var r,i,o,s,l,a,u,c=n(27931),d=e=>{throw TypeError(e)},h=(e,t,n)=>t.has(e)||d("Cannot "+n),p=(e,t,n)=>(h(e,t,"read from private field"),n?n.call(e):t.get(e)),f=(e,t,n)=>t.has(e)?d("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),g=(e,t,n,r)=>(h(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),m=(e,t,n)=>(h(e,t,"access private method"),n),v=n(54076),k=n(30022),b=n(69455),y=n(2265),w=n(54887),S=n(82774);n(98071);var P=n(39982);function C(e,t,n){return"function"==typeof e?e(t):void 0!==e?e:void 0!==n?n:void 0}"undefined"==typeof window||window.global||(window.global="undefined"==typeof global?window:global);var O=e=>t=>{try{return y.Children.only(e)}catch(e){return c.RM.throw((0,c.tF)(t))}},E=(e,t)=>(e||(e=t),"string"==typeof e&&(e=y.createElement("button",null,e)),e),j=e=>(...t)=>{if(e&&"function"==typeof e)return e(...t)},U=new Map,_=e=>{let t=Array(e.length).fill(null),[n,r]=(0,y.useState)(t);return e.map((e,t)=>({id:e.id,mount:e=>r(n=>n.map((n,r)=>r===t?e:n)),unmount:()=>r(e=>e.map((e,n)=>n===t?null:e)),portal:()=>y.createElement(y.Fragment,null,n[t]?(0,w.createPortal)(e.component,n[t]):null)}))},M=(e,t)=>!!e&&y.isValidElement(e)&&(null==e?void 0:e.type)===t,z=e=>I({children:e,reorderItemsLabels:["account","security"],LinkComponent:K,PageComponent:G,MenuItemsComponent:Q,componentName:"UserProfile"}),L=e=>I({children:e,reorderItemsLabels:["general","members"],LinkComponent:et,PageComponent:ee,componentName:"OrganizationProfile"}),I=({children:e,LinkComponent:t,PageComponent:n,MenuItemsComponent:r,reorderItemsLabels:i,componentName:o})=>{let s=[];y.Children.forEach(e,e=>{if(!M(e,n)&&!M(e,t)&&!M(e,r)){e&&(0,k.yJ)((0,c.E7)(o));return}let{props:l}=e,{children:a,label:u,url:d,labelIcon:h}=l;if(M(e,n)){if(R(l,i))s.push({label:u});else if(T(l))s.push({label:u,labelIcon:h,children:a,url:d});else{(0,k.yJ)((0,c.oG)(o));return}}if(M(e,t)){if(A(l))s.push({label:u,labelIcon:h,url:d});else{(0,k.yJ)((0,c.Gl)(o));return}}});let l=[],a=[],u=[];s.forEach((e,t)=>{if(T(e)){l.push({component:e.children,id:t}),a.push({component:e.labelIcon,id:t});return}A(e)&&u.push({component:e.labelIcon,id:t})});let d=_(l),h=_(a),p=_(u),f=[],g=[];return s.forEach((e,t)=>{if(R(e,i)){f.push({label:e.label});return}if(T(e)){let{portal:n,mount:r,unmount:i}=d.find(e=>e.id===t),{portal:o,mount:s,unmount:l}=h.find(e=>e.id===t);f.push({label:e.label,url:e.url,mount:r,unmount:i,mountIcon:s,unmountIcon:l}),g.push(n),g.push(o);return}if(A(e)){let{portal:n,mount:r,unmount:i}=p.find(e=>e.id===t);f.push({label:e.label,url:e.url,mountIcon:r,unmountIcon:i}),g.push(n);return}}),{customPages:f,customPagesPortals:g}},R=(e,t)=>{let{children:n,label:r,url:i,labelIcon:o}=e;return!n&&!i&&!o&&t.some(e=>e===r)},T=e=>{let{children:t,label:n,url:r,labelIcon:i}=e;return!!t&&!!r&&!!i&&!!n},A=e=>{let{children:t,label:n,url:r,labelIcon:i}=e;return!t&&!!r&&!!i&&!!n},x=e=>N({children:e,reorderItemsLabels:["manageAccount","signOut"],MenuItemsComponent:Q,MenuActionComponent:H,MenuLinkComponent:X,UserProfileLinkComponent:K,UserProfilePageComponent:G}),N=({children:e,MenuItemsComponent:t,MenuActionComponent:n,MenuLinkComponent:r,UserProfileLinkComponent:i,UserProfilePageComponent:o,reorderItemsLabels:s})=>{let l=[],a=[],u=[];y.Children.forEach(e,e=>{if(!M(e,t)&&!M(e,i)&&!M(e,o)){e&&(0,k.yJ)(c.Kr);return}if(M(e,i)||M(e,o))return;let{props:a}=e;y.Children.forEach(a.children,e=>{if(!M(e,n)&&!M(e,r)){e&&(0,k.yJ)(c.tL);return}let{props:t}=e,{label:i,labelIcon:o,href:a,onClick:u,open:d}=t;if(M(e,n)){if(V(t,s))l.push({label:i});else if(W(t)){let e={label:i,labelIcon:o};if(void 0!==u)l.push({...e,onClick:u});else if(void 0!==d)l.push({...e,open:d.startsWith("/")?d:`/${d}`});else{(0,k.yJ)("Custom menu item must have either onClick or open property");return}}else{(0,k.yJ)(c.Lu);return}}if(M(e,r)){if(D(t))l.push({label:i,labelIcon:o,href:a});else{(0,k.yJ)(c.HZ);return}}})});let d=[],h=[];l.forEach((e,t)=>{W(e)&&d.push({component:e.labelIcon,id:t}),D(e)&&h.push({component:e.labelIcon,id:t})});let p=_(d),f=_(h);return l.forEach((e,t)=>{if(V(e,s)&&a.push({label:e.label}),W(e)){let{portal:n,mount:r,unmount:i}=p.find(e=>e.id===t),o={label:e.label,mountIcon:r,unmountIcon:i};"onClick"in e?o.onClick=e.onClick:"open"in e&&(o.open=e.open),a.push(o),u.push(n)}if(D(e)){let{portal:n,mount:r,unmount:i}=f.find(e=>e.id===t);a.push({label:e.label,href:e.href,mountIcon:r,unmountIcon:i}),u.push(n)}}),{customMenuItems:a,customMenuItemsPortals:u}},V=(e,t)=>{let{children:n,label:r,onClick:i,labelIcon:o}=e;return!n&&!i&&!o&&t.some(e=>e===r)},W=e=>{let{label:t,labelIcon:n,onClick:r,open:i}=e;return!!n&&!!t&&("function"==typeof r||"string"==typeof i)},D=e=>{let{label:t,href:n,labelIcon:r}=e;return!!n&&!!r&&!!t},F=e=>"mount"in e,B=e=>"open"in e,$=class extends y.PureComponent{constructor(){super(...arguments),this.portalRef=y.createRef()}componentDidUpdate(e){var t,n,r,i;if(!F(e)||!F(this.props))return;let o=(0,k.zu)(e.props,"customPages","customMenuItems","children"),s=(0,k.zu)(this.props.props,"customPages","customMenuItems","children"),l=(null==(t=o.customPages)?void 0:t.length)!==(null==(n=s.customPages)?void 0:n.length),a=(null==(r=o.customMenuItems)?void 0:r.length)!==(null==(i=s.customMenuItems)?void 0:i.length);(!(0,b.c1)(o,s)||l||a)&&this.props.updateProps({node:this.portalRef.current,props:this.props.props})}componentDidMount(){this.portalRef.current&&(F(this.props)&&this.props.mount(this.portalRef.current,this.props.props),B(this.props)&&this.props.open(this.props.props))}componentWillUnmount(){this.portalRef.current&&(F(this.props)&&this.props.unmount(this.portalRef.current),B(this.props)&&this.props.close())}render(){var e,t,n,r;return y.createElement(y.Fragment,null,y.createElement("div",{ref:this.portalRef}),F(this.props)&&(null==(t=null==(e=this.props)?void 0:e.customPagesPortals)?void 0:t.map((e,t)=>(0,y.createElement)(e,{key:t}))),F(this.props)&&(null==(r=null==(n=this.props)?void 0:n.customMenuItemsPortals)?void 0:r.map((e,t)=>(0,y.createElement)(e,{key:t}))))}},J=(0,c.r0)(({clerk:e,...t})=>y.createElement($,{mount:e.mountSignIn,unmount:e.unmountSignIn,updateProps:e.__unstable__updateProps,props:t}),"SignIn"),q=(0,c.r0)(({clerk:e,...t})=>y.createElement($,{mount:e.mountSignUp,unmount:e.unmountSignUp,updateProps:e.__unstable__updateProps,props:t}),"SignUp");function G({children:e}){return(0,k.yJ)(c.ge),y.createElement(y.Fragment,null,e)}function K({children:e}){return(0,k.yJ)(c.Mp),y.createElement(y.Fragment,null,e)}var Y=Object.assign((0,c.r0)(({clerk:e,...t})=>{let{customPages:n,customPagesPortals:r}=z(t.children);return y.createElement($,{mount:e.mountUserProfile,unmount:e.unmountUserProfile,updateProps:e.__unstable__updateProps,props:{...t,customPages:n},customPagesPortals:r})},"UserProfile"),{Page:G,Link:K});function Q({children:e}){return(0,k.yJ)(c.X),y.createElement(y.Fragment,null,e)}function H({children:e}){return(0,k.yJ)(c.B$),y.createElement(y.Fragment,null,e)}function X({children:e}){return(0,k.yJ)(c.qH),y.createElement(y.Fragment,null,e)}var Z=Object.assign((0,c.r0)(({clerk:e,...t})=>{let{customPages:n,customPagesPortals:r}=z(t.children),i=Object.assign(t.userProfileProps||{},{customPages:n}),{customMenuItems:o,customMenuItemsPortals:s}=x(t.children);return y.createElement($,{mount:e.mountUserButton,unmount:e.unmountUserButton,updateProps:e.__unstable__updateProps,props:{...t,userProfileProps:i,customMenuItems:o},customPagesPortals:r,customMenuItemsPortals:s})},"UserButton"),{UserProfilePage:G,UserProfileLink:K,MenuItems:Q,Action:H,Link:X});function ee({children:e}){return(0,k.yJ)(c.ej),y.createElement(y.Fragment,null,e)}function et({children:e}){return(0,k.yJ)(c.Rl),y.createElement(y.Fragment,null,e)}var en=Object.assign((0,c.r0)(({clerk:e,...t})=>{let{customPages:n,customPagesPortals:r}=L(t.children);return y.createElement($,{mount:e.mountOrganizationProfile,unmount:e.unmountOrganizationProfile,updateProps:e.__unstable__updateProps,props:{...t,customPages:n},customPagesPortals:r})},"OrganizationProfile"),{Page:ee,Link:et}),er=(0,c.r0)(({clerk:e,...t})=>y.createElement($,{mount:e.mountCreateOrganization,unmount:e.unmountCreateOrganization,updateProps:e.__unstable__updateProps,props:t}),"CreateOrganization"),ei=Object.assign((0,c.r0)(({clerk:e,...t})=>{let{customPages:n,customPagesPortals:r}=L(t.children),i=Object.assign(t.organizationProfileProps||{},{customPages:n});return y.createElement($,{mount:e.mountOrganizationSwitcher,unmount:e.unmountOrganizationSwitcher,updateProps:e.__unstable__updateProps,props:{...t,organizationProfileProps:i},customPagesPortals:r})},"OrganizationSwitcher"),{OrganizationProfilePage:ee,OrganizationProfileLink:et}),eo=(0,c.r0)(({clerk:e,...t})=>y.createElement($,{mount:e.mountOrganizationList,unmount:e.unmountOrganizationList,updateProps:e.__unstable__updateProps,props:t}),"OrganizationList"),es=(0,c.r0)(({clerk:e,...t})=>y.createElement($,{open:e.openGoogleOneTap,close:e.closeGoogleOneTap,props:t}),"GoogleOneTap"),el=(0,c.r0)(({clerk:e,children:t,...n})=>{let{signUpFallbackRedirectUrl:r,forceRedirectUrl:i,fallbackRedirectUrl:o,signUpForceRedirectUrl:s,mode:l,...a}=n,u=O(t=E(t,"Sign in"))("SignInButton"),c=()=>{let t={forceRedirectUrl:i,fallbackRedirectUrl:o,signUpFallbackRedirectUrl:r,signUpForceRedirectUrl:s};return"modal"===l?e.openSignIn(t):e.redirectToSignIn({...t,signInFallbackRedirectUrl:o,signInForceRedirectUrl:i})},d=async e=>(u&&"object"==typeof u&&"props"in u&&await j(u.props.onClick)(e),c()),h={...a,onClick:d};return y.cloneElement(u,h)},"SignInButton"),ea=(0,c.r0)(({clerk:e,children:t,...n})=>{let{fallbackRedirectUrl:r,forceRedirectUrl:i,signInFallbackRedirectUrl:o,signInForceRedirectUrl:s,mode:l,unsafeMetadata:a,...u}=n,c=O(t=E(t,"Sign up"))("SignUpButton"),d=()=>{let t={fallbackRedirectUrl:r,forceRedirectUrl:i,signInFallbackRedirectUrl:o,signInForceRedirectUrl:s,unsafeMetadata:a};return"modal"===l?e.openSignUp(t):e.redirectToSignUp({...t,signUpFallbackRedirectUrl:r,signUpForceRedirectUrl:i})},h=async e=>(c&&"object"==typeof c&&"props"in c&&await j(c.props.onClick)(e),d()),p={...u,onClick:h};return y.cloneElement(c,p)},"SignUpButton"),eu=(0,c.r0)(({clerk:e,children:t,...n})=>{let{redirectUrl:r="/",signOutOptions:i,...o}=n,s=O(t=E(t,"Sign out"))("SignOutButton"),l=()=>e.signOut({redirectUrl:r}),a=async e=>(await j(s.props.onClick)(e),l()),u={...o,onClick:a};return y.cloneElement(s,u)},"SignOutButton"),ec=(0,c.r0)(({clerk:e,children:t,...n})=>{let{redirectUrl:r,...i}=n,o=O(t=E(t,"Sign in with Metamask"))("SignInWithMetamaskButton"),s=async()=>{!async function(){await e.authenticateWithMetamask({redirectUrl:r||void 0})}()},l=async e=>(await j(o.props.onClick)(e),s()),a={...i,onClick:l};return y.cloneElement(o,a)},"SignInWithMetamask"),ed={name:"@clerk/clerk-react",version:"5.11.1",environment:"production"},eh=class e{constructor(e){f(this,a),this.clerkjs=null,this.preopenOneTap=null,this.preopenUserVerification=null,this.preopenSignIn=null,this.preopenSignUp=null,this.preopenUserProfile=null,this.preopenOrganizationProfile=null,this.preopenCreateOrganization=null,this.premountSignInNodes=new Map,this.premountSignUpNodes=new Map,this.premountUserProfileNodes=new Map,this.premountUserButtonNodes=new Map,this.premountOrganizationProfileNodes=new Map,this.premountCreateOrganizationNodes=new Map,this.premountOrganizationSwitcherNodes=new Map,this.premountOrganizationListNodes=new Map,this.premountMethodCalls=new Map,this.premountAddListenerCalls=new Map,this.loadedListeners=[],f(this,r,!1),f(this,i),f(this,o),f(this,s),this.buildSignInUrl=e=>{let t=()=>{var t;return(null==(t=this.clerkjs)?void 0:t.buildSignInUrl(e))||""};if(this.clerkjs&&p(this,r))return t();this.premountMethodCalls.set("buildSignInUrl",t)},this.buildSignUpUrl=e=>{let t=()=>{var t;return(null==(t=this.clerkjs)?void 0:t.buildSignUpUrl(e))||""};if(this.clerkjs&&p(this,r))return t();this.premountMethodCalls.set("buildSignUpUrl",t)},this.buildAfterSignInUrl=()=>{let e=()=>{var e;return(null==(e=this.clerkjs)?void 0:e.buildAfterSignInUrl())||""};if(this.clerkjs&&p(this,r))return e();this.premountMethodCalls.set("buildAfterSignInUrl",e)},this.buildAfterSignUpUrl=()=>{let e=()=>{var e;return(null==(e=this.clerkjs)?void 0:e.buildAfterSignUpUrl())||""};if(this.clerkjs&&p(this,r))return e();this.premountMethodCalls.set("buildAfterSignUpUrl",e)},this.buildAfterSignOutUrl=()=>{let e=()=>{var e;return(null==(e=this.clerkjs)?void 0:e.buildAfterSignOutUrl())||""};if(this.clerkjs&&p(this,r))return e();this.premountMethodCalls.set("buildAfterSignOutUrl",e)},this.buildAfterMultiSessionSingleSignOutUrl=()=>{let e=()=>{var e;return(null==(e=this.clerkjs)?void 0:e.buildAfterMultiSessionSingleSignOutUrl())||""};if(this.clerkjs&&p(this,r))return e();this.premountMethodCalls.set("buildAfterMultiSessionSingleSignOutUrl",e)},this.buildUserProfileUrl=()=>{let e=()=>{var e;return(null==(e=this.clerkjs)?void 0:e.buildUserProfileUrl())||""};if(this.clerkjs&&p(this,r))return e();this.premountMethodCalls.set("buildUserProfileUrl",e)},this.buildCreateOrganizationUrl=()=>{let e=()=>{var e;return(null==(e=this.clerkjs)?void 0:e.buildCreateOrganizationUrl())||""};if(this.clerkjs&&p(this,r))return e();this.premountMethodCalls.set("buildCreateOrganizationUrl",e)},this.buildOrganizationProfileUrl=()=>{let e=()=>{var e;return(null==(e=this.clerkjs)?void 0:e.buildOrganizationProfileUrl())||""};if(this.clerkjs&&p(this,r))return e();this.premountMethodCalls.set("buildOrganizationProfileUrl",e)},this.buildUrlWithAuth=e=>{let t=()=>{var t;return(null==(t=this.clerkjs)?void 0:t.buildUrlWithAuth(e))||""};if(this.clerkjs&&p(this,r))return t();this.premountMethodCalls.set("buildUrlWithAuth",t)},this.handleUnauthenticated=()=>{let e=()=>{var e;return null==(e=this.clerkjs)?void 0:e.handleUnauthenticated()};this.clerkjs&&p(this,r)?e():this.premountMethodCalls.set("handleUnauthenticated",e)},this.addOnLoaded=e=>{this.loadedListeners.push(e),this.loaded&&this.emitLoaded()},this.emitLoaded=()=>{this.loadedListeners.forEach(e=>e()),this.loadedListeners=[]},this.hydrateClerkJS=e=>{if(!e)throw Error("Failed to hydrate latest Clerk JS");return this.clerkjs=e,this.premountMethodCalls.forEach(e=>e()),this.premountAddListenerCalls.forEach((t,n)=>{t.nativeUnsubscribe=e.addListener(n)}),null!==this.preopenSignIn&&e.openSignIn(this.preopenSignIn),null!==this.preopenSignUp&&e.openSignUp(this.preopenSignUp),null!==this.preopenUserProfile&&e.openUserProfile(this.preopenUserProfile),null!==this.preopenUserVerification&&e.__experimental_openUserVerification(this.preopenUserVerification),null!==this.preopenOneTap&&e.openGoogleOneTap(this.preopenOneTap),null!==this.preopenOrganizationProfile&&e.openOrganizationProfile(this.preopenOrganizationProfile),null!==this.preopenCreateOrganization&&e.openCreateOrganization(this.preopenCreateOrganization),this.premountSignInNodes.forEach((t,n)=>{e.mountSignIn(n,t)}),this.premountSignUpNodes.forEach((t,n)=>{e.mountSignUp(n,t)}),this.premountUserProfileNodes.forEach((t,n)=>{e.mountUserProfile(n,t)}),this.premountUserButtonNodes.forEach((t,n)=>{e.mountUserButton(n,t)}),this.premountOrganizationListNodes.forEach((t,n)=>{e.mountOrganizationList(n,t)}),g(this,r,!0),this.emitLoaded(),this.clerkjs},this.__unstable__updateProps=async e=>{let t=await m(this,a,u).call(this);if(t&&"__unstable__updateProps"in t)return t.__unstable__updateProps(e)},this.setActive=({session:e,organization:t,beforeEmit:n})=>this.clerkjs?this.clerkjs.setActive({session:e,organization:t,beforeEmit:n}):Promise.reject(),this.openSignIn=e=>{this.clerkjs&&p(this,r)?this.clerkjs.openSignIn(e):this.preopenSignIn=e},this.closeSignIn=()=>{this.clerkjs&&p(this,r)?this.clerkjs.closeSignIn():this.preopenSignIn=null},this.__experimental_openUserVerification=e=>{this.clerkjs&&p(this,r)?this.clerkjs.__experimental_openUserVerification(e):this.preopenUserVerification=e},this.__experimental_closeUserVerification=()=>{this.clerkjs&&p(this,r)?this.clerkjs.__experimental_closeUserVerification():this.preopenUserVerification=null},this.openGoogleOneTap=e=>{this.clerkjs&&p(this,r)?this.clerkjs.openGoogleOneTap(e):this.preopenOneTap=e},this.closeGoogleOneTap=()=>{this.clerkjs&&p(this,r)?this.clerkjs.closeGoogleOneTap():this.preopenOneTap=null},this.openUserProfile=e=>{this.clerkjs&&p(this,r)?this.clerkjs.openUserProfile(e):this.preopenUserProfile=e},this.closeUserProfile=()=>{this.clerkjs&&p(this,r)?this.clerkjs.closeUserProfile():this.preopenUserProfile=null},this.openOrganizationProfile=e=>{this.clerkjs&&p(this,r)?this.clerkjs.openOrganizationProfile(e):this.preopenOrganizationProfile=e},this.closeOrganizationProfile=()=>{this.clerkjs&&p(this,r)?this.clerkjs.closeOrganizationProfile():this.preopenOrganizationProfile=null},this.openCreateOrganization=e=>{this.clerkjs&&p(this,r)?this.clerkjs.openCreateOrganization(e):this.preopenCreateOrganization=e},this.closeCreateOrganization=()=>{this.clerkjs&&p(this,r)?this.clerkjs.closeCreateOrganization():this.preopenCreateOrganization=null},this.openSignUp=e=>{this.clerkjs&&p(this,r)?this.clerkjs.openSignUp(e):this.preopenSignUp=e},this.closeSignUp=()=>{this.clerkjs&&p(this,r)?this.clerkjs.closeSignUp():this.preopenSignUp=null},this.mountSignIn=(e,t)=>{this.clerkjs&&p(this,r)?this.clerkjs.mountSignIn(e,t):this.premountSignInNodes.set(e,t)},this.unmountSignIn=e=>{this.clerkjs&&p(this,r)?this.clerkjs.unmountSignIn(e):this.premountSignInNodes.delete(e)},this.mountSignUp=(e,t)=>{this.clerkjs&&p(this,r)?this.clerkjs.mountSignUp(e,t):this.premountSignUpNodes.set(e,t)},this.unmountSignUp=e=>{this.clerkjs&&p(this,r)?this.clerkjs.unmountSignUp(e):this.premountSignUpNodes.delete(e)},this.mountUserProfile=(e,t)=>{this.clerkjs&&p(this,r)?this.clerkjs.mountUserProfile(e,t):this.premountUserProfileNodes.set(e,t)},this.unmountUserProfile=e=>{this.clerkjs&&p(this,r)?this.clerkjs.unmountUserProfile(e):this.premountUserProfileNodes.delete(e)},this.mountOrganizationProfile=(e,t)=>{this.clerkjs&&p(this,r)?this.clerkjs.mountOrganizationProfile(e,t):this.premountOrganizationProfileNodes.set(e,t)},this.unmountOrganizationProfile=e=>{this.clerkjs&&p(this,r)?this.clerkjs.unmountOrganizationProfile(e):this.premountOrganizationProfileNodes.delete(e)},this.mountCreateOrganization=(e,t)=>{this.clerkjs&&p(this,r)?this.clerkjs.mountCreateOrganization(e,t):this.premountCreateOrganizationNodes.set(e,t)},this.unmountCreateOrganization=e=>{this.clerkjs&&p(this,r)?this.clerkjs.unmountCreateOrganization(e):this.premountCreateOrganizationNodes.delete(e)},this.mountOrganizationSwitcher=(e,t)=>{this.clerkjs&&p(this,r)?this.clerkjs.mountOrganizationSwitcher(e,t):this.premountOrganizationSwitcherNodes.set(e,t)},this.unmountOrganizationSwitcher=e=>{this.clerkjs&&p(this,r)?this.clerkjs.unmountOrganizationSwitcher(e):this.premountOrganizationSwitcherNodes.delete(e)},this.mountOrganizationList=(e,t)=>{this.clerkjs&&p(this,r)?this.clerkjs.mountOrganizationList(e,t):this.premountOrganizationListNodes.set(e,t)},this.unmountOrganizationList=e=>{this.clerkjs&&p(this,r)?this.clerkjs.unmountOrganizationList(e):this.premountOrganizationListNodes.delete(e)},this.mountUserButton=(e,t)=>{this.clerkjs&&p(this,r)?this.clerkjs.mountUserButton(e,t):this.premountUserButtonNodes.set(e,t)},this.unmountUserButton=e=>{this.clerkjs&&p(this,r)?this.clerkjs.unmountUserButton(e):this.premountUserButtonNodes.delete(e)},this.addListener=e=>{if(this.clerkjs)return this.clerkjs.addListener(e);{let t=()=>{var t;let n=this.premountAddListenerCalls.get(e);n&&(null==(t=n.nativeUnsubscribe)||t.call(n),this.premountAddListenerCalls.delete(e))};return this.premountAddListenerCalls.set(e,{unsubscribe:t,nativeUnsubscribe:void 0}),t}},this.navigate=e=>{let t=()=>{var t;return null==(t=this.clerkjs)?void 0:t.navigate(e)};this.clerkjs&&p(this,r)?t():this.premountMethodCalls.set("navigate",t)},this.redirectWithAuth=async(...e)=>{let t=()=>{var t;return null==(t=this.clerkjs)?void 0:t.redirectWithAuth(...e)};if(this.clerkjs&&p(this,r))return t();this.premountMethodCalls.set("redirectWithAuth",t)},this.redirectToSignIn=async e=>{let t=()=>{var t;return null==(t=this.clerkjs)?void 0:t.redirectToSignIn(e)};if(this.clerkjs&&p(this,r))return t();this.premountMethodCalls.set("redirectToSignIn",t)},this.redirectToSignUp=async e=>{let t=()=>{var t;return null==(t=this.clerkjs)?void 0:t.redirectToSignUp(e)};if(this.clerkjs&&p(this,r))return t();this.premountMethodCalls.set("redirectToSignUp",t)},this.redirectToUserProfile=async()=>{let e=()=>{var e;return null==(e=this.clerkjs)?void 0:e.redirectToUserProfile()};if(this.clerkjs&&p(this,r))return e();this.premountMethodCalls.set("redirectToUserProfile",e)},this.redirectToAfterSignUp=()=>{let e=()=>{var e;return null==(e=this.clerkjs)?void 0:e.redirectToAfterSignUp()};if(this.clerkjs&&p(this,r))return e();this.premountMethodCalls.set("redirectToAfterSignUp",e)},this.redirectToAfterSignIn=()=>{let e=()=>{var e;return null==(e=this.clerkjs)?void 0:e.redirectToAfterSignIn()};this.clerkjs&&p(this,r)?e():this.premountMethodCalls.set("redirectToAfterSignIn",e)},this.redirectToAfterSignOut=()=>{let e=()=>{var e;return null==(e=this.clerkjs)?void 0:e.redirectToAfterSignOut()};this.clerkjs&&p(this,r)?e():this.premountMethodCalls.set("redirectToAfterSignOut",e)},this.redirectToOrganizationProfile=async()=>{let e=()=>{var e;return null==(e=this.clerkjs)?void 0:e.redirectToOrganizationProfile()};if(this.clerkjs&&p(this,r))return e();this.premountMethodCalls.set("redirectToOrganizationProfile",e)},this.redirectToCreateOrganization=async()=>{let e=()=>{var e;return null==(e=this.clerkjs)?void 0:e.redirectToCreateOrganization()};if(this.clerkjs&&p(this,r))return e();this.premountMethodCalls.set("redirectToCreateOrganization",e)},this.handleRedirectCallback=e=>{var t;let n=()=>{var t;return null==(t=this.clerkjs)?void 0:t.handleRedirectCallback(e)};this.clerkjs&&p(this,r)?null==(t=n())||t.catch(()=>{}):this.premountMethodCalls.set("handleRedirectCallback",n)},this.handleGoogleOneTapCallback=(e,t)=>{var n;let i=()=>{var n;return null==(n=this.clerkjs)?void 0:n.handleGoogleOneTapCallback(e,t)};this.clerkjs&&p(this,r)?null==(n=i())||n.catch(()=>{}):this.premountMethodCalls.set("handleGoogleOneTapCallback",i)},this.handleEmailLinkVerification=async e=>{let t=()=>{var t;return null==(t=this.clerkjs)?void 0:t.handleEmailLinkVerification(e)};if(this.clerkjs&&p(this,r))return t();this.premountMethodCalls.set("handleEmailLinkVerification",t)},this.authenticateWithMetamask=async e=>{let t=()=>{var t;return null==(t=this.clerkjs)?void 0:t.authenticateWithMetamask(e)};if(this.clerkjs&&p(this,r))return t();this.premountMethodCalls.set("authenticateWithMetamask",t)},this.authenticateWithCoinbaseWallet=async e=>{let t=()=>{var t;return null==(t=this.clerkjs)?void 0:t.authenticateWithCoinbaseWallet(e)};if(this.clerkjs&&p(this,r))return t();this.premountMethodCalls.set("authenticateWithCoinbaseWallet",t)},this.authenticateWithWeb3=async e=>{let t=()=>{var t;return null==(t=this.clerkjs)?void 0:t.authenticateWithWeb3(e)};if(this.clerkjs&&p(this,r))return t();this.premountMethodCalls.set("authenticateWithWeb3",t)},this.authenticateWithGoogleOneTap=async e=>(await m(this,a,u).call(this)).authenticateWithGoogleOneTap(e),this.createOrganization=async e=>{let t=()=>{var t;return null==(t=this.clerkjs)?void 0:t.createOrganization(e)};if(this.clerkjs&&p(this,r))return t();this.premountMethodCalls.set("createOrganization",t)},this.getOrganization=async e=>{let t=()=>{var t;return null==(t=this.clerkjs)?void 0:t.getOrganization(e)};if(this.clerkjs&&p(this,r))return t();this.premountMethodCalls.set("getOrganization",t)},this.signOut=async(e,t)=>{let n=()=>{var n;return null==(n=this.clerkjs)?void 0:n.signOut(e,t)};if(this.clerkjs&&p(this,r))return n();this.premountMethodCalls.set("signOut",n)};let{Clerk:t=null,publishableKey:n}=e||{};g(this,s,n),g(this,o,null==e?void 0:e.proxyUrl),g(this,i,null==e?void 0:e.domain),this.options=e,this.Clerk=t,this.mode=(0,P._f)()?"browser":"server",this.options.sdkMetadata||(this.options.sdkMetadata=ed),this.loadClerkJS()}get publishableKey(){return p(this,s)}get loaded(){return p(this,r)}static getOrCreateInstance(t){return(0,P._f)()&&p(this,l)&&(!t.Clerk||p(this,l).Clerk===t.Clerk)||g(this,l,new e(t)),p(this,l)}static clearInstance(){g(this,l,null)}get domain(){return"undefined"!=typeof window&&window.location?C(p(this,i),new URL(window.location.href),""):"function"==typeof p(this,i)?c.RM.throw(c.qq):p(this,i)||""}get proxyUrl(){return"undefined"!=typeof window&&window.location?C(p(this,o),new URL(window.location.href),""):"function"==typeof p(this,o)?c.RM.throw(c.qq):p(this,o)||""}get sdkMetadata(){var e;return(null==(e=this.clerkjs)?void 0:e.sdkMetadata)||this.options.sdkMetadata||void 0}get instanceType(){var e;return null==(e=this.clerkjs)?void 0:e.instanceType}get frontendApi(){var e;return(null==(e=this.clerkjs)?void 0:e.frontendApi)||""}get isStandardBrowser(){var e;return(null==(e=this.clerkjs)?void 0:e.isStandardBrowser)||this.options.standardBrowser||!1}get isSatellite(){return"undefined"!=typeof window&&window.location?C(this.options.isSatellite,new URL(window.location.href),!1):"function"==typeof this.options.isSatellite&&c.RM.throw(c.qq)}async loadClerkJS(){var e,t;if(!("browser"!==this.mode||p(this,r))){"undefined"!=typeof window&&(window.__clerk_publishable_key=p(this,s),window.__clerk_proxy_url=this.proxyUrl,window.__clerk_domain=this.domain);try{if(this.Clerk){let e;(t=this.Clerk,"function"==typeof t)?(e=new this.Clerk(p(this,s),{proxyUrl:this.proxyUrl,domain:this.domain}),await e.load(this.options)):(e=this.Clerk).loaded||await e.load(this.options),global.Clerk=e}else{if(global.Clerk||await (0,v.YJ)({...this.options,publishableKey:p(this,s),proxyUrl:this.proxyUrl,domain:this.domain,nonce:this.options.nonce}),!global.Clerk)throw Error("Failed to download latest ClerkJS. Contact support@clerk.com.");await global.Clerk.load(this.options)}if(null==(e=global.Clerk)?void 0:e.loaded)return this.hydrateClerkJS(global.Clerk);return}catch(e){console.error(e.stack||e.message||e);return}}}get version(){var e;return null==(e=this.clerkjs)?void 0:e.version}get client(){return this.clerkjs?this.clerkjs.client:void 0}get session(){return this.clerkjs?this.clerkjs.session:void 0}get user(){return this.clerkjs?this.clerkjs.user:void 0}get organization(){return this.clerkjs?this.clerkjs.organization:void 0}get telemetry(){return this.clerkjs?this.clerkjs.telemetry:void 0}get __unstable__environment(){return this.clerkjs?this.clerkjs.__unstable__environment:void 0}__unstable__setEnvironment(...e){this.clerkjs&&"__unstable__setEnvironment"in this.clerkjs&&this.clerkjs.__unstable__setEnvironment(e)}};r=new WeakMap,i=new WeakMap,o=new WeakMap,s=new WeakMap,l=new WeakMap,a=new WeakSet,u=function(){return new Promise(e=>{this.addOnLoaded(()=>e(this.clerkjs))})},f(eh,l);var ep=(e,t,n)=>!e&&n?ef(n):eg(t),ef=e=>{let t=e.userId,n=e.user,r=e.sessionId,i=e.session,o=e.organization,s=e.orgId,l=e.orgRole,a=e.orgPermissions;return{userId:t,user:n,sessionId:r,session:i,organization:o,orgId:s,orgRole:l,orgPermissions:a,orgSlug:e.orgSlug,actor:e.actor,__experimental_factorVerificationAge:e.__experimental_factorVerificationAge}},eg=e=>{var t;let n=e.user?e.user.id:e.user,r=e.user,i=e.session?e.session.id:e.session,o=e.session,s=e.session?e.session.__experimental_factorVerificationAge:null,l=null==o?void 0:o.actor,a=e.organization,u=e.organization?e.organization.id:e.organization,c=null==a?void 0:a.slug,d=a?null==(t=null==r?void 0:r.organizationMemberships)?void 0:t.find(e=>e.organization.id===u):a,h=d?d.permissions:d;return{userId:n,user:r,sessionId:i,session:o,organization:a,orgId:u,orgRole:d?d.role:d,orgSlug:c,orgPermissions:h,actor:l,__experimental_factorVerificationAge:s}};function em(e){let{isomorphicClerkOptions:t,initialState:n,children:r}=e,{isomorphicClerk:i,loaded:o}=ev(t),[s,l]=y.useState({client:i.client,session:i.session,user:i.user,organization:i.organization});y.useEffect(()=>i.addListener(e=>l({...e})),[]);let a=ep(o,s,n),u=y.useMemo(()=>({value:i}),[o]),d=y.useMemo(()=>({value:s.client}),[s.client]),{sessionId:h,session:p,userId:f,user:g,orgId:m,actor:v,organization:k,orgRole:w,orgSlug:S,orgPermissions:P,__experimental_factorVerificationAge:C}=a,O=y.useMemo(()=>({value:{sessionId:h,userId:f,actor:v,orgId:m,orgRole:w,orgSlug:S,orgPermissions:P,__experimental_factorVerificationAge:C}}),[h,f,v,m,w,S,C]),E=y.useMemo(()=>({value:p}),[h,p]),j=y.useMemo(()=>({value:g}),[f,g]),U=y.useMemo(()=>({value:{organization:k}}),[m,k]);return y.createElement(c.iz.Provider,{value:u},y.createElement(b.RY.Provider,{value:d},y.createElement(b.B3.Provider,{value:E},y.createElement(b.f0,{...U.value},y.createElement(c.Vo.Provider,{value:O},y.createElement(b.St.Provider,{value:j},r))))))}var ev=e=>{let[t,n]=y.useState(!1),r=y.useMemo(()=>eh.getOrCreateInstance(e),[]);return y.useEffect(()=>{r.__unstable__updateProps({appearance:e.appearance})},[e.appearance]),y.useEffect(()=>{r.__unstable__updateProps({options:e})},[e.localization]),y.useEffect(()=>{r.addOnLoaded(()=>n(!0))},[]),y.useEffect(()=>()=>{eh.clearInstance()},[]),{isomorphicClerk:r,loaded:t}},ek=function(e,t,n){let r=e.displayName||e.name||t||"Component",i=r=>(!function(e,t,n=1){y.useEffect(()=>{let r=U.get(e)||0;return r==n?c.RM.throw(t):(U.set(e,r+1),()=>{U.set(e,(U.get(e)||1)-1)})},[])}(t,n),y.createElement(e,{...r}));return i.displayName=`withMaxAllowedInstancesGuard(${r})`,i}(function(e){let{initialState:t,children:n,...r}=e,{publishableKey:i="",Clerk:o}=r;return o||(i?i&&!(0,S.x9)(i)&&c.RM.throwInvalidPublishableKeyError({key:i}):c.RM.throwMissingPublishableKeyError()),y.createElement(em,{initialState:t,isomorphicClerkOptions:r},n)},"ClerkProvider",c.KQ);ek.displayName="ClerkProvider",(0,c.JM)({packageName:"@clerk/clerk-react"}),(0,v.Aw)("@clerk/clerk-react")},69198:function(e,t,n){n.d(t,{iv:function(){return m},wE:function(){return g},YJ:function(){return f},Aw:function(){return p}});var r=(e,t="5.26.5")=>{if(e)return e;let n=i(t);return n?"snapshot"===n?"5.26.5":n:o(t)},i=e=>{var t;return null==(t=e.trim().replace(/^v/,"").match(/-(.+?)(\.|$)/))?void 0:t[1]},o=e=>e.trim().replace(/^v/,"").split(".")[0];function s(e){return e.startsWith("/")}async function l(e="",t){let{async:n,defer:r,beforeLoad:i,crossOrigin:o,nonce:s}=t||{};return new Promise((t,l)=>{e||l("loadScript cannot be called without a src"),document&&document.body||l("loadScript cannot be called when document does not exist");let a=document.createElement("script");o&&a.setAttribute("crossorigin",o),a.async=n||!1,a.defer=r||!1,a.addEventListener("load",()=>{a.remove(),t(a)}),a.addEventListener("error",()=>{a.remove(),l()}),a.src=e,a.nonce=s,null==i||i(a),document.body.appendChild(a)})}var a=n(39825),u=n(82774),c="Clerk: Failed to load Clerk",{isDevOrStagingUrl:d}=(0,u.MY)(),h=(0,a.t5)({packageName:"@clerk/shared"});function p(e){h.setPackageName({packageName:e})}var f=async e=>{let t=document.querySelector("script[data-clerk-js-script]");if(t)return new Promise((e,n)=>{t.addEventListener("load",()=>{e(t)}),t.addEventListener("error",()=>{n(c)})});if(!(null==e?void 0:e.publishableKey)){h.throwMissingPublishableKeyError();return}return l(g(e),{async:!0,crossOrigin:"anonymous",nonce:e.nonce,beforeLoad:v(e)}).catch(()=>{throw Error(c)})},g=e=>{var t,n;let{clerkJSUrl:i,clerkJSVariant:o,clerkJSVersion:l,proxyUrl:a,domain:c,publishableKey:h}=e;if(i)return i;let p="";p=a&&(!a||/^http(s)?:\/\//.test(a||"")||s(a))?(a?s(a)?new URL(a,window.location.origin).toString():a:"").replace(/http(s)?:\/\//,""):c&&!d((null==(t=(0,u.nQ)(h))?void 0:t.frontendApi)||"")?function(e){let t;if(!e)return"";if(e.match(/^(clerk\.)+\w*$/))t=/(clerk\.)*(?=clerk\.)/;else{if(e.match(/\.clerk.accounts/))return e;t=/^(clerk\.)*/gi}let n=e.replace(t,"");return`clerk.${n}`}(c):(null==(n=(0,u.nQ)(h))?void 0:n.frontendApi)||"";let f=o?`${o.replace(/\.+$/,"")}.`:"",g=r(l);return`https://${p}/npm/@clerk/clerk-js@${g}/dist/clerk.${f}browser.js`},m=e=>{let t={};return e.publishableKey&&(t["data-clerk-publishable-key"]=e.publishableKey),e.proxyUrl&&(t["data-clerk-proxy-url"]=e.proxyUrl),e.domain&&(t["data-clerk-domain"]=e.domain),e.nonce&&(t.nonce=e.nonce),t},v=e=>t=>{let n=m(e);for(let e in n)t.setAttribute(e,n[e])}},98071:function(e,t,n){n.d(t,{U9:function(){return f},ac:function(){return h},qx:function(){return p},r2:function(){return a},yA:function(){return c}});var r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,l=e=>{throw TypeError(e)},a=(e,t)=>{for(var n in t)r(e,n,{get:t[n],enumerable:!0})},u=(e,t,n,l)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let a of o(t))s.call(e,a)||a===n||r(e,a,{get:()=>t[a],enumerable:!(l=i(t,a))||l.enumerable});return e},c=(e,t,n)=>(u(e,t,"default"),n&&u(n,t,"default")),d=(e,t,n)=>t.has(e)||l("Cannot "+n),h=(e,t,n)=>(d(e,t,"read from private field"),n?n.call(e):t.get(e)),p=(e,t,n,r)=>(d(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),f=(e,t,n)=>(d(e,t,"access private method"),n)},42660:function(e,t,n){n.d(t,{Fo:function(){return l},Iq:function(){return a},Xv:function(){return u},cM:function(){return s},iF:function(){return o},mv:function(){return r},vO:function(){return i}});var r=[".lcl.dev",".lclstage.dev",".lclclerk.com"],i=[".lcl.dev",".stg.dev",".lclstage.dev",".stgstage.dev",".dev.lclclerk.com",".stg.lclclerk.com",".accounts.lclclerk.com","accountsstage.dev","accounts.dev"],o=[".lcl.dev","lclstage.dev",".lclclerk.com",".accounts.lclclerk.com"],s=[".accountsstage.dev"],l="https://api.lclclerk.com",a="https://api.clerkstage.dev",u="https://api.clerk.com"},82774:function(e,t,n){n.d(t,{MY:function(){return a},x9:function(){return l},nQ:function(){return s}});var r=e=>"undefined"!=typeof atob&&"function"==typeof atob?atob(e):"undefined"!=typeof global&&global.Buffer?new global.Buffer(e,"base64").toString():e,i=n(42660),o="pk_live_";function s(e,t={}){if(!(e=e||"")||!l(e)){if(t.fatal)throw Error("Publishable key not valid.");return null}let n=e.startsWith(o)?"production":"development",i=r(e.split("_")[2]);return i=i.slice(0,-1),t.proxyUrl?i=t.proxyUrl:"development"!==n&&t.domain&&(i=`clerk.${t.domain}`),{instanceType:n,frontendApi:i}}function l(e){let t=(e=e||"").startsWith(o)||e.startsWith("pk_test_"),n=r(e.split("_")[2]||"").endsWith("$");return t&&n}function a(){let e=new Map;return{isDevOrStagingUrl:t=>{if(!t)return!1;let n="string"==typeof t?t:t.hostname,r=e.get(n);return void 0===r&&(r=i.vO.some(e=>n.endsWith(e)),e.set(n,r)),r}}}},39982:function(e,t,n){function r(){return"undefined"!=typeof window}n.d(t,{_f:function(){return r}}),RegExp("bot|spider|crawl|APIs-Google|AdsBot|Googlebot|mediapartners|Google Favicon|FeedFetcher|Google-Read-Aloud|DuplexWeb-Google|googleweblight|bing|yandex|baidu|duckduck|yahoo|ecosia|ia_archiver|facebook|instagram|pinterest|reddit|slack|twitter|whatsapp|youtube|semrush","i")},9656:function(e,t,n){n.d(t,{fQ:function(){return i}});var r=e=>{let t=n=>{if(!n)return n;if(Array.isArray(n))return n.map(e=>"object"==typeof e||Array.isArray(e)?t(e):e);let r={...n};for(let n of Object.keys(r)){let i=e(n.toString());i!==n&&(r[i]=r[n],delete r[n]),"object"==typeof r[i]&&(r[i]=t(r[i]))}return r};return t};function i(e){if("boolean"==typeof e)return e;if(null==e)return!1;if("string"==typeof e){if("true"===e.toLowerCase())return!0;if("false"===e.toLowerCase())return!1}let t=parseInt(e,10);return!isNaN(t)&&t>0}r(function(e){return e?e.replace(/[A-Z]/g,e=>`_${e.toLowerCase()}`):""}),r(function(e){return e?e.replace(/([-_][a-z])/g,e=>e.toUpperCase().replace(/-|_/,"")):""})},39825:function(e,t,n){n.d(t,{t5:function(){return i}});var r=Object.freeze({InvalidProxyUrlErrorMessage:"The proxyUrl passed to Clerk is invalid. The expected value for proxyUrl is an absolute URL or a relative path with a leading '/'. (key={{url}})",InvalidPublishableKeyErrorMessage:"The publishableKey passed to Clerk is invalid. You can get your Publishable key at https://dashboard.clerk.com/last-active?path=api-keys. (key={{key}})",MissingPublishableKeyErrorMessage:"Missing publishableKey. You can get your key at https://dashboard.clerk.com/last-active?path=api-keys.",MissingSecretKeyErrorMessage:"Missing secretKey. You can get your key at https://dashboard.clerk.com/last-active?path=api-keys.",MissingClerkProvider:"{{source}} can only be used within the <ClerkProvider /> component. Learn more: https://clerk.com/docs/components/clerk-provider"});function i({packageName:e,customMessages:t}){let n=e,i={...r,...t};function o(e,t){if(!t)return`${n}: ${e}`;let r=e;for(let n of e.matchAll(/{{([a-zA-Z0-9-_]+)}}/g)){let e=(t[n[1]]||"").toString();r=r.replace(`{{${n[1]}}}`,e)}return`${n}: ${r}`}return{setPackageName({packageName:e}){return"string"==typeof e&&(n=e),this},setMessages({customMessages:e}){return Object.assign(i,e||{}),this},throwInvalidPublishableKeyError(e){throw Error(o(i.InvalidPublishableKeyErrorMessage,e))},throwInvalidProxyUrl(e){throw Error(o(i.InvalidProxyUrlErrorMessage,e))},throwMissingPublishableKeyError(){throw Error(o(i.MissingPublishableKeyErrorMessage))},throwMissingSecretKeyError(){throw Error(o(i.MissingSecretKeyErrorMessage))},throwMissingClerkProviderError(e){throw Error(o(i.MissingClerkProvider,e))},throw(e){throw Error(o(e))}}}},66511:function(e,t,n){n.d(t,{J:function(){return r}});function r(e,t){return{event:"METHOD_CALLED",payload:{method:e,...t}}}},9817:function(e,t,n){n.d(t,{t5:function(){return r.t5}});var r=n(39825);n(98071)},30022:function(e,t,n){n.d(t,{rx:function(){return o},yJ:function(){return s},zu:function(){return r}});var r=(e,...t)=>{let n={...e};for(let e of t)delete n[e];return n};n(9656),n(69198);var i=()=>!1,o=()=>{try{return!0}catch(e){}return!1};n(39825),Object.freeze({"image/png":"png","image/jpeg":"jpg","image/gif":"gif","image/webp":"webp","image/x-icon":"ico","image/vnd.microsoft.icon":"ico"}),n(39982),n(98071);var s=e=>{i()&&console.error(`Clerk: ${e}`)}},54076:function(e,t,n){n.d(t,{Aw:function(){return r.Aw},YJ:function(){return r.YJ},iv:function(){return r.iv},wE:function(){return r.wE}});var r=n(69198);n(39825),n(98071)},69455:function(e,t,n){let r;n.d(t,{b5:function(){return eb},RY:function(){return eP},f0:function(){return e_},B3:function(){return eO},St:function(){return ew},uH:function(){return ev},c1:function(){return eq},Rm:function(){return eM},cL:function(){return eF},rI:function(){return ey},sX:function(){return eC},o8:function(){return eA},eW:function(){return eN},kP:function(){return eV},xo:function(){return eW},aF:function(){return eD}});var i={};n.r(i),n.d(i,{SWRConfig:function(){return ea},default:function(){return eu},mutate:function(){return J},preload:function(){return et},unstable_serialize:function(){return eo},useSWRConfig:function(){return ee}});var o=n(66511),s=n(98071),l=n(2265),a=n(42552);let u=()=>{},c=u(),d=Object,h=e=>e===c,p=e=>"function"==typeof e,f=(e,t)=>({...e,...t}),g=e=>p(e.then),m=new WeakMap,v=0,k=e=>{let t,n;let r=typeof e,i=e&&e.constructor,o=i==Date;if(d(e)!==e||o||i==RegExp)t=o?e.toJSON():"symbol"==r?e.toString():"string"==r?JSON.stringify(e):""+e;else{if(t=m.get(e))return t;if(t=++v+"~",m.set(e,t),i==Array){for(n=0,t="@";n<e.length;n++)t+=k(e[n])+",";m.set(e,t)}if(i==d){t="#";let r=d.keys(e).sort();for(;!h(n=r.pop());)h(e[n])||(t+=n+":"+k(e[n])+",");m.set(e,t)}}return t},b=new WeakMap,y={},w={},S="undefined",P=typeof window!=S,C=typeof document!=S,O=()=>P&&typeof window.requestAnimationFrame!=S,E=(e,t)=>{let n=b.get(e);return[()=>!h(t)&&e.get(t)||y,r=>{if(!h(t)){let i=e.get(t);t in w||(w[t]=i),n[5](t,f(i,r),i||y)}},n[6],()=>!h(t)&&t in w?w[t]:!h(t)&&e.get(t)||y]},j=!0,[U,_]=P&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[u,u],M={initFocus:e=>(C&&document.addEventListener("visibilitychange",e),U("focus",e),()=>{C&&document.removeEventListener("visibilitychange",e),_("focus",e)}),initReconnect:e=>{let t=()=>{j=!0,e()},n=()=>{j=!1};return U("online",t),U("offline",n),()=>{_("online",t),_("offline",n)}}},z=!l.useId,L=!P||"Deno"in window,I=e=>O()?window.requestAnimationFrame(e):setTimeout(e,1),R=L?l.useEffect:l.useLayoutEffect,T="undefined"!=typeof navigator&&navigator.connection,A=!L&&T&&(["slow-2g","2g"].includes(T.effectiveType)||T.saveData),x=e=>{if(p(e))try{e=e()}catch(t){e=""}let t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?k(e):"",t]},N=0,V=()=>++N;var W={ERROR_REVALIDATE_EVENT:3,FOCUS_EVENT:0,MUTATE_EVENT:2,RECONNECT_EVENT:1};async function D(...e){let[t,n,r,i]=e,o=f({populateCache:!0,throwOnError:!0},"boolean"==typeof i?{revalidate:i}:i||{}),s=o.populateCache,l=o.rollbackOnError,a=o.optimisticData,u=e=>"function"==typeof l?l(e):!1!==l,d=o.throwOnError;if(p(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(m))}return m(n);async function m(n){let i;let[l]=x(n);if(!l)return;let[f,m]=E(t,l),[v,k,y,w]=b.get(t),S=()=>{let e=v[l];return(p(o.revalidate)?o.revalidate(f().data,n):!1!==o.revalidate)&&(delete y[l],delete w[l],e&&e[0])?e[0](2).then(()=>f().data):f().data};if(e.length<3)return S();let P=r,C=V();k[l]=[C,0];let O=!h(a),j=f(),U=j.data,_=j._c,M=h(_)?U:_;if(O&&m({data:a=p(a)?a(M,U):a,_c:M}),p(P))try{P=P(M)}catch(e){i=e}if(P&&g(P)){if(P=await P.catch(e=>{i=e}),C!==k[l][0]){if(i)throw i;return P}i&&O&&u(i)&&(s=!0,m({data:M,_c:c}))}if(s&&!i&&(p(s)?m({data:s(P,M),error:c,_c:c}):m({data:P,error:c,_c:c})),k[l][1]=V(),Promise.resolve(S()).then(()=>{m({_c:c})}),i){if(d)throw i;return}return P}}let F=(e,t)=>{for(let n in e)e[n][0]&&e[n][0](t)},B=(e,t)=>{if(!b.has(e)){let n=f(M,t),r={},i=D.bind(c,e),o=u,s={},l=(e,t)=>{let n=s[e]||[];return s[e]=n,n.push(t),()=>n.splice(n.indexOf(t),1)},a=(t,n,r)=>{e.set(t,n);let i=s[t];if(i)for(let e of i)e(n,r)},d=()=>{if(!b.has(e)&&(b.set(e,[r,{},{},{},i,a,l]),!L)){let t=n.initFocus(setTimeout.bind(c,F.bind(c,r,0))),i=n.initReconnect(setTimeout.bind(c,F.bind(c,r,1)));o=()=>{t&&t(),i&&i(),b.delete(e)}}};return d(),[e,i,d,o]}return[e,b.get(e)[4]]},[$,J]=B(new Map),q=f({onLoadingSlow:u,onSuccess:u,onError:u,onErrorRetry:(e,t,n,r,i)=>{let o=n.errorRetryCount,s=i.retryCount,l=~~((Math.random()+.5)*(1<<(s<8?s:8)))*n.errorRetryInterval;(h(o)||!(s>o))&&setTimeout(r,l,i)},onDiscarded:u,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:A?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:A?5e3:3e3,compare:(e,t)=>k(e)==k(t),isPaused:()=>!1,cache:$,mutate:J,fallback:{}},{isOnline:()=>j,isVisible:()=>{let e=C&&document.visibilityState;return h(e)||"hidden"!==e}}),G=(e,t)=>{let n=f(e,t);if(t){let{use:r,fallback:i}=e,{use:o,fallback:s}=t;r&&o&&(n.use=r.concat(o)),i&&s&&(n.fallback=f(i,s))}return n},K=(0,l.createContext)({}),Y=e=>{let{value:t}=e,n=(0,l.useContext)(K),r=p(t),i=(0,l.useMemo)(()=>r?t(n):t,[r,n,t]),o=(0,l.useMemo)(()=>r?i:G(n,i),[r,n,i]),s=i&&i.provider,a=(0,l.useRef)(c);s&&!a.current&&(a.current=B(s(o.cache||$),i));let u=a.current;return u&&(o.cache=u[0],o.mutate=u[1]),R(()=>{if(u)return u[2]&&u[2](),u[3]},[]),(0,l.createElement)(K.Provider,f(e,{value:o}))},Q="$inf$",H=P&&window.__SWR_DEVTOOLS_USE__,X=H?window.__SWR_DEVTOOLS_USE__:[],Z=e=>p(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}],ee=()=>f(q,(0,l.useContext)(K)),et=(e,t)=>{let[n,r]=x(e),[,,,i]=b.get($);if(i[n])return i[n];let o=t(r);return i[n]=o,o},en=X.concat(e=>(t,n,r)=>{let i=n&&((...e)=>{let[r]=x(t),[,,,i]=b.get($);if(r.startsWith(Q))return n(...e);let o=i[r];return h(o)?n(...e):(delete i[r],o)});return e(t,i,r)}),er=e=>function(...t){let n=ee(),[r,i,o]=Z(t),s=G(n,o),l=e,{use:a}=s,u=(a||[]).concat(en);for(let e=u.length;e--;)l=u[e](l);return l(r,i||s.fetcher||null,s)},ei=(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())}};H&&(window.__SWR_DEVTOOLS_REACT__=l);let eo=e=>x(e)[0],es=l.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;if("rejected"===e.status)throw e.reason;throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}),el={dedupe:!0},ea=d.defineProperty(Y,"defaultValue",{value:q}),eu=er((e,t,n)=>{let{cache:r,compare:i,suspense:o,fallbackData:s,revalidateOnMount:u,revalidateIfStale:d,refreshInterval:g,refreshWhenHidden:m,refreshWhenOffline:v,keepPreviousData:k}=n,[y,w,S,P]=b.get(r),[C,O]=x(e),j=(0,l.useRef)(!1),U=(0,l.useRef)(!1),_=(0,l.useRef)(C),M=(0,l.useRef)(t),T=(0,l.useRef)(n),A=()=>T.current,N=()=>A().isVisible()&&A().isOnline(),[F,B,$,J]=E(r,C),q=(0,l.useRef)({}).current,G=h(s)?n.fallback[C]:s,K=(e,t)=>{for(let n in q)if("data"===n){if(!i(e[n],t[n])&&(!h(e[n])||!i(er,t[n])))return!1}else if(t[n]!==e[n])return!1;return!0},Y=(0,l.useMemo)(()=>{let e=!!C&&!!t&&(h(u)?!A().isPaused()&&!o&&(!!h(d)||d):u),n=t=>{let n=f(t);return(delete n._k,e)?{isValidating:!0,isLoading:!0,...n}:n},r=F(),i=J(),s=n(r),l=r===i?s:n(i),a=s;return[()=>{let e=n(F());return K(e,a)?(a.data=e.data,a.isLoading=e.isLoading,a.isValidating=e.isValidating,a.error=e.error,a):(a=e,e)},()=>l]},[r,C]),Q=(0,a.useSyncExternalStore)((0,l.useCallback)(e=>$(C,(t,n)=>{K(n,t)||e()}),[r,C]),Y[0],Y[1]),H=!j.current,X=y[C]&&y[C].length>0,Z=Q.data,ee=h(Z)?G:Z,et=Q.error,en=(0,l.useRef)(ee),er=k?h(Z)?en.current:Z:ee,eo=(!X||!!h(et))&&(H&&!h(u)?u:!A().isPaused()&&(o?!h(ee)&&d:h(ee)||d)),ea=!!(C&&t&&H&&eo),eu=h(Q.isValidating)?ea:Q.isValidating,ec=h(Q.isLoading)?ea:Q.isLoading,ed=(0,l.useCallback)(async e=>{let t,r;let o=M.current;if(!C||!o||U.current||A().isPaused())return!1;let s=!0,l=e||{},a=!S[C]||!l.dedupe,u=()=>z?!U.current&&C===_.current&&j.current:C===_.current,d={isValidating:!1,isLoading:!1},f=()=>{B(d)},g=()=>{let e=S[C];e&&e[1]===r&&delete S[C]},m={isValidating:!0};h(F().data)&&(m.isLoading=!0);try{if(a&&(B(m),n.loadingTimeout&&h(F().data)&&setTimeout(()=>{s&&u()&&A().onLoadingSlow(C,n)},n.loadingTimeout),S[C]=[o(O),V()]),[t,r]=S[C],t=await t,a&&setTimeout(g,n.dedupingInterval),!S[C]||S[C][1]!==r)return a&&u()&&A().onDiscarded(C),!1;d.error=c;let e=w[C];if(!h(e)&&(r<=e[0]||r<=e[1]||0===e[1]))return f(),a&&u()&&A().onDiscarded(C),!1;let l=F().data;d.data=i(l,t)?l:t,a&&u()&&A().onSuccess(t,C,n)}catch(n){g();let e=A(),{shouldRetryOnError:t}=e;!e.isPaused()&&(d.error=n,a&&u()&&(e.onError(n,C,e),(!0===t||p(t)&&t(n))&&(!A().revalidateOnFocus||!A().revalidateOnReconnect||N())&&e.onErrorRetry(n,C,e,e=>{let t=y[C];t&&t[0]&&t[0](W.ERROR_REVALIDATE_EVENT,e)},{retryCount:(l.retryCount||0)+1,dedupe:!0})))}return s=!1,f(),!0},[C,r]),eh=(0,l.useCallback)((...e)=>D(r,_.current,...e),[]);if(R(()=>{M.current=t,T.current=n,h(Z)||(en.current=Z)}),R(()=>{if(!C)return;let e=ed.bind(c,el),t=0,n=ei(C,y,(n,r={})=>{if(n==W.FOCUS_EVENT){let n=Date.now();A().revalidateOnFocus&&n>t&&N()&&(t=n+A().focusThrottleInterval,e())}else if(n==W.RECONNECT_EVENT)A().revalidateOnReconnect&&N()&&e();else if(n==W.MUTATE_EVENT)return ed();else if(n==W.ERROR_REVALIDATE_EVENT)return ed(r)});return U.current=!1,_.current=C,j.current=!0,B({_k:O}),eo&&(h(ee)||L?e():I(e)),()=>{U.current=!0,n()}},[C]),R(()=>{let e;function t(){let t=p(g)?g(F().data):g;t&&-1!==e&&(e=setTimeout(n,t))}function n(){!F().error&&(m||A().isVisible())&&(v||A().isOnline())?ed(el).then(t):t()}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[g,m,v,C]),(0,l.useDebugValue)(er),o&&h(ee)&&C){if(!z&&L)throw Error("Fallback data is required when using suspense in SSR.");M.current=t,T.current=n,U.current=!1;let e=P[C];if(h(e)||es(eh(e)),h(et)){let e=ed(el);h(er)||(e.status="fulfilled",e.value=!0),es(e)}else throw et}return{mutate:eh,get data(){return q.data=!0,er},get error(){return q.error=!0,et},get isValidating(){return q.isValidating=!0,eu},get isLoading(){return q.isLoading=!0,ec}}}),ec=l.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;if("rejected"===e.status)throw e.reason;throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}),ed={dedupe:!0};d.defineProperty(Y,"defaultValue",{value:q});let eh=er((e,t,n)=>{let{cache:r,compare:i,suspense:o,fallbackData:s,revalidateOnMount:u,revalidateIfStale:d,refreshInterval:g,refreshWhenHidden:m,refreshWhenOffline:v,keepPreviousData:k}=n,[y,w,S,P]=b.get(r),[C,O]=x(e),j=(0,l.useRef)(!1),U=(0,l.useRef)(!1),_=(0,l.useRef)(C),M=(0,l.useRef)(t),T=(0,l.useRef)(n),A=()=>T.current,N=()=>A().isVisible()&&A().isOnline(),[F,B,$,J]=E(r,C),q=(0,l.useRef)({}).current,G=h(s)?n.fallback[C]:s,K=(e,t)=>{for(let n in q)if("data"===n){if(!i(e[n],t[n])&&(!h(e[n])||!i(er,t[n])))return!1}else if(t[n]!==e[n])return!1;return!0},Y=(0,l.useMemo)(()=>{let e=!!C&&!!t&&(h(u)?!A().isPaused()&&!o&&(!!h(d)||d):u),n=t=>{let n=f(t);return(delete n._k,e)?{isValidating:!0,isLoading:!0,...n}:n},r=F(),i=J(),s=n(r),l=r===i?s:n(i),a=s;return[()=>{let e=n(F());return K(e,a)?(a.data=e.data,a.isLoading=e.isLoading,a.isValidating=e.isValidating,a.error=e.error,a):(a=e,e)},()=>l]},[r,C]),Q=(0,a.useSyncExternalStore)((0,l.useCallback)(e=>$(C,(t,n)=>{K(n,t)||e()}),[r,C]),Y[0],Y[1]),H=!j.current,X=y[C]&&y[C].length>0,Z=Q.data,ee=h(Z)?G:Z,et=Q.error,en=(0,l.useRef)(ee),er=k?h(Z)?en.current:Z:ee,eo=(!X||!!h(et))&&(H&&!h(u)?u:!A().isPaused()&&(o?!h(ee)&&d:h(ee)||d)),es=!!(C&&t&&H&&eo),el=h(Q.isValidating)?es:Q.isValidating,ea=h(Q.isLoading)?es:Q.isLoading,eu=(0,l.useCallback)(async e=>{let t,r;let o=M.current;if(!C||!o||U.current||A().isPaused())return!1;let s=!0,l=e||{},a=!S[C]||!l.dedupe,u=()=>z?!U.current&&C===_.current&&j.current:C===_.current,d={isValidating:!1,isLoading:!1},f=()=>{B(d)},g=()=>{let e=S[C];e&&e[1]===r&&delete S[C]},m={isValidating:!0};h(F().data)&&(m.isLoading=!0);try{if(a&&(B(m),n.loadingTimeout&&h(F().data)&&setTimeout(()=>{s&&u()&&A().onLoadingSlow(C,n)},n.loadingTimeout),S[C]=[o(O),V()]),[t,r]=S[C],t=await t,a&&setTimeout(g,n.dedupingInterval),!S[C]||S[C][1]!==r)return a&&u()&&A().onDiscarded(C),!1;d.error=c;let e=w[C];if(!h(e)&&(r<=e[0]||r<=e[1]||0===e[1]))return f(),a&&u()&&A().onDiscarded(C),!1;let l=F().data;d.data=i(l,t)?l:t,a&&u()&&A().onSuccess(t,C,n)}catch(n){g();let e=A(),{shouldRetryOnError:t}=e;!e.isPaused()&&(d.error=n,a&&u()&&(e.onError(n,C,e),(!0===t||p(t)&&t(n))&&(!A().revalidateOnFocus||!A().revalidateOnReconnect||N())&&e.onErrorRetry(n,C,e,e=>{let t=y[C];t&&t[0]&&t[0](W.ERROR_REVALIDATE_EVENT,e)},{retryCount:(l.retryCount||0)+1,dedupe:!0})))}return s=!1,f(),!0},[C,r]),eh=(0,l.useCallback)((...e)=>D(r,_.current,...e),[]);if(R(()=>{M.current=t,T.current=n,h(Z)||(en.current=Z)}),R(()=>{if(!C)return;let e=eu.bind(c,ed),t=0,n=ei(C,y,(n,r={})=>{if(n==W.FOCUS_EVENT){let n=Date.now();A().revalidateOnFocus&&n>t&&N()&&(t=n+A().focusThrottleInterval,e())}else if(n==W.RECONNECT_EVENT)A().revalidateOnReconnect&&N()&&e();else if(n==W.MUTATE_EVENT)return eu();else if(n==W.ERROR_REVALIDATE_EVENT)return eu(r)});return U.current=!1,_.current=C,j.current=!0,B({_k:O}),eo&&(h(ee)||L?e():I(e)),()=>{U.current=!0,n()}},[C]),R(()=>{let e;function t(){let t=p(g)?g(F().data):g;t&&-1!==e&&(e=setTimeout(n,t))}function n(){!F().error&&(m||A().isVisible())&&(v||A().isOnline())?eu(ed).then(t):t()}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[g,m,v,C]),(0,l.useDebugValue)(er),o&&h(ee)&&C){if(!z&&L)throw Error("Fallback data is required when using suspense in SSR.");M.current=t,T.current=n,U.current=!1;let e=P[C];if(h(e)||ec(eh(e)),h(et)){let e=eu(ed);h(er)||(e.status="fulfilled",e.value=!0),ec(e)}else throw et}return{mutate:eh,get data(){return q.data=!0,er},get error(){return q.error=!0,et},get isValidating(){return q.isValidating=!0,el},get isLoading(){return q.isLoading=!0,ea}}}),ep=e=>x(e?e(0,null):null)[0],ef=Promise.resolve(),eg=(r=e=>(t,n,r)=>{let i;let o=(0,l.useRef)(!1),{cache:s,initialSize:u=1,revalidateAll:d=!1,persistSize:f=!1,revalidateFirstPage:g=!0,revalidateOnMount:m=!1,parallel:v=!1}=r,[,,,k]=b.get($);try{(i=ep(t))&&(i=Q+i)}catch(e){}let[y,w,S]=E(s,i),P=(0,l.useCallback)(()=>h(y()._l)?u:y()._l,[s,i,u]);(0,a.useSyncExternalStore)((0,l.useCallback)(e=>i?S(i,()=>{e()}):()=>{},[s,i]),P,P);let C=(0,l.useCallback)(()=>{let e=y()._l;return h(e)?u:e},[i,u]),O=(0,l.useRef)(C());R(()=>{if(!o.current){o.current=!0;return}i&&w({_l:f?O.current:C()})},[i,s]);let j=m&&!o.current,U=e(i,async e=>{let i=y()._i,o=y()._r;w({_r:c});let l=[],a=C(),[u]=E(s,e),p=u().data,f=[],m=null;for(let e=0;e<a;++e){let[a,u]=x(t(e,v?null:m));if(!a)break;let[c,b]=E(s,a),y=c().data,w=d||i||h(y)||g&&!e&&!h(p)||j||p&&!h(p[e])&&!r.compare(p[e],y);if(n&&("function"==typeof o?o(y,u):w)){let t=async()=>{if(a in k){let e=k[a];delete k[a],y=await e}else y=await n(u);b({data:y,_k:u}),l[e]=y};v?f.push(t):await t()}else l[e]=y;v||(m=y)}return v&&await Promise.all(f.map(e=>e())),w({_i:c}),l},r),_=(0,l.useCallback)(function(e,t){let n="boolean"==typeof t?{revalidate:t}:t||{},r=!1!==n.revalidate;return i?(r&&(h(e)?w({_i:!0,_r:n.revalidate}):w({_i:!1,_r:n.revalidate})),arguments.length?U.mutate(e,{...n,revalidate:r}):U.mutate()):ef},[i,s]),M=(0,l.useCallback)(e=>{let n;if(!i)return ef;let[,r]=E(s,i);if(p(e)?n=e(C()):"number"==typeof e&&(n=e),"number"!=typeof n)return ef;r({_l:n}),O.current=n;let o=[],[l]=E(s,i),a=null;for(let e=0;e<n;++e){let[n]=x(t(e,a)),[r]=E(s,n),i=n?r().data:c;if(h(i))return _(l().data);o.push(i),a=i}return _(o)},[i,s,_,C]);return{size:C(),setSize:M,mutate:_,get data(){return U.data},get error(){return U.error},get isValidating(){return U.isValidating},get isLoading(){return U.isLoading}}},(...e)=>{let[t,n,i]=Z(e),o=(i.use||[]).concat(r);return eh(t,n,{...i,use:o})});function em(e,t){if(!e)throw"string"==typeof t?Error(t):Error(`${t.displayName} not found`)}var ev=(e,t)=>{let{assertCtxFn:n=em}=t||{},r=l.createContext(void 0);return r.displayName=e,[r,()=>{let t=l.useContext(r);return n(t,`${e} not found`),t.value},()=>{let e=l.useContext(r);return e?e.value:{}}]},ek={};(0,s.r2)(ek,{SWRConfig:()=>ea,useSWR:()=>eu,useSWRInfinite:()=>eg}),(0,s.yA)(ek,i);var[eb,ey]=ev("ClerkInstanceContext"),[ew,eS]=ev("UserContext"),[eP,eC]=ev("ClientContext"),[eO,eE]=ev("SessionContext");l.createContext({});var[ej,eU]=ev("OrganizationContext"),e_=({children:e,organization:t,swrConfig:n})=>l.createElement(ea,{value:n},l.createElement(ej.Provider,{value:{value:{organization:t}}},e));function eM(e){if(!l.useContext(eb)){if("function"==typeof e){e();return}throw Error(`${e} can only be used within the <ClerkProvider /> component. Learn more: https://clerk.com/docs/components/clerk-provider`)}}function ez(e,t){let n=new Set(Object.keys(t)),r={};for(let t of Object.keys(e))n.has(t)||(r[t]=e[t]);return r}var eL=(e,t)=>{var n,r,i;let o="boolean"==typeof e&&e,s=(0,l.useRef)(o?t.initialPage:null!=(n=null==e?void 0:e.initialPage)?n:t.initialPage),a=(0,l.useRef)(o?t.pageSize:null!=(r=null==e?void 0:e.pageSize)?r:t.pageSize),u={};for(let n of Object.keys(t))u[n]=o?t[n]:null!=(i=null==e?void 0:e[n])?i:t[n];return{...u,initialPage:s.current,pageSize:a.current}},eI={dedupingInterval:6e4,focusThrottleInterval:12e4},eR=(e,t,n,r)=>{var i,o,s,a,u,c,d;let[h,p]=(0,l.useState)(null!=(i=e.initialPage)?i:1),f=(0,l.useRef)(null!=(o=e.initialPage)?o:1),g=(0,l.useRef)(null!=(s=e.pageSize)?s:10),m=null==(a=n.enabled)||a,v=null!=(u=n.infinite)&&u,k=null!=(c=n.keepPreviousData)&&c,b={...r,...e,initialPage:h,pageSize:g.current},{data:y,isValidating:w,isLoading:S,error:P,mutate:C}=eu(!v&&t&&m?b:null,e=>{let n=ez(e,r);return null==t?void 0:t(n)},{keepPreviousData:k,...eI}),{data:O,isLoading:E,isValidating:j,error:U,size:_,setSize:M,mutate:z}=eg(t=>v&&m?{...e,...r,initialPage:f.current+t,pageSize:g.current}:null,e=>{let n=ez(e,r);return null==t?void 0:t(n)},eI),L=(0,l.useMemo)(()=>v?_:h,[v,_,h]),I=(0,l.useCallback)(e=>{if(v){M(e);return}return p(e)},[M]),R=(0,l.useMemo)(()=>{var e,t;return v?null!=(e=null==O?void 0:O.map(e=>null==e?void 0:e.data).flat())?e:[]:null!=(t=null==y?void 0:y.data)?t:[]},[v,y,O]),T=(0,l.useMemo)(()=>{var e,t;return v?(null==(e=null==O?void 0:O[(null==O?void 0:O.length)-1])?void 0:e.total_count)||0:null!=(t=null==y?void 0:y.total_count)?t:0},[v,y,O]),A=v?E:S,x=v?j:w,N=null!=(d=v?U:P)?d:null,V=(0,l.useCallback)(()=>{I(e=>Math.max(0,e+1))},[I]),W=(0,l.useCallback)(()=>{I(e=>Math.max(0,e-1))},[I]),D=(f.current-1)*g.current,F=Math.ceil((T-D)/g.current),B=T-D*g.current>L*g.current,$=(L-1)*g.current>D*g.current,J=v?e=>z(e,{revalidate:!1}):e=>C(e,{revalidate:!1});return{data:R,count:T,error:N,isLoading:A,isFetching:x,isError:!!N,page:L,pageCount:F,fetchPage:I,fetchNext:V,fetchPrevious:W,hasNextPage:B,hasPreviousPage:$,revalidate:v?()=>z():()=>C(),setData:J}},eT={data:void 0,count:void 0,error:void 0,isLoading:!1,isFetching:!1,isError:!1,page:void 0,pageCount:void 0,fetchPage:void 0,fetchNext:void 0,fetchPrevious:void 0,hasNextPage:!1,hasPreviousPage:!1,revalidate:void 0,setData:void 0},eA=e=>{var t,n,r;let{domains:i,membershipRequests:s,memberships:l,invitations:a}=e||{};eM("useOrganization");let{organization:u}=eU(),c=eE(),d=eL(i,{initialPage:1,pageSize:10,keepPreviousData:!1,infinite:!1,enrollmentMode:void 0}),h=eL(s,{initialPage:1,pageSize:10,status:"pending",keepPreviousData:!1,infinite:!1}),p=eL(l,{initialPage:1,pageSize:10,role:void 0,keepPreviousData:!1,infinite:!1}),f=eL(a,{initialPage:1,pageSize:10,status:["pending"],keepPreviousData:!1,infinite:!1}),g=ey();null==(t=g.telemetry)||t.record((0,o.J)("useOrganization"));let m=void 0===i?void 0:{initialPage:d.initialPage,pageSize:d.pageSize,enrollmentMode:d.enrollmentMode},v=void 0===s?void 0:{initialPage:h.initialPage,pageSize:h.pageSize,status:h.status},k=void 0===l?void 0:{initialPage:p.initialPage,pageSize:p.pageSize,role:p.role},b=void 0===a?void 0:{initialPage:f.initialPage,pageSize:f.pageSize,status:f.status},y=eR({...m},null==u?void 0:u.getDomains,{keepPreviousData:d.keepPreviousData,infinite:d.infinite,enabled:!!m},{type:"domains",organizationId:null==u?void 0:u.id}),w=eR({...v},null==u?void 0:u.getMembershipRequests,{keepPreviousData:h.keepPreviousData,infinite:h.infinite,enabled:!!v},{type:"membershipRequests",organizationId:null==u?void 0:u.id}),S=eR(k||{},null==u?void 0:u.getMemberships,{keepPreviousData:p.keepPreviousData,infinite:p.infinite,enabled:!!k},{type:"members",organizationId:null==u?void 0:u.id}),P=eR({...b},null==u?void 0:u.getInvitations,{keepPreviousData:f.keepPreviousData,infinite:f.infinite,enabled:!!b},{type:"invitations",organizationId:null==u?void 0:u.id});return void 0===u?{isLoaded:!1,organization:void 0,membership:void 0,domains:eT,membershipRequests:eT,memberships:eT,invitations:eT}:null===u?{isLoaded:!0,organization:null,membership:null,domains:null,membershipRequests:null,memberships:null,invitations:null}:!g.loaded&&u?{isLoaded:!0,organization:u,membership:void 0,domains:eT,membershipRequests:eT,memberships:eT,invitations:eT}:{isLoaded:g.loaded,organization:u,membership:(n=c.user.organizationMemberships,r=u.id,n.find(e=>e.organization.id===r)),domains:y,membershipRequests:w,memberships:S,invitations:P}},ex={data:void 0,count:void 0,error:void 0,isLoading:!1,isFetching:!1,isError:!1,page:void 0,pageCount:void 0,fetchPage:void 0,fetchNext:void 0,fetchPrevious:void 0,hasNextPage:!1,hasPreviousPage:!1,revalidate:void 0,setData:void 0},eN=e=>{var t;let{userMemberships:n,userInvitations:r,userSuggestions:i}=e||{};eM("useOrganizationList");let s=eL(n,{initialPage:1,pageSize:10,keepPreviousData:!1,infinite:!1}),l=eL(r,{initialPage:1,pageSize:10,status:"pending",keepPreviousData:!1,infinite:!1}),a=eL(i,{initialPage:1,pageSize:10,status:"pending",keepPreviousData:!1,infinite:!1}),u=ey(),c=eS();null==(t=u.telemetry)||t.record((0,o.J)("useOrganizationList"));let d=void 0===n?void 0:{initialPage:s.initialPage,pageSize:s.pageSize},h=void 0===r?void 0:{initialPage:l.initialPage,pageSize:l.pageSize,status:l.status},p=void 0===i?void 0:{initialPage:a.initialPage,pageSize:a.pageSize,status:a.status},f=!!(u.loaded&&c),g=eR(d||{},null==c?void 0:c.getOrganizationMemberships,{keepPreviousData:s.keepPreviousData,infinite:s.infinite,enabled:!!d},{type:"userMemberships",userId:null==c?void 0:c.id}),m=eR({...h},null==c?void 0:c.getOrganizationInvitations,{keepPreviousData:l.keepPreviousData,infinite:l.infinite,enabled:!!h},{type:"userInvitations",userId:null==c?void 0:c.id}),v=eR({...p},null==c?void 0:c.getOrganizationSuggestions,{keepPreviousData:a.keepPreviousData,infinite:a.infinite,enabled:!!p},{type:"userSuggestions",userId:null==c?void 0:c.id});return f?{isLoaded:f,setActive:u.setActive,createOrganization:u.createOrganization,userMemberships:g,userInvitations:m,userSuggestions:v}:{isLoaded:!1,createOrganization:void 0,setActive:void 0,userMemberships:ex,userInvitations:ex,userSuggestions:ex}};"undefined"!=typeof window?l.useLayoutEffect:l.useEffect;var eV=()=>{eM("useSession");let e=eE();return void 0===e?{isLoaded:!1,isSignedIn:void 0,session:void 0}:null===e?{isLoaded:!0,isSignedIn:!1,session:null}:{isLoaded:!0,isSignedIn:!0,session:e}},eW=()=>{eM("useSessionList");let e=ey(),t=eC();return t?{isLoaded:!0,sessions:t.sessions,setActive:e.setActive}:{isLoaded:!1,sessions:void 0,setActive:void 0}};function eD(){eM("useUser");let e=eS();return void 0===e?{isLoaded:!1,isSignedIn:void 0,user:void 0}:null===e?{isLoaded:!0,isSignedIn:!1,user:null}:{isLoaded:!0,isSignedIn:!0,user:e}}var eF=()=>(eM("useClerk"),ey()),eB=Object.prototype.hasOwnProperty;function e$(e,t,n){for(n of e.keys())if(eJ(n,t))return n}function eJ(e,t){var n,r,i;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((r=e.length)===t.length)for(;r--&&eJ(e[r],t[r]););return -1===r}if(n===Set){if(e.size!==t.size)return!1;for(r of e)if((i=r)&&"object"==typeof i&&!(i=e$(t,i))||!t.has(i))return!1;return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e)if((i=r[0])&&"object"==typeof i&&!(i=e$(t,i))||!eJ(r[1],t.get(i)))return!1;return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return -1===r}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return -1===r}if(!n||"object"==typeof e){for(n in r=0,e)if(eB.call(e,n)&&++r&&!eB.call(t,n)||!(n in t)||!eJ(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!=e&&t!=t}var eq=eJ},5456:function(e,t,n){n.d(t,{Z:function(){return p}});var r=n(2265);let i=(0,r.createContext)({color:"currentColor",size:"1em",weight:"regular",mirrored:!1});var o=Object.defineProperty,s=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable,u=(e,t,n)=>t in e?o(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,c=(e,t)=>{for(var n in t||(t={}))l.call(t,n)&&u(e,n,t[n]);if(s)for(var n of s(t))a.call(t,n)&&u(e,n,t[n]);return e},d=(e,t)=>{var n={};for(var r in e)l.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&s)for(var r of s(e))0>t.indexOf(r)&&a.call(e,r)&&(n[r]=e[r]);return n};let h=(0,r.forwardRef)((e,t)=>{let{alt:n,color:o,size:s,weight:l,mirrored:a,children:u,weights:h}=e,p=d(e,["alt","color","size","weight","mirrored","children","weights"]),f=(0,r.useContext)(i),{color:g="currentColor",size:m,weight:v="regular",mirrored:k=!1}=f,b=d(f,["color","size","weight","mirrored"]);return r.createElement("svg",c(c({ref:t,xmlns:"http://www.w3.org/2000/svg",width:null!=s?s:m,height:null!=s?s:m,fill:null!=o?o:g,viewBox:"0 0 256 256",transform:a||k?"scale(-1, 1)":void 0},b),p),!!n&&r.createElement("title",null,n),u,h.get(null!=l?l:v))});h.displayName="IconBase";let p=h},39963:function(e,t,n){n.d(t,{F:function(){return i},e:function(){return o}});var r=n(2265);function i(...e){return t=>e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}function o(...e){return r.useCallback(i(...e),e)}},26978:function(e,t,n){n.d(t,{WV:function(){return l},jH:function(){return a}});var r=n(2265),i=n(54887),o=n(98230),s=n(57437),l=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{let n=r.forwardRef((e,n)=>{let{asChild:r,...i}=e,l=r?o.g7:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,s.jsx)(l,{...i,ref:n})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function a(e,t){e&&i.flushSync(()=>e.dispatchEvent(t))}},98230:function(e,t,n){n.d(t,{A4:function(){return a},g7:function(){return s}});var r=n(2265),i=n(39963),o=n(57437),s=r.forwardRef((e,t)=>{let{children:n,...i}=e,s=r.Children.toArray(n),a=s.find(u);if(a){let e=a.props.children,n=s.map(t=>t!==a?t:r.Children.count(e)>1?r.Children.only(null):r.isValidElement(e)?e.props.children:null);return(0,o.jsx)(l,{...i,ref:t,children:r.isValidElement(e)?r.cloneElement(e,void 0,n):null})}return(0,o.jsx)(l,{...i,ref:t,children:n})});s.displayName="Slot";var l=r.forwardRef((e,t)=>{let{children:n,...o}=e;if(r.isValidElement(n)){let e,s;let l=(e=Object.getOwnPropertyDescriptor(n.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning?n.ref:(e=Object.getOwnPropertyDescriptor(n,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning?n.props.ref:n.props.ref||n.ref;return r.cloneElement(n,{...function(e,t){let n={...t};for(let r in t){let i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...e)=>{o(...e),i(...e)}:i&&(n[r]=i):"style"===r?n[r]={...i,...o}:"className"===r&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}(o,n.props),ref:t?(0,i.F)(t,l):l})}return r.Children.count(n)>1?r.Children.only(null):null});l.displayName="SlotClone";var a=({children:e})=>(0,o.jsx)(o.Fragment,{children:e});function u(e){return r.isValidElement(e)&&e.type===a}},10827:function(e,t,n){n.d(t,{j:function(){return o}});let r=e=>"boolean"==typeof e?"".concat(e):0===e?"0":e,i=function(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=function e(t){var n,r,i="";if("string"==typeof t||"number"==typeof t)i+=t;else if("object"==typeof t){if(Array.isArray(t))for(n=0;n<t.length;n++)t[n]&&(r=e(t[n]))&&(i&&(i+=" "),i+=r);else for(n in t)t[n]&&(i&&(i+=" "),i+=n)}return i}(e))&&(r&&(r+=" "),r+=t);return r},o=(e,t)=>n=>{var o;if((null==t?void 0:t.variants)==null)return i(e,null==n?void 0:n.class,null==n?void 0:n.className);let{variants:s,defaultVariants:l}=t,a=Object.keys(s).map(e=>{let t=null==n?void 0:n[e],i=null==l?void 0:l[e];if(null===t)return null;let o=r(t)||r(i);return s[e][o]}),u=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return void 0===r||(e[n]=r),e},{});return i(e,a,null==t?void 0:null===(o=t.compoundVariants)||void 0===o?void 0:o.reduce((e,t)=>{let{class:n,className:r,...i}=t;return Object.entries(i).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...l,...u}[t]):({...l,...u})[t]===n})?[...e,n,r]:e},[]),null==n?void 0:n.class,null==n?void 0:n.className)}}}]);