@takazudo/zdtp 0.4.9 → 0.4.11
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/CHANGELOG.md +40 -0
- package/PORTABLE-CONTRACT.md +1309 -0
- package/README.md +27 -9
- package/dist/astro/host-adapter.d.ts +4 -4
- package/dist/astro/host-adapter.js +78 -47
- package/dist/astro/index.js +1 -1
- package/dist/autoload-state-CTDDBxI8.js +88 -0
- package/dist/config/panel-config.d.ts +15 -0
- package/dist/{index-t74PT2zd.js → index-BeYH-tJD.js} +2052 -2012
- package/dist/{index-CGev6ZiI.js → index-C8GR1TU-.js} +2 -2
- package/dist/index.d.ts +14 -0
- package/dist/index.js +30 -28
- package/dist/{panel-config-BNLlUc_r.js → panel-config-7Xg59uKj.js} +18 -14
- package/dist/panel.d.ts +8 -1
- package/dist/state/autoload-state.d.ts +91 -21
- package/dist/state/tweak-state.d.ts +73 -5
- package/dist/testing.js +7 -7
- package/dist/{tweak-state-Dti6XMoQ.js → tweak-state-DRKV1uYj.js} +407 -385
- package/dist/utils/document-liveness.d.ts +53 -0
- package/package.json +2 -1
- package/dist/autoload-state-CFmRjtD-.js +0 -64
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as
|
|
2
|
-
const
|
|
1
|
+
import { r as mt, g, k as yt, l as bt, h as xt, d as Mt, n as U, o as Z, p as Ie, q as Ae, t as kt, e as vt, u as St, v as B, f as wt, w as Oe, x as $t, y as Nt } from "./panel-config-7Xg59uKj.js";
|
|
2
|
+
const je = (e, t) => {
|
|
3
3
|
if (typeof e == "number") {
|
|
4
4
|
if (t === 3)
|
|
5
5
|
return {
|
|
@@ -32,7 +32,7 @@ const Re = (e, t) => {
|
|
|
32
32
|
alpha: (e & 255) / 255
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
|
-
},
|
|
35
|
+
}, Tt = {
|
|
36
36
|
aliceblue: 15792383,
|
|
37
37
|
antiquewhite: 16444375,
|
|
38
38
|
aqua: 65535,
|
|
@@ -183,23 +183,23 @@ const Re = (e, t) => {
|
|
|
183
183
|
whitesmoke: 16119285,
|
|
184
184
|
yellow: 16776960,
|
|
185
185
|
yellowgreen: 10145074
|
|
186
|
-
},
|
|
186
|
+
}, Ct = (e) => je(Tt[e.toLowerCase()], 6), It = /^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i, At = (e) => {
|
|
187
187
|
let t;
|
|
188
|
-
return (t = e.match(
|
|
189
|
-
}, w = "([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)", H = `${w}%`,
|
|
190
|
-
`^rgba?\\(\\s*${w}${
|
|
191
|
-
),
|
|
192
|
-
`^rgba?\\(\\s*${H}${
|
|
193
|
-
),
|
|
188
|
+
return (t = e.match(It)) ? je(parseInt(t[1], 16), t[1].length) : void 0;
|
|
189
|
+
}, w = "([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)", H = `${w}%`, ke = `(?:${w}%|${w})`, Ot = `(?:${w}(deg|grad|rad|turn)|${w})`, I = "\\s*,\\s*", Pt = new RegExp(
|
|
190
|
+
`^rgba?\\(\\s*${w}${I}${w}${I}${w}\\s*(?:,\\s*${ke}\\s*)?\\)$`
|
|
191
|
+
), _t = new RegExp(
|
|
192
|
+
`^rgba?\\(\\s*${H}${I}${H}${I}${H}\\s*(?:,\\s*${ke}\\s*)?\\)$`
|
|
193
|
+
), Ht = (e) => {
|
|
194
194
|
let t = { mode: "rgb" }, n;
|
|
195
|
-
if (n = e.match(
|
|
195
|
+
if (n = e.match(Pt))
|
|
196
196
|
n[1] !== void 0 && (t.r = n[1] / 255), n[2] !== void 0 && (t.g = n[2] / 255), n[3] !== void 0 && (t.b = n[3] / 255);
|
|
197
|
-
else if (n = e.match(
|
|
197
|
+
else if (n = e.match(_t))
|
|
198
198
|
n[1] !== void 0 && (t.r = n[1] / 100), n[2] !== void 0 && (t.g = n[2] / 100), n[3] !== void 0 && (t.b = n[3] / 100);
|
|
199
199
|
else
|
|
200
200
|
return;
|
|
201
201
|
return n[4] !== void 0 ? t.alpha = Math.max(0, Math.min(1, n[4] / 100)) : n[5] !== void 0 && (t.alpha = Math.max(0, Math.min(1, +n[5]))), t;
|
|
202
|
-
}, G = (e, t) => e === void 0 ? void 0 : typeof e != "object" ?
|
|
202
|
+
}, G = (e, t) => e === void 0 ? void 0 : typeof e != "object" ? De(e) : e.mode !== void 0 ? e : t ? { ...e, mode: t } : void 0, x = (e = "rgb") => (t) => (t = G(t, e)) !== void 0 ? (
|
|
203
203
|
// if the color's mode corresponds to our target mode
|
|
204
204
|
t.mode === e ? (
|
|
205
205
|
// then just return the color
|
|
@@ -222,7 +222,7 @@ const Re = (e, t) => {
|
|
|
222
222
|
)
|
|
223
223
|
)
|
|
224
224
|
)
|
|
225
|
-
) : void 0, M = {},
|
|
225
|
+
) : void 0, M = {}, ze = {}, q = [], Fe = {}, Et = (e) => e, ve = (e) => (M[e.mode] = {
|
|
226
226
|
...M[e.mode],
|
|
227
227
|
...e.toMode
|
|
228
228
|
}, Object.keys(e.fromMode || {}).forEach((t) => {
|
|
@@ -232,16 +232,16 @@ const Re = (e, t) => {
|
|
|
232
232
|
throw new Error(`Missing interpolator for: ${t}`);
|
|
233
233
|
typeof e.interpolate[t] == "function" && (e.interpolate[t] = {
|
|
234
234
|
use: e.interpolate[t]
|
|
235
|
-
}), e.interpolate[t].fixup || (e.interpolate[t].fixup =
|
|
236
|
-
}),
|
|
235
|
+
}), e.interpolate[t].fixup || (e.interpolate[t].fixup = Et);
|
|
236
|
+
}), ze[e.mode] = e, (e.parse || []).forEach((t) => {
|
|
237
237
|
Vt(t, e.mode);
|
|
238
|
-
}), x(e.mode)), Q = (e) =>
|
|
238
|
+
}), x(e.mode)), Q = (e) => ze[e], Vt = (e, t) => {
|
|
239
239
|
if (typeof e == "string") {
|
|
240
240
|
if (!t)
|
|
241
241
|
throw new Error("'mode' required when 'parser' is a string");
|
|
242
|
-
|
|
242
|
+
Fe[e] = t;
|
|
243
243
|
} else typeof e == "function" && q.indexOf(e) < 0 && q.push(e);
|
|
244
|
-
}, fe = /[^\x00-\x7F]|[a-zA-Z_]/,
|
|
244
|
+
}, fe = /[^\x00-\x7F]|[a-zA-Z_]/, Rt = /[^\x00-\x7F]|[-\w]/, l = {
|
|
245
245
|
Function: "function",
|
|
246
246
|
Ident: "ident",
|
|
247
247
|
Number: "number",
|
|
@@ -270,7 +270,7 @@ function le(e) {
|
|
|
270
270
|
}
|
|
271
271
|
return !1;
|
|
272
272
|
}
|
|
273
|
-
const
|
|
273
|
+
const jt = {
|
|
274
274
|
deg: 1,
|
|
275
275
|
rad: 180 / Math.PI,
|
|
276
276
|
grad: 9 / 10,
|
|
@@ -280,7 +280,7 @@ function P(e) {
|
|
|
280
280
|
let t = "";
|
|
281
281
|
if ((e[c] === "-" || e[c] === "+") && (t += e[c++]), t += F(e), e[c] === "." && /\d/.test(e[c + 1]) && (t += e[c++] + F(e)), (e[c] === "e" || e[c] === "E") && ((e[c + 1] === "-" || e[c + 1] === "+") && /\d/.test(e[c + 2]) ? t += e[c++] + e[c++] + F(e) : /\d/.test(e[c + 1]) && (t += e[c++] + F(e))), le(e)) {
|
|
282
282
|
let n = W(e);
|
|
283
|
-
return n === "deg" || n === "rad" || n === "turn" || n === "grad" ? { type: l.Hue, value: t *
|
|
283
|
+
return n === "deg" || n === "rad" || n === "turn" || n === "grad" ? { type: l.Hue, value: t * jt[n] } : void 0;
|
|
284
284
|
}
|
|
285
285
|
return e[c] === "%" ? (c++, { type: l.Percentage, value: +t }) : { type: l.Number, value: +t };
|
|
286
286
|
}
|
|
@@ -292,15 +292,15 @@ function F(e) {
|
|
|
292
292
|
}
|
|
293
293
|
function W(e) {
|
|
294
294
|
let t = "";
|
|
295
|
-
for (; c < e.length &&
|
|
295
|
+
for (; c < e.length && Rt.test(e[c]); )
|
|
296
296
|
t += e[c++];
|
|
297
297
|
return t;
|
|
298
298
|
}
|
|
299
|
-
function
|
|
299
|
+
function zt(e) {
|
|
300
300
|
let t = W(e);
|
|
301
301
|
return e[c] === "(" ? (c++, { type: l.Function, value: t }) : t === "none" ? { type: l.None, value: void 0 } : { type: l.Ident, value: t };
|
|
302
302
|
}
|
|
303
|
-
function
|
|
303
|
+
function Ft(e = "") {
|
|
304
304
|
let t = e.trim(), n = [], r;
|
|
305
305
|
for (c = 0; c < t.length; ) {
|
|
306
306
|
if (r = t[c++], r === `
|
|
@@ -364,22 +364,22 @@ function zt(e = "") {
|
|
|
364
364
|
continue;
|
|
365
365
|
}
|
|
366
366
|
if (fe.test(r)) {
|
|
367
|
-
c--, n.push(
|
|
367
|
+
c--, n.push(zt(t));
|
|
368
368
|
continue;
|
|
369
369
|
}
|
|
370
370
|
return;
|
|
371
371
|
}
|
|
372
372
|
return n;
|
|
373
373
|
}
|
|
374
|
-
function
|
|
374
|
+
function Lt(e) {
|
|
375
375
|
e._i = 0;
|
|
376
376
|
let t = e[e._i++];
|
|
377
377
|
if (!t || t.type !== l.Function || t.value !== "color" || (t = e[e._i++], t.type !== l.Ident))
|
|
378
378
|
return;
|
|
379
|
-
const n =
|
|
379
|
+
const n = Fe[t.value];
|
|
380
380
|
if (!n)
|
|
381
381
|
return;
|
|
382
|
-
const r = { mode: n }, o =
|
|
382
|
+
const r = { mode: n }, o = Le(e, !1);
|
|
383
383
|
if (!o)
|
|
384
384
|
return;
|
|
385
385
|
const i = Q(n).channels;
|
|
@@ -387,7 +387,7 @@ function Ft(e) {
|
|
|
387
387
|
s = o[a], f = i[a], s.type !== l.None && (r[f] = s.type === l.Number ? s.value : s.value / 100, f === "alpha" && (r[f] = Math.max(0, Math.min(1, r[f]))));
|
|
388
388
|
return r;
|
|
389
389
|
}
|
|
390
|
-
function
|
|
390
|
+
function Le(e, t) {
|
|
391
391
|
const n = [];
|
|
392
392
|
let r;
|
|
393
393
|
for (; e._i < e.length; ) {
|
|
@@ -411,26 +411,26 @@ function Fe(e, t) {
|
|
|
411
411
|
return n.length === 3 && n.push({ type: l.None, value: void 0 }), n.every((o) => o.type !== l.Alpha) ? n : void 0;
|
|
412
412
|
}
|
|
413
413
|
}
|
|
414
|
-
function
|
|
414
|
+
function Dt(e, t) {
|
|
415
415
|
e._i = 0;
|
|
416
416
|
let n = e[e._i++];
|
|
417
417
|
if (!n || n.type !== l.Function)
|
|
418
418
|
return;
|
|
419
|
-
let r =
|
|
419
|
+
let r = Le(e, t);
|
|
420
420
|
if (r)
|
|
421
421
|
return r.unshift(n.value), r;
|
|
422
422
|
}
|
|
423
|
-
const
|
|
423
|
+
const De = (e) => {
|
|
424
424
|
if (typeof e != "string")
|
|
425
425
|
return;
|
|
426
|
-
const t =
|
|
426
|
+
const t = Ft(e), n = t ? Dt(t, !0) : void 0;
|
|
427
427
|
let r, o = 0, i = q.length;
|
|
428
428
|
for (; o < i; )
|
|
429
429
|
if ((r = q[o++](e, n)) !== void 0)
|
|
430
430
|
return r;
|
|
431
|
-
return t ?
|
|
431
|
+
return t ? Lt(t) : void 0;
|
|
432
432
|
};
|
|
433
|
-
function
|
|
433
|
+
function Kt(e, t) {
|
|
434
434
|
if (!t || t[0] !== "rgb" && t[0] !== "rgba")
|
|
435
435
|
return;
|
|
436
436
|
const n = { mode: "rgb" }, [, r, o, i, a] = t;
|
|
@@ -443,31 +443,31 @@ function Dt(e, t) {
|
|
|
443
443
|
)
|
|
444
444
|
)), n;
|
|
445
445
|
}
|
|
446
|
-
const
|
|
446
|
+
const Bt = (e) => e === "transparent" ? { mode: "rgb", r: 0, g: 0, b: 0, alpha: 0 } : void 0, Gt = (e, t, n) => e + n * (t - e), qt = (e) => {
|
|
447
447
|
let t = [];
|
|
448
448
|
for (let n = 0; n < e.length - 1; n++) {
|
|
449
449
|
let r = e[n], o = e[n + 1];
|
|
450
450
|
r === void 0 && o === void 0 ? t.push(void 0) : r !== void 0 && o !== void 0 ? t.push([r, o]) : t.push(r !== void 0 ? [r, r] : [o, o]);
|
|
451
451
|
}
|
|
452
452
|
return t;
|
|
453
|
-
},
|
|
454
|
-
let n =
|
|
453
|
+
}, Wt = (e) => (t) => {
|
|
454
|
+
let n = qt(t);
|
|
455
455
|
return (r) => {
|
|
456
456
|
let o = r * n.length, i = r >= 1 ? n.length - 1 : Math.max(Math.floor(o), 0), a = n[i];
|
|
457
457
|
return a === void 0 ? void 0 : e(a[0], a[1], o - i);
|
|
458
458
|
};
|
|
459
|
-
}, y =
|
|
459
|
+
}, y = Wt(Gt), Se = (e) => {
|
|
460
460
|
let t = !1, n = e.map((r) => r !== void 0 ? (t = !0, r) : 1);
|
|
461
461
|
return t ? n : e;
|
|
462
|
-
},
|
|
462
|
+
}, Jt = {
|
|
463
463
|
mode: "rgb",
|
|
464
464
|
channels: ["r", "g", "b", "alpha"],
|
|
465
465
|
parse: [
|
|
466
|
-
Dt,
|
|
467
|
-
Ct,
|
|
468
|
-
_t,
|
|
469
|
-
Ot,
|
|
470
466
|
Kt,
|
|
467
|
+
At,
|
|
468
|
+
Ht,
|
|
469
|
+
Ct,
|
|
470
|
+
Bt,
|
|
471
471
|
"srgb"
|
|
472
472
|
],
|
|
473
473
|
serialize: "srgb",
|
|
@@ -475,7 +475,7 @@ const Kt = (e) => e === "transparent" ? { mode: "rgb", r: 0, g: 0, b: 0, alpha:
|
|
|
475
475
|
r: y,
|
|
476
476
|
g: y,
|
|
477
477
|
b: y,
|
|
478
|
-
alpha: { use: y, fixup:
|
|
478
|
+
alpha: { use: y, fixup: Se }
|
|
479
479
|
},
|
|
480
480
|
gamut: !0,
|
|
481
481
|
white: { r: 1, g: 1, b: 1 },
|
|
@@ -483,7 +483,7 @@ const Kt = (e) => e === "transparent" ? { mode: "rgb", r: 0, g: 0, b: 0, alpha:
|
|
|
483
483
|
}, ne = (e = 0) => {
|
|
484
484
|
const t = Math.abs(e);
|
|
485
485
|
return t <= 0.04045 ? e / 12.92 : (Math.sign(e) || 1) * Math.pow((t + 0.055) / 1.055, 2.4);
|
|
486
|
-
},
|
|
486
|
+
}, Ke = ({ r: e, g: t, b: n, alpha: r }) => {
|
|
487
487
|
let o = {
|
|
488
488
|
mode: "lrgb",
|
|
489
489
|
r: ne(e),
|
|
@@ -494,7 +494,7 @@ const Kt = (e) => e === "transparent" ? { mode: "rgb", r: 0, g: 0, b: 0, alpha:
|
|
|
494
494
|
}, re = (e = 0) => {
|
|
495
495
|
const t = Math.abs(e);
|
|
496
496
|
return t > 31308e-7 ? (Math.sign(e) || 1) * (1.055 * Math.pow(t, 1 / 2.4) - 0.055) : e * 12.92;
|
|
497
|
-
},
|
|
497
|
+
}, Be = ({ r: e, g: t, b: n, alpha: r }, o = "rgb") => {
|
|
498
498
|
let i = {
|
|
499
499
|
mode: o,
|
|
500
500
|
r: re(e),
|
|
@@ -502,22 +502,22 @@ const Kt = (e) => e === "transparent" ? { mode: "rgb", r: 0, g: 0, b: 0, alpha:
|
|
|
502
502
|
b: re(n)
|
|
503
503
|
};
|
|
504
504
|
return r !== void 0 && (i.alpha = r), i;
|
|
505
|
-
}, $ = (e) => (e = e % 360) < 0 ? e + 360 : e,
|
|
505
|
+
}, $ = (e) => (e = e % 360) < 0 ? e + 360 : e, Xt = (e, t) => e.map((n, r, o) => {
|
|
506
506
|
if (n === void 0)
|
|
507
507
|
return n;
|
|
508
508
|
let i = $(n);
|
|
509
509
|
return r === 0 || e[r - 1] === void 0 ? i : t(i - $(o[r - 1]));
|
|
510
|
-
}).reduce((n, r) => !n.length || r === void 0 || n[n.length - 1] === void 0 ? (n.push(r), n) : (n.push(r + n[n.length - 1]), n), []),
|
|
510
|
+
}).reduce((n, r) => !n.length || r === void 0 || n[n.length - 1] === void 0 ? (n.push(r), n) : (n.push(r + n[n.length - 1]), n), []), Ge = (e) => Xt(e, (t) => Math.abs(t) <= 180 ? t : t - 360 * Math.sign(t)), Yt = (e, t) => {
|
|
511
511
|
if (e.h === void 0 || t.h === void 0 || !e.s || !t.s)
|
|
512
512
|
return 0;
|
|
513
513
|
let n = $(e.h), r = $(t.h), o = Math.sin((r - n + 360) / 2 * Math.PI / 180);
|
|
514
514
|
return 2 * Math.sqrt(e.s * t.s) * o;
|
|
515
|
-
},
|
|
515
|
+
}, Ut = (e, t) => {
|
|
516
516
|
if (e.h === void 0 || t.h === void 0 || !e.c || !t.c)
|
|
517
517
|
return 0;
|
|
518
518
|
let n = $(e.h), r = $(t.h), o = Math.sin((r - n + 360) / 2 * Math.PI / 180);
|
|
519
519
|
return 2 * Math.sqrt(e.c * t.c) * o;
|
|
520
|
-
},
|
|
520
|
+
}, qe = (e) => {
|
|
521
521
|
let t = e.reduce(
|
|
522
522
|
(r, o) => {
|
|
523
523
|
if (o !== void 0) {
|
|
@@ -542,12 +542,12 @@ const Kt = (e) => e === "transparent" ? { mode: "rgb", r: 0, g: 0, b: 0, alpha:
|
|
|
542
542
|
b: t ? t * Math.sin(n / 180 * Math.PI) : 0
|
|
543
543
|
};
|
|
544
544
|
return r !== void 0 && (i.alpha = r), i;
|
|
545
|
-
},
|
|
545
|
+
}, C = {
|
|
546
546
|
X: 0.3457 / 0.3585,
|
|
547
547
|
Y: 1,
|
|
548
548
|
Z: (1 - 0.3457 - 0.3585) / 0.3585
|
|
549
549
|
};
|
|
550
|
-
function
|
|
550
|
+
function Zt({ h: e, s: t, l: n, alpha: r }) {
|
|
551
551
|
e = $(e !== void 0 ? e : 0), t === void 0 && (t = 0), n === void 0 && (n = 0);
|
|
552
552
|
let o = n + t * (n < 0.5 ? n : 1 - n), i = o - (o - n) * 2 * Math.abs(e / 60 % 2 - 1), a;
|
|
553
553
|
switch (Math.floor(e / 60)) {
|
|
@@ -574,7 +574,7 @@ function Ut({ h: e, s: t, l: n, alpha: r }) {
|
|
|
574
574
|
}
|
|
575
575
|
return a.mode = "rgb", r !== void 0 && (a.alpha = r), a;
|
|
576
576
|
}
|
|
577
|
-
function
|
|
577
|
+
function Qt({ r: e, g: t, b: n, alpha: r }) {
|
|
578
578
|
e === void 0 && (e = 0), t === void 0 && (t = 0), n === void 0 && (n = 0);
|
|
579
579
|
let o = Math.max(e, t, n), i = Math.min(e, t, n), a = {
|
|
580
580
|
mode: "hsl",
|
|
@@ -583,7 +583,7 @@ function Zt({ r: e, g: t, b: n, alpha: r }) {
|
|
|
583
583
|
};
|
|
584
584
|
return o - i !== 0 && (a.h = (o === e ? (t - n) / (o - i) + (t < n) * 6 : o === t ? (n - e) / (o - i) + 2 : (e - t) / (o - i) + 4) * 60), r !== void 0 && (a.alpha = r), a;
|
|
585
585
|
}
|
|
586
|
-
const
|
|
586
|
+
const en = (e, t) => {
|
|
587
587
|
switch (t) {
|
|
588
588
|
case "deg":
|
|
589
589
|
return +e;
|
|
@@ -594,15 +594,15 @@ const Qt = (e, t) => {
|
|
|
594
594
|
case "turn":
|
|
595
595
|
return e * 360;
|
|
596
596
|
}
|
|
597
|
-
},
|
|
598
|
-
`^hsla?\\(\\s*${
|
|
599
|
-
),
|
|
600
|
-
let t = e.match(
|
|
597
|
+
}, tn = new RegExp(
|
|
598
|
+
`^hsla?\\(\\s*${Ot}${I}${H}${I}${H}\\s*(?:,\\s*${ke}\\s*)?\\)$`
|
|
599
|
+
), nn = (e) => {
|
|
600
|
+
let t = e.match(tn);
|
|
601
601
|
if (!t) return;
|
|
602
602
|
let n = { mode: "hsl" };
|
|
603
|
-
return t[3] !== void 0 ? n.h = +t[3] : t[1] !== void 0 && t[2] !== void 0 && (n.h =
|
|
603
|
+
return t[3] !== void 0 ? n.h = +t[3] : t[1] !== void 0 && t[2] !== void 0 && (n.h = en(t[1], t[2])), t[4] !== void 0 && (n.s = Math.min(Math.max(0, t[4] / 100), 1)), t[5] !== void 0 && (n.l = Math.min(Math.max(0, t[5] / 100), 1)), t[6] !== void 0 ? n.alpha = Math.max(0, Math.min(1, t[6] / 100)) : t[7] !== void 0 && (n.alpha = Math.max(0, Math.min(1, +t[7]))), n;
|
|
604
604
|
};
|
|
605
|
-
function
|
|
605
|
+
function rn(e, t) {
|
|
606
606
|
if (!t || t[0] !== "hsl" && t[0] !== "hsla")
|
|
607
607
|
return;
|
|
608
608
|
const n = { mode: "hsl" }, [, r, o, i, a] = t;
|
|
@@ -629,74 +629,74 @@ function nn(e, t) {
|
|
|
629
629
|
)
|
|
630
630
|
)), n;
|
|
631
631
|
}
|
|
632
|
-
const
|
|
632
|
+
const on = {
|
|
633
633
|
mode: "hsl",
|
|
634
634
|
toMode: {
|
|
635
|
-
rgb:
|
|
635
|
+
rgb: Zt
|
|
636
636
|
},
|
|
637
637
|
fromMode: {
|
|
638
|
-
rgb:
|
|
638
|
+
rgb: Qt
|
|
639
639
|
},
|
|
640
640
|
channels: ["h", "s", "l", "alpha"],
|
|
641
641
|
ranges: {
|
|
642
642
|
h: [0, 360]
|
|
643
643
|
},
|
|
644
644
|
gamut: "rgb",
|
|
645
|
-
parse: [
|
|
645
|
+
parse: [rn, nn],
|
|
646
646
|
serialize: (e) => `hsl(${e.h !== void 0 ? e.h : "none"} ${e.s !== void 0 ? e.s * 100 + "%" : "none"} ${e.l !== void 0 ? e.l * 100 + "%" : "none"}${e.alpha < 1 ? ` / ${e.alpha}` : ""})`,
|
|
647
647
|
interpolate: {
|
|
648
|
-
h: { use: y, fixup:
|
|
648
|
+
h: { use: y, fixup: Ge },
|
|
649
649
|
s: y,
|
|
650
650
|
l: y,
|
|
651
|
-
alpha: { use: y, fixup:
|
|
651
|
+
alpha: { use: y, fixup: Se }
|
|
652
652
|
},
|
|
653
653
|
difference: {
|
|
654
|
-
h:
|
|
654
|
+
h: Yt
|
|
655
655
|
},
|
|
656
656
|
average: {
|
|
657
|
-
h:
|
|
657
|
+
h: qe
|
|
658
658
|
}
|
|
659
|
-
},
|
|
660
|
-
let oe = (e) => Math.pow(e, 3) >
|
|
661
|
-
const
|
|
659
|
+
}, We = Math.pow(29, 3) / Math.pow(3, 3), Je = Math.pow(6, 3) / Math.pow(29, 3);
|
|
660
|
+
let oe = (e) => Math.pow(e, 3) > Je ? Math.pow(e, 3) : (116 * e - 16) / We;
|
|
661
|
+
const an = ({ l: e, a: t, b: n, alpha: r }) => {
|
|
662
662
|
e === void 0 && (e = 0), t === void 0 && (t = 0), n === void 0 && (n = 0);
|
|
663
663
|
let o = (e + 16) / 116, i = t / 500 + o, a = o - n / 200, s = {
|
|
664
664
|
mode: "xyz50",
|
|
665
|
-
x: oe(i) *
|
|
666
|
-
y: oe(o) *
|
|
667
|
-
z: oe(a) *
|
|
665
|
+
x: oe(i) * C.X,
|
|
666
|
+
y: oe(o) * C.Y,
|
|
667
|
+
z: oe(a) * C.Z
|
|
668
668
|
};
|
|
669
669
|
return r !== void 0 && (s.alpha = r), s;
|
|
670
|
-
},
|
|
670
|
+
}, sn = ({ x: e, y: t, z: n, alpha: r }) => {
|
|
671
671
|
e === void 0 && (e = 0), t === void 0 && (t = 0), n === void 0 && (n = 0);
|
|
672
|
-
let o =
|
|
672
|
+
let o = Be({
|
|
673
673
|
r: e * 3.1341359569958707 - t * 1.6173863321612538 - 0.4906619460083532 * n,
|
|
674
674
|
g: e * -0.978795502912089 + t * 1.916254567259524 + 0.03344273116131949 * n,
|
|
675
675
|
b: e * 0.07195537988411677 - t * 0.2289768264158322 + 1.405386058324125 * n
|
|
676
676
|
});
|
|
677
677
|
return r !== void 0 && (o.alpha = r), o;
|
|
678
|
-
},
|
|
679
|
-
let { r: t, g: n, b: r, alpha: o } =
|
|
678
|
+
}, fn = (e) => sn(an(e)), ln = (e) => {
|
|
679
|
+
let { r: t, g: n, b: r, alpha: o } = Ke(e), i = {
|
|
680
680
|
mode: "xyz50",
|
|
681
681
|
x: 0.436065742824811 * t + 0.3851514688337912 * n + 0.14307845442264197 * r,
|
|
682
682
|
y: 0.22249319175623702 * t + 0.7168870538238823 * n + 0.06061979053616537 * r,
|
|
683
683
|
z: 0.013923904500943465 * t + 0.09708128566574634 * n + 0.7140993584005155 * r
|
|
684
684
|
};
|
|
685
685
|
return o !== void 0 && (i.alpha = o), i;
|
|
686
|
-
}, ie = (e) => e >
|
|
686
|
+
}, ie = (e) => e > Je ? Math.cbrt(e) : (We * e + 16) / 116, un = ({ x: e, y: t, z: n, alpha: r }) => {
|
|
687
687
|
e === void 0 && (e = 0), t === void 0 && (t = 0), n === void 0 && (n = 0);
|
|
688
|
-
let o = ie(e /
|
|
688
|
+
let o = ie(e / C.X), i = ie(t / C.Y), a = ie(n / C.Z), s = {
|
|
689
689
|
mode: "lab",
|
|
690
690
|
l: 116 * i - 16,
|
|
691
691
|
a: 500 * (o - i),
|
|
692
692
|
b: 200 * (i - a)
|
|
693
693
|
};
|
|
694
694
|
return r !== void 0 && (s.alpha = r), s;
|
|
695
|
-
},
|
|
696
|
-
let t = ln(
|
|
695
|
+
}, cn = (e) => {
|
|
696
|
+
let t = un(ln(e));
|
|
697
697
|
return e.r === e.b && e.b === e.g && (t.a = t.b = 0), t;
|
|
698
698
|
};
|
|
699
|
-
function
|
|
699
|
+
function dn(e, t) {
|
|
700
700
|
if (!t || t[0] !== "lch")
|
|
701
701
|
return;
|
|
702
702
|
const n = { mode: "lch" }, [, r, o, i, a] = t;
|
|
@@ -721,14 +721,14 @@ function cn(e, t) {
|
|
|
721
721
|
)
|
|
722
722
|
)), n;
|
|
723
723
|
}
|
|
724
|
-
const
|
|
724
|
+
const hn = {
|
|
725
725
|
mode: "lch",
|
|
726
726
|
toMode: {
|
|
727
727
|
lab: X,
|
|
728
|
-
rgb: (e) =>
|
|
728
|
+
rgb: (e) => fn(X(e))
|
|
729
729
|
},
|
|
730
730
|
fromMode: {
|
|
731
|
-
rgb: (e) => J(
|
|
731
|
+
rgb: (e) => J(cn(e)),
|
|
732
732
|
lab: J
|
|
733
733
|
},
|
|
734
734
|
channels: ["l", "c", "h", "alpha"],
|
|
@@ -737,21 +737,21 @@ const dn = {
|
|
|
737
737
|
c: [0, 150],
|
|
738
738
|
h: [0, 360]
|
|
739
739
|
},
|
|
740
|
-
parse: [
|
|
740
|
+
parse: [dn],
|
|
741
741
|
serialize: (e) => `lch(${e.l !== void 0 ? e.l : "none"} ${e.c !== void 0 ? e.c : "none"} ${e.h !== void 0 ? e.h : "none"}${e.alpha < 1 ? ` / ${e.alpha}` : ""})`,
|
|
742
742
|
interpolate: {
|
|
743
|
-
h: { use: y, fixup:
|
|
743
|
+
h: { use: y, fixup: Ge },
|
|
744
744
|
c: y,
|
|
745
745
|
l: y,
|
|
746
|
-
alpha: { use: y, fixup:
|
|
746
|
+
alpha: { use: y, fixup: Se }
|
|
747
747
|
},
|
|
748
748
|
difference: {
|
|
749
|
-
h:
|
|
749
|
+
h: Ut
|
|
750
750
|
},
|
|
751
751
|
average: {
|
|
752
|
-
h:
|
|
752
|
+
h: qe
|
|
753
753
|
}
|
|
754
|
-
},
|
|
754
|
+
}, pn = ({ r: e, g: t, b: n, alpha: r }) => {
|
|
755
755
|
e === void 0 && (e = 0), t === void 0 && (t = 0), n === void 0 && (n = 0);
|
|
756
756
|
let o = Math.cbrt(
|
|
757
757
|
0.412221469470763 * e + 0.5363325372617348 * t + 0.0514459932675022 * n
|
|
@@ -766,10 +766,10 @@ const dn = {
|
|
|
766
766
|
b: 0.0259040424655478 * o + 0.7827717124575296 * i - 0.8086757549230774 * a
|
|
767
767
|
};
|
|
768
768
|
return r !== void 0 && (s.alpha = r), s;
|
|
769
|
-
},
|
|
770
|
-
let t =
|
|
769
|
+
}, gn = (e) => {
|
|
770
|
+
let t = pn(Ke(e));
|
|
771
771
|
return e.r === e.b && e.b === e.g && (t.a = t.b = 0), t;
|
|
772
|
-
},
|
|
772
|
+
}, mn = ({ l: e, a: t, b: n, alpha: r }) => {
|
|
773
773
|
e === void 0 && (e = 0), t === void 0 && (t = 0), n === void 0 && (n = 0);
|
|
774
774
|
let o = Math.pow(e + 0.3963377773761749 * t + 0.2158037573099136 * n, 3), i = Math.pow(e - 0.1055613458156586 * t - 0.0638541728258133 * n, 3), a = Math.pow(e - 0.0894841775298119 * t - 1.2914855480194092 * n, 3), s = {
|
|
775
775
|
mode: "lrgb",
|
|
@@ -778,8 +778,8 @@ const dn = {
|
|
|
778
778
|
b: -0.0041960761386756 * o - 0.7034186179359362 * i + 1.7076146940746117 * a
|
|
779
779
|
};
|
|
780
780
|
return r !== void 0 && (s.alpha = r), s;
|
|
781
|
-
},
|
|
782
|
-
function
|
|
781
|
+
}, yn = (e) => Be(mn(e));
|
|
782
|
+
function bn(e, t) {
|
|
783
783
|
if (!t || t[0] !== "oklch")
|
|
784
784
|
return;
|
|
785
785
|
const n = { mode: "oklch" }, [, r, o, i, a] = t;
|
|
@@ -807,35 +807,35 @@ function yn(e, t) {
|
|
|
807
807
|
)
|
|
808
808
|
)), n;
|
|
809
809
|
}
|
|
810
|
-
const
|
|
811
|
-
...
|
|
810
|
+
const xn = {
|
|
811
|
+
...hn,
|
|
812
812
|
mode: "oklch",
|
|
813
813
|
toMode: {
|
|
814
814
|
oklab: (e) => X(e, "oklab"),
|
|
815
|
-
rgb: (e) =>
|
|
815
|
+
rgb: (e) => yn(X(e, "oklab"))
|
|
816
816
|
},
|
|
817
817
|
fromMode: {
|
|
818
|
-
rgb: (e) => J(
|
|
818
|
+
rgb: (e) => J(gn(e), "oklch"),
|
|
819
819
|
oklab: (e) => J(e, "oklch")
|
|
820
820
|
},
|
|
821
|
-
parse: [
|
|
821
|
+
parse: [bn],
|
|
822
822
|
serialize: (e) => `oklch(${e.l !== void 0 ? e.l : "none"} ${e.c !== void 0 ? e.c : "none"} ${e.h !== void 0 ? e.h : "none"}${e.alpha < 1 ? ` / ${e.alpha}` : ""})`,
|
|
823
823
|
ranges: {
|
|
824
824
|
l: [0, 1],
|
|
825
825
|
c: [0, 0.4],
|
|
826
826
|
h: [0, 360]
|
|
827
827
|
}
|
|
828
|
-
},
|
|
828
|
+
}, Mn = (e) => Math.max(0, Math.min(1, e || 0)), D = (e) => Math.round(Mn(e) * 255), Xe = x("rgb"), Ye = (e) => {
|
|
829
829
|
if (e === void 0)
|
|
830
830
|
return;
|
|
831
831
|
let t = D(e.r), n = D(e.g), r = D(e.b);
|
|
832
832
|
return "#" + (1 << 24 | t << 16 | n << 8 | r).toString(16).slice(1);
|
|
833
|
-
},
|
|
833
|
+
}, kn = (e) => {
|
|
834
834
|
if (e === void 0)
|
|
835
835
|
return;
|
|
836
836
|
let t = D(e.alpha !== void 0 ? e.alpha : 1);
|
|
837
|
-
return
|
|
838
|
-
},
|
|
837
|
+
return Ye(e) + (256 | t).toString(16).slice(1);
|
|
838
|
+
}, vn = (e) => Ye(Xe(e)), Sn = (e) => kn(Xe(e)), Ue = x("rgb"), Ze = (e) => {
|
|
839
839
|
const t = {
|
|
840
840
|
mode: e.mode,
|
|
841
841
|
r: Math.max(0, Math.min(e.r !== void 0 ? e.r : 0, 1)),
|
|
@@ -843,22 +843,22 @@ const bn = {
|
|
|
843
843
|
b: Math.max(0, Math.min(e.b !== void 0 ? e.b : 0, 1))
|
|
844
844
|
};
|
|
845
845
|
return e.alpha !== void 0 && (t.alpha = e.alpha), t;
|
|
846
|
-
},
|
|
847
|
-
function
|
|
848
|
-
return
|
|
846
|
+
}, wn = (e) => Ze(Ue(e)), Qe = (e) => e !== void 0 && (e.r === void 0 || e.r >= 0 && e.r <= 1) && (e.g === void 0 || e.g >= 0 && e.g <= 1) && (e.b === void 0 || e.b >= 0 && e.b <= 1);
|
|
847
|
+
function $n(e) {
|
|
848
|
+
return Qe(Ue(e));
|
|
849
849
|
}
|
|
850
|
-
function
|
|
850
|
+
function we(e = "rgb") {
|
|
851
851
|
const { gamut: t } = Q(e);
|
|
852
852
|
if (!t)
|
|
853
853
|
return (r) => !0;
|
|
854
854
|
const n = x(typeof t == "string" ? t : e);
|
|
855
|
-
return (r) =>
|
|
855
|
+
return (r) => Qe(n(r));
|
|
856
856
|
}
|
|
857
|
-
function
|
|
857
|
+
function Nn(e = "rgb") {
|
|
858
858
|
const { gamut: t } = Q(e);
|
|
859
859
|
if (!t)
|
|
860
860
|
return (i) => G(i);
|
|
861
|
-
const n = typeof t == "string" ? t : e, r = x(n), o =
|
|
861
|
+
const n = typeof t == "string" ? t : e, r = x(n), o = we(n);
|
|
862
862
|
return (i) => {
|
|
863
863
|
const a = G(i);
|
|
864
864
|
if (!a)
|
|
@@ -866,13 +866,13 @@ function $n(e = "rgb") {
|
|
|
866
866
|
const s = r(a);
|
|
867
867
|
if (o(s))
|
|
868
868
|
return a;
|
|
869
|
-
const f =
|
|
869
|
+
const f = Ze(s);
|
|
870
870
|
return a.mode === f.mode ? f : x(a.mode)(f);
|
|
871
871
|
};
|
|
872
872
|
}
|
|
873
|
-
function
|
|
873
|
+
function Tn(e, t = "lch", n = "rgb") {
|
|
874
874
|
e = G(e);
|
|
875
|
-
let r = n === "rgb" ?
|
|
875
|
+
let r = n === "rgb" ? $n : we(n), o = n === "rgb" ? wn : Nn(n);
|
|
876
876
|
if (e === void 0 || r(e)) return e;
|
|
877
877
|
let i = x(e.mode);
|
|
878
878
|
e = x(t)(e);
|
|
@@ -886,10 +886,10 @@ function Nn(e, t = "lch", n = "rgb") {
|
|
|
886
886
|
r(a) ? a : { ...a, c: h }
|
|
887
887
|
);
|
|
888
888
|
}
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
const
|
|
889
|
+
ve(xn);
|
|
890
|
+
ve(Jt);
|
|
891
|
+
ve(on);
|
|
892
|
+
const cr = 0.37, et = x("oklch"), tt = x("rgb"), Cn = x("hsl"), In = we("rgb");
|
|
893
893
|
function ee(e) {
|
|
894
894
|
return {
|
|
895
895
|
mode: "oklch",
|
|
@@ -899,7 +899,7 @@ function ee(e) {
|
|
|
899
899
|
alpha: e.a / 100
|
|
900
900
|
};
|
|
901
901
|
}
|
|
902
|
-
function
|
|
902
|
+
function An(e) {
|
|
903
903
|
return {
|
|
904
904
|
l: (e.l ?? 0) * 100,
|
|
905
905
|
c: e.c ?? 0,
|
|
@@ -907,19 +907,19 @@ function Cn(e) {
|
|
|
907
907
|
a: (e.alpha ?? 1) * 100
|
|
908
908
|
};
|
|
909
909
|
}
|
|
910
|
-
function
|
|
910
|
+
function dr(e) {
|
|
911
911
|
const t = (e.l / 100).toFixed(4), n = e.c.toFixed(4), r = e.h.toFixed(2);
|
|
912
912
|
if (e.a >= 100)
|
|
913
913
|
return `oklch(${t} ${n} ${r})`;
|
|
914
914
|
const o = (e.a / 100).toFixed(4);
|
|
915
915
|
return `oklch(${t} ${n} ${r} / ${o})`;
|
|
916
916
|
}
|
|
917
|
-
function
|
|
917
|
+
function hr(e) {
|
|
918
918
|
const t = { l: 0, c: 0, h: 0, a: 100 };
|
|
919
919
|
try {
|
|
920
|
-
const n =
|
|
920
|
+
const n = De(e);
|
|
921
921
|
if (!n) return t;
|
|
922
|
-
const r =
|
|
922
|
+
const r = et(n);
|
|
923
923
|
if (!r) return t;
|
|
924
924
|
const o = r.alpha === void 0 ? 1 : r.alpha;
|
|
925
925
|
return {
|
|
@@ -932,12 +932,12 @@ function lr(e) {
|
|
|
932
932
|
return t;
|
|
933
933
|
}
|
|
934
934
|
}
|
|
935
|
-
function
|
|
936
|
-
const n = ee(e), r =
|
|
937
|
-
return r ? e.a < 100 ?
|
|
935
|
+
function pr(e, t) {
|
|
936
|
+
const n = ee(e), r = tt(n);
|
|
937
|
+
return r ? e.a < 100 ? Sn({ ...r, alpha: e.a / 100 }) ?? "#000000ff" : vn(r) ?? "#000000" : "#000000";
|
|
938
938
|
}
|
|
939
|
-
function
|
|
940
|
-
const t = ee(e), n =
|
|
939
|
+
function gr(e) {
|
|
940
|
+
const t = ee(e), n = Cn(t);
|
|
941
941
|
return n ? {
|
|
942
942
|
h: n.h ?? 0,
|
|
943
943
|
s: (n.s ?? 0) * 100,
|
|
@@ -945,18 +945,18 @@ function cr(e) {
|
|
|
945
945
|
a: e.a
|
|
946
946
|
} : { h: 0, s: 0, l: 0, a: e.a };
|
|
947
947
|
}
|
|
948
|
-
function
|
|
948
|
+
function mr(e) {
|
|
949
949
|
const t = {
|
|
950
950
|
mode: "hsl",
|
|
951
951
|
h: e.h,
|
|
952
952
|
s: e.s / 100,
|
|
953
953
|
l: e.l / 100,
|
|
954
954
|
alpha: e.a / 100
|
|
955
|
-
}, n =
|
|
956
|
-
return n ?
|
|
955
|
+
}, n = et(t);
|
|
956
|
+
return n ? An(n) : { l: 0, c: 0, h: 0, a: e.a };
|
|
957
957
|
}
|
|
958
|
-
function
|
|
959
|
-
const t = ee(e), n =
|
|
958
|
+
function yr(e) {
|
|
959
|
+
const t = ee(e), n = Tn(t, "oklch", "rgb");
|
|
960
960
|
return n ? {
|
|
961
961
|
l: (n.l ?? e.l / 100) * 100,
|
|
962
962
|
c: n.c ?? 0,
|
|
@@ -964,11 +964,11 @@ function hr(e) {
|
|
|
964
964
|
a: e.a
|
|
965
965
|
} : { l: e.l, c: 0, h: e.h, a: e.a };
|
|
966
966
|
}
|
|
967
|
-
function
|
|
968
|
-
const t =
|
|
969
|
-
return t ?
|
|
967
|
+
function br(e) {
|
|
968
|
+
const t = tt(ee(e));
|
|
969
|
+
return t ? In(t) : !1;
|
|
970
970
|
}
|
|
971
|
-
function
|
|
971
|
+
function On(e, t) {
|
|
972
972
|
const n = parseFloat(e);
|
|
973
973
|
let r;
|
|
974
974
|
switch (t.toLowerCase()) {
|
|
@@ -995,10 +995,10 @@ function ue(e) {
|
|
|
995
995
|
if (s.length !== 3) return null;
|
|
996
996
|
const f = (m) => {
|
|
997
997
|
if (m.toLowerCase() === "none") return { value: 0, isPercent: !1 };
|
|
998
|
-
const
|
|
999
|
-
if (!
|
|
1000
|
-
const j = parseFloat(
|
|
1001
|
-
return isNaN(j) ? null : { value: j, isPercent:
|
|
998
|
+
const O = m.match(/^([+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?)(%?)$/i);
|
|
999
|
+
if (!O) return null;
|
|
1000
|
+
const j = parseFloat(O[1]);
|
|
1001
|
+
return isNaN(j) ? null : { value: j, isPercent: O[2] === "%" };
|
|
1002
1002
|
}, u = f(s[0]);
|
|
1003
1003
|
if (!u) return null;
|
|
1004
1004
|
const d = u.isPercent ? u.value : u.value * 100, h = f(s[1]);
|
|
@@ -1010,147 +1010,169 @@ function ue(e) {
|
|
|
1010
1010
|
else {
|
|
1011
1011
|
const m = k.match(/^([+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?)(deg|rad|grad|turn)?$/i);
|
|
1012
1012
|
if (!m) return null;
|
|
1013
|
-
const
|
|
1014
|
-
v =
|
|
1013
|
+
const O = m[1], j = m[2] ?? "deg";
|
|
1014
|
+
v = On(O, j);
|
|
1015
1015
|
}
|
|
1016
|
-
let
|
|
1016
|
+
let A = 100;
|
|
1017
1017
|
if (a !== null) {
|
|
1018
1018
|
const m = f(a.trim());
|
|
1019
1019
|
if (!m) return null;
|
|
1020
|
-
|
|
1020
|
+
A = m.isPercent ? m.value : m.value * 100;
|
|
1021
1021
|
}
|
|
1022
1022
|
return {
|
|
1023
1023
|
l: d,
|
|
1024
1024
|
c: p,
|
|
1025
1025
|
h: v,
|
|
1026
|
-
a:
|
|
1026
|
+
a: A
|
|
1027
1027
|
};
|
|
1028
1028
|
}
|
|
1029
|
-
function tt(e = g()) {
|
|
1030
|
-
return St(e);
|
|
1031
|
-
}
|
|
1032
1029
|
function nt(e = g()) {
|
|
1033
|
-
return
|
|
1030
|
+
return wt(e);
|
|
1034
1031
|
}
|
|
1035
1032
|
function rt(e = g()) {
|
|
1036
|
-
return yt(e);
|
|
1037
|
-
}
|
|
1038
|
-
function R(e = g()) {
|
|
1039
|
-
return mt(e);
|
|
1040
|
-
}
|
|
1041
|
-
function gr(e = g()) {
|
|
1042
1033
|
return xt(e);
|
|
1043
1034
|
}
|
|
1044
1035
|
function ot(e = g()) {
|
|
1045
|
-
return
|
|
1036
|
+
return bt(e);
|
|
1046
1037
|
}
|
|
1047
|
-
function
|
|
1038
|
+
function R(e = g()) {
|
|
1039
|
+
return yt(e);
|
|
1040
|
+
}
|
|
1041
|
+
function xr(e = g()) {
|
|
1048
1042
|
return Mt(e);
|
|
1049
1043
|
}
|
|
1050
|
-
function
|
|
1044
|
+
function it(e = g()) {
|
|
1051
1045
|
return vt(e);
|
|
1052
1046
|
}
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1047
|
+
function at(e = g()) {
|
|
1048
|
+
return kt(e);
|
|
1049
|
+
}
|
|
1050
|
+
function st(e = g()) {
|
|
1051
|
+
return St(e);
|
|
1052
|
+
}
|
|
1053
|
+
const Pn = { top: 60, left: 20 };
|
|
1054
|
+
function _n(e = 0, t) {
|
|
1055
|
+
const { top: n, left: r } = ft(e, t);
|
|
1057
1056
|
return { top: n, left: r };
|
|
1058
1057
|
}
|
|
1059
|
-
function
|
|
1058
|
+
function Mr(e, t = 0, n) {
|
|
1060
1059
|
try {
|
|
1061
|
-
const
|
|
1062
|
-
if (
|
|
1063
|
-
const
|
|
1064
|
-
if (typeof
|
|
1065
|
-
return
|
|
1060
|
+
const r = localStorage.getItem(it(e));
|
|
1061
|
+
if (r) {
|
|
1062
|
+
const o = JSON.parse(r);
|
|
1063
|
+
if (typeof o.top == "number" && typeof o.left == "number" && Number.isFinite(o.top) && Number.isFinite(o.left))
|
|
1064
|
+
return o;
|
|
1066
1065
|
}
|
|
1067
1066
|
} catch {
|
|
1068
1067
|
}
|
|
1069
|
-
return
|
|
1068
|
+
return _n(t, n);
|
|
1070
1069
|
}
|
|
1071
|
-
function
|
|
1070
|
+
function kr(e, t) {
|
|
1072
1071
|
try {
|
|
1073
|
-
localStorage.setItem(
|
|
1072
|
+
localStorage.setItem(it(t), JSON.stringify(e));
|
|
1074
1073
|
} catch {
|
|
1075
1074
|
}
|
|
1076
1075
|
}
|
|
1077
|
-
const ae = 60,
|
|
1078
|
-
function
|
|
1079
|
-
|
|
1076
|
+
const ae = 60, Pe = 320, _e = 240, ce = 1600, de = 1200, Hn = { width: 1024 * 0.8, height: 768 * 0.8 };
|
|
1077
|
+
function En() {
|
|
1078
|
+
const { width: e, height: t } = ft();
|
|
1079
|
+
return { width: e, height: t };
|
|
1080
|
+
}
|
|
1081
|
+
const He = 32;
|
|
1082
|
+
function he(e, t) {
|
|
1083
|
+
const n = typeof window < "u" ? window.innerWidth : ce, r = typeof window < "u" ? window.innerHeight : de, o = Math.max(Pe, Math.min(ce, n - He)), i = Math.max(_e, Math.min(de, r - He));
|
|
1084
|
+
return {
|
|
1085
|
+
width: Math.max(Pe, Math.min(e, o)),
|
|
1086
|
+
height: Math.max(_e, Math.min(t, i))
|
|
1087
|
+
};
|
|
1088
|
+
}
|
|
1089
|
+
const Vn = 24;
|
|
1090
|
+
function Rn(e) {
|
|
1091
|
+
return Number.isFinite(e) ? Math.max(0, Math.floor(e)) : 0;
|
|
1092
|
+
}
|
|
1093
|
+
function ft(e = 0, t) {
|
|
1094
|
+
if (typeof window > "u")
|
|
1095
|
+
return { ...Pn, ...t ?? Hn };
|
|
1096
|
+
const { width: n, height: r } = t ? he(t.width, t.height) : he(
|
|
1080
1097
|
Math.min(1200, 0.8 * window.innerWidth),
|
|
1081
1098
|
Math.min(800, 0.8 * window.innerHeight)
|
|
1099
|
+
), o = Math.max(0, Math.round((window.innerHeight - r) / 2)), i = Math.max(0, Math.round((window.innerWidth - n) / 2)), a = Vn * Rn(e), { top: s, left: f } = jn(
|
|
1100
|
+
o + a,
|
|
1101
|
+
i + a,
|
|
1102
|
+
n,
|
|
1103
|
+
r
|
|
1082
1104
|
);
|
|
1105
|
+
return { top: s, left: f, width: n, height: r };
|
|
1083
1106
|
}
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
const n = typeof window < "u" ? window.innerWidth : Ae, r = typeof window < "u" ? window.innerHeight : Pe, o = Math.max(Ce, Math.min(Ae, n - _e)), i = Math.max(Ie, Math.min(Pe, r - _e));
|
|
1107
|
+
function jn(e, t, n, r) {
|
|
1108
|
+
const o = typeof window < "u" ? window.innerWidth : ce, i = typeof window < "u" ? window.innerHeight : de;
|
|
1087
1109
|
return {
|
|
1088
|
-
|
|
1089
|
-
|
|
1110
|
+
top: Math.min(Math.max(0, e), Math.max(0, i - r)),
|
|
1111
|
+
left: Math.min(Math.max(0, t), Math.max(0, o - n))
|
|
1090
1112
|
};
|
|
1091
1113
|
}
|
|
1092
|
-
function
|
|
1114
|
+
function vr(e) {
|
|
1093
1115
|
try {
|
|
1094
|
-
const t = localStorage.getItem(
|
|
1116
|
+
const t = localStorage.getItem(at(e));
|
|
1095
1117
|
if (t) {
|
|
1096
1118
|
const n = JSON.parse(t);
|
|
1097
1119
|
if (typeof n.width == "number" && typeof n.height == "number" && Number.isFinite(n.width) && Number.isFinite(n.height))
|
|
1098
|
-
return
|
|
1120
|
+
return he(n.width, n.height);
|
|
1099
1121
|
}
|
|
1100
1122
|
} catch {
|
|
1101
1123
|
}
|
|
1102
|
-
return
|
|
1124
|
+
return En();
|
|
1103
1125
|
}
|
|
1104
|
-
function
|
|
1126
|
+
function Sr(e, t) {
|
|
1105
1127
|
try {
|
|
1106
|
-
localStorage.setItem(
|
|
1128
|
+
localStorage.setItem(at(t), JSON.stringify(e));
|
|
1107
1129
|
} catch {
|
|
1108
1130
|
}
|
|
1109
1131
|
}
|
|
1110
|
-
const
|
|
1111
|
-
function
|
|
1132
|
+
const zn = 1;
|
|
1133
|
+
function wr(e) {
|
|
1112
1134
|
return e === 0 ? "192px" : e === 2 ? "100%" : "288px";
|
|
1113
1135
|
}
|
|
1114
|
-
function
|
|
1136
|
+
function $r(e) {
|
|
1115
1137
|
try {
|
|
1116
|
-
const t = localStorage.getItem(
|
|
1138
|
+
const t = localStorage.getItem(st(e));
|
|
1117
1139
|
if (t === "0" || t === "1" || t === "2")
|
|
1118
1140
|
return Number(t);
|
|
1119
1141
|
} catch {
|
|
1120
1142
|
}
|
|
1121
|
-
return
|
|
1143
|
+
return zn;
|
|
1122
1144
|
}
|
|
1123
|
-
function
|
|
1145
|
+
function Nr(e, t) {
|
|
1124
1146
|
try {
|
|
1125
|
-
localStorage.setItem(
|
|
1147
|
+
localStorage.setItem(st(t), String(e));
|
|
1126
1148
|
} catch {
|
|
1127
1149
|
}
|
|
1128
1150
|
}
|
|
1129
|
-
function
|
|
1151
|
+
function Tr(e, t, n, r) {
|
|
1130
1152
|
const o = -(n - ae), i = window.innerWidth - ae, a = -30, s = window.innerHeight - ae, f = Math.max(s, a), u = Math.max(i, o);
|
|
1131
1153
|
return {
|
|
1132
1154
|
top: Math.max(a, Math.min(e, f)),
|
|
1133
1155
|
left: Math.max(o, Math.min(t, u))
|
|
1134
1156
|
};
|
|
1135
1157
|
}
|
|
1136
|
-
async function
|
|
1158
|
+
async function Cr(e) {
|
|
1137
1159
|
}
|
|
1138
|
-
function
|
|
1160
|
+
function Fn(e) {
|
|
1139
1161
|
return typeof e == "number" || e === "bg" || e === "fg";
|
|
1140
1162
|
}
|
|
1141
|
-
function
|
|
1163
|
+
function pe(e) {
|
|
1142
1164
|
return typeof e == "object" && e !== null && "literal" in e;
|
|
1143
1165
|
}
|
|
1144
|
-
function
|
|
1145
|
-
return
|
|
1166
|
+
function ge(e) {
|
|
1167
|
+
return pe(e) && typeof e.literal == "object" && e.literal !== null;
|
|
1146
1168
|
}
|
|
1147
|
-
function
|
|
1169
|
+
function Ln(e) {
|
|
1148
1170
|
return typeof e == "object" && e !== null && "ref" in e;
|
|
1149
1171
|
}
|
|
1150
1172
|
function se() {
|
|
1151
1173
|
return {};
|
|
1152
1174
|
}
|
|
1153
|
-
const
|
|
1175
|
+
const Dn = {
|
|
1154
1176
|
id: "stub",
|
|
1155
1177
|
label: "STUB",
|
|
1156
1178
|
paletteSize: 0,
|
|
@@ -1164,7 +1186,7 @@ const jn = {
|
|
|
1164
1186
|
panelSettings: { colorScheme: "", colorMode: !1 }
|
|
1165
1187
|
};
|
|
1166
1188
|
function b(e = g()) {
|
|
1167
|
-
return
|
|
1189
|
+
return mt(e.tabs) ?? Dn;
|
|
1168
1190
|
}
|
|
1169
1191
|
function te(e) {
|
|
1170
1192
|
const t = e.paletteSize;
|
|
@@ -1183,11 +1205,11 @@ function te(e) {
|
|
|
1183
1205
|
shikiTheme: e.defaultShikiTheme
|
|
1184
1206
|
};
|
|
1185
1207
|
}
|
|
1186
|
-
function
|
|
1208
|
+
function Ir(e) {
|
|
1187
1209
|
const t = Z(e);
|
|
1188
1210
|
return t ? te(t) : void 0;
|
|
1189
1211
|
}
|
|
1190
|
-
function
|
|
1212
|
+
function Kn() {
|
|
1191
1213
|
try {
|
|
1192
1214
|
const e = document.createElement("canvas").getContext("2d");
|
|
1193
1215
|
return e ? (e.fillStyle = "#ffffff", e.fillStyle === "#ffffff") : !1;
|
|
@@ -1195,8 +1217,8 @@ function zn() {
|
|
|
1195
1217
|
return !1;
|
|
1196
1218
|
}
|
|
1197
1219
|
}
|
|
1198
|
-
const
|
|
1199
|
-
function
|
|
1220
|
+
const Bn = Kn();
|
|
1221
|
+
function Gn(e) {
|
|
1200
1222
|
const t = e.match(/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)(?:\s*,\s*([\d.]+))?/);
|
|
1201
1223
|
if (!t) return null;
|
|
1202
1224
|
const n = parseInt(t[1], 10), r = parseInt(t[2], 10), o = parseInt(t[3], 10), i = `#${(1 << 24 | n << 16 | r << 8 | o).toString(16).slice(1)}`;
|
|
@@ -1209,12 +1231,12 @@ function Ln(e) {
|
|
|
1209
1231
|
}
|
|
1210
1232
|
return i;
|
|
1211
1233
|
}
|
|
1212
|
-
function
|
|
1234
|
+
function qn(e, t, n, r) {
|
|
1213
1235
|
const o = (a) => a.toString(16).padStart(2, "0"), i = `#${o(e)}${o(t)}${o(n)}`;
|
|
1214
1236
|
return r < 255 ? `${i}${o(r)}` : i;
|
|
1215
1237
|
}
|
|
1216
1238
|
let S = null;
|
|
1217
|
-
function
|
|
1239
|
+
function me(e) {
|
|
1218
1240
|
if (!e || e === "initial" || e === "inherit") return "#000000";
|
|
1219
1241
|
const t = e.trim();
|
|
1220
1242
|
if (/^#[0-9a-fA-F]{6}$/.test(t) || /^#[0-9a-fA-F]{8}$/.test(t)) return t;
|
|
@@ -1222,14 +1244,14 @@ function he(e) {
|
|
|
1222
1244
|
return `#${t[1]}${t[1]}${t[2]}${t[2]}${t[3]}${t[3]}`;
|
|
1223
1245
|
if (/^#[0-9a-fA-F]{4}$/.test(t))
|
|
1224
1246
|
return `#${t[1]}${t[1]}${t[2]}${t[2]}${t[3]}${t[3]}${t[4]}${t[4]}`;
|
|
1225
|
-
const n =
|
|
1247
|
+
const n = Gn(t);
|
|
1226
1248
|
if (n) return n;
|
|
1227
|
-
if (!
|
|
1249
|
+
if (!Bn) return "#000000";
|
|
1228
1250
|
try {
|
|
1229
1251
|
if (S || (S = document.createElement("canvas").getContext("2d")), !S) return "#000000";
|
|
1230
1252
|
S.fillStyle = "#000000", S.fillStyle = t, S.clearRect(0, 0, 1, 1), S.fillRect(0, 0, 1, 1);
|
|
1231
1253
|
const [r, o, i, a] = S.getImageData(0, 0, 1, 1).data;
|
|
1232
|
-
return
|
|
1254
|
+
return qn(r, o, i, a);
|
|
1233
1255
|
} catch {
|
|
1234
1256
|
return "#000000";
|
|
1235
1257
|
}
|
|
@@ -1237,11 +1259,11 @@ function he(e) {
|
|
|
1237
1259
|
function _(e, t) {
|
|
1238
1260
|
document.documentElement.style.setProperty(e, t);
|
|
1239
1261
|
}
|
|
1240
|
-
function
|
|
1262
|
+
function Wn(e, t) {
|
|
1241
1263
|
let n = Math.abs(e.h - t.h) % 360;
|
|
1242
1264
|
return n > 180 && (n = 360 - n), Math.abs(e.l - t.l) <= 1e-3 && Math.abs(e.c - t.c) <= 1e-5 && n <= 1e-3 && Math.abs(e.a - t.a) <= 1e-3;
|
|
1243
1265
|
}
|
|
1244
|
-
function
|
|
1266
|
+
function T(e, t, n) {
|
|
1245
1267
|
if (e === void 0) return n;
|
|
1246
1268
|
if (typeof e == "number") return e;
|
|
1247
1269
|
const r = t.indexOf(e);
|
|
@@ -1250,19 +1272,19 @@ function O(e, t, n) {
|
|
|
1250
1272
|
if (o)
|
|
1251
1273
|
for (let h = 0; h < t.length; h++) {
|
|
1252
1274
|
const p = ue(t[h]);
|
|
1253
|
-
if (p &&
|
|
1275
|
+
if (p && Wn(o, p)) return h;
|
|
1254
1276
|
}
|
|
1255
|
-
const i =
|
|
1277
|
+
const i = me(e), a = t.map((h) => me(h)), s = a.indexOf(i);
|
|
1256
1278
|
if (s >= 0) return s;
|
|
1257
|
-
const f =
|
|
1279
|
+
const f = Ee(i);
|
|
1258
1280
|
let u = n, d = 1 / 0;
|
|
1259
1281
|
for (let h = 0; h < a.length; h++) {
|
|
1260
|
-
const p =
|
|
1282
|
+
const p = Ee(a[h]), k = (f.r - p.r) ** 2 + (f.g - p.g) ** 2 + (f.b - p.b) ** 2;
|
|
1261
1283
|
k < d && (d = k, u = h);
|
|
1262
1284
|
}
|
|
1263
1285
|
return u;
|
|
1264
1286
|
}
|
|
1265
|
-
function
|
|
1287
|
+
function Ee(e) {
|
|
1266
1288
|
const t = e.replace("#", "");
|
|
1267
1289
|
return {
|
|
1268
1290
|
r: parseInt(t.substring(0, 2), 16) || 0,
|
|
@@ -1271,7 +1293,7 @@ function He(e) {
|
|
|
1271
1293
|
aa: t.length >= 8 ? parseInt(t.substring(6, 8), 16) || 0 : 255
|
|
1272
1294
|
};
|
|
1273
1295
|
}
|
|
1274
|
-
function
|
|
1296
|
+
function lt(e = b(), t) {
|
|
1275
1297
|
const n = e.panelSettings, r = t !== void 0 && t.applySink !== void 0;
|
|
1276
1298
|
if (n.colorMode && !r) {
|
|
1277
1299
|
const o = document.documentElement.getAttribute("data-theme");
|
|
@@ -1280,25 +1302,25 @@ function ft(e = b(), t) {
|
|
|
1280
1302
|
}
|
|
1281
1303
|
return n.colorScheme;
|
|
1282
1304
|
}
|
|
1283
|
-
function
|
|
1305
|
+
function Jn(e = b(), t) {
|
|
1284
1306
|
const n = e.colorSchemes;
|
|
1285
1307
|
if (Object.keys(n).length === 0)
|
|
1286
1308
|
return te(e);
|
|
1287
|
-
const r =
|
|
1288
|
-
return
|
|
1309
|
+
const r = lt(e, t), o = n[r] ?? Object.values(n)[0];
|
|
1310
|
+
return Yn(o, e);
|
|
1289
1311
|
}
|
|
1290
|
-
function
|
|
1291
|
-
return
|
|
1312
|
+
function $e(e = b(), t) {
|
|
1313
|
+
return lt(e, t);
|
|
1292
1314
|
}
|
|
1293
|
-
function
|
|
1294
|
-
return ue(e) ? e :
|
|
1315
|
+
function Xn(e) {
|
|
1316
|
+
return ue(e) ? e : me(e);
|
|
1295
1317
|
}
|
|
1296
|
-
function
|
|
1318
|
+
function Yn(e, t = b()) {
|
|
1297
1319
|
if (t.paletteSize === 0)
|
|
1298
1320
|
return console.warn(
|
|
1299
1321
|
`[tweak] Scheme/preset load ignored for palette-less cluster "${t.id}" (paletteSize: 0) — schemes cannot seed a tier with no palette.`
|
|
1300
1322
|
), te(t);
|
|
1301
|
-
const n = e.palette.map(
|
|
1323
|
+
const n = e.palette.map(Xn), r = {};
|
|
1302
1324
|
for (const [o, i] of Object.entries(t.semanticDefaults)) {
|
|
1303
1325
|
const a = e.semantic?.[o];
|
|
1304
1326
|
if (a === void 0)
|
|
@@ -1307,28 +1329,28 @@ function qn(e, t = b()) {
|
|
|
1307
1329
|
r[o] = a;
|
|
1308
1330
|
else {
|
|
1309
1331
|
const s = typeof i == "number" ? i : 0;
|
|
1310
|
-
r[o] =
|
|
1332
|
+
r[o] = T(a, e.palette, s);
|
|
1311
1333
|
}
|
|
1312
1334
|
}
|
|
1313
1335
|
return {
|
|
1314
1336
|
palette: n,
|
|
1315
|
-
background:
|
|
1337
|
+
background: T(
|
|
1316
1338
|
e.background,
|
|
1317
1339
|
e.palette,
|
|
1318
1340
|
t.baseDefaults.background ?? 0
|
|
1319
1341
|
),
|
|
1320
|
-
foreground:
|
|
1342
|
+
foreground: T(
|
|
1321
1343
|
e.foreground,
|
|
1322
1344
|
e.palette,
|
|
1323
1345
|
t.baseDefaults.foreground ?? 0
|
|
1324
1346
|
),
|
|
1325
|
-
cursor:
|
|
1326
|
-
selectionBg:
|
|
1347
|
+
cursor: T(e.cursor, e.palette, t.baseDefaults.cursor ?? 0),
|
|
1348
|
+
selectionBg: T(
|
|
1327
1349
|
e.selectionBg,
|
|
1328
1350
|
e.palette,
|
|
1329
1351
|
t.baseDefaults.selectionBg ?? 0
|
|
1330
1352
|
),
|
|
1331
|
-
selectionFg:
|
|
1353
|
+
selectionFg: T(
|
|
1332
1354
|
e.selectionFg,
|
|
1333
1355
|
e.palette,
|
|
1334
1356
|
t.baseDefaults.selectionFg ?? 0
|
|
@@ -1337,49 +1359,49 @@ function qn(e, t = b()) {
|
|
|
1337
1359
|
shikiTheme: String(e.shikiTheme ?? t.defaultShikiTheme)
|
|
1338
1360
|
};
|
|
1339
1361
|
}
|
|
1340
|
-
function
|
|
1362
|
+
function Un(e, t, n, r) {
|
|
1341
1363
|
const o = t.length;
|
|
1342
|
-
return e === "bg" ? t[
|
|
1364
|
+
return e === "bg" ? t[E(n, o)] ?? "#000000" : e === "fg" ? t[E(r, o)] ?? "#ffffff" : t[E(e, o)] ?? "#000000";
|
|
1343
1365
|
}
|
|
1344
|
-
function
|
|
1366
|
+
function E(e, t) {
|
|
1345
1367
|
return e >= 0 && e < t ? e : 0;
|
|
1346
1368
|
}
|
|
1347
|
-
function
|
|
1348
|
-
if (
|
|
1349
|
-
if (
|
|
1369
|
+
function ye(e, t, n, r, o, i, a) {
|
|
1370
|
+
if (Fn(e)) return Un(e, t, n, r);
|
|
1371
|
+
if (pe(e) && ge(e))
|
|
1350
1372
|
return a ? e.literal[a] : `light-dark(${e.literal.light}, ${e.literal.dark})`;
|
|
1351
|
-
if (
|
|
1352
|
-
if (
|
|
1373
|
+
if (pe(e) && !ge(e)) return e.literal;
|
|
1374
|
+
if (Ln(e) && o)
|
|
1353
1375
|
try {
|
|
1354
|
-
return `var(${
|
|
1376
|
+
return `var(${Nt(e.ref, o, i ?? [o])})`;
|
|
1355
1377
|
} catch {
|
|
1356
1378
|
return null;
|
|
1357
1379
|
}
|
|
1358
1380
|
return null;
|
|
1359
1381
|
}
|
|
1360
|
-
function
|
|
1382
|
+
function Zn(e) {
|
|
1361
1383
|
const t = e.panelSettings.colorMode;
|
|
1362
1384
|
return t ? t.defaultMode : "light";
|
|
1363
1385
|
}
|
|
1364
|
-
function
|
|
1386
|
+
function Ar(e, t) {
|
|
1365
1387
|
return e.literal[t];
|
|
1366
1388
|
}
|
|
1367
1389
|
function Or(e, t, n = b(), r, o) {
|
|
1368
|
-
return
|
|
1390
|
+
return ye(
|
|
1369
1391
|
e,
|
|
1370
1392
|
t.palette,
|
|
1371
1393
|
t.background,
|
|
1372
1394
|
t.foreground,
|
|
1373
1395
|
r,
|
|
1374
1396
|
o,
|
|
1375
|
-
|
|
1397
|
+
Zn(n)
|
|
1376
1398
|
) ?? "#000000";
|
|
1377
1399
|
}
|
|
1378
|
-
const N = "color-scheme",
|
|
1400
|
+
const N = "color-scheme", be = "light dark";
|
|
1379
1401
|
function Y(e, t) {
|
|
1380
1402
|
for (const n of Object.keys(t.semanticCssNames)) {
|
|
1381
1403
|
const r = e.semanticMappings[n] ?? t.semanticDefaults[n];
|
|
1382
|
-
if (r !== void 0 &&
|
|
1404
|
+
if (r !== void 0 && ge(r)) return !0;
|
|
1383
1405
|
}
|
|
1384
1406
|
return !1;
|
|
1385
1407
|
}
|
|
@@ -1392,10 +1414,10 @@ function Ve(e, t = b(), n, r, o, i) {
|
|
|
1392
1414
|
for (const [f, u] of Object.entries(t.baseRoles)) {
|
|
1393
1415
|
if (typeof u != "string" || u.length === 0) continue;
|
|
1394
1416
|
const d = e[f];
|
|
1395
|
-
typeof d == "number" && s.push([u, e.palette[
|
|
1417
|
+
typeof d == "number" && s.push([u, e.palette[E(d, a)]]);
|
|
1396
1418
|
}
|
|
1397
1419
|
for (const [f, u] of Object.entries(t.semanticCssNames)) {
|
|
1398
|
-
const d = e.semanticMappings[f] ?? t.semanticDefaults[f], h =
|
|
1420
|
+
const d = e.semanticMappings[f] ?? t.semanticDefaults[f], h = ye(
|
|
1399
1421
|
d,
|
|
1400
1422
|
e.palette,
|
|
1401
1423
|
e.background,
|
|
@@ -1405,7 +1427,7 @@ function Ve(e, t = b(), n, r, o, i) {
|
|
|
1405
1427
|
);
|
|
1406
1428
|
h !== null && s.push([u, h]);
|
|
1407
1429
|
}
|
|
1408
|
-
Y(e, t) && (s.push([N,
|
|
1430
|
+
Y(e, t) && (s.push([N, be]), i && Oe(i));
|
|
1409
1431
|
try {
|
|
1410
1432
|
n.apply(s);
|
|
1411
1433
|
} catch (f) {
|
|
@@ -1418,10 +1440,10 @@ function Ve(e, t = b(), n, r, o, i) {
|
|
|
1418
1440
|
for (const [s, f] of Object.entries(t.baseRoles)) {
|
|
1419
1441
|
if (typeof f != "string" || f.length === 0) continue;
|
|
1420
1442
|
const u = e[s];
|
|
1421
|
-
typeof u == "number" && _(f, e.palette[
|
|
1443
|
+
typeof u == "number" && _(f, e.palette[E(u, a)]);
|
|
1422
1444
|
}
|
|
1423
1445
|
for (const [s, f] of Object.entries(t.semanticCssNames)) {
|
|
1424
|
-
const u = e.semanticMappings[s] ?? t.semanticDefaults[s], d =
|
|
1446
|
+
const u = e.semanticMappings[s] ?? t.semanticDefaults[s], d = ye(
|
|
1425
1447
|
u,
|
|
1426
1448
|
e.palette,
|
|
1427
1449
|
e.background,
|
|
@@ -1431,9 +1453,9 @@ function Ve(e, t = b(), n, r, o, i) {
|
|
|
1431
1453
|
);
|
|
1432
1454
|
d !== null && _(f, d);
|
|
1433
1455
|
}
|
|
1434
|
-
Y(e, t) && (_(N,
|
|
1456
|
+
Y(e, t) && (_(N, be), i && Oe(i));
|
|
1435
1457
|
}
|
|
1436
|
-
function
|
|
1458
|
+
function Qn(e, t, n) {
|
|
1437
1459
|
const r = n ?? g(), o = r.applySink, i = r.tabs.find((u) => u.id === "color"), a = b(r);
|
|
1438
1460
|
Ve(e, a, o, i, r.tabs, r.storagePrefix);
|
|
1439
1461
|
const s = Z(r);
|
|
@@ -1458,13 +1480,13 @@ function Xn(e, t, n) {
|
|
|
1458
1480
|
}
|
|
1459
1481
|
U(r.storagePrefix);
|
|
1460
1482
|
} else
|
|
1461
|
-
|
|
1483
|
+
dt(r.storagePrefix);
|
|
1462
1484
|
}
|
|
1463
|
-
function
|
|
1485
|
+
function Pr(e, t) {
|
|
1464
1486
|
const n = t ?? g();
|
|
1465
|
-
|
|
1487
|
+
Qn(e.color, e.secondary, n), er(e, n);
|
|
1466
1488
|
}
|
|
1467
|
-
function
|
|
1489
|
+
function er(e, t) {
|
|
1468
1490
|
const n = t ?? g(), r = n.applySink;
|
|
1469
1491
|
if (L(n.tabs, "spacing", e.spacing, r), L(n.tabs, "font", e.typography, r), L(n.tabs, "size", e.size, r), e.tabs)
|
|
1470
1492
|
for (const [o, i] of Object.entries(e.tabs)) {
|
|
@@ -1493,7 +1515,7 @@ function L(e, t, n, r) {
|
|
|
1493
1515
|
for (const d of u.items)
|
|
1494
1516
|
if (!d.readonly)
|
|
1495
1517
|
try {
|
|
1496
|
-
const h =
|
|
1518
|
+
const h = Ie(o, u.id, d.id, i), p = Ae(h);
|
|
1497
1519
|
typeof n[d.id] == "string" && n[d.id].length > 0 || u.referencesTier !== void 0 ? s.push([d.cssVar, p]) : f.push(d.cssVar);
|
|
1498
1520
|
} catch {
|
|
1499
1521
|
f.push(d.cssVar);
|
|
@@ -1517,17 +1539,17 @@ function L(e, t, n, r) {
|
|
|
1517
1539
|
for (const f of s.items)
|
|
1518
1540
|
if (!f.readonly)
|
|
1519
1541
|
try {
|
|
1520
|
-
const u =
|
|
1542
|
+
const u = Ie(o, s.id, f.id, i), d = Ae(u);
|
|
1521
1543
|
typeof n[f.id] == "string" && n[f.id].length > 0 || s.referencesTier !== void 0 ? _(f.cssVar, d) : a.style.removeProperty(f.cssVar);
|
|
1522
1544
|
} catch {
|
|
1523
1545
|
a.style.removeProperty(f.cssVar);
|
|
1524
1546
|
}
|
|
1525
1547
|
}
|
|
1526
|
-
function
|
|
1548
|
+
function ut(e) {
|
|
1527
1549
|
const t = e ?? g(), n = b(t), r = Z(t);
|
|
1528
1550
|
return r ? [n, r] : [n];
|
|
1529
1551
|
}
|
|
1530
|
-
function
|
|
1552
|
+
function ct(e) {
|
|
1531
1553
|
const t = [];
|
|
1532
1554
|
for (let n = 0; n < e.paletteSize; n++)
|
|
1533
1555
|
t.push(B(e, n));
|
|
@@ -1537,7 +1559,7 @@ function ut(e) {
|
|
|
1537
1559
|
t.push(n);
|
|
1538
1560
|
return t;
|
|
1539
1561
|
}
|
|
1540
|
-
function
|
|
1562
|
+
function tr(e) {
|
|
1541
1563
|
const t = [];
|
|
1542
1564
|
for (const n of e.tabs)
|
|
1543
1565
|
if (!(n.id === "color" || n.id === "color-secondary"))
|
|
@@ -1546,20 +1568,20 @@ function Un(e) {
|
|
|
1546
1568
|
o.readonly || t.push(o.cssVar);
|
|
1547
1569
|
return t;
|
|
1548
1570
|
}
|
|
1549
|
-
function
|
|
1550
|
-
if (
|
|
1571
|
+
function dt(e) {
|
|
1572
|
+
if (!$t(e)) return;
|
|
1551
1573
|
const t = document.documentElement;
|
|
1552
|
-
t.style.getPropertyValue(N) ===
|
|
1574
|
+
t.style.getPropertyValue(N) === be && t.style.removeProperty(N), U(e);
|
|
1553
1575
|
}
|
|
1554
|
-
function
|
|
1555
|
-
const r = e ??
|
|
1556
|
-
return
|
|
1576
|
+
function nr(e, t, n) {
|
|
1577
|
+
const r = e ?? ut(n), o = n?.applySink, i = (n ?? g()).storagePrefix;
|
|
1578
|
+
return rr(r, o, i);
|
|
1557
1579
|
}
|
|
1558
|
-
function
|
|
1580
|
+
function rr(e, t, n) {
|
|
1559
1581
|
if (t) {
|
|
1560
1582
|
const o = [];
|
|
1561
1583
|
for (const i of e)
|
|
1562
|
-
o.push(...
|
|
1584
|
+
o.push(...ct(i));
|
|
1563
1585
|
if (e.length > 0 && o.push(N), o.length > 0)
|
|
1564
1586
|
try {
|
|
1565
1587
|
t.clear(o);
|
|
@@ -1578,15 +1600,15 @@ function Qn(e, t, n) {
|
|
|
1578
1600
|
for (const i of Object.values(o.semanticCssNames))
|
|
1579
1601
|
r.style.removeProperty(i);
|
|
1580
1602
|
}
|
|
1581
|
-
e.length > 0 && n &&
|
|
1603
|
+
e.length > 0 && n && dt(n);
|
|
1582
1604
|
}
|
|
1583
|
-
function
|
|
1584
|
-
const n = t ?? g(), r = n.applySink, o =
|
|
1605
|
+
function _r(e, t) {
|
|
1606
|
+
const n = t ?? g(), r = n.applySink, o = ut(n);
|
|
1585
1607
|
if (r) {
|
|
1586
1608
|
const a = [];
|
|
1587
1609
|
for (const s of o)
|
|
1588
|
-
a.push(...
|
|
1589
|
-
if (o.length > 0 && a.push(N), a.push(...
|
|
1610
|
+
a.push(...ct(s));
|
|
1611
|
+
if (o.length > 0 && a.push(N), a.push(...tr(n)), a.length > 0)
|
|
1590
1612
|
try {
|
|
1591
1613
|
r.clear(a);
|
|
1592
1614
|
} catch (s) {
|
|
@@ -1595,7 +1617,7 @@ function Cr(e, t) {
|
|
|
1595
1617
|
o.length > 0 && U(n.storagePrefix);
|
|
1596
1618
|
return;
|
|
1597
1619
|
}
|
|
1598
|
-
|
|
1620
|
+
nr(o, void 0, n);
|
|
1599
1621
|
const i = document.documentElement;
|
|
1600
1622
|
for (const a of n.tabs)
|
|
1601
1623
|
if (!(a.id === "color" || a.id === "color-secondary"))
|
|
@@ -1603,12 +1625,12 @@ function Cr(e, t) {
|
|
|
1603
1625
|
for (const f of s.items)
|
|
1604
1626
|
f.readonly || i.style.removeProperty(f.cssVar);
|
|
1605
1627
|
}
|
|
1606
|
-
function
|
|
1628
|
+
function ht(e, t) {
|
|
1607
1629
|
if (!e || typeof e != "object") return !1;
|
|
1608
1630
|
const n = e;
|
|
1609
1631
|
return Array.isArray(n.palette) && n.palette.length === t && typeof n.background == "number" && typeof n.foreground == "number" && typeof n.cursor == "number" && typeof n.selectionBg == "number" && typeof n.selectionFg == "number" && typeof n.semanticMappings == "object" && n.semanticMappings !== null;
|
|
1610
1632
|
}
|
|
1611
|
-
function
|
|
1633
|
+
function or(e, t) {
|
|
1612
1634
|
if (typeof e == "number")
|
|
1613
1635
|
return Number.isInteger(e) && e >= 0 && e < t ? e : void 0;
|
|
1614
1636
|
if (e === "bg" || e === "fg") return e;
|
|
@@ -1640,16 +1662,16 @@ function er(e, t) {
|
|
|
1640
1662
|
return;
|
|
1641
1663
|
}
|
|
1642
1664
|
}
|
|
1643
|
-
function
|
|
1665
|
+
function ir(e, t, n) {
|
|
1644
1666
|
if (!e || typeof e != "object" || Array.isArray(e)) return { ...t };
|
|
1645
1667
|
const r = { ...t };
|
|
1646
1668
|
for (const [o, i] of Object.entries(e)) {
|
|
1647
|
-
const a =
|
|
1669
|
+
const a = or(i, n);
|
|
1648
1670
|
a !== void 0 && (r[o] = a);
|
|
1649
1671
|
}
|
|
1650
1672
|
return r;
|
|
1651
1673
|
}
|
|
1652
|
-
function
|
|
1674
|
+
function xe(e, t, n) {
|
|
1653
1675
|
const r = Array.isArray(e.palette) ? e.palette : null;
|
|
1654
1676
|
let o;
|
|
1655
1677
|
return r && r.length === t.palette.length && r.every((i) => typeof i == "string") ? o = r : (r && r.some((i) => typeof i != "string") && console.error(
|
|
@@ -1661,7 +1683,7 @@ function me(e, t, n) {
|
|
|
1661
1683
|
cursor: typeof e.cursor == "number" ? e.cursor : t.cursor,
|
|
1662
1684
|
selectionBg: typeof e.selectionBg == "number" ? e.selectionBg : t.selectionBg,
|
|
1663
1685
|
selectionFg: typeof e.selectionFg == "number" ? e.selectionFg : t.selectionFg,
|
|
1664
|
-
semanticMappings:
|
|
1686
|
+
semanticMappings: ir(
|
|
1665
1687
|
e.semanticMappings,
|
|
1666
1688
|
t.semanticMappings,
|
|
1667
1689
|
n
|
|
@@ -1669,7 +1691,7 @@ function me(e, t, n) {
|
|
|
1669
1691
|
shikiTheme: typeof e.shikiTheme == "string" && e.shikiTheme.length > 0 ? e.shikiTheme : t.shikiTheme
|
|
1670
1692
|
};
|
|
1671
1693
|
}
|
|
1672
|
-
const
|
|
1694
|
+
const Hr = {
|
|
1673
1695
|
"text-caption": "text-xs",
|
|
1674
1696
|
"text-small": "text-sm",
|
|
1675
1697
|
"text-body": "text-base",
|
|
@@ -1679,14 +1701,14 @@ const Ir = {
|
|
|
1679
1701
|
// Dropped — no main-site equivalent. `null` signals "discard".
|
|
1680
1702
|
"text-micro": null
|
|
1681
1703
|
};
|
|
1682
|
-
function
|
|
1704
|
+
function Re(e) {
|
|
1683
1705
|
if (!e || typeof e != "object") return {};
|
|
1684
1706
|
const t = {};
|
|
1685
1707
|
for (const [n, r] of Object.entries(e))
|
|
1686
1708
|
typeof r == "string" && (t[n] = r);
|
|
1687
1709
|
return t;
|
|
1688
1710
|
}
|
|
1689
|
-
function
|
|
1711
|
+
function ar(e, t = {}) {
|
|
1690
1712
|
if (!e || typeof e != "object") return {};
|
|
1691
1713
|
const n = {};
|
|
1692
1714
|
for (const [r, o] of Object.entries(e))
|
|
@@ -1699,7 +1721,7 @@ function nr(e, t = {}) {
|
|
|
1699
1721
|
n[r] = o;
|
|
1700
1722
|
return n;
|
|
1701
1723
|
}
|
|
1702
|
-
function
|
|
1724
|
+
function sr(e) {
|
|
1703
1725
|
if (!e || typeof e != "object" || Array.isArray(e)) return {};
|
|
1704
1726
|
const t = {};
|
|
1705
1727
|
for (const [n, r] of Object.entries(e)) {
|
|
@@ -1716,35 +1738,35 @@ function rr(e) {
|
|
|
1716
1738
|
}
|
|
1717
1739
|
return t;
|
|
1718
1740
|
}
|
|
1719
|
-
function
|
|
1741
|
+
function Me(e, t, n, r = g()) {
|
|
1720
1742
|
if (!e.color || typeof e.color != "object") return null;
|
|
1721
|
-
const o = n ??
|
|
1722
|
-
color:
|
|
1743
|
+
const o = n ?? Ce(t, r), i = e.typography !== void 0 ? e.typography : e.font, a = r.legacyIdRenameMap ?? {}, s = {
|
|
1744
|
+
color: xe(e.color, o, t.paletteSize),
|
|
1723
1745
|
// New sections added after v1 migration — tolerate their absence so
|
|
1724
1746
|
// older v2 payloads (Color-only) still load cleanly.
|
|
1725
|
-
spacing:
|
|
1747
|
+
spacing: Re(e.spacing),
|
|
1726
1748
|
// Typography slice: apply the host-configured rename map (if any)
|
|
1727
1749
|
// so payloads persisted under the host's "old" ids survive a
|
|
1728
1750
|
// host-driven id rename without losing the user's tweaks.
|
|
1729
|
-
typography:
|
|
1730
|
-
size:
|
|
1751
|
+
typography: ar(i, a),
|
|
1752
|
+
size: Re(e.size)
|
|
1731
1753
|
}, f = Z(r);
|
|
1732
|
-
f && e.secondary &&
|
|
1754
|
+
f && e.secondary && ht(e.secondary, f.paletteSize) && (s.secondary = xe(
|
|
1733
1755
|
e.secondary,
|
|
1734
1756
|
te(f),
|
|
1735
1757
|
f.paletteSize
|
|
1736
1758
|
));
|
|
1737
|
-
const u =
|
|
1759
|
+
const u = sr(e.tabs);
|
|
1738
1760
|
return Object.keys(u).length > 0 && (s.tabs = u), s;
|
|
1739
1761
|
}
|
|
1740
|
-
function
|
|
1741
|
-
const o =
|
|
1762
|
+
function fr(e = localStorage, t, n = b(), r = g()) {
|
|
1763
|
+
const o = nt(r), i = rt(r), a = ot(r), s = V(e, a);
|
|
1742
1764
|
if (s !== null) {
|
|
1743
1765
|
const d = K(s);
|
|
1744
1766
|
if (d && typeof d == "object") {
|
|
1745
|
-
const h = d, p =
|
|
1767
|
+
const h = d, p = Me(h, n, t, r);
|
|
1746
1768
|
if (p !== null) {
|
|
1747
|
-
const k = h.typography !== void 0 ? h.typography : h.font, v = JSON.stringify(k ?? {}) !== JSON.stringify(p.typography),
|
|
1769
|
+
const k = h.typography !== void 0 ? h.typography : h.font, v = JSON.stringify(k ?? {}) !== JSON.stringify(p.typography), A = h.color, m = Array.isArray(A?.palette) && A.palette.length !== n.paletteSize;
|
|
1748
1770
|
if (v || h.typography === void 0 || m)
|
|
1749
1771
|
try {
|
|
1750
1772
|
e.setItem(a, JSON.stringify(p));
|
|
@@ -1755,11 +1777,11 @@ function or(e = localStorage, t, n = b(), r = g()) {
|
|
|
1755
1777
|
}
|
|
1756
1778
|
console.warn(`[tweak] Malformed ${a}, attempting v2 migration`);
|
|
1757
1779
|
}
|
|
1758
|
-
const f =
|
|
1780
|
+
const f = V(e, i);
|
|
1759
1781
|
if (f !== null) {
|
|
1760
1782
|
const d = K(f);
|
|
1761
1783
|
if (d && typeof d == "object") {
|
|
1762
|
-
const p =
|
|
1784
|
+
const p = Me(d, n, t, r);
|
|
1763
1785
|
if (p !== null) {
|
|
1764
1786
|
try {
|
|
1765
1787
|
e.setItem(a, JSON.stringify(p)), e.removeItem(i);
|
|
@@ -1770,14 +1792,14 @@ function or(e = localStorage, t, n = b(), r = g()) {
|
|
|
1770
1792
|
}
|
|
1771
1793
|
console.warn(`[tweak] Malformed ${i}, attempting v1 migration`);
|
|
1772
1794
|
}
|
|
1773
|
-
const u =
|
|
1795
|
+
const u = V(e, o);
|
|
1774
1796
|
if (u !== null) {
|
|
1775
1797
|
const d = K(u);
|
|
1776
|
-
if (d && typeof d == "object" &&
|
|
1777
|
-
const h = t ??
|
|
1798
|
+
if (d && typeof d == "object" && ht(d, n.paletteSize)) {
|
|
1799
|
+
const h = t ?? Ce(n, r), p = d;
|
|
1778
1800
|
p.shikiTheme || (p.shikiTheme = h.shikiTheme);
|
|
1779
1801
|
const v = {
|
|
1780
|
-
color:
|
|
1802
|
+
color: xe(p, h, n.paletteSize),
|
|
1781
1803
|
spacing: se(),
|
|
1782
1804
|
typography: se(),
|
|
1783
1805
|
size: se()
|
|
@@ -1796,24 +1818,24 @@ function or(e = localStorage, t, n = b(), r = g()) {
|
|
|
1796
1818
|
}
|
|
1797
1819
|
return null;
|
|
1798
1820
|
}
|
|
1799
|
-
function
|
|
1800
|
-
const n =
|
|
1821
|
+
function Ne(e, t) {
|
|
1822
|
+
const n = V(e, R(t));
|
|
1801
1823
|
if (n === null) return null;
|
|
1802
1824
|
const r = K(n);
|
|
1803
1825
|
if (!r || typeof r != "object" || Array.isArray(r)) return null;
|
|
1804
1826
|
const o = r, i = o.color;
|
|
1805
1827
|
return !i || typeof i != "object" || Array.isArray(i) || Array.isArray(i.palette) ? null : o;
|
|
1806
1828
|
}
|
|
1807
|
-
function
|
|
1829
|
+
function Te(e) {
|
|
1808
1830
|
const t = e?.color;
|
|
1809
1831
|
return t && typeof t == "object" && !Array.isArray(t) ? t : void 0;
|
|
1810
1832
|
}
|
|
1811
|
-
function
|
|
1833
|
+
function pt(e) {
|
|
1812
1834
|
const t = e?.secondary;
|
|
1813
1835
|
return t && typeof t == "object" && !Array.isArray(t) ? t : void 0;
|
|
1814
1836
|
}
|
|
1815
|
-
function
|
|
1816
|
-
const o =
|
|
1837
|
+
function lr(e, t, n, r) {
|
|
1838
|
+
const o = $e(t, r), i = Te(e)?.[o], a = i && typeof i == "object" && !Array.isArray(i) ? i : void 0, s = pt(e)?.[o], f = n ?? Ce(t, r), u = {
|
|
1817
1839
|
color: a ?? f,
|
|
1818
1840
|
secondary: s,
|
|
1819
1841
|
spacing: e.spacing,
|
|
@@ -1822,55 +1844,55 @@ function ir(e, t, n, r) {
|
|
|
1822
1844
|
size: e.size,
|
|
1823
1845
|
tabs: e.tabs
|
|
1824
1846
|
};
|
|
1825
|
-
return
|
|
1847
|
+
return Me(u, t, f, r);
|
|
1826
1848
|
}
|
|
1827
|
-
function
|
|
1828
|
-
const r =
|
|
1849
|
+
function Er(e = g(), t = b(e), n = localStorage) {
|
|
1850
|
+
const r = Ne(n, e);
|
|
1829
1851
|
if (!r) return !1;
|
|
1830
|
-
const o =
|
|
1852
|
+
const o = $e(t, e), i = Te(r)?.[o];
|
|
1831
1853
|
return !!i && typeof i == "object" && !Array.isArray(i);
|
|
1832
1854
|
}
|
|
1833
|
-
function
|
|
1834
|
-
const i =
|
|
1855
|
+
function gt(e, t, n, r, o) {
|
|
1856
|
+
const i = $e(r, o), s = {
|
|
1835
1857
|
color: {
|
|
1836
|
-
...
|
|
1858
|
+
...Te(t),
|
|
1837
1859
|
[i]: e.color
|
|
1838
1860
|
},
|
|
1839
1861
|
spacing: e.spacing,
|
|
1840
1862
|
typography: e.typography,
|
|
1841
1863
|
size: e.size
|
|
1842
|
-
}, f = { ...
|
|
1864
|
+
}, f = { ...pt(t) };
|
|
1843
1865
|
e.secondary !== void 0 ? f[i] = e.secondary : delete f[i], Object.keys(f).length > 0 && (s.secondary = f), e.tabs && Object.keys(e.tabs).length > 0 && (s.tabs = e.tabs);
|
|
1844
1866
|
try {
|
|
1845
1867
|
n.setItem(R(o), JSON.stringify(s));
|
|
1846
1868
|
} catch {
|
|
1847
1869
|
}
|
|
1848
1870
|
}
|
|
1849
|
-
function
|
|
1850
|
-
const o =
|
|
1871
|
+
function Vr(e = localStorage, t, n = b(), r = g()) {
|
|
1872
|
+
const o = Ne(e, r);
|
|
1851
1873
|
if (o !== null)
|
|
1852
|
-
return
|
|
1853
|
-
|
|
1854
|
-
const i =
|
|
1855
|
-
return i === null ? null : (
|
|
1874
|
+
return lr(o, n, t, r);
|
|
1875
|
+
V(e, R(r)) !== null && console.warn(`[tweak] Malformed ${R(r)}, attempting v3/v2/v1 migration`);
|
|
1876
|
+
const i = fr(e, t, n, r);
|
|
1877
|
+
return i === null ? null : (gt(i, null, e, n, r), i);
|
|
1856
1878
|
}
|
|
1857
|
-
function
|
|
1858
|
-
const r = b(n), o =
|
|
1859
|
-
|
|
1879
|
+
function Rr(e, t = localStorage, n = g()) {
|
|
1880
|
+
const r = b(n), o = Ne(t, n);
|
|
1881
|
+
gt(e, o, t, r, n);
|
|
1860
1882
|
}
|
|
1861
|
-
function
|
|
1883
|
+
function jr(e = localStorage, t = g()) {
|
|
1862
1884
|
for (const n of [
|
|
1863
1885
|
R(t),
|
|
1886
|
+
ot(t),
|
|
1864
1887
|
rt(t),
|
|
1865
|
-
nt(t)
|
|
1866
|
-
tt(t)
|
|
1888
|
+
nt(t)
|
|
1867
1889
|
])
|
|
1868
1890
|
try {
|
|
1869
1891
|
e.removeItem(n);
|
|
1870
1892
|
} catch {
|
|
1871
1893
|
}
|
|
1872
1894
|
}
|
|
1873
|
-
function
|
|
1895
|
+
function V(e, t) {
|
|
1874
1896
|
try {
|
|
1875
1897
|
return e.getItem(t);
|
|
1876
1898
|
} catch {
|
|
@@ -1884,9 +1906,9 @@ function K(e) {
|
|
|
1884
1906
|
return null;
|
|
1885
1907
|
}
|
|
1886
1908
|
}
|
|
1887
|
-
function
|
|
1909
|
+
function Ce(e, t) {
|
|
1888
1910
|
try {
|
|
1889
|
-
return
|
|
1911
|
+
return Jn(e, t);
|
|
1890
1912
|
} catch {
|
|
1891
1913
|
return {
|
|
1892
1914
|
palette: Array.from(
|
|
@@ -1904,55 +1926,55 @@ function $e(e, t) {
|
|
|
1904
1926
|
}
|
|
1905
1927
|
}
|
|
1906
1928
|
export {
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1929
|
+
zn as A,
|
|
1930
|
+
vr as B,
|
|
1931
|
+
Mr as C,
|
|
1932
|
+
Pn as D,
|
|
1933
|
+
Tr as E,
|
|
1934
|
+
$r as F,
|
|
1935
|
+
Nr as G,
|
|
1936
|
+
Er as H,
|
|
1937
|
+
er as I,
|
|
1938
|
+
nr as J,
|
|
1939
|
+
jr as K,
|
|
1940
|
+
_r as L,
|
|
1941
|
+
cr as M,
|
|
1942
|
+
Ir as N,
|
|
1943
|
+
wr as O,
|
|
1944
|
+
Jn as P,
|
|
1945
|
+
Qn as Q,
|
|
1946
|
+
kr as R,
|
|
1947
|
+
Sr as S,
|
|
1948
|
+
he as T,
|
|
1927
1949
|
se as U,
|
|
1928
1950
|
R as V,
|
|
1929
|
-
|
|
1951
|
+
ot as W,
|
|
1930
1952
|
Or as X,
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1953
|
+
Hr as Z,
|
|
1954
|
+
nt as a,
|
|
1955
|
+
rt as b,
|
|
1934
1956
|
b as c,
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1957
|
+
ge as d,
|
|
1958
|
+
pe as e,
|
|
1959
|
+
Ln as f,
|
|
1960
|
+
xr as g,
|
|
1961
|
+
Yn as h,
|
|
1962
|
+
Fn as i,
|
|
1963
|
+
hr as j,
|
|
1964
|
+
gr as k,
|
|
1965
|
+
Vr as l,
|
|
1966
|
+
yr as m,
|
|
1967
|
+
Xn as n,
|
|
1968
|
+
pr as o,
|
|
1969
|
+
dr as p,
|
|
1970
|
+
mr as q,
|
|
1971
|
+
br as r,
|
|
1972
|
+
E as s,
|
|
1951
1973
|
ue as t,
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1974
|
+
Ar as u,
|
|
1975
|
+
Zn as v,
|
|
1976
|
+
Cr as w,
|
|
1977
|
+
Pr as x,
|
|
1978
|
+
Rr as y,
|
|
1979
|
+
En as z
|
|
1958
1980
|
};
|