@prunellejs/auth 0.0.0-stage → 0.7.2
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 +21 -0
- package/llms.txt +95 -0
- package/package.json +27 -4
- package/src/account.ts +101 -0
- package/src/crypto.ts +130 -0
- package/src/form-messages.ts +58 -0
- package/src/http.ts +214 -0
- package/src/index.ts +635 -0
- package/src/links.ts +178 -0
- package/src/oauth-routes.ts +260 -0
- package/src/oauth.ts +155 -0
- package/src/org-routes.ts +226 -0
- package/src/orgs.ts +403 -0
- package/src/passkey-client.ts +211 -0
- package/src/passkey-routes.ts +220 -0
- package/src/passkeys.ts +422 -0
- package/src/routes.ts +327 -0
- package/src/session-cookie.ts +62 -0
- package/src/session.ts +384 -0
- package/src/sqlite-ext.ts +521 -0
- package/src/sqlite.ts +410 -0
- package/src/store-ext.ts +434 -0
- package/src/store.ts +339 -0
- package/src/totp-routes.ts +144 -0
- package/src/totp.ts +395 -0
- package/src/webauthn-crypto.ts +284 -0
- package/README.md +0 -3
package/src/session.ts
ADDED
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
// Session resolution, sliding renewal, lazy/async locals binding, and sign-in/sign-out session lifecycle.
|
|
2
|
+
|
|
3
|
+
import type { PrunelleLocals, RequestContext, TrustProxy } from 'prunelle/server'
|
|
4
|
+
import type { AuthSession, AuthStore, AuthUser, PublicUser } from './store'
|
|
5
|
+
import { randomToken, sha256Hex } from './crypto'
|
|
6
|
+
import { formatSessionIp, resolveClientIp } from './http'
|
|
7
|
+
import { createSessionCookie } from './session-cookie'
|
|
8
|
+
import { isKnownSyncStore, toPublicUser } from './store'
|
|
9
|
+
|
|
10
|
+
const AsyncFunctionCtor = Object.getPrototypeOf(async () => {}).constructor
|
|
11
|
+
|
|
12
|
+
function defineLocal(locals: PrunelleLocals, key: 'user' | 'session', value: unknown): void {
|
|
13
|
+
if (value === undefined) {
|
|
14
|
+
delete locals[key]
|
|
15
|
+
return
|
|
16
|
+
}
|
|
17
|
+
Object.defineProperty(locals, key, {
|
|
18
|
+
value,
|
|
19
|
+
writable: true,
|
|
20
|
+
enumerable: true,
|
|
21
|
+
configurable: true,
|
|
22
|
+
})
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function isLiveSession(session: AuthSession, absoluteTtlMs: number | undefined): boolean {
|
|
26
|
+
const now = Date.now()
|
|
27
|
+
return session.expiresAt > now && (absoluteTtlMs === undefined || session.createdAt + absoluteTtlMs > now)
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function sweepRenewedMap(renewedAt: Map<string, number>, renewalIntervalMs: number): void {
|
|
31
|
+
if (renewedAt.size === 0)
|
|
32
|
+
return
|
|
33
|
+
const cutoff = Date.now() - Math.max(renewalIntervalMs, 1000)
|
|
34
|
+
for (const [k, ts] of renewedAt) {
|
|
35
|
+
if (ts <= cutoff)
|
|
36
|
+
renewedAt.delete(k)
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function defineLazyLocals<TUser extends AuthUser>(
|
|
41
|
+
ctx: RequestContext,
|
|
42
|
+
read: () => { user: PublicUser<TUser>, session: AuthSession } | undefined,
|
|
43
|
+
): void {
|
|
44
|
+
Object.defineProperties(ctx.locals, {
|
|
45
|
+
user: {
|
|
46
|
+
configurable: true,
|
|
47
|
+
enumerable: false,
|
|
48
|
+
get() {
|
|
49
|
+
return read()?.user
|
|
50
|
+
},
|
|
51
|
+
set(val: PublicUser<TUser> | undefined) {
|
|
52
|
+
defineLocal(ctx.locals, 'user', val)
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
session: {
|
|
56
|
+
configurable: true,
|
|
57
|
+
enumerable: false,
|
|
58
|
+
get() {
|
|
59
|
+
return read()?.session
|
|
60
|
+
},
|
|
61
|
+
set(val: AuthSession | undefined) {
|
|
62
|
+
defineLocal(ctx.locals, 'session', val)
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
})
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function isPromiseLike<T>(value: T | Promise<T>): value is Promise<T> {
|
|
69
|
+
return typeof value === 'object' && value !== null && typeof (value as PromiseLike<T>).then === 'function'
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function hasAsyncStoreMethods<TUser extends AuthUser>(store: AuthStore<TUser>): boolean {
|
|
73
|
+
const methods = [
|
|
74
|
+
store.getSession,
|
|
75
|
+
store.listSessions,
|
|
76
|
+
store.getUserById,
|
|
77
|
+
store.getUserByEmail,
|
|
78
|
+
store.createUser,
|
|
79
|
+
store.createSession,
|
|
80
|
+
store.updateUser,
|
|
81
|
+
store.updateSessionExpiry,
|
|
82
|
+
store.deleteSession,
|
|
83
|
+
store.deleteUser,
|
|
84
|
+
store.exportUser,
|
|
85
|
+
store.deleteUserSessions,
|
|
86
|
+
store.getOAuthAccount,
|
|
87
|
+
store.linkOAuthAccount,
|
|
88
|
+
store.deleteUserOAuthAccounts,
|
|
89
|
+
store.createToken,
|
|
90
|
+
store.consumeToken,
|
|
91
|
+
store.pruneExpired,
|
|
92
|
+
]
|
|
93
|
+
return methods.some(fn => typeof fn === 'function' && fn instanceof AsyncFunctionCtor)
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export interface SessionManagerDeps<TUser extends AuthUser = AuthUser> {
|
|
97
|
+
store: AuthStore<TUser>
|
|
98
|
+
cookieName: string
|
|
99
|
+
acceptLegacyCookie?: boolean | undefined
|
|
100
|
+
sessionTtlMs: number
|
|
101
|
+
/** A session older than this is refused however recently it was used; `undefined` lets renewal go on forever. */
|
|
102
|
+
absoluteTtlMs: number | undefined
|
|
103
|
+
renewalIntervalMs: number
|
|
104
|
+
storeIp: boolean | 'truncate'
|
|
105
|
+
storeUserAgent: boolean
|
|
106
|
+
getTrustProxy: () => TrustProxy
|
|
107
|
+
isSecureCookie: (ctx: RequestContext) => boolean
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export interface SessionManager<TUser extends AuthUser = AuthUser> {
|
|
111
|
+
isAsyncStore(): boolean
|
|
112
|
+
observeAsync<T>(value: T | Promise<T>): T | Promise<T>
|
|
113
|
+
prepareRequest(ctx: RequestContext): Promise<unknown> | undefined
|
|
114
|
+
attachLazy(ctx: RequestContext): void
|
|
115
|
+
resolve(ctx: RequestContext): Promise<{ user: PublicUser<TUser>, session: AuthSession } | undefined>
|
|
116
|
+
createSessionForUser(userId: string, ctx: RequestContext, knownUser?: PublicUser<TUser>): Promise<AuthSession>
|
|
117
|
+
signOut(ctx: RequestContext): Promise<void>
|
|
118
|
+
setResolvedUser(ctx: RequestContext, pub: PublicUser<TUser>): void
|
|
119
|
+
getUser(ctx: { locals: PrunelleLocals }): PublicUser<TUser> | undefined
|
|
120
|
+
getSession(ctx: { locals: PrunelleLocals }): AuthSession | undefined
|
|
121
|
+
sweepRenewedAt(): void
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export function createSessionManager<TUser extends AuthUser = AuthUser>(deps: SessionManagerDeps<TUser>): SessionManager<TUser> {
|
|
125
|
+
const { store, cookieName, acceptLegacyCookie, sessionTtlMs, absoluteTtlMs, renewalIntervalMs, storeIp, storeUserAgent, getTrustProxy, isSecureCookie } = deps
|
|
126
|
+
|
|
127
|
+
let storeMode: 'unknown' | 'sync' | 'async' = isKnownSyncStore(store)
|
|
128
|
+
? 'sync'
|
|
129
|
+
: (hasAsyncStoreMethods(store) ? 'async' : 'unknown')
|
|
130
|
+
const resolvedContexts = new WeakSet<object>()
|
|
131
|
+
const resolvedUsers = new WeakMap<object, PublicUser<TUser>>()
|
|
132
|
+
const pendingContexts = new WeakMap<object, Promise<{ user: PublicUser<TUser>, session: AuthSession } | undefined>>()
|
|
133
|
+
const renewedAt = new Map<string, number>()
|
|
134
|
+
const sessionCookie = createSessionCookie(cookieName, isSecureCookie, acceptLegacyCookie === true)
|
|
135
|
+
const { read: readToken, clear: clearCookies } = sessionCookie
|
|
136
|
+
|
|
137
|
+
// This request has no session (any more): its locals stay empty, and the cookie goes when it was refused.
|
|
138
|
+
function endResolution(ctx: RequestContext, clearCookie = false): void {
|
|
139
|
+
resolvedContexts.add(ctx.locals)
|
|
140
|
+
clearLazyLocals(ctx.locals)
|
|
141
|
+
if (clearCookie)
|
|
142
|
+
clearCookies(ctx)
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
function observeAsync<T>(value: T | Promise<T>): T | Promise<T> {
|
|
146
|
+
if (isPromiseLike(value))
|
|
147
|
+
storeMode = 'async'
|
|
148
|
+
else if (storeMode === 'unknown')
|
|
149
|
+
storeMode = 'sync'
|
|
150
|
+
return value
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
function setResolvedUser(ctx: RequestContext, pub: PublicUser<TUser>): void {
|
|
154
|
+
resolvedUsers.set(ctx.locals, pub)
|
|
155
|
+
defineLocal(ctx.locals, 'user', pub)
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
function setResolvedSession(ctx: RequestContext, session: AuthSession): void {
|
|
159
|
+
defineLocal(ctx.locals, 'session', session)
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
function clearLazyLocals(locals: PrunelleLocals): void {
|
|
163
|
+
resolvedUsers.delete(locals)
|
|
164
|
+
delete locals.user
|
|
165
|
+
delete locals.session
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
const sweepRenewedAt = (): void => sweepRenewedMap(renewedAt, renewalIntervalMs)
|
|
169
|
+
|
|
170
|
+
function maybeRenewSession(ctx: RequestContext, rawToken: string, tokenHash: string, session: AuthSession): void | Promise<void> {
|
|
171
|
+
const now = Date.now()
|
|
172
|
+
sessionCookie.moveLegacy(ctx, rawToken, session.expiresAt)
|
|
173
|
+
if (session.expiresAt - now >= sessionTtlMs / 2)
|
|
174
|
+
return
|
|
175
|
+
const nextExpiry = Math.min(now + sessionTtlMs, absoluteTtlMs === undefined ? Infinity : session.createdAt + absoluteTtlMs)
|
|
176
|
+
if (nextExpiry <= session.expiresAt)
|
|
177
|
+
return
|
|
178
|
+
const prev = renewedAt.get(tokenHash)
|
|
179
|
+
if (prev !== undefined && now - prev < renewalIntervalMs)
|
|
180
|
+
return
|
|
181
|
+
if (renewedAt.size >= 10_000)
|
|
182
|
+
sweepRenewedAt()
|
|
183
|
+
renewedAt.set(tokenHash, now)
|
|
184
|
+
session.expiresAt = nextExpiry
|
|
185
|
+
sessionCookie.set(ctx, rawToken, nextExpiry)
|
|
186
|
+
return observeAsync(store.updateSessionExpiry(tokenHash, nextExpiry))
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
function finalizeResolved(ctx: RequestContext, rawToken: string, tokenHash: string, session: AuthSession, userRecord: TUser): { user: PublicUser<TUser>, session: AuthSession } {
|
|
190
|
+
const pub = toPublicUser(userRecord)
|
|
191
|
+
resolvedContexts.add(ctx.locals)
|
|
192
|
+
setResolvedUser(ctx, pub)
|
|
193
|
+
setResolvedSession(ctx, session)
|
|
194
|
+
const renew = maybeRenewSession(ctx, rawToken, tokenHash, session)
|
|
195
|
+
if (isPromiseLike(renew))
|
|
196
|
+
void renew.catch(() => {})
|
|
197
|
+
return { user: pub, session }
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
async function resolveRequestSession(
|
|
201
|
+
ctx: RequestContext,
|
|
202
|
+
preloadedSession?: Promise<AuthSession | undefined>,
|
|
203
|
+
preloadedUser?: Promise<TUser | undefined>,
|
|
204
|
+
): Promise<{ user: PublicUser<TUser>, session: AuthSession } | undefined> {
|
|
205
|
+
if (resolvedContexts.has(ctx.locals)) {
|
|
206
|
+
const user = resolvedUsers.get(ctx.locals) ?? (ctx.locals.user as PublicUser<TUser> | undefined)
|
|
207
|
+
const session = ctx.locals.session
|
|
208
|
+
return user && session ? { user, session } : undefined
|
|
209
|
+
}
|
|
210
|
+
const inFlight = pendingContexts.get(ctx.locals)
|
|
211
|
+
if (inFlight !== undefined)
|
|
212
|
+
return inFlight
|
|
213
|
+
|
|
214
|
+
const run = (async (): Promise<{ user: PublicUser<TUser>, session: AuthSession } | undefined> => {
|
|
215
|
+
const rawToken = readToken(ctx)
|
|
216
|
+
if (!rawToken) {
|
|
217
|
+
endResolution(ctx)
|
|
218
|
+
return undefined
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
const tokenHash = sha256Hex(rawToken)
|
|
222
|
+
const session = preloadedSession !== undefined ? await preloadedSession : await observeAsync(store.getSession(tokenHash))
|
|
223
|
+
if (!session || !isLiveSession(session, absoluteTtlMs)) {
|
|
224
|
+
endResolution(ctx, true)
|
|
225
|
+
if (session)
|
|
226
|
+
await observeAsync(store.deleteSession(tokenHash))
|
|
227
|
+
return undefined
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
const userRecord = preloadedUser !== undefined ? await preloadedUser : await observeAsync(store.getUserById(session.userId))
|
|
231
|
+
if (!userRecord) {
|
|
232
|
+
endResolution(ctx, true)
|
|
233
|
+
await observeAsync(store.deleteSession(tokenHash))
|
|
234
|
+
return undefined
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
const pub = toPublicUser(userRecord)
|
|
238
|
+
resolvedContexts.add(ctx.locals)
|
|
239
|
+
setResolvedUser(ctx, pub)
|
|
240
|
+
setResolvedSession(ctx, session)
|
|
241
|
+
await maybeRenewSession(ctx, rawToken, tokenHash, session)
|
|
242
|
+
return { user: pub, session }
|
|
243
|
+
})()
|
|
244
|
+
|
|
245
|
+
pendingContexts.set(ctx.locals, run)
|
|
246
|
+
try {
|
|
247
|
+
return await run
|
|
248
|
+
}
|
|
249
|
+
finally {
|
|
250
|
+
pendingContexts.delete(ctx.locals)
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
type SyncResolveResult =
|
|
255
|
+
| { pending: Promise<{ user: PublicUser<TUser>, session: AuthSession } | undefined> }
|
|
256
|
+
| { pending?: undefined, resolved: { user: PublicUser<TUser>, session: AuthSession } | undefined }
|
|
257
|
+
|
|
258
|
+
function tryResolveSync(ctx: RequestContext): SyncResolveResult {
|
|
259
|
+
if (resolvedContexts.has(ctx.locals)) {
|
|
260
|
+
const user = resolvedUsers.get(ctx.locals) ?? (ctx.locals.user as PublicUser<TUser> | undefined)
|
|
261
|
+
const session = ctx.locals.session
|
|
262
|
+
return { resolved: user && session ? { user, session } : undefined }
|
|
263
|
+
}
|
|
264
|
+
const rawToken = readToken(ctx)
|
|
265
|
+
if (!rawToken) {
|
|
266
|
+
endResolution(ctx)
|
|
267
|
+
return { resolved: undefined }
|
|
268
|
+
}
|
|
269
|
+
const tokenHash = sha256Hex(rawToken)
|
|
270
|
+
const maybeSession = observeAsync(store.getSession(tokenHash))
|
|
271
|
+
if (isPromiseLike(maybeSession))
|
|
272
|
+
return { pending: resolveRequestSession(ctx, maybeSession) }
|
|
273
|
+
if (!maybeSession || !isLiveSession(maybeSession, absoluteTtlMs)) {
|
|
274
|
+
endResolution(ctx, true)
|
|
275
|
+
if (maybeSession)
|
|
276
|
+
void Promise.resolve(observeAsync(store.deleteSession(tokenHash))).catch(() => {})
|
|
277
|
+
return { resolved: undefined }
|
|
278
|
+
}
|
|
279
|
+
const maybeUser = observeAsync(store.getUserById(maybeSession.userId))
|
|
280
|
+
if (isPromiseLike(maybeUser))
|
|
281
|
+
return { pending: resolveRequestSession(ctx, Promise.resolve(maybeSession), maybeUser) }
|
|
282
|
+
if (!maybeUser) {
|
|
283
|
+
endResolution(ctx, true)
|
|
284
|
+
void Promise.resolve(observeAsync(store.deleteSession(tokenHash))).catch(() => {})
|
|
285
|
+
return { resolved: undefined }
|
|
286
|
+
}
|
|
287
|
+
return { resolved: finalizeResolved(ctx, rawToken, tokenHash, maybeSession, maybeUser) }
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
function readSyncLazy(ctx: RequestContext): { user: PublicUser<TUser>, session: AuthSession } | undefined {
|
|
291
|
+
const out = tryResolveSync(ctx)
|
|
292
|
+
if (out.pending !== undefined) {
|
|
293
|
+
void out.pending.catch(() => {})
|
|
294
|
+
return undefined
|
|
295
|
+
}
|
|
296
|
+
return out.resolved
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
function attachLazy(ctx: RequestContext): void {
|
|
300
|
+
if (resolvedContexts.has(ctx.locals) || !readToken(ctx))
|
|
301
|
+
return
|
|
302
|
+
defineLazyLocals(ctx, () => readSyncLazy(ctx))
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
function prepareRequest(ctx: RequestContext): Promise<unknown> | undefined {
|
|
306
|
+
if (!readToken(ctx))
|
|
307
|
+
return undefined
|
|
308
|
+
if (storeMode === 'async')
|
|
309
|
+
return resolveRequestSession(ctx)
|
|
310
|
+
if (storeMode === 'unknown')
|
|
311
|
+
return tryResolveSync(ctx).pending
|
|
312
|
+
attachLazy(ctx)
|
|
313
|
+
return undefined
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
async function createSessionForUser(userId: string, ctx: RequestContext, knownUser?: PublicUser<TUser>): Promise<AuthSession> {
|
|
317
|
+
// Revoke any prior session cookie in the store when opening a new session on the same browser.
|
|
318
|
+
const prevToken = readToken(ctx)
|
|
319
|
+
if (prevToken) {
|
|
320
|
+
const prevHash = sha256Hex(prevToken)
|
|
321
|
+
renewedAt.delete(prevHash)
|
|
322
|
+
await observeAsync(store.deleteSession(prevHash))
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
const rawToken = randomToken(32)
|
|
326
|
+
const now = Date.now()
|
|
327
|
+
const recordedIp = formatSessionIp(resolveClientIp(ctx, getTrustProxy()), storeIp)
|
|
328
|
+
const recordedUa = storeUserAgent ? (ctx.request.headers.get('user-agent') ?? undefined) : undefined
|
|
329
|
+
const session: AuthSession = {
|
|
330
|
+
id: sha256Hex(rawToken),
|
|
331
|
+
userId,
|
|
332
|
+
createdAt: now,
|
|
333
|
+
expiresAt: absoluteTtlMs === undefined ? now + sessionTtlMs : now + Math.min(sessionTtlMs, absoluteTtlMs),
|
|
334
|
+
...(recordedUa !== undefined ? { userAgent: recordedUa } : {}),
|
|
335
|
+
...(recordedIp !== undefined ? { ip: recordedIp } : {}),
|
|
336
|
+
}
|
|
337
|
+
await observeAsync(store.createSession(session))
|
|
338
|
+
sessionCookie.set(ctx, rawToken, session.expiresAt)
|
|
339
|
+
resolvedContexts.delete(ctx.locals)
|
|
340
|
+
resolvedUsers.delete(ctx.locals)
|
|
341
|
+
delete ctx.locals.user
|
|
342
|
+
setResolvedSession(ctx, session)
|
|
343
|
+
const pub = knownUser ?? await (async () => {
|
|
344
|
+
const rec = await observeAsync(store.getUserById(userId))
|
|
345
|
+
return rec ? toPublicUser(rec) : undefined
|
|
346
|
+
})()
|
|
347
|
+
if (pub !== undefined) {
|
|
348
|
+
resolvedContexts.add(ctx.locals)
|
|
349
|
+
setResolvedUser(ctx, pub)
|
|
350
|
+
}
|
|
351
|
+
return session
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
async function signOut(ctx: RequestContext): Promise<void> {
|
|
355
|
+
const rawToken = readToken(ctx)
|
|
356
|
+
if (rawToken) {
|
|
357
|
+
const tokenHash = sha256Hex(rawToken)
|
|
358
|
+
renewedAt.delete(tokenHash)
|
|
359
|
+
await observeAsync(store.deleteSession(tokenHash))
|
|
360
|
+
}
|
|
361
|
+
endResolution(ctx, true)
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
return {
|
|
365
|
+
isAsyncStore: () => storeMode === 'async',
|
|
366
|
+
observeAsync,
|
|
367
|
+
prepareRequest,
|
|
368
|
+
attachLazy,
|
|
369
|
+
resolve: ctx => resolveRequestSession(ctx),
|
|
370
|
+
createSessionForUser,
|
|
371
|
+
signOut,
|
|
372
|
+
setResolvedUser,
|
|
373
|
+
getUser(ctx) {
|
|
374
|
+
const cached = resolvedUsers.get(ctx.locals)
|
|
375
|
+
if (cached !== undefined)
|
|
376
|
+
return cached
|
|
377
|
+
return ctx.locals.user as PublicUser<TUser> | undefined
|
|
378
|
+
},
|
|
379
|
+
getSession(ctx) {
|
|
380
|
+
return ctx.locals.session
|
|
381
|
+
},
|
|
382
|
+
sweepRenewedAt,
|
|
383
|
+
}
|
|
384
|
+
}
|