PageSourceSearch

https://knowhereto.ai/_next/static/chunks/69e6d4ae41216d6f.js?dpl=dpl_DbGs64T2aVgQFx663UpE5hye67FM

js knowhereto.ai collected 2026-10-05 12:07:38 UTC 26,708 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,868319,e=>{"use strict";let t,n;var r=e.i(247167);let o=Object.create(null),s=e=>globalThis.process?.env||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?o:globalThis),i=new Proxy(o,{get:(e,t)=>s()[t]??o[t],has:(e,t)=>t in s()||t in o,set:(e,t,n)=>(s(!0)[t]=n,!0),deleteProperty(e,t){if(!t)return!1;let n=s(!0);return delete n[t],!0},ownKeys:()=>Object.keys(s(!0))});function l(e,t){return void 0!==r.default&&r.default.env?r.default.env[e]??t:"u">typeof Deno?Deno.env.get(e)??t:"u">typeof Bun?Bun.env[e]??t:t}void 0!==r.default&&r.default.env,Object.freeze({get BETTER_AUTH_SECRET(){return l("BETTER_AUTH_SECRET")},get AUTH_SECRET(){return l("AUTH_SECRET")},get BETTER_AUTH_TELEMETRY(){return l("BETTER_AUTH_TELEMETRY")},get BETTER_AUTH_TELEMETRY_ID(){return l("BETTER_AUTH_TELEMETRY_ID")},get NODE_ENV(){return l("NODE_ENV","development")},get PACKAGE_VERSION(){return l("PACKAGE_VERSION","0.0.0")},get BETTER_AUTH_TELEMETRY_ENDPOINT(){return l("BETTER_AUTH_TELEMETRY_ENDPOINT","https://telemetry.better-auth.com/v1/track")}});let a={eterm:4,cons25:4,console:4,cygwin:4,dtterm:4,gnome:4,hurd:4,jfbterm:4,konsole:4,kterm:4,mlterm:4,mosh:24,putty:4,st:4,"rxvt-unicode-24bit":24,terminator:24,"xterm-kitty":24},u=new Map(Object.entries({APPVEYOR:8,BUILDKITE:8,CIRCLECI:24,DRONE:8,GITEA_ACTIONS:24,GITHUB_ACTIONS:24,GITLAB_CI:8,TRAVIS:8})),c=[/ansi/,/color/,/linux/,/direct/,/^con[0-9]*x[0-9]/,/^rxvt/,/^screen/,/^xterm/,/^vt100/,/^vt220/],d="\x1b[0m",f="\x1b[31m",p="\x1b[32m",h="\x1b[33m",v="\x1b[34m",y="\x1b[35m",g=["debug","info","success","warn","error"],b={info:v,success:p,warn:h,error:f,debug:y};t=(void 0)??"error",n=1!==function(){if(void 0!==l("FORCE_COLOR"))switch(l("FORCE_COLOR")){case"":case"1":case"true":return 4;case"2":return 8;case"3":return 24;default:return 1}if(void 0!==l("NODE_DISABLE_COLORS")&&""!==l("NODE_DISABLE_COLORS")||void 0!==l("NO_COLOR")&&""!==l("NO_COLOR")||"dumb"===l("TERM"))return 1;if(l("TMUX"))return 24;if("TF_BUILD"in i&&"AGENT_NAME"in i)return 4;if("CI"in i){for(let{0:e,1:t}of u)if(e in i)return t;return"codeship"===l("CI_NAME")?8:1}if("TEAMCITY_VERSION"in i)return null!==/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.exec(l("TEAMCITY_VERSION"))?4:1;switch(l("TERM_PROGRAM")){case"iTerm.app":if(!l("TERM_PROGRAM_VERSION")||null!==/^[0-2]\./.exec(l("TERM_PROGRAM_VERSION")))return 8;return 24;case"HyperTerm":case"MacTerm":return 24;case"Apple_Terminal":return 8}if("truecolor"===l("COLORTERM")||"24bit"===l("COLORTERM"))return 24;if(l("TERM")){if(null!==/truecolor/.exec(l("TERM")))return 24;if(null!==/^xterm-256/.exec(l("TERM")))return 8;let e=l("TERM").toLowerCase();if(a[e])return a[e];if(c.some(t=>null!==t.exec(e)))return 4}return l("COLORTERM")?4:1}(),Object.fromEntries(g.map(e=>[e,(...[r,...o])=>((e,r,o=[])=>{let s;if(!(g.indexOf(e)>=g.indexOf(t)))return;let i=(s=new Date().toISOString(),n?`\x1b[2m${s}${d} ${b[e]}${e.toUpperCase()}${d} \x1b[1m[Better Auth]:${d} ${r}`:`${s} ${e.toUpperCase()} [Better Auth]: ${r}`);"error"===e?console.error(i,...o):"warn"===e?console.warn(i,...o):console.log(i,...o)})(e,r,o)]));var m=class extends Error{constructor(e,t){super(e),this.name="BetterAuthError",this.message=e,this.cause=t,this.stack=""}};function w(e){return{newRole:e=>{var t;return{authorize(e,n="AND"){let r=!1;for(let[o,s]of Object.entries(e)){let e=t[o];if(!e)return{success:!1,error:`You are not allowed to access resource: ${o}`};if(Array.isArray(s))r=s.every(t=>e.includes(t));else if("object"==typeof s)r="OR"===s.connector?s.actions.some(t=>e.includes(t)):s.actions.every(t=>e.includes(t));else throw new m("Invalid access control request");if(r&&"OR"===n)return{success:r};if(!r&&"AND"===n)return{success:!1,error:`unauthorized to access resource "${o}"`}}return r?{success:r}:{success:!1,error:"Not authorized"}},statements:t=e}},statements:e}}let R=w({user:["create","list","set-role","ban","impersonate","delete","set-password","get","update"],session:["list","revoke","delete"]});R.newRole({user:["create","list","set-role","ban","impersonate","delete","set-password","get","update"],session:["list","revoke","delete"]}),R.newRole({user:[],session:[]});let T=[],E=0,O=0,S=e=>{let t=[],n={get:()=>(n.lc||n.listen(()=>{})(),n.value),lc:0,listen:e=>(n.lc=t.push(e),()=>{for(let t=E+4;t<T.length;)T[t]===e?T.splice(t,4):t+=4;let r=t.indexOf(e);~r&&(t.splice(r,1),--n.lc||n.off())}),notify(e,r){O++;let o=!T.length;for(let o of t)T.push(o,n.value,e,r);
1if(o){for(E=0;E<T.length;E+=4)T[E](T[E+1],T[E+2],T[E+3]);T.length=0}},off(){},set(e){let t=n.value;t!==e&&(n.value=e,n.notify(t))},subscribe(e){let t=n.listen(e);return e(n.value),t},value:e};return n},_=(e,t)=>{var n,r;return n=n=>{let r=t(n);r&&e.events[6].push(r)},r=t=>{let n=e.listen;e.listen=(...r)=>(e.lc||e.active||(e.active=!0,t()),n(...r));let r=e.off;return e.events[6]=[],e.off=()=>{r(),setTimeout(()=>{if(e.active&&!e.lc){for(let t of(e.active=!1,e.events[6]))t();e.events[6]=[]}},1e3)},()=>{e.listen=n,e.off=r}},e.events=e.events||{},e.events[15]||(e.events[15]=r(t=>{e.events[5].reduceRight((e,t)=>(t(e),e),{shared:{},...t})})),e.events[5]=e.events[5]||[],e.events[5].push(n),()=>{let t=e.events[5],r=t.indexOf(n);t.splice(r,1),t.length||(delete e.events[5],e.events[15](),delete e.events[15])}},A=()=>"u"<typeof window,L=Symbol.for("better-auth:broadcast-channel");var U=class{listeners=new Set;name;constructor(e="better-auth.message"){this.name=e}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}post(e){if("u">typeof window)try{localStorage.setItem(this.name,JSON.stringify({...e,timestamp:Math.floor(Date.now()/1e3)}))}catch{}}setup(){if("u"<typeof window||void 0===window.addEventListener)return()=>{};let e=e=>{if(e.key!==this.name)return;let t=JSON.parse(e.newValue??"{}");t?.event==="session"&&t?.data&&this.listeners.forEach(e=>e(t))};return window.addEventListener("storage",e),()=>{window.removeEventListener("storage",e)}}};function I(e="better-auth.message"){return globalThis[L]||(globalThis[L]=new U(e)),globalThis[L]}let x=Symbol.for("better-auth:focus-manager");var P=class{listeners=new Set;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setFocused(e){this.listeners.forEach(t=>t(e))}setup(){if("u"<typeof window||"u"<typeof document||void 0===window.addEventListener)return()=>{};let e=()=>{"visible"===document.visibilityState&&this.setFocused(!0)};return document.addEventListener("visibilitychange",e,!1),()=>{document.removeEventListener("visibilitychange",e,!1)}}};function C(){return globalThis[x]||(globalThis[x]=new P),globalThis[x]}let j=Symbol.for("better-auth:online-manager");var $=class{listeners=new Set;isOnline="u"<typeof navigator||navigator.onLine;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setOnline(e){this.isOnline=e,this.listeners.forEach(t=>t(e))}setup(){if("u"<typeof window||void 0===window.addEventListener)return()=>{};let e=()=>this.setOnline(!0),t=()=>this.setOnline(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",t,!1),()=>{window.removeEventListener("online",e,!1),window.removeEventListener("offline",t,!1)}}};function N(){return globalThis[j]||(globalThis[j]=new $),globalThis[j]}let B=()=>Math.floor(Date.now()/1e3);function M(e,t="/api/auth"){try{let t=new URL(e);if("http:"!==t.protocol&&"https:"!==t.protocol)throw new m(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){if(t instanceof m)throw t;throw new m(`Invalid base URL: ${e}. Please provide a valid base URL.`,String(t))}if(function(e){try{return"/"!==(new URL(e).pathname.replace(/\/+$/,"")||"/")}catch{throw new m(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}(e))return e;let n=e.replace(/\/+$/,"");return t&&"/"!==t?(t=t.startsWith("/")?t:`/${t}`,`${n}${t}`):n}let D={id:"redirect",name:"Redirect",hooks:{onSuccess(e){if(e.data?.url&&e.data?.redirect&&"u">typeof window&&window.location&&window.location)try{window.location.href=e.data.url}catch{}}}},k={proto:/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,constructor:/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,protoShort:/"__proto__"\s*:/,constructorShort:/"constructor"\s*:/},q=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,F={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:1/0,"-infinity":-1/0},H=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;var W=Object.defineProperty,G=Object.defineProperties,V=Object.getOwnPropertyDescriptors,z=Object.getOwnPropertySymbols,J=Object.prototype.hasOwnProperty,Y=Object.prototype.propertyIsEnumerable,K=(e,t,n)=>t in e?W(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,X=(e,t)=>{for(var n in t||(t={}
1))J.call(t,n)&&K(e,n,t[n]);if(z)for(var n of z(t))Y.call(t,n)&&K(e,n,t[n]);return e},Z=(e,t)=>G(e,V(t)),Q=class extends Error{constructor(e,t,n){super(t||e.toString(),{cause:n}),this.status=e,this.statusText=t,this.error=n,Error.captureStackTrace(this,this.constructor)}},ee=async(e,t)=>{var n,r,o,s,i,l;let a=t||{},u={onRequest:[null==t?void 0:t.onRequest],onResponse:[null==t?void 0:t.onResponse],onSuccess:[null==t?void 0:t.onSuccess],onError:[null==t?void 0:t.onError],onRetry:[null==t?void 0:t.onRetry]};if(!t||!(null==t?void 0:t.plugins))return{url:e,options:a,hooks:u};for(let c of(null==t?void 0:t.plugins)||[]){if(c.init){let r=await (null==(n=c.init)?void 0:n.call(c,e.toString(),t));a=r.options||a,e=r.url}u.onRequest.push(null==(r=c.hooks)?void 0:r.onRequest),u.onResponse.push(null==(o=c.hooks)?void 0:o.onResponse),u.onSuccess.push(null==(s=c.hooks)?void 0:s.onSuccess),u.onError.push(null==(i=c.hooks)?void 0:i.onError),u.onRetry.push(null==(l=c.hooks)?void 0:l.onRetry)}return{url:e,options:a,hooks:u}},et=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(){return this.options.delay}},en=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(e){return Math.min(this.options.maxDelay,this.options.baseDelay*2**e)}},er=async e=>{let t={},n=async e=>"function"==typeof e?await e():e;if(null==e?void 0:e.auth){if("Bearer"===e.auth.type){let r=await n(e.auth.token);if(!r)return t;t.authorization=`Bearer ${r}`}else if("Basic"===e.auth.type){let[r,o]=await Promise.all([n(e.auth.username),n(e.auth.password)]);if(!r||!o)return t;t.authorization=`Basic ${btoa(`${r}:${o}`)}`}else if("Custom"===e.auth.type){let[r,o]=await Promise.all([n(e.auth.prefix),n(e.auth.value)]);if(!o)return t;t.authorization=`${null!=r?r:""} ${o}`}}return t},eo=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function es(e){if(void 0===e)return!1;let t=typeof e;return"string"===t||"number"===t||"boolean"===t||null===t||"object"===t&&(!!Array.isArray(e)||!e.buffer&&(e.constructor&&"Object"===e.constructor.name||"function"==typeof e.toJSON))}function ei(e){try{return JSON.parse(e)}catch(t){return e}}function el(e){return"function"==typeof e}async function ea(e){let t=new Headers(null==e?void 0:e.headers);for(let[n,r]of Object.entries(await er(e)||{}))t.set(n,r);if(!t.has("content-type")){let n=es(null==e?void 0:e.body)?"application/json":null;n&&t.set("content-type",n)}return t}var eu=class e extends Error{constructor(t,n){super(n||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,e.prototype)}};async function ec(e,t){let n=await e["~standard"].validate(t);if(n.issues)throw new eu(n.issues);return n.value}var ed=["get","post","put","patch","delete"],ef=async(e,t)=>{var n,r,o,s,i,l,a,u;let c,{hooks:d,url:f,options:p}=await ee(e,t),h=function(e){if(null==e?void 0:e.customFetchImpl)return e.customFetchImpl;if("u">typeof globalThis&&el(globalThis.fetch))return globalThis.fetch;if("u">typeof window&&el(window.fetch))return window.fetch;throw Error("No fetch implementation found")}(p),v=new AbortController,y=null!=(n=p.signal)?n:v.signal,g=function(e,t){let{baseURL:n,params:r,query:o}=t||{query:{},params:{},baseURL:""},s=e.startsWith("http")?e.split("/").slice(0,3).join("/"):n||"";if(e.startsWith("@")){let t=e.toString().split("@")[1].split("/")[0];ed.includes(t)&&(e=e.replace(`@${t}/`,"/"))}s.endsWith("/")||(s+="/");let[i,l]=e.replace(s,"").split("?"),a=new URLSearchParams(l);for(let[e,t]of Object.entries(o||{})){let n;if(null!=t){if("string"==typeof t)n=t;else if(Array.isArray(t)){for(let n of t)a.append(e,n);continue}else n=JSON.stringify(t);a.set(e,n)}}if(r)if(Array.isArray(r))for(let[e,t]of i.split("/").filter(e=>e.startsWith(":")).entries()){let n=r[e];i=i.replace(t,n)}else for(let[e,t]of Object.entries(r))i=i.replace(`:${e}`,String(t));(i=i.split("/").map(encodeURIComponent).join("/")).startsWith("/")&&(i=i.slice(1));let u=a.toString();return(u=u.length>0?`?${u}`.replace(/\+/g,"%20"):"",s.startsWith("http"))?new URL(`${i}${u}`,s):`${s}${i}${u}`}(f,p),b=function(e){if(!(null==e?void 0:e.body))return null;let t=new Headers(null==e?void 0:e.headers);if(es(e.body)&&!t.has("content-type")){for(let[t,n]of Object.entries(null==e?void 0:e.body))n instanceof Date&&(e.body[t]=n.toISOString());return JSON.stringify(e.body)}return t.has("content-type")&&"application/x-www-form-urlencoded"===t.get("content-type")&&es(e.body)?new URLSearchParams(e.body).toString():e.body}(p),m=await ea(p),w=function(e,t){var n;if(null==t?void 0:t.method)return t.method.toUpperCase();if(e.startsWith("@")){let r=null==(n=e.split("@")[1])?void 0:n.split("/")[0];return ed.includes(r)?r.toUpperCase():(null==t?void 0:t.body)?"POST":"GET"}return(null==t?void 0:t.body)?"POST":"GET"}(f,p),R=Z(X({},p),{url:g,headers:m,body:b,method:w,signal:y});for(let e of d.onRequest)if(e){let t=await e(R);"object"==typeof t&&null!==t&&(R=t)}("pipeTo"in R&&"function"==typeof R.pipeTo||"function"==typeof(null==(r=null==t?void 0:t.body)?void 0:r.pipe))&&!("duplex"in R)&&(R.duplex="half");let{clearTimeout:T}=(!(null==p?void 0:p.signal)&&(null==p?void 0:p.timeout)&&(c=setTimeout(()=>null==v?void 0:v.abort(),null==p?void 0:p.timeout)),{abortTimeout:c,clearTimeout:()=>{c&&clearTimeout(c)}}),E=await h(R.url,R);T();let O={response:E,request:R};for(let e of d.onResponse)if(e){let n=await e(Z(X({},O),{response:(null==(o=null==t?void 0:t.hookOptions)?void 0:o.cloneResponse)?E.clone():E}
1));n instanceof Response?E=n:"object"==typeof n&&null!==n&&(E=n.response)}if(E.ok){if("HEAD"===R.method)return{data:"",error:null};let e=function(e){let t=e.headers.get("content-type"),n=new Set(["image/svg","application/xml","application/xhtml","application/html"]);if(!t)return"json";let r=t.split(";").shift()||"";return eo.test(r)?"json":n.has(r)||r.startsWith("text/")?"text":"blob"}(E),n={data:null,response:E,request:R};if("json"===e||"text"===e){let e=await E.text(),t=null!=(s=R.jsonParser)?s:ei;n.data=await t(e)}else n.data=await E[e]();for(let e of((null==R?void 0:R.output)&&R.output&&!R.disableValidation&&(n.data=await ec(R.output,n.data)),d.onSuccess))e&&await e(Z(X({},n),{response:(null==(i=null==t?void 0:t.hookOptions)?void 0:i.cloneResponse)?E.clone():E}));return(null==t?void 0:t.throw)?n.data:{data:n.data,error:null}}let S=null!=(l=null==t?void 0:t.jsonParser)?l:ei,_=await E.text(),A=function(e){try{return JSON.parse(e),!0}catch(e){return!1}}(_),L=A?await S(_):null,U={response:E,responseText:_,request:R,error:Z(X({},L),{status:E.status,statusText:E.statusText})};for(let e of d.onError)e&&await e(Z(X({},U),{response:(null==(a=null==t?void 0:t.hookOptions)?void 0:a.cloneResponse)?E.clone():E}));if(null==t?void 0:t.retry){let n=function(e){if("number"==typeof e)return new et({type:"linear",attempts:e,delay:1e3});switch(e.type){case"linear":return new et(e);case"exponential":return new en(e);default:throw Error("Invalid retry strategy")}}(t.retry),r=null!=(u=t.retryAttempt)?u:0;if(await n.shouldAttemptRetry(r,E)){for(let e of d.onRetry)e&&await e(O);let o=n.getDelay(r);return await new Promise(e=>setTimeout(e,o)),await ef(e,Z(X({},t),{retryAttempt:r+1}))}}if(null==t?void 0:t.throw)throw new Q(E.status,E.statusText,A?L:_);return{data:null,error:Z(X({},L),{status:E.status,statusText:E.statusText})}};let ep=w({organization:["update","delete"],member:["create","update","delete"],invitation:["create","cancel"],team:["create","update","delete"],ac:["create","read","update","delete"]});ep.newRole({organization:["update"],invitation:["create","cancel"],member:["create","update","delete"],team:["create","update","delete"],ac:["create","read","update","delete"]}),ep.newRole({organization:["update","delete"],member:["create","update","delete"],invitation:["create","cancel"],team:["create","update","delete"],ac:["create","read","update","delete"]}),ep.newRole({organization:[],member:[],invitation:[],team:[],ac:["read"]});var eh=e.i(271645);e.i(184976);let ev=function(e){var t;let{pluginPathMethods:n,pluginsActions:r,pluginsAtoms:o,$fetch:s,$store:l,atomListeners:a}=((e,t)=>{var n;let r,o,s="credentials"in Request.prototype,l=function(e,t,n,r,o){if(e)return M(e,t);if(!1!==r){let e=i.BETTER_AUTH_URL||i.NEXT_PUBLIC_BETTER_AUTH_URL||i.PUBLIC_BETTER_AUTH_URL||i.NUXT_PUBLIC_BETTER_AUTH_URL||i.NUXT_PUBLIC_AUTH_URL||("/"!==i.BASE_URL?i.BASE_URL:void 0);if(e)return M(e,t)}n?.headers.get("x-forwarded-host"),n?.headers.get("x-forwarded-proto");if(n){let e=function(e){try{let t=new URL(e);return"null"===t.origin?null:t.origin}catch{return null}}(n.url);if(!e)throw new m("Could not get origin from request. Please provide a valid base URL.");return M(e,t)}if("u">typeof window&&window.location)return M(window.location.origin,t)}(e?.baseURL,e?.basePath,void 0,void 0)??"/api/auth",a=e?.plugins?.flatMap(e=>e.fetchPlugins).filter(e=>void 0!==e)||[],u={id:"lifecycle-hooks",name:"lifecycle-hooks",hooks:{onSuccess:e?.fetchOptions?.onSuccess,onError:e?.fetchOptions?.onError,onRequest:e?.fetchOptions?.onRequest,onResponse:e?.fetchOptions?.onResponse}},{onSuccess:c,onError:d,onRequest:f,onResponse:p,...h}=e?.fetchOptions||{},v=(n={baseURL:l,...s?{credentials:"include"}:{},method:"GET",jsonParser:e=>e?function(e,t={strict:!0}){return function(e,t={}){let{strict:n=!1,warnings:r=!1,reviver:o,parseDates:s=!0}=t;if("string"!=typeof e)return e;let i=e.trim();if(i.length>0&&'"'===i[0]&&i.endsWith('"')&&!i.slice(1,-1).includes('"'))return i.slice(1,-1);let l=i.toLowerCase();if(l.length<=9&&l in F)return F[l];if(!q.test(i)){if(n)throw SyntaxError("[better-json] Invalid JSON");return e}if(Object.entries(k).some(([e,t])=>{let n=t.test(i);return n&&r&&console.warn(`[better-json] Detected potential prototype pollution attempt using ${e} pattern`),n})&&n)throw Error("[better-json] Potential prototype pollution attempt detected");try{return JSON.parse(i,(e,t)=>{if("__proto__"===e||"constructor"===e&&t&&"object"==typeof t&&"prototype"in t){r&&console.warn(`[better-json] Dropping "${e}" key to prevent prototype pollution`);return}if(s&&"string"==typeof t){let e=function(e){let t=H.exec(e);if(!t)return null;let[,n,r,o,s,i,l,a,u,c,d]=t,f=new Date(Date.UTC(parseInt(n,10),parseInt(r,10)-1,parseInt(o,10),parseInt(s,10),parseInt(i,10),parseInt(l,10),a?parseInt(a.padEnd(3,"0"),10):0));if(u){let e=(60*parseInt(c,10)+parseInt(d,10))*("+"===u?-1:1);f.setUTCMinutes(f.getUTCMinutes()+e)}return f instanceof Date&&!isNaN(f.getTime())?f:null}(t);if(e)return e}return o?o(e,t):t})}catch(t){if(n)throw t;return e}}(e,t)}(e,{strict:!1}):null,customFetchImpl:fetch,...h,plugins:[u,...h.plugins||[],...e?.disableDefaultFetchPlugins?[]:[D],...a]},async function(e,t){let r,o=Z(X(X({},n),t),{plugins:[...(null==n?void 0:n.plugins)||[],(r=n||{},{id:"apply-schema",name:"Apply Schema",version:"1.0.0",async init(e,t){var n,o,s,i;let l=(null==(o=null==(n=r.plugins)?void 0:n.find(t=>{var n;return null!=(n=t.schema)&&!!n.config&&(e.startsWith(t.schema.config.baseURL||"")||e.startsWith(t.schema.config.prefix||""))}
1))?void 0:o.schema)||r.schema;if(l){let n=e;(null==(s=l.config)?void 0:s.prefix)&&n.startsWith(l.config.prefix)&&(n=n.replace(l.config.prefix,""),l.config.baseURL&&(e=e.replace(l.config.prefix,l.config.baseURL))),(null==(i=l.config)?void 0:i.baseURL)&&n.startsWith(l.config.baseURL)&&(n=n.replace(l.config.baseURL,""));let r=l.schema[n];if(r){let n=Z(X({},t),{method:r.method,output:r.output});return(null==t?void 0:t.disableValidation)||(n=Z(X({},n),{body:r.input?await ec(r.input,null==t?void 0:t.body):null==t?void 0:t.body,params:r.params?await ec(r.params,null==t?void 0:t.params):null==t?void 0:t.params,query:r.query?await ec(r.query,null==t?void 0:t.query):null==t?void 0:t.query})),{url:e,options:n}}}return{url:e,options:t}}}),...(null==t?void 0:t.plugins)||[]]});if(null==n?void 0:n.catchAllError)try{return await ef(e,o)}catch(e){return{data:null,error:{status:500,statusText:"Fetch Error",message:"Fetch related error. Captured by catchAllError option. See error property for more details.",error:e}}}return await ef(e,o)}),{$sessionSignal:y,session:g}=(o=((e,t,n,r)=>{let o=S({data:null,error:null,isPending:!0,isRefetching:!1,refetch:e=>s(e)}),s=async e=>new Promise(s=>{let i="function"==typeof r?r({data:o.get().data,error:o.get().error,isPending:o.get().isPending}):r;n(t,{...i,query:{...i?.query,...e?.query},async onSuccess(e){o.set({data:e.data,error:null,isPending:!1,isRefetching:!1,refetch:o.value.refetch}),await i?.onSuccess?.(e)},async onError(e){let{request:t}=e,n="number"==typeof t.retry?t.retry:t.retry?.attempts,r=t.retryAttempt||0;n&&r<n||(o.set({error:e.error,data:null,isPending:!1,isRefetching:!1,refetch:o.value.refetch}),await i?.onError?.(e))},async onRequest(e){let t=o.get();o.set({isPending:null===t.data,data:t.data,error:null,isRefetching:!0,refetch:o.value.refetch}),await i?.onRequest?.(e)}}).catch(e=>{o.set({error:e,data:null,isPending:!1,isRefetching:!1,refetch:o.value.refetch})}).finally(()=>{s(void 0)})});e=Array.isArray(e)?e:[e];let i=!1;for(let t of e)t.subscribe(async()=>{A()||(i?await s():_(o,()=>{let e=setTimeout(async()=>{i||(await s(),i=!0)},0);return()=>{o.off(),t.off(),clearTimeout(e)}}))});return o})(r=S(!1),"/get-session",v,{method:"GET"}),_(o,()=>{let t=function(e){let{sessionAtom:t,sessionSignal:n,$fetch:r,options:o={}}=e,s=o.sessionOptions?.refetchInterval??0,i=o.sessionOptions?.refetchOnWindowFocus??!0,l=o.sessionOptions?.refetchWhenOffline??!1,a={lastSync:0,lastSessionRequest:0,cachedSession:void 0},u=e=>{if(!(l||N().isOnline))return;if(e?.event==="storage"){a.lastSync=B(),n.set(!n.get());return}let o=t.get();if(e?.event==="poll"){a.lastSessionRequest=B(),r("/get-session").then(e=>{e.error?t.set({...o,data:null,error:e.error}):t.set({...o,data:e.data,error:null}),a.lastSync=B(),n.set(!n.get())}).catch(()=>{});return}if(e?.event==="visibilitychange"){if(B()-a.lastSessionRequest<5)return;a.lastSessionRequest=B()}(o?.data===null||o?.data===void 0||e?.event==="visibilitychange")&&(a.lastSync=B(),n.set(!n.get()))};return{init:()=>{s&&s>0&&(a.pollInterval=setInterval(()=>{t.get()?.data&&u({event:"poll"})},1e3*s)),a.unsubscribeBroadcast=I().subscribe(()=>{u({event:"storage"})}),i&&(a.unsubscribeFocus=C().subscribe(()=>{u({event:"visibilitychange"})})),a.unsubscribeOnline=N().subscribe(e=>{e&&u({event:"visibilitychange"})}),I().setup(),C().setup(),N().setup()},cleanup:()=>{a.pollInterval&&(clearInterval(a.pollInterval),a.pollInterval=void 0),a.unsubscribeBroadcast&&(a.unsubscribeBroadcast(),a.unsubscribeBroadcast=void 0),a.unsubscribeFocus&&(a.unsubscribeFocus(),a.unsubscribeFocus=void 0),a.unsubscribeOnline&&(a.unsubscribeOnline(),a.unsubscribeOnline=void 0),a.lastSync=0,a.lastSessionRequest=0,a.cachedSession=void 0},triggerRefetch:u,broadcastSessionUpdate:e=>{I().post({event:"session",data:{trigger:e},clientId:Math.random().toString(36).substring(7)})}}}({sessionAtom:o,sessionSignal:r,$fetch:v,options:e});return t.init(),()=>{t.cleanup()}}),{session:o,$sessionSignal:r}),b=e?.plugins||[],w={},R={$sessionSignal:y,session:g},T={"/sign-out":"POST","/revoke-sessions":"POST","/revoke-other-sessions":"PO
1ST","/delete-user":"POST"},E=[{signal:"$sessionSignal",matcher:e=>"/sign-out"===e||"/update-user"===e||"/sign-up/email"===e||"/sign-in/email"===e||"/delete-user"===e||"/verify-email"===e||"/revoke-sessions"===e||"/revoke-session"===e||"/change-email"===e}];for(let e of b)e.getAtoms&&Object.assign(R,e.getAtoms?.(v)),e.pathMethods&&Object.assign(T,e.pathMethods),e.atomListeners&&E.push(...e.atomListeners);let O={notify:e=>{R[e].set(!R[e].get())},listen:(e,t)=>{R[e].subscribe(t)},atoms:R};for(let t of b)t.getActions&&Object.assign(w,t.getActions?.(v,O,e));return{get baseURL(){return l},pluginsActions:w,pluginsAtoms:R,pluginPathMethods:T,atomListeners:E,$fetch:v,$store:O}})(e),u={};for(let[e,t]of Object.entries(o))u[function(e){return`use${e.charAt(0).toUpperCase()+e.slice(1)}`}(e)]=()=>(function(e,t={}){let n=(0,eh.useRef)(e.get()),{keys:r,deps:o=[e,r]}=t,s=(0,eh.useCallback)(t=>{let o=e=>{n.current!==e&&(n.current=e,t())};if(o(e.value),r?.length){let t;return t=new Set(r).add(void 0),e.listen((e,n,r)=>{t.has(r)&&o(e,n,r)})}return e.listen(o)},o),i=()=>n.current;return(0,eh.useSyncExternalStore)(s,i,i)})(t);return t={...r,...u,$fetch:s,$store:l},function e(r=[]){return new Proxy(function(){},{get(n,o){var s;if("string"!=typeof o||"then"===o||"catch"===o||"finally"===o)return;let i=[...r,o],l=t;for(let e of i)if(l&&"object"==typeof l&&e in l)l=l[e];else{l=void 0;break}return"function"==typeof l?l:"object"==typeof(s=l)&&null!==s&&"get"in s&&"function"==typeof s.get&&"lc"in s&&"number"==typeof s.lc?l:e(i)},apply:async(e,t,i)=>{let l="/"+r.map(e=>e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)).join("/"),u=i[0]||{},c=i[1]||{},{query:d,fetchOptions:f,...p}=u,h={...c,...f},v=function(e,t,n){let r=t[e],{fetchOptions:o,query:s,...i}=n||{};return r||(o?.method?o.method:i&&Object.keys(i).length>0?"POST":"GET")}(l,n,u);return await s(l,{...h,body:"GET"===v?void 0:{...p,...h?.body||{}},query:d||h?.query,method:v,async onSuccess(e){if(await h?.onSuccess?.(e),!a||h.disableSignal)return;let t=a.filter(e=>e.matcher(l));if(!t.length)return;let n=new Set;for(let e of t){let t=o[e.signal];if(!t)return;if(n.has(e.signal))continue;n.add(e.signal);let r=t.get();setTimeout(()=>{t.set(!r)},10)}}})}})}()}({baseURL:`${window.location.origin}/api/auth`,plugins:[{id:"magic-link",$InferServerPlugin:{}}]});e.s(["authClient",0,ev],868319)}]);

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.