import{d as e}from"../../nitro/nitro.mjs";import{v4 as o}from"uuid";import*as r from"node:crypto";import"node:http";import"node:https";import"node:events";import"node:buffer";import"node:fs";import"node:path";import"node:url";function encodeBase64(e,o=!1,r=!0){let t=e.toString("base64");return o||(t=t.replace(/=+$/,"")),r&&(t=t.replace(/\+/g,"-").replace(/\//g,"_")),t}const t=e((async e=>{const t=o(),n=encodeBase64(r.randomBytes(32)),i=r.createHash("sha256").update(n,"utf8").digest();return{url:`https://www.cursor.sh/loginDeepControl?challenge=${encodeBase64(Buffer.from(i))}&uuid=${t}&mode=login`,uuid:t,verifier:n}}));export{t as default}; | |