1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,207670,e=>{"use strict";e.s(["default",0,function(){for(var e,t,r=0,i="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=function e(t){var r,i,n="";if("string"==typeof t||"number"==typeof t)n+=t;else if("object"==typeof t)if(Array.isArray(t)){var o=t.length;for(r=0;r<o;r++)t[r]&&(i=e(t[r]))&&(n&&(n+=" "),n+=i)}else for(i in t)t[i]&&(n&&(n+=" "),n+=i);return n}(e))&&(i&&(i+=" "),i+=t);return i}])},72297,e=>{"use strict";var t=e.i(843476),r=e.i(207670),i=e.i(522016),n=e.i(271645);let o={"no-icon":{md:"h-10 px-4 text-sm",lg:"h-14 px-6 text-xl",xl:"h-20 px-8 text-2xl"},icon:{md:"h-10 w-10 justify-center text-md",lg:"h-14 w-14 justify-center text-xl",xl:"h-20 w-20 justify-center text-2xl"}},a={primary:"bg-green-700 text-white hover:bg-green-600 focus-visible:bg-green-600",secondary:"bg-green-200/5 text-white hover:bg-green-300/10 focus-visible:bg-green-300/10",outline:"border-2 border-green-500 text-green-500 hover:border-green-400 hover:text-green-400 focus-visible:border-green-400 focus-visible:text-green-400",ghost:"bg-white bg-opacity-0 hover:bg-opacity-5 focus-visible:bg-opacity-5"},s=(0,n.forwardRef)(({children:e,outline:n,icon:s,prefetch:l,variant:c="primary",size:u="md",...h},d)=>{let m=(0,r.default)(o[s?"icon":"no-icon"][u],"no-underline box-border inline-flex items-center justify-center text-center rounded-lg outline-none ring-green-900 transition duration-200 focus-visible:ring disabled:pointer-events-none disabled:opacity-50",a[c],h.className);return h.href?(0,t.jsx)(i.default,{...h,ref:d,className:m,prefetch:l,children:e}):(0,t.jsx)("button",{...h,ref:d,className:m,children:e})});e.s(["Button",0,s])},586447,e=>{"use strict";var t=e.i(843476),r=e.i(500932),i=e.i(207670);let n=(0,e.i(271645).forwardRef)((e,n)=>{let o,a,s=(0,r.c)(6);return s[0]!==e.className?(o=(0,i.default)("z-10 h-12 w-full overflow-auto rounded-lg border border-gray-700 bg-background-light px-4 text-white shadow-md outline-none transition focus:border-green-900 focus:ring focus:ring-green-900 disabled:pointer-events-none disabled:opacity-50",e.className),s[0]=e.className,s[1]=o):o=s[1],s[2]!==e||s[3]!==n||s[4]!==o?(a=(0,t.jsx)("input",{...e,ref:n,className:o}),s[2]=e,s[3]=n,s[4]=o,s[5]=a):a=s[5],a});e.s(["Input",0,n])},954616,e=>{"use strict";var t=e.i(271645),r=e.i(114272),i=e.i(540143),n=e.i(915823),o=e.i(619273),a=class extends n.Subscribable{#e;#t=void 0;#r;#i;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#n()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,o.shallowEqualObjects)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#r,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,o.hashKey)(t.mutationKey)!==(0,o.hashKey)(this.options.mutationKey)?this.reset():this.#r?.state.status==="pending"&&this.#r.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#r?.removeObserver(this)}onMutationUpdate(e){this.#n(),this.#o(e)}getCurrentResult(){return this.#t}reset(){this.#r?.removeObserver(this),this.#r=void 0,this.#n(),this.#o()}mutate(e,t){return this.#i=t,this.#r?.removeObserver(this),this.#r=this.#e.getMutationCache().build(this.#e,this.options),this.#r.addObserver(this),this.#r.execute(e)}#n(){let e=this.#r?.state??(0,r.getDefaultState)();this.#t={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#o(e){i.notifyManager.batch(()=>{if(this.#i&&this.hasListeners()){let t=this.#t.variables,r=this.#t.context,i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#i.onSuccess?.(e.data,t,r,i)}catch(e){Promise.reject(e)}try{this.#i.onSettled?.(e.data,null,t,r,i)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#i.onError?.(e.error,t,r,i)}catch(e){Promise.reject(e)}try{this.#i.onSettled?.(void 0,e.error,t,r,i)}catch(e){Promise.reject(e)}}}
1this.listeners.forEach(e=>{e(this.#t)})})}},s=e.i(912598);function l(e,r){let n=(0,s.useQueryClient)(r),[l]=t.useState(()=>new a(n,e));t.useEffect(()=>{l.setOptions(e)},[l,e]);let c=t.useSyncExternalStore(t.useCallback(e=>l.subscribe(i.notifyManager.batchCalls(e)),[l]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),u=t.useCallback((e,t)=>{l.mutate(e,t).catch(o.noop)},[l]);if(c.error&&(0,o.shouldThrowError)(l.options.throwOnError,[c.error]))throw c.error;return{...c,mutate:u,mutateAsync:c.mutate}}e.s(["useMutation",()=>l],954616)},671232,313422,896729,e=>{"use strict";function t(e){let t=new Uint8Array(e),r="";for(let e of t)r+=String.fromCharCode(e);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function r(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r=(4-t.length%4)%4,i=atob(t.padEnd(t.length+r,"=")),n=new ArrayBuffer(i.length),o=new Uint8Array(n);for(let e=0;e<i.length;e++)o[e]=i.charCodeAt(e);return n}function i(){return n.stubThis(globalThis?.PublicKeyCredential!==void 0&&"function"==typeof globalThis.PublicKeyCredential)}let n={stubThis:e=>e};function o(e){let{id:t}=e;return{...e,id:r(t),transports:e.transports}}function a(e){return"localhost"===e||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}class s extends Error{constructor({message:e,code:t,cause:r,name:i}){super(e,{cause:r}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=i??r.name,this.code=t}}let l=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}}},c=["cross-platform","platform"];function u(e){if(e&&!(0>c.indexOf(e)))return e}async function h(e){let n,c,h,m,g;!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:p,useAutoRegister:f=!1}=e;if(!i())throw Error("WebAuthn is not supported in this browser");let b={...p,challenge:r(p.challenge),user:{...p.user,id:r(p.user.id)},excludeCredentials:p.excludeCredentials?.map(o)},y={};f&&(y.mediation="conditional"),y.publicKey=b,y.signal=l.createNewAbortSignal();try{n=await navigator.credentials.create(y)}catch(e){throw function({error:e,options:t}){let{publicKey:r}=t;if(!r)throw Error("options was missing required publicKey property");if("AbortError"===e.name){if(t.signal instanceof AbortSignal)return new s({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if("ConstraintError"===e.name){if(r.authenticatorSelection?.requireResidentKey===!0)return new s({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});else if("conditional"===t.mediation&&r.authenticatorSelection?.userVerification==="required")return new s({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});else if(r.authenticatorSelection?.userVerification==="required")return new s({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:e})}else if("InvalidStateError"===e.name)return new s({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});else if("NotAllowedError"===e.name)return new s({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});else if("NotSupportedError"===e.name)return new s(0===r.pubKeyCredParams.filter(e=>"public-key"===e.type).length?{message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}:{message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});else if("SecurityError"===e.name){let t=globalThis.location.hostname;if(!a(t))return new s({message:`${globalThis.location.hostname}
1 is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e});if(r.rp.id!==t)return new s({message:`The RP ID "${r.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else if("TypeError"===e.name){if(r.user.id.byteLength<1||r.user.id.byteLength>64)return new s({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:e})}else if("UnknownError"===e.name)return new s({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e});return e}({error:e,options:y})}if(!n)throw Error("Registration was not completed");let{id:w,rawId:R,response:E,type:A}=n;if("function"==typeof E.getTransports&&(h=E.getTransports()),"function"==typeof E.getPublicKeyAlgorithm)try{m=E.getPublicKeyAlgorithm()}catch(e){d("getPublicKeyAlgorithm()",e)}if("function"==typeof E.getPublicKey)try{let e=E.getPublicKey();null!==e&&(g=t(e))}catch(e){d("getPublicKey()",e)}if("function"==typeof E.getAuthenticatorData)try{c=t(E.getAuthenticatorData())}catch(e){d("getAuthenticatorData()",e)}return{id:w,rawId:t(R),response:{attestationObject:t(E.attestationObject),clientDataJSON:t(E.clientDataJSON),transports:h,publicKeyAlgorithm:m,publicKey:g,authenticatorData:c},type:A,clientExtensionResults:n.getClientExtensionResults(),authenticatorAttachment:u(n.authenticatorAttachment)}}function d(e,t){console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them. 2`,t)}e.s(["startRegistration",()=>h],313422);let m=e=>e;async function g(e){let n,c,h;!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:d,useBrowserAutofill:g=!1,verifyBrowserAutofillInput:p=!0}=e;if(!i())throw Error("WebAuthn is not supported in this browser");d.allowCredentials?.length!==0&&(n=d.allowCredentials?.map(o));let f={...d,challenge:r(d.challenge),allowCredentials:n},b={};if(g){if(!await function(){if(!i())return m(new Promise(e=>e(!1)));let e=globalThis.PublicKeyCredential;return e?.isConditionalMediationAvailable===void 0?m(new Promise(e=>e(!1))):m(e.isConditionalMediationAvailable())}())throw Error("Browser does not support WebAuthn autofill");if(document.querySelectorAll("input[autocomplete$='webauthn']").length<1&&p)throw Error('No <input> with "webauthn" as the only or last value in its `autocomplete` attribute was detected');b.mediation="conditional",f.allowCredentials=[]}b.publicKey=f,b.signal=l.createNewAbortSignal();try{c=await navigator.credentials.get(b)}catch(e){throw function({error:e,options:t}){let{publicKey:r}=t;if(!r)throw Error("options was missing required publicKey property");if("AbortError"===e.name){if(t.signal instanceof AbortSignal)return new s({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if("NotAllowedError"===e.name)return new s({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});else if("SecurityError"===e.name){let t=globalThis.location.hostname;if(!a(t))return new s({message:`${globalThis.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e});if(r.rpId!==t)return new s({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else if("UnknownError"===e.name)return new s({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}({error:e,options:b})}if(!c)throw Error("Authentication was not completed");let{id:y,rawId:w,response:R,type:E}=c;return R.userHandle&&(h=t(R.userHandle)),{id:y,rawId:t(w),response:{authenticatorData:t(R.authenticatorData),clientDataJSON:t(R.clientDataJSON),signature:t(R.signature),userHandle:h},type:E,clientExtensionResults:c.getClientExtensionResults(),authenticatorAttachment:u(c.authenticatorAttachment)}}e.s(["startAuthentication",()=>g],896729),e.s([],671232)},405887,e=>{"use strict";var t=e.i(843476),r=e.i(500932),i=e.i(883394);e.i(671232);var n=e.i(896729),o=e.i(954616);e.i(250711);var a=e.i(982045),s=e.i(271645),l=e.i(72297),c=e.i(586447),u=e.i(415171),h=e.i(758220);let d=()=>
2{let e,a,u,d,p,f=(0,r.c)(17),[b,y]=(0,s.useState)(null),[w]=(0,s.useState)(m);f[0]===Symbol.for("react.memo_cache_sentinel")?(e={mutationFn:g},f[0]=e):e=f[0];let{mutate:R,isPending:E,error:A,isSuccess:x,data:O,reset:v}=(0,o.useMutation)(e);f[1]===Symbol.for("react.memo_cache_sentinel")?(a={mutationFn:async()=>{let e;y(null);let t=await fetch("/api/auth/passkeys/login/conditional",{method:"POST"});if(!t.ok)throw Error((await t.json()).error??"Failed to start passkey login");let{options:r,challengeKey:i}=await t.json();try{e=await (0,n.startAuthentication)({optionsJSON:r})}catch(e){throw Error(e instanceof Error?e.message:"Passkey authentication cancelled or failed")}let o=await fetch("/api/auth/passkeys/login/complete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({challengeKey:i,response:e})});if(!o.ok)throw Error((await o.json()).error??"Failed to complete passkey login");o.redirected?window.location.href=o.url:window.location.href="/account"},onError:e=>{y(e.message)}},f[1]=a):a=f[1];let{mutate:S,isPending:_}=(0,o.useMutation)(a),T=O??"";f[2]!==T?(u={mailId:T},f[2]=T,f[3]=u):u=f[3];let N=(0,h.useConvexQuery)(i.api.transactionalMails.getMailById,u);f[4]!==R?(d=e=>{e.preventDefault();let t=new FormData(e.currentTarget),r=t.get("email")?.toString();r?R(r):console.error("Email not found",r,t)},f[4]=R,f[5]=d):d=f[5];let P=d;return f[6]!==N||f[7]!==P||f[8]!==_||f[9]!==w||f[10]!==E||f[11]!==S||f[12]!==A||f[13]!==x||f[14]!==b||f[15]!==v?(p=(0,t.jsx)("div",{children:A?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"measure mx-auto mb-4 text-lg",children:A instanceof Error?A.message:String(A)}),(0,t.jsx)(l.Button,{onClick:v,children:"Try again"})]}):N?.status==="bounced"?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("p",{className:"measure mx-auto mb-4 text-lg",children:["Your login email couldn't be delivered:"," ",N.errorMessage??"Unknown Error"]}),(0,t.jsx)(l.Button,{onClick:v,children:"Try again"})]}):N?.status==="delivered"?(0,t.jsx)("p",{className:"measure mx-auto text-lg text-center text-balance",children:"Your login email has been delivered, check your inbox!"}):x?(0,t.jsx)("p",{className:"measure mx-auto text-lg animate-pulse",children:"Your login link is on its way to your inbox..."}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("form",{onSubmit:P,children:[(0,t.jsxs)("p",{className:"measure mx-auto mb-6 text-lg",children:["Please enter the email address you used to purchase ",(0,t.jsx)("br",{})," AbleSet or your license key to manage your licenses."]}),(0,t.jsx)(c.Input,{name:"email",type:"text",inputMode:"email",className:"mb-4",autoComplete:"email webauthn",placeholder:"Your email address or license key"}),(0,t.jsx)(l.Button,{type:"submit",disabled:E||_,className:"w-full",children:E?"Sending Verification Link...":"Send Verification Mail"})]}),w&&(0,t.jsxs)("div",{className:"relative mt-4 pt-4 border-t border-gray-700",children:[(0,t.jsx)(l.Button,{type:"button",variant:"outline",onClick:()=>S(),disabled:_||E,className:"w-full mb-1",children:_?"Authenticating with Passkey...":"Sign in with Passkey"}),b&&(0,t.jsx)("p",{className:"mt-2 text-sm text-red-700 text-center",children:b})]})]})}),f[6]=N,f[7]=P,f[8]=_,f[9]=w,f[10]=E,f[11]=S,f[12]=A,f[13]=x,f[14]=b,f[15]=v,f[16]=p):p=f[16],p};function m(){return void 0!==window.PublicKeyCredential&&void 0!==navigator.credentials&&void 0!==navigator.credentials.create}async function g(e){let t=await fetch("/api/auth/send-login-email",{method:"POST",body:JSON.stringify({emailOrLicense:e})});if(t.ok)return(await t.json()).mailId;throw Error((await t.json()).error??"Unknown error")}e.s(["LoginForm",0,()=>{let e,i=(0,r.c)(1);return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)(a.ConvexProvider,{client:u.convex,children:(0,t.jsx)(d,{})}),i[0]=e):e=i[0],e}])}]);
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.