@voila.dev/replay 0.0.0-stage → 0.1.1
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/README.md +53 -2
- package/dist/format/index.d.ts +141 -0
- package/dist/format.js +34 -0
- package/dist/modules/index.d.ts +12 -0
- package/dist/modules.js +213 -0
- package/dist/play/index.d.ts +58 -0
- package/dist/play/mirror.d.ts +48 -0
- package/dist/play.js +903 -0
- package/dist/record/index.d.ts +91 -0
- package/dist/record/natives.d.ts +16 -0
- package/dist/record.js +880 -0
- package/dist/send/index.d.ts +57 -0
- package/dist/send.js +241 -0
- package/dist/shared/chunk-6US53Q3A.js +337 -0
- package/dist/testing/cases.d.ts +23 -0
- package/dist/testing/fuzz.d.ts +8 -0
- package/dist/testing/index.d.ts +5 -0
- package/dist/testing/oracle.d.ts +18 -0
- package/dist/testing.js +1207 -0
- package/package.json +63 -5
- package/src/format/index.ts +442 -0
- package/src/modules/index.ts +224 -0
- package/src/play/index.ts +299 -0
- package/src/play/mirror.ts +767 -0
- package/src/record/index.ts +1042 -0
- package/src/record/natives.ts +100 -0
- package/src/send/index.ts +339 -0
- package/src/testing/cases.ts +670 -0
- package/src/testing/fuzz.ts +317 -0
- package/src/testing/index.ts +8 -0
- package/src/testing/oracle.ts +318 -0
package/dist/record.js
ADDED
|
@@ -0,0 +1,880 @@
|
|
|
1
|
+
import {
|
|
2
|
+
FNV_START,
|
|
3
|
+
VERSION,
|
|
4
|
+
fnv
|
|
5
|
+
} from "./shared/chunk-6US53Q3A.js";
|
|
6
|
+
|
|
7
|
+
// src/record/natives.ts
|
|
8
|
+
var NATIVE = /\{\s*\[native code\]\s*\}\s*$/;
|
|
9
|
+
function described(proto, name) {
|
|
10
|
+
for (let p = proto; p; p = Object.getPrototypeOf(p)) {
|
|
11
|
+
const d = Object.getOwnPropertyDescriptor(p, name);
|
|
12
|
+
if (d) return d;
|
|
13
|
+
}
|
|
14
|
+
return void 0;
|
|
15
|
+
}
|
|
16
|
+
function pieces(w) {
|
|
17
|
+
const N = w.Node.prototype;
|
|
18
|
+
const E = w.Element.prototype;
|
|
19
|
+
const g = (proto, name) => described(proto, name)?.get;
|
|
20
|
+
const m = (proto, name) => described(proto, name)?.value;
|
|
21
|
+
return {
|
|
22
|
+
first: g(N, "firstChild"),
|
|
23
|
+
next: g(N, "nextSibling"),
|
|
24
|
+
parent: g(N, "parentNode"),
|
|
25
|
+
attributes: g(E, "attributes"),
|
|
26
|
+
get: m(E, "getAttribute"),
|
|
27
|
+
has: m(E, "hasAttribute"),
|
|
28
|
+
local: g(E, "localName"),
|
|
29
|
+
ns: g(E, "namespaceURI"),
|
|
30
|
+
rect: m(E, "getBoundingClientRect"),
|
|
31
|
+
shadow: g(E, "shadowRoot"),
|
|
32
|
+
host: w.ShadowRoot ? g(w.ShadowRoot.prototype, "host") : void 0,
|
|
33
|
+
content: w.HTMLTemplateElement ? g(w.HTMLTemplateElement.prototype, "content") : void 0,
|
|
34
|
+
Observer: w.MutationObserver
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
function untouched(p) {
|
|
38
|
+
const toString = Function.prototype.toString;
|
|
39
|
+
for (const f of Object.values(p))
|
|
40
|
+
if (typeof f === "function" && !NATIVE.test(toString.call(f))) return false;
|
|
41
|
+
return true;
|
|
42
|
+
}
|
|
43
|
+
function natives(w) {
|
|
44
|
+
let p = pieces(w);
|
|
45
|
+
if (!untouched(p)) {
|
|
46
|
+
const d = w.document;
|
|
47
|
+
const frame = d.createElement("iframe");
|
|
48
|
+
frame.setAttribute("aria-hidden", "true");
|
|
49
|
+
frame.style.display = "none";
|
|
50
|
+
try {
|
|
51
|
+
(d.body || d.documentElement).appendChild(frame);
|
|
52
|
+
const fresh = frame.contentWindow;
|
|
53
|
+
if (fresh) p = pieces(fresh);
|
|
54
|
+
} catch {
|
|
55
|
+
}
|
|
56
|
+
frame.remove();
|
|
57
|
+
}
|
|
58
|
+
const { first, next, parent, attributes, get, has, local, ns, rect, shadow } = p;
|
|
59
|
+
const host = p.host;
|
|
60
|
+
const content = p.content;
|
|
61
|
+
return {
|
|
62
|
+
first: (n) => first.call(n),
|
|
63
|
+
next: (n) => next.call(n),
|
|
64
|
+
parent: (n) => parent.call(n),
|
|
65
|
+
attributes: (el) => attributes.call(el),
|
|
66
|
+
get: (el, name) => get.call(el, name),
|
|
67
|
+
has: (el, name) => has.call(el, name),
|
|
68
|
+
local: (el) => local.call(el),
|
|
69
|
+
ns: (el) => ns.call(el),
|
|
70
|
+
rect: (el) => rect.call(el),
|
|
71
|
+
shadow: (el) => shadow ? shadow.call(el) : null,
|
|
72
|
+
host: (root) => host ? host.call(root) : root.host,
|
|
73
|
+
content: (t) => content ? content.call(t) : t.content,
|
|
74
|
+
Observer: p.Observer
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// src/record/index.ts
|
|
79
|
+
var HTML = "http://www.w3.org/1999/xhtml";
|
|
80
|
+
var SVG = "http://www.w3.org/2000/svg";
|
|
81
|
+
var MATHML = "http://www.w3.org/1998/Math/MathML";
|
|
82
|
+
var STARS = "******";
|
|
83
|
+
var NOT_TYPED = /^(button|submit|reset|image)$/;
|
|
84
|
+
var TOGGLE = /^(checkbox|radio)$/;
|
|
85
|
+
var SENSITIVE_AUTOCOMPLETE = /cc-|one-time-code|password/i;
|
|
86
|
+
var PLAIN = /^(class|id|style|type|role|width|height|src|srcset|sizes|href|rel|media|dir|lang|hidden|disabled|checked|selected|open|colspan|rowspan|for|name|contenteditable|tabindex|viewbox|d|fill|stroke|x|y|cx|cy|r|rx|ry|points|transform|xmlns|slot|part|draggable|loading|decoding|crossorigin|referrerpolicy|async|defer|multiple|readonly|required|min|max|step|autocomplete|inputmode|popover)$/i;
|
|
87
|
+
function supported(w) {
|
|
88
|
+
const W = w;
|
|
89
|
+
return typeof W.Array?.prototype.at === "function" && typeof W.MutationObserver === "function" && typeof W.WeakMap === "function";
|
|
90
|
+
}
|
|
91
|
+
function record(w, o = {}) {
|
|
92
|
+
if (!supported(w)) return null;
|
|
93
|
+
const d = w.document;
|
|
94
|
+
const N = natives(w);
|
|
95
|
+
const mode = o.mask || "inputs";
|
|
96
|
+
const maskAttr = o.maskAttr || "data-va-mask";
|
|
97
|
+
const blockAttr = o.blockAttr || "data-va-block";
|
|
98
|
+
const unmaskAttr = o.unmaskAttr || "data-va-unmask";
|
|
99
|
+
const rate = o.rate ?? 50;
|
|
100
|
+
const budget = o.budget ?? 8e6;
|
|
101
|
+
const printEvery = o.printEvery ?? 3e4;
|
|
102
|
+
const slice = o.slice ?? 8;
|
|
103
|
+
const modules = [...o.modules || []];
|
|
104
|
+
const now = () => Math.round(w.performance.now());
|
|
105
|
+
let ids = /* @__PURE__ */ new WeakMap();
|
|
106
|
+
let seq = 0;
|
|
107
|
+
let tape = [];
|
|
108
|
+
let base = 1;
|
|
109
|
+
let last = now();
|
|
110
|
+
let t0 = Date.now() - last;
|
|
111
|
+
let firstAt = 0;
|
|
112
|
+
let cuts;
|
|
113
|
+
let scanned = 0;
|
|
114
|
+
let bytes = 0;
|
|
115
|
+
let cutAt = 0;
|
|
116
|
+
let spent = 0;
|
|
117
|
+
let timer = 0;
|
|
118
|
+
let lastPrint = 0;
|
|
119
|
+
let stopped = false;
|
|
120
|
+
let ended = 0;
|
|
121
|
+
let dels = [];
|
|
122
|
+
let sheetQueue = [];
|
|
123
|
+
let sheetIds = /* @__PURE__ */ new WeakMap();
|
|
124
|
+
let sheetSeq = 0;
|
|
125
|
+
const dAttr = /* @__PURE__ */ new Map();
|
|
126
|
+
const dText = /* @__PURE__ */ new Set();
|
|
127
|
+
const dKids = /* @__PURE__ */ new Map();
|
|
128
|
+
const left = /* @__PURE__ */ new Map();
|
|
129
|
+
const gone = /* @__PURE__ */ new Map();
|
|
130
|
+
const owner = /* @__PURE__ */ new WeakMap();
|
|
131
|
+
const fields = /* @__PURE__ */ new Set();
|
|
132
|
+
const written = /* @__PURE__ */ new WeakMap();
|
|
133
|
+
const recordedIn = /* @__PURE__ */ new WeakMap();
|
|
134
|
+
const stars = (s) => s.replace(/\S/g, "*");
|
|
135
|
+
const isEl = (n) => n.nodeType === 1;
|
|
136
|
+
const has = (el, name) => N.has(el, name);
|
|
137
|
+
function up(n) {
|
|
138
|
+
const p = N.parent(n);
|
|
139
|
+
if (p) return p;
|
|
140
|
+
if (n.nodeType === 11) return owner.get(n) || n.host || null;
|
|
141
|
+
if (n.nodeType === 9) return owner.get(n) || null;
|
|
142
|
+
return null;
|
|
143
|
+
}
|
|
144
|
+
function masksSelf(el) {
|
|
145
|
+
if (has(el, maskAttr)) return true;
|
|
146
|
+
if (mode === "none") return false;
|
|
147
|
+
const editable = N.get(el, "contenteditable");
|
|
148
|
+
return editable !== null && editable.toLowerCase() !== "false" && !has(el, unmaskAttr);
|
|
149
|
+
}
|
|
150
|
+
function zoneOf(n) {
|
|
151
|
+
let z = mode === "text" ? 1 : 0;
|
|
152
|
+
for (let p = n; p; p = up(p))
|
|
153
|
+
if (isEl(p)) {
|
|
154
|
+
if (has(p, blockAttr)) return 2;
|
|
155
|
+
if (z === 0 && masksSelf(p)) z = 1;
|
|
156
|
+
}
|
|
157
|
+
return z;
|
|
158
|
+
}
|
|
159
|
+
function unmasked(el) {
|
|
160
|
+
for (let p = el; p; p = up(p))
|
|
161
|
+
if (isEl(p) && has(p, unmaskAttr)) return true;
|
|
162
|
+
return false;
|
|
163
|
+
}
|
|
164
|
+
function sensitive(el) {
|
|
165
|
+
const type = String(el.type || "").toLowerCase();
|
|
166
|
+
return type === "password" || type === "hidden" || SENSITIVE_AUTOCOMPLETE.test(N.get(el, "autocomplete") || "");
|
|
167
|
+
}
|
|
168
|
+
function fieldMasked(el, zone) {
|
|
169
|
+
if (sensitive(el)) return true;
|
|
170
|
+
if (mode === "none") return zone !== 0;
|
|
171
|
+
return !unmasked(el);
|
|
172
|
+
}
|
|
173
|
+
const value = (v, hidden) => hidden ? v ? STARS : "" : v;
|
|
174
|
+
function attr(el, tag, name, v, zone) {
|
|
175
|
+
if (/^on/i.test(name)) return void 0;
|
|
176
|
+
if (name === "value" && (tag === "input" || tag === "textarea")) {
|
|
177
|
+
const type = String(el.type || "").toLowerCase();
|
|
178
|
+
if (type === "hidden") return void 0;
|
|
179
|
+
if (!NOT_TYPED.test(type) && !TOGGLE.test(type))
|
|
180
|
+
return value(v, fieldMasked(el, zone));
|
|
181
|
+
}
|
|
182
|
+
if (zone === 1 && !PLAIN.test(name)) return stars(v);
|
|
183
|
+
return v;
|
|
184
|
+
}
|
|
185
|
+
function text(n, data, zone) {
|
|
186
|
+
const p = N.parent(n);
|
|
187
|
+
const tag = p && isEl(p) ? N.local(p) : "";
|
|
188
|
+
if (tag === "style") return data;
|
|
189
|
+
if (tag === "textarea") return value(data, fieldMasked(p, zone));
|
|
190
|
+
return zone === 1 ? stars(data) : data;
|
|
191
|
+
}
|
|
192
|
+
function selectOf(option) {
|
|
193
|
+
for (let p = N.parent(option), k = 0; p && k < 2; p = N.parent(p), k++)
|
|
194
|
+
if (isEl(p) && N.local(p) === "select") return p;
|
|
195
|
+
return null;
|
|
196
|
+
}
|
|
197
|
+
let picks = /* @__PURE__ */ new Map();
|
|
198
|
+
function defaults(select) {
|
|
199
|
+
let set = picks.get(select);
|
|
200
|
+
if (set) return set;
|
|
201
|
+
set = /* @__PURE__ */ new Set();
|
|
202
|
+
const options = Array.from(select.options);
|
|
203
|
+
if (select.multiple || select.size > 1) {
|
|
204
|
+
for (const o2 of options) if (has(o2, "selected")) set.add(o2);
|
|
205
|
+
} else {
|
|
206
|
+
let pick;
|
|
207
|
+
for (const o2 of options) if (has(o2, "selected")) pick = o2;
|
|
208
|
+
pick ||= options.find((o2) => !o2.disabled);
|
|
209
|
+
if (pick) set.add(pick);
|
|
210
|
+
}
|
|
211
|
+
picks.set(select, set);
|
|
212
|
+
return set;
|
|
213
|
+
}
|
|
214
|
+
function state(el, zone) {
|
|
215
|
+
const tag = N.local(el);
|
|
216
|
+
if (tag === "option") {
|
|
217
|
+
const select = selectOf(el);
|
|
218
|
+
if (select && (zone === 2 || fieldMasked(select, zoneOf(select)))) return defaults(select).has(el) ? 1 : 0;
|
|
219
|
+
return el.selected ? 1 : 0;
|
|
220
|
+
}
|
|
221
|
+
if (tag === "dialog") return void 0;
|
|
222
|
+
const type = String(el.type || "").toLowerCase();
|
|
223
|
+
if (type === "hidden" || type === "file") return void 0;
|
|
224
|
+
if (TOGGLE.test(type)) return el.checked ? 1 : 0;
|
|
225
|
+
if (NOT_TYPED.test(type)) return void 0;
|
|
226
|
+
return value(String(el.value ?? ""), fieldMasked(el, zone));
|
|
227
|
+
}
|
|
228
|
+
function initial(el, zone) {
|
|
229
|
+
const tag = N.local(el);
|
|
230
|
+
if (tag === "option") return has(el, "selected") ? 1 : 0;
|
|
231
|
+
const type = String(el.type || "").toLowerCase();
|
|
232
|
+
if (TOGGLE.test(type)) return has(el, "checked") ? 1 : 0;
|
|
233
|
+
if (tag === "textarea")
|
|
234
|
+
return value(String(el.defaultValue ?? ""), fieldMasked(el, zone));
|
|
235
|
+
return value(N.get(el, "value") || "", fieldMasked(el, zone));
|
|
236
|
+
}
|
|
237
|
+
function openState(el) {
|
|
238
|
+
let s = 0;
|
|
239
|
+
try {
|
|
240
|
+
if (el.matches(":modal")) return 2;
|
|
241
|
+
} catch {
|
|
242
|
+
}
|
|
243
|
+
if (N.local(el) === "dialog") s = has(el, "open") ? 1 : 0;
|
|
244
|
+
try {
|
|
245
|
+
if (el.matches(":popover-open")) s = 1;
|
|
246
|
+
} catch {
|
|
247
|
+
}
|
|
248
|
+
return s;
|
|
249
|
+
}
|
|
250
|
+
function cut(mark, name) {
|
|
251
|
+
if (!cuts) return;
|
|
252
|
+
for (; scanned < tape.length; scanned++) {
|
|
253
|
+
const t = tape[scanned];
|
|
254
|
+
bytes += typeof t === "string" ? Math.min(t.length, 64) + 3 : 3;
|
|
255
|
+
}
|
|
256
|
+
const size2 = bytes - cutAt;
|
|
257
|
+
if (size2 < 512) return;
|
|
258
|
+
let h = fnv(FNV_START, tape.length - mark);
|
|
259
|
+
for (let i = 0; i < name.length; i++) h = fnv(h, name.charCodeAt(i));
|
|
260
|
+
if ((h & 63) === 0 || size2 >= 16384) {
|
|
261
|
+
cuts.push(tape.length);
|
|
262
|
+
cutAt = bytes;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
function ser(n, zone) {
|
|
266
|
+
const known = ids.get(n);
|
|
267
|
+
if (known) {
|
|
268
|
+
if (recordedIn.get(n) === zone) {
|
|
269
|
+
tape.push(8 /* R */, known);
|
|
270
|
+
if (isEl(n) && N.local(n) === "option") {
|
|
271
|
+
const select = selectOf(n);
|
|
272
|
+
if (select) for (const o2 of Array.from(select.options)) written.delete(o2);
|
|
273
|
+
}
|
|
274
|
+
return;
|
|
275
|
+
}
|
|
276
|
+
tape.push(17 /* DEL */, known);
|
|
277
|
+
forget(n);
|
|
278
|
+
}
|
|
279
|
+
recordedIn.set(n, zone);
|
|
280
|
+
const type = n.nodeType;
|
|
281
|
+
if (type === 3) {
|
|
282
|
+
ids.set(n, ++seq);
|
|
283
|
+
tape.push(2 /* T */, text(n, n.data, zone));
|
|
284
|
+
return;
|
|
285
|
+
}
|
|
286
|
+
if (type === 10) {
|
|
287
|
+
const t = n;
|
|
288
|
+
ids.set(n, ++seq);
|
|
289
|
+
tape.push(3 /* D */, t.name, t.publicId, t.systemId);
|
|
290
|
+
return;
|
|
291
|
+
}
|
|
292
|
+
if (type !== 1) return;
|
|
293
|
+
const el = n;
|
|
294
|
+
const tag = N.local(el);
|
|
295
|
+
const ns = N.ns(el);
|
|
296
|
+
if (tag === "script" || tag === "noscript" && ns === HTML) return;
|
|
297
|
+
const name = ns === HTML || ns === null ? tag : `${ns === SVG ? "s" : ns === MATHML ? "m" : ns} ${tag}`;
|
|
298
|
+
if (zone !== 2 && has(el, blockAttr)) zone = 2;
|
|
299
|
+
ids.set(n, ++seq);
|
|
300
|
+
if (tag === "option" && ns === HTML) {
|
|
301
|
+
const select = selectOf(el);
|
|
302
|
+
if (select) for (const o2 of Array.from(select.options)) written.delete(o2);
|
|
303
|
+
fields.add(el);
|
|
304
|
+
}
|
|
305
|
+
if (zone === 2) {
|
|
306
|
+
const box = N.rect(el);
|
|
307
|
+
tape.push(4 /* B */, name, Math.round(box.width), Math.round(box.height));
|
|
308
|
+
return;
|
|
309
|
+
}
|
|
310
|
+
if (zone === 0 && masksSelf(el)) zone = 1;
|
|
311
|
+
const mark = tape.length;
|
|
312
|
+
tape.push(1 /* E */, name, 0);
|
|
313
|
+
const list = N.attributes(el);
|
|
314
|
+
let count = 0;
|
|
315
|
+
for (let i = 0; i < list.length; i++) {
|
|
316
|
+
const a = list[i];
|
|
317
|
+
const v = attr(el, tag, a.name, a.value, zone);
|
|
318
|
+
if (v === void 0) continue;
|
|
319
|
+
tape.push(a.name, v);
|
|
320
|
+
count++;
|
|
321
|
+
}
|
|
322
|
+
tape[mark + 2] = count;
|
|
323
|
+
if (ns === HTML) {
|
|
324
|
+
if (tag === "input" || tag === "textarea" || tag === "option") {
|
|
325
|
+
fields.add(el);
|
|
326
|
+
const v = tag === "input" ? initial(el, zone) : void 0;
|
|
327
|
+
if (v === void 0) written.delete(el);
|
|
328
|
+
else written.set(el, v);
|
|
329
|
+
} else if (tag === "dialog" || has(el, "popover")) {
|
|
330
|
+
fields.add(el);
|
|
331
|
+
written.set(el, tag === "dialog" && has(el, "open") ? 1 : 0);
|
|
332
|
+
} else if (tag === "style" || tag === "link" && /stylesheet/i.test(N.get(el, "rel") || ""))
|
|
333
|
+
sheetQueue.push(el);
|
|
334
|
+
}
|
|
335
|
+
for (const m of modules) if (m.onElement) guard(m, () => m.onElement?.(el, zone));
|
|
336
|
+
if (tag === "template" && ns === HTML) {
|
|
337
|
+
const content = N.content(el);
|
|
338
|
+
ids.set(content, ++seq);
|
|
339
|
+
owner.set(content, el);
|
|
340
|
+
observe(content);
|
|
341
|
+
tape.push(5 /* TPL */);
|
|
342
|
+
for (let c = N.first(content); c; c = N.next(c)) ser(c, zone);
|
|
343
|
+
tape.push(0 /* X */);
|
|
344
|
+
}
|
|
345
|
+
for (let c = N.first(el); c; c = N.next(c)) ser(c, zone);
|
|
346
|
+
tape.push(0 /* X */);
|
|
347
|
+
cut(mark, name);
|
|
348
|
+
}
|
|
349
|
+
function forget(n, inner) {
|
|
350
|
+
const id = ids.get(n);
|
|
351
|
+
if (!id) return;
|
|
352
|
+
ids.delete(n);
|
|
353
|
+
if (inner) {
|
|
354
|
+
gone.set(n, id);
|
|
355
|
+
const p = N.parent(n);
|
|
356
|
+
if (p && dKids.get(p)?.has(n)) dels.push(id);
|
|
357
|
+
}
|
|
358
|
+
if (isEl(n)) {
|
|
359
|
+
fields.delete(n);
|
|
360
|
+
if (N.local(n) === "template") forget(N.content(n), 1);
|
|
361
|
+
}
|
|
362
|
+
for (let c = N.first(n); c; c = N.next(c)) forget(c, 1);
|
|
363
|
+
for (const m of modules) {
|
|
364
|
+
const tree = m.inner ? safe(m, () => m.inner?.(n)) : null;
|
|
365
|
+
if (tree) forget(tree, 1);
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
const off = /* @__PURE__ */ new Set();
|
|
369
|
+
let resnap = false;
|
|
370
|
+
function guard(m, f) {
|
|
371
|
+
if (off.has(m)) return;
|
|
372
|
+
const mark = tape.length;
|
|
373
|
+
const numbered = seq;
|
|
374
|
+
try {
|
|
375
|
+
f();
|
|
376
|
+
} catch {
|
|
377
|
+
off.add(m);
|
|
378
|
+
tape.length = mark;
|
|
379
|
+
if (seq !== numbered) {
|
|
380
|
+
seq = numbered;
|
|
381
|
+
resnap = true;
|
|
382
|
+
}
|
|
383
|
+
tape.push(129 /* ERR */, 1, m.name);
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
function safe(m, f) {
|
|
387
|
+
let out;
|
|
388
|
+
guard(m, () => {
|
|
389
|
+
out = f();
|
|
390
|
+
});
|
|
391
|
+
return out;
|
|
392
|
+
}
|
|
393
|
+
function stamp() {
|
|
394
|
+
const t = now();
|
|
395
|
+
if (!firstAt) firstAt = t;
|
|
396
|
+
if (t > last) {
|
|
397
|
+
tape.push(48 /* TICK */, t - last);
|
|
398
|
+
last = t;
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
function nearest(n) {
|
|
402
|
+
for (let p = n; p; p = up(p)) {
|
|
403
|
+
const id = ids.get(p);
|
|
404
|
+
if (id) return id;
|
|
405
|
+
}
|
|
406
|
+
return 0;
|
|
407
|
+
}
|
|
408
|
+
let moveAt = 0;
|
|
409
|
+
let moveTimer = 0;
|
|
410
|
+
let px = 0;
|
|
411
|
+
let py = 0;
|
|
412
|
+
let movePending = false;
|
|
413
|
+
function move() {
|
|
414
|
+
moveTimer = 0;
|
|
415
|
+
if (!movePending || stopped) return;
|
|
416
|
+
movePending = false;
|
|
417
|
+
moveAt = now();
|
|
418
|
+
stamp();
|
|
419
|
+
tape.push(49 /* MOVE */, px, py);
|
|
420
|
+
}
|
|
421
|
+
const scrolled = /* @__PURE__ */ new Set();
|
|
422
|
+
let scrollTimer = 0;
|
|
423
|
+
function scrolls() {
|
|
424
|
+
scrollTimer = 0;
|
|
425
|
+
if (stopped) return;
|
|
426
|
+
stamp();
|
|
427
|
+
scrolled.forEach((n) => {
|
|
428
|
+
const id = ids.get(n);
|
|
429
|
+
const el = n.nodeType === 9 ? n.scrollingElement : n;
|
|
430
|
+
if (id && el) tape.push(51 /* SCROLL */, n === d ? 1 : id, Math.round(el.scrollLeft), Math.round(el.scrollTop));
|
|
431
|
+
});
|
|
432
|
+
scrolled.clear();
|
|
433
|
+
}
|
|
434
|
+
let sizeTimer = 0;
|
|
435
|
+
function size() {
|
|
436
|
+
sizeTimer = 0;
|
|
437
|
+
if (stopped) return;
|
|
438
|
+
stamp();
|
|
439
|
+
tape.push(52 /* SIZE */, w.innerWidth, w.innerHeight);
|
|
440
|
+
}
|
|
441
|
+
function point(e) {
|
|
442
|
+
let x = e.clientX;
|
|
443
|
+
let y = e.clientY;
|
|
444
|
+
let view = e.view || e.target?.ownerDocument?.defaultView;
|
|
445
|
+
while (view && view !== w) {
|
|
446
|
+
const frame = view.frameElement;
|
|
447
|
+
if (!frame) break;
|
|
448
|
+
const r = frame.getBoundingClientRect();
|
|
449
|
+
x += r.left + frame.clientLeft;
|
|
450
|
+
y += r.top + frame.clientTop;
|
|
451
|
+
view = frame.ownerDocument.defaultView;
|
|
452
|
+
}
|
|
453
|
+
return [Math.round(x), Math.round(y)];
|
|
454
|
+
}
|
|
455
|
+
const stops = [];
|
|
456
|
+
function listen(root) {
|
|
457
|
+
const on = (type, f) => {
|
|
458
|
+
const listener = f;
|
|
459
|
+
root.addEventListener(type, listener, { capture: true, passive: true });
|
|
460
|
+
stops.push(() => root.removeEventListener(type, listener, true));
|
|
461
|
+
};
|
|
462
|
+
const target = (e) => (e.composedPath ? e.composedPath()[0] : e.target) || null;
|
|
463
|
+
on("pointermove", (e) => {
|
|
464
|
+
[px, py] = point(e);
|
|
465
|
+
movePending = true;
|
|
466
|
+
const wait = 20 - (now() - moveAt);
|
|
467
|
+
if (wait <= 0) move();
|
|
468
|
+
else if (!moveTimer) moveTimer = setTimeout(move, wait);
|
|
469
|
+
});
|
|
470
|
+
const tap = (kind) => (e) => {
|
|
471
|
+
if (movePending) move();
|
|
472
|
+
const [x, y] = point(e);
|
|
473
|
+
stamp();
|
|
474
|
+
tape.push(50 /* TAP */, kind, nearest(target(e)), x, y);
|
|
475
|
+
};
|
|
476
|
+
on("pointerdown", tap(1));
|
|
477
|
+
on("pointerup", tap(2));
|
|
478
|
+
on("click", tap(3));
|
|
479
|
+
on("scroll", (e) => {
|
|
480
|
+
const t = target(e);
|
|
481
|
+
if (!t) return;
|
|
482
|
+
scrolled.add(t.nodeType === 9 || t === d.documentElement ? d : t);
|
|
483
|
+
if (!scrollTimer) scrollTimer = setTimeout(scrolls, 16);
|
|
484
|
+
});
|
|
485
|
+
on("focusin", (e) => {
|
|
486
|
+
stamp();
|
|
487
|
+
tape.push(53 /* FOCUS */, nearest(target(e)));
|
|
488
|
+
});
|
|
489
|
+
on("focusout", (e) => {
|
|
490
|
+
if (e.relatedTarget) return;
|
|
491
|
+
stamp();
|
|
492
|
+
tape.push(53 /* FOCUS */, 0);
|
|
493
|
+
});
|
|
494
|
+
const typed = () => kick();
|
|
495
|
+
on("input", typed);
|
|
496
|
+
on("change", typed);
|
|
497
|
+
}
|
|
498
|
+
function kick() {
|
|
499
|
+
if (timer || stopped) return;
|
|
500
|
+
const idle = w.requestIdleCallback;
|
|
501
|
+
timer = setTimeout(() => idle ? idle(() => sync(), { timeout: 100 }) : sync(), rate);
|
|
502
|
+
}
|
|
503
|
+
function drop(n) {
|
|
504
|
+
const id = ids.get(n) || gone.get(n);
|
|
505
|
+
if (id) {
|
|
506
|
+
dels.push(id);
|
|
507
|
+
forget(n);
|
|
508
|
+
return;
|
|
509
|
+
}
|
|
510
|
+
for (let c = N.first(n); c; c = N.next(c)) drop(c);
|
|
511
|
+
for (const m of modules) {
|
|
512
|
+
const tree = m.inner ? safe(m, () => m.inner?.(n)) : null;
|
|
513
|
+
if (tree) drop(tree);
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
const open = (n) => !!n && ids.has(n) && !(isEl(n) && has(n, blockAttr));
|
|
517
|
+
function touch(parent, n) {
|
|
518
|
+
let set = dKids.get(parent);
|
|
519
|
+
if (!set) dKids.set(parent, set = /* @__PURE__ */ new Set());
|
|
520
|
+
set.add(n);
|
|
521
|
+
}
|
|
522
|
+
function redo(el) {
|
|
523
|
+
if (!ids.has(el)) return;
|
|
524
|
+
const p = N.parent(el) || owner.get(el) || null;
|
|
525
|
+
drop(el);
|
|
526
|
+
if (p && open(p)) touch(p, el);
|
|
527
|
+
kick();
|
|
528
|
+
}
|
|
529
|
+
const ZONE_ATTRS = /* @__PURE__ */ new Set([blockAttr, maskAttr, unmaskAttr, "contenteditable"]);
|
|
530
|
+
function seen(records) {
|
|
531
|
+
if (!records.length) return;
|
|
532
|
+
for (const r of records) {
|
|
533
|
+
const target = r.target;
|
|
534
|
+
if (r.type === "childList") {
|
|
535
|
+
const removed = r.removedNodes;
|
|
536
|
+
for (let i = 0; i < removed.length; i++) {
|
|
537
|
+
const n = removed[i];
|
|
538
|
+
if (!n.isConnected) drop(n);
|
|
539
|
+
else {
|
|
540
|
+
const id = ids.get(n) || gone.get(n);
|
|
541
|
+
if (id) left.set(n, id);
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
if (open(target)) {
|
|
545
|
+
r.addedNodes.forEach((n) => touch(target, n));
|
|
546
|
+
removed.forEach((n) => touch(target, n));
|
|
547
|
+
}
|
|
548
|
+
} else if (ids.has(target)) {
|
|
549
|
+
if (r.type === "attributes") {
|
|
550
|
+
const name = r.attributeName;
|
|
551
|
+
if (ZONE_ATTRS.has(name)) {
|
|
552
|
+
redo(target);
|
|
553
|
+
continue;
|
|
554
|
+
}
|
|
555
|
+
let names = dAttr.get(target);
|
|
556
|
+
if (!names) dAttr.set(target, names = /* @__PURE__ */ new Set());
|
|
557
|
+
names.add(name);
|
|
558
|
+
} else dText.add(target);
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
kick();
|
|
562
|
+
}
|
|
563
|
+
const observer = new N.Observer(seen);
|
|
564
|
+
const observe = (root) => observer.observe(root, {
|
|
565
|
+
childList: true,
|
|
566
|
+
attributes: true,
|
|
567
|
+
characterData: true,
|
|
568
|
+
subtree: true
|
|
569
|
+
});
|
|
570
|
+
function resume() {
|
|
571
|
+
const s = w.scheduler;
|
|
572
|
+
if (s?.yield) s.yield().then(() => sync());
|
|
573
|
+
else timer = setTimeout(() => sync(), 0);
|
|
574
|
+
}
|
|
575
|
+
function sync(whole) {
|
|
576
|
+
timer = 0;
|
|
577
|
+
if (stopped) return;
|
|
578
|
+
const began = w.performance.now();
|
|
579
|
+
let cut2 = false;
|
|
580
|
+
seen(observer.takeRecords());
|
|
581
|
+
timer = 0;
|
|
582
|
+
const before = tape.length;
|
|
583
|
+
const lastBefore = last;
|
|
584
|
+
stamp();
|
|
585
|
+
const start = tape.length;
|
|
586
|
+
for (const id of dels) tape.push(17 /* DEL */, id);
|
|
587
|
+
dels = [];
|
|
588
|
+
const fresh = seq + 1;
|
|
589
|
+
const zones = /* @__PURE__ */ new Map();
|
|
590
|
+
const zone = (n) => {
|
|
591
|
+
let z = zones.get(n);
|
|
592
|
+
if (z === void 0) zones.set(n, z = zoneOf(n));
|
|
593
|
+
return z;
|
|
594
|
+
};
|
|
595
|
+
for (const [parent, touched] of dKids) {
|
|
596
|
+
if (cut2) break;
|
|
597
|
+
dKids.delete(parent);
|
|
598
|
+
const pid = ids.get(parent);
|
|
599
|
+
if (!pid || pid >= fresh) continue;
|
|
600
|
+
const z = zone(parent);
|
|
601
|
+
touched.forEach((t) => {
|
|
602
|
+
if (N.parent(t) !== parent) return;
|
|
603
|
+
let s = t.previousSibling;
|
|
604
|
+
while (s && !touched.has(s) && !ids.has(s)) s = s.previousSibling;
|
|
605
|
+
if (s && touched.has(s)) return;
|
|
606
|
+
const run = [];
|
|
607
|
+
let n = t;
|
|
608
|
+
for (; n; n = N.next(n))
|
|
609
|
+
if (touched.has(n)) run.push(n);
|
|
610
|
+
else if (ids.has(n)) break;
|
|
611
|
+
const mark = tape.length;
|
|
612
|
+
tape.push(16 /* INS */, pid, n ? ids.get(n) : 0);
|
|
613
|
+
for (const node of run) ser(node, z);
|
|
614
|
+
if (tape.length === mark + 3) tape.length = mark;
|
|
615
|
+
else tape.push(0 /* X */);
|
|
616
|
+
});
|
|
617
|
+
if (!whole && w.performance.now() - began >= slice) cut2 = true;
|
|
618
|
+
}
|
|
619
|
+
dKids.forEach((_, parent) => {
|
|
620
|
+
const pid = ids.get(parent);
|
|
621
|
+
if (!pid || pid >= fresh) dKids.delete(parent);
|
|
622
|
+
});
|
|
623
|
+
if (!dKids.size) cut2 = false;
|
|
624
|
+
left.forEach((id, n) => {
|
|
625
|
+
if (ids.get(n) !== id) tape.push(17 /* DEL */, id);
|
|
626
|
+
else if (!(n.isConnected && open(N.parent(n) || owner.get(n) || null))) {
|
|
627
|
+
tape.push(17 /* DEL */, id);
|
|
628
|
+
forget(n);
|
|
629
|
+
}
|
|
630
|
+
});
|
|
631
|
+
left.clear();
|
|
632
|
+
gone.clear();
|
|
633
|
+
dAttr.forEach((names, el) => {
|
|
634
|
+
const id = ids.get(el);
|
|
635
|
+
if (!id || id >= fresh) return;
|
|
636
|
+
const z = zone(el);
|
|
637
|
+
if (z === 2) return;
|
|
638
|
+
const tag = N.local(el);
|
|
639
|
+
names.forEach((name) => {
|
|
640
|
+
const v = N.get(el, name);
|
|
641
|
+
const out = v === null ? null : attr(el, tag, name, v, z);
|
|
642
|
+
if (out !== void 0) tape.push(18 /* ATTR */, id, name, out);
|
|
643
|
+
if (name === "value" || name === "checked" || name === "selected") written.delete(el);
|
|
644
|
+
if (name === "selected" && tag === "option") {
|
|
645
|
+
const select = selectOf(el);
|
|
646
|
+
if (select) for (const o2 of Array.from(select.options)) written.delete(o2);
|
|
647
|
+
}
|
|
648
|
+
});
|
|
649
|
+
});
|
|
650
|
+
dAttr.clear();
|
|
651
|
+
dText.forEach((n) => {
|
|
652
|
+
const id = ids.get(n);
|
|
653
|
+
if (id && id < fresh) tape.push(19 /* TEXT */, id, text(n, n.data, zone(n)));
|
|
654
|
+
});
|
|
655
|
+
dText.clear();
|
|
656
|
+
picks = /* @__PURE__ */ new Map();
|
|
657
|
+
fields.forEach((el) => {
|
|
658
|
+
const id = ids.get(el);
|
|
659
|
+
if (!id) return;
|
|
660
|
+
const tag = N.local(el);
|
|
661
|
+
let v;
|
|
662
|
+
let op = 20 /* VAL */;
|
|
663
|
+
if (tag === "dialog" || has(el, "popover")) {
|
|
664
|
+
v = openState(el);
|
|
665
|
+
op = 21 /* OPEN */;
|
|
666
|
+
} else v = state(el, zone(el));
|
|
667
|
+
if (v === void 0 || written.get(el) === v) return;
|
|
668
|
+
written.set(el, v);
|
|
669
|
+
tape.push(op, id, v);
|
|
670
|
+
});
|
|
671
|
+
readSheets();
|
|
672
|
+
for (const m of modules) if (m.onSync) guard(m, () => m.onSync?.());
|
|
673
|
+
if (cut2) resume();
|
|
674
|
+
else if (printEvery && last - lastPrint >= printEvery) {
|
|
675
|
+
lastPrint = last;
|
|
676
|
+
const [count, hash] = fingerprintOf(d);
|
|
677
|
+
tape.push(97 /* PRINT */, count, hash);
|
|
678
|
+
}
|
|
679
|
+
if (tape.length === start) {
|
|
680
|
+
tape.length = before;
|
|
681
|
+
last = lastBefore;
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
function readSheets() {
|
|
685
|
+
for (const el of sheetQueue.splice(0)) {
|
|
686
|
+
const id = ids.get(el);
|
|
687
|
+
if (!id) continue;
|
|
688
|
+
try {
|
|
689
|
+
const sheet = el.sheet;
|
|
690
|
+
if (!sheet) {
|
|
691
|
+
el.addEventListener(
|
|
692
|
+
"load",
|
|
693
|
+
() => {
|
|
694
|
+
sheetQueue.push(el);
|
|
695
|
+
kick();
|
|
696
|
+
},
|
|
697
|
+
{ once: true }
|
|
698
|
+
);
|
|
699
|
+
continue;
|
|
700
|
+
}
|
|
701
|
+
if (N.local(el) === "style" && (!sheet.cssRules.length || (el.textContent || "").trim()))
|
|
702
|
+
continue;
|
|
703
|
+
let css = "";
|
|
704
|
+
for (const rule of Array.from(sheet.cssRules)) css += rule.cssText;
|
|
705
|
+
tape.push(32 /* SHEET */, id, kit.sheet(sheet), css);
|
|
706
|
+
} catch {
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
function fingerprintOf(root) {
|
|
711
|
+
let count = 0;
|
|
712
|
+
let h = FNV_START;
|
|
713
|
+
const walk = (n) => {
|
|
714
|
+
for (let c = N.first(n); c; c = N.next(c)) {
|
|
715
|
+
if (!ids.has(c)) continue;
|
|
716
|
+
count++;
|
|
717
|
+
h = fnv(h, c.nodeType);
|
|
718
|
+
if (isEl(c)) {
|
|
719
|
+
const tag = N.local(c);
|
|
720
|
+
h = fnv(h, tag.length);
|
|
721
|
+
h = fnv(h, tag.charCodeAt(0));
|
|
722
|
+
if (has(c, blockAttr)) continue;
|
|
723
|
+
if (tag === "template") walk(N.content(c));
|
|
724
|
+
walk(c);
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
};
|
|
728
|
+
walk(root);
|
|
729
|
+
return [count, h];
|
|
730
|
+
}
|
|
731
|
+
const kit = {
|
|
732
|
+
w,
|
|
733
|
+
d,
|
|
734
|
+
native: N,
|
|
735
|
+
ser,
|
|
736
|
+
push: (...tokens) => {
|
|
737
|
+
tape.push(...tokens);
|
|
738
|
+
},
|
|
739
|
+
stamp,
|
|
740
|
+
id: (n) => ids.get(n),
|
|
741
|
+
take: (root, host) => {
|
|
742
|
+
ids.set(root, ++seq);
|
|
743
|
+
owner.set(root, host);
|
|
744
|
+
return seq;
|
|
745
|
+
},
|
|
746
|
+
zone: zoneOf,
|
|
747
|
+
sheet: (s) => {
|
|
748
|
+
let k = sheetIds.get(s);
|
|
749
|
+
if (k === void 0) sheetIds.set(s, k = ++sheetSeq);
|
|
750
|
+
return k;
|
|
751
|
+
},
|
|
752
|
+
sheetKnown: (s) => sheetIds.has(s),
|
|
753
|
+
observe,
|
|
754
|
+
listen,
|
|
755
|
+
redo,
|
|
756
|
+
dirty: kick,
|
|
757
|
+
masked: stars
|
|
758
|
+
};
|
|
759
|
+
const onResize = () => {
|
|
760
|
+
if (!sizeTimer) sizeTimer = setTimeout(size, 100);
|
|
761
|
+
};
|
|
762
|
+
const onHide = () => {
|
|
763
|
+
stamp();
|
|
764
|
+
tape.push(54 /* HIDE */, d.hidden ? 1 : 0);
|
|
765
|
+
};
|
|
766
|
+
const onShow = (e) => {
|
|
767
|
+
if (e.persisted) resnap = true;
|
|
768
|
+
};
|
|
769
|
+
w.addEventListener("resize", onResize);
|
|
770
|
+
w.addEventListener("pageshow", onShow);
|
|
771
|
+
d.addEventListener("visibilitychange", onHide);
|
|
772
|
+
listen(d);
|
|
773
|
+
observe(d);
|
|
774
|
+
const poll = setInterval(() => {
|
|
775
|
+
if (fields.size) kick();
|
|
776
|
+
}, 500);
|
|
777
|
+
for (const m of modules) if (m.setup) guard(m, () => m.setup?.(kit));
|
|
778
|
+
function weigh(t) {
|
|
779
|
+
for (const token of t) spent += typeof token === "string" ? token.length + 3 : 3;
|
|
780
|
+
if (spent > budget && !stopped) stop(2 /* Budget */);
|
|
781
|
+
}
|
|
782
|
+
function stop(reason) {
|
|
783
|
+
if (stopped) return;
|
|
784
|
+
stopped = true;
|
|
785
|
+
if (reason) ended = reason;
|
|
786
|
+
observer.disconnect();
|
|
787
|
+
clearTimeout(timer);
|
|
788
|
+
clearTimeout(moveTimer);
|
|
789
|
+
clearTimeout(scrollTimer);
|
|
790
|
+
clearTimeout(sizeTimer);
|
|
791
|
+
clearInterval(poll);
|
|
792
|
+
w.removeEventListener("resize", onResize);
|
|
793
|
+
w.removeEventListener("pageshow", onShow);
|
|
794
|
+
d.removeEventListener("visibilitychange", onHide);
|
|
795
|
+
for (const f of stops) f();
|
|
796
|
+
for (const m of modules) if (m.onStop) guard(m, () => m.onStop?.());
|
|
797
|
+
}
|
|
798
|
+
return {
|
|
799
|
+
snap() {
|
|
800
|
+
ids = /* @__PURE__ */ new WeakMap();
|
|
801
|
+
sheetIds = /* @__PURE__ */ new WeakMap();
|
|
802
|
+
sheetSeq = 0;
|
|
803
|
+
seq = 1;
|
|
804
|
+
ids.set(d, 1);
|
|
805
|
+
dels = [];
|
|
806
|
+
sheetQueue = [];
|
|
807
|
+
dAttr.clear();
|
|
808
|
+
dText.clear();
|
|
809
|
+
dKids.clear();
|
|
810
|
+
left.clear();
|
|
811
|
+
gone.clear();
|
|
812
|
+
fields.clear();
|
|
813
|
+
observer.takeRecords();
|
|
814
|
+
last = now();
|
|
815
|
+
t0 = Date.now() - last;
|
|
816
|
+
lastPrint = last;
|
|
817
|
+
tape = [
|
|
818
|
+
96 /* META */,
|
|
819
|
+
VERSION,
|
|
820
|
+
d.URL,
|
|
821
|
+
t0 + last,
|
|
822
|
+
w.innerWidth,
|
|
823
|
+
w.innerHeight,
|
|
824
|
+
d.compatMode === "BackCompat" ? 1 : 0
|
|
825
|
+
];
|
|
826
|
+
cuts = [tape.length];
|
|
827
|
+
scanned = bytes = cutAt = 0;
|
|
828
|
+
for (let c = N.first(d); c; c = N.next(c)) ser(c, mode === "text" ? 1 : 0);
|
|
829
|
+
const wasOff = [...off];
|
|
830
|
+
for (const m of modules) if (m.onSnap) guard(m, () => m.onSnap?.());
|
|
831
|
+
for (const m of wasOff) tape.push(129 /* ERR */, 1, m.name);
|
|
832
|
+
resnap = false;
|
|
833
|
+
const out = {
|
|
834
|
+
tape,
|
|
835
|
+
cuts: cuts.filter((c) => c < tape.length),
|
|
836
|
+
base: 1,
|
|
837
|
+
startedAt: t0 + last,
|
|
838
|
+
endedAt: t0 + last
|
|
839
|
+
};
|
|
840
|
+
cuts = void 0;
|
|
841
|
+
tape = [];
|
|
842
|
+
base = seq + 1;
|
|
843
|
+
firstAt = 0;
|
|
844
|
+
scrolled.add(d);
|
|
845
|
+
if (!scrollTimer) scrollTimer = setTimeout(scrolls, 16);
|
|
846
|
+
kick();
|
|
847
|
+
weigh(out.tape);
|
|
848
|
+
return out;
|
|
849
|
+
},
|
|
850
|
+
drain() {
|
|
851
|
+
if (!stopped) sync(true);
|
|
852
|
+
if (ended) {
|
|
853
|
+
tape.push(98 /* END */, ended);
|
|
854
|
+
ended = 0;
|
|
855
|
+
}
|
|
856
|
+
const out = {
|
|
857
|
+
tape,
|
|
858
|
+
base,
|
|
859
|
+
startedAt: t0 + (firstAt || last),
|
|
860
|
+
endedAt: t0 + last
|
|
861
|
+
};
|
|
862
|
+
tape = [];
|
|
863
|
+
base = seq + 1;
|
|
864
|
+
firstAt = 0;
|
|
865
|
+
weigh(out.tape);
|
|
866
|
+
return out;
|
|
867
|
+
},
|
|
868
|
+
stop,
|
|
869
|
+
get stopped() {
|
|
870
|
+
return stopped;
|
|
871
|
+
},
|
|
872
|
+
get needsSnap() {
|
|
873
|
+
return resnap;
|
|
874
|
+
}
|
|
875
|
+
};
|
|
876
|
+
}
|
|
877
|
+
export {
|
|
878
|
+
record,
|
|
879
|
+
supported
|
|
880
|
+
};
|