wcz-test 6.7.3 → 6.7.5
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/dist/{chunk-6E3FH46P.js → chunk-2ROTNT7W.js} +2 -1
- package/dist/chunk-2ROTNT7W.js.map +1 -0
- package/dist/{chunk-Y2SJVB7N.js → chunk-MIVD2XWB.js} +2 -2
- package/dist/client-utils.d.ts +74 -72
- package/dist/client-utils.js +1 -1
- package/dist/components.js +2 -2
- package/dist/hooks.d.ts +29 -1
- package/dist/hooks.js +140 -30
- package/dist/hooks.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/queries.js +2 -2
- package/dist/server-utils.js +1 -1
- package/dist/server-utils.js.map +1 -1
- package/dist/utils.js +1 -1
- package/dist/vite.d.ts +2 -11
- package/dist/vite.js +38 -11
- package/dist/vite.js.map +1 -1
- package/package.json +2 -2
- package/dist/chunk-6E3FH46P.js.map +0 -1
- /package/dist/{chunk-Y2SJVB7N.js.map → chunk-MIVD2XWB.js.map} +0 -0
package/dist/queries.js
CHANGED
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
useOpenFile,
|
|
9
9
|
useUpdateFileMeta,
|
|
10
10
|
useUploadFile
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-MIVD2XWB.js";
|
|
12
12
|
import {
|
|
13
13
|
ApprovalStatus,
|
|
14
14
|
ApprovalStepResult
|
|
@@ -17,7 +17,7 @@ import "./chunk-TME53DAF.js";
|
|
|
17
17
|
import {
|
|
18
18
|
httpClient,
|
|
19
19
|
toKebabCase
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-2ROTNT7W.js";
|
|
21
21
|
import {
|
|
22
22
|
clientEnv
|
|
23
23
|
} from "./chunk-DXXZZHAK.js";
|
package/dist/server-utils.js
CHANGED
|
@@ -19,7 +19,7 @@ import { betterAuth } from "better-auth";
|
|
|
19
19
|
import { drizzleAdapter } from "better-auth/adapters/drizzle";
|
|
20
20
|
import { tanstackStartCookies } from "better-auth/tanstack-start";
|
|
21
21
|
|
|
22
|
-
// src/lib/db/
|
|
22
|
+
// src/lib/db/schemas/auth.ts
|
|
23
23
|
import { boolean, pgTable, text, timestamp } from "drizzle-orm/pg-core";
|
|
24
24
|
var user = pgTable("user", {
|
|
25
25
|
id: text("id").primaryKey(),
|
package/dist/server-utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/server-utils.ts","../src/lib/db/index.ts","../src/lib/auth/auth.ts","../src/lib/db/
|
|
1
|
+
{"version":3,"sources":["../src/server-utils.ts","../src/lib/db/index.ts","../src/lib/auth/auth.ts","../src/lib/db/schemas/auth.ts"],"sourcesContent":["export { Pool } from \"pg\";\r\nexport { db } from \"./lib/db/index\";\r\nexport { auth } from \"./lib/auth/auth\";\r\n","import { drizzle } from \"drizzle-orm/node-postgres\";\r\nimport { Pool } from \"pg\";\r\nimport { serverEnv } from \"~/env\";\r\n\r\nconst pool: Pool = new Pool({\r\n connectionString: serverEnv.DATABASE_URL,\r\n});\r\n\r\nexport const db = drizzle(pool);","import { betterAuth } from \"better-auth\";\r\nimport { drizzleAdapter } from \"better-auth/adapters/drizzle\";\r\nimport { tanstackStartCookies } from \"better-auth/tanstack-start\";\r\nimport { db } from \"../db\";\r\nimport { account, session, user, verification } from \"../db/schemas/auth\";\r\nimport { serverEnv } from \"~/env\";\r\n\r\nexport const auth = betterAuth({\r\n database: drizzleAdapter(db, {\r\n provider: \"pg\",\r\n schema: {\r\n user,\r\n session,\r\n account,\r\n verification\r\n }\r\n }),\r\n session: {\r\n cookieCache: {\r\n enabled: true,\r\n maxAge: 5 * 60,\r\n },\r\n },\r\n socialProviders: {\r\n microsoft: {\r\n clientId: serverEnv.MICROSOFT_CLIENT_ID,\r\n clientSecret: serverEnv.MICROSOFT_CLIENT_SECRET\r\n }\r\n },\r\n plugins: [tanstackStartCookies()]\r\n});\r\n","import { boolean, pgTable, text, timestamp } from \"drizzle-orm/pg-core\";\r\n\r\nexport const user = pgTable(\"user\", {\r\n id: text(\"id\").primaryKey(),\r\n name: text(\"name\").notNull(),\r\n email: text(\"email\").notNull().unique(),\r\n emailVerified: boolean(\"email_verified\").default(false).notNull(),\r\n image: text(\"image\"),\r\n createdAt: timestamp(\"created_at\").defaultNow().notNull(),\r\n updatedAt: timestamp(\"updated_at\")\r\n .defaultNow()\r\n .$onUpdate(() => /* @__PURE__ */ new Date())\r\n .notNull(),\r\n});\r\n\r\nexport const session = pgTable(\"session\", {\r\n id: text(\"id\").primaryKey(),\r\n expiresAt: timestamp(\"expires_at\").notNull(),\r\n token: text(\"token\").notNull().unique(),\r\n createdAt: timestamp(\"created_at\").defaultNow().notNull(),\r\n updatedAt: timestamp(\"updated_at\")\r\n .$onUpdate(() => /* @__PURE__ */ new Date())\r\n .notNull(),\r\n ipAddress: text(\"ip_address\"),\r\n userAgent: text(\"user_agent\"),\r\n userId: text(\"user_id\")\r\n .notNull()\r\n .references(() => user.id, { onDelete: \"cascade\" }),\r\n});\r\n\r\nexport const account = pgTable(\"account\", {\r\n id: text(\"id\").primaryKey(),\r\n accountId: text(\"account_id\").notNull(),\r\n providerId: text(\"provider_id\").notNull(),\r\n userId: text(\"user_id\")\r\n .notNull()\r\n .references(() => user.id, { onDelete: \"cascade\" }),\r\n accessToken: text(\"access_token\"),\r\n refreshToken: text(\"refresh_token\"),\r\n idToken: text(\"id_token\"),\r\n accessTokenExpiresAt: timestamp(\"access_token_expires_at\"),\r\n refreshTokenExpiresAt: timestamp(\"refresh_token_expires_at\"),\r\n scope: text(\"scope\"),\r\n password: text(\"password\"),\r\n createdAt: timestamp(\"created_at\").defaultNow().notNull(),\r\n updatedAt: timestamp(\"updated_at\")\r\n .$onUpdate(() => /* @__PURE__ */ new Date())\r\n .notNull(),\r\n});\r\n\r\nexport const verification = pgTable(\"verification\", {\r\n id: text(\"id\").primaryKey(),\r\n identifier: text(\"identifier\").notNull(),\r\n value: text(\"value\").notNull(),\r\n expiresAt: timestamp(\"expires_at\").notNull(),\r\n createdAt: timestamp(\"created_at\").defaultNow().notNull(),\r\n updatedAt: timestamp(\"updated_at\")\r\n .defaultNow()\r\n .$onUpdate(() => /* @__PURE__ */ new Date())\r\n .notNull(),\r\n});\r\n"],"mappings":";;;;;;AAAA,SAAS,QAAAA,aAAY;;;ACArB,SAAS,eAAe;AACxB,SAAS,YAAY;AAGrB,IAAM,OAAa,IAAI,KAAK;AAAA,EACxB,kBAAkB,UAAU;AAChC,CAAC;AAEM,IAAM,KAAK,QAAQ,IAAI;;;ACR9B,SAAS,kBAAkB;AAC3B,SAAS,sBAAsB;AAC/B,SAAS,4BAA4B;;;ACFrC,SAAS,SAAS,SAAS,MAAM,iBAAiB;AAE3C,IAAM,OAAO,QAAQ,QAAQ;AAAA,EAClC,IAAI,KAAK,IAAI,EAAE,WAAW;AAAA,EAC1B,MAAM,KAAK,MAAM,EAAE,QAAQ;AAAA,EAC3B,OAAO,KAAK,OAAO,EAAE,QAAQ,EAAE,OAAO;AAAA,EACtC,eAAe,QAAQ,gBAAgB,EAAE,QAAQ,KAAK,EAAE,QAAQ;AAAA,EAChE,OAAO,KAAK,OAAO;AAAA,EACnB,WAAW,UAAU,YAAY,EAAE,WAAW,EAAE,QAAQ;AAAA,EACxD,WAAW,UAAU,YAAY,EAC9B,WAAW,EACX,UAAU,MAAsB,oBAAI,KAAK,CAAC,EAC1C,QAAQ;AACb,CAAC;AAEM,IAAM,UAAU,QAAQ,WAAW;AAAA,EACxC,IAAI,KAAK,IAAI,EAAE,WAAW;AAAA,EAC1B,WAAW,UAAU,YAAY,EAAE,QAAQ;AAAA,EAC3C,OAAO,KAAK,OAAO,EAAE,QAAQ,EAAE,OAAO;AAAA,EACtC,WAAW,UAAU,YAAY,EAAE,WAAW,EAAE,QAAQ;AAAA,EACxD,WAAW,UAAU,YAAY,EAC9B,UAAU,MAAsB,oBAAI,KAAK,CAAC,EAC1C,QAAQ;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AAA,IACzB,UAAU;AAAA,IACV,QAAQ;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ;AAAA,EACJ,CAAC;AAAA,EACD,SAAS;AAAA,IACL,aAAa;AAAA,MACT,SAAS;AAAA,MACT,QAAQ,IAAI;AAAA,IAChB;AAAA,EACJ;AAAA,EACA,iBAAiB;AAAA,IACb,WAAW;AAAA,MACP,UAAU,UAAU;AAAA,MACpB,cAAc,UAAU;AAAA,IAC5B;AAAA,EACJ;AAAA,EACA,SAAS,CAAC,qBAAqB,CAAC;AACpC,CAAC;","names":["Pool"]}
|
package/dist/utils.js
CHANGED
package/dist/vite.d.ts
CHANGED
|
@@ -1,14 +1,5 @@
|
|
|
1
|
-
import { Resource } from 'i18next';
|
|
2
1
|
import { Plugin } from 'vite';
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
en: T[keyof T];
|
|
6
|
-
};
|
|
7
|
-
interface ViteLayoutOptions<T extends Resource> {
|
|
8
|
-
i18n: {
|
|
9
|
-
resources: RequireEn<T>;
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
declare function viteLayout<T extends Resource>({ i18n }: ViteLayoutOptions<T>): Plugin;
|
|
3
|
+
declare function viteWczLayout(): Plugin;
|
|
13
4
|
|
|
14
|
-
export {
|
|
5
|
+
export { viteWczLayout };
|
package/dist/vite.js
CHANGED
|
@@ -1,32 +1,59 @@
|
|
|
1
1
|
import "./chunk-5WRI5ZAA.js";
|
|
2
2
|
|
|
3
3
|
// src/lib/vite-plugin.ts
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
function
|
|
4
|
+
import fs from "fs";
|
|
5
|
+
import path from "path";
|
|
6
|
+
function viteWczLayout() {
|
|
7
|
+
const virtualModuleId = "virtual:wcz-layout";
|
|
8
|
+
const resolvedVirtualModuleId = "\0" + virtualModuleId;
|
|
9
|
+
let localesPath;
|
|
7
10
|
return {
|
|
8
|
-
name: "vite:layout",
|
|
11
|
+
name: "vite:wcz-layout",
|
|
9
12
|
enforce: "pre",
|
|
13
|
+
configResolved(resolvedConfig) {
|
|
14
|
+
localesPath = path.resolve(resolvedConfig.root, "src/locales");
|
|
15
|
+
},
|
|
10
16
|
config() {
|
|
11
17
|
return {
|
|
12
18
|
optimizeDeps: {
|
|
13
|
-
exclude: [
|
|
19
|
+
exclude: [virtualModuleId]
|
|
14
20
|
}
|
|
15
21
|
};
|
|
16
22
|
},
|
|
17
23
|
resolveId(id) {
|
|
18
|
-
if (id ===
|
|
24
|
+
if (id === virtualModuleId) return resolvedVirtualModuleId;
|
|
19
25
|
return null;
|
|
20
26
|
},
|
|
21
27
|
load(id) {
|
|
22
|
-
if (id !==
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
28
|
+
if (id !== resolvedVirtualModuleId) return null;
|
|
29
|
+
if (!fs.existsSync(localesPath)) {
|
|
30
|
+
fs.mkdirSync(localesPath, { recursive: true });
|
|
31
|
+
}
|
|
32
|
+
const enPath = path.join(localesPath, "en.json");
|
|
33
|
+
if (!fs.existsSync(enPath)) {
|
|
34
|
+
fs.writeFileSync(enPath, JSON.stringify({}));
|
|
35
|
+
}
|
|
36
|
+
const files = fs.readdirSync(localesPath);
|
|
37
|
+
const jsonFiles = files.filter((f) => f.endsWith(".json"));
|
|
38
|
+
const resources = {};
|
|
39
|
+
for (const file of jsonFiles) {
|
|
40
|
+
const lang = path.basename(file, ".json");
|
|
41
|
+
const filePath = path.join(localesPath, file);
|
|
42
|
+
try {
|
|
43
|
+
const content = fs.readFileSync(filePath, "utf-8");
|
|
44
|
+
const translations = JSON.parse(content);
|
|
45
|
+
resources[lang] = { translation: translations };
|
|
46
|
+
} catch (error) {
|
|
47
|
+
console.error(`[vite:layout] Error parsing ${file}:`, error);
|
|
48
|
+
resources[lang] = { translation: {} };
|
|
49
|
+
}
|
|
50
|
+
this.addWatchFile(filePath);
|
|
51
|
+
}
|
|
52
|
+
return `export const resources = ${JSON.stringify(resources)};`;
|
|
26
53
|
}
|
|
27
54
|
};
|
|
28
55
|
}
|
|
29
56
|
export {
|
|
30
|
-
|
|
57
|
+
viteWczLayout
|
|
31
58
|
};
|
|
32
59
|
//# sourceMappingURL=vite.js.map
|
package/dist/vite.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/lib/vite-plugin.ts"],"sourcesContent":["import type { Resource } from \"i18next\";\r\nimport type { Plugin } from \"vite\";\r\n\r\
|
|
1
|
+
{"version":3,"sources":["../src/lib/vite-plugin.ts"],"sourcesContent":["import fs from \"node:fs\";\r\nimport path from \"node:path\";\r\nimport type { Resource } from \"i18next\";\r\nimport type { Plugin } from \"vite\";\r\n\r\nexport function viteWczLayout(): Plugin {\r\n const virtualModuleId = \"virtual:wcz-layout\";\r\n const resolvedVirtualModuleId = \"\\0\" + virtualModuleId;\r\n\r\n let localesPath: string;\r\n\r\n return {\r\n name: \"vite:wcz-layout\",\r\n enforce: \"pre\",\r\n configResolved(resolvedConfig) {\r\n localesPath = path.resolve(resolvedConfig.root, \"src/locales\");\r\n },\r\n config() {\r\n return {\r\n optimizeDeps: {\r\n exclude: [virtualModuleId],\r\n },\r\n };\r\n },\r\n resolveId(id) {\r\n if (id === virtualModuleId) return resolvedVirtualModuleId;\r\n return null;\r\n },\r\n load(id) {\r\n if (id !== resolvedVirtualModuleId) return null;\r\n\r\n if (!fs.existsSync(localesPath)) {\r\n fs.mkdirSync(localesPath, { recursive: true });\r\n }\r\n\r\n const enPath = path.join(localesPath, \"en.json\");\r\n if (!fs.existsSync(enPath)) {\r\n fs.writeFileSync(enPath, JSON.stringify({}));\r\n }\r\n\r\n const files = fs.readdirSync(localesPath);\r\n const jsonFiles = files.filter((f) => f.endsWith(\".json\"));\r\n\r\n const resources: Resource = {};\r\n\r\n for (const file of jsonFiles) {\r\n const lang = path.basename(file, \".json\");\r\n const filePath = path.join(localesPath, file);\r\n\r\n try {\r\n const content = fs.readFileSync(filePath, \"utf-8\");\r\n const translations = JSON.parse(content);\r\n resources[lang] = { translation: translations };\r\n } catch (error) {\r\n console.error(`[vite:layout] Error parsing ${file}:`, error);\r\n resources[lang] = { translation: {} };\r\n }\r\n\r\n this.addWatchFile(filePath);\r\n }\r\n\r\n return `export const resources = ${JSON.stringify(resources)};`;\r\n },\r\n };\r\n}\r\n"],"mappings":";;;AAAA,OAAO,QAAQ;AACf,OAAO,UAAU;AAIV,SAAS,gBAAwB;AACpC,QAAM,kBAAkB;AACxB,QAAM,0BAA0B,OAAO;AAEvC,MAAI;AAEJ,SAAO;AAAA,IACH,MAAM;AAAA,IACN,SAAS;AAAA,IACT,eAAe,gBAAgB;AAC3B,oBAAc,KAAK,QAAQ,eAAe,MAAM,aAAa;AAAA,IACjE;AAAA,IACA,SAAS;AACL,aAAO;AAAA,QACH,cAAc;AAAA,UACV,SAAS,CAAC,eAAe;AAAA,QAC7B;AAAA,MACJ;AAAA,IACJ;AAAA,IACA,UAAU,IAAI;AACV,UAAI,OAAO,gBAAiB,QAAO;AACnC,aAAO;AAAA,IACX;AAAA,IACA,KAAK,IAAI;AACL,UAAI,OAAO,wBAAyB,QAAO;AAE3C,UAAI,CAAC,GAAG,WAAW,WAAW,GAAG;AAC7B,WAAG,UAAU,aAAa,EAAE,WAAW,KAAK,CAAC;AAAA,MACjD;AAEA,YAAM,SAAS,KAAK,KAAK,aAAa,SAAS;AAC/C,UAAI,CAAC,GAAG,WAAW,MAAM,GAAG;AACxB,WAAG,cAAc,QAAQ,KAAK,UAAU,CAAC,CAAC,CAAC;AAAA,MAC/C;AAEA,YAAM,QAAQ,GAAG,YAAY,WAAW;AACxC,YAAM,YAAY,MAAM,OAAO,CAAC,MAAM,EAAE,SAAS,OAAO,CAAC;AAEzD,YAAM,YAAsB,CAAC;AAE7B,iBAAW,QAAQ,WAAW;AAC1B,cAAM,OAAO,KAAK,SAAS,MAAM,OAAO;AACxC,cAAM,WAAW,KAAK,KAAK,aAAa,IAAI;AAE5C,YAAI;AACA,gBAAM,UAAU,GAAG,aAAa,UAAU,OAAO;AACjD,gBAAM,eAAe,KAAK,MAAM,OAAO;AACvC,oBAAU,IAAI,IAAI,EAAE,aAAa,aAAa;AAAA,QAClD,SAAS,OAAO;AACZ,kBAAQ,MAAM,+BAA+B,IAAI,KAAK,KAAK;AAC3D,oBAAU,IAAI,IAAI,EAAE,aAAa,CAAC,EAAE;AAAA,QACxC;AAEA,aAAK,aAAa,QAAQ;AAAA,MAC9B;AAEA,aAAO,4BAA4B,KAAK,UAAU,SAAS,CAAC;AAAA,IAChE;AAAA,EACJ;AACJ;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wcz-test",
|
|
3
|
-
"version": "6.7.
|
|
3
|
+
"version": "6.7.5",
|
|
4
4
|
"private": false,
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"type": "module",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"@t3-oss/env-core": "^0.13.8",
|
|
65
65
|
"@types/pg": "^8.15.6",
|
|
66
66
|
"axios": "^1.13.2",
|
|
67
|
-
"better-auth": "^1.3
|
|
67
|
+
"better-auth": "^1.4.3",
|
|
68
68
|
"file-saver": "^2.0.5",
|
|
69
69
|
"i18next": "^25.6.2",
|
|
70
70
|
"i18next-browser-languagedetector": "^8.2.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/lib/utils.ts"],"sourcesContent":["import axios from \"axios\";\r\nimport type { AnyFieldApi } from \"@tanstack/react-form\";\r\nimport { clientEnv } from \"~/env\";\r\n\r\nexport class Platform {\r\n static get isAndroid() { return /android/i.test(this.userAgent); }\r\n static get isIOS() { return /iPad|iPhone|iPod/.test(this.userAgent); }\r\n static get isWindows() { return /windows/i.test(this.userAgent); }\r\n static get isMacOS() { return /Macintosh|MacIntel|MacPPC|Mac68K/.test(this.userAgent); }\r\n\r\n private static get userAgent() { return typeof navigator === \"undefined\" ? \"\" : navigator.userAgent; }\r\n}\r\n\r\nexport const rootRouteHead = () => ({\r\n meta: [\r\n { charSet: \"utf-8\" },\r\n { name: \"viewport\", content: \"width=device-width, initial-scale=1\" },\r\n { title: clientEnv.VITE_APP_TITLE },\r\n { name: \"og:type\", content: \"website\" },\r\n { name: \"og:title\", content: clientEnv.VITE_APP_TITLE },\r\n { name: \"og:image\", content: \"/favicon-32x32.png\" }\r\n ],\r\n links: [\r\n { rel: \"apple-touch-icon\", sizes: \"180x180\", href: \"/apple-touch-icon.png\", },\r\n { rel: \"icon\", type: \"image/png\", sizes: \"32x32\", href: \"/favicon-32x32.png\", },\r\n { rel: \"icon\", type: \"image/png\", sizes: \"16x16\", href: \"/favicon-16x16.png\", },\r\n { rel: \"icon\", href: \"/favicon.ico\" },\r\n ],\r\n});\r\n\r\nexport const httpClient = axios.create({\r\n baseURL: clientEnv.VITE_API_URL // TODO: Not working in children projects\r\n});\r\n\r\n/* Internal Utils */\r\nexport type FormOmittedProps =\r\n \"name\" |\r\n \"value\" |\r\n \"onChange\" |\r\n \"onBlur\" |\r\n \"error\" |\r\n \"helperText\" |\r\n \"renderInput\" |\r\n \"type\" |\r\n \"aria-label\";\r\n\r\nexport const getFieldStatus = (field: AnyFieldApi) => {\r\n const { meta } = field.state;\r\n\r\n const isTouched = meta.isTouched;\r\n const hasError = !!meta.errors.length;\r\n const helperText = meta.errors[0]?.message;\r\n\r\n return { isTouched, hasError, helperText };\r\n};\r\n\r\nexport const toKebabCase = (str: string): string => {\r\n return str\r\n .replaceAll(/([a-z])([A-Z])/g, \"$1-$2\")\r\n .replaceAll(/[\\s_]+/g, \"-\")\r\n .replaceAll(/[^a-zA-Z0-9-]/g, \"\")\r\n .toLowerCase()\r\n .replaceAll(/-+/g, \"-\")\r\n .replaceAll(/(^-|-$)/g, \"\");\r\n};\r\n"],"mappings":";;;;;AAAA,OAAO,WAAW;AAIX,IAAM,WAAN,MAAe;AAAA,EAClB,WAAW,YAAY;AAAE,WAAO,WAAW,KAAK,KAAK,SAAS;AAA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