@metapages/metapage 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +55 -53
- package/dist/index.js.map +1 -1
- package/dist/metapage/Metapage.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/metapage/Metapage.ts +3 -0
package/dist/index.js
CHANGED
|
@@ -452,7 +452,7 @@ function Hn({ original: e, copy: t, assignedMap: n }, s, i, o, r) {
|
|
|
452
452
|
i.push(d === B.Remove ? { op: d, path: w } : { op: d, path: w, value: c }), o.push(d === B.Add ? { op: B.Remove, path: w } : d === B.Remove ? { op: B.Add, path: w, value: f } : { op: B.Replace, path: w, value: f });
|
|
453
453
|
});
|
|
454
454
|
}
|
|
455
|
-
function
|
|
455
|
+
function kn({ original: e, copy: t }, n, s, i, o) {
|
|
456
456
|
let r = 0;
|
|
457
457
|
e.forEach((a) => {
|
|
458
458
|
if (!t.has(a)) {
|
|
@@ -493,12 +493,12 @@ function $e(e, t, n, s) {
|
|
|
493
493
|
case 1:
|
|
494
494
|
return Dn(e, t, n, s, i);
|
|
495
495
|
case 3:
|
|
496
|
-
return
|
|
496
|
+
return kn(e, t, n, s, i);
|
|
497
497
|
}
|
|
498
498
|
}
|
|
499
|
-
let
|
|
499
|
+
let Nn = !1;
|
|
500
500
|
const Fe = (e, t, n = !1) => {
|
|
501
|
-
if (typeof e == "object" && e !== null && (!ee(e, t) || n) && !
|
|
501
|
+
if (typeof e == "object" && e !== null && (!ee(e, t) || n) && !Nn)
|
|
502
502
|
throw new Error("Strict mode: Mutable data cannot be accessed directly, please use 'unsafe(callback)' wrap.");
|
|
503
503
|
}, at = {
|
|
504
504
|
get size() {
|
|
@@ -1155,8 +1155,8 @@ const Gn = dt(fetch), en = async (e, t) => {
|
|
|
1155
1155
|
throw `Unknown version: ${e}`;
|
|
1156
1156
|
};
|
|
1157
1157
|
var Oe = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", Ee = typeof Uint8Array > "u" ? [] : new Uint8Array(256);
|
|
1158
|
-
for (var
|
|
1159
|
-
Ee[Oe.charCodeAt(
|
|
1158
|
+
for (var Ne = 0; Ne < Oe.length; Ne++)
|
|
1159
|
+
Ee[Oe.charCodeAt(Ne)] = Ne;
|
|
1160
1160
|
var je = function(e) {
|
|
1161
1161
|
var t = new Uint8Array(e), n, s = t.length, i = "";
|
|
1162
1162
|
for (n = 0; n < s; n += 3)
|
|
@@ -1632,12 +1632,12 @@ const ze = (e, t) => t ? C(e, (n) => {
|
|
|
1632
1632
|
n && (i = `${i}; background: #${n}`), s = `%c${s}`, window.console.log(s, i);
|
|
1633
1633
|
} else
|
|
1634
1634
|
window.console.log(s);
|
|
1635
|
-
}, pn = (e) =>
|
|
1635
|
+
}, pn = (e) => ks(Hs(e)), Hs = (e) => {
|
|
1636
1636
|
var t = 0;
|
|
1637
1637
|
for (let n = 0; n < e.length; n++)
|
|
1638
1638
|
t = e.charCodeAt(n) + ((t << 5) - t);
|
|
1639
1639
|
return t;
|
|
1640
|
-
},
|
|
1640
|
+
}, ks = (e) => {
|
|
1641
1641
|
var t = (e & 16777215).toString(16).toUpperCase();
|
|
1642
1642
|
return "00000".substring(0, 6 - t.length) + t;
|
|
1643
1643
|
}, Ze = () => document.readyState == "complete" || document.readyState == "interactive", Ot = async () => Ze() ? Promise.resolve() : new Promise((e) => {
|
|
@@ -1885,9 +1885,9 @@ te.MESSAGE = U.Message;
|
|
|
1885
1885
|
te.deserializeInputs = Ce;
|
|
1886
1886
|
te.serializeInputs = We;
|
|
1887
1887
|
var Ke = {};
|
|
1888
|
-
const ie = "\\\\/",
|
|
1888
|
+
const ie = "\\\\/", kt = `[^${ie}]`, ce = "\\.", Ns = "\\+", js = "\\?", Xe = "\\/", Us = "(?=.)", dn = "[^/]", At = `(?:${Xe}|$)`, mn = `(?:^|${Xe})`, St = `${ce}{1,2}${At}`, Bs = `(?!${ce})`, Fs = `(?!${mn}${St})`, zs = `(?!${ce}{0,1}${At})`, Gs = `(?!${St})`, Vs = `[^.${Xe}]`, Js = `${dn}*?`, Ws = "/", yn = {
|
|
1889
1889
|
DOT_LITERAL: ce,
|
|
1890
|
-
PLUS_LITERAL:
|
|
1890
|
+
PLUS_LITERAL: Ns,
|
|
1891
1891
|
QMARK_LITERAL: js,
|
|
1892
1892
|
SLASH_LITERAL: Xe,
|
|
1893
1893
|
ONE_CHAR: Us,
|
|
@@ -1905,8 +1905,8 @@ const ie = "\\\\/", Nt = `[^${ie}]`, ce = "\\.", ks = "\\+", js = "\\?", Xe = "\
|
|
|
1905
1905
|
}, Ks = {
|
|
1906
1906
|
...yn,
|
|
1907
1907
|
SLASH_LITERAL: `[${ie}]`,
|
|
1908
|
-
QMARK:
|
|
1909
|
-
STAR: `${
|
|
1908
|
+
QMARK: kt,
|
|
1909
|
+
STAR: `${kt}*?`,
|
|
1910
1910
|
DOTS_SLASH: `${ce}{1,2}(?:[${ie}]|$)`,
|
|
1911
1911
|
NO_DOT: `(?!${ce})`,
|
|
1912
1912
|
NO_DOTS: `(?!(?:^|[${ie}])${ce}{1,2}(?:[${ie}]|$))`,
|
|
@@ -2078,7 +2078,7 @@ var qe = {
|
|
|
2078
2078
|
return r.negated === !0 && (c = `(?:^(?!${c}).*$)`), c;
|
|
2079
2079
|
}, e.basename = (o, { windows: r } = {}) => r ? o.replace(/[\\/]$/, "").replace(/.*[\\/]/, "") : o.replace(/\/$/, "").replace(/.*\//, "");
|
|
2080
2080
|
})(Ke);
|
|
2081
|
-
const
|
|
2081
|
+
const Nt = Ke, {
|
|
2082
2082
|
CHAR_ASTERISK: et,
|
|
2083
2083
|
/* * */
|
|
2084
2084
|
CHAR_AT: qs,
|
|
@@ -2114,25 +2114,25 @@ const kt = Ke, {
|
|
|
2114
2114
|
}, ni = (e, t) => {
|
|
2115
2115
|
const n = t || {}, s = e.length - 1, i = n.parts === !0 || n.scanToEnd === !0, o = [], r = [], a = [];
|
|
2116
2116
|
let u = e, f = -1, c = 0, d = 0, y = !1, w = !1, _ = !1, S = !1, v = !1, x = !1, b = !1, A = !1, M = !1, R = 0, D, O, L = { value: "", depth: 0, isGlob: !1 };
|
|
2117
|
-
const z = () => f >= s, h = () => u.charCodeAt(f + 1),
|
|
2117
|
+
const z = () => f >= s, h = () => u.charCodeAt(f + 1), k = () => (D = O, u.charCodeAt(++f));
|
|
2118
2118
|
for (; f < s; ) {
|
|
2119
|
-
O =
|
|
2119
|
+
O = k();
|
|
2120
2120
|
let J;
|
|
2121
2121
|
if (O === Me) {
|
|
2122
|
-
b = L.backslashes = !0, O =
|
|
2122
|
+
b = L.backslashes = !0, O = k(), O === nt && (x = !0);
|
|
2123
2123
|
continue;
|
|
2124
2124
|
}
|
|
2125
2125
|
if (x === !0 || O === nt) {
|
|
2126
|
-
for (R++; z() !== !0 && (O =
|
|
2126
|
+
for (R++; z() !== !0 && (O = k()); ) {
|
|
2127
2127
|
if (O === Me) {
|
|
2128
|
-
b = L.backslashes = !0,
|
|
2128
|
+
b = L.backslashes = !0, k();
|
|
2129
2129
|
continue;
|
|
2130
2130
|
}
|
|
2131
2131
|
if (O === nt) {
|
|
2132
2132
|
R++;
|
|
2133
2133
|
continue;
|
|
2134
2134
|
}
|
|
2135
|
-
if (x !== !0 && O === tt && (O =
|
|
2135
|
+
if (x !== !0 && O === tt && (O = k()) === tt) {
|
|
2136
2136
|
if (y = L.isBrace = !0, _ = L.isGlob = !0, M = !0, i === !0)
|
|
2137
2137
|
continue;
|
|
2138
2138
|
break;
|
|
@@ -2163,9 +2163,9 @@ const kt = Ke, {
|
|
|
2163
2163
|
}
|
|
2164
2164
|
if (n.noext !== !0 && (O === Zs || O === qs || O === et || O === Ut || O === jt) === !0 && h() === st) {
|
|
2165
2165
|
if (_ = L.isGlob = !0, S = L.isExtglob = !0, M = !0, i === !0) {
|
|
2166
|
-
for (; z() !== !0 && (O =
|
|
2166
|
+
for (; z() !== !0 && (O = k()); ) {
|
|
2167
2167
|
if (O === Me) {
|
|
2168
|
-
b = L.backslashes = !0, O =
|
|
2168
|
+
b = L.backslashes = !0, O = k();
|
|
2169
2169
|
continue;
|
|
2170
2170
|
}
|
|
2171
2171
|
if (O === Bt) {
|
|
@@ -2188,9 +2188,9 @@ const kt = Ke, {
|
|
|
2188
2188
|
break;
|
|
2189
2189
|
}
|
|
2190
2190
|
if (O === Ys)
|
|
2191
|
-
for (; z() !== !0 && (J =
|
|
2191
|
+
for (; z() !== !0 && (J = k()); ) {
|
|
2192
2192
|
if (J === Me) {
|
|
2193
|
-
b = L.backslashes = !0,
|
|
2193
|
+
b = L.backslashes = !0, k();
|
|
2194
2194
|
continue;
|
|
2195
2195
|
}
|
|
2196
2196
|
if (J === ti) {
|
|
@@ -2205,9 +2205,9 @@ const kt = Ke, {
|
|
|
2205
2205
|
}
|
|
2206
2206
|
if (n.noparen !== !0 && O === st) {
|
|
2207
2207
|
if (_ = L.isGlob = !0, i === !0) {
|
|
2208
|
-
for (; z() !== !0 && (O =
|
|
2208
|
+
for (; z() !== !0 && (O = k()); ) {
|
|
2209
2209
|
if (O === st) {
|
|
2210
|
-
b = L.backslashes = !0, O =
|
|
2210
|
+
b = L.backslashes = !0, O = k();
|
|
2211
2211
|
continue;
|
|
2212
2212
|
}
|
|
2213
2213
|
if (O === Bt) {
|
|
@@ -2227,7 +2227,7 @@ const kt = Ke, {
|
|
|
2227
2227
|
}
|
|
2228
2228
|
n.noext === !0 && (S = !1, _ = !1);
|
|
2229
2229
|
let H = u, he = "", l = "";
|
|
2230
|
-
c > 0 && (he = u.slice(0, c), u = u.slice(c), d -= c), H && _ === !0 && d > 0 ? (H = u.slice(0, d), l = u.slice(d)) : _ === !0 ? (H = "", l = u) : H = u, H && H !== "" && H !== "/" && H !== u && Ft(H.charCodeAt(H.length - 1)) && (H = H.slice(0, -1)), n.unescape === !0 && (l && (l =
|
|
2230
|
+
c > 0 && (he = u.slice(0, c), u = u.slice(c), d -= c), H && _ === !0 && d > 0 ? (H = u.slice(0, d), l = u.slice(d)) : _ === !0 ? (H = "", l = u) : H = u, H && H !== "" && H !== "/" && H !== u && Ft(H.charCodeAt(H.length - 1)) && (H = H.slice(0, -1)), n.unescape === !0 && (l && (l = Nt.removeBackslashes(l)), H && b === !0 && (H = Nt.removeBackslashes(H)));
|
|
2231
2231
|
const p = {
|
|
2232
2232
|
prefix: he,
|
|
2233
2233
|
input: e,
|
|
@@ -2315,10 +2315,10 @@ const Ge = qe, Z = Ke, {
|
|
|
2315
2315
|
tokens: r
|
|
2316
2316
|
};
|
|
2317
2317
|
e = Z.removePrefix(e, h), i = e.length;
|
|
2318
|
-
const
|
|
2318
|
+
const k = [], H = [], he = [];
|
|
2319
2319
|
let l = o, p;
|
|
2320
|
-
const J = () => h.index === i - 1, T = h.peek = (g = 1) => e[h.index + g], se = h.advance = () => e[++h.index], ae = () => e.slice(h.index + 1), q = (g = "",
|
|
2321
|
-
h.consumed += g, h.index +=
|
|
2320
|
+
const J = () => h.index === i - 1, T = h.peek = (g = 1) => e[h.index + g], se = h.advance = () => e[++h.index], ae = () => e.slice(h.index + 1), q = (g = "", N = 0) => {
|
|
2321
|
+
h.consumed += g, h.index += N;
|
|
2322
2322
|
}, Te = (g) => {
|
|
2323
2323
|
h.output += g.output != null ? g.output : g.value, q(g.value);
|
|
2324
2324
|
}, Rn = () => {
|
|
@@ -2332,30 +2332,30 @@ const Ge = qe, Z = Ke, {
|
|
|
2332
2332
|
h[g]--, he.pop();
|
|
2333
2333
|
}, I = (g) => {
|
|
2334
2334
|
if (l.type === "globstar") {
|
|
2335
|
-
const
|
|
2336
|
-
g.type !== "slash" && g.type !== "paren" && !
|
|
2335
|
+
const N = h.braces > 0 && (g.type === "comma" || g.type === "brace"), m = g.extglob === !0 || k.length && (g.type === "pipe" || g.type === "paren");
|
|
2336
|
+
g.type !== "slash" && g.type !== "paren" && !N && !m && (h.output = h.output.slice(0, -l.output.length), l.type = "star", l.value = "*", l.output = z, h.output += l.output);
|
|
2337
2337
|
}
|
|
2338
|
-
if (
|
|
2338
|
+
if (k.length && g.type !== "paren" && !f[g.value] && (k[k.length - 1].inner += g.value), (g.value || g.output) && Te(g), l && l.type === "text" && g.type === "text") {
|
|
2339
2339
|
l.value += g.value, l.output = (l.output || "") + g.value;
|
|
2340
2340
|
return;
|
|
2341
2341
|
}
|
|
2342
2342
|
g.prev = l, r.push(g), l = g;
|
|
2343
|
-
}, He = (g,
|
|
2344
|
-
const m = { ...f[
|
|
2343
|
+
}, He = (g, N) => {
|
|
2344
|
+
const m = { ...f[N], conditions: 1, inner: "" };
|
|
2345
2345
|
m.prev = l, m.parens = h.parens, m.output = h.output;
|
|
2346
2346
|
const P = (n.capture ? "(" : "") + m.open;
|
|
2347
|
-
De("parens"), I({ type: g, value:
|
|
2347
|
+
De("parens"), I({ type: g, value: N, output: h.output ? "" : w }), I({ type: "paren", extglob: !0, value: se(), output: P }), k.push(m);
|
|
2348
2348
|
}, On = (g) => {
|
|
2349
|
-
let
|
|
2349
|
+
let N = g.close + (n.capture ? ")" : "");
|
|
2350
2350
|
if (g.type === "negate") {
|
|
2351
2351
|
let m = z;
|
|
2352
|
-
g.inner && g.inner.length > 1 && g.inner.includes("/") && (m = D(n)), (m !== z || J() || /^\)+$/.test(ae())) && (
|
|
2352
|
+
g.inner && g.inner.length > 1 && g.inner.includes("/") && (m = D(n)), (m !== z || J() || /^\)+$/.test(ae())) && (N = g.close = `)$))${m}`), g.prev.type === "bos" && J() && (h.negatedExtglob = !0);
|
|
2353
2353
|
}
|
|
2354
|
-
I({ type: "paren", extglob: !0, value: p, output:
|
|
2354
|
+
I({ type: "paren", extglob: !0, value: p, output: N }), me("parens");
|
|
2355
2355
|
};
|
|
2356
2356
|
if (n.fastpaths !== !1 && !/(^[*!]|[/()[\]{}"])/.test(e)) {
|
|
2357
|
-
let g = !1,
|
|
2358
|
-
return g === !0 && (n.unescape === !0 ?
|
|
2357
|
+
let g = !1, N = e.replace(oi, (m, P, j, W, G, Qe) => W === "\\" ? (g = !0, m) : W === "?" ? P ? P + W + (G ? b.repeat(G.length) : "") : Qe === 0 ? L + (G ? b.repeat(G.length) : "") : b.repeat(j.length) : W === "." ? c.repeat(j.length) : W === "*" ? P ? P + W + (G ? z : "") : z : P ? m : `\\${m}`);
|
|
2358
|
+
return g === !0 && (n.unescape === !0 ? N = N.replace(/\\/g, "") : N = N.replace(/\\+/g, (m) => m.length % 2 === 0 ? "\\\\" : m ? "\\" : "")), N === e && n.contains === !0 ? (h.output = e, h) : (h.output = Z.wrapOutput(N, h, t), h);
|
|
2359
2359
|
}
|
|
2360
2360
|
for (; !J(); ) {
|
|
2361
2361
|
if (p = se(), p === "\0")
|
|
@@ -2404,9 +2404,9 @@ const Ge = qe, Z = Ke, {
|
|
|
2404
2404
|
if (p === ")") {
|
|
2405
2405
|
if (h.parens === 0 && n.strictBrackets === !0)
|
|
2406
2406
|
throw new SyntaxError(ve("opening", "("));
|
|
2407
|
-
const m =
|
|
2407
|
+
const m = k[k.length - 1];
|
|
2408
2408
|
if (m && h.parens === m.parens + 1) {
|
|
2409
|
-
On(
|
|
2409
|
+
On(k.pop());
|
|
2410
2410
|
continue;
|
|
2411
2411
|
}
|
|
2412
2412
|
I({ type: "paren", value: p, output: h.parens ? ")" : "\\)" }), me("parens");
|
|
@@ -2480,7 +2480,7 @@ const Ge = qe, Z = Ke, {
|
|
|
2480
2480
|
continue;
|
|
2481
2481
|
}
|
|
2482
2482
|
if (p === "|") {
|
|
2483
|
-
|
|
2483
|
+
k.length > 0 && k[k.length - 1].conditions++, I({ type: "text", value: p });
|
|
2484
2484
|
continue;
|
|
2485
2485
|
}
|
|
2486
2486
|
if (p === ",") {
|
|
@@ -2590,14 +2590,14 @@ const Ge = qe, Z = Ke, {
|
|
|
2590
2590
|
I({ type: "star", value: p, output: "" });
|
|
2591
2591
|
continue;
|
|
2592
2592
|
}
|
|
2593
|
-
const G = h.braces > 0 && (m.type === "comma" || m.type === "brace"), Qe =
|
|
2593
|
+
const G = h.braces > 0 && (m.type === "comma" || m.type === "brace"), Qe = k.length && (m.type === "pipe" || m.type === "paren");
|
|
2594
2594
|
if (!j && m.type !== "paren" && !G && !Qe) {
|
|
2595
2595
|
I({ type: "star", value: p, output: "" });
|
|
2596
2596
|
continue;
|
|
2597
2597
|
}
|
|
2598
2598
|
for (; g.slice(0, 3) === "/**"; ) {
|
|
2599
|
-
const
|
|
2600
|
-
if (
|
|
2599
|
+
const ke = e[h.index + 4];
|
|
2600
|
+
if (ke && ke !== "/")
|
|
2601
2601
|
break;
|
|
2602
2602
|
g = g.slice(3), q("/**", 3);
|
|
2603
2603
|
}
|
|
@@ -2610,8 +2610,8 @@ const Ge = qe, Z = Ke, {
|
|
|
2610
2610
|
continue;
|
|
2611
2611
|
}
|
|
2612
2612
|
if (m.type === "slash" && m.prev.type !== "bos" && g[0] === "/") {
|
|
2613
|
-
const
|
|
2614
|
-
h.output = h.output.slice(0, -(m.output + l.output).length), m.output = `(?:${m.output}`, l.type = "globstar", l.output = `${D(n)}${y}|${y}${
|
|
2613
|
+
const ke = g[1] !== void 0 ? "|$" : "";
|
|
2614
|
+
h.output = h.output.slice(0, -(m.output + l.output).length), m.output = `(?:${m.output}`, l.type = "globstar", l.output = `${D(n)}${y}|${y}${ke})`, l.value += p, h.output += m.output + l.output, h.globstar = !0, q(p + se()), I({ type: "slash", value: "/", output: "" });
|
|
2615
2615
|
continue;
|
|
2616
2616
|
}
|
|
2617
2617
|
if (m.type === "bos" && g[0] === "/") {
|
|
@@ -2621,16 +2621,16 @@ const Ge = qe, Z = Ke, {
|
|
|
2621
2621
|
h.output = h.output.slice(0, -l.output.length), l.type = "globstar", l.output = D(n), l.value += p, h.output += l.output, h.globstar = !0, q(p);
|
|
2622
2622
|
continue;
|
|
2623
2623
|
}
|
|
2624
|
-
const
|
|
2624
|
+
const N = { type: "star", value: p, output: z };
|
|
2625
2625
|
if (n.bash === !0) {
|
|
2626
|
-
|
|
2626
|
+
N.output = ".*?", (l.type === "bos" || l.type === "slash") && (N.output = O + N.output), I(N);
|
|
2627
2627
|
continue;
|
|
2628
2628
|
}
|
|
2629
2629
|
if (l && (l.type === "bracket" || l.type === "paren") && n.regex === !0) {
|
|
2630
|
-
|
|
2630
|
+
N.output = p, I(N);
|
|
2631
2631
|
continue;
|
|
2632
2632
|
}
|
|
2633
|
-
(h.index === h.start || l.type === "slash" || l.type === "dot") && (l.type === "dot" ? (h.output += v, l.output += v) : n.dot === !0 ? (h.output += x, l.output += x) : (h.output += O, l.output += O), T() !== "*" && (h.output += w, l.output += w)), I(
|
|
2633
|
+
(h.index === h.start || l.type === "slash" || l.type === "dot") && (l.type === "dot" ? (h.output += v, l.output += v) : n.dot === !0 ? (h.output += x, l.output += x) : (h.output += O, l.output += O), T() !== "*" && (h.output += w, l.output += w)), I(N);
|
|
2634
2634
|
}
|
|
2635
2635
|
for (; h.brackets > 0; ) {
|
|
2636
2636
|
if (n.strictBrackets === !0)
|
|
@@ -3265,6 +3265,8 @@ class ne extends Ts {
|
|
|
3265
3265
|
break;
|
|
3266
3266
|
case X.OutputsUpdate:
|
|
3267
3267
|
const f = r.params;
|
|
3268
|
+
if (!f || Object.keys(f).length === 0)
|
|
3269
|
+
break;
|
|
3268
3270
|
if (this._metaframes[a]) {
|
|
3269
3271
|
var s = this._metaframes[a];
|
|
3270
3272
|
this.setOutputStateOnlyMetaframeInputMap(a, f), s.setOutputs(f);
|
|
@@ -3380,7 +3382,7 @@ export {
|
|
|
3380
3382
|
Ii as getUrlParam,
|
|
3381
3383
|
Ci as getUrlParamDebug,
|
|
3382
3384
|
Hs as hashCode,
|
|
3383
|
-
|
|
3385
|
+
ks as intToRGB,
|
|
3384
3386
|
ft as isDebugFromUrlsParams,
|
|
3385
3387
|
Ps as isIframe,
|
|
3386
3388
|
Mi as isJsonRpcId,
|