uidex 0.7.0 → 0.8.0
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/cli/cli.cjs +1024 -1041
- package/dist/cli/cli.cjs.map +1 -1
- package/dist/headless/index.cjs +4 -448
- package/dist/headless/index.cjs.map +1 -1
- package/dist/headless/index.d.cts +41 -11
- package/dist/headless/index.d.ts +41 -11
- package/dist/headless/index.js +4 -450
- package/dist/headless/index.js.map +1 -1
- package/dist/index.cjs +147 -3252
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +43 -316
- package/dist/index.d.ts +43 -316
- package/dist/index.js +133 -3254
- package/dist/index.js.map +1 -1
- package/dist/playwright/index.cjs +175 -0
- package/dist/playwright/index.cjs.map +1 -1
- package/dist/playwright/index.d.cts +2 -0
- package/dist/playwright/index.d.ts +2 -0
- package/dist/playwright/index.js +167 -0
- package/dist/playwright/index.js.map +1 -1
- package/dist/playwright/states-reporter.cjs +123 -0
- package/dist/playwright/states-reporter.cjs.map +1 -0
- package/dist/playwright/states-reporter.d.cts +46 -0
- package/dist/playwright/states-reporter.d.ts +46 -0
- package/dist/playwright/states-reporter.js +88 -0
- package/dist/playwright/states-reporter.js.map +1 -0
- package/dist/playwright/states.cjs +118 -0
- package/dist/playwright/states.cjs.map +1 -0
- package/dist/playwright/states.d.cts +120 -0
- package/dist/playwright/states.d.ts +120 -0
- package/dist/playwright/states.js +88 -0
- package/dist/playwright/states.js.map +1 -0
- package/dist/react/index.cjs +163 -3255
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +62 -275
- package/dist/react/index.d.ts +62 -275
- package/dist/react/index.js +151 -3268
- package/dist/react/index.js.map +1 -1
- package/dist/scan/index.cjs +1194 -322
- package/dist/scan/index.cjs.map +1 -1
- package/dist/scan/index.d.cts +274 -8
- package/dist/scan/index.d.ts +274 -8
- package/dist/scan/index.js +1185 -322
- package/dist/scan/index.js.map +1 -1
- package/package.json +27 -31
- package/dist/cloud/index.cjs +0 -682
- package/dist/cloud/index.cjs.map +0 -1
- package/dist/cloud/index.d.cts +0 -270
- package/dist/cloud/index.d.ts +0 -270
- package/dist/cloud/index.js +0 -645
- package/dist/cloud/index.js.map +0 -1
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { Page, TestInfo } from '@playwright/test';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Deterministic render-state capture for `uidex/playwright`.
|
|
5
|
+
*
|
|
6
|
+
* Two jobs, deliberately split:
|
|
7
|
+
* 1. RECORD which `entity/state` a test captured (a `uidex-states`
|
|
8
|
+
* attachment) — the reporter aggregates these into `uidex-states.json`,
|
|
9
|
+
* which the scanner's completeness gate cross-checks against the states
|
|
10
|
+
* declared in `export const uidex = { states: [...] }`.
|
|
11
|
+
* 2. SHOOT the pixels — a thin wrapper over native `page.screenshot`. The
|
|
12
|
+
* determinism knobs are Playwright's own: `animations: "disabled"` and
|
|
13
|
+
* `caret: "hide"` are defaults, `style`/`stylePath` pierces the shadow DOM
|
|
14
|
+
* to hide dev chrome, `mask` covers non-deterministic regions, and the
|
|
15
|
+
* frozen clock / locale / timezone / colour-scheme live in the project's
|
|
16
|
+
* `use` block. uidex does not re-implement `settle()`.
|
|
17
|
+
*
|
|
18
|
+
* The recording is the load-bearing half: even a spec that shoots nothing can
|
|
19
|
+
* call `recordState` so the gate knows the state exists.
|
|
20
|
+
*/
|
|
21
|
+
declare const STATES_ATTACHMENT = "uidex-states";
|
|
22
|
+
/** Default light + dark; many surfaces use theme-dependent colours. */
|
|
23
|
+
declare const THEMES: readonly ["light", "dark"];
|
|
24
|
+
/** Desktop is primary; narrow exercises the responsive reflow. */
|
|
25
|
+
declare const WIDTHS: {
|
|
26
|
+
readonly desktop: 1440;
|
|
27
|
+
readonly narrow: 430;
|
|
28
|
+
};
|
|
29
|
+
type Theme = (typeof THEMES)[number];
|
|
30
|
+
type WidthLabel = keyof typeof WIDTHS;
|
|
31
|
+
type StateEntityKind = "page" | "feature" | "widget";
|
|
32
|
+
/** The four kinds the state-matrix gate expects every captured route to cover. */
|
|
33
|
+
declare const CORE_STATE_KINDS: readonly ["loading", "empty", "populated", "error"];
|
|
34
|
+
type CoreStateKind = (typeof CORE_STATE_KINDS)[number];
|
|
35
|
+
/** `variant` = any state outside the matrix (dialog, wizard step, multi-currency…). */
|
|
36
|
+
type StateKind = CoreStateKind | "variant";
|
|
37
|
+
/** One captured `entity/state` variant. */
|
|
38
|
+
interface StateRecord {
|
|
39
|
+
/** Registry entity id whose state was rendered (e.g. "products"). */
|
|
40
|
+
entity: string;
|
|
41
|
+
/** Entity kind, so the gate can disambiguate a page vs feature of the same id. */
|
|
42
|
+
kind?: StateEntityKind;
|
|
43
|
+
/** Declared state name (e.g. "new-filled"). */
|
|
44
|
+
state: string;
|
|
45
|
+
/** Canonical kind for the state-matrix axis (defaults inferred from the name). */
|
|
46
|
+
stateKind?: StateKind;
|
|
47
|
+
theme?: string;
|
|
48
|
+
width?: string;
|
|
49
|
+
/** Screenshot path, when one was written. */
|
|
50
|
+
path?: string;
|
|
51
|
+
/**
|
|
52
|
+
* The URL pathname the capture ran against, observed from `page.url()`. The
|
|
53
|
+
* page-coverage gate normalizes it to a derived route pattern — so which route
|
|
54
|
+
* a capture exercised is observed, never hand-declared. A `/shots/*` harness
|
|
55
|
+
* URL matches no real route and gates nothing (correct for component captures).
|
|
56
|
+
*/
|
|
57
|
+
url?: string;
|
|
58
|
+
/** Explicit route pattern override, when the observed URL can't be trusted. */
|
|
59
|
+
route?: string;
|
|
60
|
+
}
|
|
61
|
+
/** The `uidex-states` attachment body — an array of records from one test. */
|
|
62
|
+
interface StatesPayload {
|
|
63
|
+
records: StateRecord[];
|
|
64
|
+
}
|
|
65
|
+
type TestInfoLike = Pick<TestInfo, "attach">;
|
|
66
|
+
/**
|
|
67
|
+
* Attach one or more captured-state records to the test. Idempotent per call;
|
|
68
|
+
* the reporter concatenates every test's records. Use directly when you shoot
|
|
69
|
+
* with your own screenshot call and only need the state registered for the gate.
|
|
70
|
+
*/
|
|
71
|
+
declare function recordStates(testInfo: TestInfoLike, records: StateRecord[]): Promise<void>;
|
|
72
|
+
interface CaptureStateOptions {
|
|
73
|
+
/** Registry entity id whose state this is. */
|
|
74
|
+
entity: string;
|
|
75
|
+
kind?: StateEntityKind;
|
|
76
|
+
/** Declared state name (must match a name in the entity's `states`). */
|
|
77
|
+
state: string;
|
|
78
|
+
/**
|
|
79
|
+
* Canonical state kind for the matrix. Defaults to the state name when it is
|
|
80
|
+
* itself a core kind (`loading`/`empty`/`populated`/`error`), else `variant`.
|
|
81
|
+
*/
|
|
82
|
+
stateKind?: StateKind;
|
|
83
|
+
/**
|
|
84
|
+
* Output dir for PNGs; defaults to `process.env.UIDEX_SHOTS_DIR`. When unset
|
|
85
|
+
* the capture only RECORDS the state (no screenshot) — so a spec left in the
|
|
86
|
+
* normal suite is a no-op beyond the attachment.
|
|
87
|
+
*/
|
|
88
|
+
dir?: string;
|
|
89
|
+
themes?: readonly Theme[];
|
|
90
|
+
widths?: readonly WidthLabel[];
|
|
91
|
+
/** Awaited after each theme/width change, before the shutter (the state's tell). */
|
|
92
|
+
ready?: (page: Page) => Promise<unknown>;
|
|
93
|
+
/**
|
|
94
|
+
* Switch the app's theme. App-specific (next-themes uses localStorage + a
|
|
95
|
+
* reload; others a class or cookie), so it is injected. Defaults to
|
|
96
|
+
* Playwright's `emulateMedia({ colorScheme })`, which suits prefers-color-scheme.
|
|
97
|
+
*/
|
|
98
|
+
setTheme?: (page: Page, theme: Theme) => Promise<void>;
|
|
99
|
+
/** CSS selectors to mask (opaque box) — for legitimately non-deterministic regions. */
|
|
100
|
+
mask?: string[];
|
|
101
|
+
/** Path to a stylesheet injected before the shot (hide dev chrome; pierces shadow DOM). */
|
|
102
|
+
stylePath?: string;
|
|
103
|
+
fullPage?: boolean;
|
|
104
|
+
/**
|
|
105
|
+
* Explicit route pattern this capture covers (e.g. "/[scope]/products"). By
|
|
106
|
+
* default the observed `page.url()` pathname is recorded and the gate matches
|
|
107
|
+
* it; pass `route` only when the observed URL is unreliable (e.g. a `/shots`
|
|
108
|
+
* harness standing in for a real route).
|
|
109
|
+
*/
|
|
110
|
+
route?: string;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Capture one declared state across themes × widths, then record every variant
|
|
114
|
+
* for the gate. Screenshot mechanics are native Playwright; determinism knobs
|
|
115
|
+
* come from the project `use` block and the options above. Returns the records
|
|
116
|
+
* it attached (also handy in tests).
|
|
117
|
+
*/
|
|
118
|
+
declare function captureState(page: Page, testInfo: TestInfoLike, opts: CaptureStateOptions): Promise<StateRecord[]>;
|
|
119
|
+
|
|
120
|
+
export { CORE_STATE_KINDS, type CaptureStateOptions, type CoreStateKind, STATES_ATTACHMENT, type StateEntityKind, type StateKind, type StateRecord, type StatesPayload, THEMES, type Theme, WIDTHS, type WidthLabel, captureState, recordStates };
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
// src/integrations/playwright/states.ts
|
|
2
|
+
var STATES_ATTACHMENT = "uidex-states";
|
|
3
|
+
var THEMES = ["light", "dark"];
|
|
4
|
+
var WIDTHS = { desktop: 1440, narrow: 430 };
|
|
5
|
+
var CORE_STATE_KINDS = [
|
|
6
|
+
"loading",
|
|
7
|
+
"empty",
|
|
8
|
+
"populated",
|
|
9
|
+
"error"
|
|
10
|
+
];
|
|
11
|
+
async function recordStates(testInfo, records) {
|
|
12
|
+
if (records.length === 0) return;
|
|
13
|
+
const payload = { records };
|
|
14
|
+
await testInfo.attach(STATES_ATTACHMENT, {
|
|
15
|
+
body: JSON.stringify(payload),
|
|
16
|
+
contentType: "application/json"
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
function currentPathname(page) {
|
|
20
|
+
try {
|
|
21
|
+
return new URL(page.url()).pathname;
|
|
22
|
+
} catch {
|
|
23
|
+
return void 0;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
async function defaultSetTheme(page, theme) {
|
|
27
|
+
await page.emulateMedia({ colorScheme: theme });
|
|
28
|
+
}
|
|
29
|
+
function inferStateKind(state, explicit) {
|
|
30
|
+
if (explicit) return explicit;
|
|
31
|
+
return CORE_STATE_KINDS.includes(state) ? state : "variant";
|
|
32
|
+
}
|
|
33
|
+
function shotName(opts, theme, label, suffixWidth) {
|
|
34
|
+
const base = `${opts.entity}/${opts.state}`;
|
|
35
|
+
return suffixWidth ? `${base}-${theme}-${label}` : `${base}-${theme}`;
|
|
36
|
+
}
|
|
37
|
+
async function captureState(page, testInfo, opts) {
|
|
38
|
+
const themes = opts.themes ?? THEMES;
|
|
39
|
+
const widths = opts.widths ?? ["desktop"];
|
|
40
|
+
const suffixWidth = widths.length > 1;
|
|
41
|
+
const dir = opts.dir ?? process.env.UIDEX_SHOTS_DIR;
|
|
42
|
+
const setTheme = opts.setTheme ?? defaultSetTheme;
|
|
43
|
+
const observedUrl = currentPathname(page);
|
|
44
|
+
const records = [];
|
|
45
|
+
for (const theme of themes) {
|
|
46
|
+
await setTheme(page, theme);
|
|
47
|
+
if (opts.ready) await opts.ready(page);
|
|
48
|
+
for (const label of widths) {
|
|
49
|
+
await page.setViewportSize({ width: WIDTHS[label], height: 900 });
|
|
50
|
+
if (opts.ready) await opts.ready(page);
|
|
51
|
+
const record = {
|
|
52
|
+
entity: opts.entity,
|
|
53
|
+
state: opts.state,
|
|
54
|
+
stateKind: inferStateKind(opts.state, opts.stateKind),
|
|
55
|
+
theme,
|
|
56
|
+
width: label,
|
|
57
|
+
...opts.kind ? { kind: opts.kind } : {},
|
|
58
|
+
...opts.route ? { route: opts.route } : {},
|
|
59
|
+
...observedUrl ? { url: observedUrl } : {}
|
|
60
|
+
};
|
|
61
|
+
if (dir) {
|
|
62
|
+
const path = `${dir}/${shotName(opts, theme, label, suffixWidth)}.png`;
|
|
63
|
+
await page.screenshot({
|
|
64
|
+
path,
|
|
65
|
+
fullPage: opts.fullPage ?? true,
|
|
66
|
+
...opts.stylePath ? { stylePath: opts.stylePath } : {},
|
|
67
|
+
...opts.mask?.length ? {
|
|
68
|
+
mask: opts.mask.map((s) => page.locator(s)),
|
|
69
|
+
maskColor: "#000000"
|
|
70
|
+
} : {}
|
|
71
|
+
});
|
|
72
|
+
record.path = path;
|
|
73
|
+
}
|
|
74
|
+
records.push(record);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
await recordStates(testInfo, records);
|
|
78
|
+
return records;
|
|
79
|
+
}
|
|
80
|
+
export {
|
|
81
|
+
CORE_STATE_KINDS,
|
|
82
|
+
STATES_ATTACHMENT,
|
|
83
|
+
THEMES,
|
|
84
|
+
WIDTHS,
|
|
85
|
+
captureState,
|
|
86
|
+
recordStates
|
|
87
|
+
};
|
|
88
|
+
//# sourceMappingURL=states.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/integrations/playwright/states.ts"],"sourcesContent":["import type { Page, TestInfo } from \"@playwright/test\"\n\n/**\n * Deterministic render-state capture for `uidex/playwright`.\n *\n * Two jobs, deliberately split:\n * 1. RECORD which `entity/state` a test captured (a `uidex-states`\n * attachment) — the reporter aggregates these into `uidex-states.json`,\n * which the scanner's completeness gate cross-checks against the states\n * declared in `export const uidex = { states: [...] }`.\n * 2. SHOOT the pixels — a thin wrapper over native `page.screenshot`. The\n * determinism knobs are Playwright's own: `animations: \"disabled\"` and\n * `caret: \"hide\"` are defaults, `style`/`stylePath` pierces the shadow DOM\n * to hide dev chrome, `mask` covers non-deterministic regions, and the\n * frozen clock / locale / timezone / colour-scheme live in the project's\n * `use` block. uidex does not re-implement `settle()`.\n *\n * The recording is the load-bearing half: even a spec that shoots nothing can\n * call `recordState` so the gate knows the state exists.\n */\n\nexport const STATES_ATTACHMENT = \"uidex-states\"\n\n/** Default light + dark; many surfaces use theme-dependent colours. */\nexport const THEMES = [\"light\", \"dark\"] as const\n/** Desktop is primary; narrow exercises the responsive reflow. */\nexport const WIDTHS = { desktop: 1440, narrow: 430 } as const\n\nexport type Theme = (typeof THEMES)[number]\nexport type WidthLabel = keyof typeof WIDTHS\nexport type StateEntityKind = \"page\" | \"feature\" | \"widget\"\n\n/** The four kinds the state-matrix gate expects every captured route to cover. */\nexport const CORE_STATE_KINDS = [\n \"loading\",\n \"empty\",\n \"populated\",\n \"error\",\n] as const\nexport type CoreStateKind = (typeof CORE_STATE_KINDS)[number]\n/** `variant` = any state outside the matrix (dialog, wizard step, multi-currency…). */\nexport type StateKind = CoreStateKind | \"variant\"\n\n/** One captured `entity/state` variant. */\nexport interface StateRecord {\n /** Registry entity id whose state was rendered (e.g. \"products\"). */\n entity: string\n /** Entity kind, so the gate can disambiguate a page vs feature of the same id. */\n kind?: StateEntityKind\n /** Declared state name (e.g. \"new-filled\"). */\n state: string\n /** Canonical kind for the state-matrix axis (defaults inferred from the name). */\n stateKind?: StateKind\n theme?: string\n width?: string\n /** Screenshot path, when one was written. */\n path?: string\n /**\n * The URL pathname the capture ran against, observed from `page.url()`. The\n * page-coverage gate normalizes it to a derived route pattern — so which route\n * a capture exercised is observed, never hand-declared. A `/shots/*` harness\n * URL matches no real route and gates nothing (correct for component captures).\n */\n url?: string\n /** Explicit route pattern override, when the observed URL can't be trusted. */\n route?: string\n}\n\n/** The `uidex-states` attachment body — an array of records from one test. */\nexport interface StatesPayload {\n records: StateRecord[]\n}\n\ntype TestInfoLike = Pick<TestInfo, \"attach\">\n\n/**\n * Attach one or more captured-state records to the test. Idempotent per call;\n * the reporter concatenates every test's records. Use directly when you shoot\n * with your own screenshot call and only need the state registered for the gate.\n */\nexport async function recordStates(\n testInfo: TestInfoLike,\n records: StateRecord[]\n): Promise<void> {\n if (records.length === 0) return\n const payload: StatesPayload = { records }\n await testInfo.attach(STATES_ATTACHMENT, {\n body: JSON.stringify(payload),\n contentType: \"application/json\",\n })\n}\n\nexport interface CaptureStateOptions {\n /** Registry entity id whose state this is. */\n entity: string\n kind?: StateEntityKind\n /** Declared state name (must match a name in the entity's `states`). */\n state: string\n /**\n * Canonical state kind for the matrix. Defaults to the state name when it is\n * itself a core kind (`loading`/`empty`/`populated`/`error`), else `variant`.\n */\n stateKind?: StateKind\n /**\n * Output dir for PNGs; defaults to `process.env.UIDEX_SHOTS_DIR`. When unset\n * the capture only RECORDS the state (no screenshot) — so a spec left in the\n * normal suite is a no-op beyond the attachment.\n */\n dir?: string\n themes?: readonly Theme[]\n widths?: readonly WidthLabel[]\n /** Awaited after each theme/width change, before the shutter (the state's tell). */\n ready?: (page: Page) => Promise<unknown>\n /**\n * Switch the app's theme. App-specific (next-themes uses localStorage + a\n * reload; others a class or cookie), so it is injected. Defaults to\n * Playwright's `emulateMedia({ colorScheme })`, which suits prefers-color-scheme.\n */\n setTheme?: (page: Page, theme: Theme) => Promise<void>\n /** CSS selectors to mask (opaque box) — for legitimately non-deterministic regions. */\n mask?: string[]\n /** Path to a stylesheet injected before the shot (hide dev chrome; pierces shadow DOM). */\n stylePath?: string\n fullPage?: boolean\n /**\n * Explicit route pattern this capture covers (e.g. \"/[scope]/products\"). By\n * default the observed `page.url()` pathname is recorded and the gate matches\n * it; pass `route` only when the observed URL is unreliable (e.g. a `/shots`\n * harness standing in for a real route).\n */\n route?: string\n}\n\n/** The URL pathname the page is currently on, for route observation. */\nfunction currentPathname(page: Page): string | undefined {\n try {\n return new URL(page.url()).pathname\n } catch {\n return undefined\n }\n}\n\nasync function defaultSetTheme(page: Page, theme: Theme): Promise<void> {\n await page.emulateMedia({ colorScheme: theme })\n}\n\n/** Infer the matrix kind: the state name if it is itself a core kind, else variant. */\nfunction inferStateKind(state: string, explicit?: StateKind): StateKind {\n if (explicit) return explicit\n return (CORE_STATE_KINDS as readonly string[]).includes(state)\n ? (state as StateKind)\n : \"variant\"\n}\n\nfunction shotName(\n opts: CaptureStateOptions,\n theme: Theme,\n label: WidthLabel,\n suffixWidth: boolean\n): string {\n const base = `${opts.entity}/${opts.state}`\n return suffixWidth ? `${base}-${theme}-${label}` : `${base}-${theme}`\n}\n\n/**\n * Capture one declared state across themes × widths, then record every variant\n * for the gate. Screenshot mechanics are native Playwright; determinism knobs\n * come from the project `use` block and the options above. Returns the records\n * it attached (also handy in tests).\n */\nexport async function captureState(\n page: Page,\n testInfo: TestInfoLike,\n opts: CaptureStateOptions\n): Promise<StateRecord[]> {\n const themes = opts.themes ?? THEMES\n const widths = opts.widths ?? ([\"desktop\"] as WidthLabel[])\n const suffixWidth = widths.length > 1\n const dir = opts.dir ?? process.env.UIDEX_SHOTS_DIR\n const setTheme = opts.setTheme ?? defaultSetTheme\n const observedUrl = currentPathname(page)\n const records: StateRecord[] = []\n\n for (const theme of themes) {\n await setTheme(page, theme)\n if (opts.ready) await opts.ready(page)\n for (const label of widths) {\n await page.setViewportSize({ width: WIDTHS[label], height: 900 })\n if (opts.ready) await opts.ready(page)\n const record: StateRecord = {\n entity: opts.entity,\n state: opts.state,\n stateKind: inferStateKind(opts.state, opts.stateKind),\n theme,\n width: label,\n ...(opts.kind ? { kind: opts.kind } : {}),\n ...(opts.route ? { route: opts.route } : {}),\n ...(observedUrl ? { url: observedUrl } : {}),\n }\n if (dir) {\n const path = `${dir}/${shotName(opts, theme, label, suffixWidth)}.png`\n await page.screenshot({\n path,\n fullPage: opts.fullPage ?? true,\n ...(opts.stylePath ? { stylePath: opts.stylePath } : {}),\n ...(opts.mask?.length\n ? {\n mask: opts.mask.map((s) => page.locator(s)),\n maskColor: \"#000000\",\n }\n : {}),\n })\n record.path = path\n }\n records.push(record)\n }\n }\n\n await recordStates(testInfo, records)\n return records\n}\n"],"mappings":";AAqBO,IAAM,oBAAoB;AAG1B,IAAM,SAAS,CAAC,SAAS,MAAM;AAE/B,IAAM,SAAS,EAAE,SAAS,MAAM,QAAQ,IAAI;AAO5C,IAAM,mBAAmB;AAAA,EAC9B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AA0CA,eAAsB,aACpB,UACA,SACe;AACf,MAAI,QAAQ,WAAW,EAAG;AAC1B,QAAM,UAAyB,EAAE,QAAQ;AACzC,QAAM,SAAS,OA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