@fkn/lib 0.9.4 → 0.9.7
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/account.cjs +1 -1
- package/account.js +1 -1
- package/{api-BFqrrvzI.d.ts → api-9O1SM4CR.d.ts} +155 -77
- package/{api-Bhz3iB9m.js → api-BU8zNmQI.js} +54 -17
- package/{api-C75xqLFy.cjs → api-C9Mh5v0z.cjs} +1 -1
- package/cloud/dgram.cjs +1 -1
- package/cloud/dgram.js +1 -1
- package/cloud/fetch.cjs +1 -0
- package/cloud/fetch.d.ts +2 -0
- package/cloud/fetch.js +2 -0
- package/cloud/fs.cjs +1 -1
- package/cloud/fs.js +1 -1
- package/cloud/net.cjs +1 -1
- package/cloud/net.d.ts +1 -1
- package/cloud/net.js +1 -1
- package/cloud-DZzkfeQi.cjs +1 -0
- package/cloud-OAvwgd_r.js +283 -0
- package/{cloud-CAOIpDIH.d.ts → cloud-wrRNWHAn.d.ts} +4 -9
- package/cloud.cjs +1 -1
- package/cloud.d.ts +3 -2
- package/cloud.js +4 -4
- package/{dgram-D4JF_XW7.js → dgram-DNbgOMoK.js} +1 -1
- package/{dgram-C2LmoO0A.cjs → dgram-ocGNUMpo.cjs} +1 -1
- package/dgram.cjs +1 -1
- package/dgram.d.ts +1 -1
- package/dgram.js +1 -1
- package/dns.cjs +1 -1
- package/dns.js +1 -1
- package/extension-B0qU5XuR.d.ts +16 -0
- package/extension-DQZmGSuX.js +78 -0
- package/extension-DmKxv-br.cjs +1 -0
- package/extension.cjs +1 -1
- package/extension.d.ts +3 -3
- package/extension.js +3 -3
- package/fs/promises.cjs +1 -1
- package/fs/promises.js +1 -1
- package/{fs-Bghx-1Hy.js → fs-BYMGoFir.js} +2 -2
- package/{fs-BXcz3BjJ.cjs → fs-D-pDr8fW.cjs} +1 -1
- package/fs.cjs +1 -1
- package/fs.js +1 -1
- package/http.cjs +1 -1
- package/http.d.ts +2 -1
- package/http.js +1 -1
- package/{index-pr5vLVVT.d.ts → index-DQfP-Uhy.d.ts} +29 -22
- package/index.cjs +1 -1
- package/index.d.ts +6 -6
- package/index.js +29 -28
- package/{proxy-Bhk4X3xo.js → lib-BcEnB4iV.js} +353 -644
- package/lib-CQqdCndr.cjs +31 -0
- package/{net-MbSFrO35.d.ts → net-BDjZxAEZ.d.ts} +1 -3
- package/{net-BgQYnATG.js → net-Bi82weSE.js} +1 -1
- package/{net-zOx2OVGc.cjs → net-uN5eXX3L.cjs} +1 -1
- package/net.cjs +1 -1
- package/net.d.ts +1 -1
- package/net.js +1 -1
- package/package.json +7 -2
- package/{packages-CErlrrLB.d.ts → packages-CSZGUtem.d.ts} +20 -7
- package/packages.cjs +1 -1
- package/packages.d.ts +1 -1
- package/packages.js +1 -1
- package/proxy-CMtPeuvd.js +43 -0
- package/proxy-DbcJMUcm.cjs +1 -0
- package/proxy-pCTWR0E6.d.ts +8 -0
- package/{storage-D01O3zky.js → storage-BVWaXq8X.js} +1 -1
- package/{storage-a3OhXFv2.cjs → storage-DG1Ac1FK.cjs} +1 -1
- package/cloud-BeHgCa_z.js +0 -129
- package/cloud-Cd6TzZXd.cjs +0 -1
- package/extension-C46Rp-qr.js +0 -73
- package/extension-CkPvwol3.cjs +0 -1
- package/extension-D7SSKewV.d.ts +0 -16
- package/proxy-BEz2K6e4.cjs +0 -53
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
-
import { t } from "
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var s = (e, t) => {
|
|
2
|
+
import { BoxBase as t, createTypedEventTarget as n, expose as r, recursiveBox as i, recursiveRevive as a } from "osra";
|
|
3
|
+
//#region ../web-extension/lib/lib/revivables/event-proxy.js
|
|
4
|
+
var o = (e, t) => {
|
|
6
5
|
let n = new EventTarget(), r = /* @__PURE__ */ new Map(), i = EventTarget.prototype.addEventListener.bind(n), a = EventTarget.prototype.removeEventListener.bind(n);
|
|
7
6
|
return Object.defineProperty(n, "addEventListener", {
|
|
8
7
|
configurable: !0,
|
|
@@ -31,15 +30,15 @@ var s = (e, t) => {
|
|
|
31
30
|
o && (e.removeEventListener(t, o), r.delete(t));
|
|
32
31
|
}
|
|
33
32
|
}), n;
|
|
34
|
-
},
|
|
33
|
+
}, s = (e) => typeof e == "boolean" ? +!!e : +!!e?.capture, c = (e) => {
|
|
35
34
|
let t = /* @__PURE__ */ new WeakMap();
|
|
36
35
|
return {
|
|
37
36
|
addEventListener: (n, r, i) => {
|
|
38
37
|
if (r === null) return;
|
|
39
|
-
let a = `${n}|${
|
|
38
|
+
let a = `${n}|${s(i)}`, o = t.get(r);
|
|
40
39
|
if (o || (o = /* @__PURE__ */ new Map(), t.set(r, o)), o.has(a)) return;
|
|
41
|
-
let
|
|
42
|
-
|
|
40
|
+
let c = typeof i == "object" && !!i && !!i.once, l = (t) => {
|
|
41
|
+
c && o.delete(a);
|
|
43
42
|
let i = e.unenrich(t, n);
|
|
44
43
|
typeof r == "function" ? r.call(e.target, i) : r.handleEvent(i);
|
|
45
44
|
};
|
|
@@ -47,18 +46,18 @@ var s = (e, t) => {
|
|
|
47
46
|
},
|
|
48
47
|
removeEventListener: (n, r, i) => {
|
|
49
48
|
if (r === null) return;
|
|
50
|
-
let a = `${n}|${
|
|
51
|
-
|
|
49
|
+
let a = `${n}|${s(i)}`, o = t.get(r), c = o?.get(a);
|
|
50
|
+
c && (e.remoteEvents.removeEventListener(n, c, i), o.delete(a));
|
|
52
51
|
},
|
|
53
52
|
dispatchEvent: (t) => e.remoteEvents.dispatchEvent(t)
|
|
54
53
|
};
|
|
55
|
-
},
|
|
56
|
-
box: () =>
|
|
57
|
-
createVideoElementHandle: () =>
|
|
58
|
-
isType: () =>
|
|
59
|
-
revive: () =>
|
|
60
|
-
type: () =>
|
|
61
|
-
}),
|
|
54
|
+
}, l = /* @__PURE__ */ e({
|
|
55
|
+
box: () => S,
|
|
56
|
+
createVideoElementHandle: () => b,
|
|
57
|
+
isType: () => x,
|
|
58
|
+
revive: () => C,
|
|
59
|
+
type: () => u
|
|
60
|
+
}), u = "videoElement", d = [
|
|
62
61
|
"currentTime",
|
|
63
62
|
"volume",
|
|
64
63
|
"muted",
|
|
@@ -69,17 +68,17 @@ var s = (e, t) => {
|
|
|
69
68
|
"preload",
|
|
70
69
|
"poster",
|
|
71
70
|
"disableRemotePlayback"
|
|
72
|
-
],
|
|
71
|
+
], f = [
|
|
73
72
|
"duration",
|
|
74
73
|
"paused",
|
|
75
74
|
"ended",
|
|
76
75
|
"seeking",
|
|
77
76
|
"readyState",
|
|
78
77
|
"currentSrc"
|
|
79
|
-
],
|
|
78
|
+
], 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) => {
|
|
80
79
|
let t = {};
|
|
81
|
-
for (let n of [...
|
|
82
|
-
for (let n of
|
|
80
|
+
for (let n of [...d, ...f]) t[n] = e[n];
|
|
81
|
+
for (let n of p) t[n] = _(e[n]);
|
|
83
82
|
return t.error = e.error ? {
|
|
84
83
|
code: e.error.code,
|
|
85
84
|
message: e.error.message
|
|
@@ -106,10 +105,10 @@ var s = (e, t) => {
|
|
|
106
105
|
MEDIA_ERR_NETWORK: 2,
|
|
107
106
|
MEDIA_ERR_DECODE: 3,
|
|
108
107
|
MEDIA_ERR_SRC_NOT_SUPPORTED: 4
|
|
109
|
-
} : null,
|
|
108
|
+
} : null, y = (e) => o(e, (e, t) => ({
|
|
110
109
|
originalDetail: e instanceof CustomEvent ? e.detail : null,
|
|
111
|
-
snapshot:
|
|
112
|
-
})),
|
|
110
|
+
snapshot: v(t)
|
|
111
|
+
})), ne = async (e, t) => {
|
|
113
112
|
switch (t) {
|
|
114
113
|
case "play": return await e.play(), null;
|
|
115
114
|
case "pause": return e.pause(), null;
|
|
@@ -124,19 +123,19 @@ var s = (e, t) => {
|
|
|
124
123
|
}
|
|
125
124
|
default: throw Error(`videoElement: unknown method "${t}"`);
|
|
126
125
|
}
|
|
127
|
-
},
|
|
128
|
-
call: async (t) =>
|
|
126
|
+
}, re = (e) => ({
|
|
127
|
+
call: async (t) => ne(e, t),
|
|
129
128
|
set: async (t, n) => {
|
|
130
129
|
try {
|
|
131
130
|
e[t] = n;
|
|
132
131
|
} catch {}
|
|
133
|
-
return
|
|
132
|
+
return v(e);
|
|
134
133
|
},
|
|
135
|
-
events:
|
|
136
|
-
}),
|
|
134
|
+
events: y(e)
|
|
135
|
+
}), ie = (e, t) => {
|
|
137
136
|
let n = new EventTarget();
|
|
138
|
-
Object.defineProperty(n,
|
|
139
|
-
let r =
|
|
137
|
+
Object.defineProperty(n, m, { value: !0 }), Object.defineProperty(n, h, { value: e }), Object.defineProperty(n, g, { value: t });
|
|
138
|
+
let r = c({
|
|
140
139
|
target: n,
|
|
141
140
|
remoteEvents: t.events,
|
|
142
141
|
unenrich: (t, n) => {
|
|
@@ -207,7 +206,7 @@ var s = (e, t) => {
|
|
|
207
206
|
value: 4
|
|
208
207
|
}
|
|
209
208
|
};
|
|
210
|
-
for (let n of
|
|
209
|
+
for (let n of d) i[n] = {
|
|
211
210
|
configurable: !0,
|
|
212
211
|
enumerable: !0,
|
|
213
212
|
get() {
|
|
@@ -219,14 +218,14 @@ var s = (e, t) => {
|
|
|
219
218
|
}, () => {});
|
|
220
219
|
}
|
|
221
220
|
};
|
|
222
|
-
for (let t of
|
|
221
|
+
for (let t of f) i[t] = {
|
|
223
222
|
configurable: !0,
|
|
224
223
|
enumerable: !0,
|
|
225
224
|
get() {
|
|
226
225
|
return e[t];
|
|
227
226
|
}
|
|
228
227
|
};
|
|
229
|
-
for (let t of
|
|
228
|
+
for (let t of p) i[t] = {
|
|
230
229
|
configurable: !0,
|
|
231
230
|
enumerable: !0,
|
|
232
231
|
get() {
|
|
@@ -234,75 +233,84 @@ var s = (e, t) => {
|
|
|
234
233
|
}
|
|
235
234
|
};
|
|
236
235
|
return Object.defineProperties(n, i), n;
|
|
237
|
-
},
|
|
236
|
+
}, b = (e) => ie(v(e), re(e)), x = (e) => typeof e == "object" && !!e && e[m] === !0, S = (e, n) => {
|
|
238
237
|
let r = e;
|
|
239
238
|
return {
|
|
240
|
-
...
|
|
241
|
-
type:
|
|
242
|
-
initialState: r[
|
|
243
|
-
controller:
|
|
239
|
+
...t,
|
|
240
|
+
type: u,
|
|
241
|
+
initialState: r[h],
|
|
242
|
+
controller: i(r[g], n)
|
|
244
243
|
};
|
|
245
|
-
},
|
|
246
|
-
let n =
|
|
247
|
-
return
|
|
248
|
-
},
|
|
249
|
-
typeof document < "u" && document.addEventListener(
|
|
250
|
-
|
|
244
|
+
}, C = (e, t) => {
|
|
245
|
+
let n = a(e.controller, t);
|
|
246
|
+
return ie({ ...e.initialState }, n);
|
|
247
|
+
}, w = (e) => [l, ...e], ae = "FKN_WEB_EXTENSION_MAIN_WORLD_CONTENT_SCRIPT_ENABLED_EVENT_KEY", oe = "fknExtension", se = n();
|
|
248
|
+
typeof document < "u" && document.addEventListener(ae, () => {
|
|
249
|
+
se.dispatchEvent(new CustomEvent("statuschange", { detail: { enabled: T() } }));
|
|
251
250
|
});
|
|
252
|
-
var
|
|
253
|
-
|
|
254
|
-
},
|
|
255
|
-
if (
|
|
251
|
+
var T = () => typeof document > "u" ? !1 : document.documentElement.dataset[oe] === "true", E = null, ce = (e) => {
|
|
252
|
+
E = e;
|
|
253
|
+
}, le = 150, D = (e = 1e3) => new Promise((t, n) => {
|
|
254
|
+
if (T()) return t();
|
|
256
255
|
let r, i = (e) => {
|
|
257
256
|
clearTimeout(r), s.disconnect(), document.removeEventListener("readystatechange", c), e();
|
|
258
257
|
}, a = () => i(async () => {
|
|
259
|
-
if (
|
|
258
|
+
if (E && (await E().catch(() => {}), T())) return t();
|
|
260
259
|
n(/* @__PURE__ */ Error("The FKN WebExtension is not installed, enabled or not exposed on this page."));
|
|
261
260
|
}), o = () => {
|
|
262
|
-
clearTimeout(r), r = setTimeout(() =>
|
|
261
|
+
clearTimeout(r), r = setTimeout(() => T() ? i(t) : a(), le);
|
|
263
262
|
}, s = new MutationObserver(() => {
|
|
264
|
-
|
|
263
|
+
T() && i(t);
|
|
265
264
|
}), c = () => {
|
|
266
|
-
document.readyState === "complete" && !
|
|
265
|
+
document.readyState === "complete" && !T() && o();
|
|
267
266
|
};
|
|
268
267
|
if (r = setTimeout(a, e), s.observe(document.documentElement, {
|
|
269
268
|
attributes: !0,
|
|
270
269
|
attributeFilter: ["data-fkn-extension"]
|
|
271
270
|
}), document.addEventListener("readystatechange", c), document.readyState === "complete") return o();
|
|
272
|
-
|
|
273
|
-
}),
|
|
274
|
-
await
|
|
271
|
+
T() && i(t);
|
|
272
|
+
}), ue, O = new Proxy({}, { get: (e, t) => async (...e) => {
|
|
273
|
+
await D(), ue ??= r({}, {
|
|
275
274
|
transport: window,
|
|
276
|
-
revivableModules:
|
|
275
|
+
revivableModules: w
|
|
277
276
|
});
|
|
278
|
-
let n = (await
|
|
277
|
+
let n = (await ue)[t];
|
|
279
278
|
return n(...e);
|
|
280
|
-
} }),
|
|
279
|
+
} }), k = [
|
|
280
|
+
"origin",
|
|
281
|
+
"referer",
|
|
282
|
+
"cookie"
|
|
283
|
+
], de = (e, t) => (e ?? []).some(([e, n]) => e.trim().toLowerCase() === t && n !== ""), fe = (e) => de(e, "cookie"), pe = (e, t) => {
|
|
284
|
+
if (t === "include" && fe(e)) throw Error("fetch: a forged Cookie header and credentials:'include' are different identities - send one or the other");
|
|
285
|
+
}, me = (e) => {
|
|
286
|
+
let t = [...new Set((e ?? []).map(([e]) => e.trim().toLowerCase()).filter((e) => !k.includes(e)))];
|
|
287
|
+
if (t.length) throw Error(`fetch: refusing to forge request header(s): ${t.join(", ")}`);
|
|
288
|
+
}, he = {
|
|
281
289
|
scope: "network.fetch",
|
|
282
290
|
category: "network",
|
|
283
291
|
severity: 0,
|
|
284
292
|
title: "Fetch data from other sites",
|
|
285
293
|
description: "Lets the app download public data from other websites directly, past the usual cross-origin limits."
|
|
286
|
-
},
|
|
294
|
+
}, ge = {
|
|
287
295
|
scope: "network.fetchCredentialed",
|
|
288
296
|
category: "network",
|
|
289
297
|
severity: 3,
|
|
290
298
|
unsafe: !0,
|
|
291
299
|
title: "Fetch from other sites, signed in as you",
|
|
292
300
|
description: "Lets the app fetch other sites using your logged-in session cookies, so it can read data only you should see."
|
|
293
|
-
},
|
|
301
|
+
}, _e = {
|
|
294
302
|
scope: "network.fetchLocal",
|
|
295
303
|
category: "network",
|
|
296
304
|
severity: 3,
|
|
297
305
|
unsafe: !0,
|
|
298
306
|
title: "Access devices on your local network",
|
|
299
307
|
description: "Lets the app reach devices and services on your home or work network, which websites normally cannot touch."
|
|
300
|
-
},
|
|
308
|
+
}, ve = (e) => {
|
|
301
309
|
let t = e.match(/^(\d+)\.(\d+)\.\d+\.\d+$/);
|
|
302
310
|
if (!t) return !1;
|
|
303
311
|
let [n, r] = [Number(t[1]), Number(t[2])];
|
|
304
312
|
return n === 10 || n === 127 || n === 0 || n === 169 && r === 254 || n === 172 && r >= 16 && r <= 31 || n === 192 && r === 168;
|
|
305
|
-
},
|
|
313
|
+
}, ye = (e) => {
|
|
306
314
|
let t;
|
|
307
315
|
try {
|
|
308
316
|
t = new URL(e);
|
|
@@ -310,8 +318,8 @@ var O = () => typeof document > "u" ? !1 : document.documentElement.dataset[ae]
|
|
|
310
318
|
return !1;
|
|
311
319
|
}
|
|
312
320
|
let n = t.hostname.replace(/^\[|\]$/g, "").toLowerCase().replace(/\.$/, "");
|
|
313
|
-
return n === "localhost" || n.endsWith(".localhost") || n.endsWith(".local") || n.endsWith(".internal") || n.endsWith(".home.arpa") ? !0 : n.includes(":") ? n === "::" || n === "::1" || n.startsWith("fc") || n.startsWith("fd") || /^fe[89ab]/.test(n) || n.startsWith("::ffff:") :
|
|
314
|
-
},
|
|
321
|
+
return n === "localhost" || n.endsWith(".localhost") || n.endsWith(".local") || n.endsWith(".internal") || n.endsWith(".home.arpa") ? !0 : n.includes(":") ? n === "::" || n === "::1" || n.startsWith("fc") || n.startsWith("fd") || /^fe[89ab]/.test(n) || n.startsWith("::ffff:") : ve(n);
|
|
322
|
+
}, be = ["fkn.app", "fkn.dev"], A = (e) => {
|
|
315
323
|
let t;
|
|
316
324
|
try {
|
|
317
325
|
t = new URL(e);
|
|
@@ -320,46 +328,46 @@ var O = () => typeof document > "u" ? !1 : document.documentElement.dataset[ae]
|
|
|
320
328
|
}
|
|
321
329
|
if (t.protocol === "chrome-extension:" || t.protocol === "moz-extension:") return !0;
|
|
322
330
|
let n = t.hostname;
|
|
323
|
-
return
|
|
324
|
-
},
|
|
325
|
-
if (
|
|
326
|
-
},
|
|
331
|
+
return be.some((e) => n === e || n.endsWith(`.${e}`));
|
|
332
|
+
}, j = (e) => {
|
|
333
|
+
if (A(e)) throw Error("fetch: refusing to target the extension's own pages or FKN platform domains");
|
|
334
|
+
}, xe = (e) => {
|
|
327
335
|
if (!e?.headers) return;
|
|
328
|
-
let t = new Headers(e.headers), n =
|
|
336
|
+
let t = new Headers(e.headers), n = k.map((e) => {
|
|
329
337
|
let n = t.get(e);
|
|
330
|
-
return n === null ? void 0 : [e, n];
|
|
338
|
+
return n === null || n === "" ? void 0 : [e, n];
|
|
331
339
|
}).filter((e) => e !== void 0);
|
|
332
340
|
return n.length ? n : void 0;
|
|
333
|
-
},
|
|
341
|
+
}, Se = async (e, t) => {
|
|
334
342
|
let n = new Request(e, t);
|
|
335
|
-
|
|
343
|
+
j(n.url);
|
|
336
344
|
let r = n.body ? await n.arrayBuffer() : null;
|
|
337
|
-
return
|
|
345
|
+
return O.proxyFetch({
|
|
338
346
|
url: n.url,
|
|
339
347
|
method: n.method,
|
|
340
348
|
headers: [...n.headers],
|
|
341
349
|
body: r,
|
|
342
350
|
credentials: t?.credentials === "include" ? "include" : "omit",
|
|
343
351
|
redirect: n.redirect,
|
|
344
|
-
unsafeHeaders:
|
|
352
|
+
unsafeHeaders: xe(t),
|
|
345
353
|
reason: t?.reason,
|
|
346
354
|
signal: t?.signal ?? void 0
|
|
347
355
|
});
|
|
348
|
-
},
|
|
356
|
+
}, Ce = {
|
|
349
357
|
scope: "network.readCookie",
|
|
350
358
|
category: "network",
|
|
351
359
|
severity: 3,
|
|
352
360
|
unsafe: !0,
|
|
353
361
|
title: "Read a site’s cookie",
|
|
354
362
|
description: "Lets the app read a named cookie from another site, which can include the login token only that site should see."
|
|
355
|
-
},
|
|
363
|
+
}, we = { get: (e) => O.getCookie(e) }, Te = {
|
|
356
364
|
scope: "network.modifyRequestHeaders",
|
|
357
365
|
category: "network",
|
|
358
366
|
severity: 2,
|
|
359
367
|
unsafe: !0,
|
|
360
368
|
title: "Rewrite request headers to other sites",
|
|
361
369
|
description: "Lets the app set or remove headers (like Origin and Referer) on this page’s own requests to the listed sites."
|
|
362
|
-
},
|
|
370
|
+
}, Ee = (e) => O.setRequestHeaderRule(e), De = (e) => O.removeRequestHeaderRule({ ruleId: e }), Oe = class extends Error {
|
|
363
371
|
reason;
|
|
364
372
|
filename;
|
|
365
373
|
line;
|
|
@@ -368,18 +376,18 @@ var O = () => typeof document > "u" ? !1 : document.documentElement.dataset[ae]
|
|
|
368
376
|
constructor(e, t, n, r, i) {
|
|
369
377
|
super(`${e}:${n}:${r}: ${t}`), this.reason = t, this.filename = e, this.line = n, this.column = r, this.source = i;
|
|
370
378
|
}
|
|
371
|
-
},
|
|
379
|
+
}, ke = class {
|
|
372
380
|
start;
|
|
373
381
|
end;
|
|
374
382
|
source;
|
|
375
383
|
constructor(e, t, n) {
|
|
376
384
|
this.start = e, this.end = t, this.source = n;
|
|
377
385
|
}
|
|
378
|
-
},
|
|
386
|
+
}, M;
|
|
379
387
|
(function(e) {
|
|
380
|
-
e.stylesheet = "stylesheet", e.rule = "rule", e.declaration = "declaration", e.comment = "comment", e.
|
|
381
|
-
})(
|
|
382
|
-
var
|
|
388
|
+
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";
|
|
389
|
+
})(M ||= {});
|
|
390
|
+
var N = (e, t, n) => {
|
|
383
391
|
let r = n, i = 1e4;
|
|
384
392
|
do {
|
|
385
393
|
let n = t.map((t) => e.indexOf(t, r));
|
|
@@ -391,7 +399,7 @@ var F = (e, t, n) => {
|
|
|
391
399
|
r = o + 2, i--;
|
|
392
400
|
} while (i > 0);
|
|
393
401
|
throw Error("Too many escaping");
|
|
394
|
-
},
|
|
402
|
+
}, P = (e, t, n) => {
|
|
395
403
|
let r = n, i = 1e4;
|
|
396
404
|
do {
|
|
397
405
|
let n = t.map((t) => e.indexOf(t, r));
|
|
@@ -405,21 +413,21 @@ var F = (e, t, n) => {
|
|
|
405
413
|
break;
|
|
406
414
|
case "(":
|
|
407
415
|
{
|
|
408
|
-
let t =
|
|
416
|
+
let t = P(e, [")"], o + 1);
|
|
409
417
|
if (t === -1) return -1;
|
|
410
418
|
r = t + 1;
|
|
411
419
|
}
|
|
412
420
|
break;
|
|
413
421
|
case "\"":
|
|
414
422
|
{
|
|
415
|
-
let t =
|
|
423
|
+
let t = N(e, ["\""], o + 1);
|
|
416
424
|
if (t === -1) return -1;
|
|
417
425
|
r = t + 1;
|
|
418
426
|
}
|
|
419
427
|
break;
|
|
420
428
|
case "'":
|
|
421
429
|
{
|
|
422
|
-
let t =
|
|
430
|
+
let t = N(e, ["'"], o + 1);
|
|
423
431
|
if (t === -1) return -1;
|
|
424
432
|
r = t + 1;
|
|
425
433
|
}
|
|
@@ -429,17 +437,17 @@ var F = (e, t, n) => {
|
|
|
429
437
|
i--;
|
|
430
438
|
} while (i > 0);
|
|
431
439
|
throw Error("Too many escaping");
|
|
432
|
-
},
|
|
433
|
-
function
|
|
440
|
+
}, F = /\/\*[^]*?(?:\*\/|$)/g;
|
|
441
|
+
function I(e) {
|
|
434
442
|
return e ? e.trim() : "";
|
|
435
443
|
}
|
|
436
|
-
function
|
|
444
|
+
function L(e, t) {
|
|
437
445
|
let n = e && typeof e.type == "string", r = n ? e : t;
|
|
438
446
|
for (let t in e) {
|
|
439
447
|
let n = e[t];
|
|
440
448
|
Array.isArray(n) ? n.forEach((e) => {
|
|
441
|
-
|
|
442
|
-
}) : n && typeof n == "object" &&
|
|
449
|
+
L(e, r);
|
|
450
|
+
}) : n && typeof n == "object" && L(n, r);
|
|
443
451
|
}
|
|
444
452
|
return n && Object.defineProperty(e, "parent", {
|
|
445
453
|
configurable: !0,
|
|
@@ -448,7 +456,7 @@ function z(e, t) {
|
|
|
448
456
|
value: t || null
|
|
449
457
|
}), e;
|
|
450
458
|
}
|
|
451
|
-
var
|
|
459
|
+
var Ae = class {
|
|
452
460
|
level = 0;
|
|
453
461
|
indentation = " ";
|
|
454
462
|
compress = !1;
|
|
@@ -463,33 +471,25 @@ var Te = class {
|
|
|
463
471
|
}
|
|
464
472
|
visit(e) {
|
|
465
473
|
switch (e.type) {
|
|
466
|
-
case
|
|
467
|
-
case
|
|
468
|
-
case
|
|
469
|
-
case
|
|
470
|
-
case
|
|
471
|
-
case
|
|
472
|
-
case
|
|
473
|
-
case
|
|
474
|
-
case
|
|
475
|
-
case
|
|
476
|
-
case
|
|
477
|
-
case
|
|
478
|
-
case
|
|
479
|
-
case
|
|
480
|
-
case
|
|
481
|
-
case
|
|
482
|
-
case
|
|
483
|
-
case
|
|
484
|
-
case
|
|
485
|
-
case P.pageMarginBox: return this.pageMarginBox(e);
|
|
486
|
-
case P.positionTry: return this.positionTry(e);
|
|
487
|
-
case P.property: return this.property(e);
|
|
488
|
-
case P.scope: return this.scope(e);
|
|
489
|
-
case P.startingStyle: return this.startingStyle(e);
|
|
490
|
-
case P.supports: return this.supports(e);
|
|
491
|
-
case P.viewTransition: return this.viewTransition(e);
|
|
492
|
-
case P.atRule: return this.genericAtRule(e);
|
|
474
|
+
case M.stylesheet: return this.stylesheet(e);
|
|
475
|
+
case M.rule: return this.rule(e);
|
|
476
|
+
case M.declaration: return this.declaration(e);
|
|
477
|
+
case M.comment: return this.comment(e);
|
|
478
|
+
case M.container: return this.container(e);
|
|
479
|
+
case M.charset: return this.charset(e);
|
|
480
|
+
case M.document: return this.document(e);
|
|
481
|
+
case M.customMedia: return this.customMedia(e);
|
|
482
|
+
case M.fontFace: return this.fontFace(e);
|
|
483
|
+
case M.host: return this.host(e);
|
|
484
|
+
case M.import: return this.import(e);
|
|
485
|
+
case M.keyframes: return this.keyframes(e);
|
|
486
|
+
case M.keyframe: return this.keyframe(e);
|
|
487
|
+
case M.layer: return this.layer(e);
|
|
488
|
+
case M.media: return this.media(e);
|
|
489
|
+
case M.namespace: return this.namespace(e);
|
|
490
|
+
case M.page: return this.page(e);
|
|
491
|
+
case M.startingStyle: return this.startingStyle(e);
|
|
492
|
+
case M.supports: return this.supports(e);
|
|
493
493
|
}
|
|
494
494
|
}
|
|
495
495
|
mapVisit(e, t) {
|
|
@@ -550,9 +550,6 @@ var Te = class {
|
|
|
550
550
|
let t = e.selectors.length ? `${e.selectors.join(", ")} ` : "";
|
|
551
551
|
return this.emit(`@page ${t}`, e.position) + this.emit("{\n") + this.emit(this.indent(1)) + this.mapVisit(e.declarations, "\n") + this.emit(this.indent(-1)) + this.emit("\n}");
|
|
552
552
|
}
|
|
553
|
-
pageMarginBox(e) {
|
|
554
|
-
return this.compress ? this.emit(`@${e.name}`, e.position) + this.emit("{") + this.mapVisit(e.declarations) + this.emit("}") : this.emit(`${this.indent()}@${e.name} `, e.position) + this.emit("{\n") + this.emit(this.indent(1)) + this.mapVisit(e.declarations, "\n") + this.emit(this.indent(-1)) + this.emit(`\n${this.indent()}}`);
|
|
555
|
-
}
|
|
556
553
|
fontFace(e) {
|
|
557
554
|
return this.compress ? this.emit("@font-face", e.position) + this.emit("{") + this.mapVisit(e.declarations) + this.emit("}") : this.emit("@font-face ", e.position) + this.emit("{\n") + this.emit(this.indent(1)) + this.mapVisit(e.declarations, "\n") + this.emit(this.indent(-1)) + this.emit("\n}");
|
|
558
555
|
}
|
|
@@ -562,32 +559,6 @@ var Te = class {
|
|
|
562
559
|
customMedia(e) {
|
|
563
560
|
return this.emit(`@custom-media ${e.name} ${e.media};`, e.position);
|
|
564
561
|
}
|
|
565
|
-
property(e) {
|
|
566
|
-
return this.compress ? this.emit(`@property ${e.name}`, e.position) + this.emit("{") + this.mapVisit(e.declarations) + this.emit("}") : this.emit(`@property ${e.name} `, e.position) + this.emit("{\n") + this.emit(this.indent(1)) + this.mapVisit(e.declarations, "\n") + this.emit(this.indent(-1)) + this.emit("\n}");
|
|
567
|
-
}
|
|
568
|
-
counterStyle(e) {
|
|
569
|
-
return this.compress ? this.emit(`@counter-style ${e.name}`, e.position) + this.emit("{") + this.mapVisit(e.declarations) + this.emit("}") : this.emit(`@counter-style ${e.name} `, e.position) + this.emit("{\n") + this.emit(this.indent(1)) + this.mapVisit(e.declarations, "\n") + this.emit(this.indent(-1)) + this.emit("\n}");
|
|
570
|
-
}
|
|
571
|
-
fontFeatureValues(e) {
|
|
572
|
-
return this.compress ? this.emit(`@font-feature-values ${e.fontFamily}`, e.position) + this.emit("{") + this.mapVisit(e.rules) + this.emit("}") : this.emit(`${this.indent()}@font-feature-values ${e.fontFamily}`, e.position) + this.emit(` {\n${this.indent(1)}`) + this.mapVisit(e.rules, "\n\n") + this.emit(`\n${this.indent(-1)}${this.indent()}}`);
|
|
573
|
-
}
|
|
574
|
-
scope(e) {
|
|
575
|
-
let t = e.scope ? ` ${e.scope}` : "";
|
|
576
|
-
return this.compress ? this.emit(`@scope${t}`, e.position) + this.emit("{") + this.mapVisit(e.rules) + this.emit("}") : this.emit(`${this.indent()}@scope${t}`, e.position) + this.emit(` {\n${this.indent(1)}`) + this.mapVisit(e.rules, "\n\n") + this.emit(`\n${this.indent(-1)}${this.indent()}}`);
|
|
577
|
-
}
|
|
578
|
-
viewTransition(e) {
|
|
579
|
-
return this.compress ? this.emit("@view-transition", e.position) + this.emit("{") + this.mapVisit(e.declarations) + this.emit("}") : this.emit("@view-transition ", e.position) + this.emit("{\n") + this.emit(this.indent(1)) + this.mapVisit(e.declarations, "\n") + this.emit(this.indent(-1)) + this.emit("\n}");
|
|
580
|
-
}
|
|
581
|
-
positionTry(e) {
|
|
582
|
-
return this.compress ? this.emit(`@position-try ${e.name}`, e.position) + this.emit("{") + this.mapVisit(e.declarations) + this.emit("}") : this.emit(`@position-try ${e.name} `, e.position) + this.emit("{\n") + this.emit(this.indent(1)) + this.mapVisit(e.declarations, "\n") + this.emit(this.indent(-1)) + this.emit("\n}");
|
|
583
|
-
}
|
|
584
|
-
genericAtRule(e) {
|
|
585
|
-
let t = e.prelude ? ` ${e.prelude}` : "";
|
|
586
|
-
if (this.compress) return this.emit(`@${e.name}${t}`, e.position) + (e.rules ? this.emit("{") + this.mapVisit(e.rules) + this.emit("}") : ";");
|
|
587
|
-
if (!e.rules) return this.emit(`${this.indent()}@${e.name}${t};`, e.position);
|
|
588
|
-
let n = e.rules.some((e) => e.type !== P.declaration && e.type !== P.comment), r = n ? "\n\n" : "\n";
|
|
589
|
-
return this.emit(`${this.indent()}@${e.name}${t}`, e.position) + this.emit(n ? ` {\n${this.indent(1)}` : " {\n") + this.emit(n ? "" : this.indent(1)) + this.mapVisit(e.rules, r) + this.emit(n ? `\n${this.indent(-1)}${this.indent()}}` : `${this.indent(-1)}\n${this.indent()}}`);
|
|
590
|
-
}
|
|
591
562
|
rule(e) {
|
|
592
563
|
let t = e.declarations;
|
|
593
564
|
if (!t.length) return "";
|
|
@@ -598,7 +569,7 @@ var Te = class {
|
|
|
598
569
|
declaration(e) {
|
|
599
570
|
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(";");
|
|
600
571
|
}
|
|
601
|
-
},
|
|
572
|
+
}, je = (e, t) => {
|
|
602
573
|
t ||= {};
|
|
603
574
|
let n = 1, r = 1;
|
|
604
575
|
function i() {
|
|
@@ -606,26 +577,31 @@ var Te = class {
|
|
|
606
577
|
line: n,
|
|
607
578
|
column: r
|
|
608
579
|
};
|
|
609
|
-
return (i) => (i.position = new
|
|
580
|
+
return (i) => (i.position = new ke(e, {
|
|
610
581
|
line: n,
|
|
611
582
|
column: r
|
|
612
|
-
}, t?.source || ""),
|
|
583
|
+
}, t?.source || ""), d(), i);
|
|
613
584
|
}
|
|
614
585
|
let a = [];
|
|
615
586
|
function o(i) {
|
|
616
|
-
let o = new
|
|
587
|
+
let o = new Oe(t?.source || "", i, n, r, e);
|
|
617
588
|
if (!t?.silent) throw o;
|
|
618
589
|
a.push(o);
|
|
619
590
|
}
|
|
620
591
|
function s() {
|
|
621
592
|
let t = /^{\s*/.exec(e);
|
|
622
|
-
return !!t && (
|
|
593
|
+
return !!t && (u(t), !0);
|
|
623
594
|
}
|
|
624
595
|
function c() {
|
|
625
596
|
let t = /^}/.exec(e);
|
|
626
|
-
return !!t && (
|
|
597
|
+
return !!t && (u(t), !0);
|
|
627
598
|
}
|
|
628
|
-
function l(
|
|
599
|
+
function l() {
|
|
600
|
+
let t, n = [];
|
|
601
|
+
for (d(), f(n); e.length && e.charAt(0) !== "}" && (t = ne() || re(), t);) n.push(t), f(n);
|
|
602
|
+
return n;
|
|
603
|
+
}
|
|
604
|
+
function u(t) {
|
|
629
605
|
let i = t[0];
|
|
630
606
|
return function(e) {
|
|
631
607
|
let t = e.match(/\n/g);
|
|
@@ -634,501 +610,272 @@ var Te = class {
|
|
|
634
610
|
r = ~i ? e.length - i : r + e.length;
|
|
635
611
|
}(i), e = e.slice(i.length), t;
|
|
636
612
|
}
|
|
637
|
-
function
|
|
613
|
+
function d() {
|
|
638
614
|
let t = /^\s*/.exec(e);
|
|
639
|
-
t &&
|
|
615
|
+
t && u(t);
|
|
640
616
|
}
|
|
641
|
-
function
|
|
617
|
+
function f(e) {
|
|
642
618
|
e ||= [];
|
|
643
|
-
let t =
|
|
644
|
-
for (; t;) e.push(t), t =
|
|
619
|
+
let t = p();
|
|
620
|
+
for (; t;) e.push(t), t = p();
|
|
645
621
|
return e;
|
|
646
622
|
}
|
|
647
|
-
function
|
|
623
|
+
function p() {
|
|
648
624
|
let t = i();
|
|
649
625
|
if (e.charAt(0) !== "/" || e.charAt(1) !== "*") return;
|
|
650
626
|
let n = /^\/\*[^]*?\*\//.exec(e);
|
|
651
|
-
return n ? (
|
|
652
|
-
type:
|
|
627
|
+
return n ? (u(n), t({
|
|
628
|
+
type: M.comment,
|
|
653
629
|
comment: n[0].slice(2, -2)
|
|
654
630
|
})) : o("End of comment missing");
|
|
655
631
|
}
|
|
656
|
-
function
|
|
657
|
-
let t =
|
|
658
|
-
if (t
|
|
659
|
-
let n = e.substring(0, t);
|
|
660
|
-
return l([n]), ((e, t) => {
|
|
632
|
+
function m() {
|
|
633
|
+
let t = /^([^{]+)/.exec(e);
|
|
634
|
+
if (t) return u(t), ((e, t) => {
|
|
661
635
|
let n = [], r = 0;
|
|
662
636
|
for (; r < e.length;) {
|
|
663
|
-
let i =
|
|
637
|
+
let i = P(e, t, r);
|
|
664
638
|
if (i === -1) return n.push(e.substring(r)), n;
|
|
665
639
|
n.push(e.substring(r, i)), r = i + 1;
|
|
666
640
|
}
|
|
667
641
|
return n;
|
|
668
|
-
})(
|
|
642
|
+
})(I(t[0]).replace(F, ""), [","]).map((e) => I(e));
|
|
669
643
|
}
|
|
670
|
-
function
|
|
644
|
+
function h() {
|
|
671
645
|
let t = i(), n = /^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/.exec(e);
|
|
672
646
|
if (!n) return;
|
|
673
|
-
|
|
674
|
-
let r =
|
|
647
|
+
u(n);
|
|
648
|
+
let r = I(n[0]), a = /^:\s*/.exec(e);
|
|
675
649
|
if (!a) return o("property missing ':'");
|
|
676
|
-
|
|
677
|
-
let s = "", c =
|
|
678
|
-
c !== -1 && (s = e.substring(0, c),
|
|
679
|
-
let
|
|
680
|
-
type:
|
|
681
|
-
property: r.replace(
|
|
650
|
+
u(a);
|
|
651
|
+
let s = "", c = P(e, [";", "}"]);
|
|
652
|
+
c !== -1 && (s = e.substring(0, c), u([s]), s = I(s).replace(F, ""));
|
|
653
|
+
let l = t({
|
|
654
|
+
type: M.declaration,
|
|
655
|
+
property: r.replace(F, ""),
|
|
682
656
|
value: s
|
|
683
657
|
}), d = /^[;\s]*/.exec(e);
|
|
684
|
-
return d &&
|
|
685
|
-
}
|
|
686
|
-
function h() {
|
|
687
|
-
let n = [];
|
|
688
|
-
if (!s()) return o("missing '{'");
|
|
689
|
-
d(n);
|
|
690
|
-
let r = m();
|
|
691
|
-
for (; r;) n.push(r), d(n), r = m();
|
|
692
|
-
for (; t?.silent && e.length && e.charAt(0) !== "}";) {
|
|
693
|
-
let t = e.indexOf(";"), i = e.indexOf("}");
|
|
694
|
-
if (t === -1 || !(i === -1 || t < i)) break;
|
|
695
|
-
for (l([e.substring(0, t + 1)]), u(), d(n), r = m(); r;) n.push(r), d(n), r = m();
|
|
696
|
-
}
|
|
697
|
-
return c() ? n : o("missing '}'");
|
|
658
|
+
return d && u(d), l;
|
|
698
659
|
}
|
|
699
660
|
function g() {
|
|
700
|
-
let
|
|
701
|
-
if (t === -1) return !1;
|
|
702
|
-
let n = I(e, [";"]), r = I(e, ["}"]);
|
|
703
|
-
return !(n !== -1 && n < t) && !(r !== -1 && r < t);
|
|
704
|
-
}
|
|
705
|
-
function _() {
|
|
706
|
-
let n = [];
|
|
661
|
+
let e = [];
|
|
707
662
|
if (!s()) return o("missing '{'");
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
n.push(e), d(n);
|
|
713
|
-
continue;
|
|
714
|
-
}
|
|
715
|
-
}
|
|
716
|
-
if (g()) {
|
|
717
|
-
let e = S();
|
|
718
|
-
if (e) {
|
|
719
|
-
n.push(e), d(n);
|
|
720
|
-
continue;
|
|
721
|
-
}
|
|
722
|
-
}
|
|
723
|
-
let r = m();
|
|
724
|
-
if (!r) {
|
|
725
|
-
if (t?.silent) {
|
|
726
|
-
let t = e.indexOf(";"), r = e.indexOf("}");
|
|
727
|
-
if (t !== -1 && (r === -1 || t < r)) {
|
|
728
|
-
l([e.substring(0, t + 1)]), u(), d(n);
|
|
729
|
-
continue;
|
|
730
|
-
}
|
|
731
|
-
}
|
|
732
|
-
break;
|
|
733
|
-
}
|
|
734
|
-
n.push(r), d(n);
|
|
735
|
-
}
|
|
736
|
-
return c() ? n : o("missing '}'");
|
|
737
|
-
}
|
|
738
|
-
function v() {
|
|
739
|
-
let n = [];
|
|
740
|
-
for (u(), d(n); e.length && e.charAt(0) !== "}";) {
|
|
741
|
-
if (e.charAt(0) === "@") {
|
|
742
|
-
let e = x();
|
|
743
|
-
if (e) {
|
|
744
|
-
n.push(e), d(n);
|
|
745
|
-
continue;
|
|
746
|
-
}
|
|
747
|
-
}
|
|
748
|
-
if (g()) {
|
|
749
|
-
let e = S();
|
|
750
|
-
if (e) {
|
|
751
|
-
n.push(e), d(n);
|
|
752
|
-
continue;
|
|
753
|
-
}
|
|
754
|
-
}
|
|
755
|
-
let r = m();
|
|
756
|
-
if (!r) {
|
|
757
|
-
if (t?.silent) {
|
|
758
|
-
let t = e.indexOf(";"), r = e.indexOf("}");
|
|
759
|
-
if (t !== -1 && (r === -1 || t < r)) {
|
|
760
|
-
l([e.substring(0, t + 1)]), u(), d(n);
|
|
761
|
-
continue;
|
|
762
|
-
}
|
|
763
|
-
}
|
|
764
|
-
break;
|
|
765
|
-
}
|
|
766
|
-
n.push(r), d(n);
|
|
767
|
-
}
|
|
768
|
-
return n;
|
|
663
|
+
f(e);
|
|
664
|
+
let t = h();
|
|
665
|
+
for (; t;) e.push(t), f(e), t = h();
|
|
666
|
+
return c() ? e : o("missing '}'");
|
|
769
667
|
}
|
|
770
|
-
function
|
|
668
|
+
function _() {
|
|
771
669
|
let t = [], n = i(), r = /^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/.exec(e);
|
|
772
670
|
for (; r;) {
|
|
773
|
-
let n =
|
|
671
|
+
let n = u(r);
|
|
774
672
|
t.push(n[1]);
|
|
775
673
|
let i = /^,\s*/.exec(e);
|
|
776
|
-
i &&
|
|
674
|
+
i && u(i), r = /^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/.exec(e);
|
|
777
675
|
}
|
|
778
676
|
if (t.length) return n({
|
|
779
|
-
type:
|
|
677
|
+
type: M.keyframe,
|
|
780
678
|
values: t,
|
|
781
|
-
declarations:
|
|
679
|
+
declarations: g() || []
|
|
782
680
|
});
|
|
783
681
|
}
|
|
784
|
-
let ee =
|
|
785
|
-
|
|
786
|
-
"top-left",
|
|
787
|
-
"top-center",
|
|
788
|
-
"top-right",
|
|
789
|
-
"top-right-corner",
|
|
790
|
-
"bottom-left-corner",
|
|
791
|
-
"bottom-left",
|
|
792
|
-
"bottom-center",
|
|
793
|
-
"bottom-right",
|
|
794
|
-
"bottom-right-corner",
|
|
795
|
-
"left-top",
|
|
796
|
-
"left-middle",
|
|
797
|
-
"left-bottom",
|
|
798
|
-
"right-top",
|
|
799
|
-
"right-middle",
|
|
800
|
-
"right-bottom"
|
|
801
|
-
].join("|")})(?![\\w-])\\s*`), te = b("import"), ne = b("charset"), re = b("namespace");
|
|
802
|
-
function b(t) {
|
|
682
|
+
let v = y("import"), ee = y("charset"), te = y("namespace");
|
|
683
|
+
function y(t) {
|
|
803
684
|
let n = RegExp("^@" + t + "\\s*((?::?[^;'\"]|\"(?:\\\\\"|[^\"])*?\"|'(?:\\\\'|[^'])*?')+)(?:;|$)");
|
|
804
685
|
return () => {
|
|
805
686
|
let r = i(), a = n.exec(e);
|
|
806
687
|
if (!a) return;
|
|
807
|
-
let o =
|
|
688
|
+
let o = u(a), s = { type: t };
|
|
808
689
|
return s[t] = o[1].trim(), r(s);
|
|
809
690
|
};
|
|
810
691
|
}
|
|
811
|
-
function
|
|
692
|
+
function ne() {
|
|
812
693
|
if (e[0] === "@") return function() {
|
|
813
694
|
let t = i(), n = /^@([-\w]+)?keyframes\s*/.exec(e);
|
|
814
695
|
if (!n) return;
|
|
815
|
-
let r =
|
|
696
|
+
let r = u(n)[1], a = /^([-\w]+)\s*/.exec(e);
|
|
816
697
|
if (!a) return o("@keyframes missing name");
|
|
817
|
-
let
|
|
698
|
+
let l = u(a)[1];
|
|
818
699
|
if (!s()) return o("@keyframes missing '{'");
|
|
819
|
-
let
|
|
820
|
-
for (; p;)
|
|
700
|
+
let d = f(), p = _();
|
|
701
|
+
for (; p;) d.push(p), d = d.concat(f()), p = _();
|
|
821
702
|
return c() ? t({
|
|
822
|
-
type:
|
|
823
|
-
name:
|
|
703
|
+
type: M.keyframes,
|
|
704
|
+
name: l,
|
|
824
705
|
vendor: r,
|
|
825
|
-
keyframes:
|
|
706
|
+
keyframes: d
|
|
826
707
|
}) : o("@keyframes missing '}'");
|
|
827
708
|
}() || function() {
|
|
828
709
|
let t = i(), n = /^@media *([^{]+)/.exec(e);
|
|
829
710
|
if (!n) return;
|
|
830
|
-
let r =
|
|
711
|
+
let r = I(u(n)[1]);
|
|
831
712
|
if (!s()) return o("@media missing '{'");
|
|
832
|
-
let a =
|
|
713
|
+
let a = f().concat(l());
|
|
833
714
|
return c() ? t({
|
|
834
|
-
type:
|
|
715
|
+
type: M.media,
|
|
835
716
|
media: r,
|
|
836
717
|
rules: a
|
|
837
718
|
}) : o("@media missing '}'");
|
|
838
719
|
}() || function() {
|
|
839
720
|
let t = i(), n = /^@custom-media\s+(--\S+)\s+([^{;\s][^{;]*);/.exec(e);
|
|
840
721
|
if (!n) return;
|
|
841
|
-
let r =
|
|
722
|
+
let r = u(n);
|
|
842
723
|
return t({
|
|
843
|
-
type:
|
|
844
|
-
name:
|
|
845
|
-
media:
|
|
724
|
+
type: M.customMedia,
|
|
725
|
+
name: I(r[1]),
|
|
726
|
+
media: I(r[2])
|
|
846
727
|
});
|
|
847
728
|
}() || function() {
|
|
848
729
|
let t = i(), n = /^@supports *([^{]+)/.exec(e);
|
|
849
730
|
if (!n) return;
|
|
850
|
-
let r =
|
|
731
|
+
let r = I(u(n)[1]);
|
|
851
732
|
if (!s()) return o("@supports missing '{'");
|
|
852
|
-
let a =
|
|
733
|
+
let a = f().concat(l());
|
|
853
734
|
return c() ? t({
|
|
854
|
-
type:
|
|
735
|
+
type: M.supports,
|
|
855
736
|
supports: r,
|
|
856
737
|
rules: a
|
|
857
738
|
}) : o("@supports missing '}'");
|
|
858
|
-
}() ||
|
|
739
|
+
}() || v() || ee() || te() || function() {
|
|
859
740
|
let t = i(), n = /^@([-\w]+)?document *([^{]+)/.exec(e);
|
|
860
741
|
if (!n) return;
|
|
861
|
-
let r =
|
|
742
|
+
let r = u(n), a = I(r[1]), d = I(r[2]);
|
|
862
743
|
if (!s()) return o("@document missing '{'");
|
|
863
|
-
let
|
|
744
|
+
let p = f().concat(l());
|
|
864
745
|
return c() ? t({
|
|
865
|
-
type:
|
|
866
|
-
document:
|
|
746
|
+
type: M.document,
|
|
747
|
+
document: d,
|
|
867
748
|
vendor: a,
|
|
868
|
-
rules:
|
|
749
|
+
rules: p
|
|
869
750
|
}) : o("@document missing '}'");
|
|
870
751
|
}() || function() {
|
|
871
752
|
let t = i(), n = /^@page */.exec(e);
|
|
872
753
|
if (!n) return;
|
|
873
|
-
|
|
874
|
-
let r =
|
|
754
|
+
u(n);
|
|
755
|
+
let r = m() || [];
|
|
875
756
|
if (!s()) return o("@page missing '{'");
|
|
876
|
-
let a =
|
|
877
|
-
for (
|
|
878
|
-
if (e.charAt(0) === "@") {
|
|
879
|
-
let e = x();
|
|
880
|
-
if (e) {
|
|
881
|
-
a.push(e), d(a);
|
|
882
|
-
continue;
|
|
883
|
-
}
|
|
884
|
-
}
|
|
885
|
-
let t = m();
|
|
886
|
-
if (!t) break;
|
|
887
|
-
a.push(t), d(a);
|
|
888
|
-
}
|
|
757
|
+
let a = f(), l = h();
|
|
758
|
+
for (; l;) a.push(l), a = a.concat(f()), l = h();
|
|
889
759
|
return c() ? t({
|
|
890
|
-
type:
|
|
760
|
+
type: M.page,
|
|
891
761
|
selectors: r,
|
|
892
762
|
declarations: a
|
|
893
763
|
}) : o("@page missing '}'");
|
|
894
764
|
}() || function() {
|
|
895
765
|
let t = i(), n = /^@host\s*/.exec(e);
|
|
896
766
|
if (!n) return;
|
|
897
|
-
if (
|
|
898
|
-
let r =
|
|
767
|
+
if (u(n), !s()) return o("@host missing '{'");
|
|
768
|
+
let r = f().concat(l());
|
|
899
769
|
return c() ? t({
|
|
900
|
-
type:
|
|
770
|
+
type: M.host,
|
|
901
771
|
rules: r
|
|
902
772
|
}) : o("@host missing '}'");
|
|
903
773
|
}() || function() {
|
|
904
774
|
let t = i(), n = /^@font-face\s*/.exec(e);
|
|
905
775
|
if (!n) return;
|
|
906
|
-
if (
|
|
907
|
-
let r =
|
|
908
|
-
for (; a;) r.push(a), r = r.concat(
|
|
776
|
+
if (u(n), !s()) return o("@font-face missing '{'");
|
|
777
|
+
let r = f(), a = h();
|
|
778
|
+
for (; a;) r.push(a), r = r.concat(f()), a = h();
|
|
909
779
|
return c() ? t({
|
|
910
|
-
type:
|
|
780
|
+
type: M.fontFace,
|
|
911
781
|
declarations: r
|
|
912
782
|
}) : o("@font-face missing '}'");
|
|
913
|
-
}() || function() {
|
|
914
|
-
let t = i(), n = /^@font-feature-values\s+([^{]+)/.exec(e);
|
|
915
|
-
if (!n) return;
|
|
916
|
-
let r = R(l(n)[1]);
|
|
917
|
-
if (!s()) return o("@font-feature-values missing '{'");
|
|
918
|
-
let a = v();
|
|
919
|
-
return c() ? t({
|
|
920
|
-
type: P.fontFeatureValues,
|
|
921
|
-
fontFamily: r,
|
|
922
|
-
rules: a
|
|
923
|
-
}) : o("@font-feature-values missing '}'");
|
|
924
783
|
}() || function() {
|
|
925
784
|
let t = i(), n = /^@container *([^{]+)/.exec(e);
|
|
926
785
|
if (!n) return;
|
|
927
|
-
let r =
|
|
786
|
+
let r = I(u(n)[1]);
|
|
928
787
|
if (!s()) return o("@container missing '{'");
|
|
929
|
-
let a =
|
|
788
|
+
let a = f().concat(l());
|
|
930
789
|
return c() ? t({
|
|
931
|
-
type:
|
|
790
|
+
type: M.container,
|
|
932
791
|
container: r,
|
|
933
792
|
rules: a
|
|
934
793
|
}) : o("@container missing '}'");
|
|
935
794
|
}() || function() {
|
|
936
795
|
let t = i(), n = /^@starting-style\s*/.exec(e);
|
|
937
796
|
if (!n) return;
|
|
938
|
-
if (
|
|
939
|
-
let r =
|
|
797
|
+
if (u(n), !s()) return o("@starting-style missing '{'");
|
|
798
|
+
let r = f().concat(l());
|
|
940
799
|
return c() ? t({
|
|
941
|
-
type:
|
|
800
|
+
type: M.startingStyle,
|
|
942
801
|
rules: r
|
|
943
802
|
}) : o("@starting-style missing '}'");
|
|
944
803
|
}() || function() {
|
|
945
804
|
let t = i(), n = /^@layer *([^{;@]+)/.exec(e);
|
|
946
805
|
if (!n) return;
|
|
947
|
-
let r =
|
|
806
|
+
let r = I(u(n)[1]);
|
|
948
807
|
if (!s()) {
|
|
949
808
|
let n = /^[;\s]*/.exec(e);
|
|
950
|
-
return n &&
|
|
951
|
-
type:
|
|
809
|
+
return n && u(n), t({
|
|
810
|
+
type: M.layer,
|
|
952
811
|
layer: r
|
|
953
812
|
});
|
|
954
813
|
}
|
|
955
|
-
let a =
|
|
814
|
+
let a = f().concat(l());
|
|
956
815
|
return c() ? t({
|
|
957
|
-
type:
|
|
816
|
+
type: M.layer,
|
|
958
817
|
layer: r,
|
|
959
818
|
rules: a
|
|
960
819
|
}) : o("@layer missing '}'");
|
|
961
|
-
}() || function() {
|
|
962
|
-
let t = i(), n = /^@property\s+(--[-\w]+)\s*/.exec(e);
|
|
963
|
-
if (!n) return;
|
|
964
|
-
let r = l(n)[1];
|
|
965
|
-
if (!s()) return o("@property missing '{'");
|
|
966
|
-
let a = d(), u = m();
|
|
967
|
-
for (; u;) a.push(u), a = a.concat(d()), u = m();
|
|
968
|
-
return c() ? t({
|
|
969
|
-
type: P.property,
|
|
970
|
-
name: r,
|
|
971
|
-
declarations: a
|
|
972
|
-
}) : o("@property missing '}'");
|
|
973
|
-
}() || function() {
|
|
974
|
-
let t = i(), n = /^@counter-style\s+([-\w]+)\s*/.exec(e);
|
|
975
|
-
if (!n) return;
|
|
976
|
-
let r = l(n)[1];
|
|
977
|
-
if (!s()) return o("@counter-style missing '{'");
|
|
978
|
-
let a = d(), u = m();
|
|
979
|
-
for (; u;) a.push(u), a = a.concat(d()), u = m();
|
|
980
|
-
return c() ? t({
|
|
981
|
-
type: P.counterStyle,
|
|
982
|
-
name: r,
|
|
983
|
-
declarations: a
|
|
984
|
-
}) : o("@counter-style missing '}'");
|
|
985
|
-
}() || function() {
|
|
986
|
-
let t = i(), n = /^@scope\s*([^{]*)/.exec(e);
|
|
987
|
-
if (!n) return;
|
|
988
|
-
let r = R(l(n)[1]);
|
|
989
|
-
if (!s()) return o("@scope missing '{'");
|
|
990
|
-
let a = v();
|
|
991
|
-
return c() ? t({
|
|
992
|
-
type: P.scope,
|
|
993
|
-
scope: r,
|
|
994
|
-
rules: a
|
|
995
|
-
}) : o("@scope missing '}'");
|
|
996
|
-
}() || function() {
|
|
997
|
-
let t = i(), n = /^@view-transition\s*/.exec(e);
|
|
998
|
-
if (!n) return;
|
|
999
|
-
if (l(n), !s()) return o("@view-transition missing '{'");
|
|
1000
|
-
let r = d(), a = m();
|
|
1001
|
-
for (; a;) r.push(a), r = r.concat(d()), a = m();
|
|
1002
|
-
return c() ? t({
|
|
1003
|
-
type: P.viewTransition,
|
|
1004
|
-
declarations: r
|
|
1005
|
-
}) : o("@view-transition missing '}'");
|
|
1006
|
-
}() || function() {
|
|
1007
|
-
let t = i(), n = /^@position-try\s+(--[-\w]+)\s*/.exec(e);
|
|
1008
|
-
if (!n) return;
|
|
1009
|
-
let r = l(n)[1];
|
|
1010
|
-
if (!s()) return o("@position-try missing '{'");
|
|
1011
|
-
let a = d(), u = m();
|
|
1012
|
-
for (; u;) a.push(u), a = a.concat(d()), u = m();
|
|
1013
|
-
return c() ? t({
|
|
1014
|
-
type: P.positionTry,
|
|
1015
|
-
name: r,
|
|
1016
|
-
declarations: a
|
|
1017
|
-
}) : o("@position-try missing '}'");
|
|
1018
|
-
}() || function() {
|
|
1019
|
-
let t = i(), n = ee.exec(e);
|
|
1020
|
-
if (!n) return;
|
|
1021
|
-
let r = l(n)[1];
|
|
1022
|
-
if (!s()) return o(`@${r} missing '{'`);
|
|
1023
|
-
let a = d(), u = m();
|
|
1024
|
-
for (; u;) a.push(u), a = a.concat(d()), u = m();
|
|
1025
|
-
return c() ? t({
|
|
1026
|
-
type: P.pageMarginBox,
|
|
1027
|
-
name: r,
|
|
1028
|
-
declarations: a
|
|
1029
|
-
}) : o(`@${r} missing '}'`);
|
|
1030
|
-
}() || function() {
|
|
1031
|
-
let t = i(), n = /^@([-\w]+)\s*/.exec(e);
|
|
1032
|
-
if (!n) return;
|
|
1033
|
-
let r = l(n)[1], a = "", u = I(e, ["{", ";"]);
|
|
1034
|
-
if (u !== -1 && u > 0 && (a = R(e.substring(0, u)), l([e.substring(0, u)])), s()) {
|
|
1035
|
-
let e = v();
|
|
1036
|
-
return c() ? t({
|
|
1037
|
-
type: P.atRule,
|
|
1038
|
-
name: r,
|
|
1039
|
-
prelude: a,
|
|
1040
|
-
rules: e
|
|
1041
|
-
}) : o(`@${r} missing '}'`);
|
|
1042
|
-
}
|
|
1043
|
-
let d = /^[;\s]*/.exec(e);
|
|
1044
|
-
return d && l(d), t({
|
|
1045
|
-
type: P.atRule,
|
|
1046
|
-
name: r,
|
|
1047
|
-
prelude: a
|
|
1048
|
-
});
|
|
1049
820
|
}();
|
|
1050
821
|
}
|
|
1051
|
-
function
|
|
1052
|
-
let e = i(), t =
|
|
1053
|
-
return t ? (
|
|
1054
|
-
type:
|
|
822
|
+
function re() {
|
|
823
|
+
let e = i(), t = m();
|
|
824
|
+
return t ? (f(), e({
|
|
825
|
+
type: M.rule,
|
|
1055
826
|
selectors: t,
|
|
1056
|
-
declarations:
|
|
827
|
+
declarations: g() || []
|
|
1057
828
|
})) : o("selector missing");
|
|
1058
829
|
}
|
|
1059
|
-
return
|
|
1060
|
-
let
|
|
1061
|
-
let n, r = [];
|
|
1062
|
-
for (u(), d(r); e.length;) {
|
|
1063
|
-
if (e.charAt(0) === "}") {
|
|
1064
|
-
if (t?.silent) {
|
|
1065
|
-
o("extra '}'"), l(["}"]), u(), d(r);
|
|
1066
|
-
continue;
|
|
1067
|
-
}
|
|
1068
|
-
break;
|
|
1069
|
-
}
|
|
1070
|
-
if (n = x() || S(), !n) {
|
|
1071
|
-
if (t?.silent) {
|
|
1072
|
-
l([e.charAt(0)]), u(), d(r);
|
|
1073
|
-
continue;
|
|
1074
|
-
}
|
|
1075
|
-
break;
|
|
1076
|
-
}
|
|
1077
|
-
r.push(n), d(r);
|
|
1078
|
-
}
|
|
1079
|
-
return r;
|
|
1080
|
-
}();
|
|
830
|
+
return L(function() {
|
|
831
|
+
let e = l();
|
|
1081
832
|
return {
|
|
1082
|
-
type:
|
|
833
|
+
type: M.stylesheet,
|
|
1083
834
|
stylesheet: {
|
|
1084
835
|
source: t?.source,
|
|
1085
|
-
rules:
|
|
836
|
+
rules: e,
|
|
1086
837
|
parsingErrors: a
|
|
1087
838
|
}
|
|
1088
839
|
};
|
|
1089
840
|
}());
|
|
1090
|
-
},
|
|
1091
|
-
name: V,
|
|
1092
|
-
operation: t,
|
|
1093
|
-
backend: n
|
|
1094
|
-
}), ke = (e, t) => Oe(`Locator operation not supported${t ? ` on the ${t} backend` : ""}: ${e}`, e, t), Ae = (e) => U(e) === V, G = (e) => U(e) === H, je = (e) => G(e) || Ae(e), K = (e) => {
|
|
841
|
+
}, Me = (e, t) => new Ae(t || {}).compile(e), R = "LocatorError", z = "LocatorUnsupportedError", B = "LocatorDeniedError", V = (e) => typeof e == "object" && e ? e.name : void 0, H = (e) => Object.assign(Error(e), { name: R }), U = (e) => V(e) === z, W = (e) => V(e) === B, Ne = (e) => W(e) || U(e), G = (e) => {
|
|
1095
842
|
let t = (e.ownerDocument ?? e).defaultView;
|
|
1096
|
-
if (!t) throw
|
|
843
|
+
if (!t) throw H("the resolved element belongs to a document with no window");
|
|
1097
844
|
return t;
|
|
1098
|
-
},
|
|
845
|
+
}, Pe = (e, t) => {
|
|
1099
846
|
let n = e?.[t];
|
|
1100
847
|
return typeof n == "function" ? n : null;
|
|
1101
|
-
},
|
|
848
|
+
}, K = (e, t) => {
|
|
1102
849
|
if (typeof e != "object" || !e) return null;
|
|
1103
850
|
let n = (() => {
|
|
1104
851
|
try {
|
|
1105
|
-
return
|
|
852
|
+
return Pe(G(e), t);
|
|
1106
853
|
} catch {
|
|
1107
854
|
return null;
|
|
1108
855
|
}
|
|
1109
856
|
})();
|
|
1110
857
|
if (n && e instanceof n) return n;
|
|
1111
|
-
let r =
|
|
858
|
+
let r = Pe(globalThis, t);
|
|
1112
859
|
return r && e instanceof r ? r : null;
|
|
1113
|
-
},
|
|
1114
|
-
if (e.length === 0) throw
|
|
1115
|
-
if (e.length > 1) throw
|
|
860
|
+
}, q = (e, t) => K(e, t) !== null, J = (e) => {
|
|
861
|
+
if (e.length === 0) throw H("No elements found");
|
|
862
|
+
if (e.length > 1) throw H(`Strict mode violation: locator resolved to ${e.length} elements`);
|
|
1116
863
|
return e[0];
|
|
1117
|
-
},
|
|
1118
|
-
if (!
|
|
864
|
+
}, Fe = (e, t) => {
|
|
865
|
+
if (!q(e, t)) throw H(`Strict mode violation: expected ${t}, got <${e.tagName.toLowerCase()}>`);
|
|
1119
866
|
return e;
|
|
1120
|
-
},
|
|
1121
|
-
|
|
1122
|
-
},
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
]),
|
|
1130
|
-
if (
|
|
1131
|
-
if (e.type ===
|
|
867
|
+
}, Ie = (e) => e.tagName.toLowerCase(), Le = /* @__PURE__ */ new Set(), Re = (e) => {
|
|
868
|
+
Le.add(e);
|
|
869
|
+
}, ze = /(?:^|[^\w-])(?:url|image|image-set|cross-fade|paint|element|expression)\s*\(/i, Be = (e) => e.replace(/\\([0-9a-fA-F]{1,6})\s?/g, (e, t) => String.fromCodePoint(Number.parseInt(t, 16))).replace(/\\(.)/g, "$1"), Ve = (e) => !ze.test(Be(e.value)), He = /* @__PURE__ */ new Set([
|
|
870
|
+
M.import,
|
|
871
|
+
M.fontFace,
|
|
872
|
+
M.namespace,
|
|
873
|
+
M.charset,
|
|
874
|
+
M.document,
|
|
875
|
+
M.comment
|
|
876
|
+
]), Ue = (e) => {
|
|
877
|
+
if (He.has(e.type)) return null;
|
|
878
|
+
if (e.type === M.declaration) return Ve(e) ? e : null;
|
|
1132
879
|
let t = e, n = { ...t };
|
|
1133
880
|
for (let e of [
|
|
1134
881
|
"declarations",
|
|
@@ -1136,18 +883,18 @@ var Te = class {
|
|
|
1136
883
|
"keyframes"
|
|
1137
884
|
]) {
|
|
1138
885
|
let r = t[e];
|
|
1139
|
-
Array.isArray(r) && (n[e] =
|
|
886
|
+
Array.isArray(r) && (n[e] = We(r));
|
|
1140
887
|
}
|
|
1141
888
|
return n;
|
|
1142
|
-
},
|
|
889
|
+
}, We = (e) => e.map((e) => Ue(e)).filter((e) => e !== null), Ge = (e) => {
|
|
1143
890
|
let t;
|
|
1144
891
|
try {
|
|
1145
|
-
t =
|
|
892
|
+
t = je(e, { silent: !0 });
|
|
1146
893
|
} catch {
|
|
1147
894
|
return "";
|
|
1148
895
|
}
|
|
1149
|
-
return t.stylesheet.rules =
|
|
1150
|
-
},
|
|
896
|
+
return t.stylesheet.rules = We(t.stylesheet.rules), Me(t);
|
|
897
|
+
}, Ke = (e, t) => {
|
|
1151
898
|
let n = () => {
|
|
1152
899
|
t.parentNode || (e.head ?? e.documentElement).appendChild(t);
|
|
1153
900
|
};
|
|
@@ -1164,27 +911,27 @@ var Te = class {
|
|
|
1164
911
|
});
|
|
1165
912
|
let i = () => r.disconnect(), a = e.defaultView;
|
|
1166
913
|
a ? a.addEventListener("load", i, { once: !0 }) : setTimeout(i, 3e4);
|
|
1167
|
-
},
|
|
914
|
+
}, qe = { resolve: (e, t) => {
|
|
1168
915
|
let n = e.document.createElement("style");
|
|
1169
|
-
n.textContent = t.noSanitize ? t.content :
|
|
916
|
+
n.textContent = t.noSanitize ? t.content : Ge(t.content);
|
|
1170
917
|
try {
|
|
1171
|
-
|
|
918
|
+
Ke(e.document, n);
|
|
1172
919
|
} catch (e) {
|
|
1173
920
|
console.error(e);
|
|
1174
921
|
}
|
|
1175
|
-
|
|
1176
|
-
} },
|
|
922
|
+
Re(n);
|
|
923
|
+
} }, Je = (e, t) => {
|
|
1177
924
|
let n = e.getBoundingClientRect();
|
|
1178
925
|
return {
|
|
1179
926
|
clientX: n.left + n.width * (t?.x ?? .5),
|
|
1180
927
|
clientY: n.top + n.height * (t?.y ?? .5)
|
|
1181
928
|
};
|
|
1182
|
-
},
|
|
1183
|
-
let n =
|
|
929
|
+
}, Ye = { resolve: (e, t = {}) => {
|
|
930
|
+
let n = J(e.elements), r = G(n), i = {
|
|
1184
931
|
bubbles: !0,
|
|
1185
932
|
cancelable: !0,
|
|
1186
933
|
composed: !0,
|
|
1187
|
-
...
|
|
934
|
+
...Je(n, t.position),
|
|
1188
935
|
button: 0
|
|
1189
936
|
}, a = {
|
|
1190
937
|
...i,
|
|
@@ -1208,12 +955,12 @@ var Te = class {
|
|
|
1208
955
|
...i,
|
|
1209
956
|
buttons: 0
|
|
1210
957
|
}));
|
|
1211
|
-
} },
|
|
1212
|
-
let n =
|
|
958
|
+
} }, Xe = { resolve: (e, t = {}) => {
|
|
959
|
+
let n = J(e.elements), r = G(n), i = {
|
|
1213
960
|
bubbles: !0,
|
|
1214
961
|
cancelable: !0,
|
|
1215
962
|
composed: !0,
|
|
1216
|
-
...
|
|
963
|
+
...Je(n, t.position)
|
|
1217
964
|
}, a = {
|
|
1218
965
|
...i,
|
|
1219
966
|
pointerType: "mouse",
|
|
@@ -1227,11 +974,11 @@ var Te = class {
|
|
|
1227
974
|
...i,
|
|
1228
975
|
bubbles: !1
|
|
1229
976
|
})), n.dispatchEvent(new r.MouseEvent("mouseover", i)), n.dispatchEvent(new r.PointerEvent("pointermove", a)), n.dispatchEvent(new r.MouseEvent("mousemove", i));
|
|
1230
|
-
} },
|
|
977
|
+
} }, Ze = (e, t) => {
|
|
1231
978
|
e._valueTracker?.setValue("");
|
|
1232
|
-
let n = (
|
|
979
|
+
let n = (K(e, "HTMLTextAreaElement") ?? K(e, "HTMLInputElement"))?.prototype, r = n && Object.getOwnPropertyDescriptor(n, "value")?.set;
|
|
1233
980
|
r ? r.call(e, t) : e.value = t;
|
|
1234
|
-
},
|
|
981
|
+
}, Qe = (e, t) => {
|
|
1235
982
|
if (e.type !== "range") return null;
|
|
1236
983
|
let n = Number(e.min || 0), r = Number(e.max || 100);
|
|
1237
984
|
if (!Number.isFinite(n) || !Number.isFinite(r) || r <= n) return null;
|
|
@@ -1268,71 +1015,71 @@ var Te = class {
|
|
|
1268
1015
|
buttons: 0
|
|
1269
1016
|
}
|
|
1270
1017
|
};
|
|
1271
|
-
},
|
|
1272
|
-
let r =
|
|
1273
|
-
if (a ||
|
|
1274
|
-
let e = r, n = a ?
|
|
1275
|
-
n && (r.dispatchEvent(new i.PointerEvent("pointerdown", n.pointerDown)), r.dispatchEvent(new i.MouseEvent("mousedown", n.mouseDown))),
|
|
1018
|
+
}, $e = { resolve: (e, t, n = {}) => {
|
|
1019
|
+
let r = J(e.elements), i = G(r), a = q(r, "HTMLInputElement");
|
|
1020
|
+
if (a || q(r, "HTMLTextAreaElement")) {
|
|
1021
|
+
let e = r, n = a ? Qe(e, t) : null;
|
|
1022
|
+
n && (r.dispatchEvent(new i.PointerEvent("pointerdown", n.pointerDown)), r.dispatchEvent(new i.MouseEvent("mousedown", n.mouseDown))), Ze(e, t), r.dispatchEvent(new i.Event("input", { bubbles: !0 })), n && (r.dispatchEvent(new i.PointerEvent("pointerup", n.pointerUp)), r.dispatchEvent(new i.MouseEvent("mouseup", n.mouseUp))), r.dispatchEvent(new i.Event("change", { bubbles: !0 }));
|
|
1276
1023
|
return;
|
|
1277
1024
|
}
|
|
1278
|
-
if (
|
|
1025
|
+
if (q(r, "HTMLElement") && r.isContentEditable) {
|
|
1279
1026
|
r.textContent = t, r.dispatchEvent(new i.Event("input", { bubbles: !0 }));
|
|
1280
1027
|
return;
|
|
1281
1028
|
}
|
|
1282
|
-
throw Error(`fill: element <${
|
|
1283
|
-
} },
|
|
1284
|
-
let n =
|
|
1285
|
-
if (!
|
|
1286
|
-
let r =
|
|
1029
|
+
throw Error(`fill: element <${Ie(r)}> is not fillable`);
|
|
1030
|
+
} }, et = { resolve: (e, t = {}) => J(e.elements).textContent }, tt = { resolve: (e, t, n = {}) => J(e.elements).getAttribute(t) }, nt = { resolve: (e, t = {}) => {
|
|
1031
|
+
let n = J(e.elements);
|
|
1032
|
+
if (!q(n, "HTMLElement")) return !0;
|
|
1033
|
+
let r = G(n).getComputedStyle(n);
|
|
1287
1034
|
if (r?.display === "none" || r?.visibility === "hidden") return !1;
|
|
1288
1035
|
let i = n.getBoundingClientRect();
|
|
1289
1036
|
return i.width > 0 && i.height > 0;
|
|
1290
|
-
} },
|
|
1037
|
+
} }, rt = { resolve: (e, t = {}) => e.elements.length }, it = { resolve: (e, t = {}) => e.elements.length > 0 }, Y = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1291
1038
|
__proto__: null,
|
|
1292
|
-
click:
|
|
1293
|
-
count:
|
|
1294
|
-
exists:
|
|
1295
|
-
fill:
|
|
1296
|
-
getAttribute:
|
|
1297
|
-
hover:
|
|
1298
|
-
isVisible:
|
|
1299
|
-
textContent:
|
|
1300
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1039
|
+
click: Ye,
|
|
1040
|
+
count: rt,
|
|
1041
|
+
exists: it,
|
|
1042
|
+
fill: $e,
|
|
1043
|
+
getAttribute: tt,
|
|
1044
|
+
hover: Xe,
|
|
1045
|
+
isVisible: nt,
|
|
1046
|
+
textContent: et
|
|
1047
|
+
}, Symbol.toStringTag, { value: "Module" })), X = (e, t) => e.elements.flatMap((e) => [...e.querySelectorAll(t)]), Z = (e) => e.replaceAll("\"", "\\\""), at = {
|
|
1301
1048
|
to: "element",
|
|
1302
1049
|
css: !0,
|
|
1303
|
-
resolve: (e, t) =>
|
|
1050
|
+
resolve: (e, t) => X(e, t),
|
|
1304
1051
|
render: (e) => ({
|
|
1305
1052
|
fragment: typeof e == "string" ? e : "?",
|
|
1306
1053
|
separator: "descend"
|
|
1307
1054
|
})
|
|
1308
|
-
},
|
|
1055
|
+
}, Q = {
|
|
1309
1056
|
to: "frame",
|
|
1310
1057
|
css: !0,
|
|
1311
1058
|
barrier: "down",
|
|
1312
|
-
resolve: (e, t) =>
|
|
1059
|
+
resolve: (e, t) => X(e, t),
|
|
1313
1060
|
render: (e) => ({
|
|
1314
1061
|
fragment: typeof e == "string" ? e : "?",
|
|
1315
1062
|
separator: "down"
|
|
1316
1063
|
})
|
|
1317
|
-
},
|
|
1064
|
+
}, ot = {
|
|
1318
1065
|
element: {
|
|
1319
1066
|
selectors: {
|
|
1320
|
-
locator:
|
|
1321
|
-
frameLocator:
|
|
1067
|
+
locator: at,
|
|
1068
|
+
frameLocator: Q,
|
|
1322
1069
|
getByRole: {
|
|
1323
1070
|
to: "element",
|
|
1324
|
-
resolve: (e, t) =>
|
|
1325
|
-
render: (e) => ({ fragment: typeof e == "string" ? `[role="${
|
|
1071
|
+
resolve: (e, t) => X(e, `[role="${CSS.escape(t)}"]`),
|
|
1072
|
+
render: (e) => ({ fragment: typeof e == "string" ? `[role="${Z(e)}"]` : "[role]" })
|
|
1326
1073
|
},
|
|
1327
1074
|
getByText: {
|
|
1328
1075
|
to: "element",
|
|
1329
1076
|
resolve: (e, t) => e.elements.flatMap((e) => [e, ...e.querySelectorAll("*")]).filter((e) => e.textContent?.includes(t)),
|
|
1330
|
-
render: (e) => ({ fragment: typeof e == "string" ? `:has-text("${
|
|
1077
|
+
render: (e) => ({ fragment: typeof e == "string" ? `:has-text("${Z(e)}")` : ":has-text(...)" })
|
|
1331
1078
|
},
|
|
1332
1079
|
getByTestId: {
|
|
1333
1080
|
to: "element",
|
|
1334
|
-
resolve: (e, t) =>
|
|
1335
|
-
render: (e) => ({ fragment: typeof e == "string" ? `[data-testid="${
|
|
1081
|
+
resolve: (e, t) => X(e, `[data-testid="${CSS.escape(t)}"]`),
|
|
1082
|
+
render: (e) => ({ fragment: typeof e == "string" ? `[data-testid="${Z(e)}"]` : "[data-testid]" })
|
|
1336
1083
|
},
|
|
1337
1084
|
first: {
|
|
1338
1085
|
to: "element",
|
|
@@ -1349,20 +1096,20 @@ var Te = class {
|
|
|
1349
1096
|
}
|
|
1350
1097
|
},
|
|
1351
1098
|
operations: {
|
|
1352
|
-
click:
|
|
1353
|
-
fill:
|
|
1354
|
-
hover:
|
|
1355
|
-
textContent:
|
|
1356
|
-
getAttribute:
|
|
1357
|
-
isVisible:
|
|
1358
|
-
count:
|
|
1359
|
-
exists:
|
|
1099
|
+
click: Ye,
|
|
1100
|
+
fill: $e,
|
|
1101
|
+
hover: Xe,
|
|
1102
|
+
textContent: et,
|
|
1103
|
+
getAttribute: tt,
|
|
1104
|
+
isVisible: nt,
|
|
1105
|
+
count: rt,
|
|
1106
|
+
exists: it
|
|
1360
1107
|
}
|
|
1361
1108
|
},
|
|
1362
1109
|
frame: {
|
|
1363
1110
|
selectors: {
|
|
1364
|
-
locator:
|
|
1365
|
-
frameLocator:
|
|
1111
|
+
locator: at,
|
|
1112
|
+
frameLocator: Q,
|
|
1366
1113
|
owner: {
|
|
1367
1114
|
to: "frame",
|
|
1368
1115
|
barrier: "up",
|
|
@@ -1375,9 +1122,9 @@ var Te = class {
|
|
|
1375
1122
|
})
|
|
1376
1123
|
}
|
|
1377
1124
|
},
|
|
1378
|
-
operations: { addStyleTag:
|
|
1125
|
+
operations: { addStyleTag: qe }
|
|
1379
1126
|
}
|
|
1380
|
-
},
|
|
1127
|
+
}, st = (e, t = ot) => ({
|
|
1381
1128
|
element: {
|
|
1382
1129
|
selectors: {
|
|
1383
1130
|
...t.element.selectors,
|
|
@@ -1398,29 +1145,29 @@ var Te = class {
|
|
|
1398
1145
|
...e.frame?.operations
|
|
1399
1146
|
}
|
|
1400
1147
|
}
|
|
1401
|
-
}),
|
|
1148
|
+
}), ct = 3e4, lt = 50, ut = (e) => {
|
|
1402
1149
|
let t = e[e.length - 1];
|
|
1403
1150
|
return typeof t == "object" && t ? t : void 0;
|
|
1404
|
-
},
|
|
1405
|
-
let t =
|
|
1406
|
-
return typeof t == "number" ? t :
|
|
1407
|
-
},
|
|
1151
|
+
}, dt = (e) => {
|
|
1152
|
+
let t = ut(e)?.timeout;
|
|
1153
|
+
return typeof t == "number" ? t : ct;
|
|
1154
|
+
}, ft = ({ executor: e, parts: t }) => ({ highlight: (n) => e.highlight(t, n).then(() => {}, () => {}) }), pt = async (e) => {
|
|
1408
1155
|
let t = {
|
|
1409
1156
|
parts: e.parts,
|
|
1410
1157
|
operation: e.operation,
|
|
1411
1158
|
args: e.args,
|
|
1412
1159
|
phase: "ensure"
|
|
1413
1160
|
};
|
|
1414
|
-
await e.gate?.(t,
|
|
1415
|
-
},
|
|
1161
|
+
await e.gate?.(t, ft(e));
|
|
1162
|
+
}, mt = async (e) => {
|
|
1416
1163
|
let { executor: t, gate: n, parts: r, operation: i, args: a } = e;
|
|
1417
1164
|
n && await n({
|
|
1418
1165
|
parts: r,
|
|
1419
1166
|
operation: i,
|
|
1420
1167
|
args: a,
|
|
1421
1168
|
phase: "execute"
|
|
1422
|
-
},
|
|
1423
|
-
let o =
|
|
1169
|
+
}, ft(e));
|
|
1170
|
+
let o = dt(a), s = Date.now() + o, c = /* @__PURE__ */ Error(`Locator timeout (${o}ms): ${i}`), { promise: l, reject: u } = Promise.withResolvers();
|
|
1424
1171
|
l.catch(() => {});
|
|
1425
1172
|
let d = setTimeout(() => u(c), o), f = c;
|
|
1426
1173
|
try {
|
|
@@ -1428,49 +1175,49 @@ var Te = class {
|
|
|
1428
1175
|
return await Promise.race([t.execute(r, i, a), l]);
|
|
1429
1176
|
} catch (e) {
|
|
1430
1177
|
if (e === c) break;
|
|
1431
|
-
if (
|
|
1178
|
+
if (Ne(e)) throw e;
|
|
1432
1179
|
f = e;
|
|
1433
1180
|
let t = s - Date.now();
|
|
1434
1181
|
if (t <= 0) break;
|
|
1435
|
-
await new Promise((e) => setTimeout(e, Math.min(
|
|
1182
|
+
await new Promise((e) => setTimeout(e, Math.min(lt, t)));
|
|
1436
1183
|
}
|
|
1437
1184
|
} finally {
|
|
1438
1185
|
clearTimeout(d);
|
|
1439
1186
|
}
|
|
1440
1187
|
throw f;
|
|
1441
|
-
},
|
|
1188
|
+
}, ht = (e, t, n, r) => {
|
|
1442
1189
|
let i = {};
|
|
1443
|
-
for (let [a, o] of Object.entries(t[n].selectors)) i[a] = (...i) =>
|
|
1190
|
+
for (let [a, o] of Object.entries(t[n].selectors)) i[a] = (...i) => ht(e, t, o.to, [...r, {
|
|
1444
1191
|
kind: n,
|
|
1445
1192
|
name: a,
|
|
1446
1193
|
args: i
|
|
1447
1194
|
}]);
|
|
1448
|
-
for (let a of Object.keys(t[n].operations)) i[a] = (...t) =>
|
|
1195
|
+
for (let a of Object.keys(t[n].operations)) i[a] = (...t) => mt({
|
|
1449
1196
|
...e,
|
|
1450
1197
|
parts: r,
|
|
1451
1198
|
operation: a,
|
|
1452
1199
|
args: t
|
|
1453
1200
|
});
|
|
1454
|
-
return i.ensure = (t, n = {}) =>
|
|
1201
|
+
return i.ensure = (t, n = {}) => pt({
|
|
1455
1202
|
...e,
|
|
1456
1203
|
parts: r,
|
|
1457
1204
|
operation: t,
|
|
1458
1205
|
args: [n]
|
|
1459
1206
|
}), i;
|
|
1460
|
-
},
|
|
1207
|
+
}, gt = (e) => ht(e, e.modules ?? ot, "frame", []), _t = st({
|
|
1461
1208
|
element: { operations: {
|
|
1462
|
-
click: { resolve: (e, t = {}) =>
|
|
1463
|
-
hover: { resolve: (e, t = {}) =>
|
|
1464
|
-
fill: { resolve: (e, t, n = {}) =>
|
|
1465
|
-
textContent: { resolve: (e, t = {}) =>
|
|
1466
|
-
getAttribute: { resolve: (e, t, n = {}) =>
|
|
1467
|
-
isVisible: { resolve: (e, t = {}) =>
|
|
1468
|
-
count: { resolve: (e, t = {}) =>
|
|
1469
|
-
exists: { resolve: (e, t = {}) =>
|
|
1470
|
-
videoElement: { resolve: (e, t = {}) =>
|
|
1209
|
+
click: { resolve: (e, t = {}) => Y.click.resolve(e, t) },
|
|
1210
|
+
hover: { resolve: (e, t = {}) => Y.hover.resolve(e, t) },
|
|
1211
|
+
fill: { resolve: (e, t, n = {}) => Y.fill.resolve(e, t, n) },
|
|
1212
|
+
textContent: { resolve: (e, t = {}) => Y.textContent.resolve(e) },
|
|
1213
|
+
getAttribute: { resolve: (e, t, n = {}) => Y.getAttribute.resolve(e, t) },
|
|
1214
|
+
isVisible: { resolve: (e, t = {}) => Y.isVisible.resolve(e) },
|
|
1215
|
+
count: { resolve: (e, t = {}) => Y.count.resolve(e) },
|
|
1216
|
+
exists: { resolve: (e, t = {}) => Y.exists.resolve(e) },
|
|
1217
|
+
videoElement: { resolve: (e, t = {}) => b(Fe(J(e.elements), "HTMLVideoElement")) }
|
|
1471
1218
|
} },
|
|
1472
|
-
frame: { operations: { addStyleTag: { resolve: (e, t) =>
|
|
1473
|
-
}),
|
|
1219
|
+
frame: { operations: { addStyleTag: { resolve: (e, t) => qe.resolve(e, t) } } }
|
|
1220
|
+
}), vt = (e) => {
|
|
1474
1221
|
if (!e || e === "about:blank") return !1;
|
|
1475
1222
|
let t;
|
|
1476
1223
|
try {
|
|
@@ -1483,25 +1230,25 @@ var Te = class {
|
|
|
1483
1230
|
let n = t.hostname, r = (e) => n === e || n.endsWith(`.${e}`);
|
|
1484
1231
|
return r("fkn.app") || r("fkn.dev") || r("sdbx.app");
|
|
1485
1232
|
}, $ = (e) => {
|
|
1486
|
-
if (
|
|
1487
|
-
},
|
|
1233
|
+
if (vt(e)) throw Error("attachFrame: refusing to target the extension's own pages or an FKN platform origin");
|
|
1234
|
+
}, yt = ({ src: e, domains: t, lockdown: n }) => {
|
|
1488
1235
|
if (!(!n || t.length) && e && e !== "about:blank") throw Error("attachFrame: lockdown needs domains when the frame already has a src; pass domains or load it via goto");
|
|
1489
|
-
},
|
|
1236
|
+
}, bt = {
|
|
1490
1237
|
scope: "embed.iframe",
|
|
1491
1238
|
category: "embed",
|
|
1492
1239
|
severity: 0,
|
|
1493
1240
|
title: "Load another website inside this app",
|
|
1494
1241
|
description: "Lets the app embed external pages directly inside its own view."
|
|
1495
|
-
},
|
|
1242
|
+
}, xt = {
|
|
1496
1243
|
scope: "embed.open",
|
|
1497
1244
|
category: "embed",
|
|
1498
1245
|
severity: 0,
|
|
1499
1246
|
title: "Open a website inside this app",
|
|
1500
1247
|
description: "Lets the app navigate to another site without leaving its window."
|
|
1501
|
-
},
|
|
1502
|
-
let t =
|
|
1248
|
+
}, St = (e) => {
|
|
1249
|
+
let t = gt({
|
|
1503
1250
|
executor: e.executor,
|
|
1504
|
-
modules:
|
|
1251
|
+
modules: _t,
|
|
1505
1252
|
gate: e.gate
|
|
1506
1253
|
}), n = (t, n = {}) => ($(t), e.goto(t, n)), r = () => e.url();
|
|
1507
1254
|
return {
|
|
@@ -1509,21 +1256,21 @@ var Te = class {
|
|
|
1509
1256
|
goto: n,
|
|
1510
1257
|
url: r
|
|
1511
1258
|
};
|
|
1512
|
-
},
|
|
1259
|
+
}, Ct = "FKN_WEB_EXTENSION_ATTACH_FRAME_EVENT_KEY", wt = async ({ iframe: e, domains: t = [], syncCookies: n = !0, lockdown: r = !1 }) => {
|
|
1513
1260
|
let i = crypto.randomUUID();
|
|
1514
|
-
if ($(e.src),
|
|
1261
|
+
if ($(e.src), yt({
|
|
1515
1262
|
src: e.src,
|
|
1516
1263
|
domains: t,
|
|
1517
1264
|
lockdown: r
|
|
1518
|
-
}), await
|
|
1519
|
-
e.dispatchEvent(new CustomEvent(
|
|
1520
|
-
let { executeLocator: a, highlightLocator: o, ensureLocatorPermission: s, goto: c } = await
|
|
1265
|
+
}), await D(), !e.isConnected) throw Error("attachFrame: the iframe must be connected to the document before attaching");
|
|
1266
|
+
e.dispatchEvent(new CustomEvent(Ct, { detail: i }));
|
|
1267
|
+
let { executeLocator: a, highlightLocator: o, ensureLocatorPermission: s, goto: c } = await O.attachFrame({
|
|
1521
1268
|
marker: i,
|
|
1522
1269
|
domains: t,
|
|
1523
1270
|
syncCookies: n,
|
|
1524
1271
|
lockdown: r
|
|
1525
1272
|
});
|
|
1526
|
-
return
|
|
1273
|
+
return St({
|
|
1527
1274
|
executor: {
|
|
1528
1275
|
execute: a,
|
|
1529
1276
|
highlight: o
|
|
@@ -1535,48 +1282,10 @@ var Te = class {
|
|
|
1535
1282
|
}),
|
|
1536
1283
|
url: () => e.src
|
|
1537
1284
|
});
|
|
1538
|
-
},
|
|
1285
|
+
}, Tt = { request: (e) => O.requestPermissions(e.map((e) => ({
|
|
1539
1286
|
key: e.key,
|
|
1540
1287
|
scope: e.scope ?? "",
|
|
1541
1288
|
reason: e.reason
|
|
1542
|
-
}))) }
|
|
1543
|
-
let t = typeof e == "string" ? e : e instanceof URL ? e.href : e.url, n;
|
|
1544
|
-
try {
|
|
1545
|
-
n = new URL(t);
|
|
1546
|
-
} catch {
|
|
1547
|
-
return;
|
|
1548
|
-
}
|
|
1549
|
-
let r = n.hostname;
|
|
1550
|
-
if (Tt.some((e) => r === e || r.endsWith(`.${e}`))) throw Error(`fetch refuses FKN platform domains (${r})`);
|
|
1551
|
-
}, Dt = async (e) => {
|
|
1552
|
-
if (e != null) return typeof e == "string" || e instanceof ArrayBuffer || ArrayBuffer.isView(e) ? e : new Request("https://body.invalid/", {
|
|
1553
|
-
method: "POST",
|
|
1554
|
-
body: e,
|
|
1555
|
-
duplex: "half"
|
|
1556
|
-
}).arrayBuffer();
|
|
1557
|
-
}, Ot = async (e) => {
|
|
1558
|
-
if (e.method === "GET" || e.method === "HEAD") return;
|
|
1559
|
-
let t = await e.clone().arrayBuffer();
|
|
1560
|
-
return t.byteLength ? t : void 0;
|
|
1561
|
-
}, kt = async (e, n) => {
|
|
1562
|
-
if (Et(e), typeof e == "object" && e && !(e instanceof URL) && typeof e.url == "string") {
|
|
1563
|
-
let r = e, i = {};
|
|
1564
|
-
r.headers.forEach((e, t) => {
|
|
1565
|
-
i[t] = e;
|
|
1566
|
-
});
|
|
1567
|
-
let a = await Dt(n?.body === void 0 ? await Ot(r) : n.body);
|
|
1568
|
-
return t.then((e) => e.cloud.fetch(r.url, {
|
|
1569
|
-
...n,
|
|
1570
|
-
method: n?.method ?? r.method,
|
|
1571
|
-
headers: n?.headers ?? i,
|
|
1572
|
-
body: a
|
|
1573
|
-
}));
|
|
1574
|
-
}
|
|
1575
|
-
let r = e instanceof URL ? e.href : e, i = await Dt(n?.body);
|
|
1576
|
-
return t.then((e) => e.cloud.fetch(r, n?.body === void 0 ? n : {
|
|
1577
|
-
...n,
|
|
1578
|
-
body: i
|
|
1579
|
-
}));
|
|
1580
|
-
};
|
|
1289
|
+
}))) };
|
|
1581
1290
|
//#endregion
|
|
1582
|
-
export { pe as A,
|
|
1291
|
+
export { pe as A, C as B, ge as C, ye as D, A as E, D as F, w as I, S as L, se as M, T as N, k as O, ce as P, b as R, Se as S, he as T, u as V, De as _, St as a, Ce as b, yt as c, W as d, Ne as f, Te as g, B as h, bt as i, fe as j, me as k, vt as l, z as m, Ct as n, xt as o, U as p, wt as r, $ as s, Tt as t, R as u, Ee as v, _e as w, j as x, we as y, x as z };
|