draftify-react 0.2.2 → 0.2.4
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/draftify-react.es.js +604 -578
- package/dist/draftify-react.umd.js +8 -8
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as rr from "react";
|
|
2
|
-
import Ei, { createContext as Ye, useRef as Gt, useLayoutEffect as Lu, useEffect as
|
|
2
|
+
import Ei, { createContext as Ye, useRef as Gt, useLayoutEffect as Lu, useEffect as It, useId as ir, useContext as xt, useInsertionEffect as Po, useMemo as Ce, useCallback as Eo, Children as Ou, isValidElement as _u, useState as tt, Fragment as Co, createElement as Vu, forwardRef as Nu, Component as Uu } from "react";
|
|
3
3
|
import { normalizeDocument as Bu, normalizeBlock as Aa, handleCopy as zu, imageToBase64 as $u, modifyCustomBlock as Wu, modifyCodeBlock as Hu, modifyLinkBlock as Yu, modifyVideoBlock as Gu, modifyImageBlock as Ku, modifyTableBlock as Xu, modifyListBlock as qu, modifyQuoteBlock as Qu, modifyParagraphBlock as Zu, modifySubheadingBlock as Ju, modifyHeadingBlock as tf, createCustomBlock as yr, createCodeBlock as ef, createLinkBlock as nf, createVideoBlock as rf, createImageBlock as af, createTableBlock as sf, createListBlock as of, createQuoteBlock as lf, createParagraphBlock as cf, createSubheadingBlock as uf, createHeadingBlock as ff, handleDownloadJSON as df, exportBlocksToDocx as hf } from "draftify";
|
|
4
4
|
const mf = "_container_1mz3p_3", pf = "_mediaWrapper_1mz3p_19", gf = "_mediaItem_1mz3p_37", yf = "_footerOverlay_1mz3p_49", vf = "_refreshButton_1mz3p_69", bf = "_dropzone_1mz3p_95", xf = "_uploadLabel_1mz3p_111", wf = "_uploadIconCircle_1mz3p_135", Af = "_donutContainer_1mz3p_159", Sf = "_donutOuter_1mz3p_175", Tf = "_donutInner_1mz3p_191", Ft = {
|
|
5
5
|
container: mf,
|
|
@@ -13,15 +13,15 @@ const mf = "_container_1mz3p_3", pf = "_mediaWrapper_1mz3p_19", gf = "_mediaItem
|
|
|
13
13
|
donutContainer: Af,
|
|
14
14
|
donutOuter: Sf,
|
|
15
15
|
donutInner: Tf
|
|
16
|
-
}, Pf = "_optionsContainer_114lu_1", Ef = "_optionButton_114lu_27", Cf = "_iconWrapper_114lu_65",
|
|
16
|
+
}, Pf = "_optionsContainer_114lu_1", Ef = "_optionButton_114lu_27", Cf = "_iconWrapper_114lu_65", If = "_subscript_114lu_75", In = {
|
|
17
17
|
optionsContainer: Pf,
|
|
18
18
|
optionButton: Ef,
|
|
19
19
|
iconWrapper: Cf,
|
|
20
|
-
subscript:
|
|
20
|
+
subscript: If
|
|
21
21
|
};
|
|
22
|
-
var
|
|
22
|
+
var kn = { exports: {} }, tn = {};
|
|
23
23
|
var Sa;
|
|
24
|
-
function
|
|
24
|
+
function kf() {
|
|
25
25
|
if (Sa) return tn;
|
|
26
26
|
Sa = 1;
|
|
27
27
|
var t = /* @__PURE__ */ Symbol.for("react.transitional.element"), e = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
@@ -49,16 +49,16 @@ function Mf() {
|
|
|
49
49
|
function t(j) {
|
|
50
50
|
if (j == null) return null;
|
|
51
51
|
if (typeof j == "function")
|
|
52
|
-
return j.$$typeof ===
|
|
52
|
+
return j.$$typeof === k ? null : j.displayName || j.name || null;
|
|
53
53
|
if (typeof j == "string") return j;
|
|
54
54
|
switch (j) {
|
|
55
|
-
case
|
|
55
|
+
case w:
|
|
56
56
|
return "Fragment";
|
|
57
|
-
case
|
|
57
|
+
case I:
|
|
58
58
|
return "Profiler";
|
|
59
59
|
case v:
|
|
60
60
|
return "StrictMode";
|
|
61
|
-
case
|
|
61
|
+
case A:
|
|
62
62
|
return "Suspense";
|
|
63
63
|
case L:
|
|
64
64
|
return "SuspenseList";
|
|
@@ -110,7 +110,7 @@ function Mf() {
|
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
function r(j) {
|
|
113
|
-
if (j ===
|
|
113
|
+
if (j === w) return "<>";
|
|
114
114
|
if (typeof j == "object" && j !== null && j.$$typeof === y)
|
|
115
115
|
return "<...>";
|
|
116
116
|
try {
|
|
@@ -239,7 +239,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
239
239
|
function f(j) {
|
|
240
240
|
return typeof j == "object" && j !== null && j.$$typeof === m;
|
|
241
241
|
}
|
|
242
|
-
var h = Ei, m = /* @__PURE__ */ Symbol.for("react.transitional.element"), b = /* @__PURE__ */ Symbol.for("react.portal"),
|
|
242
|
+
var h = Ei, m = /* @__PURE__ */ Symbol.for("react.transitional.element"), b = /* @__PURE__ */ Symbol.for("react.portal"), w = /* @__PURE__ */ Symbol.for("react.fragment"), v = /* @__PURE__ */ Symbol.for("react.strict_mode"), I = /* @__PURE__ */ Symbol.for("react.profiler"), S = /* @__PURE__ */ Symbol.for("react.consumer"), C = /* @__PURE__ */ Symbol.for("react.context"), P = /* @__PURE__ */ Symbol.for("react.forward_ref"), A = /* @__PURE__ */ Symbol.for("react.suspense"), L = /* @__PURE__ */ Symbol.for("react.suspense_list"), p = /* @__PURE__ */ Symbol.for("react.memo"), y = /* @__PURE__ */ Symbol.for("react.lazy"), T = /* @__PURE__ */ Symbol.for("react.activity"), k = /* @__PURE__ */ Symbol.for("react.client.reference"), M = h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, D = Object.prototype.hasOwnProperty, E = Array.isArray, O = console.createTask ? console.createTask : function() {
|
|
243
243
|
return null;
|
|
244
244
|
};
|
|
245
245
|
h = {
|
|
@@ -251,7 +251,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
251
251
|
h,
|
|
252
252
|
a
|
|
253
253
|
)(), F = O(r(a)), U = {};
|
|
254
|
-
en.Fragment =
|
|
254
|
+
en.Fragment = w, en.jsx = function(j, N, $) {
|
|
255
255
|
var B = 1e4 > M.recentlyCreatedOwnerStacks++;
|
|
256
256
|
return l(
|
|
257
257
|
j,
|
|
@@ -276,15 +276,15 @@ React keys must be passed directly to JSX without using spread:
|
|
|
276
276
|
}
|
|
277
277
|
var Pa;
|
|
278
278
|
function Rf() {
|
|
279
|
-
return Pa || (Pa = 1, process.env.NODE_ENV === "production" ?
|
|
279
|
+
return Pa || (Pa = 1, process.env.NODE_ENV === "production" ? kn.exports = kf() : kn.exports = Mf()), kn.exports;
|
|
280
280
|
}
|
|
281
281
|
var R = Rf();
|
|
282
282
|
const Ci = Ye({});
|
|
283
|
-
function
|
|
283
|
+
function Ii(t) {
|
|
284
284
|
const e = Gt(null);
|
|
285
285
|
return e.current === null && (e.current = t()), e.current;
|
|
286
286
|
}
|
|
287
|
-
const
|
|
287
|
+
const ki = typeof window < "u", Io = ki ? Lu : It, ar = /* @__PURE__ */ Ye(null);
|
|
288
288
|
function Mi(t, e) {
|
|
289
289
|
t.indexOf(e) === -1 && t.push(e);
|
|
290
290
|
}
|
|
@@ -305,7 +305,7 @@ process.env.NODE_ENV !== "production" && (Ge = (t, e, n) => {
|
|
|
305
305
|
if (!t)
|
|
306
306
|
throw new Error(Br(e, n));
|
|
307
307
|
});
|
|
308
|
-
const ee = {},
|
|
308
|
+
const ee = {}, ko = (t) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);
|
|
309
309
|
function Mo(t) {
|
|
310
310
|
return typeof t == "object" && t !== null;
|
|
311
311
|
}
|
|
@@ -378,7 +378,7 @@ const Fo = (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2, Lo
|
|
|
378
378
|
backInOut: _o,
|
|
379
379
|
backOut: Oo,
|
|
380
380
|
anticipate: Vo
|
|
381
|
-
}, Nf = (t) => typeof t == "string",
|
|
381
|
+
}, Nf = (t) => typeof t == "string", Ia = (t) => {
|
|
382
382
|
if (zo(t)) {
|
|
383
383
|
te(t.length === 4, "Cubic bezier arrays must contain four numerical values.", "cubic-bezier-length");
|
|
384
384
|
const [e, n, r, i] = t;
|
|
@@ -452,12 +452,12 @@ function $o(t, e) {
|
|
|
452
452
|
}, a = () => n = !0, s = Mn.reduce((S, C) => (S[C] = Uf(a), S), {}), { setup: o, read: c, resolveKeyframes: d, preUpdate: l, update: u, preRender: f, render: h, postRender: m } = s, b = () => {
|
|
453
453
|
const S = ee.useManualTiming ? i.timestamp : performance.now();
|
|
454
454
|
n = !1, ee.useManualTiming || (i.delta = r ? 1e3 / 60 : Math.max(Math.min(S - i.timestamp, Bf), 1)), i.timestamp = S, i.isProcessing = !0, o.process(i), c.process(i), d.process(i), l.process(i), u.process(i), f.process(i), h.process(i), m.process(i), i.isProcessing = !1, n && e && (r = !1, t(b));
|
|
455
|
-
},
|
|
455
|
+
}, w = () => {
|
|
456
456
|
n = !0, r = !0, i.isProcessing || t(b);
|
|
457
457
|
};
|
|
458
458
|
return { schedule: Mn.reduce((S, C) => {
|
|
459
459
|
const P = s[C];
|
|
460
|
-
return S[C] = (
|
|
460
|
+
return S[C] = (A, L = !1, p = !1) => (n || w(), P.schedule(A, L, p)), S;
|
|
461
461
|
}, {}), cancel: (S) => {
|
|
462
462
|
for (let C = 0; C < Mn.length; C++)
|
|
463
463
|
s[Mn[C]].cancel(S);
|
|
@@ -522,7 +522,7 @@ const zr = {
|
|
|
522
522
|
test: (e) => typeof e == "string" && e.endsWith(t) && e.split(" ").length === 1,
|
|
523
523
|
parse: parseFloat,
|
|
524
524
|
transform: (e) => `${e}${t}`
|
|
525
|
-
}), le = /* @__PURE__ */ An("deg"), Kt = /* @__PURE__ */ An("%"), q = /* @__PURE__ */ An("px"), Xf = /* @__PURE__ */ An("vh"), qf = /* @__PURE__ */ An("vw"),
|
|
525
|
+
}), le = /* @__PURE__ */ An("deg"), Kt = /* @__PURE__ */ An("%"), q = /* @__PURE__ */ An("px"), Xf = /* @__PURE__ */ An("vh"), qf = /* @__PURE__ */ An("vw"), ka = {
|
|
526
526
|
...Kt,
|
|
527
527
|
parse: (t) => Kt.parse(t) / 100,
|
|
528
528
|
transform: (t) => Kt.transform(t * 100)
|
|
@@ -814,41 +814,41 @@ function Yn(t = lt.visualDuration, e = lt.bounce) {
|
|
|
814
814
|
const a = n.keyframes[0], s = n.keyframes[n.keyframes.length - 1], o = { done: !1, value: a }, { stiffness: c, damping: d, mass: l, duration: u, velocity: f, isResolvedFromDuration: h } = xd({
|
|
815
815
|
...n,
|
|
816
816
|
velocity: -/* @__PURE__ */ Lt(n.velocity || 0)
|
|
817
|
-
}), m = f || 0, b = d / (2 * Math.sqrt(c * l)),
|
|
818
|
-
r || (r =
|
|
817
|
+
}), m = f || 0, b = d / (2 * Math.sqrt(c * l)), w = s - a, v = /* @__PURE__ */ Lt(Math.sqrt(c / l)), I = Math.abs(w) < 5;
|
|
818
|
+
r || (r = I ? lt.restSpeed.granular : lt.restSpeed.default), i || (i = I ? lt.restDelta.granular : lt.restDelta.default);
|
|
819
819
|
let S;
|
|
820
820
|
if (b < 1) {
|
|
821
821
|
const P = Wr(v, b);
|
|
822
|
-
S = (
|
|
823
|
-
const L = Math.exp(-b * v *
|
|
824
|
-
return s - L * ((m + b * v *
|
|
822
|
+
S = (A) => {
|
|
823
|
+
const L = Math.exp(-b * v * A);
|
|
824
|
+
return s - L * ((m + b * v * w) / P * Math.sin(P * A) + w * Math.cos(P * A));
|
|
825
825
|
};
|
|
826
826
|
} else if (b === 1)
|
|
827
|
-
S = (P) => s - Math.exp(-v * P) * (
|
|
827
|
+
S = (P) => s - Math.exp(-v * P) * (w + (m + v * w) * P);
|
|
828
828
|
else {
|
|
829
829
|
const P = v * Math.sqrt(b * b - 1);
|
|
830
|
-
S = (
|
|
831
|
-
const L = Math.exp(-b * v *
|
|
832
|
-
return s - L * ((m + b * v *
|
|
830
|
+
S = (A) => {
|
|
831
|
+
const L = Math.exp(-b * v * A), p = Math.min(P * A, 300);
|
|
832
|
+
return s - L * ((m + b * v * w) * Math.sinh(p) + P * w * Math.cosh(p)) / P;
|
|
833
833
|
};
|
|
834
834
|
}
|
|
835
835
|
const C = {
|
|
836
836
|
calculatedDuration: h && u || null,
|
|
837
837
|
next: (P) => {
|
|
838
|
-
const
|
|
838
|
+
const A = S(P);
|
|
839
839
|
if (h)
|
|
840
840
|
o.done = P >= u;
|
|
841
841
|
else {
|
|
842
842
|
let L = P === 0 ? m : 0;
|
|
843
|
-
b < 1 && (L = P === 0 ? /* @__PURE__ */ zt(m) : tl(S, P,
|
|
844
|
-
const p = Math.abs(L) <= r, y = Math.abs(s -
|
|
843
|
+
b < 1 && (L = P === 0 ? /* @__PURE__ */ zt(m) : tl(S, P, A));
|
|
844
|
+
const p = Math.abs(L) <= r, y = Math.abs(s - A) <= i;
|
|
845
845
|
o.done = p && y;
|
|
846
846
|
}
|
|
847
|
-
return o.value = o.done ? s :
|
|
847
|
+
return o.value = o.done ? s : A, o;
|
|
848
848
|
},
|
|
849
849
|
toString: () => {
|
|
850
|
-
const P = Math.min(Bi(C), Hn),
|
|
851
|
-
return P + "ms " +
|
|
850
|
+
const P = Math.min(Bi(C), Hn), A = Jo((L) => C.next(P * L).value, P, 30);
|
|
851
|
+
return P + "ms " + A;
|
|
852
852
|
},
|
|
853
853
|
toTransition: () => {
|
|
854
854
|
}
|
|
@@ -865,15 +865,15 @@ function Hr({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: r = 3
|
|
|
865
865
|
value: u
|
|
866
866
|
}, h = (p) => o !== void 0 && p < o || c !== void 0 && p > c, m = (p) => o === void 0 ? c : c === void 0 || Math.abs(o - p) < Math.abs(c - p) ? o : c;
|
|
867
867
|
let b = n * e;
|
|
868
|
-
const
|
|
869
|
-
v !==
|
|
870
|
-
const
|
|
871
|
-
const y =
|
|
868
|
+
const w = u + b, v = s === void 0 ? w : s(w);
|
|
869
|
+
v !== w && (b = v - u);
|
|
870
|
+
const I = (p) => -b * Math.exp(-p / r), S = (p) => v + I(p), C = (p) => {
|
|
871
|
+
const y = I(p), T = S(p);
|
|
872
872
|
f.done = Math.abs(y) <= d, f.value = f.done ? v : T;
|
|
873
873
|
};
|
|
874
|
-
let P,
|
|
874
|
+
let P, A;
|
|
875
875
|
const L = (p) => {
|
|
876
|
-
h(f.value) && (P = p,
|
|
876
|
+
h(f.value) && (P = p, A = Yn({
|
|
877
877
|
keyframes: [f.value, m(f.value)],
|
|
878
878
|
velocity: tl(S, p, f.value),
|
|
879
879
|
// TODO: This should be passing * 1000
|
|
@@ -887,7 +887,7 @@ function Hr({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: r = 3
|
|
|
887
887
|
calculatedDuration: null,
|
|
888
888
|
next: (p) => {
|
|
889
889
|
let y = !1;
|
|
890
|
-
return !
|
|
890
|
+
return !A && P === void 0 && (y = !0, C(p), L(p)), P !== void 0 && p >= P ? A.next(p - P) : (!y && C(p), f);
|
|
891
891
|
}
|
|
892
892
|
};
|
|
893
893
|
}
|
|
@@ -941,7 +941,7 @@ function Ed(t, e) {
|
|
|
941
941
|
return t.map(() => e || Bo).splice(0, t.length - 1);
|
|
942
942
|
}
|
|
943
943
|
function Fe({ duration: t = 300, keyframes: e, times: n, ease: r = "easeInOut" }) {
|
|
944
|
-
const i = Vf(r) ? r.map(
|
|
944
|
+
const i = Vf(r) ? r.map(Ia) : Ia(r), a = {
|
|
945
945
|
done: !1,
|
|
946
946
|
value: e[0]
|
|
947
947
|
}, s = Pd(
|
|
@@ -962,7 +962,7 @@ function zi(t, { repeat: e, repeatType: n = "loop" }, r, i = 1) {
|
|
|
962
962
|
const a = t.filter(Cd), o = i < 0 || e && n !== "loop" && e % 2 === 1 ? 0 : a.length - 1;
|
|
963
963
|
return !o || r === void 0 ? a[o] : r;
|
|
964
964
|
}
|
|
965
|
-
const
|
|
965
|
+
const Id = {
|
|
966
966
|
decay: Hr,
|
|
967
967
|
inertia: Hr,
|
|
968
968
|
tween: Fe,
|
|
@@ -970,7 +970,7 @@ const kd = {
|
|
|
970
970
|
spring: Yn
|
|
971
971
|
};
|
|
972
972
|
function el(t) {
|
|
973
|
-
typeof t.type == "string" && (t.type =
|
|
973
|
+
typeof t.type == "string" && (t.type = Id[t.type]);
|
|
974
974
|
}
|
|
975
975
|
class $i {
|
|
976
976
|
constructor() {
|
|
@@ -996,7 +996,7 @@ class $i {
|
|
|
996
996
|
return this.finished.then(e, n);
|
|
997
997
|
}
|
|
998
998
|
}
|
|
999
|
-
const
|
|
999
|
+
const kd = (t) => t / 100;
|
|
1000
1000
|
class Wi extends $i {
|
|
1001
1001
|
constructor(e) {
|
|
1002
1002
|
super(), this.state = "idle", this.startTime = null, this.isStopped = !1, this.currentTime = 0, this.holdTime = null, this.playbackSpeed = 1, this.stop = () => {
|
|
@@ -1010,7 +1010,7 @@ class Wi extends $i {
|
|
|
1010
1010
|
const { type: n = Fe, repeat: r = 0, repeatDelay: i = 0, repeatType: a, velocity: s = 0 } = e;
|
|
1011
1011
|
let { keyframes: o } = e;
|
|
1012
1012
|
const c = n || Fe;
|
|
1013
|
-
process.env.NODE_ENV !== "production" && c !== Fe && te(o.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${o}`, "spring-two-frames"), c !== Fe && typeof o[0] != "number" && (this.mixKeyframes = xn(
|
|
1013
|
+
process.env.NODE_ENV !== "production" && c !== Fe && te(o.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${o}`, "spring-two-frames"), c !== Fe && typeof o[0] != "number" && (this.mixKeyframes = xn(kd, Zo(o[0], o[1])), o = [0, 100]);
|
|
1014
1014
|
const d = c({ ...e, keyframes: o });
|
|
1015
1015
|
a === "mirror" && (this.mirroredGenerator = c({
|
|
1016
1016
|
...e,
|
|
@@ -1028,9 +1028,9 @@ class Wi extends $i {
|
|
|
1028
1028
|
const { generator: r, totalDuration: i, mixKeyframes: a, mirroredGenerator: s, resolvedDuration: o, calculatedDuration: c } = this;
|
|
1029
1029
|
if (this.startTime === null)
|
|
1030
1030
|
return r.next(0);
|
|
1031
|
-
const { delay: d = 0, keyframes: l, repeat: u, repeatType: f, repeatDelay: h, type: m, onUpdate: b, finalKeyframe:
|
|
1031
|
+
const { delay: d = 0, keyframes: l, repeat: u, repeatType: f, repeatDelay: h, type: m, onUpdate: b, finalKeyframe: w } = this.options;
|
|
1032
1032
|
this.speed > 0 ? this.startTime = Math.min(this.startTime, e) : this.speed < 0 && (this.startTime = Math.min(e - i / this.speed, this.startTime)), n ? this.currentTime = e : this.updateTime(e);
|
|
1033
|
-
const v = this.currentTime - d * (this.playbackSpeed >= 0 ? 1 : -1),
|
|
1033
|
+
const v = this.currentTime - d * (this.playbackSpeed >= 0 ? 1 : -1), I = this.playbackSpeed >= 0 ? v < 0 : v > i;
|
|
1034
1034
|
this.currentTime = Math.max(v, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = i);
|
|
1035
1035
|
let S = this.currentTime, C = r;
|
|
1036
1036
|
if (u) {
|
|
@@ -1038,12 +1038,12 @@ class Wi extends $i {
|
|
|
1038
1038
|
let y = Math.floor(p), T = p % 1;
|
|
1039
1039
|
!T && p >= 1 && (T = 1), T === 1 && y--, y = Math.min(y, u + 1), y % 2 && (f === "reverse" ? (T = 1 - T, h && (T -= h / o)) : f === "mirror" && (C = s)), S = Jt(0, 1, T) * o;
|
|
1040
1040
|
}
|
|
1041
|
-
const P =
|
|
1041
|
+
const P = I ? { done: !1, value: l[0] } : C.next(S);
|
|
1042
1042
|
a && (P.value = a(P.value));
|
|
1043
|
-
let { done:
|
|
1044
|
-
!
|
|
1045
|
-
const L = this.holdTime === null && (this.state === "finished" || this.state === "running" &&
|
|
1046
|
-
return L && m !== Hr && (P.value = zi(l, this.options,
|
|
1043
|
+
let { done: A } = P;
|
|
1044
|
+
!I && c !== null && (A = this.playbackSpeed >= 0 ? this.currentTime >= i : this.currentTime <= 0);
|
|
1045
|
+
const L = this.holdTime === null && (this.state === "finished" || this.state === "running" && A);
|
|
1046
|
+
return L && m !== Hr && (P.value = zi(l, this.options, w, this.speed)), b && b(P.value), L && this.finish(), P;
|
|
1047
1047
|
}
|
|
1048
1048
|
/**
|
|
1049
1049
|
* Allows the returned animation to be awaited or promise-chained. Currently
|
|
@@ -1523,7 +1523,7 @@ class nh extends $i {
|
|
|
1523
1523
|
element: l,
|
|
1524
1524
|
...u
|
|
1525
1525
|
}, h = l?.KeyframeResolver || Hi;
|
|
1526
|
-
this.keyframeResolver = new h(o, (m, b,
|
|
1526
|
+
this.keyframeResolver = new h(o, (m, b, w) => this.onKeyframesResolved(m, b, f, !w), c, d, l), this.keyframeResolver?.scheduleResolve();
|
|
1527
1527
|
}
|
|
1528
1528
|
onKeyframesResolved(e, n, r, i) {
|
|
1529
1529
|
this.keyframeResolver = void 0;
|
|
@@ -1610,7 +1610,7 @@ function ll(t, e, n = 1) {
|
|
|
1610
1610
|
const a = window.getComputedStyle(e).getPropertyValue(r);
|
|
1611
1611
|
if (a) {
|
|
1612
1612
|
const s = a.trim();
|
|
1613
|
-
return
|
|
1613
|
+
return ko(s) ? parseFloat(s) : s;
|
|
1614
1614
|
}
|
|
1615
1615
|
return _i(i) ? ll(i, e, n + 1) : i;
|
|
1616
1616
|
}
|
|
@@ -1675,8 +1675,8 @@ const uh = /\b([a-z-]*)\(.*?\)/gu, ti = {
|
|
|
1675
1675
|
perspective: q,
|
|
1676
1676
|
transformPerspective: q,
|
|
1677
1677
|
opacity: mn,
|
|
1678
|
-
originX:
|
|
1679
|
-
originY:
|
|
1678
|
+
originX: ka,
|
|
1679
|
+
originY: ka,
|
|
1680
1680
|
originZ: q
|
|
1681
1681
|
}, Gi = {
|
|
1682
1682
|
// Border props
|
|
@@ -2135,7 +2135,7 @@ function Ga(t, e) {
|
|
|
2135
2135
|
return t(e);
|
|
2136
2136
|
t != null && (t.current = e);
|
|
2137
2137
|
}
|
|
2138
|
-
function
|
|
2138
|
+
function Ih(...t) {
|
|
2139
2139
|
return (e) => {
|
|
2140
2140
|
let n = !1;
|
|
2141
2141
|
const r = t.map((i) => {
|
|
@@ -2151,8 +2151,8 @@ function kh(...t) {
|
|
|
2151
2151
|
};
|
|
2152
2152
|
};
|
|
2153
2153
|
}
|
|
2154
|
-
function
|
|
2155
|
-
return rr.useCallback(
|
|
2154
|
+
function kh(...t) {
|
|
2155
|
+
return rr.useCallback(Ih(...t), t);
|
|
2156
2156
|
}
|
|
2157
2157
|
class Mh extends rr.Component {
|
|
2158
2158
|
getSnapshotBeforeUpdate(e) {
|
|
@@ -2179,7 +2179,7 @@ function Rh({ children: t, isPresent: e, anchorX: n, root: r }) {
|
|
|
2179
2179
|
top: 0,
|
|
2180
2180
|
left: 0,
|
|
2181
2181
|
right: 0
|
|
2182
|
-
}), { nonce: o } = xt(qi), c =
|
|
2182
|
+
}), { nonce: o } = xt(qi), c = kh(a, t?.ref);
|
|
2183
2183
|
return Po(() => {
|
|
2184
2184
|
const { width: d, height: l, top: u, left: f, right: h } = s.current;
|
|
2185
2185
|
if (e || !a.current || !d || !l)
|
|
@@ -2188,8 +2188,8 @@ function Rh({ children: t, isPresent: e, anchorX: n, root: r }) {
|
|
|
2188
2188
|
a.current.dataset.motionPopId = i;
|
|
2189
2189
|
const b = document.createElement("style");
|
|
2190
2190
|
o && (b.nonce = o);
|
|
2191
|
-
const
|
|
2192
|
-
return
|
|
2191
|
+
const w = r ?? document.head;
|
|
2192
|
+
return w.appendChild(b), b.sheet && b.sheet.insertRule(`
|
|
2193
2193
|
[data-motion-pop-id="${i}"] {
|
|
2194
2194
|
position: absolute !important;
|
|
2195
2195
|
width: ${d}px !important;
|
|
@@ -2198,12 +2198,12 @@ function Rh({ children: t, isPresent: e, anchorX: n, root: r }) {
|
|
|
2198
2198
|
top: ${u}px !important;
|
|
2199
2199
|
}
|
|
2200
2200
|
`), () => {
|
|
2201
|
-
|
|
2201
|
+
w.contains(b) && w.removeChild(b);
|
|
2202
2202
|
};
|
|
2203
2203
|
}, [e]), R.jsx(Mh, { isPresent: e, childRef: a, sizeRef: s, children: rr.cloneElement(t, { ref: c }) });
|
|
2204
2204
|
}
|
|
2205
2205
|
const Dh = ({ children: t, initial: e, isPresent: n, onExitComplete: r, custom: i, presenceAffectsLayout: a, mode: s, anchorX: o, root: c }) => {
|
|
2206
|
-
const d =
|
|
2206
|
+
const d = Ii(jh), l = ir();
|
|
2207
2207
|
let u = !0, f = Ce(() => (u = !1, {
|
|
2208
2208
|
id: l,
|
|
2209
2209
|
initial: e,
|
|
@@ -2232,7 +2232,7 @@ function xl(t = !0) {
|
|
|
2232
2232
|
if (e === null)
|
|
2233
2233
|
return [!0, null];
|
|
2234
2234
|
const { isPresent: n, onExitComplete: r, register: i } = e, a = ir();
|
|
2235
|
-
|
|
2235
|
+
It(() => {
|
|
2236
2236
|
if (t)
|
|
2237
2237
|
return i(a);
|
|
2238
2238
|
}, [t]);
|
|
@@ -2247,37 +2247,37 @@ function Ka(t) {
|
|
|
2247
2247
|
}), e;
|
|
2248
2248
|
}
|
|
2249
2249
|
const Fh = ({ children: t, custom: e, initial: n = !0, onExitComplete: r, presenceAffectsLayout: i = !0, mode: a = "sync", propagate: s = !1, anchorX: o = "left", root: c }) => {
|
|
2250
|
-
const [d, l] = xl(s), u = Ce(() => Ka(t), [t]), f = s && !d ? [] : u.map(Dn), h = Gt(!0), m = Gt(u), b =
|
|
2251
|
-
|
|
2250
|
+
const [d, l] = xl(s), u = Ce(() => Ka(t), [t]), f = s && !d ? [] : u.map(Dn), h = Gt(!0), m = Gt(u), b = Ii(() => /* @__PURE__ */ new Map()), [w, v] = tt(u), [I, S] = tt(u);
|
|
2251
|
+
Io(() => {
|
|
2252
2252
|
h.current = !1, m.current = u;
|
|
2253
|
-
for (let
|
|
2254
|
-
const L = Dn(
|
|
2253
|
+
for (let A = 0; A < I.length; A++) {
|
|
2254
|
+
const L = Dn(I[A]);
|
|
2255
2255
|
f.includes(L) ? b.delete(L) : b.get(L) !== !0 && b.set(L, !1);
|
|
2256
2256
|
}
|
|
2257
|
-
}, [
|
|
2257
|
+
}, [I, f.length, f.join("-")]);
|
|
2258
2258
|
const C = [];
|
|
2259
|
-
if (u !==
|
|
2260
|
-
let
|
|
2261
|
-
for (let L = 0; L <
|
|
2262
|
-
const p =
|
|
2263
|
-
f.includes(y) || (
|
|
2259
|
+
if (u !== w) {
|
|
2260
|
+
let A = [...u];
|
|
2261
|
+
for (let L = 0; L < I.length; L++) {
|
|
2262
|
+
const p = I[L], y = Dn(p);
|
|
2263
|
+
f.includes(y) || (A.splice(L, 0, p), C.push(p));
|
|
2264
2264
|
}
|
|
2265
|
-
return a === "wait" && C.length && (
|
|
2265
|
+
return a === "wait" && C.length && (A = C), S(Ka(A)), v(u), null;
|
|
2266
2266
|
}
|
|
2267
|
-
process.env.NODE_ENV !== "production" && a === "wait" &&
|
|
2267
|
+
process.env.NODE_ENV !== "production" && a === "wait" && I.length > 1 && console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);
|
|
2268
2268
|
const { forceRender: P } = xt(Ci);
|
|
2269
|
-
return R.jsx(R.Fragment, { children:
|
|
2270
|
-
const L = Dn(
|
|
2269
|
+
return R.jsx(R.Fragment, { children: I.map((A) => {
|
|
2270
|
+
const L = Dn(A), p = s && !d ? !1 : u === I || f.includes(L), y = () => {
|
|
2271
2271
|
if (b.has(L))
|
|
2272
2272
|
b.set(L, !0);
|
|
2273
2273
|
else
|
|
2274
2274
|
return;
|
|
2275
2275
|
let T = !0;
|
|
2276
|
-
b.forEach((
|
|
2277
|
-
|
|
2276
|
+
b.forEach((k) => {
|
|
2277
|
+
k || (T = !1);
|
|
2278
2278
|
}), T && (P?.(), S(m.current), s && l?.(), r && r());
|
|
2279
2279
|
};
|
|
2280
|
-
return R.jsx(Dh, { isPresent: p, initial: !h.current || n ? void 0 : !1, custom: e, presenceAffectsLayout: i, mode: a, root: c, onExitComplete: p ? void 0 : y, anchorX: o, children:
|
|
2280
|
+
return R.jsx(Dh, { isPresent: p, initial: !h.current || n ? void 0 : !1, custom: e, presenceAffectsLayout: i, mode: a, root: c, onExitComplete: p ? void 0 : y, anchorX: o, children: A }, L);
|
|
2281
2281
|
}) });
|
|
2282
2282
|
}, wl = Ye({ strict: !1 }), Xa = {
|
|
2283
2283
|
animation: [
|
|
@@ -2548,11 +2548,11 @@ function El(t, {
|
|
|
2548
2548
|
const Cl = () => ({
|
|
2549
2549
|
...ta(),
|
|
2550
2550
|
attrs: {}
|
|
2551
|
-
}),
|
|
2551
|
+
}), Il = (t) => typeof t == "string" && t.toLowerCase() === "svg";
|
|
2552
2552
|
function Qh(t, e, n, r) {
|
|
2553
2553
|
const i = Ce(() => {
|
|
2554
2554
|
const a = Cl();
|
|
2555
|
-
return El(a, e,
|
|
2555
|
+
return El(a, e, Il(r), t.transformTemplate, t.style), {
|
|
2556
2556
|
...a.attrs,
|
|
2557
2557
|
style: { ...a.style }
|
|
2558
2558
|
};
|
|
@@ -2658,25 +2658,25 @@ function em(t, e, n, r) {
|
|
|
2658
2658
|
for (let h = 0; h < f.length; h++) {
|
|
2659
2659
|
const m = na(t, f[h]);
|
|
2660
2660
|
if (m) {
|
|
2661
|
-
const { transitionEnd: b, transition:
|
|
2662
|
-
for (const
|
|
2663
|
-
let S = v[
|
|
2661
|
+
const { transitionEnd: b, transition: w, ...v } = m;
|
|
2662
|
+
for (const I in v) {
|
|
2663
|
+
let S = v[I];
|
|
2664
2664
|
if (Array.isArray(S)) {
|
|
2665
2665
|
const C = l ? S.length - 1 : 0;
|
|
2666
2666
|
S = S[C];
|
|
2667
2667
|
}
|
|
2668
|
-
S !== null && (i[
|
|
2668
|
+
S !== null && (i[I] = S);
|
|
2669
2669
|
}
|
|
2670
|
-
for (const
|
|
2671
|
-
i[
|
|
2670
|
+
for (const I in b)
|
|
2671
|
+
i[I] = b[I];
|
|
2672
2672
|
}
|
|
2673
2673
|
}
|
|
2674
2674
|
}
|
|
2675
2675
|
return i;
|
|
2676
2676
|
}
|
|
2677
|
-
const
|
|
2677
|
+
const kl = (t) => (e, n) => {
|
|
2678
2678
|
const r = xt(sr), i = xt(ar), a = () => tm(t, e, r, i);
|
|
2679
|
-
return n ? a() :
|
|
2679
|
+
return n ? a() : Ii(a);
|
|
2680
2680
|
};
|
|
2681
2681
|
function ra(t, e, n) {
|
|
2682
2682
|
const { style: r } = t, i = {};
|
|
@@ -2684,7 +2684,7 @@ function ra(t, e, n) {
|
|
|
2684
2684
|
(wt(r[a]) || e.style && wt(e.style[a]) || Tl(a, t) || n?.getValue(a)?.liveStyle !== void 0) && (i[a] = r[a]);
|
|
2685
2685
|
return i;
|
|
2686
2686
|
}
|
|
2687
|
-
const nm = /* @__PURE__ */
|
|
2687
|
+
const nm = /* @__PURE__ */ kl({
|
|
2688
2688
|
scrapeMotionValuesFromProps: ra,
|
|
2689
2689
|
createRenderState: ta
|
|
2690
2690
|
});
|
|
@@ -2697,7 +2697,7 @@ function Ml(t, e, n) {
|
|
|
2697
2697
|
}
|
|
2698
2698
|
return r;
|
|
2699
2699
|
}
|
|
2700
|
-
const rm = /* @__PURE__ */
|
|
2700
|
+
const rm = /* @__PURE__ */ kl({
|
|
2701
2701
|
scrapeMotionValuesFromProps: Ml,
|
|
2702
2702
|
createRenderState: Cl
|
|
2703
2703
|
}), im = /* @__PURE__ */ Symbol.for("motionComponentSymbol");
|
|
@@ -2734,9 +2734,9 @@ function om(t, e, n, r, i) {
|
|
|
2734
2734
|
l && f.current && l.update(n, o);
|
|
2735
2735
|
});
|
|
2736
2736
|
const h = n[Rl], m = Gt(!!h && !window.MotionHandoffIsComplete?.(h) && window.MotionHasOptimisedAnimation?.(h));
|
|
2737
|
-
return
|
|
2737
|
+
return Io(() => {
|
|
2738
2738
|
l && (f.current = !0, window.MotionIsMounted = !0, l.updateFeatures(), l.scheduleRenderMicrotask(), m.current && l.animationState && l.animationState.animateChanges());
|
|
2739
|
-
}),
|
|
2739
|
+
}), It(() => {
|
|
2740
2740
|
l && (!m.current && l.animationState && l.animationState.animateChanges(), m.current && (queueMicrotask(() => {
|
|
2741
2741
|
window.MotionHandoffMarkAsComplete?.(h);
|
|
2742
2742
|
}), m.current = !1), l.enteringChildren = void 0);
|
|
@@ -2777,7 +2777,7 @@ function Tr(t, { forwardMotionProps: e = !1 } = {}, n, r) {
|
|
|
2777
2777
|
...o,
|
|
2778
2778
|
layoutId: cm(o)
|
|
2779
2779
|
}, { isStatic: u } = l, f = Uh(o), h = i(o, u);
|
|
2780
|
-
if (!u &&
|
|
2780
|
+
if (!u && ki) {
|
|
2781
2781
|
um(l, n);
|
|
2782
2782
|
const m = fm(l);
|
|
2783
2783
|
d = m.MeasureLayout, f.visualElement = om(t, h, l, r, m.ProjectionNode);
|
|
@@ -2917,7 +2917,7 @@ const is = () => ({
|
|
|
2917
2917
|
y: as()
|
|
2918
2918
|
}), ii = { current: null }, Vl = { current: !1 };
|
|
2919
2919
|
function ym() {
|
|
2920
|
-
if (Vl.current = !0, !!
|
|
2920
|
+
if (Vl.current = !0, !!ki)
|
|
2921
2921
|
if (window.matchMedia) {
|
|
2922
2922
|
const t = window.matchMedia("(prefers-reduced-motion)"), e = () => ii.current = t.matches;
|
|
2923
2923
|
t.addEventListener("change", e), e();
|
|
@@ -3121,7 +3121,7 @@ class xm {
|
|
|
3121
3121
|
*/
|
|
3122
3122
|
readValue(e, n) {
|
|
3123
3123
|
let r = this.latestValues[e] !== void 0 || !this.current ? this.latestValues[e] : this.getBaseTargetFromProps(this.props, e) ?? this.readValueFromInstance(this.current, e, this.options);
|
|
3124
|
-
return r != null && (typeof r == "string" && (
|
|
3124
|
+
return r != null && (typeof r == "string" && (ko(r) || Ro(r)) ? r = parseFloat(r) : !Ch(r) && ue.test(n) && (r = hl(e, n)), this.setBaseTarget(e, wt(r) ? r.get() : r)), wt(r) ? r.get() : r;
|
|
3125
3125
|
}
|
|
3126
3126
|
/**
|
|
3127
3127
|
* Set the base target to later animate back to. This is currently
|
|
@@ -3265,7 +3265,7 @@ class Tm extends Nl {
|
|
|
3265
3265
|
Sm(e, n, r, i);
|
|
3266
3266
|
}
|
|
3267
3267
|
mount(e) {
|
|
3268
|
-
this.isSVGTag =
|
|
3268
|
+
this.isSVGTag = Il(e.tagName), super.mount(e);
|
|
3269
3269
|
}
|
|
3270
3270
|
}
|
|
3271
3271
|
const Pm = (t, e) => ea(t) ? new Tm(e) : new Am(e, {
|
|
@@ -3282,7 +3282,7 @@ function Em(t, e, n) {
|
|
|
3282
3282
|
function Cm(t) {
|
|
3283
3283
|
return ai(t) ? t[t.length - 1] || 0 : t;
|
|
3284
3284
|
}
|
|
3285
|
-
function
|
|
3285
|
+
function Im(t, e) {
|
|
3286
3286
|
const n = Be(t, e);
|
|
3287
3287
|
let { transitionEnd: r = {}, transition: i = {}, ...a } = n || {};
|
|
3288
3288
|
a = { ...a, ...r };
|
|
@@ -3291,12 +3291,12 @@ function km(t, e) {
|
|
|
3291
3291
|
Em(t, s, o);
|
|
3292
3292
|
}
|
|
3293
3293
|
}
|
|
3294
|
-
function
|
|
3294
|
+
function km(t) {
|
|
3295
3295
|
return !!(wt(t) && t.add);
|
|
3296
3296
|
}
|
|
3297
3297
|
function si(t, e) {
|
|
3298
3298
|
const n = t.getValue("willChange");
|
|
3299
|
-
if (
|
|
3299
|
+
if (km(n))
|
|
3300
3300
|
return n.add(e);
|
|
3301
3301
|
if (!n && ee.WillChange) {
|
|
3302
3302
|
const r = new ee.WillChange("auto");
|
|
@@ -3387,17 +3387,17 @@ function $l(t, e, { delay: n = 0, transitionOverride: r, type: i } = {}) {
|
|
|
3387
3387
|
if (window.MotionHandoffAnimation) {
|
|
3388
3388
|
const v = zl(t);
|
|
3389
3389
|
if (v) {
|
|
3390
|
-
const
|
|
3391
|
-
|
|
3390
|
+
const I = window.MotionHandoffAnimation(v, l, ot);
|
|
3391
|
+
I !== null && (h.startTime = I, b = !0);
|
|
3392
3392
|
}
|
|
3393
3393
|
}
|
|
3394
3394
|
si(t, l), u.start(aa(l, u, f, t.shouldReduceMotion && cl.has(l) ? { type: !1 } : h, t, b));
|
|
3395
|
-
const
|
|
3396
|
-
|
|
3395
|
+
const w = u.animation;
|
|
3396
|
+
w && c.push(w);
|
|
3397
3397
|
}
|
|
3398
3398
|
return s && Promise.all(c).then(() => {
|
|
3399
3399
|
ot.update(() => {
|
|
3400
|
-
s &&
|
|
3400
|
+
s && Im(t, s);
|
|
3401
3401
|
});
|
|
3402
3402
|
}), c;
|
|
3403
3403
|
}
|
|
@@ -3490,39 +3490,39 @@ function Hm(t) {
|
|
|
3490
3490
|
function s(c) {
|
|
3491
3491
|
const { props: d } = t, l = Yl(t.parent) || {}, u = [], f = /* @__PURE__ */ new Set();
|
|
3492
3492
|
let h = {}, m = 1 / 0;
|
|
3493
|
-
for (let
|
|
3494
|
-
const v = zm[
|
|
3495
|
-
P === !1 && (m =
|
|
3496
|
-
let
|
|
3497
|
-
if (
|
|
3498
|
-
!
|
|
3499
|
-
!S && !
|
|
3493
|
+
for (let w = 0; w < $m; w++) {
|
|
3494
|
+
const v = zm[w], I = n[v], S = d[v] !== void 0 ? d[v] : l[v], C = gn(S), P = v === c ? I.isActive : null;
|
|
3495
|
+
P === !1 && (m = w);
|
|
3496
|
+
let A = S === l[v] && S !== d[v] && C;
|
|
3497
|
+
if (A && r && t.manuallyAnimateOnMount && (A = !1), I.protectedKeys = { ...h }, // If it isn't active and hasn't *just* been set as inactive
|
|
3498
|
+
!I.isActive && P === null || // If we didn't and don't have any defined prop for this animation type
|
|
3499
|
+
!S && !I.prevProp || // Or if the prop doesn't define an animation
|
|
3500
3500
|
or(S) || typeof S == "boolean")
|
|
3501
3501
|
continue;
|
|
3502
|
-
const L = Ym(
|
|
3502
|
+
const L = Ym(I.prevProp, S);
|
|
3503
3503
|
let p = L || // If we're making this variant active, we want to always make it active
|
|
3504
|
-
v === c &&
|
|
3505
|
-
|
|
3504
|
+
v === c && I.isActive && !A && C || // If we removed a higher-priority variant (i is in reverse order)
|
|
3505
|
+
w > m && C, y = !1;
|
|
3506
3506
|
const T = Array.isArray(S) ? S : [S];
|
|
3507
|
-
let
|
|
3508
|
-
P === !1 && (
|
|
3509
|
-
const { prevResolvedValues: M = {} } =
|
|
3507
|
+
let k = T.reduce(i(v), {});
|
|
3508
|
+
P === !1 && (k = {});
|
|
3509
|
+
const { prevResolvedValues: M = {} } = I, D = {
|
|
3510
3510
|
...M,
|
|
3511
|
-
...
|
|
3511
|
+
...k
|
|
3512
3512
|
}, E = (g) => {
|
|
3513
|
-
p = !0, f.has(g) && (y = !0, f.delete(g)),
|
|
3513
|
+
p = !0, f.has(g) && (y = !0, f.delete(g)), I.needsAnimating[g] = !0;
|
|
3514
3514
|
const _ = t.getValue(g);
|
|
3515
3515
|
_ && (_.liveStyle = !1);
|
|
3516
3516
|
};
|
|
3517
3517
|
for (const g in D) {
|
|
3518
|
-
const _ =
|
|
3518
|
+
const _ = k[g], F = M[g];
|
|
3519
3519
|
if (h.hasOwnProperty(g))
|
|
3520
3520
|
continue;
|
|
3521
3521
|
let U = !1;
|
|
3522
|
-
ai(_) && ai(F) ? U = !Hl(_, F) : U = _ !== F, U ? _ != null ? E(g) : f.add(g) : _ !== void 0 && f.has(g) ? E(g) :
|
|
3522
|
+
ai(_) && ai(F) ? U = !Hl(_, F) : U = _ !== F, U ? _ != null ? E(g) : f.add(g) : _ !== void 0 && f.has(g) ? E(g) : I.protectedKeys[g] = !0;
|
|
3523
3523
|
}
|
|
3524
|
-
|
|
3525
|
-
const O =
|
|
3524
|
+
I.prevProp = S, I.prevResolvedValues = k, I.isActive && (h = { ...h, ...k }), r && t.blockInitialAnimation && (p = !1);
|
|
3525
|
+
const O = A && L;
|
|
3526
3526
|
p && (!O || y) && u.push(...T.map((g) => {
|
|
3527
3527
|
const _ = { type: v };
|
|
3528
3528
|
if (typeof g == "string" && r && !O && t.manuallyAnimateOnMount && t.parent) {
|
|
@@ -3539,15 +3539,15 @@ function Hm(t) {
|
|
|
3539
3539
|
}));
|
|
3540
3540
|
}
|
|
3541
3541
|
if (f.size) {
|
|
3542
|
-
const
|
|
3542
|
+
const w = {};
|
|
3543
3543
|
if (typeof d.initial != "boolean") {
|
|
3544
3544
|
const v = Be(t, Array.isArray(d.initial) ? d.initial[0] : d.initial);
|
|
3545
|
-
v && v.transition && (
|
|
3545
|
+
v && v.transition && (w.transition = v.transition);
|
|
3546
3546
|
}
|
|
3547
3547
|
f.forEach((v) => {
|
|
3548
|
-
const
|
|
3549
|
-
S && (S.liveStyle = !0),
|
|
3550
|
-
}), u.push({ animation:
|
|
3548
|
+
const I = t.getBaseTarget(v), S = t.getValue(v);
|
|
3549
|
+
S && (S.liveStyle = !0), w[v] = I ?? null;
|
|
3550
|
+
}), u.push({ animation: w });
|
|
3551
3551
|
}
|
|
3552
3552
|
let b = !!u.length;
|
|
3553
3553
|
return r && (d.initial === !1 || d.initial === d.animate) && !t.manuallyAnimateOnMount && (b = !1), r = !1, b ? e(u) : Promise.resolve();
|
|
@@ -3714,16 +3714,16 @@ class ql {
|
|
|
3714
3714
|
const f = Cr(this.lastMoveEventInfo, this.history), h = this.startEvent !== null, m = ip(f.offset, { x: 0, y: 0 }) >= this.distanceThreshold;
|
|
3715
3715
|
if (!h && !m)
|
|
3716
3716
|
return;
|
|
3717
|
-
const { point: b } = f, { timestamp:
|
|
3718
|
-
this.history.push({ ...b, timestamp:
|
|
3719
|
-
const { onStart: v, onMove:
|
|
3720
|
-
h || (v && v(this.lastMoveEvent, f), this.startEvent = this.lastMoveEvent),
|
|
3717
|
+
const { point: b } = f, { timestamp: w } = gt;
|
|
3718
|
+
this.history.push({ ...b, timestamp: w });
|
|
3719
|
+
const { onStart: v, onMove: I } = this.handlers;
|
|
3720
|
+
h || (v && v(this.lastMoveEvent, f), this.startEvent = this.lastMoveEvent), I && I(this.lastMoveEvent, f);
|
|
3721
3721
|
}, this.handlePointerMove = (f, h) => {
|
|
3722
3722
|
this.lastMoveEvent = f, this.lastMoveEventInfo = Er(h, this.transformPagePoint), ot.update(this.updatePoint, !0);
|
|
3723
3723
|
}, this.handlePointerUp = (f, h) => {
|
|
3724
3724
|
this.end();
|
|
3725
|
-
const { onEnd: m, onSessionEnd: b, resumeAnimation:
|
|
3726
|
-
if (this.dragSnapToOrigin &&
|
|
3725
|
+
const { onEnd: m, onSessionEnd: b, resumeAnimation: w } = this.handlers;
|
|
3726
|
+
if (this.dragSnapToOrigin && w && w(), !(this.lastMoveEvent && this.lastMoveEventInfo))
|
|
3727
3727
|
return;
|
|
3728
3728
|
const v = Cr(f.type === "pointercancel" ? this.lastMoveEventInfo : Er(h, this.transformPagePoint), this.history);
|
|
3729
3729
|
this.startEvent && m && m(f, v), b && b(f, v);
|
|
@@ -3847,21 +3847,21 @@ class mp {
|
|
|
3847
3847
|
if (h && !m && (this.openDragLock && this.openDragLock(), this.openDragLock = bh(h), !this.openDragLock))
|
|
3848
3848
|
return;
|
|
3849
3849
|
this.latestPointerEvent = u, this.latestPanInfo = f, this.isDragging = !0, this.currentDirection = null, this.resolveConstraints(), this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !0, this.visualElement.projection.target = void 0), jt((v) => {
|
|
3850
|
-
let
|
|
3851
|
-
if (Kt.test(
|
|
3850
|
+
let I = this.getAxisMotionValue(v).get() || 0;
|
|
3851
|
+
if (Kt.test(I)) {
|
|
3852
3852
|
const { projection: S } = this.visualElement;
|
|
3853
3853
|
if (S && S.layout) {
|
|
3854
3854
|
const C = S.layout.layoutBox[v];
|
|
3855
|
-
C && (
|
|
3855
|
+
C && (I = Pt(C) * (parseFloat(I) / 100));
|
|
3856
3856
|
}
|
|
3857
3857
|
}
|
|
3858
|
-
this.originPoint[v] =
|
|
3858
|
+
this.originPoint[v] = I;
|
|
3859
3859
|
}), b && ot.postRender(() => b(u, f)), si(this.visualElement, "transform");
|
|
3860
|
-
const { animationState:
|
|
3861
|
-
|
|
3860
|
+
const { animationState: w } = this.visualElement;
|
|
3861
|
+
w && w.setActive("whileDrag", !0);
|
|
3862
3862
|
}, o = (u, f) => {
|
|
3863
3863
|
this.latestPointerEvent = u, this.latestPanInfo = f;
|
|
3864
|
-
const { dragPropagation: h, dragDirectionLock: m, onDirectionLock: b, onDrag:
|
|
3864
|
+
const { dragPropagation: h, dragDirectionLock: m, onDirectionLock: b, onDrag: w } = this.getProps();
|
|
3865
3865
|
if (!h && !this.openDragLock)
|
|
3866
3866
|
return;
|
|
3867
3867
|
const { offset: v } = f;
|
|
@@ -3869,7 +3869,7 @@ class mp {
|
|
|
3869
3869
|
this.currentDirection = pp(v), this.currentDirection !== null && b && b(this.currentDirection);
|
|
3870
3870
|
return;
|
|
3871
3871
|
}
|
|
3872
|
-
this.updateAxis("x", f.point, v), this.updateAxis("y", f.point, v), this.visualElement.render(),
|
|
3872
|
+
this.updateAxis("x", f.point, v), this.updateAxis("y", f.point, v), this.visualElement.render(), w && w(u, f);
|
|
3873
3873
|
}, c = (u, f) => {
|
|
3874
3874
|
this.latestPointerEvent = u, this.latestPanInfo = f, this.stop(u, f), this.latestPointerEvent = null, this.latestPanInfo = null;
|
|
3875
3875
|
}, d = () => jt((u) => this.getAnimationState(u) === "paused" && this.getAxisMotionValue(u).animation?.play()), { dragSnapToOrigin: l } = this.getProps();
|
|
@@ -4123,7 +4123,7 @@ const Nn = {
|
|
|
4123
4123
|
*/
|
|
4124
4124
|
hasEverUpdated: !1
|
|
4125
4125
|
};
|
|
4126
|
-
let
|
|
4126
|
+
let Ir = !1;
|
|
4127
4127
|
class vp extends Uu {
|
|
4128
4128
|
/**
|
|
4129
4129
|
* This only mounts projection nodes for components that
|
|
@@ -4132,7 +4132,7 @@ class vp extends Uu {
|
|
|
4132
4132
|
*/
|
|
4133
4133
|
componentDidMount() {
|
|
4134
4134
|
const { visualElement: e, layoutGroup: n, switchLayoutGroup: r, layoutId: i } = this.props, { projection: a } = e;
|
|
4135
|
-
a && (n.group && n.group.add(a), r && r.register && i && r.register(a),
|
|
4135
|
+
a && (n.group && n.group.add(a), r && r.register && i && r.register(a), Ir && a.root.didUpdate(), a.addEventListener("animationComplete", () => {
|
|
4136
4136
|
this.safeToRemove();
|
|
4137
4137
|
}), a.setOptions({
|
|
4138
4138
|
...a.options,
|
|
@@ -4141,7 +4141,7 @@ class vp extends Uu {
|
|
|
4141
4141
|
}
|
|
4142
4142
|
getSnapshotBeforeUpdate(e) {
|
|
4143
4143
|
const { layoutDependency: n, visualElement: r, drag: i, isPresent: a } = this.props, { projection: s } = r;
|
|
4144
|
-
return s && (s.isPresent = a,
|
|
4144
|
+
return s && (s.isPresent = a, Ir = !0, i || e.layoutDependency !== n || n === void 0 || e.isPresent !== a ? s.willUpdate() : this.safeToRemove(), e.isPresent !== a && (a ? s.promote() : s.relegate() || ot.postRender(() => {
|
|
4145
4145
|
const o = s.getStack();
|
|
4146
4146
|
(!o || !o.members.length) && this.safeToRemove();
|
|
4147
4147
|
}))), null;
|
|
@@ -4154,7 +4154,7 @@ class vp extends Uu {
|
|
|
4154
4154
|
}
|
|
4155
4155
|
componentWillUnmount() {
|
|
4156
4156
|
const { visualElement: e, layoutGroup: n, switchLayoutGroup: r } = this.props, { projection: i } = e;
|
|
4157
|
-
|
|
4157
|
+
Ir = !0, i && (i.scheduleCheckAfterUnmount(), n && n.group && n.group.remove(i), r && r.deregister && r.deregister(i));
|
|
4158
4158
|
}
|
|
4159
4159
|
safeToRemove() {
|
|
4160
4160
|
const { safeToRemove: e } = this.props;
|
|
@@ -4234,9 +4234,9 @@ function Cp(t, e = 0, n = 1, r = 0.5, i, a = t, s = t) {
|
|
|
4234
4234
|
function Ts(t, e, [n, r, i], a, s) {
|
|
4235
4235
|
Cp(t, e[n], e[r], e[i], e.scale, a, s);
|
|
4236
4236
|
}
|
|
4237
|
-
const
|
|
4237
|
+
const Ip = ["x", "scaleX", "originX"], kp = ["y", "scaleY", "originY"];
|
|
4238
4238
|
function Ps(t, e, n, r) {
|
|
4239
|
-
Ts(t.x, e,
|
|
4239
|
+
Ts(t.x, e, Ip, n ? n.x : void 0, r ? r.x : void 0), Ts(t.y, e, kp, n ? n.y : void 0, r ? r.y : void 0);
|
|
4240
4240
|
}
|
|
4241
4241
|
function Es(t) {
|
|
4242
4242
|
return t.translate === 0 && t.scale === 1;
|
|
@@ -4250,13 +4250,13 @@ function Cs(t, e) {
|
|
|
4250
4250
|
function Mp(t, e) {
|
|
4251
4251
|
return Cs(t.x, e.x) && Cs(t.y, e.y);
|
|
4252
4252
|
}
|
|
4253
|
-
function
|
|
4253
|
+
function Is(t, e) {
|
|
4254
4254
|
return Math.round(t.min) === Math.round(e.min) && Math.round(t.max) === Math.round(e.max);
|
|
4255
4255
|
}
|
|
4256
4256
|
function nc(t, e) {
|
|
4257
|
-
return
|
|
4257
|
+
return Is(t.x, e.x) && Is(t.y, e.y);
|
|
4258
4258
|
}
|
|
4259
|
-
function
|
|
4259
|
+
function ks(t) {
|
|
4260
4260
|
return Pt(t.x) / Pt(t.y);
|
|
4261
4261
|
}
|
|
4262
4262
|
function Ms(t, e) {
|
|
@@ -4326,7 +4326,7 @@ function Dp(t, e, n) {
|
|
|
4326
4326
|
const o = t.x.scale * e.x, c = t.y.scale * e.y;
|
|
4327
4327
|
return (o !== 1 || c !== 1) && (r += `scale(${o}, ${c})`), r || "none";
|
|
4328
4328
|
}
|
|
4329
|
-
const
|
|
4329
|
+
const kr = ["", "X", "Y", "Z"], jp = 1e3;
|
|
4330
4330
|
let Fp = 0;
|
|
4331
4331
|
function Mr(t, e, n, r) {
|
|
4332
4332
|
const { latestValues: i } = e;
|
|
@@ -4391,15 +4391,15 @@ function ic({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4391
4391
|
this.target = void 0, this.relativeTarget = void 0;
|
|
4392
4392
|
return;
|
|
4393
4393
|
}
|
|
4394
|
-
const m = this.options.transition || d.getDefaultTransition() || Gp, { onLayoutAnimationStart: b, onLayoutAnimationComplete:
|
|
4395
|
-
if (this.options.layoutRoot || this.resumeFrom ||
|
|
4394
|
+
const m = this.options.transition || d.getDefaultTransition() || Gp, { onLayoutAnimationStart: b, onLayoutAnimationComplete: w } = d.getProps(), v = !this.targetLayout || !nc(this.targetLayout, h), I = !u && f;
|
|
4395
|
+
if (this.options.layoutRoot || this.resumeFrom || I || u && (v || !this.currentAnimation)) {
|
|
4396
4396
|
this.resumeFrom && (this.resumingFrom = this.resumeFrom, this.resumingFrom.resumingFrom = void 0);
|
|
4397
4397
|
const S = {
|
|
4398
4398
|
...Yi(m, "layout"),
|
|
4399
4399
|
onPlay: b,
|
|
4400
|
-
onComplete:
|
|
4400
|
+
onComplete: w
|
|
4401
4401
|
};
|
|
4402
|
-
(d.shouldReduceMotion || this.options.layoutRoot) && (S.delay = 0, S.type = !1), this.startAnimation(S), this.setAnimationOrigin(l,
|
|
4402
|
+
(d.shouldReduceMotion || this.options.layoutRoot) && (S.delay = 0, S.type = !1), this.startAnimation(S), this.setAnimationOrigin(l, I);
|
|
4403
4403
|
} else
|
|
4404
4404
|
u || js(this), this.isLead() && this.options.onExitComplete && this.options.onExitComplete();
|
|
4405
4405
|
this.targetLayout = h;
|
|
@@ -4648,12 +4648,12 @@ function ic({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4648
4648
|
setAnimationOrigin(s, o = !1) {
|
|
4649
4649
|
const c = this.snapshot, d = c ? c.latestValues : {}, l = { ...this.latestValues }, u = Ve();
|
|
4650
4650
|
(!this.relativeParent || !this.relativeParent.options.layoutRoot) && (this.relativeTarget = this.relativeTargetOrigin = void 0), this.attemptToResolveRelativeTarget = !o;
|
|
4651
|
-
const f = ht(), h = c ? c.source : void 0, m = this.layout ? this.layout.source : void 0, b = h !== m,
|
|
4651
|
+
const f = ht(), h = c ? c.source : void 0, m = this.layout ? this.layout.source : void 0, b = h !== m, w = this.getStack(), v = !w || w.members.length <= 1, I = !!(b && !v && this.options.crossfade === !0 && !this.path.some(Yp));
|
|
4652
4652
|
this.animationProgress = 0;
|
|
4653
4653
|
let S;
|
|
4654
4654
|
this.mixTargetDelta = (C) => {
|
|
4655
4655
|
const P = C / 1e3;
|
|
4656
|
-
Fs(u.x, s.x, P), Fs(u.y, s.y, P), this.setTargetDelta(u), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (Xn(f, this.layout.layoutBox, this.relativeParent.layout.layoutBox), Hp(this.relativeTarget, this.relativeTargetOrigin, f, P), S && Mp(this.relativeTarget, S) && (this.isProjectionDirty = !1), S || (S = ht()), Vt(S, this.relativeTarget)), b && (this.animationValues = l, Tp(l, d, this.latestValues, P,
|
|
4656
|
+
Fs(u.x, s.x, P), Fs(u.y, s.y, P), this.setTargetDelta(u), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (Xn(f, this.layout.layoutBox, this.relativeParent.layout.layoutBox), Hp(this.relativeTarget, this.relativeTargetOrigin, f, P), S && Mp(this.relativeTarget, S) && (this.isProjectionDirty = !1), S || (S = ht()), Vt(S, this.relativeTarget)), b && (this.animationValues = l, Tp(l, d, this.latestValues, P, I, v)), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = P;
|
|
4657
4657
|
}, this.mixTargetDelta(this.options.layoutRoot ? 1e3 : 0);
|
|
4658
4658
|
}
|
|
4659
4659
|
startAnimation(s) {
|
|
@@ -4738,8 +4738,8 @@ function ic({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4738
4738
|
return;
|
|
4739
4739
|
const d = {};
|
|
4740
4740
|
c.z && Mr("z", s, d, this.animationValues);
|
|
4741
|
-
for (let l = 0; l <
|
|
4742
|
-
Mr(`rotate${
|
|
4741
|
+
for (let l = 0; l < kr.length; l++)
|
|
4742
|
+
Mr(`rotate${kr[l]}`, s, d, this.animationValues), Mr(`skew${kr[l]}`, s, d, this.animationValues);
|
|
4743
4743
|
s.render();
|
|
4744
4744
|
for (const l in d)
|
|
4745
4745
|
s.setStaticValue(l, d[l]), this.animationValues && (this.animationValues[l] = d[l]);
|
|
@@ -4772,13 +4772,13 @@ function ic({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4772
4772
|
for (const m in ei) {
|
|
4773
4773
|
if (l[m] === void 0)
|
|
4774
4774
|
continue;
|
|
4775
|
-
const { correct: b, applyTo:
|
|
4776
|
-
if (
|
|
4777
|
-
const S =
|
|
4775
|
+
const { correct: b, applyTo: w, isCSSVariable: v } = ei[m], I = u === "none" ? l[m] : b(l[m], d);
|
|
4776
|
+
if (w) {
|
|
4777
|
+
const S = w.length;
|
|
4778
4778
|
for (let C = 0; C < S; C++)
|
|
4779
|
-
s[
|
|
4779
|
+
s[w[C]] = I;
|
|
4780
4780
|
} else
|
|
4781
|
-
v ? this.options.visualElement.renderState.vars[m] =
|
|
4781
|
+
v ? this.options.visualElement.renderState.vars[m] = I : s[m] = I;
|
|
4782
4782
|
}
|
|
4783
4783
|
this.options.layoutId && (s.pointerEvents = d === this ? Vn(o?.pointerEvents) || "" : "none");
|
|
4784
4784
|
}
|
|
@@ -4894,7 +4894,7 @@ function Kp(t) {
|
|
|
4894
4894
|
Vs(t.x), Vs(t.y);
|
|
4895
4895
|
}
|
|
4896
4896
|
function ac(t, e, n) {
|
|
4897
|
-
return t === "position" || t === "preserve-aspect" && !np(
|
|
4897
|
+
return t === "position" || t === "preserve-aspect" && !np(ks(e), ks(n), 0.2);
|
|
4898
4898
|
}
|
|
4899
4899
|
function Xp(t) {
|
|
4900
4900
|
return t !== t.root && t.scroll?.wasRoot;
|
|
@@ -5354,8 +5354,8 @@ var ie = !!at.documentElement && !!at.head && typeof at.addEventListener == "fun
|
|
|
5354
5354
|
GROUP: "duotone-group",
|
|
5355
5355
|
PRIMARY: "primary",
|
|
5356
5356
|
SECONDARY: "secondary"
|
|
5357
|
-
}, hc = ["fa-classic", "fa-duotone", "fa-sharp", "fa-sharp-duotone", "fa-thumbprint", "fa-whiteboard", "fa-notdog", "fa-notdog-duo", "fa-chisel", "fa-etch", "fa-jelly", "fa-jelly-fill", "fa-jelly-duo", "fa-slab", "fa-slab-press", "fa-utility", "fa-utility-duo", "fa-utility-fill"], yt = "classic", Tn = "duotone", mc = "sharp", pc = "sharp-duotone", gc = "chisel", yc = "etch", vc = "jelly", bc = "jelly-duo", xc = "jelly-fill", wc = "notdog", Ac = "notdog-duo", Sc = "slab", Tc = "slab-press", Pc = "thumbprint", Ec = "utility", Cc = "utility-duo",
|
|
5358
|
-
jr = {}, Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(jr, yt, P0), Tn, E0), mc, C0), pc,
|
|
5357
|
+
}, hc = ["fa-classic", "fa-duotone", "fa-sharp", "fa-sharp-duotone", "fa-thumbprint", "fa-whiteboard", "fa-notdog", "fa-notdog-duo", "fa-chisel", "fa-etch", "fa-jelly", "fa-jelly-fill", "fa-jelly-duo", "fa-slab", "fa-slab-press", "fa-utility", "fa-utility-duo", "fa-utility-fill"], yt = "classic", Tn = "duotone", mc = "sharp", pc = "sharp-duotone", gc = "chisel", yc = "etch", vc = "jelly", bc = "jelly-duo", xc = "jelly-fill", wc = "notdog", Ac = "notdog-duo", Sc = "slab", Tc = "slab-press", Pc = "thumbprint", Ec = "utility", Cc = "utility-duo", Ic = "utility-fill", kc = "whiteboard", P0 = "Classic", E0 = "Duotone", C0 = "Sharp", I0 = "Sharp Duotone", k0 = "Chisel", M0 = "Etch", R0 = "Jelly", D0 = "Jelly Duo", j0 = "Jelly Fill", F0 = "Notdog", L0 = "Notdog Duo", O0 = "Slab", _0 = "Slab Press", V0 = "Thumbprint", N0 = "Utility", U0 = "Utility Duo", B0 = "Utility Fill", z0 = "Whiteboard", Mc = [yt, Tn, mc, pc, gc, yc, vc, bc, xc, wc, Ac, Sc, Tc, Pc, Ec, Cc, Ic, kc];
|
|
5358
|
+
jr = {}, Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(jr, yt, P0), Tn, E0), mc, C0), pc, I0), gc, k0), yc, M0), vc, R0), bc, D0), xc, j0), wc, F0), Z(Z(Z(Z(Z(Z(Z(Z(jr, Ac, L0), Sc, O0), Tc, _0), Pc, V0), Ec, N0), Cc, U0), Ic, B0), kc, z0);
|
|
5359
5359
|
var $0 = {
|
|
5360
5360
|
classic: {
|
|
5361
5361
|
900: "fas",
|
|
@@ -5733,8 +5733,8 @@ var Z0 = {
|
|
|
5733
5733
|
SWAP_OPACITY: "swap-opacity",
|
|
5734
5734
|
PRIMARY: "primary",
|
|
5735
5735
|
SECONDARY: "secondary"
|
|
5736
|
-
}, e1 = ["fa-classic", "fa-duotone", "fa-sharp", "fa-sharp-duotone", "fa-thumbprint", "fa-whiteboard", "fa-notdog", "fa-notdog-duo", "fa-chisel", "fa-etch", "fa-jelly", "fa-jelly-fill", "fa-jelly-duo", "fa-slab", "fa-slab-press", "fa-utility", "fa-utility-duo", "fa-utility-fill"], n1 = "classic", r1 = "duotone", i1 = "sharp", a1 = "sharp-duotone", s1 = "chisel", o1 = "etch", l1 = "jelly", c1 = "jelly-duo", u1 = "jelly-fill", f1 = "notdog", d1 = "notdog-duo", h1 = "slab", m1 = "slab-press", p1 = "thumbprint", g1 = "utility", y1 = "utility-duo", v1 = "utility-fill", b1 = "whiteboard", x1 = "Classic", w1 = "Duotone", A1 = "Sharp", S1 = "Sharp Duotone", T1 = "Chisel", P1 = "Etch", E1 = "Jelly", C1 = "Jelly Duo",
|
|
5737
|
-
Fr = {}, Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Fr, n1, x1), r1, w1), i1, A1), a1, S1), s1, T1), o1, P1), l1, E1), c1, C1), u1,
|
|
5736
|
+
}, e1 = ["fa-classic", "fa-duotone", "fa-sharp", "fa-sharp-duotone", "fa-thumbprint", "fa-whiteboard", "fa-notdog", "fa-notdog-duo", "fa-chisel", "fa-etch", "fa-jelly", "fa-jelly-fill", "fa-jelly-duo", "fa-slab", "fa-slab-press", "fa-utility", "fa-utility-duo", "fa-utility-fill"], n1 = "classic", r1 = "duotone", i1 = "sharp", a1 = "sharp-duotone", s1 = "chisel", o1 = "etch", l1 = "jelly", c1 = "jelly-duo", u1 = "jelly-fill", f1 = "notdog", d1 = "notdog-duo", h1 = "slab", m1 = "slab-press", p1 = "thumbprint", g1 = "utility", y1 = "utility-duo", v1 = "utility-fill", b1 = "whiteboard", x1 = "Classic", w1 = "Duotone", A1 = "Sharp", S1 = "Sharp Duotone", T1 = "Chisel", P1 = "Etch", E1 = "Jelly", C1 = "Jelly Duo", I1 = "Jelly Fill", k1 = "Notdog", M1 = "Notdog Duo", R1 = "Slab", D1 = "Slab Press", j1 = "Thumbprint", F1 = "Utility", L1 = "Utility Duo", O1 = "Utility Fill", _1 = "Whiteboard";
|
|
5737
|
+
Fr = {}, Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Fr, n1, x1), r1, w1), i1, A1), a1, S1), s1, T1), o1, P1), l1, E1), c1, C1), u1, I1), f1, k1), Z(Z(Z(Z(Z(Z(Z(Z(Fr, d1, M1), h1, R1), m1, D1), p1, j1), g1, F1), y1, L1), v1, O1), b1, _1);
|
|
5738
5738
|
var V1 = "kit", N1 = "kit-duotone", U1 = "Kit", B1 = "Kit Duotone";
|
|
5739
5739
|
Z(Z({}, V1, U1), N1, B1);
|
|
5740
5740
|
var z1 = {
|
|
@@ -5914,7 +5914,7 @@ var z1 = {
|
|
|
5914
5914
|
"Font Awesome 5 Duotone": {
|
|
5915
5915
|
900: "fad"
|
|
5916
5916
|
}
|
|
5917
|
-
}, ne = "___FONT_AWESOME___", di = 16, Fc = "fa", Lc = "svg-inline--fa",
|
|
5917
|
+
}, ne = "___FONT_AWESOME___", di = 16, Fc = "fa", Lc = "svg-inline--fa", Ie = "data-fa-i2svg", hi = "data-fa-pseudo-element", q1 = "data-fa-pseudo-element-pending", la = "data-prefix", ca = "data-icon", Xs = "fontawesome-i2svg", Q1 = "async", Z1 = ["HTML", "HEAD", "STYLE", "SCRIPT"], Oc = ["::before", "::after", ":before", ":after"], _c = (function() {
|
|
5918
5918
|
try {
|
|
5919
5919
|
return process.env.NODE_ENV === "production";
|
|
5920
5920
|
} catch {
|
|
@@ -6851,7 +6851,7 @@ function dr(t) {
|
|
|
6851
6851
|
family: u
|
|
6852
6852
|
})
|
|
6853
6853
|
});
|
|
6854
|
-
return z(z(z({}, f),
|
|
6854
|
+
return z(z(z({}, f), Ig({
|
|
6855
6855
|
values: t,
|
|
6856
6856
|
family: u,
|
|
6857
6857
|
styles: vn,
|
|
@@ -6880,11 +6880,11 @@ var Eg = Mc.filter(function(t) {
|
|
|
6880
6880
|
}).map(function(t) {
|
|
6881
6881
|
return Object.keys(fi[t]);
|
|
6882
6882
|
}).flat();
|
|
6883
|
-
function
|
|
6883
|
+
function Ig(t) {
|
|
6884
6884
|
var e = t.values, n = t.family, r = t.canonical, i = t.givenPrefix, a = i === void 0 ? "" : i, s = t.styles, o = s === void 0 ? {} : s, c = t.config, d = c === void 0 ? {} : c, l = n === Tn, u = e.includes("fa-duotone") || e.includes("fad"), f = d.familyDefault === "duotone", h = r.prefix === "fad" || r.prefix === "fa-duotone";
|
|
6885
6885
|
if (!l && (u || f || h) && (r.prefix = "fad"), (e.includes("fa-brands") || e.includes("fab")) && (r.prefix = "fab"), !r.prefix && Eg.includes(n)) {
|
|
6886
|
-
var m = Object.keys(o).find(function(
|
|
6887
|
-
return Cg.includes(
|
|
6886
|
+
var m = Object.keys(o).find(function(w) {
|
|
6887
|
+
return Cg.includes(w);
|
|
6888
6888
|
});
|
|
6889
6889
|
if (m || d.autoFetchSvg) {
|
|
6890
6890
|
var b = H0.get(n).defaultShortPrefixId;
|
|
@@ -6893,7 +6893,7 @@ function kg(t) {
|
|
|
6893
6893
|
}
|
|
6894
6894
|
return (r.prefix === "fa" || a === "fa") && (r.prefix = de() || "fas"), r;
|
|
6895
6895
|
}
|
|
6896
|
-
var
|
|
6896
|
+
var kg = /* @__PURE__ */ (function() {
|
|
6897
6897
|
function t() {
|
|
6898
6898
|
h0(this, t), this.definitions = {};
|
|
6899
6899
|
}
|
|
@@ -6956,7 +6956,7 @@ function vi(t, e) {
|
|
|
6956
6956
|
e = s.apply(null, [e].concat(r));
|
|
6957
6957
|
}), e;
|
|
6958
6958
|
}
|
|
6959
|
-
function
|
|
6959
|
+
function ke(t) {
|
|
6960
6960
|
for (var e = arguments.length, n = new Array(e > 1 ? e - 1 : 0), r = 1; r < e; r++)
|
|
6961
6961
|
n[r - 1] = arguments[r];
|
|
6962
6962
|
var i = Ne[t] || [];
|
|
@@ -6974,19 +6974,19 @@ function bi(t) {
|
|
|
6974
6974
|
if (e)
|
|
6975
6975
|
return e = Se(n, e) || e, Js(eu.definitions, n, e) || Js(Bt.styles, n, e);
|
|
6976
6976
|
}
|
|
6977
|
-
var eu = new
|
|
6978
|
-
G.autoReplaceSvg = !1, G.observeMutations = !1,
|
|
6977
|
+
var eu = new kg(), Dg = function() {
|
|
6978
|
+
G.autoReplaceSvg = !1, G.observeMutations = !1, ke("noAuto");
|
|
6979
6979
|
}, jg = {
|
|
6980
6980
|
i2svg: function() {
|
|
6981
6981
|
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
6982
|
-
return ie ? (
|
|
6982
|
+
return ie ? (ke("beforeI2svg", e), he("pseudoElements2svg", e), he("i2svg", e)) : Promise.reject(new Error("Operation requires a DOM of some kind."));
|
|
6983
6983
|
},
|
|
6984
6984
|
watch: function() {
|
|
6985
6985
|
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, n = e.autoReplaceSvgRoot;
|
|
6986
6986
|
G.autoReplaceSvg === !1 && (G.autoReplaceSvg = !0), G.observeMutations = !0, gg(function() {
|
|
6987
6987
|
Lg({
|
|
6988
6988
|
autoReplaceSvgRoot: n
|
|
6989
|
-
}),
|
|
6989
|
+
}), ke("watch", e);
|
|
6990
6990
|
});
|
|
6991
6991
|
}
|
|
6992
6992
|
}, Fg = {
|
|
@@ -7098,7 +7098,7 @@ function pa(t) {
|
|
|
7098
7098
|
return d.classes.indexOf(P) === -1;
|
|
7099
7099
|
}).filter(function(P) {
|
|
7100
7100
|
return P !== "" || !!P;
|
|
7101
|
-
}).concat(d.classes).join(" "),
|
|
7101
|
+
}).concat(d.classes).join(" "), w = {
|
|
7102
7102
|
children: [],
|
|
7103
7103
|
attributes: z(z({}, d.attributes), {}, {
|
|
7104
7104
|
"data-prefix": i,
|
|
@@ -7108,8 +7108,8 @@ function pa(t) {
|
|
|
7108
7108
|
viewBox: "0 0 ".concat(h, " ").concat(m)
|
|
7109
7109
|
})
|
|
7110
7110
|
};
|
|
7111
|
-
!Vg(d.attributes) && !d.attributes["aria-hidden"] && (
|
|
7112
|
-
var v = z(z({},
|
|
7111
|
+
!Vg(d.attributes) && !d.attributes["aria-hidden"] && (w.attributes["aria-hidden"] = "true"), u && (w.attributes[Ie] = "");
|
|
7112
|
+
var v = z(z({}, w), {}, {
|
|
7113
7113
|
prefix: i,
|
|
7114
7114
|
iconName: a,
|
|
7115
7115
|
main: n,
|
|
@@ -7118,20 +7118,20 @@ function pa(t) {
|
|
|
7118
7118
|
transform: s,
|
|
7119
7119
|
symbol: o,
|
|
7120
7120
|
styles: z({}, d.styles)
|
|
7121
|
-
}),
|
|
7121
|
+
}), I = r.found && n.found ? he("generateAbstractMask", v) || {
|
|
7122
7122
|
children: [],
|
|
7123
7123
|
attributes: {}
|
|
7124
7124
|
} : he("generateAbstractIcon", v) || {
|
|
7125
7125
|
children: [],
|
|
7126
7126
|
attributes: {}
|
|
7127
|
-
}, S =
|
|
7127
|
+
}, S = I.children, C = I.attributes;
|
|
7128
7128
|
return v.children = S, v.attributes = C, o ? _g(v) : Og(v);
|
|
7129
7129
|
}
|
|
7130
7130
|
function io(t) {
|
|
7131
7131
|
var e = t.content, n = t.width, r = t.height, i = t.transform, a = t.extra, s = t.watchable, o = s === void 0 ? !1 : s, c = z(z({}, a.attributes), {}, {
|
|
7132
7132
|
class: a.classes.join(" ")
|
|
7133
7133
|
});
|
|
7134
|
-
o && (c[
|
|
7134
|
+
o && (c[Ie] = "");
|
|
7135
7135
|
var d = z({}, a.styles);
|
|
7136
7136
|
da(i) && (d.transform = hg({
|
|
7137
7137
|
transform: i,
|
|
@@ -7235,7 +7235,7 @@ var ao = function() {
|
|
|
7235
7235
|
}, Bn = function() {
|
|
7236
7236
|
};
|
|
7237
7237
|
function so(t) {
|
|
7238
|
-
var e = t.getAttribute ? t.getAttribute(
|
|
7238
|
+
var e = t.getAttribute ? t.getAttribute(Ie) : null;
|
|
7239
7239
|
return typeof e == "string";
|
|
7240
7240
|
}
|
|
7241
7241
|
function $g(t) {
|
|
@@ -7282,7 +7282,7 @@ var zn = {
|
|
|
7282
7282
|
if (n.parentNode)
|
|
7283
7283
|
if (e[1].forEach(function(i) {
|
|
7284
7284
|
n.parentNode.insertBefore(ru(i), n);
|
|
7285
|
-
}), n.getAttribute(
|
|
7285
|
+
}), n.getAttribute(Ie) === null && G.keepOriginalSource) {
|
|
7286
7286
|
var r = at.createComment(Kg(n));
|
|
7287
7287
|
n.parentNode.replaceChild(r, n);
|
|
7288
7288
|
} else
|
|
@@ -7306,7 +7306,7 @@ var zn = {
|
|
|
7306
7306
|
return En(o);
|
|
7307
7307
|
}).join(`
|
|
7308
7308
|
`);
|
|
7309
|
-
n.setAttribute(
|
|
7309
|
+
n.setAttribute(Ie, ""), n.innerHTML = s;
|
|
7310
7310
|
}
|
|
7311
7311
|
};
|
|
7312
7312
|
function oo(t) {
|
|
@@ -7434,8 +7434,8 @@ function uo(t) {
|
|
|
7434
7434
|
return n.remove("".concat(Xs, "-").concat(u));
|
|
7435
7435
|
}, a = G.autoFetchSvg ? ey() : hc.concat(Object.keys(ty));
|
|
7436
7436
|
a.includes("fa") || a.push("fa");
|
|
7437
|
-
var s = [".".concat(Nc, ":not([").concat(
|
|
7438
|
-
return ".".concat(l, ":not([").concat(
|
|
7437
|
+
var s = [".".concat(Nc, ":not([").concat(Ie, "])")].concat(a.map(function(l) {
|
|
7438
|
+
return ".".concat(l, ":not([").concat(Ie, "])");
|
|
7439
7439
|
})).join(", ");
|
|
7440
7440
|
if (s.length === 0)
|
|
7441
7441
|
return Promise.resolve();
|
|
@@ -7482,13 +7482,13 @@ function ry(t) {
|
|
|
7482
7482
|
};
|
|
7483
7483
|
}
|
|
7484
7484
|
var iy = function(e) {
|
|
7485
|
-
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = n.transform, i = r === void 0 ? Yt : r, a = n.symbol, s = a === void 0 ? !1 : a, o = n.mask, c = o === void 0 ? null : o, d = n.maskId, l = d === void 0 ? null : d, u = n.classes, f = u === void 0 ? [] : u, h = n.attributes, m = h === void 0 ? {} : h, b = n.styles,
|
|
7485
|
+
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = n.transform, i = r === void 0 ? Yt : r, a = n.symbol, s = a === void 0 ? !1 : a, o = n.mask, c = o === void 0 ? null : o, d = n.maskId, l = d === void 0 ? null : d, u = n.classes, f = u === void 0 ? [] : u, h = n.attributes, m = h === void 0 ? {} : h, b = n.styles, w = b === void 0 ? {} : b;
|
|
7486
7486
|
if (e) {
|
|
7487
|
-
var v = e.prefix,
|
|
7487
|
+
var v = e.prefix, I = e.iconName, S = e.icon;
|
|
7488
7488
|
return hr(z({
|
|
7489
7489
|
type: "icon"
|
|
7490
7490
|
}, e), function() {
|
|
7491
|
-
return
|
|
7491
|
+
return ke("beforeDOMElementCreation", {
|
|
7492
7492
|
iconDefinition: e,
|
|
7493
7493
|
params: n
|
|
7494
7494
|
}), pa({
|
|
@@ -7502,13 +7502,13 @@ var iy = function(e) {
|
|
|
7502
7502
|
}
|
|
7503
7503
|
},
|
|
7504
7504
|
prefix: v,
|
|
7505
|
-
iconName:
|
|
7505
|
+
iconName: I,
|
|
7506
7506
|
transform: z(z({}, Yt), i),
|
|
7507
7507
|
symbol: s,
|
|
7508
7508
|
maskId: l,
|
|
7509
7509
|
extra: {
|
|
7510
7510
|
attributes: m,
|
|
7511
|
-
styles:
|
|
7511
|
+
styles: w,
|
|
7512
7512
|
classes: f
|
|
7513
7513
|
}
|
|
7514
7514
|
});
|
|
@@ -7541,11 +7541,11 @@ var iy = function(e) {
|
|
|
7541
7541
|
height: 512,
|
|
7542
7542
|
icon: {}
|
|
7543
7543
|
})]).then(function(h) {
|
|
7544
|
-
var m = cr(h, 2), b = m[0],
|
|
7544
|
+
var m = cr(h, 2), b = m[0], w = m[1];
|
|
7545
7545
|
u([n, pa({
|
|
7546
7546
|
icons: {
|
|
7547
7547
|
main: b,
|
|
7548
|
-
mask:
|
|
7548
|
+
mask: w
|
|
7549
7549
|
},
|
|
7550
7550
|
prefix: a,
|
|
7551
7551
|
iconName: i,
|
|
@@ -7580,7 +7580,7 @@ var iy = function(e) {
|
|
|
7580
7580
|
return hr({
|
|
7581
7581
|
type: "layer"
|
|
7582
7582
|
}, function() {
|
|
7583
|
-
|
|
7583
|
+
ke("beforeDOMElementCreation", {
|
|
7584
7584
|
assembler: n,
|
|
7585
7585
|
params: r
|
|
7586
7586
|
});
|
|
@@ -7611,7 +7611,7 @@ var iy = function(e) {
|
|
|
7611
7611
|
type: "counter",
|
|
7612
7612
|
content: n
|
|
7613
7613
|
}, function() {
|
|
7614
|
-
return
|
|
7614
|
+
return ke("beforeDOMElementCreation", {
|
|
7615
7615
|
content: n,
|
|
7616
7616
|
params: r
|
|
7617
7617
|
}), Ng({
|
|
@@ -7635,7 +7635,7 @@ var iy = function(e) {
|
|
|
7635
7635
|
type: "text",
|
|
7636
7636
|
content: n
|
|
7637
7637
|
}, function() {
|
|
7638
|
-
return
|
|
7638
|
+
return ke("beforeDOMElementCreation", {
|
|
7639
7639
|
content: n,
|
|
7640
7640
|
params: r
|
|
7641
7641
|
}), io({
|
|
@@ -7696,28 +7696,28 @@ function mo(t, e) {
|
|
|
7696
7696
|
return new Promise(function(r, i) {
|
|
7697
7697
|
if (t.getAttribute(n) !== null)
|
|
7698
7698
|
return r();
|
|
7699
|
-
var a = Qe(t.children), s = a.filter(function(
|
|
7700
|
-
return
|
|
7699
|
+
var a = Qe(t.children), s = a.filter(function(A) {
|
|
7700
|
+
return A.getAttribute(hi) === e;
|
|
7701
7701
|
})[0], o = fe.getComputedStyle(t, e), c = o.getPropertyValue("font-family"), d = c.match(eg), l = o.getPropertyValue("font-weight"), u = o.getPropertyValue("content");
|
|
7702
7702
|
if (s && !d)
|
|
7703
7703
|
return t.removeChild(s), r();
|
|
7704
7704
|
if (d && u !== "none" && u !== "") {
|
|
7705
|
-
var f = o.getPropertyValue("content"), h = dy(c, l), m = uy(f), b = d[0].startsWith("FontAwesome"),
|
|
7705
|
+
var f = o.getPropertyValue("content"), h = dy(c, l), m = uy(f), b = d[0].startsWith("FontAwesome"), w = fy(o), v = ma(h, m), I = v;
|
|
7706
7706
|
if (b) {
|
|
7707
7707
|
var S = Ag(m);
|
|
7708
7708
|
S.iconName && S.prefix && (v = S.iconName, h = S.prefix);
|
|
7709
7709
|
}
|
|
7710
|
-
if (v && !
|
|
7711
|
-
t.setAttribute(n,
|
|
7710
|
+
if (v && !w && (!s || s.getAttribute(la) !== h || s.getAttribute(ca) !== I)) {
|
|
7711
|
+
t.setAttribute(n, I), s && t.removeChild(s);
|
|
7712
7712
|
var C = Jg(), P = C.extra;
|
|
7713
|
-
P.attributes[hi] = e, wi(v, h).then(function(
|
|
7713
|
+
P.attributes[hi] = e, wi(v, h).then(function(A) {
|
|
7714
7714
|
var L = pa(z(z({}, C), {}, {
|
|
7715
7715
|
icons: {
|
|
7716
|
-
main:
|
|
7716
|
+
main: A,
|
|
7717
7717
|
mask: tu()
|
|
7718
7718
|
},
|
|
7719
7719
|
prefix: h,
|
|
7720
|
-
iconName:
|
|
7720
|
+
iconName: I,
|
|
7721
7721
|
extra: P,
|
|
7722
7722
|
watchable: !0
|
|
7723
7723
|
})), p = at.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
@@ -7821,12 +7821,12 @@ If it declares any Font Awesome CSS pseudo-elements, they will not be rendered a
|
|
|
7821
7821
|
} catch {
|
|
7822
7822
|
}
|
|
7823
7823
|
}
|
|
7824
|
-
return new Promise(function(b,
|
|
7825
|
-
var v = Qe(n).filter(my).map(hy),
|
|
7824
|
+
return new Promise(function(b, w) {
|
|
7825
|
+
var v = Qe(n).filter(my).map(hy), I = ga.begin("searchPseudoElements");
|
|
7826
7826
|
au(), Promise.all(v).then(function() {
|
|
7827
|
-
|
|
7827
|
+
I(), Si(), b();
|
|
7828
7828
|
}).catch(function() {
|
|
7829
|
-
|
|
7829
|
+
I(), Si(), w();
|
|
7830
7830
|
});
|
|
7831
7831
|
});
|
|
7832
7832
|
}
|
|
@@ -7996,7 +7996,7 @@ var wy = {
|
|
|
7996
7996
|
})
|
|
7997
7997
|
}, b = l.children ? {
|
|
7998
7998
|
children: l.children.map(vo)
|
|
7999
|
-
} : {},
|
|
7999
|
+
} : {}, w = {
|
|
8000
8000
|
tag: "g",
|
|
8001
8001
|
attributes: z({}, h.inner),
|
|
8002
8002
|
children: [vo(z({
|
|
@@ -8006,11 +8006,11 @@ var wy = {
|
|
|
8006
8006
|
}, v = {
|
|
8007
8007
|
tag: "g",
|
|
8008
8008
|
attributes: z({}, h.outer),
|
|
8009
|
-
children: [
|
|
8010
|
-
},
|
|
8009
|
+
children: [w]
|
|
8010
|
+
}, I = "mask-".concat(o || Qs()), S = "clip-".concat(o || Qs()), C = {
|
|
8011
8011
|
tag: "mask",
|
|
8012
8012
|
attributes: z(z({}, Nr), {}, {
|
|
8013
|
-
id:
|
|
8013
|
+
id: I,
|
|
8014
8014
|
maskUnits: "userSpaceOnUse",
|
|
8015
8015
|
maskContentUnits: "userSpaceOnUse"
|
|
8016
8016
|
}),
|
|
@@ -8030,7 +8030,7 @@ var wy = {
|
|
|
8030
8030
|
attributes: z({
|
|
8031
8031
|
fill: "currentColor",
|
|
8032
8032
|
"clip-path": "url(#".concat(S, ")"),
|
|
8033
|
-
mask: "url(#".concat(
|
|
8033
|
+
mask: "url(#".concat(I, ")")
|
|
8034
8034
|
}, Nr)
|
|
8035
8035
|
}), {
|
|
8036
8036
|
children: r,
|
|
@@ -8139,10 +8139,10 @@ function Cy(t) {
|
|
|
8139
8139
|
function cu(t) {
|
|
8140
8140
|
return Cy(t) ? t : (t = t.replace(/[_-]+(.)?/g, (e, n) => n ? n.toUpperCase() : ""), t.charAt(0).toLowerCase() + t.slice(1));
|
|
8141
8141
|
}
|
|
8142
|
-
function
|
|
8142
|
+
function Iy(t) {
|
|
8143
8143
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
8144
8144
|
}
|
|
8145
|
-
var De = /* @__PURE__ */ new Map(),
|
|
8145
|
+
var De = /* @__PURE__ */ new Map(), ky = 1e3;
|
|
8146
8146
|
function My(t) {
|
|
8147
8147
|
if (De.has(t))
|
|
8148
8148
|
return De.get(t);
|
|
@@ -8157,13 +8157,13 @@ function My(t) {
|
|
|
8157
8157
|
const c = s.slice(0, o).trim(), d = s.slice(o + 1).trim();
|
|
8158
8158
|
if (c && d) {
|
|
8159
8159
|
const l = cu(c);
|
|
8160
|
-
e[l.startsWith("webkit") ?
|
|
8160
|
+
e[l.startsWith("webkit") ? Iy(l) : l] = d;
|
|
8161
8161
|
}
|
|
8162
8162
|
}
|
|
8163
8163
|
}
|
|
8164
8164
|
n = a + 1;
|
|
8165
8165
|
}
|
|
8166
|
-
if (De.size ===
|
|
8166
|
+
if (De.size === ky) {
|
|
8167
8167
|
const i = De.keys().next().value;
|
|
8168
8168
|
i && De.delete(i);
|
|
8169
8169
|
}
|
|
@@ -8310,13 +8310,13 @@ function Ny(t) {
|
|
|
8310
8310
|
flip: h,
|
|
8311
8311
|
size: m,
|
|
8312
8312
|
rotation: b,
|
|
8313
|
-
pull:
|
|
8313
|
+
pull: w,
|
|
8314
8314
|
swapOpacity: v,
|
|
8315
|
-
rotateBy:
|
|
8315
|
+
rotateBy: I,
|
|
8316
8316
|
widthAuto: S,
|
|
8317
8317
|
className: C
|
|
8318
8318
|
} = t, P = [];
|
|
8319
|
-
return C && P.push(...C.split(" ")), e && P.push(Qt.beat), n && P.push(Qt.fade), r && P.push(Qt.beatFade), i && P.push(Qt.bounce), a && P.push(Qt.shake), s && P.push(Qt.spin), c && P.push(Qt.spinReverse), o && P.push(Qt.spinPulse), d && P.push(Qt.pulse), l && P.push(Zt.fixedWidth), u && P.push(Zt.inverse), f && P.push(Zt.border), h === !0 && P.push(Zt.flip), (h === "horizontal" || h === "both") && P.push(Zt.flipHorizontal), (h === "vertical" || h === "both") && P.push(Zt.flipVertical), m != null && P.push(_y[m]), b != null && b !== 0 && P.push(Oy[b]),
|
|
8319
|
+
return C && P.push(...C.split(" ")), e && P.push(Qt.beat), n && P.push(Qt.fade), r && P.push(Qt.beatFade), i && P.push(Qt.bounce), a && P.push(Qt.shake), s && P.push(Qt.spin), c && P.push(Qt.spinReverse), o && P.push(Qt.spinPulse), d && P.push(Qt.pulse), l && P.push(Zt.fixedWidth), u && P.push(Zt.inverse), f && P.push(Zt.border), h === !0 && P.push(Zt.flip), (h === "horizontal" || h === "both") && P.push(Zt.flipHorizontal), (h === "vertical" || h === "both") && P.push(Zt.flipVertical), m != null && P.push(_y[m]), b != null && b !== 0 && P.push(Oy[b]), w != null && P.push(Ly[w]), v && P.push(Zt.swapOpacity), Fy ? (I && P.push(Zt.rotateBy), S && P.push(Zt.widthAuto), (bn.cssPrefix || bn.familyPrefix || dn) === dn ? P : (
|
|
8320
8320
|
// TODO: see if we can achieve custom prefix support without iterating
|
|
8321
8321
|
// eslint-disable-next-line unicorn/no-array-callback-reference
|
|
8322
8322
|
P.map(Vy)
|
|
@@ -8371,7 +8371,7 @@ var wo = new Dy("FontAwesomeIcon"), fu = {
|
|
|
8371
8371
|
} = n, l = bo(c, !!i), u = bo(o, !!s), f = xo(r);
|
|
8372
8372
|
if (!f)
|
|
8373
8373
|
return wo.error("Icon lookup is undefined", r), null;
|
|
8374
|
-
const h = Ny(n), m = typeof d == "string" ? lu.transform(d) : d, b = xo(i),
|
|
8374
|
+
const h = Ny(n), m = typeof d == "string" ? lu.transform(d) : d, b = xo(i), w = Ey(f, {
|
|
8375
8375
|
...h.length > 0 && { classes: h },
|
|
8376
8376
|
...m && { transform: m },
|
|
8377
8377
|
...b && { mask: b },
|
|
@@ -8380,12 +8380,12 @@ var wo = new Dy("FontAwesomeIcon"), fu = {
|
|
|
8380
8380
|
titleId: u,
|
|
8381
8381
|
maskId: l
|
|
8382
8382
|
});
|
|
8383
|
-
if (!
|
|
8383
|
+
if (!w)
|
|
8384
8384
|
return wo.error("Could not find icon", f), null;
|
|
8385
|
-
const { abstract: v } =
|
|
8385
|
+
const { abstract: v } = w, I = { ref: e };
|
|
8386
8386
|
for (const S of By(n))
|
|
8387
|
-
zy.has(S) || (
|
|
8388
|
-
return Ry(v[0],
|
|
8387
|
+
zy.has(S) || (I[S] = n[S]);
|
|
8388
|
+
return Ry(v[0], I);
|
|
8389
8389
|
});
|
|
8390
8390
|
Xt.displayName = "FontAwesomeIcon";
|
|
8391
8391
|
const du = {
|
|
@@ -8689,7 +8689,7 @@ function ev({ handleClick: t }) {
|
|
|
8689
8689
|
color: "#3b82f6",
|
|
8690
8690
|
cursor: "pointer"
|
|
8691
8691
|
};
|
|
8692
|
-
|
|
8692
|
+
It(() => {
|
|
8693
8693
|
r < 0 && i(0), a < 0 && s(0), c({ rows: r, cols: a });
|
|
8694
8694
|
}, [r, a]);
|
|
8695
8695
|
const b = () => {
|
|
@@ -8700,7 +8700,7 @@ function ev({ handleClick: t }) {
|
|
|
8700
8700
|
Xt,
|
|
8701
8701
|
{
|
|
8702
8702
|
icon: ["fas", "angle-down"],
|
|
8703
|
-
onClick: () => n((
|
|
8703
|
+
onClick: () => n((w) => !w)
|
|
8704
8704
|
}
|
|
8705
8705
|
),
|
|
8706
8706
|
e ? /* @__PURE__ */ R.jsxs("div", { style: f, children: [
|
|
@@ -8719,7 +8719,7 @@ function ev({ handleClick: t }) {
|
|
|
8719
8719
|
style: h,
|
|
8720
8720
|
type: "number",
|
|
8721
8721
|
value: r,
|
|
8722
|
-
onChange: (
|
|
8722
|
+
onChange: (w) => i(w.target.value)
|
|
8723
8723
|
}
|
|
8724
8724
|
),
|
|
8725
8725
|
"x",
|
|
@@ -8729,7 +8729,7 @@ function ev({ handleClick: t }) {
|
|
|
8729
8729
|
style: h,
|
|
8730
8730
|
type: "number",
|
|
8731
8731
|
value: a,
|
|
8732
|
-
onChange: (
|
|
8732
|
+
onChange: (w) => s(w.target.value)
|
|
8733
8733
|
}
|
|
8734
8734
|
),
|
|
8735
8735
|
/* @__PURE__ */ R.jsx(
|
|
@@ -8748,14 +8748,14 @@ function ev({ handleClick: t }) {
|
|
|
8748
8748
|
]
|
|
8749
8749
|
}
|
|
8750
8750
|
),
|
|
8751
|
-
[...Array(u)].map((
|
|
8751
|
+
[...Array(u)].map((w, v) => /* @__PURE__ */ R.jsx(
|
|
8752
8752
|
"div",
|
|
8753
8753
|
{
|
|
8754
8754
|
style: {
|
|
8755
8755
|
display: "flex",
|
|
8756
8756
|
gap: "0.25rem"
|
|
8757
8757
|
},
|
|
8758
|
-
children: [...Array(u)].map((
|
|
8758
|
+
children: [...Array(u)].map((I, S) => /* @__PURE__ */ R.jsx(
|
|
8759
8759
|
"div",
|
|
8760
8760
|
{
|
|
8761
8761
|
style: {
|
|
@@ -8858,10 +8858,10 @@ var Jn = {}, iv = { get exports() {
|
|
|
8858
8858
|
c += 4, c = m;
|
|
8859
8859
|
for (var b = 0; b < f; b++) {
|
|
8860
8860
|
o(l, c), c += 4, c += 4, c += 4, o(l, c += 4), h = o(l, c += 4);
|
|
8861
|
-
var
|
|
8861
|
+
var w = o(l, c += 4), v = s(l, c += 4), I = s(l, c + 2), S = s(l, c + 4);
|
|
8862
8862
|
c += 6;
|
|
8863
8863
|
var C = o(l, c += 8);
|
|
8864
|
-
c += 4, c += v +
|
|
8864
|
+
c += 4, c += v + I + S, r._readLocal(l, C, d, h, w, a);
|
|
8865
8865
|
}
|
|
8866
8866
|
return d;
|
|
8867
8867
|
}, r._readLocal = function(i, a, s, o, c, d) {
|
|
@@ -8874,12 +8874,12 @@ var Jn = {}, iv = { get exports() {
|
|
|
8874
8874
|
var b = r.bin.readUTF8(i, a, h);
|
|
8875
8875
|
if (a += h, a += m, d) s[b] = { size: c, csize: o };
|
|
8876
8876
|
else {
|
|
8877
|
-
var
|
|
8878
|
-
if (f == 0) s[b] = new Uint8Array(
|
|
8877
|
+
var w = new Uint8Array(i.buffer, a);
|
|
8878
|
+
if (f == 0) s[b] = new Uint8Array(w.buffer.slice(a, a + o));
|
|
8879
8879
|
else {
|
|
8880
8880
|
if (f != 8) throw "unknown compression method: " + f;
|
|
8881
8881
|
var v = new Uint8Array(c);
|
|
8882
|
-
r.inflateRaw(
|
|
8882
|
+
r.inflateRaw(w, v), s[b] = v;
|
|
8883
8883
|
}
|
|
8884
8884
|
}
|
|
8885
8885
|
}, r.inflateRaw = function(i, a) {
|
|
@@ -8905,16 +8905,16 @@ var Jn = {}, iv = { get exports() {
|
|
|
8905
8905
|
}
|
|
8906
8906
|
for (var l in d) s += d[l].file.length + 30 + 46 + 2 * r.bin.sizeUTF8(l);
|
|
8907
8907
|
s += 22;
|
|
8908
|
-
var m = new Uint8Array(s), b = 0,
|
|
8908
|
+
var m = new Uint8Array(s), b = 0, w = [];
|
|
8909
8909
|
for (var l in d) {
|
|
8910
8910
|
var v = d[l];
|
|
8911
|
-
|
|
8911
|
+
w.push(b), b = r._writeHeader(m, b, l, v, 0);
|
|
8912
8912
|
}
|
|
8913
|
-
var
|
|
8913
|
+
var I = 0, S = b;
|
|
8914
8914
|
for (var l in d)
|
|
8915
|
-
v = d[l],
|
|
8915
|
+
v = d[l], w.push(b), b = r._writeHeader(m, b, l, v, 1, w[I++]);
|
|
8916
8916
|
var C = b - S;
|
|
8917
|
-
return o(m, b, 101010256), b += 4, c(m, b += 4,
|
|
8917
|
+
return o(m, b, 101010256), b += 4, c(m, b += 4, I), c(m, b += 2, I), o(m, b += 2, C), o(m, b += 4, S), b += 4, b += 2, m.buffer;
|
|
8918
8918
|
}, r._noNeed = function(i) {
|
|
8919
8919
|
var a = i.split(".").pop().toLowerCase();
|
|
8920
8920
|
return "png,jpg,jpeg,zip".indexOf(a) != -1;
|
|
@@ -8991,44 +8991,44 @@ var Jn = {}, iv = { get exports() {
|
|
|
8991
8991
|
var u = r.F._putsE, f = 0, h = s << 3, m = 0, b = i.length;
|
|
8992
8992
|
if (o == 0) {
|
|
8993
8993
|
for (; f < b; )
|
|
8994
|
-
u(a, h, f + (
|
|
8994
|
+
u(a, h, f + (k = Math.min(65535, b - f)) == b ? 1 : 0), h = r.F._copyExact(i, f, k, a, h + 8), f += k;
|
|
8995
8995
|
return h >>> 3;
|
|
8996
8996
|
}
|
|
8997
|
-
var
|
|
8997
|
+
var w = d.lits, v = d.strt, I = d.prev, S = 0, C = 0, P = 0, A = 0, L = 0, p = 0;
|
|
8998
8998
|
for (b > 2 && (v[p = r.F._hash(i, 0)] = 0), f = 0; f < b; f++) {
|
|
8999
8999
|
if (L = p, f + 1 < b - 2) {
|
|
9000
9000
|
p = r.F._hash(i, f + 1);
|
|
9001
9001
|
var y = f + 1 & 32767;
|
|
9002
|
-
|
|
9002
|
+
I[y] = v[p], v[p] = y;
|
|
9003
9003
|
}
|
|
9004
9004
|
if (m <= f) {
|
|
9005
|
-
(S > 14e3 || C > 26697) && b - f > 100 && (m < f && (
|
|
9005
|
+
(S > 14e3 || C > 26697) && b - f > 100 && (m < f && (w[S] = f - m, S += 2, m = f), h = r.F._writeBlock(f == b - 1 || m == b ? 1 : 0, w, S, A, i, P, f - P, a, h), S = C = A = 0, P = f);
|
|
9006
9006
|
var T = 0;
|
|
9007
|
-
f < b - 2 && (T = r.F._bestMatch(i, f,
|
|
9008
|
-
var
|
|
9007
|
+
f < b - 2 && (T = r.F._bestMatch(i, f, I, L, Math.min(c[2], b - f), c[3]));
|
|
9008
|
+
var k = T >>> 16, M = 65535 & T;
|
|
9009
9009
|
if (T != 0) {
|
|
9010
9010
|
M = 65535 & T;
|
|
9011
|
-
var D = l(
|
|
9011
|
+
var D = l(k = T >>> 16, d.of0);
|
|
9012
9012
|
d.lhst[257 + D]++;
|
|
9013
9013
|
var E = l(M, d.df0);
|
|
9014
|
-
d.dhst[E]++,
|
|
9014
|
+
d.dhst[E]++, A += d.exb[D] + d.dxb[E], w[S] = k << 23 | f - m, w[S + 1] = M << 16 | D << 8 | E, S += 2, m = f + k;
|
|
9015
9015
|
} else d.lhst[i[f]]++;
|
|
9016
9016
|
C++;
|
|
9017
9017
|
}
|
|
9018
9018
|
}
|
|
9019
|
-
for (P == f && i.length != 0 || (m < f && (
|
|
9019
|
+
for (P == f && i.length != 0 || (m < f && (w[S] = f - m, S += 2, m = f), h = r.F._writeBlock(1, w, S, A, i, P, f - P, a, h), S = 0, C = 0, S = C = A = 0, P = f); (7 & h) != 0; ) h++;
|
|
9020
9020
|
return h >>> 3;
|
|
9021
9021
|
}, r.F._bestMatch = function(i, a, s, o, c, d) {
|
|
9022
9022
|
var l = 32767 & a, u = s[l], f = l - u + 32768 & 32767;
|
|
9023
9023
|
if (u == l || o != r.F._hash(i, a - f)) return 0;
|
|
9024
9024
|
for (var h = 0, m = 0, b = Math.min(32767, a); f <= b && --d != 0 && u != l; ) {
|
|
9025
9025
|
if (h == 0 || i[a + h] == i[a + h - f]) {
|
|
9026
|
-
var
|
|
9027
|
-
if (
|
|
9028
|
-
if (m = f, (h =
|
|
9029
|
-
f + 2 <
|
|
9030
|
-
for (var v = 0,
|
|
9031
|
-
var S = a - f +
|
|
9026
|
+
var w = r.F._howLong(i, a, f);
|
|
9027
|
+
if (w > h) {
|
|
9028
|
+
if (m = f, (h = w) >= c) break;
|
|
9029
|
+
f + 2 < w && (w = f + 2);
|
|
9030
|
+
for (var v = 0, I = 0; I < w - 2; I++) {
|
|
9031
|
+
var S = a - f + I + 32768 & 32767, C = S - s[S] + 32768 & 32767;
|
|
9032
9032
|
C > v && (v = C, u = S);
|
|
9033
9033
|
}
|
|
9034
9034
|
}
|
|
@@ -9044,29 +9044,29 @@ var Jn = {}, iv = { get exports() {
|
|
|
9044
9044
|
}, r.F._hash = function(i, a) {
|
|
9045
9045
|
return (i[a] << 8 | i[a + 1]) + (i[a + 2] << 4) & 65535;
|
|
9046
9046
|
}, r.saved = 0, r.F._writeBlock = function(i, a, s, o, c, d, l, u, f) {
|
|
9047
|
-
var h, m, b,
|
|
9048
|
-
|
|
9049
|
-
var y = 32 + ((f + 3 & 7) == 0 ? 0 : 8 - (f + 3 & 7)) + (l << 3), T = o + r.F.contSize(
|
|
9050
|
-
|
|
9051
|
-
for (var M = 0; M < 286; M++)
|
|
9052
|
-
for (M = 0; M < 30; M++)
|
|
9053
|
-
for (M = 0; M < 19; M++)
|
|
9054
|
-
var D = y < T && y <
|
|
9047
|
+
var h, m, b, w, v, I, S, C, P, A = r.F.U, L = r.F._putsF, p = r.F._putsE;
|
|
9048
|
+
A.lhst[256]++, m = (h = r.F.getTrees())[0], b = h[1], w = h[2], v = h[3], I = h[4], S = h[5], C = h[6], P = h[7];
|
|
9049
|
+
var y = 32 + ((f + 3 & 7) == 0 ? 0 : 8 - (f + 3 & 7)) + (l << 3), T = o + r.F.contSize(A.fltree, A.lhst) + r.F.contSize(A.fdtree, A.dhst), k = o + r.F.contSize(A.ltree, A.lhst) + r.F.contSize(A.dtree, A.dhst);
|
|
9050
|
+
k += 14 + 3 * S + r.F.contSize(A.itree, A.ihst) + (2 * A.ihst[16] + 3 * A.ihst[17] + 7 * A.ihst[18]);
|
|
9051
|
+
for (var M = 0; M < 286; M++) A.lhst[M] = 0;
|
|
9052
|
+
for (M = 0; M < 30; M++) A.dhst[M] = 0;
|
|
9053
|
+
for (M = 0; M < 19; M++) A.ihst[M] = 0;
|
|
9054
|
+
var D = y < T && y < k ? 0 : T < k ? 1 : 2;
|
|
9055
9055
|
if (L(u, f, i), L(u, f + 1, D), f += 3, D == 0) {
|
|
9056
9056
|
for (; (7 & f) != 0; ) f++;
|
|
9057
9057
|
f = r.F._copyExact(c, d, l, u, f);
|
|
9058
9058
|
} else {
|
|
9059
9059
|
var E, O;
|
|
9060
|
-
if (D == 1 && (E =
|
|
9061
|
-
r.F.makeCodes(
|
|
9062
|
-
for (var x = 0; x < S; x++) p(u, f + 3 * x,
|
|
9063
|
-
f += 3 * S, f = r.F._codeTiny(C,
|
|
9060
|
+
if (D == 1 && (E = A.fltree, O = A.fdtree), D == 2) {
|
|
9061
|
+
r.F.makeCodes(A.ltree, m), r.F.revCodes(A.ltree, m), r.F.makeCodes(A.dtree, b), r.F.revCodes(A.dtree, b), r.F.makeCodes(A.itree, w), r.F.revCodes(A.itree, w), E = A.ltree, O = A.dtree, p(u, f, v - 257), p(u, f += 5, I - 1), p(u, f += 5, S - 4), f += 4;
|
|
9062
|
+
for (var x = 0; x < S; x++) p(u, f + 3 * x, A.itree[1 + (A.ordr[x] << 1)]);
|
|
9063
|
+
f += 3 * S, f = r.F._codeTiny(C, A.itree, u, f), f = r.F._codeTiny(P, A.itree, u, f);
|
|
9064
9064
|
}
|
|
9065
9065
|
for (var g = d, _ = 0; _ < s; _ += 2) {
|
|
9066
9066
|
for (var F = a[_], U = F >>> 23, j = g + (8388607 & F); g < j; ) f = r.F._writeLit(c[g++], E, u, f);
|
|
9067
9067
|
if (U != 0) {
|
|
9068
9068
|
var N = a[_ + 1], $ = N >> 16, B = N >> 8 & 255, V = 255 & N;
|
|
9069
|
-
p(u, f = r.F._writeLit(257 + B, E, u, f), U -
|
|
9069
|
+
p(u, f = r.F._writeLit(257 + B, E, u, f), U - A.of0[B]), f += A.exb[B], L(u, f = r.F._writeLit(V, O, u, f), $ - A.df0[V]), f += A.dxb[V], g += U;
|
|
9070
9070
|
}
|
|
9071
9071
|
}
|
|
9072
9072
|
f = r.F._writeLit(256, E, u, f);
|
|
@@ -9124,8 +9124,8 @@ var Jn = {}, iv = { get exports() {
|
|
|
9124
9124
|
o.sort((function(C, P) {
|
|
9125
9125
|
return C.f - P.f;
|
|
9126
9126
|
}));
|
|
9127
|
-
var m = o[0], b = o[1],
|
|
9128
|
-
for (o[0] = { lit: -1, f: m.f + b.f, l: m, r: b, d: 0 }; v != u - 1; ) m =
|
|
9127
|
+
var m = o[0], b = o[1], w = 0, v = 1, I = 2;
|
|
9128
|
+
for (o[0] = { lit: -1, f: m.f + b.f, l: m, r: b, d: 0 }; v != u - 1; ) m = w != v && (I == u || o[w].f < o[I].f) ? o[w++] : o[I++], b = w != v && (I == u || o[w].f < o[I].f) ? o[w++] : o[I++], o[v++] = { lit: -1, f: m.f + b.f, l: m, r: b };
|
|
9129
9129
|
var S = r.F.setDepth(o[v - 1], 0);
|
|
9130
9130
|
for (S > s && (r.F.restrictDepth(f, s, S), S = s), l = 0; l < u; l++) a[1 + (f[l].lit << 1)] = f[l].d;
|
|
9131
9131
|
return S;
|
|
@@ -9153,23 +9153,23 @@ var Jn = {}, iv = { get exports() {
|
|
|
9153
9153
|
if (i[0] == 3 && i[1] == 0) return a || new s(0);
|
|
9154
9154
|
var o = r.F, c = o._bitsF, d = o._bitsE, l = o._decodeTiny, u = o.makeCodes, f = o.codes2map, h = o._get17, m = o.U, b = a == null;
|
|
9155
9155
|
b && (a = new s(i.length >>> 2 << 3));
|
|
9156
|
-
for (var
|
|
9157
|
-
if (b && (a = r.F._check(a, y + (1 << 17))), S == 1 && (
|
|
9158
|
-
C = d(i, T, 5) + 257, P = d(i, T + 5, 5) + 1,
|
|
9159
|
-
for (var
|
|
9156
|
+
for (var w, v, I = 0, S = 0, C = 0, P = 0, A = 0, L = 0, p = 0, y = 0, T = 0; I == 0; ) if (I = c(i, T, 1), S = c(i, T + 1, 2), T += 3, S != 0) {
|
|
9157
|
+
if (b && (a = r.F._check(a, y + (1 << 17))), S == 1 && (w = m.flmap, v = m.fdmap, L = 511, p = 31), S == 2) {
|
|
9158
|
+
C = d(i, T, 5) + 257, P = d(i, T + 5, 5) + 1, A = d(i, T + 10, 4) + 4, T += 14;
|
|
9159
|
+
for (var k = 0; k < 38; k += 2) m.itree[k] = 0, m.itree[k + 1] = 0;
|
|
9160
9160
|
var M = 1;
|
|
9161
|
-
for (
|
|
9162
|
-
var D = d(i, T + 3 *
|
|
9163
|
-
m.itree[1 + (m.ordr[
|
|
9161
|
+
for (k = 0; k < A; k++) {
|
|
9162
|
+
var D = d(i, T + 3 * k, 3);
|
|
9163
|
+
m.itree[1 + (m.ordr[k] << 1)] = D, D > M && (M = D);
|
|
9164
9164
|
}
|
|
9165
|
-
T += 3 *
|
|
9165
|
+
T += 3 * A, u(m.itree, M), f(m.itree, M, m.imap), w = m.lmap, v = m.dmap, T = l(m.imap, (1 << M) - 1, C + P, i, T, m.ttree);
|
|
9166
9166
|
var E = o._copyOut(m.ttree, 0, C, m.ltree);
|
|
9167
9167
|
L = (1 << E) - 1;
|
|
9168
9168
|
var O = o._copyOut(m.ttree, C, P, m.dtree);
|
|
9169
|
-
p = (1 << O) - 1, u(m.ltree, E), f(m.ltree, E,
|
|
9169
|
+
p = (1 << O) - 1, u(m.ltree, E), f(m.ltree, E, w), u(m.dtree, O), f(m.dtree, O, v);
|
|
9170
9170
|
}
|
|
9171
9171
|
for (; ; ) {
|
|
9172
|
-
var x =
|
|
9172
|
+
var x = w[h(i, T) & L];
|
|
9173
9173
|
T += 15 & x;
|
|
9174
9174
|
var g = x >>> 4;
|
|
9175
9175
|
if (!(g >>> 8)) a[y++] = g;
|
|
@@ -9205,9 +9205,9 @@ var Jn = {}, iv = { get exports() {
|
|
|
9205
9205
|
var m = h >>> 4;
|
|
9206
9206
|
if (m <= 15) d[f] = m, f++;
|
|
9207
9207
|
else {
|
|
9208
|
-
var b = 0,
|
|
9209
|
-
m == 16 ? (
|
|
9210
|
-
for (var v = f +
|
|
9208
|
+
var b = 0, w = 0;
|
|
9209
|
+
m == 16 ? (w = 3 + l(o, c, 2), c += 2, b = d[f - 1]) : m == 17 ? (w = 3 + l(o, c, 3), c += 3) : m == 18 && (w = 11 + l(o, c, 7), c += 7);
|
|
9210
|
+
for (var v = f + w; f < v; ) d[f] = b, f++;
|
|
9211
9211
|
}
|
|
9212
9212
|
}
|
|
9213
9213
|
return c;
|
|
@@ -9290,100 +9290,100 @@ const Nt = (function() {
|
|
|
9290
9290
|
return h;
|
|
9291
9291
|
} };
|
|
9292
9292
|
function e(l, u, f, h) {
|
|
9293
|
-
const m = u * f, b = a(h),
|
|
9293
|
+
const m = u * f, b = a(h), w = Math.ceil(u * b / 8), v = new Uint8Array(4 * m), I = new Uint32Array(v.buffer), { ctype: S } = h, { depth: C } = h, P = t.readUshort;
|
|
9294
9294
|
if (S == 6) {
|
|
9295
9295
|
const F = m << 2;
|
|
9296
|
-
if (C == 8) for (var
|
|
9297
|
-
if (C == 16) for (
|
|
9296
|
+
if (C == 8) for (var A = 0; A < F; A += 4) v[A] = l[A], v[A + 1] = l[A + 1], v[A + 2] = l[A + 2], v[A + 3] = l[A + 3];
|
|
9297
|
+
if (C == 16) for (A = 0; A < F; A++) v[A] = l[A << 1];
|
|
9298
9298
|
} else if (S == 2) {
|
|
9299
9299
|
const F = h.tabs.tRNS;
|
|
9300
9300
|
if (F == null) {
|
|
9301
|
-
if (C == 8) for (
|
|
9302
|
-
var L = 3 *
|
|
9303
|
-
|
|
9301
|
+
if (C == 8) for (A = 0; A < m; A++) {
|
|
9302
|
+
var L = 3 * A;
|
|
9303
|
+
I[A] = 255 << 24 | l[L + 2] << 16 | l[L + 1] << 8 | l[L];
|
|
9304
9304
|
}
|
|
9305
|
-
if (C == 16) for (
|
|
9306
|
-
L = 6 *
|
|
9305
|
+
if (C == 16) for (A = 0; A < m; A++)
|
|
9306
|
+
L = 6 * A, I[A] = 255 << 24 | l[L + 4] << 16 | l[L + 2] << 8 | l[L];
|
|
9307
9307
|
} else {
|
|
9308
9308
|
var p = F[0];
|
|
9309
9309
|
const U = F[1], j = F[2];
|
|
9310
|
-
if (C == 8) for (
|
|
9311
|
-
var y =
|
|
9312
|
-
L = 3 *
|
|
9310
|
+
if (C == 8) for (A = 0; A < m; A++) {
|
|
9311
|
+
var y = A << 2;
|
|
9312
|
+
L = 3 * A, I[A] = 255 << 24 | l[L + 2] << 16 | l[L + 1] << 8 | l[L], l[L] == p && l[L + 1] == U && l[L + 2] == j && (v[y + 3] = 0);
|
|
9313
9313
|
}
|
|
9314
|
-
if (C == 16) for (
|
|
9315
|
-
y =
|
|
9314
|
+
if (C == 16) for (A = 0; A < m; A++)
|
|
9315
|
+
y = A << 2, L = 6 * A, I[A] = 255 << 24 | l[L + 4] << 16 | l[L + 2] << 8 | l[L], P(l, L) == p && P(l, L + 2) == U && P(l, L + 4) == j && (v[y + 3] = 0);
|
|
9316
9316
|
}
|
|
9317
9317
|
} else if (S == 3) {
|
|
9318
9318
|
const F = h.tabs.PLTE, U = h.tabs.tRNS, j = U ? U.length : 0;
|
|
9319
9319
|
if (C == 1) for (var T = 0; T < f; T++) {
|
|
9320
|
-
var
|
|
9321
|
-
for (
|
|
9322
|
-
y = M +
|
|
9323
|
-
var D = 3 * (E = l[
|
|
9320
|
+
var k = T * w, M = T * u;
|
|
9321
|
+
for (A = 0; A < u; A++) {
|
|
9322
|
+
y = M + A << 2;
|
|
9323
|
+
var D = 3 * (E = l[k + (A >> 3)] >> 7 - ((7 & A) << 0) & 1);
|
|
9324
9324
|
v[y] = F[D], v[y + 1] = F[D + 1], v[y + 2] = F[D + 2], v[y + 3] = E < j ? U[E] : 255;
|
|
9325
9325
|
}
|
|
9326
9326
|
}
|
|
9327
|
-
if (C == 2) for (T = 0; T < f; T++) for (
|
|
9328
|
-
y = M +
|
|
9329
|
-
if (C == 4) for (T = 0; T < f; T++) for (
|
|
9330
|
-
y = M +
|
|
9331
|
-
if (C == 8) for (
|
|
9327
|
+
if (C == 2) for (T = 0; T < f; T++) for (k = T * w, M = T * u, A = 0; A < u; A++)
|
|
9328
|
+
y = M + A << 2, D = 3 * (E = l[k + (A >> 2)] >> 6 - ((3 & A) << 1) & 3), v[y] = F[D], v[y + 1] = F[D + 1], v[y + 2] = F[D + 2], v[y + 3] = E < j ? U[E] : 255;
|
|
9329
|
+
if (C == 4) for (T = 0; T < f; T++) for (k = T * w, M = T * u, A = 0; A < u; A++)
|
|
9330
|
+
y = M + A << 2, D = 3 * (E = l[k + (A >> 1)] >> 4 - ((1 & A) << 2) & 15), v[y] = F[D], v[y + 1] = F[D + 1], v[y + 2] = F[D + 2], v[y + 3] = E < j ? U[E] : 255;
|
|
9331
|
+
if (C == 8) for (A = 0; A < m; A++) {
|
|
9332
9332
|
var E;
|
|
9333
|
-
y =
|
|
9333
|
+
y = A << 2, D = 3 * (E = l[A]), v[y] = F[D], v[y + 1] = F[D + 1], v[y + 2] = F[D + 2], v[y + 3] = E < j ? U[E] : 255;
|
|
9334
9334
|
}
|
|
9335
9335
|
} else if (S == 4) {
|
|
9336
|
-
if (C == 8) for (
|
|
9337
|
-
y =
|
|
9338
|
-
var O = l[x =
|
|
9336
|
+
if (C == 8) for (A = 0; A < m; A++) {
|
|
9337
|
+
y = A << 2;
|
|
9338
|
+
var O = l[x = A << 1];
|
|
9339
9339
|
v[y] = O, v[y + 1] = O, v[y + 2] = O, v[y + 3] = l[x + 1];
|
|
9340
9340
|
}
|
|
9341
|
-
if (C == 16) for (
|
|
9341
|
+
if (C == 16) for (A = 0; A < m; A++) {
|
|
9342
9342
|
var x;
|
|
9343
|
-
y =
|
|
9343
|
+
y = A << 2, O = l[x = A << 2], v[y] = O, v[y + 1] = O, v[y + 2] = O, v[y + 3] = l[x + 2];
|
|
9344
9344
|
}
|
|
9345
9345
|
} else if (S == 0) for (p = h.tabs.tRNS ? h.tabs.tRNS : -1, T = 0; T < f; T++) {
|
|
9346
|
-
const F = T *
|
|
9346
|
+
const F = T * w, U = T * u;
|
|
9347
9347
|
if (C == 1) for (var g = 0; g < u; g++) {
|
|
9348
9348
|
var _ = (O = 255 * (l[F + (g >>> 3)] >>> 7 - (7 & g) & 1)) == 255 * p ? 0 : 255;
|
|
9349
|
-
|
|
9349
|
+
I[U + g] = _ << 24 | O << 16 | O << 8 | O;
|
|
9350
9350
|
}
|
|
9351
9351
|
else if (C == 2) for (g = 0; g < u; g++)
|
|
9352
|
-
_ = (O = 85 * (l[F + (g >>> 2)] >>> 6 - ((3 & g) << 1) & 3)) == 85 * p ? 0 : 255,
|
|
9352
|
+
_ = (O = 85 * (l[F + (g >>> 2)] >>> 6 - ((3 & g) << 1) & 3)) == 85 * p ? 0 : 255, I[U + g] = _ << 24 | O << 16 | O << 8 | O;
|
|
9353
9353
|
else if (C == 4) for (g = 0; g < u; g++)
|
|
9354
|
-
_ = (O = 17 * (l[F + (g >>> 1)] >>> 4 - ((1 & g) << 2) & 15)) == 17 * p ? 0 : 255,
|
|
9354
|
+
_ = (O = 17 * (l[F + (g >>> 1)] >>> 4 - ((1 & g) << 2) & 15)) == 17 * p ? 0 : 255, I[U + g] = _ << 24 | O << 16 | O << 8 | O;
|
|
9355
9355
|
else if (C == 8) for (g = 0; g < u; g++)
|
|
9356
|
-
_ = (O = l[F + g]) == p ? 0 : 255,
|
|
9356
|
+
_ = (O = l[F + g]) == p ? 0 : 255, I[U + g] = _ << 24 | O << 16 | O << 8 | O;
|
|
9357
9357
|
else if (C == 16) for (g = 0; g < u; g++)
|
|
9358
|
-
O = l[F + (g << 1)], _ = P(l, F + (g << 1)) == p ? 0 : 255,
|
|
9358
|
+
O = l[F + (g << 1)], _ = P(l, F + (g << 1)) == p ? 0 : 255, I[U + g] = _ << 24 | O << 16 | O << 8 | O;
|
|
9359
9359
|
}
|
|
9360
9360
|
return v;
|
|
9361
9361
|
}
|
|
9362
9362
|
function n(l, u, f, h) {
|
|
9363
|
-
const m = a(l), b = Math.ceil(f * m / 8),
|
|
9364
|
-
return u = l.tabs.CgBI ? i(u,
|
|
9365
|
-
const C = S.width, P = S.height,
|
|
9363
|
+
const m = a(l), b = Math.ceil(f * m / 8), w = new Uint8Array((b + 1 + l.interlace) * h);
|
|
9364
|
+
return u = l.tabs.CgBI ? i(u, w) : r(u, w), l.interlace == 0 ? u = s(u, l, 0, f, h) : l.interlace == 1 && (u = (function(I, S) {
|
|
9365
|
+
const C = S.width, P = S.height, A = a(S), L = A >> 3, p = Math.ceil(C * A / 8), y = new Uint8Array(P * p);
|
|
9366
9366
|
let T = 0;
|
|
9367
|
-
const
|
|
9367
|
+
const k = [0, 0, 4, 0, 2, 0, 1], M = [0, 4, 0, 2, 0, 1, 0], D = [8, 8, 8, 4, 4, 2, 2], E = [8, 8, 4, 4, 2, 2, 1];
|
|
9368
9368
|
let O = 0;
|
|
9369
9369
|
for (; O < 7; ) {
|
|
9370
9370
|
const g = D[O], _ = E[O];
|
|
9371
|
-
let F = 0, U = 0, j =
|
|
9371
|
+
let F = 0, U = 0, j = k[O];
|
|
9372
9372
|
for (; j < P; ) j += g, U++;
|
|
9373
9373
|
let N = M[O];
|
|
9374
9374
|
for (; N < C; ) N += _, F++;
|
|
9375
|
-
const $ = Math.ceil(F *
|
|
9376
|
-
s(
|
|
9377
|
-
let B = 0, V =
|
|
9375
|
+
const $ = Math.ceil(F * A / 8);
|
|
9376
|
+
s(I, S, T, F, U);
|
|
9377
|
+
let B = 0, V = k[O];
|
|
9378
9378
|
for (; V < P; ) {
|
|
9379
9379
|
let K = M[O], Q = T + B * $ << 3;
|
|
9380
9380
|
for (; K < C; ) {
|
|
9381
9381
|
var x;
|
|
9382
|
-
if (
|
|
9382
|
+
if (A == 1 && (x = (x = I[Q >> 3]) >> 7 - (7 & Q) & 1, y[V * p + (K >> 3)] |= x << 7 - ((7 & K) << 0)), A == 2 && (x = (x = I[Q >> 3]) >> 6 - (7 & Q) & 3, y[V * p + (K >> 2)] |= x << 6 - ((3 & K) << 1)), A == 4 && (x = (x = I[Q >> 3]) >> 4 - (7 & Q) & 15, y[V * p + (K >> 1)] |= x << 4 - ((1 & K) << 2)), A >= 8) {
|
|
9383
9383
|
const J = V * p + K * L;
|
|
9384
|
-
for (let W = 0; W < L; W++) y[J + W] =
|
|
9384
|
+
for (let W = 0; W < L; W++) y[J + W] = I[(Q >> 3) + W];
|
|
9385
9385
|
}
|
|
9386
|
-
Q +=
|
|
9386
|
+
Q += A, K += _;
|
|
9387
9387
|
}
|
|
9388
9388
|
B++, V += g;
|
|
9389
9389
|
}
|
|
@@ -9399,23 +9399,23 @@ const Nt = (function() {
|
|
|
9399
9399
|
const l = { H: {} };
|
|
9400
9400
|
return l.H.N = function(u, f) {
|
|
9401
9401
|
const h = Uint8Array;
|
|
9402
|
-
let m, b,
|
|
9402
|
+
let m, b, w = 0, v = 0, I = 0, S = 0, C = 0, P = 0, A = 0, L = 0, p = 0;
|
|
9403
9403
|
if (u[0] == 3 && u[1] == 0) return f || new h(0);
|
|
9404
|
-
const y = l.H, T = y.b,
|
|
9405
|
-
for (g && (f = new h(u.length >>> 2 << 5));
|
|
9406
|
-
if (g && (f = l.H.W(f, L + (1 << 17))), v == 1 && (m = x.J, b = x.h, P = 511,
|
|
9407
|
-
|
|
9404
|
+
const y = l.H, T = y.b, k = y.e, M = y.R, D = y.n, E = y.A, O = y.Z, x = y.m, g = f == null;
|
|
9405
|
+
for (g && (f = new h(u.length >>> 2 << 5)); w == 0; ) if (w = T(u, p, 1), v = T(u, p + 1, 2), p += 3, v != 0) {
|
|
9406
|
+
if (g && (f = l.H.W(f, L + (1 << 17))), v == 1 && (m = x.J, b = x.h, P = 511, A = 31), v == 2) {
|
|
9407
|
+
I = k(u, p, 5) + 257, S = k(u, p + 5, 5) + 1, C = k(u, p + 10, 4) + 4, p += 14;
|
|
9408
9408
|
let F = 1;
|
|
9409
9409
|
for (var _ = 0; _ < 38; _ += 2) x.Q[_] = 0, x.Q[_ + 1] = 0;
|
|
9410
9410
|
for (_ = 0; _ < C; _++) {
|
|
9411
|
-
const N =
|
|
9411
|
+
const N = k(u, p + 3 * _, 3);
|
|
9412
9412
|
x.Q[1 + (x.X[_] << 1)] = N, N > F && (F = N);
|
|
9413
9413
|
}
|
|
9414
|
-
p += 3 * C, D(x.Q, F), E(x.Q, F, x.u), m = x.w, b = x.d, p = M(x.u, (1 << F) - 1,
|
|
9415
|
-
const U = y.V(x.v, 0,
|
|
9414
|
+
p += 3 * C, D(x.Q, F), E(x.Q, F, x.u), m = x.w, b = x.d, p = M(x.u, (1 << F) - 1, I + S, u, p, x.v);
|
|
9415
|
+
const U = y.V(x.v, 0, I, x.C);
|
|
9416
9416
|
P = (1 << U) - 1;
|
|
9417
|
-
const j = y.V(x.v,
|
|
9418
|
-
|
|
9417
|
+
const j = y.V(x.v, I, S, x.D);
|
|
9418
|
+
A = (1 << j) - 1, D(x.C, U), E(x.C, U, m), D(x.D, j), E(x.D, j, b);
|
|
9419
9419
|
}
|
|
9420
9420
|
for (; ; ) {
|
|
9421
9421
|
const F = m[O(u, p) & P];
|
|
@@ -9428,9 +9428,9 @@ const Nt = (function() {
|
|
|
9428
9428
|
let j = L + U - 254;
|
|
9429
9429
|
if (U > 264) {
|
|
9430
9430
|
const K = x.q[U - 257];
|
|
9431
|
-
j = L + (K >>> 3) +
|
|
9431
|
+
j = L + (K >>> 3) + k(u, p, 7 & K), p += 7 & K;
|
|
9432
9432
|
}
|
|
9433
|
-
const N = b[O(u, p) &
|
|
9433
|
+
const N = b[O(u, p) & A];
|
|
9434
9434
|
p += 15 & N;
|
|
9435
9435
|
const $ = N >>> 4, B = x.c[$], V = (B >>> 4) + T(u, p, 15 & B);
|
|
9436
9436
|
for (p += 15 & B; L < j; ) f[L] = f[L++ - V], f[L] = f[L++ - V], f[L] = f[L++ - V], f[L] = f[L++ - V];
|
|
@@ -9449,54 +9449,54 @@ const Nt = (function() {
|
|
|
9449
9449
|
if (f <= h) return u;
|
|
9450
9450
|
const m = new Uint8Array(h << 1);
|
|
9451
9451
|
return m.set(u, 0), m;
|
|
9452
|
-
}, l.H.R = function(u, f, h, m, b,
|
|
9453
|
-
const v = l.H.e,
|
|
9452
|
+
}, l.H.R = function(u, f, h, m, b, w) {
|
|
9453
|
+
const v = l.H.e, I = l.H.Z;
|
|
9454
9454
|
let S = 0;
|
|
9455
9455
|
for (; S < h; ) {
|
|
9456
|
-
const C = u[
|
|
9456
|
+
const C = u[I(m, b) & f];
|
|
9457
9457
|
b += 15 & C;
|
|
9458
9458
|
const P = C >>> 4;
|
|
9459
|
-
if (P <= 15)
|
|
9459
|
+
if (P <= 15) w[S] = P, S++;
|
|
9460
9460
|
else {
|
|
9461
|
-
let
|
|
9462
|
-
P == 16 ? (L = 3 + v(m, b, 2), b += 2,
|
|
9461
|
+
let A = 0, L = 0;
|
|
9462
|
+
P == 16 ? (L = 3 + v(m, b, 2), b += 2, A = w[S - 1]) : P == 17 ? (L = 3 + v(m, b, 3), b += 3) : P == 18 && (L = 11 + v(m, b, 7), b += 7);
|
|
9463
9463
|
const p = S + L;
|
|
9464
|
-
for (; S < p; )
|
|
9464
|
+
for (; S < p; ) w[S] = A, S++;
|
|
9465
9465
|
}
|
|
9466
9466
|
}
|
|
9467
9467
|
return b;
|
|
9468
9468
|
}, l.H.V = function(u, f, h, m) {
|
|
9469
|
-
let b = 0,
|
|
9469
|
+
let b = 0, w = 0;
|
|
9470
9470
|
const v = m.length >>> 1;
|
|
9471
|
-
for (;
|
|
9472
|
-
const
|
|
9473
|
-
m[
|
|
9471
|
+
for (; w < h; ) {
|
|
9472
|
+
const I = u[w + f];
|
|
9473
|
+
m[w << 1] = 0, m[1 + (w << 1)] = I, I > b && (b = I), w++;
|
|
9474
9474
|
}
|
|
9475
|
-
for (;
|
|
9475
|
+
for (; w < v; ) m[w << 1] = 0, m[1 + (w << 1)] = 0, w++;
|
|
9476
9476
|
return b;
|
|
9477
9477
|
}, l.H.n = function(u, f) {
|
|
9478
9478
|
const h = l.H.m, m = u.length;
|
|
9479
|
-
let b,
|
|
9479
|
+
let b, w, v, I;
|
|
9480
9480
|
const S = h.j;
|
|
9481
9481
|
for (var C = 0; C <= f; C++) S[C] = 0;
|
|
9482
9482
|
for (C = 1; C < m; C += 2) S[u[C]]++;
|
|
9483
9483
|
const P = h.K;
|
|
9484
|
-
for (b = 0, S[0] = 0,
|
|
9485
|
-
for (v = 0; v < m; v += 2)
|
|
9484
|
+
for (b = 0, S[0] = 0, w = 1; w <= f; w++) b = b + S[w - 1] << 1, P[w] = b;
|
|
9485
|
+
for (v = 0; v < m; v += 2) I = u[v + 1], I != 0 && (u[v] = P[I], P[I]++);
|
|
9486
9486
|
}, l.H.A = function(u, f, h) {
|
|
9487
9487
|
const m = u.length, b = l.H.m.r;
|
|
9488
|
-
for (let
|
|
9489
|
-
const v =
|
|
9490
|
-
let P = u[
|
|
9491
|
-
const
|
|
9492
|
-
for (; P !=
|
|
9488
|
+
for (let w = 0; w < m; w += 2) if (u[w + 1] != 0) {
|
|
9489
|
+
const v = w >> 1, I = u[w + 1], S = v << 4 | I, C = f - I;
|
|
9490
|
+
let P = u[w] << C;
|
|
9491
|
+
const A = P + (1 << C);
|
|
9492
|
+
for (; P != A; )
|
|
9493
9493
|
h[b[P] >>> 15 - f] = S, P++;
|
|
9494
9494
|
}
|
|
9495
9495
|
}, l.H.l = function(u, f) {
|
|
9496
9496
|
const h = l.H.m.r, m = 15 - f;
|
|
9497
9497
|
for (let b = 0; b < u.length; b += 2) {
|
|
9498
|
-
const
|
|
9499
|
-
u[b] = h[
|
|
9498
|
+
const w = u[b] << f - u[b + 1];
|
|
9499
|
+
u[b] = h[w] >>> m;
|
|
9500
9500
|
}
|
|
9501
9501
|
}, l.H.M = function(u, f, h) {
|
|
9502
9502
|
h <<= 7 & f;
|
|
@@ -9523,8 +9523,8 @@ const Nt = (function() {
|
|
|
9523
9523
|
let m = f;
|
|
9524
9524
|
m = (2863311530 & m) >>> 1 | (1431655765 & m) << 1, m = (3435973836 & m) >>> 2 | (858993459 & m) << 2, m = (4042322160 & m) >>> 4 | (252645135 & m) << 4, m = (4278255360 & m) >>> 8 | (16711935 & m) << 8, u.r[f] = (m >>> 16 | m << 16) >>> 17;
|
|
9525
9525
|
}
|
|
9526
|
-
function h(m, b,
|
|
9527
|
-
for (; b-- != 0; ) m.push(0,
|
|
9526
|
+
function h(m, b, w) {
|
|
9527
|
+
for (; b-- != 0; ) m.push(0, w);
|
|
9528
9528
|
}
|
|
9529
9529
|
for (f = 0; f < 32; f++) u.q[f] = u.S[f] << 3 | u.T[f], u.c[f] = u.p[f] << 4 | u.z[f];
|
|
9530
9530
|
h(u._, 144, 8), h(u._, 112, 9), h(u._, 24, 7), h(u._, 8, 8), l.H.n(u._, 9), l.H.A(u._, 9, u.J), l.H.l(u._, 9), h(u.$, 32, 5), l.H.n(u.$, 5), l.H.A(u.$, 5, u.h), l.H.l(u.$, 5), h(u.Q, 19, 0), h(u.C, 286, 0), h(u.D, 30, 0), h(u.v, 320, 0);
|
|
@@ -9535,55 +9535,55 @@ const Nt = (function() {
|
|
|
9535
9535
|
}
|
|
9536
9536
|
function s(l, u, f, h, m) {
|
|
9537
9537
|
let b = a(u);
|
|
9538
|
-
const
|
|
9539
|
-
let v,
|
|
9538
|
+
const w = Math.ceil(h * b / 8);
|
|
9539
|
+
let v, I;
|
|
9540
9540
|
b = Math.ceil(b / 8);
|
|
9541
9541
|
let S = l[f], C = 0;
|
|
9542
|
-
if (S > 1 && (l[f] = [0, 0, 1][S - 2]), S == 3) for (C = b; C <
|
|
9543
|
-
for (let P = 0; P < m; P++) if (v = f + P *
|
|
9542
|
+
if (S > 1 && (l[f] = [0, 0, 1][S - 2]), S == 3) for (C = b; C < w; C++) l[C + 1] = l[C + 1] + (l[C + 1 - b] >>> 1) & 255;
|
|
9543
|
+
for (let P = 0; P < m; P++) if (v = f + P * w, I = v + P + 1, S = l[I - 1], C = 0, S == 0) for (; C < w; C++) l[v + C] = l[I + C];
|
|
9544
9544
|
else if (S == 1) {
|
|
9545
|
-
for (; C < b; C++) l[v + C] = l[
|
|
9546
|
-
for (; C <
|
|
9547
|
-
} else if (S == 2) for (; C <
|
|
9545
|
+
for (; C < b; C++) l[v + C] = l[I + C];
|
|
9546
|
+
for (; C < w; C++) l[v + C] = l[I + C] + l[v + C - b];
|
|
9547
|
+
} else if (S == 2) for (; C < w; C++) l[v + C] = l[I + C] + l[v + C - w];
|
|
9548
9548
|
else if (S == 3) {
|
|
9549
|
-
for (; C < b; C++) l[v + C] = l[
|
|
9550
|
-
for (; C <
|
|
9549
|
+
for (; C < b; C++) l[v + C] = l[I + C] + (l[v + C - w] >>> 1);
|
|
9550
|
+
for (; C < w; C++) l[v + C] = l[I + C] + (l[v + C - w] + l[v + C - b] >>> 1);
|
|
9551
9551
|
} else {
|
|
9552
|
-
for (; C < b; C++) l[v + C] = l[
|
|
9553
|
-
for (; C <
|
|
9552
|
+
for (; C < b; C++) l[v + C] = l[I + C] + o(0, l[v + C - w], 0);
|
|
9553
|
+
for (; C < w; C++) l[v + C] = l[I + C] + o(l[v + C - b], l[v + C - w], l[v + C - b - w]);
|
|
9554
9554
|
}
|
|
9555
9555
|
return l;
|
|
9556
9556
|
}
|
|
9557
9557
|
function o(l, u, f) {
|
|
9558
|
-
const h = l + u - f, m = h - l, b = h - u,
|
|
9559
|
-
return m * m <= b * b && m * m <=
|
|
9558
|
+
const h = l + u - f, m = h - l, b = h - u, w = h - f;
|
|
9559
|
+
return m * m <= b * b && m * m <= w * w ? l : b * b <= w * w ? u : f;
|
|
9560
9560
|
}
|
|
9561
9561
|
function c(l, u, f) {
|
|
9562
9562
|
f.width = t.readUint(l, u), u += 4, f.height = t.readUint(l, u), u += 4, f.depth = l[u], u++, f.ctype = l[u], u++, f.compress = l[u], u++, f.filter = l[u], u++, f.interlace = l[u], u++;
|
|
9563
9563
|
}
|
|
9564
|
-
function d(l, u, f, h, m, b,
|
|
9564
|
+
function d(l, u, f, h, m, b, w, v, I) {
|
|
9565
9565
|
const S = Math.min(u, m), C = Math.min(f, b);
|
|
9566
|
-
let P = 0,
|
|
9567
|
-
for (let O = 0; O < C; O++) for (let x = 0; x < S; x++) if (
|
|
9568
|
-
else if (
|
|
9569
|
-
var L = l[P + 3] * 0.00392156862745098, p = l[P] * L, y = l[P + 1] * L, T = l[P + 2] * L,
|
|
9570
|
-
const g = 1 - L, _ = L +
|
|
9571
|
-
h[
|
|
9572
|
-
} else if (
|
|
9573
|
-
L = l[P + 3], p = l[P], y = l[P + 1], T = l[P + 2],
|
|
9574
|
-
else if (
|
|
9575
|
-
if (L = l[P + 3], p = l[P], y = l[P + 1], T = l[P + 2],
|
|
9576
|
-
if (L < 220 &&
|
|
9566
|
+
let P = 0, A = 0;
|
|
9567
|
+
for (let O = 0; O < C; O++) for (let x = 0; x < S; x++) if (w >= 0 && v >= 0 ? (P = O * u + x << 2, A = (v + O) * m + w + x << 2) : (P = (-v + O) * u - w + x << 2, A = O * m + x << 2), I == 0) h[A] = l[P], h[A + 1] = l[P + 1], h[A + 2] = l[P + 2], h[A + 3] = l[P + 3];
|
|
9568
|
+
else if (I == 1) {
|
|
9569
|
+
var L = l[P + 3] * 0.00392156862745098, p = l[P] * L, y = l[P + 1] * L, T = l[P + 2] * L, k = h[A + 3] * (1 / 255), M = h[A] * k, D = h[A + 1] * k, E = h[A + 2] * k;
|
|
9570
|
+
const g = 1 - L, _ = L + k * g, F = _ == 0 ? 0 : 1 / _;
|
|
9571
|
+
h[A + 3] = 255 * _, h[A + 0] = (p + M * g) * F, h[A + 1] = (y + D * g) * F, h[A + 2] = (T + E * g) * F;
|
|
9572
|
+
} else if (I == 2)
|
|
9573
|
+
L = l[P + 3], p = l[P], y = l[P + 1], T = l[P + 2], k = h[A + 3], M = h[A], D = h[A + 1], E = h[A + 2], L == k && p == M && y == D && T == E ? (h[A] = 0, h[A + 1] = 0, h[A + 2] = 0, h[A + 3] = 0) : (h[A] = p, h[A + 1] = y, h[A + 2] = T, h[A + 3] = L);
|
|
9574
|
+
else if (I == 3) {
|
|
9575
|
+
if (L = l[P + 3], p = l[P], y = l[P + 1], T = l[P + 2], k = h[A + 3], M = h[A], D = h[A + 1], E = h[A + 2], L == k && p == M && y == D && T == E) continue;
|
|
9576
|
+
if (L < 220 && k > 20) return !1;
|
|
9577
9577
|
}
|
|
9578
9578
|
return !0;
|
|
9579
9579
|
}
|
|
9580
9580
|
return { decode: function(u) {
|
|
9581
9581
|
const f = new Uint8Array(u);
|
|
9582
9582
|
let h = 8;
|
|
9583
|
-
const m = t, b = m.readUshort,
|
|
9583
|
+
const m = t, b = m.readUshort, w = m.readUint, v = { tabs: {}, frames: [] }, I = new Uint8Array(f.length);
|
|
9584
9584
|
let S, C = 0, P = 0;
|
|
9585
|
-
const
|
|
9586
|
-
for (var L = 0; L < 8; L++) if (f[L] !=
|
|
9585
|
+
const A = [137, 80, 78, 71, 13, 10, 26, 10];
|
|
9586
|
+
for (var L = 0; L < 8; L++) if (f[L] != A[L]) throw "The input is not a PNG file!";
|
|
9587
9587
|
for (; h < f.length; ) {
|
|
9588
9588
|
const O = m.readUint(f, h);
|
|
9589
9589
|
h += 4;
|
|
@@ -9602,12 +9602,12 @@ const Nt = (function() {
|
|
|
9602
9602
|
v.tabs[x] = _;
|
|
9603
9603
|
} else if (x == "CgBI") v.tabs[x] = f.slice(h, h + 4);
|
|
9604
9604
|
else if (x == "IDAT") {
|
|
9605
|
-
for (L = 0; L < O; L++)
|
|
9605
|
+
for (L = 0; L < O; L++) I[C + L] = f[h + L];
|
|
9606
9606
|
C += O;
|
|
9607
|
-
} else if (x == "acTL") v.tabs[x] = { num_frames:
|
|
9607
|
+
} else if (x == "acTL") v.tabs[x] = { num_frames: w(f, h), num_plays: w(f, h + 4) }, S = new Uint8Array(f.length);
|
|
9608
9608
|
else if (x == "fcTL") {
|
|
9609
9609
|
P != 0 && ((E = v.frames[v.frames.length - 1]).data = n(v, S.slice(0, P), E.rect.width, E.rect.height), P = 0);
|
|
9610
|
-
const g = { x:
|
|
9610
|
+
const g = { x: w(f, h + 12), y: w(f, h + 16), width: w(f, h + 4), height: w(f, h + 8) };
|
|
9611
9611
|
let _ = b(f, h + 22);
|
|
9612
9612
|
_ = b(f, h + 20) / (_ == 0 ? 100 : _);
|
|
9613
9613
|
const F = { rect: g, delay: Math.round(1e3 * _), dispose: f[h + 24], blend: f[h + 25] };
|
|
@@ -9620,10 +9620,10 @@ const Nt = (function() {
|
|
|
9620
9620
|
for (v.tabs[x] = [], L = 0; L < 8; L++) v.tabs[x].push(m.readUint(f, h + 4 * L));
|
|
9621
9621
|
else if (x == "tEXt" || x == "zTXt") {
|
|
9622
9622
|
v.tabs[x] == null && (v.tabs[x] = {});
|
|
9623
|
-
var y = m.nextZero(f, h), T = m.readASCII(f, h, y - h),
|
|
9624
|
-
if (x == "tEXt") D = m.readASCII(f, y + 1,
|
|
9623
|
+
var y = m.nextZero(f, h), T = m.readASCII(f, h, y - h), k = h + O - y - 1;
|
|
9624
|
+
if (x == "tEXt") D = m.readASCII(f, y + 1, k);
|
|
9625
9625
|
else {
|
|
9626
|
-
var M = r(f.slice(y + 2, y + 2 +
|
|
9626
|
+
var M = r(f.slice(y + 2, y + 2 + k));
|
|
9627
9627
|
D = m.readUTF8(M, 0, M.length);
|
|
9628
9628
|
}
|
|
9629
9629
|
v.tabs[x][T] = D;
|
|
@@ -9631,7 +9631,7 @@ const Nt = (function() {
|
|
|
9631
9631
|
v.tabs[x] == null && (v.tabs[x] = {}), y = 0, p = h, y = m.nextZero(f, p), T = m.readASCII(f, p, y - p);
|
|
9632
9632
|
const g = f[p = y + 1];
|
|
9633
9633
|
var D;
|
|
9634
|
-
f[p + 1], p += 2, y = m.nextZero(f, p), m.readASCII(f, p, y - p), p = y + 1, y = m.nextZero(f, p), m.readUTF8(f, p, y - p),
|
|
9634
|
+
f[p + 1], p += 2, y = m.nextZero(f, p), m.readASCII(f, p, y - p), p = y + 1, y = m.nextZero(f, p), m.readUTF8(f, p, y - p), k = O - ((p = y + 1) - h), g == 0 ? D = m.readUTF8(f, p, k) : (M = r(f.slice(p, p + k)), D = m.readUTF8(M, 0, M.length)), v.tabs[x][T] = D;
|
|
9635
9635
|
} else if (x == "PLTE") v.tabs[x] = m.readBytes(f, h, O);
|
|
9636
9636
|
else if (x == "hIST") {
|
|
9637
9637
|
const g = v.tabs.PLTE.length / 3;
|
|
@@ -9644,19 +9644,19 @@ const Nt = (function() {
|
|
|
9644
9644
|
h += O, m.readUint(f, h), h += 4;
|
|
9645
9645
|
}
|
|
9646
9646
|
var E;
|
|
9647
|
-
return P != 0 && ((E = v.frames[v.frames.length - 1]).data = n(v, S.slice(0, P), E.rect.width, E.rect.height)), v.data = n(v,
|
|
9647
|
+
return P != 0 && ((E = v.frames[v.frames.length - 1]).data = n(v, S.slice(0, P), E.rect.width, E.rect.height)), v.data = n(v, I, v.width, v.height), delete v.compress, delete v.interlace, delete v.filter, v;
|
|
9648
9648
|
}, toRGBA8: function(u) {
|
|
9649
9649
|
const f = u.width, h = u.height;
|
|
9650
9650
|
if (u.tabs.acTL == null) return [e(u.data, f, h, u).buffer];
|
|
9651
9651
|
const m = [];
|
|
9652
9652
|
u.frames[0].data == null && (u.frames[0].data = u.data);
|
|
9653
|
-
const b = f * h * 4,
|
|
9653
|
+
const b = f * h * 4, w = new Uint8Array(b), v = new Uint8Array(b), I = new Uint8Array(b);
|
|
9654
9654
|
for (let C = 0; C < u.frames.length; C++) {
|
|
9655
|
-
const P = u.frames[C],
|
|
9656
|
-
if (C != 0) for (var S = 0; S < b; S++)
|
|
9657
|
-
if (P.blend == 0 ? d(T, p, y,
|
|
9658
|
-
if (P.dispose == 1) d(v, p, y,
|
|
9659
|
-
else if (P.dispose == 2) for (S = 0; S < b; S++)
|
|
9655
|
+
const P = u.frames[C], A = P.rect.x, L = P.rect.y, p = P.rect.width, y = P.rect.height, T = e(P.data, p, y, u);
|
|
9656
|
+
if (C != 0) for (var S = 0; S < b; S++) I[S] = w[S];
|
|
9657
|
+
if (P.blend == 0 ? d(T, p, y, w, f, h, A, L, 0) : P.blend == 1 && d(T, p, y, w, f, h, A, L, 1), m.push(w.buffer.slice(0)), P.dispose != 0) {
|
|
9658
|
+
if (P.dispose == 1) d(v, p, y, w, f, h, A, L, 0);
|
|
9659
|
+
else if (P.dispose == 2) for (S = 0; S < b; S++) w[S] = I[S];
|
|
9660
9660
|
}
|
|
9661
9661
|
}
|
|
9662
9662
|
return m;
|
|
@@ -9668,29 +9668,29 @@ const Nt = (function() {
|
|
|
9668
9668
|
const p = new Uint32Array(256);
|
|
9669
9669
|
for (let y = 0; y < 256; y++) {
|
|
9670
9670
|
let T = y;
|
|
9671
|
-
for (let
|
|
9671
|
+
for (let k = 0; k < 8; k++) 1 & T ? T = 3988292384 ^ T >>> 1 : T >>>= 1;
|
|
9672
9672
|
p[y] = T;
|
|
9673
9673
|
}
|
|
9674
9674
|
return p;
|
|
9675
|
-
})(), update(p, y, T,
|
|
9676
|
-
for (let M = 0; M <
|
|
9675
|
+
})(), update(p, y, T, k) {
|
|
9676
|
+
for (let M = 0; M < k; M++) p = r.table[255 & (p ^ y[T + M])] ^ p >>> 8;
|
|
9677
9677
|
return p;
|
|
9678
9678
|
}, crc: (p, y, T) => 4294967295 ^ r.update(4294967295, p, y, T) };
|
|
9679
|
-
function i(p, y, T,
|
|
9680
|
-
y[T] += p[0] *
|
|
9679
|
+
function i(p, y, T, k) {
|
|
9680
|
+
y[T] += p[0] * k >> 4, y[T + 1] += p[1] * k >> 4, y[T + 2] += p[2] * k >> 4, y[T + 3] += p[3] * k >> 4;
|
|
9681
9681
|
}
|
|
9682
9682
|
function a(p) {
|
|
9683
9683
|
return Math.max(0, Math.min(255, p));
|
|
9684
9684
|
}
|
|
9685
9685
|
function s(p, y) {
|
|
9686
|
-
const T = p[0] - y[0],
|
|
9687
|
-
return T * T +
|
|
9686
|
+
const T = p[0] - y[0], k = p[1] - y[1], M = p[2] - y[2], D = p[3] - y[3];
|
|
9687
|
+
return T * T + k * k + M * M + D * D;
|
|
9688
9688
|
}
|
|
9689
|
-
function o(p, y, T,
|
|
9689
|
+
function o(p, y, T, k, M, D, E) {
|
|
9690
9690
|
E == null && (E = 1);
|
|
9691
|
-
const O =
|
|
9691
|
+
const O = k.length, x = [];
|
|
9692
9692
|
for (var g = 0; g < O; g++) {
|
|
9693
|
-
const V =
|
|
9693
|
+
const V = k[g];
|
|
9694
9694
|
x.push([V >>> 0 & 255, V >>> 8 & 255, V >>> 16 & 255, V >>> 24 & 255]);
|
|
9695
9695
|
}
|
|
9696
9696
|
for (g = 0; g < O; g++) {
|
|
@@ -9711,10 +9711,10 @@ const Nt = (function() {
|
|
|
9711
9711
|
Y < Q && (Q = Y, _ = F);
|
|
9712
9712
|
}
|
|
9713
9713
|
const J = x[_], W = [B[0] - J[0], B[1] - J[1], B[2] - J[2], B[3] - J[3]];
|
|
9714
|
-
E == 1 && (K != y - 1 && i(W, N, g + 4, 7), V != T - 1 && (K != 0 && i(W, N, g + 4 * y - 4, 3), i(W, N, g + 4 * y, 5), K != y - 1 && i(W, N, g + 4 * y + 4, 1))), D[g >> 2] = _, j[g >> 2] =
|
|
9714
|
+
E == 1 && (K != y - 1 && i(W, N, g + 4, 7), V != T - 1 && (K != 0 && i(W, N, g + 4 * y - 4, 3), i(W, N, g + 4 * y, 5), K != y - 1 && i(W, N, g + 4 * y + 4, 1))), D[g >> 2] = _, j[g >> 2] = k[_];
|
|
9715
9715
|
}
|
|
9716
9716
|
}
|
|
9717
|
-
function c(p, y, T,
|
|
9717
|
+
function c(p, y, T, k, M) {
|
|
9718
9718
|
M == null && (M = {});
|
|
9719
9719
|
const { crc: D } = r, E = e.writeUint, O = e.writeUshort, x = e.writeASCII;
|
|
9720
9720
|
let g = 8;
|
|
@@ -9746,7 +9746,7 @@ const Nt = (function() {
|
|
|
9746
9746
|
let Q = 0;
|
|
9747
9747
|
for (B = 0; B < p.frames.length; B++) {
|
|
9748
9748
|
var J = p.frames[B];
|
|
9749
|
-
_ && (E(V, g, 26), g += 4, x(V, g, "fcTL"), g += 4, E(V, g, Q++), g += 4, E(V, g, J.rect.width), g += 4, E(V, g, J.rect.height), g += 4, E(V, g, J.rect.x), g += 4, E(V, g, J.rect.y), g += 4, O(V, g,
|
|
9749
|
+
_ && (E(V, g, 26), g += 4, x(V, g, "fcTL"), g += 4, E(V, g, Q++), g += 4, E(V, g, J.rect.width), g += 4, E(V, g, J.rect.height), g += 4, E(V, g, J.rect.x), g += 4, E(V, g, J.rect.y), g += 4, O(V, g, k[B]), g += 2, O(V, g, 1e3), g += 2, V[g] = J.dispose, g++, V[g] = J.blend, g++, E(V, g, D(V, g - 30, 30)), g += 4);
|
|
9750
9750
|
const W = J.cimg;
|
|
9751
9751
|
E(V, g, (N = W.length) + (B == 0 ? 0 : 4)), g += 4;
|
|
9752
9752
|
const Y = g;
|
|
@@ -9755,28 +9755,28 @@ const Nt = (function() {
|
|
|
9755
9755
|
return E(V, g, 0), g += 4, x(V, g, "IEND"), g += 4, E(V, g, D(V, g - 4, 4)), g += 4, V.buffer;
|
|
9756
9756
|
}
|
|
9757
9757
|
function d(p, y, T) {
|
|
9758
|
-
for (let
|
|
9759
|
-
const M = p.frames[
|
|
9758
|
+
for (let k = 0; k < p.frames.length; k++) {
|
|
9759
|
+
const M = p.frames[k];
|
|
9760
9760
|
M.rect.width;
|
|
9761
9761
|
const D = M.rect.height, E = new Uint8Array(D * M.bpl + D);
|
|
9762
9762
|
M.cimg = h(M.img, D, M.bpp, M.bpl, E, y, T);
|
|
9763
9763
|
}
|
|
9764
9764
|
}
|
|
9765
|
-
function l(p, y, T,
|
|
9765
|
+
function l(p, y, T, k, M) {
|
|
9766
9766
|
const D = M[0], E = M[1], O = M[2], x = M[3], g = M[4], _ = M[5];
|
|
9767
9767
|
let F = 6, U = 8, j = 255;
|
|
9768
9768
|
for (var N = 0; N < p.length; N++) {
|
|
9769
9769
|
const et = new Uint8Array(p[N]);
|
|
9770
9770
|
for (var $ = et.length, B = 0; B < $; B += 4) j &= et[B + 3];
|
|
9771
9771
|
}
|
|
9772
|
-
const V = j != 255, K = (function(st, rt, pt, St, ut,
|
|
9772
|
+
const V = j != 255, K = (function(st, rt, pt, St, ut, kt) {
|
|
9773
9773
|
const ft = [];
|
|
9774
9774
|
for (var it = 0; it < st.length; it++) {
|
|
9775
9775
|
const Tt = new Uint8Array(st[it]), _t = new Uint32Array(Tt.buffer);
|
|
9776
9776
|
var Mt;
|
|
9777
9777
|
let Dt = 0, qt = 0, Wt = rt, ge = pt, pr = St ? 1 : 0;
|
|
9778
9778
|
if (it != 0) {
|
|
9779
|
-
const ju =
|
|
9779
|
+
const ju = kt || St || it == 1 || ft[it - 2].dispose != 0 ? 1 : 2;
|
|
9780
9780
|
let gr = 0, xa = 1e9;
|
|
9781
9781
|
for (let Ze = 0; Ze < ju; Ze++) {
|
|
9782
9782
|
var ae = new Uint8Array(st[it - 1 - Ze]);
|
|
@@ -9804,13 +9804,13 @@ const Nt = (function() {
|
|
|
9804
9804
|
}
|
|
9805
9805
|
return ft;
|
|
9806
9806
|
})(p, y, T, D, E, O), Q = {}, J = [], W = [];
|
|
9807
|
-
if (
|
|
9807
|
+
if (k != 0) {
|
|
9808
9808
|
const et = [];
|
|
9809
9809
|
for (B = 0; B < K.length; B++) et.push(K[B].img.buffer);
|
|
9810
9810
|
const st = (function(ut) {
|
|
9811
|
-
let
|
|
9812
|
-
for (var ft = 0; ft < ut.length; ft++)
|
|
9813
|
-
const it = new Uint8Array(
|
|
9811
|
+
let kt = 0;
|
|
9812
|
+
for (var ft = 0; ft < ut.length; ft++) kt += ut[ft].byteLength;
|
|
9813
|
+
const it = new Uint8Array(kt);
|
|
9814
9814
|
let Mt = 0;
|
|
9815
9815
|
for (ft = 0; ft < ut.length; ft++) {
|
|
9816
9816
|
const ae = new Uint8Array(ut[ft]), Cn = ae.length;
|
|
@@ -9822,7 +9822,7 @@ const Nt = (function() {
|
|
|
9822
9822
|
Mt += Cn;
|
|
9823
9823
|
}
|
|
9824
9824
|
return it.buffer;
|
|
9825
|
-
})(et), rt = b(st,
|
|
9825
|
+
})(et), rt = b(st, k);
|
|
9826
9826
|
for (B = 0; B < rt.plte.length; B++) J.push(rt.plte[B].est.rgba);
|
|
9827
9827
|
let pt = 0;
|
|
9828
9828
|
for (B = 0; B < K.length; B++) {
|
|
@@ -9860,19 +9860,19 @@ const Nt = (function() {
|
|
|
9860
9860
|
const St = W[N];
|
|
9861
9861
|
for (let ut = 0; ut < et; ut++) {
|
|
9862
9862
|
B = ut * rt;
|
|
9863
|
-
const
|
|
9864
|
-
if (U == 8) for (var nt = 0; nt < X; nt++) mt[B + nt] = St[
|
|
9865
|
-
else if (U == 4) for (nt = 0; nt < X; nt++) mt[B + (nt >> 1)] |= St[
|
|
9866
|
-
else if (U == 2) for (nt = 0; nt < X; nt++) mt[B + (nt >> 2)] |= St[
|
|
9867
|
-
else if (U == 1) for (nt = 0; nt < X; nt++) mt[B + (nt >> 3)] |= St[
|
|
9863
|
+
const kt = ut * X;
|
|
9864
|
+
if (U == 8) for (var nt = 0; nt < X; nt++) mt[B + nt] = St[kt + nt];
|
|
9865
|
+
else if (U == 4) for (nt = 0; nt < X; nt++) mt[B + (nt >> 1)] |= St[kt + nt] << 4 - 4 * (1 & nt);
|
|
9866
|
+
else if (U == 2) for (nt = 0; nt < X; nt++) mt[B + (nt >> 2)] |= St[kt + nt] << 6 - 2 * (3 & nt);
|
|
9867
|
+
else if (U == 1) for (nt = 0; nt < X; nt++) mt[B + (nt >> 3)] |= St[kt + nt] << 7 - 1 * (7 & nt);
|
|
9868
9868
|
}
|
|
9869
9869
|
st = mt, F = 3, pt = 1;
|
|
9870
9870
|
} else if (V == 0 && K.length == 1) {
|
|
9871
9871
|
mt = new Uint8Array(X * et * 3);
|
|
9872
9872
|
const St = X * et;
|
|
9873
9873
|
for (B = 0; B < St; B++) {
|
|
9874
|
-
const ut = 3 * B,
|
|
9875
|
-
mt[ut] = st[
|
|
9874
|
+
const ut = 3 * B, kt = 4 * B;
|
|
9875
|
+
mt[ut] = st[kt], mt[ut + 1] = st[kt + 1], mt[ut + 2] = st[kt + 2];
|
|
9876
9876
|
}
|
|
9877
9877
|
st = mt, F = 2, pt = 3, rt = 3 * X;
|
|
9878
9878
|
}
|
|
@@ -9880,118 +9880,118 @@ const Nt = (function() {
|
|
|
9880
9880
|
}
|
|
9881
9881
|
return { ctype: F, depth: U, plte: J, frames: K };
|
|
9882
9882
|
}
|
|
9883
|
-
function u(p, y, T,
|
|
9883
|
+
function u(p, y, T, k, M, D, E) {
|
|
9884
9884
|
const O = Uint8Array, x = Uint32Array, g = new O(p[M - 1]), _ = new x(p[M - 1]), F = M + 1 < p.length ? new O(p[M + 1]) : null, U = new O(p[M]), j = new x(U.buffer);
|
|
9885
9885
|
let N = y, $ = T, B = -1, V = -1;
|
|
9886
9886
|
for (let Q = 0; Q < D.height; Q++) for (let J = 0; J < D.width; J++) {
|
|
9887
9887
|
const W = D.x + J, Y = D.y + Q, H = Y * y + W, X = j[H];
|
|
9888
|
-
X == 0 ||
|
|
9888
|
+
X == 0 || k[M - 1].dispose == 0 && _[H] == X && (F == null || F[4 * H + 3] != 0) || (W < N && (N = W), W > B && (B = W), Y < $ && ($ = Y), Y > V && (V = Y));
|
|
9889
9889
|
}
|
|
9890
9890
|
B == -1 && (N = $ = B = V = 0), E && ((1 & N) == 1 && N--, (1 & $) == 1 && $--), D = { x: N, y: $, width: B - N + 1, height: V - $ + 1 };
|
|
9891
|
-
const K =
|
|
9892
|
-
K.rect = D, K.blend = 1, K.img = new Uint8Array(D.width * D.height * 4),
|
|
9891
|
+
const K = k[M];
|
|
9892
|
+
K.rect = D, K.blend = 1, K.img = new Uint8Array(D.width * D.height * 4), k[M - 1].dispose == 0 ? (t(g, y, T, K.img, D.width, D.height, -D.x, -D.y, 0), f(U, y, T, K.img, D)) : t(U, y, T, K.img, D.width, D.height, -D.x, -D.y, 0);
|
|
9893
9893
|
}
|
|
9894
|
-
function f(p, y, T,
|
|
9895
|
-
t(p, y, T,
|
|
9894
|
+
function f(p, y, T, k, M) {
|
|
9895
|
+
t(p, y, T, k, M.width, M.height, -M.x, -M.y, 2);
|
|
9896
9896
|
}
|
|
9897
|
-
function h(p, y, T,
|
|
9897
|
+
function h(p, y, T, k, M, D, E) {
|
|
9898
9898
|
const O = [];
|
|
9899
9899
|
let x, g = [0, 1, 2, 3, 4];
|
|
9900
|
-
D != -1 ? g = [D] : (y *
|
|
9900
|
+
D != -1 ? g = [D] : (y * k > 5e5 || T == 1) && (g = [0]), E && (x = { level: 0 });
|
|
9901
9901
|
const _ = av;
|
|
9902
9902
|
for (var F = 0; F < g.length; F++) {
|
|
9903
|
-
for (let N = 0; N < y; N++) m(M, p, N,
|
|
9903
|
+
for (let N = 0; N < y; N++) m(M, p, N, k, T, g[F]);
|
|
9904
9904
|
O.push(_.deflate(M, x));
|
|
9905
9905
|
}
|
|
9906
9906
|
let U, j = 1e9;
|
|
9907
9907
|
for (F = 0; F < O.length; F++) O[F].length < j && (U = F, j = O[F].length);
|
|
9908
9908
|
return O[U];
|
|
9909
9909
|
}
|
|
9910
|
-
function m(p, y, T,
|
|
9911
|
-
const E = T *
|
|
9910
|
+
function m(p, y, T, k, M, D) {
|
|
9911
|
+
const E = T * k;
|
|
9912
9912
|
let O = E + T;
|
|
9913
|
-
if (p[O] = D, O++, D == 0) if (
|
|
9914
|
-
else p.set(new Uint8Array(y.buffer, E,
|
|
9913
|
+
if (p[O] = D, O++, D == 0) if (k < 500) for (var x = 0; x < k; x++) p[O + x] = y[E + x];
|
|
9914
|
+
else p.set(new Uint8Array(y.buffer, E, k), O);
|
|
9915
9915
|
else if (D == 1) {
|
|
9916
9916
|
for (x = 0; x < M; x++) p[O + x] = y[E + x];
|
|
9917
|
-
for (x = M; x <
|
|
9917
|
+
for (x = M; x < k; x++) p[O + x] = y[E + x] - y[E + x - M] + 256 & 255;
|
|
9918
9918
|
} else if (T == 0) {
|
|
9919
9919
|
for (x = 0; x < M; x++) p[O + x] = y[E + x];
|
|
9920
|
-
if (D == 2) for (x = M; x <
|
|
9921
|
-
if (D == 3) for (x = M; x <
|
|
9922
|
-
if (D == 4) for (x = M; x <
|
|
9920
|
+
if (D == 2) for (x = M; x < k; x++) p[O + x] = y[E + x];
|
|
9921
|
+
if (D == 3) for (x = M; x < k; x++) p[O + x] = y[E + x] - (y[E + x - M] >> 1) + 256 & 255;
|
|
9922
|
+
if (D == 4) for (x = M; x < k; x++) p[O + x] = y[E + x] - n(y[E + x - M], 0, 0) + 256 & 255;
|
|
9923
9923
|
} else {
|
|
9924
|
-
if (D == 2) for (x = 0; x <
|
|
9924
|
+
if (D == 2) for (x = 0; x < k; x++) p[O + x] = y[E + x] + 256 - y[E + x - k] & 255;
|
|
9925
9925
|
if (D == 3) {
|
|
9926
|
-
for (x = 0; x < M; x++) p[O + x] = y[E + x] + 256 - (y[E + x -
|
|
9927
|
-
for (x = M; x <
|
|
9926
|
+
for (x = 0; x < M; x++) p[O + x] = y[E + x] + 256 - (y[E + x - k] >> 1) & 255;
|
|
9927
|
+
for (x = M; x < k; x++) p[O + x] = y[E + x] + 256 - (y[E + x - k] + y[E + x - M] >> 1) & 255;
|
|
9928
9928
|
}
|
|
9929
9929
|
if (D == 4) {
|
|
9930
|
-
for (x = 0; x < M; x++) p[O + x] = y[E + x] + 256 - n(0, y[E + x -
|
|
9931
|
-
for (x = M; x <
|
|
9930
|
+
for (x = 0; x < M; x++) p[O + x] = y[E + x] + 256 - n(0, y[E + x - k], 0) & 255;
|
|
9931
|
+
for (x = M; x < k; x++) p[O + x] = y[E + x] + 256 - n(y[E + x - M], y[E + x - k], y[E + x - M - k]) & 255;
|
|
9932
9932
|
}
|
|
9933
9933
|
}
|
|
9934
9934
|
}
|
|
9935
9935
|
function b(p, y) {
|
|
9936
|
-
const T = new Uint8Array(p),
|
|
9936
|
+
const T = new Uint8Array(p), k = T.slice(0), M = new Uint32Array(k.buffer), D = w(k, y), E = D[0], O = D[1], x = T.length, g = new Uint8Array(x >> 2);
|
|
9937
9937
|
let _;
|
|
9938
9938
|
if (T.length < 2e7) for (var F = 0; F < x; F += 4)
|
|
9939
9939
|
_ = v(E, U = T[F] * (1 / 255), j = T[F + 1] * (1 / 255), N = T[F + 2] * (1 / 255), $ = T[F + 3] * (1 / 255)), g[F >> 2] = _.ind, M[F >> 2] = _.est.rgba;
|
|
9940
9940
|
else for (F = 0; F < x; F += 4) {
|
|
9941
9941
|
var U = T[F] * 0.00392156862745098, j = T[F + 1] * (1 / 255), N = T[F + 2] * (1 / 255), $ = T[F + 3] * (1 / 255);
|
|
9942
|
-
for (_ = E; _.left; ) _ =
|
|
9942
|
+
for (_ = E; _.left; ) _ = I(_.est, U, j, N, $) <= 0 ? _.left : _.right;
|
|
9943
9943
|
g[F >> 2] = _.ind, M[F >> 2] = _.est.rgba;
|
|
9944
9944
|
}
|
|
9945
|
-
return { abuf:
|
|
9945
|
+
return { abuf: k.buffer, inds: g, plte: O };
|
|
9946
9946
|
}
|
|
9947
|
-
function
|
|
9947
|
+
function w(p, y, T) {
|
|
9948
9948
|
T == null && (T = 1e-4);
|
|
9949
|
-
const
|
|
9950
|
-
M.bst = P(p, M.i0, M.i1), M.est =
|
|
9949
|
+
const k = new Uint32Array(p.buffer), M = { i0: 0, i1: p.length, bst: null, est: null, tdst: 0, left: null, right: null };
|
|
9950
|
+
M.bst = P(p, M.i0, M.i1), M.est = A(M.bst);
|
|
9951
9951
|
const D = [M];
|
|
9952
9952
|
for (; D.length < y; ) {
|
|
9953
9953
|
let O = 0, x = 0;
|
|
9954
9954
|
for (var E = 0; E < D.length; E++) D[E].est.L > O && (O = D[E].est.L, x = E);
|
|
9955
9955
|
if (O < T) break;
|
|
9956
|
-
const g = D[x], _ = S(p,
|
|
9956
|
+
const g = D[x], _ = S(p, k, g.i0, g.i1, g.est.e, g.est.eMq255);
|
|
9957
9957
|
if (g.i0 >= _ || g.i1 <= _) {
|
|
9958
9958
|
g.est.L = 0;
|
|
9959
9959
|
continue;
|
|
9960
9960
|
}
|
|
9961
9961
|
const F = { i0: g.i0, i1: _, bst: null, est: null, tdst: 0, left: null, right: null };
|
|
9962
|
-
F.bst = P(p, F.i0, F.i1), F.est =
|
|
9962
|
+
F.bst = P(p, F.i0, F.i1), F.est = A(F.bst);
|
|
9963
9963
|
const U = { i0: _, i1: g.i1, bst: null, est: null, tdst: 0, left: null, right: null };
|
|
9964
9964
|
for (U.bst = { R: [], m: [], N: g.bst.N - F.bst.N }, E = 0; E < 16; E++) U.bst.R[E] = g.bst.R[E] - F.bst.R[E];
|
|
9965
9965
|
for (E = 0; E < 4; E++) U.bst.m[E] = g.bst.m[E] - F.bst.m[E];
|
|
9966
|
-
U.est =
|
|
9966
|
+
U.est = A(U.bst), g.left = F, g.right = U, D[x] = F, D.push(U);
|
|
9967
9967
|
}
|
|
9968
9968
|
for (D.sort(((O, x) => x.bst.N - O.bst.N)), E = 0; E < D.length; E++) D[E].ind = E;
|
|
9969
9969
|
return [M, D];
|
|
9970
9970
|
}
|
|
9971
|
-
function v(p, y, T,
|
|
9971
|
+
function v(p, y, T, k, M) {
|
|
9972
9972
|
if (p.left == null) return p.tdst = (function(F, U, j, N, $) {
|
|
9973
9973
|
const B = U - F[0], V = j - F[1], K = N - F[2], Q = $ - F[3];
|
|
9974
9974
|
return B * B + V * V + K * K + Q * Q;
|
|
9975
|
-
})(p.est.q, y, T,
|
|
9976
|
-
const D =
|
|
9975
|
+
})(p.est.q, y, T, k, M), p;
|
|
9976
|
+
const D = I(p.est, y, T, k, M);
|
|
9977
9977
|
let E = p.left, O = p.right;
|
|
9978
9978
|
D > 0 && (E = p.right, O = p.left);
|
|
9979
|
-
const x = v(E, y, T,
|
|
9979
|
+
const x = v(E, y, T, k, M);
|
|
9980
9980
|
if (x.tdst <= D * D) return x;
|
|
9981
|
-
const g = v(O, y, T,
|
|
9981
|
+
const g = v(O, y, T, k, M);
|
|
9982
9982
|
return g.tdst < x.tdst ? g : x;
|
|
9983
9983
|
}
|
|
9984
|
-
function
|
|
9984
|
+
function I(p, y, T, k, M) {
|
|
9985
9985
|
const { e: D } = p;
|
|
9986
|
-
return D[0] * y + D[1] * T + D[2] *
|
|
9986
|
+
return D[0] * y + D[1] * T + D[2] * k + D[3] * M - p.eMq;
|
|
9987
9987
|
}
|
|
9988
|
-
function S(p, y, T,
|
|
9989
|
-
for (
|
|
9988
|
+
function S(p, y, T, k, M, D) {
|
|
9989
|
+
for (k -= 4; T < k; ) {
|
|
9990
9990
|
for (; C(p, T, M) <= D; ) T += 4;
|
|
9991
|
-
for (; C(p,
|
|
9992
|
-
if (T >=
|
|
9991
|
+
for (; C(p, k, M) > D; ) k -= 4;
|
|
9992
|
+
if (T >= k) break;
|
|
9993
9993
|
const E = y[T >> 2];
|
|
9994
|
-
y[T >> 2] = y[
|
|
9994
|
+
y[T >> 2] = y[k >> 2], y[k >> 2] = E, T += 4, k -= 4;
|
|
9995
9995
|
}
|
|
9996
9996
|
for (; C(p, T, M) > D; ) T -= 4;
|
|
9997
9997
|
return T + 4;
|
|
@@ -10000,47 +10000,47 @@ const Nt = (function() {
|
|
|
10000
10000
|
return p[y] * T[0] + p[y + 1] * T[1] + p[y + 2] * T[2] + p[y + 3] * T[3];
|
|
10001
10001
|
}
|
|
10002
10002
|
function P(p, y, T) {
|
|
10003
|
-
const
|
|
10003
|
+
const k = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], M = [0, 0, 0, 0], D = T - y >> 2;
|
|
10004
10004
|
for (let E = y; E < T; E += 4) {
|
|
10005
10005
|
const O = p[E] * 0.00392156862745098, x = p[E + 1] * (1 / 255), g = p[E + 2] * (1 / 255), _ = p[E + 3] * (1 / 255);
|
|
10006
|
-
M[0] += O, M[1] += x, M[2] += g, M[3] += _,
|
|
10006
|
+
M[0] += O, M[1] += x, M[2] += g, M[3] += _, k[0] += O * O, k[1] += O * x, k[2] += O * g, k[3] += O * _, k[5] += x * x, k[6] += x * g, k[7] += x * _, k[10] += g * g, k[11] += g * _, k[15] += _ * _;
|
|
10007
10007
|
}
|
|
10008
|
-
return
|
|
10008
|
+
return k[4] = k[1], k[8] = k[2], k[9] = k[6], k[12] = k[3], k[13] = k[7], k[14] = k[11], { R: k, m: M, N: D };
|
|
10009
10009
|
}
|
|
10010
|
-
function
|
|
10011
|
-
const { R: y } = p, { m: T } = p, { N:
|
|
10010
|
+
function A(p) {
|
|
10011
|
+
const { R: y } = p, { m: T } = p, { N: k } = p, M = T[0], D = T[1], E = T[2], O = T[3], x = k == 0 ? 0 : 1 / k, g = [y[0] - M * M * x, y[1] - M * D * x, y[2] - M * E * x, y[3] - M * O * x, y[4] - D * M * x, y[5] - D * D * x, y[6] - D * E * x, y[7] - D * O * x, y[8] - E * M * x, y[9] - E * D * x, y[10] - E * E * x, y[11] - E * O * x, y[12] - O * M * x, y[13] - O * D * x, y[14] - O * E * x, y[15] - O * O * x], _ = g, F = L;
|
|
10012
10012
|
let U = [Math.random(), Math.random(), Math.random(), Math.random()], j = 0, N = 0;
|
|
10013
|
-
if (
|
|
10013
|
+
if (k != 0) for (let B = 0; B < 16 && (U = F.multVec(_, U), N = Math.sqrt(F.dot(U, U)), U = F.sml(1 / N, U), !(B != 0 && Math.abs(N - j) < 1e-9)); B++) j = N;
|
|
10014
10014
|
const $ = [M * x, D * x, E * x, O * x];
|
|
10015
10015
|
return { Cov: g, q: $, e: U, L: j, eMq255: F.dot(F.sml(255, $), U), eMq: F.dot(U, $), rgba: (Math.round(255 * $[3]) << 24 | Math.round(255 * $[2]) << 16 | Math.round(255 * $[1]) << 8 | Math.round(255 * $[0]) << 0) >>> 0 };
|
|
10016
10016
|
}
|
|
10017
10017
|
var L = { multVec: (p, y) => [p[0] * y[0] + p[1] * y[1] + p[2] * y[2] + p[3] * y[3], p[4] * y[0] + p[5] * y[1] + p[6] * y[2] + p[7] * y[3], p[8] * y[0] + p[9] * y[1] + p[10] * y[2] + p[11] * y[3], p[12] * y[0] + p[13] * y[1] + p[14] * y[2] + p[15] * y[3]], dot: (p, y) => p[0] * y[0] + p[1] * y[1] + p[2] * y[2] + p[3] * y[3], sml: (p, y) => [p * y[0], p * y[1], p * y[2], p * y[3]] };
|
|
10018
|
-
Nt.encode = function(y, T,
|
|
10018
|
+
Nt.encode = function(y, T, k, M, D, E, O) {
|
|
10019
10019
|
M == null && (M = 0), O == null && (O = !1);
|
|
10020
|
-
const x = l(y, T,
|
|
10021
|
-
return d(x, -1), c(x, T,
|
|
10022
|
-
}, Nt.encodeLL = function(y, T,
|
|
10020
|
+
const x = l(y, T, k, M, [!1, !1, !1, 0, O, !1]);
|
|
10021
|
+
return d(x, -1), c(x, T, k, D, E);
|
|
10022
|
+
}, Nt.encodeLL = function(y, T, k, M, D, E, O, x) {
|
|
10023
10023
|
const g = { ctype: 0 + (M == 1 ? 0 : 2) + (D == 0 ? 0 : 4), depth: E, frames: [] }, _ = (M + D) * E, F = _ * T;
|
|
10024
|
-
for (let U = 0; U < y.length; U++) g.frames.push({ rect: { x: 0, y: 0, width: T, height:
|
|
10025
|
-
return d(g, 0, !0), c(g, T,
|
|
10026
|
-
}, Nt.encode.compress = l, Nt.encode.dither = o, Nt.quantize = b, Nt.quantize.getKDtree =
|
|
10024
|
+
for (let U = 0; U < y.length; U++) g.frames.push({ rect: { x: 0, y: 0, width: T, height: k }, img: new Uint8Array(y[U]), blend: 0, dispose: 1, bpp: Math.ceil(_ / 8), bpl: Math.ceil(F / 8) });
|
|
10025
|
+
return d(g, 0, !0), c(g, T, k, O, x);
|
|
10026
|
+
}, Nt.encode.compress = l, Nt.encode.dither = o, Nt.quantize = b, Nt.quantize.getKDtree = w, Nt.quantize.getNearest = v;
|
|
10027
10027
|
})();
|
|
10028
10028
|
const bu = { toArrayBuffer(t, e) {
|
|
10029
10029
|
const n = t.width, r = t.height, i = n << 2, a = t.getContext("2d").getImageData(0, 0, n, r), s = new Uint32Array(a.data.buffer), o = (32 * n + 31) / 32 << 2, c = o * r, d = 122 + c, l = new ArrayBuffer(d), u = new DataView(l), f = 1 << 20;
|
|
10030
|
-
let h, m, b,
|
|
10030
|
+
let h, m, b, w, v = f, I = 0, S = 0, C = 0;
|
|
10031
10031
|
function P(p) {
|
|
10032
10032
|
u.setUint16(S, p, !0), S += 2;
|
|
10033
10033
|
}
|
|
10034
|
-
function
|
|
10034
|
+
function A(p) {
|
|
10035
10035
|
u.setUint32(S, p, !0), S += 4;
|
|
10036
10036
|
}
|
|
10037
10037
|
function L(p) {
|
|
10038
10038
|
S += p;
|
|
10039
10039
|
}
|
|
10040
|
-
P(19778),
|
|
10041
|
-
for (;
|
|
10042
|
-
for (
|
|
10043
|
-
|
|
10040
|
+
P(19778), A(d), L(4), A(122), A(108), A(n), A(-r >>> 0), P(1), P(32), A(3), A(c), A(2835), A(2835), L(8), A(16711680), A(65280), A(255), A(4278190080), A(1466527264), (function p() {
|
|
10041
|
+
for (; I < r && v > 0; ) {
|
|
10042
|
+
for (w = 122 + I * o, h = 0; h < i; ) v--, m = s[C++], b = m >>> 24, u.setUint32(w + h, m << 8 | b), h += 4;
|
|
10043
|
+
I++;
|
|
10044
10044
|
}
|
|
10045
10045
|
C < s.length ? (v = f, setTimeout(p, bu._dly)) : e(l);
|
|
10046
10046
|
})();
|
|
@@ -10276,7 +10276,7 @@ function Cu(t, e) {
|
|
|
10276
10276
|
let a, s = t;
|
|
10277
10277
|
return isFinite(i) && (n > i || r > i) && ([s, a] = mr(n, r), n > r ? (s.width = i, s.height = r / n * i) : (s.width = n / r * i, s.height = i), a.drawImage(t, 0, 0, s.width, s.height), Ht(t)), s;
|
|
10278
10278
|
}
|
|
10279
|
-
function
|
|
10279
|
+
function Iu(t, e) {
|
|
10280
10280
|
const { width: n } = t, { height: r } = t, [i, a] = mr(n, r);
|
|
10281
10281
|
switch (e > 4 && e < 9 ? (i.width = r, i.height = n) : (i.width = n, i.height = r), e) {
|
|
10282
10282
|
case 2:
|
|
@@ -10304,18 +10304,18 @@ function ku(t, e) {
|
|
|
10304
10304
|
}
|
|
10305
10305
|
function Ao(t, e, n = 0) {
|
|
10306
10306
|
return new Promise((function(r, i) {
|
|
10307
|
-
let a, s, o, c, d, l, u, f, h, m, b,
|
|
10308
|
-
function y(
|
|
10307
|
+
let a, s, o, c, d, l, u, f, h, m, b, w, v, I, S, C, P, A, L, p;
|
|
10308
|
+
function y(k = 5) {
|
|
10309
10309
|
if (e.signal && e.signal.aborted) throw e.signal.reason;
|
|
10310
|
-
a +=
|
|
10310
|
+
a += k, e.onProgress(Math.min(a, 100));
|
|
10311
10311
|
}
|
|
10312
|
-
function T(
|
|
10312
|
+
function T(k) {
|
|
10313
10313
|
if (e.signal && e.signal.aborted) throw e.signal.reason;
|
|
10314
|
-
a = Math.min(Math.max(
|
|
10314
|
+
a = Math.min(Math.max(k, a), 100), e.onProgress(a);
|
|
10315
10315
|
}
|
|
10316
|
-
return a = n, s = e.maxIteration || 10, o = 1024 * e.maxSizeMB * 1024, y(), er(t, e).then((function(
|
|
10316
|
+
return a = n, s = e.maxIteration || 10, o = 1024 * e.maxSizeMB * 1024, y(), er(t, e).then((function(k) {
|
|
10317
10317
|
try {
|
|
10318
|
-
return [, c] =
|
|
10318
|
+
return [, c] = k, y(), d = Cu(c, e), y(), new Promise((function(M, D) {
|
|
10319
10319
|
var E;
|
|
10320
10320
|
if (!(E = e.exifOrientation)) return Eu(t).then((function(x) {
|
|
10321
10321
|
try {
|
|
@@ -10332,15 +10332,15 @@ function Ao(t, e, n = 0) {
|
|
|
10332
10332
|
try {
|
|
10333
10333
|
return l = M, y(), Ue().then((function(D) {
|
|
10334
10334
|
try {
|
|
10335
|
-
return u = D ? d :
|
|
10335
|
+
return u = D ? d : Iu(d, l), y(), f = e.initialQuality || 1, h = e.fileType || t.type, nr(u, h, t.name, t.lastModified, f).then((function(E) {
|
|
10336
10336
|
try {
|
|
10337
10337
|
{
|
|
10338
10338
|
let x = function() {
|
|
10339
10339
|
if (s-- && (S > o || S > v)) {
|
|
10340
10340
|
let _, F;
|
|
10341
|
-
return _ = p ? 0.95 * L.width : L.width, F = p ? 0.95 * L.height : L.height, [P,
|
|
10341
|
+
return _ = p ? 0.95 * L.width : L.width, F = p ? 0.95 * L.height : L.height, [P, A] = mr(_, F), A.drawImage(L, 0, 0, _, F), f *= h === "image/png" ? 0.85 : 0.95, nr(P, h, t.name, t.lastModified, f).then((function(U) {
|
|
10342
10342
|
try {
|
|
10343
|
-
return C = U, Ht(L), L = P, S = C.size, T(Math.min(99, Math.floor((
|
|
10343
|
+
return C = U, Ht(L), L = P, S = C.size, T(Math.min(99, Math.floor((I - S) / (I - o) * 100))), x;
|
|
10344
10344
|
} catch (j) {
|
|
10345
10345
|
return i(j);
|
|
10346
10346
|
}
|
|
@@ -10350,9 +10350,9 @@ function Ao(t, e, n = 0) {
|
|
|
10350
10350
|
}, g = function() {
|
|
10351
10351
|
return Ht(L), Ht(P), Ht(d), Ht(u), Ht(c), T(100), r(C);
|
|
10352
10352
|
};
|
|
10353
|
-
if (m = E, y(), b = m.size > o,
|
|
10353
|
+
if (m = E, y(), b = m.size > o, w = m.size > t.size, !b && !w) return T(100), r(m);
|
|
10354
10354
|
var O;
|
|
10355
|
-
return v = t.size,
|
|
10355
|
+
return v = t.size, I = m.size, S = I, L = u, p = !e.alwaysKeepResolution && b, (O = (function(_) {
|
|
10356
10356
|
for (; _; ) {
|
|
10357
10357
|
if (_.then) return void _.then(O, i);
|
|
10358
10358
|
try {
|
|
@@ -10480,8 +10480,8 @@ function bt(t, e) {
|
|
|
10480
10480
|
}
|
|
10481
10481
|
}));
|
|
10482
10482
|
}
|
|
10483
|
-
bt.getDataUrlFromFile = Au, bt.getFilefromDataUrl = ba, bt.loadImage = Su, bt.drawImageInCanvas = Pu, bt.drawFileInCanvas = er, bt.canvasToFile = nr, bt.getExifOrientation = Eu, bt.handleMaxWidthOrHeight = Cu, bt.followExifOrientation =
|
|
10484
|
-
const
|
|
10483
|
+
bt.getDataUrlFromFile = Au, bt.getFilefromDataUrl = ba, bt.loadImage = Su, bt.drawImageInCanvas = Pu, bt.drawFileInCanvas = er, bt.canvasToFile = nr, bt.getExifOrientation = Eu, bt.handleMaxWidthOrHeight = Cu, bt.followExifOrientation = Iu, bt.cleanupCanvasMemory = Ht, bt.isAutoOrientationInBrowser = Ue, bt.approximateBelowMaximumCanvasSizeOfBrowser = Tu, bt.copyExifWithoutOrientation = vu, bt.getBrowserName = Te, bt.version = "2.0.2";
|
|
10484
|
+
const ku = (t) => {
|
|
10485
10485
|
if (!t || typeof t != "string") return "unknown";
|
|
10486
10486
|
const e = [
|
|
10487
10487
|
".jpg",
|
|
@@ -10507,7 +10507,7 @@ const Iu = (t) => {
|
|
|
10507
10507
|
return "unknown";
|
|
10508
10508
|
};
|
|
10509
10509
|
async function Mu(t, e, n) {
|
|
10510
|
-
if (
|
|
10510
|
+
if (ku(t.name) !== "image") return t;
|
|
10511
10511
|
const r = {
|
|
10512
10512
|
maxSizeMB: 1,
|
|
10513
10513
|
maxWidthOrHeight: 1920,
|
|
@@ -10578,39 +10578,65 @@ function mv({ progress: t = null }) {
|
|
|
10578
10578
|
}
|
|
10579
10579
|
function So({ mediaBlock: t, modifyMedia: e }) {
|
|
10580
10580
|
const [n, r] = tt(""), [i, a] = tt(""), [s, o] = tt(""), [c, d] = tt(""), [l, u] = tt(!1), [f, h] = tt(null), m = Gt(null);
|
|
10581
|
-
|
|
10582
|
-
window.addEventListener("dragover", (
|
|
10583
|
-
}, []),
|
|
10581
|
+
It(() => {
|
|
10582
|
+
window.addEventListener("dragover", (w) => w.preventDefault()), window.addEventListener("drop", (w) => w.preventDefault());
|
|
10583
|
+
}, []), It(() => {
|
|
10584
10584
|
r("To remove image or video component, refresh first."), t.data.src !== "" && (a(t.data.src), o(t.type));
|
|
10585
|
-
}, [t.data.src, t.type]),
|
|
10586
|
-
|
|
10585
|
+
}, [t.data.src, t.type]), It(() => {
|
|
10586
|
+
if (i && i instanceof File) {
|
|
10587
|
+
const w = URL.createObjectURL(i);
|
|
10588
|
+
t.type === "image" ? e({
|
|
10589
|
+
imageBlockId: t.id,
|
|
10590
|
+
src: w,
|
|
10591
|
+
alt: t.data.alt,
|
|
10592
|
+
caption: t.data.caption
|
|
10593
|
+
}) : t.type === "video" && e({
|
|
10594
|
+
videoBlockId: t.id,
|
|
10595
|
+
src: w,
|
|
10596
|
+
provider: t.data.provider
|
|
10597
|
+
});
|
|
10598
|
+
}
|
|
10599
|
+
c && o(ku(c));
|
|
10600
|
+
}, [i]);
|
|
10601
|
+
const b = () => {
|
|
10602
|
+
a(""), d(""), t.type === "image" ? e({
|
|
10587
10603
|
imageBlockId: t.id,
|
|
10588
|
-
src:
|
|
10604
|
+
src: "",
|
|
10589
10605
|
alt: t.data.alt,
|
|
10590
10606
|
caption: t.data.caption
|
|
10591
10607
|
}) : t.type === "video" && e({
|
|
10592
10608
|
videoBlockId: t.id,
|
|
10593
|
-
src:
|
|
10609
|
+
src: "",
|
|
10594
10610
|
provider: t.data.provider
|
|
10595
|
-
})
|
|
10596
|
-
}, [i]);
|
|
10597
|
-
const b = () => {
|
|
10598
|
-
a(""), d("");
|
|
10611
|
+
});
|
|
10599
10612
|
};
|
|
10600
10613
|
return /* @__PURE__ */ R.jsxs("div", { style: { width: "100%" }, children: [
|
|
10601
|
-
/* @__PURE__ */ R.jsx("div", { className: Ft.container, children: i && !l ? /* @__PURE__ */ R.jsx("div", { className: Ft.mediaWrapper, children: s === "image" ? /* @__PURE__ */ R.jsx(
|
|
10614
|
+
/* @__PURE__ */ R.jsx("div", { className: Ft.container, children: i && !l ? /* @__PURE__ */ R.jsx("div", { className: Ft.mediaWrapper, children: s === "image" ? /* @__PURE__ */ R.jsx(
|
|
10615
|
+
"img",
|
|
10616
|
+
{
|
|
10617
|
+
src: i instanceof File ? URL.createObjectURL(i) : i,
|
|
10618
|
+
alt: "",
|
|
10619
|
+
className: Ft.mediaItem
|
|
10620
|
+
}
|
|
10621
|
+
) : /* @__PURE__ */ R.jsx("video", { autoPlay: !0, muted: !0, controls: !0, className: Ft.mediaItem, children: /* @__PURE__ */ R.jsx(
|
|
10622
|
+
"source",
|
|
10623
|
+
{
|
|
10624
|
+
src: i instanceof File ? URL.createObjectURL(i) : i,
|
|
10625
|
+
type: "video/mp4"
|
|
10626
|
+
}
|
|
10627
|
+
) }) }) : l ? /* @__PURE__ */ R.jsx(mv, { progress: f }) : /* @__PURE__ */ R.jsxs(
|
|
10602
10628
|
"div",
|
|
10603
10629
|
{
|
|
10604
10630
|
ref: m,
|
|
10605
|
-
onDrop: (
|
|
10606
|
-
|
|
10631
|
+
onDrop: (w) => uv(
|
|
10632
|
+
w,
|
|
10607
10633
|
a,
|
|
10608
10634
|
d,
|
|
10609
10635
|
u,
|
|
10610
10636
|
h
|
|
10611
10637
|
),
|
|
10612
|
-
onDragOver: (
|
|
10613
|
-
onDragLeave: (
|
|
10638
|
+
onDragOver: (w) => dv(w, m),
|
|
10639
|
+
onDragLeave: (w) => hv(w, m),
|
|
10614
10640
|
className: Ft.dropzone,
|
|
10615
10641
|
children: [
|
|
10616
10642
|
/* @__PURE__ */ R.jsx(
|
|
@@ -10619,8 +10645,8 @@ function So({ mediaBlock: t, modifyMedia: e }) {
|
|
|
10619
10645
|
type: "file",
|
|
10620
10646
|
id: "file",
|
|
10621
10647
|
style: { display: "none" },
|
|
10622
|
-
onChange: (
|
|
10623
|
-
|
|
10648
|
+
onChange: (w) => fv(
|
|
10649
|
+
w,
|
|
10624
10650
|
a,
|
|
10625
10651
|
d,
|
|
10626
10652
|
u,
|
|
@@ -10679,7 +10705,7 @@ const Pi = {
|
|
|
10679
10705
|
};
|
|
10680
10706
|
function yv({ linkBlock: t, modifyLink: e }) {
|
|
10681
10707
|
const [n, r] = tt(t.data.linkText), [i, a] = tt(t.data.url);
|
|
10682
|
-
return
|
|
10708
|
+
return It(() => {
|
|
10683
10709
|
e({ linkBlockId: t.id, linkText: n, url: i });
|
|
10684
10710
|
}, [n, i, t.id]), /* @__PURE__ */ R.jsxs("div", { style: { display: "flex" }, children: [
|
|
10685
10711
|
/* @__PURE__ */ R.jsx(
|
|
@@ -10879,7 +10905,7 @@ function Av({ handleClick: t, options: e }) {
|
|
|
10879
10905
|
}
|
|
10880
10906
|
return o;
|
|
10881
10907
|
}), s = a ? To.filter((o) => a.includes(o.type)) : To;
|
|
10882
|
-
return /* @__PURE__ */ R.jsx("div", { className:
|
|
10908
|
+
return /* @__PURE__ */ R.jsx("div", { className: In.optionsContainer, children: s.map((o) => {
|
|
10883
10909
|
const c = (l) => l.type.split("-")[0] === "custom", d = c(o) ? (() => {
|
|
10884
10910
|
const l = e.find(
|
|
10885
10911
|
(u) => u.startsWith(o.type + "-")
|
|
@@ -10889,13 +10915,13 @@ function Av({ handleClick: t, options: e }) {
|
|
|
10889
10915
|
return /* @__PURE__ */ R.jsx(sn, { text: d, children: /* @__PURE__ */ R.jsxs(
|
|
10890
10916
|
"div",
|
|
10891
10917
|
{
|
|
10892
|
-
className:
|
|
10918
|
+
className: In.optionButton,
|
|
10893
10919
|
style: {
|
|
10894
10920
|
color: n === o.id ? "var(--draftify-theme-color)" : "#4b5563"
|
|
10895
10921
|
},
|
|
10896
10922
|
onClick: () => o.type !== "table" && i(o.id, o.type),
|
|
10897
10923
|
children: [
|
|
10898
|
-
/* @__PURE__ */ R.jsxs("div", { className:
|
|
10924
|
+
/* @__PURE__ */ R.jsxs("div", { className: In.iconWrapper, children: [
|
|
10899
10925
|
c(o) ? /* @__PURE__ */ R.jsx("div", { children: (() => {
|
|
10900
10926
|
const l = e.find(
|
|
10901
10927
|
(u) => u.startsWith(o.type + "-")
|
|
@@ -10908,7 +10934,7 @@ function Av({ handleClick: t, options: e }) {
|
|
|
10908
10934
|
onClick: () => o.type === "table" && i(o.id, o.type)
|
|
10909
10935
|
}
|
|
10910
10936
|
),
|
|
10911
|
-
/* @__PURE__ */ R.jsx("div", { className:
|
|
10937
|
+
/* @__PURE__ */ R.jsx("div", { className: In.subscript, children: o.type === "subheading" ? "2" : "" })
|
|
10912
10938
|
] }),
|
|
10913
10939
|
o.type === "table" && /* @__PURE__ */ R.jsx(ev, { handleClick: t, block: o })
|
|
10914
10940
|
]
|
|
@@ -10964,9 +10990,9 @@ function Tv({
|
|
|
10964
10990
|
handleCopy: a
|
|
10965
10991
|
}) {
|
|
10966
10992
|
const [s, o] = tt(!1), [c, d] = tt(null), l = Gt(null);
|
|
10967
|
-
|
|
10993
|
+
It(() => {
|
|
10968
10994
|
l.current && (l.current.style.transform = t === "editor" ? "translateX(14px)" : "translateX(1px)");
|
|
10969
|
-
}, [t]),
|
|
10995
|
+
}, [t]), It(() => {
|
|
10970
10996
|
if (s) {
|
|
10971
10997
|
const m = setTimeout(() => o(!1), 3e3);
|
|
10972
10998
|
return () => clearTimeout(m);
|
|
@@ -11262,7 +11288,7 @@ function Cv({
|
|
|
11262
11288
|
] })
|
|
11263
11289
|
] });
|
|
11264
11290
|
}
|
|
11265
|
-
function
|
|
11291
|
+
function Iv({
|
|
11266
11292
|
blocksData: t,
|
|
11267
11293
|
modifyBlocks: e,
|
|
11268
11294
|
defaultCustomData1: n,
|
|
@@ -11273,8 +11299,8 @@ function kv({
|
|
|
11273
11299
|
metadata: {},
|
|
11274
11300
|
version: "1.0.0",
|
|
11275
11301
|
blocks: t
|
|
11276
|
-
}), [o, c] = tt(""), [d, l] = tt(""), [u, f] = tt(""), [h, m] = tt([]), [b,
|
|
11277
|
-
|
|
11302
|
+
}), [o, c] = tt(""), [d, l] = tt(""), [u, f] = tt(""), [h, m] = tt([]), [b, w] = tt("editor"), [v, I] = tt(!1), [S, C] = tt("");
|
|
11303
|
+
It(() => {
|
|
11278
11304
|
if (!Array.isArray(t))
|
|
11279
11305
|
throw new Error(
|
|
11280
11306
|
"DraftifyReact: blocksData must be an array of DraftifyBlock[]"
|
|
@@ -11286,7 +11312,7 @@ function kv({
|
|
|
11286
11312
|
);
|
|
11287
11313
|
} else
|
|
11288
11314
|
e(Aa(t));
|
|
11289
|
-
}, []),
|
|
11315
|
+
}, []), It(() => {
|
|
11290
11316
|
(async (Y) => {
|
|
11291
11317
|
const H = await Promise.all(
|
|
11292
11318
|
Y.map(async (X) => {
|
|
@@ -11305,7 +11331,7 @@ function kv({
|
|
|
11305
11331
|
})
|
|
11306
11332
|
);
|
|
11307
11333
|
})(t);
|
|
11308
|
-
}, [t, a]),
|
|
11334
|
+
}, [t, a]), It(() => {
|
|
11309
11335
|
const W = {
|
|
11310
11336
|
docTitle: o || "Untitled",
|
|
11311
11337
|
description: d || "",
|
|
@@ -11328,8 +11354,8 @@ function kv({
|
|
|
11328
11354
|
Y === "add" ? a : { ...a, metadata: H }
|
|
11329
11355
|
) : W === "exportDocx" && hf(
|
|
11330
11356
|
Y === "add" ? a : { ...a, metadata: H }
|
|
11331
|
-
),
|
|
11332
|
-
},
|
|
11357
|
+
), I(!1);
|
|
11358
|
+
}, A = (W, Y) => {
|
|
11333
11359
|
switch (W) {
|
|
11334
11360
|
case "heading":
|
|
11335
11361
|
e((H) => [...H, ff()]);
|
|
@@ -11396,7 +11422,7 @@ function kv({
|
|
|
11396
11422
|
e(
|
|
11397
11423
|
(X) => Qu(X, W, Y, H)
|
|
11398
11424
|
);
|
|
11399
|
-
},
|
|
11425
|
+
}, k = ({ listBlockId: W, listStyle: Y, items: H }) => {
|
|
11400
11426
|
e(
|
|
11401
11427
|
(X) => qu(X, W, Y, H)
|
|
11402
11428
|
);
|
|
@@ -11426,7 +11452,7 @@ function kv({
|
|
|
11426
11452
|
return {
|
|
11427
11453
|
// current view
|
|
11428
11454
|
view: b,
|
|
11429
|
-
setView:
|
|
11455
|
+
setView: w,
|
|
11430
11456
|
// background grid
|
|
11431
11457
|
gridDots: h,
|
|
11432
11458
|
setGridDots: m,
|
|
@@ -11444,17 +11470,17 @@ function kv({
|
|
|
11444
11470
|
promptAction: S,
|
|
11445
11471
|
setPromptAction: C,
|
|
11446
11472
|
promptVisibility: v,
|
|
11447
|
-
setPromptVisiblility:
|
|
11473
|
+
setPromptVisiblility: I,
|
|
11448
11474
|
// blocks data
|
|
11449
11475
|
blocksData: t,
|
|
11450
11476
|
// block creator
|
|
11451
|
-
handleClick:
|
|
11477
|
+
handleClick: A,
|
|
11452
11478
|
// block modifiers
|
|
11453
11479
|
modifyHeading: L,
|
|
11454
11480
|
modifySubheading: p,
|
|
11455
11481
|
modifyParagraph: y,
|
|
11456
11482
|
modifyQuote: T,
|
|
11457
|
-
modifyList:
|
|
11483
|
+
modifyList: k,
|
|
11458
11484
|
modifyTable: M,
|
|
11459
11485
|
modifyImage: D,
|
|
11460
11486
|
modifyVideo: E,
|
|
@@ -11504,8 +11530,8 @@ function kv({
|
|
|
11504
11530
|
handleDelete: _
|
|
11505
11531
|
};
|
|
11506
11532
|
}
|
|
11507
|
-
function
|
|
11508
|
-
|
|
11533
|
+
function kv(t) {
|
|
11534
|
+
It(() => {
|
|
11509
11535
|
function e() {
|
|
11510
11536
|
const r = Math.ceil(window.innerWidth / 20), i = Math.ceil(document.documentElement.scrollHeight / 20), a = [];
|
|
11511
11537
|
for (let s = 0; s < i; s++)
|
|
@@ -11632,20 +11658,20 @@ function Qv({
|
|
|
11632
11658
|
gridDots: m,
|
|
11633
11659
|
setGridDots: b,
|
|
11634
11660
|
// document metadata
|
|
11635
|
-
docTitle:
|
|
11661
|
+
docTitle: w,
|
|
11636
11662
|
setDocTitle: v,
|
|
11637
|
-
description:
|
|
11663
|
+
description: I,
|
|
11638
11664
|
setDescription: S,
|
|
11639
11665
|
author: C,
|
|
11640
11666
|
setAuthor: P,
|
|
11641
11667
|
// copy blocks
|
|
11642
|
-
handleCopy:
|
|
11668
|
+
handleCopy: A,
|
|
11643
11669
|
// prompt handlers
|
|
11644
11670
|
handlePromptAction: L,
|
|
11645
11671
|
promptAction: p,
|
|
11646
11672
|
setPromptAction: y,
|
|
11647
11673
|
promptVisibility: T,
|
|
11648
|
-
setPromptVisiblility:
|
|
11674
|
+
setPromptVisiblility: k,
|
|
11649
11675
|
// block creator
|
|
11650
11676
|
handleClick: M,
|
|
11651
11677
|
// block modifiers
|
|
@@ -11672,14 +11698,14 @@ function Qv({
|
|
|
11672
11698
|
whileHover: X,
|
|
11673
11699
|
// block delete
|
|
11674
11700
|
handleDelete: At
|
|
11675
|
-
} =
|
|
11701
|
+
} = Iv({
|
|
11676
11702
|
blocksData: t,
|
|
11677
11703
|
modifyBlocks: e,
|
|
11678
11704
|
defaultCustomData1: d,
|
|
11679
11705
|
defaultCustomData2: l,
|
|
11680
11706
|
defaultCustomData3: u
|
|
11681
11707
|
});
|
|
11682
|
-
return
|
|
11708
|
+
return kv(b), /* @__PURE__ */ R.jsxs("div", { className: "draftify-root", children: [
|
|
11683
11709
|
/* @__PURE__ */ R.jsx(Ev, { gridDots: m }),
|
|
11684
11710
|
/* @__PURE__ */ R.jsxs("div", { className: "draftify-container", children: [
|
|
11685
11711
|
/* @__PURE__ */ R.jsx(
|
|
@@ -11689,22 +11715,22 @@ function Qv({
|
|
|
11689
11715
|
setView: h,
|
|
11690
11716
|
blocksData: t,
|
|
11691
11717
|
setPromptAction: y,
|
|
11692
|
-
setPromptVisiblility:
|
|
11693
|
-
handleCopy:
|
|
11718
|
+
setPromptVisiblility: k,
|
|
11719
|
+
handleCopy: A
|
|
11694
11720
|
}
|
|
11695
11721
|
),
|
|
11696
11722
|
T && /* @__PURE__ */ R.jsx(
|
|
11697
11723
|
Cv,
|
|
11698
11724
|
{
|
|
11699
|
-
docTitle:
|
|
11725
|
+
docTitle: w,
|
|
11700
11726
|
setDocTitle: v,
|
|
11701
|
-
description:
|
|
11727
|
+
description: I,
|
|
11702
11728
|
setDescription: S,
|
|
11703
11729
|
author: C,
|
|
11704
11730
|
setAuthor: P,
|
|
11705
11731
|
promptAction: p,
|
|
11706
11732
|
handlePromptAction: L,
|
|
11707
|
-
setPromptVisiblility:
|
|
11733
|
+
setPromptVisiblility: k
|
|
11708
11734
|
}
|
|
11709
11735
|
),
|
|
11710
11736
|
f === "editor" && /* @__PURE__ */ R.jsxs(R.Fragment, { children: [
|
|
@@ -11788,5 +11814,5 @@ export {
|
|
|
11788
11814
|
hv as dragLeaveHandler,
|
|
11789
11815
|
uv as dropHandler,
|
|
11790
11816
|
fv as onFileChange,
|
|
11791
|
-
|
|
11817
|
+
Iv as useDraftifyReact
|
|
11792
11818
|
};
|