@ia-qa/self-healing 1.7.10 → 1.7.13
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/README.md +38 -2
- package/dist/aom.d.ts +36 -0
- package/dist/aom.js.map +1 -1
- package/dist/browser/match.d.ts +10 -0
- package/dist/browser/match.js +16 -6
- package/dist/browser/match.js.map +1 -1
- package/dist/browser/openables.d.ts +45 -0
- package/dist/browser/openables.js +128 -0
- package/dist/browser/openables.js.map +1 -0
- package/dist/captureState.d.ts +66 -0
- package/dist/captureState.js +149 -0
- package/dist/captureState.js.map +1 -0
- package/dist/cli/args.js +5 -4
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/baseline.js +22 -0
- package/dist/cli/baseline.js.map +1 -1
- package/dist/cli/diff.d.ts +50 -0
- package/dist/cli/diff.js +114 -11
- package/dist/cli/diff.js.map +1 -1
- package/dist/cli/emit.d.ts +17 -0
- package/dist/cli/emit.js +25 -0
- package/dist/cli/emit.js.map +1 -1
- package/dist/cli/exitCodes.d.ts +29 -0
- package/dist/cli/exitCodes.js +41 -0
- package/dist/cli/exitCodes.js.map +1 -0
- package/dist/cli/explain.js +11 -2
- package/dist/cli/explain.js.map +1 -1
- package/dist/cli/fix.d.ts +16 -0
- package/dist/cli/fix.js +85 -11
- package/dist/cli/fix.js.map +1 -1
- package/dist/cli/index.js +56 -3
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/init.d.ts +39 -1
- package/dist/cli/init.js +216 -12
- package/dist/cli/init.js.map +1 -1
- package/dist/cli/map.d.ts +2 -0
- package/dist/cli/map.js +126 -4
- package/dist/cli/map.js.map +1 -1
- package/dist/cli/run.js +8 -26
- package/dist/cli/run.js.map +1 -1
- package/dist/config.d.ts +45 -0
- package/dist/config.js.map +1 -1
- package/dist/explain.d.ts +27 -0
- package/dist/explain.js +88 -7
- package/dist/explain.js.map +1 -1
- package/dist/explore.d.ts +138 -0
- package/dist/explore.js +224 -0
- package/dist/explore.js.map +1 -0
- package/dist/nextStep.d.ts +79 -0
- package/dist/nextStep.js +107 -0
- package/dist/nextStep.js.map +1 -0
- package/dist/systemicDelta.d.ts +129 -0
- package/dist/systemicDelta.js +164 -0
- package/dist/systemicDelta.js.map +1 -0
- package/dist/ui/server.js +5 -1
- package/dist/ui/server.js.map +1 -1
- package/package.json +1 -1
- package/skills/ia-qa-heal/SKILL.md +56 -2
package/README.md
CHANGED
|
@@ -14,8 +14,9 @@ test into a green lie.
|
|
|
14
14
|
**It runs entirely on your machine.** It brings its own headless Chromium, so it sees
|
|
15
15
|
`localhost`, staging, or an app behind a VPN, and **nothing ever leaves the machine**.
|
|
16
16
|
|
|
17
|
-
Framework-agnostic
|
|
18
|
-
|
|
17
|
+
Framework-agnostic where it reads, narrower where it **writes** — see
|
|
18
|
+
[what is supported](#what-is-supported) before you judge it on the half you happen to hit.
|
|
19
|
+
Ships a **CLI**, a **local MCP server** for AI agents, and an accessibility-tree page mapper.
|
|
19
20
|
|
|
20
21
|
> **New here?** The [step-by-step tutorial](https://www.ia-qa.com/devtools/selector-drift/tutorial)
|
|
21
22
|
> walks the whole thing with no jargon (same text as `TUTORIAL.md`, shipped in this package).
|
|
@@ -129,6 +130,7 @@ env/SSM — see **Configuration**) or capture-during-run, where your own suite l
|
|
|
129
130
|
| day one, no baseline — is my suite still valid? | `audit` (advisory; never gate on it) |
|
|
130
131
|
| is the app itself sound? | `check` — dead links, unnamed elements, name collisions, orphan pages |
|
|
131
132
|
| which pages am I *not* testing? | `discover` (`--sitemap`, or `--crawl` behind the login) |
|
|
133
|
+
| **my menus, tabs and modals aren't in the contract** | **`map --deep`** — opens them and puts what they reveal in the same contract |
|
|
132
134
|
| what do my tests actually use? | `ingest` |
|
|
133
135
|
| show me the app's structure | `graph --format mermaid\|svg\|json\|markdown` |
|
|
134
136
|
| is this getting better or worse? | `history` |
|
|
@@ -173,6 +175,40 @@ Read-only, offline, opens no browser, applies nothing. Needs a baseline (it is a
|
|
|
173
175
|
a locator that *worked* and stopped); with no baseline the day-one verb is `audit`. Exits 0
|
|
174
176
|
on PASS, 1 on BLOCK, and on FIX only with `--strict`.
|
|
175
177
|
|
|
178
|
+
## What is supported
|
|
179
|
+
|
|
180
|
+
Three different questions, three different answers — and conflating them is how a tool
|
|
181
|
+
earns "it half worked". **Inventoried** is what `ingest` can find in your sources.
|
|
182
|
+
**Judged** is what `diff` / `audit` / `explain` can put a verdict on. **Rewritten** is what
|
|
183
|
+
`fix` will edit in your files.
|
|
184
|
+
|
|
185
|
+
| | inventoried | judged | rewritten |
|
|
186
|
+
|---|---|---|---|
|
|
187
|
+
| CSS selectors — any language, any framework (`.js .ts .py .java .cs .rb .php .go .kt .feature`) | ✅ | ✅ | ✅ |
|
|
188
|
+
| Role-anchored names — `getByRole`, `getByLabel`, `getByPlaceholder`, `findByRole`, `By.linkText` | ✅ | ✅ | ✅ |
|
|
189
|
+
| Text-anchored — `getByText`, `cy.contains`, `getByTitle`, `getByAltText` | ✅ | ⚠️ reported, never judged | ❌ **by design** |
|
|
190
|
+
| `--locators` upgrade (rewrite a selector into `getByRole`) | — | — | Playwright, `.js/.ts` only |
|
|
191
|
+
| Selectors built by concatenation or a template | ❌ | ❌ | ❌ |
|
|
192
|
+
|
|
193
|
+
Three of those rows are deliberate refusals, not gaps:
|
|
194
|
+
|
|
195
|
+
- **Text-anchored locators name a string, not an element.** The contract holds interactive
|
|
196
|
+
elements only, so nothing can prove `getByText('Save')` meant the renamed button rather
|
|
197
|
+
than a heading that never moved. Editing one would break a *passing* test — the single
|
|
198
|
+
outcome worse than the drift. They are reported with `file:line` and hold the verdict at
|
|
199
|
+
BLOCK. Cypress reaches role-anchored rewriting only through `cy.findByRole`; that is a
|
|
200
|
+
property of Cypress's API, not a hole here.
|
|
201
|
+
- **`--locators` is Playwright-only** because `getByRole(...)` is Playwright syntax. A `.py`
|
|
202
|
+
or `.java` suite still gets the plain selector rewrite — the upgrade is an extra, not the
|
|
203
|
+
feature.
|
|
204
|
+
- **A concatenated selector is invisible to a static scan**, and equally invisible to the
|
|
205
|
+
literal rewrite `fix` performs. Nothing is lost by admitting it.
|
|
206
|
+
|
|
207
|
+
**Honest limit of the "rewritten" column outside JS.** The rewrite path accepts those file
|
|
208
|
+
extensions and the code paths are exercised, but the test suite's rewrite cases are written
|
|
209
|
+
against `.js`/`.ts` files. Treat non-JS rewriting as working-but-less-travelled: run
|
|
210
|
+
`fix --dry-run` first, which you should be doing anyway.
|
|
211
|
+
|
|
176
212
|
## The verdict
|
|
177
213
|
|
|
178
214
|
```
|
package/dist/aom.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Page } from 'playwright';
|
|
2
|
+
import type { CaptureState } from './captureState';
|
|
2
3
|
/**
|
|
3
4
|
* Mapping I/O. The extraction itself lives in `browser/extract.js` — it is plain
|
|
4
5
|
* self-contained JS because Playwright serializes it into the page and the web
|
|
@@ -33,6 +34,20 @@ export interface MappedElement {
|
|
|
33
34
|
*/
|
|
34
35
|
rawName?: string;
|
|
35
36
|
nameMasked?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* How to reach this element, when reaching it takes clicks: the accessible names of the
|
|
39
|
+
* controls opened on the way (`["☰", "RAG & Agents"]`). Written by `map --deep` only, and
|
|
40
|
+
* omitted on everything visible at load — so a contract captured without exploration stays
|
|
41
|
+
* byte-identical to one captured before `via` existed.
|
|
42
|
+
*
|
|
43
|
+
* Never part of identity. `diffMappings` matches on role + name + selector and must keep
|
|
44
|
+
* doing so: an element that moved from behind a menu into the open is the *same* element,
|
|
45
|
+
* and a diff that called that drift would report a UX improvement as a regression.
|
|
46
|
+
*
|
|
47
|
+
* Its reader is a person or an agent asking "how do I even get to this button" — which is
|
|
48
|
+
* the question a deep contract creates and owes an answer to.
|
|
49
|
+
*/
|
|
50
|
+
via?: string[];
|
|
36
51
|
}
|
|
37
52
|
export interface PageMapping {
|
|
38
53
|
page: string;
|
|
@@ -41,6 +56,27 @@ export interface PageMapping {
|
|
|
41
56
|
elements: MappedElement[];
|
|
42
57
|
/** How the contract was produced: a `map` visit (default) or captured during a test run. */
|
|
43
58
|
source?: 'map' | 'run';
|
|
59
|
+
/**
|
|
60
|
+
* The *shape* of the browser state this capture ran under — never the state itself
|
|
61
|
+
* (see `captureState.ts`). Read by nothing that computes a per-page diff; it exists
|
|
62
|
+
* so `systemicDelta.ts` can tell "the app removed this everywhere" from "the two
|
|
63
|
+
* captures were read in different states", which look identical row by row.
|
|
64
|
+
*
|
|
65
|
+
* Optional forever: every baseline written before it existed has none, and absent
|
|
66
|
+
* means *unknown*, never *matching*.
|
|
67
|
+
*/
|
|
68
|
+
captureState?: CaptureState;
|
|
69
|
+
/**
|
|
70
|
+
* How many clicks deep this contract was explored (`map --deep`). Absent means the loaded
|
|
71
|
+
* state only — every contract written before exploration existed, which is why absent must
|
|
72
|
+
* never be read as `0`-and-therefore-comparable-to-a-deep-one on purpose.
|
|
73
|
+
*
|
|
74
|
+
* It is recorded for the same reason `source` is: a deep baseline diffed against a shallow
|
|
75
|
+
* capture reports every explored element as `lost`, which is drift manufactured out of the
|
|
76
|
+
* capture method rather than out of the app. Depth is a property of a *baseline*, and a
|
|
77
|
+
* mismatch has to be nameable.
|
|
78
|
+
*/
|
|
79
|
+
exploredDepth?: number;
|
|
44
80
|
}
|
|
45
81
|
/**
|
|
46
82
|
* Did these two mappings come out of the same `map` run?
|
package/dist/aom.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aom.js","sourceRoot":"","sources":["../src/aom.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"aom.js","sourceRoot":"","sources":["../src/aom.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2GA,sCAKC;AAED,gEAEC;AAED,kCAwBC;AAED,kCAQC;AAxJD,uCAAyB;AACzB,2CAA6B;AAE7B,qCAAmD;AACnD,+CA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AAO;YAAE,SAAS;QAC/C,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC;YAAE,SAAS;QAChE,IAAI,CAAC;YACH,IAAI,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,KAAK,OAAO,EAAE,CAAC;gBAC/D,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;gBAC3C,OAAO,CAAC,IAAI,CAAC,MAAM,OAAO,CAAC,IAAI,wBAAwB,KAAK,oCAAoC,CAAC,CAAC;YACpG,CAAC;QACH,CAAC;QAAC,MAAM,CAAC,CAAC,qBAAqB,CAAC,CAAC;IACnC,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAgB,WAAW,CAAC,QAAgB,EAAE,MAAc,IAAA,mBAAU,GAAE;IACtE,MAAM,IAAI,GAAG,IAAA,oBAAW,EAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IACxC,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CACb,8BAA8B,QAAQ,MAAM,IAAI,2BAA2B,QAAQ,WAAW,CAC/F,CAAC;IACJ,CAAC;IACD,OAAO,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAgB,CAAC;AAClE,CAAC"}
|
package/dist/browser/match.d.ts
CHANGED
|
@@ -109,4 +109,14 @@ export function diffMappings(before: any, after: any): {
|
|
|
109
109
|
rows: any;
|
|
110
110
|
added: any;
|
|
111
111
|
};
|
|
112
|
+
/**
|
|
113
|
+
* The verdict rule, as one function.
|
|
114
|
+
*
|
|
115
|
+
* Extracted so nothing can restate it. `systemicDelta.ts` recomputes a page's
|
|
116
|
+
* verdict after holding a cross-page group out of its rows, and a second copy of
|
|
117
|
+
* this ladder there would be a CLI/MCP dispatch split in another costume: the two
|
|
118
|
+
* would drift, and the drift would be silent because both still return a verdict.
|
|
119
|
+
* Pure, dependency-free, and it reads only counts — safe in the browser bundle.
|
|
120
|
+
*/
|
|
121
|
+
export function verdictFromCounts(counts: any): "BLOCK" | "FIX" | "PASS";
|
|
112
122
|
export const FUZZY_THRESHOLD: 0.6;
|
package/dist/browser/match.js
CHANGED
|
@@ -16,6 +16,7 @@ exports.matchElement = matchElement;
|
|
|
16
16
|
exports.heuristicMatch = heuristicMatch;
|
|
17
17
|
exports.isIdentitySelector = isIdentitySelector;
|
|
18
18
|
exports.diffMappings = diffMappings;
|
|
19
|
+
exports.verdictFromCounts = verdictFromCounts;
|
|
19
20
|
function normalize(s) {
|
|
20
21
|
return (s == null ? '' : String(s)).toLowerCase().trim().replace(/\s+/g, ' ');
|
|
21
22
|
}
|
|
@@ -284,11 +285,20 @@ function diffMappings(before, after) {
|
|
|
284
285
|
rebound: rows.filter((r) => r.rebound).length,
|
|
285
286
|
added: added.length,
|
|
286
287
|
};
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
288
|
+
return { verdict: verdictFromCounts(counts), counts, rows, added };
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* The verdict rule, as one function.
|
|
292
|
+
*
|
|
293
|
+
* Extracted so nothing can restate it. `systemicDelta.ts` recomputes a page's
|
|
294
|
+
* verdict after holding a cross-page group out of its rows, and a second copy of
|
|
295
|
+
* this ladder there would be a CLI/MCP dispatch split in another costume: the two
|
|
296
|
+
* would drift, and the drift would be silent because both still return a verdict.
|
|
297
|
+
* Pure, dependency-free, and it reads only counts — safe in the browser bundle.
|
|
298
|
+
*/
|
|
299
|
+
function verdictFromCounts(counts) {
|
|
300
|
+
if (counts.lost > 0 || counts.ambiguous > 0 || counts.rebound > 0)
|
|
301
|
+
return 'BLOCK';
|
|
302
|
+
return counts.healable > 0 ? 'FIX' : 'PASS';
|
|
293
303
|
}
|
|
294
304
|
//# sourceMappingURL=match.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"match.js","sourceRoot":"","sources":["../../src/browser/match.js"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;AAEH,8BAEC;AAGD,wCAmBC;AAeD,oCA4BC;AAoBD,wCAGC;AAcD,gDAUC;AAgCD,oCAiIC;AAnRD,SAAgB,SAAS,CAAC,CAAC;IACzB,OAAO,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAChF,CAAC;AAED,uDAAuD;AACvD,SAAgB,cAAc,CAAC,CAAC,EAAE,CAAC;IACjC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC;QAAE,OAAO,CAAC,CAAC;IACvB,IAAI,CAAC,KAAK,CAAC;QAAE,OAAO,CAAC,CAAC;IACtB,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,CAAC,CAAC;IAC3C,MAAM,OAAO,GAAG,CAAC,CAAC,EAAE,EAAE;QACpB,MAAM,GAAG,GAAG,IAAI,GAAG,EAAE,CAAC;QACtB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;YACtC,MAAM,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;YAC7B,GAAG,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CA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**
|
|
2
|
+
* In-page finder for controls that *reveal* elements — the widened half of discovery.
|
|
3
|
+
*
|
|
4
|
+
* Self-contained by the same rule as `browser/extract.js` and `browser/discover.js`:
|
|
5
|
+
* Playwright serialises it with `toString()` into `page.evaluate()`, so no imports, no
|
|
6
|
+
* closures, no TypeScript. Unlike those two it is **npm-only** — the web tool imports
|
|
7
|
+
* `match.js`, `contract.js` and `extract.js` and nothing else, so a change here owes one
|
|
8
|
+
* publish, not two.
|
|
9
|
+
*
|
|
10
|
+
* ## Why this exists next to `discover.js` rather than replacing it
|
|
11
|
+
*
|
|
12
|
+
* `findRevealTargets` answers "what is safe to open **while crawling for links**". It is
|
|
13
|
+
* deliberately ARIA-only: a crawler that clicks a bare `<button>` on someone's app to find
|
|
14
|
+
* an `href` is trading a large risk for a small reward. That restraint is correct there and
|
|
15
|
+
* must not be loosened — `crawl.ts` keeps using it.
|
|
16
|
+
*
|
|
17
|
+
* This function answers a different question: "what is safe to open **to complete the
|
|
18
|
+
* contract of this page**". The reward is the whole feature — a contract that describes one
|
|
19
|
+
* state of a page describes an application the way a screenshot describes a film. Measured
|
|
20
|
+
* on a React site with no ARIA disclosure attributes at all, the closed state held 105
|
|
21
|
+
* elements and the reachable surface held 303. `findRevealTargets` returns 0 there, because
|
|
22
|
+
* `aria-expanded` is documentation the app never wrote.
|
|
23
|
+
*
|
|
24
|
+
* So the candidate set is widened to bare `<button>`, `[role=tab]` and `[onclick]`, and the
|
|
25
|
+
* safety is moved from *what we are willing to click* to *what a click is allowed to do*:
|
|
26
|
+
* `explore.ts` blocks every non-GET request for the duration. That is a stronger guarantee
|
|
27
|
+
* than an attribute allowlist, because it holds against the app rather than against its
|
|
28
|
+
* markup, and it is the reason widening here is defensible.
|
|
29
|
+
*
|
|
30
|
+
* What is still refused, and why each one:
|
|
31
|
+
* - a navigating `<a href>` — that is navigation, and the page it reaches has a contract
|
|
32
|
+
* of its own. Following it here would fold two pages into one.
|
|
33
|
+
* - `type="submit"` / `type="reset"`, and a bare `<button>` inside a `<form>` (which
|
|
34
|
+
* submits by default) — a blocked POST still leaves the app showing an error state, and
|
|
35
|
+
* a contract captured over an error banner is a lie about the page.
|
|
36
|
+
* - an accessible name that reads like an action (log out, delete, pay…). The network
|
|
37
|
+
* guard already stops the server-side effect; this stops the *client-side* one — a
|
|
38
|
+
* `logout` handler that clears localStorage and re-renders needs no request at all.
|
|
39
|
+
* - `aria-expanded="true"` — already open. Clicking that collapses, which removes elements
|
|
40
|
+
* instead of revealing them.
|
|
41
|
+
*/
|
|
42
|
+
export function findOpenables(): {
|
|
43
|
+
handle: string;
|
|
44
|
+
name: any;
|
|
45
|
+
}[];
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.findOpenables = findOpenables;
|
|
4
|
+
/**
|
|
5
|
+
* In-page finder for controls that *reveal* elements — the widened half of discovery.
|
|
6
|
+
*
|
|
7
|
+
* Self-contained by the same rule as `browser/extract.js` and `browser/discover.js`:
|
|
8
|
+
* Playwright serialises it with `toString()` into `page.evaluate()`, so no imports, no
|
|
9
|
+
* closures, no TypeScript. Unlike those two it is **npm-only** — the web tool imports
|
|
10
|
+
* `match.js`, `contract.js` and `extract.js` and nothing else, so a change here owes one
|
|
11
|
+
* publish, not two.
|
|
12
|
+
*
|
|
13
|
+
* ## Why this exists next to `discover.js` rather than replacing it
|
|
14
|
+
*
|
|
15
|
+
* `findRevealTargets` answers "what is safe to open **while crawling for links**". It is
|
|
16
|
+
* deliberately ARIA-only: a crawler that clicks a bare `<button>` on someone's app to find
|
|
17
|
+
* an `href` is trading a large risk for a small reward. That restraint is correct there and
|
|
18
|
+
* must not be loosened — `crawl.ts` keeps using it.
|
|
19
|
+
*
|
|
20
|
+
* This function answers a different question: "what is safe to open **to complete the
|
|
21
|
+
* contract of this page**". The reward is the whole feature — a contract that describes one
|
|
22
|
+
* state of a page describes an application the way a screenshot describes a film. Measured
|
|
23
|
+
* on a React site with no ARIA disclosure attributes at all, the closed state held 105
|
|
24
|
+
* elements and the reachable surface held 303. `findRevealTargets` returns 0 there, because
|
|
25
|
+
* `aria-expanded` is documentation the app never wrote.
|
|
26
|
+
*
|
|
27
|
+
* So the candidate set is widened to bare `<button>`, `[role=tab]` and `[onclick]`, and the
|
|
28
|
+
* safety is moved from *what we are willing to click* to *what a click is allowed to do*:
|
|
29
|
+
* `explore.ts` blocks every non-GET request for the duration. That is a stronger guarantee
|
|
30
|
+
* than an attribute allowlist, because it holds against the app rather than against its
|
|
31
|
+
* markup, and it is the reason widening here is defensible.
|
|
32
|
+
*
|
|
33
|
+
* What is still refused, and why each one:
|
|
34
|
+
* - a navigating `<a href>` — that is navigation, and the page it reaches has a contract
|
|
35
|
+
* of its own. Following it here would fold two pages into one.
|
|
36
|
+
* - `type="submit"` / `type="reset"`, and a bare `<button>` inside a `<form>` (which
|
|
37
|
+
* submits by default) — a blocked POST still leaves the app showing an error state, and
|
|
38
|
+
* a contract captured over an error banner is a lie about the page.
|
|
39
|
+
* - an accessible name that reads like an action (log out, delete, pay…). The network
|
|
40
|
+
* guard already stops the server-side effect; this stops the *client-side* one — a
|
|
41
|
+
* `logout` handler that clears localStorage and re-renders needs no request at all.
|
|
42
|
+
* - `aria-expanded="true"` — already open. Clicking that collapses, which removes elements
|
|
43
|
+
* instead of revealing them.
|
|
44
|
+
*/
|
|
45
|
+
function findOpenables() {
|
|
46
|
+
// Matched against the accessible name, English + French. Word-bounded so "cancellation
|
|
47
|
+
// policy" is not read as "cancel" — but `\b` does not fire on accented letters in some
|
|
48
|
+
// engines, so the French verbs are also matched bare.
|
|
49
|
+
var ACTION_RE = new RegExp('\\b(log\\s?out|sign\\s?out|logout|signout|delete|remove|destroy|discard|deactivate' +
|
|
50
|
+
'|disable|unsubscribe|revoke|buy|pay|payment|checkout|purchase|order|submit|send' +
|
|
51
|
+
'|confirm|approve|reject|save|reset|publish|cancel|upgrade|subscribe|renew)\\b' +
|
|
52
|
+
'|supprimer|effacer|payer|acheter|commander|envoyer|valider|confirmer|annuler' +
|
|
53
|
+
'|d[ée]connexion|se d[ée]connecter|d[ée]sabonner|r[ée]initialiser|enregistrer', 'i');
|
|
54
|
+
var OPENABLE_SELECTOR = [
|
|
55
|
+
'button',
|
|
56
|
+
'[role="button"]',
|
|
57
|
+
'[role="tab"]',
|
|
58
|
+
'[role="menuitem"]',
|
|
59
|
+
'summary',
|
|
60
|
+
'[aria-haspopup]',
|
|
61
|
+
'[aria-expanded]',
|
|
62
|
+
'[aria-controls]',
|
|
63
|
+
'[onclick]',
|
|
64
|
+
].join(', ');
|
|
65
|
+
function isVisible(el) {
|
|
66
|
+
var rect = el.getBoundingClientRect();
|
|
67
|
+
if (rect.width === 0 || rect.height === 0)
|
|
68
|
+
return false;
|
|
69
|
+
var style = window.getComputedStyle(el);
|
|
70
|
+
return style.visibility !== 'hidden' && style.display !== 'none' && style.opacity !== '0';
|
|
71
|
+
}
|
|
72
|
+
function accName(el) {
|
|
73
|
+
var label = el.getAttribute('aria-label');
|
|
74
|
+
if (label)
|
|
75
|
+
return label.trim().replace(/\s+/g, ' ');
|
|
76
|
+
var labelledBy = el.getAttribute('aria-labelledby');
|
|
77
|
+
if (labelledBy) {
|
|
78
|
+
var joined = labelledBy
|
|
79
|
+
.split(/\s+/)
|
|
80
|
+
.map(function (id) {
|
|
81
|
+
var n = document.getElementById(id);
|
|
82
|
+
return n ? n.textContent : '';
|
|
83
|
+
})
|
|
84
|
+
.join(' ')
|
|
85
|
+
.trim();
|
|
86
|
+
if (joined)
|
|
87
|
+
return joined.replace(/\s+/g, ' ');
|
|
88
|
+
}
|
|
89
|
+
var text = (el.textContent || '').trim().replace(/\s+/g, ' ');
|
|
90
|
+
return text || (el.getAttribute('title') || '').trim();
|
|
91
|
+
}
|
|
92
|
+
var found = document.querySelectorAll(OPENABLE_SELECTOR);
|
|
93
|
+
var out = [];
|
|
94
|
+
var i = 0;
|
|
95
|
+
for (var k = 0; k < found.length; k++) {
|
|
96
|
+
var el = found[k];
|
|
97
|
+
var tag = el.tagName.toLowerCase();
|
|
98
|
+
if (!isVisible(el))
|
|
99
|
+
continue;
|
|
100
|
+
if (el.hasAttribute('disabled') || el.getAttribute('aria-disabled') === 'true')
|
|
101
|
+
continue;
|
|
102
|
+
if (tag === 'a') {
|
|
103
|
+
var href = el.getAttribute('href');
|
|
104
|
+
if (href && href !== '#' && href.indexOf('javascript:') !== 0)
|
|
105
|
+
continue;
|
|
106
|
+
}
|
|
107
|
+
if (tag === 'input')
|
|
108
|
+
continue;
|
|
109
|
+
var type = (el.getAttribute('type') || '').toLowerCase();
|
|
110
|
+
if (type === 'submit' || type === 'reset')
|
|
111
|
+
continue;
|
|
112
|
+
if (tag === 'button' && el.closest('form') && type !== 'button')
|
|
113
|
+
continue;
|
|
114
|
+
if (el.getAttribute('aria-expanded') === 'true')
|
|
115
|
+
continue;
|
|
116
|
+
var name = accName(el);
|
|
117
|
+
if (ACTION_RE.test(name))
|
|
118
|
+
continue;
|
|
119
|
+
// A stamped attribute is the one selector guaranteed to re-find this exact element,
|
|
120
|
+
// and adding a data attribute changes nothing the app reacts to. The stamp does not
|
|
121
|
+
// survive a reload, which is why `explore.ts` re-stamps after every reset.
|
|
122
|
+
el.setAttribute('data-iaqa-open', String(i));
|
|
123
|
+
out.push({ handle: '[data-iaqa-open="' + i + '"]', name: name.slice(0, 80) });
|
|
124
|
+
i++;
|
|
125
|
+
}
|
|
126
|
+
return out;
|
|
127
|
+
}
|
|
128
|
+
//# sourceMappingURL=openables.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openables.js","sourceRoot":"","sources":["../../src/browser/openables.js"],"names":[],"mappings":";;AAyCA,sCAoFC;AA7HD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,SAAgB,aAAa;IAC3B,uFAAuF;IACvF,uFAAuF;IACvF,sDAAsD;IACtD,IAAI,SAAS,GAA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E9B,IAAI,IAAI,GAAG,CAAC,EAAE,CAAC,YAAY,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;QACzD,IAAI,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,OAAO;YAAE,SAAS;QACpD,IAAI,GAAG,KAAK,QAAQ,IAAI,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,IAAI,KAAK,QAAQ;YAAE,SAAS;QAE1E,IAAI,EAAE,CAAC,YAAY,CAAC,eAAe,CAAC,KAAK,MAAM;YAAE,SAAS;QAE1D,IAAI,IAAI,GAAG,OAAO,CAAC,EAAE,CAAC,CAAC;QACvB,IAAI,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC;YAAE,SAAS;QAEnC,oFAAoF;QACpF,oFAAoF;QACpF,2EAA2E;QAC3E,EAAE,CAAC,YAAY,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;QAC7C,GAAG,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,mBAAmB,GAAG,CAAC,GAAG,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC;QAC9E,CAAC,EAAE,CAAC;IACN,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What state was the browser in when this contract was captured?
|
|
3
|
+
*
|
|
4
|
+
* A contract is a photograph of a page, and a page is not a function of the app
|
|
5
|
+
* alone — it is a function of the app *and* the browser state it is read under. A
|
|
6
|
+
* consent banner, an onboarding tooltip, a "what's new" modal, a feature flag in
|
|
7
|
+
* localStorage: each of them makes two honest captures of an unchanged app disagree
|
|
8
|
+
* about dozens of elements.
|
|
9
|
+
*
|
|
10
|
+
* That disagreement is indistinguishable, from the contract alone, from the app
|
|
11
|
+
* having removed those elements. Both look like `lost`. `systemicDelta.ts` needs to
|
|
12
|
+
* tell them apart before it can hold a whole group out of the verdict — opening a
|
|
13
|
+
* gate over a genuinely deleted navbar is the one outcome worse than the noise it
|
|
14
|
+
* is trying to remove. This is the discriminator.
|
|
15
|
+
*
|
|
16
|
+
* **It never records the state, only its shape.** `session.json` is the single
|
|
17
|
+
* secret in `.ia-qa/` — holding it is being logged in — and a contract is a file
|
|
18
|
+
* people commit and paste into issues. So the fingerprint is a hash over *names*:
|
|
19
|
+
* the origins seeded, the localStorage keys, the cookie names. Never a value, never
|
|
20
|
+
* a token, never a session id. What is printed is counts.
|
|
21
|
+
*
|
|
22
|
+
* Hashing names rather than values is also what makes it *useful* rather than merely
|
|
23
|
+
* safe. Logging in again rewrites every cookie value and every expiry; if those fed
|
|
24
|
+
* the hash, each run would report a divergence and the signal would be worthless
|
|
25
|
+
* inside a week. The question is "was this capture read under the same kind of state",
|
|
26
|
+
* and names answer it.
|
|
27
|
+
*/
|
|
28
|
+
export interface CaptureState {
|
|
29
|
+
/** Hash over the state's *shape* — origins, storage keys, cookie names. Never values. */
|
|
30
|
+
fingerprint: string;
|
|
31
|
+
/** Safe to print: "no session" or "2 origins · 1 stored key · 3 cookies". */
|
|
32
|
+
summary: string;
|
|
33
|
+
}
|
|
34
|
+
/** How two moments' capture state compare. `unknown` is a third state, never a match. */
|
|
35
|
+
export type StateComparison = 'identical' | 'diverged' | 'unknown';
|
|
36
|
+
export declare function fingerprintSession(file: string | null | undefined): CaptureState;
|
|
37
|
+
/**
|
|
38
|
+
* The state a capture ran under, from both of its sources.
|
|
39
|
+
*
|
|
40
|
+
* `prepare` has to be in here or A2 lies: two runs with different declared state would
|
|
41
|
+
* fingerprint identically, and `systemicDelta` would then hold a group out of the verdict
|
|
42
|
+
* on the strength of a session that never changed.
|
|
43
|
+
*
|
|
44
|
+
* The two halves are hashed differently, and the asymmetry is the point. A session's
|
|
45
|
+
* **values** are secrets that rotate on every login — feeding them in would report a
|
|
46
|
+
* divergence every run and make the signal worthless inside a week — so only names count.
|
|
47
|
+
* `prepare`'s values are declared by the user, stable, already in a committed file, and
|
|
48
|
+
* semantically load-bearing: `consent=accepted` and `consent=rejected` render different
|
|
49
|
+
* pages. Changing one *is* a change of state, so values count.
|
|
50
|
+
*/
|
|
51
|
+
export declare function captureStateFor(sessionFile: string | null | undefined, prepare: {
|
|
52
|
+
localStorage?: Record<string, string>;
|
|
53
|
+
cookies?: Array<{
|
|
54
|
+
name: string;
|
|
55
|
+
value: string;
|
|
56
|
+
}>;
|
|
57
|
+
} | undefined): CaptureState;
|
|
58
|
+
/**
|
|
59
|
+
* Compare the two moments.
|
|
60
|
+
*
|
|
61
|
+
* `unknown` when either side carries no fingerprint — a baseline captured by an
|
|
62
|
+
* older version, which is every baseline in existence the day this ships. It must
|
|
63
|
+
* never collapse into `identical`: "I cannot tell" and "they match" lead to opposite
|
|
64
|
+
* decisions about whether a group of lost elements is allowed out of the verdict.
|
|
65
|
+
*/
|
|
66
|
+
export declare function compareCaptureState(baseline: CaptureState | undefined, current: CaptureState | undefined): StateComparison;
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.fingerprintSession = fingerprintSession;
|
|
37
|
+
exports.captureStateFor = captureStateFor;
|
|
38
|
+
exports.compareCaptureState = compareCaptureState;
|
|
39
|
+
const crypto = __importStar(require("crypto"));
|
|
40
|
+
const fs = __importStar(require("fs"));
|
|
41
|
+
const NO_SESSION = { fingerprint: 'none', summary: 'no session' };
|
|
42
|
+
function names(list, key) {
|
|
43
|
+
if (!Array.isArray(list))
|
|
44
|
+
return [];
|
|
45
|
+
const out = [];
|
|
46
|
+
for (const entry of list) {
|
|
47
|
+
const v = entry?.[key];
|
|
48
|
+
if (typeof v === 'string')
|
|
49
|
+
out.push(v);
|
|
50
|
+
}
|
|
51
|
+
return out.sort();
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Fingerprint the storageState a capture ran under.
|
|
55
|
+
*
|
|
56
|
+
* A missing or unreadable file is `no session` rather than an error: this is
|
|
57
|
+
* metadata stamped alongside a capture, and failing a 142-page `map` over a
|
|
58
|
+
* descriptive field would trade a whole run for a footnote.
|
|
59
|
+
*/
|
|
60
|
+
// A 142-page `map` asks for this once per page and the answer cannot change mid-walk:
|
|
61
|
+
// the context was built from that file before the first page loaded. Keyed on mtime so
|
|
62
|
+
// a stale entry is impossible rather than merely unlikely.
|
|
63
|
+
const cache = new Map();
|
|
64
|
+
function fingerprintSession(file) {
|
|
65
|
+
if (!file || !fs.existsSync(file))
|
|
66
|
+
return NO_SESSION;
|
|
67
|
+
let key;
|
|
68
|
+
try {
|
|
69
|
+
key = `${file}:${fs.statSync(file).mtimeMs}`;
|
|
70
|
+
}
|
|
71
|
+
catch {
|
|
72
|
+
return NO_SESSION;
|
|
73
|
+
}
|
|
74
|
+
const hit = cache.get(key);
|
|
75
|
+
if (hit)
|
|
76
|
+
return hit;
|
|
77
|
+
let parsed;
|
|
78
|
+
try {
|
|
79
|
+
parsed = JSON.parse(fs.readFileSync(file, 'utf8'));
|
|
80
|
+
}
|
|
81
|
+
catch {
|
|
82
|
+
return NO_SESSION;
|
|
83
|
+
}
|
|
84
|
+
const cookieNames = names(parsed.cookies, 'name');
|
|
85
|
+
const origins = names(parsed.origins, 'origin');
|
|
86
|
+
const storageKeys = [];
|
|
87
|
+
if (Array.isArray(parsed.origins)) {
|
|
88
|
+
for (const o of parsed.origins)
|
|
89
|
+
storageKeys.push(...names(o?.localStorage, 'name'));
|
|
90
|
+
}
|
|
91
|
+
storageKeys.sort();
|
|
92
|
+
if (cookieNames.length === 0 && origins.length === 0 && storageKeys.length === 0) {
|
|
93
|
+
return NO_SESSION;
|
|
94
|
+
}
|
|
95
|
+
const shape = JSON.stringify({ origins, storageKeys, cookieNames });
|
|
96
|
+
const fingerprint = crypto.createHash('sha256').update(shape).digest('hex').slice(0, 16);
|
|
97
|
+
const parts = [
|
|
98
|
+
`${origins.length} origin${origins.length === 1 ? '' : 's'}`,
|
|
99
|
+
`${storageKeys.length} stored key${storageKeys.length === 1 ? '' : 's'}`,
|
|
100
|
+
`${cookieNames.length} cookie${cookieNames.length === 1 ? '' : 's'}`,
|
|
101
|
+
];
|
|
102
|
+
const state = { fingerprint, summary: parts.join(' · ') };
|
|
103
|
+
cache.set(key, state);
|
|
104
|
+
return state;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* The state a capture ran under, from both of its sources.
|
|
108
|
+
*
|
|
109
|
+
* `prepare` has to be in here or A2 lies: two runs with different declared state would
|
|
110
|
+
* fingerprint identically, and `systemicDelta` would then hold a group out of the verdict
|
|
111
|
+
* on the strength of a session that never changed.
|
|
112
|
+
*
|
|
113
|
+
* The two halves are hashed differently, and the asymmetry is the point. A session's
|
|
114
|
+
* **values** are secrets that rotate on every login — feeding them in would report a
|
|
115
|
+
* divergence every run and make the signal worthless inside a week — so only names count.
|
|
116
|
+
* `prepare`'s values are declared by the user, stable, already in a committed file, and
|
|
117
|
+
* semantically load-bearing: `consent=accepted` and `consent=rejected` render different
|
|
118
|
+
* pages. Changing one *is* a change of state, so values count.
|
|
119
|
+
*/
|
|
120
|
+
function captureStateFor(sessionFile, prepare) {
|
|
121
|
+
const session = fingerprintSession(sessionFile);
|
|
122
|
+
// Emptiness has to be measured, not inferred from the field being present: `{}` is
|
|
123
|
+
// truthy, so an empty `prepare` block used to fingerprint differently from no block at
|
|
124
|
+
// all — telling a user their two captures diverged when neither declared anything.
|
|
125
|
+
const local = Object.entries(prepare?.localStorage ?? {}).sort();
|
|
126
|
+
const cookies = (prepare?.cookies ?? []).map((c) => [c.name, c.value]).sort();
|
|
127
|
+
const keys = local.length + cookies.length;
|
|
128
|
+
if (keys === 0)
|
|
129
|
+
return session;
|
|
130
|
+
const shape = JSON.stringify({ session: session.fingerprint, localStorage: local, cookies });
|
|
131
|
+
return {
|
|
132
|
+
fingerprint: crypto.createHash('sha256').update(shape).digest('hex').slice(0, 16),
|
|
133
|
+
summary: `${session.summary} · ${keys} prepared value${keys === 1 ? '' : 's'}`,
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Compare the two moments.
|
|
138
|
+
*
|
|
139
|
+
* `unknown` when either side carries no fingerprint — a baseline captured by an
|
|
140
|
+
* older version, which is every baseline in existence the day this ships. It must
|
|
141
|
+
* never collapse into `identical`: "I cannot tell" and "they match" lead to opposite
|
|
142
|
+
* decisions about whether a group of lost elements is allowed out of the verdict.
|
|
143
|
+
*/
|
|
144
|
+
function compareCaptureState(baseline, current) {
|
|
145
|
+
if (!baseline?.fingerprint || !current?.fingerprint)
|
|
146
|
+
return 'unknown';
|
|
147
|
+
return baseline.fingerprint === current.fingerprint ? 'identical' : 'diverged';
|
|
148
|
+
}
|
|
149
|
+
//# sourceMappingURL=captureState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"captureState.js","sourceRoot":"","sources":["../src/captureState.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsEA,gDA0CC;AAgBD,0CAmBC;AAUD,kDAMC;AAnKD,+CAAiC;AACjC,uCAAyB;AAqCzB,MAAM,UAAU,GAAiB,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC;AAUhF,SAAS,KAAK,CAAC,IAAa,EAAE,GAAW;IACvC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC;QAAE,OAAO,EAAE,CAAC;IACpC,MAAM,GAAG,GAAa,EAAE,CAAC;IACzB,KAAK,MAAM,KAAK,IAAI,IAAI,EAAE,CAAC;QACzB,MAAM,CAAC,GAAI,KAAiC,EAAE,CAAC,GAAG,CAAC,CAAC;QACpD,IAAI,OAAO,CAAC,KAAK,QAAQ;YAAE,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACzC,CAAC;IACD,OAAO,GAAG,CAAC,IAAI,EAAE,CAAC;AACpB,CAAC;AAED;;;;;;GAMG;AACH,sFAAsF;AACtF,uFAAuF;AACvF,2DAA2D;AAC3D,MAAM,KAAK,GAAG,IAAI,GAAG,EAAwB,CAAC;AAE9C,SAAgB,kBAAkB,CAAC,IAA+B;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