@fkn/lib 0.3.6 → 0.3.8
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/_redirects +5 -0
- package/{background-Y_zGUlba.cjs → background-DWzRqH12.cjs} +1 -1
- package/{background-DkW0j6iK.js → background-_3_Cnyol.js} +160 -47
- package/index.cjs +11 -1
- package/index.d.ts +698 -76
- package/index.js +2310 -121
- package/{locator-DpMUq6q3.js → locator-1wWrCOyE.js} +588 -499
- package/locator-DHsqhrFb.cjs +31 -0
- package/logo.png +0 -0
- package/logo.svg +7 -0
- package/package.json +4 -5
- package/locator-CcAGamNm.cjs +0 -31
|
@@ -7,82 +7,330 @@ var r = Object.defineProperty, i = (e, t) => () => (t || e((t = { exports: {} })
|
|
|
7
7
|
enumerable: !0
|
|
8
8
|
});
|
|
9
9
|
return t || r(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
10
|
-
}, o =
|
|
10
|
+
}, o = (e, t) => {
|
|
11
|
+
let n = new EventTarget(), r = /* @__PURE__ */ new Map(), i = EventTarget.prototype.addEventListener.bind(n), a = EventTarget.prototype.removeEventListener.bind(n);
|
|
12
|
+
return Object.defineProperty(n, "addEventListener", {
|
|
13
|
+
configurable: !0,
|
|
14
|
+
value: (a, o, s) => {
|
|
15
|
+
if (o !== null) {
|
|
16
|
+
if (!r.has(a)) {
|
|
17
|
+
let i = (r) => {
|
|
18
|
+
n.dispatchEvent(new CustomEvent(a, {
|
|
19
|
+
detail: t(r, e),
|
|
20
|
+
bubbles: r.bubbles,
|
|
21
|
+
cancelable: r.cancelable,
|
|
22
|
+
composed: r.composed
|
|
23
|
+
}));
|
|
24
|
+
};
|
|
25
|
+
e.addEventListener(a, i), r.set(a, i);
|
|
26
|
+
}
|
|
27
|
+
i(a, o, s);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}), Object.defineProperty(n, "removeEventListener", {
|
|
31
|
+
configurable: !0,
|
|
32
|
+
value: (t, n, i) => {
|
|
33
|
+
if (n === null) return;
|
|
34
|
+
a(t, n, i);
|
|
35
|
+
let o = r.get(t);
|
|
36
|
+
o && (e.removeEventListener(t, o), r.delete(t));
|
|
37
|
+
}
|
|
38
|
+
}), n;
|
|
39
|
+
}, s = (e) => typeof e == "boolean" ? e ? 1 : 0 : e?.capture ? 1 : 0, c = (e) => {
|
|
40
|
+
let t = /* @__PURE__ */ new WeakMap();
|
|
41
|
+
return {
|
|
42
|
+
addEventListener: (n, r, i) => {
|
|
43
|
+
if (r === null) return;
|
|
44
|
+
let a = `${n}|${s(i)}`, o = t.get(r);
|
|
45
|
+
if (o || (o = /* @__PURE__ */ new Map(), t.set(r, o)), o.has(a)) return;
|
|
46
|
+
let c = typeof i == "object" && !!i && !!i.once, l = (t) => {
|
|
47
|
+
c && o.delete(a);
|
|
48
|
+
let i = e.unenrich(t, n);
|
|
49
|
+
typeof r == "function" ? r.call(e.target, i) : r.handleEvent(i);
|
|
50
|
+
};
|
|
51
|
+
o.set(a, l), e.remoteEvents.addEventListener(n, l, i);
|
|
52
|
+
},
|
|
53
|
+
removeEventListener: (n, r, i) => {
|
|
54
|
+
if (r === null) return;
|
|
55
|
+
let a = `${n}|${s(i)}`, o = t.get(r), c = o?.get(a);
|
|
56
|
+
c && (e.remoteEvents.removeEventListener(n, c, i), o.delete(a));
|
|
57
|
+
},
|
|
58
|
+
dispatchEvent: (t) => e.remoteEvents.dispatchEvent(t)
|
|
59
|
+
};
|
|
60
|
+
}, l = /* @__PURE__ */ a({
|
|
61
|
+
box: () => D,
|
|
62
|
+
createVideoElementHandle: () => T,
|
|
63
|
+
isType: () => E,
|
|
64
|
+
revive: () => O,
|
|
65
|
+
type: () => u
|
|
66
|
+
}), u = "videoElement", d = [
|
|
67
|
+
"currentTime",
|
|
68
|
+
"volume",
|
|
69
|
+
"muted",
|
|
70
|
+
"playbackRate",
|
|
71
|
+
"src",
|
|
72
|
+
"loop",
|
|
73
|
+
"autoplay",
|
|
74
|
+
"preload",
|
|
75
|
+
"poster",
|
|
76
|
+
"disableRemotePlayback"
|
|
77
|
+
], f = [
|
|
78
|
+
"duration",
|
|
79
|
+
"paused",
|
|
80
|
+
"ended",
|
|
81
|
+
"seeking",
|
|
82
|
+
"readyState",
|
|
83
|
+
"currentSrc"
|
|
84
|
+
], p = ["buffered", "seekable"], m = Symbol.for("fkn.remoteVideoElement"), h = Symbol.for("fkn.remoteVideoElement.state"), g = Symbol.for("fkn.remoteVideoElement.controller"), _ = (e) => e ? Array.from({ length: e.length }, (t, n) => [e.start(n), e.end(n)]) : [], v = (e) => {
|
|
85
|
+
let t = {};
|
|
86
|
+
for (let n of [...d, ...f]) t[n] = e[n];
|
|
87
|
+
for (let n of p) t[n] = _(e[n]);
|
|
88
|
+
return t.error = e.error ? {
|
|
89
|
+
code: e.error.code,
|
|
90
|
+
message: e.error.message
|
|
91
|
+
} : null, t;
|
|
92
|
+
}, y = (e) => {
|
|
93
|
+
let t = (t) => {
|
|
94
|
+
if (!Number.isInteger(t) || t < 0 || t >= e.length) throw new DOMException("Index or size is negative or greater than the allowed amount", "IndexSizeError");
|
|
95
|
+
};
|
|
96
|
+
return {
|
|
97
|
+
get length() {
|
|
98
|
+
return e.length;
|
|
99
|
+
},
|
|
100
|
+
start(n) {
|
|
101
|
+
return t(n), e[n][0];
|
|
102
|
+
},
|
|
103
|
+
end(n) {
|
|
104
|
+
return t(n), e[n][1];
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
}, b = (e) => e ? {
|
|
108
|
+
code: e.code,
|
|
109
|
+
message: e.message,
|
|
110
|
+
MEDIA_ERR_ABORTED: 1,
|
|
111
|
+
MEDIA_ERR_NETWORK: 2,
|
|
112
|
+
MEDIA_ERR_DECODE: 3,
|
|
113
|
+
MEDIA_ERR_SRC_NOT_SUPPORTED: 4
|
|
114
|
+
} : null, x = (e) => o(e, (e, t) => ({
|
|
115
|
+
originalDetail: e instanceof CustomEvent ? e.detail : null,
|
|
116
|
+
snapshot: v(t)
|
|
117
|
+
})), S = async (e, t) => {
|
|
118
|
+
switch (t) {
|
|
119
|
+
case "play": return await e.play(), null;
|
|
120
|
+
case "pause": return e.pause(), null;
|
|
121
|
+
case "load": return e.load(), null;
|
|
122
|
+
case "requestPictureInPicture":
|
|
123
|
+
if (typeof e.requestPictureInPicture != "function") throw Error("requestPictureInPicture is not supported in this environment");
|
|
124
|
+
return await e.requestPictureInPicture(), null;
|
|
125
|
+
case "exitPictureInPicture": {
|
|
126
|
+
let t = e.ownerDocument;
|
|
127
|
+
if (typeof t?.exitPictureInPicture != "function") throw Error("exitPictureInPicture is not supported in this environment");
|
|
128
|
+
return await t.exitPictureInPicture(), null;
|
|
129
|
+
}
|
|
130
|
+
default: throw Error(`videoElement: unknown method "${t}"`);
|
|
131
|
+
}
|
|
132
|
+
}, C = (e) => ({
|
|
133
|
+
call: async (t) => S(e, t),
|
|
134
|
+
set: async (t, n) => {
|
|
135
|
+
try {
|
|
136
|
+
e[t] = n;
|
|
137
|
+
} catch {}
|
|
138
|
+
return v(e);
|
|
139
|
+
},
|
|
140
|
+
events: x(e)
|
|
141
|
+
}), w = (e, t) => {
|
|
142
|
+
let n = new EventTarget();
|
|
143
|
+
Object.defineProperty(n, m, { value: !0 }), Object.defineProperty(n, h, { value: e }), Object.defineProperty(n, g, { value: t });
|
|
144
|
+
let r = c({
|
|
145
|
+
target: n,
|
|
146
|
+
remoteEvents: t.events,
|
|
147
|
+
unenrich: (t, n) => {
|
|
148
|
+
if (!(t instanceof CustomEvent)) return t;
|
|
149
|
+
let r = t.detail;
|
|
150
|
+
if (!r || !("snapshot" in r)) return t;
|
|
151
|
+
Object.assign(e, r.snapshot);
|
|
152
|
+
let i = {
|
|
153
|
+
bubbles: t.bubbles,
|
|
154
|
+
cancelable: t.cancelable,
|
|
155
|
+
composed: t.composed
|
|
156
|
+
};
|
|
157
|
+
return r.originalDetail === null ? new Event(n, i) : new CustomEvent(n, {
|
|
158
|
+
...i,
|
|
159
|
+
detail: r.originalDetail
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
}), i = {
|
|
163
|
+
addEventListener: {
|
|
164
|
+
configurable: !0,
|
|
165
|
+
value: r.addEventListener
|
|
166
|
+
},
|
|
167
|
+
removeEventListener: {
|
|
168
|
+
configurable: !0,
|
|
169
|
+
value: r.removeEventListener
|
|
170
|
+
},
|
|
171
|
+
dispatchEvent: {
|
|
172
|
+
configurable: !0,
|
|
173
|
+
value: r.dispatchEvent
|
|
174
|
+
},
|
|
175
|
+
error: {
|
|
176
|
+
configurable: !0,
|
|
177
|
+
enumerable: !0,
|
|
178
|
+
get() {
|
|
179
|
+
return b(e.error);
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
play: {
|
|
183
|
+
configurable: !0,
|
|
184
|
+
value: () => t.call("play", [])
|
|
185
|
+
},
|
|
186
|
+
pause: {
|
|
187
|
+
configurable: !0,
|
|
188
|
+
value: () => {
|
|
189
|
+
t.call("pause", []).catch(() => {});
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
load: {
|
|
193
|
+
configurable: !0,
|
|
194
|
+
value: () => {
|
|
195
|
+
t.call("load", []).catch(() => {});
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
requestPictureInPicture: {
|
|
199
|
+
configurable: !0,
|
|
200
|
+
value: () => t.call("requestPictureInPicture", [])
|
|
201
|
+
},
|
|
202
|
+
exitPictureInPicture: {
|
|
203
|
+
configurable: !0,
|
|
204
|
+
value: () => t.call("exitPictureInPicture", [])
|
|
205
|
+
},
|
|
206
|
+
HAVE_FUTURE_DATA: {
|
|
207
|
+
enumerable: !0,
|
|
208
|
+
value: 3
|
|
209
|
+
},
|
|
210
|
+
HAVE_ENOUGH_DATA: {
|
|
211
|
+
enumerable: !0,
|
|
212
|
+
value: 4
|
|
213
|
+
}
|
|
214
|
+
};
|
|
215
|
+
for (let n of d) i[n] = {
|
|
216
|
+
configurable: !0,
|
|
217
|
+
enumerable: !0,
|
|
218
|
+
get() {
|
|
219
|
+
return e[n];
|
|
220
|
+
},
|
|
221
|
+
set(r) {
|
|
222
|
+
e[n] = r, t.set(n, r).then((t) => {
|
|
223
|
+
Object.assign(e, t);
|
|
224
|
+
}, () => {});
|
|
225
|
+
}
|
|
226
|
+
};
|
|
227
|
+
for (let t of f) i[t] = {
|
|
228
|
+
configurable: !0,
|
|
229
|
+
enumerable: !0,
|
|
230
|
+
get() {
|
|
231
|
+
return e[t];
|
|
232
|
+
}
|
|
233
|
+
};
|
|
234
|
+
for (let t of p) i[t] = {
|
|
235
|
+
configurable: !0,
|
|
236
|
+
enumerable: !0,
|
|
237
|
+
get() {
|
|
238
|
+
return y(e[t]);
|
|
239
|
+
}
|
|
240
|
+
};
|
|
241
|
+
return Object.defineProperties(n, i), n;
|
|
242
|
+
}, T = (e) => w(v(e), C(e)), E = (e) => typeof e == "object" && !!e && e[m] === !0, D = (n, r) => {
|
|
243
|
+
let i = n;
|
|
244
|
+
return {
|
|
245
|
+
...e,
|
|
246
|
+
type: u,
|
|
247
|
+
initialState: i[h],
|
|
248
|
+
controller: t(i[g], r)
|
|
249
|
+
};
|
|
250
|
+
}, O = (e, t) => {
|
|
251
|
+
let r = n(e.controller, t);
|
|
252
|
+
return w({ ...e.initialState }, r);
|
|
253
|
+
}, ee = (e) => [l, ...e], k = (e) => typeof e == "object" && !!e, te = "PermissionDeniedError", ne = (e) => e instanceof Error ? e.name === te : k(e) && e.name === "PermissionDeniedError", re = 3e4, ie = 50, ae = (e) => {
|
|
11
254
|
let t = e[e.length - 1];
|
|
12
|
-
return typeof t == "object" && t
|
|
13
|
-
},
|
|
14
|
-
let
|
|
255
|
+
return typeof t == "object" && t ? t : void 0;
|
|
256
|
+
}, oe = (e) => {
|
|
257
|
+
let t = ae(e)?.timeout;
|
|
258
|
+
return typeof t == "number" ? t : re;
|
|
259
|
+
}, se = async (e, t, n, r, i) => {
|
|
260
|
+
i && await i(t, n, r);
|
|
261
|
+
let a = e, o = oe(r), s = Date.now() + o, c = /* @__PURE__ */ Error(`Locator timeout (${o}ms): ${n}`), { promise: l, reject: u } = Promise.withResolvers(), d = setTimeout(() => u(c), o), f = c;
|
|
15
262
|
try {
|
|
16
|
-
for (; Date.now() <
|
|
17
|
-
return await Promise.race([
|
|
263
|
+
for (; Date.now() < s;) try {
|
|
264
|
+
return await Promise.race([a(t, n, r), l]);
|
|
18
265
|
} catch (e) {
|
|
19
|
-
if (e ===
|
|
20
|
-
|
|
21
|
-
|
|
266
|
+
if (e === c) break;
|
|
267
|
+
if (ne(e)) throw e;
|
|
268
|
+
f = e;
|
|
269
|
+
let t = s - Date.now();
|
|
22
270
|
if (t <= 0) break;
|
|
23
|
-
await new Promise((e) => setTimeout(e, Math.min(
|
|
271
|
+
await new Promise((e) => setTimeout(e, Math.min(ie, t)));
|
|
24
272
|
}
|
|
25
273
|
} finally {
|
|
26
|
-
clearTimeout(
|
|
274
|
+
clearTimeout(d);
|
|
27
275
|
}
|
|
28
|
-
throw
|
|
29
|
-
},
|
|
30
|
-
render: () =>
|
|
31
|
-
resolve: () =>
|
|
32
|
-
type: () =>
|
|
33
|
-
}),
|
|
276
|
+
throw f;
|
|
277
|
+
}, A = /* @__PURE__ */ a({
|
|
278
|
+
render: () => ue,
|
|
279
|
+
resolve: () => le,
|
|
280
|
+
type: () => ce
|
|
281
|
+
}), ce = "locator", le = (e, t) => e.elements.flatMap((e) => [...e.querySelectorAll(t)]), ue = (e) => ({
|
|
34
282
|
fragment: typeof e == "string" ? e : "?",
|
|
35
283
|
separator: "descend"
|
|
36
|
-
}),
|
|
284
|
+
}), de = (e) => k(e) && e.FKN_WEB_EXTENSION_FRAME_ANNOUNCE_KEY === !0 && typeof e.frameId == "string", j = /* @__PURE__ */ new WeakMap(), M = /* @__PURE__ */ new WeakMap(), N = /* @__PURE__ */ new Set(), fe = (e) => (N.add(e), () => N.delete(e));
|
|
37
285
|
typeof window < "u" && window.addEventListener("message", (e) => {
|
|
38
|
-
if (!
|
|
286
|
+
if (!de(e.data)) return;
|
|
39
287
|
e.stopImmediatePropagation();
|
|
40
288
|
let t = e.source;
|
|
41
289
|
if (!t || typeof t != "object") return;
|
|
42
|
-
let n = t, r =
|
|
43
|
-
if (
|
|
44
|
-
let a =
|
|
290
|
+
let n = t, r = j.get(n), i = e.data.frameId;
|
|
291
|
+
if (j.set(n, i), r) for (let e of N) e(r);
|
|
292
|
+
let a = M.get(n);
|
|
45
293
|
if (a) {
|
|
46
|
-
|
|
294
|
+
M.delete(n);
|
|
47
295
|
for (let e of a) e(i);
|
|
48
296
|
}
|
|
49
297
|
}, { capture: !0 });
|
|
50
|
-
var
|
|
298
|
+
var pe = (e) => {
|
|
51
299
|
let t = e.contentWindow;
|
|
52
300
|
if (!t) return Promise.reject(/* @__PURE__ */ Error("frameLocator: <iframe> has no contentWindow"));
|
|
53
|
-
let n =
|
|
301
|
+
let n = j.get(t);
|
|
54
302
|
return n ? Promise.resolve(n) : new Promise((e) => {
|
|
55
|
-
let n =
|
|
56
|
-
n.push(e),
|
|
303
|
+
let n = M.get(t) ?? [];
|
|
304
|
+
n.push(e), M.set(t, n);
|
|
57
305
|
});
|
|
58
|
-
},
|
|
59
|
-
render: () =>
|
|
60
|
-
resolve: () =>
|
|
61
|
-
resolvePeer: () =>
|
|
62
|
-
type: () =>
|
|
63
|
-
}),
|
|
306
|
+
}, P = /* @__PURE__ */ a({
|
|
307
|
+
render: () => _e,
|
|
308
|
+
resolve: () => he,
|
|
309
|
+
resolvePeer: () => ge,
|
|
310
|
+
type: () => me
|
|
311
|
+
}), me = "frameLocator", he = (e, t) => e.elements.flatMap((e) => [...e.querySelectorAll(t)]).filter((e) => e instanceof HTMLIFrameElement), ge = async ({ parts: e, selfIndex: t, resolveLocal: n }) => {
|
|
64
312
|
let r = n(e.slice(0, t + 1))[0];
|
|
65
313
|
if (!r) throw Error("frameLocator: no <iframe> matched");
|
|
66
314
|
if (!(r instanceof HTMLIFrameElement)) throw Error(`frameLocator: expected <iframe>, got <${r.tagName.toLowerCase()}>`);
|
|
67
|
-
return
|
|
68
|
-
},
|
|
315
|
+
return pe(r);
|
|
316
|
+
}, _e = (e) => ({
|
|
69
317
|
fragment: typeof e == "string" ? e : "?",
|
|
70
318
|
separator: "frame-down"
|
|
71
|
-
}),
|
|
72
|
-
render: () =>
|
|
73
|
-
resolve: () =>
|
|
74
|
-
resolvePeer: () =>
|
|
75
|
-
type: () =>
|
|
76
|
-
}),
|
|
319
|
+
}), ve = /* @__PURE__ */ a({
|
|
320
|
+
render: () => Se,
|
|
321
|
+
resolve: () => be,
|
|
322
|
+
resolvePeer: () => xe,
|
|
323
|
+
type: () => ye
|
|
324
|
+
}), ye = "owner", be = (e) => {
|
|
77
325
|
throw Error("owner: must be processed by the executor as an upward pivot");
|
|
78
|
-
},
|
|
79
|
-
let { backgroundResolvers: e } = await import("./background-
|
|
326
|
+
}, xe = async () => {
|
|
327
|
+
let { backgroundResolvers: e } = await import("./background-_3_Cnyol.js"), t = await (await e).getParentFrameId();
|
|
80
328
|
if (!t) throw Error("owner: already at top frame");
|
|
81
329
|
return t;
|
|
82
|
-
},
|
|
330
|
+
}, Se = () => ({
|
|
83
331
|
fragment: "",
|
|
84
332
|
separator: "frame-up"
|
|
85
|
-
}),
|
|
333
|
+
}), Ce = class extends Error {
|
|
86
334
|
reason;
|
|
87
335
|
filename;
|
|
88
336
|
line;
|
|
@@ -91,18 +339,18 @@ var b = (e) => {
|
|
|
91
339
|
constructor(e, t, n, r, i) {
|
|
92
340
|
super(`${e}:${n}:${r}: ${t}`), this.reason = t, this.filename = e, this.line = n, this.column = r, this.source = i;
|
|
93
341
|
}
|
|
94
|
-
},
|
|
342
|
+
}, we = class {
|
|
95
343
|
start;
|
|
96
344
|
end;
|
|
97
345
|
source;
|
|
98
346
|
constructor(e, t, n) {
|
|
99
347
|
this.start = e, this.end = t, this.source = n;
|
|
100
348
|
}
|
|
101
|
-
},
|
|
349
|
+
}, F;
|
|
102
350
|
(function(e) {
|
|
103
351
|
e.stylesheet = "stylesheet", e.rule = "rule", e.declaration = "declaration", e.comment = "comment", e.container = "container", e.charset = "charset", e.document = "document", e.customMedia = "custom-media", e.fontFace = "font-face", e.host = "host", e.import = "import", e.keyframes = "keyframes", e.keyframe = "keyframe", e.layer = "layer", e.media = "media", e.namespace = "namespace", e.page = "page", e.startingStyle = "starting-style", e.supports = "supports";
|
|
104
|
-
})(
|
|
105
|
-
var
|
|
352
|
+
})(F ||= {});
|
|
353
|
+
var I = (e, t, n) => {
|
|
106
354
|
let r = n, i = 1e4;
|
|
107
355
|
do {
|
|
108
356
|
let n = t.map((t) => e.indexOf(t, r));
|
|
@@ -114,7 +362,7 @@ var T = (e, t, n) => {
|
|
|
114
362
|
r = o + 2, i--;
|
|
115
363
|
} while (i > 0);
|
|
116
364
|
throw Error("Too many escaping");
|
|
117
|
-
},
|
|
365
|
+
}, L = (e, t, n) => {
|
|
118
366
|
let r = n, i = 1e4;
|
|
119
367
|
do {
|
|
120
368
|
let n = t.map((t) => e.indexOf(t, r));
|
|
@@ -128,21 +376,21 @@ var T = (e, t, n) => {
|
|
|
128
376
|
break;
|
|
129
377
|
case "(":
|
|
130
378
|
{
|
|
131
|
-
let t =
|
|
379
|
+
let t = L(e, [")"], o + 1);
|
|
132
380
|
if (t === -1) return -1;
|
|
133
381
|
r = t + 1;
|
|
134
382
|
}
|
|
135
383
|
break;
|
|
136
384
|
case "\"":
|
|
137
385
|
{
|
|
138
|
-
let t =
|
|
386
|
+
let t = I(e, ["\""], o + 1);
|
|
139
387
|
if (t === -1) return -1;
|
|
140
388
|
r = t + 1;
|
|
141
389
|
}
|
|
142
390
|
break;
|
|
143
391
|
case "'":
|
|
144
392
|
{
|
|
145
|
-
let t =
|
|
393
|
+
let t = I(e, ["'"], o + 1);
|
|
146
394
|
if (t === -1) return -1;
|
|
147
395
|
r = t + 1;
|
|
148
396
|
}
|
|
@@ -152,17 +400,17 @@ var T = (e, t, n) => {
|
|
|
152
400
|
i--;
|
|
153
401
|
} while (i > 0);
|
|
154
402
|
throw Error("Too many escaping");
|
|
155
|
-
},
|
|
156
|
-
function
|
|
403
|
+
}, R = /\/\*[^]*?(?:\*\/|$)/g;
|
|
404
|
+
function z(e) {
|
|
157
405
|
return e ? e.trim() : "";
|
|
158
406
|
}
|
|
159
|
-
function
|
|
407
|
+
function B(e, t) {
|
|
160
408
|
let n = e && typeof e.type == "string", r = n ? e : t;
|
|
161
409
|
for (let t in e) {
|
|
162
410
|
let n = e[t];
|
|
163
411
|
Array.isArray(n) ? n.forEach((e) => {
|
|
164
|
-
|
|
165
|
-
}) : n && typeof n == "object" &&
|
|
412
|
+
B(e, r);
|
|
413
|
+
}) : n && typeof n == "object" && B(n, r);
|
|
166
414
|
}
|
|
167
415
|
return n && Object.defineProperty(e, "parent", {
|
|
168
416
|
configurable: !0,
|
|
@@ -171,7 +419,7 @@ function k(e, t) {
|
|
|
171
419
|
value: t || null
|
|
172
420
|
}), e;
|
|
173
421
|
}
|
|
174
|
-
var
|
|
422
|
+
var Te = class {
|
|
175
423
|
level = 0;
|
|
176
424
|
indentation = " ";
|
|
177
425
|
compress = !1;
|
|
@@ -186,25 +434,25 @@ var le = class {
|
|
|
186
434
|
}
|
|
187
435
|
visit(e) {
|
|
188
436
|
switch (e.type) {
|
|
189
|
-
case
|
|
190
|
-
case
|
|
191
|
-
case
|
|
192
|
-
case
|
|
193
|
-
case
|
|
194
|
-
case
|
|
195
|
-
case
|
|
196
|
-
case
|
|
197
|
-
case
|
|
198
|
-
case
|
|
199
|
-
case
|
|
200
|
-
case
|
|
201
|
-
case
|
|
202
|
-
case
|
|
203
|
-
case
|
|
204
|
-
case
|
|
205
|
-
case
|
|
206
|
-
case
|
|
207
|
-
case
|
|
437
|
+
case F.stylesheet: return this.stylesheet(e);
|
|
438
|
+
case F.rule: return this.rule(e);
|
|
439
|
+
case F.declaration: return this.declaration(e);
|
|
440
|
+
case F.comment: return this.comment(e);
|
|
441
|
+
case F.container: return this.container(e);
|
|
442
|
+
case F.charset: return this.charset(e);
|
|
443
|
+
case F.document: return this.document(e);
|
|
444
|
+
case F.customMedia: return this.customMedia(e);
|
|
445
|
+
case F.fontFace: return this.fontFace(e);
|
|
446
|
+
case F.host: return this.host(e);
|
|
447
|
+
case F.import: return this.import(e);
|
|
448
|
+
case F.keyframes: return this.keyframes(e);
|
|
449
|
+
case F.keyframe: return this.keyframe(e);
|
|
450
|
+
case F.layer: return this.layer(e);
|
|
451
|
+
case F.media: return this.media(e);
|
|
452
|
+
case F.namespace: return this.namespace(e);
|
|
453
|
+
case F.page: return this.page(e);
|
|
454
|
+
case F.startingStyle: return this.startingStyle(e);
|
|
455
|
+
case F.supports: return this.supports(e);
|
|
208
456
|
}
|
|
209
457
|
}
|
|
210
458
|
mapVisit(e, t) {
|
|
@@ -284,7 +532,7 @@ var le = class {
|
|
|
284
532
|
declaration(e) {
|
|
285
533
|
return this.compress ? this.emit(`${e.property}:${e.value}`, e.position) + this.emit(";") : e.property === "grid-template-areas" ? this.emit(this.indent()) + this.emit(e.property + ": " + e.value.split("\n").join("\n".padEnd(22) + this.indent()), e.position) + this.emit(";") : this.emit(this.indent()) + this.emit(`${e.property}: ${e.value}`, e.position) + this.emit(";");
|
|
286
534
|
}
|
|
287
|
-
},
|
|
535
|
+
}, Ee = (e, t) => {
|
|
288
536
|
t ||= {};
|
|
289
537
|
let n = 1, r = 1;
|
|
290
538
|
function i() {
|
|
@@ -292,14 +540,14 @@ var le = class {
|
|
|
292
540
|
line: n,
|
|
293
541
|
column: r
|
|
294
542
|
};
|
|
295
|
-
return (i) => (i.position = new
|
|
543
|
+
return (i) => (i.position = new we(e, {
|
|
296
544
|
line: n,
|
|
297
545
|
column: r
|
|
298
546
|
}, t?.source || ""), d(), i);
|
|
299
547
|
}
|
|
300
548
|
let a = [];
|
|
301
549
|
function o(i) {
|
|
302
|
-
let o = new
|
|
550
|
+
let o = new Ce(t?.source || "", i, n, r, e);
|
|
303
551
|
if (!t?.silent) throw o;
|
|
304
552
|
a.push(o);
|
|
305
553
|
}
|
|
@@ -340,7 +588,7 @@ var le = class {
|
|
|
340
588
|
if (e.charAt(0) !== "/" || e.charAt(1) !== "*") return;
|
|
341
589
|
let n = /^\/\*[^]*?\*\//.exec(e);
|
|
342
590
|
return n ? (u(n), t({
|
|
343
|
-
type:
|
|
591
|
+
type: F.comment,
|
|
344
592
|
comment: n[0].slice(2, -2)
|
|
345
593
|
})) : o("End of comment missing");
|
|
346
594
|
}
|
|
@@ -349,25 +597,25 @@ var le = class {
|
|
|
349
597
|
if (t) return u(t), ((e, t) => {
|
|
350
598
|
let n = [], r = 0;
|
|
351
599
|
for (; r < e.length;) {
|
|
352
|
-
let i =
|
|
600
|
+
let i = L(e, t, r);
|
|
353
601
|
if (i === -1) return n.push(e.substring(r)), n;
|
|
354
602
|
n.push(e.substring(r, i)), r = i + 1;
|
|
355
603
|
}
|
|
356
604
|
return n;
|
|
357
|
-
})(
|
|
605
|
+
})(z(t[0]).replace(R, ""), [","]).map((e) => z(e));
|
|
358
606
|
}
|
|
359
607
|
function h() {
|
|
360
608
|
let t = i(), n = /^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/.exec(e);
|
|
361
609
|
if (!n) return;
|
|
362
610
|
u(n);
|
|
363
|
-
let r =
|
|
611
|
+
let r = z(n[0]), a = /^:\s*/.exec(e);
|
|
364
612
|
if (!a) return o("property missing ':'");
|
|
365
613
|
u(a);
|
|
366
|
-
let s = "", c =
|
|
367
|
-
c !== -1 && (s = e.substring(0, c), u([s]), s =
|
|
614
|
+
let s = "", c = L(e, [";", "}"]);
|
|
615
|
+
c !== -1 && (s = e.substring(0, c), u([s]), s = z(s).replace(R, ""));
|
|
368
616
|
let l = t({
|
|
369
|
-
type:
|
|
370
|
-
property: r.replace(
|
|
617
|
+
type: F.declaration,
|
|
618
|
+
property: r.replace(R, ""),
|
|
371
619
|
value: s
|
|
372
620
|
}), d = /^[;\s]*/.exec(e);
|
|
373
621
|
return d && u(d), l;
|
|
@@ -389,7 +637,7 @@ var le = class {
|
|
|
389
637
|
i && u(i), r = /^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/.exec(e);
|
|
390
638
|
}
|
|
391
639
|
if (t.length) return n({
|
|
392
|
-
type:
|
|
640
|
+
type: F.keyframe,
|
|
393
641
|
values: t,
|
|
394
642
|
declarations: g() || []
|
|
395
643
|
});
|
|
@@ -415,7 +663,7 @@ var le = class {
|
|
|
415
663
|
let d = f(), p = _();
|
|
416
664
|
for (; p;) d.push(p), d = d.concat(f()), p = _();
|
|
417
665
|
return c() ? t({
|
|
418
|
-
type:
|
|
666
|
+
type: F.keyframes,
|
|
419
667
|
name: l,
|
|
420
668
|
vendor: r,
|
|
421
669
|
keyframes: d
|
|
@@ -423,11 +671,11 @@ var le = class {
|
|
|
423
671
|
}() || function() {
|
|
424
672
|
let t = i(), n = /^@media *([^{]+)/.exec(e);
|
|
425
673
|
if (!n) return;
|
|
426
|
-
let r =
|
|
674
|
+
let r = z(u(n)[1]);
|
|
427
675
|
if (!s()) return o("@media missing '{'");
|
|
428
676
|
let a = f().concat(l());
|
|
429
677
|
return c() ? t({
|
|
430
|
-
type:
|
|
678
|
+
type: F.media,
|
|
431
679
|
media: r,
|
|
432
680
|
rules: a
|
|
433
681
|
}) : o("@media missing '}'");
|
|
@@ -436,29 +684,29 @@ var le = class {
|
|
|
436
684
|
if (!n) return;
|
|
437
685
|
let r = u(n);
|
|
438
686
|
return t({
|
|
439
|
-
type:
|
|
440
|
-
name:
|
|
441
|
-
media:
|
|
687
|
+
type: F.customMedia,
|
|
688
|
+
name: z(r[1]),
|
|
689
|
+
media: z(r[2])
|
|
442
690
|
});
|
|
443
691
|
}() || function() {
|
|
444
692
|
let t = i(), n = /^@supports *([^{]+)/.exec(e);
|
|
445
693
|
if (!n) return;
|
|
446
|
-
let r =
|
|
694
|
+
let r = z(u(n)[1]);
|
|
447
695
|
if (!s()) return o("@supports missing '{'");
|
|
448
696
|
let a = f().concat(l());
|
|
449
697
|
return c() ? t({
|
|
450
|
-
type:
|
|
698
|
+
type: F.supports,
|
|
451
699
|
supports: r,
|
|
452
700
|
rules: a
|
|
453
701
|
}) : o("@supports missing '}'");
|
|
454
702
|
}() || v() || y() || b() || function() {
|
|
455
703
|
let t = i(), n = /^@([-\w]+)?document *([^{]+)/.exec(e);
|
|
456
704
|
if (!n) return;
|
|
457
|
-
let r = u(n), a =
|
|
705
|
+
let r = u(n), a = z(r[1]), d = z(r[2]);
|
|
458
706
|
if (!s()) return o("@document missing '{'");
|
|
459
707
|
let p = f().concat(l());
|
|
460
708
|
return c() ? t({
|
|
461
|
-
type:
|
|
709
|
+
type: F.document,
|
|
462
710
|
document: d,
|
|
463
711
|
vendor: a,
|
|
464
712
|
rules: p
|
|
@@ -472,7 +720,7 @@ var le = class {
|
|
|
472
720
|
let a = f(), l = h();
|
|
473
721
|
for (; l;) a.push(l), a = a.concat(f()), l = h();
|
|
474
722
|
return c() ? t({
|
|
475
|
-
type:
|
|
723
|
+
type: F.page,
|
|
476
724
|
selectors: r,
|
|
477
725
|
declarations: a
|
|
478
726
|
}) : o("@page missing '}'");
|
|
@@ -482,7 +730,7 @@ var le = class {
|
|
|
482
730
|
if (u(n), !s()) return o("@host missing '{'");
|
|
483
731
|
let r = f().concat(l());
|
|
484
732
|
return c() ? t({
|
|
485
|
-
type:
|
|
733
|
+
type: F.host,
|
|
486
734
|
rules: r
|
|
487
735
|
}) : o("@host missing '}'");
|
|
488
736
|
}() || function() {
|
|
@@ -492,17 +740,17 @@ var le = class {
|
|
|
492
740
|
let r = f(), a = h();
|
|
493
741
|
for (; a;) r.push(a), r = r.concat(f()), a = h();
|
|
494
742
|
return c() ? t({
|
|
495
|
-
type:
|
|
743
|
+
type: F.fontFace,
|
|
496
744
|
declarations: r
|
|
497
745
|
}) : o("@font-face missing '}'");
|
|
498
746
|
}() || function() {
|
|
499
747
|
let t = i(), n = /^@container *([^{]+)/.exec(e);
|
|
500
748
|
if (!n) return;
|
|
501
|
-
let r =
|
|
749
|
+
let r = z(u(n)[1]);
|
|
502
750
|
if (!s()) return o("@container missing '{'");
|
|
503
751
|
let a = f().concat(l());
|
|
504
752
|
return c() ? t({
|
|
505
|
-
type:
|
|
753
|
+
type: F.container,
|
|
506
754
|
container: r,
|
|
507
755
|
rules: a
|
|
508
756
|
}) : o("@container missing '}'");
|
|
@@ -512,23 +760,23 @@ var le = class {
|
|
|
512
760
|
if (u(n), !s()) return o("@starting-style missing '{'");
|
|
513
761
|
let r = f().concat(l());
|
|
514
762
|
return c() ? t({
|
|
515
|
-
type:
|
|
763
|
+
type: F.startingStyle,
|
|
516
764
|
rules: r
|
|
517
765
|
}) : o("@starting-style missing '}'");
|
|
518
766
|
}() || function() {
|
|
519
767
|
let t = i(), n = /^@layer *([^{;@]+)/.exec(e);
|
|
520
768
|
if (!n) return;
|
|
521
|
-
let r =
|
|
769
|
+
let r = z(u(n)[1]);
|
|
522
770
|
if (!s()) {
|
|
523
771
|
let n = /^[;\s]*/.exec(e);
|
|
524
772
|
return n && u(n), t({
|
|
525
|
-
type:
|
|
773
|
+
type: F.layer,
|
|
526
774
|
layer: r
|
|
527
775
|
});
|
|
528
776
|
}
|
|
529
777
|
let a = f().concat(l());
|
|
530
778
|
return c() ? t({
|
|
531
|
-
type:
|
|
779
|
+
type: F.layer,
|
|
532
780
|
layer: r,
|
|
533
781
|
rules: a
|
|
534
782
|
}) : o("@layer missing '}'");
|
|
@@ -537,15 +785,15 @@ var le = class {
|
|
|
537
785
|
function C() {
|
|
538
786
|
let e = i(), t = m();
|
|
539
787
|
return t ? (f(), e({
|
|
540
|
-
type:
|
|
788
|
+
type: F.rule,
|
|
541
789
|
selectors: t,
|
|
542
790
|
declarations: g() || []
|
|
543
791
|
})) : o("selector missing");
|
|
544
792
|
}
|
|
545
|
-
return
|
|
793
|
+
return B(function() {
|
|
546
794
|
let e = l();
|
|
547
795
|
return {
|
|
548
|
-
type:
|
|
796
|
+
type: F.stylesheet,
|
|
549
797
|
stylesheet: {
|
|
550
798
|
source: t?.source,
|
|
551
799
|
rules: e,
|
|
@@ -553,62 +801,79 @@ var le = class {
|
|
|
553
801
|
}
|
|
554
802
|
};
|
|
555
803
|
}());
|
|
556
|
-
},
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
804
|
+
}, De = (e, t) => new Te(t || {}).compile(e), Oe = /* @__PURE__ */ a({
|
|
805
|
+
appearPermission: () => V,
|
|
806
|
+
appearUnsafePermission: () => H,
|
|
807
|
+
permission: () => Ae,
|
|
808
|
+
resolve: () => Fe,
|
|
809
|
+
setInjectedStylesDisabled: () => q,
|
|
810
|
+
type: () => ke
|
|
811
|
+
}), ke = "addStyleTag", V = {
|
|
812
|
+
scope: "media.appear",
|
|
813
|
+
category: "media",
|
|
814
|
+
severity: 0,
|
|
815
|
+
title: "Change page appearance",
|
|
816
|
+
description: "Lets the app restyle parts of the page — safely filtered."
|
|
817
|
+
}, H = {
|
|
818
|
+
scope: "media.appearU",
|
|
819
|
+
category: "media",
|
|
820
|
+
severity: 2,
|
|
821
|
+
unsafe: !0,
|
|
822
|
+
title: "Change page appearance (unsafe)",
|
|
823
|
+
description: "Lets the app restyle the page WITHOUT safety filtering — could be used to leak data over the network."
|
|
824
|
+
}, Ae = (e) => e?.noSanitize ? H : V, je = /(?:^|[^\w-])(?:url|image|image-set|cross-fade|paint|element|expression)\s*\(/i, Me = (e) => e.replace(/\\([0-9a-fA-F]{1,6})\s?/g, (e, t) => String.fromCodePoint(Number.parseInt(t, 16))).replace(/\\(.)/g, "$1"), U = (e) => !je.test(Me(e.value)), W = (e) => {
|
|
560
825
|
let t = [];
|
|
561
826
|
for (let n of e) switch (n.type) {
|
|
562
|
-
case
|
|
563
|
-
case
|
|
564
|
-
case
|
|
565
|
-
case
|
|
566
|
-
case
|
|
567
|
-
case
|
|
568
|
-
case
|
|
569
|
-
case
|
|
827
|
+
case F.import:
|
|
828
|
+
case F.fontFace:
|
|
829
|
+
case F.namespace:
|
|
830
|
+
case F.charset:
|
|
831
|
+
case F.document:
|
|
832
|
+
case F.comment: continue;
|
|
833
|
+
case F.rule:
|
|
834
|
+
case F.page:
|
|
570
835
|
t.push({
|
|
571
836
|
...n,
|
|
572
|
-
declarations: n.declarations.filter((e) => e.type !==
|
|
837
|
+
declarations: n.declarations.filter((e) => e.type !== F.declaration || U(e))
|
|
573
838
|
});
|
|
574
839
|
continue;
|
|
575
|
-
case
|
|
576
|
-
case
|
|
577
|
-
case
|
|
578
|
-
case
|
|
579
|
-
case
|
|
840
|
+
case F.media:
|
|
841
|
+
case F.supports:
|
|
842
|
+
case F.container:
|
|
843
|
+
case F.host:
|
|
844
|
+
case F.startingStyle:
|
|
580
845
|
t.push({
|
|
581
846
|
...n,
|
|
582
|
-
rules:
|
|
847
|
+
rules: W(n.rules)
|
|
583
848
|
});
|
|
584
849
|
continue;
|
|
585
|
-
case
|
|
850
|
+
case F.layer:
|
|
586
851
|
t.push({
|
|
587
852
|
...n,
|
|
588
|
-
rules: n.rules ?
|
|
853
|
+
rules: n.rules ? W(n.rules) : void 0
|
|
589
854
|
});
|
|
590
855
|
continue;
|
|
591
|
-
case
|
|
856
|
+
case F.keyframes:
|
|
592
857
|
t.push({
|
|
593
858
|
...n,
|
|
594
|
-
keyframes: n.keyframes.map((e) => e.type ===
|
|
859
|
+
keyframes: n.keyframes.map((e) => e.type === F.keyframe ? {
|
|
595
860
|
...e,
|
|
596
|
-
declarations: e.declarations.filter((e) => e.type !==
|
|
861
|
+
declarations: e.declarations.filter((e) => e.type !== F.declaration || U(e))
|
|
597
862
|
} : e)
|
|
598
863
|
});
|
|
599
864
|
continue;
|
|
600
865
|
default: continue;
|
|
601
866
|
}
|
|
602
867
|
return t;
|
|
603
|
-
},
|
|
868
|
+
}, Ne = (e) => {
|
|
604
869
|
let t;
|
|
605
870
|
try {
|
|
606
|
-
t =
|
|
871
|
+
t = Ee(e, { silent: !0 });
|
|
607
872
|
} catch {
|
|
608
873
|
return "";
|
|
609
874
|
}
|
|
610
|
-
return t.stylesheet.rules =
|
|
611
|
-
},
|
|
875
|
+
return t.stylesheet.rules = W(t.stylesheet.rules), De(t);
|
|
876
|
+
}, Pe = (e) => {
|
|
612
877
|
let t = () => {
|
|
613
878
|
e.parentNode || (document.head ?? document.documentElement).appendChild(e);
|
|
614
879
|
};
|
|
@@ -623,82 +888,93 @@ var le = class {
|
|
|
623
888
|
childList: !0,
|
|
624
889
|
subtree: !0
|
|
625
890
|
}), window.addEventListener("load", () => n.disconnect(), { once: !0 });
|
|
626
|
-
},
|
|
891
|
+
}, G = /* @__PURE__ */ new Set(), K = !1, q = (e) => {
|
|
892
|
+
K = e;
|
|
893
|
+
for (let t of G) t.disabled = e;
|
|
894
|
+
}, Fe = async (e, t) => {
|
|
627
895
|
let n = document.createElement("style");
|
|
628
|
-
n.textContent = t.noSanitize ? t.content :
|
|
896
|
+
n.textContent = t.noSanitize ? t.content : Ne(t.content);
|
|
629
897
|
try {
|
|
630
|
-
|
|
898
|
+
Pe(n);
|
|
631
899
|
} catch (e) {
|
|
632
900
|
console.error(e);
|
|
633
901
|
}
|
|
634
|
-
|
|
902
|
+
G.add(n), K && (n.disabled = !0);
|
|
903
|
+
}, J = "frameLocator", Y = [
|
|
635
904
|
{
|
|
636
|
-
...
|
|
905
|
+
...A,
|
|
637
906
|
nextLocatorType: "locator"
|
|
638
907
|
},
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
],
|
|
642
|
-
type:
|
|
643
|
-
selectorModules:
|
|
644
|
-
operationModules:
|
|
645
|
-
},
|
|
646
|
-
ownType:
|
|
647
|
-
selectorModules:
|
|
648
|
-
operationModules:
|
|
908
|
+
P,
|
|
909
|
+
ve
|
|
910
|
+
], X = [Oe], Ie = {
|
|
911
|
+
type: J,
|
|
912
|
+
selectorModules: Y,
|
|
913
|
+
operationModules: X
|
|
914
|
+
}, Le = Re({
|
|
915
|
+
ownType: J,
|
|
916
|
+
selectorModules: Y,
|
|
917
|
+
operationModules: X
|
|
649
918
|
});
|
|
650
919
|
//#endregion
|
|
651
|
-
//#region
|
|
652
|
-
function
|
|
653
|
-
return (t, n = []) => ({
|
|
654
|
-
...Object.fromEntries(e.selectorModules.map((
|
|
655
|
-
let
|
|
920
|
+
//#region ../web-extension/lib/content-script/resolvers/locators/factory.js
|
|
921
|
+
function Re(e) {
|
|
922
|
+
return (t, n, r = []) => ({
|
|
923
|
+
...Object.fromEntries(e.selectorModules.map((i) => [i.type, (...a) => {
|
|
924
|
+
let o = [...r, {
|
|
656
925
|
locatorType: e.ownType,
|
|
657
|
-
type:
|
|
658
|
-
args:
|
|
926
|
+
type: i.type,
|
|
927
|
+
args: a
|
|
659
928
|
}];
|
|
660
|
-
return (
|
|
929
|
+
return (i.nextLocatorType ?? e.ownType) === "locator" ? Gt(t, n, o) : Le(t, n, o);
|
|
661
930
|
}])),
|
|
662
|
-
...Object.fromEntries(e.operationModules.map(({ type: e }) => [e, (...
|
|
931
|
+
...Object.fromEntries(e.operationModules.map(({ type: e }) => [e, (...i) => se(t, r, e, i, n)]))
|
|
663
932
|
});
|
|
664
933
|
}
|
|
665
934
|
//#endregion
|
|
666
|
-
//#region
|
|
667
|
-
var
|
|
668
|
-
render: () =>
|
|
669
|
-
resolve: () =>
|
|
670
|
-
type: () =>
|
|
671
|
-
}),
|
|
672
|
-
render: () =>
|
|
673
|
-
resolve: () =>
|
|
674
|
-
type: () =>
|
|
675
|
-
}),
|
|
676
|
-
render: () =>
|
|
677
|
-
resolve: () =>
|
|
678
|
-
type: () =>
|
|
679
|
-
}),
|
|
680
|
-
render: () =>
|
|
681
|
-
resolve: () =>
|
|
682
|
-
type: () =>
|
|
683
|
-
}),
|
|
684
|
-
render: () =>
|
|
685
|
-
resolve: () =>
|
|
935
|
+
//#region ../web-extension/lib/content-script/resolvers/locators/selectors/get-by-role.js
|
|
936
|
+
var ze = /* @__PURE__ */ a({
|
|
937
|
+
render: () => He,
|
|
938
|
+
resolve: () => Ve,
|
|
939
|
+
type: () => Be
|
|
940
|
+
}), Be = "getByRole", Ve = (e, t) => e.elements.flatMap((e) => [...e.querySelectorAll(`[role="${CSS.escape(t)}"]`)]), He = (e) => ({ fragment: typeof e == "string" ? `[role="${e.replaceAll("\"", "\\\"")}"]` : "[role]" }), Ue = /* @__PURE__ */ a({
|
|
941
|
+
render: () => Ke,
|
|
942
|
+
resolve: () => Ge,
|
|
943
|
+
type: () => We
|
|
944
|
+
}), We = "getByText", Ge = (e, t) => e.elements.flatMap((e) => [e, ...e.querySelectorAll("*")]).filter((e) => e.textContent?.includes(t)), Ke = (e) => ({ fragment: typeof e == "string" ? `:has-text("${e.replaceAll("\"", "\\\"")}")` : ":has-text(...)" }), qe = /* @__PURE__ */ a({
|
|
945
|
+
render: () => Xe,
|
|
946
|
+
resolve: () => Ye,
|
|
947
|
+
type: () => Je
|
|
948
|
+
}), Je = "getByTestId", Ye = (e, t) => e.elements.flatMap((e) => [...e.querySelectorAll(`[data-testid="${CSS.escape(t)}"]`)]), Xe = (e) => ({ fragment: typeof e == "string" ? `[data-testid="${e.replaceAll("\"", "\\\"")}"]` : "[data-testid]" }), Ze = /* @__PURE__ */ a({
|
|
949
|
+
render: () => et,
|
|
950
|
+
resolve: () => $e,
|
|
951
|
+
type: () => Qe
|
|
952
|
+
}), Qe = "first", $e = (e) => e.elements.slice(0, 1), et = () => ({ fragment: ":first" }), tt = /* @__PURE__ */ a({
|
|
953
|
+
render: () => rt,
|
|
954
|
+
resolve: () => nt,
|
|
686
955
|
type: () => "nth"
|
|
687
|
-
}),
|
|
956
|
+
}), nt = (e, t) => {
|
|
688
957
|
let n = e.elements.at(t);
|
|
689
958
|
return n ? [n] : [];
|
|
690
|
-
},
|
|
959
|
+
}, rt = (e) => ({ fragment: typeof e == "number" ? `:nth(${e})` : ":nth(?)" }), it = (e) => {
|
|
691
960
|
let t = Error(e);
|
|
692
961
|
return t.name = "LocatorError", t;
|
|
693
|
-
},
|
|
694
|
-
if (e.length === 0) throw
|
|
695
|
-
if (e.length > 1) throw
|
|
962
|
+
}, Z = (e) => {
|
|
963
|
+
if (e.length === 0) throw it("No elements found");
|
|
964
|
+
if (e.length > 1) throw it(`Strict mode violation: locator resolved to ${e.length} elements`);
|
|
696
965
|
return e[0];
|
|
697
|
-
},
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
966
|
+
}, at = /* @__PURE__ */ a({
|
|
967
|
+
permission: () => st,
|
|
968
|
+
resolve: () => ct,
|
|
969
|
+
type: () => ot
|
|
970
|
+
}), ot = "click", st = {
|
|
971
|
+
scope: "act.click",
|
|
972
|
+
category: "act",
|
|
973
|
+
severity: 3,
|
|
974
|
+
title: "Click on the page",
|
|
975
|
+
description: "Lets the app press buttons or links for you."
|
|
976
|
+
}, ct = (e, t = {}) => {
|
|
977
|
+
let n = Z(e.elements), r = n.getBoundingClientRect(), i = t.position?.x ?? .5, a = t.position?.y ?? .5, o = {
|
|
702
978
|
bubbles: !0,
|
|
703
979
|
cancelable: !0,
|
|
704
980
|
composed: !0,
|
|
@@ -722,14 +998,21 @@ var xe = /* @__PURE__ */ a({
|
|
|
722
998
|
...s,
|
|
723
999
|
buttons: 0
|
|
724
1000
|
})), n.dispatchEvent(new MouseEvent("mouseup", l)), n.dispatchEvent(new MouseEvent("click", l));
|
|
725
|
-
},
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
1001
|
+
}, lt = /* @__PURE__ */ a({
|
|
1002
|
+
permission: () => dt,
|
|
1003
|
+
resolve: () => mt,
|
|
1004
|
+
type: () => ut
|
|
1005
|
+
}), ut = "fill", dt = {
|
|
1006
|
+
scope: "act.type",
|
|
1007
|
+
category: "act",
|
|
1008
|
+
severity: 1,
|
|
1009
|
+
title: "Type into a text field",
|
|
1010
|
+
description: "Lets the app fill in form fields on your behalf."
|
|
1011
|
+
}, ft = (e, t) => {
|
|
729
1012
|
e._valueTracker?.setValue("");
|
|
730
1013
|
let n = e instanceof HTMLTextAreaElement ? HTMLTextAreaElement.prototype : HTMLInputElement.prototype, r = Object.getOwnPropertyDescriptor(n, "value")?.set;
|
|
731
1014
|
r ? r.call(e, t) : e.value = t;
|
|
732
|
-
},
|
|
1015
|
+
}, pt = (e, t) => {
|
|
733
1016
|
if (e.type !== "range") return null;
|
|
734
1017
|
let n = Number(e.min || 0), r = Number(e.max || 100);
|
|
735
1018
|
if (!Number.isFinite(n) || !Number.isFinite(r) || r <= n) return null;
|
|
@@ -767,15 +1050,15 @@ var xe = /* @__PURE__ */ a({
|
|
|
767
1050
|
buttons: 0
|
|
768
1051
|
}
|
|
769
1052
|
};
|
|
770
|
-
},
|
|
771
|
-
let r =
|
|
1053
|
+
}, mt = (e, t, n = {}) => {
|
|
1054
|
+
let r = Z(e.elements);
|
|
772
1055
|
if (r instanceof HTMLInputElement || r instanceof HTMLTextAreaElement) {
|
|
773
|
-
let e = r instanceof HTMLInputElement ?
|
|
1056
|
+
let e = r instanceof HTMLInputElement ? pt(r, t) : null;
|
|
774
1057
|
if (e) {
|
|
775
|
-
r.dispatchEvent(new PointerEvent("pointerdown", e.pointerDown)), r.dispatchEvent(new MouseEvent("mousedown", e.mouseDown)),
|
|
1058
|
+
r.dispatchEvent(new PointerEvent("pointerdown", e.pointerDown)), r.dispatchEvent(new MouseEvent("mousedown", e.mouseDown)), ft(r, t), r.dispatchEvent(new Event("input", { bubbles: !0 })), r.dispatchEvent(new PointerEvent("pointerup", e.pointerUp)), r.dispatchEvent(new MouseEvent("mouseup", e.mouseUp)), r.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
776
1059
|
return;
|
|
777
1060
|
}
|
|
778
|
-
|
|
1061
|
+
ft(r, t), r.dispatchEvent(new Event("input", { bubbles: !0 })), r.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
779
1062
|
return;
|
|
780
1063
|
}
|
|
781
1064
|
if (r instanceof HTMLElement && r.isContentEditable) {
|
|
@@ -783,11 +1066,18 @@ var xe = /* @__PURE__ */ a({
|
|
|
783
1066
|
return;
|
|
784
1067
|
}
|
|
785
1068
|
throw Error(`fill: element <${r.tagName.toLowerCase()}> is not fillable`);
|
|
786
|
-
},
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
1069
|
+
}, ht = /* @__PURE__ */ a({
|
|
1070
|
+
permission: () => _t,
|
|
1071
|
+
resolve: () => vt,
|
|
1072
|
+
type: () => gt
|
|
1073
|
+
}), gt = "hover", _t = {
|
|
1074
|
+
scope: "act.hover",
|
|
1075
|
+
category: "act",
|
|
1076
|
+
severity: 1,
|
|
1077
|
+
title: "Hover over the page",
|
|
1078
|
+
description: "Lets the app point at things to reveal menus or tooltips."
|
|
1079
|
+
}, vt = (e, t = {}) => {
|
|
1080
|
+
let n = Z(e.elements);
|
|
791
1081
|
n.dispatchEvent(new MouseEvent("mouseenter", {
|
|
792
1082
|
bubbles: !1,
|
|
793
1083
|
cancelable: !0
|
|
@@ -798,307 +1088,106 @@ var xe = /* @__PURE__ */ a({
|
|
|
798
1088
|
bubbles: !0,
|
|
799
1089
|
cancelable: !0
|
|
800
1090
|
}));
|
|
801
|
-
},
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
1091
|
+
}, yt = /* @__PURE__ */ a({
|
|
1092
|
+
permission: () => xt,
|
|
1093
|
+
resolve: () => St,
|
|
1094
|
+
type: () => bt
|
|
1095
|
+
}), bt = "textContent", xt = {
|
|
1096
|
+
scope: "read.text",
|
|
1097
|
+
category: "read",
|
|
1098
|
+
severity: 1,
|
|
1099
|
+
title: "Read text from the page",
|
|
1100
|
+
description: "Lets the app see the text shown on this page."
|
|
1101
|
+
}, St = (e, t = {}) => Z(e.elements).textContent, Ct = /* @__PURE__ */ a({
|
|
1102
|
+
permission: () => Tt,
|
|
1103
|
+
resolve: () => Et,
|
|
1104
|
+
type: () => wt
|
|
1105
|
+
}), wt = "isVisible", Tt = {
|
|
1106
|
+
scope: "read.visible",
|
|
1107
|
+
category: "read",
|
|
1108
|
+
severity: 0,
|
|
1109
|
+
title: "See what’s visible on the page",
|
|
1110
|
+
description: "Lets the app check which elements are currently on screen."
|
|
1111
|
+
}, Et = (e, t = {}) => {
|
|
1112
|
+
let n = Z(e.elements);
|
|
809
1113
|
if (!(n instanceof HTMLElement)) return !0;
|
|
810
1114
|
let r = n.ownerDocument.defaultView?.getComputedStyle(n);
|
|
811
1115
|
if (r?.display === "none" || r?.visibility === "hidden") return !1;
|
|
812
1116
|
let i = n.getBoundingClientRect();
|
|
813
1117
|
return i.width > 0 && i.height > 0;
|
|
814
|
-
},
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
if (r === null) return;
|
|
857
|
-
let a = `${n}|${z(i)}`, o = t.get(r);
|
|
858
|
-
if (o || (o = /* @__PURE__ */ new Map(), t.set(r, o)), o.has(a)) return;
|
|
859
|
-
let s = typeof i == "object" && !!i && !!i.once, c = (t) => {
|
|
860
|
-
s && o.delete(a);
|
|
861
|
-
let i = e.unenrich(t, n);
|
|
862
|
-
typeof r == "function" ? r.call(e.target, i) : r.handleEvent(i);
|
|
863
|
-
};
|
|
864
|
-
o.set(a, c), e.remoteEvents.addEventListener(n, c, i);
|
|
865
|
-
},
|
|
866
|
-
removeEventListener: (n, r, i) => {
|
|
867
|
-
if (r === null) return;
|
|
868
|
-
let a = `${n}|${z(i)}`, o = t.get(r), s = o?.get(a);
|
|
869
|
-
s && (e.remoteEvents.removeEventListener(n, s, i), o.delete(a));
|
|
870
|
-
},
|
|
871
|
-
dispatchEvent: (t) => e.remoteEvents.dispatchEvent(t)
|
|
872
|
-
};
|
|
873
|
-
}, pt = /* @__PURE__ */ a({
|
|
874
|
-
box: () => Z,
|
|
875
|
-
createVideoElementHandle: () => Y,
|
|
876
|
-
isType: () => X,
|
|
877
|
-
revive: () => Q,
|
|
878
|
-
type: () => B
|
|
879
|
-
}), B = "videoElement", V = [
|
|
880
|
-
"currentTime",
|
|
881
|
-
"volume",
|
|
882
|
-
"muted",
|
|
883
|
-
"playbackRate",
|
|
884
|
-
"src",
|
|
885
|
-
"loop",
|
|
886
|
-
"autoplay",
|
|
887
|
-
"preload",
|
|
888
|
-
"poster",
|
|
889
|
-
"disableRemotePlayback"
|
|
890
|
-
], H = [
|
|
891
|
-
"duration",
|
|
892
|
-
"paused",
|
|
893
|
-
"ended",
|
|
894
|
-
"seeking",
|
|
895
|
-
"readyState",
|
|
896
|
-
"currentSrc"
|
|
897
|
-
], U = ["buffered", "seekable"], W = Symbol.for("fkn.remoteVideoElement"), G = Symbol.for("fkn.remoteVideoElement.state"), K = Symbol.for("fkn.remoteVideoElement.controller"), mt = (e) => e ? Array.from({ length: e.length }, (t, n) => [e.start(n), e.end(n)]) : [], q = (e) => {
|
|
898
|
-
let t = {};
|
|
899
|
-
for (let n of [...V, ...H]) t[n] = e[n];
|
|
900
|
-
for (let n of U) t[n] = mt(e[n]);
|
|
901
|
-
return t.error = e.error ? {
|
|
902
|
-
code: e.error.code,
|
|
903
|
-
message: e.error.message
|
|
904
|
-
} : null, t;
|
|
905
|
-
}, ht = (e) => {
|
|
906
|
-
let t = (t) => {
|
|
907
|
-
if (!Number.isInteger(t) || t < 0 || t >= e.length) throw new DOMException("Index or size is negative or greater than the allowed amount", "IndexSizeError");
|
|
908
|
-
};
|
|
909
|
-
return {
|
|
910
|
-
get length() {
|
|
911
|
-
return e.length;
|
|
912
|
-
},
|
|
913
|
-
start(n) {
|
|
914
|
-
return t(n), e[n][0];
|
|
915
|
-
},
|
|
916
|
-
end(n) {
|
|
917
|
-
return t(n), e[n][1];
|
|
918
|
-
}
|
|
919
|
-
};
|
|
920
|
-
}, gt = (e) => e ? {
|
|
921
|
-
code: e.code,
|
|
922
|
-
message: e.message,
|
|
923
|
-
MEDIA_ERR_ABORTED: 1,
|
|
924
|
-
MEDIA_ERR_NETWORK: 2,
|
|
925
|
-
MEDIA_ERR_DECODE: 3,
|
|
926
|
-
MEDIA_ERR_SRC_NOT_SUPPORTED: 4
|
|
927
|
-
} : null, _t = (e) => dt(e, (e, t) => ({
|
|
928
|
-
originalDetail: e instanceof CustomEvent ? e.detail : null,
|
|
929
|
-
snapshot: q(t)
|
|
930
|
-
})), vt = async (e, t) => {
|
|
931
|
-
switch (t) {
|
|
932
|
-
case "play": return await e.play(), null;
|
|
933
|
-
case "pause": return e.pause(), null;
|
|
934
|
-
case "load": return e.load(), null;
|
|
935
|
-
case "requestPictureInPicture":
|
|
936
|
-
if (typeof e.requestPictureInPicture != "function") throw Error("requestPictureInPicture is not supported in this environment");
|
|
937
|
-
return await e.requestPictureInPicture(), null;
|
|
938
|
-
case "exitPictureInPicture": {
|
|
939
|
-
let t = e.ownerDocument;
|
|
940
|
-
if (typeof t?.exitPictureInPicture != "function") throw Error("exitPictureInPicture is not supported in this environment");
|
|
941
|
-
return await t.exitPictureInPicture(), null;
|
|
942
|
-
}
|
|
943
|
-
default: throw Error(`videoElement: unknown method "${t}"`);
|
|
944
|
-
}
|
|
945
|
-
}, yt = (e) => ({
|
|
946
|
-
call: async (t) => vt(e, t),
|
|
947
|
-
set: async (t, n) => {
|
|
948
|
-
try {
|
|
949
|
-
e[t] = n;
|
|
950
|
-
} catch {}
|
|
951
|
-
return q(e);
|
|
952
|
-
},
|
|
953
|
-
events: _t(e)
|
|
954
|
-
}), J = (e, t) => {
|
|
955
|
-
let n = new EventTarget();
|
|
956
|
-
Object.defineProperty(n, W, { value: !0 }), Object.defineProperty(n, G, { value: e }), Object.defineProperty(n, K, { value: t });
|
|
957
|
-
let r = ft({
|
|
958
|
-
target: n,
|
|
959
|
-
remoteEvents: t.events,
|
|
960
|
-
unenrich: (t, n) => {
|
|
961
|
-
if (!(t instanceof CustomEvent)) return t;
|
|
962
|
-
let r = t.detail;
|
|
963
|
-
if (!r || !("snapshot" in r)) return t;
|
|
964
|
-
Object.assign(e, r.snapshot);
|
|
965
|
-
let i = {
|
|
966
|
-
bubbles: t.bubbles,
|
|
967
|
-
cancelable: t.cancelable,
|
|
968
|
-
composed: t.composed
|
|
969
|
-
};
|
|
970
|
-
return r.originalDetail === null ? new Event(n, i) : new CustomEvent(n, {
|
|
971
|
-
...i,
|
|
972
|
-
detail: r.originalDetail
|
|
973
|
-
});
|
|
974
|
-
}
|
|
975
|
-
}), i = {
|
|
976
|
-
addEventListener: {
|
|
977
|
-
configurable: !0,
|
|
978
|
-
value: r.addEventListener
|
|
979
|
-
},
|
|
980
|
-
removeEventListener: {
|
|
981
|
-
configurable: !0,
|
|
982
|
-
value: r.removeEventListener
|
|
983
|
-
},
|
|
984
|
-
dispatchEvent: {
|
|
985
|
-
configurable: !0,
|
|
986
|
-
value: r.dispatchEvent
|
|
987
|
-
},
|
|
988
|
-
error: {
|
|
989
|
-
configurable: !0,
|
|
990
|
-
enumerable: !0,
|
|
991
|
-
get() {
|
|
992
|
-
return gt(e.error);
|
|
993
|
-
}
|
|
994
|
-
},
|
|
995
|
-
play: {
|
|
996
|
-
configurable: !0,
|
|
997
|
-
value: () => t.call("play", [])
|
|
998
|
-
},
|
|
999
|
-
pause: {
|
|
1000
|
-
configurable: !0,
|
|
1001
|
-
value: () => {
|
|
1002
|
-
t.call("pause", []).catch(() => {});
|
|
1003
|
-
}
|
|
1004
|
-
},
|
|
1005
|
-
load: {
|
|
1006
|
-
configurable: !0,
|
|
1007
|
-
value: () => {
|
|
1008
|
-
t.call("load", []).catch(() => {});
|
|
1009
|
-
}
|
|
1010
|
-
},
|
|
1011
|
-
requestPictureInPicture: {
|
|
1012
|
-
configurable: !0,
|
|
1013
|
-
value: () => t.call("requestPictureInPicture", [])
|
|
1014
|
-
},
|
|
1015
|
-
exitPictureInPicture: {
|
|
1016
|
-
configurable: !0,
|
|
1017
|
-
value: () => t.call("exitPictureInPicture", [])
|
|
1018
|
-
},
|
|
1019
|
-
HAVE_FUTURE_DATA: {
|
|
1020
|
-
enumerable: !0,
|
|
1021
|
-
value: 3
|
|
1022
|
-
},
|
|
1023
|
-
HAVE_ENOUGH_DATA: {
|
|
1024
|
-
enumerable: !0,
|
|
1025
|
-
value: 4
|
|
1026
|
-
}
|
|
1027
|
-
};
|
|
1028
|
-
for (let n of V) i[n] = {
|
|
1029
|
-
configurable: !0,
|
|
1030
|
-
enumerable: !0,
|
|
1031
|
-
get() {
|
|
1032
|
-
return e[n];
|
|
1033
|
-
},
|
|
1034
|
-
set(r) {
|
|
1035
|
-
e[n] = r, t.set(n, r).then((t) => {
|
|
1036
|
-
Object.assign(e, t);
|
|
1037
|
-
}, () => {});
|
|
1038
|
-
}
|
|
1039
|
-
};
|
|
1040
|
-
for (let t of H) i[t] = {
|
|
1041
|
-
configurable: !0,
|
|
1042
|
-
enumerable: !0,
|
|
1043
|
-
get() {
|
|
1044
|
-
return e[t];
|
|
1045
|
-
}
|
|
1046
|
-
};
|
|
1047
|
-
for (let t of U) i[t] = {
|
|
1048
|
-
configurable: !0,
|
|
1049
|
-
enumerable: !0,
|
|
1050
|
-
get() {
|
|
1051
|
-
return ht(e[t]);
|
|
1052
|
-
}
|
|
1053
|
-
};
|
|
1054
|
-
return Object.defineProperties(n, i), n;
|
|
1055
|
-
}, Y = (e) => J(q(e), yt(e)), X = (e) => typeof e == "object" && !!e && e[W] === !0, Z = (n, r) => {
|
|
1056
|
-
let i = n;
|
|
1057
|
-
return {
|
|
1058
|
-
...e,
|
|
1059
|
-
type: B,
|
|
1060
|
-
initialState: i[G],
|
|
1061
|
-
controller: t(i[K], r)
|
|
1062
|
-
};
|
|
1063
|
-
}, Q = (e, t) => {
|
|
1064
|
-
let r = n(e.controller, t);
|
|
1065
|
-
return J({ ...e.initialState }, r);
|
|
1066
|
-
}, bt = (e) => [pt, ...e], xt = /* @__PURE__ */ a({
|
|
1067
|
-
resolve: () => Ct,
|
|
1068
|
-
type: () => St
|
|
1069
|
-
}), St = "videoElement", Ct = (e, t = {}) => {
|
|
1070
|
-
let n = L(e.elements);
|
|
1118
|
+
}, Dt = /* @__PURE__ */ a({
|
|
1119
|
+
permission: () => kt,
|
|
1120
|
+
resolve: () => At,
|
|
1121
|
+
type: () => Ot
|
|
1122
|
+
}), Ot = "count", kt = {
|
|
1123
|
+
scope: "read.count",
|
|
1124
|
+
category: "read",
|
|
1125
|
+
severity: 0,
|
|
1126
|
+
title: "Count items on the page",
|
|
1127
|
+
description: "Lets the app count how many matching elements are present."
|
|
1128
|
+
}, At = (e, t = {}) => e.elements.length, jt = /* @__PURE__ */ a({
|
|
1129
|
+
permission: () => Nt,
|
|
1130
|
+
resolve: () => Pt,
|
|
1131
|
+
type: () => Mt
|
|
1132
|
+
}), Mt = "exists", Nt = {
|
|
1133
|
+
scope: "read.check",
|
|
1134
|
+
category: "read",
|
|
1135
|
+
severity: 0,
|
|
1136
|
+
title: "Check if something is on the page",
|
|
1137
|
+
description: "Lets the app test whether a specific element exists."
|
|
1138
|
+
}, Pt = (e, t = {}) => e.elements.length > 0, Ft = /* @__PURE__ */ a({
|
|
1139
|
+
permission: () => Lt,
|
|
1140
|
+
resolve: () => Rt,
|
|
1141
|
+
type: () => It
|
|
1142
|
+
}), It = "getAttribute", Lt = {
|
|
1143
|
+
scope: "read.info",
|
|
1144
|
+
category: "read",
|
|
1145
|
+
severity: 1,
|
|
1146
|
+
title: "Read info from the page",
|
|
1147
|
+
description: "Lets the app read the href value from a part of the page."
|
|
1148
|
+
}, Rt = (e, t, n = {}) => Z(e.elements).getAttribute(t), zt = /* @__PURE__ */ a({
|
|
1149
|
+
permission: () => Vt,
|
|
1150
|
+
resolve: () => Ht,
|
|
1151
|
+
type: () => Bt
|
|
1152
|
+
}), Bt = "videoElement", Vt = {
|
|
1153
|
+
scope: "media.video",
|
|
1154
|
+
category: "media",
|
|
1155
|
+
severity: 0,
|
|
1156
|
+
title: "Control video playback",
|
|
1157
|
+
description: "Lets the app play, pause, seek, and read the video on the page."
|
|
1158
|
+
}, Ht = (e, t = {}) => {
|
|
1159
|
+
let n = Z(e.elements);
|
|
1071
1160
|
if (!(n instanceof HTMLVideoElement)) throw Error(`videoElement: expected <video>, got <${n.tagName.toLowerCase()}>`);
|
|
1072
|
-
return
|
|
1073
|
-
},
|
|
1074
|
-
|
|
1161
|
+
return T(n);
|
|
1162
|
+
}, Q = "locator", Ut = [
|
|
1163
|
+
A,
|
|
1075
1164
|
{
|
|
1076
|
-
...
|
|
1165
|
+
...P,
|
|
1077
1166
|
nextLocatorType: "frameLocator"
|
|
1078
1167
|
},
|
|
1079
|
-
|
|
1080
|
-
Te,
|
|
1081
|
-
ke,
|
|
1082
|
-
Ne,
|
|
1083
|
-
Le
|
|
1084
|
-
], Tt = [
|
|
1085
|
-
Be,
|
|
1168
|
+
ze,
|
|
1086
1169
|
Ue,
|
|
1087
1170
|
qe,
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1171
|
+
Ze,
|
|
1172
|
+
tt
|
|
1173
|
+
], $ = [
|
|
1091
1174
|
at,
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1175
|
+
lt,
|
|
1176
|
+
ht,
|
|
1177
|
+
yt,
|
|
1178
|
+
Ct,
|
|
1179
|
+
Dt,
|
|
1180
|
+
jt,
|
|
1181
|
+
Ft,
|
|
1182
|
+
zt
|
|
1183
|
+
], Wt = {
|
|
1184
|
+
type: Q,
|
|
1185
|
+
selectorModules: Ut,
|
|
1186
|
+
operationModules: $
|
|
1187
|
+
}, Gt = Re({
|
|
1188
|
+
ownType: Q,
|
|
1189
|
+
selectorModules: Ut,
|
|
1190
|
+
operationModules: $
|
|
1102
1191
|
});
|
|
1103
1192
|
//#endregion
|
|
1104
|
-
export {
|
|
1193
|
+
export { J as a, k as c, T as d, E as f, a as g, i as h, Ie as i, ee as l, u as m, Q as n, q as o, O as p, Le as r, fe as s, Wt as t, D as u };
|