PageSourceSearch

https://forgebybrave.ai/_next/static/chunks/1832-e82af2abf16485bc.js

js forgebybrave.ai collected 2026-10-05 13:43:50 UTC 100,997 bytes, 39 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1832],{324:(e,t,r)=>{r.d(t,{io:()=>s});var i=r(68614);let n=new Set,s=(e,t,r)=>{let s=(0,i.a)()||(0,i.i)(),o=r??e;n.has(o)||s||(n.add(o),console.warn(`Clerk - DEPRECATION WARNING: "${e}" is deprecated and will be removed in the next major release.
2${t}`))}},878:(e,t,r)=>{r.d(t,{j:()=>s});var i=Object.prototype.hasOwnProperty;function n(e,t,r){for(r of e.keys())if(s(r,t))return r}function s(e,t){var r,o,a;if(e===t)return!0;if(e&&t&&(r=e.constructor)===t.constructor){if(r===Date)return e.getTime()===t.getTime();if(r===RegExp)return e.toString()===t.toString();if(r===Array){if((o=e.length)===t.length)for(;o--&&s(e[o],t[o]););return -1===o}if(r===Set){if(e.size!==t.size)return!1;for(o of e)if((a=o)&&"object"==typeof a&&!(a=n(t,a))||!t.has(a))return!1;return!0}if(r===Map){if(e.size!==t.size)return!1;for(o of e)if((a=o[0])&&"object"==typeof a&&!(a=n(t,a))||!s(o[1],t.get(a)))return!1;return!0}if(r===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(r===DataView){if((o=e.byteLength)===t.byteLength)for(;o--&&e.getInt8(o)===t.getInt8(o););return -1===o}if(ArrayBuffer.isView(e)){if((o=e.byteLength)===t.byteLength)for(;o--&&e[o]===t[o];);return -1===o}if(!r||"object"==typeof e){for(r in o=0,e)if(i.call(e,r)&&++o&&!i.call(t,r)||!(r in t)||!s(e[r],t[r]))return!1;return Object.keys(t).length===o}}return e!=e&&t!=t}},2798:(e,t,r)=>{r.d(t,{RZ:()=>h,EL:()=>c,q5:()=>l});var i=r(26360),n=r(3211);let s=e=>"undefined"!=typeof atob&&"function"==typeof atob?atob(e):void 0!==globalThis.Buffer?globalThis.Buffer.from(e,"base64").toString():e,o="pk_live_";function a(e){if(!e.endsWith("$"))return!1;let t=e.slice(0,-1);return!t.includes("$")&&t.includes(".")}function l(e,t={}){let r;if(!(e=e||"")||!u(e)){if(t.fatal&&!e)throw Error(`Publishable key is missing.
3
4${n.n}`);if(t.fatal&&!u(e))throw Error(`Publishable key not valid (expected format: pk_test_... or pk_live_...).
5
6${n.n}`);return null}let i=e.startsWith(o)?"production":"development";try{r=s(e.split("_")[2])}catch{if(t.fatal)throw Error(`Publishable key not valid: Failed to decode key.
7
8${n.n}`);return null}if(!a(r)){if(t.fatal)throw Error(`Publishable key not valid: Decoded key has invalid format.
9
10${n.n}`);return null}let h=r.slice(0,-1);return t.proxyUrl?h=t.proxyUrl:"development"!==i&&t.domain&&t.isSatellite&&(h=`clerk.${t.domain}`),{instanceType:i,frontendApi:h}}function u(e=""){try{if(!(e.startsWith(o)||e.startsWith("pk_test_")))return!1;let t=e.split("_");if(3!==t.length)return!1;let r=t[2];if(!r)return!1;return a(s(r))}catch{return!1}}function h(){let e=new Map;return{isDevOrStagingUrl:t=>{if(!t)return!1;let r="string"==typeof t?t:t.hostname,n=e.get(r);return void 0===n&&(n=i.gE.some(e=>r.endsWith(e)),e.set(r,n)),n}}}function c(e){return e.startsWith("live_")||e.startsWith("pk_live_")}},3211:(e,t,r)=>{r.d(t,{n:()=>s,t:()=>o});let i=`To use an existing Clerk app, run:
11npx clerk@latest link
12npx clerk@latest env pull
13
14For production keys, run:
15npx clerk@latest env pull --instance prod`,n="Or copy keys from https://dashboard.clerk.com/~/api-keys into your .env file.",s=`To create a new Clerk app, run:
16npx clerk@latest init
17
18${i}
19
20${n}`,o=`${i}
21
22${n}`},4579:(e,t,r)=>{r.d(t,{zz:()=>n});let i=e=>{let t=r=>{if(!r)return r;if(Array.isArray(r))return r.map(e=>"object"==typeof e||Array.isArray(e)?t(e):e);let i={...r};for(let r of Object.keys(i)){let n=e(r.toString());n!==r&&(i[n]=i[r],delete i[r]),"object"==typeof i[n]&&(i[n]=t(i[n]))}return i};return t};function n(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}i(function(e){return e?e.replace(/[A-Z]/g,e=>`_${e.toLowerCase()}`):""}),i(function(e){return e?e.replace(/([-_][a-z])/g,e=>e.toUpperCase().replace(/-|_/,"")):""})},5664:(e,t,r)=>{r.d(t,{RC:()=>O,Vv:()=>S,aK:()=>j,aj:()=>v,DU:()=>P,cT:()=>z});var i=r(2798),n=r(44838),s=r(26322);let o={initialDelay:125,maxDelayBetweenRetries:0,factor:2,shouldRetry:(e,t)=>t<5,retryImmediately:!1,jitter:!0},a=async e=>new Promise(t=>setTimeout(t,e)),l=(e,t)=>
22t?e*(1+Math.random()):e,u=e=>{let t=0,r=()=>{let r=e.initialDelay*Math.pow(e.factor,t);return r=l(r,e.jitter),Math.min(e.maxDelayBetweenRetries||r,r)};return async()=>{await a(r()),t++}},h=async(e,t={})=>{let r=0,{shouldRetry:i,initialDelay:n,maxDelayBetweenRetries:s,factor:h,retryImmediately:c,jitter:d,onBeforeRetry:p}={...o,...t},m=u({initialDelay:n,maxDelayBetweenRetries:s,factor:h,jitter:d});for(;;)try{return await e()}catch(e){if(!i(e,++r))throw e;p&&await p(r),c&&1===r?await a(l(100,d)):await m()}};async function c(e="",t){let{async:r,defer:i,beforeLoad:n,crossOrigin:s,nonce:o}=t||{};return h(()=>new Promise((t,a)=>{e||a(Error("loadScript cannot be called without a src")),document&&document.body||a(Error("loadScript cannot be called when document does not exist"));let l=document.createElement("script");s&&l.setAttribute("crossorigin",s),l.async=r||!1,l.defer=i||!1,l.addEventListener("load",()=>{l.remove(),t(l)}),l.addEventListener("error",t=>{l.remove(),a(t.error??Error(`failed to load script: ${e}`))}),l.src=e,o&&(l.nonce=o),n?.(l),document.body.appendChild(l)}),{shouldRetry:(e,t)=>t<=5})}var d=r(61831);let p=/\/$|\/\?|\/#/;(({regex:e})=>({urlWithParam:t,entity:r})=>{let i=e.exec(t);if(i){let e=i[1];if(e in r){let n=r[e];return t.replace(i[0],n)}}return t})({regex:/:(\w+)/});let m=(e,t="6.34.1")=>{if(e)return e;let r=f(t);return r?"snapshot"===r?t:r:g(t)},f=e=>e.trim().replace(/^v/,"").match(/-(.+?)(\.|$)/)?.[1],g=e=>e.trim().replace(/^v/,"").split(".")[0],{isDevOrStagingUrl:k}=(0,i.RZ)(),_=(0,s.y)({packageName:"@clerk/shared"});function y(e){return"undefined"!=typeof window&&!!window[e]&&!!window[e]}let b=()=>y("Clerk"),C=()=>y("__internal_ClerkUICtor");function w(e){if("undefined"==typeof window||!window.performance)return!1;let t=performance.getEntriesByName(e,"resource");if(0===t.length)return!1;let r=t[t.length-1];return 0===r.transferSize&&0===r.decodedBodySize&&(0===r.responseEnd||!!(r.responseEnd>0)&&!!(r.responseStart>0)||"responseStatus"in r&&(!!(r.responseStatus>=400)||0===r.responseStatus))}let v=async e=>{let t=e?.scriptLoadTimeout??15e3,r=e=>new n.t("Failed to load Clerk JS"+(e?.message?`, ${e.message}`:""),{code:"failed_to_load_clerk_js",cause:e});if(b())return null;if(!e?.publishableKey)return _.throwMissingPublishableKeyError(),null;let i=S(e),s=document.querySelector("script[data-clerk-js-script]");if(s)if(w(i))s.remove();else try{return await T(t,b,r(),s),null}catch{s.remove()}let o=T(t,b,r());return c(i,{async:!0,crossOrigin:"anonymous",nonce:e.nonce,beforeLoad:E(O(e))}).catch(e=>{throw r(e)}),o},P=async e=>{let t=e?.scriptLoadTimeout??15e3,r=e=>new n.t("Failed to load Clerk UI"+(e?.message?`, ${e.message}`:""),{code:"failed_to_load_clerk_ui",cause:e});if(C())return null;if(!e?.publishableKey)return _.throwMissingPublishableKeyError(),null;let i=j(e),s=document.querySelector("script[data-clerk-ui-script]");if(s)if(w(i))s.remove();else try{return await T(t,C,r(),s),null}catch{s.remove()}let o=T(t,C,r());return c(i,{async:!0,crossOrigin:"anonymous",nonce:e.nonce,beforeLoad:E(U(e))}).catch(e=>{throw r(e)}),o},S=e=>{let{__internal_clerkJSUrl:t,__internal_clerkJSVersion:r,proxyUrl:i,domain:n,publishableKey:s}=e;if(t)return t;let o=m(r);return i&&(0,d.Mv)(i)?I(i,"clerk-js",o,"clerk.browser.js"):`https://${A({publishableKey:s,proxyUrl:i,domain:n})}/npm/@clerk/clerk-js@${o}/dist/clerk.browser.js`},j=e=>{let{__internal_clerkUIUrl:t,__internal_clerkUIVersion:r,proxyUrl:i,domain:n,publishableKey:s}=e;if(t)return t;let o=m(r,"1.36.0");return i&&(0,d.Mv)(i)?I(i,"ui",o,"ui.browser.js"):`https://${A({publishableKey:s,proxyUrl:i,domain:n})}/npm/@clerk/ui@${o}/dist/ui.browser.js`},O=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},U=e=>O(e),E=e=>t=>{for(let r in e)t.setAttribute(r,e[r])},M=e=>{for(;e.endsWith("/");)e=e.slice(0,-1);return e},I=(e,t,r,i)=>`${M(e)}/npm/@clerk/${t}@${r}/dist/${i}`,A=e=>{let{proxyUrl:t,domain:r,publishableKey:n}=e;if(t&&(0,d._c)(t)){let e=(0,d.zz)(t);return(0,d.Mv)(e)?i.q5(n)?.frontendApi||"":e.replace(/http(s)?:\/\//,"")}return r&&!k(i.q5(n)?.frontendApi||"")?function(e){let t;if(!e)return"";if(e.match(/^(clerk\.)+\w*$/))t=/(clerk\.)*(?=clerk\.)/;
22else{if(e.match(/\.clerk.accounts/))return e;t=/^(clerk\.)*/gi}return`clerk.${e.replace(t,"")}`}(r):i.q5(n)?.frontendApi||""};function T(e,t,r,i){return new Promise((n,s)=>{let o=!1,a=(e,t)=>{clearTimeout(e),clearInterval(t)};i?.addEventListener("error",()=>{a(u,h),s(r)});let l=()=>{!o&&t()&&(o=!0,a(u,h),n(null))},u=setTimeout(()=>{o||(o=!0,a(u,h),t()?n(null):s(r))},e);l();let h=setInterval(()=>{if(o){clearInterval(h);return}l()},100)})}function z(e){_.setPackageName({packageName:e})}},9650:(e,t,r)=>{r.d(t,{d:()=>i});function i(e,t){return e.find(e=>e.organization.id===t)}},9973:(e,t,r)=>{r.d(t,{a:()=>n,i:()=>s}),r(68614),r(4579),r(87358),Symbol.for("@clerk/shared.telemetryNoticeShown");let i=new Set(["SignIn","SignUp"]);function n(e,t){return{event:"METHOD_CALLED",eventSamplingRate:.1,payload:{method:e,...t}}}function s(e){return{event:"FRAMEWORK_METADATA",eventSamplingRate:.1,payload:e}}},18647:(e,t,r)=>{r.d(t,{dT:()=>i,r2:()=>n});let i=(e,t,r)=>!e&&r?n(r):s(t),n=e=>{let t=e.userId,r=e.user,i=e.sessionId,n=e.sessionStatus,s=e.sessionClaims;return{userId:t,user:r,sessionId:i,session:e.session,sessionStatus:n,sessionClaims:s,organization:e.organization,orgId:e.orgId,orgRole:e.orgRole,orgPermissions:e.orgPermissions,orgSlug:e.orgSlug,actor:e.actor,factorVerificationAge:e.factorVerificationAge}},s=e=>{let t=e.user?e.user.id:e.user,r=e.user,i=e.session?e.session.id:e.session,n=e.session,s=e.session?.status,o=e.session?e.session.lastActiveToken?.jwt?.claims:null,a=e.session?e.session.factorVerificationAge:null,l=n?.actor,u=e.organization,h=e.organization?e.organization.id:e.organization,c=u?.slug,d=u?r?.organizationMemberships?.find(e=>e.organization.id===h):u,p=d?d.permissions:d;return{userId:t,user:r,sessionId:i,session:n,sessionStatus:s,sessionClaims:o,organization:u,orgId:h,orgRole:d?d.role:d,orgSlug:c,orgPermissions:p,actor:l,factorVerificationAge:a}}},23789:(e,t,r)=>{r.d(t,{$R:()=>n.C,_r:()=>n.y,cR:()=>i.t});var i=r(44838),n=r(26322)},26322:(e,t,r)=>{r.d(t,{C:()=>a,y:()=>u});var i=r(3211),n=r(44838),s=class{static kind="ClerkAPIError";code;message;longMessage;meta;constructor(e){let t={code:e.code,message:e.message,longMessage:e.long_message,meta:{paramName:e.meta?.param_name,sessionId:e.meta?.session_id,emailAddresses:e.meta?.email_addresses,identifiers:e.meta?.identifiers,zxcvbn:e.meta?.zxcvbn,plan:e.meta?.plan,isPlanUpgradePossible:e.meta?.is_plan_upgrade_possible,seatsQuantityToAdd:e.meta?.seats_quantity_to_add,seatsQuantity:e.meta?.seats_quantity,traceId:e.meta?.trace_id,kind:e.meta?.kind,title:e.meta?.title,description:e.meta?.description,linkUrl:e.meta?.link_url,linkText:e.meta?.link_text,data:e.meta?.data}};this.code=t.code,this.message=t.message,this.longMessage=t.longMessage,this.meta=t.meta}};(0,n.a)(s);var o=class e extends n.r{static kind="ClerkAPIResponseError";status;clerkTraceId;retryAfter;errors;constructor(t,r){let{data:i,status:n,clerkTraceId:o,retryAfter:a}=r;super({...r,message:t,code:"api_response_error"}),Object.setPrototypeOf(this,e.prototype),this.status=n,this.clerkTraceId=o,this.retryAfter=a,this.errors=(i||[]).map(e=>new s(e))}toString(){let e=`[${this.name}]
23Message:${this.message}
24Status:${this.status}
25Serialized errors: ${this.errors.map(e=>JSON.stringify(e))}`;return this.clerkTraceId&&(e+=`
26Clerk Trace ID: ${this.clerkTraceId}`),e}static formatMessage(e,t,r,i){return t}};let a=(0,n.a)(o);n.t;let l=Object.freeze({InvalidProxyUrlErrorMessage:"The proxyUrl passed to Clerk is invali
26d. 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 (key={{key}}, expected format: pk_test_... or pk_live_...).
27
28${i.n}`,MissingPublishableKeyErrorMessage:`Clerk keys are missing from your environment.
29
30${i.n}`,MissingSecretKeyErrorMessage:`Missing secretKey.
31
32${i.t}`,MissingClerkProvider:"{{source}} can only be used within the <ClerkProvider /> component. Learn more: https://clerk.com/docs/components/clerk-provider"});function u({packageName:e,customMessages:t}){let r=e;function i(e,t){if(!t)return`${r}: ${e}`;let i=e;for(let r of e.matchAll(/{{([a-zA-Z0-9-_]+)}}/g)){let e=(t[r[1]]||"").toString();i=i.replace(`{{${r[1]}}}`,e)}return`${r}: ${i}`}let n={...l,...t};return{setPackageName({packageName:e}){return"string"==typeof e&&(r=e),this},setMessages({customMessages:e}){return Object.assign(n,e||{}),this},throwInvalidPublishableKeyError(e){throw Error(i(n.InvalidPublishableKeyErrorMessage,e))},throwInvalidProxyUrl(e){throw Error(i(n.InvalidProxyUrlErrorMessage,e))},throwMissingPublishableKeyError(){throw Error(i(n.MissingPublishableKeyErrorMessage))},throwMissingSecretKeyError(){throw Error(i(n.MissingSecretKeyErrorMessage))},throwMissingClerkProviderError(e){throw Error(i(n.MissingClerkProvider,e))},throw(e){throw Error(i(e))}}}n.t},26360:(e,t,r)=>{r.d(t,{FW:()=>u,HG:()=>l,Vc:()=>a,gE:()=>n,iM:()=>i,mG:()=>s,ub:()=>o});let i=[".lcl.dev",".lclstage.dev",".lclclerk.com"],n=[".lcl.dev",".stg.dev",".lclstage.dev",".stgstage.dev",".dev.lclclerk.com",".stg.lclclerk.com",".accounts.lclclerk.com","accountsstage.dev","accounts.dev"],s=[".lcl.dev","lclstage.dev",".lclclerk.com",".accounts.lclclerk.com"],o=[".accountsstage.dev"],a="https://api.lclclerk.com",l="https://api.clerkstage.dev",u="https://api.clerk.com"},33132:(e,t,r)=>{r(87039),r(44838)},33884:(e,t,r)=>{r.d(t,{h:()=>y,r:()=>b,t:()=>I});var i=r(84610),n=r(34090),s=r(12115),o=r(5664),a=r(34349),l=r(54707),u=r(324),h=r(87039);let c=(e,t,r,i,n)=>{let{notify:s}=n||{},o=e.get(r);o||(o=[],e.set(r,o)),o.push(i),s&&t.has(r)&&i(t.get(r))},d=(e,t,r)=>(e.get(t)||[]).map(e=>e(r)),p=(e,t,r)=>{let i=e.get(t);i&&(r?i.splice(i.indexOf(r)>>>0,1):e.set(t,[]))},m=()=>{let e=new Map,t=new Map,r=new Map;return{on:(...r)=>c(e,t,...r),prioritizedOn:(...e)=>c(r,t,...e),emit:(i,n)=>{t.set(i,n),d(r,i,n),d(e,i,n)},off:(...t)=>p(e,...t),prioritizedOff:(...e)=>p(r,...e),internal:{retrieveListeners:t=>e.get(t)||[]}}},f={Status:"status"},g=()=>m(),k=["http:","https:","wails:","chrome-extension:"],_=/^[/\\][/\\]/,y=({children:e,fallback:t,treatPendingAsSignedOut:r,when:s})=>{(0,i.t)("Show");let{has:o,isLoaded:a,userId:l}=(0,n.x)({treatPendingAsSignedOut:r});if(!a)return null;let u=t??null;return"signed-out"===s?l?u:e:l&&("signed-in"===s||function(e,t){return"function"==typeof e?e(t):t(e)}(s,o))?e:u};(0,n.V)(({clerk:e,...t})=>{let{client:r,session:i}=e,n=(r.signedInSessions?.length??0)>0;return s.useEffect(()=>{null===i&&n?e.redirectToAfterSignOut():e.redirectToSignIn(t)},[]),null},"RedirectToSignIn"),(0,n.V)(({clerk:e,...t})=>(s.useEffect(()=>{e.redirectToSignUp(t)},[]),null),"RedirectToSignUp"),(0,n.V)(({clerk:e,...t})=>(s.useEffect(()=>{e.redirectToTasks(t)},[]),null),"RedirectToTasks"),(0,n.V)(({clerk:e})=>(s.useEffect(()=>{(0,u.io)("RedirectToUserProfile","Use the `redirectToUserProfile()` method instead."),e.redirectToUserProfile()},[]),null),"RedirectToUserProfile"),(0,n.V)(({clerk:e})=>(s.useEffect(()=>{(0,u.io)("RedirectToOrganizationProfile","Use the `redirectToOrganizationProfile()` method instead."),e.redirectToOrganizationProfile()},[]),null),"RedirectToOrganizationProfile"),(0,n.V)(({clerk:e})=>(s.useEffect(()=>{(0,u.io)("RedirectToCreateOrganization","Use the `redirectToCreateOrganization()` method instead."),e.redirectToCreateOrganization()},[]),null),"RedirectToCreateOrganization");let b=(0,n.V)(({clerk:e,...t})=>(s.useEffect(()=>{e.handleRedirectCallback(t)},[]),null),"AuthenticateWithRedirectCallback"),C=()=>({fields:{identifier:null,password:null,code:null},raw:null,global:null}),w=()=>({fields:{firstName:null,lastName:null,emailAddress:null,phoneNumber:null,password:null,username:null,code:null,captcha:null,legalAccepted:null},raw:null,global:null}),v=()=>({fields:{emailAddress:null},raw:null,global:null}),P=()=>({pathRoot:"",attempts:null,error:null,expireAt:null,externalVerificationRedirectURL:null,nonce:null,message:null,status:null,strategy:null,verifiedAtClient:null,verifiedFromTheSameClient:()=>!1,reload(){throw Error("reload() called before Clerk is loaded")},__internal_toSnapshot:()=>({object:"verification",id:"",attempts:null,error:{code:"",message:""},expire_at:null,externalVerificationRedirectURL:null,nonce:null,message:null,status:null,strategy:null,verified_at_client:null})}),S=()=>({...P(),supportedStrategies:[],nextAction:"",reload(){throw Error("reload() called before Clerk is loaded")},__internal_toSnapshot(){return{...P().__internal_toSnapshot(),next_action:this.nextAction,supported_strategies:this.supportedStrategies}}});var j=class{constructor(e){this.isomorphicClerk=e,this.signInSignalProxy=this.buildSignInProxy(),this.signUpSignalProxy=this.buildSignUpProxy(),this.waitlistSignalProxy=this.buildWaitlistProxy()}signInSignal(){return this.signInSignalProxy}signUpSignal(){return this.signUpSignalProxy}waitlistSignal(){return this.waitlistSignalProxy}get __internal_waitlist(){return this.state.__internal_waitlist}checkoutSignal(e){return this.buildCheckoutProxy(e)}buildSignInProxy(){let e=this.gateProperty.bind(this),t=()=>
32this.state.signInSignal().signIn??this.client.signIn.__internal_future;return{errors:C(),fetchStatus:"idle",signIn:{get status(){return e(t,"status","needs_identifier")},availableStrategies:[],get isTransferable(){return e(t,"isTransferable",!1)},get id(){return e(t,"id",void 0)},get supportedFirstFactors(){return e(t,"supportedFirstFactors",[])},get ssoBypassFirstFactors(){return e(t,"ssoBypassFirstFactors",[])},get supportedSecondFactors(){return e(t,"supportedSecondFactors",[])},get secondFactorVerification(){return e(t,"secondFactorVerification",{status:null,error:null,expireAt:null,externalVerificationRedirectURL:null,nonce:null,attempts:null,message:null,strategy:null,verifiedAtClient:null,verifiedFromTheSameClient:()=>!1,__internal_toSnapshot:()=>{throw Error("__internal_toSnapshot called before Clerk is loaded")},pathRoot:"",reload:()=>{throw Error("__internal_toSnapshot called before Clerk is loaded")}})},get identifier(){return e(t,"identifier",null)},get createdSessionId(){return e(t,"createdSessionId",null)},get userData(){return e(t,"userData",{})},get firstFactorVerification(){return e(t,"firstFactorVerification",{status:null,error:null,expireAt:null,externalVerificationRedirectURL:null,nonce:null,attempts:null,message:null,strategy:null,verifiedAtClient:null,verifiedFromTheSameClient:()=>!1,__internal_toSnapshot:()=>{throw Error("__internal_toSnapshot called before Clerk is loaded")},pathRoot:"",reload:()=>{throw Error("__internal_toSnapshot called before Clerk is loaded")}})},get canBeDiscarded(){return e(t,"canBeDiscarded",!1)},get protectCheck(){return e(t,"protectCheck",null)},create:this.gateMethod(t,"create"),password:this.gateMethod(t,"password"),sso:this.gateMethod(t,"sso"),finalize:this.gateMethod(t,"finalize"),reset:this.gateMethod(t,"reset"),submitProtectCheck:this.gateMethod(t,"submitProtectCheck"),emailCode:this.wrapMethods(()=>t().emailCode,["sendCode","verifyCode"]),emailLink:this.wrapStruct(()=>t().emailLink,["sendLink","waitForVerification"],["verification"],{verification:null}),resetPasswordEmailCode:this.wrapMethods(()=>t().resetPasswordEmailCode,["sendCode","verifyCode","submitPassword"]),resetPasswordPhoneCode:this.wrapMethods(()=>t().resetPasswordPhoneCode,["sendCode","verifyCode","submitPassword"]),phoneCode:this.wrapMethods(()=>t().phoneCode,["sendCode","verifyCode"]),mfa:this.wrapMethods(()=>t().mfa,["sendPhoneCode","verifyPhoneCode","sendEmailCode","verifyEmailCode","verifyTOTP","verifyBackupCode"]),ticket:this.gateMethod(t,"ticket"),passkey:this.gateMethod(t,"passkey"),web3:this.gateMethod(t,"web3")}}}buildSignUpProxy(){let e=this.gateProperty.bind(this),t=this.gateMethod.bind(this),r=()=>this.state.signUpSignal().signUp??this.client.signUp.__internal_future;return{errors:w(),fetchStatus:"idle",signUp:{get id(){return e(r,"id",void 0)},get requiredFields(){return e(r,"requiredFields",[])},get optionalFields(){return e(r,"optionalFields",[])},get missingFields(){return e(r,"missingFields",[])},get username(){return e(r,"username",null)},get firstName(){return e(r,"firstName",null)},get lastName(){return e(r,"lastName",null)},get emailAddress(){return e(r,"emailAddress",null)},get phoneNumber(){return e(r,"phoneNumber",null)},get web3Wallet(){return e(r,"web3Wallet",null)},get hasPassword(){return e(r,"hasPassword",!1)},get unsafeMetadata(){return e(r,"unsafeMetadata",{})},get createdSessionId(){return e(r,"createdSessionId",null)},get createdUserId(){return e(r,"createdUserId",null)},get abandonAt(){return e(r,"abandonAt",null)},get legalAcceptedAt(){return e(r,"legalAcceptedAt",null)},get locale(){return e(r,"locale",null)},get status(){return e(r,"status","missing_requirements")},get unverifiedFields(){return e(r,"unverifiedFields",[])},get isTransferable(){return e(r,"isTransferable",!1)},get canBeDiscarded(){return e(r,"canBeDiscarded",!1)},get protectCheck(){return e(r,"protectCheck",null)},create:t(r,"create"),update:t(r,"update"),sso:t(r,"sso"),password:t(r,"password"),ticket:t(r,"ticket"),web3:t(r,"web3"),finalize:t(r,"finalize"),reset:t(r,"reset"),submitProtectCheck:t(r,"
32submitProtectCheck"),verifications:this.wrapStruct(()=>r().verifications,["sendEmailCode","verifyEmailCode","sendEmailLink","waitForEmailLinkVerification","sendPhoneCode","verifyPhoneCode"],["emailAddress","phoneNumber","web3Wallet","externalAccount","emailLinkVerification"],{emailAddress:S(),phoneNumber:S(),web3Wallet:S(),externalAccount:S(),emailLinkVerification:null})}}}buildWaitlistProxy(){let e=this.gateProperty.bind(this),t=this.gateMethod.bind(this),r=()=>this.state.__internal_waitlist;return{errors:v(),fetchStatus:"idle",waitlist:{pathRoot:"/waitlist",get id(){return e(r,"id","")},get createdAt(){return e(r,"createdAt",null)},get updatedAt(){return e(r,"updatedAt",null)},join:t(r,"join"),reload:t(r,"reload")}}}buildCheckoutProxy(e){let t=this.gateProperty.bind(this),r=()=>this.checkout(e),i=()=>r().checkout;return{errors:{raw:null,global:null},fetchStatus:"idle",checkout:{get status(){return t(i,"status","needs_initialization")},get externalClientSecret(){return t(i,"externalClientSecret",null)},get externalGatewayId(){return t(i,"externalGatewayId",null)},get paymentMethod(){return t(i,"paymentMethod",null)},get plan(){return t(i,"plan",null)},get planPeriod(){return t(i,"planPeriod",null)},get totals(){return t(i,"totals",null)},get isImmediatePlanChange(){return t(i,"isImmediatePlanChange",!1)},get freeTrialEndsAt(){return t(i,"freeTrialEndsAt",null)},get payer(){return t(i,"payer",null)},get planPeriodStart(){return t(i,"planPeriodStart",null)},get needsPaymentMethod(){return t(i,"needsPaymentMethod",null)},start:this.gateMethod(i,"start"),update:this.gateMethod(i,"update"),confirm:this.gateMethod(i,"confirm"),finalize:this.gateMethod(i,"finalize")}}}__internal_effect(e){throw Error("__internal_effect called before Clerk is loaded")}__internal_computed(e){throw Error("__internal_computed called before Clerk is loaded")}get state(){let e=this.isomorphicClerk.__internal_state;if(!e)throw Error("Clerk state not ready");return e}get client(){let e=this.isomorphicClerk.client;if(!e)throw Error("Clerk client not ready");return e}get checkout(){let e=this.isomorphicClerk.__experimental_checkout;if(!e)throw Error("Clerk checkout not ready");return e}gateProperty(e,t,r){return(0,h.M)()&&this.isomorphicClerk.loaded?e()[t]:r}gateMethod(e,t){return async(...r)=>{if(!(0,h.M)())return i.r.throw(`Attempted to call a method (${t}) that is not supported on the server.`);this.isomorphicClerk.loaded||await new Promise(e=>this.isomorphicClerk.addOnLoaded(e));let n=e();return n[t].apply(n,r)}}wrapMethods(e,t){return Object.fromEntries(t.map(t=>[t,this.gateMethod(e,t)]))}wrapStruct(e,t,r,i){let n={};for(let r of t)n[r]=this.gateMethod(e,r);for(let t of r)Object.defineProperty(n,t,{get:()=>this.gateProperty(e,t,i[t]),enumerable:!0});return n}};void 0===globalThis.__BUILD_DISABLE_RHC__&&(globalThis.__BUILD_DISABLE_RHC__=!1);let O={name:"@clerk/react",version:"6.17.2",environment:"production"};var U=class e{#e;#t;#r;#i;#n;#s;get publishableKey(){return this.#i}get loaded(){return this.clerkjs?.loaded||!1}get status(){return this.clerkjs?this.clerkjs?.status||(this.clerkjs.loaded?"ready":"loading"):this.#e}static #o;static getOrCreateInstance(t){return(0,h.M)()&&this.#o&&(!t.Clerk||this.#o.Clerk===t.Clerk)&&this.#o.publishableKey===t.publishableKey||(this.#o=new e(t)),this.#o}static clearInstance(){this.#o=null}get domain(){return"undefined"!=typeof window&&window.location?(0,a.VK)(this.#t,new URL(window.location.href),""):"function"==typeof this.#t?i.r.throw(n.X):this.#t||""}get proxyUrl(){return"undefined"!=typeof window&&window.location?(0,a.VK)(this.#r,new URL(window.location.href),""):"function"==typeof this.#r?i.r.throw(n.X):this.#r||""}__internal_getOption(e){return this.clerkjs?.__internal_getOption?this.clerkjs?.__internal_getOption(e):this.options[e]}get __internal_moduleManager(){return this.clerkjs?.__internal_moduleManager}get __internal_protectChallengeLoadTimeoutMs(){return this.clerkjs?.__internal_protectChallengeLoadTimeoutMs}constructor(e){this.clerkjs=null,this.preopenOneTap=null,this.preopenUserVerification=null,this.preopenEnableOrganizationsPrompt=null,this.preopenSignIn=null,this.preopenCheckout=null,this.preopenPlanDetails=null,this.preopenSubscriptionDetail
32s=null,this.preopenSignUp=null,this.preopenUserProfile=null,this.preopenOrganizationProfile=null,this.preopenInviteMembers=null,this.preopenCreateOrganization=null,this.preOpenWaitlist=null,this.premountSignInNodes=new Map,this.premountSignUpNodes=new Map,this.premountUserAvatarNodes=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.premountWaitlistNodes=new Map,this.premountPricingTableNodes=new Map,this.premountAPIKeysNodes=new Map,this.premountConfigureSSONodes=new Map,this.premountConfigureDirectorySyncNodes=new Map,this.premountOAuthConsentNodes=new Map,this.premountOAuthDeviceVerificationNodes=new Map,this.premountTaskChooseOrganizationNodes=new Map,this.premountTaskResetPasswordNodes=new Map,this.premountTaskSetupMFANodes=new Map,this.premountAddListenerCalls=new Map,this.loadedListeners=[],this.#e="loading",this.#n=g(),this.__internal_windowNavigate=(e,t)=>{let r=this.clerkjs;if("function"==typeof r?.__internal_windowNavigate){r.__internal_windowNavigate(e,t);return}(0,h.M)()&&function(e,t){if("string"==typeof e&&_.test(function(e){let t=0;for(;t<e.length&&32>=e.charCodeAt(t);)t++;let r="";for(let i=t;i<e.length;i++){let t=e.charCodeAt(i);9!==t&&10!==t&&13!==t&&(r+=e[i])}return r}(e))){console.warn(`Clerk: scheme-relative navigation to "${e}" is not allowed. Provide a same-origin path or an absolute URL.`);return}let r=new URL(e,window.location.href);if(!(t?.allowedProtocols??k).includes(r.protocol)){console.warn(`Clerk: "${r.protocol}" is not a valid navigation protocol. Aborting navigation. If you think this is a mistake, please open an issue.`);return}window.dispatchEvent(new CustomEvent("clerk:beforeunload")),window.location.href=r.href}(e,{allowedProtocols:t?.useStaticAllowlistOnly?k:[...k,...this.options.allowedRedirectProtocols??[]]})},this.setProtectAssertion=e=>{let t=()=>this.clerkjs?.setProtectAssertion(e);this.clerkjs&&this.loaded?t():this.premountMethodCalls.set("setProtectAssertion",t)},this.buildSignInUrl=e=>{let t=()=>this.clerkjs?.buildSignInUrl(e)||"";if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set("buildSignInUrl",t)},this.buildSignUpUrl=e=>{let t=()=>this.clerkjs?.buildSignUpUrl(e)||"";if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set("buildSignUpUrl",t)},this.buildAfterSignInUrl=(...e)=>{let t=()=>this.clerkjs?.buildAfterSignInUrl(...e)||"";if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set("buildAfterSignInUrl",t)},this.buildAfterSignUpUrl=(...e)=>{let t=()=>this.clerkjs?.buildAfterSignUpUrl(...e)||"";if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set("buildAfterSignUpUrl",t)},this.buildAfterSignOutUrl=()=>{let e=()=>this.clerkjs?.buildAfterSignOutUrl()||"";if(this.clerkjs&&this.loaded)return e();this.premountMethodCalls.set("buildAfterSignOutUrl",e)},this.buildNewSubscriptionRedirectUrl=()=>{let e=()=>this.clerkjs?.buildNewSubscriptionRedirectUrl()||"";if(this.clerkjs&&this.loaded)return e();this.premountMethodCalls.set("buildNewSubscriptionRedirectUrl",e)},this.buildAfterMultiSessionSingleSignOutUrl=()=>{let e=()=>this.clerkjs?.buildAfterMultiSessionSingleSignOutUrl()||"";if(this.clerkjs&&this.loaded)return e();this.premountMethodCalls.set("buildAfterMultiSessionSingleSignOutUrl",e)},this.buildUserProfileUrl=()=>{let e=()=>this.clerkjs?.buildUserProfileUrl()||"";if(this.clerkjs&&this.loaded)return e();this.premountMethodCalls.set("buildUserProfileUrl",e)},this.buildCreateOrganizationUrl=()=>{let e=()=>this.clerkjs?.buildCreateOrganizationUrl()||"";if(this.clerkjs&&this.loaded)return e();this.premountMethodCalls.set("buildCreateOrganizationUrl",e)},this.buildOrganizationProfileUrl=()=>{let e=()=>this.clerkjs?.buildOrganizationProfileUrl()||"";if(this.clerkjs&&this.loaded)return e();this.premountMethodCalls.set("buildOrganizationProfileUrl",e)},this.buildWaitlistUrl=()=>{let e=()=>this.clerkjs?.buildWaitlistUrl()||"";if(this.clerkjs&&this.loaded)return e();this.premountMethodCalls.set("buildWaitlistUrl",e)},this.buildTasksUrl=()=>{let e=()=>this.clerkjs?.buildTasksUrl()||"";if(this.clerkjs&&this.loaded)return e();this.premountMethodCalls.set("buildTasksUrl",e)},this.buildUrlWithAuth=e=>{let t=()=>this.clerkjs?.buildUrlWithAuth(e)||"";if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set("buildUrlWithAuth",t)},this.handleUnauthenticated=async()=>{let e=()=>this.clerkjs?.handleUnauthenticated();this.clerkjs&&this.loaded?e():this.premountMethodCalls.set("handleUnauthenticated",e)},this.on=(...e)=>{if(this.clerkjs?.on)return this.clerkjs.on(...e);this.#n.on(...e)}
32,this.off=(...e)=>{if(this.clerkjs?.off)return this.clerkjs.off(...e);this.#n.off(...e)},this.addOnLoaded=e=>{this.loadedListeners.push(e),this.loaded&&this.emitLoaded()},this.emitLoaded=()=>{this.loadedListeners.forEach(e=>e()),this.loadedListeners=[]},this.beforeLoad=e=>{if(!e)throw Error("Failed to hydrate latest Clerk JS")},this.replayInterceptedInvocations=e=>{if(!e)throw Error("Failed to hydrate latest Clerk JS");return this.clerkjs=e,this.premountMethodCalls.forEach(e=>e()),this.premountAddListenerCalls.forEach((t,r)=>{t.handlers.nativeUnsubscribe=e.addListener(r,t.options)}),this.#n.internal.retrieveListeners("status")?.forEach(e=>{this.on("status",e,{notify:!0})}),null!==this.preopenSignIn&&e.openSignIn(this.preopenSignIn),null!==this.preopenCheckout&&e.__internal_openCheckout(this.preopenCheckout),null!==this.preopenPlanDetails&&e.__internal_openPlanDetails(this.preopenPlanDetails),null!==this.preopenSubscriptionDetails&&e.__internal_openSubscriptionDetails(this.preopenSubscriptionDetails),null!==this.preopenSignUp&&e.openSignUp(this.preopenSignUp),null!==this.preopenUserProfile&&e.openUserProfile(this.preopenUserProfile),null!==this.preopenUserVerification&&e.__internal_openReverification(this.preopenUserVerification),null!==this.preopenOneTap&&e.openGoogleOneTap(this.preopenOneTap),null!==this.preopenOrganizationProfile&&e.openOrganizationProfile(this.preopenOrganizationProfile),null!==this.preopenInviteMembers&&e.openInviteMembers(this.preopenInviteMembers),null!==this.preopenCreateOrganization&&e.openCreateOrganization(this.preopenCreateOrganization),null!==this.preOpenWaitlist&&e.openWaitlist(this.preOpenWaitlist),this.preopenEnableOrganizationsPrompt&&e.__internal_openEnableOrganizationsPrompt(this.preopenEnableOrganizationsPrompt),this.premountSignInNodes.forEach((t,r)=>{e.mountSignIn(r,t)}),this.premountSignUpNodes.forEach((t,r)=>{e.mountSignUp(r,t)}),this.premountUserProfileNodes.forEach((t,r)=>{e.mountUserProfile(r,t)}),this.premountUserAvatarNodes.forEach((t,r)=>{e.mountUserAvatar(r,t)}),this.premountUserButtonNodes.forEach((t,r)=>{e.mountUserButton(r,t)}),this.premountOrganizationListNodes.forEach((t,r)=>{e.mountOrganizationList(r,t)}),this.premountWaitlistNodes.forEach((t,r)=>{e.mountWaitlist(r,t)}),this.premountPricingTableNodes.forEach((t,r)=>{e.mountPricingTable(r,t)}),this.premountAPIKeysNodes.forEach((t,r)=>{e.mountAPIKeys(r,t)}),this.premountConfigureSSONodes.forEach((t,r)=>{e.__internal_mountConfigureSSO(r,t)}),"function"==typeof e.__internal_mountConfigureDirectorySync&&this.premountConfigureDirectorySyncNodes.forEach((t,r)=>{e.__internal_mountConfigureDirectorySync(r,t)}),this.premountOAuthConsentNodes.forEach((t,r)=>{e.__internal_mountOAuthConsent(r,t)}),"function"==typeof e.__internal_mountOAuthDeviceVerification&&this.premountOAuthDeviceVerificationNodes.forEach((t,r)=>{e.__internal_mountOAuthDeviceVerification(r,t)}),this.premountTaskChooseOrganizationNodes.forEach((t,r)=>{e.mountTaskChooseOrganization(r,t)}),this.premountTaskResetPasswordNodes.forEach((t,r)=>{e.mountTaskResetPassword(r,t)}),this.premountTaskSetupMFANodes.forEach((t,r)=>{e.mountTaskSetupMFA(r,t)}),void 0===this.clerkjs.status&&this.#n.emit(f.Status,"ready"),this.emitLoaded(),this.clerkjs},this.__experimental_checkout=(...e)=>this.loaded&&this.clerkjs?this.clerkjs.__experimental_checkout(...e):this.#s.checkoutSignal(...e),this.__internal_updateProps=async e=>{let t=await this.#a();if(t&&"__internal_updateProps"in t)return t.__internal_updateProps(e)},this.setActive=e=>this.clerkjs?this.clerkjs.setActive(e):Promise.reject(),this.openSignIn=e=>{this.clerkjs&&this.loaded?this.clerkjs.openSignIn(e):this.preopenSignIn=e},this.closeSignIn=()=>{this.clerkjs&&this.loaded?this.clerkjs.closeSignIn():this.preopenSignIn=null},this.__internal_openCheckout=e=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_openCheckout(e):this.preopenCheckout=e},this.__internal_closeCheckout=()=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_closeCheckout():this.preopenCheckout=null},this.__internal_openPlanDetails=e=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_openPlanDetails(e):this.preopenPlanDetails=e},this.__internal_closePlanDetails=()=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_closePlanDetails():this.preopenPlanDetails=null}
32,this.__internal_openSubscriptionDetails=e=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_openSubscriptionDetails(e):this.preopenSubscriptionDetails=e??null},this.__internal_closeSubscriptionDetails=()=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_closeSubscriptionDetails():this.preopenSubscriptionDetails=null},this.__internal_openReverification=e=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_openReverification(e):this.preopenUserVerification=e},this.__internal_closeReverification=()=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_closeReverification():this.preopenUserVerification=null},this.__internal_openEnableOrganizationsPrompt=e=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_openEnableOrganizationsPrompt(e):this.preopenEnableOrganizationsPrompt=e},this.__internal_closeEnableOrganizationsPrompt=()=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_closeEnableOrganizationsPrompt():this.preopenEnableOrganizationsPrompt=null},this.openGoogleOneTap=e=>{this.clerkjs&&this.loaded?this.clerkjs.openGoogleOneTap(e):this.preopenOneTap=e},this.closeGoogleOneTap=()=>{this.clerkjs&&this.loaded?this.clerkjs.closeGoogleOneTap():this.preopenOneTap=null},this.openUserProfile=e=>{this.clerkjs&&this.loaded?this.clerkjs.openUserProfile(e):this.preopenUserProfile=e},this.closeUserProfile=()=>{this.clerkjs&&this.loaded?this.clerkjs.closeUserProfile():this.preopenUserProfile=null},this.openOrganizationProfile=e=>{this.clerkjs&&this.loaded?this.clerkjs.openOrganizationProfile(e):this.preopenOrganizationProfile=e},this.closeOrganizationProfile=()=>{this.clerkjs&&this.loaded?this.clerkjs.closeOrganizationProfile():this.preopenOrganizationProfile=null},this.openInviteMembers=e=>{this.clerkjs&&this.loaded?this.clerkjs.openInviteMembers(e):this.preopenInviteMembers=e},this.closeInviteMembers=()=>{this.clerkjs&&this.loaded?this.clerkjs.closeInviteMembers():this.preopenInviteMembers=null},this.openCreateOrganization=e=>{this.clerkjs&&this.loaded?this.clerkjs.openCreateOrganization(e):this.preopenCreateOrganization=e},this.closeCreateOrganization=()=>{this.clerkjs&&this.loaded?this.clerkjs.closeCreateOrganization():this.preopenCreateOrganization=null},this.openWaitlist=e=>{this.clerkjs&&this.loaded?this.clerkjs.openWaitlist(e):this.preOpenWaitlist=e},this.closeWaitlist=()=>{this.clerkjs&&this.loaded?this.clerkjs.closeWaitlist():this.preOpenWaitlist=null},this.openSignUp=e=>{this.clerkjs&&this.loaded?this.clerkjs.openSignUp(e):this.preopenSignUp=e},this.closeSignUp=()=>{this.clerkjs&&this.loaded?this.clerkjs.closeSignUp():this.preopenSignUp=null},this.mountSignIn=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountSignIn(e,t):this.premountSignInNodes.set(e,t)},this.unmountSignIn=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountSignIn(e):this.premountSignInNodes.delete(e)},this.mountSignUp=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountSignUp(e,t):this.premountSignUpNodes.set(e,t)},this.unmountSignUp=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountSignUp(e):this.premountSignUpNodes.delete(e)},this.mountUserAvatar=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountUserAvatar(e,t):this.premountUserAvatarNodes.set(e,t)},this.unmountUserAvatar=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountUserAvatar(e):this.premountUserAvatarNodes.delete(e)},this.mountUserProfile=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountUserProfile(e,t):this.premountUserProfileNodes.set(e,t)},this.unmountUserProfile=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountUserProfile(e):this.premountUserProfileNodes.delete(e)},this.mountOrganizationProfile=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountOrganizationProfile(e,t):this.premountOrganizationProfileNodes.set(e,t)},this.unmountOrganizationProfile=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountOrganizationProfile(e):this.premountOrganizationProfileNodes.delete(e)},this.mountCreateOrganization=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountCreateOrganization(e,t):this.premountCreateOrganizationNodes.set(e,t)},this.unmountCreateOrganization=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountCreateOrganization(e):this.premountCreateOrganizationNodes.delete(e)},this.mountOrganizationSwitcher=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountOrganizationSwitcher(e,t):this.premountOrganizationSwitcherNodes.set(e,t)},this.unmountOrganizationSwitcher=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountOrganizationSwitcher(e):this.premountOrganizationSwitcherNodes.delete(e)},this.__experimental_prefetchOrganizationSwitcher=()=>{let e=()=>this.clerkjs?.__experimental_prefetchOrganizationSwitcher();this.clerkjs&&this.loaded?e():this.premountMethodCalls.set("__experimental_prefetchOrganizationSwitcher",e)},this.mountOrganizationList=(e,t)=>
32{this.clerkjs&&this.loaded?this.clerkjs.mountOrganizationList(e,t):this.premountOrganizationListNodes.set(e,t)},this.unmountOrganizationList=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountOrganizationList(e):this.premountOrganizationListNodes.delete(e)},this.mountUserButton=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountUserButton(e,t):this.premountUserButtonNodes.set(e,t)},this.unmountUserButton=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountUserButton(e):this.premountUserButtonNodes.delete(e)},this.mountWaitlist=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountWaitlist(e,t):this.premountWaitlistNodes.set(e,t)},this.unmountWaitlist=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountWaitlist(e):this.premountWaitlistNodes.delete(e)},this.mountPricingTable=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountPricingTable(e,t):this.premountPricingTableNodes.set(e,t)},this.unmountPricingTable=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountPricingTable(e):this.premountPricingTableNodes.delete(e)},this.mountAPIKeys=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountAPIKeys(e,t):this.premountAPIKeysNodes.set(e,t)},this.unmountAPIKeys=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountAPIKeys(e):this.premountAPIKeysNodes.delete(e)},this.__internal_mountConfigureSSO=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_mountConfigureSSO(e,t):this.premountConfigureSSONodes.set(e,t)},this.__internal_unmountConfigureSSO=e=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_unmountConfigureSSO(e):this.premountConfigureSSONodes.delete(e)},this.__internal_mountConfigureDirectorySync=(e,t)=>{this.clerkjs&&this.loaded?"function"==typeof this.clerkjs.__internal_mountConfigureDirectorySync&&this.clerkjs.__internal_mountConfigureDirectorySync(e,t):this.premountConfigureDirectorySyncNodes.set(e,t)},this.__internal_unmountConfigureDirectorySync=e=>{this.clerkjs&&this.loaded&&"function"==typeof this.clerkjs.__internal_unmountConfigureDirectorySync&&this.clerkjs.__internal_unmountConfigureDirectorySync(e),this.premountConfigureDirectorySyncNodes.delete(e)},this.__internal_mountOAuthConsent=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_mountOAuthConsent(e,t):this.premountOAuthConsentNodes.set(e,t)},this.__internal_unmountOAuthConsent=e=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_unmountOAuthConsent(e):this.premountOAuthConsentNodes.delete(e)},this.mountOAuthConsent=(e,t)=>{this.__internal_mountOAuthConsent(e,t)},this.unmountOAuthConsent=e=>{this.__internal_unmountOAuthConsent(e)},this.__internal_mountOAuthDeviceVerification=(e,t)=>{this.clerkjs&&this.loaded?"function"==typeof this.clerkjs.__internal_mountOAuthDeviceVerification&&this.clerkjs.__internal_mountOAuthDeviceVerification(e,t):this.premountOAuthDeviceVerificationNodes.set(e,t)},this.__internal_unmountOAuthDeviceVerification=e=>{this.clerkjs&&this.loaded&&"function"==typeof this.clerkjs.__internal_unmountOAuthDeviceVerification&&this.clerkjs.__internal_unmountOAuthDeviceVerification(e),this.premountOAuthDeviceVerificationNodes.delete(e)},this.mountTaskChooseOrganization=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountTaskChooseOrganization(e,t):this.premountTaskChooseOrganizationNodes.set(e,t)},this.unmountTaskChooseOrganization=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountTaskChooseOrganization(e):this.premountTaskChooseOrganizationNodes.delete(e)},this.mountTaskResetPassword=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountTaskResetPassword(e,t):this.premountTaskResetPasswordNodes.set(e,t)},this.unmountTaskResetPassword=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountTaskResetPassword(e):this.premountTaskResetPasswordNodes.delete(e)},this.mountTaskSetupMFA=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountTaskSetupMFA(e,t):this.premountTaskSetupMFANodes.set(e,t)},this.unmountTaskSetupMFA=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountTaskSetupMFA(e):this.premountTaskSetupMFANodes.delete(e)},this.addListener=(e,t)=>{if(this.clerkjs)return this.clerkjs.addListener(e,t);{let r=()=>{let t=this.premountAddListenerCalls.get(e);t?.handlers&&(t?.handlers.nativeUnsubscribe?.(),this.premountAddListenerCalls.delete(e))};return this.premountAddListenerCalls.set(e,{options:t,handlers:{unsubscribe:r,nativeUnsubscribe:void 0}}),r}},this.navigate=e=>{let t=()=>this.clerkjs?.navigate(e);this.clerkjs&&this.loaded?t():this.premountMethodCalls.set("navigate",t)},this.redirectWithAuth=async(...e)=>{let t=()=>this.clerkjs?.redirectWithAuth(...e);if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set("redirectWithAuth",t)},this.redirectToSignIn=async e=>{let t=()=>this.clerkjs?.redirectToSignIn(e);if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set("redirectToSignIn",t)},this.redirectToSignUp=async e=>{let t=()=>this.clerkjs?.redirectToSignUp(e);if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set("redirectToSignUp",t)},this.redirectToUserProfile=async()=>{let e=()=>this.clerkjs?.redirectToUserProfile();if(this.clerkjs&&this.loaded)return e();this.premountMethodCalls.set("redirectToUserProfile",e)},this.redirectToAfterSignUp=()=>{let e=()=>this.clerkjs?.redirectToAfterSignUp();if(this.clerkjs&&this.loaded)return e();this.premountMethodCalls.set("redirectToAfterSignUp",e)},this.redirectToAfterSignIn=()=>{let e=()=>this.clerkjs?.redirectToAfterSignIn();this.clerkjs&&this.loaded?e():this.premountMethodCalls.set("redirectToAfterSignIn",e)},this.redirectToAfterSignOut=()=>{let e=()=>this.clerkjs?.redirectToAfterSignOut();this.clerkjs&&this.loaded?e():this.premountMethodCalls.set("redirectToAfterSignOut",e)},this.redirectToOrganizationProfile=async()=>{let e=()=>this.clerkjs?.redirectToOrganizationProfile();if(this.clerkjs&&this.loaded)return e();this.premountMethodCalls.set("redirectToOrganizationProfile",e)},this.redirectToCreateOrganization=async()=>{let e=()=>this.clerkjs?.redirectToCreateOrganization();if(this.clerkjs&&this.loaded)return e();this.premountMethodCalls.set("redirectToCreateOrganization",e)},this.redirectToWaitlist=async()=>{let e=()=>this.clerkjs?.redirectToWaitlist();if(this.clerkjs&&this.loaded)return e();this.premountMethodCalls.set("redirectToWaitlist",e)},this.redirectToTasks=async e=>{let t=()=>this.clerkjs?.redirectToTasks(e);if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set("redirectToTasks",t)},this.handleRedirectCallback=async e=>{let t=()=>this.clerkjs?.handleRedirectCallback(e);this.clerkjs&&this.loaded?t()?.catch(()=>{}):this.premountMethodCalls.set("handleRedirectCallback",t)},this.__internal_resumeAfterProtectCheck=async(e,t)=>{let r=()=>{let r=this.clerkjs;"function"==typeof r?.__internal_resumeAfterProtectCheck&&r.__internal_resumeAfterProtectCheck(e,t)?.catch(()=>{})};this.clerkjs&&this.loaded?r():this.premountMethodCalls.set("__internal_resumeAfterProtectCheck",r)},this.handleGoogleOneTapCallback=async(e,t)=>{let r=()=>this.clerkjs?.handleGoogleOneTapCallback(e,t);this.clerkjs&&this.loaded?r()?.catch(()=>{}):this.premountMethodCalls.set("handleGoogleOneTapCallback",r)},this.__internal_handleResourceCallback=async(e,t,r)=>{let i=()=>this.clerkjs?.__internal_handleResourceCallback(e,t,r);if(this.clerkjs&&this.loaded)return i();this.premountMethodCalls.set("__internal_handleResourceCallback",i)},this.handleEmailLinkVerification=async e=>{let t=()=>this.clerkjs?.handleEmailLinkVerification(e);if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set("handleEmailLinkVerification",t)},this.authenticateWithMetamask=async e=>{let t=()=>this.clerkjs?.authenticateWithMetamask(e);if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set("authenticateWithMetamask",t)},this.authenticateWithCoinbaseWallet=async e=>{let t=()=>this.clerkjs?.authenticateWithCoinbaseWallet(e);if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set("authenticateWithCoinbaseWallet",t)},this.authenticateWithBase=async e=>{let t=()=>this.clerkjs?.authenticateWithBase(e);if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set("authenticateWithBase",t)},this.authenticateWithOKXWallet=async e=>{let t=()=>this.clerkjs?.authenticateWithOKXWallet(e);if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set("authenticateWithOKXWallet",t)},this.authenticateWithSolana=async e=>{let t=()=>this.clerkjs?.authenticateWithSolana(e);if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set("authenticateWithSolana",t)},this.authenticateWithWeb3=async e=>{let t=()=>this.clerkjs?.authenticateWithWeb3(e);
32if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set("authenticateWithWeb3",t)},this.authenticateWithGoogleOneTap=async e=>(await this.#a()).authenticateWithGoogleOneTap(e),this.__internal_loadStripeJs=async()=>(await this.#a()).__internal_loadStripeJs(),this.createOrganization=async e=>{let t=()=>this.clerkjs?.createOrganization(e);if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set("createOrganization",t)},this.getOrganization=async e=>{let t=()=>this.clerkjs?.getOrganization(e);if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set("getOrganization",t)},this.joinWaitlist=async e=>{let t=()=>this.clerkjs?.joinWaitlist(e);if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set("joinWaitlist",t)},this.signOut=async(...e)=>{let t=()=>this.clerkjs?.signOut(...e);if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set("signOut",t)},this.__internal_attemptToEnableEnvironmentSetting=e=>{let t=()=>this.clerkjs?.__internal_attemptToEnableEnvironmentSetting(e);if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set("__internal_attemptToEnableEnvironmentSetting",t)},this.#i=e?.publishableKey,this.#r=e?.proxyUrl,this.#t=e?.domain,this.options=e,this.Clerk=e?.Clerk||null,this.mode=(0,h.M)()?"browser":"server",this.#s=new j(this),this.options.sdkMetadata||(this.options.sdkMetadata=O),this.#n.emit(f.Status,"loading"),this.#n.prioritizedOn(f.Status,e=>this.#e=e),this.#i&&this.options.experimental?.runtimeEnvironment==="headless"&&this.options.Clerk?this.loadHeadlessClerk():this.#i&&this.getEntryChunks()}loadHeadlessClerk(){let e=(0,n.H)(this.options.Clerk)?new this.options.Clerk(this.#i,{proxyUrl:this.proxyUrl,domain:this.domain}):this.options.Clerk;if(!e){this.#n.emit(f.Status,"error");return}let t=()=>{this.replayInterceptedInvocations(e)};e.loaded?t():e.load(this.options).then(()=>t()).catch(e=>{this.#n.emit(f.Status,"error"),this.emitLoaded()})}get sdkMetadata(){return this.clerkjs?.sdkMetadata||this.options.sdkMetadata||void 0}get instanceType(){return this.clerkjs?.instanceType}get frontendApi(){return this.clerkjs?.frontendApi||""}get isStandardBrowser(){return this.clerkjs?.isStandardBrowser||this.options.standardBrowser||!1}get isSatellite(){return"undefined"!=typeof window&&window.location?(0,a.VK)(this.options.isSatellite,new URL(window.location.href),!1):"function"==typeof this.options.isSatellite&&i.r.throw(n.X)}#a(){return new Promise(e=>{this.addOnLoaded(()=>e(this.clerkjs))})}async getEntryChunks(){if("browser"===this.mode&&!this.loaded){"undefined"!=typeof window&&(window.__clerk_publishable_key=this.#i,window.__clerk_proxy_url=this.proxyUrl,window.__clerk_domain=this.domain);try{let e=await this.getClerkJsEntryChunk();if(!e.loaded){this.beforeLoad(e);let t=!1!==this.options.standardBrowser&&!this.options.Clerk||this.options.ui?.ClerkUI?await this.getClerkUIEntryChunk():void 0;await e.load({...this.options,ui:{...this.options.ui,ClerkUI:t}})}e.loaded&&this.replayInterceptedInvocations(e)}catch(e){this.#n.emit(f.Status,"error"),console.error(e.stack||e.message||e);return}}}async getClerkJsEntryChunk(){if(this.options.Clerk&&!this.options.__internal_clerkJSUrl||__BUILD_DISABLE_RHC__||await (0,o.aj)({...this.options,publishableKey:this.#i,proxyUrl:this.proxyUrl,domain:this.domain,nonce:this.options.nonce}),this.options.Clerk&&!this.options.__internal_clerkJSUrl&&(globalThis.Clerk=(0,n.H)(this.options.Clerk)?new this.options.Clerk(this.#i,{proxyUrl:this.proxyUrl,domain:this.domain}):this.options.Clerk),!globalThis.Clerk)throw Error("Failed to download latest ClerkJS. Contact [email protected].");return globalThis.Clerk}async getClerkUIEntryChunk(){let e=this.options.ui,t=!!this.options.__internal_clerkUIUrl;if(e?.ClerkUI&&!t)return e.ClerkUI;if((!e&&!1!==this.options.prefetchUI||t)&&!__BUILD_DISABLE_RHC__){if(await (0,o.DU)({...this.options,publishableKey:this.#i,proxyUrl:this.proxyUrl,domain:this.domain,nonce:this.options.nonce}),!globalThis.__internal_ClerkUICtor)throw Error("Failed to download latest Clerk UI. Contact [email protected].");return globalThis.__internal_ClerkUICtor}}get version(){return this.clerkjs?.version}get uiVersion(){return this.clerkjs?.uiVersion}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 __internal_environment(){return this.clerkjs?this.clerkjs.__internal_environment:void 0}get isSignedIn(){return!!this.clerkjs&&this.clerkjs.isSignedIn}get billing(){return this.clerkjs?.billing}get __internal_state(){return this.loaded&&this.clerkjs?this.clerkjs.__internal_state:this.#s}get apiKeys(){return this.clerkjs?.apiKeys}get oauthApplication(){return this.clerkjs?.oauthApplication}__internal_setEnvironment(...e){this.clerkjs&&"__internal_setEnvironment"in this.clerkjs&&this.clerkjs.__internal_setEnvironment(e)}get __internal_lastEmittedResources(){return this.clerkjs?.__internal_lastEmittedResources}get __internal_hasOAuthTransport(){return this.clerkjs?.__internal_hasOAuthTransport||!1}get __internal_oauthTransport(){return this.clerkjs?.__internal_oauthTransport||null}};let E=function(){try{return function(e,t){let r=function(e){let t=e.match(/^(\d+)\.(\d+)\.(\d+)/);if(!t)return null;let[,r,i,n]=t;return{major:parseInt(r,10),minor:parseInt(i,10),patch:parseInt(n,10)}}(e);if(!r)return!1;let{major:i,minor:n,patch:s}=r;return t.some(([e,t,r,o])=>i===e&&(-1===r?n>t||n===t&&s>=o:n===r&&s>=o))}(s.version,[[18,0,-1,0],[19,0,0,3],[19,1,1,4],[19,2,2,3],[19,3,3,0]])}catch{return!1}}();function M(e){let{initialState:t,children:r,...i}=e,{isomorphicClerk:o,clerkStatus:a}=T((0,n.U)(i));return s.createElement(l.Ow,{initialState:t,clerk:o,clerkStatus:a},r)}let I=function(e){return s.useContext(l.ED)&&i.r.throw(n.J),s.createElement(M,e)};I.displayName="ClerkProvider";let A=E?"shared":"",T=e=>{let t=s.useMemo(()=>({clerkUIVariant:A,...e}),[e]),r=s.useRef(U.getOrCreateInstance(t)),[i,n]=s.useState(r.current.status);return s.useEffect(()=>{r.current.__internal_updateProps({appearance:e.appearance})},[e.appearance]),s.useEffect(()=>{r.current.__internal_updateProps({options:e})},[e.localization]),s.useEffect(()=>(r.current.on("status",n),()=>{r.current&&r.current.off("status",n),U.clearInstance()}),[]),{isomorphicClerk:r.current,clerkStatus:i}}},34090:(e,t,r)=>{r.d(t,{F:()=>el,G:()=>w,H:()=>O,J:()=>f,K:()=>v,R:()=>en,U:()=>j,V:()=>H,W:()=>C,X:()=>k,_:()=>em,f:()=>h.D_,g:()=>h.Jd,m:()=>h.wV,s:()=>h.ho,u:()=>h.Z5,x:()=>ep});var i=r(84610),n=r(12115),s=r(47650),o=r(23789),a=r(34349),l=r(36530);let u=(e,...t)=>{let r={...e};for(let e of t)delete r[e];return r};var h=r(54707),c=r(90492),d=r(36898),p=r(18647),m=r(87039);let f="You've added multiple <ClerkProvider> components in your React component tree. Wrap your components in a single <ClerkProvider>.",g=e=>`You've passed multiple children components to <${e}/>. You can only pass a single child component or text.`,k="Unsupported usage of isSatellite, domain or proxyUrl. The usage of isSatellite, domain or proxyUrl as function is not supported in non-browser environments.",_=e=>`<${e} /> can only accept <${e}.Page /> and <${e}.Link /> as its children. Any other provided component will be ignored. Additionally, please ensure that the component is rendered in a client component.`,y=e=>`Missing props. <${e}.Page /> component requires the following props: url, label, labelIcon, alongside with children to be rendered inside the page.`,b=e=>`Missing props. <${e}.Link /> component requires the following props: url, label and labelIcon.`,C=e=>t=>{try{return n.Children.only(e)}catch{let r=n.Children.toArray(e);if(1===r.length&&n.isValidElement(r[0]))return r[0];return i.r.throw(g(t))}},w=(e,t)=>(e||(e=t),"string"==typeof e&&(e=n.createElement("button",null,e)),e),v=e=>(...t)=>{if(e&&"function"==typeof e)return e(...t)},P=e=>(0,l.m)(`VITE_${e}`)||(0,l.m)(e),S=(e,t)=>void 0!==e?e:P(t)||void 0,j=e=>{let t=S(e.publishableKey,"CLERK_PUBLISHABLE_KEY");return{...e,...void 0!==t&&{publishableKey:t}}};function O(e){return"function"==typeof e}let U=e=>
32{let[t,r]=(0,n.useState)(new Map),i=(0,n.useRef)(t),o=(0,n.useRef)(new Map),a=(0,n.useRef)(new Map);i.current=t,o.current=new Map(e.map(e=>[e.id,e.component]));let l=new Set(e.map(e=>e.id));return a.current.forEach((e,t)=>{l.has(t)||a.current.delete(t)}),e.map(e=>{let t=e.id,n=a.current.get(t);if(n)return n;let l={id:e.id,mount:e=>r(r=>new Map(r).set(t,e)),unmount:()=>r(e=>{let r=new Map(e);return r.set(t,null),r}),portal:()=>{let e=i.current.get(t),r=o.current.get(t);return e?(0,s.createPortal)(r,e):null}};return a.current.set(t,l),l})},E=(e,t)=>!!e&&n.isValidElement(e)&&e?.type===t,M=(e,t)=>T({children:e,reorderItemsLabels:["account","security","billing","apiKeys"],LinkComponent:Z,PageComponent:Y,MenuItemsComponent:et,componentName:"UserProfile"},t),I=(e,t)=>T({children:e,reorderItemsLabels:["general","members","billing","apiKeys"],LinkComponent:eo,PageComponent:es,componentName:"OrganizationProfile"},t),A=e=>{let t=[],r=[eo,es,et,Y,Z];return n.Children.forEach(e,e=>{r.some(t=>E(e,t))||t.push(e)}),t},T=(e,t)=>{let{children:r,LinkComponent:i,PageComponent:s,MenuItemsComponent:o,reorderItemsLabels:l,componentName:u}=e,{allowForAnyChildren:h=!1}=t||{},c=[],d=new Map;n.Children.forEach(r,e=>{if(!E(e,s)&&!E(e,i)&&!E(e,o)){e&&!h&&(0,a.s2)(_(u));return}let{props:t}=e,{children:r,label:n,url:p,labelIcon:m}=t,f=e.key;if(E(e,s))if(R(t,l))c.push({label:n});else if(L(t))c.push({label:n,labelIcon:m,children:r,url:p,portalId:z("page",t,f,d)});else{(0,a.s2)(y(u));return}if(E(e,i))if(x(t))c.push({label:n,labelIcon:m,url:p,portalId:z("link",t,f,d)});else{(0,a.s2)(b(u));return}});let p=[],m=[],f=[];c.forEach((e,t)=>{if(L(e)){p.push({component:e.children,id:e.portalId||t}),m.push({component:e.labelIcon,id:e.portalId||t});return}x(e)&&f.push({component:e.labelIcon,id:e.portalId||t})});let g=U(p),k=U(m),C=U(f),w=[],v=[];return c.forEach((e,t)=>{if(R(e,l)){w.push({label:e.label});return}if(L(e)){let{portal:r,mount:i,unmount:n}=g.find(r=>r.id===(e.portalId||t)),{portal:s,mount:o,unmount:a}=k.find(r=>r.id===(e.portalId||t));w.push({label:e.label,url:e.url,mount:i,unmount:n,mountIcon:o,unmountIcon:a}),v.push({key:`content:${e.portalId||t}`,portal:r}),v.push({key:`label:${e.portalId||t}`,portal:s});return}if(x(e)){let{portal:r,mount:i,unmount:n}=C.find(r=>r.id===(e.portalId||t));w.push({label:e.label,url:e.url,mountIcon:i,unmountIcon:n}),v.push({key:`label:${e.portalId||t}`,portal:r});return}}),{customPages:w,customPagesPortals:v}},z=(e,t,r,i)=>{if(null!=r)return`${e}:key:${r}`;let n=`${e}:${t.label}:${t.url}`,s=i.get(n)??0;return i.set(n,s+1),`${n}:${s}`},R=(e,t)=>{let{children:r,label:i,url:n,labelIcon:s}=e;return!r&&!n&&!s&&t.some(e=>e===i)},L=e=>{let{children:t,label:r,url:i,labelIcon:n}=e;return!!t&&!!i&&!!n&&!!r},x=e=>{let{children:t,label:r,url:i,labelIcon:n}=e;return!t&&!!i&&!!n&&!!r},N=(e,t)=>W({children:e,reorderItemsLabels:["manageAccount","signOut"],MenuItemsComponent:et,MenuActionComponent:er,MenuLinkComponent:ei,UserProfileLinkComponent:Z,UserProfilePageComponent:Y,allowForAnyChildren:t?.allowForAnyChildren??!1}),W=({children:e,MenuItemsComponent:t,MenuActionComponent:r,MenuLinkComponent:i,UserProfileLinkComponent:s,UserProfilePageComponent:o,reorderItemsLabels:l,allowForAnyChildren:u=!1})=>{let h=[],c=[],d=[],p=new Map;n.Children.forEach(e,e=>{if(!E(e,t)&&!E(e,s)&&!E(e,o)){e&&!u&&(0,a.s2)("<UserButton /> can only accept <UserButton.UserProfilePage />, <UserButton.UserProfileLink /> and <UserButton.MenuItems /> as its children. Any other provided component will be ignored. Additionally, please ensure that the component is rendered in a client component.");return}if(E(e,s)||E(e,o))return;let{props:c}=e;n.Children.forEach(c.children,e=>{if(!E(e,r)&&!E(e,i)){e&&(0,a.s2)("<UserButton.MenuItems /> component can only accept <UserButton.Action /> and <UserButton.Link /> as its children. Any other provided component will be ignored. Additionally, please ensure that the component is rendered in a client component.");return}let{props:t}=e,n=e.key,{label:s,labelIcon:o,href:u,onClick:c,open:d}=t;if(E(e,r))if(F(t,l))h.push({label:s});else if(B(t)){let e={label:s,labelIcon:o};if(void 0!==c)h.push({...e,onClick:c,portalId:D("action",t,n,p)});else if(void 0!==d)h.push({...e,open:d.startsWith("/")?d:`/${d}`,portalId:D("action",t,n,p)});else{(0,a.s2)("Custom menu item must have either onClick or open property");return}}else{(0,a.s2)("Missing props. <UserButton.Action /> component requires the following props: label.");return}if(E(e,i))if($(t))h.push({label:s,labelIcon:o,href:u,portalId:D("link",t,n,p)});else{(0,a.s2)("Missing props. <UserButton.Link /> component requires the following props: href, label and labelIcon.");return}})});let m=[],f=[];h.forEach((e,t)=>{B(e)&&m.push({component:e.labelIcon,id:e.portalId||t}),$(e)&&f.push({component:e.labelIcon,id:e.portalId||t})});let g=U(m),k=U(f);return h.forEach((e,t)=>{if(F(e,l)&&c.push({label:e.label}),B(e)){let{portal:r,mount:i,unmount:n}=g.find(r=>r.id===(e.portalId||t)),s={label:e.label,mountIcon:i,unmountIcon:n};"onClick"in e?s.onClick=e.onClick:"open"in e&&(s.open=e.open),c.push(s),d.push({key:`icon:${e.portalId||t}`,portal:r})}if($(e)){let{portal:r,mount:i,unmount:n}=k.find(r=>r.id===(e.portalId||t));c.push({label:e.label,href:e.href,mountIcon:i,unmountIcon:n}),d.push({key:`icon:${e.portalId||t}`,portal:r})}}),{customMenuItems:c,customMenuItemsPortals:d}},D=(e,t,r,i)=>{if(null!=r)return`${e}:key:${r}`;let n=t.href||t.open||"",s=`${e}:${t.label}:${n}
32`,o=i.get(s)??0;return i.set(s,o+1),`${s}:${o}`},F=(e,t)=>{let{children:r,label:i,onClick:n,labelIcon:s}=e;return!r&&!n&&!s&&t.some(e=>e===i)},B=e=>{let{label:t,labelIcon:r,onClick:i,open:n}=e;return!!r&&!!t&&("function"==typeof i||"string"==typeof n)},$=e=>{let{label:t,href:r,labelIcon:i}=e;return!!r&&!!i&&!!t},K=(e=>{let t=e?.isReady;return r=>new Promise((i,n)=>{let{root:s=document?.body,selector:o,timeout:a=0}=r;if(!s){n(Error("No root element provided"));return}let l=s;if(o&&(l=s?.querySelector(o)),t(l,o)){i();return}let u=new MutationObserver(r=>{for(let n of r)if(!l&&o&&(l=s?.querySelector(o)),(e.childList&&"childList"===n.type||e.attributes&&"attributes"===n.type)&&t(l,o)){u.disconnect(),i();return}});u.observe(s,e),a>0&&setTimeout(()=>{u.disconnect(),n(Error(`Timeout waiting for ${o}`))},a)})})({childList:!0,subtree:!0,isReady:(e,t)=>!!e?.childElementCount&&e?.matches?.(t)&&e.childElementCount>0});function V(e,t){let r=(0,n.useRef)(),[i,s]=(0,n.useState)("rendering");return(0,n.useEffect)(()=>{if(!e)throw Error("Clerk: no component name provided, unable to detect mount.");if("undefined"!=typeof window&&!r.current){let i=`[data-clerk-component="${e}"]`,n=t?.selector;r.current=K({selector:n?i+n:i}).then(()=>{s("rendered")}).catch(()=>{s("error")})}},[e,t?.selector]),i}let q=e=>"mount"in e,G=e=>"open"in e,Q=e=>e?.map(({mountIcon:e,unmountIcon:t,...r})=>r);var J=class extends n.PureComponent{constructor(...e){super(...e),this.rootRef=n.createRef()}componentDidUpdate(e){if(!q(e)||!q(this.props))return;let t=u(e.props||{},"customPages","customMenuItems","children"),r=u(this.props.props||{},"customPages","customMenuItems","children"),i=e.props?.customPages?.length!==this.props.props?.customPages?.length,n=e.props?.customMenuItems?.length!==this.props.props?.customMenuItems?.length,s=Q(e.props?.customMenuItems),o=Q(this.props.props?.customMenuItems);(!(0,h.MZ)(t,r)||!(0,h.MZ)(s,o)||i||n)&&this.rootRef.current&&this.props.updateProps({node:this.rootRef.current,props:this.props.props})}componentDidMount(){this.rootRef.current&&(q(this.props)&&this.props.mount(this.rootRef.current,this.props.props),G(this.props)&&this.props.open(this.props.props))}componentWillUnmount(){this.rootRef.current&&(q(this.props)&&this.props.unmount(this.rootRef.current),G(this.props)&&this.props.close())}render(){let{hideRootHtmlElement:e=!1}=this.props,t={ref:this.rootRef,...this.props.rootProps,...this.props.component&&{"data-clerk-component":this.props.component}};return n.createElement(n.Fragment,null,!e&&n.createElement("div",t),this.props.children)}};let H=(e,t)=>{let r=("string"==typeof t?t:t?.component)||e.displayName||e.name||"Component";e.displayName=r;let s="string"==typeof t?void 0:t,o=t=>{(0,i.t)(r||"withClerk");let o=(0,i.n)(),a=(0,h.Sj)();return o.loaded||s?.renderWhileLoading?n.createElement(e,{getContainer:a,...t,component:r,clerk:o}):null};return o.displayName=`withClerk(${r})`,o},X=e=>n.createElement(n.Fragment,null,e?.customPagesPortals?.map(({key:e,portal:t})=>n.createElement(t,{key:e})),e?.customMenuItemsPortals?.map(({key:e,portal:t})=>n.createElement(t,{key:e})));function Y({children:e}){return(0,a.s2)("<UserProfile.Page /> component needs to be a direct child of `<UserProfile />` or `<UserButton />`."),n.createElement(n.Fragment,null,e)}function Z({children:e}){return(0,a.s2)("<UserProfile.Link /> component needs to be a direct child of `<UserProfile />` or `<UserButton />`."),n.createElement(n.Fragment,null,e)}H(({clerk:e,component:t,fallback:r,...i})=>{let s="rendering"===V(t)||!e.loaded,o={...s&&r&&{style:{display:"none"}}};return n.createElement(n.Fragment,null,s&&r,e.loaded&&n.createElement(J,{component:t,mount:e.mountSignIn,unmount:e.unmountSignIn,updateProps:e.__internal_updateProps,props:i,rootProps:o}))},{component:"SignIn",renderWhileLoading:!0}),H(({clerk:e,component:t,fallback:r,...i})=>{let s="rendering"===V(t)||!e.loaded,o={...s&&r&&{style:{display:"none"}}};return n.createElement(n.Fragment,null,s&&r,e.loaded&&n.createElement(J,{component:t,mount:e.mountSignUp,unmount:e.unmountSignUp,updateProps:e.__internal_updateProps,props:i,rootProps:o}))},{component:"SignUp",renderWhileLoading:!0}),Object.assign(H(({clerk:e,component:t,fallback:r,...i})=>{let s="rendering"===V(t)||!e.loaded,o={...s&&r&&{style:{display:"none"}}},{customPages:a,customPagesPortals:l}=M(i.children);return n.createElement(n.Fragment,null,s&&r,n.createElement(J,{component:t,mount:e.mountUserProfile,unmount:e.unmountUserProfile,updateProps:e.__internal_updateProps,props:{...i,customPages:a},rootProps:o},n.createElement(X,{customPagesPortals:l})))},{component:"UserProfile",renderWhileLoading:!0}),{Page:Y,Link:Z});let ee=(0,n.createContext)({mount:()=>{},unmount:()=>{},updateProps:()=>{}});function et({children:e}){return(0,a.s2)("<UserButton.MenuItems /> component needs to be a direct child of `<UserButton />`."),n.createElement(n.Fragment,null,e)}function er({children:e}){return(0,a.s2)("<UserButton.Action /> component needs to be a direct child of `<UserButton.MenuItems />`."),n.createElement(n.Fragment,null,e)}function ei({children:e}){return(0,a.s2)("<UserButton.Link /> component needs to be a direct child of `<UserButton.MenuItems />`."),n.createElement(n.Fragment,null,e)}let en=Object.assign(H(({clerk:e,component:t,fallback:r,...i})=>{let s="rendering"===V(t)||!e.loaded,o={...s&&r&&{style:{display:"none"}}},{customPages:a,customPagesPortals:l}=M(i.children,{allowForAnyChildren:!!i.__experimental_asProvider}),u={...i.userProfileProps,customPages:a},{customMenuItems:h,customMenuItemsPortals:c}
32=N(i.children,{allowForAnyChildren:!!i.__experimental_asProvider}),d=A(i.children),p={mount:e.mountUserButton,unmount:e.unmountUserButton,updateProps:e.__internal_updateProps,props:{...i,userProfileProps:u,customMenuItems:h}};return n.createElement(ee.Provider,{value:p},s&&r,e.loaded&&n.createElement(J,{component:t,...p,hideRootHtmlElement:!!i.__experimental_asProvider,rootProps:o},i.__experimental_asProvider?d:null,n.createElement(X,{customPagesPortals:l,customMenuItemsPortals:c})))},{component:"UserButton",renderWhileLoading:!0}),{UserProfilePage:Y,UserProfileLink:Z,MenuItems:et,Action:er,Link:ei,__experimental_Outlet:function(e){let t=(0,n.useContext)(ee),r={...t,props:{...t.props,...e}};return n.createElement(J,r)}});function es({children:e}){return(0,a.s2)("<OrganizationProfile.Page /> component needs to be a direct child of `<OrganizationProfile />` or `<OrganizationSwitcher />`."),n.createElement(n.Fragment,null,e)}function eo({children:e}){return(0,a.s2)("<OrganizationProfile.Link /> component needs to be a direct child of `<OrganizationProfile />` or `<OrganizationSwitcher />`."),n.createElement(n.Fragment,null,e)}Object.assign(H(({clerk:e,component:t,fallback:r,...i})=>{let s="rendering"===V(t)||!e.loaded,o={...s&&r&&{style:{display:"none"}}},{customPages:a,customPagesPortals:l}=I(i.children);return n.createElement(n.Fragment,null,s&&r,e.loaded&&n.createElement(J,{component:t,mount:e.mountOrganizationProfile,unmount:e.unmountOrganizationProfile,updateProps:e.__internal_updateProps,props:{...i,customPages:a},rootProps:o},n.createElement(X,{customPagesPortals:l})))},{component:"OrganizationProfile",renderWhileLoading:!0}),{Page:es,Link:eo}),H(({clerk:e,component:t,fallback:r,...i})=>{let s="rendering"===V(t)||!e.loaded,o={...s&&r&&{style:{display:"none"}}};return n.createElement(n.Fragment,null,s&&r,e.loaded&&n.createElement(J,{component:t,mount:e.mountCreateOrganization,unmount:e.unmountCreateOrganization,updateProps:e.__internal_updateProps,props:i,rootProps:o}))},{component:"CreateOrganization",renderWhileLoading:!0});let ea=(0,n.createContext)({mount:()=>{},unmount:()=>{},updateProps:()=>{}});Object.assign(H(({clerk:e,component:t,fallback:r,...i})=>{let s="rendering"===V(t)||!e.loaded,o={...s&&r&&{style:{display:"none"}}},{customPages:a,customPagesPortals:l}=I(i.children,{allowForAnyChildren:!!i.__experimental_asProvider}),u={...i.organizationProfileProps,customPages:a},h=A(i.children),c={mount:e.mountOrganizationSwitcher,unmount:e.unmountOrganizationSwitcher,updateProps:e.__internal_updateProps,props:{...i,organizationProfileProps:u},rootProps:o,component:t};return e.__experimental_prefetchOrganizationSwitcher(),n.createElement(ea.Provider,{value:c},n.createElement(n.Fragment,null,s&&r,e.loaded&&n.createElement(J,{...c,hideRootHtmlElement:!!i.__experimental_asProvider},i.__experimental_asProvider?h:null,n.createElement(X,{customPagesPortals:l}))))},{component:"OrganizationSwitcher",renderWhileLoading:!0}),{OrganizationProfilePage:es,OrganizationProfileLink:eo,__experimental_Outlet:function(e){let t=(0,n.useContext)(ea),r={...t,props:{...t.props,...e}};return n.createElement(J,r)}}),H(({clerk:e,component:t,fallback:r,...i})=>{let s="rendering"===V(t)||!e.loaded,o={...s&&r&&{style:{display:"none"}}};return n.createElement(n.Fragment,null,s&&r,e.loaded&&n.createElement(J,{component:t,mount:e.mountOrganizationList,unmount:e.unmountOrganizationList,updateProps:e.__internal_updateProps,props:i,rootProps:o}))},{component:"OrganizationList",renderWhileLoading:!0}),H(({clerk:e,component:t,fallback:r,...i})=>{let s="rendering"===V(t)||!e.loaded,o={...s&&r&&{style:{display:"none"}}};return n.createElement(n.Fragment,null,s&&r,e.loaded&&n.createElement(J,{component:t,open:e.openGoogleOneTap,close:e.closeGoogleOneTap,updateProps:e.__internal_updateProps,props:i,rootProps:o}))},{component:"GoogleOneTap",renderWhileLoading:!0}),H(({clerk:e,component:t,fallback:r,...i})=>{let s="rendering"===V(t)||!e.loaded,o={...s&&r&&{style:{display:"none"}}};return n.createElement(n.Fragment,null,s&&r,e.loaded&&n.createElement(J,{component:t,mount:e.mountWaitlist,unmount:e.unmountWaitlist,updateProps:e.__internal_updateProps,props:i,rootProps:o}))},{component:"Waitlist",renderWhileLoading:!0}),H(({clerk:e,component:t,fallback:r,...i})=>{let s="rendering"===V(t,{selector:'[data-component-status="ready"]'})||!e.loaded,o={...s&&r&&{style:{display:"none"}}};return n.createElement(n.Fragment,null,s&&r,e.loaded&&n.createElement(J,{component:t,mount:e.mountPricingTable,unmount:e.unmountPricingTable,updateProps:e.__internal_updateProps,props:i,rootProps:o}))},{component:"PricingTable",renderWhileLoading:!0}),H(({clerk:e,component:t,fallback:r,...i})=>{let s="rendering"===V(t)||!e.loaded,o={...s&&r&&{style:{display:"none"}}};return n.createElement(n.Fragment,null,s&&r,e.loaded&&n.createElement(J,{component:t,mount:e.mountAPIKeys,unmount:e.unmountAPIKeys,updateProps:e.__internal_updateProps,props:i,rootProps:o}))},{component:"ApiKeys",renderWhileLoading:!0}),H(({clerk:e,component:t,fallback:r,...i})=>{let s="rendering"===V(t)||!e.loaded,o={...s&&r&&{style:{display:"none"}}};return n.createElement(n.Fragment,null,s&&r,e.loaded&&n.createElement(J,{component:t,mount:e.__internal_mountOAuthConsent,unmount:e.__internal_unmountOAuthConsent,updateProps:e.__internal_updateProps,props:i,rootProps:o}))},{component:"OAuthConsent",renderWhileLoading:!0}),H(({clerk:e,component:t,fallback:r,...i})=>{let s="rendering"===V(t)||!e.loaded,o={...s&&r&&{style:{display:"none"}}};return n.createElement(n.Fragment,null,s&&r,e.loaded&&n.createElement(J,{component:t,mount:e.__internal_mountOAuthDeviceVerification,unmount:e.__internal_unmountOAuthDeviceVerification,updateProps:t=>void e.__internal_updateProps(t),props:i,rootProps:o}))},{component:"OAuthDeviceVerification",renderWhileLoading:!0}),H(({clerk:e,component:t,fallback:r,...i})=>{let s="rendering"===V(t)||!e.loaded,o={...s&&r&&{style:{display:"none"}}};return n.createElement(n.Fragment,null,s&&r,e.loaded&&n.createElement(J,{component:t,mount:e.mountUserAvatar,unmount:e.unmountUserAvatar,updateProps:e.__internal_updateProps,props:i,rootProps:o}))},{component:"UserAvatar",renderWhileLoading:!0}),H(({clerk:e,component:t,fallback:r,...i})=>{let s="rendering"===V(t)||!e.loaded,o={...s&&r&&{style:{display:"none"}}};return n.createElement(n.Fragment,null,s&&r,e.loaded&&n.createElement(J,{component:t,mount:e.mountTaskChooseOrganization,unmount:e.unmountTaskChooseOrganization,updateProps:e.__internal_updateProps,props:i,rootProps:o}))},{component:"TaskChooseOrganization",renderWhileLoading:!0});let el=H(({clerk:e,component:t,fallback:r,...i})=>{let s="rendering"===V(t)||!e.loaded,o={...s&&r&&{style:{display:"none"}}};return n.createElement(n.Fragment,null,s&&r,e.loaded&&n.createElement(J,{component:t,mount:e.mountTaskResetPassword,unmount:e.unmountTaskResetPassword,updateProps:e.__internal_updateProps,props:i,rootProps:o}))},{component:"TaskResetPassword",renderWhileLoading:!0});H(({clerk:e,component:t,fallback:r,...i})=>{let s="rendering"===V(t)||!e.loaded,o={...s&&r&&{style:{display:"none"}}};return n.createElement(n.Fragment,null,s&&r,e.loaded&&n.createElement(J,{component:t,mount:e.mountTaskSetupMFA,unmount:e.unmountTaskSetupMFA,updateProps:e.__internal_updateProps,props:i,rootProps:o}))},{component:"TaskSetupMFA",renderWhileLoading:!0});let eu={actor:void 0,factorVerificationAge:null,orgId:void 0,orgPermissions:void 0,orgRole:void 0,orgSlug:void 0,sessionClaims:void 0,sessionId:void 0,sessionStatus:void 0,userId:void 0}
32,eh=e=>new Promise(t=>{let r=i=>{["ready","degraded"].includes(i)&&(t(),e.off("status",r))};e.on("status",r,{notify:!0})}),ec=e=>async t=>{if(!(0,m.M)())throw new o.cR("useAuth().getToken() can only be used in browser environments. To access auth data server-side, see the Auth object reference doc: https://clerk.com/docs/reference/backend/types/auth-object",{code:"clerk_runtime_not_browser"});return(await eh(e),e.session)?e.session.getToken(t):null},ed=e=>async(...t)=>(await eh(e),e.signOut(...t)),ep=(e={})=>{(0,i.t)("useAuth");let{treatPendingAsSignedOut:t}=e??{},r=function(){let e=(0,h.hQ)(),t=(0,h.aY)(),r=(0,n.useCallback)(()=>t,[t]),i=(0,n.useSyncExternalStore)((0,n.useCallback)(t=>e.addListener(t,{skipInitialEmit:!0}),[e]),(0,n.useCallback)(()=>e.loaded&&e.__internal_lastEmittedResources?e.__internal_lastEmittedResources:r(),[e,r]),r);return(0,n.useMemo)(()=>{var e;return i?{sessionId:(e="client"in i?(0,p.dT)(!0,i,void 0):(0,p.dT)(!1,{},i)).sessionId,sessionStatus:e.sessionStatus,sessionClaims:e.sessionClaims,userId:e.userId,actor:e.actor,orgId:e.orgId,orgRole:e.orgRole,orgSlug:e.orgSlug,orgPermissions:e.orgPermissions,factorVerificationAge:e.factorVerificationAge}:eu},[i])}(),s=(0,i.n)(),o=(0,n.useCallback)(ec(s),[s]),a=(0,n.useCallback)(ed(s),[s]);return s.telemetry?.record(d.FJ("useAuth",{treatPendingAsSignedOut:t})),function(e,{treatPendingAsSignedOut:t=!0}={}){let{userId:r,orgId:s,orgRole:o,has:a,signOut:l,getToken:u,orgPermissions:h,factorVerificationAge:d,sessionClaims:p}=e??{},m=(0,n.useCallback)(e=>a?a(e):(0,c.MR)({userId:r,orgId:s,orgRole:o,orgPermissions:h,factorVerificationAge:d,features:p?.fea||"",plans:p?.pla||""})(e),[a,r,s,o,h,d,p]),f=(0,c.M2)({authObject:{...e,getToken:u,signOut:l,has:m},options:{treatPendingAsSignedOut:t}});return f||i.r.throw("Invalid state. Feel free to submit a bug or reach out to support here: https://clerk.com/contact/support")}({...r,getToken:o,signOut:a},{treatPendingAsSignedOut:t})},em=()=>(function(e){(0,i.t)("useClerkSignal");let t=(0,i.n)();switch(e){case"signIn":t.telemetry?.record(d.FJ("useSignIn",{apiVersion:"2025-11"}));break;case"signUp":t.telemetry?.record(d.FJ("useSignUp",{apiVersion:"2025-11"}));break;case"waitlist":t.telemetry?.record(d.FJ("useWaitlist",{apiVersion:"2025-11"}))}let r=(0,n.useCallback)(r=>t.loaded?t.__internal_state.__internal_effect(()=>{switch(e){case"signIn":t.__internal_state.signInSignal();break;case"signUp":t.__internal_state.signUpSignal();break;case"waitlist":t.__internal_state.waitlistSignal();break;default:throw Error(`Unknown signal: ${e}`)}r()}):()=>{},[t,t.loaded,t.__internal_state]),s=(0,n.useCallback)(()=>{switch(e){case"signIn":return t.__internal_state.signInSignal();case"signUp":return t.__internal_state.signUpSignal();case"waitlist":return t.__internal_state.waitlistSignal();default:throw Error(`Unknown signal: ${e}`)}},[t.__internal_state]);return(0,n.useSyncExternalStore)(r,s,s)})("signIn")},34349:(e,t,r)=>{r.d(t,{VK:()=>n,Ee:()=>i.n,b_:()=>i.r,s2:()=>s});var i=r(68614);function n(e,t,r){return"function"==typeof e?e(t):void 0!==e?e:void 0!==r?r:void 0}let s=e=>{(0,i.r)()&&console.error(`Clerk: ${e}`)}},34560:(e,t,r)=>{r.d(t,{$:()=>a,s:()=>o});var i=r(7165),n=r(6784),s=r(57948),o=class extends s.k{#l;#u;#h;#c;constructor(e){super(),this.#l=e.client,this.mutationId=e.mutationId,this.#h=e.mutationCache,this.#u=[],this.state=e.state||a(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#u.includes(e)||(this.#u.push(e),this.clearGcTimeout(),this.#h.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#u=this.#u.filter(t=>t!==e),this.scheduleGc(),this.#h.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#u.length||("pending"===this.state.status?this.scheduleGc():this.#h.remove(this))}continue(){return this.#c?.continue()??("pending"===this.state.status?this.execute(this.state.variables):Promise.resolve())}async execute(e){let t=()=>{this.#d({type:"continue"})},r={client:this.#l,meta:this.options.meta,mutationKey:this.options.mutationKey},i=this.#c=(0,n.II)({fn:()=>this.options.mutationFn?this.options.mutationFn(e,r):Promise.reject(Error("No mutationFn found")),onFail:(e,t)=>{this.#d({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#d({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#h.canRun(this)}),s="pending"===this.state.status,o=!i.canStart();try{if(s)t();else{this.#d({type:"pending",variables:e,isPaused:o}),this.#h.config.onMutate&&await this.#h.config.onMutate(e,this,r);let t=await this.options.onMutate?.(e,r);t!==this.state.context&&this.#d({type:"pending",context:t,variables:e,isPaused:o})}let n=await i.start();return await this.#h.config.onSuccess?.(n,e,this.state.context,this,r),await this.options.onSuccess?.(n,e,this.state.context,r),await this.#h.config.onSettled?.(n,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(n,null,e,this.state.context,r),this.#d({type:"success",data:n}),n}catch(t){try{await this.#h.config.onError?.(t,e,this.state.context,this,r)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,r)}catch(e){Promise.reject(e)}try{await this.#h.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,r)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,r)}catch(e){Promise.reject(e)}throw this.#d({type:"error",error:t}),t}finally{this.#c===i&&(this.#c=void 0),this.#h.runNext(this)}}#d(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};
32case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),i.jG.batch(()=>{this.#u.forEach(t=>{t.onMutationUpdate(e)}),this.#h.notify({mutation:this,type:"updated",action:e})})}};function a(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}},36530:(e,t,r)=>{r.d(t,{m:()=>o});var i=r(87358);let n=e=>!!e?.cloudflare?.env,s=e=>!!e?.env,o=(e,t)=>{if(void 0!==i&&i.env&&"string"==typeof i.env[e])return i.env[e];if(n(t))return t.cloudflare.env[e]||"";if(s(t))return t.env[e]||"";if(t&&"string"==typeof t[e])return t[e];try{return globalThis[e]}catch{}return""}},36898:(e,t,r)=>{r.d(t,{FJ:()=>i.a,YF:()=>i.i});var i=r(9973)},40367:(e,t,r)=>{r.d(t,{As:()=>l.x,B$:()=>u.r,D_:()=>l.f,Jd:()=>l.g,Z5:()=>l.u,eN:()=>l.F,go:()=>l._,ho:()=>l.s,uF:()=>l.R,wV:()=>l.m,wv:()=>u.h});var i,n,s,o,a=r(84610),l=r(34090),u=r(33884),h=r(12115),c=r(47650),d=r(12669),p=r(95155),m=r(5664);r(54707);var f=r(324);if(r(33132),"undefined"==typeof window||window.global||(window.global="undefined"==typeof global?window:global),globalThis.__clerkSharedModules){let e=globalThis.__clerkSharedModules.react?.version;e&&e!==h.version&&console.warn(`[@clerk/ui/register] React version mismatch detected. Already registered: ${e}, current import: ${h.version}. This may cause issues with the shared @clerk/ui variant.`)}else globalThis.__clerkSharedModules={react:i||(i=r.t(h,2)),"react-dom":n||(n=r.t(c,2)),"react-dom/client":s||(s=r.t(d,2)),"react/jsx-runtime":o||(o=r.t(p,2))};(0,l.V)(({clerk:e,children:t,...r})=>{let{appearance:i,getContainer:n,component:s,...o}=r;t=(0,l.G)(t,"Invite members");let a=(0,l.W)(t)("InviteMembersButton"),u=()=>e.openInviteMembers({appearance:i,getContainer:n}),c=async e=>(a&&"object"==typeof a&&"props"in a&&await (0,l.K)(a.props.onClick)(e),u()),d={...o,onClick:c};return h.cloneElement(a,d)},{component:"InviteMembersButton",renderWhileLoading:!0}),(0,l.V)(({clerk:e,children:t,...r})=>{let{appearance:i,getContainer:n,component:s,signUpFallbackRedirectUrl:o,forceRedirectUrl:a,fallbackRedirectUrl:u,signUpForceRedirectUrl:c,mode:d,initialValues:p,withSignUp:m,oauthFlow:f,...g}=r;t=(0,l.G)(t,"Sign in");let k=(0,l.W)(t)("SignInButton"),_=()=>{let t={forceRedirectUrl:a,fallbackRedirectUrl:u,signUpFallbackRedirectUrl:o,signUpForceRedirectUrl:c,initialValues:p,withSignUp:m,oauthFlow:f};return"modal"===d?e.openSignIn({...t,appearance:i,getContainer:n}):e.redirectToSignIn({...t,signInFallbackRedirectUrl:u,signInForceRedirectUrl:a})},y=async e=>(k&&"object"==typeof k&&"props"in k&&await (0,l.K)(k.props.onClick)(e),_()),b={...g,onClick:y};return h.cloneElement(k,b)},{component:"SignInButton",renderWhileLoading:!0}),(0,l.V)(({clerk:e,children:t,...r})=>{let{redirectUrl:i,getContainer:n,component:s,...o}=r;t=(0,l.G)(t,"Sign in with Metamask");let a=(0,l.W)(t)("SignInWithMetamaskButton"),u=async()=>{(async function(){await e.authenticateWithMetamask({redirectUrl:i||void 0})})()},c=async e=>(await (0,l.K)(a.props.onClick)(e),u()),d={...o,onClick:c};return h.cloneElement(a,d)},{component:"SignInWithMetamask",renderWhileLoading:!0}),(0,l.V)(({clerk:e,children:t,...r})=>{let{redirectUrl:i="/",sessionId:n,signOutOptions:s,getContainer:o,component:a,...u}=r;s&&(0,f.io)("SignOutButton `signOutOptions`","Use the `redirectUrl` and `sessionId` props directly instead."),t=(0,l.G)(t,"Sign out");let c=(0,l.W)(t)("SignOutButton"),d=()=>e.signOut({redirectUrl:i,...void 0!==n&&{sessionId:n},...s}),p=async e=>(await (0,l.K)(c.props.onClick)(e),d()),m={...u,onClick:p};return h.cloneElement(c,m)},{component:"SignOutButton",renderWhileLoading:!0}),(0,l.V)(({clerk:e,children:t,...r})=>{let{appearance:i,unsafeMetadata:n,getContainer:s,component:o,fallbackRedirectUrl:a,forceRedirectUrl:u,signInFallbackRedirectUrl:c,signInForceRedirectUrl:d,mode:p,initialValues:m,oauthFlow:f,...g}=r;t=(0,l.G)(t,"Sign up");let k=(0,l.W)(t)("SignUpButton"),_=()=>{let t={fallbackRedirectUrl:a,forceRedirectUrl:u,signInFallbackRedirectUrl:c,signInForceRedirectUrl:d,initialValues:m,oauthFlow:f};return"modal"===p?e.openSignUp({...t,appearance:i,unsafeMetadata:n,getContainer:s}):e.redirectToSignUp({...t,signUpFallbackRedirectUrl:a,signUpForceRedirectUrl:u})},y=async e=>(k&&"object"==typeof k&&"props"in k&&await (0,l.K)(k.props.onClick)(e),_()),b={...g,onClick:y};return h.cloneElement(k,b)},{component:"SignUpButton",renderWhileLoading:!0}),(0,a.i)({packageName:"@clerk/react"}),(0,m.cT)("@clerk/react")},44838:(e,t,r)=>{function i(e){return function(t){let r=t??this;if(!r)throw TypeError(`${e.kind||e.name} type guard requires an error object`);return!!e.kind&&"object"==typeof r&&null!==r&&"constructor"in r&&r.constructor?.kind===e.kind||r instanceof e}}r.d(t,{a:()=>i,n:()=>o,r:()=>n,t:()=>s});
32var n=class e extends Error{static kind="ClerkError";clerkError=!0;code;longMessage;docsUrl;cause;get name(){return this.constructor.name}constructor(t){super(new.target.formatMessage(new.target.kind,t.message,t.code,t.docsUrl),{cause:t.cause}),Object.setPrototypeOf(this,e.prototype),this.code=t.code,this.docsUrl=t.docsUrl,this.longMessage=t.longMessage,this.cause=t.cause}toString(){return`[${this.name}]
33Message:${this.message}`}static formatMessage(e,t,r,i){let n="Clerk:",s=RegExp(n.replace(" ","\\s*"),"i");return t=t.replace(s,""),t=`${n} ${t.trim()}
34
35(code="${r}")
36
37`,i&&(t+=`
38
39Docs: ${i}`),t}},s=class e extends n{static kind="ClerkRuntimeError";clerkRuntimeError=!0;constructor(t,r){super({...r,message:t}),Object.setPrototypeOf(this,e.prototype)}};let o=i(s)},52775:(e,t,r)=>{r.d(t,{E:()=>p});var i=r(52020),n=r(50920),s=r(7165),o=r(21239),a=r(25910),l=r(34560),u=class extends a.Q{#p;#m;#f;constructor(e={}){super(),this.config=e,this.#p=new Set,this.#m=new Map,this.#f=0}build(e,t,r){let i=new l.s({client:e,mutationCache:this,mutationId:++this.#f,options:e.defaultMutationOptions(t),state:r});return this.add(i),i}add(e){this.#p.add(e);let t=h(e);if("string"==typeof t){let r=this.#m.get(t);r?r.push(e):this.#m.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#p.delete(e)){let t=h(e);if("string"==typeof t){let r=this.#m.get(t);if(r)if(r.length>1){let t=r.indexOf(e);-1!==t&&r.splice(t,1)}else r[0]===e&&this.#m.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){let t=h(e);if("string"!=typeof t)return!0;{let r=this.#m.get(t)?.find(e=>"pending"===e.state.status);return!r||r===e}}runNext(e){let t=h(e);return"string"==typeof t?this.#m.get(t)?.find(t=>
39t!==e&&t.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){s.jG.batch(()=>{this.#p.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#p.clear(),this.#m.clear()})}getAll(){return Array.from(this.#p)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,i.nJ)(t,e))}findAll(e={}){return this.getAll().filter(t=>(0,i.nJ)(e,t))}notify(e){s.jG.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return s.jG.batch(()=>Promise.all(e.map(e=>e.continue().catch(i.lQ))))}};function h(e){return e.options.scope?.id}var c=r(39853),d=class extends a.Q{#g;constructor(e={}){super(),this.config=e,this.#g=new Map}build(e,t,r){let n=t.queryKey,s=t.queryHash??(0,i.F$)(n,t),o=this.get(s);return o||(o=new c.X({client:e,queryKey:n,queryHash:s,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(n)}),this.add(o)),o}add(e){this.#g.has(e.queryHash)||(this.#g.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){this.#g.get(e.queryHash)===e&&(e.destroy(),this.#g.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){s.jG.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#g.get(e)}getAll(){return[...this.#g.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,i.MK)(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>(0,i.MK)(e,t)):t}notify(e){s.jG.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){s.jG.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){s.jG.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},p=class{#k;#h;#_;#y;#b;#C;#w;#v;constructor(e={}){this.#k=e.queryCache||new d,this.#h=e.mutationCache||new u,this.#_=e.defaultOptions||{},this.#y=new Map,this.#b=new Map,this.#C=0}mount(){this.#C++,1===this.#C&&(this.#w=n.m.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#k.onFocus())}),this.#v=o.t.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#k.onOnline())}))}unmount(){this.#C--,0===this.#C&&(this.#w?.(),this.#w=void 0,this.#v?.(),this.#v=void 0)}isFetching(e){return this.#k.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#h.findAll({...e,status:"pending"}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#k.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),r=this.#k.build(this,t),n=r.state.data;return void 0===n?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime((0,i.GF)(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return this.#k.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,r){let n=this.defaultQueryOptions({queryKey:e}),s=this.#k.get(n.queryHash)?.state.data,o=(0,i.Zw)(t,s);if(void 0!==o)return this.#k.build(this,n).setData(o,{...r,manual:!0})}setQueriesData(e,t,r){return s.jG.batch(()=>this.#k.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,r)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#k.get(t.queryHash)?.state}removeQueries(e){let t=this.#k;s.jG.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let r=this.#k;return s.jG.batch(()=>{let i=r.findAll(e),n=new Set(i);return i.forEach(e=>{e.reset()}),this.refetchQueries({type:"active",predicate:e=>n.has(e)},t)})}cancelQueries(e,t={}){let r={revert:!0,...t};return Promise.all(s.jG.batch(()=>this.#k.findAll(e).map(e=>e.cancel(r)))).then(i.lQ).catch(i.lQ)}invalidateQueries(e,t={}){return s.jG.batch(()=>(this.#k.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType==="none")?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t))}refetchQueries(e,t={}){let r={...t,cancelRefetch:t.cancelRefetch??!0};return Promise.all(s.jG.batch(()=>this.#k.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,r);return r.throwOnError||(t=t.catch(i.lQ)),"paused"===e.state.fetchStatus?Promise.resolve():t}))).then(i.lQ)}async query(e){let t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);let r=this.#k.build(this,t),n=r.isStaleByTime((0,i.GF)(t.staleTime,r))?await r.fetch(t):r.state.data,s=t.select;return s?s(n):n}fetchQuery(e){let t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);let r=this.#k.build(this,t);return r.isStaleByTime((0,i.GF)(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(i.lQ).catch(i.lQ)}infiniteQuery(e){return e._type="infinite",this.query(e)}
39fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(i.lQ).catch(i.lQ)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return o.t.isOnline()?this.#h.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#k}getMutationCache(){return this.#h}getDefaultOptions(){return this.#_}setDefaultOptions(e){this.#_=e}setQueryDefaults(e,t){this.#y.set((0,i.EN)(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#y.values()],r={};return t.forEach(t=>{(0,i.Cp)(e,t.queryKey)&&Object.assign(r,t.defaultOptions)}),r}setMutationDefaults(e,t){this.#b.set((0,i.EN)(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#b.values()],r={};return t.forEach(t=>{(0,i.Cp)(e,t.mutationKey)&&Object.assign(r,t.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#_.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=(0,i.F$)(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===i.hT&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#_.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#k.clear(),this.#h.clear()}}},53700:(e,t,r)=>{r.d(t,{kX:()=>i});function i(){throw Error("ClerkJS: Clerk instance not found. Make sure Clerk is initialized before using any Clerk components.")}},61831:(e,t,r)=>{r.d(t,{Mv:()=>a,_c:()=>o,kk:()=>c,zz:()=>l});var i=r(2798),n=r(4579),s=r(87358);function o(e){var t;return!e||(t=e,/^http(s)?:\/\//.test(t||""))||a(e)}function a(e){return e.startsWith("/")}function l(e){return e?a(e)&&"undefined"!=typeof window&&window.location?.origin?new URL(e,window.location.origin).toString():e:""}let u=[".vercel.app"];function h(){return void 0!==s&&s.env?s.env:{}}function c({publishableKey:e,hasDomain:t=!1,hasProxyUrl:r=!1,environment:s=h()}){var o;if(r||t||!(0,i.EL)(e)||function(e=h()){return(0,n.zz)(e.CLERK_DISABLE_AUTO_PROXY)}(s)||"production"!==s.VERCEL_TARGET_ENV)return"";let a=s.VERCEL_PROJECT_PRODUCTION_URL;return a&&(o=function(e){if(e.startsWith("http://")||e.startsWith("https://"))try{return new URL(e).hostname}catch{return""}return e.split("/")[0]||""}(a),u.some(e=>o?.endsWith(e)))?"/__clerk":""}},68614:(e,t,r)=>{r.d(t,{a:()=>a,i:()=>l,n:()=>u,r:()=>o});var i=r(36530);let n=["CI","CONTINUOUS_INTEGRATION","GITHUB_ACTIONS","GITLAB_CI","CIRCLECI","TRAVIS","BUILDKITE","BITBUCKET_BUILD_NUMBER","APPVEYOR","CODEBUILD_BUILD_ID","TF_BUILD","TEAMCITY_VERSION","JENKINS_URL","HUDSON_URL","BAMBOO_BUILDKEY","CF_PAGES"],s=e=>"string"==typeof e&&!!e&&!["0","false","off","no"].includes(e.toLowerCase()),o=()=>!1,a=()=>!1,l=()=>{try{return!0}catch{}return!1},u=()=>n.some(e=>s((0,i.m)(e)))},74123:(e,t,r)=>{r.d(t,{z:()=>s});var i=r(64275),n=r(76347),s=class extends n.${constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){let{state:r}=e,n=super.createResult(e,t),{isFetching:s,isRefetching:o,isError:a,isRefetchError:l}=n,u=r.fetchMeta?.fetchMore?.direction,h=a&&"forward"===u,c=s&&"forward"===u,d=a&&"backward"===u,p=s&&"backward"===u;return{...n,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:(0,i.rB)(t,r.data),hasPreviousPage:(0,i.RQ)(t,r.data),isFetchNextPageError:h,isFetchingNextPage:c,isFetchPreviousPageError:d,isFetchingPreviousPage:p,isRefetchError:l&&!h&&!d,isRefetching:o&&!c&&!p}}}},84610:(e,t,r)=>{r.d(t,{i:()=>o,n:()=>a,r:()=>s,t:()=>l});var i=r(23789),n=r(54707);let s=(0,i._r)({packageName:"@clerk/react"});function o(e){s.setMessages(e).setPackageName(e)}let a=n.hQ,l=e=>{(0,n.Kz)(()=>{s.throwMissingClerkProviderError({source:e})})}},87039:(e,t,r)=>{function i(){return"undefined"!=typeof window}r.d(t,{M:()=>i}),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");let n=/^(Cloudflare-Workers|Node\.js|Deno|Bun)\b/i},90492:(e,t,r)=>{r.d(t,{M2:()=>C,MR:()=>b});let i={strict_mfa:{afterMinutes:10,level:"multi_factor"},strict:{afterMinutes:10,level:"second_factor"},moderate:{afterMinutes:60,level:"second_factor"},lax:{afterMinutes:1440,level:"second_factor"}},n=new Set(["first_factor","second_factor","multi_factor"]),s=new Set(["strict_mfa","strict","moderate","lax"]),o=new Set(["o","org","organization"]),a=new Set(["u","user"]),l=e=>"number"==typeof e&&e>0,u=e=>n.has(e),h=e=>s.has(e),c=e=>"number"==typeof e&&Number.isFinite(e)&&(-1===e||e>=0),d=e=>e.replace(/^(org:)*/,"org:"),p=(e,t)=>{let{orgId:r,orgRole:i,orgPermissions:n}=t,s=void 0!==e.role,o=void 0!==e.permission;return s||o?s&&"string"!=typeof e.role||o&&"string"!=typeof e.permission||!r||s&&("string"!=typeof i||!i||d(i)!==d(e.role))||o&&(!Array.isArray(n)||
39!n.includes(d(e.permission)))?"fail":"pass":"skip"},m=(e,t)=>{let{org:r,user:i}=g(e),[n,s]=t.split(":"),l=void 0!==s,u=s||n;if(l&&!o.has(n)&&!a.has(n))throw Error(`Invalid scope: ${n}`);if(l){if(o.has(n))return r.includes(u);if(a.has(n))return i.includes(u)}return[...r,...i].includes(u)},f=(e,t)=>{let{features:r,plans:i}=t,n=void 0!==e.feature,s=void 0!==e.plan;if(!n&&!s)return"skip";if(n&&"string"!=typeof e.feature||s&&"string"!=typeof e.plan)return"fail";if(n){if("string"!=typeof r||!r)return"fail";try{if(!m(r,e.feature))return"fail"}catch{return"fail"}}if(s){if("string"!=typeof i||!i)return"fail";try{if(!m(i,e.plan))return"fail"}catch{return"fail"}}return"pass"},g=e=>{let t=[],r=[];if(!e)return{org:t,user:r};let i=e.split(",");for(let e=0;e<i.length;e++){let n=i[e].trim(),s=n.indexOf(":");if(-1===s)throw Error(`Invalid claim element (missing colon): ${n}`);let o=n.slice(0,s),a=n.slice(s+1);"o"===o?t.push(a):"u"===o?r.push(a):("ou"===o||"uo"===o)&&(t.push(a),r.push(a))}return{org:t,user:r}},k=e=>{if(!e)return!1;let t="string"==typeof e&&h(e),r="object"==typeof e&&u(e.level)&&l(e.afterMinutes);return(!!t||!!r)&&(e=>"string"==typeof e?i[e]:e).bind(null,e)},_=(e,{factorVerificationAge:t})=>{if(void 0===e.reverification)return"skip";if(!t||!Array.isArray(t)||2!==t.length||!c(t[0])||!c(t[1]))return"fail";let r=k(e.reverification);if(!r)return"fail";let{level:i,afterMinutes:n}=r(),[s,o]=t;if(-1===s&&-1===o)return"fail";let a=-1!==s&&n>s,l=-1!==o&&n>o;switch(i){case"first_factor":return a?"pass":"fail";case"second_factor":if(-1===o)return a?"pass":"fail";return l?"pass":"fail";case"multi_factor":if(-1===o)return a?"pass":"fail";if(-1===s)return"fail";return a&&l?"pass":"fail"}},y=e=>e.some(e=>"pass"===e)&&e.every(e=>"pass"===e||"skip"===e),b=e=>t=>!!e.userId&&y([p(t,e),f(t,e),_(t,e)]),C=({authObject:{sessionId:e,sessionStatus:t,userId:r,actor:i,orgId:n,orgRole:s,orgSlug:o,signOut:a,getToken:l,has:u,sessionClaims:h},options:{treatPendingAsSignedOut:c=!0}})=>void 0===e&&void 0===r?{actor:void 0,getToken:l,has:()=>!1,isLoaded:!1,isSignedIn:void 0,orgId:void 0,orgRole:void 0,orgSlug:void 0,sessionClaims:void 0,sessionId:e,signOut:a,userId:r}:null===e&&null===r?{actor:null,getToken:l,has:()=>!1,isLoaded:!0,isSignedIn:!1,orgId:null,orgRole:null,orgSlug:null,sessionClaims:null,sessionId:e,signOut:a,userId:r}:c&&"pending"===t?{actor:null,getToken:l,has:()=>!1,isLoaded:!0,isSignedIn:!1,orgId:null,orgRole:null,orgSlug:null,sessionClaims:null,sessionId:null,
39signOut:a,userId:null}:e&&h&&r&&n&&s?{actor:i||null,getToken:l,has:u,isLoaded:!0,isSignedIn:!0,orgId:n,orgRole:s,orgSlug:o||null,sessionClaims:h,sessionId:e,signOut:a,userId:r}:e&&h&&r&&!n?{actor:i||null,getToken:l,has:u,isLoaded:!0,isSignedIn:!0,orgId:null,orgRole:null,orgSlug:null,sessionClaims:h,sessionId:e,signOut:a,userId:r}:void 0},96539:(e,t,r)=>{}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.