chordia-ui 3.3.8 → 3.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AgentLiftCard.cjs.js.map +1 -1
- package/dist/AgentLiftCard.es.js +5 -3
- package/dist/AgentLiftCard.es.js.map +1 -1
- package/dist/CustomFilterChips.cjs.js.map +1 -1
- package/dist/CustomFilterChips.es.js +2 -1
- package/dist/CustomFilterChips.es.js.map +1 -1
- package/dist/FileUploadingState.cjs.js.map +1 -1
- package/dist/FileUploadingState.es.js +16 -10
- package/dist/FileUploadingState.es.js.map +1 -1
- package/dist/IntegrationCard.cjs.js.map +1 -1
- package/dist/IntegrationCard.es.js +3 -3
- package/dist/IntegrationCard.es.js.map +1 -1
- package/dist/SectionLabel.cjs.js.map +1 -1
- package/dist/SectionLabel.es.js.map +1 -1
- package/dist/SmallButton.cjs.js.map +1 -1
- package/dist/SmallButton.es.js +16 -16
- package/dist/SmallButton.es.js.map +1 -1
- package/dist/SummarySection.cjs.js.map +1 -1
- package/dist/SummarySection.es.js +11 -9
- package/dist/SummarySection.es.js.map +1 -1
- package/dist/TextInput.cjs.js.map +1 -1
- package/dist/TextInput.es.js.map +1 -1
- package/dist/Timeline.cjs.js.map +1 -1
- package/dist/Timeline.es.js +14 -8
- package/dist/Timeline.es.js.map +1 -1
- package/dist/Tooltip.cjs.js +1 -1
- package/dist/Tooltip.cjs.js.map +1 -1
- package/dist/Tooltip.es.js +31 -20
- package/dist/Tooltip.es.js.map +1 -1
- package/dist/TourGuideTooltip.cjs.js.map +1 -1
- package/dist/TourGuideTooltip.es.js +2 -1
- package/dist/TourGuideTooltip.es.js.map +1 -1
- package/dist/UpdatedInteractionRecording.cjs.js +1 -1
- package/dist/UpdatedInteractionRecording.cjs.js.map +1 -1
- package/dist/UpdatedInteractionRecording.es.js +79 -97
- package/dist/UpdatedInteractionRecording.es.js.map +1 -1
- package/dist/UploadInteraction.cjs.js.map +1 -1
- package/dist/UploadInteraction.es.js.map +1 -1
- package/dist/colors.cjs.js +2 -0
- package/dist/colors.cjs.js.map +1 -0
- package/dist/colors.es.js +2 -0
- package/dist/colors.es.js.map +1 -0
- package/dist/components/UpdatedInteractionDetails.cjs.js +10 -1
- package/dist/components/UpdatedInteractionDetails.cjs.js.map +1 -1
- package/dist/components/UpdatedInteractionDetails.es.js +1531 -9
- package/dist/components/UpdatedInteractionDetails.es.js.map +1 -1
- package/dist/components/chat.cjs.js +30 -1
- package/dist/components/chat.cjs.js.map +1 -1
- package/dist/components/chat.es.js +2222 -7
- package/dist/components/chat.es.js.map +1 -1
- package/dist/components/common.cjs.js +1 -1
- package/dist/components/common.es.js +32 -25
- package/dist/components/common.es.js.map +1 -1
- package/dist/components/data.cjs.js +1 -1
- package/dist/components/data.cjs.js.map +1 -1
- package/dist/components/data.es.js +1033 -4
- package/dist/components/data.es.js.map +1 -1
- package/dist/components/layout.cjs.js +3 -1
- package/dist/components/layout.cjs.js.map +1 -1
- package/dist/components/layout.es.js +1533 -8
- package/dist/components/layout.es.js.map +1 -1
- package/dist/components/login.cjs.js +1 -1
- package/dist/components/login.es.js +6 -2
- package/dist/components/login.es.js.map +1 -1
- package/dist/components/media.cjs.js +1 -1
- package/dist/components/media.cjs.js.map +1 -1
- package/dist/components/media.es.js +220 -6
- package/dist/components/media.es.js.map +1 -1
- package/dist/components/models.cjs.js +1 -1
- package/dist/components/models.cjs.js.map +1 -1
- package/dist/components/models.es.js +91 -2
- package/dist/components/models.es.js.map +1 -1
- package/dist/components/navigation.cjs.js +1 -1
- package/dist/components/navigation.cjs.js.map +1 -1
- package/dist/components/navigation.es.js +766 -7
- package/dist/components/navigation.es.js.map +1 -1
- package/dist/components/notifications.cjs.js +1 -1
- package/dist/components/notifications.cjs.js.map +1 -1
- package/dist/components/notifications.es.js +368 -3
- package/dist/components/notifications.es.js.map +1 -1
- package/dist/components/onboarding.cjs.js +1 -1
- package/dist/components/onboarding.cjs.js.map +1 -1
- package/dist/components/onboarding.es.js +985 -7
- package/dist/components/onboarding.es.js.map +1 -1
- package/dist/components/primitives.cjs.js +1 -1
- package/dist/components/primitives.cjs.js.map +1 -1
- package/dist/components/primitives.es.js +635 -25
- package/dist/components/primitives.es.js.map +1 -1
- package/dist/debugger-wc.cjs.js +4 -4
- package/dist/debugger-wc.cjs.js.map +1 -1
- package/dist/debugger-wc.es.js +15 -11
- package/dist/debugger-wc.es.js.map +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs2.js +2 -49
- package/dist/index.cjs2.js.map +1 -1
- package/dist/index.cjs3.js +50 -0
- package/dist/index.cjs3.js.map +1 -0
- package/dist/index.es.js +104 -99
- package/dist/index.es.js.map +1 -1
- package/dist/index.es2.js +2632 -1776
- package/dist/index.es2.js.map +1 -1
- package/dist/index.es3.js +1944 -0
- package/dist/index.es3.js.map +1 -0
- package/dist/pages/interactionDetails.cjs.js +1 -1
- package/dist/pages/interactionDetails.cjs.js.map +1 -1
- package/dist/pages/interactionDetails.es.js +70 -47
- package/dist/pages/interactionDetails.es.js.map +1 -1
- package/dist/sortable.esm.cjs.js +1 -1
- package/dist/sortable.esm.cjs.js.map +1 -1
- package/dist/sortable.esm.es.js +55 -53
- package/dist/sortable.esm.es.js.map +1 -1
- package/dist/{chordia-ui.css → style.css} +1 -1
- package/package.json +1 -1
- package/src/components/UpdatedInteractionDetails/UpdatedInteractionDetails.jsx +318 -77
- package/src/components/UpdatedInteractionDetails/UpdatedInteractionRecording.jsx +7 -17
- package/dist/ChartRenderer.cjs.js +0 -31
- package/dist/ChartRenderer.cjs.js.map +0 -1
- package/dist/ChartRenderer.es.js +0 -2210
- package/dist/ChartRenderer.es.js.map +0 -1
- package/dist/GettingStarted.cjs.js +0 -2
- package/dist/GettingStarted.cjs.js.map +0 -1
- package/dist/GettingStarted.es.js +0 -983
- package/dist/GettingStarted.es.js.map +0 -1
- package/dist/InlineConfirm.cjs.js +0 -2
- package/dist/InlineConfirm.cjs.js.map +0 -1
- package/dist/InlineConfirm.es.js +0 -618
- package/dist/InlineConfirm.es.js.map +0 -1
- package/dist/InteractionSummaryCard.cjs.js +0 -2
- package/dist/InteractionSummaryCard.cjs.js.map +0 -1
- package/dist/InteractionSummaryCard.es.js +0 -216
- package/dist/InteractionSummaryCard.es.js.map +0 -1
- package/dist/LoginPage.cjs.js +0 -3
- package/dist/LoginPage.cjs.js.map +0 -1
- package/dist/LoginPage.es.js +0 -2618
- package/dist/LoginPage.es.js.map +0 -1
- package/dist/NavigationBar.cjs.js +0 -2
- package/dist/NavigationBar.cjs.js.map +0 -1
- package/dist/NavigationBar.es.js +0 -762
- package/dist/NavigationBar.es.js.map +0 -1
- package/dist/NotificationPanel.cjs.js +0 -2
- package/dist/NotificationPanel.cjs.js.map +0 -1
- package/dist/NotificationPanel.es.js +0 -371
- package/dist/NotificationPanel.es.js.map +0 -1
- package/dist/OverlayPanel.cjs.js +0 -2
- package/dist/OverlayPanel.cjs.js.map +0 -1
- package/dist/OverlayPanel.es.js +0 -93
- package/dist/OverlayPanel.es.js.map +0 -1
- package/dist/SplitPane.cjs.js +0 -4
- package/dist/SplitPane.cjs.js.map +0 -1
- package/dist/SplitPane.es.js +0 -1531
- package/dist/SplitPane.es.js.map +0 -1
- package/dist/SummaryStatsPanel.cjs.js +0 -2
- package/dist/SummaryStatsPanel.cjs.js.map +0 -1
- package/dist/SummaryStatsPanel.es.js +0 -1027
- package/dist/SummaryStatsPanel.es.js.map +0 -1
- package/dist/UpdatedInteractionDetails.cjs.js +0 -11
- package/dist/UpdatedInteractionDetails.cjs.js.map +0 -1
- package/dist/UpdatedInteractionDetails.es.js +0 -1310
- package/dist/UpdatedInteractionDetails.es.js.map +0 -1
package/dist/LoginPage.cjs.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";const s=require("react/jsx-runtime"),g=require("react"),Ce=require("lucide-react");;/* empty css */const $n=g.createContext(void 0),jn=e=>(...t)=>{if(!e)throw Error("You can only use this function after sdk initialization. Make sure to supply 'projectId' to <AuthProvider /> component");return e(...t)},Zo=()=>typeof window<"u"&&!!window.descopeBridge,nt={"x-descope-sdk-name":"react","x-descope-sdk-version":"2.26.7"},Sn=typeof window<"u";var ot=function(){return ot=Object.assign||function(t){for(var n,o=1,r=arguments.length;o<r;o++){n=arguments[o];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},ot.apply(this,arguments)};function z(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n}function _o(e,t,n,o){function r(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function c(u){try{d(o.next(u))}catch(p){a(p)}}function l(u){try{d(o.throw(u))}catch(p){a(p)}}function d(u){u.done?i(u.value):r(u.value).then(c,l)}d((o=o.apply(e,t||[])).next())})}function er(e,t,n){if(n||arguments.length===2)for(var o=0,r=t.length,i;o<r;o++)(i||!(o in t))&&(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}function tr(e,t,n,o){if(n==="a"&&!o)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?o:n==="a"?o.call(e):o?o.value:t.get(e)}function nr(e,t,n,o,r){if(o==="m")throw new TypeError("Private method is not writable");if(o==="a"&&!r)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return o==="a"?r.call(e,n):r?r.value=n:t.set(e,n),n}class Me extends Error{}Me.prototype.name="InvalidTokenError";function or(e){return decodeURIComponent(atob(e).replace(/(.)/g,(t,n)=>{let o=n.charCodeAt(0).toString(16).toUpperCase();return o.length<2&&(o="0"+o),"%"+o}))}function rr(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return or(t)}catch{return atob(t)}}function qt(e,t){if(typeof e!="string")throw new Me("Invalid token specified: must be a string");t||(t={});const n=t.header===!0?0:1,o=e.split(".")[n];if(typeof o!="string")throw new Me(`Invalid token specified: missing part #${n+1}`);let r;try{r=rr(o)}catch(i){throw new Me(`Invalid token specified: invalid base64 for part #${n+1} (${i.message})`)}try{return JSON.parse(r)}catch(i){throw new Me(`Invalid token specified: invalid json for part #${n+1} (${i.message})`)}}var x={accessKey:{exchange:"/v1/auth/accesskey/exchange"},otp:{verify:"/v1/auth/otp/verify",signIn:"/v1/auth/otp/signin",signUp:"/v1/auth/otp/signup",update:{email:"/v1/auth/otp/update/email",phone:"/v1/auth/otp/update/phone"},signUpOrIn:"/v1/auth/otp/signup-in"},magicLink:{verify:"/v1/auth/magiclink/verify",signIn:"/v1/auth/magiclink/signin",signUp:"/v1/auth/magiclink/signup",update:{email:"/v1/auth/magiclink/update/email",phone:"/v1/auth/magiclink/update/phone"},signUpOrIn:"/v1/auth/magiclink/signup-in"},enchantedLink:{verify:"/v1/auth/enchantedlink/verify",signIn:"/v1/auth/enchantedlink/signin",signUp:"/v1/auth/enchantedlink/signup",session:"/v1/auth/enchantedlink/pending-session",update:{email:"/v1/auth/enchantedlink/update/email"},signUpOrIn:"/v1/auth/enchantedlink/signup-in"},oauth:{start:"/v1/auth/oauth/authorize",exchange:"/v1/auth/oauth/exchange",startNative:"v1/auth/oauth/native/start",finishNative:"v1/auth/oauth/native/finish",oneTap:{getOneTapClientId:"/v1/auth/onetap/clientid/{provider}",exchangeOneTapIDToken:"/v1/auth/onetap/idtoken/exchange",verifyOneTapIDToken:"/v1/auth/onetap/idtoken/verify"}},outbound:{connect:"/v1/outbound/oauth/connect"},saml:{start:"/v1/auth/saml/authorize",exchange:"/v1/auth/saml/exchange"},totp:{verify:"/v1/auth/totp/verify",signUp:"/v1/auth/totp/signup",update:"/v1/auth/totp/update"},notp:{signIn:"/v1/auth/notp/whatsapp/signin",signUp:"/v1/auth/notp/whatsapp/signup",signUpOrIn:"/v1/auth/notp/whatsapp/signup-in",session:"/v1/auth/notp/pending-session"},webauthn:{signUp:{start:"/v1/auth/webauthn/signup/start",finish:"/v1/auth/webauthn/signup/finish"},signIn:{start:"/v1/auth/webauthn/signin/start",finish:"/v1/auth/webauthn/signin/finish"},signUpOrIn:{start:"/v1/auth/webauthn/signup-in/start"},update:{start:"v1/auth/webauthn/update/start",finish:"/v1/auth/webauthn/update/finish"}},password:{signUp:"/v1/auth/password/signup",signIn:"/v1/auth/password/signin",sendReset:"/v1/auth/password/reset",update:"/v1/auth/password/update",replace:"/v1/auth/password/replace",policy:"/v1/auth/password/policy"},refresh:"/v1/auth/refresh",tryRefresh:"/v1/auth/try-refresh",selectTenant:"/v1/auth/tenant/select",logout:"/v1/auth/logout",logoutAll:"/v1/auth/logoutall",me:"/v1/auth/me",myTenants:"/v1/auth/me/tenants",history:"/v1/auth/me/history",flow:{start:"/v1/flow/start",next:"/v1/flow/next"}};const Xn="<region>",ir=`https://api.${Xn}descope.com`,Cn=1e3,On=6e5,Qn="dct",An=()=>{const e={};return{headers(t){const n=typeof t.entries=="function"?Object.fromEntries(t.entries()):t;return e.Headers=JSON.stringify(n),this},body(t){return e.Body=t,this},url(t){return e.Url=t.toString(),this},method(t){return e.Method=t,this},title(t){return e.Title=t,this},status(t){return e.Status=t,this},retries(t){return e.Retries=t,this},build:()=>Object.keys(e).flatMap((t=>e[t]?[`${t!=="Title"?`${t}: `:""}${e[t]}`]:[])).join(`
|
|
2
|
-
`)}},sr=[521,524],Un=e=>async(...t)=>{let n=await e(...t);sr.includes(n.status)&&(n=await e(...t),n.retries=1);const o=await n.text();return n.text=()=>Promise.resolve(o),n.json=()=>Promise.resolve(JSON.parse(o)),n.clone=()=>n,n},ar=(e,t)=>{const n=t||fetch;return n||e==null||e.warn("Fetch is not defined, you will not be able to send http requests, if you are running in a test, make sure fetch is defined globally"),e?async(...o)=>{if(!n)throw Error("Cannot send http request, fetch is not defined, if you are running in a test, make sure fetch is defined globally");e.log((i=>An().title("Request").url(i[0]).method(i[1].method).headers(i[1].headers).body(i[1].body).build())(o));const r=await Un(n)(...o);return e[r.ok?"log":"error"](await(async i=>{const a=await i.text();return An().title("Response").url(i.url.toString()).status(`${i.status} ${i.statusText}`).headers(i.headers).body(a).retries(i.retries).build()})(r)),r}:Un(n)};let Ge;const lr=()=>{if(Ge)return Ge;const e=new Date,t=`${e.getUTCFullYear().toString()}-${(e.getUTCMonth()+1).toString().padStart(2,"0")}-${e.getUTCDate().toString().padStart(2,"0")}-${e.getUTCHours().toString().padStart(2,"0")}:${e.getUTCMinutes().toString().padStart(2,"0")}:${e.getUTCSeconds().toString().padStart(2,"0")}:${e.getUTCMilliseconds().toString()}`,n=Math.floor(1e3+9e3*Math.random());return Ge=`${t}-${n}`,Ge};var Se;(function(e){e.get="GET",e.delete="DELETE",e.post="POST",e.put="PUT",e.patch="PATCH"})(Se||(Se={}));const En=({path:e,baseUrl:t,queryParams:n,projectId:o})=>{const r=o.slice(1,-27);t=t.replace(Xn,r?r+".":"");let i=e?`${t.replace(/\/$/,"")}/${e==null?void 0:e.replace(/^\//,"")}`:t;if(n){const a=Object.keys(n);a.forEach(((c,l)=>{i=`${i}${l===0?"?":""}${c}=${encodeURIComponent(n[c])}${l===a.length-1?"":"&"}`}))}return i},cr=(...e)=>new Headers(e.reduce(((t,n)=>((o=>Array.isArray(o)?o:o instanceof Headers?Array.from(o.entries()):o?Object.entries(o):[])(n).forEach((([o,r])=>{t[o]=typeof r=="function"?r():r})),t)),{})),dr={"Content-Type":"application/json"},ur=(e,t="")=>{let n=e;return t&&(n=n+":"+t),{Authorization:`Bearer ${n}`}},pr=(e,t)=>{const n={"x-descope-sdk-session-id":lr(),"x-descope-sdk-name":"core-js","x-descope-sdk-version":"2.57.0","x-descope-project-id":e};return t&&(n["x-descope-refresh-cookie-name"]=t),n},gr=e=>{try{e=JSON.parse(e)}catch{return!1}return typeof e=="object"&&e!==null};var hr=(e=>t=>{var n;return e(Object.assign(Object.assign({},t),{hooks:{beforeRequest:o=>{var r;const i=[].concat(((r=t.hooks)===null||r===void 0?void 0:r.beforeRequest)||[]);return i==null?void 0:i.reduce(((a,c)=>c(a)),o)},afterRequest:async(o,r)=>{var i;const a=[].concat(((i=t.hooks)===null||i===void 0?void 0:i.afterRequest)||[]);a.length!=0&&(await Promise.allSettled(a==null?void 0:a.map((c=>c(o,r==null?void 0:r.clone()))))).forEach((c=>{var l;return c.status==="rejected"&&((l=t.logger)===null||l===void 0?void 0:l.error(c.reason))}))},transformResponse:(n=t.hooks)===null||n===void 0?void 0:n.transformResponse}}))})((({baseUrl:e,projectId:t,baseConfig:n,refreshCookieName:o,logger:r,hooks:i,cookiePolicy:a,fetch:c})=>{const l=e||ir,d=ar(r,c),u=async p=>{var v;const b=i!=null&&i.beforeRequest?i.beforeRequest(p):p,{path:f,body:y,headers:k,queryParams:E,method:U,token:D}=b,R=(H=>H===void 0?void 0:JSON.stringify(H))(y),m={headers:cr(ur(t,D),pr(t,o),(n==null?void 0:n.baseHeaders)||{},gr(R)?dr:{},k),method:U,body:R};a!==null&&(m.credentials=a||"include");const O=await d(En({path:f,baseUrl:l,queryParams:E,projectId:t}),m);if(i!=null&&i.afterRequest&&await i.afterRequest(p,O==null?void 0:O.clone()),i==null?void 0:i.transformResponse){const H=await O.json(),X=(((v=O.headers)===null||v===void 0?void 0:v.get("set-cookie"))||"").split(";").reduce(((Q,L)=>{const[G,ee]=L.split("=");return Object.assign(Object.assign({},Q),{[G.trim()]:ee})}),{}),W=Object.assign(Object.assign({},O),{json:()=>Promise.resolve(H),cookies:X});return W.clone=()=>W,i.transformResponse(W)}return O};return{get:(p,{headers:v,queryParams:b,token:f}={})=>u({path:p,headers:v,queryParams:b,body:void 0,method:Se.get,token:f}),post:(p,v,{headers:b,queryParams:f,token:y}={})=>u({path:p,headers:b,queryParams:f,body:v,method:Se.post,token:y}),patch:(p,v,{headers:b,queryParams:f,token:y}={})=>u({path:p,headers:b,queryParams:f,body:v,method:Se.patch,token:y}),put:(p,v,{headers:b,queryParams:f,token:y}={})=>u({path:p,headers:b,queryParams:f,body:v,method:Se.put,token:y}),delete:(p,{headers:v,queryParams:b,token:f}={})=>u({path:p,headers:v,queryParams:b,body:void 0,method:Se.delete,token:f}),hooks:i,buildUrl:(p,v)=>En({projectId:t,baseUrl:l,path:p,queryParams:v})}})),fr={TOO_MANY_REQUESTS:429};function Gn(e,t,n){var o;let r=it(e);if(t){if(!(r!=null&&r.tenants)&&(r==null?void 0:r[Qn])===t)return(r==null?void 0:r[n])||[];r=(o=r==null?void 0:r.tenants)===null||o===void 0?void 0:o[t]}const i=r==null?void 0:r[n];return Array.isArray(i)?i:[]}function it(e){if(typeof e!="string"||!e)throw new Error("Invalid token provided");return qt(e)}function vr(e){const{exp:t}=it(e);return new Date().getTime()/1e3>t}function mr(e){let t=it(e);const n=Object.keys(t==null?void 0:t.tenants);return Array.isArray(n)?n:[]}function yr(e,t){return Gn(e,t,"permissions")}function xr(e,t){return Gn(e,t,"roles")}const re=(...e)=>e.join("/").replace(/\/{2,}/g,"/");async function w(e,t){var n;const o=await e,r={code:o.status,ok:o.ok,response:o},i=await o.clone().json();return o.ok?r.data=i:(r.error=i,o.status===fr.TOO_MANY_REQUESTS&&Object.assign(r.error,{retryAfter:Number.parseInt((n=o.headers)===null||n===void 0?void 0:n.get("retry-after"))||0})),r}function wr(e){var t;return((t=it(e))===null||t===void 0?void 0:t[Qn])||""}const be=(e,t)=>(n=t)=>o=>!e(o)&&n.replace("{val}",o),Zn=(e,t)=>(n=t)=>o=>{const r=e.filter((i=>i(o)));return!(r.length<e.length)&&(n?n.replace("{val}",o):r.join(" OR "))},_n=(...e)=>({validate:t=>(e.forEach((n=>{const o=n(t);if(o)throw new Error(o)})),!0)}),eo=e=>t=>e.test(t),br=eo(/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/),kr=eo(/^\+[1-9]{1}[0-9]{3,14}$/),Ir=(e,t)=>n=>_n(...t).validate(((o,r,i)=>{const a=(Array.isArray(r)?r.join("."):String(r)).replace(/\[\\?("|')?(\w|d)+\\?("|')?\]/g,((u,p,v)=>"."+v)).split("."),c=a.length;let l=0,d=o===Object(o)?o:void 0;for(;d!=null&&l<c;)d=d[a[l++]];return l&&l===c&&d!==void 0?d:i})(n,e)),jr=be(br,'"{val}" is not a valid email'),Sr=be(kr,'"{val}" is not a valid phone number'),Cr=be((Tn=1,e=>e.length>=Tn),"Minimum length is 1");var Tn;const Pe=be((e=>typeof e=="string"),"Input is not a string"),Or=be((e=>Array.isArray(e)),"Input is not an array"),Ar=be((e=>typeof e=="boolean"),"Input is not a boolean"),Ur=be((e=>e===void 0),"Input is defined"),Et=Zn([Pe(),Ur()],"Input is not a string or undefined"),Er=Zn([Or(),Ar()],"Input is not an array or boolean"),A=(...e)=>t=>(...n)=>(e.forEach(((o,r)=>_n(...o).validate(n[r]))),t(...n)),to=e=>[Pe(`"${e}" must be a string`)],no=e=>[Et(`"${e}" must be string or undefined`)],N=e=>[Pe(`"${e}" must be a string`),Cr(`"${e}" must not be empty`)],Ht=e=>[Pe(`"${e}" must be a string`),jr()],oo=e=>[Pe(`"${e}" must be a string`),Sr()],Tr=A(N("accessKey")),Dr=e=>({exchange:Tr(((t,n)=>w(e.post(x.accessKey.exchange,{loginOptions:n},{token:t}))))}),ze=(e,t,n)=>(t.forEach((o=>{const r=o.split(".");let i=r.shift(),a=e;for(;r.length>0;){if(a=a[i],!i||!a)throw Error(`Invalid path "${o}", "${i}" is missing or has no value`);i=r.shift()}if(typeof a[i]!="function")throw Error(`"${o}" is not a function`);const c=a[i];a[i]=n(c)})),e),ro=({pollingIntervalMs:e=1e3,timeoutMs:t=6e5}={})=>({pollingIntervalMs:Math.max(e||Cn,Cn),timeoutMs:Math.min(t||On,On)});var we,Tt;(function(e){e.sms="sms",e.voice="voice",e.whatsapp="whatsapp",e.im="im"})(we||(we={})),(function(e){e.email="email"})(Tt||(Tt={}));const he=Object.assign(Object.assign({},we),Tt);var Dn;(function(e){e.waiting="waiting",e.running="running",e.completed="completed",e.failed="failed"})(Dn||(Dn={}));const io=N("loginId"),Pr=A(N("token")),xt=A(io),Rr=A(N("pendingRef")),Nr=A(io,Ht("email")),Fr=e=>({verify:Pr((t=>w(e.post(x.enchantedLink.verify,{token:t})))),signIn:xt(((t,n,o={},r)=>{var{providerId:i}=o,a=z(o,["providerId"]);return w(e.post(re(x.enchantedLink.signIn,he.email),{loginId:t,URI:n,loginOptions:a,providerId:i},{token:r}))})),signUpOrIn:xt(((t,n,o={})=>{var{providerId:r}=o,i=z(o,["providerId"]);return w(e.post(re(x.enchantedLink.signUpOrIn,he.email),{loginId:t,URI:n,loginOptions:i,providerId:r}))})),signUp:xt(((t,n,o,r={})=>{var{providerId:i}=r,a=z(r,["providerId"]);return w(e.post(re(x.enchantedLink.signUp,he.email),{loginId:t,URI:n,user:o,loginOptions:a,providerId:i}))})),waitForSession:Rr(((t,n)=>new Promise((o=>{const{pollingIntervalMs:r,timeoutMs:i}=ro(n);let a;const c=setInterval((async()=>{const l=await e.post(x.enchantedLink.session,{pendingRef:t});l.ok&&(clearInterval(c),a&&clearTimeout(a),o(w(Promise.resolve(l))))}),r);a=setTimeout((()=>{o({error:{errorDescription:`Session polling timeout exceeded: ${i}ms`,errorCode:"0"},ok:!1}),clearInterval(c)}),i)})))),update:{email:Nr(((t,n,o,r,i)=>w(e.post(x.enchantedLink.update.email,Object.assign({loginId:t,email:n,URI:o},i),{token:r}))))}}),Lr=A(N("flowId")),zr=A(N("executionId"),N("stepId"),N("interactionId")),Br=e=>({start:Lr(((t,n,o,r,i,a,c,l=!1)=>w(e.post(x.flow.start,{flowId:t,options:n,conditionInteractionId:o,interactionId:r,componentsVersion:i,flowVersions:a,input:c,isCustomScreen:l})))),next:zr(((t,n,o,r,i,a,c=!1)=>w(e.post(x.flow.next,{executionId:t,stepId:n,interactionId:o,version:r,componentsVersion:i,input:a,isCustomScreen:c}))))}),Mt=N("loginId"),qr=A(N("token")),wt=A(Mt),Hr=A(Mt,oo("phone")),Mr=A(Mt,Ht("email")),bt=Object.keys(he).filter((e=>e!==we.voice&&e!==we.im)),Jr=e=>({verify:qr((t=>w(e.post(x.magicLink.verify,{token:t})))),signIn:bt.reduce(((t,n)=>Object.assign(Object.assign({},t),{[n]:wt(((o,r,i={},a)=>{var{providerId:c}=i,l=z(i,["providerId"]);return w(e.post(re(x.magicLink.signIn,n),{loginId:o,URI:r,loginOptions:l,providerId:c},{token:a}))}))})),{}),signUp:bt.reduce(((t,n)=>Object.assign(Object.assign({},t),{[n]:wt(((o,r,i,a={})=>{var{providerId:c}=a,l=z(a,["providerId"]);return w(e.post(re(x.magicLink.signUp,n),{loginId:o,URI:r,user:i,loginOptions:l,providerId:c}))}))})),{}),signUpOrIn:bt.reduce(((t,n)=>Object.assign(Object.assign({},t),{[n]:wt(((o,r,i={})=>{var{providerId:a}=i,c=z(i,["providerId"]);return w(e.post(re(x.magicLink.signUpOrIn,n),{loginId:o,URI:r,loginOptions:c,providerId:a}))}))})),{}),update:{email:Mr(((t,n,o,r,i)=>w(e.post(x.magicLink.update.email,Object.assign({loginId:t,email:n,URI:o},i),{token:r})))),phone:Object.keys(we).filter((t=>t!==we.voice)).reduce(((t,n)=>Object.assign(Object.assign({},t),{[n]:Hr(((o,r,i,a,c)=>w(e.post(re(x.magicLink.update.phone,n),Object.assign({loginId:o,phone:r,URI:i},c),{token:a}))))})),{})}});var Dt;(function(e){e.facebook="facebook",e.github="github",e.google="google",e.microsoft="microsoft",e.gitlab="gitlab",e.apple="apple",e.discord="discord",e.linkedin="linkedin",e.slack="slack"})(Dt||(Dt={}));const Wr=A(N("code")),Kr=e=>({start:Object.assign(((t,n,o,r,i)=>w(e.post(x.oauth.start,o||{},{queryParams:Object.assign(Object.assign({provider:t},n&&{redirectURL:n}),i&&{loginHint:i}),token:r}))),Object.keys(Dt).reduce(((t,n)=>Object.assign(Object.assign({},t),{[n]:(o,r,i,a)=>w(e.post(x.oauth.start,r||{},{queryParams:Object.assign(Object.assign({provider:n},o&&{redirectURL:o}),a&&{loginHint:a}),token:i}))})),{})),exchange:Wr((t=>w(e.post(x.oauth.exchange,{code:t})))),startNative:(t,n,o)=>w(e.post(x.oauth.startNative,{provider:t,loginOptions:n,implicit:o})),finishNative:(t,n,o,r,i)=>w(e.post(x.oauth.finishNative,{provider:t,stateId:n,user:o,code:r,idToken:i})),getOneTapClientId:t=>w(e.get(x.oauth.oneTap.getOneTapClientId.replace("{provider}",t))),verifyOneTapIDToken:(t,n,o,r)=>w(e.post(x.oauth.oneTap.verifyOneTapIDToken,{provider:t,idToken:n,nonce:o,loginOptions:r})),exchangeOneTapIDToken:(t,n,o,r)=>w(e.post(x.oauth.oneTap.exchangeOneTapIDToken,{provider:t,idToken:n,nonce:o,loginOptions:r}))}),Vr=N("appId"),Yr=A(Vr),$r=e=>({connect:Yr(((t,n,o)=>{const r=n==null?void 0:n.tenantId,i=n==null?void 0:n.tenantLevel;return n==null||delete n.tenantId,n==null||delete n.tenantLevel,w(e.post(x.outbound.connect,{appId:t,tenantId:r,tenantLevel:i,options:n},{token:o}))}))}),st=N("loginId"),Xr=A(st,N("code")),kt=A(st),Qr=A(st,oo("phone")),Gr=A(st,Ht("email")),Zr=e=>({verify:Object.keys(he).reduce(((t,n)=>Object.assign(Object.assign({},t),{[n]:Xr(((o,r)=>w(e.post(re(x.otp.verify,n),{code:r,loginId:o}))))})),{}),signIn:Object.keys(he).reduce(((t,n)=>Object.assign(Object.assign({},t),{[n]:kt(((o,r={},i)=>{var{providerId:a}=r,c=z(r,["providerId"]);return w(e.post(re(x.otp.signIn,n),{loginId:o,loginOptions:c,providerId:a},{token:i}))}))})),{}),signUp:Object.keys(he).reduce(((t,n)=>Object.assign(Object.assign({},t),{[n]:kt(((o,r,i={})=>{var{providerId:a}=i,c=z(i,["providerId"]);return w(e.post(re(x.otp.signUp,n),{loginId:o,user:r,loginOptions:c,providerId:a}))}))})),{}),signUpOrIn:Object.keys(he).reduce(((t,n)=>Object.assign(Object.assign({},t),{[n]:kt(((o,r={})=>{var{providerId:i}=r,a=z(r,["providerId"]);return w(e.post(re(x.otp.signUpOrIn,n),{loginId:o,loginOptions:a,providerId:i}))}))})),{}),update:{email:Gr(((t,n,o,r)=>w(e.post(x.otp.update.email,Object.assign({loginId:t,email:n},r),{token:o})))),phone:Object.keys(we).reduce(((t,n)=>Object.assign(Object.assign({},t),{[n]:Qr(((o,r,i,a)=>w(e.post(re(x.otp.update.phone,n),Object.assign({loginId:o,phone:r},a),{token:i}))))})),{})}}),_r=A(N("tenant")),ei=A(N("code")),ti=e=>({start:_r(((t,n,o,r,i,a,c,l)=>w(e.post(x.saml.start,o||{},Object.assign({queryParams:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({tenant:t},n&&{redirectURL:n}),i&&{ssoId:i}),a&&{forceAuthn:"true"}),c&&{loginHint:c}),l&&{initiatedEmail:t})},r&&{token:r}))))),exchange:ei((t=>w(e.post(x.saml.exchange,{code:t}))))}),Jt=N("loginId"),ni=A(Jt,N("code")),oi=A(Jt),ri=A(Jt),ii=e=>({signUp:oi(((t,n)=>w(e.post(x.totp.signUp,{loginId:t,user:n})))),verify:ni(((t,n,o,r)=>w(e.post(x.totp.verify,{loginId:t,code:n,loginOptions:o},{token:r})))),update:ri(((t,n)=>w(e.post(x.totp.update,{loginId:t},{token:n}))))}),at=N("loginId"),so=N("newPassword"),Pn=A(at,N("password")),si=A(at),ai=A(at,so),li=A(at,N("oldPassword"),so),ci=e=>({signUp:Pn(((t,n,o,r={})=>{var{providerId:i}=r,a=z(r,["providerId"]);return w(e.post(x.password.signUp,{loginId:t,password:n,user:o,loginOptions:a,providerId:i}))})),signIn:Pn(((t,n,o={})=>{var{providerId:r}=o,i=z(o,["providerId"]);return w(e.post(x.password.signIn,{loginId:t,password:n,loginOptions:i,providerId:r}))})),sendReset:si(((t,n,o)=>w(e.post(x.password.sendReset,{loginId:t,redirectUrl:n,templateOptions:o})))),update:ai(((t,n,o)=>w(e.post(x.password.update,{loginId:t,newPassword:n},{token:o})))),replace:li(((t,n,o)=>w(e.post(x.password.replace,{loginId:t,oldPassword:n,newPassword:o})))),policy:()=>w(e.get(x.password.policy))}),di=to("loginId"),Wt=N("loginId"),lt=N("origin"),ui=A(Wt,lt,N("name")),pi=A(Wt,lt),gi=A(di,lt),hi=A(Wt,lt,no("token")),It=A(N("transactionId"),N("response")),fi=e=>({signUp:{start:ui(((t,n,o,r)=>w(e.post(x.webauthn.signUp.start,{user:{loginId:t,name:o},origin:n,passkeyOptions:r})))),finish:It(((t,n)=>w(e.post(x.webauthn.signUp.finish,{transactionId:t,response:n}))))},signIn:{start:gi(((t,n,o,r,i)=>w(e.post(x.webauthn.signIn.start,{loginId:t,origin:n,loginOptions:o,passkeyOptions:i},{token:r})))),finish:It(((t,n)=>w(e.post(x.webauthn.signIn.finish,{transactionId:t,response:n}))))},signUpOrIn:{start:pi(((t,n,o)=>w(e.post(x.webauthn.signUpOrIn.start,{loginId:t,origin:n,passkeyOptions:o}))))},update:{start:hi(((t,n,o,r)=>w(e.post(x.webauthn.update.start,{loginId:t,origin:n,passkeyOptions:r},{token:o})))),finish:It(((t,n)=>w(e.post(x.webauthn.update.finish,{transactionId:t,response:n}))))}}),vi=to("loginId"),jt=A(vi),mi=A(N("pendingRef")),yi=e=>({signUpOrIn:jt(((t,n={})=>{var{providerId:o}=n,r=z(n,["providerId"]);return w(e.post(x.notp.signUpOrIn,{loginId:t,loginOptions:r,providerId:o}))})),signUp:jt(((t,n,o={})=>{var{providerId:r}=o,i=z(o,["providerId"]);return w(e.post(x.notp.signUp,{loginId:t,user:n,providerId:r,loginOptions:i}))})),signIn:jt(((t,n={},o)=>{var{providerId:r}=n,i=z(n,["providerId"]);return w(e.post(x.notp.signIn,{loginId:t,loginOptions:i,providerId:r},{token:o}))})),waitForSession:mi(((t,n)=>new Promise((o=>{const{pollingIntervalMs:r,timeoutMs:i}=ro(n);let a;const c=setInterval((async()=>{const l=await e.post(x.notp.session,{pendingRef:t});l.ok&&(clearInterval(c),a&&clearTimeout(a),o(w(Promise.resolve(l))))}),r);a=setTimeout((()=>{o({error:{errorDescription:`Session polling timeout exceeded: ${i}ms`,errorCode:"0"},ok:!1}),clearInterval(c)}),i)}))))}),Be=A(N("token")),qe=A(no("token"));var Rn,Nn,xi=A([(Rn="projectId",Nn=N("projectId"),be(Ir(Rn,Nn))())])((e=>{const{projectId:t,logger:n,baseUrl:o,cookiePolicy:r,baseHeaders:i={},refreshCookieName:a,fetch:c}=e;return l=hr({baseUrl:o,projectId:t,logger:n,hooks:{get beforeRequest(){var d;return(d=e.hooks)===null||d===void 0?void 0:d.beforeRequest},get afterRequest(){var d;return(d=e.hooks)===null||d===void 0?void 0:d.afterRequest},get transformResponse(){var d;return(d=e.hooks)===null||d===void 0?void 0:d.transformResponse}},cookiePolicy:r,baseConfig:{baseHeaders:i},refreshCookieName:a,fetch:c}),{accessKey:Dr(l),otp:Zr(l),magicLink:Jr(l),enchantedLink:Fr(l),oauth:Kr(l),outbound:$r(l),saml:ti(l),totp:ii(l),notp:yi(l),webauthn:fi(l),password:ci(l),flow:Br(l),refresh:qe(((d,u,p,v)=>{const b={};p&&(b.externalToken=p);const f=v?x.tryRefresh:x.refresh;return w(l.post(f,b,{token:d,queryParams:u}))})),selectTenant:A([Pe("tenantId")],[Et('"token" must be string or undefined')])(((d,u)=>w(l.post(x.selectTenant,{tenant:d},{token:u})))),logout:qe((d=>w(l.post(x.logout,{},{token:d})))),logoutAll:qe((d=>w(l.post(x.logoutAll,{},{token:d})))),me:qe((d=>w(l.get(x.me,{token:d})))),myTenants:A([Er('"tenants" must a string array or a boolean')],[Et('"token" must be string or undefined')])(((d,u)=>{const p={};return typeof d=="boolean"?p.dct=d:p.ids=d,w(l.post(x.myTenants,p,{token:u}))})),history:qe((d=>w(l.get(x.history,{token:d})))),isJwtExpired:Be(vr),getTenants:Be(mr),getJwtPermissions:Be(yr),getJwtRoles:Be(xr),getCurrentTenant:Be(wr),httpClient:l};var l})),wi=Object.assign(xi,{DeliveryMethods:he});/*! js-cookie v3.0.5 | MIT */function Ze(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)e[o]=n[o]}return e}var bi={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function Pt(e,t){function n(r,i,a){if(!(typeof document>"u")){a=Ze({},t,a),typeof a.expires=="number"&&(a.expires=new Date(Date.now()+a.expires*864e5)),a.expires&&(a.expires=a.expires.toUTCString()),r=encodeURIComponent(r).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var c="";for(var l in a)a[l]&&(c+="; "+l,a[l]!==!0&&(c+="="+a[l].split(";")[0]));return document.cookie=r+"="+e.write(i,r)+c}}function o(r){if(!(typeof document>"u"||arguments.length&&!r)){for(var i=document.cookie?document.cookie.split("; "):[],a={},c=0;c<i.length;c++){var l=i[c].split("="),d=l.slice(1).join("=");try{var u=decodeURIComponent(l[0]);if(a[u]=e.read(d,u),r===u)break}catch{}}return r?a[r]:a}}return Object.create({set:n,get:o,remove:function(r,i){n(r,"",Ze({},i,{expires:-1}))},withAttributes:function(r){return Pt(this.converter,Ze({},this.attributes,r))},withConverter:function(r){return Pt(Ze({},this.converter,r),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var De=Pt(bi,{path:"/"});function ki(e,t){return(function(n,o){return Object.prototype.hasOwnProperty.call(n,o)})(e,t)?e[t]:void 0}function Ii(e,t,n,o){var r,i=document,a="securitypolicyviolation",c=function(d){var u=new URL(e,location.href),p=d.blockedURI;p!==u.href&&p!==u.protocol.slice(0,-1)&&p!==u.origin||(r=d,l())};i.addEventListener(a,c);var l=function(){return i.removeEventListener(a,c)};return Promise.resolve().then(t).then((function(d){return l(),d}),(function(d){return new Promise((function(u){var p=new MessageChannel;p.port1.onmessage=function(){return u()},p.port2.postMessage(null)})).then((function(){if(l(),r)return n(r);throw d}))}))}var ji={default:"endpoint"},ao="Blocked by CSP",lo="The endpoint parameter is not a valid URL",Si="API key required",Ci="3.11.6",Kt="Failed to load the JS script of the agent",Vt="9319";function Oi(e,t){var n,o,r,i,a,c,l,d=[],u=(n=(function(f){var y=er([],f,!0);return{current:function(){return y[0]},postpone:function(){var k=y.shift();k!==void 0&&y.push(k)},exclude:function(){y.shift()}}})(e),i=100,a=3e3,c=0,o=function(){return Math.random()*Math.min(a,i*Math.pow(2,c++))},r=new Set,[n.current(),function(f,y){var k,E=y instanceof Error?y.message:"";if(E===ao||E===lo)n.exclude(),k=0;else if(E===Vt)n.exclude();else if(E===Kt){var U=Date.now()-f.getTime()<50,D=n.current();D&&U&&!r.has(D)&&(r.add(D),k=0),n.postpone()}else n.postpone();var R=n.current();return R===void 0?void 0:[R,k??f.getTime()+o()-Date.now()]}]),p=u[0],v=u[1];if(p===void 0)return Promise.reject(new TypeError("The list of script URL patterns is empty"));var b=function(f){var y=new Date,k=function(U){return d.push({url:f,startedAt:y,finishedAt:new Date,error:U})},E=t(f);return E.then((function(){return k()}),k),E.catch((function(U){if(l!=null||(l=U),d.length>=5)throw l;var D=v(y,U);if(!D)throw l;var R,m=D[0],O=D[1];return(R=O,new Promise((function(H){return setTimeout(H,R)}))).then((function(){return b(m)}))}))};return b(p).then((function(f){return[f,d]}))}var co="https://fpnpmcdn.net/v<version>/<apiKey>/loader_v<loaderVersion>.js",Ai=co;function Ui(e){var t;e.scriptUrlPattern;var n=e.token,o=e.apiKey,r=o===void 0?n:o,i=z(e,["scriptUrlPattern","token","apiKey"]),a=(t=ki(e,"scriptUrlPattern"))!==null&&t!==void 0?t:co,c=(function(){var u=[],p=function(){u.push({time:new Date,state:document.visibilityState})},v=(function(b,f,y,k){return b.addEventListener(f,y,k),function(){return b.removeEventListener(f,y,k)}})(document,"visibilitychange",p);return p(),[u,v]})(),l=c[0],d=c[1];return Promise.resolve().then((function(){if(!r||typeof r!="string")throw new Error(Si);var u=(function(p,v){return(Array.isArray(p)?p:[p]).map((function(b){return(function(f,y){var k=encodeURIComponent;return f.replace(/<[^<>]+>/g,(function(E){return E==="<version>"?"3":E==="<apiKey>"?k(y):E==="<loaderVersion>"?k(Ci):E}))})(String(b),v)}))})(a,r);return Oi(u,Ei)})).catch((function(u){throw d(),(function(p){return p instanceof Error&&p.message===Vt?new Error(Kt):p})(u)})).then((function(u){var p=u[0],v=u[1];return d(),p.load(ot(ot({},i),{ldi:{attempts:v,visibilityStates:l}}))}))}function Ei(e){return Ii(e,(function(){return(function(t){return new Promise((function(n,o){if((function(c){if(URL.prototype)try{return new URL(c,location.href),!1}catch(l){if(l instanceof Error&&l.name==="TypeError")return!0;throw l}})(t))throw new Error(lo);var r=document.createElement("script"),i=function(){var c;return(c=r.parentNode)===null||c===void 0?void 0:c.removeChild(r)},a=document.head||document.getElementsByTagName("head")[0];r.onload=function(){i(),n()},r.onerror=function(){i(),o(new Error(Kt))},r.async=!0,r.src=t,a.appendChild(r)}))})(e)}),(function(){throw new Error(ao)})).then(Ti)}function Ti(){var e=window,t="__fpjs_p_l_b",n=e[t];if((function(o,r){var i,a=(i=Object.getOwnPropertyDescriptor)===null||i===void 0?void 0:i.call(Object,o,r);a!=null&&a.configurable?delete o[r]:a&&!a.writable||(o[r]=void 0)})(e,t),typeof(n==null?void 0:n.load)!="function")throw new Error(Vt);return n}const uo="3.2.0",_=typeof window<"u",St=Math.pow(2,31)-1,Di=`https://descopecdn.com/npm/oidc-client-ts@${uo}/dist/browser/oidc-client-ts.min.js`,Pi=`https://cdn.jsdelivr.net/npm/oidc-client-ts@${uo}/dist/browser/oidc-client-ts.min.js`,Ri=["/v1/auth/refresh","/v1/auth/try-refresh","/v1/auth/me","/v1/auth/me/tenants","/v1/auth/me/history"];let le;const po=e=>{try{return qt(e).exp}catch{return null}},Ni=e=>{const{refresh_expire_in:t,refresh_token:n}=e;return t?Math.floor(Date.now()/1e3)+t:po(n)},Fi=e=>{const{expires_in:t,expires_at:n,access_token:o}=e;return n||(t?Math.floor(Date.now()/1e3)+t:o?po(o):void 0)},go=e=>{const{access_token:t,id_token:n,refresh_token:o,refresh_expire_in:r}=e,i=z(e,["access_token","id_token","refresh_token","refresh_expire_in"]);return Object.assign({sessionJwt:e.sessionJwt||t,idToken:n,refreshJwt:e.refreshJwt||o,sessionExpiration:e.sessionExpiration||Fi(e),cookieExpiration:e.cookieExpiration||Ni(e)},i)},Ue=(e,t)=>{var n;return["beforeRequest","afterRequest"].reduce(((o,r)=>{var i;return o[r]=[].concat(((i=e.hooks)===null||i===void 0?void 0:i[r])||[]).concat((t==null?void 0:t[r])||[]),o}),(n=e.hooks)!==null&&n!==void 0?n:e.hooks={}),e},_e=async e=>{if(!(e!=null&&e.ok))return{};const t=await(e==null?void 0:e.clone().json()),n=(t==null?void 0:t.authInfo)||t||{};return go(n)},Rt=()=>_&&!!window.descopeBridge,Ct=(e,t)=>{if(!((t==null?void 0:t.status)>=400&&(t==null?void 0:t.status)<500))return!1;const n=(e==null?void 0:e.path)||"";return Ri.includes(n)},Li=le!==void 0||_&&window.localStorage!==void 0,ge=(e,t)=>{var n,o;return(o=(n=le||_&&window.localStorage)===null||n===void 0?void 0:n.setItem)===null||o===void 0?void 0:o.call(n,e,t)},ce=e=>{var t,n;return(n=(t=le||_&&window.localStorage)===null||t===void 0?void 0:t.getItem)===null||n===void 0?void 0:n.call(t,e)},se=e=>{var t,n;return(n=(t=le||_&&window.localStorage)===null||t===void 0?void 0:t.removeItem)===null||n===void 0?void 0:n.call(t,e)},zi=e=>{var t,n,o,r,i;return(i=(n=(t=le==null?void 0:le.key)===null||t===void 0?void 0:t.call(le,e))!==null&&n!==void 0?n:_&&((r=(o=window.localStorage)===null||o===void 0?void 0:o.key)===null||r===void 0?void 0:r.call(o,e)))!==null&&i!==void 0?i:null},$=(...e)=>{console.debug(...e)},Fn=(...e)=>{console.warn(...e)},Bi=(e,t)=>{let n;var o;return t>0?(n=1e3*t,$(`Using provided nextRefreshSeconds: ${t}s`)):n=((o=e)?o.getTime()-new Date().getTime():0)-2e4,n>St&&($(`Timeout is too large (${n}ms), setting it to ${St}ms`),n=St),n},ct="DS",Ve="DSR",Yt="DSI";function Ln(e,t,n){if(t){const{cookieDomain:o,cookiePath:r,cookieSameSite:i,cookieExpiration:a,cookieSecure:c}=n,l=new Date(1e3*a),d=Nt(o);De.set(e,t,{path:r,domain:d?o:void 0,expires:l,sameSite:i,secure:c})}}function Nt(e){const t=window.location.hostname.split("."),n=e==null?void 0:e.split(".");return t.slice(-(n==null?void 0:n.length)).join(".")===e}const $t=e=>(e==null?void 0:e.cookieName)||ct,rt=e=>(e==null?void 0:e.cookieName)||Ve;function Je(e="",t){return De.get(rt(t))||ce(`${e}${Ve}`)||""}function zn(e="",t){return De.get($t(t))||ce(`${e}${ct}`)||""}function ho(e=""){return ce(`${e}${Yt}`)||""}function fo(e="",t,n,o){se(`${e}${Ve}`),se(`${e}${ct}`),se(`${e}${Yt}`);const r=$t(t);De.remove(r,o==null?void 0:o.session);const i=rt(n);De.remove(i,o==null?void 0:o.refresh)}const qi=(e,t)=>n=>{const o=Object.assign(n,{token:n.token||Je(e,t)}),r=(function(i=""){return ce(`${i}DTD`)||""})(e);return r&&(o.headers=Object.assign(Object.assign({},o.headers||{}),{"x-descope-trusted-device-token":r})),o},Hi=_&&(localStorage==null?void 0:localStorage.getItem("fingerprint.endpoint.url"))||"https://api.descope.com",Mi="vsid",Ji="vrid",Xt="fp",vo=(e=!1)=>{const t=ce(Xt);if(!t)return null;const n=JSON.parse(t);return new Date().getTime()>n.expiry&&!e?null:n.value},mo=async(e,t=Hi)=>{try{if(vo())return;const n=(Date.now().toString(36)+Math.random().toString(36).substring(2)+Math.random().toString(36).substring(2)).substring(0,27),o=new URL(t);o.pathname="/fXj8gt3x8VulJBna/x96Emn69oZwcd7I6";const r=new URL(t);r.pathname="/fXj8gt3x8VulJBna/w78aRZnnDZ3Aqw0I";const i=r.toString()+"?apiKey=<apiKey>&version=<version>&loaderVersion=<loaderVersion>",a=Ui({apiKey:e,endpoint:[o.toString(),ji],scriptUrlPattern:[i,Ai]}),c=await a,{requestId:l}=await c.get({linkedId:n}),d=((u,p)=>({[Mi]:u,[Ji]:p}))(n,l);(u=>{const p={value:u,expiry:new Date().getTime()+864e5};ge(Xt,JSON.stringify(p))})(d)}catch(n){console.warn("Could not load fingerprint",n)}},Wi=()=>{se(Xt)},Ki=e=>{const t=vo(!0);return t&&e.body&&(e.body.fpData=t),e},Te="descopeFlowNonce",Bn="X-Descope-Flow-Nonce",qn="/v1/flow/start",Ft="/v1/flow/next",Lt=(e,t=Te)=>`${t}${e}`,Vi=(e,t=Te)=>{try{const n=Lt(e,t);se(n)}catch(n){console.error("Error removing flow nonce:",n)}},yo=e=>{var t;return((t=/.*\|#\|(.*)/.exec(e))===null||t===void 0?void 0:t[1])||null},Hn=e=>{var t;return e.path===Ft&&(!((t=e.body)===null||t===void 0)&&t.executionId)?yo(e.body.executionId):null},Qt="dls_last_user_login_id",Gt="dls_last_user_display_name",Mn=e=>ge(Qt,e),zt=()=>ce(Qt),Bt=()=>ce(Gt),Yi=e=>async(...t)=>{var n;t[1]=t[1]||{};const[,o={}]=t,r=zt(),i=Bt();return r&&((n=o.lastAuth)!==null&&n!==void 0||(o.lastAuth={}),o.lastAuth.loginId=r,o.lastAuth.name=i),await e(...t)},$i=e=>t=>async(...n)=>{const o=await t(...n);return e||(se(Qt),se(Gt)),o};function et(){const e=[];return{pub:t=>{e.forEach((n=>n(t)))},sub:t=>{const n=e.push(t)-1;return()=>e.splice(n,1)}}}const Xi=(e,t,n,o)=>r=>async(...i)=>{const a=await r(...i);return fo(e,t,n,o==null?void 0:o()),a};async function tt(e){const t=(function(r){var i;const a=JSON.parse(r);return a.publicKey.challenge=Ke(a.publicKey.challenge),a.publicKey.user.id=Ke(a.publicKey.user.id),(i=a.publicKey.excludeCredentials)===null||i===void 0||i.forEach((c=>{c.id=Ke(c.id)})),a})(e);return o=await navigator.credentials.create(t),JSON.stringify({id:o.id,rawId:xe(o.rawId),type:o.type,response:{attestationObject:xe(o.response.attestationObject),clientDataJSON:xe(o.response.clientDataJSON)}});var o}async function Ot(e){const t=wo(e);return bo(await navigator.credentials.get(t))}async function Qi(e,t){const n=wo(e);return n.signal=t.signal,n.mediation="conditional",bo(await navigator.credentials.get(n))}async function xo(e=!1){var t,n;if(!_)return Promise.resolve(!1);if(Rt()){const r=(n=(t=window.descopeBridge)===null||t===void 0?void 0:t.hostInfo)===null||n===void 0?void 0:n.webauthn;if(typeof r=="boolean")return r}const o=!!(window.PublicKeyCredential&&navigator.credentials&&navigator.credentials.create&&navigator.credentials.get);return o&&e&&PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable?PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable():o}function wo(e){var t;const n=JSON.parse(e);return n.publicKey.challenge=Ke(n.publicKey.challenge),(t=n.publicKey.allowCredentials)===null||t===void 0||t.forEach((o=>{o.id=Ke(o.id)})),n}function bo(e){return JSON.stringify({id:e.id,rawId:xe(e.rawId),type:e.type,response:{authenticatorData:xe(e.response.authenticatorData),clientDataJSON:xe(e.response.clientDataJSON),signature:xe(e.response.signature),userHandle:e.response.userHandle?xe(e.response.userHandle):void 0}})}function Ke(e){const t=e.replace(/_/g,"/").replace(/-/g,"+");return Uint8Array.from(atob(t),(n=>n.charCodeAt(0))).buffer}function xe(e){return btoa(String.fromCharCode.apply(null,new Uint8Array(e))).replace(/\//g,"_").replace(/\+/g,"-").replace(/=/g,"")}var Jn,Gi=(Jn=e=>({async signUp(t,n,o){const r=await e.webauthn.signUp.start(t,window.location.origin,n,o);if(!r.ok)return r;const i=await tt(r.data.options);return await e.webauthn.signUp.finish(r.data.transactionId,i)},async signIn(t,n){const o=await e.webauthn.signIn.start(t,window.location.origin,void 0,void 0,n);if(!o.ok)return o;const r=await Ot(o.data.options);return await e.webauthn.signIn.finish(o.data.transactionId,r)},async signUpOrIn(t,n){var o;const r=await e.webauthn.signUpOrIn.start(t,window.location.origin,n);if(!r.ok)return r;if(!((o=r.data)===null||o===void 0)&&o.create){const i=await tt(r.data.options);return await e.webauthn.signUp.finish(r.data.transactionId,i)}{const i=await Ot(r.data.options);return await e.webauthn.signIn.finish(r.data.transactionId,i)}},async update(t,n,o){const r=await e.webauthn.update.start(t,window.location.origin,n,o);if(!r.ok)return r;const i=await tt(r.data.options);return await e.webauthn.update.finish(r.data.transactionId,i)},helpers:{create:tt,get:Ot,isSupported:xo,conditional:Qi}}),(...e)=>{const t=Jn(...e);return Object.assign(t.signUp,e[0].webauthn.signUp),Object.assign(t.signIn,e[0].webauthn.signIn),Object.assign(t.signUpOrIn,e[0].webauthn.signUpOrIn),Object.assign(t.update,e[0].webauthn.update),t});const Wn={config:"/fedcm/config"},Zi=()=>{if(window.crypto&&window.crypto.getRandomValues){const e=new Uint8Array(16);return window.crypto.getRandomValues(e),Array.from(e,(t=>t.toString(16).padStart(2,"0"))).join("")}return Math.random().toString(36).substring(2)};async function Kn(e,t){var n;try{await ko(e,t)}catch(o){(n=t==null?void 0:t.onFailed)===null||n===void 0||n.call(t,o)}}async function ko(e,t){var n,o;const r=await(async function(i,a="google",c,l,d){const u=Zi(),p=await(async function(){return new Promise(((f,y)=>{if(window.google)return void f(window.google.accounts.id);let k=document.getElementById("google-gsi-client-script");k||(k=document.createElement("script"),document.head.appendChild(k),k.async=!0,k.defer=!0,k.id="google-gsi-client-script",k.src="https://accounts.google.com/gsi/client"),k.onload=function(){window.google?f(window.google.accounts.id):y("Failed to load Google GSI client script - not loaded properly")},k.onerror=function(){y("Failed to load Google GSI client script - failed to load")}}))})(),v=await i.oauth.getOneTapClientId(a);if(!v.ok)throw new Error("Failed to get OneTap client ID for provider "+a);const b=v.data.clientId;return new Promise((f=>{var y,k;const E=U=>{f({provider:a,nonce:u,credential:U==null?void 0:U.credential})};p.initialize(Object.assign(Object.assign({},c),{itp_support:(y=c==null?void 0:c.itp_support)===null||y===void 0||y,use_fedcm_for_prompt:(k=c==null?void 0:c.use_fedcm_for_prompt)===null||k===void 0||k,client_id:b,callback:E,nonce:u})),p.prompt((U=>{var D,R;if(d&&(U!=null&&U.isDismissedMoment())){const m=(D=U.getDismissedReason)===null||D===void 0?void 0:D.call(U);return d==null||d(m),void E()}if(l&&(U!=null&&U.isSkippedMoment())){const m=(R=U.getSkippedReason)===null||R===void 0?void 0:R.call(U);return l==null||l(m),void E()}}))}))})(e,t.provider,t.oneTapConfig,t.onSkipped,t.onDismissed);if(!r.credential)return null;if(t!=null&&t.onCodeReceived){const i=await e.oauth.verifyOneTapIDToken(r.provider,r.credential,r.nonce,t==null?void 0:t.loginOptions);if(!i.ok||!i.data)throw new Error("Failed to verify OneTap client ID for provider "+r.provider);(n=t==null?void 0:t.onCodeReceived)===null||n===void 0||n.call(t,i.data.code)}else{const i=await e.oauth.exchangeOneTapIDToken(r.provider,r.credential,r.nonce,t==null?void 0:t.loginOptions);if(!i.ok||!i.data)throw new Error("Failed to exchange OneTap client ID for provider "+r.provider);(o=t==null?void 0:t.onAuthenticated)===null||o===void 0||o.call(t,i.data)}}var _i=e=>Object.assign(Object.assign({},e.flow),{start:async(...t)=>{const n=await xo(),o=Object.assign(Object.assign({location:window.location.href},t[1]),{deviceInfo:{webAuthnSupport:n},startOptionsVersion:1});return t[1]=o,e.flow.start(...t)}});const es=()=>window.location.search.includes("code")&&window.location.search.includes("state");let At;const Io=(e,t)=>new Promise(((n,o)=>{if(!e.length)return o(new Error("No URLs provided to loadScriptWithFallback"));const r=t();if(r)return n(r);const i=e.shift(),a=document.createElement("script");a.src=i,a.id=(c=>{let l=0;for(let d=0;d<c.length;d++)l=(l<<5)-l+c.charCodeAt(d),l|=0;return Math.abs(l).toString(16)})(i),a.onload=()=>{const c=t();if(c)return n(c);throw new Error("Could not get entry after loading script from URL")},a.addEventListener("error",(()=>{Io(e,t),a.setAttribute("data-error","true")})),document.body.appendChild(a)})),ts=async(e,t,n)=>{At||(At=(async()=>{try{return require("oidc-client-ts")}catch{return Io([Di,Pi],(()=>window.oidc))}})());const{OidcClient:o,WebStorageStateStore:r}=await At;if(!o)throw new Error("oidc-client-ts is not installed. Please install it by running `npm install oidc-client-ts`");const i=(n==null?void 0:n.redirectUri)||window.location.href;let a,c,l,d;if(n!=null&&n.issuer){if(!n.clientId)throw new Error("clientId is required when providing a custom issuer/authority");a=n.issuer,c=n.clientId,l=`${c}_user`,d="openid"}else n!=null&&n.applicationId?(a=e.httpClient.buildUrl(t),a=`${a}/${n.applicationId}`,c=t,l=`${c}_user`,d="openid email roles descope.custom_claims offline_access"):(a=e.httpClient.buildUrl(t),c=t,l=`${c}_user`,d="openid email roles descope.custom_claims offline_access");const u={authority:a,client_id:c,redirect_uri:i,response_type:"code",scope:(n==null?void 0:n.scope)||d,stateStore:new r({store:window.localStorage,prefix:c}),loadUserInfo:!0,fetchRequestCredentials:"same-origin"};return n!=null&&n.redirectUri&&(u.redirect_uri=n.redirectUri),{client:new o(u),stateUserKey:l}},ns=(e,t,n)=>{const o=async()=>{let i,a;return i&&a||({client:i,stateUserKey:a}=await ts(e,t,n)),{client:i,stateUserKey:a}},r=async(i="")=>{var a;const{client:c,stateUserKey:l}=await o(),d=await c.processSigninResponse(i||window.location.href);var u;return await((a=e.httpClient.hooks)===null||a===void 0?void 0:a.afterRequest({},new Response(JSON.stringify(d)))),ge(l,JSON.stringify({id_token:(u=d).id_token,session_state:u.session_state,profile:u.profile})),(()=>{const p=new URL(window.location.href);p.searchParams.delete("code"),p.searchParams.delete("state"),window.history.replaceState({},document.title,p.toString())})(),d};return{loginWithRedirect:async(i={},a=!1)=>{const{client:c}=await o(),l=await c.createSigninRequest(i),{url:d}=l;return a||(window.location.href=d),{ok:!0,data:l}},finishLogin:r,finishLoginIfNeed:async(i="")=>{if(es())return await r(i)},refreshToken:async i=>{var a;const{client:c,stateUserKey:l}=await o(),d=(v=>{const b=ce(v);return b?JSON.parse(b):null})(l);if(!d)throw new Error("User not found in storage to refresh token");let u=i;if(!u){const v={};e.httpClient.hooks.beforeRequest(v),u=v.token}const p=await c.useRefreshToken({state:{refresh_token:u,session_state:d.session_state,profile:d.profile}});return await((a=e.httpClient.hooks)===null||a===void 0?void 0:a.afterRequest({},new Response(JSON.stringify(p)))),p},logout:async(i,a=!1)=>{const{client:c,stateUserKey:l}=await o();i||(i={}),i.id_token_hint=i.id_token_hint||ho(),i.post_logout_redirect_uri=i.post_logout_redirect_uri||window.location.href;const d=await c.createSignoutRequest(i),{url:u}=d;return se(l),a||window.location.replace(u),d}}},jo=(function(...e){return t=>e.reduce(((n,o)=>o(n)),t)})((e=>t=>{var n;return n=t.customStorage,le=n,e(t)}),(e=>t=>{var{fpKey:n,fpLoad:o}=t,r=z(t,["fpKey","fpLoad"]);return _?(n&&o&&mo(n).catch((()=>null)),e(Ue(r,{beforeRequest:Ki}))):e(r)}),(e=>t=>{var{autoRefresh:n}=t,o=z(t,["autoRefresh"]);if(!n||Rt())return e(o);const{clearAllTimers:r,setTimer:i}=(()=>{const d=[];return{clearAllTimers:()=>{for(;d.length;)clearTimeout(d.pop())},setTimer:(u,p)=>{d.push(setTimeout(u,p))}}})();let a,c;_&&document.addEventListener("visibilitychange",(()=>{document.visibilityState==="visible"&&a&&new Date>a&&($("Expiration time passed, refreshing session"),l.refresh(Je()||c))}));const l=e(Ue(o,{afterRequest:async(d,u)=>{const{sessionJwt:p,refreshJwt:v,sessionExpiration:b,nextRefreshSeconds:f}=await _e(u);if(Ct(d,u))$("Session invalidated, canceling all timers"),r();else if(p||b){if(a=((E,U)=>{if(U)return new Date(1e3*U);$("Could not extract expiration time from session token, trying to decode the token");try{const D=qt(E);if(D.exp)return new Date(1e3*D.exp)}catch{return null}})(p,b),!a)return void $("Could not extract expiration time from session token");c=v;const y=Bi(a,f);if(r(),y<=2e4)return void $("Session is too close to expiration, not setting refresh timer");const k=new Date(Date.now()+y).toLocaleTimeString("en-US",{hour12:!1});$(`Setting refresh timer for ${k}. (${y}ms)`),i((()=>{_&&document.visibilityState==="hidden"?$("Skipping refresh due to timer - document is hidden"):($("Refreshing session due to timer"),l.refresh(Je()||v))}),y)}}}));return ze(l,["logout","logoutAll","oidc.logout"],(d=>async(...u)=>{const p=await d(...u);return $("Clearing all timers"),r(),p}))}),(e=>t=>e(Object.assign(Object.assign({},t),{baseHeaders:Object.assign({"x-descope-sdk-name":"web-js","x-descope-sdk-version":"1.45.0"},t.baseHeaders)}))),(e=>t=>{const n=et(),o=et(),r=et(),i=et(),a=e(Ue(t,{afterRequest:async(l,d)=>{if(Ct(l,d))$("Session invalidated, notifying subscribers with empty values"),o.pub(null),r.pub(null),n.pub(null),i.pub(null);else{const u=await(async f=>{const y=await _e(f);return(y==null?void 0:y.user)||(y!=null&&y.hasOwnProperty("userId")?y:void 0)})(d);u&&r.pub(u);const{sessionJwt:p,sessionExpiration:v,claims:b}=await _e(d);p&&o.pub(p),b&&i.pub(b),(v||p)&&n.pub(v||42)}}})),c=ze(a,["logout","logoutAll","oidc.logout"],(l=>async(...d)=>{const u=await l(...d);return o.pub(null),r.pub(null),n.pub(null),i.pub(null),u}));return Object.assign(c,{onSessionTokenChange:o.sub,onUserChange:r.sub,onClaimsChange:i.sub,onIsAuthenticatedChange:l=>n.sub((d=>{l(!!d)}))})}),(e=>t=>{const{enableFlowNonce:n=!0,nonceStoragePrefix:o=Te}=t,r=z(t,["enableFlowNonce","nonceStoragePrefix"]);return n?(((i=Te)=>{try{if(!Li)return;for(let d=0;d<(a=void 0,c=void 0,l=void 0,(l=(a=le==null?void 0:le.length)!==null&&a!==void 0?a:_&&((c=window.localStorage)===null||c===void 0?void 0:c.length))!==null&&l!==void 0?l:0);d++){const u=zi(d);if(u&&u.startsWith(i)){const p=ce(u);if(p)try{JSON.parse(p).expiry<Date.now()&&se(u)}catch{se(u)}}}}catch(d){console.error("Error cleaning up expired nonces:",d)}var a,c,l})(o),e(Ue(r,{afterRequest:async(i,a)=>{if(i.path!==qn&&i.path!==Ft)return;const{nonce:c,executionId:l}=await(async(d,u)=>{try{const p=u.headers.get(Bn);let v=await u.clone().json().then((b=>(b==null?void 0:b.executionId)||null)).catch((()=>null));return v||(v=Hn(d)),{nonce:p,executionId:yo(v)}}catch{return{nonce:null,executionId:null}}})(i,a);c&&l&&((d,u,p,v=Te)=>{try{const b=Lt(d,v),f=p?172800:10800,y={value:u,expiry:Date.now()+1e3*f,isStart:p};ge(b,JSON.stringify(y))}catch(b){console.error("Error setting flow nonce:",b)}})(l,c,i.path===qn,o)},beforeRequest:i=>{if(i.path===Ft){const a=Hn(i);if(a){const c=((l,d=Te)=>{try{const u=Lt(l,d),p=ce(u);if(!p)return null;const v=JSON.parse(p);return v.expiry<Date.now()?(Vi(l,d),null):v.value}catch(u){return console.error("Error getting flow nonce:",u),null}})(a,o);c&&(i.headers=i.headers||{},i.headers[Bn]=c)}}return i}}))):e(r)}),(e=>t=>{var{storeLastAuthenticatedUser:n=!0,keepLastAuthenticatedUserAfterLogout:o=!1}=t,r=z(t,["storeLastAuthenticatedUser","keepLastAuthenticatedUserAfterLogout"]);if(!n)return Object.assign(e(r),{getLastUserLoginId:zt,getLastUserDisplayName:Bt});const i=e(Ue(r,{afterRequest:async(c,l)=>{var d;const{userInfo:u,lastAuth:p}=await(async f=>{if(!(f!=null&&f.ok))return{userInfo:void 0,lastAuth:void 0};const y=await(f==null?void 0:f.clone().json()),k=go((y==null?void 0:y.authInfo)||y||{});return{userInfo:(k==null?void 0:k.user)||(k!=null&&k.hasOwnProperty("userId")?k:void 0),lastAuth:y.lastAuth}})(l),v=(d=u==null?void 0:u.loginIds)===null||d===void 0?void 0:d[0],b=u==null?void 0:u.name;v?(Mn(v),(f=>{ge(Gt,f)})(b)):p!=null&&p.loginId&&Mn(p.loginId)}}));let a=ze(i,["flow.start"],Yi);return a=ze(a,["logout","logoutAll"],$i(o)),Object.assign(a,{getLastUserLoginId:zt,getLastUserDisplayName:Bt})}),(e=>t=>{var{persistTokens:n,sessionTokenViaCookie:o,refreshTokenViaCookie:r,storagePrefix:i}=t,a=z(t,["persistTokens","sessionTokenViaCookie","refreshTokenViaCookie","storagePrefix"]);if(!n||!_)return e(a);let c;const l=e(Ue(a,{beforeRequest:qi(i,r),afterRequest:async(u,p)=>{if(Ct(u,p))$("Session invalidated, clearing persisted tokens"),fo(i,o,r,c);else{const v=((b={},f=!1,y="",k=!1)=>{var E,U,D,R;const{sessionJwt:m,refreshJwt:O,trustedDeviceJwt:H}=b;let X;if(O)if(k){se(`${y}${Ve}`);const W=k.sameSite||"Strict",Q=(E=k.secure)===null||E===void 0||E,L=(U=k.domain)!==null&&U!==void 0?U:b.cookieDomain,G=rt(k);Q&&window.location.protocol!=="https:"&&Fn("Refresh token cookie is configured with secure=true but the page is not using HTTPS. The cookie will not be set. To fix this, pass refreshTokenViaCookie: { secure: process.env['NODE_ENV'] !== 'development' }");const ee=Object.assign(Object.assign({},b),{cookieSameSite:W,cookieSecure:Q,cookieDomain:L});Ln(G,O,ee);const ae=Nt(L);X=Object.assign(Object.assign({},X),{refresh:{path:ee.cookiePath,domain:ae?L:void 0}})}else{const W=rt(k);De.remove(W),ge(`${y}${Ve}`,O)}if(m)if(f){const W=f.sameSite||"Strict",Q=(D=f.secure)===null||D===void 0||D,L=(R=f.domain)!==null&&R!==void 0?R:b.cookieDomain,G=$t(f);Q&&window.location.protocol!=="https:"&&Fn("Session token cookie is configured with secure=true but the page is not using HTTPS. The cookie will not be set. To fix this, pass sessionTokenViaCookie: { secure: process.env['NODE_ENV'] !== 'development' }");const ee=Object.assign(Object.assign({},b),{cookieSameSite:W,cookieSecure:Q,cookieDomain:L});Ln(G,m,ee);const ae=Nt(L);X=Object.assign(Object.assign({},X),{session:{path:ee.cookiePath,domain:ae?L:void 0}})}else ge(`${y}${ct}`,m);return b.idToken&&ge(`${y}${Yt}`,b.idToken),H&&ge(`${y}DTD`,H),X})(await _e(p),o,i,r);v&&(c=v)}}})),d=ze(l,["logout","logoutAll","oidc.logout"],Xi(i,o,r,(()=>c)));return Object.assign(d,{getRefreshToken:()=>Je(i,r),getSessionToken:()=>zn(i,o),getIdToken:()=>ho(i)})}))((e=>{const t=wi(e),n=ns(t,e.projectId,e.oidcConfig);return Object.assign(Object.assign({},t),{refresh:async(i,a)=>{var c;if(Rt())return $(`Refresh called in native flow: ${new Error().stack}`),Promise.resolve({ok:!1,error:{errorCode:"J171000",errorDescription:"Refresh is not supported in native flows via the web SDK"}});if(e.oidcConfig)try{return await n.refreshToken(i),Promise.resolve({ok:!0})}catch(p){return Promise.resolve({ok:!1,error:{errorCode:"J161001",errorDescription:p.toString()}})}const l=zn(),d=Je();let u="";if(e.getExternalToken)try{u=await((c=e.getExternalToken)===null||c===void 0?void 0:c.call(e))}catch(p){$("Error getting external token while refreshing",p)}return t.refresh(i,{dcs:l?"t":"f",dcr:d?"t":"f"},u,a)},logout:async i=>{if(e.oidcConfig)try{return await n.logout({id_token_hint:i}),Promise.resolve({ok:!0})}catch(a){return Promise.resolve({ok:!1,error:{errorCode:"J161000",errorDescription:a.toString()}})}return t.logout(i)},flow:_i(t),webauthn:Gi(t),fedcm:(o=t,r=e.projectId,{onetap:{requestExchangeCode(i){Kn(o,i)},requestAuthentication(i){Kn(o,i)}},async oneTap(i,a,c,l,d){await ko(o,{provider:i,oneTapConfig:a,loginOptions:c,onSkipped:l,onDismissed:d})},async launch(i){var a;const c={identity:{context:i||"signin",providers:[{configURL:o.httpClient.buildUrl(r+Wn.config),clientId:r}]}},l=await((a=navigator.credentials)===null||a===void 0?void 0:a.get(c));return o.refresh(l.token)},isSupported:()=>_&&"IdentityCredential"in window,async isLoggedIn(i){var a;const c=o.httpClient.buildUrl(r+Wn.config);try{const l={identity:{context:i||"signin",providers:[{configURL:c,clientId:r}]}},d=await((a=navigator.credentials)===null||a===void 0?void 0:a.get(l));return!!d&&!!d.token}catch{return!1}}}),oidc:n});var o,r}));let Zt;const So=e=>{const t=jo(Object.assign({persistTokens:Sn,autoRefresh:Sn},e));return Zt=t,t},os=()=>So({projectId:"temp pid",persistTokens:!1,autoRefresh:!1,storeLastAuthenticatedUser:!1});Zt=os();const rs=()=>Zt;var is=({projectId:e,baseUrl:t,persistTokens:n,autoRefresh:o,sessionTokenViaCookie:r,refreshTokenViaCookie:i,refreshCookieName:a,oidcConfig:c,storeLastAuthenticatedUser:l,keepLastAuthenticatedUserAfterLogout:d,getExternalToken:u,hooks:p,customStorage:v})=>g.useMemo((()=>{if(e)return So({projectId:e,baseUrl:t,sessionTokenViaCookie:r,refreshTokenViaCookie:i,baseHeaders:nt,persistTokens:n,autoRefresh:o,refreshCookieName:a,oidcConfig:c,storeLastAuthenticatedUser:l,keepLastAuthenticatedUserAfterLogout:d,hooks:p,getExternalToken:u,customStorage:v})}),[e,t,JSON.stringify(r),JSON.stringify(i),u,v]);const ss=({projectId:e,baseUrl:t="",baseStaticUrl:n="",baseCdnUrl:o="",sessionTokenViaCookie:r=!1,refreshTokenViaCookie:i=!1,hooks:a,persistTokens:c=!0,autoRefresh:l=!0,oidcConfig:d,storeLastAuthenticatedUser:u=!0,keepLastAuthenticatedUserAfterLogout:p=!1,refreshCookieName:v="",getExternalToken:b,customStorage:f,children:y})=>{const[k,E]=g.useState(),[U,D]=g.useState(),[R,m]=g.useState(),[O,H]=g.useState(!1),[X,W]=g.useState(!1),[Q,L]=g.useState(!1),[G,ee]=g.useState(!!d),ae=g.useRef(!1),B=is({projectId:e,baseUrl:t,persistTokens:c,autoRefresh:l,sessionTokenViaCookie:r,refreshTokenViaCookie:i,hooks:a,oidcConfig:d,storeLastAuthenticatedUser:u,keepLastAuthenticatedUserAfterLogout:p,refreshCookieName:v,getExternalToken:b,customStorage:f});g.useEffect((()=>{if(B){const Oe=B.onSessionTokenChange(D),ne=B.onUserChange(E),T=B.onIsAuthenticatedChange(H),Re=B.onClaimsChange(m);return()=>{Oe(),ne(),T(),Re()}}}),[B]);const de=g.useRef(!1),ue=g.useRef(!1);g.useEffect((()=>{B&&d&&!ae.current&&(ae.current=!0,B.oidc.finishLoginIfNeed().finally((()=>{ee(!1),de.current=!0})))}),[]);const J=g.useCallback((()=>{Zo()||de.current||(de.current=!0,L(!0),jn(B==null?void 0:B.refresh)(void 0,!0).then((()=>{L(!1)})))}),[B]),M=g.useCallback((()=>{ue.current||(ue.current=!0,W(!0),jn(B.me)().then((()=>{W(!1)})))}),[B]),te=g.useMemo((()=>({fetchUser:M,user:k,isUserLoading:X,isUserFetched:ue.current,fetchSession:J,session:U,isAuthenticated:O,isSessionLoading:Q,isOidcLoading:G,isSessionFetched:de.current,projectId:e,baseUrl:t,baseStaticUrl:n,baseCdnUrl:o,storeLastAuthenticatedUser:u,keepLastAuthenticatedUserAfterLogout:p,refreshCookieName:v,customStorage:f,setUser:E,setSession:D,setIsAuthenticated:H,claims:R,sdk:B})),[M,k,X,ue.current,J,U,O,Q,G,de.current,e,t,n,o,p,v,f,E,D,H,R,B]);return g.createElement($n.Provider,{value:te},y)};function as(...e){return t=>e.reduce(((n,o)=>o(n)),t)}const ls=(...e)=>e.join("/").replace(/\/+/g,"/"),Vn=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_.]+/g,"-").toLowerCase(),cs=e=>{const t=Symbol((n=>{const o=n.toString();let r=0;for(let i=0;i<o.length;i++)r=(r<<5)-r+o.charCodeAt(i),r&=r;return r.toString(16)})(e));return n=>{if(n[t])return n;const o=e(n);return o[t]=!0,o}},ds=e=>{const[,t,n]=/(.*)\.(prop|attr)$/.exec(e)||[,e,"rest"];return{trimmedKey:t,category:n}},us=e=>typeof e=="string"||e==null?e:JSON.stringify(e),ps=e=>g.forwardRef(((t,n)=>{const{prop:o,attr:r,rest:i}=g.useMemo((()=>Object.entries(t).reduce(((l,[d,u])=>{const{trimmedKey:p,category:v}=ds(d);return v==="prop"?l.prop.push([p,u]):v==="attr"?l.attr.push([Vn(p),us(u)]):Object.assign(l.rest,{[Vn(p)]:u}),l}),{attr:[],prop:[],rest:{}})),[t]),a=g.useRef(null),c=g.useCallback((l=>{a.current=l,l&&(o.forEach((([d,u])=>{a.current[d]=u})),r.forEach((([d,u])=>{u==null?l.removeAttribute(d):l.setAttribute(d,u)})))}),[o,r,a]);return g.useImperativeHandle(n,(()=>a.current)),g.createElement(e,Object.assign({ref:c},i))})),gs=g.lazy((async()=>(((customElements==null?void 0:customElements.get("descope-wc"))||await Promise.resolve().then(()=>require("./index.cjs2.js")).then(e=>e.index).then((e=>e.default))).sdkConfigOverrides={baseHeaders:nt,persistTokens:!1,hooks:{get beforeRequest(){return rs().httpClient.hooks.beforeRequest},set beforeRequest(e){}}},{default:ps(g.forwardRef(((e,t)=>{var{"external-request-id":n}=e,o=z(e,["external-request-id"]);return g.useMemo((()=>{var r,i;r="x-external-rid",(i=n)?nt[r]=i:delete nt[r]}),[n]),g.createElement("descope-wc",Object.assign({ref:t},o))})))}))),hs=g.forwardRef((({flowId:e,onSuccess:t,onError:n,onReady:o,logger:r,tenant:i,theme:a,nonce:c,locale:l,debug:d,client:u,form:p,telemetryKey:v,redirectUrl:b,autoFocus:f,validateOnBlur:y,restartOnError:k,errorTransformer:E,styleId:U,onScreenUpdate:D,dismissScreenErrorOnInput:R,outboundAppId:m,outboundAppScopes:O,popupOrigin:H,children:X,externalRequestId:W},Q)=>{const[L,G]=g.useState(null);g.useImperativeHandle(Q,(()=>L));const{projectId:ee,baseUrl:ae,baseStaticUrl:B,baseCdnUrl:de,storeLastAuthenticatedUser:ue,keepLastAuthenticatedUserAfterLogout:J,refreshCookieName:M,customStorage:te,sdk:Oe}=g.useContext($n),ne=g.useCallback((async T=>{await Oe.httpClient.hooks.afterRequest({},new Response(JSON.stringify(T.detail))),t&&t(T)}),[t]);return g.useEffect((()=>{const T=L;return T==null||T.addEventListener("success",ne),n&&(T==null||T.addEventListener("error",n)),o&&(T==null||T.addEventListener("ready",o)),()=>{n&&(T==null||T.removeEventListener("error",n)),o&&(T==null||T.removeEventListener("ready",o)),T==null||T.removeEventListener("success",ne)}}),[L,n,ne]),g.useEffect((()=>{const T=L;return T==null||T.addEventListener("success",ne),()=>{T==null||T.removeEventListener("success",ne)}}),[L,ne]),g.useEffect((()=>{const T=L;return n&&(T==null||T.addEventListener("error",n)),()=>{n&&(T==null||T.removeEventListener("error",n))}}),[L,n]),g.useEffect((()=>{const T=L;return o&&(T==null||T.addEventListener("ready",o)),()=>{o&&(T==null||T.removeEventListener("error",o))}}),[L,o]),g.createElement("form",null,g.createElement(g.Suspense,{fallback:null},g.createElement(gs,{projectId:ee,flowId:e,baseUrl:ae,baseStaticUrl:B,baseCdnUrl:de,ref:G,telemetryKey:v,redirectUrl:b,autoFocus:f,styleId:U,validateOnBlur:y,restartOnError:k,keepLastAuthenticatedUserAfterLogout:J,tenant:i,externalRequestId:W,customStorage:te,"theme.attr":a,"nonce.attr":c,"locale.attr":l,"form.attr":p,"client.attr":u,"debug.attr":d,"outbound-app-id.attr":m,"outbound-app-scopes.attr":O,"popup-origin.attr":H,"store-last-authenticated-user.attr":ue,"refreshCookieName.attr":M,"dismiss-screen-error-on-input.attr":R,"errorTransformer.prop":E,"logger.prop":r,"onScreenUpdate.prop":D,"customStorage.prop":te},X)))})),fs="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAK8AAAAwCAYAAABnoirjAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGWYwAAI6lJREFUeAHtfQd8FsX29pTdfXtCeoBQAsHQAkIiVZSioFKkCCooiCD2ggXUq4Kici8qol4VkHJB6YIKF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QxJ7KUB4kcidtUskzZ0Ll3IY5byRTEmU+CGcIkU2o9JXNZvlXl9seOhoZ2SpQ+/u7tVbR/mzwXriO+QN0klSsHNu5wpVfmJ2gM9QO+G0DpHErMXeZU2I+65Nuk8k+7HId6HP9U7npgYBe+++v1drl7K8C76VGgVZQqGJdtC3SarXydu2OG+ZTtKjWaq3Waq3Waq3W/svs/wHDkxYoFqn0jQAAAABJRU5ErkJggg==",We="var(--color-green)",S="var(--font-sans)",K={width:"100%",height:40,padding:"10px 14px",fontSize:16,fontWeight:400,lineHeight:"23px",border:"1px solid var(--color-input-border)",borderRadius:4,background:"white",color:"var(--color-text)",fontFamily:S,outline:"none",boxSizing:"border-box",transition:"border-color 0.15s, box-shadow 0.15s"},V=e=>{e.target.style.borderColor="var(--color-green)",e.target.style.boxShadow="0 0 0 3px var(--color-green-ring)"},Y=e=>{e.target.style.borderColor="var(--color-input-border)",e.target.style.boxShadow="none"},vs=[{value:"",label:"Select team size (optional)"},{value:"1-10",label:"1–10"},{value:"11-50",label:"11–50"},{value:"51-200",label:"51–200"},{value:"200+",label:"200+"}],ms=["Nextiva","Five9","Dialpad","RingCentral","NICE","Genesys","Talkdesk","Aircall","8x8","Vonage","Twilio","Other"],ys=["Teams","Zoom","Google Meet","Webex","Other"];function Ee({title:e,subtitle:t}){return s.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[s.jsx("h2",{style:{fontFamily:S,fontWeight:600,fontSize:"36px",lineHeight:"44px",color:"var(--color-text)",margin:0},children:e}),s.jsx("p",{style:{fontFamily:S,fontSize:18,fontWeight:400,lineHeight:"26px",color:"var(--color-text-secondary)",margin:0},children:t})]})}function me({onClick:e,disabled:t,children:n,type:o="button"}){const r=!t;return s.jsx("button",{type:o,onClick:e,disabled:t,style:{width:"100%",height:40,display:"flex",justifyContent:"center",alignItems:"center",padding:"10px",background:r?"var(--color-green)":"var(--color-green-disabled)",color:"white",border:"none",borderRadius:4,fontSize:16,fontWeight:600,lineHeight:"23px",fontFamily:S,cursor:r?"pointer":"not-allowed",transition:"background 0.15s",boxSizing:"border-box"},onMouseEnter:i=>{r&&(i.currentTarget.style.background="var(--color-green-hover)")},onMouseLeave:i=>{r&&(i.currentTarget.style.background=r?"var(--color-green)":"var(--color-green-disabled)")},children:n})}function q({label:e,gap:t=12,labelSize:n=16,labelStyle:o,children:r}){return s.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:t,width:"100%"},children:[s.jsx("label",{style:{fontSize:n,fontWeight:400,color:"var(--color-text)",fontFamily:S,lineHeight:"100%",...o},children:e}),r]})}function Ut({show:e,onToggle:t}){return s.jsx("button",{type:"button",tabIndex:-1,onClick:t,style:{position:"absolute",right:14,top:"50%",transform:"translateY(-50%)",background:"none",border:"none",padding:0,cursor:"pointer",color:"var(--color-text-secondary)",display:"flex",alignItems:"center"},children:e?s.jsx(Ce.EyeOff,{size:16}):s.jsx(Ce.Eye,{size:16})})}function He(){return s.jsx("hr",{style:{width:"100%",border:"none",borderTop:"1px solid var(--color-divider)",margin:0}})}function je({text:e,linkText:t,onClick:n}){return s.jsxs("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",gap:4,width:"100%"},children:[s.jsx("span",{style:{fontSize:15,fontWeight:400,lineHeight:"22px",color:"var(--color-text)",fontFamily:S},children:e}),s.jsx("button",{type:"button",onClick:n,style:{background:"none",border:"none",padding:0,fontSize:15,fontWeight:600,lineHeight:"22px",color:We,cursor:"pointer",fontFamily:S,textDecoration:"underline"},children:t})]})}function ye({onTerms:e,onPrivacyPolicy:t,paddingTop:n}){return s.jsx("div",{style:{display:"flex",justifyContent:"center",width:"100%",marginTop:"auto",paddingTop:n||40,flexShrink:0},children:s.jsxs("span",{style:{fontSize:15,fontWeight:400,lineHeight:"22px",color:"var(--color-text)",fontFamily:S,textAlign:"center",whiteSpace:"nowrap"},children:["By continuing, you agree to our"," ",s.jsx("a",{href:"https://chordia.ai/legal/terms-of-use",target:"_blank",rel:"noopener noreferrer",style:{fontSize:15,fontWeight:400,color:"var(--color-text)",fontFamily:S,textDecoration:"underline",textUnderlineOffset:2},children:"Terms"})," ","and"," ",s.jsx("a",{href:"https://chordia.ai/legal/privacy-notice",target:"_blank",rel:"noopener noreferrer",style:{fontSize:15,fontWeight:400,color:"var(--color-text)",fontFamily:S,textDecoration:"underline",textUnderlineOffset:2},children:"Privacy Policy"}),"."]})})}function xs({projectId:e,onSuccess:t,onError:n}){return e?s.jsx(ss,{projectId:e,children:s.jsx(hs,{flowId:"sign-up-or-in-otp-or-social",onSuccess:t,onError:n})}):null}function Yn({options:e,value:t,onChange:n,otherValue:o,onOtherChange:r,placeholder:i,otherPlaceholder:a="Please specify",compact:c=!1}){const[l,d]=g.useState(!1),u=g.useRef(null);g.useEffect(()=>{const m=O=>{u.current&&!u.current.contains(O.target)&&d(!1)};return document.addEventListener("mousedown",m),()=>document.removeEventListener("mousedown",m)},[]);const p=m=>{t.includes(m)?(n(t.filter(O=>O!==m)),m==="Other"&&r("")):n([...t,m])},v=m=>{n(t.filter(O=>O!==m)),m==="Other"&&r("")},b="rgba(34, 197, 94, 0.14)",f=c?"6px 10px":"8px 12px",y=c?36:40,k=c?15:16,E=c?200:260,U=c?"6px 8px":"8px 10px",D=t.includes("Other"),R=()=>d(m=>!m);return s.jsx("div",{ref:u,style:{width:"100%"},children:s.jsxs("div",{style:{position:"relative",width:"100%"},children:[s.jsxs("div",{role:"combobox","aria-expanded":l,onClick:m=>{m.target instanceof HTMLInputElement||m.target instanceof HTMLElement&&m.target.closest("button")||R()},style:{width:"100%",minHeight:y,padding:f,display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:8,textAlign:"left",fontSize:k,fontWeight:400,lineHeight:"23px",border:"1px solid var(--color-input-border)",borderRadius:4,background:"white",color:t.length?"var(--color-text)":"var(--color-text-secondary)",fontFamily:S,boxSizing:"border-box",cursor:"pointer"},children:[s.jsx("div",{style:{flex:1,display:"flex",flexDirection:"row",flexWrap:"wrap",alignItems:"center",gap:6,minWidth:0,cursor:"text"},children:t.length===0?s.jsx("span",{style:{color:"var(--color-text-secondary)",cursor:"pointer"},onClick:m=>{m.stopPropagation(),R()},onKeyDown:m=>{(m.key==="Enter"||m.key===" ")&&R()},role:"button",tabIndex:0,children:i}):s.jsxs(s.Fragment,{children:[t.map(m=>s.jsxs("span",{onClick:O=>O.stopPropagation(),style:{display:"inline-flex",alignItems:"center",gap:4,padding:"4px 8px",borderRadius:4,background:b,fontSize:13,fontWeight:500,color:"var(--color-text)",flexShrink:0},children:[m,s.jsx("span",{role:"button",tabIndex:0,onClick:O=>{O.stopPropagation(),v(m)},onKeyDown:O=>{(O.key==="Enter"||O.key===" ")&&(O.preventDefault(),O.stopPropagation(),v(m))},style:{cursor:"pointer",fontSize:14,lineHeight:1,opacity:.7},children:"×"})]},m)),D&&s.jsx("input",{type:"text",value:o,onChange:m=>r(m.target.value),placeholder:a,onMouseDown:m=>m.stopPropagation(),onClick:m=>m.stopPropagation(),onFocus:m=>{m.stopPropagation(),m.target.style.borderColor="var(--color-green)",m.target.style.boxShadow="0 0 0 3px var(--color-green-ring)"},onBlur:m=>{m.target.style.borderColor="#cfcece",m.target.style.boxShadow="none"},style:{flex:"1 1 120px",minWidth:80,maxWidth:"100%",minHeight:c?26:28,padding:"2px 8px",border:"1px solid #cfcece",borderRadius:4,outline:"none",background:"transparent",fontSize:k,fontFamily:S,color:"var(--color-text)",boxSizing:"border-box"}})]})}),s.jsx("button",{type:"button",tabIndex:-1,onClick:m=>{m.stopPropagation(),R()},style:{flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",padding:0,margin:0,border:"none",background:"none",cursor:"pointer",color:"var(--color-text-secondary)"},"aria-label":l?"Close options":"Open options",children:s.jsx(Ce.ChevronDown,{size:c?16:18,style:{transform:l?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease"}})})]}),l&&s.jsx("div",{style:{position:"absolute",left:0,right:0,top:"100%",marginTop:4,padding:c?6:8,maxHeight:E,overflowY:"auto",background:"white",border:"1px solid var(--color-input-border)",borderRadius:4,boxShadow:"0 8px 24px rgba(0,0,0,0.08)",zIndex:50,boxSizing:"border-box"},children:e.map(m=>s.jsxs("label",{style:{display:"flex",alignItems:"center",gap:10,padding:U,borderRadius:4,cursor:"pointer",fontSize:c?14:15,fontFamily:S,color:"var(--color-text)"},children:[s.jsx("input",{type:"checkbox",checked:t.includes(m),onChange:()=>p(m),style:{width:16,height:16,accentColor:"var(--color-green)"}}),m]},m))})]})})}function ws({onLogin:e,onForgotPassword:t,onOneTimeCode:n,onVerifyCode:o,onResendCode:r,onSignUp:i,onJoinWaitlist:a,onWaitlistSubmit:c,onResetPassword:l,onTerms:d,onPrivacyPolicy:u,onDescopeSuccess:p,onDescopeError:v,descopeProjectId:b,onGoToLogin:f,loading:y,error:k,codeError:E,defaultView:U="signin",signupMode:D="signup"}){var kn,In;const[R,m]=g.useState(""),[O,H]=g.useState(""),[X,W]=g.useState(!1),[Q,L]=g.useState(!1),[G,ee]=g.useState(!1),[ae,B]=g.useState(!1),[de,ue]=g.useState(null),[J,M]=g.useState(U),[te,Oe]=g.useState(""),[ne,T]=g.useState(""),[Re,_t]=g.useState(""),[pe,Ye]=g.useState(["","","","","",""]),Ne=g.useRef([]),[dt,Co]=g.useState(""),[ut,Oo]=g.useState(""),[Fe,Ao]=g.useState(""),[$e,Uo]=g.useState(""),[pt,Eo]=g.useState(""),[gt,To]=g.useState(!1),[ht,Do]=g.useState(!1),[en,Ae]=g.useState(""),[ft,Po]=g.useState(""),[tn,nn]=g.useState(0),on=3,[rn,Ro]=g.useState(""),[sn,No]=g.useState(""),[an,Fo]=g.useState(""),[ln,Lo]=g.useState(""),[vt,zo]=g.useState(""),[cn,Bo]=g.useState([]),[dn,qo]=g.useState([]),[mt,Ho]=g.useState(""),[yt,Mo]=g.useState(""),[un,fe]=g.useState(""),[pn,gn]=g.useState(!1),[Jo,Wo]=g.useState(!1),[Ko,Vo]=g.useState(1267),[Le,Yo]=g.useState("");g.useEffect(()=>{const h=setInterval(()=>nn(j=>(j+1)%on),4e3);return()=>clearInterval(h)},[]);const ke=g.useRef(null),Ie=g.useRef(null);g.useEffect(()=>{const h=oe=>{if(!oe)return!1;try{return oe.matches(":-webkit-autofill, :autofill")}catch{return!1}},j=()=>{const oe=ke.current,Qe=Ie.current;oe&&oe.value&&m(oe.value),Qe&&Qe.value&&H(Qe.value),W(h(oe)),L(h(Qe))},C=[100,300,600,1e3,2e3].map(oe=>setTimeout(j,oe)),F=oe=>{(oe.animationName==="onAutoFillStart"||oe.target.matches(":-webkit-autofill"))&&setTimeout(j,50)},P=ke.current,I=Ie.current;P==null||P.addEventListener("animationstart",F),I==null||I.addEventListener("animationstart",F);const Z=()=>setTimeout(j,0),ie=()=>setTimeout(j,0);return P==null||P.addEventListener("input",Z),I==null||I.addEventListener("input",Z),P==null||P.addEventListener("change",ie),I==null||I.addEventListener("change",ie),()=>{C.forEach(clearTimeout),P==null||P.removeEventListener("animationstart",F),I==null||I.removeEventListener("animationstart",F),P==null||P.removeEventListener("input",Z),I==null||I.removeEventListener("input",Z),P==null||P.removeEventListener("change",ie),I==null||I.removeEventListener("change",ie)}},[]),g.useEffect(()=>{const h=F=>{if(!F)return!1;try{return F.matches(":-webkit-autofill, :autofill")}catch{return!1}},j=()=>{var I,Z;const F=((I=ke.current)==null?void 0:I.value)||"",P=((Z=Ie.current)==null?void 0:Z.value)||"";F&&F!==R&&m(F),P&&P!==O&&H(P),W(h(ke.current)),L(h(Ie.current))},C=setInterval(j,250);return window.addEventListener("focus",j),document.addEventListener("visibilitychange",j),()=>{clearInterval(C),window.removeEventListener("focus",j),document.removeEventListener("visibilitychange",j)}},[R,O]),g.useEffect(()=>{E&&J==="verifycode"&&(Ye(["","","","","",""]),M("getcodewithname"))},[E]);const hn=y??ae,ve=k??de,$o=(R||((kn=ke.current)==null?void 0:kn.value)||"").trim(),Xo=O||((In=Ie.current)==null?void 0:In.value)||"",fn=!!(!!($o||X)&&!!(Xo||Q)&&!hn),Xe=J==="verifycode"||J==="getcodewithname"?ve:null,vn=h=>{h.target.style.borderColor=ve?"var(--color-text)":"var(--color-green)",h.target.style.boxShadow=ve?"none":"0 0 0 3px var(--color-green-ring)"},mn=h=>{h.target.style.borderColor=ve?"var(--color-text)":"var(--color-input-border)",h.target.style.boxShadow="none"},yn=(h,j)=>{var Z;const C=(j||"").replace(/\D/g,"");if(!C)return;const F=[...pe];let P=h;for(let ie=0;ie<C.length&&h+ie<F.length;ie+=1)F[h+ie]=C[ie],P=h+ie;Ye(F);const I=Math.min(P+1,F.length-1);(Z=Ne.current[I])==null||Z.focus()},xn=(h,j)=>{var I;const C=j.replace(/\D/g,"");if(C.length>1){yn(h,C);return}const F=C.slice(-1),P=[...pe];P[h]=F,Ye(P),F&&h<5&&((I=Ne.current[h+1])==null||I.focus())},wn=(h,j)=>{var C;j.key==="Backspace"&&!pe[h]&&h>0&&((C=Ne.current[h-1])==null||C.focus())},bn=(h,j)=>{var F;j.preventDefault();const C=((F=j.clipboardData)==null?void 0:F.getData("text"))||"";yn(h,C)},Qo=async h=>{var F,P;if(h.preventDefault(),!fn)return;const j=R||((F=ke.current)==null?void 0:F.value)||"",C=O||((P=Ie.current)==null?void 0:P.value)||"";if(!(!j||!C)){ue(null),B(!0);try{await(e==null?void 0:e(j,C))}catch(I){ue((I==null?void 0:I.message)||"Something went wrong. Please try again.")}finally{B(!1)}}},Go=async()=>{fe("");const h=rn.trim(),j=sn.trim(),C=an.trim();if(h.length<2){fe("Please enter your full name.");return}if(!j){fe("Please enter your work email.");return}if(C.length<2){fe("Please enter your company name (at least 2 characters).");return}const F=cn.map(I=>I==="Other"&&mt.trim()?`Other: ${mt.trim()}`:I),P=dn.map(I=>I==="Other"&&yt.trim()?`Other: ${yt.trim()}`:I);gn(!0);try{const I=await(c==null?void 0:c({name:h,email:j,company_name:C,job_title:ln.trim()||void 0,team_size:vt||void 0,phone_systems:F,meeting_tools:P,source:"website"})),Z=Number(I==null?void 0:I.position);Number.isFinite(Z)&&Z>0&&Vo(Z),I!=null&&I.calendly_url&&Yo(String(I.calendly_url)),Wo(!0)}catch(I){fe((I==null?void 0:I.message)||"Unable to join waitlist right now. Please try again.")}finally{gn(!1)}};return s.jsxs("div",{style:{position:"fixed",inset:0,display:"flex",overflow:"hidden",fontFamily:S,background:"white"},children:[s.jsxs("div",{style:{flex:"0 0 628px",width:628,minHeight:0,background:"var(--surface-dark)",display:"flex",flexDirection:"column",padding:"48px 0 40px 48px",position:"relative",overflow:"hidden"},children:[s.jsx("img",{src:fs,alt:"Chordia",style:{width:175,height:48,objectFit:"contain",marginBottom:100,flexShrink:0}}),s.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"flex-start",gap:22},children:[s.jsx("h1",{style:{fontFamily:S,fontSize:"clamp(28px, 2.8vw, 28px)",fontWeight:800,color:"var(--color-text-inverse)",lineHeight:1.08,margin:0,letterSpacing:"-0.02em",paddingRight:48},children:"Three Solutions. One Platform."}),s.jsxs("div",{style:{position:"relative",width:412,height:320,overflow:"hidden",WebkitMaskImage:"-webkit-radial-gradient(white, black)"},children:[s.jsx("div",{style:{display:"flex",gap:16,height:"100%",transform:`translateX(${-tn*280}px)`,transition:"transform 0.5s cubic-bezier(0.4, 0, 0.2, 1)"},children:[{Icon:Ce.CircleCheckBig,title:"Evaluation Quality Monitoring",info:"Stop sampling 2% of calls and hoping for the best. Chordia analyzes every conversation for quality, compliance, and coaching signals — with evidence, not opinions."},{Icon:Ce.ShieldCheck,title:"Compliance Monitoring",info:"Continuously monitor customer service conversations for missed disclosures, risky language, and compliance gaps."},{Icon:Ce.Radar,title:"Signal Intelligence",info:"Identify emerging themes, sentiment shifts, and customer issues hidden inside everyday service conversations."}].map(({Icon:h,title:j,info:C},F)=>s.jsxs("div",{style:{flexShrink:0,width:264,height:320,padding:32,boxSizing:"border-box",display:"flex",flexDirection:"column",alignItems:"flex-start",gap:24,borderRadius:16,border:"1px solid var(--surface-card-dark-border)",background:"var(--surface-card-dark)"},children:[s.jsx(h,{width:36,height:36,color:"var(--color-card-icon)",strokeWidth:2.5}),s.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:12},children:[s.jsx("span",{style:{fontFamily:S,fontSize:24,fontStyle:"normal",fontWeight:600,lineHeight:"28px",color:"var(--color-card-text)"},children:j}),s.jsx("span",{style:{fontFamily:S,fontSize:12,fontStyle:"normal",fontWeight:400,lineHeight:"normal",color:"rgba(255,255,255,0.65)"},children:C})]})]},F))}),s.jsx("div",{style:{position:"absolute",top:0,left:280,right:0,height:"100%",background:"linear-gradient(270deg, #1D1E20 0%, rgba(29,30,32,0.80) 100%)",pointerEvents:"none"}})]}),s.jsx("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:8,height:4,marginTop:"auto",flexShrink:0},children:Array.from({length:on}).map((h,j)=>s.jsx("button",{onClick:()=>nn(j),style:{width:80,height:4,borderRadius:6,border:"none",padding:0,cursor:"pointer",background:j===tn?"rgba(255,255,255,0.7)":"rgba(255,255,255,0.25)",transition:"background 0.3s ease"}},j))})]})]}),s.jsx("div",{style:{flex:1,minWidth:0,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",padding:J==="waitlist"?"20px 48px":"32px 72px",position:"relative",background:"white",overflowY:"auto",minHeight:0},children:s.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",width:"100%",maxWidth:J==="waitlist"?430:360,gap:J==="waitlist"?22:28},children:J==="waitlist"?s.jsx(s.Fragment,{children:Jo?s.jsxs("div",{style:{width:"100%",display:"flex",flexDirection:"column",alignItems:"center",textAlign:"center",gap:24},children:[s.jsx("h2",{style:{fontFamily:S,fontWeight:700,fontSize:"32px",lineHeight:"44px",color:"var(--color-text)",margin:0},children:"Chordia"}),s.jsx("h3",{style:{fontFamily:S,fontWeight:700,fontSize:"32px",lineHeight:"52px",color:"var(--color-text)",margin:0},children:"You're on the list!"}),s.jsxs("p",{style:{fontFamily:S,fontWeight:700,fontSize:"56px",lineHeight:"68px",color:"var(--color-green)",margin:0},children:["#",Ko.toLocaleString()]}),s.jsx("p",{style:{fontFamily:S,fontWeight:400,fontSize:18,lineHeight:"26px",color:"var(--color-text-secondary)",margin:0,maxWidth:470},children:"We’re working hard to increase capacity and will notify you very quickly. Check your email for confirmation."}),s.jsxs("div",{style:{width:"100%",borderRadius:12,border:"1px solid var(--color-input-border)",background:"white",boxShadow:"0 1px 6px rgba(0,0,0,0.06)",padding:"24px 20px",boxSizing:"border-box",display:"flex",flexDirection:"column",alignItems:"center",gap:14},children:[s.jsx("p",{style:{margin:0,fontFamily:S,fontSize:"24px",lineHeight:"40px",fontWeight:700,color:"var(--color-text)"},children:"Want to skip the line?"}),s.jsx("p",{style:{margin:0,fontFamily:S,fontSize:"18px",lineHeight:"24px",fontWeight:400,color:"var(--color-text-secondary)"},children:"Schedule a demo with our CEO and get immediate access."}),s.jsx("button",{type:"button",onClick:()=>{Le&&window.open(Le,"_blank","noopener,noreferrer")},style:{minWidth:220,height:48,padding:"0 20px",borderRadius:8,border:"2px solid #111111",background:"white",color:"var(--color-text)",fontFamily:S,fontSize:20,fontWeight:700,lineHeight:"28px",cursor:Le?"pointer":"default",opacity:Le?1:.65},disabled:!Le,children:"Schedule a Demo"})]})]}):s.jsxs(s.Fragment,{children:[s.jsx(Ee,{title:"Join the Waitlist",subtitle:"Get early access to Chordia. We onboard new companies every week."}),s.jsxs("div",{style:{display:"flex",flexDirection:"column",width:"100%",gap:12},children:[s.jsx(q,{label:"Full Name",gap:8,children:s.jsx("input",{type:"text",value:rn,onChange:h=>{Ro(h.target.value),fe("")},placeholder:"Your full name",autoFocus:!0,autoComplete:"name",style:K,onFocus:V,onBlur:Y})}),s.jsxs("div",{style:{display:"flex",gap:16,width:"100%"},children:[s.jsx("div",{style:{flex:1,minWidth:0},children:s.jsx(q,{label:"Work Email",gap:8,children:s.jsx("input",{type:"email",value:sn,onChange:h=>{No(h.target.value),fe("")},placeholder:"workemail@example.com",autoComplete:"email",style:K,onFocus:V,onBlur:Y})})}),s.jsx("div",{style:{flex:1,minWidth:0},children:s.jsx(q,{label:"Company Name",gap:8,children:s.jsx("input",{type:"text",value:an,onChange:h=>{Fo(h.target.value),fe("")},placeholder:"Your Company",autoComplete:"organization",style:K,onFocus:V,onBlur:Y})})})]}),s.jsxs("div",{style:{display:"flex",gap:16,width:"100%"},children:[s.jsx("div",{style:{flex:1,minWidth:0},children:s.jsx(q,{label:"Job Title",gap:8,children:s.jsx("input",{type:"text",value:ln,onChange:h=>Lo(h.target.value),placeholder:"Optional",autoComplete:"organization-title",style:K,onFocus:V,onBlur:Y})})}),s.jsx("div",{style:{flex:1,minWidth:0},children:s.jsx(q,{label:"Team Size",gap:8,children:s.jsxs("div",{style:{position:"relative"},children:[s.jsx("select",{value:vt,onChange:h=>zo(h.target.value),style:{...K,appearance:"none",WebkitAppearance:"none",paddingRight:36,cursor:"pointer",fontSize:15,color:vt?"var(--color-text)":"var(--color-text-secondary)"},children:vs.map(h=>s.jsx("option",{value:h.value,children:h.label},h.value||"empty"))}),s.jsx(Ce.ChevronDown,{size:16,style:{position:"absolute",right:10,top:"50%",transform:"translateY(-50%)",pointerEvents:"none",color:"var(--color-text-secondary)"}})]})})})]}),s.jsx(q,{label:"Phone systems",gap:8,children:s.jsx(Yn,{compact:!0,options:ms,value:cn,onChange:Bo,otherValue:mt,onOtherChange:Ho,placeholder:"Select (optional)",otherPlaceholder:"Please specify your phone system"})}),s.jsx(q,{label:"Meeting tools",gap:8,children:s.jsx(Yn,{compact:!0,options:ys,value:dn,onChange:qo,otherValue:yt,onOtherChange:Mo,placeholder:"Select (optional)",otherPlaceholder:"Please specify your meeting tool"})}),un&&s.jsxs("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",padding:8,gap:6,width:"100%",boxSizing:"border-box",background:"var(--color-error-bg)",borderRadius:5,fontSize:14,fontWeight:400,lineHeight:"22px",color:"var(--color-text)",fontFamily:S},children:[s.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"var(--color-text)",style:{flexShrink:0},children:s.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"})}),un]}),s.jsx(me,{type:"button",onClick:Go,disabled:pn,children:pn?"Joining...":"Join Waitlist"}),s.jsx(je,{text:"I am already a member",linkText:"Log In",onClick:()=>{M("signin"),f==null||f()}}),s.jsx(ye,{onTerms:d,onPrivacyPolicy:u,paddingTop:16})]})]})}):J==="signup"?s.jsxs(s.Fragment,{children:[s.jsx(Ee,{title:"Sign Up",subtitle:"Please enter your basic details to continue"}),s.jsxs("div",{style:{display:"flex",flexDirection:"column",width:"100%",gap:16},children:[s.jsxs("div",{style:{display:"flex",gap:16,width:"100%"},children:[s.jsx(q,{label:"First Name",gap:8,children:s.jsx("input",{type:"text",value:dt,onChange:h=>Co(h.target.value),placeholder:"First name",autoFocus:!0,autoComplete:"given-name",style:K,onFocus:V,onBlur:Y})}),s.jsx(q,{label:"Last Name",gap:8,children:s.jsx("input",{type:"text",value:ut,onChange:h=>Oo(h.target.value),placeholder:"Last name",autoComplete:"family-name",style:K,onFocus:V,onBlur:Y})})]}),s.jsx(q,{label:"Email",gap:8,children:s.jsx("input",{type:"text",value:Fe,onChange:h=>{Ao(h.target.value),Ae("")},placeholder:"workemail@example.com",autoComplete:"email",style:K,onFocus:V,onBlur:Y})}),s.jsx(q,{label:"Create Password",gap:8,children:s.jsxs("div",{style:{position:"relative"},children:[s.jsx("input",{type:gt?"text":"password",value:$e,onChange:h=>{Uo(h.target.value),Ae("")},placeholder:"Enter password",autoComplete:"new-password",style:{...K,padding:"10px 44px 10px 14px"},onFocus:V,onBlur:Y}),s.jsx(Ut,{show:gt,onToggle:()=>To(!gt)})]})}),s.jsx(q,{label:"Confirm Password",gap:8,children:s.jsxs("div",{style:{position:"relative"},children:[s.jsx("input",{type:ht?"text":"password",value:pt,onChange:h=>{Eo(h.target.value),Ae("")},placeholder:"Enter password",autoComplete:"new-password",style:{...K,padding:"10px 44px 10px 14px"},onFocus:V,onBlur:Y}),s.jsx(Ut,{show:ht,onToggle:()=>Do(!ht)})]})}),en&&s.jsxs("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",padding:8,gap:6,width:"100%",boxSizing:"border-box",background:"var(--color-error-bg)",borderRadius:5,fontSize:14,fontWeight:400,lineHeight:"22px",color:"var(--color-text)",fontFamily:S},children:[s.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"var(--color-text)",style:{flexShrink:0},children:s.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"})}),en]}),(()=>{const h=dt&&ut&&Fe&&$e&&pt;return s.jsx(me,{onClick:()=>{if(Ae(""),!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(Fe)){Ae("Please enter a valid email address.");return}if($e!==pt){Ae("Password and Confirm Password do not match!");return}i==null||i({firstName:dt,lastName:ut,email:Fe,password:$e}),M("verifyemail")},disabled:!h,children:"Create Account"})})(),s.jsx(je,{text:"I am already a member",linkText:"Sign In",onClick:()=>{M("signin"),f==null||f()}}),s.jsx(ye,{onTerms:d,onPrivacyPolicy:u})]})]}):J==="verifyemail"?s.jsxs(s.Fragment,{children:[s.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:16},children:[s.jsx("h2",{style:{fontFamily:S,fontWeight:600,fontSize:"36px",lineHeight:"52px",color:"var(--color-text)",margin:0},children:"Verify Email"}),s.jsx("p",{style:{fontFamily:S,fontSize:18,fontWeight:400,lineHeight:"26px",color:"var(--color-text-secondary)",margin:0},children:"Verify your email to continue the signup process."})]}),s.jsxs("div",{style:{display:"flex",flexDirection:"column",width:"100%",gap:24},children:[s.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[s.jsx("p",{style:{fontFamily:S,fontSize:18,fontWeight:400,lineHeight:"24px",color:"var(--color-text-secondary)",margin:0},children:"We have sent a verification link to:"}),s.jsx("p",{style:{fontFamily:S,fontSize:18,fontWeight:600,lineHeight:"24px",color:"var(--color-text)",margin:0},children:Fe||"youremail@workemail.com"})]}),s.jsx("p",{style:{fontFamily:S,fontSize:18,fontWeight:400,lineHeight:"24px",color:"var(--color-text-secondary)",margin:0},children:"Click on the link to complete the verification process. You might need to check your Spam folder"}),s.jsx(me,{onClick:()=>{M("signin"),f==null||f()},children:"Go To Login"})]}),s.jsx(ye,{onTerms:d,onPrivacyPolicy:u,paddingTop:40})]}):J==="verifycode"?s.jsxs(s.Fragment,{children:[s.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[s.jsx("h2",{style:{fontFamily:S,fontWeight:600,fontSize:"36px",lineHeight:"52px",color:"var(--color-text)",margin:0},children:"Sign In with code"}),s.jsxs("p",{style:{fontFamily:S,fontSize:18,fontWeight:400,lineHeight:"26px",color:"var(--color-text-secondary)",margin:0},children:["We have sent a one-time code to your email:"," ",s.jsx("span",{style:{color:"var(--color-text)"},children:Re||"workemail@example.com"})," ",s.jsx("button",{type:"button",onClick:()=>M("getcode"),style:{background:"none",border:"none",padding:0,fontSize:18,fontWeight:400,color:We,cursor:"pointer",fontFamily:S,textDecoration:"underline"},children:"Change email"})]})]}),s.jsxs("div",{style:{display:"flex",flexDirection:"column",width:"100%",gap:16},children:[s.jsx(q,{label:"Enter one-time code",gap:12,children:s.jsx("div",{style:{display:"flex",gap:8},children:pe.map((h,j)=>s.jsx("input",{ref:C=>{Ne.current[j]=C},type:"text",inputMode:"numeric",maxLength:1,value:h,onChange:C=>xn(j,C.target.value),onKeyDown:C=>wn(j,C),onPaste:C=>bn(j,C),autoFocus:j===0,style:{flex:1,minWidth:0,height:40,textAlign:"center",fontSize:16,fontWeight:600,fontFamily:S,color:"var(--color-text)",border:"1px solid var(--color-input-border)",borderRadius:4,outline:"none",background:"white",boxSizing:"border-box",transition:"border-color 0.15s, box-shadow 0.15s",caretColor:We},onFocus:V,onBlur:Y},j))})}),s.jsx(me,{onClick:()=>o==null?void 0:o(Re,pe.join("")),disabled:pe.some(h=>!h),children:"Verify Code"}),Xe&&s.jsxs("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",padding:8,gap:6,width:"100%",boxSizing:"border-box",background:"var(--color-error-bg)",borderRadius:5,fontSize:15,fontWeight:400,lineHeight:"22px",color:"var(--color-text)",fontFamily:S},children:[s.jsx("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"var(--color-text)",style:{flexShrink:0},children:s.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"})}),Xe]}),s.jsx(He,{}),s.jsx(je,{text:"Not received yet?",linkText:"Resend",onClick:()=>r==null?void 0:r(Re)}),s.jsx(ye,{onTerms:d,onPrivacyPolicy:u,paddingTop:24})]})]}):J==="getcode"?s.jsxs(s.Fragment,{children:[s.jsx(Ee,{title:"Get code",subtitle:"We'll send a one time pass-code to your email"}),s.jsxs("div",{style:{display:"flex",flexDirection:"column",width:"100%",gap:16},children:[s.jsx(q,{label:"Email",gap:12,children:s.jsx("input",{type:"email",value:te,onChange:h=>Oe(h.target.value),placeholder:"workemail@example.com",autoFocus:!0,autoComplete:"email",style:K,onFocus:V,onBlur:Y})}),s.jsx(me,{onClick:()=>{_t(te),Ye(["","","","","",""]),M("verifycode"),n==null||n(te)},disabled:!te,children:"Send One-time Code"}),s.jsx(He,{}),s.jsx(je,{text:"I have my password",linkText:"Back to Sign in",onClick:()=>{M("signin"),f==null||f()}}),s.jsx(ye,{onTerms:d,onPrivacyPolicy:u,paddingTop:40})]})]}):J==="getcodewithname"?s.jsxs(s.Fragment,{children:[s.jsx(Ee,{title:"Complete your sign in",subtitle:"We’ve sent a one-time code to your email. Please enter the code and your full name to sign in"}),s.jsxs("div",{style:{display:"flex",flexDirection:"column",width:"100%",gap:16},children:[s.jsx(q,{label:"Email",gap:12,children:s.jsx("input",{type:"email",value:te,onChange:h=>Oe(h.target.value),placeholder:"workemail@example.com",autoComplete:"email",style:K,onFocus:V,onBlur:Y})}),s.jsx(q,{label:"Full Name",gap:12,children:s.jsx("input",{type:"text",value:ne,onChange:h=>T(h.target.value),placeholder:"Enter your full name",autoComplete:"name",style:K,onFocus:V,onBlur:Y})}),s.jsx(q,{label:"Enter one-time code",gap:12,children:s.jsx("div",{style:{display:"flex",gap:8},children:pe.map((h,j)=>s.jsx("input",{ref:C=>{Ne.current[j]=C},type:"text",inputMode:"numeric",maxLength:1,value:h,onChange:C=>xn(j,C.target.value),onKeyDown:C=>wn(j,C),onPaste:C=>bn(j,C),autoFocus:j===0,style:{flex:1,minWidth:0,height:40,textAlign:"center",fontSize:16,fontWeight:600,fontFamily:S,color:"var(--color-text)",border:"1px solid var(--color-input-border)",borderRadius:4,outline:"none",background:"white",boxSizing:"border-box",transition:"border-color 0.15s, box-shadow 0.15s",caretColor:We},onFocus:V,onBlur:Y},j))})}),s.jsx(me,{onClick:()=>{_t(te),n==null||n(te,ne,pe.join(""))},disabled:!te||!ne||pe.some(h=>!h),children:"Verify & Sign In"}),Xe&&s.jsxs("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",padding:8,gap:6,width:"100%",boxSizing:"border-box",background:"var(--color-error-bg)",borderRadius:5,fontSize:15,fontWeight:400,lineHeight:"22px",color:"var(--color-text)",fontFamily:S},children:[s.jsx("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"var(--color-text)",style:{flexShrink:0},children:s.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"})}),Xe]}),s.jsx(He,{}),s.jsx(je,{text:"I have my password",linkText:"Back to Sign in",onClick:()=>{M("signin"),f==null||f()}}),s.jsx(ye,{onTerms:d,onPrivacyPolicy:u,paddingTop:40})]})]}):J==="resetpassword"?s.jsxs(s.Fragment,{children:[s.jsx(Ee,{title:"Reset Password",subtitle:"We'll send an email to reset your password"}),s.jsxs("div",{style:{display:"flex",flexDirection:"column",width:"100%",gap:16},children:[s.jsx(q,{label:"Email",gap:12,children:s.jsx("input",{type:"email",value:ft,onChange:h=>Po(h.target.value),placeholder:"workemail@example.com",autoFocus:!0,autoComplete:"email",style:K,onFocus:V,onBlur:Y})}),s.jsx(me,{onClick:()=>l==null?void 0:l(ft),disabled:!ft,children:"Send Reset Link"}),s.jsx(He,{}),s.jsx(je,{text:"I have my password",linkText:"Back to Sign in",onClick:()=>{M("signin"),f==null||f()}}),s.jsx(ye,{onTerms:d,onPrivacyPolicy:u,paddingTop:40})]})]}):s.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",width:"100%",gap:48},children:[s.jsx(Ee,{title:"Sign in",subtitle:"Enter your email & password to continue"}),s.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",width:"100%",gap:8},children:[s.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",width:"100%",gap:16},children:[s.jsxs("form",{onSubmit:Qo,style:{width:"100%",display:"flex",flexDirection:"column",gap:16},children:[s.jsx(q,{label:"Email",gap:12,children:s.jsx("input",{ref:ke,type:"email",value:R,onChange:h=>m(h.target.value),placeholder:"workemail@example.com",required:!0,autoComplete:"email",style:{...K,border:`1px solid ${ve?"var(--color-text)":"var(--color-input-border)"}`},onFocus:vn,onBlur:mn})}),s.jsx(q,{label:"Password",gap:12,children:s.jsxs("div",{style:{position:"relative"},children:[s.jsx("input",{ref:Ie,type:G?"text":"password",value:O,onChange:h=>H(h.target.value),placeholder:"Enter password",required:!0,autoComplete:"current-password",style:{...K,padding:"10px 44px 10px 16px",border:`1px solid ${ve?"var(--color-text)":"var(--color-input-border)"}`},onFocus:vn,onBlur:mn}),s.jsx(Ut,{show:G,onToggle:()=>ee(!G)})]})}),s.jsx(me,{type:"submit",disabled:!fn,children:hn?"Signing in…":"Sign In"})]}),ve&&s.jsxs("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",padding:8,gap:6,width:"100%",boxSizing:"border-box",background:"var(--color-error-bg)",borderRadius:5,fontSize:15,fontWeight:400,lineHeight:"22px",color:"var(--color-text)",fontFamily:S},children:[s.jsx("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"var(--color-text)",style:{flexShrink:0},children:s.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"})}),ve]}),s.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%"},children:[s.jsx("button",{type:"button",onClick:()=>{M("resetpassword"),t==null||t()},style:{background:"none",border:"none",padding:0,fontSize:15,fontWeight:400,lineHeight:"100%",color:"var(--color-text)",cursor:"pointer",fontFamily:S,textDecoration:"underline"},children:"Forgot Password?"}),s.jsx("button",{type:"button",onClick:()=>{M("getcode"),n==null||n()},style:{background:"none",border:"none",padding:0,fontSize:15,fontWeight:600,lineHeight:"100%",color:We,cursor:"pointer",fontFamily:S,textDecoration:"underline solid",textUnderlineOffset:0,textDecorationSkipInk:"none"},children:"Sign in with one-time code"})]}),s.jsxs("div",{style:{display:"flex",flexDirection:"column",width:"100%",gap:2},children:[s.jsx(He,{}),s.jsx(xs,{projectId:b,onSuccess:p,onError:v})]})]}),s.jsx(je,{text:D==="waitlist"?"Don't have an account yet?":"Not a member yet?",linkText:D==="waitlist"?"Join Waitlist":"Sign Up",onClick:()=>{if(D==="waitlist"){M("waitlist"),a==null||a();return}M("signup"),i==null||i()}}),s.jsx(ye,{onTerms:d,onPrivacyPolicy:u,paddingTop:16})]})]})})})]})}exports.$e=jo;exports.LoginPage=ws;exports.W=mo;exports.X=Wi;exports.__awaiter=_o;exports.__classPrivateFieldGet=tr;exports.__classPrivateFieldSet=nr;exports.__rest=z;exports.h=cs;exports.r=as;exports.s=ls;
|
|
3
|
-
//# sourceMappingURL=LoginPage.cjs.js.map
|