@fluixi/auth 1.0.0-alpha.53

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Fluixi
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,60 @@
1
+ # @fluixi/auth
2
+
3
+ Server-first auth for Fluixi — **native bindings over [Better Auth](https://better-auth.com)**.
4
+ Better Auth owns the security primitives (password hashing, sessions, CSRF, secure cookies,
5
+ OAuth, 2FA/TOTP, organizations, RBAC, DB adapters — audited and maintained). This package
6
+ owns the *Fluixi integration* Better Auth can't provide: request-context server helpers,
7
+ SSR-seeded reactive hooks, middleware wiring, and route protection.
8
+
9
+ `better-auth` is a **peer dependency** — the bindings consume it structurally, so the app owns the version.
10
+
11
+ ## Server (`@fluixi/auth/server`)
12
+
13
+ ```ts
14
+ // auth.config.ts
15
+ import { betterAuth } from 'better-auth';
16
+ import { defineAuth } from '@fluixi/auth/server';
17
+ export const auth = defineAuth(betterAuth({ /* db, providers, plugins */ }));
18
+ ```
19
+ ```ts
20
+ // src/middleware.ts — resolve the session once per request → locals.auth
21
+ import { defineMiddleware } from '@fluixi/start';
22
+ import { authMiddleware } from '@fluixi/auth/server';
23
+ export default defineMiddleware([ authMiddleware() ]);
24
+ ```
25
+ ```ts
26
+ // routes/api/auth/[...all].ts — mount Better Auth
27
+ import { mountAuthRoutes } from '@fluixi/auth/server';
28
+ export const ALL = mountAuthRoutes(); // (request) => auth.handler(request)
29
+ ```
30
+ ```ts
31
+ // loaders / server functions — no token parsing, reads request-scoped locals
32
+ const user = await requireUser(); // throws AuthError(401, '/login')
33
+ const admin = await requireRole('admin'); // throws AuthError(403)
34
+ await requirePermission(() => can(user, 'edit', post));
35
+ const maybe = await optionalUser(); // U | null
36
+ ```
37
+ > The app entry must forward the request so middleware locals reach the render:
38
+ > `export const render = (url, request) => renderRequestAsync(App, { url, request })`.
39
+
40
+ ## Client (`@fluixi/auth/client`)
41
+
42
+ ```ts
43
+ import { createAuthClient } from 'better-auth/client';
44
+ import { createAuthHooks } from '@fluixi/auth/client';
45
+
46
+ const authClient = createAuthClient({ baseURL: '/api/auth' });
47
+ export const { useUser, useSession, useAuth, useSignIn, useSignOut, protectedRoute } =
48
+ createAuthHooks({ client: authClient });
49
+ ```
50
+ ```ts
51
+ const user = useUser(); // reactive accessor, SEEDED from SSR (no flash/refetch)
52
+ const signIn = useSignIn();
53
+ export default protectedRoute(() => <Dashboard/>); // authed only
54
+ export default protectedRoute(Login, { guestOnly: true }); // redirect authed away
55
+ export default protectedRoute(Admin, { role: 'admin' }); // role-gated
56
+ ```
57
+
58
+ The session is a `createIsomorphicStore` — resolved on the server from `locals.auth`,
59
+ serialized into the page, and seeded synchronously on the client. No auth flash, no
60
+ post-hydration refetch. `@fluixi/auth/client` never imports the server engine or Node.
@@ -0,0 +1 @@
1
+ "use strict";var f=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var x=Object.prototype.hasOwnProperty;var O=(s,n)=>{for(var r in n)f(s,r,{get:n[r],enumerable:!0})},Q=(s,n,r,u)=>{if(n&&typeof n=="object"||typeof n=="function")for(let t of y(n))!x.call(s,t)&&t!==r&&f(s,t,{get:()=>n[t],enumerable:!(u=b(n,t))||u.enumerable});return s};var v=s=>Q(f({},"__esModule",{value:!0}),s);var L={};O(L,{createAuthHooks:()=>D});module.exports=v(L);var o=require("@fluixi/core"),k=require("@fluixi/dom");var h="auth";function D(s){let n=s.session,r=(0,o.createIsomorphicStore)("auth",{server:()=>(0,k.getLocals)()[h]??{user:null,session:null},client:async()=>n?{user:n.user(),session:null}:P(await s.client.getSession()),fallback:{user:null,session:null}});if(n){let e=()=>r.set({user:n.user(),session:null});e(),(0,o.createRoot)(()=>(0,o.createEffect)(e))}let u=async()=>{r.set(n?{user:n.user(),session:null}:P(await s.client.getSession()))},t=n?((...e)=>n.login?.(...e)??Promise.resolve()):async e=>{await s.client.signIn.email(e),await u()},g=n?()=>n.logout?.()??Promise.resolve():async()=>{await s.client.signOut(),r.set({user:null,session:null})},a=e=>(s.navigate??(i=>o.env.window?.location.assign(i)))(e),p=()=>n?.permissions?.(),l=e=>n?.can?.(e)??!1,c=()=>{if(n?.roles)return n.roles();let e=r.fields.user()?.role;return e?[e]:[]},d=e=>!(e?.role&&!c().includes(e.role)||e?.roles&&!e.roles.some(i=>c().includes(i))||e?.permission!==void 0&&!l(e.permission));function w(e){return()=>l(e.perform)?e.children:e.fallback??null}function U(e){return()=>r.fields.user()&&d(e)?e.children:e.fallback??null}function A(e,i){return S=>{let m=r.fields.user();if(i?.guestOnly){if(m)return a(s.homePath??"/"),null}else{if(!m)return a(s.loginPath??"/login"),null;if(!d(i))return a(s.forbiddenPath??"/403"),null}return e(S)}}return{useUser:()=>r.fields.user,useSession:()=>r.fields.session,useAuth:()=>({user:r.fields.user,session:r.fields.session,isAuthenticated:()=>r.fields.user()!==null,roles:c,can:l,signIn:t,signOut:g}),useSignIn:()=>t,useSignOut:()=>g,usePermissions:()=>p,useCan:()=>l,Can:w,Protect:U,refresh:u,protectedRoute:A,store:r}}function P(s){return{user:s.data?.user??null,session:s.data?.session??null}}
@@ -0,0 +1,79 @@
1
+ import { type AuthUser, type BetterAuthClient, type SessionData } from './types.js';
2
+ export interface ProtectedRouteOptions<Q = (p: any) => boolean> {
3
+ guestOnly?: boolean;
4
+ /** Require this exact role. */
5
+ role?: string;
6
+ /** Require ANY of these roles. */
7
+ roles?: string[];
8
+ /** Require a permission — your access matcher's query (default: a predicate). */
9
+ permission?: Q;
10
+ }
11
+ /**
12
+ * Any reactive session with a `user` accessor (e.g. @fluixi/session's createSession).
13
+ * The RBAC accessors (`roles` / `permissions` / `can`) are optional — provide them (as
14
+ * createSession's `access` config does) to unlock `<Can>`, `usePermissions`, and
15
+ * permission-gated routes. They are a UI affordance only; the server enforces authz.
16
+ */
17
+ export interface SessionLike<U = AuthUser, P = unknown, Q = (p: P) => boolean> {
18
+ user: () => U | null;
19
+ login?: (...args: any[]) => Promise<unknown>;
20
+ logout?: () => Promise<unknown>;
21
+ roles?: () => string[];
22
+ permissions?: () => P | undefined;
23
+ can?: (query: Q) => boolean;
24
+ }
25
+ export interface AuthHooksOptions<U = AuthUser, P = unknown, Q = (p: P) => boolean> {
26
+ /** A Better Auth client (`createAuthClient(...)`). Mutually exclusive with `session`. */
27
+ client?: BetterAuthClient;
28
+ /** An existing reactive session — the framework syncs it into the hooks for you. */
29
+ session?: SessionLike<U, P, Q>;
30
+ /** Navigate for `protectedRoute` redirects (default: `window.location.assign`). */
31
+ navigate?: (to: string) => void;
32
+ loginPath?: string;
33
+ homePath?: string;
34
+ forbiddenPath?: string;
35
+ }
36
+ export declare function createAuthHooks<U = AuthUser, P = unknown, Q = (p: P) => boolean>(options: AuthHooksOptions<U, P, Q>): {
37
+ useUser: () => import("@fluixi/core").Accessor<U | null>;
38
+ useSession: () => import("@fluixi/core").Accessor<import("./types.js").AuthSession | null>;
39
+ useAuth: () => {
40
+ user: import("@fluixi/core").Accessor<U | null>;
41
+ session: import("@fluixi/core").Accessor<import("./types.js").AuthSession | null>;
42
+ isAuthenticated: () => boolean;
43
+ roles: () => string[];
44
+ can: (query: Q) => boolean;
45
+ signIn: ((...args: any[]) => Promise<unknown>) | ((creds: {
46
+ email: string;
47
+ password: string;
48
+ rememberMe?: boolean;
49
+ }) => Promise<void>);
50
+ signOut: () => Promise<unknown>;
51
+ };
52
+ useSignIn: () => ((...args: any[]) => Promise<unknown>) | ((creds: {
53
+ email: string;
54
+ password: string;
55
+ rememberMe?: boolean;
56
+ }) => Promise<void>);
57
+ useSignOut: () => () => Promise<unknown>;
58
+ /** Reactive accessor for the active permission set (UI affordance only). */
59
+ usePermissions: () => () => P | undefined;
60
+ /** Returns `can(check)` — `false` unless the session provides RBAC. */
61
+ useCan: () => (query: Q) => boolean;
62
+ Can: (props: {
63
+ perform: Q;
64
+ fallback?: unknown;
65
+ children: unknown;
66
+ }) => () => unknown;
67
+ Protect: (props: {
68
+ role?: string;
69
+ roles?: string[];
70
+ permission?: Q;
71
+ fallback?: unknown;
72
+ children: unknown;
73
+ }) => () => unknown;
74
+ refresh: () => Promise<void>;
75
+ protectedRoute: <Props>(Comp: (props: Props) => unknown, opts?: ProtectedRouteOptions<Q>) => (props: Props) => unknown;
76
+ store: import("@fluixi/core").IsomorphicStore<SessionData<U>>;
77
+ };
78
+ export type { SessionData, AuthUser, BetterAuthClient } from './types.js';
79
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAeA,OAAO,EAEL,KAAK,QAAQ,EACb,KAAK,gBAAgB,EACrB,KAAK,WAAW,EACjB,MAAM,YAAY,CAAC;AAEpB,MAAM,WAAW,qBAAqB,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,KAAK,OAAO;IAC5D,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,+BAA+B;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,kCAAkC;IAClC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,iFAAiF;IACjF,UAAU,CAAC,EAAE,CAAC,CAAC;CAChB;AAED;;;;;GAKG;AACH,MAAM,WAAW,WAAW,CAAC,CAAC,GAAG,QAAQ,EAAE,CAAC,GAAG,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK,OAAO;IAC3E,IAAI,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;IACrB,KAAK,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7C,MAAM,CAAC,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IAChC,KAAK,CAAC,EAAE,MAAM,MAAM,EAAE,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC;IAClC,GAAG,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,CAAC;CAC7B;AAED,MAAM,WAAW,gBAAgB,CAAC,CAAC,GAAG,QAAQ,EAAE,CAAC,GAAG,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK,OAAO;IAChF,yFAAyF;IACzF,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,oFAAoF;IACpF,OAAO,CAAC,EAAE,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAC/B,mFAAmF;IACnF,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,wBAAgB,eAAe,CAAC,CAAC,GAAG,QAAQ,EAAE,CAAC,GAAG,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK,OAAO,EAC9E,OAAO,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;;;;;;;qBA6Cb,MAAM,EAAE;qBADT,CAAC,KAAG,OAAO;2BAjBhB,GAAG,EAAE,kCACF;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,QAAQ,EAAE,MAAM,CAAC;YAAC,UAAU,CAAC,EAAE,OAAO,CAAA;SAAE;;;gCAD5D,GAAG,EAAE,kCACF;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,OAAO,CAAA;KAAE;;IA2EzE,4EAA4E;gCA5DtD,CAAC,GAAG,SAAS;IA8DnC,uEAAuE;0BA7DrD,CAAC,KAAG,OAAO;iBAcX;QAAE,OAAO,EAAE,CAAC,CAAC;QAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAA;KAAE;qBAKjD;QACtB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;QACjB,UAAU,CAAC,EAAE,CAAC,CAAC;QACf,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,QAAQ,EAAE,OAAO,CAAC;KACnB;mBA/CyB,OAAO,CAAC,IAAI,CAAC;qBAsDf,KAAK,QAAQ,CAAC,KAAK,EAAE,KAAK,KAAK,OAAO,SAAS,qBAAqB,CAAC,CAAC,CAAC,MACrF,OAAO,KAAK;;EAoCvB;AAMD,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC"}
package/dist/client.js ADDED
@@ -0,0 +1,123 @@
1
+ /**
2
+ * @fluixi/auth/client — the reactive client hooks.
3
+ *
4
+ * The session is an isomorphic store: resolved on the server from `locals.auth`
5
+ * (serialized into the page) and seeded synchronously on the client → no auth flash, no
6
+ * post-hydration refetch. Two ways to drive it:
7
+ * • `{ client }` — a Better Auth client.
8
+ * • `{ session }` — an existing reactive session (e.g. @fluixi/session's createSession or
9
+ * any `{ user(), login?, logout? }`). The framework OWNS the reactive sync, so apps stop
10
+ * hand-writing a `createEffect` to mirror their store into the auth hooks.
11
+ *
12
+ * Client-only deps: @fluixi/core + @fluixi/dom's pure `getLocals` — never @fluixi/server.
13
+ */
14
+ import { createIsomorphicStore, createEffect, createRoot, env } from '@fluixi/core';
15
+ import { getLocals } from '@fluixi/dom';
16
+ import { AUTH_LOCALS_KEY, } from './types.js';
17
+ export function createAuthHooks(options) {
18
+ const sess = options.session;
19
+ const store = createIsomorphicStore('auth', {
20
+ // Server: read what authMiddleware put on locals → serialized for the client to seed.
21
+ server: () => getLocals()[AUTH_LOCALS_KEY] ?? { user: null, session: null },
22
+ // SPA cold load: from the provided session, else the Better Auth client.
23
+ client: async () => sess
24
+ ? { user: sess.user(), session: null }
25
+ : normalize(await options.client.getSession()),
26
+ fallback: { user: null, session: null },
27
+ });
28
+ // `{ session }` path: the framework owns the reactive bridge (no app-level effect).
29
+ if (sess) {
30
+ const apply = () => store.set({ user: sess.user(), session: null });
31
+ apply(); // immediate, so a first protectedRoute read isn't stale
32
+ createRoot(() => createEffect(apply));
33
+ }
34
+ const refresh = async () => {
35
+ store.set(sess ? { user: sess.user(), session: null } : normalize(await options.client.getSession()));
36
+ };
37
+ const signIn = sess
38
+ ? ((...args) => sess.login?.(...args) ?? Promise.resolve())
39
+ : async (creds) => {
40
+ await options.client.signIn.email(creds);
41
+ await refresh();
42
+ };
43
+ const signOut = sess
44
+ ? () => sess.logout?.() ?? Promise.resolve()
45
+ : async () => {
46
+ await options.client.signOut();
47
+ store.set({ user: null, session: null });
48
+ };
49
+ const go = (to) => (options.navigate ?? ((t) => env.window?.location.assign(t)))(to);
50
+ // ── RBAC surface (driven by the bound session's access config) ────────────────
51
+ const permissions = () => sess?.permissions?.();
52
+ const can = (query) => sess?.can?.(query) ?? false;
53
+ const roleList = () => {
54
+ if (sess?.roles)
55
+ return sess.roles();
56
+ const r = store.fields.user()?.role;
57
+ return r ? [r] : [];
58
+ };
59
+ const passesRole = (opts) => {
60
+ if (opts?.role && !roleList().includes(opts.role))
61
+ return false;
62
+ if (opts?.roles && !opts.roles.some((r) => roleList().includes(r)))
63
+ return false;
64
+ if (opts?.permission !== undefined && !can(opts.permission))
65
+ return false;
66
+ return true;
67
+ };
68
+ /** Render `children` only when `perform` clears the access matcher (reactive). */
69
+ function Can(props) {
70
+ return () => (can(props.perform) ? props.children : props.fallback ?? null);
71
+ }
72
+ /** Declarative section guard: render `children` when the user clears role/permission. */
73
+ function Protect(props) {
74
+ return () => {
75
+ if (!store.fields.user())
76
+ return props.fallback ?? null;
77
+ return passesRole(props) ? props.children : props.fallback ?? null;
78
+ };
79
+ }
80
+ function protectedRoute(Comp, opts) {
81
+ return (props) => {
82
+ const user = store.fields.user();
83
+ if (opts?.guestOnly) {
84
+ if (user)
85
+ return go(options.homePath ?? '/'), null;
86
+ }
87
+ else {
88
+ if (!user)
89
+ return go(options.loginPath ?? '/login'), null;
90
+ if (!passesRole(opts))
91
+ return go(options.forbiddenPath ?? '/403'), null;
92
+ }
93
+ return Comp(props);
94
+ };
95
+ }
96
+ return {
97
+ useUser: () => store.fields.user,
98
+ useSession: () => store.fields.session,
99
+ useAuth: () => ({
100
+ user: store.fields.user,
101
+ session: store.fields.session,
102
+ isAuthenticated: () => store.fields.user() !== null,
103
+ roles: roleList,
104
+ can,
105
+ signIn,
106
+ signOut,
107
+ }),
108
+ useSignIn: () => signIn,
109
+ useSignOut: () => signOut,
110
+ /** Reactive accessor for the active permission set (UI affordance only). */
111
+ usePermissions: () => permissions,
112
+ /** Returns `can(check)` — `false` unless the session provides RBAC. */
113
+ useCan: () => can,
114
+ Can,
115
+ Protect,
116
+ refresh,
117
+ protectedRoute,
118
+ store,
119
+ };
120
+ }
121
+ function normalize(r) {
122
+ return { user: r.data?.user ?? null, session: r.data?.session ?? null };
123
+ }
@@ -0,0 +1 @@
1
+ import{createIsomorphicStore as U,createEffect as A,createRoot as S,env as b}from"@fluixi/core";import{getLocals as y}from"@fluixi/dom";var d="auth";function D(s){let n=s.session,r=U("auth",{server:()=>y()[d]??{user:null,session:null},client:async()=>n?{user:n.user(),session:null}:m(await s.client.getSession()),fallback:{user:null,session:null}});if(n){let e=()=>r.set({user:n.user(),session:null});e(),S(()=>A(e))}let l=async()=>{r.set(n?{user:n.user(),session:null}:m(await s.client.getSession()))},a=n?((...e)=>n.login?.(...e)??Promise.resolve()):async e=>{await s.client.signIn.email(e),await l()},c=n?()=>n.logout?.()??Promise.resolve():async()=>{await s.client.signOut(),r.set({user:null,session:null})},i=e=>(s.navigate??(t=>b.window?.location.assign(t)))(e),h=()=>n?.permissions?.(),o=e=>n?.can?.(e)??!1,u=()=>{if(n?.roles)return n.roles();let e=r.fields.user()?.role;return e?[e]:[]},f=e=>!(e?.role&&!u().includes(e.role)||e?.roles&&!e.roles.some(t=>u().includes(t))||e?.permission!==void 0&&!o(e.permission));function P(e){return()=>o(e.perform)?e.children:e.fallback??null}function k(e){return()=>r.fields.user()&&f(e)?e.children:e.fallback??null}function p(e,t){return w=>{let g=r.fields.user();if(t?.guestOnly){if(g)return i(s.homePath??"/"),null}else{if(!g)return i(s.loginPath??"/login"),null;if(!f(t))return i(s.forbiddenPath??"/403"),null}return e(w)}}return{useUser:()=>r.fields.user,useSession:()=>r.fields.session,useAuth:()=>({user:r.fields.user,session:r.fields.session,isAuthenticated:()=>r.fields.user()!==null,roles:u,can:o,signIn:a,signOut:c}),useSignIn:()=>a,useSignOut:()=>c,usePermissions:()=>h,useCan:()=>o,Can:P,Protect:k,refresh:l,protectedRoute:p,store:r}}function m(s){return{user:s.data?.user??null,session:s.data?.session??null}}export{D as createAuthHooks};
@@ -0,0 +1 @@
1
+ "use strict";var r=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var f=(t,n)=>{for(var o in n)r(t,o,{get:n[o],enumerable:!0})},m=(t,n,o,e)=>{if(n&&typeof n=="object"||typeof n=="function")for(let i of l(n))!g.call(t,i)&&i!==o&&r(t,i,{get:()=>n[i],enumerable:!(e=c(n,i))||e.enumerable});return t};var d=t=>m(r({},"__esModule",{value:!0}),t);var h={};f(h,{deleteCookie:()=>x,getCookie:()=>k,getCookies:()=>C,parseCookies:()=>s,serializeCookie:()=>u});module.exports=d(h);var a=require("@fluixi/server");function s(t){let n={};if(!t)return n;for(let o of t.split(";")){let e=o.indexOf("=");if(e<0)continue;let i=o.slice(0,e).trim();i&&(n[i]=decodeURIComponent(o.slice(e+1).trim()))}return n}function u(t,n,o={}){let e={path:"/",httpOnly:!0,secure:!0,sameSite:"lax",...o},i=`${t}=${encodeURIComponent(n)}`;return e.maxAge!=null&&(i+=`; Max-Age=${Math.floor(e.maxAge)}`),e.expires&&(i+=`; Expires=${e.expires.toUTCString()}`),e.domain&&(i+=`; Domain=${e.domain}`),i+=`; Path=${e.path}`,e.httpOnly&&(i+="; HttpOnly"),e.secure&&(i+="; Secure"),i+=`; SameSite=${e.sameSite[0].toUpperCase()}${e.sameSite.slice(1)}`,i}function x(t,n={}){return u(t,"",{...n,maxAge:0})}function p(){return(0,a.getRequestEvent)()?.request?.headers??null}function k(t){return s(p()?.get("cookie"))[t]??null}function C(){return s(p()?.get("cookie"))}
@@ -0,0 +1,20 @@
1
+ export interface CookieOptions {
2
+ maxAge?: number;
3
+ expires?: Date;
4
+ path?: string;
5
+ domain?: string;
6
+ secure?: boolean;
7
+ httpOnly?: boolean;
8
+ sameSite?: 'strict' | 'lax' | 'none';
9
+ }
10
+ /** Parse a `Cookie:` header into a record. */
11
+ export declare function parseCookies(header: string | null | undefined): Record<string, string>;
12
+ /** Serialize a cookie into a `Set-Cookie` value. Secure by default. */
13
+ export declare function serializeCookie(name: string, value: string, opts?: CookieOptions): string;
14
+ /** A `Set-Cookie` string that deletes a cookie (Max-Age=0). */
15
+ export declare function deleteCookie(name: string, opts?: Pick<CookieOptions, 'path' | 'domain'>): string;
16
+ /** Read one cookie from the CURRENT request (request-scoped). */
17
+ export declare function getCookie(name: string): string | null;
18
+ /** All cookies on the current request. */
19
+ export declare function getCookies(): Record<string, string>;
20
+ //# sourceMappingURL=cookies.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cookies.d.ts","sourceRoot":"","sources":["../src/cookies.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,aAAa;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAC;CACtC;AAED,8CAA8C;AAC9C,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAUtF;AAED,uEAAuE;AACvE,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,GAAE,aAAkB,GAAG,MAAM,CAiB7F;AAED,+DAA+D;AAC/D,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,GAAE,IAAI,CAAC,aAAa,EAAE,MAAM,GAAG,QAAQ,CAAM,GAAG,MAAM,CAEpG;AAOD,iEAAiE;AACjE,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAErD;AAED,0CAA0C;AAC1C,wBAAgB,UAAU,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAEnD"}
@@ -0,0 +1,62 @@
1
+ /**
2
+ * Cookie API — proper, secure-by-default cookie management for auth (and anything else).
3
+ * Parsing + request-scoped reads work standalone; `serializeCookie` builds a spec-compliant
4
+ * `Set-Cookie` string with safe defaults (HttpOnly, Secure, SameSite=Lax, Path=/) that
5
+ * middleware appends to its Response (`response.headers.append('set-cookie', …)`).
6
+ */
7
+ import { getRequestEvent } from '@fluixi/server';
8
+ /** Parse a `Cookie:` header into a record. */
9
+ export function parseCookies(header) {
10
+ const out = {};
11
+ if (!header)
12
+ return out;
13
+ for (const part of header.split(';')) {
14
+ const eq = part.indexOf('=');
15
+ if (eq < 0)
16
+ continue;
17
+ const k = part.slice(0, eq).trim();
18
+ if (k)
19
+ out[k] = decodeURIComponent(part.slice(eq + 1).trim());
20
+ }
21
+ return out;
22
+ }
23
+ /** Serialize a cookie into a `Set-Cookie` value. Secure by default. */
24
+ export function serializeCookie(name, value, opts = {}) {
25
+ const o = {
26
+ path: '/',
27
+ httpOnly: true,
28
+ secure: true,
29
+ sameSite: 'lax',
30
+ ...opts,
31
+ };
32
+ let s = `${name}=${encodeURIComponent(value)}`;
33
+ if (o.maxAge != null)
34
+ s += `; Max-Age=${Math.floor(o.maxAge)}`;
35
+ if (o.expires)
36
+ s += `; Expires=${o.expires.toUTCString()}`;
37
+ if (o.domain)
38
+ s += `; Domain=${o.domain}`;
39
+ s += `; Path=${o.path}`;
40
+ if (o.httpOnly)
41
+ s += '; HttpOnly';
42
+ if (o.secure)
43
+ s += '; Secure';
44
+ s += `; SameSite=${o.sameSite[0].toUpperCase()}${o.sameSite.slice(1)}`;
45
+ return s;
46
+ }
47
+ /** A `Set-Cookie` string that deletes a cookie (Max-Age=0). */
48
+ export function deleteCookie(name, opts = {}) {
49
+ return serializeCookie(name, '', { ...opts, maxAge: 0 });
50
+ }
51
+ function requestHeaders() {
52
+ const req = getRequestEvent()?.request;
53
+ return req?.headers ?? null;
54
+ }
55
+ /** Read one cookie from the CURRENT request (request-scoped). */
56
+ export function getCookie(name) {
57
+ return parseCookies(requestHeaders()?.get('cookie'))[name] ?? null;
58
+ }
59
+ /** All cookies on the current request. */
60
+ export function getCookies() {
61
+ return parseCookies(requestHeaders()?.get('cookie'));
62
+ }
@@ -0,0 +1 @@
1
+ import{getRequestEvent as a}from"@fluixi/server";function r(n){let i={};if(!n)return i;for(let o of n.split(";")){let e=o.indexOf("=");if(e<0)continue;let t=o.slice(0,e).trim();t&&(i[t]=decodeURIComponent(o.slice(e+1).trim()))}return i}function u(n,i,o={}){let e={path:"/",httpOnly:!0,secure:!0,sameSite:"lax",...o},t=`${n}=${encodeURIComponent(i)}`;return e.maxAge!=null&&(t+=`; Max-Age=${Math.floor(e.maxAge)}`),e.expires&&(t+=`; Expires=${e.expires.toUTCString()}`),e.domain&&(t+=`; Domain=${e.domain}`),t+=`; Path=${e.path}`,e.httpOnly&&(t+="; HttpOnly"),e.secure&&(t+="; Secure"),t+=`; SameSite=${e.sameSite[0].toUpperCase()}${e.sameSite.slice(1)}`,t}function c(n,i={}){return u(n,"",{...i,maxAge:0})}function s(){return a()?.request?.headers??null}function l(n){return r(s()?.get("cookie"))[n]??null}function g(){return r(s()?.get("cookie"))}export{c as deleteCookie,l as getCookie,g as getCookies,r as parseCookies,u as serializeCookie};
@@ -0,0 +1 @@
1
+ "use strict";var a=Object.defineProperty;var S=Object.getOwnPropertyDescriptor;var k=Object.getOwnPropertyNames;var w=Object.prototype.hasOwnProperty;var C=(e,t)=>{for(var r in t)a(e,r,{get:t[r],enumerable:!0})},y=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of k(t))!w.call(e,s)&&s!==r&&a(e,s,{get:()=>t[s],enumerable:!(n=S(t,s))||n.enumerable});return e};var q=e=>y(a({},"__esModule",{value:!0}),e);var $={};C($,{AuthError:()=>i,authMiddleware:()=>O,defineAuth:()=>R,deleteCookie:()=>f,getAuth:()=>d,getCookie:()=>x,getCookies:()=>U,mountAuthRoutes:()=>P,optionalUser:()=>b,parseCookies:()=>o,requirePermission:()=>T,requireRole:()=>D,requireUser:()=>h,serializeCookie:()=>c});module.exports=q($);var u=require("@fluixi/server");var l="auth";var g=require("@fluixi/server");function o(e){let t={};if(!e)return t;for(let r of e.split(";")){let n=r.indexOf("=");if(n<0)continue;let s=r.slice(0,n).trim();s&&(t[s]=decodeURIComponent(r.slice(n+1).trim()))}return t}function c(e,t,r={}){let n={path:"/",httpOnly:!0,secure:!0,sameSite:"lax",...r},s=`${e}=${encodeURIComponent(t)}`;return n.maxAge!=null&&(s+=`; Max-Age=${Math.floor(n.maxAge)}`),n.expires&&(s+=`; Expires=${n.expires.toUTCString()}`),n.domain&&(s+=`; Domain=${n.domain}`),s+=`; Path=${n.path}`,n.httpOnly&&(s+="; HttpOnly"),n.secure&&(s+="; Secure"),s+=`; SameSite=${n.sameSite[0].toUpperCase()}${n.sameSite.slice(1)}`,s}function f(e,t={}){return c(e,"",{...t,maxAge:0})}function m(){return(0,g.getRequestEvent)()?.request?.headers??null}function x(e){return o(m()?.get("cookie"))[e]??null}function U(){return o(m()?.get("cookie"))}var p=null;function R(e){let t={raw:e,handler:r=>e.handler(r),getSession:async r=>{let n=await e.api.getSession({headers:r.headers});return{user:n?.user??null,session:n?.session??null}}};return p=t,t}function d(){if(!p)throw new Error("[@fluixi/auth] defineAuth() was not called — no auth instance registered.");return p}function P(){return e=>d().handler(e)}function O(){return async(e,t)=>{let r=await d().getSession(e);return(0,u.getRequestLocals)(e)[l]=r,t()}}var i=class extends Error{constructor(r,n,s){super(s??(r===401?"Unauthorized":"Forbidden"));this.status=r;this.redirectTo=n;this.name="AuthError"}};function A(){return(0,u.getLocals)()[l]??{user:null,session:null}}async function b(){return A().user}async function h(e){let t=A().user;if(!t)throw new i(401,e?.redirectTo??"/login");return t}async function D(e,t){let r=await h(t);if(r.role!==e)throw new i(403,t?.redirectTo);return r}async function T(e,t){if(await h(t),!(typeof e=="function"?e():e))throw new i(403,t?.redirectTo)}
@@ -0,0 +1,57 @@
1
+ /**
2
+ * @fluixi/auth/server — the server-side bindings.
3
+ *
4
+ * `defineAuth(betterAuth(...))` registers the engine; `authMiddleware()` resolves the
5
+ * session once per request and writes it to `locals.auth` (via the @fluixi/start locals
6
+ * bridge), so the server helpers — `requireUser`, `requireRole`, `requirePermission` —
7
+ * are pure reads of request-scoped state. No manual token parsing; works inside loaders
8
+ * AND server functions (same request context).
9
+ */
10
+ import type { Middleware } from '@fluixi/start';
11
+ import { type AuthUser, type BetterAuthServer, type SessionData } from './types.js';
12
+ export interface FluixiAuth<U = AuthUser> {
13
+ /** The underlying Better Auth instance. */
14
+ raw: BetterAuthServer;
15
+ /** Mount at `/api/auth/*`. */
16
+ handler: (request: Request) => Promise<Response>;
17
+ /** Resolve the session for a request (used by the middleware). */
18
+ getSession: (request: Request) => Promise<SessionData<U>>;
19
+ }
20
+ export declare function defineAuth<U = AuthUser>(instance: BetterAuthServer): FluixiAuth<U>;
21
+ export declare function getAuth<U = AuthUser>(): FluixiAuth<U>;
22
+ /** Catch-all route handler for `/api/auth/*` (sugar over `auth.handler`). */
23
+ export declare function mountAuthRoutes(): (request: Request) => Promise<Response>;
24
+ /**
25
+ * Resolve the session ONCE per request and stash it on `locals.auth`. Runs before the
26
+ * render (and before server functions), so every helper below is a pure locals read.
27
+ * Place it in `src/middleware.ts`: `export default defineMiddleware([ authMiddleware() ])`.
28
+ */
29
+ export declare function authMiddleware(): Middleware;
30
+ /** Thrown by the require* helpers; carries the HTTP status + optional redirect target. */
31
+ export declare class AuthError extends Error {
32
+ status: 401 | 403;
33
+ redirectTo?: string | undefined;
34
+ constructor(status: 401 | 403, redirectTo?: string | undefined, message?: string);
35
+ }
36
+ /** The current user or null — never throws. */
37
+ export declare function optionalUser<U = AuthUser>(): Promise<U | null>;
38
+ /** The current user, or throw `AuthError(401, redirectTo)`. */
39
+ export declare function requireUser<U = AuthUser>(opts?: {
40
+ redirectTo?: string;
41
+ }): Promise<U>;
42
+ /** Require a specific role, or throw `AuthError(403)`. */
43
+ export declare function requireRole<U extends {
44
+ role?: string;
45
+ } = AuthUser>(role: string, opts?: {
46
+ redirectTo?: string;
47
+ }): Promise<U>;
48
+ /**
49
+ * Require a permission. Pass a boolean or a predicate (e.g. your RBAC/ABAC `can(user, …)`):
50
+ * `await requirePermission(() => can(user, 'edit', post))`. Throws `AuthError(403)` if false.
51
+ */
52
+ export declare function requirePermission(check: boolean | (() => boolean), opts?: {
53
+ redirectTo?: string;
54
+ }): Promise<void>;
55
+ export { parseCookies, serializeCookie, deleteCookie, getCookie, getCookies, type CookieOptions, } from './cookies.js';
56
+ export type { SessionData, AuthUser, BetterAuthServer } from './types.js';
57
+ //# sourceMappingURL=server.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,OAAO,EAEL,KAAK,QAAQ,EACb,KAAK,gBAAgB,EACrB,KAAK,WAAW,EACjB,MAAM,YAAY,CAAC;AAEpB,MAAM,WAAW,UAAU,CAAC,CAAC,GAAG,QAAQ;IACtC,2CAA2C;IAC3C,GAAG,EAAE,gBAAgB,CAAC;IACtB,8BAA8B;IAC9B,OAAO,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;IACjD,kEAAkE;IAClE,UAAU,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;CAC3D;AAMD,wBAAgB,UAAU,CAAC,CAAC,GAAG,QAAQ,EAAE,QAAQ,EAAE,gBAAgB,GAAG,UAAU,CAAC,CAAC,CAAC,CAWlF;AAED,wBAAgB,OAAO,CAAC,CAAC,GAAG,QAAQ,KAAK,UAAU,CAAC,CAAC,CAAC,CAKrD;AAED,6EAA6E;AAC7E,wBAAgB,eAAe,IAAI,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,QAAQ,CAAC,CAEzE;AAED;;;;GAIG;AACH,wBAAgB,cAAc,IAAI,UAAU,CAM3C;AAED,0FAA0F;AAC1F,qBAAa,SAAU,SAAQ,KAAK;IAEzB,MAAM,EAAE,GAAG,GAAG,GAAG;IACjB,UAAU,CAAC,EAAE,MAAM;gBADnB,MAAM,EAAE,GAAG,GAAG,GAAG,EACjB,UAAU,CAAC,EAAE,MAAM,YAAA,EAC1B,OAAO,CAAC,EAAE,MAAM;CAKnB;AAMD,+CAA+C;AAC/C,wBAAsB,YAAY,CAAC,CAAC,GAAG,QAAQ,KAAK,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,CAEpE;AAED,+DAA+D;AAC/D,wBAAsB,WAAW,CAAC,CAAC,GAAG,QAAQ,EAAE,IAAI,CAAC,EAAE;IAAE,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,CAAC,CAAC,CAI1F;AAED,0DAA0D;AAC1D,wBAAsB,WAAW,CAAC,CAAC,SAAS;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,QAAQ,EACtE,IAAI,EAAE,MAAM,EACZ,IAAI,CAAC,EAAE;IAAE,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,GAC7B,OAAO,CAAC,CAAC,CAAC,CAIZ;AAED;;;GAGG;AACH,wBAAsB,iBAAiB,CACrC,KAAK,EAAE,OAAO,GAAG,CAAC,MAAM,OAAO,CAAC,EAChC,IAAI,CAAC,EAAE;IAAE,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,GAC7B,OAAO,CAAC,IAAI,CAAC,CAIf;AAGD,OAAO,EACL,YAAY,EACZ,eAAe,EACf,YAAY,EACZ,SAAS,EACT,UAAU,EACV,KAAK,aAAa,GACnB,MAAM,cAAc,CAAC;AAEtB,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC"}
package/dist/server.js ADDED
@@ -0,0 +1,83 @@
1
+ import { getLocals, getRequestLocals } from '@fluixi/server';
2
+ import { AUTH_LOCALS_KEY, } from './types.js';
3
+ // Registered instance — so the helpers/middleware find "the" auth without the app
4
+ // threading it through every call. defineAuth sets it; getAuth reads it.
5
+ let _auth = null;
6
+ export function defineAuth(instance) {
7
+ const auth = {
8
+ raw: instance,
9
+ handler: (request) => instance.handler(request),
10
+ getSession: async (request) => {
11
+ const res = await instance.api.getSession({ headers: request.headers });
12
+ return { user: res?.user ?? null, session: res?.session ?? null };
13
+ },
14
+ };
15
+ _auth = auth;
16
+ return auth;
17
+ }
18
+ export function getAuth() {
19
+ if (!_auth) {
20
+ throw new Error('[@fluixi/auth] defineAuth() was not called — no auth instance registered.');
21
+ }
22
+ return _auth;
23
+ }
24
+ /** Catch-all route handler for `/api/auth/*` (sugar over `auth.handler`). */
25
+ export function mountAuthRoutes() {
26
+ return (request) => getAuth().handler(request);
27
+ }
28
+ /**
29
+ * Resolve the session ONCE per request and stash it on `locals.auth`. Runs before the
30
+ * render (and before server functions), so every helper below is a pure locals read.
31
+ * Place it in `src/middleware.ts`: `export default defineMiddleware([ authMiddleware() ])`.
32
+ */
33
+ export function authMiddleware() {
34
+ return async (request, next) => {
35
+ const session = await getAuth().getSession(request);
36
+ getRequestLocals(request)[AUTH_LOCALS_KEY] = session;
37
+ return next();
38
+ };
39
+ }
40
+ /** Thrown by the require* helpers; carries the HTTP status + optional redirect target. */
41
+ export class AuthError extends Error {
42
+ status;
43
+ redirectTo;
44
+ constructor(status, redirectTo, message) {
45
+ super(message ?? (status === 401 ? 'Unauthorized' : 'Forbidden'));
46
+ this.status = status;
47
+ this.redirectTo = redirectTo;
48
+ this.name = 'AuthError';
49
+ }
50
+ }
51
+ function current() {
52
+ return getLocals()[AUTH_LOCALS_KEY] ?? { user: null, session: null };
53
+ }
54
+ /** The current user or null — never throws. */
55
+ export async function optionalUser() {
56
+ return current().user;
57
+ }
58
+ /** The current user, or throw `AuthError(401, redirectTo)`. */
59
+ export async function requireUser(opts) {
60
+ const user = current().user;
61
+ if (!user)
62
+ throw new AuthError(401, opts?.redirectTo ?? '/login');
63
+ return user;
64
+ }
65
+ /** Require a specific role, or throw `AuthError(403)`. */
66
+ export async function requireRole(role, opts) {
67
+ const user = await requireUser(opts);
68
+ if (user.role !== role)
69
+ throw new AuthError(403, opts?.redirectTo);
70
+ return user;
71
+ }
72
+ /**
73
+ * Require a permission. Pass a boolean or a predicate (e.g. your RBAC/ABAC `can(user, …)`):
74
+ * `await requirePermission(() => can(user, 'edit', post))`. Throws `AuthError(403)` if false.
75
+ */
76
+ export async function requirePermission(check, opts) {
77
+ await requireUser(opts);
78
+ const ok = typeof check === 'function' ? check() : check;
79
+ if (!ok)
80
+ throw new AuthError(403, opts?.redirectTo);
81
+ }
82
+ // Cookie API — proper, secure-by-default cookie management (parse/serialize/request reads).
83
+ export { parseCookies, serializeCookie, deleteCookie, getCookie, getCookies, } from './cookies.js';
@@ -0,0 +1 @@
1
+ import{getLocals as U,getRequestLocals as A}from"@fluixi/server";var o="auth";import{getRequestEvent as g}from"@fluixi/server";function u(e){let t={};if(!e)return t;for(let n of e.split(";")){let r=n.indexOf("=");if(r<0)continue;let s=n.slice(0,r).trim();s&&(t[s]=decodeURIComponent(n.slice(r+1).trim()))}return t}function l(e,t,n={}){let r={path:"/",httpOnly:!0,secure:!0,sameSite:"lax",...n},s=`${e}=${encodeURIComponent(t)}`;return r.maxAge!=null&&(s+=`; Max-Age=${Math.floor(r.maxAge)}`),r.expires&&(s+=`; Expires=${r.expires.toUTCString()}`),r.domain&&(s+=`; Domain=${r.domain}`),s+=`; Path=${r.path}`,r.httpOnly&&(s+="; HttpOnly"),r.secure&&(s+="; Secure"),s+=`; SameSite=${r.sameSite[0].toUpperCase()}${r.sameSite.slice(1)}`,s}function f(e,t={}){return l(e,"",{...t,maxAge:0})}function c(){return g()?.request?.headers??null}function m(e){return u(c()?.get("cookie"))[e]??null}function x(){return u(c()?.get("cookie"))}var a=null;function q(e){let t={raw:e,handler:n=>e.handler(n),getSession:async n=>{let r=await e.api.getSession({headers:n.headers});return{user:r?.user??null,session:r?.session??null}}};return a=t,t}function p(){if(!a)throw new Error("[@fluixi/auth] defineAuth() was not called — no auth instance registered.");return a}function R(){return e=>p().handler(e)}function P(){return async(e,t)=>{let n=await p().getSession(e);return A(e)[o]=n,t()}}var i=class extends Error{constructor(n,r,s){super(s??(n===401?"Unauthorized":"Forbidden"));this.status=n;this.redirectTo=r;this.name="AuthError"}};function d(){return U()[o]??{user:null,session:null}}async function O(){return d().user}async function h(e){let t=d().user;if(!t)throw new i(401,e?.redirectTo??"/login");return t}async function b(e,t){let n=await h(t);if(n.role!==e)throw new i(403,t?.redirectTo);return n}async function D(e,t){if(await h(t),!(typeof e=="function"?e():e))throw new i(403,t?.redirectTo)}export{i as AuthError,P as authMiddleware,q as defineAuth,f as deleteCookie,p as getAuth,m as getCookie,x as getCookies,R as mountAuthRoutes,O as optionalUser,u as parseCookies,D as requirePermission,b as requireRole,h as requireUser,l as serializeCookie};
@@ -0,0 +1 @@
1
+ {"fileNames":["../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.d.ts","../../../node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/modules/index.d.ts","../../reactive/dist/lib/observable/types.d.ts","../../reactive/dist/lib/observable/subscription.d.ts","../../reactive/dist/lib/observable/observable.d.ts","../../reactive/dist/lib/signal/graph/detect.d.ts","../../reactive/dist/lib/signal/graph/derived.d.ts","../../reactive/dist/lib/signal/graph/runtime.d.ts","../../reactive/dist/lib/signal/graph/compat.d.ts","../../reactive/dist/lib/signal/graph/children.d.ts","../../reactive/dist/lib/signal/graph/ssr-hooks.d.ts","../../reactive/dist/lib/signal/signal.d.ts","../../reactive/dist/lib/signal/list.d.ts","../../reactive/dist/lib/signal/graph/resource.d.ts","../../reactive/dist/lib/signal/graph/suspense.d.ts","../../reactive/dist/lib/signal/graph/error-boundary.d.ts","../../reactive/dist/lib/signal/graph/core.d.ts","../../reactive/dist/lib/signal/graph/index.d.ts","../../reactive/dist/lib/signal/graph/signal-next.d.ts","../../reactive/dist/lib/signal/index.d.ts","../../reactive/dist/lib/signal/utilities.d.ts","../../dom/dist/lib/dom/utils.d.ts","../../dom/dist/lib/dom/runtime.d.ts","../../reactive/dist/lib/observable/index.d.ts","../../reactive/dist/lib/subject.d.ts","../../utils/dist/lib/maths/types/basic.d.ts","../../utils/dist/lib/maths/types/advanced.d.ts","../../utils/dist/lib/maths/types/negative.d.ts","../../utils/dist/lib/maths/types/operations.d.ts","../../utils/dist/lib/maths/types/index.d.ts","../../utils/dist/lib/maths/constants.d.ts","../../utils/dist/lib/maths/guards.d.ts","../../utils/dist/lib/maths/fn/basic.d.ts","../../utils/dist/lib/maths/fn/advanced.d.ts","../../utils/dist/lib/maths/fn/vector.d.ts","../../utils/dist/lib/maths/fn/complex.d.ts","../../utils/dist/lib/maths/fn/trigo.d.ts","../../utils/dist/lib/maths/fn/index.d.ts","../../utils/dist/lib/maths/formatter.d.ts","../../utils/dist/lib/maths/random.d.ts","../../utils/dist/lib/maths/parser.d.ts","../../utils/dist/lib/maths/index.d.ts","../../utils/dist/lib/primitive/string/string.d.ts","../../utils/dist/lib/primitive/string/types.d.ts","../../utils/dist/lib/primitive/string/index.d.ts","../../utils/dist/lib/primitive/boolean/types.d.ts","../../utils/dist/lib/primitive/boolean/boolean.d.ts","../../utils/dist/lib/primitive/boolean/index.d.ts","../../utils/dist/lib/primitive/date/types.d.ts","../../utils/dist/lib/primitive/date/date.d.ts","../../utils/dist/lib/primitive/date/index.d.ts","../../utils/dist/lib/primitive/types.d.ts","../../utils/dist/lib/primitive/index.d.ts","../../utils/dist/lib/object/types.d.ts","../../utils/dist/lib/object/object.d.ts","../../utils/dist/lib/object/diff.d.ts","../../utils/dist/lib/object/selector.d.ts","../../utils/dist/lib/object/merge.d.ts","../../utils/dist/lib/object/clone.d.ts","../../utils/dist/lib/object/getter-setter.d.ts","../../utils/dist/lib/object/omit.d.ts","../../utils/dist/lib/object/transform.d.ts","../../utils/dist/lib/object/reconcile.d.ts","../../utils/dist/lib/object/sort.d.ts","../../utils/dist/lib/object/utils.d.ts","../../utils/dist/lib/object/index.d.ts","../../reactive/dist/lib/store/setter.types.d.ts","../../reactive/dist/lib/store/types.d.ts","../../reactive/dist/lib/store/store.d.ts","../../reactive/dist/lib/store/utils.d.ts","../../reactive/dist/lib/store/index.d.ts","../../reactive/dist/lib/index.d.ts","../../reactive/dist/index.d.ts","../../dom/dist/lib/dom/types.d.ts","../../dom/dist/lib/dom/integration.d.ts","../../dom/dist/lib/dom/server/host.d.ts","../../dom/dist/lib/dom/island.d.ts","../../dom/dist/lib/dom/hydration.d.ts","../../dom/dist/lib/dom/hydration-state.d.ts","../../dom/dist/lib/dom/index.d.ts","../../../node_modules/.pnpm/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/development/css-tag.d.ts","../../../node_modules/.pnpm/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/development/reactive-controller.d.ts","../../../node_modules/.pnpm/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/development/reactive-element.d.ts","../../../node_modules/.pnpm/lit-html@3.3.3/node_modules/lit-html/development/directive.d.ts","../../../node_modules/.pnpm/@types+trusted-types@2.0.7/node_modules/@types/trusted-types/lib/index.d.ts","../../../node_modules/.pnpm/lit-html@3.3.3/node_modules/lit-html/development/lit-html.d.ts","../../../node_modules/.pnpm/lit-element@4.2.2/node_modules/lit-element/development/lit-element.d.ts","../../../node_modules/.pnpm/lit-html@3.3.3/node_modules/lit-html/development/is-server.d.ts","../../../node_modules/.pnpm/lit@3.3.3/node_modules/lit/development/index.d.ts","../../dom/dist/lib/shared/types.d.ts","../../dom/dist/lib/component/modifiers.d.ts","../../dom/dist/lib/component/index.d.ts","../../dom/dist/lib/flow/show.d.ts","../../dom/dist/lib/flow/for.d.ts","../../dom/dist/lib/flow/index-flow.d.ts","../../dom/dist/lib/flow/switch.d.ts","../../dom/dist/lib/flow/dynamic.d.ts","../../dom/dist/lib/flow/portal.d.ts","../../dom/dist/lib/flow/error-boundary.d.ts","../../dom/dist/lib/flow/class-map.d.ts","../../dom/dist/lib/flow/style-map.d.ts","../../dom/dist/lib/flow/index.d.ts","../../dom/dist/lib/dom/server/nodes.d.ts","../../dom/dist/lib/dom/server/serialize.d.ts","../../dom/dist/lib/dom/server/fx-data.d.ts","../../dom/dist/lib/dom/server/request-context.d.ts","../../dom/dist/lib/dom/server/render.d.ts","../../dom/dist/lib/dom/server/index.d.ts","../../dom/dist/lib/index.d.ts","../../dom/dist/index.d.ts","../../core/dist/src/lib/render/component.d.ts","../../core/dist/src/lib/render/suspense.d.ts","../../core/dist/src/lib/render/lazy.d.ts","../../core/dist/src/lib/render/index.d.ts","../../core/dist/src/lib/context/context.d.ts","../../core/dist/src/lib/context/index.d.ts","../../core/dist/src/lib/isomorphic.d.ts","../../core/dist/src/lib/env/index.d.ts","../../core/dist/src/lib/theme/index.d.ts","../../utils/dist/lib/array/array.d.ts","../../utils/dist/lib/array/utils.d.ts","../../utils/dist/lib/array/advanced.d.ts","../../utils/dist/lib/array/index.d.ts","../../utils/dist/lib/dom/events.d.ts","../../utils/dist/lib/dom/utils.d.ts","../../utils/dist/lib/dom/index.d.ts","../../utils/dist/lib/crypto/hash.d.ts","../../utils/dist/lib/crypto/index.d.ts","../../utils/dist/lib/functions/functions.d.ts","../../utils/dist/lib/functions/types.d.ts","../../utils/dist/lib/functions/index.d.ts","../../utils/dist/lib/helpers.d.ts","../../utils/dist/lib/index.d.ts","../../utils/dist/index.d.ts","../../router/dist/lib/types.d.ts","../../router/dist/lib/match.d.ts","../../router/dist/lib/history.d.ts","../../router/dist/lib/router.d.ts","../../router/dist/index.d.ts","../../core/dist/src/lib/router-next/data.d.ts","../../core/dist/src/lib/router-next/index.d.ts","../../core/dist/src/lib/control-flow.d.ts","../../../node_modules/.pnpm/lit@3.3.3/node_modules/lit/development/directive.d.ts","../../lit/dist/directives/classMap.d.ts","../../lit/dist/directives/styleMap.d.ts","../../lit/dist/directives/ifDefined.d.ts","../../lit/dist/directives/live.d.ts","../../lit/dist/directives/ref.d.ts","../../../node_modules/.pnpm/lit-html@3.3.3/node_modules/lit-html/development/directives/repeat.d.ts","../../../node_modules/.pnpm/lit@3.3.3/node_modules/lit/development/directives/repeat.d.ts","../../lit/dist/directives/repeat.d.ts","../../lit/dist/directives/unsafeHTML.d.ts","../../lit/dist/directives/unsafeSVG.d.ts","../../../node_modules/.pnpm/lit-html@3.3.3/node_modules/lit-html/development/async-directive.d.ts","../../../node_modules/.pnpm/lit@3.3.3/node_modules/lit/development/async-directive.d.ts","../../lit/dist/directives/async-append.d.ts","../../lit/dist/directives/suspense.d.ts","../../lit/dist/directives/litrx.d.ts","../../lit/dist/directives/reactiveAttr.d.ts","../../lit/dist/directives/utils.d.ts","../../lit/dist/directives/index.d.ts","../../lit/dist/templates/index.d.ts","../../lit/dist/control-flow/for.d.ts","../../lit/dist/control-flow/each.d.ts","../../lit/dist/control-flow/index-flow.d.ts","../../lit/dist/control-flow/show.d.ts","../../lit/dist/control-flow/switch.d.ts","../../lit/dist/control-flow/dynamic.d.ts","../../lit/dist/control-flow/portal.d.ts","../../lit/dist/control-flow/index.d.ts","../../lit/dist/index.d.ts","../../core/dist/src/lib/core.d.ts","../../core/dist/src/index.d.ts","../src/types.ts","../src/client.ts","../../server/dist/index.d.ts","../src/cookies.ts","../../start/dist/config.d.ts","../../start/dist/commands/dev.d.ts","../../start/dist/commands/build.d.ts","../../start/dist/commands/start.d.ts","../../start/dist/commands/prerender.d.ts","../../start/dist/handler.d.ts","../../start/dist/internal.d.ts","../../start/dist/adapter.d.ts","../../start/dist/middleware.d.ts","../../start/dist/interceptors.d.ts","../../start/dist/index.d.ts","../src/server.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/assert.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/assert/strict.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/globals.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/async_hooks.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/buffer.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/child_process.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/cluster.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/console.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/constants.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/crypto.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/dgram.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/dns.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/dns/promises.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/domain.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/dom-events.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/events.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/fs.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/fs/promises.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/http.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/http2.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/https.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/inspector.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/module.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/net.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/os.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/path.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/process.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/punycode.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/querystring.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/readline.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/readline/promises.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/repl.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/stream.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/stream/promises.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/stream/web.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/string_decoder.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/test.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/timers.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/timers/promises.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/tls.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/trace_events.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/tty.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/url.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/util.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/v8.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/vm.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/wasi.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/worker_threads.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/zlib.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/globals.global.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/index.d.ts"],"fileIdsList":[[289],[134,135,289],[243,289],[246,289],[247,252,280,289],[248,259,260,267,277,288,289],[248,249,259,267,289],[250,289],[251,252,260,268,289],[252,277,285,289],[253,255,259,267,289],[254,289],[255,256,289],[259,289],[257,259,289],[259,260,261,277,288,289],[259,260,261,274,277,280,289],[289,293],[255,259,262,267,277,288,289],[259,260,262,263,267,277,285,288,289],[262,264,277,285,288,289],[243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295],[259,265,289],[266,288,289],[255,259,267,277,289],[268,289],[269,289],[246,270,289],[271,287,289,293],[272,289],[273,289],[259,274,275,289],[274,276,289,291],[247,259,277,278,279,280,289],[247,277,279,289],[277,278,289],[280,289],[281,289],[259,283,284,289],[283,284,289],[252,267,277,285,289],[286,289],[267,287,289],[247,262,273,288,289],[252,289],[277,289,290],[289,291],[289,292],[247,252,259,261,270,277,288,289,291,293],[277,289,294],[136,139,289],[137,139,289],[139,289],[137,138,289],[207,289],[137,289],[202,289],[136,139,140,141,289],[54,289],[55,163,226,227,289],[55,229,289],[55,227,229,230,241,289],[55,163,289],[225,289],[73,163,227,289],[168,289],[163,227,289],[73,74,124,163,167,169,170,171,172,187,194,195,224,227,289],[73,289],[164,165,166,289],[73,106,119,166,192,193,289],[162,289],[144,289],[75,76,127,128,129,130,131,132,289],[127,289],[129,156,157,158,159,160,289],[129,289],[159,289],[126,289],[73,146,147,148,149,150,151,152,153,154,289],[127,128,133,143,145,155,161,289],[142,289],[126,142,163,227,289],[196,289],[73,142,163,227,289],[216,217,218,219,220,221,222,289],[196,208,289],[142,196,289],[197,198,199,200,201,204,205,206,209,210,211,212,213,289],[73,142,196,289],[203,289],[208,289],[126,196,289],[214,215,223,289],[125,289],[73,77,78,124,289],[56,57,58,289],[57,289],[56,289],[62,289],[61,289],[65,289],[70,289],[59,60,61,62,63,64,65,66,67,68,69,71,289],[72,289],[58,59,60,63,64,289],[58,65,289],[121,122,123,289],[119,289],[58,73,120,121,289],[121,289],[77,289],[188,189,190,191,289],[188,289],[188,190,289],[231,236,289],[231,289],[262,289],[229,231,232,233,234,235,236,237,238,239,240,289],[236,289],[186,289],[107,289],[173,174,175,289],[180,289],[177,178,289],[182,183,289],[106,289],[176,179,181,184,185,289],[80,289],[79,289],[86,87,88,89,90,289],[83,289],[83,84,85,91,92,93,94,289],[79,80,82,289],[79,81,289],[107,108,109,110,111,112,113,114,115,116,117,118,289],[95,106,289],[106,107,289],[99,289],[99,100,289],[102,289],[102,103,289],[98,101,104,105,289],[96,97,289]],"fileInfos":[{"version":"69684132aeb9b5642cbcd9e22dff7818ff0ee1aa831728af0ecf97d3364d5546","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"092c2bfe125ce69dbb1223c85d68d4d2397d7d8411867b5cc03cec902c233763","affectsGlobalScope":true,"impliedFormat":1},{"version":"07f073f19d67f74d732b1adea08e1dc66b1b58d77cb5b43931dee3d798a2fd53","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"936e80ad36a2ee83fc3caf008e7c4c5afe45b3cf3d5c24408f039c1d47bdc1df","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"fef8cfad2e2dc5f5b3d97a6f4f2e92848eb1b88e897bb7318cef0e2820bceaab","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"811c71eee4aa0ac5f7adf713323a5c41b0cf6c4e17367a34fbce379e12bbf0a4","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"a6a5253138c5432c68a1510c70fe78a644fe2e632111ba778e1978010d6edfec","impliedFormat":1},{"version":"b8f34dd1757f68e03262b1ca3ddfa668a855b872f8bdd5224d6f993a7b37dc2c","impliedFormat":99},{"version":"e592cf1b998ce8043e72ca38e2f40c5631e65e937e3102223f7086140bf979a3","impliedFormat":99},{"version":"0ceea501c52cdf869e3562ea96fca2785a3394a9e1e446afb5e11092ad2dc7fc","impliedFormat":99},{"version":"ebe92631232ee90bd0cd2668b349a8ecf869a42f94aa5a80505aaf7833be6819","impliedFormat":99},{"version":"892323d83df6c419a9f961e7156e70184b4a27638de72f7b92931ab3c165298e","impliedFormat":99},{"version":"ed51ea7ddcddfe0523b5a8d3112c55f8494f3f419ad6b830a1aac7dfe499a8ab","impliedFormat":99},{"version":"f930ceeb25ec3a15c78ff12771c202a67164e232a5b588635c89603c6c961928","impliedFormat":99},{"version":"96e415a91946f00ac400e74dfeb26b575aade405169df35621a822e6b4d5abf0","impliedFormat":99},{"version":"e8be3e24c3b98c301590ee0fefc462accc9a0f1fa674f62a3b63be9786ef9a99","impliedFormat":99},{"version":"e08f70018aeffb92654e466522e4b194b712da2091b20bdb0922c8441f2a43b7","impliedFormat":99},{"version":"97b4ab5a8db570e67a3a764a456486d97b8808b658e0e0a3eb9e38b63270d086","impliedFormat":99},{"version":"1f33d92b487c119aee6f7cf04ac95c0dab317c228b388fead9d7d87540f8adf7","impliedFormat":99},{"version":"e972de4985925f07d08dfb7eb73a400506f75b3596cac60591fab948eade26b7","impliedFormat":99},{"version":"c03135439ad665f4a011a75586bf96098f6fe0b0716e78afc8cdf651bcc8f879","impliedFormat":99},{"version":"290111961dc134d534be036cd591c09a0e65ceed2fcf9aa9666ae2bcdac7034f","impliedFormat":99},{"version":"ac292cffbb31f9c76b09f7b0c630cfc2b9c7e5070dfc4472cfc60023ec447bd2","impliedFormat":99},{"version":"ac23329299d15c989ebe7e62bb1858a58de39aa3cd4fb1265e93ddc6d9631b07","impliedFormat":99},{"version":"16b49126ba492eb0b4abc93a518addf8ca7e850bed2fc56c111ffa768d23113e","impliedFormat":99},{"version":"1122b4ca26147813c76ac7a2f38911854cb2bd5cf0af003f578175f3db1c3aee","impliedFormat":99},{"version":"2dce570f3d8917cca7d605dc74f96d74ec8af5c590b68fccb4bfaf939a297bf6","impliedFormat":99},{"version":"8fe10058c65480f8667d1099d1ca25c75f07091ae303f287eda65bb622d7e1d5","impliedFormat":99},{"version":"13bb96268e358a7e2a50476df6db22b4258ec01edbd3f9de3ed2fafffed11e1d","impliedFormat":99},{"version":"e6597aaf78157a53337c8794d2f7eee5eecef77a6ec0c60480c74a936811fa36","impliedFormat":99},{"version":"7112073e38bc7d171cbc5530734f550065ecbc76eb302319c5e8a06105dae5bb","impliedFormat":99},{"version":"631287e5e4a8a6ff2348789b7d2d00944c0f09ff3fed60cc3642323a1ff0ed4a","impliedFormat":99},{"version":"4f24eafbd6e05dd55f4597c6d286171fbe5066785625c482ab5c5cbba2fc7487","impliedFormat":99},{"version":"e9ad8fb60df94fd4f929f944a12d496271d6523e69d5ad4de20fc080a0a30711","impliedFormat":99},{"version":"a928f91a183425984c472e4d2763f7649e8d63c92c74a2fa59482ad8905bc664","impliedFormat":99},{"version":"c323e45a420e39e384e86db3e4470969016e8f507e04a9ceff1f073d8e5efeff","impliedFormat":99},{"version":"120b522225d94dea3356d056952f0ca9c626a4643a7734fbff1b031f16a0cb65","impliedFormat":99},{"version":"52a743346fe3f9758188a0ba974989e2ec948d8bb145539b6b6d6058204f2612","impliedFormat":99},{"version":"b19bb5d1b4f1ed34aad8e57dc096f7f333dc2fccb0a86633b9c8405c4797b190","impliedFormat":99},{"version":"fde9c3aaca2fb4f489fe2c25d3d0a5d56c145272cf92c6fd1f39f41589d9d0b1","impliedFormat":99},{"version":"2289a9520455d5a74bff1f23ddf0bee2593baedb8b9cda9c3e8720ca66338f65","impliedFormat":99},{"version":"1ff7de3d6cb03553a07592092fcd7a0ed61a88c6be9f5344239ac247be712cfd","impliedFormat":99},{"version":"b071dcadeb17235e2a1116231ca370bac5c97ec090fc73b3736791cb0a2aa91d","impliedFormat":99},{"version":"b4ed0f4d07ca274437eb9d49400de8c81659760e59507f08b94442873eb49a25","impliedFormat":99},{"version":"88978beb444b1d65c0f48d1099717d2a935ce74d9e3e1411bcaa1fe497910ab6","impliedFormat":99},{"version":"712fdf289306e77c2c097843e29560d99ff83bd336da277498ea18ca8cd999f0","impliedFormat":99},{"version":"ceb05e55219637c8dcb77490777c52e537363adc0a060af39cc95d46310f2128","impliedFormat":99},{"version":"a1b05ca68a811afb49605cf1346a53efadc4ec6269caf9e19d97bee4543f1479","impliedFormat":99},{"version":"4e454ae8246e2b13c51c12adaccda8d0fe8e36e120d4e5bbc554021244240fdb","impliedFormat":99},{"version":"4edc87837b7285fe2141b92b492ecc6428a5fc152d7d013af9d0e7017e78befa","impliedFormat":99},{"version":"20e3c2b6bfdfbde9073c6309992943094ab954bd50954c2561daa4d377c78bbc","impliedFormat":99},{"version":"de969e2fcf0e6bfe70c844762f81e47e713dfdf3f1b8ed89378ff3865e78f16d","impliedFormat":99},{"version":"7349d52ef2d997de63d4298417883a9ae8d94ad2d6b0a1ad4a11971fbf01ec3d","impliedFormat":99},{"version":"1673bc6ee9b15e4bc9e4de777b1497bd1ec544d6939061ce7a25de9a0c09565d","impliedFormat":99},{"version":"73eae9a32499f88a8c73cedd49a43ecf441116bb55c7a150f346e333b35c687b","impliedFormat":99},{"version":"9b1c12fce85d708544c70e12e0d8ca6c4a9b27690a27448577b9f4053c49908d","impliedFormat":99},{"version":"68e1a72149e6384295c078bdb945bc3238afcaeb850be14f3ba0571661addf82","impliedFormat":99},{"version":"abc4efc89e29e107946fd0a40b96c4c862d4d340c4c26dd7647183568c3e33c3","impliedFormat":99},{"version":"e1cb7303d3d49535d39fac5d8ded4b5e5e430526eb8a44411cfec3694eae6223","impliedFormat":99},{"version":"1fb68873fd2a769163972685c0516cb3f88fcedd57409f285dfe7c71be13cbbd","impliedFormat":99},{"version":"6685db351c23e0cb6cec2426ea1680a41d29c1633d722c7d7621207c55f6491e","impliedFormat":99},{"version":"cc74864af16373ee02499f7e65758f13f903d37aa1e13e7ad5598facc70dc274","impliedFormat":99},{"version":"71830cf6fc186afa64f4d6d015eed23c78a3af68bd8dc770ffa4d5cee77744b3","impliedFormat":99},{"version":"72ff78881cb1d71790e047eba022ce05845b7dd05e94ba64267dc478ce1457f1","impliedFormat":99},{"version":"fdf1008f43e52d69c62571db0aaa782604dca7e7c2206825a9f46ada5154b610","impliedFormat":99},{"version":"9b3b063cf484aa4088728e28f73f98c7b8fa267debd6f289acec4d70f5977253","impliedFormat":99},{"version":"fe21672b2e8f8ad092ba5ca8ecc4c83f3952dd5144e459f1f001dfdac2f9e7a5","impliedFormat":99},{"version":"95b067197bb5c2f7ca7ee0ede9be77c4724aa09687b75d6e8cacf0904ff565f9","impliedFormat":99},{"version":"3ab7a86cdb01a3f6d3845a82add1feee0ec6b0620fde0224ada4ab929f459b61","impliedFormat":99},{"version":"0c40740c1cb8ae5f8a74182579c5a392f7e0ce20826d1a4907417e6929e20666","impliedFormat":99},{"version":"ea7a689828afde6f1565f81d9a675c48daa0b91c36020aaeef7193b8769cccf9","impliedFormat":99},{"version":"4c362ca187c7fc9d6a986d33da9966cac1738dc14f8da9f1315b0703214f7be5","impliedFormat":99},{"version":"45d0b9f6985725909f26094b518f6e5017ecc9fff784fb71792addb7c90c70bf","impliedFormat":99},{"version":"62512a36ef5e3ed8dca2f7ac0800e2d3bd461025c7b4ae5539cd871258dcd00c","impliedFormat":99},{"version":"f431bb373494e78c5e01546c80fc41921ca9b24386c388da802a2afbe9705392","impliedFormat":99},{"version":"07a2317b33ba403c06f14a9c8cf0ed93a83d85d22ffc64cab4452327a1e08e24","impliedFormat":99},{"version":"415f940ff9853f2e98ac9864385e88ac819ae9dda1a1ca69c8cdb170054b2820","impliedFormat":99},{"version":"f6e6e7e47824c8366b0cad7f6582ac611143a12bac48ecff2f6b88ff78187d68","impliedFormat":99},{"version":"9a6c3e2900643e20e37b47f712af6420048e737db80c1975707cfde23681b2c9","impliedFormat":99},{"version":"3f06e42c5281bc88f1de705b90b69da10d106a09296ae2bda90e62b5cc0e8cc8","impliedFormat":99},{"version":"73f3a592934d6163184e94890ac9c369ff8d4338e57cdad77a1b775830a06642","impliedFormat":99},{"version":"9dbe39e850dcc9124b71341467f46bb1a0f34e0e15066291bd8f98ec15c03280","impliedFormat":99},{"version":"746a5c6e2eb8982e2b0cd37bab36ff773d1e9f84abd8244a598f9af0d2ecfe9f","impliedFormat":99},{"version":"9f41d91eeb174fefed6f6317fe406b39be79e87f7c4de3388e6657ea797e8b8c","impliedFormat":99},{"version":"4c0bfb5426c29cbb62fef9241e667b70a7350086ac62b64c3dc94a7985af4c72","impliedFormat":99},{"version":"d211c8d3dbf70442d54e6b5ea5bbfb3e394001d8c802b842a7ced12c1c7d536c","impliedFormat":99},{"version":"74012d464fbc5354ca3a7d5e71bee43b17da01a853c8ff10971bbe3680c76f40","impliedFormat":99},{"version":"5e30131b6a5587fe666926ad1d9807e733c0a597ed12d682669fcaa331aea576","impliedFormat":99},{"version":"a0f82d2f9450bd147a8c137798d9501bd49b7c9e118f75b07b76709ff39b6b55","affectsGlobalScope":true,"impliedFormat":99},{"version":"00cb63103f9670f8094c238a4a7e252c8b4c06ba371fea5c44add7e41b7247e4","impliedFormat":99},{"version":"15fe687c59d62741b4494d5e623d497d55eb38966ecf5bea7f36e48fc3fbe15e","impliedFormat":1},{"version":"e09db3291e6b440f7debed2227d8357e80c95987a0d0d67ac17521d8f7b11bdb","impliedFormat":99},{"version":"9a318e3a8900672b85cd3c8c3a5acf51b88049557a3ae897ccdcf2b85a8f61f9","impliedFormat":99},{"version":"1bcd560deed90a43c51b08aa18f7f55229f2e30974ab5ed1b7bb5721be379013","impliedFormat":99},{"version":"dc08fe04e50bc24d1baded4f33e942222bbdd5d77d6341a93cfe6e4e4586a3be","impliedFormat":99},{"version":"35b2e19d086f311343f1ffae8a1bd1f0fd4f70de2f49d9605241c4f74b53ddc2","impliedFormat":99},{"version":"5a2fad844d16083a48af5d82bffb196e7bdd6f44e46e80f552e16b170c4a8f71","impliedFormat":99},{"version":"c6650df9082a55ae635b96b371b9957d8eafbc12ffdbc0e0b77f0b002fdd8e7f","impliedFormat":99},{"version":"326daff479c598c3230df94051092329abffd458689dc3cce3f21b767b499d99","impliedFormat":99},{"version":"9291566976678663eb96b938d284bf09d2139043d0d7d0976cffbdcbe44f0d0e","impliedFormat":99},{"version":"213b1ac213e38d56741eee5e31ca39ee579d7489084e7c30486fe3b3b9684028","impliedFormat":99},{"version":"0e416bf225e5eb5ec5b58e890d34d9c645feb834b95b73bd767d9a1526e58fbf","impliedFormat":99},{"version":"44b89266a40c97f4d533e43a64342d12b7f03c818b0ea0b5ed3314f27a5ea3c1","impliedFormat":99},{"version":"9c44147ff2f963a6a6430664b8073eba81fe22adfdceefe5d4b94c58a1744247","impliedFormat":99},{"version":"1e46f8f10c9d81c3c36accfe6076d8abd35e6218d28e3f7deadd08e2cf99857a","impliedFormat":99},{"version":"91ef71cd917ce22fd4a3f7fac1094bd492dcc85e7e4646af6a982268fbb5f89b","impliedFormat":99},{"version":"04353aa31b2939f6ff9a67ad4937896b2ff275852248d2549731e05fc9ea3fe0","impliedFormat":99},{"version":"f3209b787ae8fb62327ebc904a12ee79ae0638a3c423d66b4f5186ff08b891a0","impliedFormat":99},{"version":"8da735bbcdf3eef496c20933a969c898c45abf151d6ef9f1a3f719eb54495e59","impliedFormat":99},{"version":"cca8d9f11c7209da2e992525500746ff81ccb0e74597dc482338b56bbca43977","impliedFormat":99},{"version":"09eea8ae8576e45b470e9506ef332fc71e07dca2dd3c8b4da89fc9ef9d3cc0b0","impliedFormat":99},{"version":"e9e4b5e403d534250d1ae0cfc12a3b14b975a106886ddcafc4c1b44fe362000a","impliedFormat":99},{"version":"963c208c61e15b6a1226512b80a2a63aa80d9195956b0a087e6fe382eeb7b3ba","impliedFormat":99},{"version":"4b6a4593207c56d2da0a64f8f5ce34c54b7af90754c9e5964f696e72f0037530","impliedFormat":99},{"version":"30295332c8cc2b18f1691fb3f9785e48ea3b7d7b544c915b666b8963a414162d","impliedFormat":99},{"version":"73cbc0a2e4774f7128943e055cdce1195b4a66587d8f00e5b7ce64fd5423584a","impliedFormat":99},{"version":"d061f0776c8bedf6ec233e421154a196b83228dfc1260c107e7ebb4efbccd7cf","impliedFormat":99},{"version":"137a896ad9dd6c91df545f023a5e4f3cb1d18694724771e0137afbf82d207de5","impliedFormat":99},{"version":"af74cb86213e1c274ab4ff70f6a471764de959ccedc3e916018bd60f44f656b4","impliedFormat":99},{"version":"5a98a22cc9a5b50c804b350b8b870a40d5474bfde18731dee0ef50129b0fa91f","impliedFormat":99},{"version":"002effc00f23bd8cf9ba1d75309e8f213be4147c1bd2a5b4a4fd6763f7063692","impliedFormat":99},{"version":"cb4d2b44b2e9aa0bfbaa47fbf54c1558d0d77387a3e405644fc1d44f182520a5","impliedFormat":99},{"version":"78536d7cbddfbab8163267ce61d0005be870b0bd49a9435d58952a27504d90e7","impliedFormat":99},{"version":"d16aedbdca35dbc65b0b000a334b29a2b1dd40e6a5d9c135fac28cd05cac355d","impliedFormat":99},{"version":"a23795b931d9e0a3d84bf02dc06e6c2afa3c37ac5e077b96dffb3006cfbe52a7","impliedFormat":99},{"version":"f15921cf5d9640e2c54c35fc6a3c36e8a4c0061f78dce854724413127338c7e9","impliedFormat":99},{"version":"93b0f0fe75bafd0c0d384e2de7ef7358098653416740881a5aff042703bcb97a","impliedFormat":99},{"version":"1765fca10cad95f2ddb420591e089b4ed74639eb1085f52ab81283642fbcbaa3","impliedFormat":99},{"version":"e71869ee1e7ffb064578d3010aa8f364ba7d992dde650dc2561a718cd48d3a10","impliedFormat":99},{"version":"0f6f1ed13d6924402359ace5d0fb77bdfd3b80beaf87318df3cc9d44a50b925b","impliedFormat":99},{"version":"db0123abae93f8141f9fc417ff13feeb368ec0ba7296d5745efd35a5ce79f52b","impliedFormat":99},{"version":"f23a7c9fe54c8a623696aa9a8b13225b4b926fae0d98d592748d635c2603723f","impliedFormat":99},{"version":"ed28747437d5c4ab842ac70bba457a89ef867a7bf50864e3a1e333378b531ddc","impliedFormat":99},{"version":"064c05ad917a300e188b8374d95ae3360794fd9c0b91110c967f79c00c9413da","impliedFormat":99},{"version":"8af0262b31af8ba340a2c3f1ed31b1199b3271cadedf8ef41d9faeb1e259332e","impliedFormat":99},{"version":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881","impliedFormat":99},{"version":"bfb5e43efed96b73d2a8018a84353efbbd8ddd0569bab3e172b7a21ca3e9c451","impliedFormat":99},{"version":"11a574d9d2ffd0d34deb5b3ba9f1e36d5797072cb8974365e2dc9fa8428a8856","impliedFormat":99},{"version":"9f4166bc2e232d9f8c9500751a9e9be0438f6d9a76c76cc990e110a3276f7dec","impliedFormat":99},{"version":"9a6c3e2900643e20e37b47f712af6420048e737db80c1975707cfde23681b2c9","impliedFormat":99},{"version":"4d19aa2a9bf11f03350f885799abb2a399e49308ff23582f0bfc7ca3de1ef964","impliedFormat":99},{"version":"3206bc8f6c9cf553a7bdd45999e405e7e95524558b6516359bd552ad49e02edb","impliedFormat":99},{"version":"d06367c35e944d602fec4a3bfe3cb00ca44fab949354392add4d6386c620d294","impliedFormat":99},{"version":"f0c0df41d93b49b7a7fc3c69f9f2b2f6cfb58e59d8e0869f6bf7bd6a3003b7dd","impliedFormat":99},{"version":"a4766338e78a77ceb79b55f54ad3b9d6d9f0aa3ecea6d6097bbbb671020594a1","impliedFormat":99},{"version":"5a54a9ae40b3a00ecfa95c3f70d349ee537cef18a681ac7e8138d5e7d1a6b155","impliedFormat":99},{"version":"18ffeb24e3dbb7cb3b407703454ff84120c8357917f7d494de45afce811b1ff0","impliedFormat":99},{"version":"0f06c3d71d0e686261997eba0eef8e8b4b0837d69c10ac841858ac793f2ad2ae","impliedFormat":99},{"version":"25d5a8f05e1c4225f718beca2610465a2f4d317d3f1344dceb342a29af57a1eb","impliedFormat":99},{"version":"2a172abe1478bd65206bff70aff82ca71fb7128bbf02717bb3dcfd9646bde351","impliedFormat":99},{"version":"ce82849d142b991369a34d14c0c7635df527dd2a16c6c02fa108be8169a87c0d","impliedFormat":99},{"version":"89c8d4b261417a769f262a097eb07b104389bc1c8487620aaf4fe0617dd5857e","impliedFormat":99},{"version":"a02dc067ef5b75deab2f5486ce388526390cba8eff1689eb69a997f668f71f17","impliedFormat":99},{"version":"e9c326f6d1638102b8fd1fbd64c7a5d1c3c5b28e3fce944e4836a2b9e275f887","impliedFormat":99},{"version":"a4bbe05f59182f4ce279bf92b2fcf9ce52fe1a9feba61867aa97e11eaa1912aa","impliedFormat":99},{"version":"1b9d0b8dbfe4d820b52271376daab06fde5205e840010c63c7b0f53458ece5bc","impliedFormat":99},{"version":"c955a20bfebe856f4c2f2696c496a53005de11bca7492ce6bd15581de3a20039","impliedFormat":99},{"version":"ff7644a69b155764f45cffceeebf7f817273bf4d77cd19aca433bb0a509cfb37","impliedFormat":99},{"version":"a0226f43a8bd8493122d61bf6fe01cd57a2d09037c775e6e269998d6a16e6dfb","impliedFormat":99},{"version":"c42f9b18f5f559b133cf9b409f678afb30df9c6498865aae9a1abad0f1e727a8","impliedFormat":99},{"version":"eabff483c855b848eefb979dbfb64c8858444c56a2f3ea0e59de026ef03fd089","impliedFormat":99},{"version":"85aa06bd38cf2d7fe53f2adf608136b80aa0004cc1186ec684ec9f17f58eab76","impliedFormat":99},{"version":"4058d0875b427fb53accb102c254afa8274821316d024960a336e3ac3ab0b39f","impliedFormat":99},{"version":"2fc203df885f75b6e2286b0cecafac52f6afabdb39656a61eed68ef6bb25db6c","impliedFormat":99},{"version":"02264596562a8bb62b6f044adcbe5ef60dc7954feca93a2faca23a93c51320e0","impliedFormat":99},{"version":"8e4772e8a1119a61458be078b24758952b2af898599b44bc50fb9fe7de22a464","impliedFormat":99},{"version":"f004c4c4005fadfff56786bc1e5d987a45d3b4f81f64ad7a416e8b865998e887","impliedFormat":99},{"version":"fc9bebf4be86621c39191eae6259a5510cdf4c820bb655f5568ba7aad21af18c","impliedFormat":99},{"version":"950da1bb01e156d02581a5acc24c3f639d3b3ef6ce8f2e752d314c2170e96a25","impliedFormat":99},{"version":"907358a13c2e757d2db30306df44eea79012b01b645d49cc869c3cbbd3c1c761","impliedFormat":99},{"version":"f95753a22340d6e32bdf3264888a95b63b0cc16c9fb198f696b2ea0f9ef7e209","impliedFormat":99},{"version":"b4c759ab69629cba0201435880cde35e62df058a676620a03f8dda998e8f14eb","impliedFormat":99},{"version":"1e055dac94e15a36e63ec72615e06653fa11acbfae0a0351d282b915a21c582e","impliedFormat":99},{"version":"b7bc2afdcb5d05c02f7421be9a705db407db295bcd7927df3548851f20ab3f29","impliedFormat":99},{"version":"8372927a8f37d0a8ba7bb694143f016225953f621b8c4709666a680892676c5d","impliedFormat":99},{"version":"7260a53873f59b8da4ad4ecab85a6649931e5f894c2bb8d066a162c9ba2e10f7","impliedFormat":99},{"version":"825964f3ced37213188a17f06a62118d9d4472967b505429267cd6d7950e1e6d","impliedFormat":99},{"version":"a6fdd29c5d849eb1e954575bc49e4ee299c6f6d7463c03ff2cdf3a56a36a3f58","impliedFormat":99},{"version":"b55d64662ed325e2b3de133ed6b304d0608580e73fe51f6d36b6777b2920e0e2","impliedFormat":99},{"version":"0ffdca3567b3ce7b6be49db5b6bd5fb06e5df5ff9d8d5dc9baa4a782b4f39a7c","signature":"991098e93f2579e027657ae3e2f41d983b687bd174995408d01bee06fecc1573","impliedFormat":99},{"version":"14f6c3f1eccef0bf1b49f29069695ef4b58fe9d2cb9b52e62e6f348a85fc156f","signature":"8f8e7b589758f29521e8e46e4d16b5a768514948860afc34c67236cbb682a1ea","impliedFormat":99},{"version":"7f00b121429a775c13187de037e43e7e922ca9fc993c9d23484b93515f513a14","impliedFormat":99},{"version":"35a01b24692a9cbf9d1f5c064c589bf86682be15dcdb0c95cd59c50b03e672be","signature":"0d1f93667d8d7bfaf6d9af32ec93b0aa228eaf6fb30ca512f90d5a2c0ce2cdf5","impliedFormat":99},{"version":"a9a86ddf9cde0fe36f418082d85c70204d0a3fb53d4c16bf66f7e026b16edf44","impliedFormat":99},{"version":"b0fcd0f6a1b17b6227dde33cfaa06682c84873417de20d72bd22c219038c6bf7","impliedFormat":99},{"version":"586ac3802879c3fd0f7296b2c4459643bc996222bc3fa02e571673807f1351e3","impliedFormat":99},{"version":"e1ec719bdf246837a1a7bc2519575aa83e22ca37bfb8eaf3202ce4840eaaf996","impliedFormat":99},{"version":"c3c5be4bda83f49b6714c2806edf467752aabeada59b7f0d981fb7ef33c2d920","impliedFormat":99},{"version":"0fe9e7d64d6c00b72f99b3e9f1617af97d84477b59396078827543e660f5cae4","impliedFormat":99},{"version":"cf281c4ea5f5abc1dfa437606522879e1d600f0c075fb6bdb98e07743b1b9913","impliedFormat":99},{"version":"aa9a63f1dcc62a31145126fe873f430f4e6156f51ebf4861d7a94868d05af707","impliedFormat":99},{"version":"b4e4e059daa939dffa80cbbae96f933be4bda795ec547046f8d41f00368328bb","impliedFormat":99},{"version":"de3c919527c0a6635f2bf091c8a8cf00b1a193112810bf54bc354ab7733b021b","impliedFormat":99},{"version":"e516a39f15bb8448c8ae559b2a9d7d4382682a687bfb41e42f5acf8440778952","impliedFormat":99},{"version":"dd38abd72e416c9395fd93a59e9d1670b20535e76f0ad0d57e6e0554cda07718","signature":"7038914b4dff306ee70cb1bab60bb3d60df8367fb43ce6e34614ad23f3449aa6","impliedFormat":99},{"version":"7e771891adaa85b690266bc37bd6eb43bc57eecc4b54693ead36467e7369952a","impliedFormat":1},{"version":"a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a","impliedFormat":1},{"version":"f749812878fecfa53cfc13b36e5d35086fb6377983a9df44175da83ccc23af1f","affectsGlobalScope":true,"impliedFormat":1},{"version":"7d2e3fea24c712c99c03ad8f556abedbfe105f87f1be10b95dbd409d24bc05a3","impliedFormat":1},{"version":"211e3f15fbced4ab4be19f49ffa990b9ff20d749d33b65ff753be691e7616239","affectsGlobalScope":true,"impliedFormat":1},{"version":"3719525a8f6ab731e3dfd585d9f87df55ec7d50d461df84f74eb4d68bb165244","impliedFormat":1},{"version":"5a94487653355b56018122d92392beb2e5f4a6c63ba5cef83bbe1c99775ef713","impliedFormat":1},{"version":"d5135ad93b33adcce80b18f8065087934cdc1730d63db58562edcf017e1aad9b","affectsGlobalScope":true,"impliedFormat":1},{"version":"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","impliedFormat":1},{"version":"e596c9bb2f29a2699fdd4ae89139612652245192f67f45617c5a4b20832aaae9","impliedFormat":1},{"version":"bb9c4ffa5e6290c6980b63c815cdd1625876dadb2efaf77edbe82984be93e55e","impliedFormat":1},{"version":"1cdcfc1f624d6c08aa12c73935f6e13f095919cd99edf95752951796eb225729","impliedFormat":1},{"version":"4eaff3d8e10676fd7913d8c108890e71c688e1e7d52f6d1d55c39514f493dc47","impliedFormat":1},{"version":"14b5aa23c5d0ae1907bc696ac7b6915d88f7d85799cc0dc2dcf98fbce2c5a67c","impliedFormat":1},{"version":"5c439dafdc09abe4d6c260a96b822fa0ba5be7203c71a63ab1f1423cd9e838ea","impliedFormat":1},{"version":"6b526a5ec4a401ca7c26cfe6a48e641d8f30af76673bad3b06a1b4504594a960","affectsGlobalScope":true,"impliedFormat":1},{"version":"00dee7cdca8b8420c47ea4a31a34b8e8294013ebc4f463fd941e867e7bf05029","affectsGlobalScope":true,"impliedFormat":1},{"version":"3256f3cccd578f9e7fe3a28096c505634bebcee8afb738ffa99368e536ca3a0b","impliedFormat":1},{"version":"1c84b46267610a34028edfd0d035509341751262bac1062857f3c8df7aff7153","impliedFormat":1},{"version":"7f138842074d0a40681775af008c8452093b68c383c94de31759e853c6d06b5c","impliedFormat":1},{"version":"a3d541d303ee505053f5dcbf9fafb65cac3d5631037501cd616195863a6c5740","impliedFormat":1},{"version":"8d3c583a07e0c37e876908c2d5da575019f689df8d9fa4c081d99119d53dba22","impliedFormat":1},{"version":"2c828a5405191d006115ab34e191b8474bc6c86ffdc401d1a9864b1b6e088a58","impliedFormat":1},{"version":"e630e5528e899219ae319e83bef54bf3bcb91b01d76861ecf881e8e614b167f0","affectsGlobalScope":true,"impliedFormat":1},{"version":"bcebb922784739bdb34c18ee51095d25a92b560c78ccd2eaacd6bd00f7443d83","impliedFormat":1},{"version":"7ee6ed878c4528215c82b664fe0cfe80e8b4da6c0d4cc80869367868774db8b1","impliedFormat":1},{"version":"b0973c3cbcdc59b37bf477731d468696ecaf442593ec51bab497a613a580fe30","impliedFormat":1},{"version":"4989e92ba5b69b182d2caaea6295af52b7dc73a4f7a2e336a676722884e7139d","affectsGlobalScope":true,"impliedFormat":1},{"version":"0715e4cd28ad471b2a93f3e552ff51a3ae423417a01a10aa1d3bc7c6b95059d6","affectsGlobalScope":true,"impliedFormat":1},{"version":"5153a2fd150e46ce57bb3f8db1318d33f6ad3261ed70ceeff92281c0608c74a3","impliedFormat":1},{"version":"210d54cd652ec0fec8c8916e4af59bb341065576ecda039842f9ffb2e908507c","impliedFormat":1},{"version":"36b03690b628eab08703d63f04eaa89c5df202e5f1edf3989f13ad389cd2c091","impliedFormat":1},{"version":"0effadd232a20498b11308058e334d3339cc5bf8c4c858393e38d9d4c0013dcf","impliedFormat":1},{"version":"25846d43937c672bab7e8195f3d881f93495df712ee901860effc109918938cc","impliedFormat":1},{"version":"4f3fdeba4e28e21aa719c081b8dc8f91d47e12e773389b9d35679c08151c9d37","impliedFormat":1},{"version":"1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff","impliedFormat":1},{"version":"69ee23dd0d215b09907ad30d23f88b7790c93329d1faf31d7835552a10cf7cbf","impliedFormat":1},{"version":"44b8b584a338b190a59f4f6929d072431950c7bd92ec2694821c11bce180c8a5","impliedFormat":1},{"version":"23b89798789dffbd437c0c423f5d02d11f9736aea73d6abf16db4f812ff36eda","impliedFormat":1},{"version":"f69ff39996a61a0dd10f4bce73272b52e8024a4d58b13ab32bf4712909d0a2b7","impliedFormat":1},{"version":"3c4ba1dd9b12ffa284b565063108f2f031d150ea15b8fafbdc17f5d2a07251f3","affectsGlobalScope":true,"impliedFormat":1},{"version":"e10177274a35a9d07c825615340b2fcde2f610f53f3fb40269fd196b4288dda6","impliedFormat":1},{"version":"1422cd9e705adcc09088fda85a900c2b70e3ad36ea85846f68bd1a884cdf4e2b","impliedFormat":1},{"version":"3c13ef48634e7b5012fcf7e8fce7496352c2d779a7201389ca96a2a81ee4314d","impliedFormat":1},{"version":"5d0a25ec910fa36595f85a67ac992d7a53dd4064a1ba6aea1c9f14ab73a023f2","impliedFormat":1},{"version":"a73ae8c0e62103bb9e21bb6538700881bf135b9a8b125b857ec68edfa0da4ed3","affectsGlobalScope":true,"impliedFormat":1},{"version":"e1c1b2fbe236bf7ee3e342eeae7e20efb8988a0ac7da1cbbfa2c1f66b76c3423","affectsGlobalScope":true,"impliedFormat":1},{"version":"868831cab82b65dfe1d68180e898af1f2101e89ba9b754d1db6fb8cc2fac1921","impliedFormat":1},{"version":"0fe8985a28f82c450a04a6edf1279d7181c0893f37da7d2a27f8efd4fd5edb03","impliedFormat":1},{"version":"e59a892d87e72733e2a9ca21611b9beb52977be2696c7ba4b216cbbb9a48f5aa","impliedFormat":1},{"version":"52120bb7e4583612225bdf08e7c12559548170f11e660d33a33623bae9bbdbba","affectsGlobalScope":true,"impliedFormat":1},{"version":"8a300fa9b698845a1f9c41ecbe2c5966634582a8e2020d51abcace9b55aa959e","impliedFormat":1},{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a6dd3dba8e665ac43d279e0fdf5219edda0eed69b5e9a5061f46cd6a65c4f7a1","impliedFormat":1}],"root":[227,228,230,242],"options":{"composite":true,"declarationMap":true,"emitDeclarationOnly":false,"importHelpers":true,"module":199,"noEmitOnError":true,"noFallthroughCasesInSwitch":true,"noImplicitOverride":true,"noImplicitReturns":true,"noUnusedLocals":false,"noUnusedParameters":false,"outDir":"./","rootDir":"../src","skipLibCheck":true,"strict":true,"target":9,"tsBuildInfoFile":"./tsconfig.lib.tsbuildinfo"},"referencedMap":[[134,1],[135,1],[136,2],[243,3],[244,3],[246,4],[247,5],[248,6],[249,7],[250,8],[251,9],[252,10],[253,11],[254,12],[255,13],[256,13],[258,14],[257,15],[259,14],[260,16],[261,17],[245,18],[295,1],[262,19],[263,20],[264,21],[296,22],[265,23],[266,24],[267,25],[268,26],[269,27],[270,28],[271,29],[272,30],[273,31],[274,32],[275,32],[276,33],[277,34],[279,35],[278,36],[280,37],[281,38],[282,1],[283,39],[284,40],[285,41],[286,42],[287,43],[288,44],[289,45],[290,46],[291,47],[292,48],[293,49],[294,50],[138,1],[140,51],[207,52],[137,53],[202,52],[141,1],[139,54],[208,55],[196,56],[203,57],[142,58],[55,59],[54,1],[52,1],[53,1],[9,1],[10,1],[12,1],[11,1],[2,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[19,1],[20,1],[3,1],[21,1],[22,1],[4,1],[23,1],[27,1],[24,1],[25,1],[26,1],[28,1],[29,1],[30,1],[5,1],[31,1],[32,1],[33,1],[34,1],[6,1],[38,1],[35,1],[36,1],[37,1],[39,1],[7,1],[40,1],[45,1],[46,1],[41,1],[42,1],[43,1],[44,1],[8,1],[50,1],[47,1],[48,1],[49,1],[1,1],[51,1],[228,60],[230,61],[242,62],[227,63],[226,64],[168,65],[169,66],[195,67],[225,68],[171,1],[170,69],[164,65],[167,70],[166,67],[165,1],[193,69],[194,71],[172,69],[163,72],[145,73],[144,1],[132,1],[131,1],[133,74],[128,75],[130,1],[76,1],[158,1],[129,1],[161,76],[156,77],[160,78],[159,1],[157,1],[127,79],[75,1],[153,69],[150,69],[152,69],[147,69],[148,69],[155,80],[151,1],[146,69],[154,69],[149,69],[162,81],[143,82],[221,83],[217,84],[216,85],[218,83],[223,86],[222,85],[219,65],[220,83],[209,87],[197,88],[199,88],[214,89],[211,90],[200,84],[212,84],[201,88],[204,91],[198,88],[210,92],[205,84],[206,84],[213,93],[224,94],[215,82],[126,95],[125,96],[77,97],[58,98],[57,99],[56,98],[63,100],[62,101],[70,1],[60,102],[59,102],[69,101],[71,103],[67,1],[61,1],[72,104],[64,1],[68,101],[73,105],[66,100],[65,106],[74,107],[124,108],[120,109],[122,110],[121,1],[123,111],[78,112],[192,113],[190,114],[189,114],[191,115],[188,1],[229,67],[238,116],[233,117],[232,117],[235,117],[234,117],[231,1],[236,118],[241,119],[240,1],[237,116],[239,120],[187,121],[175,122],[173,1],[176,123],[174,109],[180,1],[181,124],[177,1],[179,125],[178,1],[182,1],[184,126],[183,1],[185,127],[186,128],[84,1],[87,129],[86,130],[89,129],[91,131],[90,130],[88,129],[92,1],[85,132],[95,133],[94,1],[93,1],[80,130],[79,1],[83,134],[81,1],[82,135],[112,1],[109,122],[113,122],[119,136],[111,122],[108,122],[114,122],[116,1],[110,122],[117,122],[115,122],[107,137],[118,138],[100,139],[101,140],[99,1],[103,141],[104,142],[102,1],[106,143],[98,144],[96,1],[97,1],[105,1]],"latestChangedDtsFile":"./server.d.ts","version":"5.8.3"}
package/dist/types.cjs ADDED
@@ -0,0 +1 @@
1
+ "use strict";var r=Object.defineProperty;var o=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var l=(n,e)=>{for(var t in e)r(n,t,{get:e[t],enumerable:!0})},g=(n,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of u(e))!a.call(n,s)&&s!==t&&r(n,s,{get:()=>e[s],enumerable:!(i=o(e,s))||i.enumerable});return n};var m=n=>g(r({},"__esModule",{value:!0}),n);var c={};l(c,{AUTH_LOCALS_KEY:()=>p});module.exports=m(c);var p="auth";
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Shared types for the Fluixi ↔ Better Auth bindings.
3
+ *
4
+ * We consume Better Auth through STRUCTURAL interfaces (the minimal shape we call), so
5
+ * `@fluixi/auth` never hard-imports `better-auth` — it stays a peer the app owns, and the
6
+ * bindings tree-shake cleanly. An app's real `betterAuth(...)` instance / `createAuthClient(...)`
7
+ * structurally satisfy `BetterAuthServer` / `BetterAuthClient`.
8
+ */
9
+ /** Where middleware stashes the resolved session on the request locals. */
10
+ export declare const AUTH_LOCALS_KEY = "auth";
11
+ /** Default-ish user shape; apps supply their own via the generic `U`. */
12
+ export interface AuthUser {
13
+ id: string;
14
+ email?: string;
15
+ role?: string;
16
+ [key: string]: unknown;
17
+ }
18
+ export interface AuthSession {
19
+ id?: string;
20
+ expiresAt?: string | number | Date;
21
+ [key: string]: unknown;
22
+ }
23
+ /** The resolved auth state for a request — what lives on `locals.auth`. */
24
+ export interface SessionData<U = AuthUser> {
25
+ user: U | null;
26
+ session: AuthSession | null;
27
+ }
28
+ /** Minimal shape of a Better Auth server instance we call. */
29
+ export interface BetterAuthServer {
30
+ /** Mounts at `/api/auth/*` — handles sign-in/up/out, OAuth callbacks, etc. */
31
+ handler: (request: Request) => Promise<Response>;
32
+ api: {
33
+ getSession: (ctx: {
34
+ headers: Headers;
35
+ }) => Promise<{
36
+ user: unknown;
37
+ session: unknown;
38
+ } | null>;
39
+ };
40
+ }
41
+ /** Minimal shape of a Better Auth client we call (framework-agnostic vanilla client). */
42
+ export interface BetterAuthClient {
43
+ getSession: () => Promise<{
44
+ data: {
45
+ user: unknown;
46
+ session: unknown;
47
+ } | null;
48
+ }>;
49
+ signIn: {
50
+ email: (input: {
51
+ email: string;
52
+ password: string;
53
+ rememberMe?: boolean;
54
+ }) => Promise<unknown>;
55
+ };
56
+ signOut: () => Promise<unknown>;
57
+ }
58
+ declare module '@fluixi/dom' {
59
+ interface RequestLocals {
60
+ auth?: SessionData;
61
+ }
62
+ }
63
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,2EAA2E;AAC3E,eAAO,MAAM,eAAe,SAAS,CAAC;AAEtC,yEAAyE;AACzE,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,WAAW;IAC1B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IACnC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,2EAA2E;AAC3E,MAAM,WAAW,WAAW,CAAC,CAAC,GAAG,QAAQ;IACvC,IAAI,EAAE,CAAC,GAAG,IAAI,CAAC;IACf,OAAO,EAAE,WAAW,GAAG,IAAI,CAAC;CAC7B;AAED,8DAA8D;AAC9D,MAAM,WAAW,gBAAgB;IAC/B,8EAA8E;IAC9E,OAAO,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;IACjD,GAAG,EAAE;QACH,UAAU,EAAE,CAAC,GAAG,EAAE;YAAE,OAAO,EAAE,OAAO,CAAA;SAAE,KAAK,OAAO,CAAC;YAAE,IAAI,EAAE,OAAO,CAAC;YAAC,OAAO,EAAE,OAAO,CAAA;SAAE,GAAG,IAAI,CAAC,CAAC;KAChG,CAAC;CACH;AAED,yFAAyF;AACzF,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE,MAAM,OAAO,CAAC;QAAE,IAAI,EAAE;YAAE,IAAI,EAAE,OAAO,CAAC;YAAC,OAAO,EAAE,OAAO,CAAA;SAAE,GAAG,IAAI,CAAA;KAAE,CAAC,CAAC;IAChF,MAAM,EAAE;QACN,KAAK,EAAE,CAAC,KAAK,EAAE;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,QAAQ,EAAE,MAAM,CAAC;YAAC,UAAU,CAAC,EAAE,OAAO,CAAA;SAAE,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;KAC/F,CAAC;IACF,OAAO,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;CACjC;AAED,OAAO,QAAQ,aAAa,CAAC;IAC3B,UAAU,aAAa;QACrB,IAAI,CAAC,EAAE,WAAW,CAAC;KACpB;CACF"}
package/dist/types.js ADDED
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Shared types for the Fluixi ↔ Better Auth bindings.
3
+ *
4
+ * We consume Better Auth through STRUCTURAL interfaces (the minimal shape we call), so
5
+ * `@fluixi/auth` never hard-imports `better-auth` — it stays a peer the app owns, and the
6
+ * bindings tree-shake cleanly. An app's real `betterAuth(...)` instance / `createAuthClient(...)`
7
+ * structurally satisfy `BetterAuthServer` / `BetterAuthClient`.
8
+ */
9
+ /** Where middleware stashes the resolved session on the request locals. */
10
+ export const AUTH_LOCALS_KEY = 'auth';
package/dist/types.mjs ADDED
@@ -0,0 +1 @@
1
+ var e="auth";export{e as AUTH_LOCALS_KEY};
package/package.json ADDED
@@ -0,0 +1,73 @@
1
+ {
2
+ "name": "@fluixi/auth",
3
+ "version": "1.0.0-alpha.53",
4
+ "private": false,
5
+ "publishConfig": {
6
+ "registry": "https://registry.npmjs.org/",
7
+ "access": "public"
8
+ },
9
+ "description": "Server-first auth for Fluixi — native bindings over Better Auth: authMiddleware, requireUser/Role/Permission (request-context, no token parsing), SSR-seeded useUser/useSession hooks, and protectedRoute.",
10
+ "type": "module",
11
+ "files": [
12
+ "dist",
13
+ "README.md"
14
+ ],
15
+ "exports": {
16
+ "./package.json": "./package.json",
17
+ "./server": {
18
+ "types": "./dist/server.d.ts",
19
+ "import": "./dist/server.mjs",
20
+ "require": "./dist/server.cjs",
21
+ "default": "./dist/server.js"
22
+ },
23
+ "./client": {
24
+ "types": "./dist/client.d.ts",
25
+ "import": "./dist/client.mjs",
26
+ "require": "./dist/client.cjs",
27
+ "default": "./dist/client.js"
28
+ }
29
+ },
30
+ "dependencies": {
31
+ "tslib": "^2.3.0"
32
+ },
33
+ "devDependencies": {
34
+ "@bambiste/mix-builder": "*",
35
+ "cross-env": "^7.0.3",
36
+ "inquirer": "^14.0.2",
37
+ "@fluixi/core": "1.0.0-alpha.53",
38
+ "@fluixi/dom": "1.0.0-alpha.53",
39
+ "@fluixi/reactive": "1.0.0-alpha.53",
40
+ "@fluixi/server": "1.0.0-alpha.53",
41
+ "@fluixi/start": "0.1.0-alpha.43"
42
+ },
43
+ "peerDependencies": {
44
+ "better-auth": ">=1",
45
+ "@fluixi/core": "1.0.0-alpha.53",
46
+ "@fluixi/dom": "1.0.0-alpha.53",
47
+ "@fluixi/reactive": "1.0.0-alpha.53",
48
+ "@fluixi/server": "1.0.0-alpha.53",
49
+ "@fluixi/start": "0.1.0-alpha.43"
50
+ },
51
+ "peerDependenciesMeta": {
52
+ "@fluixi/server": {
53
+ "optional": true
54
+ },
55
+ "@fluixi/start": {
56
+ "optional": true
57
+ },
58
+ "better-auth": {
59
+ "optional": true
60
+ }
61
+ },
62
+ "repository": {
63
+ "type": "git",
64
+ "url": "https://github.com/fluixi/core.git",
65
+ "directory": "packages/auth"
66
+ },
67
+ "scripts": {
68
+ "build:typings": "tsc -p tsconfig.lib.json",
69
+ "build": "pnpm run build:typings && cross-env NODE_ENV=production mix-builder",
70
+ "dev": "tsc -w -p tsconfig.lib.json",
71
+ "test": "vitest run"
72
+ }
73
+ }