1import{a as e}from"./CNC7AqOf.js";import{$t as t,An as n,Hn as r,Qt as i,Xt as a,Yt as o,Zt as s,it as c,nn as l}from"./Cj3Ri-bZ.js";import{n as u,t as d}from"./C5KgTtL52.js";import{t as f}from"./DW3OcRNq2.js";import{n as p}from"./DTbR38vj2.js";import{x as m}from"./IGt-hQ4R2.js";import{t as h}from"./CJIXJZSN.js";import{n as g}from"./Ci-LqymS.js";var _=m(`fingerprint`,[[`path`,{d:`M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4`,key:`1nerag`}],[`path`,{d:`M14 13.12c0 2.38 0 6.38-1 8.88`,key:`o46ks0`}],[`path`,{d:`M17.29 21.02c.12-.6.43-2.3.5-3.02`,key:`ptglia`}],[`path`,{d:`M2 12a10 10 0 0 1 18-6`,key:`ydlgp0`}],[`path`,{d:`M2 16h.01`,key:`1gqxmh`}],[`path`,{d:`M21.8 16c.2-2 .131-5.354 0-6`,key:`drycrb`}],[`path`,{d:`M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2`,key:`1tidbn`}],[`path`,{d:`M8.65 22c.21-.66.45-1.32.57-2`,key:`13wd9y`}],[`path`,{d:`M9 6.8a6 6 0 0 1 9 5.2v2`,key:`1fr1j5`}]]),v=m(`smartphone`,[[`rect`,{width:`14`,height:`20`,x:`5`,y:`2`,rx:`2`,ry:`2`,key:`1yt0o3`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}]]),y=e(u(),1),b=d();function x(e){let t=new Uint8Array(e),n=``;for(let e of t)n+=String.fromCharCode(e);return btoa(n).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=/g,``)}function S(e){let t=e.replace(/-/g,`+`).replace(/_/g,`/`),n=(4-t.length%4)%4,r=t.padEnd(t.length+n,`=`),i=atob(r),a=new ArrayBuffer(i.length),o=new Uint8Array(a);for(let e=0;e<i.length;e++)o[e]=i.charCodeAt(e);return a}function C(){return w.stubThis(globalThis?.PublicKeyCredential!==void 0&&typeof globalThis.PublicKeyCredential==`function`)}var w={stubThis:e=>e};function T(e){let{id:t}=e;return{...e,id:S(t),transports:e.transports}}function E(e){return e===`localhost`||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}var D=class extends Error{constructor({message:e,code:t,cause:n,name:r}){super(e,{cause:n}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=r??n.name,this.code=t}};function O({error:e,options:t}){let{publicKey:n}=t;if(!n)throw Error(`options was missing required publicKey property`);if(e.name===`AbortError`){if(t.signal instanceof AbortSignal)return new D({message:`Registration ceremony was sent an abort signal`,code:`ERROR_CEREMONY_ABORTED`,cause:e})}else if(e.name===`ConstraintError`){if(n.authenticatorSelection?.requireResidentKey===!0)return new D({message:`Discoverable credentials were required but no available authenticator supported it`,code:`ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT`,cause:e});if(t.mediation===`conditional`&&n.authenticatorSelection?.userVerification===`required`)return new D({message:`User verification was required during automatic registration but it could not be performed`,code:`ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE`,cause:e});if(n.authenticatorSelection?.userVerification===`required`)return new D({message:`User verification was required but no available authenticator supported it`,code:`ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT`,cause:e})}else if(e.name===`InvalidStateError`)return new D({message:`The authenticator was previously registered`,code:`ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED`,cause:e});else if(e.name===`NotAllowedError`)return new D({message:e.message,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e});else if(e.name===`NotSupportedError`)return n.pubKeyCredParams.filter(e=>e.type===`public-key`).length===0?new D({message:`No entry in pubKeyCredParams was of type "public-key"`,code:`ERROR_MALFORMED_PUBKEYCREDPARAMS`,cause:e}):new D({message:`No available authenticator supported any of the specified pubKeyCredParams algorithms`,code:`ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG`,cause:e});else if(e.name===`SecurityError`){let t=globalThis.location.hostname;if(!E(t))return new D({message:`${globalThis.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rp.id!==t)return new D({message:`The RP ID "${n.rp.id}" is invalid for this domain`,code:`ERROR_INVALID_RP_ID`,cause:e})}else if(e.name===`TypeError`){if(n.user.id.byteLength<1||n.user.id.byteLength>64)return new D({message:`User ID was not between 1 and 64 characters`,code:`ERROR_INVALID_USER_ID_LENGTH`,cause:e})}else if(e.name===`UnknownError`)return new D({message:`The authenticator was unable to process the specified options, or could not create a new credential`,code:`ERROR_AUTHENTICATOR_GENERAL_ER
1ROR`,cause:e});return e}var k=new class{constructor(){Object.defineProperty(this,"controller",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}createNewAbortSignal(){if(this.controller){let e=Error(`Cancelling existing WebAuthn API call for new one`);e.name=`AbortError`,this.controller.abort(e)}let e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){let e=Error(`Manually cancelling existing WebAuthn API call`);e.name=`AbortError`,this.controller.abort(e),this.controller=void 0}}},A=[`cross-platform`,`platform`];function j(e){if(e&&!(A.indexOf(e)<0))return e}async function M(e){!e.optionsJSON&&e.challenge&&(console.warn(`startRegistration() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information.`),e={optionsJSON:e});let{optionsJSON:t,useAutoRegister:n=!1}=e;if(!C())throw Error(`WebAuthn is not supported in this browser`);let r={...t,challenge:S(t.challenge),user:{...t.user,id:S(t.user.id)},excludeCredentials:t.excludeCredentials?.map(T)},i={};n&&(i.mediation=`conditional`),i.publicKey=r,i.signal=k.createNewAbortSignal();let a;try{a=await navigator.credentials.create(i)}catch(e){throw O({error:e,options:i})}if(!a)throw Error(`Registration was not completed`);let{id:o,rawId:s,response:c,type:l}=a,u;typeof c.getTransports==`function`&&(u=c.getTransports());let d;if(typeof c.getPublicKeyAlgorithm==`function`)try{d=c.getPublicKeyAlgorithm()}catch(e){N(`getPublicKeyAlgorithm()`,e)}let f;if(typeof c.getPublicKey==`function`)try{let e=c.getPublicKey();e!==null&&(f=x(e))}catch(e){N(`getPublicKey()`,e)}let p;if(typeof c.getAuthenticatorData==`function`)try{p=x(c.getAuthenticatorData())}catch(e){N(`getAuthenticatorData()`,e)}return{id:o,rawId:x(s),response:{attestationObject:x(c.attestationObject),clientDataJSON:x(c.clientDataJSON),transports:u,publicKeyAlgorithm:d,publicKey:f,authenticatorData:p},type:l,clientExtensionResults:a.getClientExtensionResults(),authenticatorAttachment:j(a.authenticatorAttachment)}}function N(e,t){console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.\n`,t)}function P(){if(!C())return F.stubThis(new Promise(e=>e(!1)));let e=globalThis.PublicKeyCredential;return e?.isConditionalMediationAvailable===void 0?F.stubThis(new Promise(e=>e(!1))):F.stubThis(e.isConditionalMediationAvailable())}var F={stubThis:e=>e};function I({error:e,options:t}){let{publicKey:n}=t;if(!n)throw Error(`options was missing required publicKey property`);if(e.name===`AbortError`){if(t.signal instanceof AbortSignal)return new D({message:`Authentication ceremony was sent an abort signal`,code:`ERROR_CEREMONY_ABORTED`,cause:e})}else if(e.name===`NotAllowedError`)return new D({message:e.message,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e});else if(e.name===`SecurityError`){let t=globalThis.location.hostname;if(!E(t))return new D({message:`${globalThis.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rpId!==t)return new D({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:`ERROR_INVALID_RP_ID`,cause:e})}else if(e.name===`UnknownError`)return new D({message:`The authenticator was unable to process the specified options, or could not create a new assertion signature`,code:`ERROR_AUTHENTICATOR_GENERAL_ERROR`,cause:e});return e}async function L(e){!e.optionsJSON&&e.challenge&&(console.warn(`startAuthentication() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information.`),e={optionsJSON:e});let{optionsJSON:t,useBrowserAutofill:n=!1,verifyBrowserAutofillInput:r=!0}=e;if(!C())throw Error(`WebAuthn is not supported in this browser`);let i;t.allowCredentials?.length!==0&&(i=t.allowCredentials?.map(T));let a={...t,challenge:S(t.challenge),allowCredentials:i},o={};if(n){if(!await P())throw Error(`Browser does not support WebAuthn autofill`);if(document.querySelectorAll(`input[autocomplete$='webauthn']`).length<1&&r)throw Error('No <input> with "webauthn" as the only or last value in its `autocomplete` attribute was detected');o.mediation=`conditional`,a.allowCredentials=[]}o.publicKey=a,o.signal=k.createNewAbortSignal();let s;try{s=await navigator.credentials.get(o)}catch(e){throw I({error:e,options:o})}if(!s)throw Error(`Authentication was not completed`);let{id:c,rawId:l,response:u,type:d}=s,f;return u.userHandle&&(f=x(u.userHandle)),{id:c,rawId:x(l),response:{authenticatorData:x(u.authenticatorData),clientDataJSON:x(u.clientDataJSON),signature:x(u.signature),userHandle:f},type:d,clientExtensionResults:s.getClientExtensionResults(),authenticatorAttachment:j(s.authenticatorAttachment)}}var R=Object.defineProperty,z=Object.defineProperties,B=Object.getOwnPropertyDescriptors,V=Object.getOwnPropertySymbols,H=Object.prototype.hasOwnProperty,U=Object.prototype.propertyIsEnumerable,W=(e,t,n)=>t in e?R(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,G=(e,t)=>{for(var n in t||={})H.call(t,n)&&W(e,n,t[n]);if(V)for(var n of V(t))U.call(t,n)&&W(e,n,t[n]);return e},K=(e,t)=>z(e,B(t)),ee=(e,t)=>
1{var n={};for(var r in e)H.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&V)for(var r of V(e))t.indexOf(r)<0&&U.call(e,r)&&(n[r]=e[r]);return n};function te(e){return[setTimeout(e,0),setTimeout(e,10),setTimeout(e,50)]}function ne(e){let t=y.useRef();return y.useEffect(()=>{t.current=e}),t.current}var q=18,J=40,re=`${J}px`,ie=[`[data-lastpass-icon-root]`,`com-1password-button`,`[data-dashlanecreated]`,`[style$="2147483647 !important;"]`].join(`,`);function ae({containerRef:e,inputRef:t,pushPasswordManagerStrategy:n,isFocused:r}){let[i,a]=y.useState(!1),[o,s]=y.useState(!1),[c,l]=y.useState(!1),u=y.useMemo(()=>n!==`none`&&(n===`increase-width`||n===`experimental-no-flickering`)&&i&&o,[i,o,n]),d=y.useCallback(()=>{let r=e.current,i=t.current;if(!r||!i||c||n===`none`)return;let o=r,s=o.getBoundingClientRect().left+o.offsetWidth,u=o.getBoundingClientRect().top+o.offsetHeight/2,d=s-q,f=u;document.querySelectorAll(ie).length===0&&document.elementFromPoint(d,f)===r||(a(!0),l(!0))},[e,t,c,n]);return y.useEffect(()=>{let t=e.current;if(!t||n===`none`)return;function r(){let e=window.innerWidth-t.getBoundingClientRect().right;s(e>=J)}r();let i=setInterval(r,1e3);return()=>{clearInterval(i)}},[e,n]),y.useEffect(()=>{let e=r||document.activeElement===t.current;if(n===`none`||!e)return;let i=setTimeout(d,0),a=setTimeout(d,2e3),o=setTimeout(d,5e3),s=setTimeout(()=>{l(!0)},6e3);return()=>{clearTimeout(i),clearTimeout(a),clearTimeout(o),clearTimeout(s)}},[t,r,n,d]),{hasPWMBadge:i,willPushPWMBadge:u,PWM_BADGE_SPACE_WIDTH:re}}var Y=y.createContext({}),X=y.forwardRef((e,t)=>{var n=e,{value:r,onChange:i,maxLength:a,textAlign:o=`left`,pattern:s,placeholder:c,inputMode:l=`numeric`,onComplete:u,pushPasswordManagerStrategy:d=`increase-width`,pasteTransformer:f,containerClassName:p,noScriptCSSFallback:m=oe,render:h,children:g}=n,_=ee(n,[`value`,`onChange`,`maxLength`,`textAlign`,`pattern`,`placeholder`,`inputMode`,`onComplete`,`pushPasswordManagerStrategy`,`pasteTransformer`,`containerClassName`,`noScriptCSSFallback`,`render`,`children`]),v;let[b,x]=y.useState(typeof _.defaultValue==`string`?_.defaultValue:``),S=r??b,C=ne(S),w=y.useCallback(e=>{i?.(e),x(e)},[i]),T=y.useMemo(()=>s?typeof s==`string`?new RegExp(s):s:null,[s]),E=y.useRef(null),D=y.useRef(null),O=y.useRef({value:S,onChange:w,isIOS:typeof window<`u`&&((v=window==null?void 0:window.CSS)?.supports)?.call(v,`-webkit-touch-callout`,`none`)}),k=y.useRef({prev:[E.current?.selectionStart,E.current?.selectionEnd,E.current?.selectionDirection]});y.useImperativeHandle(t,()=>E.current,[]),y.useEffect(()=>{let e=E.current,t=D.current;if(!e||!t)return;O.current.value!==e.value&&O.current.onChange(e.value),k.current.prev=[e.selectionStart,e.selectionEnd,e.selectionDirection];function n(){if(document.activeElement!==e){F(null),L(null);return}let t=e.selectionStart,n=e.selectionEnd,r=e.selectionDirection,i=e.maxLength,a=e.value,o=k.current.prev,s=-1,c=-1,l;if(a.length!==0&&t!==null&&n!==null){let e=t===n,r=t===a.length&&a.length<i;if(e&&!r){let e=t;if(e===0)s=0,c=1,l=`forward`;else if(e===i)s=e-1,c=e,l=`backward`;else if(i>1&&a.length>1){let t=0;if(o[0]!==null&&o[1]!==null){l=e<o[1]?`backward`:`forward`;let n=o[0]===o[1]&&o[0]<i;l===`backward`&&!n&&(t=-1)}s=t+e,c=t+e+1}}s!==-1&&c!==-1&&s!==c&&E.current.setSelectionRange(s,c,l)}let u=s===-1?t:s,d=c===-1?n:c,f=l??r;F(u),L(d),k.current.prev=[u,d,f]}if(document.addEventListener(`selectionchange`,n,{capture:!0}),n(),document.activeElement===e&&N(!0),!document.getElementById(`input-otp-style`)){let e=document.createElement(`style`);if(e.id=`input-otp-style`,document.head.appendChild(e),e.sheet){let t=`background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;`;Z(e.sheet,`[data-input-otp]::selection { background: transparent !important; color: transparent !important; }`),Z(e.sheet,`[data-input-otp]:autofill { ${t} }`),Z(e.sheet,`[data-input-otp]:-webkit-autofill { ${t} }`),Z(e.sheet,`@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed;
1 font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }`),Z(e.sheet,`[data-input-otp] + * { pointer-events: all !important; }`)}}let r=()=>{t&&t.style.setProperty(`--root-height`,`${e.clientHeight}px`)};r();let i=new ResizeObserver(r);return i.observe(e),()=>{document.removeEventListener(`selectionchange`,n,{capture:!0}),i.disconnect()}},[]);let[A,j]=y.useState(!1),[M,N]=y.useState(!1),[P,F]=y.useState(null),[I,L]=y.useState(null);y.useEffect(()=>{te(()=>{var e;(e=E.current)==null||e.dispatchEvent(new Event(`input`));let t=E.current?.selectionStart,n=E.current?.selectionEnd,r=E.current?.selectionDirection;t!==null&&n!==null&&(F(t),L(n),k.current.prev=[t,n,r])})},[S,M]),y.useEffect(()=>{C!==void 0&&S!==C&&C.length<a&&S.length===a&&u?.(S)},[a,u,C,S]);let R=ae({containerRef:D,inputRef:E,pushPasswordManagerStrategy:d,isFocused:M}),z=y.useCallback(e=>{let t=e.currentTarget.value.slice(0,a);if(t.length>0&&T&&!T.test(t)){e.preventDefault();return}typeof C==`string`&&t.length<C.length&&document.dispatchEvent(new Event(`selectionchange`)),w(t)},[a,w,C,T]),B=y.useCallback(()=>{var e;if(E.current){let t=Math.min(E.current.value.length,a-1),n=E.current.value.length;(e=E.current)==null||e.setSelectionRange(t,n),F(t),L(n)}N(!0)},[a]),V=y.useCallback(e=>{let t=E.current;if(!f&&(!O.current.isIOS||!e.clipboardData||!t))return;let n=e.clipboardData.getData(`text/plain`),r=f?f(n):n;e.preventDefault();let i=E.current?.selectionStart,o=E.current?.selectionEnd,s=(i===o?S.slice(0,i)+r+S.slice(i):S.slice(0,i)+r+S.slice(o)).slice(0,a);if(s.length>0&&T&&!T.test(s))return;t.value=s,w(s);let c=Math.min(s.length,a-1),l=s.length;t.setSelectionRange(c,l),F(c),L(l)},[a,w,T,S]),H=y.useMemo(()=>({position:`relative`,cursor:_.disabled?`default`:`text`,userSelect:`none`,WebkitUserSelect:`none`,pointerEvents:`none`}),[_.disabled]),U=y.useMemo(()=>({position:`absolute`,inset:0,width:R.willPushPWMBadge?`calc(100% + ${R.PWM_BADGE_SPACE_WIDTH})`:`100%`,clipPath:R.willPushPWMBadge?`inset(0 ${R.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:`100%`,display:`flex`,textAlign:o,opacity:`1`,color:`transparent`,pointerEvents:`all`,background:`transparent`,caretColor:`transparent`,border:`0 solid transparent`,outline:`0 solid transparent`,boxShadow:`none`,lineHeight:`1`,letterSpacing:`-.5em`,fontSize:`var(--root-height)`,fontFamily:`monospace`,fontVariantNumeric:`tabular-nums`}),[R.PWM_BADGE_SPACE_WIDTH,R.willPushPWMBadge,o]),W=y.useMemo(()=>y.createElement(`input`,K(G({autoComplete:_.autoComplete||`one-time-code`},_),{"data-input-otp":!0,"data-input-otp-placeholder-shown":S.length===0||void 0,"data-input-otp-mss":P,"data-input-otp-mse":I,inputMode:l,pattern:T?.source,"aria-placeholder":c,style:U,maxLength:a,value:S,ref:E,onPaste:e=>{var t;V(e),(t=_.onPaste)==null||t.call(_,e)},onChange:z,onMouseOver:e=>{var t;j(!0),(t=_.onMouseOver)==null||t.call(_,e)},onMouseLeave:e=>{var t;j(!1),(t=_.onMouseLeave)==null||t.call(_,e)},onFocus:e=>{var t;B(),(t=_.onFocus)==null||t.call(_,e)},onBlur:e=>{var t;N(!1),(t=_.onBlur)==null||t.call(_,e)}})),[z,B,V,l,U,a,I,P,_,T?.source,S]),q=y.useMemo(()=>({slots:Array.from({length:a}).map((e,t)=>{let n=M&&P!==null&&I!==null&&(P===I&&t===P||t>=P&&t<I),r=S[t]===void 0?null:S[t];return{char:r,placeholderChar:S[0]===void 0?c?.[t]??null:null,isActive:n,hasFakeCaret:n&&r===null}}),isFocused:M,isHovering:!_.disabled&&A}),[M,A,a,I,P,_.disabled,S]),J=y.useMemo(()=>h?h(q):y.createElement(Y.Provider,{value:q},g),[g,q,h]);return y.createElement(y.Fragment,null,m!==null&&y.createElement(`noscript`,null,y.createElement(`style`,null,m)),y.createElement(`div`,{ref:D,"data-input-otp-container":!0,style:H,className:p},J,y.createElement(`div`,{style:{position:`absolute`,inset:0,pointerEvents:`none`}},W)))});X.displayName=`Input`;function Z(e,t){try{e.insertRule(t)}catch{console.error(`input-otp could not insert CSS rule:`,t)}}var oe=` 2[data-input-otp] { 3 --nojs-bg: white !important; 4 --nojs-fg: black !important; 5 6 background-color: var(--nojs-bg) !important; 7 color: var(--nojs-fg) !important; 8 caret-color: var(--nojs-fg) !important; 9 letter-spacing: .25em !important; 10 text-align: center !important; 11 border: 1px solid var(--nojs-fg) !important; 12 border-radius: 4px !important; 13 width: 100% !important; 14} 15@media (prefers-color-scheme: dark) { 16 [data-input-otp] { 17 --nojs-bg: black !important; 18 --nojs-fg: white !important; 19 } 20}`,se=`^\\d+$`;function ce({className:e,containerClassName:t,...n}){return(0,b.jsx)(X,{"data-slot":`input-otp`,containerClassName:p(`flex items-center gap-2 has-disabled:opacity-50`,t),className:p(`disabled:cursor-not-allowed`,e),...n})}function le({className:e,...t}){return(0,b.jsx)(`div`,{"data-slot":`input-otp-group`,className:p(`flex items-center`,e),...t})}function Q({index:e,className:t,...n}){let{char:r,hasFakeCaret:i,isActive:a}=(0,y.useContext)(Y)?.slots[e]??{};return(0,b.jsxs)(`div`,{"data-slot":`input-otp-slot`,"data-active":a,className:p(`data-[active=true]:border-ring data-[active=true]:ring data-[active=true]:ring-ring bg-input border-border relative flex h-12 items-center justify-center border-y border-r text-sm shadow-xs transition-all first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10`,`group-data-[invalid]/form-field:border-destructive`,t),...n,children:[r,i&&(0,b.jsx)(`div`,{className:`pointer-events-none absolute inset-0 flex items-center justify-center`,children:(0,b.jsx)(`div`,{className:`animate-caret-blink bg-foreground h-4 w-px duration-1000`})})]})}
20function $({value:e,onChange:t,onComplete:n,...r}){return(0,b.jsx)(ce,{"data-slot":`input-otp`,pattern:se,maxLength:6,value:e,containerClassName:`w-full`,onChange:e=>{t?.(e),e.length===6&&queueMicrotask(()=>n?.(e))},...r,children:(0,b.jsxs)(le,{className:`w-full`,children:[(0,b.jsx)(Q,{index:0,className:`flex-1`}),(0,b.jsx)(Q,{index:1,className:`flex-1`}),(0,b.jsx)(Q,{index:2,className:`flex-1`}),(0,b.jsx)(Q,{index:3,className:`flex-1`}),(0,b.jsx)(Q,{index:4,className:`flex-1`}),(0,b.jsx)(Q,{index:5,className:`flex-1`})]})})}function ue({control:e,name:n,label:r,visuallyHideLabel:c,error:u,description:d,required:f,onComplete:p,autoFocus:m,disabled:h}){return(0,b.jsx)(l,{control:e,name:n,render:({field:e,fieldState:n})=>{let l=u??n.error?.message;return(0,b.jsxs)(i,{invalid:n.invalid,error:l,label:r,required:f,hasDescription:!!d,disabled:h,children:[(0,b.jsx)(t,{className:c?`sr-only`:void 0,children:r}),(0,b.jsx)(o,{children:(0,b.jsx)($,{value:e.value,onChange:e.onChange,onComplete:p,autoFocus:m,disabled:h})}),d&&(0,b.jsx)(a,{children:d}),(0,b.jsx)(s,{})]})}})}function de(e){if(e.control!==void 0)return(0,b.jsx)(ue,{...e});let{label:n,visuallyHideLabel:r,error:c,description:l,required:u,value:d,onChange:f,onComplete:p,autoFocus:m,disabled:h}=e;return(0,b.jsxs)(i,{invalid:!!c,error:c,label:n,required:u,hasDescription:!!l,disabled:h,children:[(0,b.jsx)(t,{className:r?`sr-only`:void 0,children:n}),(0,b.jsx)(o,{children:(0,b.jsx)($,{value:d,onChange:f,onComplete:p,autoFocus:m,disabled:h})}),l&&(0,b.jsx)(a,{children:l}),(0,b.jsx)(s,{})]})}function fe({onDone:e}){let{t}=f([`auth`]),[i,a]=(0,y.useState)(!1);async function o(){a(!0);let n=await c().customers.startPasskeyRegistration();if(!n.ok){a(!1),g.error(t(`passkeySetupFailed`));return}let r=await M(n.value);if(!(await c().customers.finishPasskeyRegistration(r)).ok){a(!1),g.error(t(`passkeySetupFailed`));return}a(!1),e()}return(0,b.jsxs)(`div`,{className:`flex flex-col gap-16`,children:[(0,b.jsxs)(`div`,{className:`space-y-6`,children:[(0,b.jsxs)(`div`,{className:`flex items-start gap-4`,children:[(0,b.jsx)(`div`,{className:`flex items-center justify-center flex-shrink-0 w-10 h-10 rounded-full bg-foreground
20/10 dark:bg-foreground`,children:(0,b.jsx)(_,{className:`text-primary dark:text-background`})}),(0,b.jsxs)(`div`,{children:[(0,b.jsx)(`div`,{className:`font-medium`,children:t(`passkeyBenefitFaster`)}),(0,b.jsx)(`div`,{className:`text-sm text-muted-foreground`,children:t(`passkeyBenefitFasterDesc`)})]})]}),(0,b.jsxs)(`div`,{className:`flex items-start gap-4`,children:[(0,b.jsx)(`div`,{className:`flex items-center justify-center flex-shrink-0 w-10 h-10 rounded-full bg-foreground/10 dark:bg-foreground`,children:(0,b.jsx)(h,{className:`text-primary dark:text-background`})}),(0,b.jsxs)(`div`,{children:[(0,b.jsx)(`div`,{className:`font-medium`,children:t(`passkeyBenefitSecure`)}),(0,b.jsx)(`div`,{className:`text-sm text-muted-foreground`,children:t(`passkeyBenefitSecureDesc`)})]})]}),(0,b.jsxs)(`div`,{className:`flex items-start gap-4`,children:[(0,b.jsx)(`div`,{className:`flex items-center justify-center flex-shrink-0 w-10 h-10 rounded-full bg-foreground/10 dark:bg-foreground`,children:(0,b.jsx)(v,{className:`text-primary dark:text-background`})}),(0,b.jsxs)(`div`,{children:[(0,b.jsx)(`div`,{className:`font-medium`,children:t(`passkeyBenefitEasy`)}),(0,b.jsx)(`div`,{className:`text-sm text-muted-foreground`,children:t(`passkeyBenefitEasyDesc`)})]})]})]}),(0,b.jsxs)(`div`,{className:`flex flex-col`,children:[(0,b.jsxs)(n,{type:`button`,variant:`primary`,size:`xl`,className:`w-full`,disabled:i,onClick:o,children:[i&&(0,b.jsx)(r,{className:`animate-spin`}),!i&&t(`setUpPasskey`)]}),(0,b.jsx)(n,{type:`button`,variant:`ghost`,size:`xl`,className:`w-full`,disabled:i,onClick:e,children:t(`skip`)})]})]})}export{C as i,de as n,L as r,fe as t};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.